@nexushub/client 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +75 -95
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var Hu=Object.create;var Kn=Object.defineProperty;var Gu=Object.getOwnPropertyDescriptor;var Ku=Object.getOwnPropertyNames;var Vu=Object.getPrototypeOf,Yu=Object.prototype.hasOwnProperty;var Ca=n=>{throw TypeError(n)};var Xu=(n,t,o)=>t in n?Kn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Kr=(n,t)=>()=>(n&&(t=n(n=0)),t);var di=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),xa=(n,t)=>{for(var o in t)Kn(n,o,{get:t[o],enumerable:!0})},Ju=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ku(t))!Yu.call(n,a)&&a!==o&&Kn(n,a,{get:()=>t[a],enumerable:!(i=Gu(t,a))||i.enumerable});return n};var J=(n,t,o)=>(o=n!=null?Hu(Vu(n)):{},Ju(t||!n||!n.__esModule?Kn(o,"default",{value:n,enumerable:!0}):o,n));var Mt=(n,t,o)=>Xu(n,typeof t!="symbol"?t+"":t,o),hi=(n,t,o)=>t.has(n)||Ca("Cannot "+o);var g=(n,t,o)=>(hi(n,t,"read from private field"),o?o.call(n):t.get(n)),q=(n,t,o)=>t.has(n)?Ca("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,o),L=(n,t,o,i)=>(hi(n,t,"write to private field"),i?i.call(n,o):t.set(n,o),o),V=(n,t,o)=>(hi(n,t,"access private method"),o);var pi=(n,t,o,i)=>({set _(a){L(n,t,a,o)},get _(){return g(n,t,i)}});var dl=di((lo,fl)=>{"use strict";(function(n,t){typeof lo=="object"&&typeof fl<"u"?t(lo):typeof define=="function"&&define.amd?define(["exports"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.WebStreamsPolyfill={}))})(lo,(function(n){"use strict";function t(){}function o(e){return typeof e=="object"&&e!==null||typeof e=="function"}let i=t;function a(e,r){try{Object.defineProperty(e,"name",{value:r,configurable:!0})}catch{}}let l=Promise,u=Promise.prototype.then,p=Promise.reject.bind(l);function m(e){return new l(e)}function d(e){return m(r=>r(e))}function h(e){return p(e)}function C(e,r,s){return u.call(e,r,s)}function P(e,r,s){C(C(e,r,s),void 0,i)}function I(e,r){P(e,r)}function y(e,r){P(e,void 0,r)}function T(e,r,s){return C(e,r,s)}function O(e){C(e,void 0,i)}let D=e=>{if(typeof queueMicrotask=="function")D=queueMicrotask;else{let r=d(void 0);D=s=>C(r,s)}return D(e)};function $(e,r,s){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,r,s)}function k(e,r,s){try{return d($(e,r,s))}catch(c){return h(c)}}let x=16384;class A{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(r){let s=this._back,c=s;s._elements.length===x-1&&(c={_elements:[],_next:void 0}),s._elements.push(r),c!==s&&(this._back=c,s._next=c),++this._size}shift(){let r=this._front,s=r,c=this._cursor,f=c+1,b=r._elements,_=b[c];return f===x&&(s=r._next,f=0),--this._size,this._cursor=f,r!==s&&(this._front=s),b[c]=void 0,_}forEach(r){let s=this._cursor,c=this._front,f=c._elements;for(;(s!==f.length||c._next!==void 0)&&!(s===f.length&&(c=c._next,f=c._elements,s=0,f.length===0));)r(f[s]),++s}peek(){let r=this._front,s=this._cursor;return r._elements[s]}}let N=Symbol("[[AbortSteps]]"),Q=Symbol("[[ErrorSteps]]"),Ve=Symbol("[[CancelSteps]]"),ye=Symbol("[[PullSteps]]"),Dt=Symbol("[[ReleaseSteps]]");function mn(e,r){e._ownerReadableStream=r,r._reader=e,r._state==="readable"?Nt(e):r._state==="closed"?Io(e):gn(e,r._storedError)}function Lr(e,r){let s=e._ownerReadableStream;return We(s,r)}function De(e){let r=e._ownerReadableStream;r._state==="readable"?kr(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):yn(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),r._readableStreamController[Dt](),r._reader=void 0,e._ownerReadableStream=void 0}function nr(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Nt(e){e._closedPromise=m((r,s)=>{e._closedPromise_resolve=r,e._closedPromise_reject=s})}function gn(e,r){Nt(e),kr(e,r)}function Io(e){Nt(e),Br(e)}function kr(e,r){e._closedPromise_reject!==void 0&&(O(e._closedPromise),e._closedPromise_reject(r),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function yn(e,r){gn(e,r)}function Br(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}let H=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Y=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function ie(e){return typeof e=="object"||typeof e=="function"}function be(e,r){if(e!==void 0&&!ie(e))throw new TypeError(`${r} is not an object.`)}function _e(e,r){if(typeof e!="function")throw new TypeError(`${r} is not a function.`)}function ic(e){return typeof e=="object"&&e!==null||typeof e=="function"}function hs(e,r){if(!ic(e))throw new TypeError(`${r} is not an object.`)}function tt(e,r,s){if(e===void 0)throw new TypeError(`Parameter ${r} is required in '${s}'.`)}function Oo(e,r,s){if(e===void 0)throw new TypeError(`${r} is required in '${s}'.`)}function Do(e){return Number(e)}function ps(e){return e===0?0:e}function sc(e){return ps(Y(e))}function No(e,r){let c=Number.MAX_SAFE_INTEGER,f=Number(e);if(f=ps(f),!H(f))throw new TypeError(`${r} is not a finite number`);if(f=sc(f),f<0||f>c)throw new TypeError(`${r} is outside the accepted range of 0 to ${c}, inclusive`);return!H(f)||f===0?0:f}function Lo(e,r){if(!_t(e))throw new TypeError(`${r} is not a ReadableStream.`)}function or(e){return new ht(e)}function ms(e,r){e._reader._readRequests.push(r)}function ko(e,r,s){let f=e._reader._readRequests.shift();s?f._closeSteps():f._chunkSteps(r)}function bn(e){return e._reader._readRequests.length}function gs(e){let r=e._reader;return!(r===void 0||!pt(r))}class ht{constructor(r){if(tt(r,1,"ReadableStreamDefaultReader"),Lo(r,"First parameter"),wt(r))throw new TypeError("This stream has already been locked for exclusive reading by another reader");mn(this,r),this._readRequests=new A}get closed(){return pt(this)?this._closedPromise:h(_n("closed"))}cancel(r=void 0){return pt(this)?this._ownerReadableStream===void 0?h(nr("cancel")):Lr(this,r):h(_n("cancel"))}read(){if(!pt(this))return h(_n("read"));if(this._ownerReadableStream===void 0)return h(nr("read from"));let r,s,c=m((b,_)=>{r=b,s=_});return jr(this,{_chunkSteps:b=>r({value:b,done:!1}),_closeSteps:()=>r({value:void 0,done:!0}),_errorSteps:b=>s(b)}),c}releaseLock(){if(!pt(this))throw _n("releaseLock");this._ownerReadableStream!==void 0&&ac(this)}}Object.defineProperties(ht.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),a(ht.prototype.cancel,"cancel"),a(ht.prototype.read,"read"),a(ht.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ht.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function pt(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof ht}function jr(e,r){let s=e._ownerReadableStream;s._disturbed=!0,s._state==="closed"?r._closeSteps():s._state==="errored"?r._errorSteps(s._storedError):s._readableStreamController[ye](r)}function ac(e){De(e);let r=new TypeError("Reader was released");ys(e,r)}function ys(e,r){let s=e._readRequests;e._readRequests=new A,s.forEach(c=>{c._errorSteps(r)})}function _n(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let lc=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class bs{constructor(r,s){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=r,this._preventCancel=s}next(){let r=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?T(this._ongoingPromise,r,r):r(),this._ongoingPromise}return(r){let s=()=>this._returnSteps(r);return this._ongoingPromise?T(this._ongoingPromise,s,s):s()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let r=this._reader,s,c,f=m((_,v)=>{s=_,c=v});return jr(r,{_chunkSteps:_=>{this._ongoingPromise=void 0,D(()=>s({value:_,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,De(r),s({value:void 0,done:!0})},_errorSteps:_=>{this._ongoingPromise=void 0,this._isFinished=!0,De(r),c(_)}}),f}_returnSteps(r){if(this._isFinished)return Promise.resolve({value:r,done:!0});this._isFinished=!0;let s=this._reader;if(!this._preventCancel){let c=Lr(s,r);return De(s),T(c,()=>({value:r,done:!0}))}return De(s),d({value:r,done:!0})}}let _s={next(){return ws(this)?this._asyncIteratorImpl.next():h(Ss("next"))},return(e){return ws(this)?this._asyncIteratorImpl.return(e):h(Ss("return"))}};Object.setPrototypeOf(_s,lc);function cc(e,r){let s=or(e),c=new bs(s,r),f=Object.create(_s);return f._asyncIteratorImpl=c,f}function ws(e){if(!o(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof bs}catch{return!1}}function Ss(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}let Es=Number.isNaN||function(e){return e!==e};var Bo,jo,Fo;function Fr(e){return e.slice()}function Rs(e,r,s,c,f){new Uint8Array(e).set(new Uint8Array(s,c,f),r)}let rt=e=>(typeof e.transfer=="function"?rt=r=>r.transfer():typeof structuredClone=="function"?rt=r=>structuredClone(r,{transfer:[r]}):rt=r=>r,rt(e)),mt=e=>(typeof e.detached=="boolean"?mt=r=>r.detached:mt=r=>r.byteLength===0,mt(e));function Ts(e,r,s){if(e.slice)return e.slice(r,s);let c=s-r,f=new ArrayBuffer(c);return Rs(f,0,e,r,c),f}function wn(e,r){let s=e[r];if(s!=null){if(typeof s!="function")throw new TypeError(`${String(r)} is not a function`);return s}}function uc(e){let r={[Symbol.iterator]:()=>e.iterator},s=(async function*(){return yield*r})(),c=s.next;return{iterator:s,nextMethod:c,done:!1}}let $o=(Fo=(Bo=Symbol.asyncIterator)!==null&&Bo!==void 0?Bo:(jo=Symbol.for)===null||jo===void 0?void 0:jo.call(Symbol,"Symbol.asyncIterator"))!==null&&Fo!==void 0?Fo:"@@asyncIterator";function Cs(e,r="sync",s){if(s===void 0)if(r==="async"){if(s=wn(e,$o),s===void 0){let b=wn(e,Symbol.iterator),_=Cs(e,"sync",b);return uc(_)}}else s=wn(e,Symbol.iterator);if(s===void 0)throw new TypeError("The object is not iterable");let c=$(s,e,[]);if(!o(c))throw new TypeError("The iterator method must return an object");let f=c.next;return{iterator:c,nextMethod:f,done:!1}}function fc(e){let r=$(e.nextMethod,e.iterator,[]);if(!o(r))throw new TypeError("The iterator.next() method must return an object");return r}function dc(e){return!!e.done}function hc(e){return e.value}function pc(e){return!(typeof e!="number"||Es(e)||e<0)}function xs(e){let r=Ts(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(r)}function Uo(e){let r=e._queue.shift();return e._queueTotalSize-=r.size,e._queueTotalSize<0&&(e._queueTotalSize=0),r.value}function Wo(e,r,s){if(!pc(s)||s===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:r,size:s}),e._queueTotalSize+=s}function mc(e){return e._queue.peek().value}function gt(e){e._queue=new A,e._queueTotalSize=0}function vs(e){return e===DataView}function gc(e){return vs(e.constructor)}function yc(e){return vs(e)?1:e.BYTES_PER_ELEMENT}class Lt{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Mo(this))throw Ko("view");return this._view}respond(r){if(!Mo(this))throw Ko("respond");if(tt(r,1,"respond"),r=No(r,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(mt(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Tn(this._associatedReadableByteStreamController,r)}respondWithNewView(r){if(!Mo(this))throw Ko("respondWithNewView");if(tt(r,1,"respondWithNewView"),!ArrayBuffer.isView(r))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");if(mt(r.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Cn(this._associatedReadableByteStreamController,r)}}Object.defineProperties(Lt.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),a(Lt.prototype.respond,"respond"),a(Lt.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Lt.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class nt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!kt(this))throw Ur("byobRequest");return Go(this)}get desiredSize(){if(!kt(this))throw Ur("desiredSize");return js(this)}close(){if(!kt(this))throw Ur("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let r=this._controlledReadableByteStream._state;if(r!=="readable")throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be closed`);$r(this)}enqueue(r){if(!kt(this))throw Ur("enqueue");if(tt(r,1,"enqueue"),!ArrayBuffer.isView(r))throw new TypeError("chunk must be an array buffer view");if(r.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(r.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 s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be enqueued to`);Rn(this,r)}error(r=void 0){if(!kt(this))throw Ur("error");Ne(this,r)}[Ve](r){Ps(this),gt(this);let s=this._cancelAlgorithm(r);return En(this),s}[ye](r){let s=this._controlledReadableByteStream;if(this._queueTotalSize>0){Bs(this,r);return}let c=this._autoAllocateChunkSize;if(c!==void 0){let f;try{f=new ArrayBuffer(c)}catch(_){r._errorSteps(_);return}let b={buffer:f,bufferByteLength:c,byteOffset:0,byteLength:c,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(b)}ms(s,r),Bt(this)}[Dt](){if(this._pendingPullIntos.length>0){let r=this._pendingPullIntos.peek();r.readerType="none",this._pendingPullIntos=new A,this._pendingPullIntos.push(r)}}}Object.defineProperties(nt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),a(nt.prototype.close,"close"),a(nt.prototype.enqueue,"enqueue"),a(nt.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(nt.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function kt(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof nt}function Mo(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof Lt}function Bt(e){if(!Ec(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let s=e._pullAlgorithm();P(s,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Bt(e)),null),c=>(Ne(e,c),null))}function Ps(e){zo(e),e._pendingPullIntos=new A}function qo(e,r){let s=!1;e._state==="closed"&&(s=!0);let c=As(r);r.readerType==="default"?ko(e,c,s):Pc(e,c,s)}function As(e){let r=e.bytesFilled,s=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,r/s)}function Sn(e,r,s,c){e._queue.push({buffer:r,byteOffset:s,byteLength:c}),e._queueTotalSize+=c}function Is(e,r,s,c){let f;try{f=Ts(r,s,s+c)}catch(b){throw Ne(e,b),b}Sn(e,f,0,c)}function Os(e,r){r.bytesFilled>0&&Is(e,r.buffer,r.byteOffset,r.bytesFilled),ir(e)}function Ds(e,r){let s=Math.min(e._queueTotalSize,r.byteLength-r.bytesFilled),c=r.bytesFilled+s,f=s,b=!1,_=c%r.elementSize,v=c-_;v>=r.minimumFill&&(f=v-r.bytesFilled,b=!0);let U=e._queue;for(;f>0;){let B=U.peek(),M=Math.min(f,B.byteLength),G=r.byteOffset+r.bytesFilled;Rs(r.buffer,G,B.buffer,B.byteOffset,M),B.byteLength===M?U.shift():(B.byteOffset+=M,B.byteLength-=M),e._queueTotalSize-=M,Ns(e,M,r),f-=M}return b}function Ns(e,r,s){s.bytesFilled+=r}function Ls(e){e._queueTotalSize===0&&e._closeRequested?(En(e),Gr(e._controlledReadableByteStream)):Bt(e)}function zo(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ho(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;let r=e._pendingPullIntos.peek();Ds(e,r)&&(ir(e),qo(e._controlledReadableByteStream,r))}}function bc(e){let r=e._controlledReadableByteStream._reader;for(;r._readRequests.length>0;){if(e._queueTotalSize===0)return;let s=r._readRequests.shift();Bs(e,s)}}function _c(e,r,s,c){let f=e._controlledReadableByteStream,b=r.constructor,_=yc(b),{byteOffset:v,byteLength:U}=r,B=s*_,M;try{M=rt(r.buffer)}catch(te){c._errorSteps(te);return}let G={buffer:M,bufferByteLength:M.byteLength,byteOffset:v,byteLength:U,bytesFilled:0,minimumFill:B,elementSize:_,viewConstructor:b,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(G),Us(f,c);return}if(f._state==="closed"){let te=new b(G.buffer,G.byteOffset,0);c._closeSteps(te);return}if(e._queueTotalSize>0){if(Ds(e,G)){let te=As(G);Ls(e),c._chunkSteps(te);return}if(e._closeRequested){let te=new TypeError("Insufficient bytes to fill elements in the given buffer");Ne(e,te),c._errorSteps(te);return}}e._pendingPullIntos.push(G),Us(f,c),Bt(e)}function wc(e,r){r.readerType==="none"&&ir(e);let s=e._controlledReadableByteStream;if(Vo(s))for(;Ws(s)>0;){let c=ir(e);qo(s,c)}}function Sc(e,r,s){if(Ns(e,r,s),s.readerType==="none"){Os(e,s),Ho(e);return}if(s.bytesFilled<s.minimumFill)return;ir(e);let c=s.bytesFilled%s.elementSize;if(c>0){let f=s.byteOffset+s.bytesFilled;Is(e,s.buffer,f-c,c)}s.bytesFilled-=c,qo(e._controlledReadableByteStream,s),Ho(e)}function ks(e,r){let s=e._pendingPullIntos.peek();zo(e),e._controlledReadableByteStream._state==="closed"?wc(e,s):Sc(e,r,s),Bt(e)}function ir(e){return e._pendingPullIntos.shift()}function Ec(e){let r=e._controlledReadableByteStream;return r._state!=="readable"||e._closeRequested||!e._started?!1:!!(gs(r)&&bn(r)>0||Vo(r)&&Ws(r)>0||js(e)>0)}function En(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function $r(e){let r=e._controlledReadableByteStream;if(!(e._closeRequested||r._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){let s=e._pendingPullIntos.peek();if(s.bytesFilled%s.elementSize!==0){let c=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ne(e,c),c}}En(e),Gr(r)}}function Rn(e,r){let s=e._controlledReadableByteStream;if(e._closeRequested||s._state!=="readable")return;let{buffer:c,byteOffset:f,byteLength:b}=r;if(mt(c))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let _=rt(c);if(e._pendingPullIntos.length>0){let v=e._pendingPullIntos.peek();if(mt(v.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");zo(e),v.buffer=rt(v.buffer),v.readerType==="none"&&Os(e,v)}if(gs(s))if(bc(e),bn(s)===0)Sn(e,_,f,b);else{e._pendingPullIntos.length>0&&ir(e);let v=new Uint8Array(_,f,b);ko(s,v,!1)}else Vo(s)?(Sn(e,_,f,b),Ho(e)):Sn(e,_,f,b);Bt(e)}function Ne(e,r){let s=e._controlledReadableByteStream;s._state==="readable"&&(Ps(e),gt(e),En(e),fa(s,r))}function Bs(e,r){let s=e._queue.shift();e._queueTotalSize-=s.byteLength,Ls(e);let c=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);r._chunkSteps(c)}function Go(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){let r=e._pendingPullIntos.peek(),s=new Uint8Array(r.buffer,r.byteOffset+r.bytesFilled,r.byteLength-r.bytesFilled),c=Object.create(Lt.prototype);Tc(c,e,s),e._byobRequest=c}return e._byobRequest}function js(e){let r=e._controlledReadableByteStream._state;return r==="errored"?null:r==="closed"?0:e._strategyHWM-e._queueTotalSize}function Tn(e,r){let s=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(r!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(r===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(s.bytesFilled+r>s.byteLength)throw new RangeError("bytesWritten out of range")}s.buffer=rt(s.buffer),ks(e,r)}function Cn(e,r){let s=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(r.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(r.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(s.byteOffset+s.bytesFilled!==r.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(s.bufferByteLength!==r.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(s.bytesFilled+r.byteLength>s.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let f=r.byteLength;s.buffer=rt(r.buffer),ks(e,f)}function Fs(e,r,s,c,f,b,_){r._controlledReadableByteStream=e,r._pullAgain=!1,r._pulling=!1,r._byobRequest=null,r._queue=r._queueTotalSize=void 0,gt(r),r._closeRequested=!1,r._started=!1,r._strategyHWM=b,r._pullAlgorithm=c,r._cancelAlgorithm=f,r._autoAllocateChunkSize=_,r._pendingPullIntos=new A,e._readableStreamController=r;let v=s();P(d(v),()=>(r._started=!0,Bt(r),null),U=>(Ne(r,U),null))}function Rc(e,r,s){let c=Object.create(nt.prototype),f,b,_;r.start!==void 0?f=()=>r.start(c):f=()=>{},r.pull!==void 0?b=()=>r.pull(c):b=()=>d(void 0),r.cancel!==void 0?_=U=>r.cancel(U):_=()=>d(void 0);let v=r.autoAllocateChunkSize;if(v===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Fs(e,c,f,b,_,s,v)}function Tc(e,r,s){e._associatedReadableByteStreamController=r,e._view=s}function Ko(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Ur(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function Cc(e,r){be(e,r);let s=e?.mode;return{mode:s===void 0?void 0:xc(s,`${r} has member 'mode' that`)}}function xc(e,r){if(e=`${e}`,e!=="byob")throw new TypeError(`${r} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function vc(e,r){var s;be(e,r);let c=(s=e?.min)!==null&&s!==void 0?s:1;return{min:No(c,`${r} has member 'min' that`)}}function $s(e){return new yt(e)}function Us(e,r){e._reader._readIntoRequests.push(r)}function Pc(e,r,s){let f=e._reader._readIntoRequests.shift();s?f._closeSteps(r):f._chunkSteps(r)}function Ws(e){return e._reader._readIntoRequests.length}function Vo(e){let r=e._reader;return!(r===void 0||!jt(r))}class yt{constructor(r){if(tt(r,1,"ReadableStreamBYOBReader"),Lo(r,"First parameter"),wt(r))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!kt(r._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");mn(this,r),this._readIntoRequests=new A}get closed(){return jt(this)?this._closedPromise:h(xn("closed"))}cancel(r=void 0){return jt(this)?this._ownerReadableStream===void 0?h(nr("cancel")):Lr(this,r):h(xn("cancel"))}read(r,s={}){if(!jt(this))return h(xn("read"));if(!ArrayBuffer.isView(r))return h(new TypeError("view must be an array buffer view"));if(r.byteLength===0)return h(new TypeError("view must have non-zero byteLength"));if(r.buffer.byteLength===0)return h(new TypeError("view's buffer must have non-zero byteLength"));if(mt(r.buffer))return h(new TypeError("view's buffer has been detached"));let c;try{c=vc(s,"options")}catch(B){return h(B)}let f=c.min;if(f===0)return h(new TypeError("options.min must be greater than 0"));if(gc(r)){if(f>r.byteLength)return h(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(f>r.length)return h(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return h(nr("read from"));let b,_,v=m((B,M)=>{b=B,_=M});return Ms(this,r,f,{_chunkSteps:B=>b({value:B,done:!1}),_closeSteps:B=>b({value:B,done:!0}),_errorSteps:B=>_(B)}),v}releaseLock(){if(!jt(this))throw xn("releaseLock");this._ownerReadableStream!==void 0&&Ac(this)}}Object.defineProperties(yt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),a(yt.prototype.cancel,"cancel"),a(yt.prototype.read,"read"),a(yt.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(yt.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function jt(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof yt}function Ms(e,r,s,c){let f=e._ownerReadableStream;f._disturbed=!0,f._state==="errored"?c._errorSteps(f._storedError):_c(f._readableStreamController,r,s,c)}function Ac(e){De(e);let r=new TypeError("Reader was released");qs(e,r)}function qs(e,r){let s=e._readIntoRequests;e._readIntoRequests=new A,s.forEach(c=>{c._errorSteps(r)})}function xn(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Wr(e,r){let{highWaterMark:s}=e;if(s===void 0)return r;if(Es(s)||s<0)throw new RangeError("Invalid highWaterMark");return s}function vn(e){let{size:r}=e;return r||(()=>1)}function Pn(e,r){be(e,r);let s=e?.highWaterMark,c=e?.size;return{highWaterMark:s===void 0?void 0:Do(s),size:c===void 0?void 0:Ic(c,`${r} has member 'size' that`)}}function Ic(e,r){return _e(e,r),s=>Do(e(s))}function Oc(e,r){be(e,r);let s=e?.abort,c=e?.close,f=e?.start,b=e?.type,_=e?.write;return{abort:s===void 0?void 0:Dc(s,e,`${r} has member 'abort' that`),close:c===void 0?void 0:Nc(c,e,`${r} has member 'close' that`),start:f===void 0?void 0:Lc(f,e,`${r} has member 'start' that`),write:_===void 0?void 0:kc(_,e,`${r} has member 'write' that`),type:b}}function Dc(e,r,s){return _e(e,s),c=>k(e,r,[c])}function Nc(e,r,s){return _e(e,s),()=>k(e,r,[])}function Lc(e,r,s){return _e(e,s),c=>$(e,r,[c])}function kc(e,r,s){return _e(e,s),(c,f)=>k(e,r,[c,f])}function zs(e,r){if(!sr(e))throw new TypeError(`${r} is not a WritableStream.`)}function Bc(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}let jc=typeof AbortController=="function";function Fc(){if(jc)return new AbortController}class bt{constructor(r={},s={}){r===void 0?r=null:hs(r,"First parameter");let c=Pn(s,"Second parameter"),f=Oc(r,"First parameter");if(Gs(this),f.type!==void 0)throw new RangeError("Invalid type is specified");let _=vn(c),v=Wr(c,1);Qc(this,f,v,_)}get locked(){if(!sr(this))throw Nn("locked");return ar(this)}abort(r=void 0){return sr(this)?ar(this)?h(new TypeError("Cannot abort a stream that already has a writer")):An(this,r):h(Nn("abort"))}close(){return sr(this)?ar(this)?h(new TypeError("Cannot close a stream that already has a writer")):Ye(this)?h(new TypeError("Cannot close an already-closing stream")):Ks(this):h(Nn("close"))}getWriter(){if(!sr(this))throw Nn("getWriter");return Hs(this)}}Object.defineProperties(bt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),a(bt.prototype.abort,"abort"),a(bt.prototype.close,"close"),a(bt.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(bt.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Hs(e){return new ot(e)}function $c(e,r,s,c,f=1,b=()=>1){let _=Object.create(bt.prototype);Gs(_);let v=Object.create(lr.prototype);return Zs(_,v,e,r,s,c,f,b),_}function Gs(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new A,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function sr(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof bt}function ar(e){return e._writer!==void 0}function An(e,r){var s;if(e._state==="closed"||e._state==="errored")return d(void 0);e._writableStreamController._abortReason=r,(s=e._writableStreamController._abortController)===null||s===void 0||s.abort(r);let c=e._state;if(c==="closed"||c==="errored")return d(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let f=!1;c==="erroring"&&(f=!0,r=void 0);let b=m((_,v)=>{e._pendingAbortRequest={_promise:void 0,_resolve:_,_reject:v,_reason:r,_wasAlreadyErroring:f}});return e._pendingAbortRequest._promise=b,f||Xo(e,r),b}function Ks(e){let r=e._state;if(r==="closed"||r==="errored")return h(new TypeError(`The stream (in ${r} state) is not in the writable state and cannot be closed`));let s=m((f,b)=>{let _={_resolve:f,_reject:b};e._closeRequest=_}),c=e._writer;return c!==void 0&&e._backpressure&&r==="writable"&&oi(c),Zc(e._writableStreamController),s}function Uc(e){return m((s,c)=>{let f={_resolve:s,_reject:c};e._writeRequests.push(f)})}function Yo(e,r){if(e._state==="writable"){Xo(e,r);return}Jo(e)}function Xo(e,r){let s=e._writableStreamController;e._state="erroring",e._storedError=r;let c=e._writer;c!==void 0&&Ys(c,r),!Hc(e)&&s._started&&Jo(e)}function Jo(e){e._state="errored",e._writableStreamController[Q]();let r=e._storedError;if(e._writeRequests.forEach(f=>{f._reject(r)}),e._writeRequests=new A,e._pendingAbortRequest===void 0){In(e);return}let s=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,s._wasAlreadyErroring){s._reject(r),In(e);return}let c=e._writableStreamController[N](s._reason);P(c,()=>(s._resolve(),In(e),null),f=>(s._reject(f),In(e),null))}function Wc(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Mc(e,r){e._inFlightWriteRequest._reject(r),e._inFlightWriteRequest=void 0,Yo(e,r)}function qc(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";let s=e._writer;s!==void 0&&na(s)}function zc(e,r){e._inFlightCloseRequest._reject(r),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(r),e._pendingAbortRequest=void 0),Yo(e,r)}function Ye(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function Hc(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function Gc(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Kc(e){e._inFlightWriteRequest=e._writeRequests.shift()}function In(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);let r=e._writer;r!==void 0&&ri(r,e._storedError)}function Qo(e,r){let s=e._writer;s!==void 0&&r!==e._backpressure&&(r?su(s):oi(s)),e._backpressure=r}class ot{constructor(r){if(tt(r,1,"WritableStreamDefaultWriter"),zs(r,"First parameter"),ar(r))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=r,r._writer=this;let s=r._state;if(s==="writable")!Ye(r)&&r._backpressure?kn(this):oa(this),Ln(this);else if(s==="erroring")ni(this,r._storedError),Ln(this);else if(s==="closed")oa(this),ou(this);else{let c=r._storedError;ni(this,c),ra(this,c)}}get closed(){return Ft(this)?this._closedPromise:h($t("closed"))}get desiredSize(){if(!Ft(this))throw $t("desiredSize");if(this._ownerWritableStream===void 0)throw qr("desiredSize");return Jc(this)}get ready(){return Ft(this)?this._readyPromise:h($t("ready"))}abort(r=void 0){return Ft(this)?this._ownerWritableStream===void 0?h(qr("abort")):Vc(this,r):h($t("abort"))}close(){if(!Ft(this))return h($t("close"));let r=this._ownerWritableStream;return r===void 0?h(qr("close")):Ye(r)?h(new TypeError("Cannot close an already-closing stream")):Vs(this)}releaseLock(){if(!Ft(this))throw $t("releaseLock");this._ownerWritableStream!==void 0&&Xs(this)}write(r=void 0){return Ft(this)?this._ownerWritableStream===void 0?h(qr("write to")):Js(this,r):h($t("write"))}}Object.defineProperties(ot.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),a(ot.prototype.abort,"abort"),a(ot.prototype.close,"close"),a(ot.prototype.releaseLock,"releaseLock"),a(ot.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ot.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ft(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof ot}function Vc(e,r){let s=e._ownerWritableStream;return An(s,r)}function Vs(e){let r=e._ownerWritableStream;return Ks(r)}function Yc(e){let r=e._ownerWritableStream,s=r._state;return Ye(r)||s==="closed"?d(void 0):s==="errored"?h(r._storedError):Vs(e)}function Xc(e,r){e._closedPromiseState==="pending"?ri(e,r):iu(e,r)}function Ys(e,r){e._readyPromiseState==="pending"?ia(e,r):au(e,r)}function Jc(e){let r=e._ownerWritableStream,s=r._state;return s==="errored"||s==="erroring"?null:s==="closed"?0:ea(r._writableStreamController)}function Xs(e){let r=e._ownerWritableStream,s=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ys(e,s),Xc(e,s),r._writer=void 0,e._ownerWritableStream=void 0}function Js(e,r){let s=e._ownerWritableStream,c=s._writableStreamController,f=eu(c,r);if(s!==e._ownerWritableStream)return h(qr("write to"));let b=s._state;if(b==="errored")return h(s._storedError);if(Ye(s)||b==="closed")return h(new TypeError("The stream is closing or closed and cannot be written to"));if(b==="erroring")return h(s._storedError);let _=Uc(s);return tu(c,r,f),_}let Qs={};class lr{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Zo(this))throw ti("abortReason");return this._abortReason}get signal(){if(!Zo(this))throw ti("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(r=void 0){if(!Zo(this))throw ti("error");this._controlledWritableStream._state==="writable"&&ta(this,r)}[N](r){let s=this._abortAlgorithm(r);return On(this),s}[Q](){gt(this)}}Object.defineProperties(lr.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(lr.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Zo(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof lr}function Zs(e,r,s,c,f,b,_,v){r._controlledWritableStream=e,e._writableStreamController=r,r._queue=void 0,r._queueTotalSize=void 0,gt(r),r._abortReason=void 0,r._abortController=Fc(),r._started=!1,r._strategySizeAlgorithm=v,r._strategyHWM=_,r._writeAlgorithm=c,r._closeAlgorithm=f,r._abortAlgorithm=b;let U=ei(r);Qo(e,U);let B=s(),M=d(B);P(M,()=>(r._started=!0,Dn(r),null),G=>(r._started=!0,Yo(e,G),null))}function Qc(e,r,s,c){let f=Object.create(lr.prototype),b,_,v,U;r.start!==void 0?b=()=>r.start(f):b=()=>{},r.write!==void 0?_=B=>r.write(B,f):_=()=>d(void 0),r.close!==void 0?v=()=>r.close():v=()=>d(void 0),r.abort!==void 0?U=B=>r.abort(B):U=()=>d(void 0),Zs(e,f,b,_,v,U,s,c)}function On(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Zc(e){Wo(e,Qs,0),Dn(e)}function eu(e,r){try{return e._strategySizeAlgorithm(r)}catch(s){return Mr(e,s),1}}function ea(e){return e._strategyHWM-e._queueTotalSize}function tu(e,r,s){try{Wo(e,r,s)}catch(f){Mr(e,f);return}let c=e._controlledWritableStream;if(!Ye(c)&&c._state==="writable"){let f=ei(e);Qo(c,f)}Dn(e)}function Dn(e){let r=e._controlledWritableStream;if(!e._started||r._inFlightWriteRequest!==void 0)return;if(r._state==="erroring"){Jo(r);return}if(e._queue.length===0)return;let c=mc(e);c===Qs?ru(e):nu(e,c)}function Mr(e,r){e._controlledWritableStream._state==="writable"&&ta(e,r)}function ru(e){let r=e._controlledWritableStream;Gc(r),Uo(e);let s=e._closeAlgorithm();On(e),P(s,()=>(qc(r),null),c=>(zc(r,c),null))}function nu(e,r){let s=e._controlledWritableStream;Kc(s);let c=e._writeAlgorithm(r);P(c,()=>{Wc(s);let f=s._state;if(Uo(e),!Ye(s)&&f==="writable"){let b=ei(e);Qo(s,b)}return Dn(e),null},f=>(s._state==="writable"&&On(e),Mc(s,f),null))}function ei(e){return ea(e)<=0}function ta(e,r){let s=e._controlledWritableStream;On(e),Xo(s,r)}function Nn(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function ti(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function $t(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function qr(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Ln(e){e._closedPromise=m((r,s)=>{e._closedPromise_resolve=r,e._closedPromise_reject=s,e._closedPromiseState="pending"})}function ra(e,r){Ln(e),ri(e,r)}function ou(e){Ln(e),na(e)}function ri(e,r){e._closedPromise_reject!==void 0&&(O(e._closedPromise),e._closedPromise_reject(r),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function iu(e,r){ra(e,r)}function na(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function kn(e){e._readyPromise=m((r,s)=>{e._readyPromise_resolve=r,e._readyPromise_reject=s}),e._readyPromiseState="pending"}function ni(e,r){kn(e),ia(e,r)}function oa(e){kn(e),oi(e)}function ia(e,r){e._readyPromise_reject!==void 0&&(O(e._readyPromise),e._readyPromise_reject(r),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function su(e){kn(e)}function au(e,r){ni(e,r)}function oi(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function lu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}let ii=lu();function cu(e){if(!(typeof e=="function"||typeof e=="object")||e.name!=="DOMException")return!1;try{return new e,!0}catch{return!1}}function uu(){let e=ii?.DOMException;return cu(e)?e:void 0}function fu(){let e=function(s,c){this.message=s||"",this.name=c||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return a(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}let du=uu()||fu();function sa(e,r,s,c,f,b){let _=or(e),v=Hs(r);e._disturbed=!0;let U=!1,B=d(void 0);return m((M,G)=>{let te;if(b!==void 0){if(te=()=>{let F=b.reason!==void 0?b.reason:new du("Aborted","AbortError"),K=[];c||K.push(()=>r._state==="writable"?An(r,F):d(void 0)),f||K.push(()=>e._state==="readable"?We(e,F):d(void 0)),we(()=>Promise.all(K.map(re=>re())),!0,F)},b.aborted){te();return}b.addEventListener("abort",te)}function Me(){return m((F,K)=>{function re(xe){xe?F():C(dr(),re,K)}re(!1)})}function dr(){return U?d(!0):C(v._readyPromise,()=>m((F,K)=>{jr(_,{_chunkSteps:re=>{B=C(Js(v,re),void 0,t),F(!1)},_closeSteps:()=>F(!0),_errorSteps:K})}))}if(st(e,_._closedPromise,F=>(c?Le(!0,F):we(()=>An(r,F),!0,F),null)),st(r,v._closedPromise,F=>(f?Le(!0,F):we(()=>We(e,F),!0,F),null)),ge(e,_._closedPromise,()=>(s?Le():we(()=>Yc(v)),null)),Ye(r)||r._state==="closed"){let F=new TypeError("the destination writable stream closed before all data could be piped to it");f?Le(!0,F):we(()=>We(e,F),!0,F)}O(Me());function Et(){let F=B;return C(B,()=>F!==B?Et():void 0)}function st(F,K,re){F._state==="errored"?re(F._storedError):y(K,re)}function ge(F,K,re){F._state==="closed"?re():I(K,re)}function we(F,K,re){if(U)return;U=!0,r._state==="writable"&&!Ye(r)?I(Et(),xe):xe();function xe(){return P(F(),()=>at(K,re),hr=>at(!0,hr)),null}}function Le(F,K){U||(U=!0,r._state==="writable"&&!Ye(r)?I(Et(),()=>at(F,K)):at(F,K))}function at(F,K){return Xs(v),De(_),b!==void 0&&b.removeEventListener("abort",te),F?G(K):M(void 0),null}})}class it{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Bn(this))throw Fn("desiredSize");return si(this)}close(){if(!Bn(this))throw Fn("close");if(!ur(this))throw new TypeError("The stream is not in a state that permits close");Ut(this)}enqueue(r=void 0){if(!Bn(this))throw Fn("enqueue");if(!ur(this))throw new TypeError("The stream is not in a state that permits enqueue");return cr(this,r)}error(r=void 0){if(!Bn(this))throw Fn("error");Ue(this,r)}[Ve](r){gt(this);let s=this._cancelAlgorithm(r);return jn(this),s}[ye](r){let s=this._controlledReadableStream;if(this._queue.length>0){let c=Uo(this);this._closeRequested&&this._queue.length===0?(jn(this),Gr(s)):zr(this),r._chunkSteps(c)}else ms(s,r),zr(this)}[Dt](){}}Object.defineProperties(it.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),a(it.prototype.close,"close"),a(it.prototype.enqueue,"enqueue"),a(it.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(it.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Bn(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof it}function zr(e){if(!aa(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let s=e._pullAlgorithm();P(s,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,zr(e)),null),c=>(Ue(e,c),null))}function aa(e){let r=e._controlledReadableStream;return!ur(e)||!e._started?!1:!!(wt(r)&&bn(r)>0||si(e)>0)}function jn(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ut(e){if(!ur(e))return;let r=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(jn(e),Gr(r))}function cr(e,r){if(!ur(e))return;let s=e._controlledReadableStream;if(wt(s)&&bn(s)>0)ko(s,r,!1);else{let c;try{c=e._strategySizeAlgorithm(r)}catch(f){throw Ue(e,f),f}try{Wo(e,r,c)}catch(f){throw Ue(e,f),f}}zr(e)}function Ue(e,r){let s=e._controlledReadableStream;s._state==="readable"&&(gt(e),jn(e),fa(s,r))}function si(e){let r=e._controlledReadableStream._state;return r==="errored"?null:r==="closed"?0:e._strategyHWM-e._queueTotalSize}function hu(e){return!aa(e)}function ur(e){let r=e._controlledReadableStream._state;return!e._closeRequested&&r==="readable"}function la(e,r,s,c,f,b,_){r._controlledReadableStream=e,r._queue=void 0,r._queueTotalSize=void 0,gt(r),r._started=!1,r._closeRequested=!1,r._pullAgain=!1,r._pulling=!1,r._strategySizeAlgorithm=_,r._strategyHWM=b,r._pullAlgorithm=c,r._cancelAlgorithm=f,e._readableStreamController=r;let v=s();P(d(v),()=>(r._started=!0,zr(r),null),U=>(Ue(r,U),null))}function pu(e,r,s,c){let f=Object.create(it.prototype),b,_,v;r.start!==void 0?b=()=>r.start(f):b=()=>{},r.pull!==void 0?_=()=>r.pull(f):_=()=>d(void 0),r.cancel!==void 0?v=U=>r.cancel(U):v=()=>d(void 0),la(e,f,b,_,v,s,c)}function Fn(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function mu(e,r){return kt(e._readableStreamController)?yu(e):gu(e)}function gu(e,r){let s=or(e),c=!1,f=!1,b=!1,_=!1,v,U,B,M,G,te=m(ge=>{G=ge});function Me(){return c?(f=!0,d(void 0)):(c=!0,jr(s,{_chunkSteps:we=>{D(()=>{f=!1;let Le=we,at=we;b||cr(B._readableStreamController,Le),_||cr(M._readableStreamController,at),c=!1,f&&Me()})},_closeSteps:()=>{c=!1,b||Ut(B._readableStreamController),_||Ut(M._readableStreamController),(!b||!_)&&G(void 0)},_errorSteps:()=>{c=!1}}),d(void 0))}function dr(ge){if(b=!0,v=ge,_){let we=Fr([v,U]),Le=We(e,we);G(Le)}return te}function Et(ge){if(_=!0,U=ge,b){let we=Fr([v,U]),Le=We(e,we);G(Le)}return te}function st(){}return B=Hr(st,Me,dr),M=Hr(st,Me,Et),y(s._closedPromise,ge=>(Ue(B._readableStreamController,ge),Ue(M._readableStreamController,ge),(!b||!_)&&G(void 0),null)),[B,M]}function yu(e){let r=or(e),s=!1,c=!1,f=!1,b=!1,_=!1,v,U,B,M,G,te=m(F=>{G=F});function Me(F){y(F._closedPromise,K=>(F!==r||(Ne(B._readableStreamController,K),Ne(M._readableStreamController,K),(!b||!_)&&G(void 0)),null))}function dr(){jt(r)&&(De(r),r=or(e),Me(r)),jr(r,{_chunkSteps:K=>{D(()=>{c=!1,f=!1;let re=K,xe=K;if(!b&&!_)try{xe=xs(K)}catch(hr){Ne(B._readableStreamController,hr),Ne(M._readableStreamController,hr),G(We(e,hr));return}b||Rn(B._readableStreamController,re),_||Rn(M._readableStreamController,xe),s=!1,c?st():f&&ge()})},_closeSteps:()=>{s=!1,b||$r(B._readableStreamController),_||$r(M._readableStreamController),B._readableStreamController._pendingPullIntos.length>0&&Tn(B._readableStreamController,0),M._readableStreamController._pendingPullIntos.length>0&&Tn(M._readableStreamController,0),(!b||!_)&&G(void 0)},_errorSteps:()=>{s=!1}})}function Et(F,K){pt(r)&&(De(r),r=$s(e),Me(r));let re=K?M:B,xe=K?B:M;Ms(r,F,1,{_chunkSteps:pr=>{D(()=>{c=!1,f=!1;let mr=K?_:b;if(K?b:_)mr||Cn(re._readableStreamController,pr);else{let Ta;try{Ta=xs(pr)}catch(fi){Ne(re._readableStreamController,fi),Ne(xe._readableStreamController,fi),G(We(e,fi));return}mr||Cn(re._readableStreamController,pr),Rn(xe._readableStreamController,Ta)}s=!1,c?st():f&&ge()})},_closeSteps:pr=>{s=!1;let mr=K?_:b,Gn=K?b:_;mr||$r(re._readableStreamController),Gn||$r(xe._readableStreamController),pr!==void 0&&(mr||Cn(re._readableStreamController,pr),!Gn&&xe._readableStreamController._pendingPullIntos.length>0&&Tn(xe._readableStreamController,0)),(!mr||!Gn)&&G(void 0)},_errorSteps:()=>{s=!1}})}function st(){if(s)return c=!0,d(void 0);s=!0;let F=Go(B._readableStreamController);return F===null?dr():Et(F._view,!1),d(void 0)}function ge(){if(s)return f=!0,d(void 0);s=!0;let F=Go(M._readableStreamController);return F===null?dr():Et(F._view,!0),d(void 0)}function we(F){if(b=!0,v=F,_){let K=Fr([v,U]),re=We(e,K);G(re)}return te}function Le(F){if(_=!0,U=F,b){let K=Fr([v,U]),re=We(e,K);G(re)}return te}function at(){}return B=ua(at,st,we),M=ua(at,ge,Le),Me(r),[B,M]}function bu(e){return o(e)&&typeof e.getReader<"u"}function _u(e){return bu(e)?Su(e.getReader()):wu(e)}function wu(e){let r,s=Cs(e,"async"),c=t;function f(){let _;try{_=fc(s)}catch(U){return h(U)}let v=d(_);return T(v,U=>{if(!o(U))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(dc(U))Ut(r._readableStreamController);else{let M=hc(U);cr(r._readableStreamController,M)}})}function b(_){let v=s.iterator,U;try{U=wn(v,"return")}catch(G){return h(G)}if(U===void 0)return d(void 0);let B;try{B=$(U,v,[_])}catch(G){return h(G)}let M=d(B);return T(M,G=>{if(!o(G))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return r=Hr(c,f,b,0),r}function Su(e){let r,s=t;function c(){let b;try{b=e.read()}catch(_){return h(_)}return T(b,_=>{if(!o(_))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(_.done)Ut(r._readableStreamController);else{let v=_.value;cr(r._readableStreamController,v)}})}function f(b){try{return d(e.cancel(b))}catch(_){return h(_)}}return r=Hr(s,c,f,0),r}function Eu(e,r){be(e,r);let s=e,c=s?.autoAllocateChunkSize,f=s?.cancel,b=s?.pull,_=s?.start,v=s?.type;return{autoAllocateChunkSize:c===void 0?void 0:No(c,`${r} has member 'autoAllocateChunkSize' that`),cancel:f===void 0?void 0:Ru(f,s,`${r} has member 'cancel' that`),pull:b===void 0?void 0:Tu(b,s,`${r} has member 'pull' that`),start:_===void 0?void 0:Cu(_,s,`${r} has member 'start' that`),type:v===void 0?void 0:xu(v,`${r} has member 'type' that`)}}function Ru(e,r,s){return _e(e,s),c=>k(e,r,[c])}function Tu(e,r,s){return _e(e,s),c=>k(e,r,[c])}function Cu(e,r,s){return _e(e,s),c=>$(e,r,[c])}function xu(e,r){if(e=`${e}`,e!=="bytes")throw new TypeError(`${r} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function vu(e,r){return be(e,r),{preventCancel:!!e?.preventCancel}}function ca(e,r){be(e,r);let s=e?.preventAbort,c=e?.preventCancel,f=e?.preventClose,b=e?.signal;return b!==void 0&&Pu(b,`${r} has member 'signal' that`),{preventAbort:!!s,preventCancel:!!c,preventClose:!!f,signal:b}}function Pu(e,r){if(!Bc(e))throw new TypeError(`${r} is not an AbortSignal.`)}function Au(e,r){be(e,r);let s=e?.readable;Oo(s,"readable","ReadableWritablePair"),Lo(s,`${r} has member 'readable' that`);let c=e?.writable;return Oo(c,"writable","ReadableWritablePair"),zs(c,`${r} has member 'writable' that`),{readable:s,writable:c}}class he{constructor(r={},s={}){r===void 0?r=null:hs(r,"First parameter");let c=Pn(s,"Second parameter"),f=Eu(r,"First parameter");if(ai(this),f.type==="bytes"){if(c.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let b=Wr(c,0);Rc(this,f,b)}else{let b=vn(c),_=Wr(c,1);pu(this,f,_,b)}}get locked(){if(!_t(this))throw Wt("locked");return wt(this)}cancel(r=void 0){return _t(this)?wt(this)?h(new TypeError("Cannot cancel a stream that already has a reader")):We(this,r):h(Wt("cancel"))}getReader(r=void 0){if(!_t(this))throw Wt("getReader");return Cc(r,"First parameter").mode===void 0?or(this):$s(this)}pipeThrough(r,s={}){if(!_t(this))throw Wt("pipeThrough");tt(r,1,"pipeThrough");let c=Au(r,"First parameter"),f=ca(s,"Second parameter");if(wt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ar(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let b=sa(this,c.writable,f.preventClose,f.preventAbort,f.preventCancel,f.signal);return O(b),c.readable}pipeTo(r,s={}){if(!_t(this))return h(Wt("pipeTo"));if(r===void 0)return h("Parameter 1 is required in 'pipeTo'.");if(!sr(r))return h(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=ca(s,"Second parameter")}catch(f){return h(f)}return wt(this)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ar(r)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):sa(this,r,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!_t(this))throw Wt("tee");let r=mu(this);return Fr(r)}values(r=void 0){if(!_t(this))throw Wt("values");let s=vu(r,"First parameter");return cc(this,s.preventCancel)}[$o](r){return this.values(r)}static from(r){return _u(r)}}Object.defineProperties(he,{from:{enumerable:!0}}),Object.defineProperties(he.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),a(he.from,"from"),a(he.prototype.cancel,"cancel"),a(he.prototype.getReader,"getReader"),a(he.prototype.pipeThrough,"pipeThrough"),a(he.prototype.pipeTo,"pipeTo"),a(he.prototype.tee,"tee"),a(he.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(he.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(he.prototype,$o,{value:he.prototype.values,writable:!0,configurable:!0});function Hr(e,r,s,c=1,f=()=>1){let b=Object.create(he.prototype);ai(b);let _=Object.create(it.prototype);return la(b,_,e,r,s,c,f),b}function ua(e,r,s){let c=Object.create(he.prototype);ai(c);let f=Object.create(nt.prototype);return Fs(c,f,e,r,s,0,void 0),c}function ai(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function _t(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof he}function wt(e){return e._reader!==void 0}function We(e,r){if(e._disturbed=!0,e._state==="closed")return d(void 0);if(e._state==="errored")return h(e._storedError);Gr(e);let s=e._reader;if(s!==void 0&&jt(s)){let f=s._readIntoRequests;s._readIntoRequests=new A,f.forEach(b=>{b._closeSteps(void 0)})}let c=e._readableStreamController[Ve](r);return T(c,t)}function Gr(e){e._state="closed";let r=e._reader;if(r!==void 0&&(Br(r),pt(r))){let s=r._readRequests;r._readRequests=new A,s.forEach(c=>{c._closeSteps()})}}function fa(e,r){e._state="errored",e._storedError=r;let s=e._reader;s!==void 0&&(kr(s,r),pt(s)?ys(s,r):qs(s,r))}function Wt(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function da(e,r){be(e,r);let s=e?.highWaterMark;return Oo(s,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Do(s)}}let ha=e=>e.byteLength;a(ha,"size");class $n{constructor(r){tt(r,1,"ByteLengthQueuingStrategy"),r=da(r,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=r.highWaterMark}get highWaterMark(){if(!ma(this))throw pa("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ma(this))throw pa("size");return ha}}Object.defineProperties($n.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($n.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function pa(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function ma(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof $n}let ga=()=>1;a(ga,"size");class Un{constructor(r){tt(r,1,"CountQueuingStrategy"),r=da(r,"First parameter"),this._countQueuingStrategyHighWaterMark=r.highWaterMark}get highWaterMark(){if(!ba(this))throw ya("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!ba(this))throw ya("size");return ga}}Object.defineProperties(Un.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Un.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ya(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function ba(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof Un}function Iu(e,r){be(e,r);let s=e?.cancel,c=e?.flush,f=e?.readableType,b=e?.start,_=e?.transform,v=e?.writableType;return{cancel:s===void 0?void 0:Lu(s,e,`${r} has member 'cancel' that`),flush:c===void 0?void 0:Ou(c,e,`${r} has member 'flush' that`),readableType:f,start:b===void 0?void 0:Du(b,e,`${r} has member 'start' that`),transform:_===void 0?void 0:Nu(_,e,`${r} has member 'transform' that`),writableType:v}}function Ou(e,r,s){return _e(e,s),c=>k(e,r,[c])}function Du(e,r,s){return _e(e,s),c=>$(e,r,[c])}function Nu(e,r,s){return _e(e,s),(c,f)=>k(e,r,[c,f])}function Lu(e,r,s){return _e(e,s),c=>k(e,r,[c])}class Wn{constructor(r={},s={},c={}){r===void 0&&(r=null);let f=Pn(s,"Second parameter"),b=Pn(c,"Third parameter"),_=Iu(r,"First parameter");if(_.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(_.writableType!==void 0)throw new RangeError("Invalid writableType specified");let v=Wr(b,0),U=vn(b),B=Wr(f,1),M=vn(f),G,te=m(Me=>{G=Me});ku(this,te,B,M,v,U),ju(this,_),_.start!==void 0?G(_.start(this._transformStreamController)):G(void 0)}get readable(){if(!_a(this))throw Ra("readable");return this._readable}get writable(){if(!_a(this))throw Ra("writable");return this._writable}}Object.defineProperties(Wn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Wn.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function ku(e,r,s,c,f,b){function _(){return r}function v(te){return Uu(e,te)}function U(te){return Wu(e,te)}function B(){return Mu(e)}e._writable=$c(_,v,B,U,s,c);function M(){return qu(e)}function G(te){return zu(e,te)}e._readable=Hr(_,M,G,f,b),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Mn(e,!0),e._transformStreamController=void 0}function _a(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof Wn}function wa(e,r){Ue(e._readable._readableStreamController,r),li(e,r)}function li(e,r){zn(e._transformStreamController),Mr(e._writable._writableStreamController,r),ci(e)}function ci(e){e._backpressure&&Mn(e,!1)}function Mn(e,r){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=m(s=>{e._backpressureChangePromise_resolve=s}),e._backpressure=r}class St{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!qn(this))throw Hn("desiredSize");let r=this._controlledTransformStream._readable._readableStreamController;return si(r)}enqueue(r=void 0){if(!qn(this))throw Hn("enqueue");Sa(this,r)}error(r=void 0){if(!qn(this))throw Hn("error");Fu(this,r)}terminate(){if(!qn(this))throw Hn("terminate");$u(this)}}Object.defineProperties(St.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),a(St.prototype.enqueue,"enqueue"),a(St.prototype.error,"error"),a(St.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(St.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function qn(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof St}function Bu(e,r,s,c,f){r._controlledTransformStream=e,e._transformStreamController=r,r._transformAlgorithm=s,r._flushAlgorithm=c,r._cancelAlgorithm=f,r._finishPromise=void 0,r._finishPromise_resolve=void 0,r._finishPromise_reject=void 0}function ju(e,r){let s=Object.create(St.prototype),c,f,b;r.transform!==void 0?c=_=>r.transform(_,s):c=_=>{try{return Sa(s,_),d(void 0)}catch(v){return h(v)}},r.flush!==void 0?f=()=>r.flush(s):f=()=>d(void 0),r.cancel!==void 0?b=_=>r.cancel(_):b=()=>d(void 0),Bu(e,s,c,f,b)}function zn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function Sa(e,r){let s=e._controlledTransformStream,c=s._readable._readableStreamController;if(!ur(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{cr(c,r)}catch(b){throw li(s,b),s._readable._storedError}hu(c)!==s._backpressure&&Mn(s,!0)}function Fu(e,r){wa(e._controlledTransformStream,r)}function Ea(e,r){let s=e._transformAlgorithm(r);return T(s,void 0,c=>{throw wa(e._controlledTransformStream,c),c})}function $u(e){let r=e._controlledTransformStream,s=r._readable._readableStreamController;Ut(s);let c=new TypeError("TransformStream terminated");li(r,c)}function Uu(e,r){let s=e._transformStreamController;if(e._backpressure){let c=e._backpressureChangePromise;return T(c,()=>{let f=e._writable;if(f._state==="erroring")throw f._storedError;return Ea(s,r)})}return Ea(s,r)}function Wu(e,r){let s=e._transformStreamController;if(s._finishPromise!==void 0)return s._finishPromise;let c=e._readable;s._finishPromise=m((b,_)=>{s._finishPromise_resolve=b,s._finishPromise_reject=_});let f=s._cancelAlgorithm(r);return zn(s),P(f,()=>(c._state==="errored"?fr(s,c._storedError):(Ue(c._readableStreamController,r),ui(s)),null),b=>(Ue(c._readableStreamController,b),fr(s,b),null)),s._finishPromise}function Mu(e){let r=e._transformStreamController;if(r._finishPromise!==void 0)return r._finishPromise;let s=e._readable;r._finishPromise=m((f,b)=>{r._finishPromise_resolve=f,r._finishPromise_reject=b});let c=r._flushAlgorithm();return zn(r),P(c,()=>(s._state==="errored"?fr(r,s._storedError):(Ut(s._readableStreamController),ui(r)),null),f=>(Ue(s._readableStreamController,f),fr(r,f),null)),r._finishPromise}function qu(e){return Mn(e,!1),e._backpressureChangePromise}function zu(e,r){let s=e._transformStreamController;if(s._finishPromise!==void 0)return s._finishPromise;let c=e._writable;s._finishPromise=m((b,_)=>{s._finishPromise_resolve=b,s._finishPromise_reject=_});let f=s._cancelAlgorithm(r);return zn(s),P(f,()=>(c._state==="errored"?fr(s,c._storedError):(Mr(c._writableStreamController,r),ci(e),ui(s)),null),b=>(Mr(c._writableStreamController,b),ci(e),fr(s,b),null)),s._finishPromise}function Hn(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function ui(e){e._finishPromise_resolve!==void 0&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function fr(e,r){e._finishPromise_reject!==void 0&&(O(e._finishPromise),e._finishPromise_reject(r),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Ra(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}n.ByteLengthQueuingStrategy=$n,n.CountQueuingStrategy=Un,n.ReadableByteStreamController=nt,n.ReadableStream=he,n.ReadableStreamBYOBReader=yt,n.ReadableStreamBYOBRequest=Lt,n.ReadableStreamDefaultController=it,n.ReadableStreamDefaultReader=ht,n.TransformStream=Wn,n.TransformStreamDefaultController=St,n.WritableStream=bt,n.WritableStreamDefaultController=lr,n.WritableStreamDefaultWriter=ot}))});var hl=di(()=>{"use strict";if(!globalThis.ReadableStream)try{let n=require("process"),{emitWarning:t}=n;try{n.emitWarning=()=>{},Object.assign(globalThis,require("stream/web")),n.emitWarning=t}catch(o){throw n.emitWarning=t,o}}catch{Object.assign(globalThis,dl())}try{let{Blob:n}=require("buffer");n&&!n.prototype.stream&&(n.prototype.stream=function(o){let i=0,a=this;return new ReadableStream({type:"bytes",async pull(l){let p=await a.slice(i,Math.min(a.size,i+65536)).arrayBuffer();i+=p.byteLength,l.enqueue(new Uint8Array(p)),i===a.size&&l.close()}})})}catch{}});async function*Gi(n,t=!0){for(let o of n)if("stream"in o)yield*o.stream();else if(ArrayBuffer.isView(o))if(t){let i=o.byteOffset,a=o.byteOffset+o.byteLength;for(;i!==a;){let l=Math.min(a-i,pl),u=o.buffer.slice(i,i+l);i+=u.byteLength,yield new Uint8Array(u)}}else yield o;else{let i=0,a=o;for(;i!==a.size;){let u=await a.slice(i,Math.min(a.size,i+pl)).arrayBuffer();i+=u.byteLength,yield new Uint8Array(u)}}}var Vp,pl,lt,rn,Pr,co,Xt,ml,rd,ct,nn=Kr(()=>{"use strict";Vp=J(hl(),1);pl=65536;ml=(Xt=class{constructor(t=[],o={}){q(this,lt,[]);q(this,rn,"");q(this,Pr,0);q(this,co,"transparent");if(typeof t!="object"||t===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof t[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof o!="object"&&typeof o!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");o===null&&(o={});let i=new TextEncoder;for(let l of t){let u;ArrayBuffer.isView(l)?u=new Uint8Array(l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength)):l instanceof ArrayBuffer?u=new Uint8Array(l.slice(0)):l instanceof Xt?u=l:u=i.encode(`${l}`),L(this,Pr,g(this,Pr)+(ArrayBuffer.isView(u)?u.byteLength:u.size)),g(this,lt).push(u)}L(this,co,`${o.endings===void 0?"transparent":o.endings}`);let a=o.type===void 0?"":String(o.type);L(this,rn,/^[\x20-\x7E]*$/.test(a)?a:"")}get size(){return g(this,Pr)}get type(){return g(this,rn)}async text(){let t=new TextDecoder,o="";for await(let i of Gi(g(this,lt),!1))o+=t.decode(i,{stream:!0});return o+=t.decode(),o}async arrayBuffer(){let t=new Uint8Array(this.size),o=0;for await(let i of Gi(g(this,lt),!1))t.set(i,o),o+=i.length;return t.buffer}stream(){let t=Gi(g(this,lt),!0);return new globalThis.ReadableStream({type:"bytes",async pull(o){let i=await t.next();i.done?o.close():o.enqueue(i.value)},async cancel(){await t.return()}})}slice(t=0,o=this.size,i=""){let{size:a}=this,l=t<0?Math.max(a+t,0):Math.min(t,a),u=o<0?Math.max(a+o,0):Math.min(o,a),p=Math.max(u-l,0),m=g(this,lt),d=[],h=0;for(let P of m){if(h>=p)break;let I=ArrayBuffer.isView(P)?P.byteLength:P.size;if(l&&I<=l)l-=I,u-=I;else{let y;ArrayBuffer.isView(P)?(y=P.subarray(l,Math.min(I,u)),h+=y.byteLength):(y=P.slice(l,Math.min(I,u)),h+=y.size),u-=I,d.push(y),l=0}}let C=new Xt([],{type:String(i).toLowerCase()});return L(C,Pr,p),L(C,lt,d),C}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t=="object"&&typeof t.constructor=="function"&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}},lt=new WeakMap,rn=new WeakMap,Pr=new WeakMap,co=new WeakMap,Xt);Object.defineProperties(ml.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});rd=ml,ct=rd});var on,sn,gl,nd,od,Ar,Ki=Kr(()=>{"use strict";nn();nd=(gl=class extends ct{constructor(o,i,a={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(o,a);q(this,on,0);q(this,sn,"");a===null&&(a={});let l=a.lastModified===void 0?Date.now():Number(a.lastModified);Number.isNaN(l)||L(this,on,l),L(this,sn,String(i))}get name(){return g(this,sn)}get lastModified(){return g(this,on)}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](o){return!!o&&o instanceof ct&&/^(File)$/.test(o[Symbol.toStringTag])}},on=new WeakMap,sn=new WeakMap,gl),od=nd,Ar=od});function wl(n,t=ct){var o=`${yl()}${yl()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],a=`--${o}\r
|
|
2
|
+
"use strict";var Hu=Object.create;var Kn=Object.defineProperty;var Gu=Object.getOwnPropertyDescriptor;var Ku=Object.getOwnPropertyNames;var Vu=Object.getPrototypeOf,Yu=Object.prototype.hasOwnProperty;var Ca=n=>{throw TypeError(n)};var Xu=(n,t,o)=>t in n?Kn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Kr=(n,t)=>()=>(n&&(t=n(n=0)),t);var di=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),xa=(n,t)=>{for(var o in t)Kn(n,o,{get:t[o],enumerable:!0})},Ju=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ku(t))!Yu.call(n,a)&&a!==o&&Kn(n,a,{get:()=>t[a],enumerable:!(i=Gu(t,a))||i.enumerable});return n};var J=(n,t,o)=>(o=n!=null?Hu(Vu(n)):{},Ju(t||!n||!n.__esModule?Kn(o,"default",{value:n,enumerable:!0}):o,n));var Mt=(n,t,o)=>Xu(n,typeof t!="symbol"?t+"":t,o),hi=(n,t,o)=>t.has(n)||Ca("Cannot "+o);var g=(n,t,o)=>(hi(n,t,"read from private field"),o?o.call(n):t.get(n)),q=(n,t,o)=>t.has(n)?Ca("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,o),L=(n,t,o,i)=>(hi(n,t,"write to private field"),i?i.call(n,o):t.set(n,o),o),V=(n,t,o)=>(hi(n,t,"access private method"),o);var pi=(n,t,o,i)=>({set _(a){L(n,t,a,o)},get _(){return g(n,t,i)}});var dl=di((lo,fl)=>{"use strict";(function(n,t){typeof lo=="object"&&typeof fl<"u"?t(lo):typeof define=="function"&&define.amd?define(["exports"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.WebStreamsPolyfill={}))})(lo,(function(n){"use strict";function t(){}function o(e){return typeof e=="object"&&e!==null||typeof e=="function"}let i=t;function a(e,r){try{Object.defineProperty(e,"name",{value:r,configurable:!0})}catch{}}let l=Promise,u=Promise.prototype.then,p=Promise.reject.bind(l);function m(e){return new l(e)}function d(e){return m(r=>r(e))}function h(e){return p(e)}function C(e,r,s){return u.call(e,r,s)}function P(e,r,s){C(C(e,r,s),void 0,i)}function A(e,r){P(e,r)}function y(e,r){P(e,void 0,r)}function T(e,r,s){return C(e,r,s)}function I(e){C(e,void 0,i)}let O=e=>{if(typeof queueMicrotask=="function")O=queueMicrotask;else{let r=d(void 0);O=s=>C(r,s)}return O(e)};function $(e,r,s){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,r,s)}function j(e,r,s){try{return d($(e,r,s))}catch(c){return h(c)}}let x=16384;class D{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(r){let s=this._back,c=s;s._elements.length===x-1&&(c={_elements:[],_next:void 0}),s._elements.push(r),c!==s&&(this._back=c,s._next=c),++this._size}shift(){let r=this._front,s=r,c=this._cursor,f=c+1,b=r._elements,_=b[c];return f===x&&(s=r._next,f=0),--this._size,this._cursor=f,r!==s&&(this._front=s),b[c]=void 0,_}forEach(r){let s=this._cursor,c=this._front,f=c._elements;for(;(s!==f.length||c._next!==void 0)&&!(s===f.length&&(c=c._next,f=c._elements,s=0,f.length===0));)r(f[s]),++s}peek(){let r=this._front,s=this._cursor;return r._elements[s]}}let N=Symbol("[[AbortSteps]]"),ee=Symbol("[[ErrorSteps]]"),Ve=Symbol("[[CancelSteps]]"),ye=Symbol("[[PullSteps]]"),Dt=Symbol("[[ReleaseSteps]]");function mn(e,r){e._ownerReadableStream=r,r._reader=e,r._state==="readable"?Nt(e):r._state==="closed"?Io(e):gn(e,r._storedError)}function Lr(e,r){let s=e._ownerReadableStream;return We(s,r)}function De(e){let r=e._ownerReadableStream;r._state==="readable"?kr(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):yn(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),r._readableStreamController[Dt](),r._reader=void 0,e._ownerReadableStream=void 0}function nr(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Nt(e){e._closedPromise=m((r,s)=>{e._closedPromise_resolve=r,e._closedPromise_reject=s})}function gn(e,r){Nt(e),kr(e,r)}function Io(e){Nt(e),Br(e)}function kr(e,r){e._closedPromise_reject!==void 0&&(I(e._closedPromise),e._closedPromise_reject(r),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function yn(e,r){gn(e,r)}function Br(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}let H=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Y=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function ie(e){return typeof e=="object"||typeof e=="function"}function be(e,r){if(e!==void 0&&!ie(e))throw new TypeError(`${r} is not an object.`)}function _e(e,r){if(typeof e!="function")throw new TypeError(`${r} is not a function.`)}function ic(e){return typeof e=="object"&&e!==null||typeof e=="function"}function hs(e,r){if(!ic(e))throw new TypeError(`${r} is not an object.`)}function tt(e,r,s){if(e===void 0)throw new TypeError(`Parameter ${r} is required in '${s}'.`)}function Oo(e,r,s){if(e===void 0)throw new TypeError(`${r} is required in '${s}'.`)}function Do(e){return Number(e)}function ps(e){return e===0?0:e}function sc(e){return ps(Y(e))}function No(e,r){let c=Number.MAX_SAFE_INTEGER,f=Number(e);if(f=ps(f),!H(f))throw new TypeError(`${r} is not a finite number`);if(f=sc(f),f<0||f>c)throw new TypeError(`${r} is outside the accepted range of 0 to ${c}, inclusive`);return!H(f)||f===0?0:f}function Lo(e,r){if(!_t(e))throw new TypeError(`${r} is not a ReadableStream.`)}function or(e){return new ht(e)}function ms(e,r){e._reader._readRequests.push(r)}function ko(e,r,s){let f=e._reader._readRequests.shift();s?f._closeSteps():f._chunkSteps(r)}function bn(e){return e._reader._readRequests.length}function gs(e){let r=e._reader;return!(r===void 0||!pt(r))}class ht{constructor(r){if(tt(r,1,"ReadableStreamDefaultReader"),Lo(r,"First parameter"),wt(r))throw new TypeError("This stream has already been locked for exclusive reading by another reader");mn(this,r),this._readRequests=new D}get closed(){return pt(this)?this._closedPromise:h(_n("closed"))}cancel(r=void 0){return pt(this)?this._ownerReadableStream===void 0?h(nr("cancel")):Lr(this,r):h(_n("cancel"))}read(){if(!pt(this))return h(_n("read"));if(this._ownerReadableStream===void 0)return h(nr("read from"));let r,s,c=m((b,_)=>{r=b,s=_});return jr(this,{_chunkSteps:b=>r({value:b,done:!1}),_closeSteps:()=>r({value:void 0,done:!0}),_errorSteps:b=>s(b)}),c}releaseLock(){if(!pt(this))throw _n("releaseLock");this._ownerReadableStream!==void 0&&ac(this)}}Object.defineProperties(ht.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),a(ht.prototype.cancel,"cancel"),a(ht.prototype.read,"read"),a(ht.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ht.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function pt(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof ht}function jr(e,r){let s=e._ownerReadableStream;s._disturbed=!0,s._state==="closed"?r._closeSteps():s._state==="errored"?r._errorSteps(s._storedError):s._readableStreamController[ye](r)}function ac(e){De(e);let r=new TypeError("Reader was released");ys(e,r)}function ys(e,r){let s=e._readRequests;e._readRequests=new D,s.forEach(c=>{c._errorSteps(r)})}function _n(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let lc=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class bs{constructor(r,s){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=r,this._preventCancel=s}next(){let r=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?T(this._ongoingPromise,r,r):r(),this._ongoingPromise}return(r){let s=()=>this._returnSteps(r);return this._ongoingPromise?T(this._ongoingPromise,s,s):s()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let r=this._reader,s,c,f=m((_,v)=>{s=_,c=v});return jr(r,{_chunkSteps:_=>{this._ongoingPromise=void 0,O(()=>s({value:_,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,De(r),s({value:void 0,done:!0})},_errorSteps:_=>{this._ongoingPromise=void 0,this._isFinished=!0,De(r),c(_)}}),f}_returnSteps(r){if(this._isFinished)return Promise.resolve({value:r,done:!0});this._isFinished=!0;let s=this._reader;if(!this._preventCancel){let c=Lr(s,r);return De(s),T(c,()=>({value:r,done:!0}))}return De(s),d({value:r,done:!0})}}let _s={next(){return ws(this)?this._asyncIteratorImpl.next():h(Ss("next"))},return(e){return ws(this)?this._asyncIteratorImpl.return(e):h(Ss("return"))}};Object.setPrototypeOf(_s,lc);function cc(e,r){let s=or(e),c=new bs(s,r),f=Object.create(_s);return f._asyncIteratorImpl=c,f}function ws(e){if(!o(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof bs}catch{return!1}}function Ss(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}let Es=Number.isNaN||function(e){return e!==e};var Bo,jo,Fo;function Fr(e){return e.slice()}function Rs(e,r,s,c,f){new Uint8Array(e).set(new Uint8Array(s,c,f),r)}let rt=e=>(typeof e.transfer=="function"?rt=r=>r.transfer():typeof structuredClone=="function"?rt=r=>structuredClone(r,{transfer:[r]}):rt=r=>r,rt(e)),mt=e=>(typeof e.detached=="boolean"?mt=r=>r.detached:mt=r=>r.byteLength===0,mt(e));function Ts(e,r,s){if(e.slice)return e.slice(r,s);let c=s-r,f=new ArrayBuffer(c);return Rs(f,0,e,r,c),f}function wn(e,r){let s=e[r];if(s!=null){if(typeof s!="function")throw new TypeError(`${String(r)} is not a function`);return s}}function uc(e){let r={[Symbol.iterator]:()=>e.iterator},s=(async function*(){return yield*r})(),c=s.next;return{iterator:s,nextMethod:c,done:!1}}let $o=(Fo=(Bo=Symbol.asyncIterator)!==null&&Bo!==void 0?Bo:(jo=Symbol.for)===null||jo===void 0?void 0:jo.call(Symbol,"Symbol.asyncIterator"))!==null&&Fo!==void 0?Fo:"@@asyncIterator";function Cs(e,r="sync",s){if(s===void 0)if(r==="async"){if(s=wn(e,$o),s===void 0){let b=wn(e,Symbol.iterator),_=Cs(e,"sync",b);return uc(_)}}else s=wn(e,Symbol.iterator);if(s===void 0)throw new TypeError("The object is not iterable");let c=$(s,e,[]);if(!o(c))throw new TypeError("The iterator method must return an object");let f=c.next;return{iterator:c,nextMethod:f,done:!1}}function fc(e){let r=$(e.nextMethod,e.iterator,[]);if(!o(r))throw new TypeError("The iterator.next() method must return an object");return r}function dc(e){return!!e.done}function hc(e){return e.value}function pc(e){return!(typeof e!="number"||Es(e)||e<0)}function xs(e){let r=Ts(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(r)}function Uo(e){let r=e._queue.shift();return e._queueTotalSize-=r.size,e._queueTotalSize<0&&(e._queueTotalSize=0),r.value}function Wo(e,r,s){if(!pc(s)||s===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:r,size:s}),e._queueTotalSize+=s}function mc(e){return e._queue.peek().value}function gt(e){e._queue=new D,e._queueTotalSize=0}function vs(e){return e===DataView}function gc(e){return vs(e.constructor)}function yc(e){return vs(e)?1:e.BYTES_PER_ELEMENT}class Lt{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Mo(this))throw Ko("view");return this._view}respond(r){if(!Mo(this))throw Ko("respond");if(tt(r,1,"respond"),r=No(r,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(mt(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Tn(this._associatedReadableByteStreamController,r)}respondWithNewView(r){if(!Mo(this))throw Ko("respondWithNewView");if(tt(r,1,"respondWithNewView"),!ArrayBuffer.isView(r))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");if(mt(r.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Cn(this._associatedReadableByteStreamController,r)}}Object.defineProperties(Lt.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),a(Lt.prototype.respond,"respond"),a(Lt.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Lt.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class nt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!kt(this))throw Ur("byobRequest");return Go(this)}get desiredSize(){if(!kt(this))throw Ur("desiredSize");return js(this)}close(){if(!kt(this))throw Ur("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let r=this._controlledReadableByteStream._state;if(r!=="readable")throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be closed`);$r(this)}enqueue(r){if(!kt(this))throw Ur("enqueue");if(tt(r,1,"enqueue"),!ArrayBuffer.isView(r))throw new TypeError("chunk must be an array buffer view");if(r.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(r.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 s=this._controlledReadableByteStream._state;if(s!=="readable")throw new TypeError(`The stream (in ${s} state) is not in the readable state and cannot be enqueued to`);Rn(this,r)}error(r=void 0){if(!kt(this))throw Ur("error");Ne(this,r)}[Ve](r){Ps(this),gt(this);let s=this._cancelAlgorithm(r);return En(this),s}[ye](r){let s=this._controlledReadableByteStream;if(this._queueTotalSize>0){Bs(this,r);return}let c=this._autoAllocateChunkSize;if(c!==void 0){let f;try{f=new ArrayBuffer(c)}catch(_){r._errorSteps(_);return}let b={buffer:f,bufferByteLength:c,byteOffset:0,byteLength:c,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(b)}ms(s,r),Bt(this)}[Dt](){if(this._pendingPullIntos.length>0){let r=this._pendingPullIntos.peek();r.readerType="none",this._pendingPullIntos=new D,this._pendingPullIntos.push(r)}}}Object.defineProperties(nt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),a(nt.prototype.close,"close"),a(nt.prototype.enqueue,"enqueue"),a(nt.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(nt.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function kt(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof nt}function Mo(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof Lt}function Bt(e){if(!Ec(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let s=e._pullAlgorithm();P(s,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Bt(e)),null),c=>(Ne(e,c),null))}function Ps(e){zo(e),e._pendingPullIntos=new D}function qo(e,r){let s=!1;e._state==="closed"&&(s=!0);let c=As(r);r.readerType==="default"?ko(e,c,s):Pc(e,c,s)}function As(e){let r=e.bytesFilled,s=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,r/s)}function Sn(e,r,s,c){e._queue.push({buffer:r,byteOffset:s,byteLength:c}),e._queueTotalSize+=c}function Is(e,r,s,c){let f;try{f=Ts(r,s,s+c)}catch(b){throw Ne(e,b),b}Sn(e,f,0,c)}function Os(e,r){r.bytesFilled>0&&Is(e,r.buffer,r.byteOffset,r.bytesFilled),ir(e)}function Ds(e,r){let s=Math.min(e._queueTotalSize,r.byteLength-r.bytesFilled),c=r.bytesFilled+s,f=s,b=!1,_=c%r.elementSize,v=c-_;v>=r.minimumFill&&(f=v-r.bytesFilled,b=!0);let U=e._queue;for(;f>0;){let k=U.peek(),M=Math.min(f,k.byteLength),G=r.byteOffset+r.bytesFilled;Rs(r.buffer,G,k.buffer,k.byteOffset,M),k.byteLength===M?U.shift():(k.byteOffset+=M,k.byteLength-=M),e._queueTotalSize-=M,Ns(e,M,r),f-=M}return b}function Ns(e,r,s){s.bytesFilled+=r}function Ls(e){e._queueTotalSize===0&&e._closeRequested?(En(e),Gr(e._controlledReadableByteStream)):Bt(e)}function zo(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ho(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;let r=e._pendingPullIntos.peek();Ds(e,r)&&(ir(e),qo(e._controlledReadableByteStream,r))}}function bc(e){let r=e._controlledReadableByteStream._reader;for(;r._readRequests.length>0;){if(e._queueTotalSize===0)return;let s=r._readRequests.shift();Bs(e,s)}}function _c(e,r,s,c){let f=e._controlledReadableByteStream,b=r.constructor,_=yc(b),{byteOffset:v,byteLength:U}=r,k=s*_,M;try{M=rt(r.buffer)}catch(te){c._errorSteps(te);return}let G={buffer:M,bufferByteLength:M.byteLength,byteOffset:v,byteLength:U,bytesFilled:0,minimumFill:k,elementSize:_,viewConstructor:b,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(G),Us(f,c);return}if(f._state==="closed"){let te=new b(G.buffer,G.byteOffset,0);c._closeSteps(te);return}if(e._queueTotalSize>0){if(Ds(e,G)){let te=As(G);Ls(e),c._chunkSteps(te);return}if(e._closeRequested){let te=new TypeError("Insufficient bytes to fill elements in the given buffer");Ne(e,te),c._errorSteps(te);return}}e._pendingPullIntos.push(G),Us(f,c),Bt(e)}function wc(e,r){r.readerType==="none"&&ir(e);let s=e._controlledReadableByteStream;if(Vo(s))for(;Ws(s)>0;){let c=ir(e);qo(s,c)}}function Sc(e,r,s){if(Ns(e,r,s),s.readerType==="none"){Os(e,s),Ho(e);return}if(s.bytesFilled<s.minimumFill)return;ir(e);let c=s.bytesFilled%s.elementSize;if(c>0){let f=s.byteOffset+s.bytesFilled;Is(e,s.buffer,f-c,c)}s.bytesFilled-=c,qo(e._controlledReadableByteStream,s),Ho(e)}function ks(e,r){let s=e._pendingPullIntos.peek();zo(e),e._controlledReadableByteStream._state==="closed"?wc(e,s):Sc(e,r,s),Bt(e)}function ir(e){return e._pendingPullIntos.shift()}function Ec(e){let r=e._controlledReadableByteStream;return r._state!=="readable"||e._closeRequested||!e._started?!1:!!(gs(r)&&bn(r)>0||Vo(r)&&Ws(r)>0||js(e)>0)}function En(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function $r(e){let r=e._controlledReadableByteStream;if(!(e._closeRequested||r._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){let s=e._pendingPullIntos.peek();if(s.bytesFilled%s.elementSize!==0){let c=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ne(e,c),c}}En(e),Gr(r)}}function Rn(e,r){let s=e._controlledReadableByteStream;if(e._closeRequested||s._state!=="readable")return;let{buffer:c,byteOffset:f,byteLength:b}=r;if(mt(c))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let _=rt(c);if(e._pendingPullIntos.length>0){let v=e._pendingPullIntos.peek();if(mt(v.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");zo(e),v.buffer=rt(v.buffer),v.readerType==="none"&&Os(e,v)}if(gs(s))if(bc(e),bn(s)===0)Sn(e,_,f,b);else{e._pendingPullIntos.length>0&&ir(e);let v=new Uint8Array(_,f,b);ko(s,v,!1)}else Vo(s)?(Sn(e,_,f,b),Ho(e)):Sn(e,_,f,b);Bt(e)}function Ne(e,r){let s=e._controlledReadableByteStream;s._state==="readable"&&(Ps(e),gt(e),En(e),fa(s,r))}function Bs(e,r){let s=e._queue.shift();e._queueTotalSize-=s.byteLength,Ls(e);let c=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);r._chunkSteps(c)}function Go(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){let r=e._pendingPullIntos.peek(),s=new Uint8Array(r.buffer,r.byteOffset+r.bytesFilled,r.byteLength-r.bytesFilled),c=Object.create(Lt.prototype);Tc(c,e,s),e._byobRequest=c}return e._byobRequest}function js(e){let r=e._controlledReadableByteStream._state;return r==="errored"?null:r==="closed"?0:e._strategyHWM-e._queueTotalSize}function Tn(e,r){let s=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(r!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(r===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(s.bytesFilled+r>s.byteLength)throw new RangeError("bytesWritten out of range")}s.buffer=rt(s.buffer),ks(e,r)}function Cn(e,r){let s=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(r.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(r.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(s.byteOffset+s.bytesFilled!==r.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(s.bufferByteLength!==r.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(s.bytesFilled+r.byteLength>s.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let f=r.byteLength;s.buffer=rt(r.buffer),ks(e,f)}function Fs(e,r,s,c,f,b,_){r._controlledReadableByteStream=e,r._pullAgain=!1,r._pulling=!1,r._byobRequest=null,r._queue=r._queueTotalSize=void 0,gt(r),r._closeRequested=!1,r._started=!1,r._strategyHWM=b,r._pullAlgorithm=c,r._cancelAlgorithm=f,r._autoAllocateChunkSize=_,r._pendingPullIntos=new D,e._readableStreamController=r;let v=s();P(d(v),()=>(r._started=!0,Bt(r),null),U=>(Ne(r,U),null))}function Rc(e,r,s){let c=Object.create(nt.prototype),f,b,_;r.start!==void 0?f=()=>r.start(c):f=()=>{},r.pull!==void 0?b=()=>r.pull(c):b=()=>d(void 0),r.cancel!==void 0?_=U=>r.cancel(U):_=()=>d(void 0);let v=r.autoAllocateChunkSize;if(v===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Fs(e,c,f,b,_,s,v)}function Tc(e,r,s){e._associatedReadableByteStreamController=r,e._view=s}function Ko(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Ur(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function Cc(e,r){be(e,r);let s=e?.mode;return{mode:s===void 0?void 0:xc(s,`${r} has member 'mode' that`)}}function xc(e,r){if(e=`${e}`,e!=="byob")throw new TypeError(`${r} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function vc(e,r){var s;be(e,r);let c=(s=e?.min)!==null&&s!==void 0?s:1;return{min:No(c,`${r} has member 'min' that`)}}function $s(e){return new yt(e)}function Us(e,r){e._reader._readIntoRequests.push(r)}function Pc(e,r,s){let f=e._reader._readIntoRequests.shift();s?f._closeSteps(r):f._chunkSteps(r)}function Ws(e){return e._reader._readIntoRequests.length}function Vo(e){let r=e._reader;return!(r===void 0||!jt(r))}class yt{constructor(r){if(tt(r,1,"ReadableStreamBYOBReader"),Lo(r,"First parameter"),wt(r))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!kt(r._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");mn(this,r),this._readIntoRequests=new D}get closed(){return jt(this)?this._closedPromise:h(xn("closed"))}cancel(r=void 0){return jt(this)?this._ownerReadableStream===void 0?h(nr("cancel")):Lr(this,r):h(xn("cancel"))}read(r,s={}){if(!jt(this))return h(xn("read"));if(!ArrayBuffer.isView(r))return h(new TypeError("view must be an array buffer view"));if(r.byteLength===0)return h(new TypeError("view must have non-zero byteLength"));if(r.buffer.byteLength===0)return h(new TypeError("view's buffer must have non-zero byteLength"));if(mt(r.buffer))return h(new TypeError("view's buffer has been detached"));let c;try{c=vc(s,"options")}catch(k){return h(k)}let f=c.min;if(f===0)return h(new TypeError("options.min must be greater than 0"));if(gc(r)){if(f>r.byteLength)return h(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(f>r.length)return h(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return h(nr("read from"));let b,_,v=m((k,M)=>{b=k,_=M});return Ms(this,r,f,{_chunkSteps:k=>b({value:k,done:!1}),_closeSteps:k=>b({value:k,done:!0}),_errorSteps:k=>_(k)}),v}releaseLock(){if(!jt(this))throw xn("releaseLock");this._ownerReadableStream!==void 0&&Ac(this)}}Object.defineProperties(yt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),a(yt.prototype.cancel,"cancel"),a(yt.prototype.read,"read"),a(yt.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(yt.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function jt(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof yt}function Ms(e,r,s,c){let f=e._ownerReadableStream;f._disturbed=!0,f._state==="errored"?c._errorSteps(f._storedError):_c(f._readableStreamController,r,s,c)}function Ac(e){De(e);let r=new TypeError("Reader was released");qs(e,r)}function qs(e,r){let s=e._readIntoRequests;e._readIntoRequests=new D,s.forEach(c=>{c._errorSteps(r)})}function xn(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Wr(e,r){let{highWaterMark:s}=e;if(s===void 0)return r;if(Es(s)||s<0)throw new RangeError("Invalid highWaterMark");return s}function vn(e){let{size:r}=e;return r||(()=>1)}function Pn(e,r){be(e,r);let s=e?.highWaterMark,c=e?.size;return{highWaterMark:s===void 0?void 0:Do(s),size:c===void 0?void 0:Ic(c,`${r} has member 'size' that`)}}function Ic(e,r){return _e(e,r),s=>Do(e(s))}function Oc(e,r){be(e,r);let s=e?.abort,c=e?.close,f=e?.start,b=e?.type,_=e?.write;return{abort:s===void 0?void 0:Dc(s,e,`${r} has member 'abort' that`),close:c===void 0?void 0:Nc(c,e,`${r} has member 'close' that`),start:f===void 0?void 0:Lc(f,e,`${r} has member 'start' that`),write:_===void 0?void 0:kc(_,e,`${r} has member 'write' that`),type:b}}function Dc(e,r,s){return _e(e,s),c=>j(e,r,[c])}function Nc(e,r,s){return _e(e,s),()=>j(e,r,[])}function Lc(e,r,s){return _e(e,s),c=>$(e,r,[c])}function kc(e,r,s){return _e(e,s),(c,f)=>j(e,r,[c,f])}function zs(e,r){if(!sr(e))throw new TypeError(`${r} is not a WritableStream.`)}function Bc(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}let jc=typeof AbortController=="function";function Fc(){if(jc)return new AbortController}class bt{constructor(r={},s={}){r===void 0?r=null:hs(r,"First parameter");let c=Pn(s,"Second parameter"),f=Oc(r,"First parameter");if(Gs(this),f.type!==void 0)throw new RangeError("Invalid type is specified");let _=vn(c),v=Wr(c,1);Qc(this,f,v,_)}get locked(){if(!sr(this))throw Nn("locked");return ar(this)}abort(r=void 0){return sr(this)?ar(this)?h(new TypeError("Cannot abort a stream that already has a writer")):An(this,r):h(Nn("abort"))}close(){return sr(this)?ar(this)?h(new TypeError("Cannot close a stream that already has a writer")):Ye(this)?h(new TypeError("Cannot close an already-closing stream")):Ks(this):h(Nn("close"))}getWriter(){if(!sr(this))throw Nn("getWriter");return Hs(this)}}Object.defineProperties(bt.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),a(bt.prototype.abort,"abort"),a(bt.prototype.close,"close"),a(bt.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(bt.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Hs(e){return new ot(e)}function $c(e,r,s,c,f=1,b=()=>1){let _=Object.create(bt.prototype);Gs(_);let v=Object.create(lr.prototype);return Zs(_,v,e,r,s,c,f,b),_}function Gs(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new D,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function sr(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof bt}function ar(e){return e._writer!==void 0}function An(e,r){var s;if(e._state==="closed"||e._state==="errored")return d(void 0);e._writableStreamController._abortReason=r,(s=e._writableStreamController._abortController)===null||s===void 0||s.abort(r);let c=e._state;if(c==="closed"||c==="errored")return d(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let f=!1;c==="erroring"&&(f=!0,r=void 0);let b=m((_,v)=>{e._pendingAbortRequest={_promise:void 0,_resolve:_,_reject:v,_reason:r,_wasAlreadyErroring:f}});return e._pendingAbortRequest._promise=b,f||Xo(e,r),b}function Ks(e){let r=e._state;if(r==="closed"||r==="errored")return h(new TypeError(`The stream (in ${r} state) is not in the writable state and cannot be closed`));let s=m((f,b)=>{let _={_resolve:f,_reject:b};e._closeRequest=_}),c=e._writer;return c!==void 0&&e._backpressure&&r==="writable"&&oi(c),Zc(e._writableStreamController),s}function Uc(e){return m((s,c)=>{let f={_resolve:s,_reject:c};e._writeRequests.push(f)})}function Yo(e,r){if(e._state==="writable"){Xo(e,r);return}Jo(e)}function Xo(e,r){let s=e._writableStreamController;e._state="erroring",e._storedError=r;let c=e._writer;c!==void 0&&Ys(c,r),!Hc(e)&&s._started&&Jo(e)}function Jo(e){e._state="errored",e._writableStreamController[ee]();let r=e._storedError;if(e._writeRequests.forEach(f=>{f._reject(r)}),e._writeRequests=new D,e._pendingAbortRequest===void 0){In(e);return}let s=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,s._wasAlreadyErroring){s._reject(r),In(e);return}let c=e._writableStreamController[N](s._reason);P(c,()=>(s._resolve(),In(e),null),f=>(s._reject(f),In(e),null))}function Wc(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Mc(e,r){e._inFlightWriteRequest._reject(r),e._inFlightWriteRequest=void 0,Yo(e,r)}function qc(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";let s=e._writer;s!==void 0&&na(s)}function zc(e,r){e._inFlightCloseRequest._reject(r),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(r),e._pendingAbortRequest=void 0),Yo(e,r)}function Ye(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function Hc(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function Gc(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Kc(e){e._inFlightWriteRequest=e._writeRequests.shift()}function In(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);let r=e._writer;r!==void 0&&ri(r,e._storedError)}function Qo(e,r){let s=e._writer;s!==void 0&&r!==e._backpressure&&(r?su(s):oi(s)),e._backpressure=r}class ot{constructor(r){if(tt(r,1,"WritableStreamDefaultWriter"),zs(r,"First parameter"),ar(r))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=r,r._writer=this;let s=r._state;if(s==="writable")!Ye(r)&&r._backpressure?kn(this):oa(this),Ln(this);else if(s==="erroring")ni(this,r._storedError),Ln(this);else if(s==="closed")oa(this),ou(this);else{let c=r._storedError;ni(this,c),ra(this,c)}}get closed(){return Ft(this)?this._closedPromise:h($t("closed"))}get desiredSize(){if(!Ft(this))throw $t("desiredSize");if(this._ownerWritableStream===void 0)throw qr("desiredSize");return Jc(this)}get ready(){return Ft(this)?this._readyPromise:h($t("ready"))}abort(r=void 0){return Ft(this)?this._ownerWritableStream===void 0?h(qr("abort")):Vc(this,r):h($t("abort"))}close(){if(!Ft(this))return h($t("close"));let r=this._ownerWritableStream;return r===void 0?h(qr("close")):Ye(r)?h(new TypeError("Cannot close an already-closing stream")):Vs(this)}releaseLock(){if(!Ft(this))throw $t("releaseLock");this._ownerWritableStream!==void 0&&Xs(this)}write(r=void 0){return Ft(this)?this._ownerWritableStream===void 0?h(qr("write to")):Js(this,r):h($t("write"))}}Object.defineProperties(ot.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),a(ot.prototype.abort,"abort"),a(ot.prototype.close,"close"),a(ot.prototype.releaseLock,"releaseLock"),a(ot.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ot.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ft(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof ot}function Vc(e,r){let s=e._ownerWritableStream;return An(s,r)}function Vs(e){let r=e._ownerWritableStream;return Ks(r)}function Yc(e){let r=e._ownerWritableStream,s=r._state;return Ye(r)||s==="closed"?d(void 0):s==="errored"?h(r._storedError):Vs(e)}function Xc(e,r){e._closedPromiseState==="pending"?ri(e,r):iu(e,r)}function Ys(e,r){e._readyPromiseState==="pending"?ia(e,r):au(e,r)}function Jc(e){let r=e._ownerWritableStream,s=r._state;return s==="errored"||s==="erroring"?null:s==="closed"?0:ea(r._writableStreamController)}function Xs(e){let r=e._ownerWritableStream,s=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Ys(e,s),Xc(e,s),r._writer=void 0,e._ownerWritableStream=void 0}function Js(e,r){let s=e._ownerWritableStream,c=s._writableStreamController,f=eu(c,r);if(s!==e._ownerWritableStream)return h(qr("write to"));let b=s._state;if(b==="errored")return h(s._storedError);if(Ye(s)||b==="closed")return h(new TypeError("The stream is closing or closed and cannot be written to"));if(b==="erroring")return h(s._storedError);let _=Uc(s);return tu(c,r,f),_}let Qs={};class lr{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Zo(this))throw ti("abortReason");return this._abortReason}get signal(){if(!Zo(this))throw ti("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(r=void 0){if(!Zo(this))throw ti("error");this._controlledWritableStream._state==="writable"&&ta(this,r)}[N](r){let s=this._abortAlgorithm(r);return On(this),s}[ee](){gt(this)}}Object.defineProperties(lr.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(lr.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Zo(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof lr}function Zs(e,r,s,c,f,b,_,v){r._controlledWritableStream=e,e._writableStreamController=r,r._queue=void 0,r._queueTotalSize=void 0,gt(r),r._abortReason=void 0,r._abortController=Fc(),r._started=!1,r._strategySizeAlgorithm=v,r._strategyHWM=_,r._writeAlgorithm=c,r._closeAlgorithm=f,r._abortAlgorithm=b;let U=ei(r);Qo(e,U);let k=s(),M=d(k);P(M,()=>(r._started=!0,Dn(r),null),G=>(r._started=!0,Yo(e,G),null))}function Qc(e,r,s,c){let f=Object.create(lr.prototype),b,_,v,U;r.start!==void 0?b=()=>r.start(f):b=()=>{},r.write!==void 0?_=k=>r.write(k,f):_=()=>d(void 0),r.close!==void 0?v=()=>r.close():v=()=>d(void 0),r.abort!==void 0?U=k=>r.abort(k):U=()=>d(void 0),Zs(e,f,b,_,v,U,s,c)}function On(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Zc(e){Wo(e,Qs,0),Dn(e)}function eu(e,r){try{return e._strategySizeAlgorithm(r)}catch(s){return Mr(e,s),1}}function ea(e){return e._strategyHWM-e._queueTotalSize}function tu(e,r,s){try{Wo(e,r,s)}catch(f){Mr(e,f);return}let c=e._controlledWritableStream;if(!Ye(c)&&c._state==="writable"){let f=ei(e);Qo(c,f)}Dn(e)}function Dn(e){let r=e._controlledWritableStream;if(!e._started||r._inFlightWriteRequest!==void 0)return;if(r._state==="erroring"){Jo(r);return}if(e._queue.length===0)return;let c=mc(e);c===Qs?ru(e):nu(e,c)}function Mr(e,r){e._controlledWritableStream._state==="writable"&&ta(e,r)}function ru(e){let r=e._controlledWritableStream;Gc(r),Uo(e);let s=e._closeAlgorithm();On(e),P(s,()=>(qc(r),null),c=>(zc(r,c),null))}function nu(e,r){let s=e._controlledWritableStream;Kc(s);let c=e._writeAlgorithm(r);P(c,()=>{Wc(s);let f=s._state;if(Uo(e),!Ye(s)&&f==="writable"){let b=ei(e);Qo(s,b)}return Dn(e),null},f=>(s._state==="writable"&&On(e),Mc(s,f),null))}function ei(e){return ea(e)<=0}function ta(e,r){let s=e._controlledWritableStream;On(e),Xo(s,r)}function Nn(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function ti(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function $t(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function qr(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Ln(e){e._closedPromise=m((r,s)=>{e._closedPromise_resolve=r,e._closedPromise_reject=s,e._closedPromiseState="pending"})}function ra(e,r){Ln(e),ri(e,r)}function ou(e){Ln(e),na(e)}function ri(e,r){e._closedPromise_reject!==void 0&&(I(e._closedPromise),e._closedPromise_reject(r),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function iu(e,r){ra(e,r)}function na(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function kn(e){e._readyPromise=m((r,s)=>{e._readyPromise_resolve=r,e._readyPromise_reject=s}),e._readyPromiseState="pending"}function ni(e,r){kn(e),ia(e,r)}function oa(e){kn(e),oi(e)}function ia(e,r){e._readyPromise_reject!==void 0&&(I(e._readyPromise),e._readyPromise_reject(r),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function su(e){kn(e)}function au(e,r){ni(e,r)}function oi(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function lu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}let ii=lu();function cu(e){if(!(typeof e=="function"||typeof e=="object")||e.name!=="DOMException")return!1;try{return new e,!0}catch{return!1}}function uu(){let e=ii?.DOMException;return cu(e)?e:void 0}function fu(){let e=function(s,c){this.message=s||"",this.name=c||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return a(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}let du=uu()||fu();function sa(e,r,s,c,f,b){let _=or(e),v=Hs(r);e._disturbed=!0;let U=!1,k=d(void 0);return m((M,G)=>{let te;if(b!==void 0){if(te=()=>{let F=b.reason!==void 0?b.reason:new du("Aborted","AbortError"),K=[];c||K.push(()=>r._state==="writable"?An(r,F):d(void 0)),f||K.push(()=>e._state==="readable"?We(e,F):d(void 0)),we(()=>Promise.all(K.map(re=>re())),!0,F)},b.aborted){te();return}b.addEventListener("abort",te)}function Me(){return m((F,K)=>{function re(xe){xe?F():C(dr(),re,K)}re(!1)})}function dr(){return U?d(!0):C(v._readyPromise,()=>m((F,K)=>{jr(_,{_chunkSteps:re=>{k=C(Js(v,re),void 0,t),F(!1)},_closeSteps:()=>F(!0),_errorSteps:K})}))}if(st(e,_._closedPromise,F=>(c?Le(!0,F):we(()=>An(r,F),!0,F),null)),st(r,v._closedPromise,F=>(f?Le(!0,F):we(()=>We(e,F),!0,F),null)),ge(e,_._closedPromise,()=>(s?Le():we(()=>Yc(v)),null)),Ye(r)||r._state==="closed"){let F=new TypeError("the destination writable stream closed before all data could be piped to it");f?Le(!0,F):we(()=>We(e,F),!0,F)}I(Me());function Et(){let F=k;return C(k,()=>F!==k?Et():void 0)}function st(F,K,re){F._state==="errored"?re(F._storedError):y(K,re)}function ge(F,K,re){F._state==="closed"?re():A(K,re)}function we(F,K,re){if(U)return;U=!0,r._state==="writable"&&!Ye(r)?A(Et(),xe):xe();function xe(){return P(F(),()=>at(K,re),hr=>at(!0,hr)),null}}function Le(F,K){U||(U=!0,r._state==="writable"&&!Ye(r)?A(Et(),()=>at(F,K)):at(F,K))}function at(F,K){return Xs(v),De(_),b!==void 0&&b.removeEventListener("abort",te),F?G(K):M(void 0),null}})}class it{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Bn(this))throw Fn("desiredSize");return si(this)}close(){if(!Bn(this))throw Fn("close");if(!ur(this))throw new TypeError("The stream is not in a state that permits close");Ut(this)}enqueue(r=void 0){if(!Bn(this))throw Fn("enqueue");if(!ur(this))throw new TypeError("The stream is not in a state that permits enqueue");return cr(this,r)}error(r=void 0){if(!Bn(this))throw Fn("error");Ue(this,r)}[Ve](r){gt(this);let s=this._cancelAlgorithm(r);return jn(this),s}[ye](r){let s=this._controlledReadableStream;if(this._queue.length>0){let c=Uo(this);this._closeRequested&&this._queue.length===0?(jn(this),Gr(s)):zr(this),r._chunkSteps(c)}else ms(s,r),zr(this)}[Dt](){}}Object.defineProperties(it.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),a(it.prototype.close,"close"),a(it.prototype.enqueue,"enqueue"),a(it.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(it.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Bn(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof it}function zr(e){if(!aa(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let s=e._pullAlgorithm();P(s,()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,zr(e)),null),c=>(Ue(e,c),null))}function aa(e){let r=e._controlledReadableStream;return!ur(e)||!e._started?!1:!!(wt(r)&&bn(r)>0||si(e)>0)}function jn(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ut(e){if(!ur(e))return;let r=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(jn(e),Gr(r))}function cr(e,r){if(!ur(e))return;let s=e._controlledReadableStream;if(wt(s)&&bn(s)>0)ko(s,r,!1);else{let c;try{c=e._strategySizeAlgorithm(r)}catch(f){throw Ue(e,f),f}try{Wo(e,r,c)}catch(f){throw Ue(e,f),f}}zr(e)}function Ue(e,r){let s=e._controlledReadableStream;s._state==="readable"&&(gt(e),jn(e),fa(s,r))}function si(e){let r=e._controlledReadableStream._state;return r==="errored"?null:r==="closed"?0:e._strategyHWM-e._queueTotalSize}function hu(e){return!aa(e)}function ur(e){let r=e._controlledReadableStream._state;return!e._closeRequested&&r==="readable"}function la(e,r,s,c,f,b,_){r._controlledReadableStream=e,r._queue=void 0,r._queueTotalSize=void 0,gt(r),r._started=!1,r._closeRequested=!1,r._pullAgain=!1,r._pulling=!1,r._strategySizeAlgorithm=_,r._strategyHWM=b,r._pullAlgorithm=c,r._cancelAlgorithm=f,e._readableStreamController=r;let v=s();P(d(v),()=>(r._started=!0,zr(r),null),U=>(Ue(r,U),null))}function pu(e,r,s,c){let f=Object.create(it.prototype),b,_,v;r.start!==void 0?b=()=>r.start(f):b=()=>{},r.pull!==void 0?_=()=>r.pull(f):_=()=>d(void 0),r.cancel!==void 0?v=U=>r.cancel(U):v=()=>d(void 0),la(e,f,b,_,v,s,c)}function Fn(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function mu(e,r){return kt(e._readableStreamController)?yu(e):gu(e)}function gu(e,r){let s=or(e),c=!1,f=!1,b=!1,_=!1,v,U,k,M,G,te=m(ge=>{G=ge});function Me(){return c?(f=!0,d(void 0)):(c=!0,jr(s,{_chunkSteps:we=>{O(()=>{f=!1;let Le=we,at=we;b||cr(k._readableStreamController,Le),_||cr(M._readableStreamController,at),c=!1,f&&Me()})},_closeSteps:()=>{c=!1,b||Ut(k._readableStreamController),_||Ut(M._readableStreamController),(!b||!_)&&G(void 0)},_errorSteps:()=>{c=!1}}),d(void 0))}function dr(ge){if(b=!0,v=ge,_){let we=Fr([v,U]),Le=We(e,we);G(Le)}return te}function Et(ge){if(_=!0,U=ge,b){let we=Fr([v,U]),Le=We(e,we);G(Le)}return te}function st(){}return k=Hr(st,Me,dr),M=Hr(st,Me,Et),y(s._closedPromise,ge=>(Ue(k._readableStreamController,ge),Ue(M._readableStreamController,ge),(!b||!_)&&G(void 0),null)),[k,M]}function yu(e){let r=or(e),s=!1,c=!1,f=!1,b=!1,_=!1,v,U,k,M,G,te=m(F=>{G=F});function Me(F){y(F._closedPromise,K=>(F!==r||(Ne(k._readableStreamController,K),Ne(M._readableStreamController,K),(!b||!_)&&G(void 0)),null))}function dr(){jt(r)&&(De(r),r=or(e),Me(r)),jr(r,{_chunkSteps:K=>{O(()=>{c=!1,f=!1;let re=K,xe=K;if(!b&&!_)try{xe=xs(K)}catch(hr){Ne(k._readableStreamController,hr),Ne(M._readableStreamController,hr),G(We(e,hr));return}b||Rn(k._readableStreamController,re),_||Rn(M._readableStreamController,xe),s=!1,c?st():f&&ge()})},_closeSteps:()=>{s=!1,b||$r(k._readableStreamController),_||$r(M._readableStreamController),k._readableStreamController._pendingPullIntos.length>0&&Tn(k._readableStreamController,0),M._readableStreamController._pendingPullIntos.length>0&&Tn(M._readableStreamController,0),(!b||!_)&&G(void 0)},_errorSteps:()=>{s=!1}})}function Et(F,K){pt(r)&&(De(r),r=$s(e),Me(r));let re=K?M:k,xe=K?k:M;Ms(r,F,1,{_chunkSteps:pr=>{O(()=>{c=!1,f=!1;let mr=K?_:b;if(K?b:_)mr||Cn(re._readableStreamController,pr);else{let Ta;try{Ta=xs(pr)}catch(fi){Ne(re._readableStreamController,fi),Ne(xe._readableStreamController,fi),G(We(e,fi));return}mr||Cn(re._readableStreamController,pr),Rn(xe._readableStreamController,Ta)}s=!1,c?st():f&&ge()})},_closeSteps:pr=>{s=!1;let mr=K?_:b,Gn=K?b:_;mr||$r(re._readableStreamController),Gn||$r(xe._readableStreamController),pr!==void 0&&(mr||Cn(re._readableStreamController,pr),!Gn&&xe._readableStreamController._pendingPullIntos.length>0&&Tn(xe._readableStreamController,0)),(!mr||!Gn)&&G(void 0)},_errorSteps:()=>{s=!1}})}function st(){if(s)return c=!0,d(void 0);s=!0;let F=Go(k._readableStreamController);return F===null?dr():Et(F._view,!1),d(void 0)}function ge(){if(s)return f=!0,d(void 0);s=!0;let F=Go(M._readableStreamController);return F===null?dr():Et(F._view,!0),d(void 0)}function we(F){if(b=!0,v=F,_){let K=Fr([v,U]),re=We(e,K);G(re)}return te}function Le(F){if(_=!0,U=F,b){let K=Fr([v,U]),re=We(e,K);G(re)}return te}function at(){}return k=ua(at,st,we),M=ua(at,ge,Le),Me(r),[k,M]}function bu(e){return o(e)&&typeof e.getReader<"u"}function _u(e){return bu(e)?Su(e.getReader()):wu(e)}function wu(e){let r,s=Cs(e,"async"),c=t;function f(){let _;try{_=fc(s)}catch(U){return h(U)}let v=d(_);return T(v,U=>{if(!o(U))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(dc(U))Ut(r._readableStreamController);else{let M=hc(U);cr(r._readableStreamController,M)}})}function b(_){let v=s.iterator,U;try{U=wn(v,"return")}catch(G){return h(G)}if(U===void 0)return d(void 0);let k;try{k=$(U,v,[_])}catch(G){return h(G)}let M=d(k);return T(M,G=>{if(!o(G))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return r=Hr(c,f,b,0),r}function Su(e){let r,s=t;function c(){let b;try{b=e.read()}catch(_){return h(_)}return T(b,_=>{if(!o(_))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(_.done)Ut(r._readableStreamController);else{let v=_.value;cr(r._readableStreamController,v)}})}function f(b){try{return d(e.cancel(b))}catch(_){return h(_)}}return r=Hr(s,c,f,0),r}function Eu(e,r){be(e,r);let s=e,c=s?.autoAllocateChunkSize,f=s?.cancel,b=s?.pull,_=s?.start,v=s?.type;return{autoAllocateChunkSize:c===void 0?void 0:No(c,`${r} has member 'autoAllocateChunkSize' that`),cancel:f===void 0?void 0:Ru(f,s,`${r} has member 'cancel' that`),pull:b===void 0?void 0:Tu(b,s,`${r} has member 'pull' that`),start:_===void 0?void 0:Cu(_,s,`${r} has member 'start' that`),type:v===void 0?void 0:xu(v,`${r} has member 'type' that`)}}function Ru(e,r,s){return _e(e,s),c=>j(e,r,[c])}function Tu(e,r,s){return _e(e,s),c=>j(e,r,[c])}function Cu(e,r,s){return _e(e,s),c=>$(e,r,[c])}function xu(e,r){if(e=`${e}`,e!=="bytes")throw new TypeError(`${r} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function vu(e,r){return be(e,r),{preventCancel:!!e?.preventCancel}}function ca(e,r){be(e,r);let s=e?.preventAbort,c=e?.preventCancel,f=e?.preventClose,b=e?.signal;return b!==void 0&&Pu(b,`${r} has member 'signal' that`),{preventAbort:!!s,preventCancel:!!c,preventClose:!!f,signal:b}}function Pu(e,r){if(!Bc(e))throw new TypeError(`${r} is not an AbortSignal.`)}function Au(e,r){be(e,r);let s=e?.readable;Oo(s,"readable","ReadableWritablePair"),Lo(s,`${r} has member 'readable' that`);let c=e?.writable;return Oo(c,"writable","ReadableWritablePair"),zs(c,`${r} has member 'writable' that`),{readable:s,writable:c}}class he{constructor(r={},s={}){r===void 0?r=null:hs(r,"First parameter");let c=Pn(s,"Second parameter"),f=Eu(r,"First parameter");if(ai(this),f.type==="bytes"){if(c.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let b=Wr(c,0);Rc(this,f,b)}else{let b=vn(c),_=Wr(c,1);pu(this,f,_,b)}}get locked(){if(!_t(this))throw Wt("locked");return wt(this)}cancel(r=void 0){return _t(this)?wt(this)?h(new TypeError("Cannot cancel a stream that already has a reader")):We(this,r):h(Wt("cancel"))}getReader(r=void 0){if(!_t(this))throw Wt("getReader");return Cc(r,"First parameter").mode===void 0?or(this):$s(this)}pipeThrough(r,s={}){if(!_t(this))throw Wt("pipeThrough");tt(r,1,"pipeThrough");let c=Au(r,"First parameter"),f=ca(s,"Second parameter");if(wt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ar(c.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let b=sa(this,c.writable,f.preventClose,f.preventAbort,f.preventCancel,f.signal);return I(b),c.readable}pipeTo(r,s={}){if(!_t(this))return h(Wt("pipeTo"));if(r===void 0)return h("Parameter 1 is required in 'pipeTo'.");if(!sr(r))return h(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let c;try{c=ca(s,"Second parameter")}catch(f){return h(f)}return wt(this)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ar(r)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):sa(this,r,c.preventClose,c.preventAbort,c.preventCancel,c.signal)}tee(){if(!_t(this))throw Wt("tee");let r=mu(this);return Fr(r)}values(r=void 0){if(!_t(this))throw Wt("values");let s=vu(r,"First parameter");return cc(this,s.preventCancel)}[$o](r){return this.values(r)}static from(r){return _u(r)}}Object.defineProperties(he,{from:{enumerable:!0}}),Object.defineProperties(he.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),a(he.from,"from"),a(he.prototype.cancel,"cancel"),a(he.prototype.getReader,"getReader"),a(he.prototype.pipeThrough,"pipeThrough"),a(he.prototype.pipeTo,"pipeTo"),a(he.prototype.tee,"tee"),a(he.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(he.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(he.prototype,$o,{value:he.prototype.values,writable:!0,configurable:!0});function Hr(e,r,s,c=1,f=()=>1){let b=Object.create(he.prototype);ai(b);let _=Object.create(it.prototype);return la(b,_,e,r,s,c,f),b}function ua(e,r,s){let c=Object.create(he.prototype);ai(c);let f=Object.create(nt.prototype);return Fs(c,f,e,r,s,0,void 0),c}function ai(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function _t(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof he}function wt(e){return e._reader!==void 0}function We(e,r){if(e._disturbed=!0,e._state==="closed")return d(void 0);if(e._state==="errored")return h(e._storedError);Gr(e);let s=e._reader;if(s!==void 0&&jt(s)){let f=s._readIntoRequests;s._readIntoRequests=new D,f.forEach(b=>{b._closeSteps(void 0)})}let c=e._readableStreamController[Ve](r);return T(c,t)}function Gr(e){e._state="closed";let r=e._reader;if(r!==void 0&&(Br(r),pt(r))){let s=r._readRequests;r._readRequests=new D,s.forEach(c=>{c._closeSteps()})}}function fa(e,r){e._state="errored",e._storedError=r;let s=e._reader;s!==void 0&&(kr(s,r),pt(s)?ys(s,r):qs(s,r))}function Wt(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function da(e,r){be(e,r);let s=e?.highWaterMark;return Oo(s,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Do(s)}}let ha=e=>e.byteLength;a(ha,"size");class $n{constructor(r){tt(r,1,"ByteLengthQueuingStrategy"),r=da(r,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=r.highWaterMark}get highWaterMark(){if(!ma(this))throw pa("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ma(this))throw pa("size");return ha}}Object.defineProperties($n.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($n.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function pa(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function ma(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof $n}let ga=()=>1;a(ga,"size");class Un{constructor(r){tt(r,1,"CountQueuingStrategy"),r=da(r,"First parameter"),this._countQueuingStrategyHighWaterMark=r.highWaterMark}get highWaterMark(){if(!ba(this))throw ya("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!ba(this))throw ya("size");return ga}}Object.defineProperties(Un.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Un.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ya(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function ba(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof Un}function Iu(e,r){be(e,r);let s=e?.cancel,c=e?.flush,f=e?.readableType,b=e?.start,_=e?.transform,v=e?.writableType;return{cancel:s===void 0?void 0:Lu(s,e,`${r} has member 'cancel' that`),flush:c===void 0?void 0:Ou(c,e,`${r} has member 'flush' that`),readableType:f,start:b===void 0?void 0:Du(b,e,`${r} has member 'start' that`),transform:_===void 0?void 0:Nu(_,e,`${r} has member 'transform' that`),writableType:v}}function Ou(e,r,s){return _e(e,s),c=>j(e,r,[c])}function Du(e,r,s){return _e(e,s),c=>$(e,r,[c])}function Nu(e,r,s){return _e(e,s),(c,f)=>j(e,r,[c,f])}function Lu(e,r,s){return _e(e,s),c=>j(e,r,[c])}class Wn{constructor(r={},s={},c={}){r===void 0&&(r=null);let f=Pn(s,"Second parameter"),b=Pn(c,"Third parameter"),_=Iu(r,"First parameter");if(_.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(_.writableType!==void 0)throw new RangeError("Invalid writableType specified");let v=Wr(b,0),U=vn(b),k=Wr(f,1),M=vn(f),G,te=m(Me=>{G=Me});ku(this,te,k,M,v,U),ju(this,_),_.start!==void 0?G(_.start(this._transformStreamController)):G(void 0)}get readable(){if(!_a(this))throw Ra("readable");return this._readable}get writable(){if(!_a(this))throw Ra("writable");return this._writable}}Object.defineProperties(Wn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Wn.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function ku(e,r,s,c,f,b){function _(){return r}function v(te){return Uu(e,te)}function U(te){return Wu(e,te)}function k(){return Mu(e)}e._writable=$c(_,v,k,U,s,c);function M(){return qu(e)}function G(te){return zu(e,te)}e._readable=Hr(_,M,G,f,b),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Mn(e,!0),e._transformStreamController=void 0}function _a(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof Wn}function wa(e,r){Ue(e._readable._readableStreamController,r),li(e,r)}function li(e,r){zn(e._transformStreamController),Mr(e._writable._writableStreamController,r),ci(e)}function ci(e){e._backpressure&&Mn(e,!1)}function Mn(e,r){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=m(s=>{e._backpressureChangePromise_resolve=s}),e._backpressure=r}class St{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!qn(this))throw Hn("desiredSize");let r=this._controlledTransformStream._readable._readableStreamController;return si(r)}enqueue(r=void 0){if(!qn(this))throw Hn("enqueue");Sa(this,r)}error(r=void 0){if(!qn(this))throw Hn("error");Fu(this,r)}terminate(){if(!qn(this))throw Hn("terminate");$u(this)}}Object.defineProperties(St.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),a(St.prototype.enqueue,"enqueue"),a(St.prototype.error,"error"),a(St.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(St.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function qn(e){return!o(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof St}function Bu(e,r,s,c,f){r._controlledTransformStream=e,e._transformStreamController=r,r._transformAlgorithm=s,r._flushAlgorithm=c,r._cancelAlgorithm=f,r._finishPromise=void 0,r._finishPromise_resolve=void 0,r._finishPromise_reject=void 0}function ju(e,r){let s=Object.create(St.prototype),c,f,b;r.transform!==void 0?c=_=>r.transform(_,s):c=_=>{try{return Sa(s,_),d(void 0)}catch(v){return h(v)}},r.flush!==void 0?f=()=>r.flush(s):f=()=>d(void 0),r.cancel!==void 0?b=_=>r.cancel(_):b=()=>d(void 0),Bu(e,s,c,f,b)}function zn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function Sa(e,r){let s=e._controlledTransformStream,c=s._readable._readableStreamController;if(!ur(c))throw new TypeError("Readable side is not in a state that permits enqueue");try{cr(c,r)}catch(b){throw li(s,b),s._readable._storedError}hu(c)!==s._backpressure&&Mn(s,!0)}function Fu(e,r){wa(e._controlledTransformStream,r)}function Ea(e,r){let s=e._transformAlgorithm(r);return T(s,void 0,c=>{throw wa(e._controlledTransformStream,c),c})}function $u(e){let r=e._controlledTransformStream,s=r._readable._readableStreamController;Ut(s);let c=new TypeError("TransformStream terminated");li(r,c)}function Uu(e,r){let s=e._transformStreamController;if(e._backpressure){let c=e._backpressureChangePromise;return T(c,()=>{let f=e._writable;if(f._state==="erroring")throw f._storedError;return Ea(s,r)})}return Ea(s,r)}function Wu(e,r){let s=e._transformStreamController;if(s._finishPromise!==void 0)return s._finishPromise;let c=e._readable;s._finishPromise=m((b,_)=>{s._finishPromise_resolve=b,s._finishPromise_reject=_});let f=s._cancelAlgorithm(r);return zn(s),P(f,()=>(c._state==="errored"?fr(s,c._storedError):(Ue(c._readableStreamController,r),ui(s)),null),b=>(Ue(c._readableStreamController,b),fr(s,b),null)),s._finishPromise}function Mu(e){let r=e._transformStreamController;if(r._finishPromise!==void 0)return r._finishPromise;let s=e._readable;r._finishPromise=m((f,b)=>{r._finishPromise_resolve=f,r._finishPromise_reject=b});let c=r._flushAlgorithm();return zn(r),P(c,()=>(s._state==="errored"?fr(r,s._storedError):(Ut(s._readableStreamController),ui(r)),null),f=>(Ue(s._readableStreamController,f),fr(r,f),null)),r._finishPromise}function qu(e){return Mn(e,!1),e._backpressureChangePromise}function zu(e,r){let s=e._transformStreamController;if(s._finishPromise!==void 0)return s._finishPromise;let c=e._writable;s._finishPromise=m((b,_)=>{s._finishPromise_resolve=b,s._finishPromise_reject=_});let f=s._cancelAlgorithm(r);return zn(s),P(f,()=>(c._state==="errored"?fr(s,c._storedError):(Mr(c._writableStreamController,r),ci(e),ui(s)),null),b=>(Mr(c._writableStreamController,b),ci(e),fr(s,b),null)),s._finishPromise}function Hn(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function ui(e){e._finishPromise_resolve!==void 0&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function fr(e,r){e._finishPromise_reject!==void 0&&(I(e._finishPromise),e._finishPromise_reject(r),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Ra(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}n.ByteLengthQueuingStrategy=$n,n.CountQueuingStrategy=Un,n.ReadableByteStreamController=nt,n.ReadableStream=he,n.ReadableStreamBYOBReader=yt,n.ReadableStreamBYOBRequest=Lt,n.ReadableStreamDefaultController=it,n.ReadableStreamDefaultReader=ht,n.TransformStream=Wn,n.TransformStreamDefaultController=St,n.WritableStream=bt,n.WritableStreamDefaultController=lr,n.WritableStreamDefaultWriter=ot}))});var hl=di(()=>{"use strict";if(!globalThis.ReadableStream)try{let n=require("process"),{emitWarning:t}=n;try{n.emitWarning=()=>{},Object.assign(globalThis,require("stream/web")),n.emitWarning=t}catch(o){throw n.emitWarning=t,o}}catch{Object.assign(globalThis,dl())}try{let{Blob:n}=require("buffer");n&&!n.prototype.stream&&(n.prototype.stream=function(o){let i=0,a=this;return new ReadableStream({type:"bytes",async pull(l){let p=await a.slice(i,Math.min(a.size,i+65536)).arrayBuffer();i+=p.byteLength,l.enqueue(new Uint8Array(p)),i===a.size&&l.close()}})})}catch{}});async function*Gi(n,t=!0){for(let o of n)if("stream"in o)yield*o.stream();else if(ArrayBuffer.isView(o))if(t){let i=o.byteOffset,a=o.byteOffset+o.byteLength;for(;i!==a;){let l=Math.min(a-i,pl),u=o.buffer.slice(i,i+l);i+=u.byteLength,yield new Uint8Array(u)}}else yield o;else{let i=0,a=o;for(;i!==a.size;){let u=await a.slice(i,Math.min(a.size,i+pl)).arrayBuffer();i+=u.byteLength,yield new Uint8Array(u)}}}var Vp,pl,lt,rn,Pr,co,Xt,ml,rd,ct,nn=Kr(()=>{"use strict";Vp=J(hl(),1);pl=65536;ml=(Xt=class{constructor(t=[],o={}){q(this,lt,[]);q(this,rn,"");q(this,Pr,0);q(this,co,"transparent");if(typeof t!="object"||t===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof t[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof o!="object"&&typeof o!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");o===null&&(o={});let i=new TextEncoder;for(let l of t){let u;ArrayBuffer.isView(l)?u=new Uint8Array(l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength)):l instanceof ArrayBuffer?u=new Uint8Array(l.slice(0)):l instanceof Xt?u=l:u=i.encode(`${l}`),L(this,Pr,g(this,Pr)+(ArrayBuffer.isView(u)?u.byteLength:u.size)),g(this,lt).push(u)}L(this,co,`${o.endings===void 0?"transparent":o.endings}`);let a=o.type===void 0?"":String(o.type);L(this,rn,/^[\x20-\x7E]*$/.test(a)?a:"")}get size(){return g(this,Pr)}get type(){return g(this,rn)}async text(){let t=new TextDecoder,o="";for await(let i of Gi(g(this,lt),!1))o+=t.decode(i,{stream:!0});return o+=t.decode(),o}async arrayBuffer(){let t=new Uint8Array(this.size),o=0;for await(let i of Gi(g(this,lt),!1))t.set(i,o),o+=i.length;return t.buffer}stream(){let t=Gi(g(this,lt),!0);return new globalThis.ReadableStream({type:"bytes",async pull(o){let i=await t.next();i.done?o.close():o.enqueue(i.value)},async cancel(){await t.return()}})}slice(t=0,o=this.size,i=""){let{size:a}=this,l=t<0?Math.max(a+t,0):Math.min(t,a),u=o<0?Math.max(a+o,0):Math.min(o,a),p=Math.max(u-l,0),m=g(this,lt),d=[],h=0;for(let P of m){if(h>=p)break;let A=ArrayBuffer.isView(P)?P.byteLength:P.size;if(l&&A<=l)l-=A,u-=A;else{let y;ArrayBuffer.isView(P)?(y=P.subarray(l,Math.min(A,u)),h+=y.byteLength):(y=P.slice(l,Math.min(A,u)),h+=y.size),u-=A,d.push(y),l=0}}let C=new Xt([],{type:String(i).toLowerCase()});return L(C,Pr,p),L(C,lt,d),C}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t=="object"&&typeof t.constructor=="function"&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}},lt=new WeakMap,rn=new WeakMap,Pr=new WeakMap,co=new WeakMap,Xt);Object.defineProperties(ml.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});rd=ml,ct=rd});var on,sn,gl,nd,od,Ar,Ki=Kr(()=>{"use strict";nn();nd=(gl=class extends ct{constructor(o,i,a={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(o,a);q(this,on,0);q(this,sn,"");a===null&&(a={});let l=a.lastModified===void 0?Date.now():Number(a.lastModified);Number.isNaN(l)||L(this,on,l),L(this,sn,String(i))}get name(){return g(this,sn)}get lastModified(){return g(this,on)}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](o){return!!o&&o instanceof ct&&/^(File)$/.test(o[Symbol.toStringTag])}},on=new WeakMap,sn=new WeakMap,gl),od=nd,Ar=od});function wl(n,t=ct){var o=`${yl()}${yl()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],a=`--${o}\r
|
|
3
3
|
Content-Disposition: form-data; name="`;return n.forEach((l,u)=>typeof l=="string"?i.push(a+Vi(u)+`"\r
|
|
4
4
|
\r
|
|
5
5
|
${l.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
|
|
@@ -9,36 +9,36 @@ Content-Type: ${l.type||"application/octet-stream"}\r
|
|
|
9
9
|
\r
|
|
10
10
|
`,l,`\r
|
|
11
11
|
`)),i.push(`--${o}--`),new t(i,{type:"multipart/form-data; boundary="+o})}var an,id,sd,yl,ad,bl,Vi,Jt,Be,_l,Qt,uo=Kr(()=>{"use strict";nn();Ki();({toStringTag:an,iterator:id,hasInstance:sd}=Symbol),yl=Math.random,ad="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),bl=(n,t,o)=>(n+="",/^(Blob|File)$/.test(t&&t[an])?[(o=o!==void 0?o+"":t[an]=="File"?t.name:"blob",n),t.name!==o||t[an]=="blob"?new Ar([t],o,t):t]:[n,t+""]),Vi=(n,t)=>(t?n:n.replace(/\r?\n|\r/g,`\r
|
|
12
|
-
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),Jt=(n,t,o)=>{if(t.length<o)throw new TypeError(`Failed to execute '${n}' on 'FormData': ${o} arguments required, but only ${t.length} present.`)},Qt=(_l=class{constructor(...t){q(this,Be,[]);if(t.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[an](){return"FormData"}[id](){return this.entries()}static[sd](t){return t&&typeof t=="object"&&t[an]==="FormData"&&!ad.some(o=>typeof t[o]!="function")}append(...t){Jt("append",arguments,2),g(this,Be).push(bl(...t))}delete(t){Jt("delete",arguments,1),t+="",L(this,Be,g(this,Be).filter(([o])=>o!==t))}get(t){Jt("get",arguments,1),t+="";for(var o=g(this,Be),i=o.length,a=0;a<i;a++)if(o[a][0]===t)return o[a][1];return null}getAll(t,o){return Jt("getAll",arguments,1),o=[],t+="",g(this,Be).forEach(i=>i[0]===t&&o.push(i[1])),o}has(t){return Jt("has",arguments,1),t+="",g(this,Be).some(o=>o[0]===t)}forEach(t,o){Jt("forEach",arguments,1);for(var[i,a]of this)t.call(o,a,i,this)}set(...t){Jt("set",arguments,2);var o=[],i=!0;t=bl(...t),g(this,Be).forEach(a=>{a[0]===t[0]?i&&(i=!o.push(t)):o.push(a)}),i&&o.push(t),L(this,Be,o)}*entries(){yield*g(this,Be)}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}},Be=new WeakMap,_l)});var Cl=di((um,Tl)=>{"use strict";if(!globalThis.DOMException)try{let{MessageChannel:n}=require("worker_threads"),t=new n().port1,o=new ArrayBuffer;t.postMessage(o,[o,o])}catch(n){n.constructor.name==="DOMException"&&(globalThis.DOMException=n.constructor)}Tl.exports=globalThis.DOMException});var ho,ld,cd,hm,Xi=Kr(()=>{"use strict";ho=require("fs"),ld=require("path"),cd=J(Cl(),1);Ki();nn();({stat:hm}=ho.promises)});var vl={};xa(vl,{toFormData:()=>gd});function md(n){let t=n.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let o=t[2]||t[3]||"",i=o.slice(o.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(a,l)=>String.fromCharCode(l)),i}async function gd(n,t){if(!/multipart/i.test(t))throw new TypeError("Failed to fetch");let o=t.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!o)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new Ji(o[1]||o[2]),a,l,u,p,m,d,h=[],C=new Qt,P=
|
|
13
|
-
--`+t;let o=new Uint8Array(t.length);for(let i=0;i<t.length;i++)o[i]=t.charCodeAt(i),this.boundaryChars[o[i]]=!0;this.boundary=o,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=oe.START_BOUNDARY}write(t){let o=0,i=t.length,a=this.index,{lookbehind:l,boundary:u,boundaryChars:p,index:m,state:d,flags:h}=this,C=this.boundary.length,P=C-1,
|
|
12
|
+
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),Jt=(n,t,o)=>{if(t.length<o)throw new TypeError(`Failed to execute '${n}' on 'FormData': ${o} arguments required, but only ${t.length} present.`)},Qt=(_l=class{constructor(...t){q(this,Be,[]);if(t.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[an](){return"FormData"}[id](){return this.entries()}static[sd](t){return t&&typeof t=="object"&&t[an]==="FormData"&&!ad.some(o=>typeof t[o]!="function")}append(...t){Jt("append",arguments,2),g(this,Be).push(bl(...t))}delete(t){Jt("delete",arguments,1),t+="",L(this,Be,g(this,Be).filter(([o])=>o!==t))}get(t){Jt("get",arguments,1),t+="";for(var o=g(this,Be),i=o.length,a=0;a<i;a++)if(o[a][0]===t)return o[a][1];return null}getAll(t,o){return Jt("getAll",arguments,1),o=[],t+="",g(this,Be).forEach(i=>i[0]===t&&o.push(i[1])),o}has(t){return Jt("has",arguments,1),t+="",g(this,Be).some(o=>o[0]===t)}forEach(t,o){Jt("forEach",arguments,1);for(var[i,a]of this)t.call(o,a,i,this)}set(...t){Jt("set",arguments,2);var o=[],i=!0;t=bl(...t),g(this,Be).forEach(a=>{a[0]===t[0]?i&&(i=!o.push(t)):o.push(a)}),i&&o.push(t),L(this,Be,o)}*entries(){yield*g(this,Be)}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}},Be=new WeakMap,_l)});var Cl=di((um,Tl)=>{"use strict";if(!globalThis.DOMException)try{let{MessageChannel:n}=require("worker_threads"),t=new n().port1,o=new ArrayBuffer;t.postMessage(o,[o,o])}catch(n){n.constructor.name==="DOMException"&&(globalThis.DOMException=n.constructor)}Tl.exports=globalThis.DOMException});var ho,ld,cd,hm,Xi=Kr(()=>{"use strict";ho=require("fs"),ld=require("path"),cd=J(Cl(),1);Ki();nn();({stat:hm}=ho.promises)});var vl={};xa(vl,{toFormData:()=>gd});function md(n){let t=n.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let o=t[2]||t[3]||"",i=o.slice(o.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(a,l)=>String.fromCharCode(l)),i}async function gd(n,t){if(!/multipart/i.test(t))throw new TypeError("Failed to fetch");let o=t.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!o)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new Ji(o[1]||o[2]),a,l,u,p,m,d,h=[],C=new Qt,P=O=>{u+=I.decode(O,{stream:!0})},A=O=>{h.push(O)},y=()=>{let O=new Ar(h,d,{type:m});C.append(p,O)},T=()=>{C.append(p,u)},I=new TextDecoder("utf-8");I.decode(),i.onPartBegin=function(){i.onPartData=P,i.onPartEnd=T,a="",l="",u="",p="",m="",d=null,h.length=0},i.onHeaderField=function(O){a+=I.decode(O,{stream:!0})},i.onHeaderValue=function(O){l+=I.decode(O,{stream:!0})},i.onHeaderEnd=function(){if(l+=I.decode(),a=a.toLowerCase(),a==="content-disposition"){let O=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);O&&(p=O[2]||O[3]||""),d=md(l),d&&(i.onPartData=A,i.onPartEnd=y)}else a==="content-type"&&(m=l);l="",a=""};for await(let O of n)i.write(O);return i.end(),C}var Qe,oe,xl,vt,po,mo,ud,cn,fd,dd,hd,pd,Zt,Ji,Pl=Kr(()=>{"use strict";Xi();uo();Qe=0,oe={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++},xl=1,vt={PART_BOUNDARY:xl,LAST_BOUNDARY:xl*=2},po=10,mo=13,ud=32,cn=45,fd=58,dd=97,hd=122,pd=n=>n|32,Zt=()=>{},Ji=class{constructor(t){this.index=0,this.flags=0,this.onHeaderEnd=Zt,this.onHeaderField=Zt,this.onHeadersEnd=Zt,this.onHeaderValue=Zt,this.onPartBegin=Zt,this.onPartData=Zt,this.onPartEnd=Zt,this.boundaryChars={},t=`\r
|
|
13
|
+
--`+t;let o=new Uint8Array(t.length);for(let i=0;i<t.length;i++)o[i]=t.charCodeAt(i),this.boundaryChars[o[i]]=!0;this.boundary=o,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=oe.START_BOUNDARY}write(t){let o=0,i=t.length,a=this.index,{lookbehind:l,boundary:u,boundaryChars:p,index:m,state:d,flags:h}=this,C=this.boundary.length,P=C-1,A=t.length,y,T,I=x=>{this[x+"Mark"]=o},O=x=>{delete this[x+"Mark"]},$=(x,D,N,ee)=>{(D===void 0||D!==N)&&this[x](ee&&ee.subarray(D,N))},j=(x,D)=>{let N=x+"Mark";N in this&&(D?($(x,this[N],o,t),delete this[N]):($(x,this[N],t.length,t),this[N]=0))};for(o=0;o<i;o++)switch(y=t[o],d){case oe.START_BOUNDARY:if(m===u.length-2){if(y===cn)h|=vt.LAST_BOUNDARY;else if(y!==mo)return;m++;break}else if(m-1===u.length-2){if(h&vt.LAST_BOUNDARY&&y===cn)d=oe.END,h=0;else if(!(h&vt.LAST_BOUNDARY)&&y===po)m=0,$("onPartBegin"),d=oe.HEADER_FIELD_START;else return;break}y!==u[m+2]&&(m=-2),y===u[m+2]&&m++;break;case oe.HEADER_FIELD_START:d=oe.HEADER_FIELD,I("onHeaderField"),m=0;case oe.HEADER_FIELD:if(y===mo){O("onHeaderField"),d=oe.HEADERS_ALMOST_DONE;break}if(m++,y===cn)break;if(y===fd){if(m===1)return;j("onHeaderField",!0),d=oe.HEADER_VALUE_START;break}if(T=pd(y),T<dd||T>hd)return;break;case oe.HEADER_VALUE_START:if(y===ud)break;I("onHeaderValue"),d=oe.HEADER_VALUE;case oe.HEADER_VALUE:y===mo&&(j("onHeaderValue",!0),$("onHeaderEnd"),d=oe.HEADER_VALUE_ALMOST_DONE);break;case oe.HEADER_VALUE_ALMOST_DONE:if(y!==po)return;d=oe.HEADER_FIELD_START;break;case oe.HEADERS_ALMOST_DONE:if(y!==po)return;$("onHeadersEnd"),d=oe.PART_DATA_START;break;case oe.PART_DATA_START:d=oe.PART_DATA,I("onPartData");case oe.PART_DATA:if(a=m,m===0){for(o+=P;o<A&&!(t[o]in p);)o+=C;o-=P,y=t[o]}if(m<u.length)u[m]===y?(m===0&&j("onPartData",!0),m++):m=0;else if(m===u.length)m++,y===mo?h|=vt.PART_BOUNDARY:y===cn?h|=vt.LAST_BOUNDARY:m=0;else if(m-1===u.length)if(h&vt.PART_BOUNDARY){if(m=0,y===po){h&=~vt.PART_BOUNDARY,$("onPartEnd"),$("onPartBegin"),d=oe.HEADER_FIELD_START;break}}else h&vt.LAST_BOUNDARY&&y===cn?($("onPartEnd"),d=oe.END,h=0):m=0;if(m>0)l[m-1]=y;else if(a>0){let x=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);$("onPartData",0,a,x),a=0,I("onPartData"),o--}break;case oe.END:break;default:throw new Error(`Unexpected state entered: ${d}`)}j("onHeaderField"),j("onHeaderValue"),j("onPartData"),this.index=m,this.state=d,this.flags=h}end(){if(this.state===oe.HEADER_FIELD_START&&this.index===0||this.state===oe.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==oe.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var Kl=require("commander");var va=(n=0)=>t=>`\x1B[${t+n}m`,Pa=(n=0)=>t=>`\x1B[${38+n};5;${t}m`,Aa=(n=0)=>(t,o,i)=>`\x1B[${38+n};2;${t};${o};${i}m`,se={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Qd=Object.keys(se.modifier),Qu=Object.keys(se.color),Zu=Object.keys(se.bgColor),Zd=[...Qu,...Zu];function ef(){let n=new Map;for(let[t,o]of Object.entries(se)){for(let[i,a]of Object.entries(o))se[i]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},o[i]=se[i],n.set(a[0],a[1]);Object.defineProperty(se,t,{value:o,enumerable:!1})}return Object.defineProperty(se,"codes",{value:n,enumerable:!1}),se.color.close="\x1B[39m",se.bgColor.close="\x1B[49m",se.color.ansi=va(),se.color.ansi256=Pa(),se.color.ansi16m=Aa(),se.bgColor.ansi=va(10),se.bgColor.ansi256=Pa(10),se.bgColor.ansi16m=Aa(10),Object.defineProperties(se,{rgbToAnsi256:{value(t,o,i){return t===o&&o===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!o)return[0,0,0];let[i]=o;i.length===3&&(i=[...i].map(l=>l+l).join(""));let a=Number.parseInt(i,16);return[a>>16&255,a>>8&255,a&255]},enumerable:!1},hexToAnsi256:{value:t=>se.rgbToAnsi256(...se.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let o,i,a;if(t>=232)o=((t-232)*10+8)/255,i=o,a=o;else{t-=16;let p=t%36;o=Math.floor(t/36)/5,i=Math.floor(p/6)/5,a=p%6/5}let l=Math.max(o,i,a)*2;if(l===0)return 30;let u=30+(Math.round(a)<<2|Math.round(i)<<1|Math.round(o));return l===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(t,o,i)=>se.ansi256ToAnsi(se.rgbToAnsi256(t,o,i)),enumerable:!1},hexToAnsi:{value:t=>se.ansi256ToAnsi(se.hexToAnsi256(t)),enumerable:!1}}),se}var tf=ef(),qe=tf;var Yn=J(require("process"),1),Oa=J(require("os"),1),mi=J(require("tty"),1);function ke(n,t=globalThis.Deno?globalThis.Deno.args:Yn.default.argv){let o=n.startsWith("-")?"":n.length===1?"-":"--",i=t.indexOf(o+n),a=t.indexOf("--");return i!==-1&&(a===-1||i<a)}var{env:ae}=Yn.default,Vn;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?Vn=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(Vn=1);function rf(){if("FORCE_COLOR"in ae)return ae.FORCE_COLOR==="true"?1:ae.FORCE_COLOR==="false"?0:ae.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ae.FORCE_COLOR,10),3)}function nf(n){return n===0?!1:{level:n,hasBasic:!0,has256:n>=2,has16m:n>=3}}function of(n,{streamIsTTY:t,sniffFlags:o=!0}={}){let i=rf();i!==void 0&&(Vn=i);let a=o?Vn:i;if(a===0)return 0;if(o){if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2}if("TF_BUILD"in ae&&"AGENT_NAME"in ae)return 1;if(n&&!t&&a===void 0)return 0;let l=a||0;if(ae.TERM==="dumb")return l;if(Yn.default.platform==="win32"){let u=Oa.default.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in ae)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(u=>u in ae)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in ae)||ae.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in ae)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ae.TEAMCITY_VERSION)?1:0;if(ae.COLORTERM==="truecolor"||ae.TERM==="xterm-kitty"||ae.TERM==="xterm-ghostty"||ae.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ae){let u=Number.parseInt((ae.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ae.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ae.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ae.TERM)||"COLORTERM"in ae?1:l}function Ia(n,t={}){let o=of(n,{streamIsTTY:n&&n.isTTY,...t});return nf(o)}var sf={stdout:Ia({isTTY:mi.default.isatty(1)}),stderr:Ia({isTTY:mi.default.isatty(2)})},Da=sf;function Na(n,t,o){let i=n.indexOf(t);if(i===-1)return n;let a=t.length,l=0,u="";do u+=n.slice(l,i)+t+o,l=i+a,i=n.indexOf(t,l);while(i!==-1);return u+=n.slice(l),u}function La(n,t,o,i){let a=0,l="";do{let u=n[i-1]==="\r";l+=n.slice(a,u?i-1:i)+t+(u?`\r
|
|
14
14
|
`:`
|
|
15
15
|
`)+o,a=i+1,i=n.indexOf(`
|
|
16
16
|
`,a)}while(i!==-1);return l+=n.slice(a),l}var{stdout:ka,stderr:Ba}=Da,gi=Symbol("GENERATOR"),gr=Symbol("STYLER"),Vr=Symbol("IS_EMPTY"),ja=["ansi","ansi","ansi256","ansi16m"],yr=Object.create(null),af=(n,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let o=ka?ka.level:0;n.level=t.level===void 0?o:t.level};var lf=n=>{let t=(...o)=>o.join(" ");return af(t,n),Object.setPrototypeOf(t,Yr.prototype),t};function Yr(n){return lf(n)}Object.setPrototypeOf(Yr.prototype,Function.prototype);for(let[n,t]of Object.entries(qe))yr[n]={get(){let o=Xn(this,bi(t.open,t.close,this[gr]),this[Vr]);return Object.defineProperty(this,n,{value:o}),o}};yr.visible={get(){let n=Xn(this,this[gr],!0);return Object.defineProperty(this,"visible",{value:n}),n}};var yi=(n,t,o,...i)=>n==="rgb"?t==="ansi16m"?qe[o].ansi16m(...i):t==="ansi256"?qe[o].ansi256(qe.rgbToAnsi256(...i)):qe[o].ansi(qe.rgbToAnsi(...i)):n==="hex"?yi("rgb",t,o,...qe.hexToRgb(...i)):qe[o][n](...i),cf=["rgb","hex","ansi256"];for(let n of cf){yr[n]={get(){let{level:o}=this;return function(...i){let a=bi(yi(n,ja[o],"color",...i),qe.color.close,this[gr]);return Xn(this,a,this[Vr])}}};let t="bg"+n[0].toUpperCase()+n.slice(1);yr[t]={get(){let{level:o}=this;return function(...i){let a=bi(yi(n,ja[o],"bgColor",...i),qe.bgColor.close,this[gr]);return Xn(this,a,this[Vr])}}}}var uf=Object.defineProperties(()=>{},{...yr,level:{enumerable:!0,get(){return this[gi].level},set(n){this[gi].level=n}}}),bi=(n,t,o)=>{let i,a;return o===void 0?(i=n,a=t):(i=o.openAll+n,a=t+o.closeAll),{open:n,close:t,openAll:i,closeAll:a,parent:o}},Xn=(n,t,o)=>{let i=(...a)=>ff(i,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(i,uf),i[gi]=n,i[gr]=t,i[Vr]=o,i},ff=(n,t)=>{if(n.level<=0||!t)return n[Vr]?"":t;let o=n[gr];if(o===void 0)return t;let{openAll:i,closeAll:a}=o;if(t.includes("\x1B"))for(;o!==void 0;)t=Na(t,o.close,o.open),o=o.parent;let l=t.indexOf(`
|
|
17
|
-
`);return l!==-1&&(t=La(t,a,i,l)),i+t+a};Object.defineProperties(Yr.prototype,yr);var df=Yr(),sh=Yr({level:Ba?Ba.level:0});var
|
|
18
|
-
${t}`,yf=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),bf=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_f=(n,t,o)=>{let i=o===""?"":`with ${o.trim()}() `,a=gf.bind(null,i,t.toString());Object.defineProperty(a,"name",bf);let{writable:l,enumerable:u,configurable:p}=yf;Object.defineProperty(n,"toString",{value:a,writable:l,enumerable:u,configurable:p})};function _i(n,t,{ignoreNonConfigurable:o=!1}={}){let{name:i}=n;for(let a of Reflect.ownKeys(t))hf(n,t,a,o);return mf(n,t),_f(n,t,i),n}var Jn=new WeakMap,Fa=(n,t={})=>{if(typeof n!="function")throw new TypeError("Expected a function");let o,i=0,a=n.displayName||n.name||"<anonymous>",l=function(...u){if(Jn.set(l,++i),i===1)o=n.apply(this,u),n=void 0;else if(t.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return o};return _i(l,n),Jn.set(l,i),l};Fa.callCount=n=>{if(!Jn.has(n))throw new Error(`The given function \`${n.name}\` is not wrapped by the \`onetime\` package`);return Jn.get(n)};var $a=Fa;var qt=[];qt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&qt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&qt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Qn=n=>!!n&&typeof n=="object"&&typeof n.removeListener=="function"&&typeof n.emit=="function"&&typeof n.reallyExit=="function"&&typeof n.listeners=="function"&&typeof n.kill=="function"&&typeof n.pid=="number"&&typeof n.on=="function",wi=Symbol.for("signal-exit emitter"),Si=globalThis,wf=Object.defineProperty.bind(Object),Ei=class{constructor(){Mt(this,"emitted",{afterExit:!1,exit:!1});Mt(this,"listeners",{afterExit:[],exit:[]});Mt(this,"count",0);Mt(this,"id",Math.random());if(Si[wi])return Si[wi];wf(Si,wi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,o){this.listeners[t].push(o)}removeListener(t,o){let i=this.listeners[t],a=i.indexOf(o);a!==-1&&(a===0&&i.length===1?i.length=0:i.splice(a,1))}emit(t,o,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let a=!1;for(let l of this.listeners[t])a=l(o,i)===!0||a;return t==="exit"&&(a=this.emit("afterExit",o,i)||a),a}},Zn=class{},Sf=n=>({onExit(t,o){return n.onExit(t,o)},load(){return n.load()},unload(){return n.unload()}}),Ri=class extends Zn{onExit(){return()=>{}}load(){}unload(){}},eo,ve,le,br,_r,zt,Rt,wr,Ua,Wa,Ti=class extends Zn{constructor(o){super();q(this,wr);q(this,eo,Ci.platform==="win32"?"SIGINT":"SIGHUP");q(this,ve,new Ei);q(this,le);q(this,br);q(this,_r);q(this,zt,{});q(this,Rt,!1);L(this,le,o),L(this,zt,{});for(let i of qt)g(this,zt)[i]=()=>{let a=g(this,le).listeners(i),{count:l}=g(this,ve),u=o;if(typeof u.__signal_exit_emitter__=="object"&&typeof u.__signal_exit_emitter__.count=="number"&&(l+=u.__signal_exit_emitter__.count),a.length===l){this.unload();let p=g(this,ve).emit("exit",null,i),m=i==="SIGHUP"?g(this,eo):i;p||o.kill(o.pid,m)}};L(this,_r,o.reallyExit),L(this,br,o.emit)}onExit(o,i){if(!Qn(g(this,le)))return()=>{};g(this,Rt)===!1&&this.load();let a=i?.alwaysLast?"afterExit":"exit";return g(this,ve).on(a,o),()=>{g(this,ve).removeListener(a,o),g(this,ve).listeners.exit.length===0&&g(this,ve).listeners.afterExit.length===0&&this.unload()}}load(){if(!g(this,Rt)){L(this,Rt,!0),g(this,ve).count+=1;for(let o of qt)try{let i=g(this,zt)[o];i&&g(this,le).on(o,i)}catch{}g(this,le).emit=(o,...i)=>V(this,wr,Wa).call(this,o,...i),g(this,le).reallyExit=o=>V(this,wr,Ua).call(this,o)}}unload(){g(this,Rt)&&(L(this,Rt,!1),qt.forEach(o=>{let i=g(this,zt)[o];if(!i)throw new Error("Listener not defined for signal: "+o);try{g(this,le).removeListener(o,i)}catch{}}),g(this,le).emit=g(this,br),g(this,le).reallyExit=g(this,_r),g(this,ve).count-=1)}};eo=new WeakMap,ve=new WeakMap,le=new WeakMap,br=new WeakMap,_r=new WeakMap,zt=new WeakMap,Rt=new WeakMap,wr=new WeakSet,Ua=function(o){return Qn(g(this,le))?(g(this,le).exitCode=o||0,g(this,ve).emit("exit",g(this,le).exitCode,null),g(this,_r).call(g(this,le),g(this,le).exitCode)):0},Wa=function(o,...i){let a=g(this,br);if(o==="exit"&&Qn(g(this,le))){typeof i[0]=="number"&&(g(this,le).exitCode=i[0]);let l=a.call(g(this,le),o,...i);return g(this,ve).emit("exit",g(this,le).exitCode,null),l}else return a.call(g(this,le),o,...i)};var Ci=globalThis.process,{onExit:Ma,load:hh,unload:ph}=Sf(Qn(Ci)?new Ti(Ci):new Ri);var qa=Xr.default.stderr.isTTY?Xr.default.stderr:Xr.default.stdout.isTTY?Xr.default.stdout:void 0,Ef=qa?$a(()=>{Ma(()=>{qa.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},za=Ef;var to=!1,Sr={};Sr.show=(n=xi.default.stderr)=>{n.isTTY&&(to=!1,n.write("\x1B[?25h"))};Sr.hide=(n=xi.default.stderr)=>{n.isTTY&&(za(),to=!0,n.write("\x1B[?25l"))};Sr.toggle=(n,t)=>{n!==void 0&&(to=n),to?Sr.show(t):Sr.hide(t)};var vi=Sr;var Pi={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var Jr=Pi,Th=Object.keys(Pi);var Ht={};xa(Ht,{error:()=>Pf,info:()=>Cf,success:()=>xf,warning:()=>vf});var Ha=J(require("tty"),1),Tf=Ha.default?.WriteStream?.prototype?.hasColors?.()??!1,z=(n,t)=>{if(!Tf)return a=>a;let o=`\x1B[${n}m`,i=`\x1B[${t}m`;return a=>{let l=a+"",u=l.indexOf(i);if(u===-1)return o+l+i;let p=o,m=0,h=(t===22?i:"")+o;for(;u!==-1;)p+=l.slice(m,u)+h,m=u+i.length,u=l.indexOf(i,m);return p+=l.slice(m)+i,p}},xh=z(0,0),vh=z(1,22),Ph=z(2,22),Ah=z(3,23),Ih=z(4,24),Oh=z(53,55),Dh=z(7,27),Nh=z(8,28),Lh=z(9,29),kh=z(30,39),Ga=z(31,39),Ka=z(32,39),Va=z(33,39),Ya=z(34,39),Bh=z(35,39),jh=z(36,39),Fh=z(37,39),$h=z(90,39),Uh=z(40,49),Wh=z(41,49),Mh=z(42,49),qh=z(43,49),zh=z(44,49),Hh=z(45,49),Gh=z(46,49),Kh=z(47,49),Vh=z(100,49),Yh=z(91,39),Xh=z(92,39),Jh=z(93,39),Qh=z(94,39),Zh=z(95,39),ep=z(96,39),tp=z(97,39),rp=z(101,49),np=z(102,49),op=z(103,49),ip=z(104,49),sp=z(105,49),ap=z(106,49),lp=z(107,49);var Ai=J(require("process"),1);function Qr(){let{env:n}=Ai.default,{TERM:t,TERM_PROGRAM:o}=n;return Ai.default.platform!=="win32"?t!=="linux":!!n.WT_SESSION||!!n.TERMINUS_SUBLIME||n.ConEmuTask==="{cmd::Cmder}"||o==="Terminus-Sublime"||o==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||n.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ro=Qr(),Cf=Ya(ro?"\u2139":"i"),xf=Ka(ro?"\u2714":"\u221A"),vf=Va(ro?"\u26A0":"\u203C"),Pf=Ga(ro?"\u2716":"\xD7");function Ii({onlyFirst:n=!1}={}){let a="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(a,n?void 0:"g")}var Af=Ii();function Oi(n){if(typeof n!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof n}\``);return!n.includes("\x1B")&&!n.includes("\x9B")?n:n.replace(Af,"")}var no=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],oo=[12288,12288,65281,65376,65504,65510],Di=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Ni=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],Zr=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var io=(n,t)=>{let o=0,i=Math.floor(n.length/2)-1;for(;o<=i;){let a=Math.floor((o+i)/2),l=a*2;if(t<n[l])i=a-1;else if(t>n[l+1])o=a+1;else return!0}return!1};var If=no[0],Of=no.at(-1),Df=oo[0],Nf=oo.at(-1),Sp=Di[0],Ep=Di.at(-1),Rp=Ni[0],Tp=Ni.at(-1),Lf=Zr[0],kf=Zr.at(-1),Xa=19968,[Bf,jf]=Ff(Zr);function Ff(n){let t=n[0],o=n[1];for(let i=0;i<n.length;i+=2){let a=n[i],l=n[i+1];if(Xa>=a&&Xa<=l)return[a,l];l-a>o-t&&(t=a,o=l)}return[t,o]}var Ja=n=>n<If||n>Of?!1:io(no,n),Qa=n=>n<Df||n>Nf?!1:io(oo,n);var Za=n=>n>=Bf&&n<=jf?!0:n<Lf||n>kf?!1:io(Zr,n);function $f(n){if(!Number.isSafeInteger(n))throw new TypeError(`Expected a code point, got \`${typeof n}\`.`)}function Li(n,{ambiguousAsWide:t=!1}={}){return $f(n),Qa(n)||Za(n)||t&&Ja(n)?2:1}var Uf=new Intl.Segmenter,Wf=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),Mf=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),qf=new RegExp("^\\p{RGI_Emoji}$","v"),zf=/^[\d#*]\u20E3$/,Hf=/\p{Extended_Pictographic}/gu;function Gf(n){if(n.length>50)return!1;if(zf.test(n))return!0;if(n.includes("\u200D")){let t=n.match(Hf);return t!==null&&t.length>=2}return!1}function Kf(n){return n.replace(Mf,"")}function Vf(n){return Wf.test(n)}function Yf(n,t){let o=0;if(n.length>1)for(let i of n.slice(1))i>="\uFF00"&&i<="\uFFEF"&&(o+=Li(i.codePointAt(0),t));return o}function ki(n,t={}){if(typeof n!="string"||n.length===0)return 0;let{ambiguousIsNarrow:o=!0,countAnsiEscapeCodes:i=!1}=t,a=n;if(!i&&(a.includes("\x1B")||a.includes("\x9B"))&&(a=Oi(a)),a.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(a))return a.length;let l=0,u={ambiguousAsWide:!o};for(let{segment:p}of Uf.segment(a)){if(Vf(p))continue;if(qf.test(p)||Gf(p)){l+=2;continue}let m=Kf(p).codePointAt(0);l+=Li(m,u),l+=Yf(p,u)}return l}function Bi({stream:n=process.stdout}={}){return!!(n&&n.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var en=J(require("process"),1);var Xf=3,Gt,Tt,Kt,Er,tn,Rr,el,tl,ji=class{constructor(){q(this,Rr);q(this,Gt,0);q(this,Tt);q(this,Kt,!1);q(this,Er,!1);q(this,tn,t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===Xf&&en.default.kill(en.default.pid,"SIGINT")})}start(){pi(this,Gt)._++,g(this,Gt)===1&&V(this,Rr,el).call(this)}stop(){g(this,Gt)!==0&&--pi(this,Gt)._===0&&V(this,Rr,tl).call(this)}};Gt=new WeakMap,Tt=new WeakMap,Kt=new WeakMap,Er=new WeakMap,tn=new WeakMap,Rr=new WeakSet,el=function(){let{stdin:t}=en.default;if(en.default.platform==="win32"||!t?.isTTY||typeof t.setRawMode!="function"){L(this,Tt,void 0);return}L(this,Tt,t),L(this,Kt,t.isPaused()),L(this,Er,!!t.isRaw),t.setRawMode(!0),t.prependListener("data",g(this,tn)),g(this,Kt)&&t.resume()},tl=function(){if(!g(this,Tt))return;let t=g(this,Tt);t.off("data",g(this,tn)),t.isTTY&&t.setRawMode?.(g(this,Er)),g(this,Kt)&&t.pause(),L(this,Tt,void 0),L(this,Kt,!1),L(this,Er,!1)};var Jf=new ji,Fi=Object.freeze(Jf);var Qf=200,Zf="\x1B[?2026h",ed="\x1B[?2026l",so=new Map,Ct,Xe,Cr,j,ze,ne,Yt,xt,xr,Je,Pe,vr,W,Vt,Ui,nl,ol,il,Wi,Mi,qi,zi,Hi,ao,sl,al,ll,cl,$i=class{constructor(t){q(this,W);q(this,Ct,0);q(this,Xe,-1);q(this,Cr,0);q(this,j);q(this,ze);q(this,ne);q(this,Yt);q(this,xt,new Map);q(this,xr,!1);q(this,Je);q(this,Pe);q(this,vr,!1);Mt(this,"color");typeof t=="string"&&(t={text:t}),L(this,j,{color:"cyan",stream:Tr.default.stderr,discardStdin:!0,hideCursor:!0,...t}),this.color=g(this,j).color,L(this,ne,g(this,j).stream),typeof g(this,j).isEnabled!="boolean"&&(g(this,j).isEnabled=Bi({stream:g(this,ne)})),typeof g(this,j).isSilent!="boolean"&&(g(this,j).isSilent=!1);let o=g(this,j).interval;this.spinner=g(this,j).spinner,g(this,j).interval=o,this.text=g(this,j).text,this.prefixText=g(this,j).prefixText,this.suffixText=g(this,j).suffixText,this.indent=g(this,j).indent,Tr.default.env.NODE_ENV==="test"&&(this._stream=g(this,ne),this._isEnabled=g(this,j).isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return g(this,Ct)},set(i){L(this,Ct,i)}}),Object.defineProperty(this,"_frameIndex",{get(){return g(this,Xe)}}),Object.defineProperty(this,"_lineCount",{get(){let i=g(this,ne).columns??80,a=typeof g(this,j).prefixText=="function"?"":g(this,j).prefixText,l=typeof g(this,j).suffixText=="function"?"":g(this,j).suffixText,u=typeof a=="string"&&a!==""?a+" ":"",p=typeof l=="string"&&l!==""?" "+l:"",d=" ".repeat(g(this,j).indent)+u+"-"+(typeof g(this,j).text=="string"?" "+g(this,j).text:"")+p;return V(this,W,ao).call(this,d,i)}}))}get indent(){return g(this,j).indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");g(this,j).indent=t}get interval(){return g(this,j).interval??g(this,ze).interval??100}get spinner(){return g(this,ze)}set spinner(t){if(L(this,Xe,-1),g(this,j).interval=void 0,typeof t=="object"){if(!Array.isArray(t.frames)||t.frames.length===0||t.frames.some(o=>typeof o!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(t.interval!==void 0&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");L(this,ze,t)}else if(!Qr())L(this,ze,Jr.line);else if(t===void 0)L(this,ze,Jr.dots);else if(t!=="default"&&Jr[t])L(this,ze,Jr[t]);else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return g(this,j).text}set text(t=""){g(this,j).text=t}get prefixText(){return g(this,j).prefixText}set prefixText(t=""){g(this,j).prefixText=t}get suffixText(){return g(this,j).suffixText}set suffixText(t=""){g(this,j).suffixText=t}get isSpinning(){return g(this,Yt)!==void 0}get isEnabled(){return g(this,j).isEnabled&&!g(this,j).isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");g(this,j).isEnabled=t}get isSilent(){return g(this,j).isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");g(this,j).isSilent=t}frame(){let t=Date.now();(g(this,Xe)===-1||t-g(this,Cr)>=this.interval)&&(L(this,Xe,(g(this,Xe)+1)%g(this,ze).frames.length),L(this,Cr,t));let{frames:o}=g(this,ze),i=o[g(this,Xe)];this.color&&(i=E[this.color](i));let a=V(this,W,zi).call(this,g(this,j).prefixText," "),l=typeof this.text=="string"?" "+this.text:"",u=V(this,W,Hi).call(this,g(this,j).suffixText," ");return a+i+l+u}clear(){return!this.isEnabled||!g(this,ne).isTTY?this:(V(this,W,Vt).call(this,()=>{g(this,ne).cursorTo(0);for(let t=0;t<g(this,Ct);t++)t>0&&g(this,ne).moveCursor(0,-1),g(this,ne).clearLine(1);g(this,j).indent&&g(this,ne).cursorTo(g(this,j).indent)}),L(this,Ct,0),this)}render(){if(!this.isEnabled||g(this,Je)||g(this,Pe))return this;let t=g(this,ne).isTTY,o=!1;try{t&&(V(this,W,Vt).call(this,()=>g(this,ne).write(Zf)),o=!0),this.clear();let i=this.frame(),a=g(this,ne).columns??80,l=V(this,W,ao).call(this,i,a),u=g(this,ne).rows;if(u&&u>1&&l>u){let m=i.split(`
|
|
17
|
+
`);return l!==-1&&(t=La(t,a,i,l)),i+t+a};Object.defineProperties(Yr.prototype,yr);var df=Yr(),sh=Yr({level:Ba?Ba.level:0});var S=df;var Tr=J(require("process"),1),rl=require("util");var xi=J(require("process"),1);var Xr=J(require("process"),1);var hf=(n,t,o,i)=>{if(o==="length"||o==="prototype"||o==="arguments"||o==="caller")return;let a=Object.getOwnPropertyDescriptor(n,o),l=Object.getOwnPropertyDescriptor(t,o);!pf(a,l)&&i||Object.defineProperty(n,o,l)},pf=function(n,t){return n===void 0||n.configurable||n.writable===t.writable&&n.enumerable===t.enumerable&&n.configurable===t.configurable&&(n.writable||n.value===t.value)},mf=(n,t)=>{let o=Object.getPrototypeOf(t);o!==Object.getPrototypeOf(n)&&Object.setPrototypeOf(n,o)},gf=(n,t)=>`/* Wrapped ${n}*/
|
|
18
|
+
${t}`,yf=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),bf=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_f=(n,t,o)=>{let i=o===""?"":`with ${o.trim()}() `,a=gf.bind(null,i,t.toString());Object.defineProperty(a,"name",bf);let{writable:l,enumerable:u,configurable:p}=yf;Object.defineProperty(n,"toString",{value:a,writable:l,enumerable:u,configurable:p})};function _i(n,t,{ignoreNonConfigurable:o=!1}={}){let{name:i}=n;for(let a of Reflect.ownKeys(t))hf(n,t,a,o);return mf(n,t),_f(n,t,i),n}var Jn=new WeakMap,Fa=(n,t={})=>{if(typeof n!="function")throw new TypeError("Expected a function");let o,i=0,a=n.displayName||n.name||"<anonymous>",l=function(...u){if(Jn.set(l,++i),i===1)o=n.apply(this,u),n=void 0;else if(t.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return o};return _i(l,n),Jn.set(l,i),l};Fa.callCount=n=>{if(!Jn.has(n))throw new Error(`The given function \`${n.name}\` is not wrapped by the \`onetime\` package`);return Jn.get(n)};var $a=Fa;var qt=[];qt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&qt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&qt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Qn=n=>!!n&&typeof n=="object"&&typeof n.removeListener=="function"&&typeof n.emit=="function"&&typeof n.reallyExit=="function"&&typeof n.listeners=="function"&&typeof n.kill=="function"&&typeof n.pid=="number"&&typeof n.on=="function",wi=Symbol.for("signal-exit emitter"),Si=globalThis,wf=Object.defineProperty.bind(Object),Ei=class{constructor(){Mt(this,"emitted",{afterExit:!1,exit:!1});Mt(this,"listeners",{afterExit:[],exit:[]});Mt(this,"count",0);Mt(this,"id",Math.random());if(Si[wi])return Si[wi];wf(Si,wi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,o){this.listeners[t].push(o)}removeListener(t,o){let i=this.listeners[t],a=i.indexOf(o);a!==-1&&(a===0&&i.length===1?i.length=0:i.splice(a,1))}emit(t,o,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let a=!1;for(let l of this.listeners[t])a=l(o,i)===!0||a;return t==="exit"&&(a=this.emit("afterExit",o,i)||a),a}},Zn=class{},Sf=n=>({onExit(t,o){return n.onExit(t,o)},load(){return n.load()},unload(){return n.unload()}}),Ri=class extends Zn{onExit(){return()=>{}}load(){}unload(){}},eo,ve,le,br,_r,zt,Rt,wr,Ua,Wa,Ti=class extends Zn{constructor(o){super();q(this,wr);q(this,eo,Ci.platform==="win32"?"SIGINT":"SIGHUP");q(this,ve,new Ei);q(this,le);q(this,br);q(this,_r);q(this,zt,{});q(this,Rt,!1);L(this,le,o),L(this,zt,{});for(let i of qt)g(this,zt)[i]=()=>{let a=g(this,le).listeners(i),{count:l}=g(this,ve),u=o;if(typeof u.__signal_exit_emitter__=="object"&&typeof u.__signal_exit_emitter__.count=="number"&&(l+=u.__signal_exit_emitter__.count),a.length===l){this.unload();let p=g(this,ve).emit("exit",null,i),m=i==="SIGHUP"?g(this,eo):i;p||o.kill(o.pid,m)}};L(this,_r,o.reallyExit),L(this,br,o.emit)}onExit(o,i){if(!Qn(g(this,le)))return()=>{};g(this,Rt)===!1&&this.load();let a=i?.alwaysLast?"afterExit":"exit";return g(this,ve).on(a,o),()=>{g(this,ve).removeListener(a,o),g(this,ve).listeners.exit.length===0&&g(this,ve).listeners.afterExit.length===0&&this.unload()}}load(){if(!g(this,Rt)){L(this,Rt,!0),g(this,ve).count+=1;for(let o of qt)try{let i=g(this,zt)[o];i&&g(this,le).on(o,i)}catch{}g(this,le).emit=(o,...i)=>V(this,wr,Wa).call(this,o,...i),g(this,le).reallyExit=o=>V(this,wr,Ua).call(this,o)}}unload(){g(this,Rt)&&(L(this,Rt,!1),qt.forEach(o=>{let i=g(this,zt)[o];if(!i)throw new Error("Listener not defined for signal: "+o);try{g(this,le).removeListener(o,i)}catch{}}),g(this,le).emit=g(this,br),g(this,le).reallyExit=g(this,_r),g(this,ve).count-=1)}};eo=new WeakMap,ve=new WeakMap,le=new WeakMap,br=new WeakMap,_r=new WeakMap,zt=new WeakMap,Rt=new WeakMap,wr=new WeakSet,Ua=function(o){return Qn(g(this,le))?(g(this,le).exitCode=o||0,g(this,ve).emit("exit",g(this,le).exitCode,null),g(this,_r).call(g(this,le),g(this,le).exitCode)):0},Wa=function(o,...i){let a=g(this,br);if(o==="exit"&&Qn(g(this,le))){typeof i[0]=="number"&&(g(this,le).exitCode=i[0]);let l=a.call(g(this,le),o,...i);return g(this,ve).emit("exit",g(this,le).exitCode,null),l}else return a.call(g(this,le),o,...i)};var Ci=globalThis.process,{onExit:Ma,load:hh,unload:ph}=Sf(Qn(Ci)?new Ti(Ci):new Ri);var qa=Xr.default.stderr.isTTY?Xr.default.stderr:Xr.default.stdout.isTTY?Xr.default.stdout:void 0,Ef=qa?$a(()=>{Ma(()=>{qa.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},za=Ef;var to=!1,Sr={};Sr.show=(n=xi.default.stderr)=>{n.isTTY&&(to=!1,n.write("\x1B[?25h"))};Sr.hide=(n=xi.default.stderr)=>{n.isTTY&&(za(),to=!0,n.write("\x1B[?25l"))};Sr.toggle=(n,t)=>{n!==void 0&&(to=n),to?Sr.show(t):Sr.hide(t)};var vi=Sr;var Pi={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var Jr=Pi,Th=Object.keys(Pi);var Ht={};xa(Ht,{error:()=>Pf,info:()=>Cf,success:()=>xf,warning:()=>vf});var Ha=J(require("tty"),1),Tf=Ha.default?.WriteStream?.prototype?.hasColors?.()??!1,z=(n,t)=>{if(!Tf)return a=>a;let o=`\x1B[${n}m`,i=`\x1B[${t}m`;return a=>{let l=a+"",u=l.indexOf(i);if(u===-1)return o+l+i;let p=o,m=0,h=(t===22?i:"")+o;for(;u!==-1;)p+=l.slice(m,u)+h,m=u+i.length,u=l.indexOf(i,m);return p+=l.slice(m)+i,p}},xh=z(0,0),vh=z(1,22),Ph=z(2,22),Ah=z(3,23),Ih=z(4,24),Oh=z(53,55),Dh=z(7,27),Nh=z(8,28),Lh=z(9,29),kh=z(30,39),Ga=z(31,39),Ka=z(32,39),Va=z(33,39),Ya=z(34,39),Bh=z(35,39),jh=z(36,39),Fh=z(37,39),$h=z(90,39),Uh=z(40,49),Wh=z(41,49),Mh=z(42,49),qh=z(43,49),zh=z(44,49),Hh=z(45,49),Gh=z(46,49),Kh=z(47,49),Vh=z(100,49),Yh=z(91,39),Xh=z(92,39),Jh=z(93,39),Qh=z(94,39),Zh=z(95,39),ep=z(96,39),tp=z(97,39),rp=z(101,49),np=z(102,49),op=z(103,49),ip=z(104,49),sp=z(105,49),ap=z(106,49),lp=z(107,49);var Ai=J(require("process"),1);function Qr(){let{env:n}=Ai.default,{TERM:t,TERM_PROGRAM:o}=n;return Ai.default.platform!=="win32"?t!=="linux":!!n.WT_SESSION||!!n.TERMINUS_SUBLIME||n.ConEmuTask==="{cmd::Cmder}"||o==="Terminus-Sublime"||o==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||n.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ro=Qr(),Cf=Ya(ro?"\u2139":"i"),xf=Ka(ro?"\u2714":"\u221A"),vf=Va(ro?"\u26A0":"\u203C"),Pf=Ga(ro?"\u2716":"\xD7");function Ii({onlyFirst:n=!1}={}){let a="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(a,n?void 0:"g")}var Af=Ii();function Oi(n){if(typeof n!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof n}\``);return!n.includes("\x1B")&&!n.includes("\x9B")?n:n.replace(Af,"")}var no=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],oo=[12288,12288,65281,65376,65504,65510],Di=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Ni=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],Zr=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var io=(n,t)=>{let o=0,i=Math.floor(n.length/2)-1;for(;o<=i;){let a=Math.floor((o+i)/2),l=a*2;if(t<n[l])i=a-1;else if(t>n[l+1])o=a+1;else return!0}return!1};var If=no[0],Of=no.at(-1),Df=oo[0],Nf=oo.at(-1),Sp=Di[0],Ep=Di.at(-1),Rp=Ni[0],Tp=Ni.at(-1),Lf=Zr[0],kf=Zr.at(-1),Xa=19968,[Bf,jf]=Ff(Zr);function Ff(n){let t=n[0],o=n[1];for(let i=0;i<n.length;i+=2){let a=n[i],l=n[i+1];if(Xa>=a&&Xa<=l)return[a,l];l-a>o-t&&(t=a,o=l)}return[t,o]}var Ja=n=>n<If||n>Of?!1:io(no,n),Qa=n=>n<Df||n>Nf?!1:io(oo,n);var Za=n=>n>=Bf&&n<=jf?!0:n<Lf||n>kf?!1:io(Zr,n);function $f(n){if(!Number.isSafeInteger(n))throw new TypeError(`Expected a code point, got \`${typeof n}\`.`)}function Li(n,{ambiguousAsWide:t=!1}={}){return $f(n),Qa(n)||Za(n)||t&&Ja(n)?2:1}var Uf=new Intl.Segmenter,Wf=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),Mf=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),qf=new RegExp("^\\p{RGI_Emoji}$","v"),zf=/^[\d#*]\u20E3$/,Hf=/\p{Extended_Pictographic}/gu;function Gf(n){if(n.length>50)return!1;if(zf.test(n))return!0;if(n.includes("\u200D")){let t=n.match(Hf);return t!==null&&t.length>=2}return!1}function Kf(n){return n.replace(Mf,"")}function Vf(n){return Wf.test(n)}function Yf(n,t){let o=0;if(n.length>1)for(let i of n.slice(1))i>="\uFF00"&&i<="\uFFEF"&&(o+=Li(i.codePointAt(0),t));return o}function ki(n,t={}){if(typeof n!="string"||n.length===0)return 0;let{ambiguousIsNarrow:o=!0,countAnsiEscapeCodes:i=!1}=t,a=n;if(!i&&(a.includes("\x1B")||a.includes("\x9B"))&&(a=Oi(a)),a.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(a))return a.length;let l=0,u={ambiguousAsWide:!o};for(let{segment:p}of Uf.segment(a)){if(Vf(p))continue;if(qf.test(p)||Gf(p)){l+=2;continue}let m=Kf(p).codePointAt(0);l+=Li(m,u),l+=Yf(p,u)}return l}function Bi({stream:n=process.stdout}={}){return!!(n&&n.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var en=J(require("process"),1);var Xf=3,Gt,Tt,Kt,Er,tn,Rr,el,tl,ji=class{constructor(){q(this,Rr);q(this,Gt,0);q(this,Tt);q(this,Kt,!1);q(this,Er,!1);q(this,tn,t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===Xf&&en.default.kill(en.default.pid,"SIGINT")})}start(){pi(this,Gt)._++,g(this,Gt)===1&&V(this,Rr,el).call(this)}stop(){g(this,Gt)!==0&&--pi(this,Gt)._===0&&V(this,Rr,tl).call(this)}};Gt=new WeakMap,Tt=new WeakMap,Kt=new WeakMap,Er=new WeakMap,tn=new WeakMap,Rr=new WeakSet,el=function(){let{stdin:t}=en.default;if(en.default.platform==="win32"||!t?.isTTY||typeof t.setRawMode!="function"){L(this,Tt,void 0);return}L(this,Tt,t),L(this,Kt,t.isPaused()),L(this,Er,!!t.isRaw),t.setRawMode(!0),t.prependListener("data",g(this,tn)),g(this,Kt)&&t.resume()},tl=function(){if(!g(this,Tt))return;let t=g(this,Tt);t.off("data",g(this,tn)),t.isTTY&&t.setRawMode?.(g(this,Er)),g(this,Kt)&&t.pause(),L(this,Tt,void 0),L(this,Kt,!1),L(this,Er,!1)};var Jf=new ji,Fi=Object.freeze(Jf);var Qf=200,Zf="\x1B[?2026h",ed="\x1B[?2026l",so=new Map,Ct,Xe,Cr,B,ze,ne,Yt,xt,xr,Je,Pe,vr,W,Vt,Ui,nl,ol,il,Wi,Mi,qi,zi,Hi,ao,sl,al,ll,cl,$i=class{constructor(t){q(this,W);q(this,Ct,0);q(this,Xe,-1);q(this,Cr,0);q(this,B);q(this,ze);q(this,ne);q(this,Yt);q(this,xt,new Map);q(this,xr,!1);q(this,Je);q(this,Pe);q(this,vr,!1);Mt(this,"color");typeof t=="string"&&(t={text:t}),L(this,B,{color:"cyan",stream:Tr.default.stderr,discardStdin:!0,hideCursor:!0,...t}),this.color=g(this,B).color,L(this,ne,g(this,B).stream),typeof g(this,B).isEnabled!="boolean"&&(g(this,B).isEnabled=Bi({stream:g(this,ne)})),typeof g(this,B).isSilent!="boolean"&&(g(this,B).isSilent=!1);let o=g(this,B).interval;this.spinner=g(this,B).spinner,g(this,B).interval=o,this.text=g(this,B).text,this.prefixText=g(this,B).prefixText,this.suffixText=g(this,B).suffixText,this.indent=g(this,B).indent,Tr.default.env.NODE_ENV==="test"&&(this._stream=g(this,ne),this._isEnabled=g(this,B).isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return g(this,Ct)},set(i){L(this,Ct,i)}}),Object.defineProperty(this,"_frameIndex",{get(){return g(this,Xe)}}),Object.defineProperty(this,"_lineCount",{get(){let i=g(this,ne).columns??80,a=typeof g(this,B).prefixText=="function"?"":g(this,B).prefixText,l=typeof g(this,B).suffixText=="function"?"":g(this,B).suffixText,u=typeof a=="string"&&a!==""?a+" ":"",p=typeof l=="string"&&l!==""?" "+l:"",d=" ".repeat(g(this,B).indent)+u+"-"+(typeof g(this,B).text=="string"?" "+g(this,B).text:"")+p;return V(this,W,ao).call(this,d,i)}}))}get indent(){return g(this,B).indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");g(this,B).indent=t}get interval(){return g(this,B).interval??g(this,ze).interval??100}get spinner(){return g(this,ze)}set spinner(t){if(L(this,Xe,-1),g(this,B).interval=void 0,typeof t=="object"){if(!Array.isArray(t.frames)||t.frames.length===0||t.frames.some(o=>typeof o!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(t.interval!==void 0&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");L(this,ze,t)}else if(!Qr())L(this,ze,Jr.line);else if(t===void 0)L(this,ze,Jr.dots);else if(t!=="default"&&Jr[t])L(this,ze,Jr[t]);else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return g(this,B).text}set text(t=""){g(this,B).text=t}get prefixText(){return g(this,B).prefixText}set prefixText(t=""){g(this,B).prefixText=t}get suffixText(){return g(this,B).suffixText}set suffixText(t=""){g(this,B).suffixText=t}get isSpinning(){return g(this,Yt)!==void 0}get isEnabled(){return g(this,B).isEnabled&&!g(this,B).isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");g(this,B).isEnabled=t}get isSilent(){return g(this,B).isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");g(this,B).isSilent=t}frame(){let t=Date.now();(g(this,Xe)===-1||t-g(this,Cr)>=this.interval)&&(L(this,Xe,(g(this,Xe)+1)%g(this,ze).frames.length),L(this,Cr,t));let{frames:o}=g(this,ze),i=o[g(this,Xe)];this.color&&(i=S[this.color](i));let a=V(this,W,zi).call(this,g(this,B).prefixText," "),l=typeof this.text=="string"?" "+this.text:"",u=V(this,W,Hi).call(this,g(this,B).suffixText," ");return a+i+l+u}clear(){return!this.isEnabled||!g(this,ne).isTTY?this:(V(this,W,Vt).call(this,()=>{g(this,ne).cursorTo(0);for(let t=0;t<g(this,Ct);t++)t>0&&g(this,ne).moveCursor(0,-1),g(this,ne).clearLine(1);g(this,B).indent&&g(this,ne).cursorTo(g(this,B).indent)}),L(this,Ct,0),this)}render(){if(!this.isEnabled||g(this,Je)||g(this,Pe))return this;let t=g(this,ne).isTTY,o=!1;try{t&&(V(this,W,Vt).call(this,()=>g(this,ne).write(Zf)),o=!0),this.clear();let i=this.frame(),a=g(this,ne).columns??80,l=V(this,W,ao).call(this,i,a),u=g(this,ne).rows;if(u&&u>1&&l>u){let m=i.split(`
|
|
19
19
|
`),d=u-1;i=[...m.slice(0,d),"... (content truncated to fit terminal)"].join(`
|
|
20
|
-
`)}V(this,W,Vt).call(this,()=>g(this,ne).write(i))===!1&&g(this,ne).isTTY&&(L(this,Je,()=>{L(this,Je,void 0),V(this,W,Ui).call(this)}),g(this,ne).once("drain",g(this,Je))),L(this,Ct,V(this,W,ao).call(this,i,a))}finally{o&&V(this,W,Vt).call(this,()=>g(this,ne).write(ed))}return this}start(t){if(t&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let o=this.text?"-":"",i=" ".repeat(g(this,
|
|
21
|
-
`)),this}return this.isSpinning?this:(g(this,
|
|
22
|
-
`;return this.stop(),V(this,W,Vt).call(this,()=>g(this,ne).write(u)),this}};Ct=new WeakMap,Xe=new WeakMap,Cr=new WeakMap,
|
|
23
|
-
`||o==="\r"},il=function(){g(this,Pe)||(L(this,Pe,setTimeout(()=>{L(this,Pe,void 0),this.isSpinning&&V(this,W,Ui).call(this)},Qf)),typeof g(this,Pe)?.unref=="function"&&g(this,Pe).unref())},Wi=function(){g(this,Pe)&&(clearTimeout(g(this,Pe)),L(this,Pe,void 0))},Mi=function(t,o,i,a){let l=V(this,W,zi).call(this,i," "),p=typeof o=="string"?(t?" ":"")+o:"",m=V(this,W,Hi).call(this,a," ");return l+t+p+m},qi=function(t,o,i=!1){let a=typeof t=="function"?t():t;return typeof a=="string"&&a!==""?i?o+a:a+o:""},zi=function(t=g(this,
|
|
24
|
-
`))i+=Math.max(1,Math.ceil(ki(a)/o));return i},sl=function(t){if(!t||g(this,xt).has(t)||!t.isTTY||typeof t.write!="function")return;so.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let o=t.write;g(this,xt).set(t,o),so.set(t,this),t.write=(i,a,l)=>V(this,W,cl).call(this,t,o,i,a,l)},al=function(){if(!this.isEnabled||g(this,xt).size>0)return;let t=new Set([g(this,ne),Tr.default.stdout,Tr.default.stderr]);for(let o of t)V(this,W,sl).call(this,o)},ll=function(){for(let[t,o]of g(this,xt))t.write=o,so.get(t)===this&&so.delete(t);g(this,xt).clear()},cl=function(t,o,i,a,l){if(typeof a=="function"&&(l=a,a=void 0),g(this,xr))return o.call(t,i,a,l);this.clear();let u=V(this,W,nl).call(this,i,a),p=V(this,W,ol).call(this,u),m=o.call(t,i,a,l);return p?V(this,W,Wi).call(this):u.length>0&&V(this,W,il).call(this),this.isSpinning&&!g(this,Pe)&&this.render(),m};function Z(n){return new $i(n)}var w=J(require("fs-extra"),1),S=J(require("path"),1),ts=J(require("dotenv"),1),rs=J(require("figlet"),1),ns=J(require("cli-table3"),1),os=J(require("gradient-string"),1),is=J(require("inquirer"),1);var ql=J(require("http"),1),zl=J(require("https"),1),tr=J(require("zlib"),1),Oe=J(require("stream"),1),dn=require("buffer");function td(n){if(!/^data:/i.test(n))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');n=n.replace(/\r?\n/g,"");let t=n.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");let o=n.substring(5,t).split(";"),i="",a=!1,l=o[0]||"text/plain",u=l;for(let h=1;h<o.length;h++)o[h]==="base64"?a=!0:o[h]&&(u+=`;${o[h]}`,o[h].indexOf("charset=")===0&&(i=o[h].substring(8)));!o[0]&&!i.length&&(u+=";charset=US-ASCII",i="US-ASCII");let p=a?"base64":"ascii",m=unescape(n.substring(t+1)),d=Buffer.from(m,p);return d.type=l,d.typeFull=u,d.charset=i,d}var ul=td;var je=J(require("stream"),1),ft=require("util"),Ae=require("buffer");nn();uo();var ut=class extends Error{constructor(t,o){super(t),Error.captureStackTrace(this,this.constructor),this.type=o}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var Se=class extends ut{constructor(t,o,i){super(t,o),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var fo=Symbol.toStringTag,Yi=n=>typeof n=="object"&&typeof n.append=="function"&&typeof n.delete=="function"&&typeof n.get=="function"&&typeof n.getAll=="function"&&typeof n.has=="function"&&typeof n.set=="function"&&typeof n.sort=="function"&&n[fo]==="URLSearchParams",ln=n=>n&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&typeof n.constructor=="function"&&/^(Blob|File)$/.test(n[fo]),Sl=n=>typeof n=="object"&&(n[fo]==="AbortSignal"||n[fo]==="EventTarget"),El=(n,t)=>{let o=new URL(t).hostname,i=new URL(n).hostname;return o===i||o.endsWith(`.${i}`)},Rl=(n,t)=>{let o=new URL(t).protocol,i=new URL(n).protocol;return o===i};var yd=(0,ft.promisify)(je.default.pipeline),Ee=Symbol("Body internals"),Ze=class{constructor(t,{size:o=0}={}){let i=null;t===null?t=null:Yi(t)?t=Ae.Buffer.from(t.toString()):ln(t)||Ae.Buffer.isBuffer(t)||(ft.types.isAnyArrayBuffer(t)?t=Ae.Buffer.from(t):ArrayBuffer.isView(t)?t=Ae.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof je.default||(t instanceof Qt?(t=wl(t),i=t.type.split("=")[1]):t=Ae.Buffer.from(String(t))));let a=t;Ae.Buffer.isBuffer(t)?a=je.default.Readable.from(t):ln(t)&&(a=je.default.Readable.from(t.stream())),this[Ee]={body:t,stream:a,boundary:i,disturbed:!1,error:null},this.size=o,t instanceof je.default&&t.on("error",l=>{let u=l instanceof ut?l:new Se(`Invalid response body while trying to fetch ${this.url}: ${l.message}`,"system",l);this[Ee].error=u})}get body(){return this[Ee].stream}get bodyUsed(){return this[Ee].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:o,byteLength:i}=await Qi(this);return t.slice(o,o+i)}async formData(){let t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){let i=new Qt,a=new URLSearchParams(await this.text());for(let[l,u]of a)i.append(l,u);return i}let{toFormData:o}=await Promise.resolve().then(()=>(Pl(),vl));return o(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[Ee].body&&this[Ee].body.type||"",o=await this.arrayBuffer();return new ct([o],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await Qi(this);return new TextDecoder().decode(t)}buffer(){return Qi(this)}};Ze.prototype.buffer=(0,ft.deprecate)(Ze.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Ze.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,ft.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Qi(n){if(n[Ee].disturbed)throw new TypeError(`body used already for: ${n.url}`);if(n[Ee].disturbed=!0,n[Ee].error)throw n[Ee].error;let{body:t}=n;if(t===null)return Ae.Buffer.alloc(0);if(!(t instanceof je.default))return Ae.Buffer.alloc(0);let o=[],i=0;try{for await(let a of t){if(n.size>0&&i+a.length>n.size){let l=new Se(`content size at ${n.url} over limit: ${n.size}`,"max-size");throw t.destroy(l),l}i+=a.length,o.push(a)}}catch(a){throw a instanceof ut?a:new Se(`Invalid response body while trying to fetch ${n.url}: ${a.message}`,"system",a)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return o.every(a=>typeof a=="string")?Ae.Buffer.from(o.join("")):Ae.Buffer.concat(o,i)}catch(a){throw new Se(`Could not create Buffer from response body for ${n.url}: ${a.message}`,"system",a)}else throw new Se(`Premature close of server response while trying to fetch ${n.url}`)}var Ir=(n,t)=>{let o,i,{body:a}=n[Ee];if(n.bodyUsed)throw new Error("cannot clone body after it is used");return a instanceof je.default&&typeof a.getBoundary!="function"&&(o=new je.PassThrough({highWaterMark:t}),i=new je.PassThrough({highWaterMark:t}),a.pipe(o),a.pipe(i),n[Ee].stream=o,a=i),a},bd=(0,ft.deprecate)(n=>n.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),go=(n,t)=>n===null?null:typeof n=="string"?"text/plain;charset=UTF-8":Yi(n)?"application/x-www-form-urlencoded;charset=UTF-8":ln(n)?n.type||null:Ae.Buffer.isBuffer(n)||ft.types.isAnyArrayBuffer(n)||ArrayBuffer.isView(n)?null:n instanceof Qt?`multipart/form-data; boundary=${t[Ee].boundary}`:n&&typeof n.getBoundary=="function"?`multipart/form-data;boundary=${bd(n)}`:n instanceof je.default?null:"text/plain;charset=UTF-8",Al=n=>{let{body:t}=n[Ee];return t===null?0:ln(t)?t.size:Ae.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},Il=async(n,{body:t})=>{t===null?n.end():await yd(t,n)};var Zi=require("util"),un=J(require("http"),1),yo=typeof un.default.validateHeaderName=="function"?un.default.validateHeaderName:n=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(n)){let t=new TypeError(`Header name must be a valid HTTP token [${n}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},es=typeof un.default.validateHeaderValue=="function"?un.default.validateHeaderValue:(n,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let o=new TypeError(`Invalid character in header content ["${n}"]`);throw Object.defineProperty(o,"code",{value:"ERR_INVALID_CHAR"}),o}},Ie=class n extends URLSearchParams{constructor(t){let o=[];if(t instanceof n){let i=t.raw();for(let[a,l]of Object.entries(i))o.push(...l.map(u=>[a,u]))}else if(t!=null)if(typeof t=="object"&&!Zi.types.isBoxedPrimitive(t)){let i=t[Symbol.iterator];if(i==null)o.push(...Object.entries(t));else{if(typeof i!="function")throw new TypeError("Header pairs must be iterable");o=[...t].map(a=>{if(typeof a!="object"||Zi.types.isBoxedPrimitive(a))throw new TypeError("Each header pair must be an iterable object");return[...a]}).map(a=>{if(a.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...a]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return o=o.length>0?o.map(([i,a])=>(yo(i),es(i,String(a)),[String(i).toLowerCase(),String(a)])):void 0,super(o),new Proxy(this,{get(i,a,l){switch(a){case"append":case"set":return(u,p)=>(yo(u),es(u,String(p)),URLSearchParams.prototype[a].call(i,String(u).toLowerCase(),String(p)));case"delete":case"has":case"getAll":return u=>(yo(u),URLSearchParams.prototype[a].call(i,String(u).toLowerCase()));case"keys":return()=>(i.sort(),new Set(URLSearchParams.prototype.keys.call(i)).keys());default:return Reflect.get(i,a,l)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){let o=this.getAll(t);if(o.length===0)return null;let i=o.join(", ");return/^content-encoding$/i.test(t)&&(i=i.toLowerCase()),i}forEach(t,o=void 0){for(let i of this.keys())Reflect.apply(t,o,[this.get(i),i,this])}*values(){for(let t of this.keys())yield this.get(t)}*entries(){for(let t of this.keys())yield[t,this.get(t)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((t,o)=>(t[o]=this.getAll(o),t),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((t,o)=>{let i=this.getAll(o);return o==="host"?t[o]=i[0]:t[o]=i.length>1?i:i[0],t},{})}};Object.defineProperties(Ie.prototype,["get","entries","forEach","values"].reduce((n,t)=>(n[t]={enumerable:!0},n),{}));function Ol(n=[]){return new Ie(n.reduce((t,o,i,a)=>(i%2===0&&t.push(a.slice(i,i+2)),t),[]).filter(([t,o])=>{try{return yo(t),es(t,String(o)),!0}catch{return!1}}))}var _d=new Set([301,302,303,307,308]),bo=n=>_d.has(n);var He=Symbol("Response internals"),Fe=class n extends Ze{constructor(t=null,o={}){super(t,o);let i=o.status!=null?o.status:200,a=new Ie(o.headers);if(t!==null&&!a.has("Content-Type")){let l=go(t,this);l&&a.append("Content-Type",l)}this[He]={type:"default",url:o.url,status:i,statusText:o.statusText||"",headers:a,counter:o.counter,highWaterMark:o.highWaterMark}}get type(){return this[He].type}get url(){return this[He].url||""}get status(){return this[He].status}get ok(){return this[He].status>=200&&this[He].status<300}get redirected(){return this[He].counter>0}get statusText(){return this[He].statusText}get headers(){return this[He].headers}get highWaterMark(){return this[He].highWaterMark}clone(){return new n(Ir(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(t,o=302){if(!bo(o))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new n(null,{headers:{location:new URL(t).toString()},status:o})}static error(){let t=new n(null,{status:0,statusText:""});return t[He].type="error",t}static json(t=void 0,o={}){let i=JSON.stringify(t);if(i===void 0)throw new TypeError("data is not JSON serializable");let a=new Ie(o&&o.headers);return a.has("content-type")||a.set("content-type","application/json"),new n(i,{...o,headers:a})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Fe.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}});var Ul=require("url"),Wl=require("util");var Dl=n=>{if(n.search)return n.search;let t=n.href.length-1,o=n.hash||(n.href[t]==="#"?"#":"");return n.href[t-o.length]==="?"?"?":""};var Ll=require("net");function Nl(n,t=!1){return n==null||(n=new URL(n),/^(about|blob|data):$/.test(n.protocol))?"no-referrer":(n.username="",n.password="",n.hash="",t&&(n.pathname="",n.search=""),n)}var kl=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Bl="strict-origin-when-cross-origin";function jl(n){if(!kl.has(n))throw new TypeError(`Invalid referrerPolicy: ${n}`);return n}function wd(n){if(/^(http|ws)s:$/.test(n.protocol))return!0;let t=n.host.replace(/(^\[)|(]$)/g,""),o=(0,Ll.isIP)(t);return o===4&&/^127\./.test(t)||o===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:n.host==="localhost"||n.host.endsWith(".localhost")?!1:n.protocol==="file:"}function Or(n){return/^about:(blank|srcdoc)$/.test(n)||n.protocol==="data:"||/^(blob|filesystem):$/.test(n.protocol)?!0:wd(n)}function Fl(n,{referrerURLCallback:t,referrerOriginCallback:o}={}){if(n.referrer==="no-referrer"||n.referrerPolicy==="")return null;let i=n.referrerPolicy;if(n.referrer==="about:client")return"no-referrer";let a=n.referrer,l=Nl(a),u=Nl(a,!0);l.toString().length>4096&&(l=u),t&&(l=t(l)),o&&(u=o(u));let p=new URL(n.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return l;case"strict-origin":return Or(l)&&!Or(p)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return l.origin===p.origin?l:Or(l)&&!Or(p)?"no-referrer":u;case"same-origin":return l.origin===p.origin?l:"no-referrer";case"origin-when-cross-origin":return l.origin===p.origin?l:u;case"no-referrer-when-downgrade":return Or(l)&&!Or(p)?"no-referrer":l;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function $l(n){let t=(n.get("referrer-policy")||"").split(/[,\s]+/),o="";for(let i of t)i&&kl.has(i)&&(o=i);return o}var fe=Symbol("Request internals"),fn=n=>typeof n=="object"&&typeof n[fe]=="object",Sd=(0,Wl.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),er=class n extends Ze{constructor(t,o={}){let i;if(fn(t)?i=new URL(t.url):(i=new URL(t),t={}),i.username!==""||i.password!=="")throw new TypeError(`${i} is an url with embedded credentials.`);let a=o.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(a)&&(a=a.toUpperCase()),!fn(o)&&"data"in o&&Sd(),(o.body!=null||fn(t)&&t.body!==null)&&(a==="GET"||a==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let l=o.body?o.body:fn(t)&&t.body!==null?Ir(t):null;super(l,{size:o.size||t.size||0});let u=new Ie(o.headers||t.headers||{});if(l!==null&&!u.has("Content-Type")){let d=go(l,this);d&&u.set("Content-Type",d)}let p=fn(t)?t.signal:null;if("signal"in o&&(p=o.signal),p!=null&&!Sl(p))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let m=o.referrer==null?t.referrer:o.referrer;if(m==="")m="no-referrer";else if(m){let d=new URL(m);m=/^about:(\/\/)?client$/.test(d)?"client":d}else m=void 0;this[fe]={method:a,redirect:o.redirect||t.redirect||"follow",headers:u,parsedURL:i,signal:p,referrer:m},this.follow=o.follow===void 0?t.follow===void 0?20:t.follow:o.follow,this.compress=o.compress===void 0?t.compress===void 0?!0:t.compress:o.compress,this.counter=o.counter||t.counter||0,this.agent=o.agent||t.agent,this.highWaterMark=o.highWaterMark||t.highWaterMark||16384,this.insecureHTTPParser=o.insecureHTTPParser||t.insecureHTTPParser||!1,this.referrerPolicy=o.referrerPolicy||t.referrerPolicy||""}get method(){return this[fe].method}get url(){return(0,Ul.format)(this[fe].parsedURL)}get headers(){return this[fe].headers}get redirect(){return this[fe].redirect}get signal(){return this[fe].signal}get referrer(){if(this[fe].referrer==="no-referrer")return"";if(this[fe].referrer==="client")return"about:client";if(this[fe].referrer)return this[fe].referrer.toString()}get referrerPolicy(){return this[fe].referrerPolicy}set referrerPolicy(t){this[fe].referrerPolicy=jl(t)}clone(){return new n(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(er.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 Ml=n=>{let{parsedURL:t}=n[fe],o=new Ie(n[fe].headers);o.has("Accept")||o.set("Accept","*/*");let i=null;if(n.body===null&&/^(post|put)$/i.test(n.method)&&(i="0"),n.body!==null){let p=Al(n);typeof p=="number"&&!Number.isNaN(p)&&(i=String(p))}i&&o.set("Content-Length",i),n.referrerPolicy===""&&(n.referrerPolicy=Bl),n.referrer&&n.referrer!=="no-referrer"?n[fe].referrer=Fl(n):n[fe].referrer="no-referrer",n[fe].referrer instanceof URL&&o.set("Referer",n.referrer),o.has("User-Agent")||o.set("User-Agent","node-fetch"),n.compress&&!o.has("Accept-Encoding")&&o.set("Accept-Encoding","gzip, deflate, br");let{agent:a}=n;typeof a=="function"&&(a=a(t));let l=Dl(t),u={path:t.pathname+l,method:n.method,headers:o[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:n.insecureHTTPParser,agent:a};return{parsedURL:t,options:u}};var _o=class extends ut{constructor(t,o="aborted"){super(t,o)}};uo();Xi();var Ed=new Set(["data:","http:","https:"]);async function wo(n,t){return new Promise((o,i)=>{let a=new er(n,t),{parsedURL:l,options:u}=Ml(a);if(!Ed.has(l.protocol))throw new TypeError(`node-fetch cannot load ${n}. URL scheme "${l.protocol.replace(/:$/,"")}" is not supported.`);if(l.protocol==="data:"){let y=ul(a.url),T=new Fe(y,{headers:{"Content-Type":y.typeFull}});o(T);return}let p=(l.protocol==="https:"?zl.default:ql.default).request,{signal:m}=a,d=null,h=()=>{let y=new _o("The operation was aborted.");i(y),a.body&&a.body instanceof Oe.default.Readable&&a.body.destroy(y),!(!d||!d.body)&&d.body.emit("error",y)};if(m&&m.aborted){h();return}let C=()=>{h(),I()},P=p(l.toString(),u);m&&m.addEventListener("abort",C);let I=()=>{P.abort(),m&&m.removeEventListener("abort",C)};P.on("error",y=>{i(new Se(`request to ${a.url} failed, reason: ${y.message}`,"system",y)),I()}),Rd(P,y=>{d&&d.body&&d.body.destroy(y)}),process.version<"v14"&&P.on("socket",y=>{let T;y.prependListener("end",()=>{T=y._eventsCount}),y.prependListener("close",O=>{if(d&&T<y._eventsCount&&!O){let D=new Error("Premature close");D.code="ERR_STREAM_PREMATURE_CLOSE",d.body.emit("error",D)}})}),P.on("response",y=>{P.setTimeout(0);let T=Ol(y.rawHeaders);if(bo(y.statusCode)){let x=T.get("Location"),A=null;try{A=x===null?null:new URL(x,a.url)}catch{if(a.redirect!=="manual"){i(new Se(`uri requested responds with an invalid redirect URL: ${x}`,"invalid-redirect")),I();return}}switch(a.redirect){case"error":i(new Se(`uri requested responds with a redirect, redirect mode is set to error: ${a.url}`,"no-redirect")),I();return;case"manual":break;case"follow":{if(A===null)break;if(a.counter>=a.follow){i(new Se(`maximum redirect reached at: ${a.url}`,"max-redirect")),I();return}let N={headers:new Ie(a.headers),follow:a.follow,counter:a.counter+1,agent:a.agent,compress:a.compress,method:a.method,body:Ir(a),signal:a.signal,size:a.size,referrer:a.referrer,referrerPolicy:a.referrerPolicy};if(!El(a.url,A)||!Rl(a.url,A))for(let Ve of["authorization","www-authenticate","cookie","cookie2"])N.headers.delete(Ve);if(y.statusCode!==303&&a.body&&t.body instanceof Oe.default.Readable){i(new Se("Cannot follow redirect with body being a readable stream","unsupported-redirect")),I();return}(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&a.method==="POST")&&(N.method="GET",N.body=void 0,N.headers.delete("content-length"));let Q=$l(T);Q&&(N.referrerPolicy=Q),o(wo(new er(A,N))),I();return}default:return i(new TypeError(`Redirect option '${a.redirect}' is not a valid value of RequestRedirect`))}}m&&y.once("end",()=>{m.removeEventListener("abort",C)});let O=(0,Oe.pipeline)(y,new Oe.PassThrough,x=>{x&&i(x)});process.version<"v12.10"&&y.on("aborted",C);let D={url:a.url,status:y.statusCode,statusText:y.statusMessage,headers:T,size:a.size,counter:a.counter,highWaterMark:a.highWaterMark},$=T.get("Content-Encoding");if(!a.compress||a.method==="HEAD"||$===null||y.statusCode===204||y.statusCode===304){d=new Fe(O,D),o(d);return}let k={flush:tr.default.Z_SYNC_FLUSH,finishFlush:tr.default.Z_SYNC_FLUSH};if($==="gzip"||$==="x-gzip"){O=(0,Oe.pipeline)(O,tr.default.createGunzip(k),x=>{x&&i(x)}),d=new Fe(O,D),o(d);return}if($==="deflate"||$==="x-deflate"){let x=(0,Oe.pipeline)(y,new Oe.PassThrough,A=>{A&&i(A)});x.once("data",A=>{(A[0]&15)===8?O=(0,Oe.pipeline)(O,tr.default.createInflate(),N=>{N&&i(N)}):O=(0,Oe.pipeline)(O,tr.default.createInflateRaw(),N=>{N&&i(N)}),d=new Fe(O,D),o(d)}),x.once("end",()=>{d||(d=new Fe(O,D),o(d))});return}if($==="br"){O=(0,Oe.pipeline)(O,tr.default.createBrotliDecompress(),x=>{x&&i(x)}),d=new Fe(O,D),o(d);return}d=new Fe(O,D),o(d)}),Il(P,a).catch(i)})}function Rd(n,t){let o=dn.Buffer.from(`0\r
|
|
20
|
+
`)}V(this,W,Vt).call(this,()=>g(this,ne).write(i))===!1&&g(this,ne).isTTY&&(L(this,Je,()=>{L(this,Je,void 0),V(this,W,Ui).call(this)}),g(this,ne).once("drain",g(this,Je))),L(this,Ct,V(this,W,ao).call(this,i,a))}finally{o&&V(this,W,Vt).call(this,()=>g(this,ne).write(ed))}return this}start(t){if(t&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let o=this.text?"-":"",i=" ".repeat(g(this,B).indent)+V(this,W,Mi).call(this,o,this.text,g(this,B).prefixText,g(this,B).suffixText);return i.trim()!==""&&V(this,W,Vt).call(this,()=>g(this,ne).write(i+`
|
|
21
|
+
`)),this}return this.isSpinning?this:(g(this,B).hideCursor&&vi.hide(g(this,ne)),g(this,B).discardStdin&&Tr.default.stdin.isTTY&&(Fi.start(),L(this,vr,!0)),V(this,W,al).call(this),this.render(),L(this,Yt,setInterval(this.render.bind(this),this.interval)),this)}stop(){return clearInterval(g(this,Yt)),L(this,Yt,void 0),L(this,Xe,-1),L(this,Cr,0),V(this,W,Wi).call(this),V(this,W,ll).call(this),g(this,Je)&&(g(this,ne).removeListener("drain",g(this,Je)),L(this,Je,void 0)),this.isEnabled&&(this.clear(),g(this,B).hideCursor&&vi.show(g(this,ne))),g(this,vr)&&(L(this,vr,!1),Fi.stop()),this}succeed(t){return this.stopAndPersist({symbol:Ht.success,text:t})}fail(t){return this.stopAndPersist({symbol:Ht.error,text:t})}warn(t){return this.stopAndPersist({symbol:Ht.warning,text:t})}info(t){return this.stopAndPersist({symbol:Ht.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;let o=t.symbol??" ",i=t.text??this.text,a=t.prefixText??g(this,B).prefixText,l=t.suffixText??g(this,B).suffixText,u=V(this,W,Mi).call(this,o,i,a,l)+`
|
|
22
|
+
`;return this.stop(),V(this,W,Vt).call(this,()=>g(this,ne).write(u)),this}};Ct=new WeakMap,Xe=new WeakMap,Cr=new WeakMap,B=new WeakMap,ze=new WeakMap,ne=new WeakMap,Yt=new WeakMap,xt=new WeakMap,xr=new WeakMap,Je=new WeakMap,Pe=new WeakMap,vr=new WeakMap,W=new WeakSet,Vt=function(t){L(this,xr,!0);try{return t()}finally{L(this,xr,!1)}},Ui=function(){this.isSpinning&&this.render()},nl=function(t,o){if(t==null)return"";if(typeof t=="string")return t;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){let i=typeof o=="string"&&o&&o!=="buffer"?o:"utf8";return Buffer.from(t).toString(i)}return String(t)},ol=function(t){if(!t)return!1;let o=t.at(-1);return o===`
|
|
23
|
+
`||o==="\r"},il=function(){g(this,Pe)||(L(this,Pe,setTimeout(()=>{L(this,Pe,void 0),this.isSpinning&&V(this,W,Ui).call(this)},Qf)),typeof g(this,Pe)?.unref=="function"&&g(this,Pe).unref())},Wi=function(){g(this,Pe)&&(clearTimeout(g(this,Pe)),L(this,Pe,void 0))},Mi=function(t,o,i,a){let l=V(this,W,zi).call(this,i," "),p=typeof o=="string"?(t?" ":"")+o:"",m=V(this,W,Hi).call(this,a," ");return l+t+p+m},qi=function(t,o,i=!1){let a=typeof t=="function"?t():t;return typeof a=="string"&&a!==""?i?o+a:a+o:""},zi=function(t=g(this,B).prefixText,o=" "){return V(this,W,qi).call(this,t,o,!1)},Hi=function(t=g(this,B).suffixText,o=" "){return V(this,W,qi).call(this,t,o,!0)},ao=function(t,o){let i=0;for(let a of(0,rl.stripVTControlCharacters)(t).split(`
|
|
24
|
+
`))i+=Math.max(1,Math.ceil(ki(a)/o));return i},sl=function(t){if(!t||g(this,xt).has(t)||!t.isTTY||typeof t.write!="function")return;so.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let o=t.write;g(this,xt).set(t,o),so.set(t,this),t.write=(i,a,l)=>V(this,W,cl).call(this,t,o,i,a,l)},al=function(){if(!this.isEnabled||g(this,xt).size>0)return;let t=new Set([g(this,ne),Tr.default.stdout,Tr.default.stderr]);for(let o of t)V(this,W,sl).call(this,o)},ll=function(){for(let[t,o]of g(this,xt))t.write=o,so.get(t)===this&&so.delete(t);g(this,xt).clear()},cl=function(t,o,i,a,l){if(typeof a=="function"&&(l=a,a=void 0),g(this,xr))return o.call(t,i,a,l);this.clear();let u=V(this,W,nl).call(this,i,a),p=V(this,W,ol).call(this,u),m=o.call(t,i,a,l);return p?V(this,W,Wi).call(this):u.length>0&&V(this,W,il).call(this),this.isSpinning&&!g(this,Pe)&&this.render(),m};function Q(n){return new $i(n)}var w=J(require("fs-extra"),1),E=J(require("path"),1),ts=J(require("dotenv"),1),rs=J(require("figlet"),1),ns=J(require("cli-table3"),1),os=J(require("gradient-string"),1),is=J(require("inquirer"),1);var ql=J(require("http"),1),zl=J(require("https"),1),tr=J(require("zlib"),1),Oe=J(require("stream"),1),dn=require("buffer");function td(n){if(!/^data:/i.test(n))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');n=n.replace(/\r?\n/g,"");let t=n.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");let o=n.substring(5,t).split(";"),i="",a=!1,l=o[0]||"text/plain",u=l;for(let h=1;h<o.length;h++)o[h]==="base64"?a=!0:o[h]&&(u+=`;${o[h]}`,o[h].indexOf("charset=")===0&&(i=o[h].substring(8)));!o[0]&&!i.length&&(u+=";charset=US-ASCII",i="US-ASCII");let p=a?"base64":"ascii",m=unescape(n.substring(t+1)),d=Buffer.from(m,p);return d.type=l,d.typeFull=u,d.charset=i,d}var ul=td;var je=J(require("stream"),1),ft=require("util"),Ae=require("buffer");nn();uo();var ut=class extends Error{constructor(t,o){super(t),Error.captureStackTrace(this,this.constructor),this.type=o}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var Se=class extends ut{constructor(t,o,i){super(t,o),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var fo=Symbol.toStringTag,Yi=n=>typeof n=="object"&&typeof n.append=="function"&&typeof n.delete=="function"&&typeof n.get=="function"&&typeof n.getAll=="function"&&typeof n.has=="function"&&typeof n.set=="function"&&typeof n.sort=="function"&&n[fo]==="URLSearchParams",ln=n=>n&&typeof n=="object"&&typeof n.arrayBuffer=="function"&&typeof n.type=="string"&&typeof n.stream=="function"&&typeof n.constructor=="function"&&/^(Blob|File)$/.test(n[fo]),Sl=n=>typeof n=="object"&&(n[fo]==="AbortSignal"||n[fo]==="EventTarget"),El=(n,t)=>{let o=new URL(t).hostname,i=new URL(n).hostname;return o===i||o.endsWith(`.${i}`)},Rl=(n,t)=>{let o=new URL(t).protocol,i=new URL(n).protocol;return o===i};var yd=(0,ft.promisify)(je.default.pipeline),Ee=Symbol("Body internals"),Ze=class{constructor(t,{size:o=0}={}){let i=null;t===null?t=null:Yi(t)?t=Ae.Buffer.from(t.toString()):ln(t)||Ae.Buffer.isBuffer(t)||(ft.types.isAnyArrayBuffer(t)?t=Ae.Buffer.from(t):ArrayBuffer.isView(t)?t=Ae.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof je.default||(t instanceof Qt?(t=wl(t),i=t.type.split("=")[1]):t=Ae.Buffer.from(String(t))));let a=t;Ae.Buffer.isBuffer(t)?a=je.default.Readable.from(t):ln(t)&&(a=je.default.Readable.from(t.stream())),this[Ee]={body:t,stream:a,boundary:i,disturbed:!1,error:null},this.size=o,t instanceof je.default&&t.on("error",l=>{let u=l instanceof ut?l:new Se(`Invalid response body while trying to fetch ${this.url}: ${l.message}`,"system",l);this[Ee].error=u})}get body(){return this[Ee].stream}get bodyUsed(){return this[Ee].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:o,byteLength:i}=await Qi(this);return t.slice(o,o+i)}async formData(){let t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){let i=new Qt,a=new URLSearchParams(await this.text());for(let[l,u]of a)i.append(l,u);return i}let{toFormData:o}=await Promise.resolve().then(()=>(Pl(),vl));return o(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[Ee].body&&this[Ee].body.type||"",o=await this.arrayBuffer();return new ct([o],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await Qi(this);return new TextDecoder().decode(t)}buffer(){return Qi(this)}};Ze.prototype.buffer=(0,ft.deprecate)(Ze.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Ze.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,ft.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Qi(n){if(n[Ee].disturbed)throw new TypeError(`body used already for: ${n.url}`);if(n[Ee].disturbed=!0,n[Ee].error)throw n[Ee].error;let{body:t}=n;if(t===null)return Ae.Buffer.alloc(0);if(!(t instanceof je.default))return Ae.Buffer.alloc(0);let o=[],i=0;try{for await(let a of t){if(n.size>0&&i+a.length>n.size){let l=new Se(`content size at ${n.url} over limit: ${n.size}`,"max-size");throw t.destroy(l),l}i+=a.length,o.push(a)}}catch(a){throw a instanceof ut?a:new Se(`Invalid response body while trying to fetch ${n.url}: ${a.message}`,"system",a)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return o.every(a=>typeof a=="string")?Ae.Buffer.from(o.join("")):Ae.Buffer.concat(o,i)}catch(a){throw new Se(`Could not create Buffer from response body for ${n.url}: ${a.message}`,"system",a)}else throw new Se(`Premature close of server response while trying to fetch ${n.url}`)}var Ir=(n,t)=>{let o,i,{body:a}=n[Ee];if(n.bodyUsed)throw new Error("cannot clone body after it is used");return a instanceof je.default&&typeof a.getBoundary!="function"&&(o=new je.PassThrough({highWaterMark:t}),i=new je.PassThrough({highWaterMark:t}),a.pipe(o),a.pipe(i),n[Ee].stream=o,a=i),a},bd=(0,ft.deprecate)(n=>n.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),go=(n,t)=>n===null?null:typeof n=="string"?"text/plain;charset=UTF-8":Yi(n)?"application/x-www-form-urlencoded;charset=UTF-8":ln(n)?n.type||null:Ae.Buffer.isBuffer(n)||ft.types.isAnyArrayBuffer(n)||ArrayBuffer.isView(n)?null:n instanceof Qt?`multipart/form-data; boundary=${t[Ee].boundary}`:n&&typeof n.getBoundary=="function"?`multipart/form-data;boundary=${bd(n)}`:n instanceof je.default?null:"text/plain;charset=UTF-8",Al=n=>{let{body:t}=n[Ee];return t===null?0:ln(t)?t.size:Ae.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},Il=async(n,{body:t})=>{t===null?n.end():await yd(t,n)};var Zi=require("util"),un=J(require("http"),1),yo=typeof un.default.validateHeaderName=="function"?un.default.validateHeaderName:n=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(n)){let t=new TypeError(`Header name must be a valid HTTP token [${n}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},es=typeof un.default.validateHeaderValue=="function"?un.default.validateHeaderValue:(n,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let o=new TypeError(`Invalid character in header content ["${n}"]`);throw Object.defineProperty(o,"code",{value:"ERR_INVALID_CHAR"}),o}},Ie=class n extends URLSearchParams{constructor(t){let o=[];if(t instanceof n){let i=t.raw();for(let[a,l]of Object.entries(i))o.push(...l.map(u=>[a,u]))}else if(t!=null)if(typeof t=="object"&&!Zi.types.isBoxedPrimitive(t)){let i=t[Symbol.iterator];if(i==null)o.push(...Object.entries(t));else{if(typeof i!="function")throw new TypeError("Header pairs must be iterable");o=[...t].map(a=>{if(typeof a!="object"||Zi.types.isBoxedPrimitive(a))throw new TypeError("Each header pair must be an iterable object");return[...a]}).map(a=>{if(a.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...a]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return o=o.length>0?o.map(([i,a])=>(yo(i),es(i,String(a)),[String(i).toLowerCase(),String(a)])):void 0,super(o),new Proxy(this,{get(i,a,l){switch(a){case"append":case"set":return(u,p)=>(yo(u),es(u,String(p)),URLSearchParams.prototype[a].call(i,String(u).toLowerCase(),String(p)));case"delete":case"has":case"getAll":return u=>(yo(u),URLSearchParams.prototype[a].call(i,String(u).toLowerCase()));case"keys":return()=>(i.sort(),new Set(URLSearchParams.prototype.keys.call(i)).keys());default:return Reflect.get(i,a,l)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){let o=this.getAll(t);if(o.length===0)return null;let i=o.join(", ");return/^content-encoding$/i.test(t)&&(i=i.toLowerCase()),i}forEach(t,o=void 0){for(let i of this.keys())Reflect.apply(t,o,[this.get(i),i,this])}*values(){for(let t of this.keys())yield this.get(t)}*entries(){for(let t of this.keys())yield[t,this.get(t)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((t,o)=>(t[o]=this.getAll(o),t),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((t,o)=>{let i=this.getAll(o);return o==="host"?t[o]=i[0]:t[o]=i.length>1?i:i[0],t},{})}};Object.defineProperties(Ie.prototype,["get","entries","forEach","values"].reduce((n,t)=>(n[t]={enumerable:!0},n),{}));function Ol(n=[]){return new Ie(n.reduce((t,o,i,a)=>(i%2===0&&t.push(a.slice(i,i+2)),t),[]).filter(([t,o])=>{try{return yo(t),es(t,String(o)),!0}catch{return!1}}))}var _d=new Set([301,302,303,307,308]),bo=n=>_d.has(n);var He=Symbol("Response internals"),Fe=class n extends Ze{constructor(t=null,o={}){super(t,o);let i=o.status!=null?o.status:200,a=new Ie(o.headers);if(t!==null&&!a.has("Content-Type")){let l=go(t,this);l&&a.append("Content-Type",l)}this[He]={type:"default",url:o.url,status:i,statusText:o.statusText||"",headers:a,counter:o.counter,highWaterMark:o.highWaterMark}}get type(){return this[He].type}get url(){return this[He].url||""}get status(){return this[He].status}get ok(){return this[He].status>=200&&this[He].status<300}get redirected(){return this[He].counter>0}get statusText(){return this[He].statusText}get headers(){return this[He].headers}get highWaterMark(){return this[He].highWaterMark}clone(){return new n(Ir(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(t,o=302){if(!bo(o))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new n(null,{headers:{location:new URL(t).toString()},status:o})}static error(){let t=new n(null,{status:0,statusText:""});return t[He].type="error",t}static json(t=void 0,o={}){let i=JSON.stringify(t);if(i===void 0)throw new TypeError("data is not JSON serializable");let a=new Ie(o&&o.headers);return a.has("content-type")||a.set("content-type","application/json"),new n(i,{...o,headers:a})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Fe.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}});var Ul=require("url"),Wl=require("util");var Dl=n=>{if(n.search)return n.search;let t=n.href.length-1,o=n.hash||(n.href[t]==="#"?"#":"");return n.href[t-o.length]==="?"?"?":""};var Ll=require("net");function Nl(n,t=!1){return n==null||(n=new URL(n),/^(about|blob|data):$/.test(n.protocol))?"no-referrer":(n.username="",n.password="",n.hash="",t&&(n.pathname="",n.search=""),n)}var kl=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Bl="strict-origin-when-cross-origin";function jl(n){if(!kl.has(n))throw new TypeError(`Invalid referrerPolicy: ${n}`);return n}function wd(n){if(/^(http|ws)s:$/.test(n.protocol))return!0;let t=n.host.replace(/(^\[)|(]$)/g,""),o=(0,Ll.isIP)(t);return o===4&&/^127\./.test(t)||o===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:n.host==="localhost"||n.host.endsWith(".localhost")?!1:n.protocol==="file:"}function Or(n){return/^about:(blank|srcdoc)$/.test(n)||n.protocol==="data:"||/^(blob|filesystem):$/.test(n.protocol)?!0:wd(n)}function Fl(n,{referrerURLCallback:t,referrerOriginCallback:o}={}){if(n.referrer==="no-referrer"||n.referrerPolicy==="")return null;let i=n.referrerPolicy;if(n.referrer==="about:client")return"no-referrer";let a=n.referrer,l=Nl(a),u=Nl(a,!0);l.toString().length>4096&&(l=u),t&&(l=t(l)),o&&(u=o(u));let p=new URL(n.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return l;case"strict-origin":return Or(l)&&!Or(p)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return l.origin===p.origin?l:Or(l)&&!Or(p)?"no-referrer":u;case"same-origin":return l.origin===p.origin?l:"no-referrer";case"origin-when-cross-origin":return l.origin===p.origin?l:u;case"no-referrer-when-downgrade":return Or(l)&&!Or(p)?"no-referrer":l;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function $l(n){let t=(n.get("referrer-policy")||"").split(/[,\s]+/),o="";for(let i of t)i&&kl.has(i)&&(o=i);return o}var fe=Symbol("Request internals"),fn=n=>typeof n=="object"&&typeof n[fe]=="object",Sd=(0,Wl.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),er=class n extends Ze{constructor(t,o={}){let i;if(fn(t)?i=new URL(t.url):(i=new URL(t),t={}),i.username!==""||i.password!=="")throw new TypeError(`${i} is an url with embedded credentials.`);let a=o.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(a)&&(a=a.toUpperCase()),!fn(o)&&"data"in o&&Sd(),(o.body!=null||fn(t)&&t.body!==null)&&(a==="GET"||a==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let l=o.body?o.body:fn(t)&&t.body!==null?Ir(t):null;super(l,{size:o.size||t.size||0});let u=new Ie(o.headers||t.headers||{});if(l!==null&&!u.has("Content-Type")){let d=go(l,this);d&&u.set("Content-Type",d)}let p=fn(t)?t.signal:null;if("signal"in o&&(p=o.signal),p!=null&&!Sl(p))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let m=o.referrer==null?t.referrer:o.referrer;if(m==="")m="no-referrer";else if(m){let d=new URL(m);m=/^about:(\/\/)?client$/.test(d)?"client":d}else m=void 0;this[fe]={method:a,redirect:o.redirect||t.redirect||"follow",headers:u,parsedURL:i,signal:p,referrer:m},this.follow=o.follow===void 0?t.follow===void 0?20:t.follow:o.follow,this.compress=o.compress===void 0?t.compress===void 0?!0:t.compress:o.compress,this.counter=o.counter||t.counter||0,this.agent=o.agent||t.agent,this.highWaterMark=o.highWaterMark||t.highWaterMark||16384,this.insecureHTTPParser=o.insecureHTTPParser||t.insecureHTTPParser||!1,this.referrerPolicy=o.referrerPolicy||t.referrerPolicy||""}get method(){return this[fe].method}get url(){return(0,Ul.format)(this[fe].parsedURL)}get headers(){return this[fe].headers}get redirect(){return this[fe].redirect}get signal(){return this[fe].signal}get referrer(){if(this[fe].referrer==="no-referrer")return"";if(this[fe].referrer==="client")return"about:client";if(this[fe].referrer)return this[fe].referrer.toString()}get referrerPolicy(){return this[fe].referrerPolicy}set referrerPolicy(t){this[fe].referrerPolicy=jl(t)}clone(){return new n(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(er.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 Ml=n=>{let{parsedURL:t}=n[fe],o=new Ie(n[fe].headers);o.has("Accept")||o.set("Accept","*/*");let i=null;if(n.body===null&&/^(post|put)$/i.test(n.method)&&(i="0"),n.body!==null){let p=Al(n);typeof p=="number"&&!Number.isNaN(p)&&(i=String(p))}i&&o.set("Content-Length",i),n.referrerPolicy===""&&(n.referrerPolicy=Bl),n.referrer&&n.referrer!=="no-referrer"?n[fe].referrer=Fl(n):n[fe].referrer="no-referrer",n[fe].referrer instanceof URL&&o.set("Referer",n.referrer),o.has("User-Agent")||o.set("User-Agent","node-fetch"),n.compress&&!o.has("Accept-Encoding")&&o.set("Accept-Encoding","gzip, deflate, br");let{agent:a}=n;typeof a=="function"&&(a=a(t));let l=Dl(t),u={path:t.pathname+l,method:n.method,headers:o[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:n.insecureHTTPParser,agent:a};return{parsedURL:t,options:u}};var _o=class extends ut{constructor(t,o="aborted"){super(t,o)}};uo();Xi();var Ed=new Set(["data:","http:","https:"]);async function wo(n,t){return new Promise((o,i)=>{let a=new er(n,t),{parsedURL:l,options:u}=Ml(a);if(!Ed.has(l.protocol))throw new TypeError(`node-fetch cannot load ${n}. URL scheme "${l.protocol.replace(/:$/,"")}" is not supported.`);if(l.protocol==="data:"){let y=ul(a.url),T=new Fe(y,{headers:{"Content-Type":y.typeFull}});o(T);return}let p=(l.protocol==="https:"?zl.default:ql.default).request,{signal:m}=a,d=null,h=()=>{let y=new _o("The operation was aborted.");i(y),a.body&&a.body instanceof Oe.default.Readable&&a.body.destroy(y),!(!d||!d.body)&&d.body.emit("error",y)};if(m&&m.aborted){h();return}let C=()=>{h(),A()},P=p(l.toString(),u);m&&m.addEventListener("abort",C);let A=()=>{P.abort(),m&&m.removeEventListener("abort",C)};P.on("error",y=>{i(new Se(`request to ${a.url} failed, reason: ${y.message}`,"system",y)),A()}),Rd(P,y=>{d&&d.body&&d.body.destroy(y)}),process.version<"v14"&&P.on("socket",y=>{let T;y.prependListener("end",()=>{T=y._eventsCount}),y.prependListener("close",I=>{if(d&&T<y._eventsCount&&!I){let O=new Error("Premature close");O.code="ERR_STREAM_PREMATURE_CLOSE",d.body.emit("error",O)}})}),P.on("response",y=>{P.setTimeout(0);let T=Ol(y.rawHeaders);if(bo(y.statusCode)){let x=T.get("Location"),D=null;try{D=x===null?null:new URL(x,a.url)}catch{if(a.redirect!=="manual"){i(new Se(`uri requested responds with an invalid redirect URL: ${x}`,"invalid-redirect")),A();return}}switch(a.redirect){case"error":i(new Se(`uri requested responds with a redirect, redirect mode is set to error: ${a.url}`,"no-redirect")),A();return;case"manual":break;case"follow":{if(D===null)break;if(a.counter>=a.follow){i(new Se(`maximum redirect reached at: ${a.url}`,"max-redirect")),A();return}let N={headers:new Ie(a.headers),follow:a.follow,counter:a.counter+1,agent:a.agent,compress:a.compress,method:a.method,body:Ir(a),signal:a.signal,size:a.size,referrer:a.referrer,referrerPolicy:a.referrerPolicy};if(!El(a.url,D)||!Rl(a.url,D))for(let Ve of["authorization","www-authenticate","cookie","cookie2"])N.headers.delete(Ve);if(y.statusCode!==303&&a.body&&t.body instanceof Oe.default.Readable){i(new Se("Cannot follow redirect with body being a readable stream","unsupported-redirect")),A();return}(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&a.method==="POST")&&(N.method="GET",N.body=void 0,N.headers.delete("content-length"));let ee=$l(T);ee&&(N.referrerPolicy=ee),o(wo(new er(D,N))),A();return}default:return i(new TypeError(`Redirect option '${a.redirect}' is not a valid value of RequestRedirect`))}}m&&y.once("end",()=>{m.removeEventListener("abort",C)});let I=(0,Oe.pipeline)(y,new Oe.PassThrough,x=>{x&&i(x)});process.version<"v12.10"&&y.on("aborted",C);let O={url:a.url,status:y.statusCode,statusText:y.statusMessage,headers:T,size:a.size,counter:a.counter,highWaterMark:a.highWaterMark},$=T.get("Content-Encoding");if(!a.compress||a.method==="HEAD"||$===null||y.statusCode===204||y.statusCode===304){d=new Fe(I,O),o(d);return}let j={flush:tr.default.Z_SYNC_FLUSH,finishFlush:tr.default.Z_SYNC_FLUSH};if($==="gzip"||$==="x-gzip"){I=(0,Oe.pipeline)(I,tr.default.createGunzip(j),x=>{x&&i(x)}),d=new Fe(I,O),o(d);return}if($==="deflate"||$==="x-deflate"){let x=(0,Oe.pipeline)(y,new Oe.PassThrough,D=>{D&&i(D)});x.once("data",D=>{(D[0]&15)===8?I=(0,Oe.pipeline)(I,tr.default.createInflate(),N=>{N&&i(N)}):I=(0,Oe.pipeline)(I,tr.default.createInflateRaw(),N=>{N&&i(N)}),d=new Fe(I,O),o(d)}),x.once("end",()=>{d||(d=new Fe(I,O),o(d))});return}if($==="br"){I=(0,Oe.pipeline)(I,tr.default.createBrotliDecompress(),x=>{x&&i(x)}),d=new Fe(I,O),o(d);return}d=new Fe(I,O),o(d)}),Il(P,a).catch(i)})}function Rd(n,t){let o=dn.Buffer.from(`0\r
|
|
25
25
|
\r
|
|
26
|
-
`),i=!1,a=!1,l;n.on("response",u=>{let{headers:p}=u;i=p["transfer-encoding"]==="chunked"&&!p["content-length"]}),n.on("socket",u=>{let p=()=>{if(i&&!a){let d=new Error("Premature close");d.code="ERR_STREAM_PREMATURE_CLOSE",t(d)}},m=d=>{a=dn.Buffer.compare(d.slice(-5),o)===0,!a&&l&&(a=dn.Buffer.compare(l.slice(-3),o.slice(0,3))===0&&dn.Buffer.compare(d.slice(-2),o.slice(3))===0),l=d};u.prependListener("close",p),u.on("data",m),n.on("close",()=>{u.removeListener("close",p),u.removeListener("data",m)})})}var Ge=require("child_process"),ss=J(require("semver"),1),Vl=J(require("crypto"),1),Yl=J(require("http"),1);var Re=J(require("crypto"),1),ce=class{static deriveKeys(t){let i=Re.createHash("sha256").update(t).digest(),a=Re.createHmac("sha256",t).update("nexus-integrity-key").digest();return{encryptionKey:i,hmacKey:a}}static compile(t,o,i,a={}){let{encryptionKey:l,hmacKey:u}=this.deriveKeys(o),p={version:"2.0.0",compiledAt:new Date().toISOString(),projectId:i,...a},m=JSON.stringify(p),d=Buffer.from(m,"utf-8"),h=Re.randomBytes(16),C=Re.createCipheriv(this.ALGORITHM,l,h),P=JSON.stringify(t),
|
|
26
|
+
`),i=!1,a=!1,l;n.on("response",u=>{let{headers:p}=u;i=p["transfer-encoding"]==="chunked"&&!p["content-length"]}),n.on("socket",u=>{let p=()=>{if(i&&!a){let d=new Error("Premature close");d.code="ERR_STREAM_PREMATURE_CLOSE",t(d)}},m=d=>{a=dn.Buffer.compare(d.slice(-5),o)===0,!a&&l&&(a=dn.Buffer.compare(l.slice(-3),o.slice(0,3))===0&&dn.Buffer.compare(d.slice(-2),o.slice(3))===0),l=d};u.prependListener("close",p),u.on("data",m),n.on("close",()=>{u.removeListener("close",p),u.removeListener("data",m)})})}var Ge=require("child_process"),ss=J(require("semver"),1),Vl=J(require("crypto"),1),Yl=J(require("http"),1);var Re=J(require("crypto"),1),ce=class{static deriveKeys(t){let i=Re.createHash("sha256").update(t).digest(),a=Re.createHmac("sha256",t).update("nexus-integrity-key").digest();return{encryptionKey:i,hmacKey:a}}static compile(t,o,i,a={}){let{encryptionKey:l,hmacKey:u}=this.deriveKeys(o),p={version:"2.0.0",compiledAt:new Date().toISOString(),projectId:i,...a},m=JSON.stringify(p),d=Buffer.from(m,"utf-8"),h=Re.randomBytes(16),C=Re.createCipheriv(this.ALGORITHM,l,h),P=JSON.stringify(t),A=C.update(P,"utf8");A=Buffer.concat([A,C.final()]);let y=Buffer.concat([h,A]),T=Buffer.from(this.MAGIC_HEADER,"ascii"),I=Buffer.alloc(4);I.writeUInt32BE(d.length,0);let O=Buffer.alloc(4);O.writeUInt32BE(y.length,0);let $=Buffer.concat([T,I,d,O,y]),j=Re.createHmac("sha256",u);j.update($);let x=j.digest();return Buffer.concat([$,x])}static decompile(t,o){if(t.length<44)throw new Error("Corrupted File: Binary payload is too short to be a valid Nexus node.");let{encryptionKey:i,hmacKey:a}=this.deriveKeys(o),l=t.length-32,u=t.subarray(0,l),p=t.subarray(l),m=Re.createHmac("sha256",a);m.update(u);let d=m.digest();if(!Re.timingSafeEqual(p,d))throw new Error("DATA_INTEGRITY_VIOLATION: Cryptographic signature mismatch. This local node has been modified externally or tampered with.");if(u.subarray(0,4).toString("ascii")!==this.MAGIC_HEADER)throw new Error("Invalid Format: File lacks the correct Nexus binary magic header.");let C=u.readUInt32BE(4),P=8,A=P+C,y=u.subarray(P,A).toString("utf-8"),T=JSON.parse(y),I=u.readUInt32BE(A),O=A+4,$=O+I,j=u.subarray(O,$),x=j.subarray(0,16),D=j.subarray(16),N=Re.createDecipheriv(this.ALGORITHM,i,x),ee=N.update(D);return ee=Buffer.concat([ee,N.final()]),{data:JSON.parse(ee.toString("utf8")),metadata:T}}};ce.MAGIC_HEADER="NEXS",ce.ALGORITHM="aes-256-cbc";var et=J(require("fs"),1),dt=J(require("path"),1);var Td="https://gnapex.gnexus.co.tz",Cd="https://sentry.gnexus.co.tz",xd="https://gnapex.gnexus.co.tz",vd="https://sentry.gnexus.co.tz",Hl=()=>{let n=typeof process<"u"?process.env.NEXT_PUBLIC_NEXUS_ID:void 0,t=typeof process<"u"?process.env.NEXT_PUBLIC_NEXUS_KEY:void 0,o=typeof process<"u"?process.env.NEXT_PUBLIC_NEXUS_API_URL:void 0,i=typeof process<"u"?process.env.NEXUS_PROJECT_ID:void 0,a=typeof process<"u"?process.env.NEXUS_API_KEY:void 0,l=typeof process<"u"?process.env.NEXUS_API_URL:void 0,p=(typeof process<"u"?process.env.NODE_ENV:"production")==="development"||typeof window<"u"&&window.location.hostname==="localhost",m=n??i,d=t??a,h=o??l??(p?xd:Td),C=h.includes("localhost")?vd:Cd;return{projectId:m,apiKey:d,apiUrl:h,analyticsUrl:C}};var hn=class{constructor(t,o){this.apiKey="";this.baseDir=t||".nexus/local";let i=Hl();this.apiKey=o||i.apiKey||""}isLoaded(){return et.default.existsSync(dt.default.resolve(process.cwd(),this.baseDir))}decompileFile(t){if(!this.apiKey)return process.env.NODE_ENV==="development"&&console.warn("\u26A0\uFE0F NexusHub: Missing NEXUS_API_KEY. Local decryption bypassed."),null;try{let o=et.default.readFileSync(t);return ce.decompile(o,this.apiKey).data}catch(o){return process.env.NODE_ENV==="development"&&console.error(`
|
|
27
27
|
\u{1F6A8} NexusHub Security Alert: Data Integrity Violation in file:
|
|
28
28
|
${t}
|
|
29
29
|
Error: ${o.message}
|
|
30
30
|
This file has been disabled until regenerated via npx nexus pull.
|
|
31
|
-
`),null}}async getPage(t){let o=dt.default.resolve(process.cwd(),this.baseDir,"pages",`${t}.nx`);if(et.default.existsSync(o)){let i=this.decompileFile(o);if(!i)return null;let a=i;for(;a&&typeof a=="object"&&a.data!==void 0;)a=a.data;return a}return null}async getCollection(t){let o=dt.default.resolve(process.cwd(),this.baseDir,"collections",`${t}.nx`);return et.default.existsSync(o)?this.decompileFile(o):null}async getGlobals(){let t=dt.default.resolve(process.cwd(),this.baseDir,"globals.nx");return et.default.existsSync(t)?this.decompileFile(t):null}async getAllData(){let t={},o={},i={};try{let a=dt.default.resolve(process.cwd(),this.baseDir,"pages");if(et.default.existsSync(a)){for(let u of et.default.readdirSync(a))if(u.endsWith(".nx")){let p=dt.default.basename(u,".nx");t[p]=await this.getPage(p)}}let l=dt.default.resolve(process.cwd(),this.baseDir,"collections");if(et.default.existsSync(l)){for(let u of et.default.readdirSync(l))if(u.endsWith(".nx")){let p=dt.default.basename(u,".nx");o[p]=await this.getCollection(p)||[]}}i=await this.getGlobals()||{}}catch{}return{pages:t,collections:o,globals:i}}};var Xl=os.default.default||os.default,Pt=is.default.default||is.default,Pd=rs.default.default||rs.default,At=ns.default.default||ns.default,Eo=ss.default.default||ss.default,It="2.0.0",Ot=".nexus",xo=
|
|
32
|
-
`+o),console.log(R(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),n&&console.log(" "+
|
|
33
|
-
`))}async function Nr(){let n=process.cwd(),t=
|
|
34
|
-
`+
|
|
31
|
+
`),null}}async getPage(t){let o=dt.default.resolve(process.cwd(),this.baseDir,"pages",`${t}.nx`);if(et.default.existsSync(o)){let i=this.decompileFile(o);if(!i)return null;let a=i;for(;a&&typeof a=="object"&&a.data!==void 0;)a=a.data;return a}return null}async getCollection(t){let o=dt.default.resolve(process.cwd(),this.baseDir,"collections",`${t}.nx`);return et.default.existsSync(o)?this.decompileFile(o):null}async getGlobals(){let t=dt.default.resolve(process.cwd(),this.baseDir,"globals.nx");return et.default.existsSync(t)?this.decompileFile(t):null}async getAllData(){let t={},o={},i={};try{let a=dt.default.resolve(process.cwd(),this.baseDir,"pages");if(et.default.existsSync(a)){for(let u of et.default.readdirSync(a))if(u.endsWith(".nx")){let p=dt.default.basename(u,".nx");t[p]=await this.getPage(p)}}let l=dt.default.resolve(process.cwd(),this.baseDir,"collections");if(et.default.existsSync(l)){for(let u of et.default.readdirSync(l))if(u.endsWith(".nx")){let p=dt.default.basename(u,".nx");o[p]=await this.getCollection(p)||[]}}i=await this.getGlobals()||{}}catch{}return{pages:t,collections:o,globals:i}}};var Xl=os.default.default||os.default,Pt=is.default.default||is.default,Pd=rs.default.default||rs.default,At=ns.default.default||ns.default,Eo=ss.default.default||ss.default,It="2.0.0",Ot=".nexus",xo=E.default.join(Ot,".nexus-lock"),cs=E.default.join(Ot,"nexus.config.nx"),vo=E.default.join(Ot,"schema.nx"),To=E.default.join(Ot,"origin.nx"),pe=E.default.join(Ot,"local"),as="https://gnapex.gnexus.co.tz",Ad=S.bold.hex("#00D4FF"),R=S.hex("#666666"),X=S.hex("#00FF88"),ue=S.hex("#FFB800"),Z=S.hex("#FF4444"),Id=new Set(["init","help","--help","-h","--version","-V"]);function Ce(n=""){let t=Pd.textSync("NEXUS",{font:"Doom",horizontalLayout:"full"}),o=Xl(["#00D4FF","#7B2FFF","#FF00AA"])(t);console.log(`
|
|
32
|
+
`+o),console.log(R(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),n&&console.log(" "+S.bold.white(n)),console.log(R(` SDK CLI v${It} \xB7 Platform by G-Nexus \xB7 Enterprise Edition`)),console.log(R(` \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
33
|
+
`))}async function Nr(){let n=process.cwd(),t=E.default.join(n,xo);await w.default.pathExists(t)||(console.log(`
|
|
34
|
+
`+Z("\u2716 Project not initialized.")),console.log(R(" This project has not been set up with the NexusHub SDK.")),console.log(R(` Run the following command to get started:
|
|
35
35
|
`)),console.log(" "+Ad("npx nexus init")+`
|
|
36
|
-
`),process.exit(1))}async function Od(n){await w.default.ensureDir(
|
|
37
|
-
`+
|
|
38
|
-
`)),process.exit(1)),t}async function Dd(n,t){let o=
|
|
36
|
+
`),process.exit(1))}async function Od(n){await w.default.ensureDir(E.default.join(process.cwd(),Ot)),await w.default.writeJson(E.default.join(process.cwd(),xo),{nexusVersion:It,initializedAt:new Date().toISOString(),projectId:n.projectId,workspace:n.workspace,features:n.features,checksum:Vl.default.createHash("md5").update(JSON.stringify(n)).digest("hex")},{spaces:2})}async function Jl(){try{return await w.default.readJson(E.default.join(process.cwd(),xo))}catch{return null}}async function Po(n,t,o){let i=E.default.resolve(process.cwd(),vo),a=ce.compile(n,t,o);await w.default.ensureDir(E.default.dirname(i)),await w.default.writeFile(i,a)}async function Ke(n){try{let t=E.default.resolve(process.cwd(),vo);if(!await w.default.pathExists(t))return null;let o=await w.default.readFile(t);return ce.decompile(o,n).data}catch{return null}}function us(){ts.default.config({path:E.default.resolve(process.cwd(),".env.local")}),ts.default.config({path:E.default.resolve(process.cwd(),".env")})}function pn(n={}){us();let t=n.apiKey||process.env.NEXUS_API_KEY||process.env.NEXT_PUBLIC_NEXUS_KEY,o=n.projectId||process.env.NEXUS_PROJECT_ID||process.env.NEXT_PUBLIC_NEXUS_ID,i=n.apiUrl||process.env.NEXUS_API_URL||process.env.NEXT_PUBLIC_NEXUS_API_URL||as;return{apiKey:t,projectId:o,apiUrl:i}}function rr(n={}){let t=pn(n);return(!t.apiKey||!t.projectId)&&(console.error(`
|
|
37
|
+
`+Z("\u2716 Missing credentials")),console.log(R(` NEXUS_API_KEY and NEXUS_PROJECT_ID must be set in .env or .env.local
|
|
38
|
+
`)),process.exit(1)),t}async function Dd(n,t){let o=E.default.join(process.cwd(),cs),i=ce.compile(n,t,n.projectId);await w.default.ensureDir(E.default.dirname(o)),await w.default.writeFile(o,i)}async function Nd(){try{let{apiKey:n}=pn(),t=E.default.join(process.cwd(),cs);if(!await w.default.pathExists(t)||!n)return null;let o=await w.default.readFile(t);return ce.decompile(o,n).data}catch{return null}}async function de(n,t,{method:o="GET",body:i,timeout:a=3e4,retries:l=3}={}){for(let u=0;u<l;u++){let p=new AbortController,m=setTimeout(()=>p.abort(),a);try{let d=await wo(n,{method:o,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json","X-Nexus-CLI":`nexus-cli/${It}`,"User-Agent":`NexusHub-CLI/${It} Node/${process.version}`},body:i?JSON.stringify(i):void 0,signal:p.signal});if(clearTimeout(m),!d.ok){let h=await d.text().catch(()=>d.statusText);throw Object.assign(new Error(`HTTP ${d.status}: ${h}`),{status:d.status})}return await d.json()}catch(d){if(clearTimeout(m),["EPIPE","ECONNRESET","ENOTFOUND","AbortError"].includes(d.code||d.name)&&u<l-1){await fs(Math.pow(2,u)*600);continue}throw d}}}function fs(n){return new Promise(t=>setTimeout(t,n))}function Ql(){let n=process.cwd(),t=ds(E.default.join(n,"package.json"))||{},o={...t.dependencies,...t.devDependencies};if(o.next){let i=Eo.coerce(o.next);return{name:"Next.js",id:"nextjs",router:Eo.gte(Eo.coerce(o.next)?.version||"14.0.0","13.0.0")?"app":"pages"}}return o.remix?{name:"Remix",id:"remix"}:o.nuxt?{name:"Nuxt",id:"nuxt"}:o.gatsby?{name:"Gatsby",id:"gatsby"}:o["@sveltejs/kit"]?{name:"SvelteKit",id:"sveltekit"}:o.astro?{name:"Astro",id:"astro"}:o.react?{name:"React (CRA/Vite)",id:"react"}:o.vue?{name:"Vue 3",id:"vue"}:{name:"Unknown / Vanilla",id:"vanilla"}}function Zl(){let n=process.cwd();return w.default.existsSync(E.default.join(n,"pnpm-lock.yaml"))?"pnpm":w.default.existsSync(E.default.join(n,"yarn.lock"))?"yarn":w.default.existsSync(E.default.join(n,"bun.lockb"))?"bun":"npm"}function Ld(){try{(0,Ge.execSync)("git rev-parse --is-inside-work-tree",{stdio:"pipe"});let n=(0,Ge.execSync)("git remote get-url origin",{stdio:"pipe"}).toString().trim(),t=(0,Ge.execSync)("git branch --show-current",{stdio:"pipe"}).toString().trim();return{hasGit:!0,remote:n,branch:t}}catch{return{hasGit:!1,remote:"",branch:""}}}function ec(){let n=process.cwd();return[".env",".env.local",".env.development",".env.production"].filter(o=>w.default.existsSync(E.default.join(n,o)))}function ds(n){try{return JSON.parse(w.default.readFileSync(n,"utf8"))}catch{return null}}function $e(n){let t={};for(let o of n||[])t[o.name]=kd(o);return t}function kd(n){if(n.defaultValue!==void 0&&n.defaultValue!==null)return n.defaultValue;switch(n.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"SLUG":case"URL":case"EMAIL":case"PHONE":case"PASSWORD":case"COLOR":case"TIME":case"LOTTIE":case"ICON":case"GRADIENT":return"";case"NUMBER":case"CURRENCY":case"PERCENT":case"RATING":case"SCORE":return 0;case"BOOLEAN":return!1;case"DATE":case"DATE_TIME":return null;case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":return null;case"GALLERY":return[];case"OBJECT":return $e(n.fields);case"ARRAY":case"LIST":case"MULTI_SELECT":case"TAG_SELECT":case"REFERENCE_LIST":case"MEDIA_LIST":return[];case"SELECT":return n.options?.[0]??"";case"REFERENCE":return"";case"LOCATION":case"COORDINATES":return{lat:0,lng:0,address:""};case"ADDRESS":return{street:"",city:"",state:"",postalCode:"",country:""};case"SECTION":return n.fields?[$e(n.fields)]:[];default:return null}}function Bd(n){return n.replace(/[-_\s]+(.)/g,(t,o)=>o.toUpperCase()).replace(/^(.)/,t=>t.toUpperCase()).replace(/s$/,"")}async function Dr(n,t,o){let i="";if(await w.default.pathExists(n)&&(i=await w.default.readFile(n,"utf8")),!i.split(`
|
|
39
39
|
`).some(u=>u.startsWith(t+"="))){let u=`${t}=${o}`;return i=i.trimEnd()+`
|
|
40
40
|
`+u+`
|
|
41
|
-
`,await w.default.writeFile(n,i),!0}return!1}async function Ao(n){let t=
|
|
41
|
+
`,await w.default.writeFile(n,i),!0}return!1}async function Ao(n){let t=E.default.join(process.cwd(),pe),o={pages:{},collections:{},globals:{}};if(!await w.default.pathExists(t))return o;let i=E.default.join(t,"pages");if(await w.default.pathExists(i)){for(let u of await w.default.readdir(i))if(u.endsWith(".nx")){let p=E.default.basename(u,".nx"),m=E.default.join(i,u);try{if(n){let d=await w.default.readFile(m),h=ce.decompile(d,n);o.pages[p]=h.data}else o.pages[p]={}}catch{o.pages[p]={}}}}let a=E.default.join(t,"collections");if(await w.default.pathExists(a)){for(let u of await w.default.readdir(a))if(u.endsWith(".nx")){let p=E.default.basename(u,".nx"),m=E.default.join(a,u);try{if(n){let d=await w.default.readFile(m),h=ce.decompile(d,n);o.collections[p]=h.data}else o.collections[p]=[]}catch{o.collections[p]=[]}}}let l=E.default.join(t,"globals.nx");if(await w.default.pathExists(l))try{if(n){let u=await w.default.readFile(l),p=ce.decompile(u,n);o.globals=p.data}else o.globals={}}catch{o.globals={}}return o}async function Te(n,t,o,i,a){let l=E.default.join(process.cwd(),pe),u=ce.compile(o,i,a);n==="page"&&t?(await w.default.ensureDir(E.default.join(l,"pages")),await w.default.writeFile(E.default.join(l,"pages",`${t}.nx`),u)):n==="collection"&&t?(await w.default.ensureDir(E.default.join(l,"collections")),await w.default.writeFile(E.default.join(l,"collections",`${t}.nx`),u)):n==="globals"&&(await w.default.ensureDir(l),await w.default.writeFile(E.default.join(l,"globals.nx"),u))}function tc(n,t){let o=[],i=[];if(!t)return{errors:o,warnings:i};let a=[...t.pages||[],...t.collections||[]];for(let l of a){let u=l.type==="COLLECTION",p=l.apiKey,m=u?n.collections?.[p]:n.pages?.[p];if(!m)continue;let d=u?Array.isArray(m)?m:[m]:[m];for(let[h,C]of d.entries()){let P=u?`${p}[${h}]`:p,A=C.data!==void 0?C.data:C;for(let y of l.fields||[]){let T=A[y.name];if(y.validation?.required&&(T==null||T==="")){o.push(`${P}.${y.name}: required field is missing`);continue}T!=null&&ls(y,T,`${P}.${y.name}`,o,i)}}}return{errors:o,warnings:i}}function ls(n,t,o,i,a){let l=jd(n,t);if(l){a.push(`${o}: ${l}`);return}if(n.type==="OBJECT"&&typeof t=="object"&&t!==null)for(let u of n.fields||[]){let p=t[u.name];u.validation?.required&&(p==null||p==="")?i.push(`${o}.${u.name}: required sub-field is missing`):p!=null&&ls(u,p,`${o}.${u.name}`,i,a)}if(["LIST","ARRAY","SECTION"].includes(n.type)&&Array.isArray(t)){let u=n.fields?.[0];u&&t.forEach((p,m)=>{ls(u,p,`${o}[${m}]`,i,a)})}}function jd(n,t){switch(n.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"SLUG":case"PASSWORD":case"COLOR":case"TIME":case"LOTTIE":case"ICON":case"GRADIENT":if(typeof t!="string")return`expected string, got ${typeof t}`;if(n.validation?.minLength&&t.length<n.validation.minLength)return`too short (min ${n.validation.minLength})`;if(n.validation?.maxLength&&t.length>n.validation.maxLength)return`too long (max ${n.validation.maxLength})`;break;case"EMAIL":if(typeof t!="string")return`expected string, got ${typeof t}`;if(n.validation?.minLength&&t.length<n.validation.minLength)return`too short (min ${n.validation.minLength})`;if(n.validation?.maxLength&&t.length>n.validation.maxLength)return`too long (max ${n.validation.maxLength})`;if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return"invalid email format";break;case"URL":if(typeof t!="string")return`expected string, got ${typeof t}`;if(n.validation?.minLength&&t.length<n.validation.minLength)return`too short (min ${n.validation.minLength})`;if(n.validation?.maxLength&&t.length>n.validation.maxLength)return`too long (max ${n.validation.maxLength})`;try{new URL(t)}catch{return"invalid URL"}break}return null}function Ro(n,t=" "){switch(n.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"URL":case"PHONE":case"SLUG":case"COLOR":case"SELECT":case"PASSWORD":return"string";case"NUMBER":case"PERCENT":case"RATING":case"SCORE":case"CURRENCY":return"number";case"BOOLEAN":return"boolean";case"DATE":case"DATE_TIME":case"TIME":return"string | null";case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":return"{ url: string; alt?: string; mimeType?: string; size?: number }";case"GALLERY":return"Array<{ url: string; alt?: string }>";case"JSON":case"CODE":return"Record<string, unknown>";case"OBJECT":case"SECTION":return n.fields&&n.fields.length>0?`{
|
|
42
42
|
${n.fields.filter(i=>!i.isHidden).map(i=>`${t} ${i.name}${i.validation?.required?"":"?"}: ${Ro(i,t+" ")};`).join(`
|
|
43
43
|
`)}
|
|
44
44
|
${t}}`:"Record<string, unknown>";case"ARRAY":case"LIST":if(n.fields&&n.fields.length>0){let o=n.fields[0];return o.type==="OBJECT"&&o.fields?`Array<{
|
|
@@ -100,26 +100,26 @@ ${t}}>`:`Array<${Ro(o,t)}>`}return"unknown[]";case"REFERENCE":return"string | {
|
|
|
100
100
|
`;for(let l of a)t+=` getCollection(id: '${l.apiKey}', query?: Record<string, unknown>): Promise<{ items: ${l.name}[]; total: number; }>;
|
|
101
101
|
`;return t+=` }
|
|
102
102
|
}
|
|
103
|
-
`,t}function Co(n,t,o=""){let i={added:[],removed:[],modified:[]};if(n===void 0&&t!==void 0)return i.added.push({path:o,value:t}),i;if(n!==void 0&&t===void 0)return i.removed.push({path:o,value:n}),i;if(typeof n!="object"||n===null||typeof t!="object"||t===null)return n!==t&&i.modified.push({path:o,oldVal:n,newVal:t}),i;if(Array.isArray(n)&&Array.isArray(t)){let l=Math.max(n.length,t.length);for(let u=0;u<l;u++){let p=n[u],m=t[u],d=`${o}[${u}]`,h=Co(p,m,d);i.added.push(...h.added),i.removed.push(...h.removed),i.modified.push(...h.modified)}return i}let a=new Set([...Object.keys(n),...Object.keys(t)]);for(let l of a){let u=o?`${o}.${l}`:l,p=Co(n[l],t[l],u);i.added.push(...p.added),i.removed.push(...p.removed),i.modified.push(...p.modified)}return i}function So(n){return typeof n=="object"&&n!==null?JSON.stringify(n):String(n)}async function Fd(){await Nr(),Ce("Content Diff");let{apiKey:n}=rr(),t=
|
|
104
|
-
`)),process.exit(1));let o=
|
|
105
|
-
`));return}console.log(
|
|
106
|
-
`));for(let d of p.added)console.log(
|
|
103
|
+
`,t}function Co(n,t,o=""){let i={added:[],removed:[],modified:[]};if(n===void 0&&t!==void 0)return i.added.push({path:o,value:t}),i;if(n!==void 0&&t===void 0)return i.removed.push({path:o,value:n}),i;if(typeof n!="object"||n===null||typeof t!="object"||t===null)return n!==t&&i.modified.push({path:o,oldVal:n,newVal:t}),i;if(Array.isArray(n)&&Array.isArray(t)){let l=Math.max(n.length,t.length);for(let u=0;u<l;u++){let p=n[u],m=t[u],d=`${o}[${u}]`,h=Co(p,m,d);i.added.push(...h.added),i.removed.push(...h.removed),i.modified.push(...h.modified)}return i}let a=new Set([...Object.keys(n),...Object.keys(t)]);for(let l of a){let u=o?`${o}.${l}`:l,p=Co(n[l],t[l],u);i.added.push(...p.added),i.removed.push(...p.removed),i.modified.push(...p.modified)}return i}function So(n){return typeof n=="object"&&n!==null?JSON.stringify(n):String(n)}async function Fd(){await Nr(),Ce("Content Diff");let{apiKey:n}=rr(),t=E.default.resolve(process.cwd(),To);await w.default.pathExists(t)||(console.log(Z(` No upstream tracking file found. Run npx nexus pull first.
|
|
104
|
+
`)),process.exit(1));let o=Q("Computing local changes against origin/upstream...").start();try{let i=await w.default.readFile(t),{data:a}=ce.decompile(i,n),u=await new hn().getAllData();o.stop();let p=Co(a.data,u);if(p.added.length===0&&p.removed.length===0&&p.modified.length===0){console.log(X(` \u2714 Your local branch is completely up-to-date with upstream. No pending changes.
|
|
105
|
+
`));return}console.log(S.bold(` Pending Changeset:
|
|
106
|
+
`));for(let d of p.added)console.log(S.green(` + [Added] ${d.path}: `)+S.dim(So(d.value)));for(let d of p.removed)console.log(Z(` - [Removed] ${d.path}: `)+S.dim(So(d.value)));for(let d of p.modified)console.log(ue(` ~ [Modified] ${d.path}: `)+Z(`-${So(d.oldVal)} `)+S.green(`+${So(d.newVal)}`));let m=p.added.length+p.removed.length+p.modified.length;console.log(R(`
|
|
107
107
|
Total changes: ${m} (use 'npx nexus push' to publish changesets)
|
|
108
|
-
`))}catch(i){o.isSpinning&&o.stop(),console.error(
|
|
109
|
-
`)),$d(`http://localhost:${t}`)})}catch(d){m.fail(
|
|
108
|
+
`))}catch(i){o.isSpinning&&o.stop(),console.error(Z(` Diff calculation interrupted: ${i.message}`)),process.exit(1)}}function Gl(n){return new Promise((t,o)=>{let i="";n.on("data",a=>{i+=a.toString()}),n.on("end",()=>{try{t(i?JSON.parse(i):{})}catch{o(new Error("Invalid JSON body payload"))}})})}function $d(n){let t=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";try{(0,Ge.execSync)(`${t} ${n}`,{stdio:"ignore"})}catch{}}async function Ud(n){await Nr(),Ce("Sovereign Local Studio");let t=parseInt(n.port||"4646",10),{apiKey:o,projectId:i,apiUrl:a}=rr(n),l=new hn(void 0,o),u={".html":"text/html",".js":"application/javascript",".css":"text/css",".svg":"image/svg+xml",".ico":"image/x-icon"},p=Yl.default.createServer(async(d,h)=>{let C=d.method||"GET",P=d.url||"/",A=P.split("?")[0].split("#")[0];if(h.setHeader("Access-Control-Allow-Origin","*"),h.setHeader("Access-Control-Allow-Methods","GET, POST, PATCH, PUT, OPTIONS"),h.setHeader("Access-Control-Allow-Headers","Content-Type, Authorization"),C==="OPTIONS"){h.writeHead(200),h.end();return}try{if(A==="/api/context"&&C==="GET"){let y="Local Sandbox";try{y=(await Ke(o))?.config?.siteName||"Local Sandbox"}catch{}h.writeHead(200,{"Content-Type":"application/json"}),h.end(JSON.stringify({projectId:i,projectName:y}));return}if(P.startsWith("/api/content/schema/")&&!P.endsWith("/draft")&&C==="GET"){let y=await Ke(o);if(!y){h.writeHead(404,{"Content-Type":"application/json"}),h.end(JSON.stringify({error:"schema.nx binary not found. Please run npx nexus pull."}));return}h.writeHead(200,{"Content-Type":"application/json"}),h.end(JSON.stringify({live:y,draft:y,meta:{lastSaved:new Date().toISOString(),lastPublished:new Date().toISOString()}}));return}if(A.startsWith("/api/content/schema/")&&A.endsWith("/draft")&&C==="PATCH"){let y=await Gl(d);await Po(y.schema,o,i);let T=E.default.join(process.cwd(),pe);for(let x of y.schema.pages||[]){let D=E.default.join(T,"pages",`${x.apiKey}.nx`);if(!await w.default.pathExists(D)){let N=$e(x.fields);await Te("page",x.apiKey,N,o,i)}}for(let x of y.schema.collections||[]){let D=E.default.join(T,"collections",`${x.apiKey}.nx`);if(!await w.default.pathExists(D)){let N=[$e(x.fields)];await Te("collection",x.apiKey,N,o,i)}}let I=new Set((y.schema.pages||[]).map(x=>x.apiKey)),O=E.default.join(T,"pages");if(await w.default.pathExists(O)){let x=await w.default.readdir(O);for(let D of x)if(D.endsWith(".nx")){let N=E.default.basename(D,".nx");I.has(N)||(await w.default.remove(E.default.join(O,D)),console.log(`\u{1F9F9} Local Sync: Purged deleted Page binary (${D})`))}}let $=new Set((y.schema.collections||[]).map(x=>x.apiKey)),j=E.default.join(T,"collections");if(await w.default.pathExists(j)){let x=await w.default.readdir(j);for(let D of x)if(D.endsWith(".nx")){let N=E.default.basename(D,".nx");$.has(N)||(await w.default.remove(E.default.join(j,D)),console.log(`\u{1F9F9} Local Sync: Purged deleted Collection binary (${D})`))}}h.writeHead(200,{"Content-Type":"application/json"}),h.end(JSON.stringify({success:!0,message:"Local schema synchronized. Missing files created, deleted files pruned."}));return}if(A.startsWith("/api/content/")&&A.endsWith("/data")&&C==="GET"){let y=await l.getAllData();h.writeHead(200,{"Content-Type":"application/json"}),h.end(JSON.stringify({data:{...y.pages,...y.collections,globals:y.globals}}));return}if(A.startsWith("/api/content/")&&A.endsWith("/data")&&C==="PUT"){let T=(await Gl(d)).data||{},I=await Ke(o);if(!I)throw new Error("Missing schema.nx file");let O=0,$=0;for(let j of I.pages||[]){let x=j.apiKey;if(T[x]){let D=T[x];for(;D&&typeof D=="object"&&D.data!==void 0;)D=D.data;let N=ce.compile(D,o,i);await w.default.ensureDir(E.default.resolve(process.cwd(),pe,"pages")),await w.default.writeFile(E.default.resolve(process.cwd(),pe,"pages",`${x}.nx`),N),O++}}for(let j of I.collections||[]){let x=j.apiKey;if(T[x]){let D=ce.compile(T[x],o,i);await w.default.ensureDir(E.default.resolve(process.cwd(),pe,"collections")),await w.default.writeFile(E.default.resolve(process.cwd(),pe,"collections",`${x}.nx`),D),$++}}(O>0||$>0)&&console.log(X(` \u2714 Staged and compiled local binary changes (${O} pages, ${$} collections).`)),h.writeHead(200,{"Content-Type":"application/json"}),h.end(JSON.stringify({success:!0,message:"Saved and compiled all local data."}));return}if(A.startsWith("/api/projects/")&&C==="GET"){let y=A.split("/").pop();if(!y)throw new Error("Missing project ID");try{let T=await de(`${a}/projects/${y}`,o,{timeout:1e4});h.writeHead(200,{"Content-Type":"application/json"}),h.end(JSON.stringify(T))}catch{h.writeHead(200,{"Content-Type":"application/json"}),h.end(JSON.stringify({subdomain:"localhost:3000",liveUrl:"http://localhost:3000"}))}return}if(!A.startsWith("/api/")){let y=E.default.join(__dirname,"studio"),T=E.default.join(y,A==="/"||A==="/studio"?"index.html":A);if(!w.default.existsSync(T)&&!A.startsWith("/assets/")&&(T=E.default.join(y,"index.html")),w.default.existsSync(T)&&w.default.statSync(T).isFile()){let I=E.default.extname(T),O=u[I]||"application/octet-stream";h.writeHead(200,{"Content-Type":O}),w.default.createReadStream(T).pipe(h);return}}h.writeHead(404,{"Content-Type":"application/json"}),h.end(JSON.stringify({error:`Route ${C} ${P} not found`}))}catch(y){console.error("[NexusHub CLI] Handshake Error:",y.message),h.writeHead(y.status||500,{"Content-Type":"application/json"}),h.end(JSON.stringify({error:y.message}))}}),m=Q(`Launching local studio API on http://localhost:${t}...`).start();try{p.listen(t,()=>{m.succeed(X(`NexusHub Local Studio: http://localhost:${t}`)),console.log(R(` - Project ID: ${i}`)),console.log(R(` - Press Ctrl+C to gracefully terminate the session.
|
|
109
|
+
`)),$d(`http://localhost:${t}`)})}catch(d){m.fail(Z(`Failed to launch server: ${d.message}`)),process.exit(1)}}async function Wd(){Ce("Project Initialization Wizard");let n=process.cwd();if(us(),await Jl()){console.log(ue(`\u26A0 This project is already initialized with NexusHub.
|
|
110
110
|
`));let{proceed:H}=await Pt.prompt([{type:"confirm",name:"proceed",message:"Re-initialize? This will update your configuration but keep existing data.",default:!1}]);H||(console.log(R(`
|
|
111
111
|
Aborted.
|
|
112
|
-
`)),process.exit(0))}let o=
|
|
112
|
+
`)),process.exit(0))}let o=Q("Scanning project environment...").start();await fs(400);let i=Ql(),a=Zl(),l=Ld(),u=ec(),p=ds(E.default.join(n,"package.json"))||{};o.succeed(X("Environment scanned"));let m=new At({style:{head:[],border:[]},chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"}});m.push([R(" Framework"),S.white(i.name)],[R(" Package Mgr"),S.white(a)],[R(" Git Repo"),l.hasGit?S.white(l.remote||"local"):R("none")],[R(" Env Files"),u.length?S.white(u.join(", ")):R("none found")],[R(" Node"),S.white(process.version)]),console.log(`
|
|
113
113
|
`+m.toString()+`
|
|
114
|
-
`),console.log(
|
|
115
|
-
`));let d=process.env.NEXUS_PROJECT_ID||process.env.NEXT_PUBLIC_NEXUS_ID||"",h=process.env.NEXUS_API_KEY||process.env.NEXT_PUBLIC_NEXUS_KEY||"",C=process.env.NEXUS_API_URL||as;d?console.log(R(` Project ID found in env: ${
|
|
116
|
-
`+
|
|
117
|
-
`));let
|
|
118
|
-
`+
|
|
119
|
-
`));let
|
|
114
|
+
`),console.log(S.bold.white(` \u2460 Credentials & Project
|
|
115
|
+
`));let d=process.env.NEXUS_PROJECT_ID||process.env.NEXT_PUBLIC_NEXUS_ID||"",h=process.env.NEXUS_API_KEY||process.env.NEXT_PUBLIC_NEXUS_KEY||"",C=process.env.NEXUS_API_URL||as;d?console.log(R(` Project ID found in env: ${S.white(d)}`)):d=(await Pt.prompt([{type:"input",name:"projectId",message:"NexusHub Project ID:",validate:Y=>Y.trim().length>4||"Enter a valid project ID"}])).projectId.trim(),h?console.log(R(` API Key found in env: ${S.white("****"+h.slice(-4))}`)):h=(await Pt.prompt([{type:"password",name:"apiKey",message:"NexusHub API Key:",validate:Y=>Y.trim().length>10||"Enter a valid API key"}])).apiKey.trim();let{customUrl:P}=await Pt.prompt([{type:"confirm",name:"customUrl",message:"Use a custom API URL? (No = use default cloud endpoint)",default:!1}]);P&&(C=(await Pt.prompt([{type:"input",name:"apiUrl",message:"API URL:",default:as,validate:Y=>{try{return new URL(Y),!0}catch{return"Invalid URL"}}}])).apiUrl.trim());let A=Q("Verifying credentials with NexusHub API...").start(),y=null,T=null;try{y=await de(`${C}/projects/${d}`,h,{timeout:15e3}),A.succeed(X(`Connected: ${S.white(y?.data?.name||y?.name||d)}`))}catch(H){A.warn(ue(`Could not verify (${H.message}). Continuing offline.`))}if(y){let H=Q("Fetching project schema...").start();try{T=await de(`${C}/content/schema/${d}`,h),T?.draft&&(T=T.draft),H.succeed(X(`Schema loaded: ${T?.pages?.length||0} pages, ${T?.collections?.length||0} collections`))}catch{H.warn(ue("Schema not available. Will use empty scaffold."))}}console.log(`
|
|
116
|
+
`+S.bold.white(` \u2461 Workspace & Features
|
|
117
|
+
`));let I=y?.data?.workspaceMode||y?.workspaceMode||"GENERAL";console.log(` ${X("\u2726")} Workspace Mode: ${S.white(I)} ${R("(auto-synchronized from project)")}`),console.log(`
|
|
118
|
+
`+S.bold.white(` \u2462 Environment Setup
|
|
119
|
+
`));let O=".env.local",$=E.default.join(n,O),{writeEnv:j}=await Pt.prompt([{type:"confirm",name:"writeEnv",message:`Write credentials to ${S.cyan(O)}?`,default:!u.includes(O)}]);if(j){let H=Q(`Writing ${O}...`).start(),Y=0;await Dr($,"NEXUS_PROJECT_ID",d)&&Y++,await Dr($,"NEXUS_API_KEY",h)&&Y++,await Dr($,"NEXUS_API_URL",C)&&Y++,i.id==="nextjs"&&(await Dr($,"NEXT_PUBLIC_NEXUS_ID",d)&&Y++,await Dr($,"NEXT_PUBLIC_NEXUS_KEY",h)&&Y++,await Dr($,"NEXT_PUBLIC_NEXUS_API_URL",C)&&Y++),H.succeed(X(`${Y} variables written to ${O}`));let ie=E.default.join(n,".gitignore");await w.default.pathExists(ie)&&((await w.default.readFile(ie,"utf8")).includes(".env.local")||(await w.default.appendFile(ie,`
|
|
120
120
|
.env.local
|
|
121
|
-
`),console.log(R(" + Added .env.local to .gitignore"))))}let x=
|
|
122
|
-
${ie}`)}let
|
|
121
|
+
`),console.log(R(" + Added .env.local to .gitignore"))))}let x=E.default.join(n,".gitignore");if(await w.default.pathExists(x)){let H=await w.default.readFile(x,"utf8"),Y=[".nexus/cache.json",".nexus/local/"];for(let ie of Y)H.includes(ie)||await w.default.appendFile(x,`
|
|
122
|
+
${ie}`)}let D=Q("Scaffolding NexusHub workspace...").start(),N=["local_cache","schema_validate","type_gen","analytics","deploy"],ee={version:It,projectId:d,apiUrl:C,workspace:I,features:N,cacheStrategy:"memory",framework:i.id,createdAt:new Date().toISOString()};await w.default.ensureDir(E.default.join(n,Ot)),await Dd(ee,h);let Ve={schemaVersion:"1.0",projectId:d,lastPublished:null,lastModified:new Date().toISOString(),config:{siteName:p.name||"My Project"},pages:[],collections:[]},ye=T||Ve;await Po(ye,h,d),await w.default.ensureDir(E.default.join(n,pe,"pages")),await w.default.ensureDir(E.default.join(n,pe,"collections"));let Dt=0,mn=0;for(let H of ye.pages||[]){let Y=E.default.join(n,pe,"pages",`${H.apiKey}.nx`);if(!await w.default.pathExists(Y)){let ie=$e(H.fields);await Te("page",H.apiKey,ie,h,d),Dt++}}for(let H of ye.collections||[]){let Y=E.default.join(n,pe,"collections",`${H.apiKey}.nx`);if(!await w.default.pathExists(Y)){let ie=[$e(H.fields)];await Te("collection",H.apiKey,ie,h,d),mn++}}let Lr=E.default.join(n,pe,"globals.nx");if(!await w.default.pathExists(Lr)){let H={siteName:p.name||"My Project",navigation:[],footer:{copyright:`\xA9 ${new Date().getFullYear()}`}};await Te("globals",null,H,h,d)}if(await w.default.writeFile(E.default.join(n,Ot,"README.md"),`# NexusHub Workspace
|
|
123
123
|
|
|
124
124
|
## Directory Structure
|
|
125
125
|
|
|
@@ -154,7 +154,7 @@ instead of making network calls. Edit the JSON files directly, then run
|
|
|
154
154
|
\`npx nexus push\` to upload your changes.
|
|
155
155
|
|
|
156
156
|
Empty schema values are intentional placeholders \u2014 fill them with your content.
|
|
157
|
-
`),N.includes("type_gen")&&(ye.pages?.length||0)+(ye.collections?.length||0)>0){let H=rc(ye),Y=
|
|
157
|
+
`),N.includes("type_gen")&&(ye.pages?.length||0)+(ye.collections?.length||0)>0){let H=rc(ye),Y=E.default.resolve(n,"types/nexus.d.ts");await w.default.ensureDir(E.default.dirname(Y)),await w.default.writeFile(Y,H),console.log(R(" + Generated types/nexus.d.ts"))}if(await Od(ee),D.succeed(X("Workspace scaffolded")),i.id==="nextjs"){let H=E.default.join(n,"src/app"),Y=E.default.join(n,"app"),ie="";if(w.default.existsSync(H)?ie=E.default.join(H,"api","revalidate"):w.default.existsSync(Y)&&(ie=E.default.join(Y,"api","revalidate")),ie){let be=E.default.join(ie,"route.ts");if(!await w.default.pathExists(be)){let _e=`// app/api/revalidate/route.ts
|
|
158
158
|
//
|
|
159
159
|
// \u{1F6F0}\uFE0F GN-APEX EDGE REVALIDATION GATEWAY
|
|
160
160
|
//
|
|
@@ -231,116 +231,96 @@ export async function GET(request: NextRequest) {
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
`;await w.default.ensureDir(ie),await w.default.writeFile(be,_e),console.log(R(" + Auto-Injected Next.js On-Demand Revalidation API Route"))}}}console.log(`
|
|
234
|
-
`+
|
|
235
|
-
`));let De=
|
|
236
|
-
--- Installer Diagnostic Logs ---`)),console.log(
|
|
234
|
+
`+S.bold.white(` \u2463 Provisioning Dependencies
|
|
235
|
+
`));let De=Q("Installing SDK and Edge Adapters...").start(),nr=["@nexushub/client"],Nt=[];i.id==="nextjs"&&!oc()&&Nt.push("@opennextjs/cloudflare@^1.19.4");let gn=a==="npm"?"npm install":`${a} add`,Io=a==="npm"?"npm install -D":`${a} add -D`,kr=a==="npm"?"npx":a==="bun"?"bunx":"pnpx",yn=(H,Y)=>{try{(0,Ge.execSync)(`${H} ${Y.join(" ")}`,{stdio:"pipe"})}catch(ie){if(a==="npm")try{(0,Ge.execSync)(`${H} ${Y.join(" ")} --legacy-peer-deps`,{stdio:"pipe"});return}catch{throw ie}throw ie}};try{if(yn(gn,nr),Nt.length>0)if(yn(Io,Nt),w.default.existsSync(E.default.resolve(process.cwd(),"wrangler.json"))||w.default.existsSync(E.default.resolve(process.cwd(),"wrangler.toml")))console.log(R(" - Wrangler configuration detected. Skipping adapter migration."));else{(0,Ge.execSync)(`${kr} opennextjs-cloudflare migrate`,{stdio:"ignore"});let Y=E.default.resolve(process.cwd(),"wrangler.json"),ie=E.default.resolve(process.cwd(),"wrangler.toml");w.default.existsSync(Y)&&await w.default.remove(Y),w.default.existsSync(ie)&&await w.default.remove(ie)}De.succeed(X("Dependencies successfully provisioned"))}catch(H){De.warn(ue("Auto-installation encountered a conflict. See diagnostic logs below.")),H.stderr?(console.log(R(`
|
|
236
|
+
--- Installer Diagnostic Logs ---`)),console.log(Z(H.stderr.toString().trim())),console.log(R(` ---------------------------------
|
|
237
237
|
`))):H.stdout&&console.log(R(H.stdout.toString().trim()+`
|
|
238
238
|
`))}console.log(`
|
|
239
|
-
`+
|
|
239
|
+
`+S.bold.white(` \u2464 Integration Snippet
|
|
240
240
|
`)),i.id==="nextjs"?(console.log(R(` Add this to your Next.js project:
|
|
241
|
-
`)),console.log(
|
|
241
|
+
`)),console.log(S.bgGray.white(" // lib/nexus.ts ")),console.log(S.cyan(` import { createNexusClient } from '@nexushub/client';
|
|
242
242
|
export const nexus = createNexusClient({
|
|
243
243
|
projectId: process.env.NEXT_PUBLIC_NEXUS_ID!,
|
|
244
244
|
apiKey: process.env.NEXT_PUBLIC_NEXUS_KEY!,
|
|
245
245
|
});
|
|
246
|
-
`))):i.id==="sveltekit"?console.log(
|
|
246
|
+
`))):i.id==="sveltekit"?console.log(S.cyan(` import { createNexusClient } from '@nexushub/client';
|
|
247
247
|
export const nexus = createNexusClient({
|
|
248
248
|
projectId: import.meta.env.VITE_NEXUS_ID,
|
|
249
249
|
apiKey: import.meta.env.VITE_NEXUS_KEY,
|
|
250
250
|
});
|
|
251
|
-
`)):console.log(
|
|
251
|
+
`)):console.log(S.cyan(` import { createNexusClient } from '@nexushub/client';
|
|
252
252
|
export const nexus = createNexusClient({
|
|
253
253
|
projectId: process.env.NEXUS_PROJECT_ID,
|
|
254
254
|
apiKey: process.env.NEXUS_API_KEY,
|
|
255
255
|
});
|
|
256
|
-
`));let Br=new At({style:{head:[],border:[]}});Br.push([R(" Status"),X("\u2714 Initialized")],[R(" Project"),
|
|
257
|
-
`+
|
|
258
|
-
`))}async function Md(n){Ce("Content Sync \u2014 Pull from Remote");let{apiKey:t,projectId:o,apiUrl:i}=rr(n),a=
|
|
259
|
-
`+
|
|
260
|
-
`)}catch(l){a.fail(
|
|
256
|
+
`));let Br=new At({style:{head:[],border:[]}});Br.push([R(" Status"),X("\u2714 Initialized")],[R(" Project"),S.white(d)],[R(" Workspace"),S.white(I)],[R(" Features"),S.white(N.join(", ")||"none")],[R(" Framework"),S.white(i.name)],[R(" Pages"),S.white(String(Dt+((ye.pages?.length||0)-Dt)))],[R(" Collections"),S.white(String(ye.collections?.length||0))]),console.log(Br.toString()),console.log(`
|
|
257
|
+
`+S.bold(" Next Steps:")),console.log(R(` 1. Pull content: ${S.white("npx nexus pull")}`)),console.log(R(` 2. Validate data: ${S.white("npx nexus validate")}`)),console.log(R(` 3. Generate types: ${S.white("npx nexus types")}
|
|
258
|
+
`))}async function Md(n){Ce("Content Sync \u2014 Pull from Remote");let{apiKey:t,projectId:o,apiUrl:i}=rr(n),a=Q("Connecting to NexusHub API...").start();try{a.text="Pulling schema...";let l=null;try{l=await de(`${i}/content/schema/${o}`,t),l?.draft&&(l=l.draft),await Po(l,t,o),a.text="Schema updated \u2713"}catch{a.text="Schema unavailable, using cached";try{l=await Ke(t)}catch{}}a.text="Pulling pages...";let u=[];try{let y=await de(`${i}/content/${o}/pages`,t);u=y?.data||y||[]}catch(y){a.warn(ue(` Pages: ${y.message}`))}a.text="Pulling collections...";let p={};if(l?.collections?.length)for(let y of l.collections)try{let T=await de(`${i}/content/${o}/collection/${y.apiKey}?limit=1000`,t),I=T?.items||T?.data||T||[];p[y.apiKey]=I,n.writeLocal!==!1&&await Te("collection",y.apiKey,I,t,o)}catch{if(n.writeLocal!==!1){let T=[$e(y.fields)];await Te("collection",y.apiKey,T,t,o),p[y.apiKey]=T}}a.text="Pulling globals...";let m={};try{let y=await de(`${i}/content/${o}/globals`,t);m=y?.data||y||{},await Te("globals",null,m,t,o)}catch{}if(Array.isArray(u))for(let y of u){let T=y.slug||y.id;T&&await Te("page",T,y,t,o)}if(l?.pages)for(let y of l.pages){let T=E.default.join(process.cwd(),pe,"pages",`${y.apiKey}.nx`);if(!await w.default.pathExists(T)){let I=$e(y.fields);await Te("page",y.apiKey,I,t,o),u.push({slug:y.apiKey,data:I})}}let d={pages:Array.isArray(u)?u:[],collections:p,globals:m,meta:{pulledAt:new Date().toISOString(),projectId:o,apiUrl:i,count:{pages:Array.isArray(u)?u.length:0,collections:Object.keys(p).length}}},h={projectId:o,pulledAt:new Date().toISOString(),data:{pages:u.reduce((y,T)=>(y[T.slug]=T.data||T,y),{}),collections:p,globals:m}},C=E.default.resolve(process.cwd(),To),P=ce.compile(h,t,o);await w.default.writeFile(C,P),a.succeed(X("Content pulled and synchronized successfully"));let A=new At({style:{head:[],border:[]}});A.push([R(" Pages Pulled"),S.white(String(u.length))],[R(" Collections Pulled"),S.white(String(l?.collections?.length||0))],[R(" Globals File"),S.white(Object.keys(m).length?"synchronized":"empty")],[R(" Local Directory"),S.white(pe)],[R(" Pulled at"),S.white(new Date().toLocaleString())]),console.log(`
|
|
259
|
+
`+A.toString()+`
|
|
260
|
+
`)}catch(l){a.fail(Z("Pull failed: "+l.message)),l.status===401&&console.log(R(" \u2192 Check your NEXUS_API_KEY")),l.status===404&&console.log(R(" \u2192 Check your NEXUS_PROJECT_ID")),process.exit(1)}}async function nc(n){Ce("Content Sync \u2014 Push to Remote");let{apiKey:t,projectId:o,apiUrl:i}=rr(n),a=E.default.resolve(process.cwd(),To);if(await w.default.pathExists(a)){let d=await w.default.readFile(a),{data:h}=ce.decompile(d,t),C=Q("Checking remote repository state...").start();try{let P=await de(`${i}/projects/${o}`,t,{timeout:1e4}),A=P?.data||P;C.stop();let y=new Date(A.updatedAt).getTime(),T=new Date(h.pulledAt).getTime();y>T+3e3&&(console.log(Z(`
|
|
261
261
|
\u{1F6A8} CONFLICT DETECTED: Upstream database is newer than your local sandbox.`)),console.log(R(` - Last Local Pull: ${new Date(T).toLocaleString()}`)),console.log(R(` - Remote Updated: ${new Date(y).toLocaleString()}`)),console.log(R(" Push aborted to prevent overwriting coworker changes.")),console.log(R(` Run 'npx nexus pull' to fetch upstream, or 'npx nexus push --force' to overwrite.
|
|
262
|
-
`)),n.force||process.exit(1),console.log(ue("\u26A0\uFE0F Fulfillment Gated: --force flag active. Overwriting remote...")))}catch(P){C.warn(ue(`Could not complete conflict handshake (${P.message}). Proceeding.`))}}let l=null;try{l=await Ke(t)}catch{}let u=
|
|
262
|
+
`)),n.force||process.exit(1),console.log(ue("\u26A0\uFE0F Fulfillment Gated: --force flag active. Overwriting remote...")))}catch(P){C.warn(ue(`Could not complete conflict handshake (${P.message}). Proceeding.`))}}let l=null;try{l=await Ke(t)}catch{}let u=Q("Reading local data...").start(),p=await Ao(t);if(u.succeed(`Local data compiled: ${Object.keys(p.pages).length} pages, ${Object.keys(p.collections).length} collections`),l){let d=Q("Validating against schema...").start(),{errors:h,warnings:C}=tc(p,l);if(h.length){d.fail(Z(`Schema validation failed: ${h.length} error(s)`));for(let P of h)console.log(Z(` \u2716 ${P}`));if(!n.force){let{proceed:P}=await Pt.prompt([{type:"confirm",name:"proceed",message:"Push anyway?",default:!1}]);P||(console.log(R(`
|
|
263
263
|
Aborted.
|
|
264
264
|
`)),process.exit(0))}}else if(d.succeed(X("Validation passed"+(C.length?` (${C.length} warnings)`:""))),C.length)for(let P of C)console.log(ue(` \u26A0 ${P}`))}if(await w.default.pathExists(a)){let d=await w.default.readFile(a),{data:h}=ce.decompile(d,t),C=Co(h.data,p);if(!(C.added.length>0||C.removed.length>0||C.modified.length>0)&&!n.force){console.log(X(`
|
|
265
265
|
\u2714 Everything up-to-date. No pending changesets to push.
|
|
266
266
|
`));return}}if(n.dryRun){console.log(ue(`
|
|
267
267
|
Dry-run mode \u2014 nothing will be pushed.
|
|
268
|
-
`)),console.log(R(" Would push unified changeset:"));for(let d of Object.keys(p.pages))console.log(R(` page ${d}`));for(let[d,h]of Object.entries(p.collections))console.log(R(` collection ${d} (${Array.isArray(h)?h.length:1} items)`));Object.keys(p.globals).length&&console.log(R(` globals ${Object.keys(p.globals).length} keys`)),console.log();return}let m=
|
|
269
|
-
`))}catch(d){m.fail(
|
|
268
|
+
`)),console.log(R(" Would push unified changeset:"));for(let d of Object.keys(p.pages))console.log(R(` page ${d}`));for(let[d,h]of Object.entries(p.collections))console.log(R(` collection ${d} (${Array.isArray(h)?h.length:1} items)`));Object.keys(p.globals).length&&console.log(R(` globals ${Object.keys(p.globals).length} keys`)),console.log();return}let m=Q("Packaging and pushing local workspace live...").start();try{l&&(m.text="Syncing and Publishing Schema...",await de(`${i}/content/schema/${o}/draft`,t,{method:"PATCH",body:{schema:l}}),await de(`${i}/content/schema/${o}/publish`,t,{method:"POST"})),m.text="Uploading Content Data...";let d={...p.pages,...p.collections,globals:p.globals},h=`${i}/content/${o}/data`;await de(h,t,{method:"PUT",body:{data:d}});let C={projectId:o,pulledAt:new Date().toISOString(),data:{pages:p.pages,collections:p.collections,globals:p.globals}},P=E.default.resolve(process.cwd(),To),A=ce.compile(C,t,o);await w.default.writeFile(P,A),m.succeed(X("Push & Publish completed successfully!")),console.log(X(` \u2714 Schema published and all changes successfully synced to NexusHub Global Edge.
|
|
269
|
+
`))}catch(d){m.fail(Z("Push transaction failed")),console.error(Z(` Error: ${d.message}`)),process.exit(1)}}async function qd(){Ce("Schema Validator");let{apiKey:n}=pn(),t=null;try{t=await Ke(n)}catch{console.log(Z(" No schema found. Run `npx nexus pull` first.\n")),process.exit(1)}let o=await Ao(n),i=Q("Validating local data...").start();await fs(200);let{errors:a,warnings:l}=tc(o,t);if(i.stop(),a.length===0&&l.length===0){console.log(X(`
|
|
270
270
|
\u2714 All local data is valid and matches the schema.
|
|
271
|
-
`));return}if(a.length){console.log(
|
|
271
|
+
`));return}if(a.length){console.log(Z(`
|
|
272
272
|
\u2716 ${a.length} error(s) found:
|
|
273
|
-
`));for(let u of a)console.log(
|
|
273
|
+
`));for(let u of a)console.log(Z(` \u2022 ${u}`))}if(l.length){console.log(ue(`
|
|
274
274
|
\u26A0 ${l.length} warning(s):
|
|
275
|
-
`));for(let u of l)console.log(ue(` \u2022 ${u}`))}console.log(),a.length>0&&process.exit(1)}async function zd(n){Ce("Schema Inspector");let{apiKey:t,projectId:o,apiUrl:i}=pn(n),a=null;try{a=await Ke(t)}catch{console.log(
|
|
275
|
+
`));for(let u of l)console.log(ue(` \u2022 ${u}`))}console.log(),a.length>0&&process.exit(1)}async function zd(n){Ce("Schema Inspector");let{apiKey:t,projectId:o,apiUrl:i}=pn(n),a=null;try{a=await Ke(t)}catch{console.log(Z(" No schema found. Run `npx nexus pull` or `npx nexus init` first.\n")),process.exit(1)}if(n.refresh&&t&&o){let u=Q("Refreshing schema from API...").start();try{let p=await de(`${i}/content/schema/${o}`,t);p?.draft&&(p=p.draft),await Po(p,t,o),a=p,u.succeed(X("Schema refreshed"))}catch(p){u.warn(ue("Could not refresh: "+p.message))}}console.log(S.bold(`
|
|
276
276
|
Schema Summary
|
|
277
|
-
`));let l=new At({head:[R("Type"),R("API Key"),R("Fields"),R("Versioning"),R("Cache")],style:{head:[],border:[]}});for(let u of[...a.pages||[],...a.collections||[]])l.push([u.type==="COLLECTION"?
|
|
277
|
+
`));let l=new At({head:[R("Type"),R("API Key"),R("Fields"),R("Versioning"),R("Cache")],style:{head:[],border:[]}});for(let u of[...a.pages||[],...a.collections||[]])l.push([u.type==="COLLECTION"?S.cyan("Collection"):S.magenta("Singleton"),S.white(u.apiKey),S.white(String(u.fields?.length||0)),u.enableVersioning?X("\u2714"):R("\u2014"),S.white(u.cacheStrategy||"stale-while-revalidate")]);if(console.log(l.toString()),n.fields){let u=[...a.pages||[],...a.collections||[]].find(m=>m.apiKey===n.fields);if(!u){console.log(Z(`
|
|
278
278
|
Node '${n.fields}' not found in schema.
|
|
279
|
-
`));return}console.log(
|
|
279
|
+
`));return}console.log(S.bold(`
|
|
280
280
|
Fields: ${u.name} (${u.apiKey})
|
|
281
|
-
`));let p=new At({head:[R("Name"),R("Type"),R("Required"),R("Default")],style:{head:[],border:[]}});for(let m of u.fields||[])p.push([
|
|
281
|
+
`));let p=new At({head:[R("Name"),R("Type"),R("Required"),R("Default")],style:{head:[],border:[]}});for(let m of u.fields||[])p.push([S.white(m.name),S.cyan(m.type),m.validation?.required?X("\u2714"):R("\u2014"),m.defaultValue!==void 0?S.white(JSON.stringify(m.defaultValue)):R("\u2014")]);console.log(p.toString())}console.log()}async function Hd(n){Ce("TypeScript Definition Generator");let{apiKey:t,projectId:o,apiUrl:i}=pn(n),a=null;try{a=await Ke(t)}catch{console.log(Z(" No schema found. Run `npx nexus pull` first.\n")),process.exit(1)}if(n.refresh&&t&&o){let h=Q("Refreshing schema...").start();try{let C=await de(`${i}/content/schema/${o}`,t);C?.draft&&(C=C.draft),a=C,await w.default.writeJson(E.default.join(process.cwd(),vo),a,{spaces:2}),h.succeed(X("Schema refreshed"))}catch(C){h.warn(ue("Using cached schema: "+C.message))}}let l=Q("Generating TypeScript definitions...").start(),u=rc(a),p=E.default.resolve(process.cwd(),n.output||"types/nexus.d.ts");await w.default.ensureDir(E.default.dirname(p)),await w.default.writeFile(p,u),l.succeed(X(`Types written to ${E.default.relative(process.cwd(),p)}`));let m=u.split(`
|
|
282
282
|
`).length,d=(a.pages?.length||0)+(a.collections?.length||0);console.log(R(`
|
|
283
283
|
${d} interfaces \xB7 ${m} lines
|
|
284
|
-
`))}async function Gd(n){Ce("Project Status");let{apiKey:t,projectId:o,apiUrl:i}=rr(n),a=await Nd(),l=await Jl(),u=await Ao(),p=new At({style:{head:[],border:[]}});p.push([R(" Project ID"),
|
|
285
|
-
`+p.toString());let m=
|
|
286
|
-
`+C.toString())}catch(d){m.warn(ue("Remote: Could not connect ("+d.message+")"))}console.log()}async function Kd(n){Ce("Edge Deployment Protocol");let{apiKey:t,projectId:o,apiUrl:i}=rr(n),a=Zl(),l=a==="npm"?"npx":a==="bun"?"bunx":"pnpx",u=Ql(),p=
|
|
284
|
+
`))}async function Gd(n){Ce("Project Status");let{apiKey:t,projectId:o,apiUrl:i}=rr(n),a=await Nd(),l=await Jl(),u=await Ao(),p=new At({style:{head:[],border:[]}});p.push([R(" Project ID"),S.white(o)],[R(" SDK Version"),S.white(It)],[R(" Initialized"),S.white(l?new Date(l.initializedAt).toLocaleString():"\u2014")],[R(" Workspace"),S.white(a?.workspace||"GENERAL")],[R(" Framework"),S.white(a?.framework||"\u2014")],[R(" Local Pages"),S.white(String(Object.keys(u.pages).length))],[R(" Local Cols"),S.white(String(Object.keys(u.collections).length))],[R(" Features"),S.white((a?.features||[]).join(", ")||"\u2014")]),console.log(`
|
|
285
|
+
`+p.toString());let m=Q("Fetching remote project status...").start();try{let d=await de(`${i}/projects/${o}`,t,{timeout:1e4}),h=d?.data||d;m.succeed(X("Remote: Connected"));let C=new At({style:{head:[],border:[]}});C.push([R(" Project Name"),S.white(h.name||"\u2014")],[R(" Status"),S.white(h.status||"\u2014")],[R(" Type"),S.white(h.type||"\u2014")],[R(" Live URL"),h.liveUrl?S.cyan(h.liveUrl):R("\u2014")],[R(" Last Updated"),S.white(h.updatedAt?new Date(h.updatedAt).toLocaleString():"\u2014")],[R(" Subscription"),S.white(h.subscriptionTier||"\u2014")]),console.log(`
|
|
286
|
+
`+C.toString())}catch(d){m.warn(ue("Remote: Could not connect ("+d.message+")"))}console.log()}async function Kd(n){Ce("Edge Deployment Protocol");let{apiKey:t,projectId:o,apiUrl:i}=rr(n),a=Zl(),l=a==="npm"?"npx":a==="bun"?"bunx":"pnpx",u=Ql(),p=Q("[1/4] Verifying project handshake...").start(),m;try{let j=await de(`${i}/projects/${o}`,t);m=j?.data||j,p.succeed(S.green("Connected: "+m.name))}catch(j){p.fail(Z("Cannot connect to NexusHub API: "+j.message)),process.exit(1)}if(!!(m.githubOwner&&m.githubRepo)){let j=Q("[2/4] Initiating remote build pipeline...").start();try{let x=await de(`${i}/projects/${o}/deploy`,t,{method:"POST",body:{environment:n.environment||"production",trigger:"cli"}});j.succeed(X("Remote pipeline activated")),console.log(R(` Deployment ID: ${S.white(x.deploymentId||"\u2014")}`)),console.log(R(` Repository: ${S.white(m.githubOwner+"/"+m.githubRepo)}`)),console.log(S.cyan(`
|
|
287
287
|
\u2728 NexusHub is managing the build. Check your dashboard for progress.
|
|
288
|
-
`))}catch(x){
|
|
289
|
-
import { revalidatePath } from "next/cache";
|
|
290
|
-
|
|
291
|
-
export async function GET(request: NextRequest) {
|
|
292
|
-
const secret = request.nextUrl.searchParams.get("secret");
|
|
293
|
-
const apiKey = process.env.NEXT_PUBLIC_NEXUS_KEY || process.env.NEXUS_API_KEY;
|
|
294
|
-
|
|
295
|
-
if (!secret || secret !== apiKey) {
|
|
296
|
-
return NextResponse.json({ message: "Unauthorized Handshake" }, { status: 401 });
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
try {
|
|
300
|
-
revalidatePath("/", "layout");
|
|
301
|
-
return NextResponse.json({ revalidated: true, now: Date.now() });
|
|
302
|
-
} catch (err: any) {
|
|
303
|
-
return NextResponse.json({ message: err.message }, { status: 500 });
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
`;await w.default.ensureDir(A),await w.default.writeFile(N,Q),console.log(R(" - Self-Healed: Regenerated missing Next.js revalidation route."))}}}let C=m.cloudflareProjectName||m.subdomain||"",P=S.default.resolve(process.cwd(),"wrangler.json"),I=S.default.resolve(process.cwd(),"wrangler.toml"),y=S.default.resolve(process.cwd(),"open-next.config.ts"),T=Z("[2/4] Securing edge deployment token and database bindings...").start(),O,D,$;try{let k=await de(`${i}/devops/projects/${o}/deploy/token`,t,{method:"POST",timeout:6e4});O=k.token,D=k.accountId,$=k.d1DatabaseId,T.succeed(E.gray("Token issued (15min validity)"))}catch(k){T.fail(ee("Token request failed: "+k.message)),process.exit(1)}try{if(!h){w.default.existsSync(P)&&await w.default.remove(P),w.default.existsSync(I)&&await w.default.remove(I);let N=[];$&&N.push({binding:"NEXT_TAG_CACHE_D1",database_id:$,database_name:`${C.toLowerCase().trim()}-tag-cache`});let Q={name:C,main:".open-next/worker.js",compatibility_date:"2026-06-25",compatibility_flags:["nodejs_compat"],assets:{directory:".open-next/assets"},r2_buckets:[{binding:"NEXT_INC_CACHE_R2_BUCKET",bucket_name:`${C}-cache-r2`}],d1_databases:N,durable_objects:{bindings:[{name:"NEXT_CACHE_DO_QUEUE",class_name:"DOQueueHandler"}]},migrations:[{tag:"v1",new_sqlite_classes:["DOQueueHandler"]}],vars:{NEXT_PUBLIC_NEXUS_ID:o,NEXT_PUBLIC_NEXUS_KEY:t,NEXT_PUBLIC_NEXUS_API_URL:i,REVALIDATE_WEBHOOK_SECRET:t}};await w.default.writeJson(P,Q,{spaces:2})}if(!h&&u.id==="nextjs"&&(w.default.existsSync(y)&&await w.default.remove(y),await w.default.writeFile(y,`import { defineCloudflareConfig } from "@opennextjs/cloudflare";
|
|
288
|
+
`))}catch(x){j.fail(Z(x.message)),process.exit(1)}return}let h=oc(),C=m.cloudflareProjectName||m.subdomain||"",P=E.default.resolve(process.cwd(),"wrangler.json"),A=E.default.resolve(process.cwd(),"wrangler.toml"),y=E.default.resolve(process.cwd(),"open-next.config.ts"),T=Q("[2/4] Securing edge deployment token and database bindings...").start(),I,O,$;try{let j=await de(`${i}/devops/projects/${o}/deploy/token`,t,{method:"POST",timeout:6e4});I=j.token,O=j.accountId,$=j.d1DatabaseId,T.succeed(S.gray("Token issued (15min validity)"))}catch(j){T.fail(Z("Token request failed: "+j.message)),process.exit(1)}try{if(!h){w.default.existsSync(P)&&await w.default.remove(P),w.default.existsSync(A)&&await w.default.remove(A);let N=[];$&&N.push({binding:"NEXT_TAG_CACHE_D1",database_id:$,database_name:`${C.toLowerCase().trim()}-tag-cache`});let ee={name:C,main:".open-next/worker.js",compatibility_date:"2026-06-25",compatibility_flags:["nodejs_compat"],assets:{directory:".open-next/assets",binding:"ASSETS"},r2_buckets:[{binding:"NEXT_INC_CACHE_R2_BUCKET",bucket_name:`${C}-cache-r2`}],d1_databases:N,vars:{NEXT_PUBLIC_NEXUS_ID:o,NEXT_PUBLIC_NEXUS_KEY:t,NEXT_PUBLIC_NEXUS_API_URL:i,REVALIDATE_WEBHOOK_SECRET:t}};await w.default.writeJson(P,ee,{spaces:2})}if(!h&&u.id==="nextjs"&&(w.default.existsSync(y)&&await w.default.remove(y),await w.default.writeFile(y,`import { defineCloudflareConfig } from "@opennextjs/cloudflare";
|
|
307
289
|
import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";
|
|
308
290
|
import d1NextTagCache from "@opennextjs/cloudflare/overrides/tag-cache/d1-next-tag-cache";
|
|
309
|
-
import doQueue from "@opennextjs/cloudflare/overrides/queue/do-queue";
|
|
310
291
|
|
|
311
292
|
export default defineCloudflareConfig({
|
|
312
293
|
incrementalCache: r2IncrementalCache,
|
|
313
294
|
tagCache: d1NextTagCache,
|
|
314
|
-
queue: doQueue,
|
|
315
295
|
enableCacheInterception: true,
|
|
316
296
|
});
|
|
317
|
-
`),console.log(R(" - Auto-injected: open-next.config.ts (D1 Tag Cache enabled)"))),h){let N=
|
|
318
|
-
${
|
|
319
|
-
${
|
|
297
|
+
`),console.log(R(" - Auto-injected: open-next.config.ts (D1 Tag Cache enabled)"))),h){let N=Q("[3/4] Building static production artifacts...").start();try{(0,Ge.execSync)(`${a} run build`,{stdio:"pipe",env:{...process.env,NODE_ENV:"production",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),N.succeed(X("Build complete"))}catch(ee){N.fail(Z("Build failed")),ee.stderr&&console.log(S.red(`
|
|
298
|
+
${ee.stderr.toString()}`)),process.exit(1)}}else{let N=Q("[3/4] Compiling and adapting Next.js for the Edge...").start();try{(0,Ge.execSync)(`${l} opennextjs-cloudflare build`,{stdio:"pipe",env:{...process.env,NODE_ENV:"production",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),N.succeed(X("Edge adaptation and compilation complete"))}catch(ee){N.fail(Z("Edge adaptation failed. Did you run 'npx nexus init'?")),ee.stderr&&console.log(S.red(`
|
|
299
|
+
${ee.stderr.toString()}`)),process.exit(1)}}let j=Q("[4/4] Deploying live to NexusHub Global Edge...").start();try{let N=require.resolve("wrangler/package.json"),ee=await w.default.readJson(N),Ve=typeof ee.bin=="string"?ee.bin:ee.bin?.wrangler||"bin/wrangler.js",ye=E.default.resolve(E.default.dirname(N),Ve);(0,Ge.execSync)(`node ${ye} deploy`,{stdio:"pipe",env:{...process.env,CLOUDFLARE_API_TOKEN:I,CLOUDFLARE_ACCOUNT_ID:O,WRANGLER_OUTPUT_FILE_PATH:"/dev/null",NO_COLOR:"1",CI:"true",NODE_OPTIONS:"--dns-result-order=ipv4first"}}),j.succeed(X("Edge deployment complete"))}catch(N){j.fail(Z("Edge transfer failed")),N.stderr&&console.error(R(`
|
|
320
300
|
--- Edge Logs ---
|
|
321
301
|
${N.stderr.toString()}
|
|
322
|
-
`)),process.exit(1)}let x=
|
|
323
|
-
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`)),console.log(` ${X("\u2714")} Platform successfully compiled and active on the Edge.`),console.log(` \u{1F30D} ${
|
|
324
|
-
`))}finally{let
|
|
325
|
-
${
|
|
302
|
+
`)),process.exit(1)}let x=Q("[5/5] Synchronizing global edge routing...").start();try{await de(`${i}/devops/projects/${o}/deploy/complete`,t,{method:"POST",body:{status:"success",environment:n.environment||"production"}}),x.succeed(X("Global routing synchronized"))}catch{x.warn(ue("Synchronized partially (Site is live, DNS propagation pending)"))}let D=m.liveUrl||`https://${m.subdomain}.gnexus.co.tz`;console.log(S.gray(`
|
|
303
|
+
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`)),console.log(` ${X("\u2714")} Platform successfully compiled and active on the Edge.`),console.log(` \u{1F30D} ${S.bold.white("Live URL:")} ${S.bold.cyan(D)}`),console.log(S.gray(` \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
304
|
+
`))}finally{let j=[P,E.default.resolve(process.cwd(),".wrangler"),y];for(let x of j)try{await w.default.pathExists(x)&&await w.default.remove(x)}catch{}}}function oc(){for(let n of["next.config.ts","next.config.mjs","next.config.js"])try{let t=w.default.readFileSync(E.default.join(process.cwd(),n),"utf8");if(/output\s*[:=]\s*['"]export['"]/.test(t))return!0}catch{}return!1}function Vd(){Ce("Local Workspace Manager"),console.log(` Your local staging database is fully compiled and secured inside the
|
|
305
|
+
${S.cyan(".nexus/local/")} directory using cryptographic ${S.bold(".nx")} binary files.
|
|
326
306
|
This keeps your local sandbox 100% secure and offline-ready.
|
|
327
|
-
`);let n=new At({head:[
|
|
328
|
-
`),console.log(` ${ue("\u{1F4A1} Tip:")} Run ${
|
|
329
|
-
`)}async function Yd(n,t){await Nr();let{apiKey:o,projectId:i}=rr(t);if(n==="list"){Ce("Local Data Browser");let a=await Ao(o),l=null;try{l=await Ke(o)}catch{}console.log(
|
|
307
|
+
`);let n=new At({head:[S.bold.cyan("Command"),S.bold.cyan("Description")],style:{head:[],border:[]}});n.push([S.white("npx nexus local list"),R("Browse decrypted local pages, collections, and item counts")],[S.white("npx nexus local init-templates"),R("Scaffold empty default files based on your schema.json")],[S.white("npx nexus local reset"),R("Purge all local data and reset files to empty schema defaults")],[S.white("npx nexus studio"),R("Launch the interactive, visual offline Content Studio")]),console.log(n.toString()+`
|
|
308
|
+
`),console.log(` ${ue("\u{1F4A1} Tip:")} Run ${S.white("npx nexus local list")} to inspect your current local directory.
|
|
309
|
+
`)}async function Yd(n,t){await Nr();let{apiKey:o,projectId:i}=rr(t);if(n==="list"){Ce("Local Data Browser");let a=await Ao(o),l=null;try{l=await Ke(o)}catch{}console.log(S.bold(`
|
|
330
310
|
Pages
|
|
331
|
-
`));for(let[u,p]of Object.entries(a.pages)){let d=l?.pages?.find(h=>h.apiKey===u)?.name||u;console.log(` \u2022 ${
|
|
311
|
+
`));for(let[u,p]of Object.entries(a.pages)){let d=l?.pages?.find(h=>h.apiKey===u)?.name||u;console.log(` \u2022 ${S.white(d)} ${R(`(slug: ${u})`)}`)}console.log(S.bold(`
|
|
332
312
|
Collections
|
|
333
|
-
`));for(let[u,p]of Object.entries(a.collections)){let d=l?.collections?.find(h=>h.apiKey===u)?.name||u;console.log(` \u2022 ${
|
|
313
|
+
`));for(let[u,p]of Object.entries(a.collections)){let d=l?.collections?.find(h=>h.apiKey===u)?.name||u;console.log(` \u2022 ${S.white(d)} ${R(`(id: ${u}, count: ${Array.isArray(p)?p.length:1})`)}`)}console.log()}else if(n==="init-templates"){let a=Q("Generating missing local data templates...").start(),l=null;try{l=await Ke(o)}catch{}if(!l){a.fail(Z("Missing schema.json file. Pull first."));return}let u=0,p=0;for(let m of l.pages||[]){let d=E.default.join(process.cwd(),pe,"pages",`${m.apiKey}.nx`);if(!await w.default.pathExists(d)){let h=$e(m.fields);await Te("page",m.apiKey,h,o,i),u++}}for(let m of l.collections||[]){let d=E.default.join(process.cwd(),pe,"collections",`${m.apiKey}.nx`);if(!await w.default.pathExists(d)){let h=[$e(m.fields)];await Te("collection",m.apiKey,h,o,i),p++}}a.succeed(X(`Local data initialized: ${u} pages, ${p} collections`))}else if(n==="reset"){Ce("Local Data Reset");let a=null;try{a=await Ke(o)}catch{console.log(Z(` No schema found.
|
|
334
314
|
`)),process.exit(1)}let{confirm:l}=await Pt.prompt([{type:"confirm",name:"confirm",message:ue("This will reset all local data to empty schema values. Are you sure?"),default:!1}]);l||(console.log(R(`
|
|
335
315
|
Aborted.
|
|
336
|
-
`)),process.exit(0));let u=
|
|
316
|
+
`)),process.exit(0));let u=Q("Resetting local data to schema defaults...").start();for(let p of a.pages||[])await Te("page",p.apiKey,$e(p.fields),o,i);for(let p of a.collections||[])await Te("collection",p.apiKey,[$e(p.fields)],o,i);u.succeed(X("Local data reset to empty schema binary values")),console.log(R(" Run `npx nexus pull` to re-populate from remote.\n"))}}async function Xd(){Ce("SDK Health Check");let n=process.cwd(),t=[];t.push({label:"Node.js \u2265 18",ok:Eo.gte(process.version,"18.0.0"),hint:"Upgrade Node.js"}),t.push({label:".nexus/ initialized",ok:await w.default.pathExists(E.default.join(n,xo)),hint:"Run: npx nexus init"}),t.push({label:"nexus.config.json",ok:await w.default.pathExists(E.default.join(n,cs)),hint:"Re-run init"}),t.push({label:"schema.json",ok:await w.default.pathExists(E.default.join(n,vo)),hint:"Run: npx nexus pull"}),t.push({label:".env / credentials",ok:ec().length>0,hint:"Create .env.local with NEXUS_API_KEY and NEXUS_PROJECT_ID"}),us(),t.push({label:"NEXUS_PROJECT_ID set",ok:!!(process.env.NEXUS_PROJECT_ID||process.env.NEXT_PUBLIC_NEXUS_ID),hint:"Add to .env.local"}),t.push({label:"NEXUS_API_KEY set",ok:!!(process.env.NEXUS_API_KEY||process.env.NEXT_PUBLIC_NEXUS_KEY),hint:"Add to .env.local"});let o=ds(E.default.join(n,"package.json"))||{},i=!!{...o.dependencies,...o.devDependencies}["@nexushub/client"];t.push({label:"@nexushub/client installed",ok:i,hint:"Run: npm add @nexushub/client"}),console.log(S.bold(`
|
|
337
317
|
Health Check Results
|
|
338
|
-
`));let a=!0;for(let l of t)l.ok||(a=!1),console.log(` ${l.ok?X("\u2714"):
|
|
318
|
+
`));let a=!0;for(let l of t)l.ok||(a=!1),console.log(` ${l.ok?X("\u2714"):Z("\u2716")} ${l.ok?S.white(l.label):ue(l.label)}${l.ok?"":R(" \u2192 "+l.hint)}`);if(a)console.log(X(`
|
|
339
319
|
\u2714 All checks passed. SDK is healthy.
|
|
340
320
|
`));else{let l=t.filter(u=>!u.ok).length;console.log(ue(`
|
|
341
321
|
${l} issue(s) found. Address the items above.
|
|
342
322
|
`)),process.exit(1)}}var me=new Kl.Command;me.name("nexus").description("NexusHub Enterprise SDK CLI").version(It,"-V, --version","Print SDK version").addHelpText("before",`
|
|
343
|
-
${Xl(["#00D4FF","#7B2FFF"])("NexusHub")} ${
|
|
323
|
+
${Xl(["#00D4FF","#7B2FFF"])("NexusHub")} ${S.white("Enterprise CLI")} ${R("v"+It)}
|
|
344
324
|
`);me.hook("preAction",async(n,t)=>{let o=t.name();Id.has(o)||await Nr()});me.command("init").description("Initialize NexusHub in your project (enterprise wizard)").action(Wd);me.command("pull").description("Pull content & schema from remote to local cache").option("-k, --api-key <key>","API Key").option("-p, --project-id <id>","Project ID").option("-u, --api-url <url>","API URL").option("-f, --force","Overwrite existing cache").option("--no-local","Skip writing to .nexus/local/").action(async n=>{await Md({...n,writeLocal:n.local})});me.command("push").description("Push local content to NexusHub remote").option("-k, --api-key <key>","API Key").option("-p, --project-id <id>","Project ID").option("-u, --api-url <url>","API URL").option("--dry-run","Validate and preview without uploading").option("-f, --force","Push even if validation fails").action(async n=>{await nc(n)});me.command("validate").description("Validate local data against the content schema").action(qd);me.command("diff").description("Show pending local changes compared to upstream (git-like)").action(async()=>{await Nr(),await Fd()});me.command("schema").description("Inspect the content schema").option("-r, --refresh","Re-fetch schema from remote").option("--fields <apiKey>","Show field details for a specific node").option("-k, --api-key <key>","API Key").option("-p, --project-id <id>","Project ID").option("-u, --api-url <url>","API URL").action(async n=>{await zd(n)});me.command("types").description("Generate TypeScript definitions from schema").option("-o, --output <path>","Output file (default: types/nexus.d.ts)").option("-r, --refresh","Re-fetch schema before generating").option("-k, --api-key <key>","API Key").action(async n=>{await Hd(n)});me.command("status").description("Show project status and health").option("-k, --api-key <key>","API Key").option("-p, --project-id <id>","Project ID").option("-u, --api-url <url>","API URL").action(async n=>{await Gd(n)});me.command("deploy").description("Deploy project to the NexusHub Global Edge Network").option("-e, --environment <env>","Environment (production|staging)","production").option("-k, --api-key <key>","API Key").option("-p, --project-id <id>","Project ID").option("-u, --api-url <url>","API URL").action(async n=>{await Kd(n)});me.command("local [command]").description("Manage local content data (list | init-templates | reset)").action(async(n,t)=>{if(!n){Vd();return}await Yd(n,t)});me.command("studio").description("Spin up the local, offline Content Studio on NexusHub Edge").option("--port <port>","Port to run the local server","4646").option("-k, --api-key <key>","API Key").option("-p, --project-id <id>","Project ID").option("-u, --api-url <url>","API URL").action(async n=>{await Nr(),await Ud(n)});me.command("doctor").description("Diagnose SDK setup issues").action(Xd);me.command("seed").description("Alias for `push` \u2014 seeds local content to remote").option("-k, --api-key <key>","API Key").option("-p, --project-id <id>","Project ID").option("--dry-run","Preview without uploading").action(async n=>{await nc(n)});me.parse(process.argv);
|
|
345
325
|
/*! Bundled license information:
|
|
346
326
|
|