create-next-app 14.0.5-canary.8 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -17
- package/dist/templates/app/js/app/globals.css +3 -3
- package/dist/templates/app/js/app/layout.js +7 -7
- package/dist/templates/app/js/app/page.js +4 -4
- package/dist/templates/app/js/app/page.module.css +1 -1
- package/dist/templates/app/js/next.config.mjs +4 -0
- package/dist/templates/app/ts/app/globals.css +3 -3
- package/dist/templates/app/ts/app/layout.tsx +11 -11
- package/dist/templates/app/ts/app/page.module.css +1 -1
- package/dist/templates/app/ts/app/page.tsx +4 -4
- package/dist/templates/app/ts/next.config.mjs +4 -0
- package/dist/templates/app/ts/tsconfig.json +0 -1
- package/dist/templates/app-tw/js/app/layout.js +7 -7
- package/dist/templates/app-tw/js/app/page.js +8 -8
- package/dist/templates/app-tw/js/next.config.mjs +4 -0
- package/dist/templates/app-tw/js/postcss.config.js +1 -1
- package/dist/templates/app-tw/js/tailwind.config.js +7 -7
- package/dist/templates/app-tw/ts/app/layout.tsx +11 -11
- package/dist/templates/app-tw/ts/app/page.tsx +8 -8
- package/dist/templates/app-tw/ts/next.config.mjs +4 -0
- package/dist/templates/app-tw/ts/postcss.config.js +1 -1
- package/dist/templates/app-tw/ts/tailwind.config.ts +9 -9
- package/dist/templates/app-tw/ts/tsconfig.json +0 -1
- package/dist/templates/default/js/{next.config.js → next.config.mjs} +2 -2
- package/dist/templates/default/js/pages/_app.js +2 -2
- package/dist/templates/default/js/pages/_document.js +2 -2
- package/dist/templates/default/js/pages/api/hello.js +1 -1
- package/dist/templates/default/js/pages/index.js +7 -7
- package/dist/templates/default/js/styles/Home.module.css +1 -1
- package/dist/templates/default/js/styles/globals.css +3 -3
- package/dist/templates/default/ts/{next.config.js → next.config.mjs} +2 -2
- package/dist/templates/default/ts/pages/_app.tsx +3 -3
- package/dist/templates/default/ts/pages/_document.tsx +2 -2
- package/dist/templates/default/ts/pages/api/hello.ts +5 -5
- package/dist/templates/default/ts/pages/index.tsx +7 -7
- package/dist/templates/default/ts/styles/Home.module.css +1 -1
- package/dist/templates/default/ts/styles/globals.css +3 -3
- package/dist/templates/default/ts/tsconfig.json +0 -1
- package/dist/templates/default-tw/js/{next.config.js → next.config.mjs} +2 -2
- package/dist/templates/default-tw/js/pages/_app.js +2 -2
- package/dist/templates/default-tw/js/pages/_document.js +2 -2
- package/dist/templates/default-tw/js/pages/api/hello.js +1 -1
- package/dist/templates/default-tw/js/pages/index.js +10 -10
- package/dist/templates/default-tw/js/postcss.config.js +1 -1
- package/dist/templates/default-tw/js/tailwind.config.js +7 -7
- package/dist/templates/default-tw/ts/{next.config.js → next.config.mjs} +2 -2
- package/dist/templates/default-tw/ts/pages/_app.tsx +3 -3
- package/dist/templates/default-tw/ts/pages/_document.tsx +2 -2
- package/dist/templates/default-tw/ts/pages/api/hello.ts +5 -5
- package/dist/templates/default-tw/ts/pages/index.tsx +10 -10
- package/dist/templates/default-tw/ts/postcss.config.js +1 -1
- package/dist/templates/default-tw/ts/tailwind.config.ts +9 -9
- package/dist/templates/default-tw/ts/tsconfig.json +0 -1
- package/package.json +3 -4
- package/dist/templates/app/js/next.config.js +0 -4
- package/dist/templates/app/ts/next.config.js +0 -4
- package/dist/templates/app-tw/js/next.config.js +0 -4
- package/dist/templates/app-tw/ts/next.config.js +0 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(()=>{var e={8889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);t.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};function createFileSystemAdapter(e){if(e===undefined){return t.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}t.createFileSystemAdapter=createFileSystemAdapter},992:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const r=process.versions.node.split(".");if(r[0]===undefined||r[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const s=Number.parseInt(r[0],10);const n=Number.parseInt(r[1],10);const i=10;const o=10;const a=s>i;const c=s===i&&n>=o;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a||c},7287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Settings=t.scandirSync=t.scandir=void 0;const s=r(353);const n=r(7833);const i=r(3241);t.Settings=i.default;function scandir(e,t,r){if(typeof t==="function"){s.read(e,getSettings(),t);return}s.read(e,getSettings(t),r)}t.scandir=scandir;function scandirSync(e,t){const r=getSettings(t);return n.read(e,r)}t.scandirSync=scandirSync;function getSettings(e={}){if(e instanceof i.default){return e}return new i.default(e)}},353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.readdir=t.readdirWithFileTypes=t.read=void 0;const s=r(5587);const n=r(4796);const i=r(992);const o=r(6480);const a=r(2147);function read(e,t,r){if(!t.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(e,t,r);return}readdir(e,t,r)}t.read=read;function readdirWithFileTypes(e,t,r){t.fs.readdir(e,{withFileTypes:true},((s,i)=>{if(s!==null){callFailureCallback(r,s);return}const o=i.map((r=>({dirent:r,name:r.name,path:a.joinPathSegments(e,r.name,t.pathSegmentSeparator)})));if(!t.followSymbolicLinks){callSuccessCallback(r,o);return}const c=o.map((e=>makeRplTaskEntry(e,t)));n(c,((e,t)=>{if(e!==null){callFailureCallback(r,e);return}callSuccessCallback(r,t)}))}))}t.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,((s,n)=>{if(s!==null){if(t.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,e);return}e.dirent=o.fs.createDirentFromStats(e.name,n);r(null,e)}))}}function readdir(e,t,r){t.fs.readdir(e,((i,c)=>{if(i!==null){callFailureCallback(r,i);return}const l=c.map((r=>{const n=a.joinPathSegments(e,r,t.pathSegmentSeparator);return e=>{s.stat(n,t.fsStatSettings,((s,i)=>{if(s!==null){e(s);return}const a={name:r,path:n,dirent:o.fs.createDirentFromStats(r,i)};if(t.stats){a.stats=i}e(null,a)}))}}));n(l,((e,t)=>{if(e!==null){callFailureCallback(r,e);return}callSuccessCallback(r,t)}))}))}t.readdir=readdir;function callFailureCallback(e,t){e(t)}function callSuccessCallback(e,t){e(null,t)}},2147:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.joinPathSegments=void 0;function joinPathSegments(e,t,r){if(e.endsWith(r)){return e+t}return e+r+t}t.joinPathSegments=joinPathSegments},7833:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.readdir=t.readdirWithFileTypes=t.read=void 0;const s=r(5587);const n=r(992);const i=r(6480);const o=r(2147);function read(e,t){if(!t.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(e,t)}return readdir(e,t)}t.read=read;function readdirWithFileTypes(e,t){const r=t.fs.readdirSync(e,{withFileTypes:true});return r.map((r=>{const s={dirent:r,name:r.name,path:o.joinPathSegments(e,r.name,t.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&t.followSymbolicLinks){try{const e=t.fs.statSync(s.path);s.dirent=i.fs.createDirentFromStats(s.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink){throw e}}}return s}))}t.readdirWithFileTypes=readdirWithFileTypes;function readdir(e,t){const r=t.fs.readdirSync(e);return r.map((r=>{const n=o.joinPathSegments(e,r,t.pathSegmentSeparator);const a=s.statSync(n,t.fsStatSettings);const c={name:r,path:n,dirent:i.fs.createDirentFromStats(r,a)};if(t.stats){c.stats=a}return c}))}t.readdir=readdir},3241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1017);const n=r(5587);const i=r(8889);class Settings{constructor(e={}){this._options=e;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=i.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!==null&&e!==void 0?e:t}}t["default"]=Settings},7345:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createDirentFromStats=void 0;class DirentFromStats{constructor(e,t){this.name=e;this.isBlockDevice=t.isBlockDevice.bind(t);this.isCharacterDevice=t.isCharacterDevice.bind(t);this.isDirectory=t.isDirectory.bind(t);this.isFIFO=t.isFIFO.bind(t);this.isFile=t.isFile.bind(t);this.isSocket=t.isSocket.bind(t);this.isSymbolicLink=t.isSymbolicLink.bind(t)}}function createDirentFromStats(e,t){return new DirentFromStats(e,t)}t.createDirentFromStats=createDirentFromStats},6480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fs=void 0;const s=r(7345);t.fs=s},72:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);t.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync};function createFileSystemAdapter(e){if(e===undefined){return t.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}t.createFileSystemAdapter=createFileSystemAdapter},5587:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.statSync=t.stat=t.Settings=void 0;const s=r(5703);const n=r(2268);const i=r(5166);t.Settings=i.default;function stat(e,t,r){if(typeof t==="function"){s.read(e,getSettings(),t);return}s.read(e,getSettings(t),r)}t.stat=stat;function statSync(e,t){const r=getSettings(t);return n.read(e,r)}t.statSync=statSync;function getSettings(e={}){if(e instanceof i.default){return e}return new i.default(e)}},5703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.read=void 0;function read(e,t,r){t.fs.lstat(e,((s,n)=>{if(s!==null){callFailureCallback(r,s);return}if(!n.isSymbolicLink()||!t.followSymbolicLink){callSuccessCallback(r,n);return}t.fs.stat(e,((e,s)=>{if(e!==null){if(t.throwErrorOnBrokenSymbolicLink){callFailureCallback(r,e);return}callSuccessCallback(r,n);return}if(t.markSymbolicLink){s.isSymbolicLink=()=>true}callSuccessCallback(r,s)}))}))}t.read=read;function callFailureCallback(e,t){e(t)}function callSuccessCallback(e,t){e(null,t)}},2268:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.read=void 0;function read(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink){return r}try{const r=t.fs.statSync(e);if(t.markSymbolicLink){r.isSymbolicLink=()=>true}return r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink){return r}throw e}}t.read=read},5166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(72);class Settings{constructor(e={}){this._options=e;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=s.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(e,t){return e!==null&&e!==void 0?e:t}}t["default"]=Settings},204:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Settings=t.walkStream=t.walkSync=t.walk=void 0;const s=r(1321);const n=r(3951);const i=r(5286);const o=r(6736);t.Settings=o.default;function walk(e,t,r){if(typeof t==="function"){new s.default(e,getSettings()).read(t);return}new s.default(e,getSettings(t)).read(r)}t.walk=walk;function walkSync(e,t){const r=getSettings(t);const s=new i.default(e,r);return s.read()}t.walkSync=walkSync;function walkStream(e,t){const r=getSettings(t);const s=new n.default(e,r);return s.read()}t.walkStream=walkStream;function getSettings(e={}){if(e instanceof o.default){return e}return new o.default(e)}},1321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9556);class AsyncProvider{constructor(e,t){this._root=e;this._settings=t;this._reader=new s.default(this._root,this._settings);this._storage=[]}read(e){this._reader.onError((t=>{callFailureCallback(e,t)}));this._reader.onEntry((e=>{this._storage.push(e)}));this._reader.onEnd((()=>{callSuccessCallback(e,this._storage)}));this._reader.read()}}t["default"]=AsyncProvider;function callFailureCallback(e,t){e(t)}function callSuccessCallback(e,t){e(null,t)}},3951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(2781);const n=r(9556);class StreamProvider{constructor(e,t){this._root=e;this._settings=t;this._reader=new n.default(this._root,this._settings);this._stream=new s.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((e=>{this._stream.emit("error",e)}));this._reader.onEntry((e=>{this._stream.push(e)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}t["default"]=StreamProvider},5286:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5446);class SyncProvider{constructor(e,t){this._root=e;this._settings=t;this._reader=new s.default(this._root,this._settings)}read(){return this._reader.read()}}t["default"]=SyncProvider},9556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(2361);const n=r(7287);const i=r(6256);const o=r(1771);const a=r(358);class AsyncReader extends a.default{constructor(e,t){super(e,t);this._settings=t;this._scandir=n.scandir;this._emitter=new s.EventEmitter;this._queue=i(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,(e=>{if(e!==null){this._handleError(e)}}))}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,((r,s)=>{if(r!==null){t(r,undefined);return}for(const t of s){this._handleEntry(t,e.base)}t(null,undefined)}))}_handleError(e){if(this._isDestroyed||!o.isFatalError(this._settings,e)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",e)}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError){return}const r=e.path;if(t!==undefined){e.path=o.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)}if(o.isAppliedFilter(this._settings.entryFilter,e)){this._emitEntry(e)}if(e.dirent.isDirectory()&&o.isAppliedFilter(this._settings.deepFilter,e)){this._pushToQueue(r,t===undefined?undefined:e.path)}}_emitEntry(e){this._emitter.emit("entry",e)}}t["default"]=AsyncReader},1771:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.joinPathSegments=t.replacePathSegmentSeparator=t.isAppliedFilter=t.isFatalError=void 0;function isFatalError(e,t){if(e.errorFilter===null){return true}return!e.errorFilter(t)}t.isFatalError=isFatalError;function isAppliedFilter(e,t){return e===null||e(t)}t.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(e,t){return e.split(/[/\\]/).join(t)}t.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(e,t,r){if(e===""){return t}if(e.endsWith(r)){return e+t}return e+r+t}t.joinPathSegments=joinPathSegments},358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1771);class Reader{constructor(e,t){this._root=e;this._settings=t;this._root=s.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}t["default"]=Reader},5446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7287);const n=r(1771);const i=r(358);class SyncReader extends i.default{constructor(){super(...arguments);this._scandir=s.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values()){this._handleDirectory(e.directory,e.base)}}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r){this._handleEntry(e,t)}}catch(e){this._handleError(e)}}_handleError(e){if(!n.isFatalError(this._settings,e)){return}throw e}_handleEntry(e,t){const r=e.path;if(t!==undefined){e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)}if(n.isAppliedFilter(this._settings.entryFilter,e)){this._pushToStorage(e)}if(e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)){this._pushToQueue(r,t===undefined?undefined:e.path)}}_pushToStorage(e){this._storage.push(e)}}t["default"]=SyncReader},6736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1017);const n=r(7287);class Settings{constructor(e={}){this._options=e;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return e!==null&&e!==void 0?e:t}}t["default"]=Settings},5773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const{toString:r}=Object.prototype;const isOfType=e=>t=>typeof t===e;const getObjectType=e=>{const t=r.call(e).slice(8,-1);if(t){return t}return undefined};const isObjectOfType=e=>t=>getObjectType(t)===e;function is(e){switch(e){case null:return"null";case true:case false:return"boolean";default:}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(is.function_(e)){return"Function"}if(is.observable(e)){return"Observable"}if(is.array(e)){return"Array"}if(is.buffer(e)){return"Buffer"}const t=getObjectType(e);if(t){return t}if(e instanceof String||e instanceof Boolean||e instanceof Number){throw new TypeError("Please don't use object wrappers for primitive types")}return"Object"}is.undefined=isOfType("undefined");is.string=isOfType("string");const s=isOfType("number");is.number=e=>s(e)&&!is.nan(e);is.bigint=isOfType("bigint");is.function_=isOfType("function");is.null_=e=>e===null;is.class_=e=>is.function_(e)&&e.toString().startsWith("class ");is.boolean=e=>e===true||e===false;is.symbol=isOfType("symbol");is.numericString=e=>is.string(e)&&e.length>0&&!Number.isNaN(Number(e));is.array=Array.isArray;is.buffer=e=>!is.nullOrUndefined(e)&&!is.nullOrUndefined(e.constructor)&&is.function_(e.constructor.isBuffer)&&e.constructor.isBuffer(e);is.nullOrUndefined=e=>is.null_(e)||is.undefined(e);is.object=e=>!is.null_(e)&&(typeof e==="object"||is.function_(e));is.iterable=e=>!is.nullOrUndefined(e)&&is.function_(e[Symbol.iterator]);is.asyncIterable=e=>!is.nullOrUndefined(e)&&is.function_(e[Symbol.asyncIterator]);is.generator=e=>is.iterable(e)&&is.function_(e.next)&&is.function_(e.throw);is.asyncGenerator=e=>is.asyncIterable(e)&&is.function_(e.next)&&is.function_(e.throw);is.nativePromise=e=>isObjectOfType("Promise")(e);const hasPromiseAPI=e=>is.object(e)&&is.function_(e.then)&&is.function_(e.catch);is.promise=e=>is.nativePromise(e)||hasPromiseAPI(e);is.generatorFunction=isObjectOfType("GeneratorFunction");is.asyncGeneratorFunction=e=>getObjectType(e)==="AsyncGeneratorFunction";is.asyncFunction=e=>getObjectType(e)==="AsyncFunction";is.boundFunction=e=>is.function_(e)&&!e.hasOwnProperty("prototype");is.regExp=isObjectOfType("RegExp");is.date=isObjectOfType("Date");is.error=isObjectOfType("Error");is.map=e=>isObjectOfType("Map")(e);is.set=e=>isObjectOfType("Set")(e);is.weakMap=e=>isObjectOfType("WeakMap")(e);is.weakSet=e=>isObjectOfType("WeakSet")(e);is.int8Array=isObjectOfType("Int8Array");is.uint8Array=isObjectOfType("Uint8Array");is.uint8ClampedArray=isObjectOfType("Uint8ClampedArray");is.int16Array=isObjectOfType("Int16Array");is.uint16Array=isObjectOfType("Uint16Array");is.int32Array=isObjectOfType("Int32Array");is.uint32Array=isObjectOfType("Uint32Array");is.float32Array=isObjectOfType("Float32Array");is.float64Array=isObjectOfType("Float64Array");is.bigInt64Array=isObjectOfType("BigInt64Array");is.bigUint64Array=isObjectOfType("BigUint64Array");is.arrayBuffer=isObjectOfType("ArrayBuffer");is.sharedArrayBuffer=isObjectOfType("SharedArrayBuffer");is.dataView=isObjectOfType("DataView");is.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype;is.urlInstance=e=>isObjectOfType("URL")(e);is.urlString=e=>{if(!is.string(e)){return false}try{new URL(e);return true}catch(e){return false}};is.truthy=e=>Boolean(e);is.falsy=e=>!e;is.nan=e=>Number.isNaN(e);const n=new Set(["undefined","string","number","bigint","boolean","symbol"]);is.primitive=e=>is.null_(e)||n.has(typeof e);is.integer=e=>Number.isInteger(e);is.safeInteger=e=>Number.isSafeInteger(e);is.plainObject=e=>{if(getObjectType(e)!=="Object"){return false}const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};const i=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);is.typedArray=e=>{const t=getObjectType(e);if(t===undefined){return false}return i.has(t)};const isValidLength=e=>is.safeInteger(e)&&e>=0;is.arrayLike=e=>!is.nullOrUndefined(e)&&!is.function_(e)&&isValidLength(e.length);is.inRange=(e,t)=>{if(is.number(t)){return e>=Math.min(0,t)&&e<=Math.max(t,0)}if(is.array(t)&&t.length===2){return e>=Math.min(...t)&&e<=Math.max(...t)}throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const o=1;const a=["innerHTML","ownerDocument","style","attributes","nodeValue"];is.domElement=e=>is.object(e)&&e.nodeType===o&&is.string(e.nodeName)&&!is.plainObject(e)&&a.every((t=>t in e));is.observable=e=>{if(!e){return false}if(e[Symbol.observable]&&e===e[Symbol.observable]()){return true}if(e["@@observable"]&&e===e["@@observable"]()){return true}return false};is.nodeStream=e=>is.object(e)&&is.function_(e.pipe)&&!is.observable(e);is.infinite=e=>e===Infinity||e===-Infinity;const isAbsoluteMod2=e=>t=>is.integer(t)&&Math.abs(t%2)===e;is.evenInteger=isAbsoluteMod2(0);is.oddInteger=isAbsoluteMod2(1);is.emptyArray=e=>is.array(e)&&e.length===0;is.nonEmptyArray=e=>is.array(e)&&e.length>0;is.emptyString=e=>is.string(e)&&e.length===0;is.nonEmptyString=e=>is.string(e)&&e.length>0;const isWhiteSpaceString=e=>is.string(e)&&/\S/.test(e)===false;is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.emptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length===0;is.nonEmptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length>0;is.emptySet=e=>is.set(e)&&e.size===0;is.nonEmptySet=e=>is.set(e)&&e.size>0;is.emptyMap=e=>is.map(e)&&e.size===0;is.nonEmptyMap=e=>is.map(e)&&e.size>0;const predicateOnArray=(e,t,r)=>{if(is.function_(t)===false){throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`)}if(r.length===0){throw new TypeError("Invalid number of values")}return e.call(r,t)};is.any=(e,...t)=>{const r=is.array(e)?e:[e];return r.some((e=>predicateOnArray(Array.prototype.some,e,t)))};is.all=(e,...t)=>predicateOnArray(Array.prototype.every,e,t);const assertType=(e,t,r)=>{if(!e){throw new TypeError(`Expected value which is \`${t}\`, received value of type \`${is(r)}\`.`)}};t.assert={undefined:e=>assertType(is.undefined(e),"undefined",e),string:e=>assertType(is.string(e),"string",e),number:e=>assertType(is.number(e),"number",e),bigint:e=>assertType(is.bigint(e),"bigint",e),function_:e=>assertType(is.function_(e),"Function",e),null_:e=>assertType(is.null_(e),"null",e),class_:e=>assertType(is.class_(e),"Class",e),boolean:e=>assertType(is.boolean(e),"boolean",e),symbol:e=>assertType(is.symbol(e),"symbol",e),numericString:e=>assertType(is.numericString(e),"string with a number",e),array:e=>assertType(is.array(e),"Array",e),buffer:e=>assertType(is.buffer(e),"Buffer",e),nullOrUndefined:e=>assertType(is.nullOrUndefined(e),"null or undefined",e),object:e=>assertType(is.object(e),"Object",e),iterable:e=>assertType(is.iterable(e),"Iterable",e),asyncIterable:e=>assertType(is.asyncIterable(e),"AsyncIterable",e),generator:e=>assertType(is.generator(e),"Generator",e),asyncGenerator:e=>assertType(is.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>assertType(is.nativePromise(e),"native Promise",e),promise:e=>assertType(is.promise(e),"Promise",e),generatorFunction:e=>assertType(is.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>assertType(is.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>assertType(is.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>assertType(is.boundFunction(e),"Function",e),regExp:e=>assertType(is.regExp(e),"RegExp",e),date:e=>assertType(is.date(e),"Date",e),error:e=>assertType(is.error(e),"Error",e),map:e=>assertType(is.map(e),"Map",e),set:e=>assertType(is.set(e),"Set",e),weakMap:e=>assertType(is.weakMap(e),"WeakMap",e),weakSet:e=>assertType(is.weakSet(e),"WeakSet",e),int8Array:e=>assertType(is.int8Array(e),"Int8Array",e),uint8Array:e=>assertType(is.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>assertType(is.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>assertType(is.int16Array(e),"Int16Array",e),uint16Array:e=>assertType(is.uint16Array(e),"Uint16Array",e),int32Array:e=>assertType(is.int32Array(e),"Int32Array",e),uint32Array:e=>assertType(is.uint32Array(e),"Uint32Array",e),float32Array:e=>assertType(is.float32Array(e),"Float32Array",e),float64Array:e=>assertType(is.float64Array(e),"Float64Array",e),bigInt64Array:e=>assertType(is.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>assertType(is.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>assertType(is.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>assertType(is.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>assertType(is.dataView(e),"DataView",e),urlInstance:e=>assertType(is.urlInstance(e),"URL",e),urlString:e=>assertType(is.urlString(e),"string with a URL",e),truthy:e=>assertType(is.truthy(e),"truthy",e),falsy:e=>assertType(is.falsy(e),"falsy",e),nan:e=>assertType(is.nan(e),"NaN",e),primitive:e=>assertType(is.primitive(e),"primitive",e),integer:e=>assertType(is.integer(e),"integer",e),safeInteger:e=>assertType(is.safeInteger(e),"integer",e),plainObject:e=>assertType(is.plainObject(e),"plain object",e),typedArray:e=>assertType(is.typedArray(e),"TypedArray",e),arrayLike:e=>assertType(is.arrayLike(e),"array-like",e),domElement:e=>assertType(is.domElement(e),"Element",e),observable:e=>assertType(is.observable(e),"Observable",e),nodeStream:e=>assertType(is.nodeStream(e),"Node.js Stream",e),infinite:e=>assertType(is.infinite(e),"infinite number",e),emptyArray:e=>assertType(is.emptyArray(e),"empty array",e),nonEmptyArray:e=>assertType(is.nonEmptyArray(e),"non-empty array",e),emptyString:e=>assertType(is.emptyString(e),"empty string",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>assertType(is.emptyObject(e),"empty object",e),nonEmptyObject:e=>assertType(is.nonEmptyObject(e),"non-empty object",e),emptySet:e=>assertType(is.emptySet(e),"empty set",e),nonEmptySet:e=>assertType(is.nonEmptySet(e),"non-empty set",e),emptyMap:e=>assertType(is.emptyMap(e),"empty map",e),nonEmptyMap:e=>assertType(is.nonEmptyMap(e),"non-empty map",e),evenInteger:e=>assertType(is.evenInteger(e),"even integer",e),oddInteger:e=>assertType(is.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>assertType(is.directInstanceOf(e,t),"T",e),inRange:(e,t)=>assertType(is.inRange(e,t),"in range",e),any:(e,...t)=>assertType(is.any(e,...t),"predicate returns truthy for any value",t),all:(e,...t)=>assertType(is.all(e,...t),"predicate returns truthy for all values",t)};Object.defineProperties(is,{class:{value:is.class_},function:{value:is.function_},null:{value:is.null_}});Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}});t["default"]=is;e.exports=is;e.exports["default"]=is;e.exports.assert=t.assert},5201:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9265);const n=Number(process.versions.node.split(".")[0]);const timer=e=>{const t={start:Date.now(),socket:undefined,lookup:undefined,connect:undefined,secureConnect:undefined,upload:undefined,response:undefined,end:undefined,error:undefined,abort:undefined,phases:{wait:undefined,dns:undefined,tcp:undefined,tls:undefined,request:undefined,firstByte:undefined,download:undefined,total:undefined}};e.timings=t;const handleError=e=>{const r=e.emit.bind(e);e.emit=(s,...n)=>{if(s==="error"){t.error=Date.now();t.phases.total=t.error-t.start;e.emit=r}return r(s,...n)}};handleError(e);e.prependOnceListener("abort",(()=>{t.abort=Date.now();if(!t.response||n>=13){t.phases.total=Date.now()-t.start}}));const onSocket=e=>{t.socket=Date.now();t.phases.wait=t.socket-t.start;const lookupListener=()=>{t.lookup=Date.now();t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",lookupListener);s.default(e,{connect:()=>{t.connect=Date.now();if(t.lookup===undefined){e.removeListener("lookup",lookupListener);t.lookup=t.connect;t.phases.dns=t.lookup-t.socket}t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now();t.phases.tls=t.secureConnect-t.connect}})};if(e.socket){onSocket(e.socket)}else{e.prependOnceListener("socket",onSocket)}const onUpload=()=>{var e;t.upload=Date.now();t.phases.request=t.upload-(e=t.secureConnect,e!==null&&e!==void 0?e:t.connect)};const writableFinished=()=>{if(typeof e.writableFinished==="boolean"){return e.writableFinished}return e.finished&&e.outputSize===0&&(!e.socket||e.socket.writableLength===0)};if(writableFinished()){onUpload()}else{e.prependOnceListener("finish",onUpload)}e.prependOnceListener("response",(e=>{t.response=Date.now();t.phases.firstByte=t.response-t.upload;e.timings=t;handleError(e);e.prependOnceListener("end",(()=>{t.end=Date.now();t.phases.download=t.end-t.response;t.phases.total=t.end-t.start}))}));return t};t["default"]=timer;e.exports=timer;e.exports["default"]=timer},3607:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.formatNames=t.fastFormats=t.fullFormats=void 0;function fmtDef(e,t){return{validate:e,compare:t}}t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef(date_time,compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:true,binary:true};t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};t.formatNames=Object.keys(t.fullFormats);function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;const s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=r.exec(e);if(!t)return false;const n=+t[1];const i=+t[2];const o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(i===2&&isLeapYear(n)?29:s[i])}function compareDate(e,t){if(!(e&&t))return undefined;if(e>t)return 1;if(e<t)return-1;return 0}const n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(e,t){const r=n.exec(e);if(!r)return false;const s=+r[1];const i=+r[2];const o=+r[3];const a=r[5];return(s<=23&&i<=59&&o<=59||s===23&&i===59&&o===60)&&(!t||a!=="")}function compareTime(e,t){if(!(e&&t))return undefined;const r=n.exec(e);const s=n.exec(t);if(!(r&&s))return undefined;e=r[1]+r[2]+r[3]+(r[4]||"");t=s[1]+s[2]+s[3]+(s[4]||"");if(e>t)return 1;if(e<t)return-1;return 0}const i=/t|\s/i;function date_time(e){const t=e.split(i);return t.length===2&&date(t[0])&&time(t[1],true)}function compareDateTime(e,t){if(!(e&&t))return undefined;const[r,s]=e.split(i);const[n,o]=t.split(i);const a=compareDate(r,n);if(a===undefined)return undefined;return a||compareTime(s,o)}const o=/\/|:/;const a=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(e){return o.test(e)&&a.test(e)}const c=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(e){c.lastIndex=0;return c.test(e)}const l=-(2**31);const u=2**31-1;function validateInt32(e){return Number.isInteger(e)&&e<=u&&e>=l}function validateInt64(e){return Number.isInteger(e)}function validateNumber(){return true}const h=/[^\\]\\Z/;function regex(e){if(h.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},4525:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3607);const n=r(7176);const i=r(4598);const o=new i.Name("fullFormats");const a=new i.Name("fastFormats");const formatsPlugin=(e,t={keywords:true})=>{if(Array.isArray(t)){addFormats(e,t,s.fullFormats,o);return e}const[r,i]=t.mode==="fast"?[s.fastFormats,a]:[s.fullFormats,o];const c=t.formats||s.formatNames;addFormats(e,c,r,i);if(t.keywords)n.default(e);return e};formatsPlugin.get=(e,t="full")=>{const r=t==="fast"?s.fastFormats:s.fullFormats;const n=r[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function addFormats(e,t,r,s){var n;var o;(n=(o=e.opts.code).formats)!==null&&n!==void 0?n:o.formats=i._`require("ajv-formats/dist/formats").${s}`;for(const s of t)e.addFormat(s,r[s])}e.exports=t=formatsPlugin;Object.defineProperty(t,"__esModule",{value:true});t["default"]=formatsPlugin},7176:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.formatLimitDefinition=void 0;const s=r(7265);const n=r(4598);const i=n.operators;const o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};const a={message:({keyword:e,schemaCode:t})=>n.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:true,error:a,code(e){const{gen:t,data:r,schemaCode:i,keyword:a,it:c}=e;const{opts:l,self:u}=c;if(!l.validateFormats)return;const h=new s.KeywordCxt(c,u.RULES.all.format.definition,"format");if(h.$data)validate$DataFormat();else validateFormat();function validate$DataFormat(){const r=t.scopeValue("formats",{ref:u.formats,code:l.code.formats});const s=t.const("fmt",n._`${r}[${h.schemaCode}]`);e.fail$data(n.or(n._`typeof ${s} != "object"`,n._`${s} instanceof RegExp`,n._`typeof ${s}.compare != "function"`,compareCode(s)))}function validateFormat(){const r=h.schema;const s=u.formats[r];if(!s||s===true)return;if(typeof s!="object"||s instanceof RegExp||typeof s.compare!="function"){throw new Error(`"${a}": format "${r}" does not define "compare" function`)}const i=t.scopeValue("formats",{key:r,ref:s,code:l.code.formats?n._`${l.code.formats}${n.getProperty(r)}`:undefined});e.fail$data(compareCode(i))}function compareCode(e){return n._`${e}.compare(${r}, ${i}) ${o[a].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=e=>{e.addKeyword(t.formatLimitDefinition);return e};t["default"]=formatLimitPlugin},7265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const s=r(5054);const n=r(1002);const i=r(263);const o=r(9520);const a=["/properties"];const c="http://json-schema.org/draft-07/schema";class Ajv extends s.default{_addVocabularies(){super._addVocabularies();n.default.forEach((e=>this.addVocabulary(e)));if(this.opts.discriminator)this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,false);this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:undefined)}}e.exports=t=Ajv;Object.defineProperty(t,"__esModule",{value:true});t["default"]=Ajv;var l=r(6316);Object.defineProperty(t,"KeywordCxt",{enumerable:true,get:function(){return l.KeywordCxt}});var u=r(4598);Object.defineProperty(t,"_",{enumerable:true,get:function(){return u._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return u.str}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return u.stringify}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return u.nil}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return u.Name}});Object.defineProperty(t,"CodeGen",{enumerable:true,get:function(){return u.CodeGen}})},7577:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName;t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){super();if(!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return false}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;const e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce(((e,t)=>{if(t instanceof Name)e[t.str]=(e[t.str]||0)+1;return e}),{})}}t._Code=_Code;t.nil=new _Code("");function _(e,...t){const r=[e[0]];let s=0;while(s<t.length){addCodeArg(r,t[s]);r.push(e[++s])}return new _Code(r)}t._=_;const r=new _Code("+");function str(e,...t){const s=[safeStringify(e[0])];let n=0;while(n<t.length){s.push(r);addCodeArg(s,t[n]);s.push(r,safeStringify(e[++n]))}optimize(s);return new _Code(s)}t.str=str;function addCodeArg(e,t){if(t instanceof _Code)e.push(...t._items);else if(t instanceof Name)e.push(t);else e.push(interpolate(t))}t.addCodeArg=addCodeArg;function optimize(e){let t=1;while(t<e.length-1){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(r!==undefined){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function mergeExprItems(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Name||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Name))return`"${e}${t.slice(1)}`;return}function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`}t.strConcat=strConcat;function interpolate(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:safeStringify(Array.isArray(e)?e.join(","):e)}function stringify(e){return new _Code(safeStringify(e))}t.stringify=stringify;function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=safeStringify;function getProperty(e){return typeof e=="string"&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`}t.getProperty=getProperty;function getEsmExportName(e){if(typeof e=="string"&&t.IDENTIFIER.test(e)){return new _Code(`${e}`)}throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}t.getEsmExportName=getEsmExportName;function regexpCode(e){return new _Code(e.toString())}t.regexpCode=regexpCode},4598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const s=r(7577);const n=r(7759);var i=r(7577);Object.defineProperty(t,"_",{enumerable:true,get:function(){return i._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return i.str}});Object.defineProperty(t,"strConcat",{enumerable:true,get:function(){return i.strConcat}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return i.nil}});Object.defineProperty(t,"getProperty",{enumerable:true,get:function(){return i.getProperty}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return i.stringify}});Object.defineProperty(t,"regexpCode",{enumerable:true,get:function(){return i.regexpCode}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return i.Name}});var o=r(7759);Object.defineProperty(t,"Scope",{enumerable:true,get:function(){return o.Scope}});Object.defineProperty(t,"ValueScope",{enumerable:true,get:function(){return o.ValueScope}});Object.defineProperty(t,"ValueScopeName",{enumerable:true,get:function(){return o.ValueScopeName}});Object.defineProperty(t,"varKinds",{enumerable:true,get:function(){return o.varKinds}});t.operators={GT:new s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super();this.varKind=e;this.name=t;this.rhs=r}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind;const s=this.rhs===undefined?"":` = ${this.rhs}`;return`${r} ${this.name}${s};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=optimizeExpr(this.rhs,e,t);return this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super();this.lhs=e;this.rhs=t;this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof s.Name&&!e[this.lhs.str]&&!this.sideEffects)return;this.rhs=optimizeExpr(this.rhs,e,t);return this}get names(){const e=this.lhs instanceof s.Name?{}:{...this.lhs.names};return addExprNames(e,this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,s){super(e,r,s);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super();this.label=e;this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super();this.label=e;this.names={}}render({_n:e}){const t=this.label?` ${this.label}`:"";return`break${t};`+e}}class Throw extends Node{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:undefined}optimizeNames(e,t){this.code=optimizeExpr(this.code,e,t);return this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;while(t--){const r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:undefined}optimizeNames(e,t){const{nodes:r}=this;let s=r.length;while(s--){const n=r[s];if(n.optimizeNames(e,t))continue;subtractNames(e,n.names);r.splice(s,1)}return r.length>0?this:undefined}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(e===true)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}if(t){if(e===false)return t instanceof If?t:t.nodes;if(this.nodes.length)return this;return new If(not(e),t instanceof If?[t]:t.nodes)}if(e===false||!this.nodes.length)return undefined;return this}optimizeNames(e,t){var r;this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t);if(!(super.optimizeNames(e,t)||this.else))return;this.condition=optimizeExpr(this.condition,e,t);return this}get names(){const e=super.names;addExprNames(e,this.condition);if(this.else)addNames(e,this.else.names);return e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;this.iteration=optimizeExpr(this.iteration,e,t);return this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,s){super();this.varKind=e;this.name=t;this.from=r;this.to=s}render(e){const t=e.es5?n.varKinds.var:this.varKind;const{name:r,from:s,to:i}=this;return`for(${t} ${r}=${s}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,s){super();this.loop=e;this.varKind=t;this.name=r;this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;this.iterable=optimizeExpr(this.iterable,e,t);return this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super();this.name=e;this.args=t;this.async=r}render(e){const t=this.async?"async ":"";return`${t}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;super.optimizeNodes();(e=this.catch)===null||e===void 0?void 0:e.optimizeNodes();(t=this.finally)===null||t===void 0?void 0:t.optimizeNodes();return this}optimizeNames(e,t){var r,s;super.optimizeNames(e,t);(r=this.catch)===null||r===void 0?void 0:r.optimizeNames(e,t);(s=this.finally)===null||s===void 0?void 0:s.optimizeNames(e,t);return this}get names(){const e=super.names;if(this.catch)addNames(e,this.catch.names);if(this.finally)addNames(e,this.finally.names);return e}}class Catch extends BlockNode{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";class CodeGen{constructor(e,t={}){this._values={};this._blockStarts=[];this._constants={};this.opts={...t,_n:t.lines?"\n":""};this._extScope=e;this._scope=new n.Scope({parent:e});this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);const s=this._values[r.prefix]||(this._values[r.prefix]=new Set);s.add(r);return r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){const n=this._scope.toName(t);if(r!==undefined&&s)this._constants[n.str]=r;this._leafNode(new Def(e,n,r));return n}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){if(typeof e=="function")e();else if(e!==s.nil)this._leafNode(new AnyCode(e));return this}object(...e){const t=["{"];for(const[r,n]of e){if(t.length>1)t.push(",");t.push(r);if(r!==n||this.opts.es5){t.push(":");(0,s.addCodeArg)(t,n)}}t.push("}");return new s._Code(t)}if(e,t,r){this._blockNode(new If(e));if(t&&r){this.code(t).else().code(r).endIf()}else if(t){this.code(t).endIf()}else if(r){throw new Error('CodeGen: "else" body without "then" body')}return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){this._blockNode(e);if(t)this.code(t).endFor();return this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,s,i=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(i,o,t,r),(()=>s(o)))}forOf(e,t,r,i=n.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof s.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,s._)`${e}.length`,(t=>{this.var(o,(0,s._)`${e}[${t}]`);r(o)}))}return this._for(new ForIter("of",i,o,t),(()=>r(o)))}forIn(e,t,r,i=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties){return this.forOf(e,(0,s._)`Object.keys(${t})`,r)}const o=this._scope.toName(e);return this._for(new ForIter("in",i,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;this._blockNode(t);this.code(e);if(t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new Try;this._blockNode(s);this.code(e);if(t){const e=this.name("e");this._currNode=s.catch=new Catch(e);t(e)}if(r){this._currNode=s.finally=new Finally;this.code(r)}return this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){this._blockStarts.push(this._nodes.length);if(e)this.code(e).endBlock(t);return this}endBlock(e){const t=this._blockStarts.pop();if(t===undefined)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||e!==undefined&&r!==e){throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`)}this._nodes.length=t;return this}func(e,t=s.nil,r,n){this._blockNode(new Func(e,t,r));if(n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){while(e-- >0){this._root.optimizeNodes();this._root.optimizeNames(this._root.names,this._constants)}}_leafNode(e){this._currNode.nodes.push(e);return this}_blockNode(e){this._currNode.nodes.push(e);this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t){this._nodes.pop();return this}throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If)){throw new Error('CodeGen: "else" without "if"')}this._currNode=t.else=e;return this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}}t.CodeGen=CodeGen;function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof s._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){if(e instanceof s.Name)return replaceName(e);if(!canOptimize(e))return e;return new s._Code(e._items.reduce(((e,t)=>{if(t instanceof s.Name)t=replaceName(t);if(t instanceof s._Code)e.push(...t._items);else e.push(t);return e}),[]));function replaceName(e){const s=r[e.str];if(s===undefined||t[e.str]!==1)return e;delete t[e.str];return s}function canOptimize(e){return e instanceof s._Code&&e._items.some((e=>e instanceof s.Name&&t[e.str]===1&&r[e.str]!==undefined))}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,s._)`!${par(e)}`}t.not=not;const a=mappend(t.operators.AND);function and(...e){return e.reduce(a)}t.and=and;const c=mappend(t.operators.OR);function or(...e){return e.reduce(c)}t.or=or;function mappend(e){return(t,r)=>t===s.nil?r:r===s.nil?t:(0,s._)`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof s.Name?e:(0,s._)`(${e})`}},7759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const s=r(7577);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var n;(function(e){e[e["Started"]=0]="Started";e[e["Completed"]=1]="Completed"})(n=t.UsedValueState||(t.UsedValueState={}));t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={};this._prefixes=e;this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){const t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e)){throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`)}return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends s.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e;this.scopePath=(0,s._)`.${new s.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const i=(0,s._)`\n`;class ValueScope extends Scope{constructor(e){super(e);this._values={};this._scope=e.scope;this.opts={...e,_n:e.lines?i:s.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(t.ref===undefined)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e);const{prefix:n}=s;const i=(r=t.key)!==null&&r!==void 0?r:t.ref;let o=this._values[n];if(o){const e=o.get(i);if(e)return e}else{o=this._values[n]=new Map}o.set(i,s);const a=this._scope[n]||(this._scope[n]=[]);const c=a.length;a[c]=t.ref;s.setValue(t,{property:n,itemIndex:c});return s}getValue(e,t){const r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(t.scopePath===undefined)throw new Error(`CodeGen: name "${t}" has no value`);return(0,s._)`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(e.value===undefined)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,i={},o){let a=s.nil;for(const c in e){const l=e[c];if(!l)continue;const u=i[c]=i[c]||new Map;l.forEach((e=>{if(u.has(e))return;u.set(e,n.Started);let i=r(e);if(i){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;a=(0,s._)`${a}${r} ${e} = ${i};${this.opts._n}`}else if(i=o===null||o===void 0?void 0:o(e)){a=(0,s._)`${a}${i}${this.opts._n}`}else{throw new ValueError(e)}u.set(e,n.Completed)}))}return a}}t.ValueScope=ValueScope},7757:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const s=r(4598);const n=r(9068);const i=r(1080);t.keywordError={message:({keyword:e})=>(0,s.str)`must pass "${e}" keyword validation`};t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,s.str)`"${e}" keyword must be ${t} ($data)`:(0,s.str)`"${e}" keyword is invalid ($data)`};function reportError(e,r=t.keywordError,n,i){const{it:o}=e;const{gen:a,compositeRule:c,allErrors:l}=o;const u=errorObjectCode(e,r,n);if(i!==null&&i!==void 0?i:c||l){addError(a,u)}else{returnErrors(o,(0,s._)`[${u}]`)}}t.reportError=reportError;function reportExtraError(e,r=t.keywordError,s){const{it:n}=e;const{gen:o,compositeRule:a,allErrors:c}=n;const l=errorObjectCode(e,r,s);addError(o,l);if(!(a||c)){returnErrors(n,i.default.vErrors)}}t.reportExtraError=reportExtraError;function resetErrorsCount(e,t){e.assign(i.default.errors,t);e.if((0,s._)`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign((0,s._)`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))}t.resetErrorsCount=resetErrorsCount;function extendErrors({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:a}){if(o===undefined)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,i.default.errors,(o=>{e.const(c,(0,s._)`${i.default.vErrors}[${o}]`);e.if((0,s._)`${c}.instancePath === undefined`,(()=>e.assign((0,s._)`${c}.instancePath`,(0,s.strConcat)(i.default.instancePath,a.errorPath))));e.assign((0,s._)`${c}.schemaPath`,(0,s.str)`${a.errSchemaPath}/${t}`);if(a.opts.verbose){e.assign((0,s._)`${c}.schema`,r);e.assign((0,s._)`${c}.data`,n)}}))}t.extendErrors=extendErrors;function addError(e,t){const r=e.const("err",t);e.if((0,s._)`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,(0,s._)`[${r}]`)),(0,s._)`${i.default.vErrors}.push(${r})`);e.code((0,s._)`${i.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:n,schemaEnv:i}=e;if(i.$async){r.throw((0,s._)`new ${e.ValidationError}(${t})`)}else{r.assign((0,s._)`${n}.errors`,t);r.return(false)}}const o={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:n}=e.it;if(n===false)return(0,s._)`{}`;return errorObject(e,t,r)}function errorObject(e,t,r={}){const{gen:s,it:n}=e;const i=[errorInstancePath(n,r),errorSchemaPath(e,r)];extraErrorProps(e,t,i);return s.object(...i)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?(0,s.str)`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[i.default.instancePath,(0,s.strConcat)(i.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let a=i?t:(0,s.str)`${t}/${e}`;if(r){a=(0,s.str)`${a}${(0,n.getErrorPath)(r,n.Type.Str)}`}return[o.schemaPath,a]}function extraErrorProps(e,{params:t,message:r},n){const{keyword:a,data:c,schemaValue:l,it:u}=e;const{opts:h,propertyName:d,topSchemaRef:p,schemaPath:m}=u;n.push([o.keyword,a],[o.params,typeof t=="function"?t(e):t||(0,s._)`{}`]);if(h.messages){n.push([o.message,typeof r=="function"?r(e):r])}if(h.verbose){n.push([o.schema,l],[o.parentSchema,(0,s._)`${p}${m}`],[i.default.data,c])}if(d)n.push([o.propertyName,d])}},5444:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const s=r(4598);const n=r(7091);const i=r(1080);const o=r(4146);const a=r(9068);const c=r(6316);class SchemaEnv{constructor(e){var t;this.refs={};this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema;this.schemaId=e.schemaId;this.root=e.root||this;this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,o.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]);this.schemaPath=e.schemaPath;this.localRefs=e.localRefs;this.meta=e.meta;this.$async=r===null||r===void 0?void 0:r.$async;this.refs={}}}t.SchemaEnv=SchemaEnv;function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId);const{es5:a,lines:l}=this.opts.code;const{ownProperties:u}=this.opts;const h=new s.CodeGen(this.scope,{es5:a,lines:l,ownProperties:u});let d;if(e.$async){d=h.scopeValue("Error",{ref:n.default,code:(0,s._)`require("ajv/dist/runtime/validation_error").default`})}const p=h.scopeName("validate");e.validateName=p;const m={gen:h,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===true?{ref:e.schema,code:(0,s.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:s.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,s._)`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e);(0,c.validateFunctionCode)(m);h.optimize(this.opts.code.optimize);const t=h.toString();y=`${h.scopeRefs(i.default.scope)}return ${t}`;if(this.opts.code.process)y=this.opts.code.process(y,e);const r=new Function(`${i.default.self}`,`${i.default.scope}`,y);const n=r(this,this.scope.get());this.scope.value(p,{ref:n});n.errors=null;n.schema=e.schema;n.schemaEnv=e;if(e.$async)n.$async=true;if(this.opts.code.source===true){n.source={validateName:p,validateCode:t,scopeValues:h._values}}if(this.opts.unevaluated){const{props:e,items:t}=m;n.evaluated={props:e instanceof s.Name?undefined:e,items:t instanceof s.Name?undefined:t,dynamicProps:e instanceof s.Name,dynamicItems:t instanceof s.Name};if(n.source)n.source.evaluated=(0,s.stringify)(n.evaluated)}e.validate=n;return e}catch(t){delete e.validate;delete e.validateName;if(y)this.logger.error("Error compiling schema, function code:",y);throw t}finally{this._compilations.delete(e)}}t.compileSchema=compileSchema;function resolveRef(e,t,r){var s;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let i=resolve.call(this,e,r);if(i===undefined){const n=(s=e.localRefs)===null||s===void 0?void 0:s[r];const{schemaId:o}=this.opts;if(n)i=new SchemaEnv({schema:n,schemaId:o,root:e,baseId:t})}if(i===undefined)return;return e.refs[r]=inlineOrCompile.call(this,i)}t.resolveRef=resolveRef;function inlineOrCompile(e){if((0,o.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const t of this._compilations){if(sameSchemaEnv(t,e))return t}}t.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function resolve(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t);const s=(0,o._getFullPath)(this.opts.uriResolver,r);let n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,undefined);if(Object.keys(e.schema).length>0&&s===n){return getJsonPointer.call(this,r,e)}const i=(0,o.normalizeId)(s);const a=this.refs[i]||this.schemas[i];if(typeof a=="string"){const t=resolveSchema.call(this,e,a);if(typeof(t===null||t===void 0?void 0:t.schema)!=="object")return;return getJsonPointer.call(this,r,t)}if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;if(!a.validate)compileSchema.call(this,a);if(i===(0,o.normalizeId)(t)){const{schema:t}=a;const{schemaId:r}=this.opts;const s=t[r];if(s)n=(0,o.resolveUrl)(this.opts.uriResolver,n,s);return new SchemaEnv({schema:t,schemaId:r,root:e,baseId:n})}return getJsonPointer.call(this,r,a)}t.resolveSchema=resolveSchema;const l=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:s}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const s of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;const e=r[(0,a.unescapeFragment)(s)];if(e===undefined)return;r=e;const n=typeof r==="object"&&r[this.opts.schemaId];if(!l.has(s)&&n){t=(0,o.resolveUrl)(this.opts.uriResolver,t,n)}}let i;if(typeof r!="boolean"&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=resolveSchema.call(this,s,e)}const{schemaId:c}=this.opts;i=i||new SchemaEnv({schema:r,schemaId:c,root:s,baseId:t});if(i.schema!==i.root.schema)return i;return undefined}},1080:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};t["default"]=n},3796:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4146);class MissingRefError extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,s.resolveUrl)(e,t,r);this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(e,this.missingRef))}}t["default"]=MissingRefError},4146:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const s=r(9068);const n=r(1230);const i=r(9122);const o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(e,t=true){if(typeof e=="boolean")return true;if(t===true)return!hasRef(e);if(!t)return false;return countKeys(e)<=t}t.inlineRef=inlineRef;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(a.has(t))return true;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return true;if(typeof r=="object"&&hasRef(r))return true}return false}function countKeys(e){let t=0;for(const r in e){if(r==="$ref")return Infinity;t++;if(o.has(r))continue;if(typeof e[r]=="object"){(0,s.eachItem)(e[r],(e=>t+=countKeys(e)))}if(t===Infinity)return Infinity}return t}function getFullPath(e,t="",r){if(r!==false)t=normalizeId(t);const s=e.parse(t);return _getFullPath(e,s)}t.getFullPath=getFullPath;function _getFullPath(e,t){const r=e.serialize(t);return r.split("#")[0]+"#"}t._getFullPath=_getFullPath;const c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}t.normalizeId=normalizeId;function resolveUrl(e,t,r){r=normalizeId(r);return e.resolve(t,r)}t.resolveUrl=resolveUrl;const l=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:s}=this.opts;const o=normalizeId(e[r]||t);const a={"":o};const c=getFullPath(s,o,false);const u={};const h=new Set;i(e,{allKeys:true},((e,t,s,n)=>{if(n===undefined)return;const i=c+t;let o=a[n];if(typeof e[r]=="string")o=addRef.call(this,e[r]);addAnchor.call(this,e.$anchor);addAnchor.call(this,e.$dynamicAnchor);a[t]=o;function addRef(t){const r=this.opts.uriResolver.resolve;t=normalizeId(o?r(o,t):t);if(h.has(t))throw ambiguos(t);h.add(t);let s=this.refs[t];if(typeof s=="string")s=this.refs[s];if(typeof s=="object"){checkAmbiguosRef(e,s.schema,t)}else if(t!==normalizeId(i)){if(t[0]==="#"){checkAmbiguosRef(e,u[t],t);u[t]=e}else{this.refs[t]=i}}return t}function addAnchor(e){if(typeof e=="string"){if(!l.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}}));return u;function checkAmbiguosRef(e,t,r){if(t!==undefined&&!n(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}t.getSchemaRefs=getSchemaRefs},4445:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getRules=t.isJSONType=void 0;const r=["string","number","integer","boolean","null","object","array"];const s=new Set(r);function isJSONType(e){return typeof e=="string"&&s.has(e)}t.isJSONType=isJSONType;function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:true,boolean:true,null:true},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=getRules},9068:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const s=r(4598);const n=r(7577);function toHash(e){const t={};for(const r of e)t[r]=true;return t}t.toHash=toHash;function alwaysValidSchema(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return true;checkUnknownRules(e,t);return!schemaHasRules(t,e.self.RULES.all)}t.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(e,t=e.schema){const{opts:r,self:s}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;const n=s.RULES.keywords;for(const r in t){if(!n[r])checkStrictMode(e,`unknown keyword: "${r}"`)}}t.checkUnknownRules=checkUnknownRules;function schemaHasRules(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return true;return false}t.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return true;return false}t.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,s._)`${r}`}return(0,s._)`${e}${t}${(0,s.getProperty)(n)}`}t.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))}t.unescapeFragment=unescapeFragment;function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))}t.escapeFragment=escapeFragment;function escapeJsonPointer(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=unescapeJsonPointer;function eachItem(e,t){if(Array.isArray(e)){for(const r of e)t(r)}else{t(e)}}t.eachItem=eachItem;function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,c)=>{const l=a===undefined?o:a instanceof s.Name?(o instanceof s.Name?e(i,o,a):t(i,o,a),a):o instanceof s.Name?(t(i,a,o),o):r(o,a);return c===s.Name&&!(l instanceof s.Name)?n(i,l):l}}t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if((0,s._)`${r} !== true && ${t} !== undefined`,(()=>{e.if((0,s._)`${t} === true`,(()=>e.assign(r,true)),(()=>e.assign(r,(0,s._)`${r} || {}`).code((0,s._)`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if((0,s._)`${r} !== true`,(()=>{if(t===true){e.assign(r,true)}else{e.assign(r,(0,s._)`${r} || {}`);setEvaluated(e,r,t)}})),mergeValues:(e,t)=>e===true?true:{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if((0,s._)`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,(0,s._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if((0,s._)`${r} !== true`,(()=>e.assign(r,t===true?true:(0,s._)`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>e===true?true:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function evaluatedPropsToName(e,t){if(t===true)return e.var("props",true);const r=e.var("props",(0,s._)`{}`);if(t!==undefined)setEvaluated(e,r,t);return r}t.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign((0,s._)`${t}${(0,s.getProperty)(r)}`,true)))}t.setEvaluated=setEvaluated;const i={};function useFunc(e,t){return e.scopeValue("func",{ref:t,code:i[t.code]||(i[t.code]=new n._Code(t.code))})}t.useFunc=useFunc;var o;(function(e){e[e["Num"]=0]="Num";e[e["Str"]=1]="Str"})(o=t.Type||(t.Type={}));function getErrorPath(e,t,r){if(e instanceof s.Name){const n=t===o.Num;return r?n?(0,s._)`"[" + ${e} + "]"`:(0,s._)`"['" + ${e} + "']"`:n?(0,s._)`"/" + ${e}`:(0,s._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,s.getProperty)(e).toString():"/"+escapeJsonPointer(e)}t.getErrorPath=getErrorPath;function checkStrictMode(e,t,r=e.opts.strictSchema){if(!r)return;t=`strict mode: ${t}`;if(r===true)throw new Error(t);e.self.logger.warn(t)}t.checkStrictMode=checkStrictMode},3501:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema:e,self:t},r){const s=t.RULES.types[r];return s&&s!==true&&shouldUseGroup(e,s)}t.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}t.shouldUseGroup=shouldUseGroup;function shouldUseRule(e,t){var r;return e[t.keyword]!==undefined||((r=t.definition.implements)===null||r===void 0?void 0:r.some((t=>e[t]!==undefined)))}t.shouldUseRule=shouldUseRule},4046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const s=r(7757);const n=r(4598);const i=r(1080);const o={message:"boolean schema is false"};function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:s}=e;if(r===false){falseSchemaError(e,false)}else if(typeof r=="object"&&r.$async===true){t.return(i.default.data)}else{t.assign((0,n._)`${s}.errors`,null);t.return(true)}}t.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(e,t){const{gen:r,schema:s}=e;if(s===false){r.var(t,false);falseSchemaError(e)}else{r.var(t,true)}}t.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(e,t){const{gen:r,data:n}=e;const i={gen:r,keyword:"false schema",data:n,schema:false,schemaCode:false,schemaValue:false,params:{},it:e};(0,s.reportError)(i,o,undefined,t)}},7853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const s=r(4445);const n=r(3501);const i=r(7757);const o=r(4598);const a=r(9068);var c;(function(e){e[e["Correct"]=0]="Correct";e[e["Wrong"]=1]="Wrong"})(c=t.DataType||(t.DataType={}));function getSchemaTypes(e){const t=getJSONTypes(e.type);const r=t.includes("null");if(r){if(e.nullable===false)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==undefined){throw new Error('"nullable" cannot be used without "type"')}if(e.nullable===true)t.push("null")}return t}t.getSchemaTypes=getSchemaTypes;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}t.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(e,t){const{gen:r,data:s,opts:i}=e;const o=coerceToTypes(t,i.coerceTypes);const a=t.length>0&&!(o.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(a){const n=checkDataTypes(t,s,i.strictNumbers,c.Wrong);r.if(n,(()=>{if(o.length)coerceData(e,t,o);else reportTypeError(e)}))}return a}t.coerceAndCheckDataType=coerceAndCheckDataType;const l=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(e,t){return t?e.filter((e=>l.has(e)||t==="array"&&e==="array")):[]}function coerceData(e,t,r){const{gen:s,data:n,opts:i}=e;const a=s.let("dataType",(0,o._)`typeof ${n}`);const c=s.let("coerced",(0,o._)`undefined`);if(i.coerceTypes==="array"){s.if((0,o._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>s.assign(n,(0,o._)`${n}[0]`).assign(a,(0,o._)`typeof ${n}`).if(checkDataTypes(t,n,i.strictNumbers),(()=>s.assign(c,n)))))}s.if((0,o._)`${c} !== undefined`);for(const e of r){if(l.has(e)||e==="array"&&i.coerceTypes==="array"){coerceSpecificType(e)}}s.else();reportTypeError(e);s.endIf();s.if((0,o._)`${c} !== undefined`,(()=>{s.assign(n,c);assignParentData(e,c)}));function coerceSpecificType(e){switch(e){case"string":s.elseIf((0,o._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,o._)`"" + ${n}`).elseIf((0,o._)`${n} === null`).assign(c,(0,o._)`""`);return;case"number":s.elseIf((0,o._)`${a} == "boolean" || ${n} === null
|
|
3
|
-
|| (${
|
|
4
|
-
|| (${
|
|
5
|
-
|| ${a} === "boolean" || ${n} === null`).assign(c,(0,o._)`[${n}]`)}}}function assignParentData({gen:e,parentData:t,parentDataProperty:r},s){e.if((0,o._)`${t} !== undefined`,(()=>e.assign((0,o._)`${t}[${r}]`,s)))}function checkDataType(e,t,r,s=c.Correct){const n=s===c.Correct?o.operators.EQ:o.operators.NEQ;let i;switch(e){case"null":return(0,o._)`${t} ${n} null`;case"array":i=(0,o._)`Array.isArray(${t})`;break;case"object":i=(0,o._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=numCond((0,o._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=numCond();break;default:return(0,o._)`typeof ${t} ${n} ${e}`}return s===c.Correct?i:(0,o.not)(i);function numCond(e=o.nil){return(0,o.and)((0,o._)`typeof ${t} == "number"`,e,r?(0,o._)`isFinite(${t})`:o.nil)}}t.checkDataType=checkDataType;function checkDataTypes(e,t,r,s){if(e.length===1){return checkDataType(e[0],t,r,s)}let n;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=(0,o._)`typeof ${t} != "object"`;n=i.null?e:(0,o._)`!${t} || ${e}`;delete i.null;delete i.array;delete i.object}else{n=o.nil}if(i.number)delete i.integer;for(const e in i)n=(0,o.and)(n,checkDataType(e,t,r,s));return n}t.checkDataTypes=checkDataTypes;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,o._)`{type: ${e}}`:(0,o._)`{type: ${t}}`};function reportTypeError(e){const t=getTypeErrorContext(e);(0,i.reportError)(t,u)}t.reportTypeError=reportTypeError;function getTypeErrorContext(e){const{gen:t,data:r,schema:s}=e;const n=(0,a.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:e}}},8795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assignDefaults=void 0;const s=r(4598);const n=r(9068);function assignDefaults(e,t){const{properties:r,items:s}=e.schema;if(t==="object"&&r){for(const t in r){assignDefault(e,t,r[t].default)}}else if(t==="array"&&Array.isArray(s)){s.forEach(((t,r)=>assignDefault(e,r,t.default)))}}t.assignDefaults=assignDefaults;function assignDefault(e,t,r){const{gen:i,compositeRule:o,data:a,opts:c}=e;if(r===undefined)return;const l=(0,s._)`${a}${(0,s.getProperty)(t)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,s._)`${l} === undefined`;if(c.useDefaults==="empty"){u=(0,s._)`${u} || ${l} === null || ${l} === ""`}i.if(u,(0,s._)`${l} = ${(0,s.stringify)(r)}`)}},6316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const s=r(4046);const n=r(7853);const i=r(3501);const o=r(7853);const a=r(8795);const c=r(5223);const l=r(6391);const u=r(4598);const h=r(1080);const d=r(4146);const p=r(9068);const m=r(7757);function validateFunctionCode(e){if(isSchemaObj(e)){checkKeywords(e);if(schemaCxtHasRules(e)){topSchemaObjCode(e);return}}validateFunction(e,(()=>(0,s.topBoolOrEmptySchema)(e)))}t.validateFunctionCode=validateFunctionCode;function validateFunction({gen:e,validateName:t,schema:r,schemaEnv:s,opts:n},i){if(n.code.es5){e.func(t,(0,u._)`${h.default.data}, ${h.default.valCxt}`,s.$async,(()=>{e.code((0,u._)`"use strict"; ${funcSourceUrl(r,n)}`);destructureValCxtES5(e,n);e.code(i)}))}else{e.func(t,(0,u._)`${h.default.data}, ${destructureValCxt(n)}`,s.$async,(()=>e.code(funcSourceUrl(r,n)).code(i)))}}function destructureValCxt(e){return(0,u._)`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${e.dynamicRef?(0,u._)`, ${h.default.dynamicAnchors}={}`:u.nil}}={}`}function destructureValCxtES5(e,t){e.if(h.default.valCxt,(()=>{e.var(h.default.instancePath,(0,u._)`${h.default.valCxt}.${h.default.instancePath}`);e.var(h.default.parentData,(0,u._)`${h.default.valCxt}.${h.default.parentData}`);e.var(h.default.parentDataProperty,(0,u._)`${h.default.valCxt}.${h.default.parentDataProperty}`);e.var(h.default.rootData,(0,u._)`${h.default.valCxt}.${h.default.rootData}`);if(t.dynamicRef)e.var(h.default.dynamicAnchors,(0,u._)`${h.default.valCxt}.${h.default.dynamicAnchors}`)}),(()=>{e.var(h.default.instancePath,(0,u._)`""`);e.var(h.default.parentData,(0,u._)`undefined`);e.var(h.default.parentDataProperty,(0,u._)`undefined`);e.var(h.default.rootData,h.default.data);if(t.dynamicRef)e.var(h.default.dynamicAnchors,(0,u._)`{}`)}))}function topSchemaObjCode(e){const{schema:t,opts:r,gen:s}=e;validateFunction(e,(()=>{if(r.$comment&&t.$comment)commentKeyword(e);checkNoDefault(e);s.let(h.default.vErrors,null);s.let(h.default.errors,0);if(r.unevaluated)resetEvaluated(e);typeAndKeywords(e);returnResults(e)}));return}function resetEvaluated(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,u._)`${r}.evaluated`);t.if((0,u._)`${e.evaluated}.dynamicProps`,(()=>t.assign((0,u._)`${e.evaluated}.props`,(0,u._)`undefined`)));t.if((0,u._)`${e.evaluated}.dynamicItems`,(()=>t.assign((0,u._)`${e.evaluated}.items`,(0,u._)`undefined`)))}function funcSourceUrl(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,u._)`/*# sourceURL=${r} */`:u.nil}function subschemaCode(e,t){if(isSchemaObj(e)){checkKeywords(e);if(schemaCxtHasRules(e)){subSchemaObjCode(e,t);return}}(0,s.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return true;return false}function isSchemaObj(e){return typeof e.schema!="boolean"}function subSchemaObjCode(e,t){const{schema:r,gen:s,opts:n}=e;if(n.$comment&&r.$comment)commentKeyword(e);updateContext(e);checkAsyncSchema(e);const i=s.const("_errs",h.default.errors);typeAndKeywords(e,i);s.var(t,(0,u._)`${i} === ${h.default.errors}`)}function checkKeywords(e){(0,p.checkUnknownRules)(e);checkRefsAndKeywords(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],false,t);const r=(0,n.getSchemaTypes)(e.schema);const s=(0,n.coerceAndCheckDataType)(e,r);schemaKeywords(e,r,!s,t)}function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:r,opts:s,self:n}=e;if(t.$ref&&s.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,n.RULES)){n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}}function checkNoDefault(e){const{schema:t,opts:r}=e;if(t.default!==undefined&&r.useDefaults&&r.strictSchema){(0,p.checkStrictMode)(e,"default is ignored in the schema root")}}function updateContext(e){const t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:n}){const i=r.$comment;if(n.$comment===true){e.code((0,u._)`${h.default.self}.logger.log(${i})`)}else if(typeof n.$comment=="function"){const r=(0,u.str)`${s}/$comment`;const n=e.scopeValue("root",{ref:t.root});e.code((0,u._)`${h.default.self}.opts.$comment(${i}, ${r}, ${n}.schema)`)}}function returnResults(e){const{gen:t,schemaEnv:r,validateName:s,ValidationError:n,opts:i}=e;if(r.$async){t.if((0,u._)`${h.default.errors} === 0`,(()=>t.return(h.default.data)),(()=>t.throw((0,u._)`new ${n}(${h.default.vErrors})`)))}else{t.assign((0,u._)`${s}.errors`,h.default.vErrors);if(i.unevaluated)assignEvaluated(e);t.return((0,u._)`${h.default.errors} === 0`)}}function assignEvaluated({gen:e,evaluated:t,props:r,items:s}){if(r instanceof u.Name)e.assign((0,u._)`${t}.props`,r);if(s instanceof u.Name)e.assign((0,u._)`${t}.items`,s)}function schemaKeywords(e,t,r,s){const{gen:n,schema:a,data:c,allErrors:l,opts:d,self:m}=e;const{RULES:y}=m;if(a.$ref&&(d.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(a,y))){n.block((()=>keywordCode(e,"$ref",y.all.$ref.definition)));return}if(!d.jtd)checkStrictTypes(e,t);n.block((()=>{for(const e of y.rules)groupKeywords(e);groupKeywords(y.post)}));function groupKeywords(p){if(!(0,i.shouldUseGroup)(a,p))return;if(p.type){n.if((0,o.checkDataType)(p.type,c,d.strictNumbers));iterateKeywords(e,p);if(t.length===1&&t[0]===p.type&&r){n.else();(0,o.reportTypeError)(e)}n.endIf()}else{iterateKeywords(e,p)}if(!l)n.if((0,u._)`${h.default.errors} === ${s||0}`)}}function iterateKeywords(e,t){const{gen:r,schema:s,opts:{useDefaults:n}}=e;if(n)(0,a.assignDefaults)(e,t.type);r.block((()=>{for(const r of t.rules){if((0,i.shouldUseRule)(s,r)){keywordCode(e,r.keyword,r.definition,t.type)}}}))}function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;checkContextTypes(e,t);if(!e.opts.allowUnionTypes)checkMultipleTypes(e,t);checkKeywordTypes(e,e.dataTypes)}function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((t=>{if(!includesType(e.dataTypes,t)){strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}}));e.dataTypes=e.dataTypes.filter((e=>includesType(t,e)))}function checkMultipleTypes(e,t){if(t.length>1&&!(t.length===2&&t.includes("null"))){strictTypesError(e,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(e,t){const r=e.self.RULES.all;for(const s in r){const n=r[s];if(typeof n=="object"&&(0,i.shouldUseRule)(e.schema,n)){const{type:r}=n.definition;if(r.length&&!r.some((e=>hasApplicableType(t,e)))){strictTypesError(e,`missing type "${r.join(",")}" for keyword "${s}"`)}}}}function hasApplicableType(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function includesType(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function strictTypesError(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`;(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}class KeywordCxt{constructor(e,t,r){(0,c.validateKeywordUsage)(e,t,r);this.gen=e.gen;this.allErrors=e.allErrors;this.keyword=r;this.data=e.data;this.schema=e.schema[r];this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data);this.schemaType=t.schemaType;this.parentSchema=e.schema;this.params={};this.it=e;this.def=t;if(this.$data){this.schemaCode=e.gen.const("vSchema",getData(this.$data,e))}else{this.schemaCode=this.schemaValue;if(!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined)){throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`)}}if("code"in t?t.trackErrors:t.errors!==false){this.errsCount=e.gen.const("_errs",h.default.errors)}}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e);if(r)r();else this.error();if(t){this.gen.else();t();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(e,t){this.failResult((0,u.not)(e),undefined,t)}fail(e){if(e===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(e);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail((0,u._)`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t);this._error(e,r);this.setParams({});return}this._error(e,r)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r);t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:s,schemaType:n,def:i}=this;r.if((0,u.or)((0,u._)`${s} === undefined`,t));if(e!==u.nil)r.assign(e,true);if(n.length||i.validateSchema){r.elseIf(this.invalid$data());this.$dataError();if(e!==u.nil)r.assign(e,false)}r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:s,it:n}=this;return(0,u.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return(0,u._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return u.nil}function invalid$DataSchema(){if(s.validateSchema){const r=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,u._)`!${r}(${t})`}return u.nil}}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e);(0,l.extendSubschemaMode)(r,e);const s={...this.it,...r,items:undefined,props:undefined};subschemaCode(s,t);return s}mergeEvaluated(e,t){const{it:r,gen:s}=this;if(!r.opts.unevaluated)return;if(r.props!==true&&e.props!==undefined){r.props=p.mergeEvaluated.props(s,e.props,r.props,t)}if(r.items!==true&&e.items!==undefined){r.items=p.mergeEvaluated.items(s,e.items,r.items,t)}}mergeValidEvaluated(e,t){const{it:r,gen:s}=this;if(r.opts.unevaluated&&(r.props!==true||r.items!==true)){s.if(t,(()=>this.mergeEvaluated(e,u.Name)));return true}}}t.KeywordCxt=KeywordCxt;function keywordCode(e,t,r,s){const n=new KeywordCxt(e,r,t);if("code"in r){r.code(n,s)}else if(n.$data&&r.validate){(0,c.funcKeywordCode)(n,r)}else if("macro"in r){(0,c.macroKeywordCode)(n,r)}else if(r.compile||r.validate){(0,c.funcKeywordCode)(n,r)}}const y=/^\/(?:[^~]|~0|~1)*$/;const g=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let n;let i;if(e==="")return h.default.rootData;if(e[0]==="/"){if(!y.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e;i=h.default.rootData}else{const o=g.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];n=o[2];if(n==="#"){if(a>=t)throw new Error(errorMsg("property/index",a));return s[t-a]}if(a>t)throw new Error(errorMsg("data",a));i=r[t-a];if(!n)return i}let o=i;const a=n.split("/");for(const e of a){if(e){i=(0,u._)`${i}${(0,u.getProperty)((0,p.unescapeJsonPointer)(e))}`;o=(0,u._)`${o} && ${i}`}}return o;function errorMsg(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=getData},5223:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const s=r(4598);const n=r(1080);const i=r(8572);const o=r(7757);function macroKeywordCode(e,t){const{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e;const c=t.macro.call(a.self,i,o,a);const l=useKeyword(r,n,c);if(a.opts.validateSchema!==false)a.self.validateSchema(c,true);const u=r.name("valid");e.subschema({schema:c,schemaPath:s.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:true},u);e.pass(u,(()=>e.error(true)))}t.macroKeywordCode=macroKeywordCode;function funcKeywordCode(e,t){var r;const{gen:o,keyword:a,schema:c,parentSchema:l,$data:u,it:h}=e;checkAsyncKeyword(h,t);const d=!u&&t.compile?t.compile.call(h.self,c,l,h):t.validate;const p=useKeyword(o,a,d);const m=o.let("valid");e.block$data(m,validateKeyword);e.ok((r=t.valid)!==null&&r!==void 0?r:m);function validateKeyword(){if(t.errors===false){assignValid();if(t.modifying)modifyData(e);reportErrs((()=>e.error()))}else{const r=t.async?validateAsync():validateSync();if(t.modifying)modifyData(e);reportErrs((()=>addErrs(e,r)))}}function validateAsync(){const e=o.let("ruleErrs",null);o.try((()=>assignValid((0,s._)`await `)),(t=>o.assign(m,false).if((0,s._)`${t} instanceof ${h.ValidationError}`,(()=>o.assign(e,(0,s._)`${t}.errors`)),(()=>o.throw(t)))));return e}function validateSync(){const e=(0,s._)`${p}.errors`;o.assign(e,null);assignValid(s.nil);return e}function assignValid(r=(t.async?(0,s._)`await `:s.nil)){const a=h.opts.passContext?n.default.this:n.default.self;const c=!("compile"in t&&!u||t.schema===false);o.assign(m,(0,s._)`${r}${(0,i.callValidateCode)(e,p,a,c)}`,t.modifying)}function reportErrs(e){var r;o.if((0,s.not)((r=t.valid)!==null&&r!==void 0?r:m),e)}}t.funcKeywordCode=funcKeywordCode;function modifyData(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,(0,s._)`${n.parentData}[${n.parentDataProperty}]`)))}function addErrs(e,t){const{gen:r}=e;r.if((0,s._)`Array.isArray(${t})`,(()=>{r.assign(n.default.vErrors,(0,s._)`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`).assign(n.default.errors,(0,s._)`${n.default.vErrors}.length`);(0,o.extendErrors)(e)}),(()=>e.error()))}function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function useKeyword(e,t,r){if(r===undefined)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,s.stringify)(r)})}function validSchemaType(e,t,r=false){return!t.length||t.some((t=>t==="array"?Array.isArray(e):t==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==t||r&&typeof e=="undefined"))}t.validSchemaType=validSchemaType;function validateKeywordUsage({schema:e,opts:t,self:r,errSchemaPath:s},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i){throw new Error("ajv implementation error")}const o=n.dependencies;if(o===null||o===void 0?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t)))){throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`)}if(n.validateSchema){const o=n.validateSchema(e[i]);if(!o){const e=`keyword "${i}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(e);else throw new Error(e)}}}t.validateKeywordUsage=validateKeywordUsage},6391:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const s=r(4598);const n=r(9068);function getSubschema(e,{keyword:t,schemaProp:r,schema:i,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(t!==undefined&&i!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(t!==undefined){const i=e.schema[t];return r===undefined?{schema:i,schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}${(0,s.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,n.escapeFragment)(r)}`}}if(i!==undefined){if(o===undefined||a===undefined||c===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:i,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=getSubschema;function extendSubschemaData(e,t,{dataProp:r,dataPropType:i,data:o,dataTypes:a,propertyName:c}){if(o!==undefined&&r!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:l}=t;if(r!==undefined){const{errorPath:o,dataPathArr:a,opts:c}=t;const u=l.let("data",(0,s._)`${t.data}${(0,s.getProperty)(r)}`,true);dataContextProps(u);e.errorPath=(0,s.str)`${o}${(0,n.getErrorPath)(r,i,c.jsPropertySyntax)}`;e.parentDataProperty=(0,s._)`${r}`;e.dataPathArr=[...a,e.parentDataProperty]}if(o!==undefined){const t=o instanceof s.Name?o:l.let("data",o,true);dataContextProps(t);if(c!==undefined)e.propertyName=c}if(a)e.dataTypes=a;function dataContextProps(r){e.data=r;e.dataLevel=t.dataLevel+1;e.dataTypes=[];t.definedProperties=new Set;e.parentData=t.data;e.dataNames=[...t.dataNames,r]}}t.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:i}){if(s!==undefined)e.compositeRule=s;if(n!==undefined)e.createErrors=n;if(i!==undefined)e.allErrors=i;e.jtdDiscriminator=t;e.jtdMetadata=r}t.extendSubschemaMode=extendSubschemaMode},5054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var s=r(6316);Object.defineProperty(t,"KeywordCxt",{enumerable:true,get:function(){return s.KeywordCxt}});var n=r(4598);Object.defineProperty(t,"_",{enumerable:true,get:function(){return n._}});Object.defineProperty(t,"str",{enumerable:true,get:function(){return n.str}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return n.stringify}});Object.defineProperty(t,"nil",{enumerable:true,get:function(){return n.nil}});Object.defineProperty(t,"Name",{enumerable:true,get:function(){return n.Name}});Object.defineProperty(t,"CodeGen",{enumerable:true,get:function(){return n.CodeGen}});const i=r(7091);const o=r(3796);const a=r(4445);const c=r(5444);const l=r(4598);const u=r(4146);const h=r(7853);const d=r(9068);const p=r(7918);const m=r(3678);const defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"];const g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."};const b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const w=200;function requiredOptions(e){var t,r,s,n,i,o,a,c,l,u,h,d,p,y,g,v,b,E,S,x,R,P,O,$,A;const T=e.strict;const C=(t=e.code)===null||t===void 0?void 0:t.optimize;const k=C===true||C===undefined?1:C||0;const I=(s=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:defaultRegExp;const N=(n=e.uriResolver)!==null&&n!==void 0?n:m.default;return{strictSchema:(o=(i=e.strictSchema)!==null&&i!==void 0?i:T)!==null&&o!==void 0?o:true,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:T)!==null&&c!==void 0?c:true,strictTypes:(u=(l=e.strictTypes)!==null&&l!==void 0?l:T)!==null&&u!==void 0?u:"log",strictTuples:(d=(h=e.strictTuples)!==null&&h!==void 0?h:T)!==null&&d!==void 0?d:"log",strictRequired:(y=(p=e.strictRequired)!==null&&p!==void 0?p:T)!==null&&y!==void 0?y:false,code:e.code?{...e.code,optimize:k,regExp:I}:{optimize:k,regExp:I},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:w,loopEnum:(v=e.loopEnum)!==null&&v!==void 0?v:w,meta:(b=e.meta)!==null&&b!==void 0?b:true,messages:(E=e.messages)!==null&&E!==void 0?E:true,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:true,schemaId:(x=e.schemaId)!==null&&x!==void 0?x:"$id",addUsedSchema:(R=e.addUsedSchema)!==null&&R!==void 0?R:true,validateSchema:(P=e.validateSchema)!==null&&P!==void 0?P:true,validateFormats:(O=e.validateFormats)!==null&&O!==void 0?O:true,unicodeRegExp:($=e.unicodeRegExp)!==null&&$!==void 0?$:true,int32range:(A=e.int32range)!==null&&A!==void 0?A:true,uriResolver:N}}class Ajv{constructor(e={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,es5:t,lines:r});this.logger=getLogger(e.logger);const s=e.validateFormats;e.validateFormats=false;this.RULES=(0,a.getRules)();checkOptions.call(this,v,e,"NOT SUPPORTED");checkOptions.call(this,b,e,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(e.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(e.keywords)addInitialKeywords.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);addInitialSchemas.call(this);e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let s=p;if(r==="id"){s={...p};s.id=s.$id;delete s.$id}if(t&&e)this.addMetaSchema(s,s[r],false)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:undefined}validate(e,t){let r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error(`no schema with key or ref "${e}"`)}else{r=this.compile(e)}const s=r(t);if(!("$async"in r))this.errors=r.errors;return s}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:r}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||_compileAsync.call(this,r)}async function loadMetaSchema(e){if(e&&!this.getSchema(e)){await runCompileAsync.call(this,{$ref:e},true)}}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;checkLoaded.call(this,t);await loadMissingSchema.call(this,t.missingSchema);return _compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e]){throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}}async function loadMissingSchema(e){const r=await _loadSchema.call(this,e);if(!this.refs[e])await loadMetaSchema.call(this,r.$schema);if(!this.refs[e])this.addSchema(r,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,s=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,undefined,r,s);return this}let n;if(typeof e==="object"){const{schemaId:t}=this.opts;n=e[t];if(n!==undefined&&typeof n!="string"){throw new Error(`schema ${t} must be string`)}}t=(0,u.normalizeId)(t||n);this._checkUnique(t);this.schemas[t]=this._addSchema(e,r,t,s,true);return this}addMetaSchema(e,t,r=this.opts.validateSchema){this.addSchema(e,t,true,r);return this}validateSchema(e,t){if(typeof e=="boolean")return true;let r;r=e.$schema;if(r!==undefined&&typeof r!="string"){throw new Error("$schema must be a string")}r=r||this.opts.defaultMeta||this.defaultMeta();if(!r){this.logger.warn("meta-schema not available");this.errors=null;return true}const s=this.validate(r,e);if(!s&&t){const e="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(e);else throw new Error(e)}return s}getSchema(e){let t;while(typeof(t=getSchEnv.call(this,e))=="string")e=t;if(t===undefined){const{schemaId:r}=this.opts;const s=new c.SchemaEnv({schema:{},schemaId:r});t=c.resolveSchema.call(this,s,e);if(!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp){this._removeAllSchemas(this.schemas,e);this._removeAllSchemas(this.refs,e);return this}switch(typeof e){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const t=getSchEnv.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);delete this.schemas[e];delete this.refs[e];return this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r){r=(0,u.normalizeId)(r);delete this.schemas[r];delete this.refs[r]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){r=e;if(typeof t=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");t.keyword=r}}else if(typeof e=="object"&&t===undefined){t=e;r=t.keyword;if(Array.isArray(r)&&!r.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,r,t);if(!t){(0,d.eachItem)(r,(e=>addRule.call(this,e)));return this}keywordMetaschema.call(this,t);const s={...t,type:(0,h.getJSONTypes)(t.type),schemaType:(0,h.getJSONTypes)(t.schemaType)};(0,d.eachItem)(r,s.type.length===0?e=>addRule.call(this,e,s):e=>s.type.forEach((t=>addRule.call(this,e,s,t))));return this}getKeyword(e){const t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e];delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));if(t>=0)r.rules.splice(t,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);this.formats[e]=t;return this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r))}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const s of t){const t=s.split("/").slice(1);let n=e;for(const e of t)n=n[e];for(const e in r){const t=r[e];if(typeof t!="object")continue;const{$data:s}=t.definition;const i=n[e];if(s&&i)n[e]=schemaOrData(i)}}return e}_removeAllSchemas(e,t){for(const r in e){const s=e[r];if(!t||t.test(r)){if(typeof s=="string"){delete e[r]}else if(s&&!s.meta){this._cache.delete(s.schema);delete e[r]}}}}_addSchema(e,t,r,s=this.opts.validateSchema,n=this.opts.addUsedSchema){let i;const{schemaId:o}=this.opts;if(typeof e=="object"){i=e[o]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(a!==undefined)return a;r=(0,u.normalizeId)(i||r);const l=u.getSchemaRefs.call(this,e,r);a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:l});this._cache.set(a.schema,a);if(n&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(s)this.validateSchema(e,true);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e]){throw new Error(`schema with key or id "${e}" already exists`)}}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else c.compileSchema.call(this,e);if(!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}t["default"]=Ajv;Ajv.ValidationError=i.default;Ajv.MissingRefError=o.default;function checkOptions(e,t,r,s="error"){for(const n in e){const i=n;if(i in t)this.logger[s](`${r}: option ${n}. ${e[i]}`)}}function getSchEnv(e){e=(0,u.normalizeId)(e);return this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of y)delete e[t];return e}const E={log(){},warn(){},error(){}};function getLogger(e){if(e===false)return E;if(e===undefined)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}const S=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:r}=this;(0,d.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!S.test(e))throw new Error(`Keyword ${e} has invalid name`)}));if(!t)return;if(t.$data&&!("code"in t||"validate"in t)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(e,t,r){var s;const n=t===null||t===void 0?void 0:t.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let o=n?i.post:i.rules.find((({type:e})=>e===r));if(!o){o={type:r,rules:[]};i.rules.push(o)}i.keywords[e]=true;if(!t)return;const a={keyword:e,definition:{...t,type:(0,h.getJSONTypes)(t.type),schemaType:(0,h.getJSONTypes)(t.schemaType)}};if(t.before)addBeforeRule.call(this,o,a,t.before);else o.rules.push(a);i.all[e]=a;(s=t.implements)===null||s===void 0?void 0:s.forEach((e=>this.addKeyword(e)))}function addBeforeRule(e,t,r){const s=e.rules.findIndex((e=>e.keyword===r));if(s>=0){e.rules.splice(s,0,t)}else{e.rules.push(t);this.logger.warn(`rule ${r} is not defined`)}}function keywordMetaschema(e){let{metaSchema:t}=e;if(t===undefined)return;if(e.$data&&this.opts.$data)t=schemaOrData(t);e.validateSchema=this.compile(t,true)}const x={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,x]}}},4461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1230);s.code='require("ajv/dist/runtime/equal").default';t["default"]=s},7382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function ucs2length(e){const t=e.length;let r=0;let s=0;let n;while(s<t){r++;n=e.charCodeAt(s++);if(n>=55296&&n<=56319&&s<t){n=e.charCodeAt(s);if((n&64512)===56320)s++}}return r}t["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},3678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4856);s.code='require("ajv/dist/runtime/uri").default';t["default"]=s},7091:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class ValidationError extends Error{constructor(e){super("validation failed");this.errors=e;this.ajv=this.validation=true}}t["default"]=ValidationError},1208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateAdditionalItems=void 0;const s=r(4598);const n=r(9068);const i={message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`};const o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:i,code(e){const{parentSchema:t,it:r}=e;const{items:s}=t;if(!Array.isArray(s)){(0,n.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(e,s)}};function validateAdditionalItems(e,t){const{gen:r,schema:i,data:o,keyword:a,it:c}=e;c.items=true;const l=r.const("len",(0,s._)`${o}.length`);if(i===false){e.setParams({len:t.length});e.pass((0,s._)`${l} <= ${t.length}`)}else if(typeof i=="object"&&!(0,n.alwaysValidSchema)(c,i)){const n=r.var("valid",(0,s._)`${l} <= ${t.length}`);r.if((0,s.not)(n),(()=>validateItems(n)));e.ok(n)}function validateItems(i){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:n.Type.Num},i);if(!c.allErrors)r.if((0,s.not)(i),(()=>r.break()))}))}}t.validateAdditionalItems=validateAdditionalItems;t["default"]=o},3849:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8572);const n=r(4598);const i=r(1080);const o=r(9068);const a={message:"must NOT have additional properties",params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`};const c={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:a,code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:l,it:u}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:h,opts:d}=u;u.props=true;if(d.removeAdditional!=="all"&&(0,o.alwaysValidSchema)(u,r))return;const p=(0,s.allSchemaProperties)(a.properties);const m=(0,s.allSchemaProperties)(a.patternProperties);checkAdditionalProperties();e.ok((0,n._)`${l} === ${i.default.errors}`);function checkAdditionalProperties(){t.forIn("key",c,(e=>{if(!p.length&&!m.length)additionalPropertyCode(e);else t.if(isAdditional(e),(()=>additionalPropertyCode(e)))}))}function isAdditional(r){let i;if(p.length>8){const e=(0,o.schemaRefOrVal)(u,a.properties,"properties");i=(0,s.isOwnProperty)(t,e,r)}else if(p.length){i=(0,n.or)(...p.map((e=>(0,n._)`${r} === ${e}`)))}else{i=n.nil}if(m.length){i=(0,n.or)(i,...m.map((t=>(0,n._)`${(0,s.usePattern)(e,t)}.test(${r})`)))}return(0,n.not)(i)}function deleteAdditional(e){t.code((0,n._)`delete ${c}[${e}]`)}function additionalPropertyCode(s){if(d.removeAdditional==="all"||d.removeAdditional&&r===false){deleteAdditional(s);return}if(r===false){e.setParams({additionalProperty:s});e.error();if(!h)t.break();return}if(typeof r=="object"&&!(0,o.alwaysValidSchema)(u,r)){const r=t.name("valid");if(d.removeAdditional==="failing"){applyAdditionalSchema(s,r,false);t.if((0,n.not)(r),(()=>{e.reset();deleteAdditional(s)}))}else{applyAdditionalSchema(s,r);if(!h)t.if((0,n.not)(r),(()=>t.break()))}}}function applyAdditionalSchema(t,r,s){const n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};if(s===false){Object.assign(n,{compositeRule:true,createErrors:false,allErrors:false})}e.subschema(n,r)}}};t["default"]=c},2799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9068);const n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,s.alwaysValidSchema)(n,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i);e.mergeEvaluated(o)}))}};t["default"]=n},48:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8572);const n={keyword:"anyOf",schemaType:"array",trackErrors:true,code:s.validateUnion,error:{message:"must match a schema in anyOf"}};t["default"]=n},9152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i={message:({params:{min:e,max:t}})=>t===undefined?(0,s.str)`must contain at least ${e} valid item(s)`:(0,s.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===undefined?(0,s._)`{minContains: ${e}}`:(0,s._)`{minContains: ${e}, maxContains: ${t}}`};const o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:i,code(e){const{gen:t,schema:r,parentSchema:i,data:o,it:a}=e;let c;let l;const{minContains:u,maxContains:h}=i;if(a.opts.next){c=u===undefined?1:u;l=h}else{c=1}const d=t.const("len",(0,s._)`${o}.length`);e.setParams({min:c,max:l});if(l===undefined&&c===0){(0,n.checkStrictMode)(a,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==undefined&&c>l){(0,n.checkStrictMode)(a,`"minContains" > "maxContains" is always invalid`);e.fail();return}if((0,n.alwaysValidSchema)(a,r)){let t=(0,s._)`${d} >= ${c}`;if(l!==undefined)t=(0,s._)`${t} && ${d} <= ${l}`;e.pass(t);return}a.items=true;const p=t.name("valid");if(l===undefined&&c===1){validateItems(p,(()=>t.if(p,(()=>t.break()))))}else if(c===0){t.let(p,true);if(l!==undefined)t.if((0,s._)`${o}.length > 0`,validateItemsWithCount)}else{t.let(p,false);validateItemsWithCount()}e.result(p,(()=>e.reset()));function validateItemsWithCount(){const e=t.name("_valid");const r=t.let("count",0);validateItems(e,(()=>t.if(e,(()=>checkLimits(r)))))}function validateItems(r,s){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:n.Type.Num,compositeRule:true},r);s()}))}function checkLimits(e){t.code((0,s._)`${e}++`);if(l===undefined){t.if((0,s._)`${e} >= ${c}`,(()=>t.assign(p,true).break()))}else{t.if((0,s._)`${e} > ${l}`,(()=>t.assign(p,false).break()));if(c===1)t.assign(p,true);else t.if((0,s._)`${e} >= ${c}`,(()=>t.assign(p,true)))}}}};t["default"]=o},6569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const s=r(4598);const n=r(9068);const i=r(8572);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const n=t===1?"property":"properties";return(0,s.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,s._)`{property: ${e},
|
|
6
|
-
missingProperty: ${
|
|
7
|
-
depsCount: ${
|
|
8
|
-
deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=splitDependencies(e);validatePropertyDeps(e,t);validateSchemaDeps(e,r)}};function splitDependencies({schema:e}){const t={};const r={};for(const s in e){if(s==="__proto__")continue;const n=Array.isArray(e[s])?t:r;n[s]=e[s]}return[t,r]}function validatePropertyDeps(e,t=e.schema){const{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;const a=r.let("missing");for(const c in t){const l=t[c];if(l.length===0)continue;const u=(0,i.propertyInData)(r,n,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")});if(o.allErrors){r.if(u,(()=>{for(const t of l){(0,i.checkReportMissingProp)(e,t)}}))}else{r.if((0,s._)`${u} && (${(0,i.checkMissingProp)(e,l,a)})`);(0,i.reportMissingProp)(e,a);r.else()}}}t.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(e,t=e.schema){const{gen:r,data:s,keyword:o,it:a}=e;const c=r.name("valid");for(const l in t){if((0,n.alwaysValidSchema)(a,t[l]))continue;r.if((0,i.propertyInData)(r,s,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,true)));e.ok(c)}}t.validateSchemaDeps=validateSchemaDeps;t["default"]=o},4083:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i={message:({params:e})=>(0,s.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,s._)`{failingKeyword: ${e.ifClause}}`};const o={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:i,code(e){const{gen:t,parentSchema:r,it:i}=e;if(r.then===undefined&&r.else===undefined){(0,n.checkStrictMode)(i,'"if" without "then" and "else" is ignored')}const o=hasSchema(i,"then");const a=hasSchema(i,"else");if(!o&&!a)return;const c=t.let("valid",true);const l=t.name("_valid");validateIf();e.reset();if(o&&a){const r=t.let("ifClause");e.setParams({ifClause:r});t.if(l,validateClause("then",r),validateClause("else",r))}else if(o){t.if(l,validateClause("then"))}else{t.if((0,s.not)(l),validateClause("else"))}e.pass(c,(()=>e.error(true)));function validateIf(){const t=e.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},l);e.mergeEvaluated(t)}function validateClause(r,n){return()=>{const i=e.subschema({keyword:r},l);t.assign(c,l);e.mergeValidEvaluated(i,c);if(n)t.assign(n,(0,s._)`${r}`);else e.setParams({ifClause:r})}}}};function hasSchema(e,t){const r=e.schema[t];return r!==undefined&&!(0,n.alwaysValidSchema)(e,r)}t["default"]=o},6500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1208);const n=r(7335);const i=r(6052);const o=r(3416);const a=r(9152);const c=r(6569);const l=r(2721);const u=r(3849);const h=r(8554);const d=r(5364);const p=r(6930);const m=r(48);const y=r(8067);const g=r(2799);const v=r(4083);const b=r(9405);function getApplicator(e=false){const t=[p.default,m.default,y.default,g.default,v.default,b.default,l.default,u.default,c.default,h.default,d.default];if(e)t.push(n.default,o.default);else t.push(s.default,i.default);t.push(a.default);return t}t["default"]=getApplicator},6052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateTuple=void 0;const s=r(4598);const n=r(9068);const i=r(8572);const o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);r.items=true;if((0,n.alwaysValidSchema)(r,t))return;e.ok((0,i.validateArray)(e))}};function validateTuple(e,t,r=e.schema){const{gen:i,parentSchema:o,data:a,keyword:c,it:l}=e;checkStrictTuple(o);if(l.opts.unevaluated&&r.length&&l.items!==true){l.items=n.mergeEvaluated.items(i,r.length,l.items)}const u=i.name("valid");const h=i.const("len",(0,s._)`${a}.length`);r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(l,t))return;i.if((0,s._)`${h} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u)));e.ok(u)}));function checkStrictTuple(e){const{opts:s,errSchemaPath:i}=l;const o=r.length;const a=o===e.minItems&&(o===e.maxItems||e[t]===false);if(s.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,n.checkStrictMode)(l,e,s.strictTuples)}}}t.validateTuple=validateTuple;t["default"]=o},3416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i=r(8572);const o=r(1208);const a={message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`};const c={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:a,code(e){const{schema:t,parentSchema:r,it:s}=e;const{prefixItems:a}=r;s.items=true;if((0,n.alwaysValidSchema)(s,t))return;if(a)(0,o.validateAdditionalItems)(e,a);else e.ok((0,i.validateArray)(e))}};t["default"]=c},6930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9068);const n={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(e){const{gen:t,schema:r,it:n}=e;if((0,s.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},i);e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t["default"]=n},8067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,s._)`{passingSchemas: ${e.passing}}`};const o={keyword:"oneOf",schemaType:"array",trackErrors:true,error:i,code(e){const{gen:t,schema:r,parentSchema:i,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&i.discriminator)return;const a=r;const c=t.let("valid",false);const l=t.let("passing",null);const u=t.name("_valid");e.setParams({passing:l});t.block(validateOneOf);e.result(c,(()=>e.reset()),(()=>e.error(true)));function validateOneOf(){a.forEach(((r,i)=>{let a;if((0,n.alwaysValidSchema)(o,r)){t.var(u,true)}else{a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:true},u)}if(i>0){t.if((0,s._)`${u} && ${c}`).assign(c,false).assign(l,(0,s._)`[${l}, ${i}]`).else()}t.if(u,(()=>{t.assign(c,true);t.assign(l,i);if(a)e.mergeEvaluated(a,s.Name)}))}))}}};t["default"]=o},5364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8572);const n=r(4598);const i=r(9068);const o=r(9068);const a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:l}=e;const{opts:u}=l;const h=(0,s.allSchemaProperties)(r);const d=h.filter((e=>(0,i.alwaysValidSchema)(l,r[e])));if(h.length===0||d.length===h.length&&(!l.opts.unevaluated||l.props===true)){return}const p=u.strictSchema&&!u.allowMatchingProperties&&c.properties;const m=t.name("valid");if(l.props!==true&&!(l.props instanceof n.Name)){l.props=(0,o.evaluatedPropsToName)(t,l.props)}const{props:y}=l;validatePatternProperties();function validatePatternProperties(){for(const e of h){if(p)checkMatchingProperties(e);if(l.allErrors){validateProperties(e)}else{t.var(m,true);validateProperties(e);t.if(m)}}}function checkMatchingProperties(e){for(const t in p){if(new RegExp(e).test(t)){(0,i.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}}}function validateProperties(r){t.forIn("key",a,(i=>{t.if((0,n._)`${(0,s.usePattern)(e,r)}.test(${i})`,(()=>{const s=d.includes(r);if(!s){e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:o.Type.Str},m)}if(l.opts.unevaluated&&y!==true){t.assign((0,n._)`${y}[${i}]`,true)}else if(!s&&!l.allErrors){t.if((0,n.not)(m),(()=>t.break()))}}))}))}}};t["default"]=a},7335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6052);const n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,s.validateTuple)(e,"items")};t["default"]=n},8554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6316);const n=r(8572);const i=r(9068);const o=r(3849);const a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:l}=e;if(l.opts.removeAdditional==="all"&&a.additionalProperties===undefined){o.default.code(new s.KeywordCxt(l,o.default,"additionalProperties"))}const u=(0,n.allSchemaProperties)(r);for(const e of u){l.definedProperties.add(e)}if(l.opts.unevaluated&&u.length&&l.props!==true){l.props=i.mergeEvaluated.props(t,(0,i.toHash)(u),l.props)}const h=u.filter((e=>!(0,i.alwaysValidSchema)(l,r[e])));if(h.length===0)return;const d=t.name("valid");for(const r of h){if(hasDefault(r)){applyPropertySchema(r)}else{t.if((0,n.propertyInData)(t,c,r,l.opts.ownProperties));applyPropertySchema(r);if(!l.allErrors)t.else().var(d,true);t.endIf()}e.it.definedProperties.add(r);e.ok(d)}function hasDefault(e){return l.opts.useDefaults&&!l.compositeRule&&r[e].default!==undefined}function applyPropertySchema(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t["default"]=a},2721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i={message:"property name must be valid",params:({params:e})=>(0,s._)`{propertyName: ${e.propertyName}}`};const o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:i,code(e){const{gen:t,schema:r,data:i,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return;const a=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r});e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:true},a);t.if((0,s.not)(a),(()=>{e.error(true);if(!o.allErrors)t.break()}))}));e.ok(a)}};t["default"]=o},9405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9068);const n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===undefined)(0,s.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t["default"]=n},8572:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const s=r(4598);const n=r(9068);const i=r(1080);const o=r(9068);function checkReportMissingProp(e,t){const{gen:r,data:n,it:i}=e;r.if(noPropertyInData(r,n,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:(0,s._)`${t}`},true);e.error()}))}t.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:e,data:t,it:{opts:r}},n,i){return(0,s.or)(...n.map((n=>(0,s.and)(noPropertyInData(e,t,n,r.ownProperties),(0,s._)`${i} = ${n}`))))}t.checkMissingProp=checkMissingProp;function reportMissingProp(e,t){e.setParams({missingProperty:t},true);e.error()}t.reportMissingProp=reportMissingProp;function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,s._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=hasPropFunc;function isOwnProperty(e,t,r){return(0,s._)`${hasPropFunc(e)}.call(${t}, ${r})`}t.isOwnProperty=isOwnProperty;function propertyInData(e,t,r,n){const i=(0,s._)`${t}${(0,s.getProperty)(r)} !== undefined`;return n?(0,s._)`${i} && ${isOwnProperty(e,t,r)}`:i}t.propertyInData=propertyInData;function noPropertyInData(e,t,r,n){const i=(0,s._)`${t}${(0,s.getProperty)(r)} === undefined`;return n?(0,s.or)(i,(0,s.not)(isOwnProperty(e,t,r))):i}t.noPropertyInData=noPropertyInData;function allSchemaProperties(e){return e?Object.keys(e).filter((e=>e!=="__proto__")):[]}t.allSchemaProperties=allSchemaProperties;function schemaProperties(e,t){return allSchemaProperties(t).filter((r=>!(0,n.alwaysValidSchema)(e,t[r])))}t.schemaProperties=schemaProperties;function callValidateCode({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:a},it:c},l,u,h){const d=h?(0,s._)`${e}, ${t}, ${n}${o}`:t;const p=[[i.default.instancePath,(0,s.strConcat)(i.default.instancePath,a)],[i.default.parentData,c.parentData],[i.default.parentDataProperty,c.parentDataProperty],[i.default.rootData,i.default.rootData]];if(c.opts.dynamicRef)p.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const m=(0,s._)`${d}, ${r.object(...p)}`;return u!==s.nil?(0,s._)`${l}.call(${u}, ${m})`:(0,s._)`${l}(${m})`}t.callValidateCode=callValidateCode;const a=(0,s._)`new RegExp`;function usePattern({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"";const{regExp:i}=t.code;const c=i(r,n);return e.scopeValue("pattern",{key:c.toString(),ref:c,code:(0,s._)`${i.code==="new RegExp"?a:(0,o.useFunc)(e,i)}(${r}, ${n})`})}t.usePattern=usePattern;function validateArray(e){const{gen:t,data:r,keyword:i,it:o}=e;const a=t.name("valid");if(o.allErrors){const e=t.let("valid",true);validateItems((()=>t.assign(e,false)));return e}t.var(a,true);validateItems((()=>t.break()));return a;function validateItems(o){const c=t.const("len",(0,s._)`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:n.Type.Num},a);t.if((0,s.not)(a),o)}))}}t.validateArray=validateArray;function validateUnion(e){const{gen:t,schema:r,keyword:i,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const a=r.some((e=>(0,n.alwaysValidSchema)(o,e)));if(a&&!o.opts.unevaluated)return;const c=t.let("valid",false);const l=t.name("_valid");t.block((()=>r.forEach(((r,n)=>{const o=e.subschema({keyword:i,schemaProp:n,compositeRule:true},l);t.assign(c,(0,s._)`${c} || ${l}`);const a=e.mergeValidEvaluated(o,l);if(!a)t.if((0,s.not)(c))}))));e.result(c,(()=>e.reset()),(()=>e.error(true)))}t.validateUnion=validateUnion},4629:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t["default"]=r},3488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4629);const n=r(7133);const i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,n.default];t["default"]=i},7133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.callRef=t.getValidate=void 0;const s=r(3796);const n=r(8572);const i=r(4598);const o=r(1080);const a=r(5444);const c=r(9068);const l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e;const{baseId:o,schemaEnv:c,validateName:l,opts:u,self:h}=n;const{root:d}=c;if((r==="#"||r==="#/")&&o===d.baseId)return callRootRef();const p=a.resolveRef.call(h,d,o,r);if(p===undefined)throw new s.default(n.opts.uriResolver,o,r);if(p instanceof a.SchemaEnv)return callValidate(p);return inlineRefSchema(p);function callRootRef(){if(c===d)return callRef(e,l,c,c.$async);const r=t.scopeValue("root",{ref:d});return callRef(e,(0,i._)`${r}.validate`,d,d.$async)}function callValidate(t){const r=getValidate(e,t);callRef(e,r,t,t.$async)}function inlineRefSchema(s){const n=t.scopeValue("schema",u.code.source===true?{ref:s,code:(0,i.stringify)(s)}:{ref:s});const o=t.name("valid");const a=e.subschema({schema:s,dataTypes:[],schemaPath:i.nil,topSchemaRef:n,errSchemaPath:r},o);e.mergeEvaluated(a);e.ok(o)}}};function getValidate(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}t.getValidate=getValidate;function callRef(e,t,r,s){const{gen:a,it:l}=e;const{allErrors:u,schemaEnv:h,opts:d}=l;const p=d.passContext?o.default.this:i.nil;if(s)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!h.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code((0,i._)`await ${(0,n.callValidateCode)(e,t,p)}`);addEvaluatedFrom(t);if(!u)a.assign(r,true)}),(e=>{a.if((0,i._)`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e)));addErrorsFrom(e);if(!u)a.assign(r,false)}));e.ok(r)}function callSyncRef(){e.result((0,n.callValidateCode)(e,t,p),(()=>addEvaluatedFrom(t)),(()=>addErrorsFrom(t)))}function addErrorsFrom(e){const t=(0,i._)`${e}.errors`;a.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`);a.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function addEvaluatedFrom(e){var t;if(!l.opts.unevaluated)return;const s=(t=r===null||r===void 0?void 0:r.validate)===null||t===void 0?void 0:t.evaluated;if(l.props!==true){if(s&&!s.dynamicProps){if(s.props!==undefined){l.props=c.mergeEvaluated.props(a,s.props,l.props)}}else{const t=a.var("props",(0,i._)`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,i.Name)}}if(l.items!==true){if(s&&!s.dynamicItems){if(s.items!==undefined){l.items=c.mergeEvaluated.items(a,s.items,l.items)}}else{const t=a.var("items",(0,i._)`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,i.Name)}}}}t.callRef=callRef;t["default"]=l},263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(4415);const i=r(5444);const o=r(9068);const a={message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,s._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`};const c={keyword:"discriminator",type:"object",schemaType:"object",error:a,code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:l}=e;const{oneOf:u}=c;if(!l.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const h=a.propertyName;if(typeof h!="string")throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",false);const p=t.const("tag",(0,s._)`${r}${(0,s.getProperty)(h)}`);t.if((0,s._)`typeof ${p} == "string"`,(()=>validateMapping()),(()=>e.error(false,{discrError:n.DiscrError.Tag,tag:p,tagName:h})));e.ok(d);function validateMapping(){const r=getMapping();t.if(false);for(const e in r){t.elseIf((0,s._)`${p} === ${e}`);t.assign(d,applyTagSchema(r[e]))}t.else();e.error(false,{discrError:n.DiscrError.Mapping,tag:p,tagName:h});t.endIf()}function applyTagSchema(r){const n=t.name("valid");const i=e.subschema({keyword:"oneOf",schemaProp:r},n);e.mergeEvaluated(i,s.Name);return n}function getMapping(){var e;const t={};const r=hasRequired(c);let s=true;for(let t=0;t<u.length;t++){let n=u[t];if((n===null||n===void 0?void 0:n.$ref)&&!(0,o.schemaHasRulesButRef)(n,l.self.RULES)){n=i.resolveRef.call(l.self,l.schemaEnv.root,l.baseId,n===null||n===void 0?void 0:n.$ref);if(n instanceof i.SchemaEnv)n=n.schema}const a=(e=n===null||n===void 0?void 0:n.properties)===null||e===void 0?void 0:e[h];if(typeof a!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${h}"`)}s=s&&(r||hasRequired(n));addMappings(a,t)}if(!s)throw new Error(`discriminator: "${h}" must be required`);return t;function hasRequired({required:e}){return Array.isArray(e)&&e.includes(h)}function addMappings(e,t){if(e.const){addMapping(e.const,t)}else if(e.enum){for(const r of e.enum){addMapping(r,t)}}else{throw new Error(`discriminator: "properties/${h}" must have "const" or "enum"`)}}function addMapping(e,r){if(typeof e!="string"||e in t){throw new Error(`discriminator: "${h}" values must be unique strings`)}t[e]=r}}}};t["default"]=c},4415:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiscrError=void 0;var r;(function(e){e["Tag"]="tag";e["Mapping"]="mapping"})(r=t.DiscrError||(t.DiscrError={}))},1002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3488);const n=r(1076);const i=r(6500);const o=r(655);const a=r(4424);const c=[s.default,n.default,(0,i.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t["default"]=c},170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n={message:({schemaCode:e})=>(0,s.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,s._)`{format: ${e}}`};const i={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:n,code(e,t){const{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:c}=e;const{opts:l,errSchemaPath:u,schemaEnv:h,self:d}=c;if(!l.validateFormats)return;if(i)validate$DataFormat();else validateFormat();function validate$DataFormat(){const i=r.scopeValue("formats",{ref:d.formats,code:l.code.formats});const o=r.const("fDef",(0,s._)`${i}[${a}]`);const c=r.let("fType");const u=r.let("format");r.if((0,s._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,(0,s._)`${o}.type || "string"`).assign(u,(0,s._)`${o}.validate`)),(()=>r.assign(c,(0,s._)`"string"`).assign(u,o)));e.fail$data((0,s.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(l.strictSchema===false)return s.nil;return(0,s._)`${a} && !${u}`}function invalidFmt(){const e=h.$async?(0,s._)`(${o}.async ? await ${u}(${n}) : ${u}(${n}))`:(0,s._)`${u}(${n})`;const r=(0,s._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${n}))`;return(0,s._)`${u} && ${u} !== true && ${c} === ${t} && !${r}`}}function validateFormat(){const i=d.formats[o];if(!i){unknownFormat();return}if(i===true)return;const[a,c,p]=getFormat(i);if(a===t)e.pass(validCondition());function unknownFormat(){if(l.strictSchema===false){d.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function getFormat(e){const t=e instanceof RegExp?(0,s.regexpCode)(e):l.code.formats?(0,s._)`${l.code.formats}${(0,s.getProperty)(o)}`:undefined;const n=r.scopeValue("formats",{key:o,ref:e,code:t});if(typeof e=="object"&&!(e instanceof RegExp)){return[e.type||"string",e.validate,(0,s._)`${n}.validate`]}return["string",e,n]}function validCondition(){if(typeof i=="object"&&!(i instanceof RegExp)&&i.async){if(!h.$async)throw new Error("async format in sync schema");return(0,s._)`await ${p}(${n})`}return typeof c=="function"?(0,s._)`${p}(${n})`:(0,s._)`${p}.test(${n})`}}}};t["default"]=i},655:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(170);const n=[s.default];t["default"]=n},4424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.contentVocabulary=t.metadataVocabulary=void 0;t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i=r(4461);const o={message:"must be equal to constant",params:({schemaCode:e})=>(0,s._)`{allowedValue: ${e}}`};const a={keyword:"const",$data:true,error:o,code(e){const{gen:t,data:r,$data:o,schemaCode:a,schema:c}=e;if(o||c&&typeof c=="object"){e.fail$data((0,s._)`!${(0,n.useFunc)(t,i.default)}(${r}, ${a})`)}else{e.fail((0,s._)`${c} !== ${r}`)}}};t["default"]=a},3575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i=r(4461);const o={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,s._)`{allowedValues: ${e}}`};const a={keyword:"enum",schemaType:"array",$data:true,error:o,code(e){const{gen:t,data:r,$data:o,schema:a,schemaCode:c,it:l}=e;if(!o&&a.length===0)throw new Error("enum must have non-empty array");const u=a.length>=l.opts.loopEnum;let h;const getEql=()=>h!==null&&h!==void 0?h:h=(0,n.useFunc)(t,i.default);let d;if(u||o){d=t.let("valid");e.block$data(d,loopEnum)}else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);d=(0,s.or)(...a.map(((t,r)=>equalCode(e,r))))}e.pass(d);function loopEnum(){t.assign(d,false);t.forOf("v",c,(e=>t.if((0,s._)`${getEql()}(${r}, ${e})`,(()=>t.assign(d,true).break()))))}function equalCode(e,t){const n=a[t];return typeof n==="object"&&n!==null?(0,s._)`${getEql()}(${r}, ${e}[${t}])`:(0,s._)`${r} === ${n}`}}};t["default"]=a},1076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5646);const n=r(6325);const i=r(6976);const o=r(9258);const a=r(4160);const c=r(7177);const l=r(1612);const u=r(7659);const h=r(7964);const d=r(3575);const p=[s.default,n.default,i.default,o.default,a.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h.default,d.default];t["default"]=p},1612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,s.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`};const i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:n,code(e){const{keyword:t,data:r,schemaCode:n}=e;const i=t==="maxItems"?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`${r}.length ${i} ${n}`)}};t["default"]=i},6976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=r(9068);const i=r(7382);const o={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,s.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`};const a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:o,code(e){const{keyword:t,data:r,schemaCode:o,it:a}=e;const c=t==="maxLength"?s.operators.GT:s.operators.LT;const l=a.opts.unicode===false?(0,s._)`${r}.length`:(0,s._)`${(0,n.useFunc)(e.gen,i.default)}(${r})`;e.fail$data((0,s._)`${l} ${c} ${o}`)}};t["default"]=a},5646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n=s.operators;const i={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}};const o={message:({keyword:e,schemaCode:t})=>(0,s.str)`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,s._)`{comparison: ${i[e].okStr}, limit: ${t}}`};const a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:true,error:o,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,s._)`${r} ${i[t].fail} ${n} || isNaN(${r})`)}};t["default"]=a},4160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,s.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`};const i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:n,code(e){const{keyword:t,data:r,schemaCode:n}=e;const i=t==="maxProperties"?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`Object.keys(${r}).length ${i} ${n}`)}};t["default"]=i},6325:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4598);const n={message:({schemaCode:e})=>(0,s.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,s._)`{multipleOf: ${e}}`};const i={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:n,code(e){const{gen:t,data:r,schemaCode:n,it:i}=e;const o=i.opts.multipleOfPrecision;const a=t.let("res");const c=o?(0,s._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,s._)`${a} !== parseInt(${a})`;e.fail$data((0,s._)`(${n} === 0 || (${a} = ${r}/${n}, ${c}))`)}};t["default"]=i},9258:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8572);const n=r(4598);const i={message:({schemaCode:e})=>(0,n.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,n._)`{pattern: ${e}}`};const o={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:i,code(e){const{data:t,$data:r,schema:i,schemaCode:o,it:a}=e;const c=a.opts.unicodeRegExp?"u":"";const l=r?(0,n._)`(new RegExp(${o}, ${c}))`:(0,s.usePattern)(e,i);e.fail$data((0,n._)`!${l}.test(${t})`)}};t["default"]=o},7177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8572);const n=r(4598);const i=r(9068);const o={message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`};const a={keyword:"required",type:"object",schemaType:"array",$data:true,error:o,code(e){const{gen:t,schema:r,schemaCode:o,data:a,$data:c,it:l}=e;const{opts:u}=l;if(!c&&r.length===0)return;const h=r.length>=u.loopRequired;if(l.allErrors)allErrorsMode();else exitOnErrorMode();if(u.strictRequired){const t=e.parentSchema.properties;const{definedProperties:s}=e.it;for(const e of r){if((t===null||t===void 0?void 0:t[e])===undefined&&!s.has(e)){const t=l.schemaEnv.baseId+l.errSchemaPath;const r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,i.checkStrictMode)(l,r,l.opts.strictRequired)}}}function allErrorsMode(){if(h||c){e.block$data(n.nil,loopAllRequired)}else{for(const t of r){(0,s.checkReportMissingProp)(e,t)}}}function exitOnErrorMode(){const n=t.let("missing");if(h||c){const r=t.let("valid",true);e.block$data(r,(()=>loopUntilMissing(n,r)));e.ok(r)}else{t.if((0,s.checkMissingProp)(e,r,n));(0,s.reportMissingProp)(e,n);t.else()}}function loopAllRequired(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r});t.if((0,s.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}function loopUntilMissing(r,i){e.setParams({missingProperty:r});t.forOf(r,o,(()=>{t.assign(i,(0,s.propertyInData)(t,a,r,u.ownProperties));t.if((0,n.not)(i),(()=>{e.error();t.break()}))}),n.nil)}}};t["default"]=a},7659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7853);const n=r(4598);const i=r(9068);const o=r(4461);const a={message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`};const c={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:a,code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:l,schemaCode:u,it:h}=e;if(!a&&!c)return;const d=t.let("valid");const p=l.items?(0,s.getSchemaTypes)(l.items):[];e.block$data(d,validateUniqueItems,(0,n._)`${u} === false`);e.ok(d);function validateUniqueItems(){const s=t.let("i",(0,n._)`${r}.length`);const i=t.let("j");e.setParams({i:s,j:i});t.assign(d,true);t.if((0,n._)`${s} > 1`,(()=>(canOptimize()?loopN:loopN2)(s,i)))}function canOptimize(){return p.length>0&&!p.some((e=>e==="object"||e==="array"))}function loopN(i,o){const a=t.name("item");const c=(0,s.checkDataTypes)(p,a,h.opts.strictNumbers,s.DataType.Wrong);const l=t.const("indices",(0,n._)`{}`);t.for((0,n._)`;${i}--;`,(()=>{t.let(a,(0,n._)`${r}[${i}]`);t.if(c,(0,n._)`continue`);if(p.length>1)t.if((0,n._)`typeof ${a} == "string"`,(0,n._)`${a} += "_"`);t.if((0,n._)`typeof ${l}[${a}] == "number"`,(()=>{t.assign(o,(0,n._)`${l}[${a}]`);e.error();t.assign(d,false).break()})).code((0,n._)`${l}[${a}] = ${i}`)}))}function loopN2(s,a){const c=(0,i.useFunc)(t,o.default);const l=t.name("outer");t.label(l).for((0,n._)`;${s}--;`,(()=>t.for((0,n._)`${a} = ${s}; ${a}--;`,(()=>t.if((0,n._)`${c}(${r}[${s}], ${r}[${a}])`,(()=>{e.error();t.assign(d,false).break(l)}))))))}}};t["default"]=c},9239:(e,t,r)=>{var s=r(6862);function retry(e,t){function run(r,n){var i=t||{};if(!("randomize"in i)){i.randomize=true}var o=s.operation(i);function bail(e){n(e||new Error("Aborted"))}function onError(e,t){if(e.bail){bail(e);return}if(!o.retry(e)){n(o.mainError())}else if(i.onRetry){i.onRetry(e,t)}}function runAttempt(t){var s;try{s=e(bail,t)}catch(e){onError(e,t);return}Promise.resolve(s).then(r).catch((function catchIt(e){onError(e,t)}))}o.attempt(runAttempt)}return new Promise(run)}e.exports=retry},8383:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const n=s(r(2361));function arrayMove(e,t,r,s,n){for(let i=0;i<n;++i){r[i+s]=e[i+t];e[i+t]=void 0}}function pow2AtLeast(e){e=e>>>0;e=e-1;e=e|e>>1;e=e|e>>2;e=e|e>>4;e=e|e>>8;e=e|e>>16;return e+1}function getCapacity(e){return pow2AtLeast(Math.min(Math.max(16,e),1073741824))}class Deque{constructor(e){this._capacity=getCapacity(e);this._length=0;this._front=0;this.arr=[]}push(e){const t=this._length;this.checkCapacity(t+1);const r=this._front+t&this._capacity-1;this.arr[r]=e;this._length=t+1;return t+1}pop(){const e=this._length;if(e===0){return void 0}const t=this._front+e-1&this._capacity-1;const r=this.arr[t];this.arr[t]=void 0;this._length=e-1;return r}shift(){const e=this._length;if(e===0){return void 0}const t=this._front;const r=this.arr[t];this.arr[t]=void 0;this._front=t+1&this._capacity-1;this._length=e-1;return r}get length(){return this._length}checkCapacity(e){if(this._capacity<e){this.resizeTo(getCapacity(this._capacity*1.5+16))}}resizeTo(e){const t=this._capacity;this._capacity=e;const r=this._front;const s=this._length;if(r+s>t){const e=r+s&t-1;arrayMove(this.arr,0,this.arr,t,e)}}}class ReleaseEmitter extends n.default{}function isFn(e){return typeof e==="function"}function defaultInit(){return"1"}class Sema{constructor(e,{initFn:t=defaultInit,pauseFn:r,resumeFn:s,capacity:n=10}={}){if(isFn(r)!==isFn(s)){throw new Error("pauseFn and resumeFn must be both set for pausing")}this.nrTokens=e;this.free=new Deque(e);this.waiting=new Deque(n);this.releaseEmitter=new ReleaseEmitter;this.noTokens=t===defaultInit;this.pauseFn=r;this.resumeFn=s;this.paused=false;this.releaseEmitter.on("release",(e=>{const t=this.waiting.shift();if(t){t.resolve(e)}else{if(this.resumeFn&&this.paused){this.paused=false;this.resumeFn()}this.free.push(e)}}));for(let r=0;r<e;r++){this.free.push(t())}}async acquire(){let e=this.free.pop();if(e!==void 0){return e}return new Promise(((e,t)=>{if(this.pauseFn&&!this.paused){this.paused=true;this.pauseFn()}this.waiting.push({resolve:e,reject:t})}))}release(e){this.releaseEmitter.emit("release",this.noTokens?"1":e)}drain(){const e=new Array(this.nrTokens);for(let t=0;t<this.nrTokens;t++){e[t]=this.acquire()}return Promise.all(e)}nrWaiting(){return this.waiting.length}}t.Sema=Sema;function RateLimit(e,{timeUnit:t=1e3,uniformDistribution:r=false}={}){const s=new Sema(r?1:e);const n=r?t/e:t;return async function rl(){await s.acquire();setTimeout((()=>s.release()),n)}}t.RateLimit=RateLimit},3005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NOOP=t.LIMIT_FILES_DESCRIPTORS=t.LIMIT_BASENAME_LENGTH=t.IS_USER_ROOT=t.IS_POSIX=t.DEFAULT_TIMEOUT_SYNC=t.DEFAULT_TIMEOUT_ASYNC=t.DEFAULT_WRITE_OPTIONS=t.DEFAULT_READ_OPTIONS=t.DEFAULT_FOLDER_MODE=t.DEFAULT_FILE_MODE=t.DEFAULT_ENCODING=void 0;const r="utf8";t.DEFAULT_ENCODING=r;const s=438;t.DEFAULT_FILE_MODE=s;const n=511;t.DEFAULT_FOLDER_MODE=n;const i={};t.DEFAULT_READ_OPTIONS=i;const o={};t.DEFAULT_WRITE_OPTIONS=o;const a=5e3;t.DEFAULT_TIMEOUT_ASYNC=a;const c=100;t.DEFAULT_TIMEOUT_SYNC=c;const l=!!process.getuid;t.IS_POSIX=l;const u=process.getuid?!process.getuid():false;t.IS_USER_ROOT=u;const h=128;t.LIMIT_BASENAME_LENGTH=h;const d=1e4;t.LIMIT_FILES_DESCRIPTORS=d;const NOOP=()=>{};t.NOOP=NOOP},3809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.writeFileSync=t.writeFile=t.readFileSync=t.readFile=void 0;const s=r(1017);const n=r(3005);const i=r(9142);const o=r(3716);const a=r(9063);const c=r(7281);function readFile(e,t=n.DEFAULT_READ_OPTIONS){var r;if(o.default.isString(t))return readFile(e,{encoding:t});const s=Date.now()+((r=t.timeout)!==null&&r!==void 0?r:n.DEFAULT_TIMEOUT_ASYNC);return i.default.readFileRetry(s)(e,t)}t.readFile=readFile;function readFileSync(e,t=n.DEFAULT_READ_OPTIONS){var r;if(o.default.isString(t))return readFileSync(e,{encoding:t});const s=Date.now()+((r=t.timeout)!==null&&r!==void 0?r:n.DEFAULT_TIMEOUT_SYNC);return i.default.readFileSyncRetry(s)(e,t)}t.readFileSync=readFileSync;const writeFile=(e,t,r,s)=>{if(o.default.isFunction(r))return writeFile(e,t,n.DEFAULT_WRITE_OPTIONS,r);const i=writeFileAsync(e,t,r);if(s)i.then(s,s);return i};t.writeFile=writeFile;const writeFileAsync=async(e,t,r=n.DEFAULT_WRITE_OPTIONS)=>{var l;if(o.default.isString(r))return writeFileAsync(e,t,{encoding:r});const u=Date.now()+((l=r.timeout)!==null&&l!==void 0?l:n.DEFAULT_TIMEOUT_ASYNC);let h=null,d=null,p=null,m=null,y=null;try{if(r.schedule)h=await r.schedule(e);d=await a.default.schedule(e);e=await i.default.realpathAttempt(e)||e;[m,p]=c.default.get(e,r.tmpCreate||c.default.create,!(r.tmpPurge===false));const l=n.IS_POSIX&&o.default.isUndefined(r.chown),g=o.default.isUndefined(r.mode);if(l||g){const t=await i.default.statAttempt(e);if(t){r={...r};if(l)r.chown={uid:t.uid,gid:t.gid};if(g)r.mode=t.mode}}const v=s.dirname(e);await i.default.mkdirAttempt(v,{mode:n.DEFAULT_FOLDER_MODE,recursive:true});y=await i.default.openRetry(u)(m,"w",r.mode||n.DEFAULT_FILE_MODE);if(r.tmpCreated)r.tmpCreated(m);if(o.default.isString(t)){await i.default.writeRetry(u)(y,t,0,r.encoding||n.DEFAULT_ENCODING)}else if(!o.default.isUndefined(t)){await i.default.writeRetry(u)(y,t,0,t.length,0)}if(r.fsync!==false){if(r.fsyncWait!==false){await i.default.fsyncRetry(u)(y)}else{i.default.fsyncAttempt(y)}}await i.default.closeRetry(u)(y);y=null;if(r.chown)await i.default.chownAttempt(m,r.chown.uid,r.chown.gid);if(r.mode)await i.default.chmodAttempt(m,r.mode);try{await i.default.renameRetry(u)(m,e)}catch(t){if(t.code!=="ENAMETOOLONG")throw t;await i.default.renameRetry(u)(m,c.default.truncate(e))}p();m=null}finally{if(y)await i.default.closeAttempt(y);if(m)c.default.purge(m);if(h)h();if(d)d()}};const writeFileSync=(e,t,r=n.DEFAULT_WRITE_OPTIONS)=>{var a;if(o.default.isString(r))return writeFileSync(e,t,{encoding:r});const l=Date.now()+((a=r.timeout)!==null&&a!==void 0?a:n.DEFAULT_TIMEOUT_SYNC);let u=null,h=null,d=null;try{e=i.default.realpathSyncAttempt(e)||e;[h,u]=c.default.get(e,r.tmpCreate||c.default.create,!(r.tmpPurge===false));const a=n.IS_POSIX&&o.default.isUndefined(r.chown),p=o.default.isUndefined(r.mode);if(a||p){const t=i.default.statSyncAttempt(e);if(t){r={...r};if(a)r.chown={uid:t.uid,gid:t.gid};if(p)r.mode=t.mode}}const m=s.dirname(e);i.default.mkdirSyncAttempt(m,{mode:n.DEFAULT_FOLDER_MODE,recursive:true});d=i.default.openSyncRetry(l)(h,"w",r.mode||n.DEFAULT_FILE_MODE);if(r.tmpCreated)r.tmpCreated(h);if(o.default.isString(t)){i.default.writeSyncRetry(l)(d,t,0,r.encoding||n.DEFAULT_ENCODING)}else if(!o.default.isUndefined(t)){i.default.writeSyncRetry(l)(d,t,0,t.length,0)}if(r.fsync!==false){if(r.fsyncWait!==false){i.default.fsyncSyncRetry(l)(d)}else{i.default.fsyncAttempt(d)}}i.default.closeSyncRetry(l)(d);d=null;if(r.chown)i.default.chownSyncAttempt(h,r.chown.uid,r.chown.gid);if(r.mode)i.default.chmodSyncAttempt(h,r.mode);try{i.default.renameSyncRetry(l)(h,e)}catch(t){if(t.code!=="ENAMETOOLONG")throw t;i.default.renameSyncRetry(l)(h,c.default.truncate(e))}u();h=null}finally{if(d)i.default.closeSyncAttempt(d);if(h)c.default.purge(h)}};t.writeFileSync=writeFileSync},5352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.attemptifySync=t.attemptifyAsync=void 0;const s=r(3005);const attemptifyAsync=(e,t=s.NOOP)=>function(){return e.apply(undefined,arguments).catch(t)};t.attemptifyAsync=attemptifyAsync;const attemptifySync=(e,t=s.NOOP)=>function(){try{return e.apply(undefined,arguments)}catch(e){return t(e)}};t.attemptifySync=attemptifySync},9142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7147);const n=r(3837);const i=r(5352);const o=r(5386);const a=r(5855);const c={chmodAttempt:i.attemptifyAsync(n.promisify(s.chmod),o.default.onChangeError),chownAttempt:i.attemptifyAsync(n.promisify(s.chown),o.default.onChangeError),closeAttempt:i.attemptifyAsync(n.promisify(s.close)),fsyncAttempt:i.attemptifyAsync(n.promisify(s.fsync)),mkdirAttempt:i.attemptifyAsync(n.promisify(s.mkdir)),realpathAttempt:i.attemptifyAsync(n.promisify(s.realpath)),statAttempt:i.attemptifyAsync(n.promisify(s.stat)),unlinkAttempt:i.attemptifyAsync(n.promisify(s.unlink)),closeRetry:a.retryifyAsync(n.promisify(s.close),o.default.isRetriableError),fsyncRetry:a.retryifyAsync(n.promisify(s.fsync),o.default.isRetriableError),openRetry:a.retryifyAsync(n.promisify(s.open),o.default.isRetriableError),readFileRetry:a.retryifyAsync(n.promisify(s.readFile),o.default.isRetriableError),renameRetry:a.retryifyAsync(n.promisify(s.rename),o.default.isRetriableError),statRetry:a.retryifyAsync(n.promisify(s.stat),o.default.isRetriableError),writeRetry:a.retryifyAsync(n.promisify(s.write),o.default.isRetriableError),chmodSyncAttempt:i.attemptifySync(s.chmodSync,o.default.onChangeError),chownSyncAttempt:i.attemptifySync(s.chownSync,o.default.onChangeError),closeSyncAttempt:i.attemptifySync(s.closeSync),mkdirSyncAttempt:i.attemptifySync(s.mkdirSync),realpathSyncAttempt:i.attemptifySync(s.realpathSync),statSyncAttempt:i.attemptifySync(s.statSync),unlinkSyncAttempt:i.attemptifySync(s.unlinkSync),closeSyncRetry:a.retryifySync(s.closeSync,o.default.isRetriableError),fsyncSyncRetry:a.retryifySync(s.fsyncSync,o.default.isRetriableError),openSyncRetry:a.retryifySync(s.openSync,o.default.isRetriableError),readFileSyncRetry:a.retryifySync(s.readFileSync,o.default.isRetriableError),renameSyncRetry:a.retryifySync(s.renameSync,o.default.isRetriableError),statSyncRetry:a.retryifySync(s.statSync,o.default.isRetriableError),writeSyncRetry:a.retryifySync(s.writeSync,o.default.isRetriableError)};t["default"]=c},5386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3005);const n={isChangeErrorOk:e=>{const{code:t}=e;if(t==="ENOSYS")return true;if(!s.IS_USER_ROOT&&(t==="EINVAL"||t==="EPERM"))return true;return false},isRetriableError:e=>{const{code:t}=e;if(t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCS"||t==="EPERM")return true;return false},onChangeError:e=>{if(n.isChangeErrorOk(e))return;throw e}};t["default"]=n},3716:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={isFunction:e=>typeof e==="function",isString:e=>typeof e==="string",isUndefined:e=>typeof e==="undefined"};t["default"]=r},5855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.retryifySync=t.retryifyAsync=void 0;const s=r(370);const retryifyAsync=(e,t)=>function(r){return function attempt(){return s.default.schedule().then((s=>e.apply(undefined,arguments).then((e=>{s();return e}),(e=>{s();if(Date.now()>=r)throw e;if(t(e)){const e=Math.round(100+400*Math.random()),t=new Promise((t=>setTimeout(t,e)));return t.then((()=>attempt.apply(undefined,arguments)))}throw e}))))}};t.retryifyAsync=retryifyAsync;const retryifySync=(e,t)=>function(r){return function attempt(){try{return e.apply(undefined,arguments)}catch(e){if(Date.now()>r)throw e;if(t(e))return attempt.apply(undefined,arguments);throw e}}};t.retryifySync=retryifySync},370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3005);const n={interval:25,intervalId:undefined,limit:s.LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{if(n.intervalId)return;n.intervalId=setInterval(n.tick,n.interval)},reset:()=>{if(!n.intervalId)return;clearInterval(n.intervalId);delete n.intervalId},add:e=>{n.queueWaiting.add(e);if(n.queueActive.size<n.limit/2){n.tick()}else{n.init()}},remove:e=>{n.queueWaiting.delete(e);n.queueActive.delete(e)},schedule:()=>new Promise((e=>{const cleanup=()=>n.remove(resolver);const resolver=()=>e(cleanup);n.add(resolver)})),tick:()=>{if(n.queueActive.size>=n.limit)return;if(!n.queueWaiting.size)return n.reset();for(const e of n.queueWaiting){if(n.queueActive.size>=n.limit)break;n.queueWaiting.delete(e);n.queueActive.add(e);e()}}};t["default"]=n},9063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={};const s={next:e=>{const t=r[e];if(!t)return;t.shift();const n=t[0];if(n){n((()=>s.next(e)))}else{delete r[e]}},schedule:e=>new Promise((t=>{let n=r[e];if(!n)n=r[e]=[];n.push(t);if(n.length>1)return;t((()=>s.next(e)))}))};t["default"]=s},7281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1017);const n=r(3005);const i=r(9142);const o={store:{},create:e=>{const t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),s="tmp-",n=`.${s}${r}${t}`,i=`${e}${n}`;return i},get:(e,t,r=true)=>{const s=o.truncate(t(e));if(s in o.store)return o.get(e,t,r);o.store[s]=r;const disposer=()=>delete o.store[s];return[s,disposer]},purge:e=>{if(!o.store[e])return;delete o.store[e];i.default.unlinkAttempt(e)},purgeSync:e=>{if(!o.store[e])return;delete o.store[e];i.default.unlinkSyncAttempt(e)},purgeSyncAll:()=>{for(const e in o.store){o.purgeSync(e)}},truncate:e=>{const t=s.basename(e);if(t.length<=n.LIMIT_BASENAME_LENGTH)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const i=t.length-n.LIMIT_BASENAME_LENGTH;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-i)}${r[3]}`}};process.on("exit",o.purgeSyncAll);t["default"]=o},8333:(e,t,r)=>{"use strict";const s=r(8137);const n=r(8179);const i=r(3013);const o=r(5719);const braces=(e,t={})=>{let r=[];if(Array.isArray(e)){for(let s of e){let e=braces.create(s,t);if(Array.isArray(e)){r.push(...e)}else{r.push(e)}}}else{r=[].concat(braces.create(e,t))}if(t&&t.expand===true&&t.nodupes===true){r=[...new Set(r)]}return r};braces.parse=(e,t={})=>o(e,t);braces.stringify=(e,t={})=>{if(typeof e==="string"){return s(braces.parse(e,t),t)}return s(e,t)};braces.compile=(e,t={})=>{if(typeof e==="string"){e=braces.parse(e,t)}return n(e,t)};braces.expand=(e,t={})=>{if(typeof e==="string"){e=braces.parse(e,t)}let r=i(e,t);if(t.noempty===true){r=r.filter(Boolean)}if(t.nodupes===true){r=[...new Set(r)]}return r};braces.create=(e,t={})=>{if(e===""||e.length<3){return[e]}return t.expand!==true?braces.compile(e,t):braces.expand(e,t)};e.exports=braces},8179:(e,t,r)=>{"use strict";const s=r(7783);const n=r(5617);const compile=(e,t={})=>{let walk=(e,r={})=>{let i=n.isInvalidBrace(r);let o=e.invalid===true&&t.escapeInvalid===true;let a=i===true||o===true;let c=t.escapeInvalid===true?"\\":"";let l="";if(e.isOpen===true){return c+e.value}if(e.isClose===true){return c+e.value}if(e.type==="open"){return a?c+e.value:"("}if(e.type==="close"){return a?c+e.value:")"}if(e.type==="comma"){return e.prev.type==="comma"?"":a?e.value:"|"}if(e.value){return e.value}if(e.nodes&&e.ranges>0){let r=n.reduce(e.nodes);let i=s(...r,{...t,wrap:false,toRegex:true});if(i.length!==0){return r.length>1&&i.length>1?`(${i})`:i}}if(e.nodes){for(let t of e.nodes){l+=walk(t,e)}}return l};return walk(e)};e.exports=compile},5457:e=>{"use strict";e.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},3013:(e,t,r)=>{"use strict";const s=r(7783);const n=r(8137);const i=r(5617);const append=(e="",t="",r=false)=>{let s=[];e=[].concat(e);t=[].concat(t);if(!t.length)return e;if(!e.length){return r?i.flatten(t).map((e=>`{${e}}`)):t}for(let n of e){if(Array.isArray(n)){for(let e of n){s.push(append(e,t,r))}}else{for(let e of t){if(r===true&&typeof e==="string")e=`{${e}}`;s.push(Array.isArray(e)?append(n,e,r):n+e)}}}return i.flatten(s)};const expand=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit;let walk=(e,o={})=>{e.queue=[];let a=o;let c=o.queue;while(a.type!=="brace"&&a.type!=="root"&&a.parent){a=a.parent;c=a.queue}if(e.invalid||e.dollar){c.push(append(c.pop(),n(e,t)));return}if(e.type==="brace"&&e.invalid!==true&&e.nodes.length===2){c.push(append(c.pop(),["{}"]));return}if(e.nodes&&e.ranges>0){let o=i.reduce(e.nodes);if(i.exceedsLimit(...o,t.step,r)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let a=s(...o,t);if(a.length===0){a=n(e,t)}c.push(append(c.pop(),a));e.nodes=[];return}let l=i.encloseBrace(e);let u=e.queue;let h=e;while(h.type!=="brace"&&h.type!=="root"&&h.parent){h=h.parent;u=h.queue}for(let t=0;t<e.nodes.length;t++){let r=e.nodes[t];if(r.type==="comma"&&e.type==="brace"){if(t===1)u.push("");u.push("");continue}if(r.type==="close"){c.push(append(c.pop(),u,l));continue}if(r.value&&r.type!=="open"){u.push(append(u.pop(),r.value));continue}if(r.nodes){walk(r,e)}}return u};return i.flatten(walk(e))};e.exports=expand},5719:(e,t,r)=>{"use strict";const s=r(8137);const{MAX_LENGTH:n,CHAR_BACKSLASH:i,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:l,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:h,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_RIGHT_SQUARE_BRACKET:m,CHAR_DOUBLE_QUOTE:y,CHAR_SINGLE_QUOTE:g,CHAR_NO_BREAK_SPACE:v,CHAR_ZERO_WIDTH_NOBREAK_SPACE:b}=r(5457);const parse=(e,t={})=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}let r=t||{};let w=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;if(e.length>w){throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${w})`)}let E={type:"root",input:e,nodes:[]};let S=[E];let x=E;let R=E;let P=0;let O=e.length;let $=0;let A=0;let T;let C={};const advance=()=>e[$++];const push=e=>{if(e.type==="text"&&R.type==="dot"){R.type="text"}if(R&&R.type==="text"&&e.type==="text"){R.value+=e.value;return}x.nodes.push(e);e.parent=x;e.prev=R;R=e;return e};push({type:"bos"});while($<O){x=S[S.length-1];T=advance();if(T===b||T===v){continue}if(T===i){push({type:"text",value:(t.keepEscaping?T:"")+advance()});continue}if(T===m){push({type:"text",value:"\\"+T});continue}if(T===p){P++;let e=true;let t;while($<O&&(t=advance())){T+=t;if(t===p){P++;continue}if(t===i){T+=advance();continue}if(t===m){P--;if(P===0){break}}}push({type:"text",value:T});continue}if(T===l){x=push({type:"paren",nodes:[]});S.push(x);push({type:"text",value:T});continue}if(T===u){if(x.type!=="paren"){push({type:"text",value:T});continue}x=S.pop();push({type:"text",value:T});x=S[S.length-1];continue}if(T===y||T===g||T===o){let e=T;let r;if(t.keepQuotes!==true){T=""}while($<O&&(r=advance())){if(r===i){T+=r+advance();continue}if(r===e){if(t.keepQuotes===true)T+=r;break}T+=r}push({type:"text",value:T});continue}if(T===h){A++;let e=R.value&&R.value.slice(-1)==="$"||x.dollar===true;let t={type:"brace",open:true,close:false,dollar:e,depth:A,commas:0,ranges:0,nodes:[]};x=push(t);S.push(x);push({type:"open",value:T});continue}if(T===d){if(x.type!=="brace"){push({type:"text",value:T});continue}let e="close";x=S.pop();x.close=true;push({type:e,value:T});A--;x=S[S.length-1];continue}if(T===a&&A>0){if(x.ranges>0){x.ranges=0;let e=x.nodes.shift();x.nodes=[e,{type:"text",value:s(x)}]}push({type:"comma",value:T});x.commas++;continue}if(T===c&&A>0&&x.commas===0){let e=x.nodes;if(A===0||e.length===0){push({type:"text",value:T});continue}if(R.type==="dot"){x.range=[];R.value+=T;R.type="range";if(x.nodes.length!==3&&x.nodes.length!==5){x.invalid=true;x.ranges=0;R.type="text";continue}x.ranges++;x.args=[];continue}if(R.type==="range"){e.pop();let t=e[e.length-1];t.value+=R.value+T;R=t;x.ranges--;continue}push({type:"dot",value:T});continue}push({type:"text",value:T})}do{x=S.pop();if(x.type!=="root"){x.nodes.forEach((e=>{if(!e.nodes){if(e.type==="open")e.isOpen=true;if(e.type==="close")e.isClose=true;if(!e.nodes)e.type="text";e.invalid=true}}));let e=S[S.length-1];let t=e.nodes.indexOf(x);e.nodes.splice(t,1,...x.nodes)}}while(S.length>0);push({type:"eos"});return E};e.exports=parse},8137:(e,t,r)=>{"use strict";const s=r(5617);e.exports=(e,t={})=>{let stringify=(e,r={})=>{let n=t.escapeInvalid&&s.isInvalidBrace(r);let i=e.invalid===true&&t.escapeInvalid===true;let o="";if(e.value){if((n||i)&&s.isOpenOrClose(e)){return"\\"+e.value}return e.value}if(e.value){return e.value}if(e.nodes){for(let t of e.nodes){o+=stringify(t)}}return o};return stringify(e)}},5617:(e,t)=>{"use strict";t.isInteger=e=>{if(typeof e==="number"){return Number.isInteger(e)}if(typeof e==="string"&&e.trim()!==""){return Number.isInteger(Number(e))}return false};t.find=(e,t)=>e.nodes.find((e=>e.type===t));t.exceedsLimit=(e,r,s=1,n)=>{if(n===false)return false;if(!t.isInteger(e)||!t.isInteger(r))return false;return(Number(r)-Number(e))/Number(s)>=n};t.escapeNode=(e,t=0,r)=>{let s=e.nodes[t];if(!s)return;if(r&&s.type===r||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};t.encloseBrace=e=>{if(e.type!=="brace")return false;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}return false};t.isInvalidBrace=e=>{if(e.type!=="brace")return false;if(e.invalid===true||e.dollar)return true;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}if(e.open!==true||e.close!==true){e.invalid=true;return true}return false};t.isOpenOrClose=e=>{if(e.type==="open"||e.type==="close"){return true}return e.open===true||e.close===true};t.reduce=e=>e.reduce(((e,t)=>{if(t.type==="text")e.push(t.value);if(t.type==="range")t.type="text";return e}),[]);t.flatten=(...e)=>{const t=[];const flat=e=>{for(let r=0;r<e.length;r++){let s=e[r];Array.isArray(s)?flat(s,t):s!==void 0&&t.push(s)}return t};flat(e);return t}},2468:(e,t,r)=>{"use strict";const{Resolver:s,V4MAPPED:n,ADDRCONFIG:i}=r(9523);const{promisify:o}=r(3837);const a=r(2037);const c=r(55);const l=Symbol("cacheableLookupData");const u=Symbol("cacheableLookupInstance");const verifyAgent=e=>{if(!(e&&typeof e.createConnection==="function")){throw new Error("Expected an Agent instance as the first argument")}};const map4to6=e=>{for(const t of e){t.address=`::ffff:${t.address}`;t.family=6}};const getIfaceInfo=()=>{let e=false;let t=false;for(const r of Object.values(a.networkInterfaces())){for(const s of r){if(s.internal){continue}if(s.family==="IPv6"){t=true}else{e=true}if(e&&t){break}}}return{has4:e,has6:t}};class CacheableLookup{constructor({cacheAdapter:e,maxTtl:t=Infinity,resolver:r}={}){this.cache=new c({uri:typeof e==="string"&&e,store:typeof e!=="string"&&e,namespace:"cached-lookup"});this.maxTtl=t;this._resolver=r||new s;this._resolve4=o(this._resolver.resolve4.bind(this._resolver));this._resolve6=o(this._resolver.resolve6.bind(this._resolver));this._iface=getIfaceInfo();this.lookup=this.lookup.bind(this);this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if(typeof t==="function"){r=t;t={}}this.lookupAsync(e,{...t,throwNotFound:true}).then((e=>{if(t.all){r(null,e)}else{r(null,e.address,e.family,e.expires,e.ttl)}})).catch(r)}async lookupAsync(e,t={}){let r;if(!t.family&&t.all){const[t,s]=await Promise.all([this.lookupAsync(e,{all:true,family:4}),this.lookupAsync(e,{all:true,family:6})]);r=[...t,...s]}else{r=await this.query(e,t.family||4);if(r.length===0&&t.family===6&&t.hints&n){r=await this.query(e,4);map4to6(r)}}if(t.hints&i){const{_iface:e}=this;r=r.filter((t=>t.family===6?e.has6:e.has4))}if(r.length===0&&t.throwNotFound){const t=new Error(`ENOTFOUND ${e}`);t.code="ENOTFOUND";t.hostname=e;throw t}const s=Date.now();r=r.filter((e=>e.ttl===0||s<e.expires));if(t.all){return r}if(r.length===1){return r[0]}if(r.length===0){return undefined}return this._getEntry(r)}async query(e,t){let r=await this.cache.get(`${e}:${t}`);if(!r){r=await this.queryAndCache(e,t)}return r}async queryAndCache(e,t){const r=t===4?this._resolve4:this._resolve6;const s=await r(e,{ttl:true});if(s===undefined){return[]}const n=Date.now();let i=0;for(const e of s){i=Math.max(i,e.ttl);e.family=t;e.expires=n+e.ttl*1e3}i=Math.min(this.maxTtl,i)*1e3;if(this.maxTtl!==0&&i!==0){await this.cache.set(`${e}:${t}`,s,i)}return s}_getEntry(e){return e[Math.floor(Math.random()*e.length)]}install(e){verifyAgent(e);if(l in e){throw new Error("CacheableLookup has been already installed")}e[l]=e.createConnection;e[u]=this;e.createConnection=(t,r)=>{if(!("lookup"in t)){t.lookup=this.lookup}return e[l](t,r)}}uninstall(e){verifyAgent(e);if(e[l]){if(e[u]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[u]}}updateInterfaceInfo(){this._iface=getIfaceInfo()}}e.exports=CacheableLookup;e.exports["default"]=CacheableLookup},190:(e,t,r)=>{"use strict";const s=r(2361);const n=r(7310);const i=r(9718);const o=r(1401);const a=r(1454);const c=r(5810);const l=r(4162);const u=r(2806);const h=r(55);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new h({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let h;if(typeof t==="string"){h=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){h=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";h=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(h)};t.headers=l(t.headers);const d=new s;const p=i(n.format(h),{stripWWW:false,removeTrailingSlash:false,stripAuthentication:false});const m=`${t.method}:${p}`;let y=false;let g=false;const makeRequest=t=>{g=true;let s=false;let n;const i=new Promise((e=>{n=()=>{if(!s){s=true;e()}}}));const handler=e=>{if(y&&!t.forceRefresh){e.status=e.statusCode;const r=a.fromObject(y.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();e=new c(y.statusCode,t,y.body,y.url);e.cachePolicy=r.policy;e.fromCache=true}}if(!e.fromCache){e.cachePolicy=new a(t,e,t);e.fromCache=false}let n;if(t.cache&&e.cachePolicy.storable()){n=u(e);(async()=>{try{const r=o.buffer(e);await Promise.race([i,new Promise((t=>e.once("end",t)))]);if(s){return}const n=await r;const a={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?y.statusCode:e.statusCode,body:n};let c=t.strictTtl?e.cachePolicy.timeToLive():undefined;if(t.maxTtl){c=c?Math.min(c,t.maxTtl):t.maxTtl}await this.cache.set(m,a,c)}catch(e){d.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){d.emit("error",new CacheableRequest.CacheError(e))}})()}d.emit("response",n||e);if(typeof r==="function"){r(n||e)}};try{const r=e(t,handler);r.once("error",n);r.once("abort",n);d.emit("request",r)}catch(e){d.emit("error",new CacheableRequest.RequestError(e))}};(async()=>{const get=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(m):undefined;if(typeof t==="undefined"){return makeRequest(e)}const s=a.fromObject(t.cachePolicy);if(s.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=s.responseHeaders();const n=new c(t.statusCode,e,t.body,t.url);n.cachePolicy=s;n.fromCache=true;d.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>d.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);d.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}d.emit("error",new CacheableRequest.CacheError(e))}})();return d}}}function urlObjectToRequestOptions(e){const t={...e};t.path=`${e.pathname||"/"}${e.search||""}`;delete t.pathname;delete t.search;return t}function normalizeUrlObject(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}CacheableRequest.RequestError=class extends Error{constructor(e){super(e.message);this.name="RequestError";Object.assign(this,e)}};CacheableRequest.CacheError=class extends Error{constructor(e){super(e.message);this.name="CacheError";Object.assign(this,e)}};e.exports=CacheableRequest},2975:(e,t,r)=>{"use strict";const s=r(7147);const n=r(1017);const i=s.lchown?"lchown":"chown";const o=s.lchownSync?"lchownSync":"chownSync";const a=s.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const lchownSync=(e,t,r)=>{try{return s[o](e,t,r)}catch(e){if(e.code!=="ENOENT")throw e}};const chownSync=(e,t,r)=>{try{return s.chownSync(e,t,r)}catch(e){if(e.code!=="ENOENT")throw e}};const c=a?(e,t,r,n)=>i=>{if(!i||i.code!=="EISDIR")n(i);else s.chown(e,t,r,n)}:(e,t,r,s)=>s;const l=a?(e,t,r)=>{try{return lchownSync(e,t,r)}catch(s){if(s.code!=="EISDIR")throw s;chownSync(e,t,r)}}:(e,t,r)=>lchownSync(e,t,r);const u=process.version;let readdir=(e,t,r)=>s.readdir(e,t,r);let readdirSync=(e,t)=>s.readdirSync(e,t);if(/^v4\./.test(u))readdir=(e,t,r)=>s.readdir(e,r);const chown=(e,t,r,n)=>{s[i](e,t,r,c(e,t,r,(e=>{n(e&&e.code!=="ENOENT"?e:null)})))};const chownrKid=(e,t,r,i,o)=>{if(typeof t==="string")return s.lstat(n.resolve(e,t),((s,n)=>{if(s)return o(s.code!=="ENOENT"?s:null);n.name=t;chownrKid(e,n,r,i,o)}));if(t.isDirectory()){chownr(n.resolve(e,t.name),r,i,(s=>{if(s)return o(s);const a=n.resolve(e,t.name);chown(a,r,i,o)}))}else{const s=n.resolve(e,t.name);chown(s,r,i,o)}};const chownr=(e,t,r,s)=>{readdir(e,{withFileTypes:true},((n,i)=>{if(n){if(n.code==="ENOENT")return s();else if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return s(n)}if(n||!i.length)return chown(e,t,r,s);let o=i.length;let a=null;const then=n=>{if(a)return;if(n)return s(a=n);if(--o===0)return chown(e,t,r,s)};i.forEach((s=>chownrKid(e,s,t,r,then)))}))};const chownrKidSync=(e,t,r,i)=>{if(typeof t==="string"){try{const r=s.lstatSync(n.resolve(e,t));r.name=t;t=r}catch(e){if(e.code==="ENOENT")return;else throw e}}if(t.isDirectory())chownrSync(n.resolve(e,t.name),r,i);l(n.resolve(e,t.name),r,i)};const chownrSync=(e,t,r)=>{let s;try{s=readdirSync(e,{withFileTypes:true})}catch(s){if(s.code==="ENOENT")return;else if(s.code==="ENOTDIR"||s.code==="ENOTSUP")return l(e,t,r);else throw s}if(s&&s.length)s.forEach((s=>chownrKidSync(e,s,t,r)));return l(e,t,r)};e.exports=chownr;chownr.sync=chownrSync},2806:(e,t,r)=>{"use strict";const s=r(2781).PassThrough;const n=r(4240);const cloneResponse=e=>{if(!(e&&e.pipe)){throw new TypeError("Parameter `response` must be a response stream.")}const t=new s;n(e,t);return e.pipe(t)};e.exports=cloneResponse},4101:(e,t,r)=>{var s=r(2361).EventEmitter;var n=r(2081).spawn;var i=r(1017);var o=i.dirname;var a=i.basename;var c=r(7147);r(3837).inherits(Command,s);t=e.exports=new Command;t.Command=Command;t.Option=Option;function Option(e,t){this.flags=e;this.required=e.indexOf("<")>=0;this.optional=e.indexOf("[")>=0;this.bool=e.indexOf("-no-")===-1;e=e.split(/[ ,|]+/);if(e.length>1&&!/^[[<]/.test(e[1]))this.short=e.shift();this.long=e.shift();this.description=t||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(e){return this.short===e||this.long===e};function Command(e){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=e||""}Command.prototype.command=function(e,t,r){if(typeof t==="object"&&t!==null){r=t;t=null}r=r||{};var s=e.split(/ +/);var n=new Command(s.shift());if(t){n.description(t);this.executables=true;this._execs[n._name]=true;if(r.isDefault)this.defaultExecutable=n._name}n._noHelp=!!r.noHelp;this.commands.push(n);n.parseExpectedArgs(s);n.parent=this;if(t)return this;return n};Command.prototype.arguments=function(e){return this.parseExpectedArgs(e.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(e){if(!e.length)return;var t=this;e.forEach((function(e){var r={required:false,name:"",variadic:false};switch(e[0]){case"<":r.required=true;r.name=e.slice(1,-1);break;case"[":r.name=e.slice(1,-1);break}if(r.name.length>3&&r.name.slice(-3)==="..."){r.variadic=true;r.name=r.name.slice(0,-3)}if(r.name){t._args.push(r)}}));return this};Command.prototype.action=function(e){var t=this;var listener=function(r,s){r=r||[];s=s||[];var n=t.parseOptions(s);outputHelpIfNecessary(t,n.unknown);if(n.unknown.length>0){t.unknownOption(n.unknown[0])}if(n.args.length)r=n.args.concat(r);t._args.forEach((function(e,s){if(e.required&&r[s]==null){t.missingArgument(e.name)}else if(e.variadic){if(s!==t._args.length-1){t.variadicArgNotLast(e.name)}r[s]=r.splice(s)}}));if(t._args.length){r[t._args.length]=t}else{r.push(t)}e.apply(t,r)};var r=this.parent||this;var s=r===this?"*":this._name;r.on("command:"+s,listener);if(this._alias)r.on("command:"+this._alias,listener);return this};Command.prototype.option=function(e,t,r,s){var n=this,i=new Option(e,t),o=i.name(),a=i.attributeName();if(typeof r!=="function"){if(r instanceof RegExp){var c=r;r=function(e,t){var r=c.exec(e);return r?r[0]:t}}else{s=r;r=null}}if(!i.bool||i.optional||i.required){if(!i.bool)s=true;if(s!==undefined){n[a]=s;i.defaultValue=s}}this.options.push(i);this.on("option:"+o,(function(e){if(e!==null&&r){e=r(e,n[a]===undefined?s:n[a])}if(typeof n[a]==="boolean"||typeof n[a]==="undefined"){if(e==null){n[a]=i.bool?s||true:false}else{n[a]=e}}else if(e!==null){n[a]=e}}));return this};Command.prototype.allowUnknownOption=function(e){this._allowUnknownOption=arguments.length===0||e;return this};Command.prototype.parse=function(e){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=e;this._name=this._name||a(e[1],".js");if(this.executables&&e.length<3&&!this.defaultExecutable){e.push("--help")}var t=this.parseOptions(this.normalize(e.slice(2)));var r=this.args=t.args;var s=this.parseArgs(this.args,t.unknown);var n=s.args[0];var i=null;if(n){i=this.commands.filter((function(e){return e.alias()===n}))[0]}if(this._execs[n]&&typeof this._execs[n]!=="function"){return this.executeSubCommand(e,r,t.unknown)}else if(i){r[0]=i._name;return this.executeSubCommand(e,r,t.unknown)}else if(this.defaultExecutable){r.unshift(this.defaultExecutable);return this.executeSubCommand(e,r,t.unknown)}return s};Command.prototype.executeSubCommand=function(e,t,r){t=t.concat(r);if(!t.length)this.help();if(t[0]==="help"&&t.length===1)this.help();if(t[0]==="help"){t[0]=t[1];t[1]="--help"}var s=e[1];var l=a(s,i.extname(s))+"-"+t[0];var u;var h=c.realpathSync(s);u=o(h);var d=i.join(u,l);var p=false;if(exists(d+".js")){l=d+".js";p=true}else if(exists(d+".ts")){l=d+".ts";p=true}else if(exists(d)){l=d}t=t.slice(1);var m;if(process.platform!=="win32"){if(p){t.unshift(l);t=(process.execArgv||[]).concat(t);m=n(process.argv[0],t,{stdio:"inherit",customFds:[0,1,2]})}else{m=n(l,t,{stdio:"inherit",customFds:[0,1,2]})}}else{t.unshift(l);m=n(process.execPath,t,{stdio:"inherit"})}var y=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];y.forEach((function(e){process.on(e,(function(){if(m.killed===false&&m.exitCode===null){m.kill(e)}}))}));m.on("close",process.exit.bind(process));m.on("error",(function(e){if(e.code==="ENOENT"){console.error("error: %s(1) does not exist, try --help",l)}else if(e.code==="EACCES"){console.error("error: %s(1) not executable. try chmod or run with root",l)}process.exit(1)}));this.runningCommand=m};Command.prototype.normalize=function(e){var t=[],r,s,n;for(var i=0,o=e.length;i<o;++i){r=e[i];if(i>0){s=this.optionFor(e[i-1])}if(r==="--"){t=t.concat(e.slice(i));break}else if(s&&s.required){t.push(r)}else if(r.length>1&&r[0]==="-"&&r[1]!=="-"){r.slice(1).split("").forEach((function(e){t.push("-"+e)}))}else if(/^--/.test(r)&&~(n=r.indexOf("="))){t.push(r.slice(0,n),r.slice(n+1))}else{t.push(r)}}return t};Command.prototype.parseArgs=function(e,t){var r;if(e.length){r=e[0];if(this.listeners("command:"+r).length){this.emit("command:"+e.shift(),e,t)}else{this.emit("command:*",e)}}else{outputHelpIfNecessary(this,t);if(t.length>0){this.unknownOption(t[0])}if(this.commands.length===0&&this._args.filter((function(e){return e.required})).length===0){this.emit("command:*")}}return this};Command.prototype.optionFor=function(e){for(var t=0,r=this.options.length;t<r;++t){if(this.options[t].is(e)){return this.options[t]}}};Command.prototype.parseOptions=function(e){var t=[],r=e.length,s,n,i;var o=[];for(var a=0;a<r;++a){i=e[a];if(s){t.push(i);continue}if(i==="--"){s=true;continue}n=this.optionFor(i);if(n){if(n.required){i=e[++a];if(i==null)return this.optionMissingArgument(n);this.emit("option:"+n.name(),i)}else if(n.optional){i=e[a+1];if(i==null||i[0]==="-"&&i!=="-"){i=null}else{++a}this.emit("option:"+n.name(),i)}else{this.emit("option:"+n.name())}continue}if(i.length>1&&i[0]==="-"){o.push(i);if(a+1<e.length&&e[a+1][0]!=="-"){o.push(e[++a])}continue}t.push(i)}return{args:t,unknown:o}};Command.prototype.opts=function(){var e={},t=this.options.length;for(var r=0;r<t;r++){var s=this.options[r].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e};Command.prototype.missingArgument=function(e){console.error("error: missing required argument `%s'",e);process.exit(1)};Command.prototype.optionMissingArgument=function(e,t){if(t){console.error("error: option `%s' argument missing, got `%s'",e.flags,t)}else{console.error("error: option `%s' argument missing",e.flags)}process.exit(1)};Command.prototype.unknownOption=function(e){if(this._allowUnknownOption)return;console.error("error: unknown option `%s'",e);process.exit(1)};Command.prototype.variadicArgNotLast=function(e){console.error("error: variadic arguments must be last `%s'",e);process.exit(1)};Command.prototype.version=function(e,t){if(arguments.length===0)return this._version;this._version=e;t=t||"-V, --version";var r=new Option(t,"output the version number");this._versionOptionName=r.long.substr(2)||"version";this.options.push(r);this.on("option:"+this._versionOptionName,(function(){process.stdout.write(e+"\n");process.exit(0)}));return this};Command.prototype.description=function(e,t){if(arguments.length===0)return this._description;this._description=e;this._argsDescription=t;return this};Command.prototype.alias=function(e){var t=this;if(this.commands.length!==0){t=this.commands[this.commands.length-1]}if(arguments.length===0)return t._alias;if(e===t._name)throw new Error("Command alias can't be the same as its name");t._alias=e;return this};Command.prototype.usage=function(e){var t=this._args.map((function(e){return humanReadableArgName(e)}));var r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+t.join(" "):"");if(arguments.length===0)return this._usage||r;this._usage=e;return this};Command.prototype.name=function(e){if(arguments.length===0)return this._name;this._name=e;return this};Command.prototype.prepareCommands=function(){return this.commands.filter((function(e){return!e._noHelp})).map((function(e){var t=e._args.map((function(e){return humanReadableArgName(e)})).join(" ");return[e._name+(e._alias?"|"+e._alias:"")+(e.options.length?" [options]":"")+(t?" "+t:""),e._description]}))};Command.prototype.largestCommandLength=function(){var e=this.prepareCommands();return e.reduce((function(e,t){return Math.max(e,t[0].length)}),0)};Command.prototype.largestOptionLength=function(){var e=[].slice.call(this.options);e.push({flags:"-h, --help"});return e.reduce((function(e,t){return Math.max(e,t.flags.length)}),0)};Command.prototype.largestArgLength=function(){return this._args.reduce((function(e,t){return Math.max(e,t.name.length)}),0)};Command.prototype.padWidth=function(){var e=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>e){e=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>e){e=this.largestCommandLength()}}return e};Command.prototype.optionHelp=function(){var e=this.padWidth();return this.options.map((function(t){return pad(t.flags,e)+" "+t.description+(t.bool&&t.defaultValue!==undefined?" (default: "+JSON.stringify(t.defaultValue)+")":"")})).concat([pad("-h, --help",e)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var e=this.prepareCommands();var t=this.padWidth();return["Commands:",e.map((function(e){var r=e[1]?" "+e[1]:"";return(r?pad(e[0],t):e[0])+r})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var e=[];if(this._description){e=[this._description,""];var t=this._argsDescription;if(t&&this._args.length){var r=this.padWidth();e.push("Arguments:");e.push("");this._args.forEach((function(s){e.push(" "+pad(s.name,r)+" "+t[s.name])}));e.push("")}}var s=this._name;if(this._alias){s=s+"|"+this._alias}var n=["Usage: "+s+" "+this.usage(),""];var i=[];var o=this.commandHelp();if(o)i=[o];var a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return n.concat(e).concat(a).concat(i).join("\n")};Command.prototype.outputHelp=function(e){if(!e){e=function(e){return e}}process.stdout.write(e(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(e){this.outputHelp(e);process.exit()};function camelcase(e){return e.split("-").reduce((function(e,t){return e+t[0].toUpperCase()+t.slice(1)}))}function pad(e,t){var r=Math.max(0,t-e.length);return e+Array(r+1).join(" ")}function outputHelpIfNecessary(e,t){t=t||[];for(var r=0;r<t.length;r++){if(t[r]==="--help"||t[r]==="-h"){e.outputHelp();process.exit(0)}}}function humanReadableArgName(e){var t=e.name+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"}function exists(e){try{if(c.statSync(e).isFile()){return true}}catch(e){return false}}},7136:function(e,t,r){"use strict";e=r.nmd(e);var s=this&&this.__classPrivateFieldSet||function(e,t,r,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};var n=this&&this.__classPrivateFieldGet||function(e,t,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(e):s?s.value:t.get(e)};var i,o;var a,c,l,u;Object.defineProperty(t,"__esModule",{value:true});const h=r(3837);const d=r(7147);const p=r(1017);const m=r(6113);const y=r(9491);const g=r(2361);const v=r(6006);const b=r(990);const w=r(4263);const E=r(3809);const S=r(7265);const x=r(4525);const R=r(5399);const P=r(1452);const O=r(3430);const $="aes-256-cbc";const createPlainObject=()=>Object.create(null);const isExist=e=>e!==undefined&&e!==null;let A="";try{delete require.cache[__filename];A=p.dirname((o=(i=e.parent)===null||i===void 0?void 0:i.filename)!==null&&o!==void 0?o:".")}catch(e){}const checkValueType=(e,t)=>{const r=new Set(["undefined","symbol","function"]);const s=typeof t;if(r.has(s)){throw new TypeError(`Setting a value of type \`${s}\` for key \`${e}\` is not allowed as it's not supported by JSON`)}};const T="__internal__";const C=`${T}.migrations.version`;class Conf{constructor(e={}){var t;a.set(this,void 0);c.set(this,void 0);l.set(this,void 0);u.set(this,{});this._deserialize=e=>JSON.parse(e);this._serialize=e=>JSON.stringify(e,undefined,"\t");const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:false,accessPropertiesByDotNotation:true,configFileMode:438,...e};const i=O((()=>{const e=b.sync({cwd:A});const t=e&&JSON.parse(d.readFileSync(e,"utf8"));return t!==null&&t!==void 0?t:{}}));if(!r.cwd){if(!r.projectName){r.projectName=i().name}if(!r.projectName){throw new Error("Project name could not be inferred. Please specify the `projectName` option.")}r.cwd=w(r.projectName,{suffix:r.projectSuffix}).config}s(this,l,r,"f");if(r.schema){if(typeof r.schema!=="object"){throw new TypeError("The `schema` option must be an object.")}const e=new S.default({allErrors:true,useDefaults:true});(0,x.default)(e);const t={type:"object",properties:r.schema};s(this,a,e.compile(t),"f");for(const[e,t]of Object.entries(r.schema)){if(t===null||t===void 0?void 0:t.default){n(this,u,"f")[e]=t.default}}}if(r.defaults){s(this,u,{...n(this,u,"f"),...r.defaults},"f")}if(r.serialize){this._serialize=r.serialize}if(r.deserialize){this._deserialize=r.deserialize}this.events=new g.EventEmitter;s(this,c,r.encryptionKey,"f");const o=r.fileExtension?`.${r.fileExtension}`:"";this.path=p.resolve(r.cwd,`${(t=r.configName)!==null&&t!==void 0?t:"config"}${o}`);const h=this.store;const m=Object.assign(createPlainObject(),r.defaults,h);this._validate(m);try{y.deepEqual(h,m)}catch(e){this.store=m}if(r.watch){this._watch()}if(r.migrations){if(!r.projectVersion){r.projectVersion=i().version}if(!r.projectVersion){throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.")}this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}}get(e,t){if(n(this,l,"f").accessPropertiesByDotNotation){return this._get(e,t)}const{store:r}=this;return e in r?r[e]:t}set(e,t){if(typeof e!=="string"&&typeof e!=="object"){throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`)}if(typeof e!=="object"&&t===undefined){throw new TypeError("Use `delete()` to clear values")}if(this._containsReservedKey(e)){throw new TypeError(`Please don't use the ${T} key, as it's used to manage this module internal operations.`)}const{store:r}=this;const set=(e,t)=>{checkValueType(e,t);if(n(this,l,"f").accessPropertiesByDotNotation){v.set(r,e,t)}else{r[e]=t}};if(typeof e==="object"){const t=e;for(const[e,r]of Object.entries(t)){set(e,r)}}else{set(e,t)}this.store=r}has(e){if(n(this,l,"f").accessPropertiesByDotNotation){return v.has(this.store,e)}return e in this.store}reset(...e){for(const t of e){if(isExist(n(this,u,"f")[t])){this.set(t,n(this,u,"f")[t])}}}delete(e){const{store:t}=this;if(n(this,l,"f").accessPropertiesByDotNotation){v.delete(t,e)}else{delete t[e]}this.store=t}clear(){this.store=createPlainObject();for(const e of Object.keys(n(this,u,"f"))){this.reset(e)}}onDidChange(e,t){if(typeof e!=="string"){throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`)}if(typeof t!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`)}return this._handleChange((()=>this.get(e)),t)}onDidAnyChange(e){if(typeof e!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`)}return this._handleChange((()=>this.store),e)}get size(){return Object.keys(this.store).length}get store(){try{const e=d.readFileSync(this.path,n(this,c,"f")?null:"utf8");const t=this._encryptData(e);const r=this._deserialize(t);this._validate(r);return Object.assign(createPlainObject(),r)}catch(e){if((e===null||e===void 0?void 0:e.code)==="ENOENT"){this._ensureDirectory();return createPlainObject()}if(n(this,l,"f").clearInvalidConfig&&e.name==="SyntaxError"){return createPlainObject()}throw e}}set store(e){this._ensureDirectory();this._validate(e);this._write(e);this.events.emit("change")}*[(a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,Symbol.iterator)](){for(const[e,t]of Object.entries(this.store)){yield[e,t]}}_encryptData(e){if(!n(this,c,"f")){return e.toString()}try{if(n(this,c,"f")){try{if(e.slice(16,17).toString()===":"){const t=e.slice(0,16);const r=m.pbkdf2Sync(n(this,c,"f"),t.toString(),1e4,32,"sha512");const s=m.createDecipheriv($,r,t);e=Buffer.concat([s.update(Buffer.from(e.slice(17))),s.final()]).toString("utf8")}else{const t=m.createDecipher($,n(this,c,"f"));e=Buffer.concat([t.update(Buffer.from(e)),t.final()]).toString("utf8")}}catch(e){}}}catch(e){}return e.toString()}_handleChange(e,t){let r=e();const onChange=()=>{const s=r;const n=e();if((0,h.isDeepStrictEqual)(n,s)){return}r=n;t.call(this,n,s)};this.events.on("change",onChange);return()=>this.events.removeListener("change",onChange)}_validate(e){if(!n(this,a,"f")){return}const t=n(this,a,"f").call(this,e);if(t||!n(this,a,"f").errors){return}const r=n(this,a,"f").errors.map((({instancePath:e,message:t=""})=>`\`${e.slice(1)}\` ${t}`));throw new Error("Config schema violation: "+r.join("; "))}_ensureDirectory(){d.mkdirSync(p.dirname(this.path),{recursive:true})}_write(e){let t=this._serialize(e);if(n(this,c,"f")){const e=m.randomBytes(16);const r=m.pbkdf2Sync(n(this,c,"f"),e.toString(),1e4,32,"sha512");const s=m.createCipheriv($,r,e);t=Buffer.concat([e,Buffer.from(":"),s.update(Buffer.from(t)),s.final()])}if(process.env.SNAP){d.writeFileSync(this.path,t,{mode:n(this,l,"f").configFileMode})}else{try{E.writeFileSync(this.path,t,{mode:n(this,l,"f").configFileMode})}catch(e){if((e===null||e===void 0?void 0:e.code)==="EXDEV"){d.writeFileSync(this.path,t,{mode:n(this,l,"f").configFileMode});return}throw e}}}_watch(){this._ensureDirectory();if(!d.existsSync(this.path)){this._write(createPlainObject())}if(process.platform==="win32"){d.watch(this.path,{persistent:false},R((()=>{this.events.emit("change")}),{wait:100}))}else{d.watchFile(this.path,{persistent:false},R((()=>{this.events.emit("change")}),{wait:5e3}))}}_migrate(e,t,r){let s=this._get(C,"0.0.0");const n=Object.keys(e).filter((e=>this._shouldPerformMigration(e,s,t)));let i={...this.store};for(const o of n){try{if(r){r(this,{fromVersion:s,toVersion:o,finalVersion:t,versions:n})}const a=e[o];a(this);this._set(C,o);s=o;i={...this.store}}catch(e){this.store=i;throw new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${e}`)}}if(this._isVersionInRangeFormat(s)||!P.eq(s,t)){this._set(C,t)}}_containsReservedKey(e){if(typeof e==="object"){const t=Object.keys(e)[0];if(t===T){return true}}if(typeof e!=="string"){return false}if(n(this,l,"f").accessPropertiesByDotNotation){if(e.startsWith(`${T}.`)){return true}return false}return false}_isVersionInRangeFormat(e){return P.clean(e)===null}_shouldPerformMigration(e,t,r){if(this._isVersionInRangeFormat(e)){if(t!=="0.0.0"&&P.satisfies(t,e)){return false}return P.satisfies(r,e)}if(P.lte(e,t)){return false}if(P.gt(e,r)){return false}return true}_get(e,t){return v.get(this.store,e,t)}_set(e,t){const{store:r}=this;v.set(r,e,t);this.store=r}}t["default"]=Conf;e.exports=Conf;e.exports["default"]=Conf},4488:(e,t,r)=>{"use strict";const s=r(2081);const n=r(8423);const i=r(9449);function spawn(e,t,r){const o=n(e,t,r);const a=s.spawn(o.command,o.args,o.options);i.hookChildProcess(a,o);return a}function spawnSync(e,t,r){const o=n(e,t,r);const a=s.spawnSync(o.command,o.args,o.options);a.error=a.error||i.verifyENOENTSync(a.status,o);return a}e.exports=spawn;e.exports.spawn=spawn;e.exports.sync=spawnSync;e.exports._parse=n;e.exports._enoent=i},9449:e=>{"use strict";const t=process.platform==="win32";function notFoundError(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,r){if(!t){return}const s=e.emit;e.emit=function(t,n){if(t==="exit"){const t=verifyENOENT(n,r,"spawn");if(t){return s.call(e,"error",t)}}return s.apply(e,arguments)}}function verifyENOENT(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawn")}return null}function verifyENOENTSync(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},8423:(e,t,r)=>{"use strict";const s=r(1017);const n=r(5907);const i=r(8268);const o=r(7650);const a=process.platform==="win32";const c=/\.(?:com|exe)$/i;const l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(e){e.file=n(e);const t=e.file&&o(e.file);if(t){e.args.unshift(e.file);e.command=t;return n(e)}return e.file}function parseNonShell(e){if(!a){return e}const t=detectShebang(e);const r=!c.test(t);if(e.options.forceShell||r){const r=l.test(t);e.command=s.normalize(e.command);e.command=i.command(e.command);e.args=e.args.map((e=>i.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parse(e,t,r){if(t&&!Array.isArray(t)){r=t;t=null}t=t?t.slice(0):[];r=Object.assign({},r);const s={command:e,args:t,options:r,file:undefined,original:{command:e,args:t}};return r.shell?s:parseNonShell(s)}e.exports=parse},8268:e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(t,"^$1");return e}function escapeArgument(e,r){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(t,"^$1");if(r){e=e.replace(t,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},7650:(e,t,r)=>{"use strict";const s=r(7147);const n=r(530);function readShebang(e){const t=150;const r=Buffer.alloc(t);let i;try{i=s.openSync(e,"r");s.readSync(i,r,0,t,0);s.closeSync(i)}catch(e){}return n(r.toString())}e.exports=readShebang},5907:(e,t,r)=>{"use strict";const s=r(1017);const n=r(7200);const i=r(6516);function resolveCommandAttempt(e,t){const r=e.options.env||process.env;const o=process.cwd();const a=e.options.cwd!=null;const c=a&&process.chdir!==undefined&&!process.chdir.disabled;if(c){try{process.chdir(e.options.cwd)}catch(e){}}let l;try{l=n.sync(e.command,{path:r[i({env:r})],pathExt:t?s.delimiter:undefined})}catch(e){}finally{if(c){process.chdir(o)}}if(l){l=s.resolve(a?e.options.cwd:"",l)}return l}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},5399:(e,t,r)=>{"use strict";const s=r(1867);e.exports=(e,t={})=>{if(typeof e!=="function"){throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``)}const{wait:r=0,before:n=false,after:i=true}=t;if(!n&&!i){throw new Error("Both `before` and `after` are false, function wouldn't be called.")}let o;let a;const debouncedFunction=function(...t){const s=this;const later=()=>{o=undefined;if(i){a=e.apply(s,t)}};const c=n&&!o;clearTimeout(o);o=setTimeout(later,r);if(c){a=e.apply(s,t)}return a};s(debouncedFunction,e);debouncedFunction.cancel=()=>{if(o){clearTimeout(o);o=undefined}};return debouncedFunction}},5278:(e,t,r)=>{"use strict";const{pipeline:s,PassThrough:n}=r(2781);const i=r(9796);const o=r(5479);const decompressResponse=e=>{const t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t)){return e}const r=t==="br";if(r&&typeof i.createBrotliDecompress!=="function"){return e}const a=r?i.createBrotliDecompress():i.createUnzip();const c=new n;a.on("error",(e=>{if(e.code==="Z_BUF_ERROR"){c.end();return}c.emit("error",e)}));const l=s(e,a,c,(()=>{}));o(e,l);return l};e.exports=decompressResponse},7360:e=>{"use strict";
|
|
2
|
+
(()=>{var t={8889:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createFileSystemAdapter=r.FILE_SYSTEM_ADAPTER=void 0;const o=i(7147);r.FILE_SYSTEM_ADAPTER={lstat:o.lstat,stat:o.stat,lstatSync:o.lstatSync,statSync:o.statSync,readdir:o.readdir,readdirSync:o.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return r.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},r.FILE_SYSTEM_ADAPTER),t)}r.createFileSystemAdapter=createFileSystemAdapter},992:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const i=process.versions.node.split(".");if(i[0]===undefined||i[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const o=Number.parseInt(i[0],10);const a=Number.parseInt(i[1],10);const c=10;const l=10;const u=o>c;const h=o===c&&a>=l;r.IS_SUPPORT_READDIR_WITH_FILE_TYPES=u||h},7287:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.Settings=r.scandirSync=r.scandir=void 0;const o=i(353);const a=i(7833);const c=i(3241);r.Settings=c.default;function scandir(t,r,i){if(typeof r==="function"){o.read(t,getSettings(),r);return}o.read(t,getSettings(r),i)}r.scandir=scandir;function scandirSync(t,r){const i=getSettings(r);return a.read(t,i)}r.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof c.default){return t}return new c.default(t)}},353:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.readdir=r.readdirWithFileTypes=r.read=void 0;const o=i(5587);const a=i(4796);const c=i(992);const l=i(6480);const u=i(2147);function read(t,r,i){if(!r.stats&&c.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,r,i);return}readdir(t,r,i)}r.read=read;function readdirWithFileTypes(t,r,i){r.fs.readdir(t,{withFileTypes:true},((o,c)=>{if(o!==null){callFailureCallback(i,o);return}const l=c.map((i=>({dirent:i,name:i.name,path:u.joinPathSegments(t,i.name,r.pathSegmentSeparator)})));if(!r.followSymbolicLinks){callSuccessCallback(i,l);return}const h=l.map((t=>makeRplTaskEntry(t,r)));a(h,((t,r)=>{if(t!==null){callFailureCallback(i,t);return}callSuccessCallback(i,r)}))}))}r.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,r){return i=>{if(!t.dirent.isSymbolicLink()){i(null,t);return}r.fs.stat(t.path,((o,a)=>{if(o!==null){if(r.throwErrorOnBrokenSymbolicLink){i(o);return}i(null,t);return}t.dirent=l.fs.createDirentFromStats(t.name,a);i(null,t)}))}}function readdir(t,r,i){r.fs.readdir(t,((c,h)=>{if(c!==null){callFailureCallback(i,c);return}const d=h.map((i=>{const a=u.joinPathSegments(t,i,r.pathSegmentSeparator);return t=>{o.stat(a,r.fsStatSettings,((o,c)=>{if(o!==null){t(o);return}const u={name:i,path:a,dirent:l.fs.createDirentFromStats(i,c)};if(r.stats){u.stats=c}t(null,u)}))}}));a(d,((t,r)=>{if(t!==null){callFailureCallback(i,t);return}callSuccessCallback(i,r)}))}))}r.readdir=readdir;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},2147:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.joinPathSegments=void 0;function joinPathSegments(t,r,i){if(t.endsWith(i)){return t+r}return t+i+r}r.joinPathSegments=joinPathSegments},7833:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.readdir=r.readdirWithFileTypes=r.read=void 0;const o=i(5587);const a=i(992);const c=i(6480);const l=i(2147);function read(t,r){if(!r.stats&&a.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,r)}return readdir(t,r)}r.read=read;function readdirWithFileTypes(t,r){const i=r.fs.readdirSync(t,{withFileTypes:true});return i.map((i=>{const o={dirent:i,name:i.name,path:l.joinPathSegments(t,i.name,r.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&r.followSymbolicLinks){try{const t=r.fs.statSync(o.path);o.dirent=c.fs.createDirentFromStats(o.name,t)}catch(t){if(r.throwErrorOnBrokenSymbolicLink){throw t}}}return o}))}r.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,r){const i=r.fs.readdirSync(t);return i.map((i=>{const a=l.joinPathSegments(t,i,r.pathSegmentSeparator);const u=o.statSync(a,r.fsStatSettings);const h={name:i,path:a,dirent:c.fs.createDirentFromStats(i,u)};if(r.stats){h.stats=u}return h}))}r.readdir=readdir},3241:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1017);const a=i(5587);const c=i(8889);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=c.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,o.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new a.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},7345:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createDirentFromStats=void 0;class DirentFromStats{constructor(t,r){this.name=t;this.isBlockDevice=r.isBlockDevice.bind(r);this.isCharacterDevice=r.isCharacterDevice.bind(r);this.isDirectory=r.isDirectory.bind(r);this.isFIFO=r.isFIFO.bind(r);this.isFile=r.isFile.bind(r);this.isSocket=r.isSocket.bind(r);this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function createDirentFromStats(t,r){return new DirentFromStats(t,r)}r.createDirentFromStats=createDirentFromStats},6480:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.fs=void 0;const o=i(7345);r.fs=o},72:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createFileSystemAdapter=r.FILE_SYSTEM_ADAPTER=void 0;const o=i(7147);r.FILE_SYSTEM_ADAPTER={lstat:o.lstat,stat:o.stat,lstatSync:o.lstatSync,statSync:o.statSync};function createFileSystemAdapter(t){if(t===undefined){return r.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},r.FILE_SYSTEM_ADAPTER),t)}r.createFileSystemAdapter=createFileSystemAdapter},5587:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.statSync=r.stat=r.Settings=void 0;const o=i(5703);const a=i(2268);const c=i(5166);r.Settings=c.default;function stat(t,r,i){if(typeof r==="function"){o.read(t,getSettings(),r);return}o.read(t,getSettings(r),i)}r.stat=stat;function statSync(t,r){const i=getSettings(r);return a.read(t,i)}r.statSync=statSync;function getSettings(t={}){if(t instanceof c.default){return t}return new c.default(t)}},5703:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.read=void 0;function read(t,r,i){r.fs.lstat(t,((o,a)=>{if(o!==null){callFailureCallback(i,o);return}if(!a.isSymbolicLink()||!r.followSymbolicLink){callSuccessCallback(i,a);return}r.fs.stat(t,((t,o)=>{if(t!==null){if(r.throwErrorOnBrokenSymbolicLink){callFailureCallback(i,t);return}callSuccessCallback(i,a);return}if(r.markSymbolicLink){o.isSymbolicLink=()=>true}callSuccessCallback(i,o)}))}))}r.read=read;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},2268:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.read=void 0;function read(t,r){const i=r.fs.lstatSync(t);if(!i.isSymbolicLink()||!r.followSymbolicLink){return i}try{const i=r.fs.statSync(t);if(r.markSymbolicLink){i.isSymbolicLink=()=>true}return i}catch(t){if(!r.throwErrorOnBrokenSymbolicLink){return i}throw t}}r.read=read},5166:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(72);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=o.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},204:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.Settings=r.walkStream=r.walkSync=r.walk=void 0;const o=i(1321);const a=i(3951);const c=i(5286);const l=i(6736);r.Settings=l.default;function walk(t,r,i){if(typeof r==="function"){new o.default(t,getSettings()).read(r);return}new o.default(t,getSettings(r)).read(i)}r.walk=walk;function walkSync(t,r){const i=getSettings(r);const o=new c.default(t,i);return o.read()}r.walkSync=walkSync;function walkStream(t,r){const i=getSettings(r);const o=new a.default(t,i);return o.read()}r.walkStream=walkStream;function getSettings(t={}){if(t instanceof l.default){return t}return new l.default(t)}},1321:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9556);class AsyncProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new o.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((r=>{callFailureCallback(t,r)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}r["default"]=AsyncProvider;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},3951:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2781);const a=i(9556);class StreamProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new a.default(this._root,this._settings);this._stream=new o.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}r["default"]=StreamProvider},5286:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5446);class SyncProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new o.default(this._root,this._settings)}read(){return this._reader.read()}}r["default"]=SyncProvider},9556:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2361);const a=i(7287);const c=i(6256);const l=i(1771);const u=i(358);class AsyncReader extends u.default{constructor(t,r){super(t,r);this._settings=r;this._scandir=a.scandir;this._emitter=new o.EventEmitter;this._queue=c(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){const i={directory:t,base:r};this._queue.push(i,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,((i,o)=>{if(i!==null){r(i,undefined);return}for(const r of o){this._handleEntry(r,t.base)}r(null,undefined)}))}_handleError(t){if(this._isDestroyed||!l.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError){return}const i=t.path;if(r!==undefined){t.path=l.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)}if(l.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&l.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(i,r===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}r["default"]=AsyncReader},1771:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.joinPathSegments=r.replacePathSegmentSeparator=r.isAppliedFilter=r.isFatalError=void 0;function isFatalError(t,r){if(t.errorFilter===null){return true}return!t.errorFilter(r)}r.isFatalError=isFatalError;function isAppliedFilter(t,r){return t===null||t(r)}r.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,r){return t.split(/[/\\]/).join(r)}r.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,r,i){if(t===""){return r}if(t.endsWith(i)){return t+r}return t+i+r}r.joinPathSegments=joinPathSegments},358:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1771);class Reader{constructor(t,r){this._root=t;this._settings=r;this._root=o.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}}r["default"]=Reader},5446:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7287);const a=i(1771);const c=i(358);class SyncReader extends c.default{constructor(){super(...arguments);this._scandir=o.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,r){try{const i=this._scandir(t,this._settings.fsScandirSettings);for(const t of i){this._handleEntry(t,r)}}catch(t){this._handleError(t)}}_handleError(t){if(!a.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,r){const i=t.path;if(r!==undefined){t.path=a.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)}if(a.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&a.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(i,r===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}r["default"]=SyncReader},6736:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1017);const a=i(7287);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,o.sep);this.fsScandirSettings=new a.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},3607:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.formatNames=r.fastFormats=r.fullFormats=void 0;function fmtDef(t,r){return{validate:t,compare:r}}r.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef(date_time,compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:true,binary:true};r.fastFormats={...r.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};r.formatNames=Object.keys(r.fullFormats);function isLeapYear(t){return t%4===0&&(t%100!==0||t%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;const o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(t){const r=i.exec(t);if(!r)return false;const a=+r[1];const c=+r[2];const l=+r[3];return c>=1&&c<=12&&l>=1&&l<=(c===2&&isLeapYear(a)?29:o[c])}function compareDate(t,r){if(!(t&&r))return undefined;if(t>r)return 1;if(t<r)return-1;return 0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(t,r){const i=a.exec(t);if(!i)return false;const o=+i[1];const c=+i[2];const l=+i[3];const u=i[5];return(o<=23&&c<=59&&l<=59||o===23&&c===59&&l===60)&&(!r||u!=="")}function compareTime(t,r){if(!(t&&r))return undefined;const i=a.exec(t);const o=a.exec(r);if(!(i&&o))return undefined;t=i[1]+i[2]+i[3]+(i[4]||"");r=o[1]+o[2]+o[3]+(o[4]||"");if(t>r)return 1;if(t<r)return-1;return 0}const c=/t|\s/i;function date_time(t){const r=t.split(c);return r.length===2&&date(r[0])&&time(r[1],true)}function compareDateTime(t,r){if(!(t&&r))return undefined;const[i,o]=t.split(c);const[a,l]=r.split(c);const u=compareDate(i,a);if(u===undefined)return undefined;return u||compareTime(o,l)}const l=/\/|:/;const u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uri(t){return l.test(t)&&u.test(t)}const h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(t){h.lastIndex=0;return h.test(t)}const d=-(2**31);const p=2**31-1;function validateInt32(t){return Number.isInteger(t)&&t<=p&&t>=d}function validateInt64(t){return Number.isInteger(t)}function validateNumber(){return true}const m=/[^\\]\\Z/;function regex(t){if(m.test(t))return false;try{new RegExp(t);return true}catch(t){return false}}},4525:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3607);const a=i(7176);const c=i(4598);const l=new c.Name("fullFormats");const u=new c.Name("fastFormats");const formatsPlugin=(t,r={keywords:true})=>{if(Array.isArray(r)){addFormats(t,r,o.fullFormats,l);return t}const[i,c]=r.mode==="fast"?[o.fastFormats,u]:[o.fullFormats,l];const h=r.formats||o.formatNames;addFormats(t,h,i,c);if(r.keywords)a.default(t);return t};formatsPlugin.get=(t,r="full")=>{const i=r==="fast"?o.fastFormats:o.fullFormats;const a=i[t];if(!a)throw new Error(`Unknown format "${t}"`);return a};function addFormats(t,r,i,o){var a;var l;(a=(l=t.opts.code).formats)!==null&&a!==void 0?a:l.formats=c._`require("ajv-formats/dist/formats").${o}`;for(const o of r)t.addFormat(o,i[o])}t.exports=r=formatsPlugin;Object.defineProperty(r,"__esModule",{value:true});r["default"]=formatsPlugin},7176:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.formatLimitDefinition=void 0;const o=i(7265);const a=i(4598);const c=a.operators;const l={formatMaximum:{okStr:"<=",ok:c.LTE,fail:c.GT},formatMinimum:{okStr:">=",ok:c.GTE,fail:c.LT},formatExclusiveMaximum:{okStr:"<",ok:c.LT,fail:c.GTE},formatExclusiveMinimum:{okStr:">",ok:c.GT,fail:c.LTE}};const u={message:({keyword:t,schemaCode:r})=>a.str`should be ${l[t].okStr} ${r}`,params:({keyword:t,schemaCode:r})=>a._`{comparison: ${l[t].okStr}, limit: ${r}}`};r.formatLimitDefinition={keyword:Object.keys(l),type:"string",schemaType:"string",$data:true,error:u,code(t){const{gen:r,data:i,schemaCode:c,keyword:u,it:h}=t;const{opts:d,self:p}=h;if(!d.validateFormats)return;const m=new o.KeywordCxt(h,p.RULES.all.format.definition,"format");if(m.$data)validate$DataFormat();else validateFormat();function validate$DataFormat(){const i=r.scopeValue("formats",{ref:p.formats,code:d.code.formats});const o=r.const("fmt",a._`${i}[${m.schemaCode}]`);t.fail$data(a.or(a._`typeof ${o} != "object"`,a._`${o} instanceof RegExp`,a._`typeof ${o}.compare != "function"`,compareCode(o)))}function validateFormat(){const i=m.schema;const o=p.formats[i];if(!o||o===true)return;if(typeof o!="object"||o instanceof RegExp||typeof o.compare!="function"){throw new Error(`"${u}": format "${i}" does not define "compare" function`)}const c=r.scopeValue("formats",{key:i,ref:o,code:d.code.formats?a._`${d.code.formats}${a.getProperty(i)}`:undefined});t.fail$data(compareCode(c))}function compareCode(t){return a._`${t}.compare(${i}, ${c}) ${l[u].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=t=>{t.addKeyword(r.formatLimitDefinition);return t};r["default"]=formatLimitPlugin},7265:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;const o=i(5054);const a=i(1002);const c=i(263);const l=i(9520);const u=["/properties"];const h="http://json-schema.org/draft-07/schema";class Ajv extends o.default{_addVocabularies(){super._addVocabularies();a.default.forEach((t=>this.addVocabulary(t)));if(this.opts.discriminator)this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(l,u):l;this.addMetaSchema(t,h,false);this.refs["http://json-schema.org/schema"]=h}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(h)?h:undefined)}}t.exports=r=Ajv;Object.defineProperty(r,"__esModule",{value:true});r["default"]=Ajv;var d=i(6316);Object.defineProperty(r,"KeywordCxt",{enumerable:true,get:function(){return d.KeywordCxt}});var p=i(4598);Object.defineProperty(r,"_",{enumerable:true,get:function(){return p._}});Object.defineProperty(r,"str",{enumerable:true,get:function(){return p.str}});Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return p.stringify}});Object.defineProperty(r,"nil",{enumerable:true,get:function(){return p.nil}});Object.defineProperty(r,"Name",{enumerable:true,get:function(){return p.Name}});Object.defineProperty(r,"CodeGen",{enumerable:true,get:function(){return p.CodeGen}})},7577:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class _CodeOrName{}r._CodeOrName=_CodeOrName;r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(t){super();if(!r.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return false}get names(){return{[this.str]:1}}}r.Name=Name;class _Code extends _CodeOrName{constructor(t){super();this._items=typeof t==="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;const t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce(((t,r)=>`${t}${r}`),"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce(((t,r)=>{if(r instanceof Name)t[r.str]=(t[r.str]||0)+1;return t}),{})}}r._Code=_Code;r.nil=new _Code("");function _(t,...r){const i=[t[0]];let o=0;while(o<r.length){addCodeArg(i,r[o]);i.push(t[++o])}return new _Code(i)}r._=_;const i=new _Code("+");function str(t,...r){const o=[safeStringify(t[0])];let a=0;while(a<r.length){o.push(i);addCodeArg(o,r[a]);o.push(i,safeStringify(t[++a]))}optimize(o);return new _Code(o)}r.str=str;function addCodeArg(t,r){if(r instanceof _Code)t.push(...r._items);else if(r instanceof Name)t.push(r);else t.push(interpolate(r))}r.addCodeArg=addCodeArg;function optimize(t){let r=1;while(r<t.length-1){if(t[r]===i){const i=mergeExprItems(t[r-1],t[r+1]);if(i!==undefined){t.splice(r-1,3,i);continue}t[r++]="+"}r++}}function mergeExprItems(t,r){if(r==='""')return t;if(t==='""')return r;if(typeof t=="string"){if(r instanceof Name||t[t.length-1]!=='"')return;if(typeof r!="string")return`${t.slice(0,-1)}${r}"`;if(r[0]==='"')return t.slice(0,-1)+r.slice(1);return}if(typeof r=="string"&&r[0]==='"'&&!(t instanceof Name))return`"${t}${r.slice(1)}`;return}function strConcat(t,r){return r.emptyStr()?t:t.emptyStr()?r:str`${t}${r}`}r.strConcat=strConcat;function interpolate(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:safeStringify(Array.isArray(t)?t.join(","):t)}function stringify(t){return new _Code(safeStringify(t))}r.stringify=stringify;function safeStringify(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.safeStringify=safeStringify;function getProperty(t){return typeof t=="string"&&r.IDENTIFIER.test(t)?new _Code(`.${t}`):_`[${t}]`}r.getProperty=getProperty;function getEsmExportName(t){if(typeof t=="string"&&r.IDENTIFIER.test(t)){return new _Code(`${t}`)}throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}r.getEsmExportName=getEsmExportName;function regexpCode(t){return new _Code(t.toString())}r.regexpCode=regexpCode},4598:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const o=i(7577);const a=i(7759);var c=i(7577);Object.defineProperty(r,"_",{enumerable:true,get:function(){return c._}});Object.defineProperty(r,"str",{enumerable:true,get:function(){return c.str}});Object.defineProperty(r,"strConcat",{enumerable:true,get:function(){return c.strConcat}});Object.defineProperty(r,"nil",{enumerable:true,get:function(){return c.nil}});Object.defineProperty(r,"getProperty",{enumerable:true,get:function(){return c.getProperty}});Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return c.stringify}});Object.defineProperty(r,"regexpCode",{enumerable:true,get:function(){return c.regexpCode}});Object.defineProperty(r,"Name",{enumerable:true,get:function(){return c.Name}});var l=i(7759);Object.defineProperty(r,"Scope",{enumerable:true,get:function(){return l.Scope}});Object.defineProperty(r,"ValueScope",{enumerable:true,get:function(){return l.ValueScope}});Object.defineProperty(r,"ValueScopeName",{enumerable:true,get:function(){return l.ValueScopeName}});Object.defineProperty(r,"varKinds",{enumerable:true,get:function(){return l.varKinds}});r.operators={GT:new o._Code(">"),GTE:new o._Code(">="),LT:new o._Code("<"),LTE:new o._Code("<="),EQ:new o._Code("==="),NEQ:new o._Code("!=="),NOT:new o._Code("!"),OR:new o._Code("||"),AND:new o._Code("&&"),ADD:new o._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(t,r){return this}}class Def extends Node{constructor(t,r,i){super();this.varKind=t;this.name=r;this.rhs=i}render({es5:t,_n:r}){const i=t?a.varKinds.var:this.varKind;const o=this.rhs===undefined?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+r}optimizeNames(t,r){if(!t[this.name.str])return;if(this.rhs)this.rhs=optimizeExpr(this.rhs,t,r);return this}get names(){return this.rhs instanceof o._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(t,r,i){super();this.lhs=t;this.rhs=r;this.sideEffects=i}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(this.lhs instanceof o.Name&&!t[this.lhs.str]&&!this.sideEffects)return;this.rhs=optimizeExpr(this.rhs,t,r);return this}get names(){const t=this.lhs instanceof o.Name?{}:{...this.lhs.names};return addExprNames(t,this.rhs)}}class AssignOp extends Assign{constructor(t,r,i,o){super(t,i,o);this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class Label extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){return`${this.label}:`+t}}class Break extends Node{constructor(t){super();this.label=t;this.names={}}render({_n:t}){const r=this.label?` ${this.label}`:"";return`break${r};`+t}}class Throw extends Node{constructor(t){super();this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class AnyCode extends Node{constructor(t){super();this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:undefined}optimizeNames(t,r){this.code=optimizeExpr(this.code,t,r);return this}get names(){return this.code instanceof o._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(t=[]){super();this.nodes=t}render(t){return this.nodes.reduce(((r,i)=>r+i.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let r=t.length;while(r--){const i=t[r].optimizeNodes();if(Array.isArray(i))t.splice(r,1,...i);else if(i)t[r]=i;else t.splice(r,1)}return t.length>0?this:undefined}optimizeNames(t,r){const{nodes:i}=this;let o=i.length;while(o--){const a=i[o];if(a.optimizeNames(t,r))continue;subtractNames(t,a.names);i.splice(o,1)}return i.length>0?this:undefined}get names(){return this.nodes.reduce(((t,r)=>addNames(t,r.names)),{})}}class BlockNode extends ParentNode{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(t,r){super(r);this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);if(this.else)r+="else "+this.else.render(t);return r}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(t===true)return this.nodes;let r=this.else;if(r){const t=r.optimizeNodes();r=this.else=Array.isArray(t)?new Else(t):t}if(r){if(t===false)return r instanceof If?r:r.nodes;if(this.nodes.length)return this;return new If(not(t),r instanceof If?[r]:r.nodes)}if(t===false||!this.nodes.length)return undefined;return this}optimizeNames(t,r){var i;this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,r);if(!(super.optimizeNames(t,r)||this.else))return;this.condition=optimizeExpr(this.condition,t,r);return this}get names(){const t=super.names;addExprNames(t,this.condition);if(this.else)addNames(t,this.else.names);return t}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(t){super();this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(!super.optimizeNames(t,r))return;this.iteration=optimizeExpr(this.iteration,t,r);return this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(t,r,i,o){super();this.varKind=t;this.name=r;this.from=i;this.to=o}render(t){const r=t.es5?a.varKinds.var:this.varKind;const{name:i,from:o,to:c}=this;return`for(${r} ${i}=${o}; ${i}<${c}; ${i}++)`+super.render(t)}get names(){const t=addExprNames(super.names,this.from);return addExprNames(t,this.to)}}class ForIter extends For{constructor(t,r,i,o){super();this.loop=t;this.varKind=r;this.name=i;this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(!super.optimizeNames(t,r))return;this.iterable=optimizeExpr(this.iterable,t,r);return this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(t,r,i){super();this.name=t;this.args=r;this.async=i}render(t){const r=this.async?"async ":"";return`${r}function ${this.name}(${this.args})`+super.render(t)}}Func.kind="func";class Return extends ParentNode{render(t){return"return "+super.render(t)}}Return.kind="return";class Try extends BlockNode{render(t){let r="try"+super.render(t);if(this.catch)r+=this.catch.render(t);if(this.finally)r+=this.finally.render(t);return r}optimizeNodes(){var t,r;super.optimizeNodes();(t=this.catch)===null||t===void 0?void 0:t.optimizeNodes();(r=this.finally)===null||r===void 0?void 0:r.optimizeNodes();return this}optimizeNames(t,r){var i,o;super.optimizeNames(t,r);(i=this.catch)===null||i===void 0?void 0:i.optimizeNames(t,r);(o=this.finally)===null||o===void 0?void 0:o.optimizeNames(t,r);return this}get names(){const t=super.names;if(this.catch)addNames(t,this.catch.names);if(this.finally)addNames(t,this.finally.names);return t}}class Catch extends BlockNode{constructor(t){super();this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}Catch.kind="catch";class Finally extends BlockNode{render(t){return"finally"+super.render(t)}}Finally.kind="finally";class CodeGen{constructor(t,r={}){this._values={};this._blockStarts=[];this._constants={};this.opts={...r,_n:r.lines?"\n":""};this._extScope=t;this._scope=new a.Scope({parent:t});this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){const i=this._extScope.value(t,r);const o=this._values[i.prefix]||(this._values[i.prefix]=new Set);o.add(i);return i}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,i,o){const a=this._scope.toName(r);if(i!==undefined&&o)this._constants[a.str]=i;this._leafNode(new Def(t,a,i));return a}const(t,r,i){return this._def(a.varKinds.const,t,r,i)}let(t,r,i){return this._def(a.varKinds.let,t,r,i)}var(t,r,i){return this._def(a.varKinds.var,t,r,i)}assign(t,r,i){return this._leafNode(new Assign(t,r,i))}add(t,i){return this._leafNode(new AssignOp(t,r.operators.ADD,i))}code(t){if(typeof t=="function")t();else if(t!==o.nil)this._leafNode(new AnyCode(t));return this}object(...t){const r=["{"];for(const[i,a]of t){if(r.length>1)r.push(",");r.push(i);if(i!==a||this.opts.es5){r.push(":");(0,o.addCodeArg)(r,a)}}r.push("}");return new o._Code(r)}if(t,r,i){this._blockNode(new If(t));if(r&&i){this.code(r).else().code(i).endIf()}else if(r){this.code(r).endIf()}else if(i){throw new Error('CodeGen: "else" body without "then" body')}return this}elseIf(t){return this._elseNode(new If(t))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(t,r){this._blockNode(t);if(r)this.code(r).endFor();return this}for(t,r){return this._for(new ForLoop(t),r)}forRange(t,r,i,o,c=(this.opts.es5?a.varKinds.var:a.varKinds.let)){const l=this._scope.toName(t);return this._for(new ForRange(c,l,r,i),(()=>o(l)))}forOf(t,r,i,c=a.varKinds.const){const l=this._scope.toName(t);if(this.opts.es5){const t=r instanceof o.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,o._)`${t}.length`,(r=>{this.var(l,(0,o._)`${t}[${r}]`);i(l)}))}return this._for(new ForIter("of",c,l,r),(()=>i(l)))}forIn(t,r,i,c=(this.opts.es5?a.varKinds.var:a.varKinds.const)){if(this.opts.ownProperties){return this.forOf(t,(0,o._)`Object.keys(${r})`,i)}const l=this._scope.toName(t);return this._for(new ForIter("in",c,l,r),(()=>i(l)))}endFor(){return this._endBlockNode(For)}label(t){return this._leafNode(new Label(t))}break(t){return this._leafNode(new Break(t))}return(t){const r=new Return;this._blockNode(r);this.code(t);if(r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(t,r,i){if(!r&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');const o=new Try;this._blockNode(o);this.code(t);if(r){const t=this.name("e");this._currNode=o.catch=new Catch(t);r(t)}if(i){this._currNode=o.finally=new Finally;this.code(i)}return this._endBlockNode(Catch,Finally)}throw(t){return this._leafNode(new Throw(t))}block(t,r){this._blockStarts.push(this._nodes.length);if(t)this.code(t).endBlock(r);return this}endBlock(t){const r=this._blockStarts.pop();if(r===undefined)throw new Error("CodeGen: not in self-balancing block");const i=this._nodes.length-r;if(i<0||t!==undefined&&i!==t){throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${t} expected`)}this._nodes.length=r;return this}func(t,r=o.nil,i,a){this._blockNode(new Func(t,r,i));if(a)this.code(a).endFunc();return this}endFunc(){return this._endBlockNode(Func)}optimize(t=1){while(t-- >0){this._root.optimizeNodes();this._root.optimizeNames(this._root.names,this._constants)}}_leafNode(t){this._currNode.nodes.push(t);return this}_blockNode(t){this._currNode.nodes.push(t);this._nodes.push(t)}_endBlockNode(t,r){const i=this._currNode;if(i instanceof t||r&&i instanceof r){this._nodes.pop();return this}throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){const r=this._currNode;if(!(r instanceof If)){throw new Error('CodeGen: "else" without "if"')}this._currNode=r.else=t;return this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const r=this._nodes;r[r.length-1]=t}}r.CodeGen=CodeGen;function addNames(t,r){for(const i in r)t[i]=(t[i]||0)+(r[i]||0);return t}function addExprNames(t,r){return r instanceof o._CodeOrName?addNames(t,r.names):t}function optimizeExpr(t,r,i){if(t instanceof o.Name)return replaceName(t);if(!canOptimize(t))return t;return new o._Code(t._items.reduce(((t,r)=>{if(r instanceof o.Name)r=replaceName(r);if(r instanceof o._Code)t.push(...r._items);else t.push(r);return t}),[]));function replaceName(t){const o=i[t.str];if(o===undefined||r[t.str]!==1)return t;delete r[t.str];return o}function canOptimize(t){return t instanceof o._Code&&t._items.some((t=>t instanceof o.Name&&r[t.str]===1&&i[t.str]!==undefined))}}function subtractNames(t,r){for(const i in r)t[i]=(t[i]||0)-(r[i]||0)}function not(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,o._)`!${par(t)}`}r.not=not;const u=mappend(r.operators.AND);function and(...t){return t.reduce(u)}r.and=and;const h=mappend(r.operators.OR);function or(...t){return t.reduce(h)}r.or=or;function mappend(t){return(r,i)=>r===o.nil?i:i===o.nil?r:(0,o._)`${par(r)} ${t} ${par(i)}`}function par(t){return t instanceof o.Name?t:(0,o._)`(${t})`}},7759:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const o=i(7577);class ValueError extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`);this.value=t.value}}var a;(function(t){t[t["Started"]=0]="Started";t[t["Completed"]=1]="Completed"})(a=r.UsedValueState||(r.UsedValueState={}));r.varKinds={const:new o.Name("const"),let:new o.Name("let"),var:new o.Name("var")};class Scope{constructor({prefixes:t,parent:r}={}){this._names={};this._prefixes=t;this._parent=r}toName(t){return t instanceof o.Name?t:this.name(t)}name(t){return new o.Name(this._newName(t))}_newName(t){const r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,i;if(((i=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||i===void 0?void 0:i.has(t))||this._prefixes&&!this._prefixes.has(t)){throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`)}return this._names[t]={prefix:t,index:0}}}r.Scope=Scope;class ValueScopeName extends o.Name{constructor(t,r){super(r);this.prefix=t}setValue(t,{property:r,itemIndex:i}){this.value=t;this.scopePath=(0,o._)`.${new o.Name(r)}[${i}]`}}r.ValueScopeName=ValueScopeName;const c=(0,o._)`\n`;class ValueScope extends Scope{constructor(t){super(t);this._values={};this._scope=t.scope;this.opts={...t,_n:t.lines?c:o.nil}}get(){return this._scope}name(t){return new ValueScopeName(t,this._newName(t))}value(t,r){var i;if(r.ref===undefined)throw new Error("CodeGen: ref must be passed in value");const o=this.toName(t);const{prefix:a}=o;const c=(i=r.key)!==null&&i!==void 0?i:r.ref;let l=this._values[a];if(l){const t=l.get(c);if(t)return t}else{l=this._values[a]=new Map}l.set(c,o);const u=this._scope[a]||(this._scope[a]=[]);const h=u.length;u[h]=r.ref;o.setValue(r,{property:a,itemIndex:h});return o}getValue(t,r){const i=this._values[t];if(!i)return;return i.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,(r=>{if(r.scopePath===undefined)throw new Error(`CodeGen: name "${r}" has no value`);return(0,o._)`${t}${r.scopePath}`}))}scopeCode(t=this._values,r,i){return this._reduceValues(t,(t=>{if(t.value===undefined)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),r,i)}_reduceValues(t,i,c={},l){let u=o.nil;for(const h in t){const d=t[h];if(!d)continue;const p=c[h]=c[h]||new Map;d.forEach((t=>{if(p.has(t))return;p.set(t,a.Started);let c=i(t);if(c){const i=this.opts.es5?r.varKinds.var:r.varKinds.const;u=(0,o._)`${u}${i} ${t} = ${c};${this.opts._n}`}else if(c=l===null||l===void 0?void 0:l(t)){u=(0,o._)`${u}${c}${this.opts._n}`}else{throw new ValueError(t)}p.set(t,a.Completed)}))}return u}}r.ValueScope=ValueScope},7757:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const o=i(4598);const a=i(9068);const c=i(1080);r.keywordError={message:({keyword:t})=>(0,o.str)`must pass "${t}" keyword validation`};r.keyword$DataError={message:({keyword:t,schemaType:r})=>r?(0,o.str)`"${t}" keyword must be ${r} ($data)`:(0,o.str)`"${t}" keyword is invalid ($data)`};function reportError(t,i=r.keywordError,a,c){const{it:l}=t;const{gen:u,compositeRule:h,allErrors:d}=l;const p=errorObjectCode(t,i,a);if(c!==null&&c!==void 0?c:h||d){addError(u,p)}else{returnErrors(l,(0,o._)`[${p}]`)}}r.reportError=reportError;function reportExtraError(t,i=r.keywordError,o){const{it:a}=t;const{gen:l,compositeRule:u,allErrors:h}=a;const d=errorObjectCode(t,i,o);addError(l,d);if(!(u||h)){returnErrors(a,c.default.vErrors)}}r.reportExtraError=reportExtraError;function resetErrorsCount(t,r){t.assign(c.default.errors,r);t.if((0,o._)`${c.default.vErrors} !== null`,(()=>t.if(r,(()=>t.assign((0,o._)`${c.default.vErrors}.length`,r)),(()=>t.assign(c.default.vErrors,null)))))}r.resetErrorsCount=resetErrorsCount;function extendErrors({gen:t,keyword:r,schemaValue:i,data:a,errsCount:l,it:u}){if(l===undefined)throw new Error("ajv implementation error");const h=t.name("err");t.forRange("i",l,c.default.errors,(l=>{t.const(h,(0,o._)`${c.default.vErrors}[${l}]`);t.if((0,o._)`${h}.instancePath === undefined`,(()=>t.assign((0,o._)`${h}.instancePath`,(0,o.strConcat)(c.default.instancePath,u.errorPath))));t.assign((0,o._)`${h}.schemaPath`,(0,o.str)`${u.errSchemaPath}/${r}`);if(u.opts.verbose){t.assign((0,o._)`${h}.schema`,i);t.assign((0,o._)`${h}.data`,a)}}))}r.extendErrors=extendErrors;function addError(t,r){const i=t.const("err",r);t.if((0,o._)`${c.default.vErrors} === null`,(()=>t.assign(c.default.vErrors,(0,o._)`[${i}]`)),(0,o._)`${c.default.vErrors}.push(${i})`);t.code((0,o._)`${c.default.errors}++`)}function returnErrors(t,r){const{gen:i,validateName:a,schemaEnv:c}=t;if(c.$async){i.throw((0,o._)`new ${t.ValidationError}(${r})`)}else{i.assign((0,o._)`${a}.errors`,r);i.return(false)}}const l={keyword:new o.Name("keyword"),schemaPath:new o.Name("schemaPath"),params:new o.Name("params"),propertyName:new o.Name("propertyName"),message:new o.Name("message"),schema:new o.Name("schema"),parentSchema:new o.Name("parentSchema")};function errorObjectCode(t,r,i){const{createErrors:a}=t.it;if(a===false)return(0,o._)`{}`;return errorObject(t,r,i)}function errorObject(t,r,i={}){const{gen:o,it:a}=t;const c=[errorInstancePath(a,i),errorSchemaPath(t,i)];extraErrorProps(t,r,c);return o.object(...c)}function errorInstancePath({errorPath:t},{instancePath:r}){const i=r?(0,o.str)`${t}${(0,a.getErrorPath)(r,a.Type.Str)}`:t;return[c.default.instancePath,(0,o.strConcat)(c.default.instancePath,i)]}function errorSchemaPath({keyword:t,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:c}){let u=c?r:(0,o.str)`${r}/${t}`;if(i){u=(0,o.str)`${u}${(0,a.getErrorPath)(i,a.Type.Str)}`}return[l.schemaPath,u]}function extraErrorProps(t,{params:r,message:i},a){const{keyword:u,data:h,schemaValue:d,it:p}=t;const{opts:m,propertyName:y,topSchemaRef:g,schemaPath:v}=p;a.push([l.keyword,u],[l.params,typeof r=="function"?r(t):r||(0,o._)`{}`]);if(m.messages){a.push([l.message,typeof i=="function"?i(t):i])}if(m.verbose){a.push([l.schema,d],[l.parentSchema,(0,o._)`${g}${v}`],[c.default.data,h])}if(y)a.push([l.propertyName,y])}},5444:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.resolveSchema=r.getCompilingSchema=r.resolveRef=r.compileSchema=r.SchemaEnv=void 0;const o=i(4598);const a=i(7091);const c=i(1080);const l=i(4146);const u=i(9068);const h=i(6316);class SchemaEnv{constructor(t){var r;this.refs={};this.dynamicAnchors={};let i;if(typeof t.schema=="object")i=t.schema;this.schema=t.schema;this.schemaId=t.schemaId;this.root=t.root||this;this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,l.normalizeId)(i===null||i===void 0?void 0:i[t.schemaId||"$id"]);this.schemaPath=t.schemaPath;this.localRefs=t.localRefs;this.meta=t.meta;this.$async=i===null||i===void 0?void 0:i.$async;this.refs={}}}r.SchemaEnv=SchemaEnv;function compileSchema(t){const r=getCompilingSchema.call(this,t);if(r)return r;const i=(0,l.getFullPath)(this.opts.uriResolver,t.root.baseId);const{es5:u,lines:d}=this.opts.code;const{ownProperties:p}=this.opts;const m=new o.CodeGen(this.scope,{es5:u,lines:d,ownProperties:p});let y;if(t.$async){y=m.scopeValue("Error",{ref:a.default,code:(0,o._)`require("ajv/dist/runtime/validation_error").default`})}const g=m.scopeName("validate");t.validateName=g;const v={gen:m,allErrors:this.opts.allErrors,data:c.default.data,parentData:c.default.parentData,parentDataProperty:c.default.parentDataProperty,dataNames:[c.default.data],dataPathArr:[o.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",this.opts.code.source===true?{ref:t.schema,code:(0,o.stringify)(t.schema)}:{ref:t.schema}),validateName:g,ValidationError:y,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:o.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,o._)`""`,opts:this.opts,self:this};let b;try{this._compilations.add(t);(0,h.validateFunctionCode)(v);m.optimize(this.opts.code.optimize);const r=m.toString();b=`${m.scopeRefs(c.default.scope)}return ${r}`;if(this.opts.code.process)b=this.opts.code.process(b,t);const i=new Function(`${c.default.self}`,`${c.default.scope}`,b);const a=i(this,this.scope.get());this.scope.value(g,{ref:a});a.errors=null;a.schema=t.schema;a.schemaEnv=t;if(t.$async)a.$async=true;if(this.opts.code.source===true){a.source={validateName:g,validateCode:r,scopeValues:m._values}}if(this.opts.unevaluated){const{props:t,items:r}=v;a.evaluated={props:t instanceof o.Name?undefined:t,items:r instanceof o.Name?undefined:r,dynamicProps:t instanceof o.Name,dynamicItems:r instanceof o.Name};if(a.source)a.source.evaluated=(0,o.stringify)(a.evaluated)}t.validate=a;return t}catch(r){delete t.validate;delete t.validateName;if(b)this.logger.error("Error compiling schema, function code:",b);throw r}finally{this._compilations.delete(t)}}r.compileSchema=compileSchema;function resolveRef(t,r,i){var o;i=(0,l.resolveUrl)(this.opts.uriResolver,r,i);const a=t.refs[i];if(a)return a;let c=resolve.call(this,t,i);if(c===undefined){const a=(o=t.localRefs)===null||o===void 0?void 0:o[i];const{schemaId:l}=this.opts;if(a)c=new SchemaEnv({schema:a,schemaId:l,root:t,baseId:r})}if(c===undefined)return;return t.refs[i]=inlineOrCompile.call(this,c)}r.resolveRef=resolveRef;function inlineOrCompile(t){if((0,l.inlineRef)(t.schema,this.opts.inlineRefs))return t.schema;return t.validate?t:compileSchema.call(this,t)}function getCompilingSchema(t){for(const r of this._compilations){if(sameSchemaEnv(r,t))return r}}r.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(t,r){return t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId}function resolve(t,r){let i;while(typeof(i=this.refs[r])=="string")r=i;return i||this.schemas[r]||resolveSchema.call(this,t,r)}function resolveSchema(t,r){const i=this.opts.uriResolver.parse(r);const o=(0,l._getFullPath)(this.opts.uriResolver,i);let a=(0,l.getFullPath)(this.opts.uriResolver,t.baseId,undefined);if(Object.keys(t.schema).length>0&&o===a){return getJsonPointer.call(this,i,t)}const c=(0,l.normalizeId)(o);const u=this.refs[c]||this.schemas[c];if(typeof u=="string"){const r=resolveSchema.call(this,t,u);if(typeof(r===null||r===void 0?void 0:r.schema)!=="object")return;return getJsonPointer.call(this,i,r)}if(typeof(u===null||u===void 0?void 0:u.schema)!=="object")return;if(!u.validate)compileSchema.call(this,u);if(c===(0,l.normalizeId)(r)){const{schema:r}=u;const{schemaId:i}=this.opts;const o=r[i];if(o)a=(0,l.resolveUrl)(this.opts.uriResolver,a,o);return new SchemaEnv({schema:r,schemaId:i,root:t,baseId:a})}return getJsonPointer.call(this,i,u)}r.resolveSchema=resolveSchema;const d=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(t,{baseId:r,schema:i,root:o}){var a;if(((a=t.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const o of t.fragment.slice(1).split("/")){if(typeof i==="boolean")return;const t=i[(0,u.unescapeFragment)(o)];if(t===undefined)return;i=t;const a=typeof i==="object"&&i[this.opts.schemaId];if(!d.has(o)&&a){r=(0,l.resolveUrl)(this.opts.uriResolver,r,a)}}let c;if(typeof i!="boolean"&&i.$ref&&!(0,u.schemaHasRulesButRef)(i,this.RULES)){const t=(0,l.resolveUrl)(this.opts.uriResolver,r,i.$ref);c=resolveSchema.call(this,o,t)}const{schemaId:h}=this.opts;c=c||new SchemaEnv({schema:i,schemaId:h,root:o,baseId:r});if(c.schema!==c.root.schema)return c;return undefined}},1080:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a={data:new o.Name("data"),valCxt:new o.Name("valCxt"),instancePath:new o.Name("instancePath"),parentData:new o.Name("parentData"),parentDataProperty:new o.Name("parentDataProperty"),rootData:new o.Name("rootData"),dynamicAnchors:new o.Name("dynamicAnchors"),vErrors:new o.Name("vErrors"),errors:new o.Name("errors"),this:new o.Name("this"),self:new o.Name("self"),scope:new o.Name("scope"),json:new o.Name("json"),jsonPos:new o.Name("jsonPos"),jsonLen:new o.Name("jsonLen"),jsonPart:new o.Name("jsonPart")};r["default"]=a},3796:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4146);class MissingRefError extends Error{constructor(t,r,i,a){super(a||`can't resolve reference ${i} from id ${r}`);this.missingRef=(0,o.resolveUrl)(t,r,i);this.missingSchema=(0,o.normalizeId)((0,o.getFullPath)(t,this.missingRef))}}r["default"]=MissingRefError},4146:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getSchemaRefs=r.resolveUrl=r.normalizeId=r._getFullPath=r.getFullPath=r.inlineRef=void 0;const o=i(9068);const a=i(1230);const c=i(9122);const l=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(t,r=true){if(typeof t=="boolean")return true;if(r===true)return!hasRef(t);if(!r)return false;return countKeys(t)<=r}r.inlineRef=inlineRef;const u=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(t){for(const r in t){if(u.has(r))return true;const i=t[r];if(Array.isArray(i)&&i.some(hasRef))return true;if(typeof i=="object"&&hasRef(i))return true}return false}function countKeys(t){let r=0;for(const i in t){if(i==="$ref")return Infinity;r++;if(l.has(i))continue;if(typeof t[i]=="object"){(0,o.eachItem)(t[i],(t=>r+=countKeys(t)))}if(r===Infinity)return Infinity}return r}function getFullPath(t,r="",i){if(i!==false)r=normalizeId(r);const o=t.parse(r);return _getFullPath(t,o)}r.getFullPath=getFullPath;function _getFullPath(t,r){const i=t.serialize(r);return i.split("#")[0]+"#"}r._getFullPath=_getFullPath;const h=/#\/?$/;function normalizeId(t){return t?t.replace(h,""):""}r.normalizeId=normalizeId;function resolveUrl(t,r,i){i=normalizeId(i);return t.resolve(r,i)}r.resolveUrl=resolveUrl;const d=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(t,r){if(typeof t=="boolean")return{};const{schemaId:i,uriResolver:o}=this.opts;const l=normalizeId(t[i]||r);const u={"":l};const h=getFullPath(o,l,false);const p={};const m=new Set;c(t,{allKeys:true},((t,r,o,a)=>{if(a===undefined)return;const c=h+r;let l=u[a];if(typeof t[i]=="string")l=addRef.call(this,t[i]);addAnchor.call(this,t.$anchor);addAnchor.call(this,t.$dynamicAnchor);u[r]=l;function addRef(r){const i=this.opts.uriResolver.resolve;r=normalizeId(l?i(l,r):r);if(m.has(r))throw ambiguos(r);m.add(r);let o=this.refs[r];if(typeof o=="string")o=this.refs[o];if(typeof o=="object"){checkAmbiguosRef(t,o.schema,r)}else if(r!==normalizeId(c)){if(r[0]==="#"){checkAmbiguosRef(t,p[r],r);p[r]=t}else{this.refs[r]=c}}return r}function addAnchor(t){if(typeof t=="string"){if(!d.test(t))throw new Error(`invalid anchor "${t}"`);addRef.call(this,`#${t}`)}}}));return p;function checkAmbiguosRef(t,r,i){if(r!==undefined&&!a(t,r))throw ambiguos(i)}function ambiguos(t){return new Error(`reference "${t}" resolves to more than one schema`)}}r.getSchemaRefs=getSchemaRefs},4445:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getRules=r.isJSONType=void 0;const i=["string","number","integer","boolean","null","object","array"];const o=new Set(i);function isJSONType(t){return typeof t=="string"&&o.has(t)}r.isJSONType=isJSONType;function getRules(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:true,boolean:true,null:true},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}r.getRules=getRules},9068:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.checkStrictMode=r.getErrorPath=r.Type=r.useFunc=r.setEvaluated=r.evaluatedPropsToName=r.mergeEvaluated=r.eachItem=r.unescapeJsonPointer=r.escapeJsonPointer=r.escapeFragment=r.unescapeFragment=r.schemaRefOrVal=r.schemaHasRulesButRef=r.schemaHasRules=r.checkUnknownRules=r.alwaysValidSchema=r.toHash=void 0;const o=i(4598);const a=i(7577);function toHash(t){const r={};for(const i of t)r[i]=true;return r}r.toHash=toHash;function alwaysValidSchema(t,r){if(typeof r=="boolean")return r;if(Object.keys(r).length===0)return true;checkUnknownRules(t,r);return!schemaHasRules(r,t.self.RULES.all)}r.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(t,r=t.schema){const{opts:i,self:o}=t;if(!i.strictSchema)return;if(typeof r==="boolean")return;const a=o.RULES.keywords;for(const i in r){if(!a[i])checkStrictMode(t,`unknown keyword: "${i}"`)}}r.checkUnknownRules=checkUnknownRules;function schemaHasRules(t,r){if(typeof t=="boolean")return!t;for(const i in t)if(r[i])return true;return false}r.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(t,r){if(typeof t=="boolean")return!t;for(const i in t)if(i!=="$ref"&&r.all[i])return true;return false}r.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef:t,schemaPath:r},i,a,c){if(!c){if(typeof i=="number"||typeof i=="boolean")return i;if(typeof i=="string")return(0,o._)`${i}`}return(0,o._)`${t}${r}${(0,o.getProperty)(a)}`}r.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(t){return unescapeJsonPointer(decodeURIComponent(t))}r.unescapeFragment=unescapeFragment;function escapeFragment(t){return encodeURIComponent(escapeJsonPointer(t))}r.escapeFragment=escapeFragment;function escapeJsonPointer(t){if(typeof t=="number")return`${t}`;return t.replace(/~/g,"~0").replace(/\//g,"~1")}r.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}r.unescapeJsonPointer=unescapeJsonPointer;function eachItem(t,r){if(Array.isArray(t)){for(const i of t)r(i)}else{r(t)}}r.eachItem=eachItem;function makeMergeEvaluated({mergeNames:t,mergeToName:r,mergeValues:i,resultToName:a}){return(c,l,u,h)=>{const d=u===undefined?l:u instanceof o.Name?(l instanceof o.Name?t(c,l,u):r(c,l,u),u):l instanceof o.Name?(r(c,u,l),l):i(l,u);return h===o.Name&&!(d instanceof o.Name)?a(c,d):d}}r.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(t,r,i)=>t.if((0,o._)`${i} !== true && ${r} !== undefined`,(()=>{t.if((0,o._)`${r} === true`,(()=>t.assign(i,true)),(()=>t.assign(i,(0,o._)`${i} || {}`).code((0,o._)`Object.assign(${i}, ${r})`)))})),mergeToName:(t,r,i)=>t.if((0,o._)`${i} !== true`,(()=>{if(r===true){t.assign(i,true)}else{t.assign(i,(0,o._)`${i} || {}`);setEvaluated(t,i,r)}})),mergeValues:(t,r)=>t===true?true:{...t,...r},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(t,r,i)=>t.if((0,o._)`${i} !== true && ${r} !== undefined`,(()=>t.assign(i,(0,o._)`${r} === true ? true : ${i} > ${r} ? ${i} : ${r}`))),mergeToName:(t,r,i)=>t.if((0,o._)`${i} !== true`,(()=>t.assign(i,r===true?true:(0,o._)`${i} > ${r} ? ${i} : ${r}`))),mergeValues:(t,r)=>t===true?true:Math.max(t,r),resultToName:(t,r)=>t.var("items",r)})};function evaluatedPropsToName(t,r){if(r===true)return t.var("props",true);const i=t.var("props",(0,o._)`{}`);if(r!==undefined)setEvaluated(t,i,r);return i}r.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(t,r,i){Object.keys(i).forEach((i=>t.assign((0,o._)`${r}${(0,o.getProperty)(i)}`,true)))}r.setEvaluated=setEvaluated;const c={};function useFunc(t,r){return t.scopeValue("func",{ref:r,code:c[r.code]||(c[r.code]=new a._Code(r.code))})}r.useFunc=useFunc;var l;(function(t){t[t["Num"]=0]="Num";t[t["Str"]=1]="Str"})(l=r.Type||(r.Type={}));function getErrorPath(t,r,i){if(t instanceof o.Name){const a=r===l.Num;return i?a?(0,o._)`"[" + ${t} + "]"`:(0,o._)`"['" + ${t} + "']"`:a?(0,o._)`"/" + ${t}`:(0,o._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,o.getProperty)(t).toString():"/"+escapeJsonPointer(t)}r.getErrorPath=getErrorPath;function checkStrictMode(t,r,i=t.opts.strictSchema){if(!i)return;r=`strict mode: ${r}`;if(i===true)throw new Error(r);t.self.logger.warn(r)}r.checkStrictMode=checkStrictMode},3501:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.shouldUseRule=r.shouldUseGroup=r.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema:t,self:r},i){const o=r.RULES.types[i];return o&&o!==true&&shouldUseGroup(t,o)}r.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(t,r){return r.rules.some((r=>shouldUseRule(t,r)))}r.shouldUseGroup=shouldUseGroup;function shouldUseRule(t,r){var i;return t[r.keyword]!==undefined||((i=r.definition.implements)===null||i===void 0?void 0:i.some((r=>t[r]!==undefined)))}r.shouldUseRule=shouldUseRule},4046:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.boolOrEmptySchema=r.topBoolOrEmptySchema=void 0;const o=i(7757);const a=i(4598);const c=i(1080);const l={message:"boolean schema is false"};function topBoolOrEmptySchema(t){const{gen:r,schema:i,validateName:o}=t;if(i===false){falseSchemaError(t,false)}else if(typeof i=="object"&&i.$async===true){r.return(c.default.data)}else{r.assign((0,a._)`${o}.errors`,null);r.return(true)}}r.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(t,r){const{gen:i,schema:o}=t;if(o===false){i.var(r,false);falseSchemaError(t)}else{i.var(r,true)}}r.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(t,r){const{gen:i,data:a}=t;const c={gen:i,keyword:"false schema",data:a,schema:false,schemaCode:false,schemaValue:false,params:{},it:t};(0,o.reportError)(c,l,undefined,r)}},7853:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.reportTypeError=r.checkDataTypes=r.checkDataType=r.coerceAndCheckDataType=r.getJSONTypes=r.getSchemaTypes=r.DataType=void 0;const o=i(4445);const a=i(3501);const c=i(7757);const l=i(4598);const u=i(9068);var h;(function(t){t[t["Correct"]=0]="Correct";t[t["Wrong"]=1]="Wrong"})(h=r.DataType||(r.DataType={}));function getSchemaTypes(t){const r=getJSONTypes(t.type);const i=r.includes("null");if(i){if(t.nullable===false)throw new Error("type: null contradicts nullable: false")}else{if(!r.length&&t.nullable!==undefined){throw new Error('"nullable" cannot be used without "type"')}if(t.nullable===true)r.push("null")}return r}r.getSchemaTypes=getSchemaTypes;function getJSONTypes(t){const r=Array.isArray(t)?t:t?[t]:[];if(r.every(o.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}r.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(t,r){const{gen:i,data:o,opts:c}=t;const l=coerceToTypes(r,c.coerceTypes);const u=r.length>0&&!(l.length===0&&r.length===1&&(0,a.schemaHasRulesForType)(t,r[0]));if(u){const a=checkDataTypes(r,o,c.strictNumbers,h.Wrong);i.if(a,(()=>{if(l.length)coerceData(t,r,l);else reportTypeError(t)}))}return u}r.coerceAndCheckDataType=coerceAndCheckDataType;const d=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(t,r){return r?t.filter((t=>d.has(t)||r==="array"&&t==="array")):[]}function coerceData(t,r,i){const{gen:o,data:a,opts:c}=t;const u=o.let("dataType",(0,l._)`typeof ${a}`);const h=o.let("coerced",(0,l._)`undefined`);if(c.coerceTypes==="array"){o.if((0,l._)`${u} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>o.assign(a,(0,l._)`${a}[0]`).assign(u,(0,l._)`typeof ${a}`).if(checkDataTypes(r,a,c.strictNumbers),(()=>o.assign(h,a)))))}o.if((0,l._)`${h} !== undefined`);for(const t of i){if(d.has(t)||t==="array"&&c.coerceTypes==="array"){coerceSpecificType(t)}}o.else();reportTypeError(t);o.endIf();o.if((0,l._)`${h} !== undefined`,(()=>{o.assign(a,h);assignParentData(t,h)}));function coerceSpecificType(t){switch(t){case"string":o.elseIf((0,l._)`${u} == "number" || ${u} == "boolean"`).assign(h,(0,l._)`"" + ${a}`).elseIf((0,l._)`${a} === null`).assign(h,(0,l._)`""`);return;case"number":o.elseIf((0,l._)`${u} == "boolean" || ${a} === null
|
|
3
|
+
|| (${u} == "string" && ${a} && ${a} == +${a})`).assign(h,(0,l._)`+${a}`);return;case"integer":o.elseIf((0,l._)`${u} === "boolean" || ${a} === null
|
|
4
|
+
|| (${u} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(h,(0,l._)`+${a}`);return;case"boolean":o.elseIf((0,l._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(h,false).elseIf((0,l._)`${a} === "true" || ${a} === 1`).assign(h,true);return;case"null":o.elseIf((0,l._)`${a} === "" || ${a} === 0 || ${a} === false`);o.assign(h,null);return;case"array":o.elseIf((0,l._)`${u} === "string" || ${u} === "number"
|
|
5
|
+
|| ${u} === "boolean" || ${a} === null`).assign(h,(0,l._)`[${a}]`)}}}function assignParentData({gen:t,parentData:r,parentDataProperty:i},o){t.if((0,l._)`${r} !== undefined`,(()=>t.assign((0,l._)`${r}[${i}]`,o)))}function checkDataType(t,r,i,o=h.Correct){const a=o===h.Correct?l.operators.EQ:l.operators.NEQ;let c;switch(t){case"null":return(0,l._)`${r} ${a} null`;case"array":c=(0,l._)`Array.isArray(${r})`;break;case"object":c=(0,l._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":c=numCond((0,l._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":c=numCond();break;default:return(0,l._)`typeof ${r} ${a} ${t}`}return o===h.Correct?c:(0,l.not)(c);function numCond(t=l.nil){return(0,l.and)((0,l._)`typeof ${r} == "number"`,t,i?(0,l._)`isFinite(${r})`:l.nil)}}r.checkDataType=checkDataType;function checkDataTypes(t,r,i,o){if(t.length===1){return checkDataType(t[0],r,i,o)}let a;const c=(0,u.toHash)(t);if(c.array&&c.object){const t=(0,l._)`typeof ${r} != "object"`;a=c.null?t:(0,l._)`!${r} || ${t}`;delete c.null;delete c.array;delete c.object}else{a=l.nil}if(c.number)delete c.integer;for(const t in c)a=(0,l.and)(a,checkDataType(t,r,i,o));return a}r.checkDataTypes=checkDataTypes;const p={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:r})=>typeof t=="string"?(0,l._)`{type: ${t}}`:(0,l._)`{type: ${r}}`};function reportTypeError(t){const r=getTypeErrorContext(t);(0,c.reportError)(r,p)}r.reportTypeError=reportTypeError;function getTypeErrorContext(t){const{gen:r,data:i,schema:o}=t;const a=(0,u.schemaRefOrVal)(t,o,"type");return{gen:r,keyword:"type",data:i,schema:o.type,schemaCode:a,schemaValue:a,parentSchema:o,params:{},it:t}}},8795:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.assignDefaults=void 0;const o=i(4598);const a=i(9068);function assignDefaults(t,r){const{properties:i,items:o}=t.schema;if(r==="object"&&i){for(const r in i){assignDefault(t,r,i[r].default)}}else if(r==="array"&&Array.isArray(o)){o.forEach(((r,i)=>assignDefault(t,i,r.default)))}}r.assignDefaults=assignDefaults;function assignDefault(t,r,i){const{gen:c,compositeRule:l,data:u,opts:h}=t;if(i===undefined)return;const d=(0,o._)`${u}${(0,o.getProperty)(r)}`;if(l){(0,a.checkStrictMode)(t,`default is ignored for: ${d}`);return}let p=(0,o._)`${d} === undefined`;if(h.useDefaults==="empty"){p=(0,o._)`${p} || ${d} === null || ${d} === ""`}c.if(p,(0,o._)`${d} = ${(0,o.stringify)(i)}`)}},6316:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.getData=r.KeywordCxt=r.validateFunctionCode=void 0;const o=i(4046);const a=i(7853);const c=i(3501);const l=i(7853);const u=i(8795);const h=i(5223);const d=i(6391);const p=i(4598);const m=i(1080);const y=i(4146);const g=i(9068);const v=i(7757);function validateFunctionCode(t){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){topSchemaObjCode(t);return}}validateFunction(t,(()=>(0,o.topBoolOrEmptySchema)(t)))}r.validateFunctionCode=validateFunctionCode;function validateFunction({gen:t,validateName:r,schema:i,schemaEnv:o,opts:a},c){if(a.code.es5){t.func(r,(0,p._)`${m.default.data}, ${m.default.valCxt}`,o.$async,(()=>{t.code((0,p._)`"use strict"; ${funcSourceUrl(i,a)}`);destructureValCxtES5(t,a);t.code(c)}))}else{t.func(r,(0,p._)`${m.default.data}, ${destructureValCxt(a)}`,o.$async,(()=>t.code(funcSourceUrl(i,a)).code(c)))}}function destructureValCxt(t){return(0,p._)`{${m.default.instancePath}="", ${m.default.parentData}, ${m.default.parentDataProperty}, ${m.default.rootData}=${m.default.data}${t.dynamicRef?(0,p._)`, ${m.default.dynamicAnchors}={}`:p.nil}}={}`}function destructureValCxtES5(t,r){t.if(m.default.valCxt,(()=>{t.var(m.default.instancePath,(0,p._)`${m.default.valCxt}.${m.default.instancePath}`);t.var(m.default.parentData,(0,p._)`${m.default.valCxt}.${m.default.parentData}`);t.var(m.default.parentDataProperty,(0,p._)`${m.default.valCxt}.${m.default.parentDataProperty}`);t.var(m.default.rootData,(0,p._)`${m.default.valCxt}.${m.default.rootData}`);if(r.dynamicRef)t.var(m.default.dynamicAnchors,(0,p._)`${m.default.valCxt}.${m.default.dynamicAnchors}`)}),(()=>{t.var(m.default.instancePath,(0,p._)`""`);t.var(m.default.parentData,(0,p._)`undefined`);t.var(m.default.parentDataProperty,(0,p._)`undefined`);t.var(m.default.rootData,m.default.data);if(r.dynamicRef)t.var(m.default.dynamicAnchors,(0,p._)`{}`)}))}function topSchemaObjCode(t){const{schema:r,opts:i,gen:o}=t;validateFunction(t,(()=>{if(i.$comment&&r.$comment)commentKeyword(t);checkNoDefault(t);o.let(m.default.vErrors,null);o.let(m.default.errors,0);if(i.unevaluated)resetEvaluated(t);typeAndKeywords(t);returnResults(t)}));return}function resetEvaluated(t){const{gen:r,validateName:i}=t;t.evaluated=r.const("evaluated",(0,p._)`${i}.evaluated`);r.if((0,p._)`${t.evaluated}.dynamicProps`,(()=>r.assign((0,p._)`${t.evaluated}.props`,(0,p._)`undefined`)));r.if((0,p._)`${t.evaluated}.dynamicItems`,(()=>r.assign((0,p._)`${t.evaluated}.items`,(0,p._)`undefined`)))}function funcSourceUrl(t,r){const i=typeof t=="object"&&t[r.schemaId];return i&&(r.code.source||r.code.process)?(0,p._)`/*# sourceURL=${i} */`:p.nil}function subschemaCode(t,r){if(isSchemaObj(t)){checkKeywords(t);if(schemaCxtHasRules(t)){subSchemaObjCode(t,r);return}}(0,o.boolOrEmptySchema)(t,r)}function schemaCxtHasRules({schema:t,self:r}){if(typeof t=="boolean")return!t;for(const i in t)if(r.RULES.all[i])return true;return false}function isSchemaObj(t){return typeof t.schema!="boolean"}function subSchemaObjCode(t,r){const{schema:i,gen:o,opts:a}=t;if(a.$comment&&i.$comment)commentKeyword(t);updateContext(t);checkAsyncSchema(t);const c=o.const("_errs",m.default.errors);typeAndKeywords(t,c);o.var(r,(0,p._)`${c} === ${m.default.errors}`)}function checkKeywords(t){(0,g.checkUnknownRules)(t);checkRefsAndKeywords(t)}function typeAndKeywords(t,r){if(t.opts.jtd)return schemaKeywords(t,[],false,r);const i=(0,a.getSchemaTypes)(t.schema);const o=(0,a.coerceAndCheckDataType)(t,i);schemaKeywords(t,i,!o,r)}function checkRefsAndKeywords(t){const{schema:r,errSchemaPath:i,opts:o,self:a}=t;if(r.$ref&&o.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(r,a.RULES)){a.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}}function checkNoDefault(t){const{schema:r,opts:i}=t;if(r.default!==undefined&&i.useDefaults&&i.strictSchema){(0,g.checkStrictMode)(t,"default is ignored in the schema root")}}function updateContext(t){const r=t.schema[t.opts.schemaId];if(r)t.baseId=(0,y.resolveUrl)(t.opts.uriResolver,t.baseId,r)}function checkAsyncSchema(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen:t,schemaEnv:r,schema:i,errSchemaPath:o,opts:a}){const c=i.$comment;if(a.$comment===true){t.code((0,p._)`${m.default.self}.logger.log(${c})`)}else if(typeof a.$comment=="function"){const i=(0,p.str)`${o}/$comment`;const a=t.scopeValue("root",{ref:r.root});t.code((0,p._)`${m.default.self}.opts.$comment(${c}, ${i}, ${a}.schema)`)}}function returnResults(t){const{gen:r,schemaEnv:i,validateName:o,ValidationError:a,opts:c}=t;if(i.$async){r.if((0,p._)`${m.default.errors} === 0`,(()=>r.return(m.default.data)),(()=>r.throw((0,p._)`new ${a}(${m.default.vErrors})`)))}else{r.assign((0,p._)`${o}.errors`,m.default.vErrors);if(c.unevaluated)assignEvaluated(t);r.return((0,p._)`${m.default.errors} === 0`)}}function assignEvaluated({gen:t,evaluated:r,props:i,items:o}){if(i instanceof p.Name)t.assign((0,p._)`${r}.props`,i);if(o instanceof p.Name)t.assign((0,p._)`${r}.items`,o)}function schemaKeywords(t,r,i,o){const{gen:a,schema:u,data:h,allErrors:d,opts:y,self:v}=t;const{RULES:b}=v;if(u.$ref&&(y.ignoreKeywordsWithRef||!(0,g.schemaHasRulesButRef)(u,b))){a.block((()=>keywordCode(t,"$ref",b.all.$ref.definition)));return}if(!y.jtd)checkStrictTypes(t,r);a.block((()=>{for(const t of b.rules)groupKeywords(t);groupKeywords(b.post)}));function groupKeywords(g){if(!(0,c.shouldUseGroup)(u,g))return;if(g.type){a.if((0,l.checkDataType)(g.type,h,y.strictNumbers));iterateKeywords(t,g);if(r.length===1&&r[0]===g.type&&i){a.else();(0,l.reportTypeError)(t)}a.endIf()}else{iterateKeywords(t,g)}if(!d)a.if((0,p._)`${m.default.errors} === ${o||0}`)}}function iterateKeywords(t,r){const{gen:i,schema:o,opts:{useDefaults:a}}=t;if(a)(0,u.assignDefaults)(t,r.type);i.block((()=>{for(const i of r.rules){if((0,c.shouldUseRule)(o,i)){keywordCode(t,i.keyword,i.definition,r.type)}}}))}function checkStrictTypes(t,r){if(t.schemaEnv.meta||!t.opts.strictTypes)return;checkContextTypes(t,r);if(!t.opts.allowUnionTypes)checkMultipleTypes(t,r);checkKeywordTypes(t,t.dataTypes)}function checkContextTypes(t,r){if(!r.length)return;if(!t.dataTypes.length){t.dataTypes=r;return}r.forEach((r=>{if(!includesType(t.dataTypes,r)){strictTypesError(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}}));t.dataTypes=t.dataTypes.filter((t=>includesType(r,t)))}function checkMultipleTypes(t,r){if(r.length>1&&!(r.length===2&&r.includes("null"))){strictTypesError(t,"use allowUnionTypes to allow union type keyword")}}function checkKeywordTypes(t,r){const i=t.self.RULES.all;for(const o in i){const a=i[o];if(typeof a=="object"&&(0,c.shouldUseRule)(t.schema,a)){const{type:i}=a.definition;if(i.length&&!i.some((t=>hasApplicableType(r,t)))){strictTypesError(t,`missing type "${i.join(",")}" for keyword "${o}"`)}}}}function hasApplicableType(t,r){return t.includes(r)||r==="number"&&t.includes("integer")}function includesType(t,r){return t.includes(r)||r==="integer"&&t.includes("number")}function strictTypesError(t,r){const i=t.schemaEnv.baseId+t.errSchemaPath;r+=` at "${i}" (strictTypes)`;(0,g.checkStrictMode)(t,r,t.opts.strictTypes)}class KeywordCxt{constructor(t,r,i){(0,h.validateKeywordUsage)(t,r,i);this.gen=t.gen;this.allErrors=t.allErrors;this.keyword=i;this.data=t.data;this.schema=t.schema[i];this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data;this.schemaValue=(0,g.schemaRefOrVal)(t,this.schema,i,this.$data);this.schemaType=r.schemaType;this.parentSchema=t.schema;this.params={};this.it=t;this.def=r;if(this.$data){this.schemaCode=t.gen.const("vSchema",getData(this.$data,t))}else{this.schemaCode=this.schemaValue;if(!(0,h.validSchemaType)(this.schema,r.schemaType,r.allowUndefined)){throw new Error(`${i} value must be ${JSON.stringify(r.schemaType)}`)}}if("code"in r?r.trackErrors:r.errors!==false){this.errsCount=t.gen.const("_errs",m.default.errors)}}result(t,r,i){this.failResult((0,p.not)(t),r,i)}failResult(t,r,i){this.gen.if(t);if(i)i();else this.error();if(r){this.gen.else();r();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(t,r){this.failResult((0,p.not)(t),undefined,r)}fail(t){if(t===undefined){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(t);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,p._)`${r} !== undefined && (${(0,p.or)(this.invalid$data(),t)})`)}error(t,r,i){if(r){this.setParams(r);this._error(t,i);this.setParams({});return}this._error(t,i)}_error(t,r){(t?v.reportExtraError:v.reportError)(this,this.def.error,r)}$dataError(){(0,v.reportError)(this,this.def.$dataError||v.keyword$DataError)}reset(){if(this.errsCount===undefined)throw new Error('add "trackErrors" to keyword definition');(0,v.resetErrorsCount)(this.gen,this.errsCount)}ok(t){if(!this.allErrors)this.gen.if(t)}setParams(t,r){if(r)Object.assign(this.params,t);else this.params=t}block$data(t,r,i=p.nil){this.gen.block((()=>{this.check$data(t,i);r()}))}check$data(t=p.nil,r=p.nil){if(!this.$data)return;const{gen:i,schemaCode:o,schemaType:a,def:c}=this;i.if((0,p.or)((0,p._)`${o} === undefined`,r));if(t!==p.nil)i.assign(t,true);if(a.length||c.validateSchema){i.elseIf(this.invalid$data());this.$dataError();if(t!==p.nil)i.assign(t,false)}i.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:i,def:o,it:a}=this;return(0,p.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(i.length){if(!(r instanceof p.Name))throw new Error("ajv implementation error");const t=Array.isArray(i)?i:[i];return(0,p._)`${(0,l.checkDataTypes)(t,r,a.opts.strictNumbers,l.DataType.Wrong)}`}return p.nil}function invalid$DataSchema(){if(o.validateSchema){const i=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,p._)`!${i}(${r})`}return p.nil}}subschema(t,r){const i=(0,d.getSubschema)(this.it,t);(0,d.extendSubschemaData)(i,this.it,t);(0,d.extendSubschemaMode)(i,t);const o={...this.it,...i,items:undefined,props:undefined};subschemaCode(o,r);return o}mergeEvaluated(t,r){const{it:i,gen:o}=this;if(!i.opts.unevaluated)return;if(i.props!==true&&t.props!==undefined){i.props=g.mergeEvaluated.props(o,t.props,i.props,r)}if(i.items!==true&&t.items!==undefined){i.items=g.mergeEvaluated.items(o,t.items,i.items,r)}}mergeValidEvaluated(t,r){const{it:i,gen:o}=this;if(i.opts.unevaluated&&(i.props!==true||i.items!==true)){o.if(r,(()=>this.mergeEvaluated(t,p.Name)));return true}}}r.KeywordCxt=KeywordCxt;function keywordCode(t,r,i,o){const a=new KeywordCxt(t,i,r);if("code"in i){i.code(a,o)}else if(a.$data&&i.validate){(0,h.funcKeywordCode)(a,i)}else if("macro"in i){(0,h.macroKeywordCode)(a,i)}else if(i.compile||i.validate){(0,h.funcKeywordCode)(a,i)}}const b=/^\/(?:[^~]|~0|~1)*$/;const w=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(t,{dataLevel:r,dataNames:i,dataPathArr:o}){let a;let c;if(t==="")return m.default.rootData;if(t[0]==="/"){if(!b.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);a=t;c=m.default.rootData}else{const l=w.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);const u=+l[1];a=l[2];if(a==="#"){if(u>=r)throw new Error(errorMsg("property/index",u));return o[r-u]}if(u>r)throw new Error(errorMsg("data",u));c=i[r-u];if(!a)return c}let l=c;const u=a.split("/");for(const t of u){if(t){c=(0,p._)`${c}${(0,p.getProperty)((0,g.unescapeJsonPointer)(t))}`;l=(0,p._)`${l} && ${c}`}}return l;function errorMsg(t,i){return`Cannot access ${t} ${i} levels up, current level is ${r}`}}r.getData=getData},5223:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateKeywordUsage=r.validSchemaType=r.funcKeywordCode=r.macroKeywordCode=void 0;const o=i(4598);const a=i(1080);const c=i(8572);const l=i(7757);function macroKeywordCode(t,r){const{gen:i,keyword:a,schema:c,parentSchema:l,it:u}=t;const h=r.macro.call(u.self,c,l,u);const d=useKeyword(i,a,h);if(u.opts.validateSchema!==false)u.self.validateSchema(h,true);const p=i.name("valid");t.subschema({schema:h,schemaPath:o.nil,errSchemaPath:`${u.errSchemaPath}/${a}`,topSchemaRef:d,compositeRule:true},p);t.pass(p,(()=>t.error(true)))}r.macroKeywordCode=macroKeywordCode;function funcKeywordCode(t,r){var i;const{gen:l,keyword:u,schema:h,parentSchema:d,$data:p,it:m}=t;checkAsyncKeyword(m,r);const y=!p&&r.compile?r.compile.call(m.self,h,d,m):r.validate;const g=useKeyword(l,u,y);const v=l.let("valid");t.block$data(v,validateKeyword);t.ok((i=r.valid)!==null&&i!==void 0?i:v);function validateKeyword(){if(r.errors===false){assignValid();if(r.modifying)modifyData(t);reportErrs((()=>t.error()))}else{const i=r.async?validateAsync():validateSync();if(r.modifying)modifyData(t);reportErrs((()=>addErrs(t,i)))}}function validateAsync(){const t=l.let("ruleErrs",null);l.try((()=>assignValid((0,o._)`await `)),(r=>l.assign(v,false).if((0,o._)`${r} instanceof ${m.ValidationError}`,(()=>l.assign(t,(0,o._)`${r}.errors`)),(()=>l.throw(r)))));return t}function validateSync(){const t=(0,o._)`${g}.errors`;l.assign(t,null);assignValid(o.nil);return t}function assignValid(i=(r.async?(0,o._)`await `:o.nil)){const u=m.opts.passContext?a.default.this:a.default.self;const h=!("compile"in r&&!p||r.schema===false);l.assign(v,(0,o._)`${i}${(0,c.callValidateCode)(t,g,u,h)}`,r.modifying)}function reportErrs(t){var i;l.if((0,o.not)((i=r.valid)!==null&&i!==void 0?i:v),t)}}r.funcKeywordCode=funcKeywordCode;function modifyData(t){const{gen:r,data:i,it:a}=t;r.if(a.parentData,(()=>r.assign(i,(0,o._)`${a.parentData}[${a.parentDataProperty}]`)))}function addErrs(t,r){const{gen:i}=t;i.if((0,o._)`Array.isArray(${r})`,(()=>{i.assign(a.default.vErrors,(0,o._)`${a.default.vErrors} === null ? ${r} : ${a.default.vErrors}.concat(${r})`).assign(a.default.errors,(0,o._)`${a.default.vErrors}.length`);(0,l.extendErrors)(t)}),(()=>t.error()))}function checkAsyncKeyword({schemaEnv:t},r){if(r.async&&!t.$async)throw new Error("async keyword in sync schema")}function useKeyword(t,r,i){if(i===undefined)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword",typeof i=="function"?{ref:i}:{ref:i,code:(0,o.stringify)(i)})}function validSchemaType(t,r,i=false){return!r.length||r.some((r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||i&&typeof t=="undefined"))}r.validSchemaType=validSchemaType;function validateKeywordUsage({schema:t,opts:r,self:i,errSchemaPath:o},a,c){if(Array.isArray(a.keyword)?!a.keyword.includes(c):a.keyword!==c){throw new Error("ajv implementation error")}const l=a.dependencies;if(l===null||l===void 0?void 0:l.some((r=>!Object.prototype.hasOwnProperty.call(t,r)))){throw new Error(`parent schema must have dependencies of ${c}: ${l.join(",")}`)}if(a.validateSchema){const l=a.validateSchema(t[c]);if(!l){const t=`keyword "${c}" value is invalid at path "${o}": `+i.errorsText(a.validateSchema.errors);if(r.validateSchema==="log")i.logger.error(t);else throw new Error(t)}}}r.validateKeywordUsage=validateKeywordUsage},6391:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.extendSubschemaMode=r.extendSubschemaData=r.getSubschema=void 0;const o=i(4598);const a=i(9068);function getSubschema(t,{keyword:r,schemaProp:i,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:h}){if(r!==undefined&&c!==undefined){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(r!==undefined){const c=t.schema[r];return i===undefined?{schema:c,schemaPath:(0,o._)`${t.schemaPath}${(0,o.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${r}`}:{schema:c[i],schemaPath:(0,o._)`${t.schemaPath}${(0,o.getProperty)(r)}${(0,o.getProperty)(i)}`,errSchemaPath:`${t.errSchemaPath}/${r}/${(0,a.escapeFragment)(i)}`}}if(c!==undefined){if(l===undefined||u===undefined||h===undefined){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:c,schemaPath:l,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}r.getSubschema=getSubschema;function extendSubschemaData(t,r,{dataProp:i,dataPropType:c,data:l,dataTypes:u,propertyName:h}){if(l!==undefined&&i!==undefined){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:d}=r;if(i!==undefined){const{errorPath:l,dataPathArr:u,opts:h}=r;const p=d.let("data",(0,o._)`${r.data}${(0,o.getProperty)(i)}`,true);dataContextProps(p);t.errorPath=(0,o.str)`${l}${(0,a.getErrorPath)(i,c,h.jsPropertySyntax)}`;t.parentDataProperty=(0,o._)`${i}`;t.dataPathArr=[...u,t.parentDataProperty]}if(l!==undefined){const r=l instanceof o.Name?l:d.let("data",l,true);dataContextProps(r);if(h!==undefined)t.propertyName=h}if(u)t.dataTypes=u;function dataContextProps(i){t.data=i;t.dataLevel=r.dataLevel+1;t.dataTypes=[];r.definedProperties=new Set;t.parentData=r.data;t.dataNames=[...r.dataNames,i]}}r.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(t,{jtdDiscriminator:r,jtdMetadata:i,compositeRule:o,createErrors:a,allErrors:c}){if(o!==undefined)t.compositeRule=o;if(a!==undefined)t.createErrors=a;if(c!==undefined)t.allErrors=c;t.jtdDiscriminator=r;t.jtdMetadata=i}r.extendSubschemaMode=extendSubschemaMode},5054:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var o=i(6316);Object.defineProperty(r,"KeywordCxt",{enumerable:true,get:function(){return o.KeywordCxt}});var a=i(4598);Object.defineProperty(r,"_",{enumerable:true,get:function(){return a._}});Object.defineProperty(r,"str",{enumerable:true,get:function(){return a.str}});Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return a.stringify}});Object.defineProperty(r,"nil",{enumerable:true,get:function(){return a.nil}});Object.defineProperty(r,"Name",{enumerable:true,get:function(){return a.Name}});Object.defineProperty(r,"CodeGen",{enumerable:true,get:function(){return a.CodeGen}});const c=i(7091);const l=i(3796);const u=i(4445);const h=i(5444);const d=i(4598);const p=i(4146);const m=i(7853);const y=i(9068);const g=i(7918);const v=i(3678);const defaultRegExp=(t,r)=>new RegExp(t,r);defaultRegExp.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"];const w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);const E={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."};const S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};const x=200;function requiredOptions(t){var r,i,o,a,c,l,u,h,d,p,m,y,g,b,w,E,S,R,P,$,O,T,A,C,k;const I=t.strict;const N=(r=t.code)===null||r===void 0?void 0:r.optimize;const D=N===true||N===undefined?1:N||0;const L=(o=(i=t.code)===null||i===void 0?void 0:i.regExp)!==null&&o!==void 0?o:defaultRegExp;const M=(a=t.uriResolver)!==null&&a!==void 0?a:v.default;return{strictSchema:(l=(c=t.strictSchema)!==null&&c!==void 0?c:I)!==null&&l!==void 0?l:true,strictNumbers:(h=(u=t.strictNumbers)!==null&&u!==void 0?u:I)!==null&&h!==void 0?h:true,strictTypes:(p=(d=t.strictTypes)!==null&&d!==void 0?d:I)!==null&&p!==void 0?p:"log",strictTuples:(y=(m=t.strictTuples)!==null&&m!==void 0?m:I)!==null&&y!==void 0?y:"log",strictRequired:(b=(g=t.strictRequired)!==null&&g!==void 0?g:I)!==null&&b!==void 0?b:false,code:t.code?{...t.code,optimize:D,regExp:L}:{optimize:D,regExp:L},loopRequired:(w=t.loopRequired)!==null&&w!==void 0?w:x,loopEnum:(E=t.loopEnum)!==null&&E!==void 0?E:x,meta:(S=t.meta)!==null&&S!==void 0?S:true,messages:(R=t.messages)!==null&&R!==void 0?R:true,inlineRefs:(P=t.inlineRefs)!==null&&P!==void 0?P:true,schemaId:($=t.schemaId)!==null&&$!==void 0?$:"$id",addUsedSchema:(O=t.addUsedSchema)!==null&&O!==void 0?O:true,validateSchema:(T=t.validateSchema)!==null&&T!==void 0?T:true,validateFormats:(A=t.validateFormats)!==null&&A!==void 0?A:true,unicodeRegExp:(C=t.unicodeRegExp)!==null&&C!==void 0?C:true,int32range:(k=t.int32range)!==null&&k!==void 0?k:true,uriResolver:M}}class Ajv{constructor(t={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;t=this.opts={...t,...requiredOptions(t)};const{es5:r,lines:i}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:w,es5:r,lines:i});this.logger=getLogger(t.logger);const o=t.validateFormats;t.validateFormats=false;this.RULES=(0,u.getRules)();checkOptions.call(this,E,t,"NOT SUPPORTED");checkOptions.call(this,S,t,"DEPRECATED","warn");this._metaOpts=getMetaSchemaOptions.call(this);if(t.formats)addInitialFormats.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(t.keywords)addInitialKeywords.call(this,t.keywords);if(typeof t.meta=="object")this.addMetaSchema(t.meta);addInitialSchemas.call(this);t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:r,schemaId:i}=this.opts;let o=g;if(i==="id"){o={...g};o.id=o.$id;delete o.$id}if(r&&t)this.addMetaSchema(o,o[i],false)}defaultMeta(){const{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:undefined}validate(t,r){let i;if(typeof t=="string"){i=this.getSchema(t);if(!i)throw new Error(`no schema with key or ref "${t}"`)}else{i=this.compile(t)}const o=i(r);if(!("$async"in i))this.errors=i.errors;return o}compile(t,r){const i=this._addSchema(t,r);return i.validate||this._compileSchemaEnv(i)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function"){throw new Error("options.loadSchema should be a function")}const{loadSchema:i}=this.opts;return runCompileAsync.call(this,t,r);async function runCompileAsync(t,r){await loadMetaSchema.call(this,t.$schema);const i=this._addSchema(t,r);return i.validate||_compileAsync.call(this,i)}async function loadMetaSchema(t){if(t&&!this.getSchema(t)){await runCompileAsync.call(this,{$ref:t},true)}}async function _compileAsync(t){try{return this._compileSchemaEnv(t)}catch(r){if(!(r instanceof l.default))throw r;checkLoaded.call(this,r);await loadMissingSchema.call(this,r.missingSchema);return _compileAsync.call(this,t)}}function checkLoaded({missingSchema:t,missingRef:r}){if(this.refs[t]){throw new Error(`AnySchema ${t} is loaded but ${r} cannot be resolved`)}}async function loadMissingSchema(t){const i=await _loadSchema.call(this,t);if(!this.refs[t])await loadMetaSchema.call(this,i.$schema);if(!this.refs[t])this.addSchema(i,t,r)}async function _loadSchema(t){const r=this._loading[t];if(r)return r;try{return await(this._loading[t]=i(t))}finally{delete this._loading[t]}}}addSchema(t,r,i,o=this.opts.validateSchema){if(Array.isArray(t)){for(const r of t)this.addSchema(r,undefined,i,o);return this}let a;if(typeof t==="object"){const{schemaId:r}=this.opts;a=t[r];if(a!==undefined&&typeof a!="string"){throw new Error(`schema ${r} must be string`)}}r=(0,p.normalizeId)(r||a);this._checkUnique(r);this.schemas[r]=this._addSchema(t,i,r,o,true);return this}addMetaSchema(t,r,i=this.opts.validateSchema){this.addSchema(t,r,true,i);return this}validateSchema(t,r){if(typeof t=="boolean")return true;let i;i=t.$schema;if(i!==undefined&&typeof i!="string"){throw new Error("$schema must be a string")}i=i||this.opts.defaultMeta||this.defaultMeta();if(!i){this.logger.warn("meta-schema not available");this.errors=null;return true}const o=this.validate(i,t);if(!o&&r){const t="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(t);else throw new Error(t)}return o}getSchema(t){let r;while(typeof(r=getSchEnv.call(this,t))=="string")t=r;if(r===undefined){const{schemaId:i}=this.opts;const o=new h.SchemaEnv({schema:{},schemaId:i});r=h.resolveSchema.call(this,o,t);if(!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp){this._removeAllSchemas(this.schemas,t);this._removeAllSchemas(this.refs,t);return this}switch(typeof t){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const r=getSchEnv.call(this,t);if(typeof r=="object")this._cache.delete(r.schema);delete this.schemas[t];delete this.refs[t];return this}case"object":{const r=t;this._cache.delete(r);let i=t[this.opts.schemaId];if(i){i=(0,p.normalizeId)(i);delete this.schemas[i];delete this.refs[i]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const r of t)this.addKeyword(r);return this}addKeyword(t,r){let i;if(typeof t=="string"){i=t;if(typeof r=="object"){this.logger.warn("these parameters are deprecated, see docs for addKeyword");r.keyword=i}}else if(typeof t=="object"&&r===undefined){r=t;i=r.keyword;if(Array.isArray(i)&&!i.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}checkKeyword.call(this,i,r);if(!r){(0,y.eachItem)(i,(t=>addRule.call(this,t)));return this}keywordMetaschema.call(this,r);const o={...r,type:(0,m.getJSONTypes)(r.type),schemaType:(0,m.getJSONTypes)(r.schemaType)};(0,y.eachItem)(i,o.type.length===0?t=>addRule.call(this,t,o):t=>o.type.forEach((r=>addRule.call(this,t,o,r))));return this}getKeyword(t){const r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){const{RULES:r}=this;delete r.keywords[t];delete r.all[t];for(const i of r.rules){const r=i.rules.findIndex((r=>r.keyword===t));if(r>=0)i.rules.splice(r,1)}return this}addFormat(t,r){if(typeof r=="string")r=new RegExp(r);this.formats[t]=r;return this}errorsText(t=this.errors,{separator:r=", ",dataVar:i="data"}={}){if(!t||t.length===0)return"No errors";return t.map((t=>`${i}${t.instancePath} ${t.message}`)).reduce(((t,i)=>t+r+i))}$dataMetaSchema(t,r){const i=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const o of r){const r=o.split("/").slice(1);let a=t;for(const t of r)a=a[t];for(const t in i){const r=i[t];if(typeof r!="object")continue;const{$data:o}=r.definition;const c=a[t];if(o&&c)a[t]=schemaOrData(c)}}return t}_removeAllSchemas(t,r){for(const i in t){const o=t[i];if(!r||r.test(i)){if(typeof o=="string"){delete t[i]}else if(o&&!o.meta){this._cache.delete(o.schema);delete t[i]}}}}_addSchema(t,r,i,o=this.opts.validateSchema,a=this.opts.addUsedSchema){let c;const{schemaId:l}=this.opts;if(typeof t=="object"){c=t[l]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==undefined)return u;i=(0,p.normalizeId)(c||i);const d=p.getSchemaRefs.call(this,t,i);u=new h.SchemaEnv({schema:t,schemaId:l,meta:r,baseId:i,localRefs:d});this._cache.set(u.schema,u);if(a&&!i.startsWith("#")){if(i)this._checkUnique(i);this.refs[i]=u}if(o)this.validateSchema(t,true);return u}_checkUnique(t){if(this.schemas[t]||this.refs[t]){throw new Error(`schema with key or id "${t}" already exists`)}}_compileSchemaEnv(t){if(t.meta)this._compileMetaSchema(t);else h.compileSchema.call(this,t);if(!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const r=this.opts;this.opts=this._metaOpts;try{h.compileSchema.call(this,t)}finally{this.opts=r}}}r["default"]=Ajv;Ajv.ValidationError=c.default;Ajv.MissingRefError=l.default;function checkOptions(t,r,i,o="error"){for(const a in t){const c=a;if(c in r)this.logger[o](`${i}: option ${a}. ${t[c]}`)}}function getSchEnv(t){t=(0,p.normalizeId)(t);return this.schemas[t]||this.refs[t]}function addInitialSchemas(){const t=this.opts.schemas;if(!t)return;if(Array.isArray(t))this.addSchema(t);else for(const r in t)this.addSchema(t[r],r)}function addInitialFormats(){for(const t in this.opts.formats){const r=this.opts.formats[t];if(r)this.addFormat(t,r)}}function addInitialKeywords(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const r in t){const i=t[r];if(!i.keyword)i.keyword=r;this.addKeyword(i)}}function getMetaSchemaOptions(){const t={...this.opts};for(const r of b)delete t[r];return t}const R={log(){},warn(){},error(){}};function getLogger(t){if(t===false)return R;if(t===undefined)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}const P=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(t,r){const{RULES:i}=this;(0,y.eachItem)(t,(t=>{if(i.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!P.test(t))throw new Error(`Keyword ${t} has invalid name`)}));if(!r)return;if(r.$data&&!("code"in r||"validate"in r)){throw new Error('$data keyword must have "code" or "validate" function')}}function addRule(t,r,i){var o;const a=r===null||r===void 0?void 0:r.post;if(i&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:c}=this;let l=a?c.post:c.rules.find((({type:t})=>t===i));if(!l){l={type:i,rules:[]};c.rules.push(l)}c.keywords[t]=true;if(!r)return;const u={keyword:t,definition:{...r,type:(0,m.getJSONTypes)(r.type),schemaType:(0,m.getJSONTypes)(r.schemaType)}};if(r.before)addBeforeRule.call(this,l,u,r.before);else l.rules.push(u);c.all[t]=u;(o=r.implements)===null||o===void 0?void 0:o.forEach((t=>this.addKeyword(t)))}function addBeforeRule(t,r,i){const o=t.rules.findIndex((t=>t.keyword===i));if(o>=0){t.rules.splice(o,0,r)}else{t.rules.push(r);this.logger.warn(`rule ${i} is not defined`)}}function keywordMetaschema(t){let{metaSchema:r}=t;if(r===undefined)return;if(t.$data&&this.opts.$data)r=schemaOrData(r);t.validateSchema=this.compile(r,true)}const $={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(t){return{anyOf:[t,$]}}},4461:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1230);o.code='require("ajv/dist/runtime/equal").default';r["default"]=o},7382:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});function ucs2length(t){const r=t.length;let i=0;let o=0;let a;while(o<r){i++;a=t.charCodeAt(o++);if(a>=55296&&a<=56319&&o<r){a=t.charCodeAt(o);if((a&64512)===56320)o++}}return i}r["default"]=ucs2length;ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},3678:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4856);o.code='require("ajv/dist/runtime/uri").default';r["default"]=o},7091:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});class ValidationError extends Error{constructor(t){super("validation failed");this.errors=t;this.ajv=this.validation=true}}r["default"]=ValidationError},1208:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateAdditionalItems=void 0;const o=i(4598);const a=i(9068);const c={message:({params:{len:t}})=>(0,o.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,o._)`{limit: ${t}}`};const l={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:c,code(t){const{parentSchema:r,it:i}=t;const{items:o}=r;if(!Array.isArray(o)){(0,a.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(t,o)}};function validateAdditionalItems(t,r){const{gen:i,schema:c,data:l,keyword:u,it:h}=t;h.items=true;const d=i.const("len",(0,o._)`${l}.length`);if(c===false){t.setParams({len:r.length});t.pass((0,o._)`${d} <= ${r.length}`)}else if(typeof c=="object"&&!(0,a.alwaysValidSchema)(h,c)){const a=i.var("valid",(0,o._)`${d} <= ${r.length}`);i.if((0,o.not)(a),(()=>validateItems(a)));t.ok(a)}function validateItems(c){i.forRange("i",r.length,d,(r=>{t.subschema({keyword:u,dataProp:r,dataPropType:a.Type.Num},c);if(!h.allErrors)i.if((0,o.not)(c),(()=>i.break()))}))}}r.validateAdditionalItems=validateAdditionalItems;r["default"]=l},3849:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(8572);const a=i(4598);const c=i(1080);const l=i(9068);const u={message:"must NOT have additional properties",params:({params:t})=>(0,a._)`{additionalProperty: ${t.additionalProperty}}`};const h={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:u,code(t){const{gen:r,schema:i,parentSchema:u,data:h,errsCount:d,it:p}=t;if(!d)throw new Error("ajv implementation error");const{allErrors:m,opts:y}=p;p.props=true;if(y.removeAdditional!=="all"&&(0,l.alwaysValidSchema)(p,i))return;const g=(0,o.allSchemaProperties)(u.properties);const v=(0,o.allSchemaProperties)(u.patternProperties);checkAdditionalProperties();t.ok((0,a._)`${d} === ${c.default.errors}`);function checkAdditionalProperties(){r.forIn("key",h,(t=>{if(!g.length&&!v.length)additionalPropertyCode(t);else r.if(isAdditional(t),(()=>additionalPropertyCode(t)))}))}function isAdditional(i){let c;if(g.length>8){const t=(0,l.schemaRefOrVal)(p,u.properties,"properties");c=(0,o.isOwnProperty)(r,t,i)}else if(g.length){c=(0,a.or)(...g.map((t=>(0,a._)`${i} === ${t}`)))}else{c=a.nil}if(v.length){c=(0,a.or)(c,...v.map((r=>(0,a._)`${(0,o.usePattern)(t,r)}.test(${i})`)))}return(0,a.not)(c)}function deleteAdditional(t){r.code((0,a._)`delete ${h}[${t}]`)}function additionalPropertyCode(o){if(y.removeAdditional==="all"||y.removeAdditional&&i===false){deleteAdditional(o);return}if(i===false){t.setParams({additionalProperty:o});t.error();if(!m)r.break();return}if(typeof i=="object"&&!(0,l.alwaysValidSchema)(p,i)){const i=r.name("valid");if(y.removeAdditional==="failing"){applyAdditionalSchema(o,i,false);r.if((0,a.not)(i),(()=>{t.reset();deleteAdditional(o)}))}else{applyAdditionalSchema(o,i);if(!m)r.if((0,a.not)(i),(()=>r.break()))}}}function applyAdditionalSchema(r,i,o){const a={keyword:"additionalProperties",dataProp:r,dataPropType:l.Type.Str};if(o===false){Object.assign(a,{compositeRule:true,createErrors:false,allErrors:false})}t.subschema(a,i)}}};r["default"]=h},2799:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9068);const a={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:i,it:a}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");const c=r.name("valid");i.forEach(((r,i)=>{if((0,o.alwaysValidSchema)(a,r))return;const l=t.subschema({keyword:"allOf",schemaProp:i},c);t.ok(c);t.mergeEvaluated(l)}))}};r["default"]=a},48:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(8572);const a={keyword:"anyOf",schemaType:"array",trackErrors:true,code:o.validateUnion,error:{message:"must match a schema in anyOf"}};r["default"]=a},9152:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c={message:({params:{min:t,max:r}})=>r===undefined?(0,o.str)`must contain at least ${t} valid item(s)`:(0,o.str)`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>r===undefined?(0,o._)`{minContains: ${t}}`:(0,o._)`{minContains: ${t}, maxContains: ${r}}`};const l={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:c,code(t){const{gen:r,schema:i,parentSchema:c,data:l,it:u}=t;let h;let d;const{minContains:p,maxContains:m}=c;if(u.opts.next){h=p===undefined?1:p;d=m}else{h=1}const y=r.const("len",(0,o._)`${l}.length`);t.setParams({min:h,max:d});if(d===undefined&&h===0){(0,a.checkStrictMode)(u,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(d!==undefined&&h>d){(0,a.checkStrictMode)(u,`"minContains" > "maxContains" is always invalid`);t.fail();return}if((0,a.alwaysValidSchema)(u,i)){let r=(0,o._)`${y} >= ${h}`;if(d!==undefined)r=(0,o._)`${r} && ${y} <= ${d}`;t.pass(r);return}u.items=true;const g=r.name("valid");if(d===undefined&&h===1){validateItems(g,(()=>r.if(g,(()=>r.break()))))}else if(h===0){r.let(g,true);if(d!==undefined)r.if((0,o._)`${l}.length > 0`,validateItemsWithCount)}else{r.let(g,false);validateItemsWithCount()}t.result(g,(()=>t.reset()));function validateItemsWithCount(){const t=r.name("_valid");const i=r.let("count",0);validateItems(t,(()=>r.if(t,(()=>checkLimits(i)))))}function validateItems(i,o){r.forRange("i",0,y,(r=>{t.subschema({keyword:"contains",dataProp:r,dataPropType:a.Type.Num,compositeRule:true},i);o()}))}function checkLimits(t){r.code((0,o._)`${t}++`);if(d===undefined){r.if((0,o._)`${t} >= ${h}`,(()=>r.assign(g,true).break()))}else{r.if((0,o._)`${t} > ${d}`,(()=>r.assign(g,false).break()));if(h===1)r.assign(g,true);else r.if((0,o._)`${t} >= ${h}`,(()=>r.assign(g,true)))}}}};r["default"]=l},6569:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const o=i(4598);const a=i(9068);const c=i(8572);r.error={message:({params:{property:t,depsCount:r,deps:i}})=>{const a=r===1?"property":"properties";return(0,o.str)`must have ${a} ${i} when property ${t} is present`},params:({params:{property:t,depsCount:r,deps:i,missingProperty:a}})=>(0,o._)`{property: ${t},
|
|
6
|
+
missingProperty: ${a},
|
|
7
|
+
depsCount: ${r},
|
|
8
|
+
deps: ${i}}`};const l={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(t){const[r,i]=splitDependencies(t);validatePropertyDeps(t,r);validateSchemaDeps(t,i)}};function splitDependencies({schema:t}){const r={};const i={};for(const o in t){if(o==="__proto__")continue;const a=Array.isArray(t[o])?r:i;a[o]=t[o]}return[r,i]}function validatePropertyDeps(t,r=t.schema){const{gen:i,data:a,it:l}=t;if(Object.keys(r).length===0)return;const u=i.let("missing");for(const h in r){const d=r[h];if(d.length===0)continue;const p=(0,c.propertyInData)(i,a,h,l.opts.ownProperties);t.setParams({property:h,depsCount:d.length,deps:d.join(", ")});if(l.allErrors){i.if(p,(()=>{for(const r of d){(0,c.checkReportMissingProp)(t,r)}}))}else{i.if((0,o._)`${p} && (${(0,c.checkMissingProp)(t,d,u)})`);(0,c.reportMissingProp)(t,u);i.else()}}}r.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(t,r=t.schema){const{gen:i,data:o,keyword:l,it:u}=t;const h=i.name("valid");for(const d in r){if((0,a.alwaysValidSchema)(u,r[d]))continue;i.if((0,c.propertyInData)(i,o,d,u.opts.ownProperties),(()=>{const r=t.subschema({keyword:l,schemaProp:d},h);t.mergeValidEvaluated(r,h)}),(()=>i.var(h,true)));t.ok(h)}}r.validateSchemaDeps=validateSchemaDeps;r["default"]=l},4083:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c={message:({params:t})=>(0,o.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,o._)`{failingKeyword: ${t.ifClause}}`};const l={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:c,code(t){const{gen:r,parentSchema:i,it:c}=t;if(i.then===undefined&&i.else===undefined){(0,a.checkStrictMode)(c,'"if" without "then" and "else" is ignored')}const l=hasSchema(c,"then");const u=hasSchema(c,"else");if(!l&&!u)return;const h=r.let("valid",true);const d=r.name("_valid");validateIf();t.reset();if(l&&u){const i=r.let("ifClause");t.setParams({ifClause:i});r.if(d,validateClause("then",i),validateClause("else",i))}else if(l){r.if(d,validateClause("then"))}else{r.if((0,o.not)(d),validateClause("else"))}t.pass(h,(()=>t.error(true)));function validateIf(){const r=t.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},d);t.mergeEvaluated(r)}function validateClause(i,a){return()=>{const c=t.subschema({keyword:i},d);r.assign(h,d);t.mergeValidEvaluated(c,h);if(a)r.assign(a,(0,o._)`${i}`);else t.setParams({ifClause:i})}}}};function hasSchema(t,r){const i=t.schema[r];return i!==undefined&&!(0,a.alwaysValidSchema)(t,i)}r["default"]=l},6500:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1208);const a=i(7335);const c=i(6052);const l=i(3416);const u=i(9152);const h=i(6569);const d=i(2721);const p=i(3849);const m=i(8554);const y=i(5364);const g=i(6930);const v=i(48);const b=i(8067);const w=i(2799);const E=i(4083);const S=i(9405);function getApplicator(t=false){const r=[g.default,v.default,b.default,w.default,E.default,S.default,d.default,p.default,h.default,m.default,y.default];if(t)r.push(a.default,l.default);else r.push(o.default,c.default);r.push(u.default);return r}r["default"]=getApplicator},6052:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateTuple=void 0;const o=i(4598);const a=i(9068);const c=i(8572);const l={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:r,it:i}=t;if(Array.isArray(r))return validateTuple(t,"additionalItems",r);i.items=true;if((0,a.alwaysValidSchema)(i,r))return;t.ok((0,c.validateArray)(t))}};function validateTuple(t,r,i=t.schema){const{gen:c,parentSchema:l,data:u,keyword:h,it:d}=t;checkStrictTuple(l);if(d.opts.unevaluated&&i.length&&d.items!==true){d.items=a.mergeEvaluated.items(c,i.length,d.items)}const p=c.name("valid");const m=c.const("len",(0,o._)`${u}.length`);i.forEach(((r,i)=>{if((0,a.alwaysValidSchema)(d,r))return;c.if((0,o._)`${m} > ${i}`,(()=>t.subschema({keyword:h,schemaProp:i,dataProp:i},p)));t.ok(p)}));function checkStrictTuple(t){const{opts:o,errSchemaPath:c}=d;const l=i.length;const u=l===t.minItems&&(l===t.maxItems||t[r]===false);if(o.strictTuples&&!u){const t=`"${h}" is ${l}-tuple, but minItems or maxItems/${r} are not specified or different at path "${c}"`;(0,a.checkStrictMode)(d,t,o.strictTuples)}}}r.validateTuple=validateTuple;r["default"]=l},3416:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c=i(8572);const l=i(1208);const u={message:({params:{len:t}})=>(0,o.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,o._)`{limit: ${t}}`};const h={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:u,code(t){const{schema:r,parentSchema:i,it:o}=t;const{prefixItems:u}=i;o.items=true;if((0,a.alwaysValidSchema)(o,r))return;if(u)(0,l.validateAdditionalItems)(t,u);else t.ok((0,c.validateArray)(t))}};r["default"]=h},6930:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9068);const a={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(t){const{gen:r,schema:i,it:a}=t;if((0,o.alwaysValidSchema)(a,i)){t.fail();return}const c=r.name("valid");t.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},c);t.failResult(c,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};r["default"]=a},8067:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,o._)`{passingSchemas: ${t.passing}}`};const l={keyword:"oneOf",schemaType:"array",trackErrors:true,error:c,code(t){const{gen:r,schema:i,parentSchema:c,it:l}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");if(l.opts.discriminator&&c.discriminator)return;const u=i;const h=r.let("valid",false);const d=r.let("passing",null);const p=r.name("_valid");t.setParams({passing:d});r.block(validateOneOf);t.result(h,(()=>t.reset()),(()=>t.error(true)));function validateOneOf(){u.forEach(((i,c)=>{let u;if((0,a.alwaysValidSchema)(l,i)){r.var(p,true)}else{u=t.subschema({keyword:"oneOf",schemaProp:c,compositeRule:true},p)}if(c>0){r.if((0,o._)`${p} && ${h}`).assign(h,false).assign(d,(0,o._)`[${d}, ${c}]`).else()}r.if(p,(()=>{r.assign(h,true);r.assign(d,c);if(u)t.mergeEvaluated(u,o.Name)}))}))}}};r["default"]=l},5364:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(8572);const a=i(4598);const c=i(9068);const l=i(9068);const u={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:r,schema:i,data:u,parentSchema:h,it:d}=t;const{opts:p}=d;const m=(0,o.allSchemaProperties)(i);const y=m.filter((t=>(0,c.alwaysValidSchema)(d,i[t])));if(m.length===0||y.length===m.length&&(!d.opts.unevaluated||d.props===true)){return}const g=p.strictSchema&&!p.allowMatchingProperties&&h.properties;const v=r.name("valid");if(d.props!==true&&!(d.props instanceof a.Name)){d.props=(0,l.evaluatedPropsToName)(r,d.props)}const{props:b}=d;validatePatternProperties();function validatePatternProperties(){for(const t of m){if(g)checkMatchingProperties(t);if(d.allErrors){validateProperties(t)}else{r.var(v,true);validateProperties(t);r.if(v)}}}function checkMatchingProperties(t){for(const r in g){if(new RegExp(t).test(r)){(0,c.checkStrictMode)(d,`property ${r} matches pattern ${t} (use allowMatchingProperties)`)}}}function validateProperties(i){r.forIn("key",u,(c=>{r.if((0,a._)`${(0,o.usePattern)(t,i)}.test(${c})`,(()=>{const o=y.includes(i);if(!o){t.subschema({keyword:"patternProperties",schemaProp:i,dataProp:c,dataPropType:l.Type.Str},v)}if(d.opts.unevaluated&&b!==true){r.assign((0,a._)`${b}[${c}]`,true)}else if(!o&&!d.allErrors){r.if((0,a.not)(v),(()=>r.break()))}}))}))}}};r["default"]=u},7335:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6052);const a={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,o.validateTuple)(t,"items")};r["default"]=a},8554:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(6316);const a=i(8572);const c=i(9068);const l=i(3849);const u={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:r,schema:i,parentSchema:u,data:h,it:d}=t;if(d.opts.removeAdditional==="all"&&u.additionalProperties===undefined){l.default.code(new o.KeywordCxt(d,l.default,"additionalProperties"))}const p=(0,a.allSchemaProperties)(i);for(const t of p){d.definedProperties.add(t)}if(d.opts.unevaluated&&p.length&&d.props!==true){d.props=c.mergeEvaluated.props(r,(0,c.toHash)(p),d.props)}const m=p.filter((t=>!(0,c.alwaysValidSchema)(d,i[t])));if(m.length===0)return;const y=r.name("valid");for(const i of m){if(hasDefault(i)){applyPropertySchema(i)}else{r.if((0,a.propertyInData)(r,h,i,d.opts.ownProperties));applyPropertySchema(i);if(!d.allErrors)r.else().var(y,true);r.endIf()}t.it.definedProperties.add(i);t.ok(y)}function hasDefault(t){return d.opts.useDefaults&&!d.compositeRule&&i[t].default!==undefined}function applyPropertySchema(r){t.subschema({keyword:"properties",schemaProp:r,dataProp:r},y)}}};r["default"]=u},2721:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c={message:"property name must be valid",params:({params:t})=>(0,o._)`{propertyName: ${t.propertyName}}`};const l={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:c,code(t){const{gen:r,schema:i,data:c,it:l}=t;if((0,a.alwaysValidSchema)(l,i))return;const u=r.name("valid");r.forIn("key",c,(i=>{t.setParams({propertyName:i});t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:true},u);r.if((0,o.not)(u),(()=>{t.error(true);if(!l.allErrors)r.break()}))}));t.ok(u)}};r["default"]=l},9405:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9068);const a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:i}){if(r.if===undefined)(0,o.checkStrictMode)(i,`"${t}" without "if" is ignored`)}};r["default"]=a},8572:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.validateUnion=r.validateArray=r.usePattern=r.callValidateCode=r.schemaProperties=r.allSchemaProperties=r.noPropertyInData=r.propertyInData=r.isOwnProperty=r.hasPropFunc=r.reportMissingProp=r.checkMissingProp=r.checkReportMissingProp=void 0;const o=i(4598);const a=i(9068);const c=i(1080);const l=i(9068);function checkReportMissingProp(t,r){const{gen:i,data:a,it:c}=t;i.if(noPropertyInData(i,a,r,c.opts.ownProperties),(()=>{t.setParams({missingProperty:(0,o._)`${r}`},true);t.error()}))}r.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen:t,data:r,it:{opts:i}},a,c){return(0,o.or)(...a.map((a=>(0,o.and)(noPropertyInData(t,r,a,i.ownProperties),(0,o._)`${c} = ${a}`))))}r.checkMissingProp=checkMissingProp;function reportMissingProp(t,r){t.setParams({missingProperty:r},true);t.error()}r.reportMissingProp=reportMissingProp;function hasPropFunc(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,o._)`Object.prototype.hasOwnProperty`})}r.hasPropFunc=hasPropFunc;function isOwnProperty(t,r,i){return(0,o._)`${hasPropFunc(t)}.call(${r}, ${i})`}r.isOwnProperty=isOwnProperty;function propertyInData(t,r,i,a){const c=(0,o._)`${r}${(0,o.getProperty)(i)} !== undefined`;return a?(0,o._)`${c} && ${isOwnProperty(t,r,i)}`:c}r.propertyInData=propertyInData;function noPropertyInData(t,r,i,a){const c=(0,o._)`${r}${(0,o.getProperty)(i)} === undefined`;return a?(0,o.or)(c,(0,o.not)(isOwnProperty(t,r,i))):c}r.noPropertyInData=noPropertyInData;function allSchemaProperties(t){return t?Object.keys(t).filter((t=>t!=="__proto__")):[]}r.allSchemaProperties=allSchemaProperties;function schemaProperties(t,r){return allSchemaProperties(r).filter((i=>!(0,a.alwaysValidSchema)(t,r[i])))}r.schemaProperties=schemaProperties;function callValidateCode({schemaCode:t,data:r,it:{gen:i,topSchemaRef:a,schemaPath:l,errorPath:u},it:h},d,p,m){const y=m?(0,o._)`${t}, ${r}, ${a}${l}`:r;const g=[[c.default.instancePath,(0,o.strConcat)(c.default.instancePath,u)],[c.default.parentData,h.parentData],[c.default.parentDataProperty,h.parentDataProperty],[c.default.rootData,c.default.rootData]];if(h.opts.dynamicRef)g.push([c.default.dynamicAnchors,c.default.dynamicAnchors]);const v=(0,o._)`${y}, ${i.object(...g)}`;return p!==o.nil?(0,o._)`${d}.call(${p}, ${v})`:(0,o._)`${d}(${v})`}r.callValidateCode=callValidateCode;const u=(0,o._)`new RegExp`;function usePattern({gen:t,it:{opts:r}},i){const a=r.unicodeRegExp?"u":"";const{regExp:c}=r.code;const h=c(i,a);return t.scopeValue("pattern",{key:h.toString(),ref:h,code:(0,o._)`${c.code==="new RegExp"?u:(0,l.useFunc)(t,c)}(${i}, ${a})`})}r.usePattern=usePattern;function validateArray(t){const{gen:r,data:i,keyword:c,it:l}=t;const u=r.name("valid");if(l.allErrors){const t=r.let("valid",true);validateItems((()=>r.assign(t,false)));return t}r.var(u,true);validateItems((()=>r.break()));return u;function validateItems(l){const h=r.const("len",(0,o._)`${i}.length`);r.forRange("i",0,h,(i=>{t.subschema({keyword:c,dataProp:i,dataPropType:a.Type.Num},u);r.if((0,o.not)(u),l)}))}}r.validateArray=validateArray;function validateUnion(t){const{gen:r,schema:i,keyword:c,it:l}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");const u=i.some((t=>(0,a.alwaysValidSchema)(l,t)));if(u&&!l.opts.unevaluated)return;const h=r.let("valid",false);const d=r.name("_valid");r.block((()=>i.forEach(((i,a)=>{const l=t.subschema({keyword:c,schemaProp:a,compositeRule:true},d);r.assign(h,(0,o._)`${h} || ${d}`);const u=t.mergeValidEvaluated(l,d);if(!u)r.if((0,o.not)(h))}))));t.result(h,(()=>t.reset()),(()=>t.error(true)))}r.validateUnion=validateUnion},4629:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const i={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};r["default"]=i},3488:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4629);const a=i(7133);const c=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",o.default,a.default];r["default"]=c},7133:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.callRef=r.getValidate=void 0;const o=i(3796);const a=i(8572);const c=i(4598);const l=i(1080);const u=i(5444);const h=i(9068);const d={keyword:"$ref",schemaType:"string",code(t){const{gen:r,schema:i,it:a}=t;const{baseId:l,schemaEnv:h,validateName:d,opts:p,self:m}=a;const{root:y}=h;if((i==="#"||i==="#/")&&l===y.baseId)return callRootRef();const g=u.resolveRef.call(m,y,l,i);if(g===undefined)throw new o.default(a.opts.uriResolver,l,i);if(g instanceof u.SchemaEnv)return callValidate(g);return inlineRefSchema(g);function callRootRef(){if(h===y)return callRef(t,d,h,h.$async);const i=r.scopeValue("root",{ref:y});return callRef(t,(0,c._)`${i}.validate`,y,y.$async)}function callValidate(r){const i=getValidate(t,r);callRef(t,i,r,r.$async)}function inlineRefSchema(o){const a=r.scopeValue("schema",p.code.source===true?{ref:o,code:(0,c.stringify)(o)}:{ref:o});const l=r.name("valid");const u=t.subschema({schema:o,dataTypes:[],schemaPath:c.nil,topSchemaRef:a,errSchemaPath:i},l);t.mergeEvaluated(u);t.ok(l)}}};function getValidate(t,r){const{gen:i}=t;return r.validate?i.scopeValue("validate",{ref:r.validate}):(0,c._)`${i.scopeValue("wrapper",{ref:r})}.validate`}r.getValidate=getValidate;function callRef(t,r,i,o){const{gen:u,it:d}=t;const{allErrors:p,schemaEnv:m,opts:y}=d;const g=y.passContext?l.default.this:c.nil;if(o)callAsyncRef();else callSyncRef();function callAsyncRef(){if(!m.$async)throw new Error("async schema referenced by sync schema");const i=u.let("valid");u.try((()=>{u.code((0,c._)`await ${(0,a.callValidateCode)(t,r,g)}`);addEvaluatedFrom(r);if(!p)u.assign(i,true)}),(t=>{u.if((0,c._)`!(${t} instanceof ${d.ValidationError})`,(()=>u.throw(t)));addErrorsFrom(t);if(!p)u.assign(i,false)}));t.ok(i)}function callSyncRef(){t.result((0,a.callValidateCode)(t,r,g),(()=>addEvaluatedFrom(r)),(()=>addErrorsFrom(r)))}function addErrorsFrom(t){const r=(0,c._)`${t}.errors`;u.assign(l.default.vErrors,(0,c._)`${l.default.vErrors} === null ? ${r} : ${l.default.vErrors}.concat(${r})`);u.assign(l.default.errors,(0,c._)`${l.default.vErrors}.length`)}function addEvaluatedFrom(t){var r;if(!d.opts.unevaluated)return;const o=(r=i===null||i===void 0?void 0:i.validate)===null||r===void 0?void 0:r.evaluated;if(d.props!==true){if(o&&!o.dynamicProps){if(o.props!==undefined){d.props=h.mergeEvaluated.props(u,o.props,d.props)}}else{const r=u.var("props",(0,c._)`${t}.evaluated.props`);d.props=h.mergeEvaluated.props(u,r,d.props,c.Name)}}if(d.items!==true){if(o&&!o.dynamicItems){if(o.items!==undefined){d.items=h.mergeEvaluated.items(u,o.items,d.items)}}else{const r=u.var("items",(0,c._)`${t}.evaluated.items`);d.items=h.mergeEvaluated.items(u,r,d.items,c.Name)}}}}r.callRef=callRef;r["default"]=d},263:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(4415);const c=i(5444);const l=i(9068);const u={message:({params:{discrError:t,tagName:r}})=>t===a.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:i}})=>(0,o._)`{error: ${t}, tag: ${i}, tagValue: ${r}}`};const h={keyword:"discriminator",type:"object",schemaType:"object",error:u,code(t){const{gen:r,data:i,schema:u,parentSchema:h,it:d}=t;const{oneOf:p}=h;if(!d.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const m=u.propertyName;if(typeof m!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!p)throw new Error("discriminator: requires oneOf keyword");const y=r.let("valid",false);const g=r.const("tag",(0,o._)`${i}${(0,o.getProperty)(m)}`);r.if((0,o._)`typeof ${g} == "string"`,(()=>validateMapping()),(()=>t.error(false,{discrError:a.DiscrError.Tag,tag:g,tagName:m})));t.ok(y);function validateMapping(){const i=getMapping();r.if(false);for(const t in i){r.elseIf((0,o._)`${g} === ${t}`);r.assign(y,applyTagSchema(i[t]))}r.else();t.error(false,{discrError:a.DiscrError.Mapping,tag:g,tagName:m});r.endIf()}function applyTagSchema(i){const a=r.name("valid");const c=t.subschema({keyword:"oneOf",schemaProp:i},a);t.mergeEvaluated(c,o.Name);return a}function getMapping(){var t;const r={};const i=hasRequired(h);let o=true;for(let r=0;r<p.length;r++){let a=p[r];if((a===null||a===void 0?void 0:a.$ref)&&!(0,l.schemaHasRulesButRef)(a,d.self.RULES)){a=c.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,a===null||a===void 0?void 0:a.$ref);if(a instanceof c.SchemaEnv)a=a.schema}const u=(t=a===null||a===void 0?void 0:a.properties)===null||t===void 0?void 0:t[m];if(typeof u!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${m}"`)}o=o&&(i||hasRequired(a));addMappings(u,r)}if(!o)throw new Error(`discriminator: "${m}" must be required`);return r;function hasRequired({required:t}){return Array.isArray(t)&&t.includes(m)}function addMappings(t,r){if(t.const){addMapping(t.const,r)}else if(t.enum){for(const i of t.enum){addMapping(i,r)}}else{throw new Error(`discriminator: "properties/${m}" must have "const" or "enum"`)}}function addMapping(t,i){if(typeof t!="string"||t in r){throw new Error(`discriminator: "${m}" values must be unique strings`)}r[t]=i}}}};r["default"]=h},4415:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.DiscrError=void 0;var i;(function(t){t["Tag"]="tag";t["Mapping"]="mapping"})(i=r.DiscrError||(r.DiscrError={}))},1002:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3488);const a=i(1076);const c=i(6500);const l=i(655);const u=i(4424);const h=[o.default,a.default,(0,c.default)(),l.default,u.metadataVocabulary,u.contentVocabulary];r["default"]=h},170:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a={message:({schemaCode:t})=>(0,o.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,o._)`{format: ${t}}`};const c={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:a,code(t,r){const{gen:i,data:a,$data:c,schema:l,schemaCode:u,it:h}=t;const{opts:d,errSchemaPath:p,schemaEnv:m,self:y}=h;if(!d.validateFormats)return;if(c)validate$DataFormat();else validateFormat();function validate$DataFormat(){const c=i.scopeValue("formats",{ref:y.formats,code:d.code.formats});const l=i.const("fDef",(0,o._)`${c}[${u}]`);const h=i.let("fType");const p=i.let("format");i.if((0,o._)`typeof ${l} == "object" && !(${l} instanceof RegExp)`,(()=>i.assign(h,(0,o._)`${l}.type || "string"`).assign(p,(0,o._)`${l}.validate`)),(()=>i.assign(h,(0,o._)`"string"`).assign(p,l)));t.fail$data((0,o.or)(unknownFmt(),invalidFmt()));function unknownFmt(){if(d.strictSchema===false)return o.nil;return(0,o._)`${u} && !${p}`}function invalidFmt(){const t=m.$async?(0,o._)`(${l}.async ? await ${p}(${a}) : ${p}(${a}))`:(0,o._)`${p}(${a})`;const i=(0,o._)`(typeof ${p} == "function" ? ${t} : ${p}.test(${a}))`;return(0,o._)`${p} && ${p} !== true && ${h} === ${r} && !${i}`}}function validateFormat(){const c=y.formats[l];if(!c){unknownFormat();return}if(c===true)return;const[u,h,g]=getFormat(c);if(u===r)t.pass(validCondition());function unknownFormat(){if(d.strictSchema===false){y.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${l}" ignored in schema at path "${p}"`}}function getFormat(t){const r=t instanceof RegExp?(0,o.regexpCode)(t):d.code.formats?(0,o._)`${d.code.formats}${(0,o.getProperty)(l)}`:undefined;const a=i.scopeValue("formats",{key:l,ref:t,code:r});if(typeof t=="object"&&!(t instanceof RegExp)){return[t.type||"string",t.validate,(0,o._)`${a}.validate`]}return["string",t,a]}function validCondition(){if(typeof c=="object"&&!(c instanceof RegExp)&&c.async){if(!m.$async)throw new Error("async format in sync schema");return(0,o._)`await ${g}(${a})`}return typeof h=="function"?(0,o._)`${g}(${a})`:(0,o._)`${g}.test(${a})`}}}};r["default"]=c},655:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(170);const a=[o.default];r["default"]=a},4424:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.contentVocabulary=r.metadataVocabulary=void 0;r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7964:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c=i(4461);const l={message:"must be equal to constant",params:({schemaCode:t})=>(0,o._)`{allowedValue: ${t}}`};const u={keyword:"const",$data:true,error:l,code(t){const{gen:r,data:i,$data:l,schemaCode:u,schema:h}=t;if(l||h&&typeof h=="object"){t.fail$data((0,o._)`!${(0,a.useFunc)(r,c.default)}(${i}, ${u})`)}else{t.fail((0,o._)`${h} !== ${i}`)}}};r["default"]=u},3575:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c=i(4461);const l={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,o._)`{allowedValues: ${t}}`};const u={keyword:"enum",schemaType:"array",$data:true,error:l,code(t){const{gen:r,data:i,$data:l,schema:u,schemaCode:h,it:d}=t;if(!l&&u.length===0)throw new Error("enum must have non-empty array");const p=u.length>=d.opts.loopEnum;let m;const getEql=()=>m!==null&&m!==void 0?m:m=(0,a.useFunc)(r,c.default);let y;if(p||l){y=r.let("valid");t.block$data(y,loopEnum)}else{if(!Array.isArray(u))throw new Error("ajv implementation error");const t=r.const("vSchema",h);y=(0,o.or)(...u.map(((r,i)=>equalCode(t,i))))}t.pass(y);function loopEnum(){r.assign(y,false);r.forOf("v",h,(t=>r.if((0,o._)`${getEql()}(${i}, ${t})`,(()=>r.assign(y,true).break()))))}function equalCode(t,r){const a=u[r];return typeof a==="object"&&a!==null?(0,o._)`${getEql()}(${i}, ${t}[${r}])`:(0,o._)`${i} === ${a}`}}};r["default"]=u},1076:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5646);const a=i(6325);const c=i(6976);const l=i(9258);const u=i(4160);const h=i(7177);const d=i(1612);const p=i(7659);const m=i(7964);const y=i(3575);const g=[o.default,a.default,c.default,l.default,u.default,h.default,d.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},m.default,y.default];r["default"]=g},1612:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a={message({keyword:t,schemaCode:r}){const i=t==="maxItems"?"more":"fewer";return(0,o.str)`must NOT have ${i} than ${r} items`},params:({schemaCode:t})=>(0,o._)`{limit: ${t}}`};const c={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:a,code(t){const{keyword:r,data:i,schemaCode:a}=t;const c=r==="maxItems"?o.operators.GT:o.operators.LT;t.fail$data((0,o._)`${i}.length ${c} ${a}`)}};r["default"]=c},6976:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=i(9068);const c=i(7382);const l={message({keyword:t,schemaCode:r}){const i=t==="maxLength"?"more":"fewer";return(0,o.str)`must NOT have ${i} than ${r} characters`},params:({schemaCode:t})=>(0,o._)`{limit: ${t}}`};const u={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:l,code(t){const{keyword:r,data:i,schemaCode:l,it:u}=t;const h=r==="maxLength"?o.operators.GT:o.operators.LT;const d=u.opts.unicode===false?(0,o._)`${i}.length`:(0,o._)`${(0,a.useFunc)(t.gen,c.default)}(${i})`;t.fail$data((0,o._)`${d} ${h} ${l}`)}};r["default"]=u},5646:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a=o.operators;const c={maximum:{okStr:"<=",ok:a.LTE,fail:a.GT},minimum:{okStr:">=",ok:a.GTE,fail:a.LT},exclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},exclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}};const l={message:({keyword:t,schemaCode:r})=>(0,o.str)`must be ${c[t].okStr} ${r}`,params:({keyword:t,schemaCode:r})=>(0,o._)`{comparison: ${c[t].okStr}, limit: ${r}}`};const u={keyword:Object.keys(c),type:"number",schemaType:"number",$data:true,error:l,code(t){const{keyword:r,data:i,schemaCode:a}=t;t.fail$data((0,o._)`${i} ${c[r].fail} ${a} || isNaN(${i})`)}};r["default"]=u},4160:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a={message({keyword:t,schemaCode:r}){const i=t==="maxProperties"?"more":"fewer";return(0,o.str)`must NOT have ${i} than ${r} properties`},params:({schemaCode:t})=>(0,o._)`{limit: ${t}}`};const c={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:a,code(t){const{keyword:r,data:i,schemaCode:a}=t;const c=r==="maxProperties"?o.operators.GT:o.operators.LT;t.fail$data((0,o._)`Object.keys(${i}).length ${c} ${a}`)}};r["default"]=c},6325:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(4598);const a={message:({schemaCode:t})=>(0,o.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,o._)`{multipleOf: ${t}}`};const c={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:a,code(t){const{gen:r,data:i,schemaCode:a,it:c}=t;const l=c.opts.multipleOfPrecision;const u=r.let("res");const h=l?(0,o._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${l}`:(0,o._)`${u} !== parseInt(${u})`;t.fail$data((0,o._)`(${a} === 0 || (${u} = ${i}/${a}, ${h}))`)}};r["default"]=c},9258:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(8572);const a=i(4598);const c={message:({schemaCode:t})=>(0,a.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,a._)`{pattern: ${t}}`};const l={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:c,code(t){const{data:r,$data:i,schema:c,schemaCode:l,it:u}=t;const h=u.opts.unicodeRegExp?"u":"";const d=i?(0,a._)`(new RegExp(${l}, ${h}))`:(0,o.usePattern)(t,c);t.fail$data((0,a._)`!${d}.test(${r})`)}};r["default"]=l},7177:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(8572);const a=i(4598);const c=i(9068);const l={message:({params:{missingProperty:t}})=>(0,a.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,a._)`{missingProperty: ${t}}`};const u={keyword:"required",type:"object",schemaType:"array",$data:true,error:l,code(t){const{gen:r,schema:i,schemaCode:l,data:u,$data:h,it:d}=t;const{opts:p}=d;if(!h&&i.length===0)return;const m=i.length>=p.loopRequired;if(d.allErrors)allErrorsMode();else exitOnErrorMode();if(p.strictRequired){const r=t.parentSchema.properties;const{definedProperties:o}=t.it;for(const t of i){if((r===null||r===void 0?void 0:r[t])===undefined&&!o.has(t)){const r=d.schemaEnv.baseId+d.errSchemaPath;const i=`required property "${t}" is not defined at "${r}" (strictRequired)`;(0,c.checkStrictMode)(d,i,d.opts.strictRequired)}}}function allErrorsMode(){if(m||h){t.block$data(a.nil,loopAllRequired)}else{for(const r of i){(0,o.checkReportMissingProp)(t,r)}}}function exitOnErrorMode(){const a=r.let("missing");if(m||h){const i=r.let("valid",true);t.block$data(i,(()=>loopUntilMissing(a,i)));t.ok(i)}else{r.if((0,o.checkMissingProp)(t,i,a));(0,o.reportMissingProp)(t,a);r.else()}}function loopAllRequired(){r.forOf("prop",l,(i=>{t.setParams({missingProperty:i});r.if((0,o.noPropertyInData)(r,u,i,p.ownProperties),(()=>t.error()))}))}function loopUntilMissing(i,c){t.setParams({missingProperty:i});r.forOf(i,l,(()=>{r.assign(c,(0,o.propertyInData)(r,u,i,p.ownProperties));r.if((0,a.not)(c),(()=>{t.error();r.break()}))}),a.nil)}}};r["default"]=u},7659:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7853);const a=i(4598);const c=i(9068);const l=i(4461);const u={message:({params:{i:t,j:r}})=>(0,a.str)`must NOT have duplicate items (items ## ${r} and ${t} are identical)`,params:({params:{i:t,j:r}})=>(0,a._)`{i: ${t}, j: ${r}}`};const h={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:u,code(t){const{gen:r,data:i,$data:u,schema:h,parentSchema:d,schemaCode:p,it:m}=t;if(!u&&!h)return;const y=r.let("valid");const g=d.items?(0,o.getSchemaTypes)(d.items):[];t.block$data(y,validateUniqueItems,(0,a._)`${p} === false`);t.ok(y);function validateUniqueItems(){const o=r.let("i",(0,a._)`${i}.length`);const c=r.let("j");t.setParams({i:o,j:c});r.assign(y,true);r.if((0,a._)`${o} > 1`,(()=>(canOptimize()?loopN:loopN2)(o,c)))}function canOptimize(){return g.length>0&&!g.some((t=>t==="object"||t==="array"))}function loopN(c,l){const u=r.name("item");const h=(0,o.checkDataTypes)(g,u,m.opts.strictNumbers,o.DataType.Wrong);const d=r.const("indices",(0,a._)`{}`);r.for((0,a._)`;${c}--;`,(()=>{r.let(u,(0,a._)`${i}[${c}]`);r.if(h,(0,a._)`continue`);if(g.length>1)r.if((0,a._)`typeof ${u} == "string"`,(0,a._)`${u} += "_"`);r.if((0,a._)`typeof ${d}[${u}] == "number"`,(()=>{r.assign(l,(0,a._)`${d}[${u}]`);t.error();r.assign(y,false).break()})).code((0,a._)`${d}[${u}] = ${c}`)}))}function loopN2(o,u){const h=(0,c.useFunc)(r,l.default);const d=r.name("outer");r.label(d).for((0,a._)`;${o}--;`,(()=>r.for((0,a._)`${u} = ${o}; ${u}--;`,(()=>r.if((0,a._)`${h}(${i}[${o}], ${i}[${u}])`,(()=>{t.error();r.assign(y,false).break(d)}))))))}}};r["default"]=h},9239:(t,r,i)=>{var o=i(6862);function retry(t,r){function run(i,a){var c=r||{};if(!("randomize"in c)){c.randomize=true}var l=o.operation(c);function bail(t){a(t||new Error("Aborted"))}function onError(t,r){if(t.bail){bail(t);return}if(!l.retry(t)){a(l.mainError())}else if(c.onRetry){c.onRetry(t,r)}}function runAttempt(r){var o;try{o=t(bail,r)}catch(t){onError(t,r);return}Promise.resolve(o).then(i).catch((function catchIt(t){onError(t,r)}))}l.attempt(runAttempt)}return new Promise(run)}t.exports=retry},8383:function(t,r,i){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:true});const a=o(i(2361));function arrayMove(t,r,i,o,a){for(let c=0;c<a;++c){i[c+o]=t[c+r];t[c+r]=void 0}}function pow2AtLeast(t){t=t>>>0;t=t-1;t=t|t>>1;t=t|t>>2;t=t|t>>4;t=t|t>>8;t=t|t>>16;return t+1}function getCapacity(t){return pow2AtLeast(Math.min(Math.max(16,t),1073741824))}class Deque{constructor(t){this._capacity=getCapacity(t);this._length=0;this._front=0;this.arr=[]}push(t){const r=this._length;this.checkCapacity(r+1);const i=this._front+r&this._capacity-1;this.arr[i]=t;this._length=r+1;return r+1}pop(){const t=this._length;if(t===0){return void 0}const r=this._front+t-1&this._capacity-1;const i=this.arr[r];this.arr[r]=void 0;this._length=t-1;return i}shift(){const t=this._length;if(t===0){return void 0}const r=this._front;const i=this.arr[r];this.arr[r]=void 0;this._front=r+1&this._capacity-1;this._length=t-1;return i}get length(){return this._length}checkCapacity(t){if(this._capacity<t){this.resizeTo(getCapacity(this._capacity*1.5+16))}}resizeTo(t){const r=this._capacity;this._capacity=t;const i=this._front;const o=this._length;if(i+o>r){const t=i+o&r-1;arrayMove(this.arr,0,this.arr,r,t)}}}class ReleaseEmitter extends a.default{}function isFn(t){return typeof t==="function"}function defaultInit(){return"1"}class Sema{constructor(t,{initFn:r=defaultInit,pauseFn:i,resumeFn:o,capacity:a=10}={}){if(isFn(i)!==isFn(o)){throw new Error("pauseFn and resumeFn must be both set for pausing")}this.nrTokens=t;this.free=new Deque(t);this.waiting=new Deque(a);this.releaseEmitter=new ReleaseEmitter;this.noTokens=r===defaultInit;this.pauseFn=i;this.resumeFn=o;this.paused=false;this.releaseEmitter.on("release",(t=>{const r=this.waiting.shift();if(r){r.resolve(t)}else{if(this.resumeFn&&this.paused){this.paused=false;this.resumeFn()}this.free.push(t)}}));for(let i=0;i<t;i++){this.free.push(r())}}async acquire(){let t=this.free.pop();if(t!==void 0){return t}return new Promise(((t,r)=>{if(this.pauseFn&&!this.paused){this.paused=true;this.pauseFn()}this.waiting.push({resolve:t,reject:r})}))}release(t){this.releaseEmitter.emit("release",this.noTokens?"1":t)}drain(){const t=new Array(this.nrTokens);for(let r=0;r<this.nrTokens;r++){t[r]=this.acquire()}return Promise.all(t)}nrWaiting(){return this.waiting.length}}r.Sema=Sema;function RateLimit(t,{timeUnit:r=1e3,uniformDistribution:i=false}={}){const o=new Sema(i?1:t);const a=i?r/t:r;return async function rl(){await o.acquire();setTimeout((()=>o.release()),a)}}r.RateLimit=RateLimit},3005:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.NOOP=r.LIMIT_FILES_DESCRIPTORS=r.LIMIT_BASENAME_LENGTH=r.IS_USER_ROOT=r.IS_POSIX=r.DEFAULT_TIMEOUT_SYNC=r.DEFAULT_TIMEOUT_ASYNC=r.DEFAULT_WRITE_OPTIONS=r.DEFAULT_READ_OPTIONS=r.DEFAULT_FOLDER_MODE=r.DEFAULT_FILE_MODE=r.DEFAULT_ENCODING=void 0;const i="utf8";r.DEFAULT_ENCODING=i;const o=438;r.DEFAULT_FILE_MODE=o;const a=511;r.DEFAULT_FOLDER_MODE=a;const c={};r.DEFAULT_READ_OPTIONS=c;const l={};r.DEFAULT_WRITE_OPTIONS=l;const u=5e3;r.DEFAULT_TIMEOUT_ASYNC=u;const h=100;r.DEFAULT_TIMEOUT_SYNC=h;const d=!!process.getuid;r.IS_POSIX=d;const p=process.getuid?!process.getuid():false;r.IS_USER_ROOT=p;const m=128;r.LIMIT_BASENAME_LENGTH=m;const y=1e4;r.LIMIT_FILES_DESCRIPTORS=y;const NOOP=()=>{};r.NOOP=NOOP},3809:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.writeFileSync=r.writeFile=r.readFileSync=r.readFile=void 0;const o=i(1017);const a=i(3005);const c=i(9142);const l=i(3716);const u=i(9063);const h=i(7281);function readFile(t,r=a.DEFAULT_READ_OPTIONS){var i;if(l.default.isString(r))return readFile(t,{encoding:r});const o=Date.now()+((i=r.timeout)!==null&&i!==void 0?i:a.DEFAULT_TIMEOUT_ASYNC);return c.default.readFileRetry(o)(t,r)}r.readFile=readFile;function readFileSync(t,r=a.DEFAULT_READ_OPTIONS){var i;if(l.default.isString(r))return readFileSync(t,{encoding:r});const o=Date.now()+((i=r.timeout)!==null&&i!==void 0?i:a.DEFAULT_TIMEOUT_SYNC);return c.default.readFileSyncRetry(o)(t,r)}r.readFileSync=readFileSync;const writeFile=(t,r,i,o)=>{if(l.default.isFunction(i))return writeFile(t,r,a.DEFAULT_WRITE_OPTIONS,i);const c=writeFileAsync(t,r,i);if(o)c.then(o,o);return c};r.writeFile=writeFile;const writeFileAsync=async(t,r,i=a.DEFAULT_WRITE_OPTIONS)=>{var d;if(l.default.isString(i))return writeFileAsync(t,r,{encoding:i});const p=Date.now()+((d=i.timeout)!==null&&d!==void 0?d:a.DEFAULT_TIMEOUT_ASYNC);let m=null,y=null,g=null,v=null,b=null;try{if(i.schedule)m=await i.schedule(t);y=await u.default.schedule(t);t=await c.default.realpathAttempt(t)||t;[v,g]=h.default.get(t,i.tmpCreate||h.default.create,!(i.tmpPurge===false));const d=a.IS_POSIX&&l.default.isUndefined(i.chown),w=l.default.isUndefined(i.mode);if(d||w){const r=await c.default.statAttempt(t);if(r){i={...i};if(d)i.chown={uid:r.uid,gid:r.gid};if(w)i.mode=r.mode}}const E=o.dirname(t);await c.default.mkdirAttempt(E,{mode:a.DEFAULT_FOLDER_MODE,recursive:true});b=await c.default.openRetry(p)(v,"w",i.mode||a.DEFAULT_FILE_MODE);if(i.tmpCreated)i.tmpCreated(v);if(l.default.isString(r)){await c.default.writeRetry(p)(b,r,0,i.encoding||a.DEFAULT_ENCODING)}else if(!l.default.isUndefined(r)){await c.default.writeRetry(p)(b,r,0,r.length,0)}if(i.fsync!==false){if(i.fsyncWait!==false){await c.default.fsyncRetry(p)(b)}else{c.default.fsyncAttempt(b)}}await c.default.closeRetry(p)(b);b=null;if(i.chown)await c.default.chownAttempt(v,i.chown.uid,i.chown.gid);if(i.mode)await c.default.chmodAttempt(v,i.mode);try{await c.default.renameRetry(p)(v,t)}catch(r){if(r.code!=="ENAMETOOLONG")throw r;await c.default.renameRetry(p)(v,h.default.truncate(t))}g();v=null}finally{if(b)await c.default.closeAttempt(b);if(v)h.default.purge(v);if(m)m();if(y)y()}};const writeFileSync=(t,r,i=a.DEFAULT_WRITE_OPTIONS)=>{var u;if(l.default.isString(i))return writeFileSync(t,r,{encoding:i});const d=Date.now()+((u=i.timeout)!==null&&u!==void 0?u:a.DEFAULT_TIMEOUT_SYNC);let p=null,m=null,y=null;try{t=c.default.realpathSyncAttempt(t)||t;[m,p]=h.default.get(t,i.tmpCreate||h.default.create,!(i.tmpPurge===false));const u=a.IS_POSIX&&l.default.isUndefined(i.chown),g=l.default.isUndefined(i.mode);if(u||g){const r=c.default.statSyncAttempt(t);if(r){i={...i};if(u)i.chown={uid:r.uid,gid:r.gid};if(g)i.mode=r.mode}}const v=o.dirname(t);c.default.mkdirSyncAttempt(v,{mode:a.DEFAULT_FOLDER_MODE,recursive:true});y=c.default.openSyncRetry(d)(m,"w",i.mode||a.DEFAULT_FILE_MODE);if(i.tmpCreated)i.tmpCreated(m);if(l.default.isString(r)){c.default.writeSyncRetry(d)(y,r,0,i.encoding||a.DEFAULT_ENCODING)}else if(!l.default.isUndefined(r)){c.default.writeSyncRetry(d)(y,r,0,r.length,0)}if(i.fsync!==false){if(i.fsyncWait!==false){c.default.fsyncSyncRetry(d)(y)}else{c.default.fsyncAttempt(y)}}c.default.closeSyncRetry(d)(y);y=null;if(i.chown)c.default.chownSyncAttempt(m,i.chown.uid,i.chown.gid);if(i.mode)c.default.chmodSyncAttempt(m,i.mode);try{c.default.renameSyncRetry(d)(m,t)}catch(r){if(r.code!=="ENAMETOOLONG")throw r;c.default.renameSyncRetry(d)(m,h.default.truncate(t))}p();m=null}finally{if(y)c.default.closeSyncAttempt(y);if(m)h.default.purge(m)}};r.writeFileSync=writeFileSync},5352:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.attemptifySync=r.attemptifyAsync=void 0;const o=i(3005);const attemptifyAsync=(t,r=o.NOOP)=>function(){return t.apply(undefined,arguments).catch(r)};r.attemptifyAsync=attemptifyAsync;const attemptifySync=(t,r=o.NOOP)=>function(){try{return t.apply(undefined,arguments)}catch(t){return r(t)}};r.attemptifySync=attemptifySync},9142:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7147);const a=i(3837);const c=i(5352);const l=i(5386);const u=i(5855);const h={chmodAttempt:c.attemptifyAsync(a.promisify(o.chmod),l.default.onChangeError),chownAttempt:c.attemptifyAsync(a.promisify(o.chown),l.default.onChangeError),closeAttempt:c.attemptifyAsync(a.promisify(o.close)),fsyncAttempt:c.attemptifyAsync(a.promisify(o.fsync)),mkdirAttempt:c.attemptifyAsync(a.promisify(o.mkdir)),realpathAttempt:c.attemptifyAsync(a.promisify(o.realpath)),statAttempt:c.attemptifyAsync(a.promisify(o.stat)),unlinkAttempt:c.attemptifyAsync(a.promisify(o.unlink)),closeRetry:u.retryifyAsync(a.promisify(o.close),l.default.isRetriableError),fsyncRetry:u.retryifyAsync(a.promisify(o.fsync),l.default.isRetriableError),openRetry:u.retryifyAsync(a.promisify(o.open),l.default.isRetriableError),readFileRetry:u.retryifyAsync(a.promisify(o.readFile),l.default.isRetriableError),renameRetry:u.retryifyAsync(a.promisify(o.rename),l.default.isRetriableError),statRetry:u.retryifyAsync(a.promisify(o.stat),l.default.isRetriableError),writeRetry:u.retryifyAsync(a.promisify(o.write),l.default.isRetriableError),chmodSyncAttempt:c.attemptifySync(o.chmodSync,l.default.onChangeError),chownSyncAttempt:c.attemptifySync(o.chownSync,l.default.onChangeError),closeSyncAttempt:c.attemptifySync(o.closeSync),mkdirSyncAttempt:c.attemptifySync(o.mkdirSync),realpathSyncAttempt:c.attemptifySync(o.realpathSync),statSyncAttempt:c.attemptifySync(o.statSync),unlinkSyncAttempt:c.attemptifySync(o.unlinkSync),closeSyncRetry:u.retryifySync(o.closeSync,l.default.isRetriableError),fsyncSyncRetry:u.retryifySync(o.fsyncSync,l.default.isRetriableError),openSyncRetry:u.retryifySync(o.openSync,l.default.isRetriableError),readFileSyncRetry:u.retryifySync(o.readFileSync,l.default.isRetriableError),renameSyncRetry:u.retryifySync(o.renameSync,l.default.isRetriableError),statSyncRetry:u.retryifySync(o.statSync,l.default.isRetriableError),writeSyncRetry:u.retryifySync(o.writeSync,l.default.isRetriableError)};r["default"]=h},5386:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3005);const a={isChangeErrorOk:t=>{const{code:r}=t;if(r==="ENOSYS")return true;if(!o.IS_USER_ROOT&&(r==="EINVAL"||r==="EPERM"))return true;return false},isRetriableError:t=>{const{code:r}=t;if(r==="EMFILE"||r==="ENFILE"||r==="EAGAIN"||r==="EBUSY"||r==="EACCESS"||r==="EACCS"||r==="EPERM")return true;return false},onChangeError:t=>{if(a.isChangeErrorOk(t))return;throw t}};r["default"]=a},3716:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const i={isFunction:t=>typeof t==="function",isString:t=>typeof t==="string",isUndefined:t=>typeof t==="undefined"};r["default"]=i},5855:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.retryifySync=r.retryifyAsync=void 0;const o=i(370);const retryifyAsync=(t,r)=>function(i){return function attempt(){return o.default.schedule().then((o=>t.apply(undefined,arguments).then((t=>{o();return t}),(t=>{o();if(Date.now()>=i)throw t;if(r(t)){const t=Math.round(100+400*Math.random()),r=new Promise((r=>setTimeout(r,t)));return r.then((()=>attempt.apply(undefined,arguments)))}throw t}))))}};r.retryifyAsync=retryifyAsync;const retryifySync=(t,r)=>function(i){return function attempt(){try{return t.apply(undefined,arguments)}catch(t){if(Date.now()>i)throw t;if(r(t))return attempt.apply(undefined,arguments);throw t}}};r.retryifySync=retryifySync},370:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(3005);const a={interval:25,intervalId:undefined,limit:o.LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{if(a.intervalId)return;a.intervalId=setInterval(a.tick,a.interval)},reset:()=>{if(!a.intervalId)return;clearInterval(a.intervalId);delete a.intervalId},add:t=>{a.queueWaiting.add(t);if(a.queueActive.size<a.limit/2){a.tick()}else{a.init()}},remove:t=>{a.queueWaiting.delete(t);a.queueActive.delete(t)},schedule:()=>new Promise((t=>{const cleanup=()=>a.remove(resolver);const resolver=()=>t(cleanup);a.add(resolver)})),tick:()=>{if(a.queueActive.size>=a.limit)return;if(!a.queueWaiting.size)return a.reset();for(const t of a.queueWaiting){if(a.queueActive.size>=a.limit)break;a.queueWaiting.delete(t);a.queueActive.add(t);t()}}};r["default"]=a},9063:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const i={};const o={next:t=>{const r=i[t];if(!r)return;r.shift();const a=r[0];if(a){a((()=>o.next(t)))}else{delete i[t]}},schedule:t=>new Promise((r=>{let a=i[t];if(!a)a=i[t]=[];a.push(r);if(a.length>1)return;r((()=>o.next(t)))}))};r["default"]=o},7281:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1017);const a=i(3005);const c=i(9142);const l={store:{},create:t=>{const r=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),i=Date.now().toString().slice(-10),o="tmp-",a=`.${o}${i}${r}`,c=`${t}${a}`;return c},get:(t,r,i=true)=>{const o=l.truncate(r(t));if(o in l.store)return l.get(t,r,i);l.store[o]=i;const disposer=()=>delete l.store[o];return[o,disposer]},purge:t=>{if(!l.store[t])return;delete l.store[t];c.default.unlinkAttempt(t)},purgeSync:t=>{if(!l.store[t])return;delete l.store[t];c.default.unlinkSyncAttempt(t)},purgeSyncAll:()=>{for(const t in l.store){l.purgeSync(t)}},truncate:t=>{const r=o.basename(t);if(r.length<=a.LIMIT_BASENAME_LENGTH)return t;const i=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(r);if(!i)return t;const c=r.length-a.LIMIT_BASENAME_LENGTH;return`${t.slice(0,-r.length)}${i[1]}${i[2].slice(0,-c)}${i[3]}`}};process.on("exit",l.purgeSyncAll);r["default"]=l},8333:(t,r,i)=>{"use strict";const o=i(8137);const a=i(8179);const c=i(3013);const l=i(5719);const braces=(t,r={})=>{let i=[];if(Array.isArray(t)){for(let o of t){let t=braces.create(o,r);if(Array.isArray(t)){i.push(...t)}else{i.push(t)}}}else{i=[].concat(braces.create(t,r))}if(r&&r.expand===true&&r.nodupes===true){i=[...new Set(i)]}return i};braces.parse=(t,r={})=>l(t,r);braces.stringify=(t,r={})=>{if(typeof t==="string"){return o(braces.parse(t,r),r)}return o(t,r)};braces.compile=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}return a(t,r)};braces.expand=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}let i=c(t,r);if(r.noempty===true){i=i.filter(Boolean)}if(r.nodupes===true){i=[...new Set(i)]}return i};braces.create=(t,r={})=>{if(t===""||t.length<3){return[t]}return r.expand!==true?braces.compile(t,r):braces.expand(t,r)};t.exports=braces},8179:(t,r,i)=>{"use strict";const o=i(7783);const a=i(5617);const compile=(t,r={})=>{let walk=(t,i={})=>{let c=a.isInvalidBrace(i);let l=t.invalid===true&&r.escapeInvalid===true;let u=c===true||l===true;let h=r.escapeInvalid===true?"\\":"";let d="";if(t.isOpen===true){return h+t.value}if(t.isClose===true){return h+t.value}if(t.type==="open"){return u?h+t.value:"("}if(t.type==="close"){return u?h+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":u?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){let i=a.reduce(t.nodes);let c=o(...i,{...r,wrap:false,toRegex:true});if(c.length!==0){return i.length>1&&c.length>1?`(${c})`:c}}if(t.nodes){for(let r of t.nodes){d+=walk(r,t)}}return d};return walk(t)};t.exports=compile},5457:t=>{"use strict";t.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},3013:(t,r,i)=>{"use strict";const o=i(7783);const a=i(8137);const c=i(5617);const append=(t="",r="",i=false)=>{let o=[];t=[].concat(t);r=[].concat(r);if(!r.length)return t;if(!t.length){return i?c.flatten(r).map((t=>`{${t}}`)):r}for(let a of t){if(Array.isArray(a)){for(let t of a){o.push(append(t,r,i))}}else{for(let t of r){if(i===true&&typeof t==="string")t=`{${t}}`;o.push(Array.isArray(t)?append(a,t,i):a+t)}}}return c.flatten(o)};const expand=(t,r={})=>{let i=r.rangeLimit===void 0?1e3:r.rangeLimit;let walk=(t,l={})=>{t.queue=[];let u=l;let h=l.queue;while(u.type!=="brace"&&u.type!=="root"&&u.parent){u=u.parent;h=u.queue}if(t.invalid||t.dollar){h.push(append(h.pop(),a(t,r)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){h.push(append(h.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){let l=c.reduce(t.nodes);if(c.exceedsLimit(...l,r.step,i)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let u=o(...l,r);if(u.length===0){u=a(t,r)}h.push(append(h.pop(),u));t.nodes=[];return}let d=c.encloseBrace(t);let p=t.queue;let m=t;while(m.type!=="brace"&&m.type!=="root"&&m.parent){m=m.parent;p=m.queue}for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r];if(i.type==="comma"&&t.type==="brace"){if(r===1)p.push("");p.push("");continue}if(i.type==="close"){h.push(append(h.pop(),p,d));continue}if(i.value&&i.type!=="open"){p.push(append(p.pop(),i.value));continue}if(i.nodes){walk(i,t)}}return p};return c.flatten(walk(t))};t.exports=expand},5719:(t,r,i)=>{"use strict";const o=i(8137);const{MAX_LENGTH:a,CHAR_BACKSLASH:c,CHAR_BACKTICK:l,CHAR_COMMA:u,CHAR_DOT:h,CHAR_LEFT_PARENTHESES:d,CHAR_RIGHT_PARENTHESES:p,CHAR_LEFT_CURLY_BRACE:m,CHAR_RIGHT_CURLY_BRACE:y,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_RIGHT_SQUARE_BRACKET:v,CHAR_DOUBLE_QUOTE:b,CHAR_SINGLE_QUOTE:w,CHAR_NO_BREAK_SPACE:E,CHAR_ZERO_WIDTH_NOBREAK_SPACE:S}=i(5457);const parse=(t,r={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}let i=r||{};let x=typeof i.maxLength==="number"?Math.min(a,i.maxLength):a;if(t.length>x){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${x})`)}let R={type:"root",input:t,nodes:[]};let P=[R];let $=R;let O=R;let T=0;let A=t.length;let C=0;let k=0;let I;let N={};const advance=()=>t[C++];const push=t=>{if(t.type==="text"&&O.type==="dot"){O.type="text"}if(O&&O.type==="text"&&t.type==="text"){O.value+=t.value;return}$.nodes.push(t);t.parent=$;t.prev=O;O=t;return t};push({type:"bos"});while(C<A){$=P[P.length-1];I=advance();if(I===S||I===E){continue}if(I===c){push({type:"text",value:(r.keepEscaping?I:"")+advance()});continue}if(I===v){push({type:"text",value:"\\"+I});continue}if(I===g){T++;let t=true;let r;while(C<A&&(r=advance())){I+=r;if(r===g){T++;continue}if(r===c){I+=advance();continue}if(r===v){T--;if(T===0){break}}}push({type:"text",value:I});continue}if(I===d){$=push({type:"paren",nodes:[]});P.push($);push({type:"text",value:I});continue}if(I===p){if($.type!=="paren"){push({type:"text",value:I});continue}$=P.pop();push({type:"text",value:I});$=P[P.length-1];continue}if(I===b||I===w||I===l){let t=I;let i;if(r.keepQuotes!==true){I=""}while(C<A&&(i=advance())){if(i===c){I+=i+advance();continue}if(i===t){if(r.keepQuotes===true)I+=i;break}I+=i}push({type:"text",value:I});continue}if(I===m){k++;let t=O.value&&O.value.slice(-1)==="$"||$.dollar===true;let r={type:"brace",open:true,close:false,dollar:t,depth:k,commas:0,ranges:0,nodes:[]};$=push(r);P.push($);push({type:"open",value:I});continue}if(I===y){if($.type!=="brace"){push({type:"text",value:I});continue}let t="close";$=P.pop();$.close=true;push({type:t,value:I});k--;$=P[P.length-1];continue}if(I===u&&k>0){if($.ranges>0){$.ranges=0;let t=$.nodes.shift();$.nodes=[t,{type:"text",value:o($)}]}push({type:"comma",value:I});$.commas++;continue}if(I===h&&k>0&&$.commas===0){let t=$.nodes;if(k===0||t.length===0){push({type:"text",value:I});continue}if(O.type==="dot"){$.range=[];O.value+=I;O.type="range";if($.nodes.length!==3&&$.nodes.length!==5){$.invalid=true;$.ranges=0;O.type="text";continue}$.ranges++;$.args=[];continue}if(O.type==="range"){t.pop();let r=t[t.length-1];r.value+=O.value+I;O=r;$.ranges--;continue}push({type:"dot",value:I});continue}push({type:"text",value:I})}do{$=P.pop();if($.type!=="root"){$.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));let t=P[P.length-1];let r=t.nodes.indexOf($);t.nodes.splice(r,1,...$.nodes)}}while(P.length>0);push({type:"eos"});return R};t.exports=parse},8137:(t,r,i)=>{"use strict";const o=i(5617);t.exports=(t,r={})=>{let stringify=(t,i={})=>{let a=r.escapeInvalid&&o.isInvalidBrace(i);let c=t.invalid===true&&r.escapeInvalid===true;let l="";if(t.value){if((a||c)&&o.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(let r of t.nodes){l+=stringify(r)}}return l};return stringify(t)}},5617:(t,r)=>{"use strict";r.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};r.find=(t,r)=>t.nodes.find((t=>t.type===r));r.exceedsLimit=(t,i,o=1,a)=>{if(a===false)return false;if(!r.isInteger(t)||!r.isInteger(i))return false;return(Number(i)-Number(t))/Number(o)>=a};r.escapeNode=(t,r=0,i)=>{let o=t.nodes[r];if(!o)return;if(i&&o.type===i||o.type==="open"||o.type==="close"){if(o.escaped!==true){o.value="\\"+o.value;o.escaped=true}}};r.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};r.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};r.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};r.reduce=t=>t.reduce(((t,r)=>{if(r.type==="text")t.push(r.value);if(r.type==="range")r.type="text";return t}),[]);r.flatten=(...t)=>{const r=[];const flat=t=>{for(let i=0;i<t.length;i++){let o=t[i];Array.isArray(o)?flat(o,r):o!==void 0&&r.push(o)}return r};flat(t);return r}},2975:(t,r,i)=>{"use strict";const o=i(7147);const a=i(1017);const c=o.lchown?"lchown":"chown";const l=o.lchownSync?"lchownSync":"chownSync";const u=o.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/);const lchownSync=(t,r,i)=>{try{return o[l](t,r,i)}catch(t){if(t.code!=="ENOENT")throw t}};const chownSync=(t,r,i)=>{try{return o.chownSync(t,r,i)}catch(t){if(t.code!=="ENOENT")throw t}};const h=u?(t,r,i,a)=>c=>{if(!c||c.code!=="EISDIR")a(c);else o.chown(t,r,i,a)}:(t,r,i,o)=>o;const d=u?(t,r,i)=>{try{return lchownSync(t,r,i)}catch(o){if(o.code!=="EISDIR")throw o;chownSync(t,r,i)}}:(t,r,i)=>lchownSync(t,r,i);const p=process.version;let readdir=(t,r,i)=>o.readdir(t,r,i);let readdirSync=(t,r)=>o.readdirSync(t,r);if(/^v4\./.test(p))readdir=(t,r,i)=>o.readdir(t,i);const chown=(t,r,i,a)=>{o[c](t,r,i,h(t,r,i,(t=>{a(t&&t.code!=="ENOENT"?t:null)})))};const chownrKid=(t,r,i,c,l)=>{if(typeof r==="string")return o.lstat(a.resolve(t,r),((o,a)=>{if(o)return l(o.code!=="ENOENT"?o:null);a.name=r;chownrKid(t,a,i,c,l)}));if(r.isDirectory()){chownr(a.resolve(t,r.name),i,c,(o=>{if(o)return l(o);const u=a.resolve(t,r.name);chown(u,i,c,l)}))}else{const o=a.resolve(t,r.name);chown(o,i,c,l)}};const chownr=(t,r,i,o)=>{readdir(t,{withFileTypes:true},((a,c)=>{if(a){if(a.code==="ENOENT")return o();else if(a.code!=="ENOTDIR"&&a.code!=="ENOTSUP")return o(a)}if(a||!c.length)return chown(t,r,i,o);let l=c.length;let u=null;const then=a=>{if(u)return;if(a)return o(u=a);if(--l===0)return chown(t,r,i,o)};c.forEach((o=>chownrKid(t,o,r,i,then)))}))};const chownrKidSync=(t,r,i,c)=>{if(typeof r==="string"){try{const i=o.lstatSync(a.resolve(t,r));i.name=r;r=i}catch(t){if(t.code==="ENOENT")return;else throw t}}if(r.isDirectory())chownrSync(a.resolve(t,r.name),i,c);d(a.resolve(t,r.name),i,c)};const chownrSync=(t,r,i)=>{let o;try{o=readdirSync(t,{withFileTypes:true})}catch(o){if(o.code==="ENOENT")return;else if(o.code==="ENOTDIR"||o.code==="ENOTSUP")return d(t,r,i);else throw o}if(o&&o.length)o.forEach((o=>chownrKidSync(t,o,r,i)));return d(t,r,i)};t.exports=chownr;chownr.sync=chownrSync},4101:(t,r,i)=>{var o=i(2361).EventEmitter;var a=i(2081).spawn;var c=i(1017);var l=c.dirname;var u=c.basename;var h=i(7147);i(3837).inherits(Command,o);r=t.exports=new Command;r.Command=Command;r.Option=Option;function Option(t,r){this.flags=t;this.required=t.indexOf("<")>=0;this.optional=t.indexOf("[")>=0;this.bool=t.indexOf("-no-")===-1;t=t.split(/[ ,|]+/);if(t.length>1&&!/^[[<]/.test(t[1]))this.short=t.shift();this.long=t.shift();this.description=r||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(t){return this.short===t||this.long===t};function Command(t){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=t||""}Command.prototype.command=function(t,r,i){if(typeof r==="object"&&r!==null){i=r;r=null}i=i||{};var o=t.split(/ +/);var a=new Command(o.shift());if(r){a.description(r);this.executables=true;this._execs[a._name]=true;if(i.isDefault)this.defaultExecutable=a._name}a._noHelp=!!i.noHelp;this.commands.push(a);a.parseExpectedArgs(o);a.parent=this;if(r)return this;return a};Command.prototype.arguments=function(t){return this.parseExpectedArgs(t.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(t){if(!t.length)return;var r=this;t.forEach((function(t){var i={required:false,name:"",variadic:false};switch(t[0]){case"<":i.required=true;i.name=t.slice(1,-1);break;case"[":i.name=t.slice(1,-1);break}if(i.name.length>3&&i.name.slice(-3)==="..."){i.variadic=true;i.name=i.name.slice(0,-3)}if(i.name){r._args.push(i)}}));return this};Command.prototype.action=function(t){var r=this;var listener=function(i,o){i=i||[];o=o||[];var a=r.parseOptions(o);outputHelpIfNecessary(r,a.unknown);if(a.unknown.length>0){r.unknownOption(a.unknown[0])}if(a.args.length)i=a.args.concat(i);r._args.forEach((function(t,o){if(t.required&&i[o]==null){r.missingArgument(t.name)}else if(t.variadic){if(o!==r._args.length-1){r.variadicArgNotLast(t.name)}i[o]=i.splice(o)}}));if(r._args.length){i[r._args.length]=r}else{i.push(r)}t.apply(r,i)};var i=this.parent||this;var o=i===this?"*":this._name;i.on("command:"+o,listener);if(this._alias)i.on("command:"+this._alias,listener);return this};Command.prototype.option=function(t,r,i,o){var a=this,c=new Option(t,r),l=c.name(),u=c.attributeName();if(typeof i!=="function"){if(i instanceof RegExp){var h=i;i=function(t,r){var i=h.exec(t);return i?i[0]:r}}else{o=i;i=null}}if(!c.bool||c.optional||c.required){if(!c.bool)o=true;if(o!==undefined){a[u]=o;c.defaultValue=o}}this.options.push(c);this.on("option:"+l,(function(t){if(t!==null&&i){t=i(t,a[u]===undefined?o:a[u])}if(typeof a[u]==="boolean"||typeof a[u]==="undefined"){if(t==null){a[u]=c.bool?o||true:false}else{a[u]=t}}else if(t!==null){a[u]=t}}));return this};Command.prototype.allowUnknownOption=function(t){this._allowUnknownOption=arguments.length===0||t;return this};Command.prototype.parse=function(t){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=t;this._name=this._name||u(t[1],".js");if(this.executables&&t.length<3&&!this.defaultExecutable){t.push("--help")}var r=this.parseOptions(this.normalize(t.slice(2)));var i=this.args=r.args;var o=this.parseArgs(this.args,r.unknown);var a=o.args[0];var c=null;if(a){c=this.commands.filter((function(t){return t.alias()===a}))[0]}if(this._execs[a]&&typeof this._execs[a]!=="function"){return this.executeSubCommand(t,i,r.unknown)}else if(c){i[0]=c._name;return this.executeSubCommand(t,i,r.unknown)}else if(this.defaultExecutable){i.unshift(this.defaultExecutable);return this.executeSubCommand(t,i,r.unknown)}return o};Command.prototype.executeSubCommand=function(t,r,i){r=r.concat(i);if(!r.length)this.help();if(r[0]==="help"&&r.length===1)this.help();if(r[0]==="help"){r[0]=r[1];r[1]="--help"}var o=t[1];var d=u(o,c.extname(o))+"-"+r[0];var p;var m=h.realpathSync(o);p=l(m);var y=c.join(p,d);var g=false;if(exists(y+".js")){d=y+".js";g=true}else if(exists(y+".ts")){d=y+".ts";g=true}else if(exists(y)){d=y}r=r.slice(1);var v;if(process.platform!=="win32"){if(g){r.unshift(d);r=(process.execArgv||[]).concat(r);v=a(process.argv[0],r,{stdio:"inherit",customFds:[0,1,2]})}else{v=a(d,r,{stdio:"inherit",customFds:[0,1,2]})}}else{r.unshift(d);v=a(process.execPath,r,{stdio:"inherit"})}var b=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];b.forEach((function(t){process.on(t,(function(){if(v.killed===false&&v.exitCode===null){v.kill(t)}}))}));v.on("close",process.exit.bind(process));v.on("error",(function(t){if(t.code==="ENOENT"){console.error("error: %s(1) does not exist, try --help",d)}else if(t.code==="EACCES"){console.error("error: %s(1) not executable. try chmod or run with root",d)}process.exit(1)}));this.runningCommand=v};Command.prototype.normalize=function(t){var r=[],i,o,a;for(var c=0,l=t.length;c<l;++c){i=t[c];if(c>0){o=this.optionFor(t[c-1])}if(i==="--"){r=r.concat(t.slice(c));break}else if(o&&o.required){r.push(i)}else if(i.length>1&&i[0]==="-"&&i[1]!=="-"){i.slice(1).split("").forEach((function(t){r.push("-"+t)}))}else if(/^--/.test(i)&&~(a=i.indexOf("="))){r.push(i.slice(0,a),i.slice(a+1))}else{r.push(i)}}return r};Command.prototype.parseArgs=function(t,r){var i;if(t.length){i=t[0];if(this.listeners("command:"+i).length){this.emit("command:"+t.shift(),t,r)}else{this.emit("command:*",t)}}else{outputHelpIfNecessary(this,r);if(r.length>0){this.unknownOption(r[0])}if(this.commands.length===0&&this._args.filter((function(t){return t.required})).length===0){this.emit("command:*")}}return this};Command.prototype.optionFor=function(t){for(var r=0,i=this.options.length;r<i;++r){if(this.options[r].is(t)){return this.options[r]}}};Command.prototype.parseOptions=function(t){var r=[],i=t.length,o,a,c;var l=[];for(var u=0;u<i;++u){c=t[u];if(o){r.push(c);continue}if(c==="--"){o=true;continue}a=this.optionFor(c);if(a){if(a.required){c=t[++u];if(c==null)return this.optionMissingArgument(a);this.emit("option:"+a.name(),c)}else if(a.optional){c=t[u+1];if(c==null||c[0]==="-"&&c!=="-"){c=null}else{++u}this.emit("option:"+a.name(),c)}else{this.emit("option:"+a.name())}continue}if(c.length>1&&c[0]==="-"){l.push(c);if(u+1<t.length&&t[u+1][0]!=="-"){l.push(t[++u])}continue}r.push(c)}return{args:r,unknown:l}};Command.prototype.opts=function(){var t={},r=this.options.length;for(var i=0;i<r;i++){var o=this.options[i].attributeName();t[o]=o===this._versionOptionName?this._version:this[o]}return t};Command.prototype.missingArgument=function(t){console.error("error: missing required argument `%s'",t);process.exit(1)};Command.prototype.optionMissingArgument=function(t,r){if(r){console.error("error: option `%s' argument missing, got `%s'",t.flags,r)}else{console.error("error: option `%s' argument missing",t.flags)}process.exit(1)};Command.prototype.unknownOption=function(t){if(this._allowUnknownOption)return;console.error("error: unknown option `%s'",t);process.exit(1)};Command.prototype.variadicArgNotLast=function(t){console.error("error: variadic arguments must be last `%s'",t);process.exit(1)};Command.prototype.version=function(t,r){if(arguments.length===0)return this._version;this._version=t;r=r||"-V, --version";var i=new Option(r,"output the version number");this._versionOptionName=i.long.substr(2)||"version";this.options.push(i);this.on("option:"+this._versionOptionName,(function(){process.stdout.write(t+"\n");process.exit(0)}));return this};Command.prototype.description=function(t,r){if(arguments.length===0)return this._description;this._description=t;this._argsDescription=r;return this};Command.prototype.alias=function(t){var r=this;if(this.commands.length!==0){r=this.commands[this.commands.length-1]}if(arguments.length===0)return r._alias;if(t===r._name)throw new Error("Command alias can't be the same as its name");r._alias=t;return this};Command.prototype.usage=function(t){var r=this._args.map((function(t){return humanReadableArgName(t)}));var i="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+r.join(" "):"");if(arguments.length===0)return this._usage||i;this._usage=t;return this};Command.prototype.name=function(t){if(arguments.length===0)return this._name;this._name=t;return this};Command.prototype.prepareCommands=function(){return this.commands.filter((function(t){return!t._noHelp})).map((function(t){var r=t._args.map((function(t){return humanReadableArgName(t)})).join(" ");return[t._name+(t._alias?"|"+t._alias:"")+(t.options.length?" [options]":"")+(r?" "+r:""),t._description]}))};Command.prototype.largestCommandLength=function(){var t=this.prepareCommands();return t.reduce((function(t,r){return Math.max(t,r[0].length)}),0)};Command.prototype.largestOptionLength=function(){var t=[].slice.call(this.options);t.push({flags:"-h, --help"});return t.reduce((function(t,r){return Math.max(t,r.flags.length)}),0)};Command.prototype.largestArgLength=function(){return this._args.reduce((function(t,r){return Math.max(t,r.name.length)}),0)};Command.prototype.padWidth=function(){var t=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>t){t=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>t){t=this.largestCommandLength()}}return t};Command.prototype.optionHelp=function(){var t=this.padWidth();return this.options.map((function(r){return pad(r.flags,t)+" "+r.description+(r.bool&&r.defaultValue!==undefined?" (default: "+JSON.stringify(r.defaultValue)+")":"")})).concat([pad("-h, --help",t)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var t=this.prepareCommands();var r=this.padWidth();return["Commands:",t.map((function(t){var i=t[1]?" "+t[1]:"";return(i?pad(t[0],r):t[0])+i})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var t=[];if(this._description){t=[this._description,""];var r=this._argsDescription;if(r&&this._args.length){var i=this.padWidth();t.push("Arguments:");t.push("");this._args.forEach((function(o){t.push(" "+pad(o.name,i)+" "+r[o.name])}));t.push("")}}var o=this._name;if(this._alias){o=o+"|"+this._alias}var a=["Usage: "+o+" "+this.usage(),""];var c=[];var l=this.commandHelp();if(l)c=[l];var u=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return a.concat(t).concat(u).concat(c).join("\n")};Command.prototype.outputHelp=function(t){if(!t){t=function(t){return t}}process.stdout.write(t(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(t){this.outputHelp(t);process.exit()};function camelcase(t){return t.split("-").reduce((function(t,r){return t+r[0].toUpperCase()+r.slice(1)}))}function pad(t,r){var i=Math.max(0,r-t.length);return t+Array(i+1).join(" ")}function outputHelpIfNecessary(t,r){r=r||[];for(var i=0;i<r.length;i++){if(r[i]==="--help"||r[i]==="-h"){t.outputHelp();process.exit(0)}}}function humanReadableArgName(t){var r=t.name+(t.variadic===true?"...":"");return t.required?"<"+r+">":"["+r+"]"}function exists(t){try{if(h.statSync(t).isFile()){return true}}catch(t){return false}}},7136:function(t,r,i){"use strict";t=i.nmd(t);var o=this&&this.__classPrivateFieldSet||function(t,r,i,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof r==="function"?t!==r||!a:!r.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,i):a?a.value=i:r.set(t,i),i};var a=this&&this.__classPrivateFieldGet||function(t,r,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof r==="function"?t!==r||!o:!r.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:r.get(t)};var c,l;var u,h,d,p;Object.defineProperty(r,"__esModule",{value:true});const m=i(3837);const y=i(7147);const g=i(1017);const v=i(6113);const b=i(9491);const w=i(2361);const E=i(6006);const S=i(990);const x=i(4263);const R=i(3809);const P=i(7265);const $=i(4525);const O=i(5399);const T=i(1452);const A=i(3430);const C="aes-256-cbc";const createPlainObject=()=>Object.create(null);const isExist=t=>t!==undefined&&t!==null;let k="";try{delete require.cache[__filename];k=g.dirname((l=(c=t.parent)===null||c===void 0?void 0:c.filename)!==null&&l!==void 0?l:".")}catch(t){}const checkValueType=(t,r)=>{const i=new Set(["undefined","symbol","function"]);const o=typeof r;if(i.has(o)){throw new TypeError(`Setting a value of type \`${o}\` for key \`${t}\` is not allowed as it's not supported by JSON`)}};const I="__internal__";const N=`${I}.migrations.version`;class Conf{constructor(t={}){var r;u.set(this,void 0);h.set(this,void 0);d.set(this,void 0);p.set(this,{});this._deserialize=t=>JSON.parse(t);this._serialize=t=>JSON.stringify(t,undefined,"\t");const i={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:false,accessPropertiesByDotNotation:true,configFileMode:438,...t};const c=A((()=>{const t=S.sync({cwd:k});const r=t&&JSON.parse(y.readFileSync(t,"utf8"));return r!==null&&r!==void 0?r:{}}));if(!i.cwd){if(!i.projectName){i.projectName=c().name}if(!i.projectName){throw new Error("Project name could not be inferred. Please specify the `projectName` option.")}i.cwd=x(i.projectName,{suffix:i.projectSuffix}).config}o(this,d,i,"f");if(i.schema){if(typeof i.schema!=="object"){throw new TypeError("The `schema` option must be an object.")}const t=new P.default({allErrors:true,useDefaults:true});(0,$.default)(t);const r={type:"object",properties:i.schema};o(this,u,t.compile(r),"f");for(const[t,r]of Object.entries(i.schema)){if(r===null||r===void 0?void 0:r.default){a(this,p,"f")[t]=r.default}}}if(i.defaults){o(this,p,{...a(this,p,"f"),...i.defaults},"f")}if(i.serialize){this._serialize=i.serialize}if(i.deserialize){this._deserialize=i.deserialize}this.events=new w.EventEmitter;o(this,h,i.encryptionKey,"f");const l=i.fileExtension?`.${i.fileExtension}`:"";this.path=g.resolve(i.cwd,`${(r=i.configName)!==null&&r!==void 0?r:"config"}${l}`);const m=this.store;const v=Object.assign(createPlainObject(),i.defaults,m);this._validate(v);try{b.deepEqual(m,v)}catch(t){this.store=v}if(i.watch){this._watch()}if(i.migrations){if(!i.projectVersion){i.projectVersion=c().version}if(!i.projectVersion){throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.")}this._migrate(i.migrations,i.projectVersion,i.beforeEachMigration)}}get(t,r){if(a(this,d,"f").accessPropertiesByDotNotation){return this._get(t,r)}const{store:i}=this;return t in i?i[t]:r}set(t,r){if(typeof t!=="string"&&typeof t!=="object"){throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof t}`)}if(typeof t!=="object"&&r===undefined){throw new TypeError("Use `delete()` to clear values")}if(this._containsReservedKey(t)){throw new TypeError(`Please don't use the ${I} key, as it's used to manage this module internal operations.`)}const{store:i}=this;const set=(t,r)=>{checkValueType(t,r);if(a(this,d,"f").accessPropertiesByDotNotation){E.set(i,t,r)}else{i[t]=r}};if(typeof t==="object"){const r=t;for(const[t,i]of Object.entries(r)){set(t,i)}}else{set(t,r)}this.store=i}has(t){if(a(this,d,"f").accessPropertiesByDotNotation){return E.has(this.store,t)}return t in this.store}reset(...t){for(const r of t){if(isExist(a(this,p,"f")[r])){this.set(r,a(this,p,"f")[r])}}}delete(t){const{store:r}=this;if(a(this,d,"f").accessPropertiesByDotNotation){E.delete(r,t)}else{delete r[t]}this.store=r}clear(){this.store=createPlainObject();for(const t of Object.keys(a(this,p,"f"))){this.reset(t)}}onDidChange(t,r){if(typeof t!=="string"){throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof t}`)}if(typeof r!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof r}`)}return this._handleChange((()=>this.get(t)),r)}onDidAnyChange(t){if(typeof t!=="function"){throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`)}return this._handleChange((()=>this.store),t)}get size(){return Object.keys(this.store).length}get store(){try{const t=y.readFileSync(this.path,a(this,h,"f")?null:"utf8");const r=this._encryptData(t);const i=this._deserialize(r);this._validate(i);return Object.assign(createPlainObject(),i)}catch(t){if((t===null||t===void 0?void 0:t.code)==="ENOENT"){this._ensureDirectory();return createPlainObject()}if(a(this,d,"f").clearInvalidConfig&&t.name==="SyntaxError"){return createPlainObject()}throw t}}set store(t){this._ensureDirectory();this._validate(t);this._write(t);this.events.emit("change")}*[(u=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,Symbol.iterator)](){for(const[t,r]of Object.entries(this.store)){yield[t,r]}}_encryptData(t){if(!a(this,h,"f")){return t.toString()}try{if(a(this,h,"f")){try{if(t.slice(16,17).toString()===":"){const r=t.slice(0,16);const i=v.pbkdf2Sync(a(this,h,"f"),r.toString(),1e4,32,"sha512");const o=v.createDecipheriv(C,i,r);t=Buffer.concat([o.update(Buffer.from(t.slice(17))),o.final()]).toString("utf8")}else{const r=v.createDecipher(C,a(this,h,"f"));t=Buffer.concat([r.update(Buffer.from(t)),r.final()]).toString("utf8")}}catch(t){}}}catch(t){}return t.toString()}_handleChange(t,r){let i=t();const onChange=()=>{const o=i;const a=t();if((0,m.isDeepStrictEqual)(a,o)){return}i=a;r.call(this,a,o)};this.events.on("change",onChange);return()=>this.events.removeListener("change",onChange)}_validate(t){if(!a(this,u,"f")){return}const r=a(this,u,"f").call(this,t);if(r||!a(this,u,"f").errors){return}const i=a(this,u,"f").errors.map((({instancePath:t,message:r=""})=>`\`${t.slice(1)}\` ${r}`));throw new Error("Config schema violation: "+i.join("; "))}_ensureDirectory(){y.mkdirSync(g.dirname(this.path),{recursive:true})}_write(t){let r=this._serialize(t);if(a(this,h,"f")){const t=v.randomBytes(16);const i=v.pbkdf2Sync(a(this,h,"f"),t.toString(),1e4,32,"sha512");const o=v.createCipheriv(C,i,t);r=Buffer.concat([t,Buffer.from(":"),o.update(Buffer.from(r)),o.final()])}if(process.env.SNAP){y.writeFileSync(this.path,r,{mode:a(this,d,"f").configFileMode})}else{try{R.writeFileSync(this.path,r,{mode:a(this,d,"f").configFileMode})}catch(t){if((t===null||t===void 0?void 0:t.code)==="EXDEV"){y.writeFileSync(this.path,r,{mode:a(this,d,"f").configFileMode});return}throw t}}}_watch(){this._ensureDirectory();if(!y.existsSync(this.path)){this._write(createPlainObject())}if(process.platform==="win32"){y.watch(this.path,{persistent:false},O((()=>{this.events.emit("change")}),{wait:100}))}else{y.watchFile(this.path,{persistent:false},O((()=>{this.events.emit("change")}),{wait:5e3}))}}_migrate(t,r,i){let o=this._get(N,"0.0.0");const a=Object.keys(t).filter((t=>this._shouldPerformMigration(t,o,r)));let c={...this.store};for(const l of a){try{if(i){i(this,{fromVersion:o,toVersion:l,finalVersion:r,versions:a})}const u=t[l];u(this);this._set(N,l);o=l;c={...this.store}}catch(t){this.store=c;throw new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${t}`)}}if(this._isVersionInRangeFormat(o)||!T.eq(o,r)){this._set(N,r)}}_containsReservedKey(t){if(typeof t==="object"){const r=Object.keys(t)[0];if(r===I){return true}}if(typeof t!=="string"){return false}if(a(this,d,"f").accessPropertiesByDotNotation){if(t.startsWith(`${I}.`)){return true}return false}return false}_isVersionInRangeFormat(t){return T.clean(t)===null}_shouldPerformMigration(t,r,i){if(this._isVersionInRangeFormat(t)){if(r!=="0.0.0"&&T.satisfies(r,t)){return false}return T.satisfies(i,t)}if(T.lte(t,r)){return false}if(T.gt(t,i)){return false}return true}_get(t,r){return E.get(this.store,t,r)}_set(t,r){const{store:i}=this;E.set(i,t,r);this.store=i}}r["default"]=Conf;t.exports=Conf;t.exports["default"]=Conf},4488:(t,r,i)=>{"use strict";const o=i(2081);const a=i(8423);const c=i(9449);function spawn(t,r,i){const l=a(t,r,i);const u=o.spawn(l.command,l.args,l.options);c.hookChildProcess(u,l);return u}function spawnSync(t,r,i){const l=a(t,r,i);const u=o.spawnSync(l.command,l.args,l.options);u.error=u.error||c.verifyENOENTSync(u.status,l);return u}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=a;t.exports._enoent=c},9449:t=>{"use strict";const r=process.platform==="win32";function notFoundError(t,r){return Object.assign(new Error(`${r} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,i){if(!r){return}const o=t.emit;t.emit=function(r,a){if(r==="exit"){const r=verifyENOENT(a,i,"spawn");if(r){return o.call(t,"error",r)}}return o.apply(t,arguments)}}function verifyENOENT(t,i){if(r&&t===1&&!i.file){return notFoundError(i.original,"spawn")}return null}function verifyENOENTSync(t,i){if(r&&t===1&&!i.file){return notFoundError(i.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},8423:(t,r,i)=>{"use strict";const o=i(1017);const a=i(5907);const c=i(8268);const l=i(7650);const u=process.platform==="win32";const h=/\.(?:com|exe)$/i;const d=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=a(t);const r=t.file&&l(t.file);if(r){t.args.unshift(t.file);t.command=r;return a(t)}return t.file}function parseNonShell(t){if(!u){return t}const r=detectShebang(t);const i=!h.test(r);if(t.options.forceShell||i){const i=d.test(r);t.command=o.normalize(t.command);t.command=c.command(t.command);t.args=t.args.map((t=>c.argument(t,i)));const a=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${a}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,r,i){if(r&&!Array.isArray(r)){i=r;r=null}r=r?r.slice(0):[];i=Object.assign({},i);const o={command:t,args:r,options:i,file:undefined,original:{command:t,args:r}};return i.shell?o:parseNonShell(o)}t.exports=parse},8268:t=>{"use strict";const r=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(r,"^$1");return t}function escapeArgument(t,i){t=`${t}`;t=t.replace(/(\\*)"/g,'$1$1\\"');t=t.replace(/(\\*)$/,"$1$1");t=`"${t}"`;t=t.replace(r,"^$1");if(i){t=t.replace(r,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},7650:(t,r,i)=>{"use strict";const o=i(7147);const a=i(530);function readShebang(t){const r=150;const i=Buffer.alloc(r);let c;try{c=o.openSync(t,"r");o.readSync(c,i,0,r,0);o.closeSync(c)}catch(t){}return a(i.toString())}t.exports=readShebang},5907:(t,r,i)=>{"use strict";const o=i(1017);const a=i(7200);const c=i(6516);function resolveCommandAttempt(t,r){const i=t.options.env||process.env;const l=process.cwd();const u=t.options.cwd!=null;const h=u&&process.chdir!==undefined&&!process.chdir.disabled;if(h){try{process.chdir(t.options.cwd)}catch(t){}}let d;try{d=a.sync(t.command,{path:i[c({env:i})],pathExt:r?o.delimiter:undefined})}catch(t){}finally{if(h){process.chdir(l)}}if(d){d=o.resolve(u?t.options.cwd:"",d)}return d}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},5399:(t,r,i)=>{"use strict";const o=i(1867);t.exports=(t,r={})=>{if(typeof t!=="function"){throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``)}const{wait:i=0,before:a=false,after:c=true}=r;if(!a&&!c){throw new Error("Both `before` and `after` are false, function wouldn't be called.")}let l;let u;const debouncedFunction=function(...r){const o=this;const later=()=>{l=undefined;if(c){u=t.apply(o,r)}};const h=a&&!l;clearTimeout(l);l=setTimeout(later,i);if(h){u=t.apply(o,r)}return u};o(debouncedFunction,t);debouncedFunction.cancel=()=>{if(l){clearTimeout(l);l=undefined}};return debouncedFunction}},7360:t=>{"use strict";
|
|
9
9
|
/*!
|
|
10
10
|
* @description Recursive object extending
|
|
11
11
|
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
@@ -31,44 +31,44 @@
|
|
|
31
31
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
32
32
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
33
33
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
34
|
-
*/function isSpecificValue(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp?true:false}function cloneSpecificValue(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);e.copy(t);return t}else if(e instanceof Date){return new Date(e.getTime())}else if(e instanceof RegExp){return new RegExp(e)}else{throw new Error("Unexpected situation")}}function deepCloneArray(e){var r=[];e.forEach((function(e,s){if(typeof e==="object"&&e!==null){if(Array.isArray(e)){r[s]=deepCloneArray(e)}else if(isSpecificValue(e)){r[s]=cloneSpecificValue(e)}else{r[s]=t({},e)}}else{r[s]=e}}));return r}function safeGetProperty(e,t){return t==="__proto__"?undefined:e[t]}var t=e.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var e=arguments[0];var r=Array.prototype.slice.call(arguments,1);var s,n,i;r.forEach((function(r){if(typeof r!=="object"||r===null||Array.isArray(r)){return}Object.keys(r).forEach((function(i){n=safeGetProperty(e,i);s=safeGetProperty(r,i);if(s===e){return}else if(typeof s!=="object"||s===null){e[i]=s;return}else if(Array.isArray(s)){e[i]=deepCloneArray(s);return}else if(isSpecificValue(s)){e[i]=cloneSpecificValue(s);return}else if(typeof n!=="object"||n===null||Array.isArray(n)){e[i]=t({},s);return}else{e[i]=t(n,s);return}}))}));return e}},9265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4404);const deferToConnect=(e,t)=>{let r;if(typeof t==="function"){const e=t;r={connect:e}}else{r=t}const n=typeof r.connect==="function";const i=typeof r.secureConnect==="function";const o=typeof r.close==="function";const onConnect=()=>{if(n){r.connect()}if(e instanceof s.TLSSocket&&i){if(e.authorized){r.secureConnect()}else if(!e.authorizationError){e.once("secureConnect",r.secureConnect)}}if(o){e.once("close",r.close)}};if(e.writable&&!e.connecting){onConnect()}else if(e.connecting){e.once("connect",onConnect)}else if(e.destroyed&&o){r.close(e._hadError)}};t["default"]=deferToConnect;e.exports=deferToConnect;e.exports["default"]=deferToConnect},6006:(e,t,r)=>{"use strict";const s=r(8683);const n=new Set(["__proto__","prototype","constructor"]);const isValidPath=e=>!e.some((e=>n.has(e)));function getPathSegments(e){const t=e.split(".");const r=[];for(let e=0;e<t.length;e++){let s=t[e];while(s[s.length-1]==="\\"&&t[e+1]!==undefined){s=s.slice(0,-1)+".";s+=t[++e]}r.push(s)}if(!isValidPath(r)){return[]}return r}e.exports={get(e,t,r){if(!s(e)||typeof t!=="string"){return r===undefined?e:r}const n=getPathSegments(t);if(n.length===0){return}for(let t=0;t<n.length;t++){e=e[n[t]];if(e===undefined||e===null){if(t!==n.length-1){return r}break}}return e===undefined?r:e},set(e,t,r){if(!s(e)||typeof t!=="string"){return e}const n=e;const i=getPathSegments(t);for(let t=0;t<i.length;t++){const n=i[t];if(!s(e[n])){e[n]={}}if(t===i.length-1){e[n]=r}e=e[n]}return n},delete(e,t){if(!s(e)||typeof t!=="string"){return false}const r=getPathSegments(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1){delete e[n];return true}e=e[n];if(!s(e)){return false}}},has(e,t){if(!s(e)||typeof t!=="string"){return false}const r=getPathSegments(t);if(r.length===0){return false}for(let t=0;t<r.length;t++){if(s(e)){if(!(r[t]in e)){return false}e=e[r[t]]}else{return false}}return true}}},8623:(e,t,r)=>{"use strict";var s=r(2781);function DuplexWrapper(e,t,r){if(typeof r==="undefined"){r=t;t=e;e=null}s.Duplex.call(this,e);if(typeof r.read!=="function"){r=new s.Readable(e).wrap(r)}this._writable=t;this._readable=r;this._waiting=false;var n=this;t.once("finish",(function(){n.end()}));this.once("finish",(function(){t.end()}));r.on("readable",(function(){if(n._waiting){n._waiting=false;n._read()}}));r.once("end",(function(){n.push(null)}));if(!e||typeof e.bubbleErrors==="undefined"||e.bubbleErrors){t.on("error",(function(e){n.emit("error",e)}));r.on("error",(function(e){n.emit("error",e)}))}}DuplexWrapper.prototype=Object.create(s.Duplex.prototype,{constructor:{value:DuplexWrapper}});DuplexWrapper.prototype._write=function _write(e,t,r){this._writable.write(e,t,r)};DuplexWrapper.prototype._read=function _read(){var e;var t=0;while((e=this._readable.read())!==null){this.push(e);t++}if(t===0){this._waiting=true}};e.exports=function duplex2(e,t,r){return new DuplexWrapper(e,t,r)};e.exports.DuplexWrapper=DuplexWrapper},1014:(e,t,r)=>{var s=r(9852);var noop=function(){};var isRequest=function(e){return e.setHeader&&typeof e.abort==="function"};var isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var eos=function(e,t,r){if(typeof t==="function")return eos(e,null,t);if(!t)t={};r=s(r||noop);var n=e._writableState;var i=e._readableState;var o=t.readable||t.readable!==false&&e.readable;var a=t.writable||t.writable!==false&&e.writable;var c=false;var onlegacyfinish=function(){if(!e.writable)onfinish()};var onfinish=function(){a=false;if(!o)r.call(e)};var onend=function(){o=false;if(!a)r.call(e)};var onexit=function(t){r.call(e,t?new Error("exited with error code: "+t):null)};var onerror=function(t){r.call(e,t)};var onclose=function(){process.nextTick(onclosenexttick)};var onclosenexttick=function(){if(c)return;if(o&&!(i&&(i.ended&&!i.destroyed)))return r.call(e,new Error("premature close"));if(a&&!(n&&(n.ended&&!n.destroyed)))return r.call(e,new Error("premature close"))};var onrequest=function(){e.req.on("finish",onfinish)};if(isRequest(e)){e.on("complete",onfinish);e.on("abort",onclose);if(e.req)onrequest();else e.on("request",onrequest)}else if(a&&!n){e.on("end",onlegacyfinish);e.on("close",onlegacyfinish)}if(isChildProcess(e))e.on("exit",onexit);e.on("end",onend);e.on("finish",onfinish);if(t.error!==false)e.on("error",onerror);e.on("close",onclose);return function(){c=true;e.removeListener("complete",onfinish);e.removeListener("abort",onclose);e.removeListener("request",onrequest);if(e.req)e.req.removeListener("finish",onfinish);e.removeListener("end",onlegacyfinish);e.removeListener("close",onlegacyfinish);e.removeListener("finish",onfinish);e.removeListener("exit",onexit);e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose)}};e.exports=eos},4263:(e,t,r)=>{"use strict";const s=r(1017);const n=r(2037);const i=n.homedir();const o=n.tmpdir();const{env:a}=process;const macos=e=>{const t=s.join(i,"Library");return{data:s.join(t,"Application Support",e),config:s.join(t,"Preferences",e),cache:s.join(t,"Caches",e),log:s.join(t,"Logs",e),temp:s.join(o,e)}};const windows=e=>{const t=a.APPDATA||s.join(i,"AppData","Roaming");const r=a.LOCALAPPDATA||s.join(i,"AppData","Local");return{data:s.join(r,e,"Data"),config:s.join(t,e,"Config"),cache:s.join(r,e,"Cache"),log:s.join(r,e,"Log"),temp:s.join(o,e)}};const linux=e=>{const t=s.basename(i);return{data:s.join(a.XDG_DATA_HOME||s.join(i,".local","share"),e),config:s.join(a.XDG_CONFIG_HOME||s.join(i,".config"),e),cache:s.join(a.XDG_CACHE_HOME||s.join(i,".cache"),e),log:s.join(a.XDG_STATE_HOME||s.join(i,".local","state"),e),temp:s.join(o,t,e)}};const envPaths=(e,t)=>{if(typeof e!=="string"){throw new TypeError(`Expected string, got ${typeof e}`)}t=Object.assign({suffix:"nodejs"},t);if(t.suffix){e+=`-${t.suffix}`}if(process.platform==="darwin"){return macos(e)}if(process.platform==="win32"){return windows(e)}return linux(e)};e.exports=envPaths;e.exports["default"]=envPaths},1230:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return true;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return false;var r,s,n;if(Array.isArray(e)){r=e.length;if(r!=t.length)return false;for(s=r;s--!==0;)if(!equal(e[s],t[s]))return false;return true}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();n=Object.keys(e);r=n.length;if(r!==Object.keys(t).length)return false;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[s]))return false;for(s=r;s--!==0;){var i=n[s];if(!equal(e[i],t[i]))return false}return true}return e!==e&&t!==t}},8695:(e,t,r)=>{"use strict";const s=r(4980);const n=r(5548);const i=r(7232);const o=r(2961);const a=r(423);const c=r(7947);async function FastGlob(e,t){assertPatternsInput(e);const r=getWorks(e,n.default,t);const s=await Promise.all(r);return c.array.flatten(s)}(function(e){e.glob=e;e.globSync=sync;e.globStream=stream;e.async=e;function sync(e,t){assertPatternsInput(e);const r=getWorks(e,o.default,t);return c.array.flatten(r)}e.sync=sync;function stream(e,t){assertPatternsInput(e);const r=getWorks(e,i.default,t);return c.stream.merge(r)}e.stream=stream;function generateTasks(e,t){assertPatternsInput(e);const r=[].concat(e);const n=new a.default(t);return s.generate(r,n)}e.generateTasks=generateTasks;function isDynamicPattern(e,t){assertPatternsInput(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)}e.isDynamicPattern=isDynamicPattern;function escapePath(e){assertPatternsInput(e);return c.path.escape(e)}e.escapePath=escapePath;function convertPathToPattern(e){assertPatternsInput(e);return c.path.convertPathToPattern(e)}e.convertPathToPattern=convertPathToPattern;let t;(function(e){function escapePath(e){assertPatternsInput(e);return c.path.escapePosixPath(e)}e.escapePath=escapePath;function convertPathToPattern(e){assertPatternsInput(e);return c.path.convertPosixPathToPattern(e)}e.convertPathToPattern=convertPathToPattern})(t=e.posix||(e.posix={}));let r;(function(e){function escapePath(e){assertPatternsInput(e);return c.path.escapeWindowsPath(e)}e.escapePath=escapePath;function convertPathToPattern(e){assertPatternsInput(e);return c.path.convertWindowsPathToPattern(e)}e.convertPathToPattern=convertPathToPattern})(r=e.win32||(e.win32={}))})(FastGlob||(FastGlob={}));function getWorks(e,t,r){const n=[].concat(e);const i=new a.default(r);const o=s.generate(n,i);const c=new t(i);return o.map(c.read,c)}function assertPatternsInput(e){const t=[].concat(e);const r=t.every((e=>c.string.isString(e)&&!c.string.isEmpty(e)));if(!r){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}e.exports=FastGlob},4980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.convertPatternGroupToTask=t.convertPatternGroupsToTasks=t.groupPatternsByBaseDirectory=t.getNegativePatternsAsPositive=t.getPositivePatterns=t.convertPatternsToTasks=t.generate=void 0;const s=r(7947);function generate(e,t){const r=processPatterns(e,t);const n=processPatterns(t.ignore,t);const i=getPositivePatterns(r);const o=getNegativePatternsAsPositive(r,n);const a=i.filter((e=>s.pattern.isStaticPattern(e,t)));const c=i.filter((e=>s.pattern.isDynamicPattern(e,t)));const l=convertPatternsToTasks(a,o,false);const u=convertPatternsToTasks(c,o,true);return l.concat(u)}t.generate=generate;function processPatterns(e,t){let r=e;if(t.braceExpansion){r=s.pattern.expandPatternsWithBraceExpansion(r)}if(t.baseNameMatch){r=r.map((e=>e.includes("/")?e:`**/${e}`))}return r.map((e=>s.pattern.removeDuplicateSlashes(e)))}function convertPatternsToTasks(e,t,r){const n=[];const i=s.pattern.getPatternsOutsideCurrentDirectory(e);const o=s.pattern.getPatternsInsideCurrentDirectory(e);const a=groupPatternsByBaseDirectory(i);const c=groupPatternsByBaseDirectory(o);n.push(...convertPatternGroupsToTasks(a,t,r));if("."in c){n.push(convertPatternGroupToTask(".",o,t,r))}else{n.push(...convertPatternGroupsToTasks(c,t,r))}return n}t.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(e){return s.pattern.getPositivePatterns(e)}t.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(e,t){const r=s.pattern.getNegativePatterns(e).concat(t);const n=r.map(s.pattern.convertToPositivePattern);return n}t.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(e){const t={};return e.reduce(((e,t)=>{const r=s.pattern.getBaseDirectory(t);if(r in e){e[r].push(t)}else{e[r]=[t]}return e}),t)}t.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(e,t,r){return Object.keys(e).map((s=>convertPatternGroupToTask(s,e[s],t,r)))}t.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(s.pattern.convertToNegativePattern))}}t.convertPatternGroupToTask=convertPatternGroupToTask},5548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9767);const n=r(3433);class ProviderAsync extends n.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}async read(e){const t=this._getRootDirectory(e);const r=this._getReaderOptions(e);const s=await this.api(t,e,r);return s.map((e=>r.transform(e)))}api(e,t,r){if(t.dynamic){return this._reader.dynamic(e,r)}return this._reader.static(t.patterns,r)}}t["default"]=ProviderAsync},1508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7947);const n=r(1849);class DeepFilter{constructor(e,t){this._settings=e;this._micromatchOptions=t}getFilter(e,t,r){const s=this._getMatcher(t);const n=this._getNegativePatternsRe(r);return t=>this._filter(e,t,s,n)}_getMatcher(e){return new n.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const t=e.filter(s.pattern.isAffectDepthOfReadingPattern);return s.pattern.convertPatternsToRe(t,this._micromatchOptions)}_filter(e,t,r,n){if(this._isSkippedByDeep(e,t.path)){return false}if(this._isSkippedSymbolicLink(t)){return false}const i=s.path.removeLeadingDotSegment(t.path);if(this._isSkippedByPositivePatterns(i,r)){return false}return this._isSkippedByNegativePatterns(i,n)}_isSkippedByDeep(e,t){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;if(e===""){return r}const s=e.split("/").length;return r-s}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,t){return!s.pattern.matchAny(e,t)}}t["default"]=DeepFilter},7253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7947);class EntryFilter{constructor(e,t){this._settings=e;this._micromatchOptions=t;this.index=new Map}getFilter(e,t){const r=s.pattern.convertPatternsToRe(e,this._micromatchOptions);const n=s.pattern.convertPatternsToRe(t,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}));return e=>this._filter(e,r,n)}_filter(e,t,r){const n=s.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)){return false}if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)){return false}if(this._isSkippedByAbsoluteNegativePatterns(n,r)){return false}const i=e.dirent.isDirectory();const o=this._isMatchToPatterns(n,t,i)&&!this._isMatchToPatterns(n,r,i);if(this._settings.unique&&o){this._createIndexRecord(n)}return o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,undefined)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,t){if(!this._settings.absolute){return false}const r=s.path.makeAbsolute(this._settings.cwd,e);return s.pattern.matchAny(r,t)}_isMatchToPatterns(e,t,r){const n=s.pattern.matchAny(e,t);if(!n&&r){return s.pattern.matchAny(e+"/",t)}return n}}t["default"]=EntryFilter},9458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7947);class ErrorFilter{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return s.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}t["default"]=ErrorFilter},867:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7947);class Matcher{constructor(e,t,r){this._patterns=e;this._settings=t;this._micromatchOptions=r;this._storage=[];this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e);const r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(e){const t=s.pattern.getPatternParts(e,this._micromatchOptions);return t.map((e=>{const t=s.pattern.isDynamicPattern(e,this._settings);if(!t){return{dynamic:false,pattern:e}}return{dynamic:true,pattern:e,patternRe:s.pattern.makeRe(e,this._micromatchOptions)}}))}_splitSegmentsIntoSections(e){return s.array.splitWhen(e,(e=>e.dynamic&&s.pattern.hasGlobStar(e.pattern)))}}t["default"]=Matcher},1849:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(867);class PartialMatcher extends s.default{match(e){const t=e.split("/");const r=t.length;const s=this._storage.filter((e=>!e.complete||e.segments.length>r));for(const e of s){const s=e.sections[0];if(!e.complete&&r>s.length){return true}const n=t.every(((t,r)=>{const s=e.segments[r];if(s.dynamic&&s.patternRe.test(t)){return true}if(!s.dynamic&&s.pattern===t){return true}return false}));if(n){return true}}return false}}t["default"]=PartialMatcher},3433:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1017);const n=r(1508);const i=r(7253);const o=r(9458);const a=r(911);class Provider{constructor(e){this._settings=e;this.errorFilter=new o.default(this._settings);this.entryFilter=new i.default(this._settings,this._getMicromatchOptions());this.deepFilter=new n.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new a.default(this._settings)}_getRootDirectory(e){return s.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const t=e.base==="."?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}t["default"]=Provider},7232:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(2781);const n=r(14);const i=r(3433);class ProviderStream extends i.default{constructor(){super(...arguments);this._reader=new n.default(this._settings)}read(e){const t=this._getRootDirectory(e);const r=this._getReaderOptions(e);const n=this.api(t,e,r);const i=new s.Readable({objectMode:true,read:()=>{}});n.once("error",(e=>i.emit("error",e))).on("data",(e=>i.emit("data",r.transform(e)))).once("end",(()=>i.emit("end")));i.once("close",(()=>n.destroy()));return i}api(e,t,r){if(t.dynamic){return this._reader.dynamic(e,r)}return this._reader.static(t.patterns,r)}}t["default"]=ProviderStream},2961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9953);const n=r(3433);class ProviderSync extends n.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}read(e){const t=this._getRootDirectory(e);const r=this._getReaderOptions(e);const s=this.api(t,e,r);return s.map(r.transform)}api(e,t,r){if(t.dynamic){return this._reader.dynamic(e,r)}return this._reader.static(t.patterns,r)}}t["default"]=ProviderSync},911:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7947);class EntryTransformer{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let t=e.path;if(this._settings.absolute){t=s.path.makeAbsolute(this._settings.cwd,t);t=s.path.unixify(t)}if(this._settings.markDirectories&&e.dirent.isDirectory()){t+="/"}if(!this._settings.objectMode){return t}return Object.assign(Object.assign({},e),{path:t})}}t["default"]=EntryTransformer},9767:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(204);const n=r(2648);const i=r(14);class ReaderAsync extends n.default{constructor(){super(...arguments);this._walkAsync=s.walk;this._readerStream=new i.default(this._settings)}dynamic(e,t){return new Promise(((r,s)=>{this._walkAsync(e,t,((e,t)=>{if(e===null){r(t)}else{s(e)}}))}))}async static(e,t){const r=[];const s=this._readerStream.static(e,t);return new Promise(((e,t)=>{s.once("error",t);s.on("data",(e=>r.push(e)));s.once("end",(()=>e(r)))}))}}t["default"]=ReaderAsync},2648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1017);const n=r(5587);const i=r(7947);class Reader{constructor(e){this._settings=e;this._fsStatSettings=new n.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return s.resolve(this._settings.cwd,e)}_makeEntry(e,t){const r={name:t,path:t,dirent:i.fs.createDirentFromStats(t,e)};if(this._settings.stats){r.stats=e}return r}_isFatalError(e){return!i.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}t["default"]=Reader},14:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(2781);const n=r(5587);const i=r(204);const o=r(2648);class ReaderStream extends o.default{constructor(){super(...arguments);this._walkStream=i.walkStream;this._stat=n.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,t){const r=e.map(this._getFullEntryPath,this);const n=new s.PassThrough({objectMode:true});n._write=(s,i,o)=>this._getEntry(r[s],e[s],t).then((e=>{if(e!==null&&t.entryFilter(e)){n.push(e)}if(s===r.length-1){n.end()}o()})).catch(o);for(let e=0;e<r.length;e++){n.write(e)}return n}_getEntry(e,t,r){return this._getStat(e).then((e=>this._makeEntry(e,t))).catch((e=>{if(r.errorFilter(e)){return null}throw e}))}_getStat(e){return new Promise(((t,r)=>{this._stat(e,this._fsStatSettings,((e,s)=>e===null?t(s):r(e)))}))}}t["default"]=ReaderStream},9953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5587);const n=r(204);const i=r(2648);class ReaderSync extends i.default{constructor(){super(...arguments);this._walkSync=n.walkSync;this._statSync=s.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const s of e){const e=this._getFullEntryPath(s);const n=this._getEntry(e,s,t);if(n===null||!t.entryFilter(n)){continue}r.push(n)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e)){return null}throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}t["default"]=ReaderSync},423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);const n=r(2037);const i=Math.max(n.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:s.lstat,lstatSync:s.lstatSync,stat:s.stat,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};class Settings{constructor(e={}){this._options=e;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,i);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(e,t){return e===undefined?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}t["default"]=Settings},3859:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.splitWhen=t.flatten=void 0;function flatten(e){return e.reduce(((e,t)=>[].concat(e,t)),[])}t.flatten=flatten;function splitWhen(e,t){const r=[[]];let s=0;for(const n of e){if(t(n)){s++;r[s]=[]}else{r[s].push(n)}}return r}t.splitWhen=splitWhen},8608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isEnoentCodeError=void 0;function isEnoentCodeError(e){return e.code==="ENOENT"}t.isEnoentCodeError=isEnoentCodeError},4041:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createDirentFromStats=void 0;class DirentFromStats{constructor(e,t){this.name=e;this.isBlockDevice=t.isBlockDevice.bind(t);this.isCharacterDevice=t.isCharacterDevice.bind(t);this.isDirectory=t.isDirectory.bind(t);this.isFIFO=t.isFIFO.bind(t);this.isFile=t.isFile.bind(t);this.isSocket=t.isSocket.bind(t);this.isSymbolicLink=t.isSymbolicLink.bind(t)}}function createDirentFromStats(e,t){return new DirentFromStats(e,t)}t.createDirentFromStats=createDirentFromStats},7947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.string=t.stream=t.pattern=t.path=t.fs=t.errno=t.array=void 0;const s=r(3859);t.array=s;const n=r(8608);t.errno=n;const i=r(4041);t.fs=i;const o=r(9800);t.path=o;const a=r(732);t.pattern=a;const c=r(9706);t.stream=c;const l=r(7624);t.string=l},9800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.convertPosixPathToPattern=t.convertWindowsPathToPattern=t.convertPathToPattern=t.escapePosixPath=t.escapeWindowsPath=t.escape=t.removeLeadingDotSegment=t.makeAbsolute=t.unixify=void 0;const s=r(2037);const n=r(1017);const i=s.platform()==="win32";const o=2;const a=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const c=/(\\?)([(){}]|^!|[!+@](?=\())/g;const l=/^\\\\([.?])/;const u=/\\(?![!()+@{}])/g;function unixify(e){return e.replace(/\\/g,"/")}t.unixify=unixify;function makeAbsolute(e,t){return n.resolve(e,t)}t.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(e){if(e.charAt(0)==="."){const t=e.charAt(1);if(t==="/"||t==="\\"){return e.slice(o)}}return e}t.removeLeadingDotSegment=removeLeadingDotSegment;t.escape=i?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(e){return e.replace(c,"\\$2")}t.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(e){return e.replace(a,"\\$2")}t.escapePosixPath=escapePosixPath;t.convertPathToPattern=i?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(e){return escapeWindowsPath(e).replace(l,"//$1").replace(u,"/")}t.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(e){return escapePosixPath(e)}t.convertPosixPathToPattern=convertPosixPathToPattern},732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.removeDuplicateSlashes=t.matchAny=t.convertPatternsToRe=t.makeRe=t.getPatternParts=t.expandBraceExpansion=t.expandPatternsWithBraceExpansion=t.isAffectDepthOfReadingPattern=t.endsWithSlashGlobStar=t.hasGlobStar=t.getBaseDirectory=t.isPatternRelatedToParentDirectory=t.getPatternsOutsideCurrentDirectory=t.getPatternsInsideCurrentDirectory=t.getPositivePatterns=t.getNegativePatterns=t.isPositivePattern=t.isNegativePattern=t.convertToNegativePattern=t.convertToPositivePattern=t.isDynamicPattern=t.isStaticPattern=void 0;const s=r(1017);const n=r(7080);const i=r(1065);const o="**";const a="\\";const c=/[*?]|^!/;const l=/\[[^[]*]/;const u=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const h=/[!*+?@]\([^(]*\)/;const d=/,|\.\./;const p=/(?!^)\/{2,}/g;function isStaticPattern(e,t={}){return!isDynamicPattern(e,t)}t.isStaticPattern=isStaticPattern;function isDynamicPattern(e,t={}){if(e===""){return false}if(t.caseSensitiveMatch===false||e.includes(a)){return true}if(c.test(e)||l.test(e)||u.test(e)){return true}if(t.extglob!==false&&h.test(e)){return true}if(t.braceExpansion!==false&&hasBraceExpansion(e)){return true}return false}t.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(e){const t=e.indexOf("{");if(t===-1){return false}const r=e.indexOf("}",t+1);if(r===-1){return false}const s=e.slice(t,r);return d.test(s)}function convertToPositivePattern(e){return isNegativePattern(e)?e.slice(1):e}t.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(e){return"!"+e}t.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(e){return e.startsWith("!")&&e[1]!=="("}t.isNegativePattern=isNegativePattern;function isPositivePattern(e){return!isNegativePattern(e)}t.isPositivePattern=isPositivePattern;function getNegativePatterns(e){return e.filter(isNegativePattern)}t.getNegativePatterns=getNegativePatterns;function getPositivePatterns(e){return e.filter(isPositivePattern)}t.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(e){return e.filter((e=>!isPatternRelatedToParentDirectory(e)))}t.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(e){return e.filter(isPatternRelatedToParentDirectory)}t.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(e){return e.startsWith("..")||e.startsWith("./..")}t.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(e){return n(e,{flipBackslashes:false})}t.getBaseDirectory=getBaseDirectory;function hasGlobStar(e){return e.includes(o)}t.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(e){return e.endsWith("/"+o)}t.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(e){const t=s.basename(e);return endsWithSlashGlobStar(e)||isStaticPattern(t)}t.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(e){return e.reduce(((e,t)=>e.concat(expandBraceExpansion(t))),[])}t.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(e){const t=i.braces(e,{expand:true,nodupes:true});t.sort(((e,t)=>e.length-t.length));return t.filter((e=>e!==""))}t.expandBraceExpansion=expandBraceExpansion;function getPatternParts(e,t){let{parts:r}=i.scan(e,Object.assign(Object.assign({},t),{parts:true}));if(r.length===0){r=[e]}if(r[0].startsWith("/")){r[0]=r[0].slice(1);r.unshift("")}return r}t.getPatternParts=getPatternParts;function makeRe(e,t){return i.makeRe(e,t)}t.makeRe=makeRe;function convertPatternsToRe(e,t){return e.map((e=>makeRe(e,t)))}t.convertPatternsToRe=convertPatternsToRe;function matchAny(e,t){return t.some((t=>t.test(e)))}t.matchAny=matchAny;function removeDuplicateSlashes(e){return e.replace(p,"/")}t.removeDuplicateSlashes=removeDuplicateSlashes},9706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.merge=void 0;const s=r(9117);function merge(e){const t=s(e);e.forEach((e=>{e.once("error",(e=>t.emit("error",e)))}));t.once("close",(()=>propagateCloseEventToSources(e)));t.once("end",(()=>propagateCloseEventToSources(e)));return t}t.merge=merge;function propagateCloseEventToSources(e){e.forEach((e=>e.emit("close")))}},7624:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isEmpty=t.isString=void 0;function isString(e){return typeof e==="string"}t.isString=isString;function isEmpty(e){return e===""}t.isEmpty=isEmpty},6256:(e,t,r)=>{"use strict";var s=r(7327);function fastqueue(e,t,r){if(typeof e==="function"){r=t;t=e;e=null}if(r<1){throw new Error("fastqueue concurrency must be greater than 1")}var n=s(Task);var i=null;var o=null;var a=0;var c=null;var l={push:push,drain:noop,saturated:noop,pause:pause,paused:false,concurrency:r,running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return l;function running(){return a}function pause(){l.paused=true}function length(){var e=i;var t=0;while(e){e=e.next;t++}return t}function getQueue(){var e=i;var t=[];while(e){t.push(e.value);e=e.next}return t}function resume(){if(!l.paused)return;l.paused=false;for(var e=0;e<l.concurrency;e++){a++;release()}}function idle(){return a===0&&l.length()===0}function push(r,s){var u=n.get();u.context=e;u.release=release;u.value=r;u.callback=s||noop;u.errorHandler=c;if(a===l.concurrency||l.paused){if(o){o.next=u;o=u}else{i=u;o=u;l.saturated()}}else{a++;t.call(e,u.value,u.worked)}}function unshift(r,s){var c=n.get();c.context=e;c.release=release;c.value=r;c.callback=s||noop;if(a===l.concurrency||l.paused){if(i){c.next=i;i=c}else{i=c;o=c;l.saturated()}}else{a++;t.call(e,c.value,c.worked)}}function release(r){if(r){n.release(r)}var s=i;if(s){if(!l.paused){if(o===i){o=null}i=s.next;s.next=null;t.call(e,s.value,s.worked);if(o===null){l.empty()}}else{a--}}else if(--a===0){l.drain()}}function kill(){i=null;o=null;l.drain=noop}function killAndDrain(){i=null;o=null;l.drain();l.drain=noop}function error(e){c=e}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var e=this;this.worked=function worked(t,r){var s=e.callback;var n=e.errorHandler;var i=e.value;e.value=null;e.callback=noop;if(e.errorHandler){n(t,i)}s.call(e.context,t,r);e.release(e)}}function queueAsPromised(e,t,r){if(typeof e==="function"){r=t;t=e;e=null}function asyncWrapper(e,r){t.call(this,e).then((function(e){r(null,e)}),r)}var s=fastqueue(e,asyncWrapper,r);var n=s.push;var i=s.unshift;s.push=push;s.unshift=unshift;s.drained=drained;return s;function push(e){var t=new Promise((function(t,r){n(e,(function(e,s){if(e){r(e);return}t(s)}))}));t.catch(noop);return t}function unshift(e){var t=new Promise((function(t,r){i(e,(function(e,s){if(e){r(e);return}t(s)}))}));t.catch(noop);return t}function drained(){if(s.idle()){return new Promise((function(e){e()}))}var e=s.drain;var t=new Promise((function(t){s.drain=function(){e();t()}}));return t}}e.exports=fastqueue;e.exports.promise=queueAsPromised},7783:(e,t,r)=>{"use strict";
|
|
34
|
+
*/function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var r=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(r);return r}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var i=[];t.forEach((function(t,o){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){i[o]=deepCloneArray(t)}else if(isSpecificValue(t)){i[o]=cloneSpecificValue(t)}else{i[o]=r({},t)}}else{i[o]=t}}));return i}function safeGetProperty(t,r){return r==="__proto__"?undefined:t[r]}var r=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var i=Array.prototype.slice.call(arguments,1);var o,a,c;i.forEach((function(i){if(typeof i!=="object"||i===null||Array.isArray(i)){return}Object.keys(i).forEach((function(c){a=safeGetProperty(t,c);o=safeGetProperty(i,c);if(o===t){return}else if(typeof o!=="object"||o===null){t[c]=o;return}else if(Array.isArray(o)){t[c]=deepCloneArray(o);return}else if(isSpecificValue(o)){t[c]=cloneSpecificValue(o);return}else if(typeof a!=="object"||a===null||Array.isArray(a)){t[c]=r({},o);return}else{t[c]=r(a,o);return}}))}));return t}},6006:(t,r,i)=>{"use strict";const o=i(8683);const a=new Set(["__proto__","prototype","constructor"]);const isValidPath=t=>!t.some((t=>a.has(t)));function getPathSegments(t){const r=t.split(".");const i=[];for(let t=0;t<r.length;t++){let o=r[t];while(o[o.length-1]==="\\"&&r[t+1]!==undefined){o=o.slice(0,-1)+".";o+=r[++t]}i.push(o)}if(!isValidPath(i)){return[]}return i}t.exports={get(t,r,i){if(!o(t)||typeof r!=="string"){return i===undefined?t:i}const a=getPathSegments(r);if(a.length===0){return}for(let r=0;r<a.length;r++){t=t[a[r]];if(t===undefined||t===null){if(r!==a.length-1){return i}break}}return t===undefined?i:t},set(t,r,i){if(!o(t)||typeof r!=="string"){return t}const a=t;const c=getPathSegments(r);for(let r=0;r<c.length;r++){const a=c[r];if(!o(t[a])){t[a]={}}if(r===c.length-1){t[a]=i}t=t[a]}return a},delete(t,r){if(!o(t)||typeof r!=="string"){return false}const i=getPathSegments(r);for(let r=0;r<i.length;r++){const a=i[r];if(r===i.length-1){delete t[a];return true}t=t[a];if(!o(t)){return false}}},has(t,r){if(!o(t)||typeof r!=="string"){return false}const i=getPathSegments(r);if(i.length===0){return false}for(let r=0;r<i.length;r++){if(o(t)){if(!(i[r]in t)){return false}t=t[i[r]]}else{return false}}return true}}},4263:(t,r,i)=>{"use strict";const o=i(1017);const a=i(2037);const c=a.homedir();const l=a.tmpdir();const{env:u}=process;const macos=t=>{const r=o.join(c,"Library");return{data:o.join(r,"Application Support",t),config:o.join(r,"Preferences",t),cache:o.join(r,"Caches",t),log:o.join(r,"Logs",t),temp:o.join(l,t)}};const windows=t=>{const r=u.APPDATA||o.join(c,"AppData","Roaming");const i=u.LOCALAPPDATA||o.join(c,"AppData","Local");return{data:o.join(i,t,"Data"),config:o.join(r,t,"Config"),cache:o.join(i,t,"Cache"),log:o.join(i,t,"Log"),temp:o.join(l,t)}};const linux=t=>{const r=o.basename(c);return{data:o.join(u.XDG_DATA_HOME||o.join(c,".local","share"),t),config:o.join(u.XDG_CONFIG_HOME||o.join(c,".config"),t),cache:o.join(u.XDG_CACHE_HOME||o.join(c,".cache"),t),log:o.join(u.XDG_STATE_HOME||o.join(c,".local","state"),t),temp:o.join(l,r,t)}};const envPaths=(t,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected string, got ${typeof t}`)}r=Object.assign({suffix:"nodejs"},r);if(r.suffix){t+=`-${r.suffix}`}if(process.platform==="darwin"){return macos(t)}if(process.platform==="win32"){return windows(t)}return linux(t)};t.exports=envPaths;t.exports["default"]=envPaths},1230:t=>{"use strict";t.exports=function equal(t,r){if(t===r)return true;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return false;var i,o,a;if(Array.isArray(t)){i=t.length;if(i!=r.length)return false;for(o=i;o--!==0;)if(!equal(t[o],r[o]))return false;return true}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();a=Object.keys(t);i=a.length;if(i!==Object.keys(r).length)return false;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return false;for(o=i;o--!==0;){var c=a[o];if(!equal(t[c],r[c]))return false}return true}return t!==t&&r!==r}},8695:(t,r,i)=>{"use strict";const o=i(4980);const a=i(5548);const c=i(7232);const l=i(2961);const u=i(423);const h=i(7947);async function FastGlob(t,r){assertPatternsInput(t);const i=getWorks(t,a.default,r);const o=await Promise.all(i);return h.array.flatten(o)}(function(t){t.glob=t;t.globSync=sync;t.globStream=stream;t.async=t;function sync(t,r){assertPatternsInput(t);const i=getWorks(t,l.default,r);return h.array.flatten(i)}t.sync=sync;function stream(t,r){assertPatternsInput(t);const i=getWorks(t,c.default,r);return h.stream.merge(i)}t.stream=stream;function generateTasks(t,r){assertPatternsInput(t);const i=[].concat(t);const a=new u.default(r);return o.generate(i,a)}t.generateTasks=generateTasks;function isDynamicPattern(t,r){assertPatternsInput(t);const i=new u.default(r);return h.pattern.isDynamicPattern(t,i)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return h.path.escape(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return h.path.convertPathToPattern(t)}t.convertPathToPattern=convertPathToPattern;let r;(function(t){function escapePath(t){assertPatternsInput(t);return h.path.escapePosixPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return h.path.convertPosixPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(r=t.posix||(t.posix={}));let i;(function(t){function escapePath(t){assertPatternsInput(t);return h.path.escapeWindowsPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return h.path.convertWindowsPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(i=t.win32||(t.win32={}))})(FastGlob||(FastGlob={}));function getWorks(t,r,i){const a=[].concat(t);const c=new u.default(i);const l=o.generate(a,c);const h=new r(c);return l.map(h.read,h)}function assertPatternsInput(t){const r=[].concat(t);const i=r.every((t=>h.string.isString(t)&&!h.string.isEmpty(t)));if(!i){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},4980:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.convertPatternGroupToTask=r.convertPatternGroupsToTasks=r.groupPatternsByBaseDirectory=r.getNegativePatternsAsPositive=r.getPositivePatterns=r.convertPatternsToTasks=r.generate=void 0;const o=i(7947);function generate(t,r){const i=processPatterns(t,r);const a=processPatterns(r.ignore,r);const c=getPositivePatterns(i);const l=getNegativePatternsAsPositive(i,a);const u=c.filter((t=>o.pattern.isStaticPattern(t,r)));const h=c.filter((t=>o.pattern.isDynamicPattern(t,r)));const d=convertPatternsToTasks(u,l,false);const p=convertPatternsToTasks(h,l,true);return d.concat(p)}r.generate=generate;function processPatterns(t,r){let i=t;if(r.braceExpansion){i=o.pattern.expandPatternsWithBraceExpansion(i)}if(r.baseNameMatch){i=i.map((t=>t.includes("/")?t:`**/${t}`))}return i.map((t=>o.pattern.removeDuplicateSlashes(t)))}function convertPatternsToTasks(t,r,i){const a=[];const c=o.pattern.getPatternsOutsideCurrentDirectory(t);const l=o.pattern.getPatternsInsideCurrentDirectory(t);const u=groupPatternsByBaseDirectory(c);const h=groupPatternsByBaseDirectory(l);a.push(...convertPatternGroupsToTasks(u,r,i));if("."in h){a.push(convertPatternGroupToTask(".",l,r,i))}else{a.push(...convertPatternGroupsToTasks(h,r,i))}return a}r.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return o.pattern.getPositivePatterns(t)}r.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,r){const i=o.pattern.getNegativePatterns(t).concat(r);const a=i.map(o.pattern.convertToPositivePattern);return a}r.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const r={};return t.reduce(((t,r)=>{const i=o.pattern.getBaseDirectory(r);if(i in t){t[i].push(r)}else{t[i]=[r]}return t}),r)}r.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,r,i){return Object.keys(t).map((o=>convertPatternGroupToTask(o,t[o],r,i)))}r.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,r,i,a){return{dynamic:a,positive:r,negative:i,base:t,patterns:[].concat(r,i.map(o.pattern.convertToNegativePattern))}}r.convertPatternGroupToTask=convertPatternGroupToTask},5548:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9767);const a=i(3433);class ProviderAsync extends a.default{constructor(){super(...arguments);this._reader=new o.default(this._settings)}async read(t){const r=this._getRootDirectory(t);const i=this._getReaderOptions(t);const o=await this.api(r,t,i);return o.map((t=>i.transform(t)))}api(t,r,i){if(r.dynamic){return this._reader.dynamic(t,i)}return this._reader.static(r.patterns,i)}}r["default"]=ProviderAsync},1508:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7947);const a=i(1849);class DeepFilter{constructor(t,r){this._settings=t;this._micromatchOptions=r}getFilter(t,r,i){const o=this._getMatcher(r);const a=this._getNegativePatternsRe(i);return r=>this._filter(t,r,o,a)}_getMatcher(t){return new a.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(o.pattern.isAffectDepthOfReadingPattern);return o.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,i,a){if(this._isSkippedByDeep(t,r.path)){return false}if(this._isSkippedSymbolicLink(r)){return false}const c=o.path.removeLeadingDotSegment(r.path);if(this._isSkippedByPositivePatterns(c,i)){return false}return this._isSkippedByNegativePatterns(c,a)}_isSkippedByDeep(t,r){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){const i=r.split("/").length;if(t===""){return i}const o=t.split("/").length;return i-o}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!o.pattern.matchAny(t,r)}}r["default"]=DeepFilter},7253:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7947);class EntryFilter{constructor(t,r){this._settings=t;this._micromatchOptions=r;this.index=new Map}getFilter(t,r){const i=o.pattern.convertPatternsToRe(t,this._micromatchOptions);const a=o.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}));return t=>this._filter(t,i,a)}_filter(t,r,i){const a=o.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(a)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}if(this._isSkippedByAbsoluteNegativePatterns(a,i)){return false}const c=t.dirent.isDirectory();const l=this._isMatchToPatterns(a,r,c)&&!this._isMatchToPatterns(a,i,c);if(this._settings.unique&&l){this._createIndexRecord(a)}return l}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,r){if(!this._settings.absolute){return false}const i=o.path.makeAbsolute(this._settings.cwd,t);return o.pattern.matchAny(i,r)}_isMatchToPatterns(t,r,i){const a=o.pattern.matchAny(t,r);if(!a&&i){return o.pattern.matchAny(t+"/",r)}return a}}r["default"]=EntryFilter},9458:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7947);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return o.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}r["default"]=ErrorFilter},867:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7947);class Matcher{constructor(t,r,i){this._patterns=t;this._settings=r;this._micromatchOptions=i;this._storage=[];this._fillStorage()}_fillStorage(){for(const t of this._patterns){const r=this._getPatternSegments(t);const i=this._splitSegmentsIntoSections(r);this._storage.push({complete:i.length<=1,pattern:t,segments:r,sections:i})}}_getPatternSegments(t){const r=o.pattern.getPatternParts(t,this._micromatchOptions);return r.map((t=>{const r=o.pattern.isDynamicPattern(t,this._settings);if(!r){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:o.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return o.array.splitWhen(t,(t=>t.dynamic&&o.pattern.hasGlobStar(t.pattern)))}}r["default"]=Matcher},1849:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(867);class PartialMatcher extends o.default{match(t){const r=t.split("/");const i=r.length;const o=this._storage.filter((t=>!t.complete||t.segments.length>i));for(const t of o){const o=t.sections[0];if(!t.complete&&i>o.length){return true}const a=r.every(((r,i)=>{const o=t.segments[i];if(o.dynamic&&o.patternRe.test(r)){return true}if(!o.dynamic&&o.pattern===r){return true}return false}));if(a){return true}}return false}}r["default"]=PartialMatcher},3433:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1017);const a=i(1508);const c=i(7253);const l=i(9458);const u=i(911);class Provider{constructor(t){this._settings=t;this.errorFilter=new l.default(this._settings);this.entryFilter=new c.default(this._settings,this._getMicromatchOptions());this.deepFilter=new a.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new u.default(this._settings)}_getRootDirectory(t){return o.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}r["default"]=Provider},7232:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2781);const a=i(14);const c=i(3433);class ProviderStream extends c.default{constructor(){super(...arguments);this._reader=new a.default(this._settings)}read(t){const r=this._getRootDirectory(t);const i=this._getReaderOptions(t);const a=this.api(r,t,i);const c=new o.Readable({objectMode:true,read:()=>{}});a.once("error",(t=>c.emit("error",t))).on("data",(t=>c.emit("data",i.transform(t)))).once("end",(()=>c.emit("end")));c.once("close",(()=>a.destroy()));return c}api(t,r,i){if(r.dynamic){return this._reader.dynamic(t,i)}return this._reader.static(r.patterns,i)}}r["default"]=ProviderStream},2961:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(9953);const a=i(3433);class ProviderSync extends a.default{constructor(){super(...arguments);this._reader=new o.default(this._settings)}read(t){const r=this._getRootDirectory(t);const i=this._getReaderOptions(t);const o=this.api(r,t,i);return o.map(i.transform)}api(t,r,i){if(r.dynamic){return this._reader.dynamic(t,i)}return this._reader.static(r.patterns,i)}}r["default"]=ProviderSync},911:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(7947);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;if(this._settings.absolute){r=o.path.makeAbsolute(this._settings.cwd,r);r=o.path.unixify(r)}if(this._settings.markDirectories&&t.dirent.isDirectory()){r+="/"}if(!this._settings.objectMode){return r}return Object.assign(Object.assign({},t),{path:r})}}r["default"]=EntryTransformer},9767:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(204);const a=i(2648);const c=i(14);class ReaderAsync extends a.default{constructor(){super(...arguments);this._walkAsync=o.walk;this._readerStream=new c.default(this._settings)}dynamic(t,r){return new Promise(((i,o)=>{this._walkAsync(t,r,((t,r)=>{if(t===null){i(r)}else{o(t)}}))}))}async static(t,r){const i=[];const o=this._readerStream.static(t,r);return new Promise(((t,r)=>{o.once("error",r);o.on("data",(t=>i.push(t)));o.once("end",(()=>t(i)))}))}}r["default"]=ReaderAsync},2648:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(1017);const a=i(5587);const c=i(7947);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new a.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return o.resolve(this._settings.cwd,t)}_makeEntry(t,r){const i={name:r,path:r,dirent:c.fs.createDirentFromStats(r,t)};if(this._settings.stats){i.stats=t}return i}_isFatalError(t){return!c.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}r["default"]=Reader},14:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(2781);const a=i(5587);const c=i(204);const l=i(2648);class ReaderStream extends l.default{constructor(){super(...arguments);this._walkStream=c.walkStream;this._stat=a.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){const i=t.map(this._getFullEntryPath,this);const a=new o.PassThrough({objectMode:true});a._write=(o,c,l)=>this._getEntry(i[o],t[o],r).then((t=>{if(t!==null&&r.entryFilter(t)){a.push(t)}if(o===i.length-1){a.end()}l()})).catch(l);for(let t=0;t<i.length;t++){a.write(t)}return a}_getEntry(t,r,i){return this._getStat(t).then((t=>this._makeEntry(t,r))).catch((t=>{if(i.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((r,i)=>{this._stat(t,this._fsStatSettings,((t,o)=>t===null?r(o):i(t)))}))}}r["default"]=ReaderStream},9953:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const o=i(5587);const a=i(204);const c=i(2648);class ReaderSync extends c.default{constructor(){super(...arguments);this._walkSync=a.walkSync;this._statSync=o.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){const i=[];for(const o of t){const t=this._getFullEntryPath(o);const a=this._getEntry(t,o,r);if(a===null||!r.entryFilter(a)){continue}i.push(a)}return i}_getEntry(t,r,i){try{const i=this._getStat(t);return this._makeEntry(i,r)}catch(t){if(i.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}r["default"]=ReaderSync},423:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const o=i(7147);const a=i(2037);const c=Math.max(a.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:o.lstat,lstatSync:o.lstatSync,stat:o.stat,statSync:o.statSync,readdir:o.readdir,readdirSync:o.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,c);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(t,r){return t===undefined?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}r["default"]=Settings},3859:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.splitWhen=r.flatten=void 0;function flatten(t){return t.reduce(((t,r)=>[].concat(t,r)),[])}r.flatten=flatten;function splitWhen(t,r){const i=[[]];let o=0;for(const a of t){if(r(a)){o++;i[o]=[]}else{i[o].push(a)}}return i}r.splitWhen=splitWhen},8608:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}r.isEnoentCodeError=isEnoentCodeError},4041:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.createDirentFromStats=void 0;class DirentFromStats{constructor(t,r){this.name=t;this.isBlockDevice=r.isBlockDevice.bind(r);this.isCharacterDevice=r.isCharacterDevice.bind(r);this.isDirectory=r.isDirectory.bind(r);this.isFIFO=r.isFIFO.bind(r);this.isFile=r.isFile.bind(r);this.isSocket=r.isSocket.bind(r);this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function createDirentFromStats(t,r){return new DirentFromStats(t,r)}r.createDirentFromStats=createDirentFromStats},7947:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.string=r.stream=r.pattern=r.path=r.fs=r.errno=r.array=void 0;const o=i(3859);r.array=o;const a=i(8608);r.errno=a;const c=i(4041);r.fs=c;const l=i(9800);r.path=l;const u=i(732);r.pattern=u;const h=i(9706);r.stream=h;const d=i(7624);r.string=d},9800:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.convertPosixPathToPattern=r.convertWindowsPathToPattern=r.convertPathToPattern=r.escapePosixPath=r.escapeWindowsPath=r.escape=r.removeLeadingDotSegment=r.makeAbsolute=r.unixify=void 0;const o=i(2037);const a=i(1017);const c=o.platform()==="win32";const l=2;const u=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const h=/(\\?)([(){}]|^!|[!+@](?=\())/g;const d=/^\\\\([.?])/;const p=/\\(?![!()+@{}])/g;function unixify(t){return t.replace(/\\/g,"/")}r.unixify=unixify;function makeAbsolute(t,r){return a.resolve(t,r)}r.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const r=t.charAt(1);if(r==="/"||r==="\\"){return t.slice(l)}}return t}r.removeLeadingDotSegment=removeLeadingDotSegment;r.escape=c?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(t){return t.replace(h,"\\$2")}r.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(t){return t.replace(u,"\\$2")}r.escapePosixPath=escapePosixPath;r.convertPathToPattern=c?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(t){return escapeWindowsPath(t).replace(d,"//$1").replace(p,"/")}r.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(t){return escapePosixPath(t)}r.convertPosixPathToPattern=convertPosixPathToPattern},732:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.removeDuplicateSlashes=r.matchAny=r.convertPatternsToRe=r.makeRe=r.getPatternParts=r.expandBraceExpansion=r.expandPatternsWithBraceExpansion=r.isAffectDepthOfReadingPattern=r.endsWithSlashGlobStar=r.hasGlobStar=r.getBaseDirectory=r.isPatternRelatedToParentDirectory=r.getPatternsOutsideCurrentDirectory=r.getPatternsInsideCurrentDirectory=r.getPositivePatterns=r.getNegativePatterns=r.isPositivePattern=r.isNegativePattern=r.convertToNegativePattern=r.convertToPositivePattern=r.isDynamicPattern=r.isStaticPattern=void 0;const o=i(1017);const a=i(7080);const c=i(1065);const l="**";const u="\\";const h=/[*?]|^!/;const d=/\[[^[]*]/;const p=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const m=/[!*+?@]\([^(]*\)/;const y=/,|\.\./;const g=/(?!^)\/{2,}/g;function isStaticPattern(t,r={}){return!isDynamicPattern(t,r)}r.isStaticPattern=isStaticPattern;function isDynamicPattern(t,r={}){if(t===""){return false}if(r.caseSensitiveMatch===false||t.includes(u)){return true}if(h.test(t)||d.test(t)||p.test(t)){return true}if(r.extglob!==false&&m.test(t)){return true}if(r.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}r.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const r=t.indexOf("{");if(r===-1){return false}const i=t.indexOf("}",r+1);if(i===-1){return false}const o=t.slice(r,i);return y.test(o)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}r.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}r.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}r.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}r.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}r.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}r.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}r.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}r.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}r.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return a(t,{flipBackslashes:false})}r.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(l)}r.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+l)}r.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const r=o.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(r)}r.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,r)=>t.concat(expandBraceExpansion(r))),[])}r.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){const r=c.braces(t,{expand:true,nodupes:true});r.sort(((t,r)=>t.length-r.length));return r.filter((t=>t!==""))}r.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,r){let{parts:i}=c.scan(t,Object.assign(Object.assign({},r),{parts:true}));if(i.length===0){i=[t]}if(i[0].startsWith("/")){i[0]=i[0].slice(1);i.unshift("")}return i}r.getPatternParts=getPatternParts;function makeRe(t,r){return c.makeRe(t,r)}r.makeRe=makeRe;function convertPatternsToRe(t,r){return t.map((t=>makeRe(t,r)))}r.convertPatternsToRe=convertPatternsToRe;function matchAny(t,r){return r.some((r=>r.test(t)))}r.matchAny=matchAny;function removeDuplicateSlashes(t){return t.replace(g,"/")}r.removeDuplicateSlashes=removeDuplicateSlashes},9706:(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.merge=void 0;const o=i(9117);function merge(t){const r=o(t);t.forEach((t=>{t.once("error",(t=>r.emit("error",t)))}));r.once("close",(()=>propagateCloseEventToSources(t)));r.once("end",(()=>propagateCloseEventToSources(t)));return r}r.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},7624:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.isEmpty=r.isString=void 0;function isString(t){return typeof t==="string"}r.isString=isString;function isEmpty(t){return t===""}r.isEmpty=isEmpty},6256:(t,r,i)=>{"use strict";var o=i(7327);function fastqueue(t,r,i){if(typeof t==="function"){i=r;r=t;t=null}if(i<1){throw new Error("fastqueue concurrency must be greater than 1")}var a=o(Task);var c=null;var l=null;var u=0;var h=null;var d={push:push,drain:noop,saturated:noop,pause:pause,paused:false,concurrency:i,running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return d;function running(){return u}function pause(){d.paused=true}function length(){var t=c;var r=0;while(t){t=t.next;r++}return r}function getQueue(){var t=c;var r=[];while(t){r.push(t.value);t=t.next}return r}function resume(){if(!d.paused)return;d.paused=false;for(var t=0;t<d.concurrency;t++){u++;release()}}function idle(){return u===0&&d.length()===0}function push(i,o){var p=a.get();p.context=t;p.release=release;p.value=i;p.callback=o||noop;p.errorHandler=h;if(u===d.concurrency||d.paused){if(l){l.next=p;l=p}else{c=p;l=p;d.saturated()}}else{u++;r.call(t,p.value,p.worked)}}function unshift(i,o){var h=a.get();h.context=t;h.release=release;h.value=i;h.callback=o||noop;if(u===d.concurrency||d.paused){if(c){h.next=c;c=h}else{c=h;l=h;d.saturated()}}else{u++;r.call(t,h.value,h.worked)}}function release(i){if(i){a.release(i)}var o=c;if(o){if(!d.paused){if(l===c){l=null}c=o.next;o.next=null;r.call(t,o.value,o.worked);if(l===null){d.empty()}}else{u--}}else if(--u===0){d.drain()}}function kill(){c=null;l=null;d.drain=noop}function killAndDrain(){c=null;l=null;d.drain();d.drain=noop}function error(t){h=t}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var t=this;this.worked=function worked(r,i){var o=t.callback;var a=t.errorHandler;var c=t.value;t.value=null;t.callback=noop;if(t.errorHandler){a(r,c)}o.call(t.context,r,i);t.release(t)}}function queueAsPromised(t,r,i){if(typeof t==="function"){i=r;r=t;t=null}function asyncWrapper(t,i){r.call(this,t).then((function(t){i(null,t)}),i)}var o=fastqueue(t,asyncWrapper,i);var a=o.push;var c=o.unshift;o.push=push;o.unshift=unshift;o.drained=drained;return o;function push(t){var r=new Promise((function(r,i){a(t,(function(t,o){if(t){i(t);return}r(o)}))}));r.catch(noop);return r}function unshift(t){var r=new Promise((function(r,i){c(t,(function(t,o){if(t){i(t);return}r(o)}))}));r.catch(noop);return r}function drained(){if(o.idle()){return new Promise((function(t){t()}))}var t=o.drain;var r=new Promise((function(r){o.drain=function(){t();r()}}));return r}}t.exports=fastqueue;t.exports.promise=queueAsPromised},7783:(t,r,i)=>{"use strict";
|
|
35
35
|
/*!
|
|
36
36
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
37
37
|
*
|
|
38
38
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
39
39
|
* Licensed under the MIT License.
|
|
40
|
-
*/const s=r(3837);const n=r(492);const isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);const transform=e=>t=>e===true?Number(t):String(t);const isValidValue=e=>typeof e==="number"||typeof e==="string"&&e!=="";const isNumber=e=>Number.isInteger(+e);const zeros=e=>{let t=`${e}`;let r=-1;if(t[0]==="-")t=t.slice(1);if(t==="0")return false;while(t[++r]==="0");return r>0};const stringify=(e,t,r)=>{if(typeof e==="string"||typeof t==="string"){return true}return r.stringify===true};const pad=(e,t,r)=>{if(t>0){let r=e[0]==="-"?"-":"";if(r)e=e.slice(1);e=r+e.padStart(r?t-1:t,"0")}if(r===false){return String(e)}return e};const toMaxLen=(e,t)=>{let r=e[0]==="-"?"-":"";if(r){e=e.slice(1);t--}while(e.length<t)e="0"+e;return r?"-"+e:e};const toSequence=(e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0));e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let r=t.capture?"":"?:";let s="";let n="";let i;if(e.positives.length){s=e.positives.join("|")}if(e.negatives.length){n=`-(${r}${e.negatives.join("|")})`}if(s&&n){i=`${s}|${n}`}else{i=s||n}if(t.wrap){return`(${r}${i})`}return i};const toRange=(e,t,r,s)=>{if(r){return n(e,t,{wrap:false,...s})}let i=String.fromCharCode(e);if(e===t)return i;let o=String.fromCharCode(t);return`[${i}-${o}]`};const toRegex=(e,t,r)=>{if(Array.isArray(e)){let t=r.wrap===true;let s=r.capture?"":"?:";return t?`(${s}${e.join("|")})`:e.join("|")}return n(e,t,r)};const rangeError=(...e)=>new RangeError("Invalid range arguments: "+s.inspect(...e));const invalidRange=(e,t,r)=>{if(r.strictRanges===true)throw rangeError([e,t]);return[]};const invalidStep=(e,t)=>{if(t.strictRanges===true){throw new TypeError(`Expected step "${e}" to be a number`)}return[]};const fillNumbers=(e,t,r=1,s={})=>{let n=Number(e);let i=Number(t);if(!Number.isInteger(n)||!Number.isInteger(i)){if(s.strictRanges===true)throw rangeError([e,t]);return[]}if(n===0)n=0;if(i===0)i=0;let o=n>i;let a=String(e);let c=String(t);let l=String(r);r=Math.max(Math.abs(r),1);let u=zeros(a)||zeros(c)||zeros(l);let h=u?Math.max(a.length,c.length,l.length):0;let d=u===false&&stringify(e,t,s)===false;let p=s.transform||transform(d);if(s.toRegex&&r===1){return toRange(toMaxLen(e,h),toMaxLen(t,h),true,s)}let m={negatives:[],positives:[]};let push=e=>m[e<0?"negatives":"positives"].push(Math.abs(e));let y=[];let g=0;while(o?n>=i:n<=i){if(s.toRegex===true&&r>1){push(n)}else{y.push(pad(p(n,g),h,d))}n=o?n-r:n+r;g++}if(s.toRegex===true){return r>1?toSequence(m,s):toRegex(y,null,{wrap:false,...s})}return y};const fillLetters=(e,t,r=1,s={})=>{if(!isNumber(e)&&e.length>1||!isNumber(t)&&t.length>1){return invalidRange(e,t,s)}let n=s.transform||(e=>String.fromCharCode(e));let i=`${e}`.charCodeAt(0);let o=`${t}`.charCodeAt(0);let a=i>o;let c=Math.min(i,o);let l=Math.max(i,o);if(s.toRegex&&r===1){return toRange(c,l,false,s)}let u=[];let h=0;while(a?i>=o:i<=o){u.push(n(i,h));i=a?i-r:i+r;h++}if(s.toRegex===true){return toRegex(u,null,{wrap:false,options:s})}return u};const fill=(e,t,r,s={})=>{if(t==null&&isValidValue(e)){return[e]}if(!isValidValue(e)||!isValidValue(t)){return invalidRange(e,t,s)}if(typeof r==="function"){return fill(e,t,1,{transform:r})}if(isObject(r)){return fill(e,t,0,r)}let n={...s};if(n.capture===true)n.wrap=true;r=r||n.step||1;if(!isNumber(r)){if(r!=null&&!isObject(r))return invalidStep(r,n);return fill(e,t,1,r)}if(isNumber(e)&&isNumber(t)){return fillNumbers(e,t,r,n)}return fillLetters(e,t,Math.max(Math.abs(r),1),n)};e.exports=fill},7517:(e,t,r)=>{"use strict";const s=r(1017);const n=r(3722);e.exports=(e,t={})=>{const r=s.resolve(t.cwd||"");const{root:i}=s.parse(r);const o=[].concat(e);return new Promise((e=>{(function find(t){n(o,{cwd:t}).then((r=>{if(r){e(s.join(t,r))}else if(t===i){e(null)}else{find(s.dirname(t))}}))})(r)}))};e.exports.sync=(e,t={})=>{let r=s.resolve(t.cwd||"");const{root:i}=s.parse(r);const o=[].concat(e);while(true){const e=n.sync(o,{cwd:r});if(e){return s.join(r,e)}if(r===i){return null}r=s.dirname(r)}}},644:(e,t,r)=>{"use strict";const s=r(7413);const n=r(2361).EventEmitter;const i=r(7147);let o=i.writev;if(!o){const e=process.binding("fs");const t=e.FSReqWrap||e.FSReqCallback;o=(r,s,n,i)=>{const done=(e,t)=>i(e,t,s);const o=new t;o.oncomplete=done;e.writeBuffers(r,s,n,o)}}const a=Symbol("_autoClose");const c=Symbol("_close");const l=Symbol("_ended");const u=Symbol("_fd");const h=Symbol("_finished");const d=Symbol("_flags");const p=Symbol("_flush");const m=Symbol("_handleChunk");const y=Symbol("_makeBuf");const g=Symbol("_mode");const v=Symbol("_needDrain");const b=Symbol("_onerror");const w=Symbol("_onopen");const E=Symbol("_onread");const S=Symbol("_onwrite");const x=Symbol("_open");const R=Symbol("_path");const P=Symbol("_pos");const O=Symbol("_queue");const $=Symbol("_read");const A=Symbol("_readSize");const T=Symbol("_reading");const C=Symbol("_remain");const k=Symbol("_size");const I=Symbol("_write");const N=Symbol("_writing");const D=Symbol("_defaultFlag");const L=Symbol("_errored");class ReadStream extends s{constructor(e,t){t=t||{};super(t);this.readable=true;this.writable=false;if(typeof e!=="string")throw new TypeError("path must be a string");this[L]=false;this[u]=typeof t.fd==="number"?t.fd:null;this[R]=e;this[A]=t.readSize||16*1024*1024;this[T]=false;this[k]=typeof t.size==="number"?t.size:Infinity;this[C]=this[k];this[a]=typeof t.autoClose==="boolean"?t.autoClose:true;if(typeof this[u]==="number")this[$]();else this[x]()}get fd(){return this[u]}get path(){return this[R]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[x](){i.open(this[R],"r",((e,t)=>this[w](e,t)))}[w](e,t){if(e)this[b](e);else{this[u]=t;this.emit("open",t);this[$]()}}[y](){return Buffer.allocUnsafe(Math.min(this[A],this[C]))}[$](){if(!this[T]){this[T]=true;const e=this[y]();if(e.length===0)return process.nextTick((()=>this[E](null,0,e)));i.read(this[u],e,0,e.length,null,((e,t,r)=>this[E](e,t,r)))}}[E](e,t,r){this[T]=false;if(e)this[b](e);else if(this[m](t,r))this[$]()}[c](){if(this[a]&&typeof this[u]==="number"){const e=this[u];this[u]=null;i.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}[b](e){this[T]=true;this[c]();this.emit("error",e)}[m](e,t){let r=false;this[C]-=e;if(e>0)r=super.write(e<t.length?t.slice(0,e):t);if(e===0||this[C]<=0){r=false;this[c]();super.end()}return r}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":if(typeof this[u]==="number")this[$]();break;case"error":if(this[L])return;this[L]=true;return super.emit(e,t);default:return super.emit(e,t)}}}class ReadStreamSync extends ReadStream{[x](){let e=true;try{this[w](null,i.openSync(this[R],"r"));e=false}finally{if(e)this[c]()}}[$](){let e=true;try{if(!this[T]){this[T]=true;do{const e=this[y]();const t=e.length===0?0:i.readSync(this[u],e,0,e.length,null);if(!this[m](t,e))break}while(true);this[T]=false}e=false}finally{if(e)this[c]()}}[c](){if(this[a]&&typeof this[u]==="number"){const e=this[u];this[u]=null;i.closeSync(e);this.emit("close")}}}class WriteStream extends n{constructor(e,t){t=t||{};super(t);this.readable=false;this.writable=true;this[L]=false;this[N]=false;this[l]=false;this[v]=false;this[O]=[];this[R]=e;this[u]=typeof t.fd==="number"?t.fd:null;this[g]=t.mode===undefined?438:t.mode;this[P]=typeof t.start==="number"?t.start:null;this[a]=typeof t.autoClose==="boolean"?t.autoClose:true;const r=this[P]!==null?"r+":"w";this[D]=t.flags===undefined;this[d]=this[D]?r:t.flags;if(this[u]===null)this[x]()}emit(e,t){if(e==="error"){if(this[L])return;this[L]=true}return super.emit(e,t)}get fd(){return this[u]}get path(){return this[R]}[b](e){this[c]();this[N]=true;this.emit("error",e)}[x](){i.open(this[R],this[d],this[g],((e,t)=>this[w](e,t)))}[w](e,t){if(this[D]&&this[d]==="r+"&&e&&e.code==="ENOENT"){this[d]="w";this[x]()}else if(e)this[b](e);else{this[u]=t;this.emit("open",t);this[p]()}}end(e,t){if(e)this.write(e,t);this[l]=true;if(!this[N]&&!this[O].length&&typeof this[u]==="number")this[S](null,0);return this}write(e,t){if(typeof e==="string")e=Buffer.from(e,t);if(this[l]){this.emit("error",new Error("write() after end()"));return false}if(this[u]===null||this[N]||this[O].length){this[O].push(e);this[v]=true;return false}this[N]=true;this[I](e);return true}[I](e){i.write(this[u],e,0,e.length,this[P],((e,t)=>this[S](e,t)))}[S](e,t){if(e)this[b](e);else{if(this[P]!==null)this[P]+=t;if(this[O].length)this[p]();else{this[N]=false;if(this[l]&&!this[h]){this[h]=true;this[c]();this.emit("finish")}else if(this[v]){this[v]=false;this.emit("drain")}}}}[p](){if(this[O].length===0){if(this[l])this[S](null,0)}else if(this[O].length===1)this[I](this[O].pop());else{const e=this[O];this[O]=[];o(this[u],e,this[P],((e,t)=>this[S](e,t)))}}[c](){if(this[a]&&typeof this[u]==="number"){const e=this[u];this[u]=null;i.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}}class WriteStreamSync extends WriteStream{[x](){let e;if(this[D]&&this[d]==="r+"){try{e=i.openSync(this[R],this[d],this[g])}catch(e){if(e.code==="ENOENT"){this[d]="w";return this[x]()}else throw e}}else e=i.openSync(this[R],this[d],this[g]);this[w](null,e)}[c](){if(this[a]&&typeof this[u]==="number"){const e=this[u];this[u]=null;i.closeSync(e);this.emit("close")}}[I](e){let t=true;try{this[S](null,i.writeSync(this[u],e,0,e.length,this[P]));t=false}finally{if(t)try{this[c]()}catch(e){}}}}t.ReadStream=ReadStream;t.ReadStreamSync=ReadStreamSync;t.WriteStream=WriteStream;t.WriteStreamSync=WriteStreamSync},1760:(e,t,r)=>{"use strict";const{PassThrough:s}=r(2781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n=r==="buffer";let i=false;if(t){i=!(r||n)}else{r=r||"utf8"}if(n){r=null}const o=new s({objectMode:i});if(r){o.setEncoding(r)}let a=0;const c=[];o.on("data",(e=>{c.push(e);if(i){a=c.length}else{a+=e.length}}));o.getBufferedValue=()=>{if(t){return c}return n?Buffer.concat(c,a):c.join("")};o.getBufferedLength=()=>a;return o}},1401:(e,t,r)=>{"use strict";const s=r(1619);const n=r(1760);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){return Promise.reject(new Error("Expected a stream"))}t={maxBuffer:Infinity,...t};const{maxBuffer:r}=t;let i;await new Promise(((o,a)=>{const rejectPromise=e=>{if(e){e.bufferedData=i.getBufferedValue()}a(e)};i=s(e,n(t),(e=>{if(e){rejectPromise(e);return}o()}));i.on("data",(()=>{if(i.getBufferedLength()>r){rejectPromise(new MaxBufferError)}}))}));return i.getBufferedValue()}e.exports=getStream;e.exports["default"]=getStream;e.exports.buffer=(e,t)=>getStream(e,{...t,encoding:"buffer"});e.exports.array=(e,t)=>getStream(e,{...t,array:true});e.exports.MaxBufferError=MaxBufferError},7741:(e,t,r)=>{"use strict";var s=r(6107);var n=process.env;Object.defineProperty(t,"_vendors",{value:s.map((function(e){return e.constant}))});t.name=null;t.isPR=null;s.forEach((function(e){var r=Array.isArray(e.env)?e.env:[e.env];var s=r.every((function(e){return checkEnv(e)}));t[e.constant]=s;if(s){t.name=e.name;switch(typeof e.pr){case"string":t.isPR=!!n[e.pr];break;case"object":if("env"in e.pr){t.isPR=e.pr.env in n&&n[e.pr.env]!==e.pr.ne}else if("any"in e.pr){t.isPR=e.pr.any.some((function(e){return!!n[e]}))}else{t.isPR=checkEnv(e.pr)}break;default:t.isPR=null}}}));t.isCI=!!(n.CI||n.CONTINUOUS_INTEGRATION||n.BUILD_NUMBER||n.RUN_ID||t.name||false);function checkEnv(e){if(typeof e==="string")return!!n[e];return Object.keys(e).every((function(t){return n[t]===e[t]}))}},7080:(e,t,r)=>{"use strict";var s=r(2755);var n=r(1017).posix.dirname;var i=r(2037).platform()==="win32";var o="/";var a=/\\/g;var c=/[\{\[].*[\}\]]$/;var l=/(^|[^\\])([\{\[]|\([^\)]+$)/;var u=/\\([\!\*\?\|\[\]\(\)\{\}])/g;e.exports=function globParent(e,t){var r=Object.assign({flipBackslashes:true},t);if(r.flipBackslashes&&i&&e.indexOf(o)<0){e=e.replace(a,o)}if(c.test(e)){e+=o}e+="a";do{e=n(e)}while(s(e)||l.test(e));return e.replace(u,"$1")}},4903:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(2361);const n=r(1401);const i=r(3426);const o=r(5773);const a=r(5396);const c=r(7812);const l=r(9943);const parseBody=(e,t,r)=>{if(t==="json"){return e.length===0?"":JSON.parse(e.toString())}if(t==="buffer"){return Buffer.from(e)}if(t==="text"){return e.toString(r)}throw new TypeError(`Unknown body type '${t}'`)};function createRejection(e){const t=Promise.reject(e);const returnPromise=()=>t;t.json=returnPromise;t.text=returnPromise;t.buffer=returnPromise;t.on=returnPromise;return t}t.createRejection=createRejection;function asPromise(e){const t=new s;let r;const u=new i(((s,i,o)=>{const u=l.default(e);o(u.abort);const emitError=async t=>{try{for(const r of e.hooks.beforeError){t=await r(t)}i(t)}catch(e){i(e)}};u.on("response",(async i=>{var l;t.emit("response",i);try{r=await n.buffer(i,{encoding:"binary"})}catch(t){emitError(new a.ReadError(t,e));return}if((l=i.req)===null||l===void 0?void 0:l.aborted){return}const isOk=()=>{const{statusCode:t}=i;const r=e.followRedirect?299:399;return t>=200&&t<=r||t===304};try{i.body=parseBody(r,e.responseType,e.encoding)}catch(t){i.body=r.toString();if(isOk()){const r=new a.ParseError(t,i,e);emitError(r);return}}try{for(const[t,r]of e.hooks.afterResponse.entries()){i=await r(i,(async r=>{const s=c.normalizeArguments(c.mergeOptions(e,{...r,retry:{calculateDelay:()=>0},throwHttpErrors:false,resolveBodyOnly:false}));s.hooks.afterResponse=e.hooks.afterResponse.slice(0,t);for(const t of e.hooks.beforeRetry){await t(s)}const n=asPromise(s);o((()=>{n.catch((()=>{}));n.cancel()}));return n}))}}catch(e){emitError(e);return}if(!isOk()){const t=new a.HTTPError(i,e);if(u.retry(t)){return}if(e.throwHttpErrors){emitError(t);return}}s(e.resolveBodyOnly?i.body:i)}));u.once("error",i);l.proxyEvents(t,u)}));u.on=(e,r)=>{t.on(e,r);return u};const shortcut=t=>{const s=u.then((()=>parseBody(r,t,e.encoding)));Object.defineProperties(s,Object.getOwnPropertyDescriptors(u));return s};u.json=()=>{if(o.default.undefined(r)&&o.default.undefined(e.headers.accept)){e.headers.accept="application/json"}return shortcut("json")};u.buffer=()=>shortcut("buffer");u.text=()=>shortcut("text");return u}t["default"]=asPromise},7798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(8623);const n=r(3685);const i=r(2781);const o=r(5396);const a=r(9943);class ProxyStream extends i.Duplex{}t.ProxyStream=ProxyStream;function asStream(e){const t=new i.PassThrough;const r=new i.PassThrough;const c=s(t,r);const l=new Set;let u=false;e.retry.calculateDelay=()=>0;if(e.body||e.json||e.form){c.write=()=>{c.destroy();throw new Error("Got's stream is not writable when the `body`, `json` or `form` option is used")}}else if(e.method==="POST"||e.method==="PUT"||e.method==="PATCH"||e.allowGetBody&&e.method==="GET"){e.body=t}else{c.write=()=>{c.destroy();throw new TypeError(`The \`${e.method}\` method cannot be used with a body`)}}const h=a.default(e);const emitError=async t=>{try{for(const r of e.hooks.beforeError){t=await r(t)}c.emit("error",t)}catch(e){c.emit("error",e)}};c._destroy=(e,t)=>{t(e);h.abort()};h.on("response",(t=>{const{statusCode:s,isFromCache:n}=t;c.isFromCache=n;if(e.throwHttpErrors&&s!==304&&(s<200||s>299)){emitError(new o.HTTPError(t,e));return}{const e=c._read;c._read=(...t)=>{u=true;c._read=e;return e.apply(c,t)}}if(e.encoding){c.setEncoding(e.encoding)}t.pipe(r);t.once("error",(t=>{emitError(new o.ReadError(t,e))}));for(const r of l){if(r.headersSent){continue}for(const[s,n]of Object.entries(t.headers)){const t=e.decompress?s!=="content-encoding":true;if(t){r.setHeader(s,n)}}r.statusCode=t.statusCode}c.emit("response",t)}));a.proxyEvents(c,h);h.on("error",(e=>c.emit("error",e)));const d=c.pipe.bind(c);const p=c.unpipe.bind(c);c.pipe=(e,t)=>{if(u){throw new Error("Failed to pipe. The response has been emitted already.")}d(e,t);if(e instanceof n.ServerResponse){l.add(e)}return e};c.unpipe=e=>{l.delete(e);return p(e)};c.on("pipe",(t=>{if(t instanceof n.IncomingMessage){e.headers={...t.headers,...e.headers}}}));c.isFromCache=undefined;return c}t["default"]=asStream},8929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5773);const n=r(5396);const i=new Set([413,429,503]);const isErrorWithResponse=e=>e instanceof n.HTTPError||e instanceof n.ParseError||e instanceof n.MaxRedirectsError;const calculateRetryDelay=({attemptCount:e,retryOptions:t,error:r})=>{if(e>t.limit){return 0}const n=t.methods.includes(r.options.method);const o=Reflect.has(r,"code")&&t.errorCodes.includes(r.code);const a=isErrorWithResponse(r)&&t.statusCodes.includes(r.response.statusCode);if(!n||!o&&!a){return 0}if(isErrorWithResponse(r)){const{response:e}=r;if(e&&Reflect.has(e.headers,"retry-after")&&i.has(e.statusCode)){let r=Number(e.headers["retry-after"]);if(s.default.nan(r)){r=Date.parse(e.headers["retry-after"])-Date.now()}else{r*=1e3}if(r>t.maxRetryAfter){return 0}return r}if(e.statusCode===413){return 0}}const c=Math.random()*100;return 2**(e-1)*1e3+c};t["default"]=calculateRetryDelay},3511:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5773);const n=r(4903);const i=r(7798);const o=r(5396);const a=r(7812);const c=r(9811);const getPromiseOrStream=e=>e.isStream?i.default(e):n.default(e);const isGotInstance=e=>Reflect.has(e,"defaults")&&Reflect.has(e.defaults,"options");const l=["get","post","put","patch","head","delete"];t.defaultHandler=(e,t)=>t(e);const create=e=>{e._rawHandlers=e.handlers;e.handlers=e.handlers.map((e=>(t,r)=>{let s;const n=e(t,(e=>{s=r(e);return s}));if(n!==s&&!t.isStream&&s){const e=n;const{then:t,catch:r,finally:i}=e;Object.setPrototypeOf(e,Object.getPrototypeOf(s));Object.defineProperties(e,Object.getOwnPropertyDescriptors(s));e.then=t;e.catch=r;e.finally=i}return n}));const got=(t,r)=>{var s;let i=0;const iterateHandlers=t=>e.handlers[i++](t,i===e.handlers.length?getPromiseOrStream:iterateHandlers);try{return iterateHandlers(a.normalizeArguments(t,r,e))}catch(e){if((s=r)===null||s===void 0?void 0:s.isStream){throw e}else{return n.createRejection(e)}}};got.extend=(...r)=>{const s=[e.options];let n=[...e._rawHandlers];let i;for(const e of r){if(isGotInstance(e)){s.push(e.defaults.options);n.push(...e.defaults._rawHandlers);i=e.defaults.mutableDefaults}else{s.push(e);if(Reflect.has(e,"handlers")){n.push(...e.handlers)}i=e.mutableDefaults}}n=n.filter((e=>e!==t.defaultHandler));if(n.length===0){n.push(t.defaultHandler)}return create({options:a.mergeOptions(...s),handlers:n,mutableDefaults:Boolean(i)})};got.stream=(e,t)=>got(e,{...t,isStream:true});for(const e of l){got[e]=(t,r)=>got(t,{...r,method:e});got.stream[e]=(t,r)=>got.stream(t,{...r,method:e})}got.paginate=async function*(t,r){let n=a.normalizeArguments(t,r,e);const i=n._pagination;if(!s.default.object(i)){throw new Error("`options._pagination` must be implemented")}const o=[];while(true){const e=await got(n);const t=await i.transform(e);const r=[];for(const e of t){if(i.filter(e,o,r)){if(!i.shouldContinue(e,o,r)){return}yield e;o.push(e);r.push(e);if(o.length===i.countLimit){return}}}const s=i.paginate(e,o,r);if(s===false){return}if(s!==undefined){n=a.normalizeArguments(n,s)}}};got.paginate.all=async(e,t)=>{const r=[];for await(const s of got.paginate(e,t)){r.push(s)}return r};Object.assign(got,{...o,mergeOptions:a.mergeOptions});Object.defineProperty(got,"defaults",{value:e.mutableDefaults?e:c.default(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:true});return got};t["default"]=create},5396:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5773);class GotError extends Error{constructor(e,t,r){super(e);Error.captureStackTrace(this,this.constructor);this.name="GotError";if(!s.default.undefined(t.code)){this.code=t.code}Object.defineProperty(this,"options",{enumerable:false,value:r});if(!s.default.undefined(t.stack)){const e=this.stack.indexOf(this.message)+this.message.length;const r=this.stack.slice(e).split("\n").reverse();const s=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();while(s.length!==0&&s[0]===r[0]){r.shift()}this.stack=`${this.stack.slice(0,e)}${r.reverse().join("\n")}${s.reverse().join("\n")}`}}}t.GotError=GotError;class CacheError extends GotError{constructor(e,t){super(e.message,e,t);this.name="CacheError"}}t.CacheError=CacheError;class RequestError extends GotError{constructor(e,t){super(e.message,e,t);this.name="RequestError"}}t.RequestError=RequestError;class ReadError extends GotError{constructor(e,t){super(e.message,e,t);this.name="ReadError"}}t.ReadError=ReadError;class ParseError extends GotError{constructor(e,t,r){super(`${e.message} in "${r.url.toString()}"`,e,r);this.name="ParseError";Object.defineProperty(this,"response",{enumerable:false,value:t})}}t.ParseError=ParseError;class HTTPError extends GotError{constructor(e,t){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},t);this.name="HTTPError";Object.defineProperty(this,"response",{enumerable:false,value:e})}}t.HTTPError=HTTPError;class MaxRedirectsError extends GotError{constructor(e,t,r){super(`Redirected ${t} times. Aborting.`,{},r);this.name="MaxRedirectsError";Object.defineProperty(this,"response",{enumerable:false,value:e})}}t.MaxRedirectsError=MaxRedirectsError;class UnsupportedProtocolError extends GotError{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError"}}t.UnsupportedProtocolError=UnsupportedProtocolError;class TimeoutError extends GotError{constructor(e,t,r){super(e.message,e,r);this.name="TimeoutError";this.event=e.event;this.timings=t}}t.TimeoutError=TimeoutError;var n=r(3426);t.CancelError=n.CancelError},4991:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5278);const n=r(5479);const i=r(2781);const o=r(3837);const a=r(2579);const c=o.promisify(i.pipeline);t["default"]=async(e,t,r)=>{var i;const o=Number(e.headers["content-length"])||undefined;const l=a.createProgressStream("downloadProgress",r,o);n(e,l);const u=t.decompress&&t.method!=="HEAD"?s(l):l;if(!t.decompress&&["gzip","deflate","br"].includes((i=u.headers["content-encoding"],i!==null&&i!==void 0?i:""))){t.responseType="buffer"}r.emit("response",u);return c(e,l).catch((e=>{if(e.code!=="ERR_STREAM_PREMATURE_CLOSE"){throw e}}))}},9312:(e,t,r)=>{"use strict";function __export(e){for(var r in e)if(!t.hasOwnProperty(r))t[r]=e[r]}Object.defineProperty(t,"__esModule",{value:true});const s=r(7310);const n=r(3511);const i={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:undefined,calculateDelay:({computedValue:e})=>e},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},decompress:true,throwHttpErrors:true,followRedirect:true,isStream:false,cache:false,dnsCache:false,useElectronNet:false,responseType:"text",resolveBodyOnly:false,maxRedirects:10,prefixUrl:"",methodRewriting:true,allowGetBody:false,ignoreInvalidCookies:false,context:{},_pagination:{transform:e=>{if(e.request.options.responseType==="json"){return e.body}return JSON.parse(e.body)},paginate:e=>{if(!Reflect.has(e.headers,"link")){return false}const t=e.headers.link.split(",");let r;for(const e of t){const t=e.split(";");if(t[1].includes("next")){r=t[0].trimStart().trim();r=r.slice(1,-1);break}}if(r){const e={url:new s.URL(r)};return e}return false},filter:()=>true,shouldContinue:()=>true,countLimit:Infinity}},handlers:[n.defaultHandler],mutableDefaults:false};const o=n.default(i);t["default"]=o;e.exports=o;e.exports["default"]=o;__export(r(86));var a=r(7798);t.ResponseStream=a.ProxyStream;var c=r(5396);t.GotError=c.GotError;t.CacheError=c.CacheError;t.RequestError=c.RequestError;t.ReadError=c.ReadError;t.ParseError=c.ParseError;t.HTTPError=c.HTTPError;t.MaxRedirectsError=c.MaxRedirectsError;t.UnsupportedProtocolError=c.UnsupportedProtocolError;t.TimeoutError=c.TimeoutError;t.CancelError=c.CancelError},7847:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=["beforeError","init","beforeRequest","beforeRedirect","beforeRetry","afterResponse"];t["default"]=r},7812:(e,t,r)=>{"use strict";e=r.nmd(e);Object.defineProperty(t,"__esModule",{value:true});const s=r(7310);const n=r(3837);const i=r(190);const o=r(3685);const a=r(5687);const c=r(4162);const l=r(3132);const u=r(5773);const h=r(2468);const d=r(5396);const p=r(7847);const m=r(3163);const y=r(9036);const g=r(4715);const v=r(7450);const b=r(6834);const w=r(9116);const E=r(86);const S=["context","body","json","form"];const isAgentByProtocol=e=>u.default.object(e);t.preNormalizeArguments=(e,t)=>{var r,s,o,a,l,d;if(u.default.undefined(e.headers)){e.headers={}}else{e.headers=c(e.headers)}for(const[t,r]of Object.entries(e.headers)){if(u.default.null_(r)){throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${t}\` header`)}}if(u.default.urlInstance(e.prefixUrl)||u.default.string(e.prefixUrl)){e.prefixUrl=e.prefixUrl.toString();if(e.prefixUrl.length!==0&&!e.prefixUrl.endsWith("/")){e.prefixUrl+="/"}}else{e.prefixUrl=t?t.prefixUrl:""}if(u.default.undefined(e.hooks)){e.hooks={}}if(u.default.object(e.hooks)){for(const t of p.default){if(Reflect.has(e.hooks,t)){if(!u.default.array(e.hooks[t])){throw new TypeError(`Parameter \`${t}\` must be an Array, not ${u.default(e.hooks[t])}`)}}else{e.hooks[t]=[]}}}else{throw new TypeError(`Parameter \`hooks\` must be an Object, not ${u.default(e.hooks)}`)}if(t){for(const r of p.default){if(!(Reflect.has(e.hooks,r)&&u.default.undefined(e.hooks[r]))){e.hooks[r]=[...t.hooks[r],...e.hooks[r]]}}}if(u.default.number(e.timeout)){e.timeout={request:e.timeout}}else if(!u.default.object(e.timeout)){e.timeout={}}const{retry:m}=e;if(t){e.retry={...t.retry}}else{e.retry={calculateDelay:e=>e.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:undefined}}if(u.default.object(m)){e.retry={...e.retry,...m}}else if(u.default.number(m)){e.retry.limit=m}if(e.retry.maxRetryAfter===undefined){e.retry.maxRetryAfter=Math.min(...[e.timeout.request,e.timeout.connect].filter((e=>!u.default.nullOrUndefined(e))))}e.retry.methods=[...new Set(e.retry.methods.map((e=>e.toUpperCase())))];e.retry.statusCodes=[...new Set(e.retry.statusCodes)];e.retry.errorCodes=[...new Set(e.retry.errorCodes)];if(e.dnsCache&&!(e.dnsCache instanceof h.default)){e.dnsCache=new h.default({cacheAdapter:e.dnsCache})}if(u.default.string(e.method)){e.method=e.method.toUpperCase()}else{e.method=(s=(r=t)===null||r===void 0?void 0:r.method,s!==null&&s!==void 0?s:"GET")}if(e.cache){e.cacheableRequest=new i(((e,t)=>e[E.requestSymbol](e,t)),e.cache)}if(u.default.object(e.cookieJar)){let{setCookie:t,getCookieString:r}=e.cookieJar;if(t.length===4&&r.length===0){if(!Reflect.has(t,n.promisify.custom)){t=n.promisify(t.bind(e.cookieJar));r=n.promisify(r.bind(e.cookieJar))}}else if(t.length!==2){throw new TypeError("`options.cookieJar.setCookie` needs to be an async function with 2 arguments")}else if(r.length!==1){throw new TypeError("`options.cookieJar.getCookieString` needs to be an async function with 1 argument")}e.cookieJar={setCookie:t,getCookieString:r}}if(u.default.null_(e.encoding)){throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead")}if(!Reflect.has(e,"maxRedirects")&&!(t&&Reflect.has(t,"maxRedirects"))){e.maxRedirects=0}if(t){e=v.default({},t,e)}if(u.default.object(e._pagination)){const{_pagination:t}=e;if(!u.default.function_(t.transform)){throw new TypeError("`options._pagination.transform` must be implemented")}if(!u.default.function_(t.shouldContinue)){throw new TypeError("`options._pagination.shouldContinue` must be implemented")}if(!u.default.function_(t.filter)){throw new TypeError("`options._pagination.filter` must be implemented")}if(!u.default.function_(t.paginate)){throw new TypeError("`options._pagination.paginate` must be implemented")}}e.decompress=Boolean(e.decompress);e.isStream=Boolean(e.isStream);e.throwHttpErrors=Boolean(e.throwHttpErrors);e.ignoreInvalidCookies=Boolean(e.ignoreInvalidCookies);e.cache=(o=e.cache,o!==null&&o!==void 0?o:false);e.responseType=(a=e.responseType,a!==null&&a!==void 0?a:"text");e.resolveBodyOnly=Boolean(e.resolveBodyOnly);e.followRedirect=Boolean(e.followRedirect);e.dnsCache=(l=e.dnsCache,l!==null&&l!==void 0?l:false);e.useElectronNet=Boolean(e.useElectronNet);e.methodRewriting=Boolean(e.methodRewriting);e.allowGetBody=Boolean(e.allowGetBody);e.context=(d=e.context,d!==null&&d!==void 0?d:{});return e};t.mergeOptions=(...e)=>{let r=t.preNormalizeArguments({});const s={};for(const n of e){r=t.preNormalizeArguments(v.default({},n),r);for(const e of S){if(!Reflect.has(n,e)){continue}s[e]={writable:true,configurable:true,enumerable:false,value:n[e]}}}Object.defineProperties(r,s);return r};t.normalizeArguments=(e,r,n)=>{var i,o,a,c,l,h,d,p,m,y;if(typeof e==="undefined"){throw new TypeError("Missing `url` argument")}const runInitHooks=(e,t)=>{if(e&&t){for(const r of e){const e=r(t);if(u.default.promise(e)){throw new TypeError("The `init` hook must be a synchronous function")}}}};const g=u.default.urlInstance(e)||u.default.string(e);if(g){if(r){if(Reflect.has(r,"url")){throw new TypeError("The `url` option cannot be used if the input is a valid URL.")}}else{r={}}r.url=e;runInitHooks((i=n)===null||i===void 0?void 0:i.options.hooks.init,r);runInitHooks((o=r.hooks)===null||o===void 0?void 0:o.init,r)}else if(Reflect.has(e,"resolve")){throw new Error("The legacy `url.Url` is deprecated. Use `URL` instead.")}else{runInitHooks((a=n)===null||a===void 0?void 0:a.options.hooks.init,e);runInitHooks((c=e.hooks)===null||c===void 0?void 0:c.init,e);if(r){runInitHooks((l=n)===null||l===void 0?void 0:l.options.hooks.init,r);runInitHooks((h=r.hooks)===null||h===void 0?void 0:h.init,r)}}if(g){r=t.mergeOptions((p=(d=n)===null||d===void 0?void 0:d.options,p!==null&&p!==void 0?p:{}),r!==null&&r!==void 0?r:{})}else{r=t.mergeOptions((y=(m=n)===null||m===void 0?void 0:m.options,y!==null&&y!==void 0?y:{}),e,r!==null&&r!==void 0?r:{})}if(u.default.string(r.url)){r.url=r.prefixUrl+r.url;r.url=r.url.replace(/^unix:/,"http://$&");if(r.searchParams||r.search){r.url=r.url.split("?")[0]}r.url=b.default({origin:r.url,...r})}else if(!u.default.urlInstance(r.url)){r.url=b.default({origin:r.prefixUrl,...r})}const v=r;let w=r.prefixUrl;Object.defineProperty(v,"prefixUrl",{set:e=>{if(!v.url.href.startsWith(e)){throw new Error(`Cannot change \`prefixUrl\` from ${w} to ${e}: ${v.url.href}`)}v.url=new s.URL(e+v.url.href.slice(w.length));w=e},get:()=>w});for(const[e,t]of Object.entries(v.headers)){if(u.default.undefined(t)){delete v.headers[e]}}return v};const x=new Set(["HEAD"]);const R="GET";t.normalizeRequestArguments=async r=>{var i,c,h;r=t.mergeOptions(r);const{headers:p}=r;const v=u.default.undefined(p["content-type"]);{const e=!u.default.undefined(r.form);const t=!u.default.undefined(r.json);const s=!u.default.undefined(r.body);if((s||e||t)&&x.has(r.method)){throw new TypeError(`The \`${r.method}\` method cannot be used with a body`)}if(!r.allowGetBody&&(s||e||t)&&R===r.method){throw new TypeError(`The \`${r.method}\` method cannot be used with a body`)}if([s,e,t].filter((e=>e)).length>1){throw new TypeError("The `body`, `json` and `form` options are mutually exclusive")}if(s&&!u.default.nodeStream(r.body)&&!u.default.string(r.body)&&!u.default.buffer(r.body)&&!(u.default.object(r.body)&&g.default(r.body))){throw new TypeError("The `body` option must be a stream.Readable, string or Buffer")}if(e&&!u.default.object(r.form)){throw new TypeError("The `form` option must be an Object")}}if(r.body){if(u.default.object(r.body)&&g.default(r.body)&&v){p["content-type"]=`multipart/form-data; boundary=${r.body.getBoundary()}`}}else if(r.form){if(v){p["content-type"]="application/x-www-form-urlencoded"}r.body=new s.URLSearchParams(r.form).toString()}else if(r.json){if(v){p["content-type"]="application/json"}r.body=JSON.stringify(r.json)}const b=await y.default(r);if(!u.default.nodeStream(r.body)){r.body=l(r.body)}if(u.default.undefined(p["content-length"])&&u.default.undefined(p["transfer-encoding"])){if((r.method==="POST"||r.method==="PUT"||r.method==="PATCH"||r.method==="DELETE"||r.allowGetBody&&r.method==="GET")&&!u.default.undefined(b)){p["content-length"]=String(b)}}if(!r.isStream&&r.responseType==="json"&&u.default.undefined(p.accept)){p.accept="application/json"}if(r.decompress&&u.default.undefined(p["accept-encoding"])){p["accept-encoding"]=w.default?"gzip, deflate, br":"gzip, deflate"}if(r.url.protocol!=="http:"&&r.url.protocol!=="https:"){throw new d.UnsupportedProtocolError(r)}decodeURI(r.url.toString());if(u.default.function_(r.request)){r[E.requestSymbol]=r.request;delete r.request}else{r[E.requestSymbol]=r.url.protocol==="https:"?a.request:o.request}if(r.url.hostname==="unix"){const e=/(?<socketPath>.+?):(?<path>.+)/.exec(r.url.pathname);if((i=e)===null||i===void 0?void 0:i.groups){const{socketPath:t,path:s}=e.groups;r={...r,socketPath:t,path:s,host:""}}}if(isAgentByProtocol(r.agent)){r.agent=(c=r.agent[r.url.protocol.slice(0,-1)],c!==null&&c!==void 0?c:r.agent)}if(r.dnsCache){r.lookup=r.dnsCache.lookup}if(r.useElectronNet&&process.versions.electron){const t=m.default(e,"electron");r.request=n.deprecate((h=t.net.request,h!==null&&h!==void 0?h:t.remote.net.request),"Electron support has been deprecated and will be removed in Got 11.\n"+"See https://github.com/sindresorhus/got/issues/899 for further information.","GOT_ELECTRON")}delete r.timeout;if(r.cookieJar){const e=await r.cookieJar.getCookieString(r.url.toString());if(u.default.nonEmptyString(e)){r.headers.cookie=e}else{delete r.headers.cookie}}delete r.url;return r}},2579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(2781);const n=r(5773);function createProgressStream(e,t,r){let i=0;if(n.default.string(r)){r=Number(r)}const o=new s.Transform({transform(s,n,o){i+=s.length;const a=r?i/r:0;if(a<1){t.emit(e,{percent:a,transferred:i,total:r})}o(undefined,s)},flush(s){t.emit(e,{percent:1,transferred:i,total:r});s()}});t.emit(e,{percent:0,transferred:0,total:r});return o}t.createProgressStream=createProgressStream},9943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7147);const n=r(190);const i=r(2361);const o=r(3685);const a=r(2781);const c=r(7310);const l=r(3837);const u=r(5773);const h=r(5201);const d=r(8929);const p=r(5396);const m=r(4991);const y=r(7812);const g=r(2579);const v=r(3341);const b=r(86);const w=r(2653);const E=r(6291);const setImmediateAsync=async()=>new Promise((e=>setImmediate(e)));const S=l.promisify(a.pipeline);const x=new Set([300,301,302,303,304,307,308]);t["default"]=e=>{const t=new i;const r=e.url.toString();const a=[];let l=0;let R;const isAborted=()=>typeof R.aborted==="number"||R.aborted;const emitError=async r=>{try{for(const t of e.hooks.beforeError){r=await t(r)}t.emit("error",r)}catch(e){t.emit("error",e)}};const get=async()=>{let s=await y.normalizeRequestArguments(e);const handleResponse=async s=>{var n;try{if(e.useElectronNet){s=new Proxy(s,{get:(e,t)=>{if(t==="trailers"||t==="rawTrailers"){return[]}const r=e[t];return u.default.function_(r)?r.bind(e):r}})}const i=s;const{statusCode:h}=i;i.statusMessage=u.default.nonEmptyString(i.statusMessage)?i.statusMessage:o.STATUS_CODES[h];i.url=e.url.toString();i.requestUrl=r;i.retryCount=l;i.redirectUrls=a;i.request={options:e};i.isFromCache=(n=i.fromCache,n!==null&&n!==void 0?n:false);delete i.fromCache;if(!i.isFromCache){i.ip=s.socket.remoteAddress}const d=i.headers["set-cookie"];if(Reflect.has(e,"cookieJar")&&d){let t=d.map((async t=>e.cookieJar.setCookie(t,i.url)));if(e.ignoreInvalidCookies){t=t.map((async e=>e.catch((()=>{}))))}await Promise.all(t)}if(e.followRedirect&&Reflect.has(i.headers,"location")&&x.has(h)){i.resume();if(h===303||e.methodRewriting===false){if(e.method!=="GET"&&e.method!=="HEAD"){e.method="GET"}if(Reflect.has(e,"body")){delete e.body}if(Reflect.has(e,"json")){delete e.json}if(Reflect.has(e,"form")){delete e.form}}if(a.length>=e.maxRedirects){throw new p.MaxRedirectsError(i,e.maxRedirects,e)}const r=Buffer.from(i.headers.location,"binary").toString();const n=new c.URL(r,e.url);if(n.hostname!==e.url.hostname&&Reflect.has(e.headers,"cookie")){delete e.headers.cookie}a.push(n.toString());e.url=n;for(const t of e.hooks.beforeRedirect){await t(e,i)}t.emit("redirect",s,e);await get();return}await m.default(i,e,t)}catch(e){emitError(e)}};const handleRequest=async r=>{let n=false;let i=false;r.once("finish",(()=>{i=true}));R=r;const onError=s=>{if(s instanceof v.TimeoutError){s=new p.TimeoutError(s,r.timings,e)}else{s=new p.RequestError(s,e)}if(!t.retry(s)){emitError(s)}};r.on("error",(e=>{if(n){if(!i){return}if(isAborted()&&!(e instanceof v.TimeoutError)){return}}onError(e)}));try{h.default(r);v.default(r,e.timeout,e.url);t.emit("request",r);const i=g.createProgressStream("uploadProgress",t,s.headers["content-length"]);n=true;await S(s.body,i,r);r.emit("upload-complete")}catch(e){if(isAborted()&&e.message==="Premature close"){return}onError(e)}};if(e.cache){s={...s,...w.default(e.url)};const t=e.cacheableRequest(s,handleResponse);t.once("error",(t=>{if(t instanceof n.RequestError){emitError(new p.RequestError(t,e))}else{emitError(new p.CacheError(t,e))}}));t.once("request",handleRequest)}else{try{handleRequest(s[b.requestSymbol](e.url,s,handleResponse))}catch(t){emitError(new p.RequestError(t,e))}}};t.retry=t=>{let r;l++;try{r=e.retry.calculateDelay({attemptCount:l,retryOptions:e.retry,error:t,computedValue:d.default({attemptCount:l,retryOptions:e.retry,error:t,computedValue:0})})}catch(e){emitError(e);return false}if(r){const retry=async e=>{try{for(const r of e.hooks.beforeRetry){await r(e,t,l)}await get()}catch(e){emitError(e)}};setTimeout(retry,r,{...e,forceRefresh:true});return true}return false};t.abort=()=>{t.prependListener("request",(e=>{e.abort()}));if(R){R.abort()}};(async()=>{try{if(e.body instanceof s.ReadStream){await E(e.body,"open")}await setImmediateAsync();for(const t of e.hooks.beforeRequest){await t(e)}await get()}catch(e){emitError(e)}})();return t};t.proxyEvents=(e,t)=>{const r=["request","redirect","uploadProgress","downloadProgress"];for(const s of r){t.on(s,((...t)=>{e.emit(s,...t)}))}}},86:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.requestSymbol=Symbol("request")},9811:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5773);function deepFreeze(e){for(const t of Object.values(e)){if(s.default.plainObject(t)||s.default.array(t)){deepFreeze(t)}}return Object.freeze(e)}t["default"]=deepFreeze},3163:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=(e,t)=>e.require(t)},9036:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7147);const n=r(3837);const i=r(5773);const o=r(4715);const a=n.promisify(s.stat);t["default"]=async e=>{const{body:t,headers:r}=e;if(r&&"content-length"in r){return Number(r["content-length"])}if(!t){return 0}if(i.default.string(t)){return Buffer.byteLength(t)}if(i.default.buffer(t)){return t.length}if(o.default(t)){return n.promisify(t.getLength.bind(t))()}if(t instanceof s.ReadStream){const{size:e}=await a(t.path);return e}return undefined}},4715:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5773);t["default"]=e=>s.default.nodeStream(e)&&s.default.function_(e.getBoundary)},7450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7310);const n=r(5773);function merge(e,...t){for(const r of t){for(const[t,i]of Object.entries(r)){const r=e[t];if(n.default.urlInstance(r)&&n.default.string(i)){e[t]=new s.URL(i,r)}else if(n.default.plainObject(i)){if(n.default.plainObject(r)){e[t]=merge({},r,i)}else{e[t]=merge({},i)}}else if(n.default.array(i)){e[t]=i.slice()}else{e[t]=i}}}return e}t["default"]=merge},6834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7310);function validateSearchParams(e){for(const t of Object.values(e)){if(typeof t!=="string"&&typeof t!=="number"&&typeof t!=="boolean"&&t!==null){throw new TypeError(`The \`searchParams\` value '${String(t)}' must be a string, number, boolean or null`)}}}const n=["protocol","username","password","host","hostname","port","pathname","search","hash"];t["default"]=e=>{var t,r;let i;if(e.path){if(e.pathname){throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.")}if(e.search){throw new TypeError("Parameters `path` and `search` are mutually exclusive.")}if(e.searchParams){throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}}if(Reflect.has(e,"auth")){throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.")}if(e.search&&e.searchParams){throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.")}if(e.href){return new s.URL(e.href)}if(e.origin){i=e.origin}else{if(!e.protocol){throw new TypeError("No URL protocol specified")}i=`${e.protocol}//${r=(t=e.hostname,t!==null&&t!==void 0?t:e.host),r!==null&&r!==void 0?r:""}`}const o=new s.URL(i);if(e.path){const t=e.path.indexOf("?");if(t===-1){e.pathname=e.path}else{e.pathname=e.path.slice(0,t);e.search=e.path.slice(t+1)}}if(Reflect.has(e,"path")){delete e.path}for(const t of n){if(Reflect.has(e,t)){o[t]=e[t].toString()}}if(e.searchParams){if(typeof e.searchParams!=="string"&&!(e.searchParams instanceof s.URLSearchParams)){validateSearchParams(e.searchParams)}new s.URLSearchParams(e.searchParams).forEach(((e,t)=>{o.searchParams.append(t,e)}))}return o}},9116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(9796);t["default"]=typeof s.createBrotliDecompress==="function"},3341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(1808);const n=r(7826);const i=Symbol("reentry");const noop=()=>{};class TimeoutError extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`);this.event=t;this.name="TimeoutError";this.code="ETIMEDOUT"}}t.TimeoutError=TimeoutError;t["default"]=(e,t,r)=>{if(Reflect.has(e,i)){return noop}e[i]=true;const o=[];const{once:a,unhandleAll:c}=n.default();const addTimeout=(e,t,r)=>{var s,n;const i=setTimeout(t,e,e,r);(n=(s=i).unref)===null||n===void 0?void 0:n.call(s);const cancel=()=>{clearTimeout(i)};o.push(cancel);return cancel};const{host:l,hostname:u}=r;const timeoutHandler=(t,r)=>{if(e.socket){e.socket._hadError=true}e.abort();e.emit("error",new TimeoutError(t,r))};const cancelTimeouts=()=>{for(const e of o){e()}c()};e.once("error",(t=>{cancelTimeouts();if(e.listenerCount("error")===0){throw t}}));e.once("abort",cancelTimeouts);a(e,"response",(e=>{a(e,"end",cancelTimeouts)}));if(typeof t.request!=="undefined"){addTimeout(t.request,timeoutHandler,"request")}if(typeof t.socket!=="undefined"){const socketTimeoutHandler=()=>{timeoutHandler(t.socket,"socket")};e.setTimeout(t.socket,socketTimeoutHandler);o.push((()=>{e.removeListener("timeout",socketTimeoutHandler)}))}a(e,"socket",(n=>{var i;const{socketPath:o}=e;if(n.connecting){const e=Boolean(o!==null&&o!==void 0?o:s.isIP((i=u!==null&&u!==void 0?u:l,i!==null&&i!==void 0?i:""))!==0);if(typeof t.lookup!=="undefined"&&!e&&typeof n.address().address==="undefined"){const e=addTimeout(t.lookup,timeoutHandler,"lookup");a(n,"lookup",e)}if(typeof t.connect!=="undefined"){const timeConnect=()=>addTimeout(t.connect,timeoutHandler,"connect");if(e){a(n,"connect",timeConnect())}else{a(n,"lookup",(e=>{if(e===null){a(n,"connect",timeConnect())}}))}}if(typeof t.secureConnect!=="undefined"&&r.protocol==="https:"){a(n,"connect",(()=>{const e=addTimeout(t.secureConnect,timeoutHandler,"secureConnect");a(n,"secureConnect",e)}))}}if(typeof t.send!=="undefined"){const timeRequest=()=>addTimeout(t.send,timeoutHandler,"send");if(n.connecting){a(n,"connect",(()=>{a(e,"upload-complete",timeRequest())}))}else{a(e,"upload-complete",timeRequest())}}}));if(typeof t.response!=="undefined"){a(e,"upload-complete",(()=>{const r=addTimeout(t.response,timeoutHandler,"response");a(e,"response",r)}))}return cancelTimeouts}},7826:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=()=>{const e=[];return{once(t,r,s){t.once(r,s);e.push({origin:t,event:r,fn:s})},unhandleAll(){for(const t of e){const{origin:e,event:r,fn:s}=t;e.removeListener(r,s)}e.length=0}}}},2653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(5773);t["default"]=e=>{e=e;const t={protocol:e.protocol,hostname:s.default.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(s.default.string(e.port)&&e.port.length!==0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t}},1454:e=>{"use strict";const t=new Set([200,203,204,206,300,301,404,405,410,414,501]);const r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]);const s=new Set([500,502,503,504]);const n={date:true,connection:true,"keep-alive":true,"proxy-authenticate":true,"proxy-authorization":true,te:true,trailer:true,"transfer-encoding":true,upgrade:true};const i={"content-length":true,"content-encoding":true,"transfer-encoding":true,"content-range":true};function toNumberOrZero(e){const t=parseInt(e,10);return isFinite(t)?t:0}function isErrorResponse(e){if(!e){return true}return s.has(e.status)}function parseCacheControl(e){const t={};if(!e)return t;const r=e.trim().split(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.replace(/^"|"$/g,"")}return t}function formatCacheControl(e){let t=[];for(const r in e){const s=e[r];t.push(s===true?r:r+"="+s)}if(!t.length){return undefined}return t.join(", ")}e.exports=class CachePolicy{constructor(e,t,{shared:r,cacheHeuristic:s,immutableMinTimeToLive:n,ignoreCargoCult:i,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!t||!t.headers){throw Error("Response headers missing")}this._assertRequestHasHeaders(e);this._responseTime=this.now();this._isShared=r!==false;this._cacheHeuristic=undefined!==s?s:.1;this._immutableMinTtl=undefined!==n?n:24*3600*1e3;this._status="status"in t?t.status:200;this._resHeaders=t.headers;this._rescc=parseCacheControl(t.headers["cache-control"]);this._method="method"in e?e.method:"GET";this._url=e.url;this._host=e.headers.host;this._noAuthorization=!e.headers.authorization;this._reqHeaders=t.headers.vary?e.headers:null;this._reqcc=parseCacheControl(e.headers["cache-control"]);if(i&&"pre-check"in this._rescc&&"post-check"in this._rescc){delete this._rescc["pre-check"];delete this._rescc["post-check"];delete this._rescc["no-cache"];delete this._rescc["no-store"];delete this._rescc["must-revalidate"];this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":formatCacheControl(this._rescc)});delete this._resHeaders.expires;delete this._resHeaders.pragma}if(t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)){this._rescc["no-cache"]=true}}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())&&r.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers){throw Error("Request headers missing")}}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=parseCacheControl(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma)){return false}if(t["max-age"]&&this.age()>t["max-age"]){return false}if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"]){return false}if(this.stale()){const e=t["max-stale"]&&!this._rescc["must-revalidate"]&&(true===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge());if(!e){return false}}return this._requestMatches(e,false)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary){return true}if(this._resHeaders.vary==="*"){return false}const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t){if(e.headers[r]!==this._reqHeaders[r])return false}return true}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e){if(n[r])continue;t[r]=e[r]}if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r){delete t[e]}}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));if(!e.length){delete t.warning}else{t.warning=e.join(",").trim()}}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders);const t=this.age();if(t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24){e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'}e.age=`${Math.round(t)}`;e.date=new Date(this.now()).toUTCString();return e}date(){const e=Date.parse(this._resHeaders.date);if(isFinite(e)){return e}return this._responseTime}age(){let e=this._ageValue();const t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return toNumberOrZero(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]){return 0}if(this._isShared&&(this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)){return 0}if(this._resHeaders.vary==="*"){return 0}if(this._isShared){if(this._rescc["proxy-revalidate"]){return 0}if(this._rescc["s-maxage"]){return toNumberOrZero(this._rescc["s-maxage"])}}if(this._rescc["max-age"]){return toNumberOrZero(this._rescc["max-age"])}const e=this._rescc.immutable?this._immutableMinTtl:0;const t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);if(Number.isNaN(r)||r<t){return 0}return Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){const r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r){return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}}return e}timeToLive(){const e=this.maxAge()-this.age();const t=e+toNumberOrZero(this._rescc["stale-if-error"]);const r=e+toNumberOrZero(this._rescc["stale-while-revalidate"]);return Math.max(0,e,t,r)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+toNumberOrZero(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+toNumberOrZero(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(undefined,undefined,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t;this._isShared=e.sh;this._cacheHeuristic=e.ch;this._immutableMinTtl=e.imm!==undefined?e.imm:24*3600*1e3;this._status=e.st;this._resHeaders=e.resh;this._rescc=e.rescc;this._method=e.m;this._url=e.u;this._host=e.h;this._noAuthorization=e.a;this._reqHeaders=e.reqh;this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);delete t["if-range"];if(!this._requestMatches(e,true)||!this.storable()){delete t["if-none-match"];delete t["if-modified-since"];return t}if(this._resHeaders.etag){t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag}const r=t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET";if(r){delete t["if-modified-since"];if(t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));if(!e.length){delete t["if-none-match"]}else{t["if-none-match"]=e.join(",").trim()}}}else if(this._resHeaders["last-modified"]&&!t["if-modified-since"]){t["if-modified-since"]=this._resHeaders["last-modified"]}return t}revalidatedPolicy(e,t){this._assertRequestHasHeaders(e);if(this._useStaleIfError()&&isErrorResponse(t)){return{modified:false,matches:false,policy:this}}if(!t||!t.headers){throw Error("Response headers missing")}let r=false;if(t.status!==undefined&&t.status!=304){r=false}else if(t.headers.etag&&!/^\s*W\//.test(t.headers.etag)){r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag}else if(this._resHeaders.etag&&t.headers.etag){r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,"")}else if(this._resHeaders["last-modified"]){r=this._resHeaders["last-modified"]===t.headers["last-modified"]}else{if(!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]){r=true}}if(!r){return{policy:new this.constructor(e,t),modified:t.status!=304,matches:false}}const s={};for(const e in this._resHeaders){s[e]=e in t.headers&&!i[e]?t.headers[e]:this._resHeaders[e]}const n=Object.assign({},t,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:false,matches:true}}}},7036:(e,t)=>{t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var s=[];var n="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var i=t.whitespace?" = ":"=";Object.keys(e).forEach((function(t,o,a){var c=e[t];if(c&&Array.isArray(c)){c.forEach((function(e){n+=safe(t+"[]")+i+safe(e)+"\n"}))}else if(c&&typeof c==="object")s.push(t);else n+=safe(t)+i+safe(c)+r}));if(t.section&&n.length)n="["+safe(t.section)+"]"+r+n;s.forEach((function(s,i,o){var a=dotSplit(s).join("\\.");var c=(t.section?t.section+".":"")+a;var l=encode(e[s],{section:c,whitespace:t.whitespace});if(n.length&&l.length)n+=r;n+=l}));return n}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(e){var t={};var r=t;var s=null;var n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var i=e.split(/[\r\n]+/g);i.forEach((function(e,i,o){if(!e||e.match(/^\s*[;#]/))return;var a=e.match(n);if(!a)return;if(a[1]!==undefined){s=unsafe(a[1]);if(s==="__proto__"){r={};return}r=t[s]=t[s]||{};return}var c=unsafe(a[2]);if(c==="__proto__")return;var l=a[3]?unsafe(a[4]):true;switch(l){case"true":case"false":case"null":l=JSON.parse(l)}if(c.length>2&&c.slice(-2)==="[]"){c=c.substring(0,c.length-2);if(c==="__proto__")return;if(!r[c])r[c]=[];else if(!Array.isArray(r[c]))r[c]=[r[c]]}if(Array.isArray(r[c]))r[c].push(l);else r[c]=l}));Object.keys(t).filter((function(e,r,s){if(!t[e]||typeof t[e]!=="object"||Array.isArray(t[e]))return false;var n=dotSplit(e);var i=t;var o=n.pop();var a=o.replace(/\\\./g,".");n.forEach((function(e,t,r){if(e==="__proto__")return;if(!i[e]||typeof i[e]!=="object")i[e]={};i=i[e]}));if(i===t&&a===o)return false;i[a]=t[e];return true})).forEach((function(e,r,s){delete t[e]}));return t}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,t){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'")e=e.substr(1,e.length-2);try{e=JSON.parse(e)}catch(e){}}else{var r=false;var s="";for(var n=0,i=e.length;n<i;n++){var o=e.charAt(n);if(r){if("\\;#".indexOf(o)!==-1)s+=o;else s+="\\"+o;r=false}else if(";#".indexOf(o)!==-1)break;else if(o==="\\")r=true;else s+=o}if(r)s+="\\";return s.trim()}return e}},9999:e=>{
|
|
40
|
+
*/const o=i(3837);const a=i(492);const isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);const transform=t=>r=>t===true?Number(r):String(r);const isValidValue=t=>typeof t==="number"||typeof t==="string"&&t!=="";const isNumber=t=>Number.isInteger(+t);const zeros=t=>{let r=`${t}`;let i=-1;if(r[0]==="-")r=r.slice(1);if(r==="0")return false;while(r[++i]==="0");return i>0};const stringify=(t,r,i)=>{if(typeof t==="string"||typeof r==="string"){return true}return i.stringify===true};const pad=(t,r,i)=>{if(r>0){let i=t[0]==="-"?"-":"";if(i)t=t.slice(1);t=i+t.padStart(i?r-1:r,"0")}if(i===false){return String(t)}return t};const toMaxLen=(t,r)=>{let i=t[0]==="-"?"-":"";if(i){t=t.slice(1);r--}while(t.length<r)t="0"+t;return i?"-"+t:t};const toSequence=(t,r)=>{t.negatives.sort(((t,r)=>t<r?-1:t>r?1:0));t.positives.sort(((t,r)=>t<r?-1:t>r?1:0));let i=r.capture?"":"?:";let o="";let a="";let c;if(t.positives.length){o=t.positives.join("|")}if(t.negatives.length){a=`-(${i}${t.negatives.join("|")})`}if(o&&a){c=`${o}|${a}`}else{c=o||a}if(r.wrap){return`(${i}${c})`}return c};const toRange=(t,r,i,o)=>{if(i){return a(t,r,{wrap:false,...o})}let c=String.fromCharCode(t);if(t===r)return c;let l=String.fromCharCode(r);return`[${c}-${l}]`};const toRegex=(t,r,i)=>{if(Array.isArray(t)){let r=i.wrap===true;let o=i.capture?"":"?:";return r?`(${o}${t.join("|")})`:t.join("|")}return a(t,r,i)};const rangeError=(...t)=>new RangeError("Invalid range arguments: "+o.inspect(...t));const invalidRange=(t,r,i)=>{if(i.strictRanges===true)throw rangeError([t,r]);return[]};const invalidStep=(t,r)=>{if(r.strictRanges===true){throw new TypeError(`Expected step "${t}" to be a number`)}return[]};const fillNumbers=(t,r,i=1,o={})=>{let a=Number(t);let c=Number(r);if(!Number.isInteger(a)||!Number.isInteger(c)){if(o.strictRanges===true)throw rangeError([t,r]);return[]}if(a===0)a=0;if(c===0)c=0;let l=a>c;let u=String(t);let h=String(r);let d=String(i);i=Math.max(Math.abs(i),1);let p=zeros(u)||zeros(h)||zeros(d);let m=p?Math.max(u.length,h.length,d.length):0;let y=p===false&&stringify(t,r,o)===false;let g=o.transform||transform(y);if(o.toRegex&&i===1){return toRange(toMaxLen(t,m),toMaxLen(r,m),true,o)}let v={negatives:[],positives:[]};let push=t=>v[t<0?"negatives":"positives"].push(Math.abs(t));let b=[];let w=0;while(l?a>=c:a<=c){if(o.toRegex===true&&i>1){push(a)}else{b.push(pad(g(a,w),m,y))}a=l?a-i:a+i;w++}if(o.toRegex===true){return i>1?toSequence(v,o):toRegex(b,null,{wrap:false,...o})}return b};const fillLetters=(t,r,i=1,o={})=>{if(!isNumber(t)&&t.length>1||!isNumber(r)&&r.length>1){return invalidRange(t,r,o)}let a=o.transform||(t=>String.fromCharCode(t));let c=`${t}`.charCodeAt(0);let l=`${r}`.charCodeAt(0);let u=c>l;let h=Math.min(c,l);let d=Math.max(c,l);if(o.toRegex&&i===1){return toRange(h,d,false,o)}let p=[];let m=0;while(u?c>=l:c<=l){p.push(a(c,m));c=u?c-i:c+i;m++}if(o.toRegex===true){return toRegex(p,null,{wrap:false,options:o})}return p};const fill=(t,r,i,o={})=>{if(r==null&&isValidValue(t)){return[t]}if(!isValidValue(t)||!isValidValue(r)){return invalidRange(t,r,o)}if(typeof i==="function"){return fill(t,r,1,{transform:i})}if(isObject(i)){return fill(t,r,0,i)}let a={...o};if(a.capture===true)a.wrap=true;i=i||a.step||1;if(!isNumber(i)){if(i!=null&&!isObject(i))return invalidStep(i,a);return fill(t,r,1,i)}if(isNumber(t)&&isNumber(r)){return fillNumbers(t,r,i,a)}return fillLetters(t,r,Math.max(Math.abs(i),1),a)};t.exports=fill},7517:(t,r,i)=>{"use strict";const o=i(1017);const a=i(3722);t.exports=(t,r={})=>{const i=o.resolve(r.cwd||"");const{root:c}=o.parse(i);const l=[].concat(t);return new Promise((t=>{(function find(r){a(l,{cwd:r}).then((i=>{if(i){t(o.join(r,i))}else if(r===c){t(null)}else{find(o.dirname(r))}}))})(i)}))};t.exports.sync=(t,r={})=>{let i=o.resolve(r.cwd||"");const{root:c}=o.parse(i);const l=[].concat(t);while(true){const t=a.sync(l,{cwd:i});if(t){return o.join(i,t)}if(i===c){return null}i=o.dirname(i)}}},644:(t,r,i)=>{"use strict";const o=i(7413);const a=i(2361).EventEmitter;const c=i(7147);let l=c.writev;if(!l){const t=process.binding("fs");const r=t.FSReqWrap||t.FSReqCallback;l=(i,o,a,c)=>{const done=(t,r)=>c(t,r,o);const l=new r;l.oncomplete=done;t.writeBuffers(i,o,a,l)}}const u=Symbol("_autoClose");const h=Symbol("_close");const d=Symbol("_ended");const p=Symbol("_fd");const m=Symbol("_finished");const y=Symbol("_flags");const g=Symbol("_flush");const v=Symbol("_handleChunk");const b=Symbol("_makeBuf");const w=Symbol("_mode");const E=Symbol("_needDrain");const S=Symbol("_onerror");const x=Symbol("_onopen");const R=Symbol("_onread");const P=Symbol("_onwrite");const $=Symbol("_open");const O=Symbol("_path");const T=Symbol("_pos");const A=Symbol("_queue");const C=Symbol("_read");const k=Symbol("_readSize");const I=Symbol("_reading");const N=Symbol("_remain");const D=Symbol("_size");const L=Symbol("_write");const M=Symbol("_writing");const j=Symbol("_defaultFlag");const U=Symbol("_errored");class ReadStream extends o{constructor(t,r){r=r||{};super(r);this.readable=true;this.writable=false;if(typeof t!=="string")throw new TypeError("path must be a string");this[U]=false;this[p]=typeof r.fd==="number"?r.fd:null;this[O]=t;this[k]=r.readSize||16*1024*1024;this[I]=false;this[D]=typeof r.size==="number"?r.size:Infinity;this[N]=this[D];this[u]=typeof r.autoClose==="boolean"?r.autoClose:true;if(typeof this[p]==="number")this[C]();else this[$]()}get fd(){return this[p]}get path(){return this[O]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[$](){c.open(this[O],"r",((t,r)=>this[x](t,r)))}[x](t,r){if(t)this[S](t);else{this[p]=r;this.emit("open",r);this[C]()}}[b](){return Buffer.allocUnsafe(Math.min(this[k],this[N]))}[C](){if(!this[I]){this[I]=true;const t=this[b]();if(t.length===0)return process.nextTick((()=>this[R](null,0,t)));c.read(this[p],t,0,t.length,null,((t,r,i)=>this[R](t,r,i)))}}[R](t,r,i){this[I]=false;if(t)this[S](t);else if(this[v](r,i))this[C]()}[h](){if(this[u]&&typeof this[p]==="number"){const t=this[p];this[p]=null;c.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}[S](t){this[I]=true;this[h]();this.emit("error",t)}[v](t,r){let i=false;this[N]-=t;if(t>0)i=super.write(t<r.length?r.slice(0,t):r);if(t===0||this[N]<=0){i=false;this[h]();super.end()}return i}emit(t,r){switch(t){case"prefinish":case"finish":break;case"drain":if(typeof this[p]==="number")this[C]();break;case"error":if(this[U])return;this[U]=true;return super.emit(t,r);default:return super.emit(t,r)}}}class ReadStreamSync extends ReadStream{[$](){let t=true;try{this[x](null,c.openSync(this[O],"r"));t=false}finally{if(t)this[h]()}}[C](){let t=true;try{if(!this[I]){this[I]=true;do{const t=this[b]();const r=t.length===0?0:c.readSync(this[p],t,0,t.length,null);if(!this[v](r,t))break}while(true);this[I]=false}t=false}finally{if(t)this[h]()}}[h](){if(this[u]&&typeof this[p]==="number"){const t=this[p];this[p]=null;c.closeSync(t);this.emit("close")}}}class WriteStream extends a{constructor(t,r){r=r||{};super(r);this.readable=false;this.writable=true;this[U]=false;this[M]=false;this[d]=false;this[E]=false;this[A]=[];this[O]=t;this[p]=typeof r.fd==="number"?r.fd:null;this[w]=r.mode===undefined?438:r.mode;this[T]=typeof r.start==="number"?r.start:null;this[u]=typeof r.autoClose==="boolean"?r.autoClose:true;const i=this[T]!==null?"r+":"w";this[j]=r.flags===undefined;this[y]=this[j]?i:r.flags;if(this[p]===null)this[$]()}emit(t,r){if(t==="error"){if(this[U])return;this[U]=true}return super.emit(t,r)}get fd(){return this[p]}get path(){return this[O]}[S](t){this[h]();this[M]=true;this.emit("error",t)}[$](){c.open(this[O],this[y],this[w],((t,r)=>this[x](t,r)))}[x](t,r){if(this[j]&&this[y]==="r+"&&t&&t.code==="ENOENT"){this[y]="w";this[$]()}else if(t)this[S](t);else{this[p]=r;this.emit("open",r);this[g]()}}end(t,r){if(t)this.write(t,r);this[d]=true;if(!this[M]&&!this[A].length&&typeof this[p]==="number")this[P](null,0);return this}write(t,r){if(typeof t==="string")t=Buffer.from(t,r);if(this[d]){this.emit("error",new Error("write() after end()"));return false}if(this[p]===null||this[M]||this[A].length){this[A].push(t);this[E]=true;return false}this[M]=true;this[L](t);return true}[L](t){c.write(this[p],t,0,t.length,this[T],((t,r)=>this[P](t,r)))}[P](t,r){if(t)this[S](t);else{if(this[T]!==null)this[T]+=r;if(this[A].length)this[g]();else{this[M]=false;if(this[d]&&!this[m]){this[m]=true;this[h]();this.emit("finish")}else if(this[E]){this[E]=false;this.emit("drain")}}}}[g](){if(this[A].length===0){if(this[d])this[P](null,0)}else if(this[A].length===1)this[L](this[A].pop());else{const t=this[A];this[A]=[];l(this[p],t,this[T],((t,r)=>this[P](t,r)))}}[h](){if(this[u]&&typeof this[p]==="number"){const t=this[p];this[p]=null;c.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}}class WriteStreamSync extends WriteStream{[$](){let t;if(this[j]&&this[y]==="r+"){try{t=c.openSync(this[O],this[y],this[w])}catch(t){if(t.code==="ENOENT"){this[y]="w";return this[$]()}else throw t}}else t=c.openSync(this[O],this[y],this[w]);this[x](null,t)}[h](){if(this[u]&&typeof this[p]==="number"){const t=this[p];this[p]=null;c.closeSync(t);this.emit("close")}}[L](t){let r=true;try{this[P](null,c.writeSync(this[p],t,0,t.length,this[T]));r=false}finally{if(r)try{this[h]()}catch(t){}}}}r.ReadStream=ReadStream;r.ReadStreamSync=ReadStreamSync;r.WriteStream=WriteStream;r.WriteStreamSync=WriteStreamSync},7741:(t,r,i)=>{"use strict";var o=i(6107);var a=process.env;Object.defineProperty(r,"_vendors",{value:o.map((function(t){return t.constant}))});r.name=null;r.isPR=null;o.forEach((function(t){var i=Array.isArray(t.env)?t.env:[t.env];var o=i.every((function(t){return checkEnv(t)}));r[t.constant]=o;if(o){r.name=t.name;switch(typeof t.pr){case"string":r.isPR=!!a[t.pr];break;case"object":if("env"in t.pr){r.isPR=t.pr.env in a&&a[t.pr.env]!==t.pr.ne}else if("any"in t.pr){r.isPR=t.pr.any.some((function(t){return!!a[t]}))}else{r.isPR=checkEnv(t.pr)}break;default:r.isPR=null}}}));r.isCI=!!(a.CI||a.CONTINUOUS_INTEGRATION||a.BUILD_NUMBER||a.RUN_ID||r.name||false);function checkEnv(t){if(typeof t==="string")return!!a[t];return Object.keys(t).every((function(r){return a[r]===t[r]}))}},7080:(t,r,i)=>{"use strict";var o=i(2755);var a=i(1017).posix.dirname;var c=i(2037).platform()==="win32";var l="/";var u=/\\/g;var h=/[\{\[].*[\}\]]$/;var d=/(^|[^\\])([\{\[]|\([^\)]+$)/;var p=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,r){var i=Object.assign({flipBackslashes:true},r);if(i.flipBackslashes&&c&&t.indexOf(l)<0){t=t.replace(u,l)}if(h.test(t)){t+=l}t+="a";do{t=a(t)}while(o(t)||d.test(t));return t.replace(p,"$1")}},7036:(t,r)=>{r.parse=r.decode=decode;r.stringify=r.encode=encode;r.safe=safe;r.unsafe=unsafe;var i=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(t,r){var o=[];var a="";if(typeof r==="string"){r={section:r,whitespace:false}}else{r=r||{};r.whitespace=r.whitespace===true}var c=r.whitespace?" = ":"=";Object.keys(t).forEach((function(r,l,u){var h=t[r];if(h&&Array.isArray(h)){h.forEach((function(t){a+=safe(r+"[]")+c+safe(t)+"\n"}))}else if(h&&typeof h==="object")o.push(r);else a+=safe(r)+c+safe(h)+i}));if(r.section&&a.length)a="["+safe(r.section)+"]"+i+a;o.forEach((function(o,c,l){var u=dotSplit(o).join("\\.");var h=(r.section?r.section+".":"")+u;var d=encode(t[o],{section:h,whitespace:r.whitespace});if(a.length&&d.length)a+=i;a+=d}));return a}function dotSplit(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function decode(t){var r={};var i=r;var o=null;var a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var c=t.split(/[\r\n]+/g);c.forEach((function(t,c,l){if(!t||t.match(/^\s*[;#]/))return;var u=t.match(a);if(!u)return;if(u[1]!==undefined){o=unsafe(u[1]);if(o==="__proto__"){i={};return}i=r[o]=r[o]||{};return}var h=unsafe(u[2]);if(h==="__proto__")return;var d=u[3]?unsafe(u[4]):true;switch(d){case"true":case"false":case"null":d=JSON.parse(d)}if(h.length>2&&h.slice(-2)==="[]"){h=h.substring(0,h.length-2);if(h==="__proto__")return;if(!i[h])i[h]=[];else if(!Array.isArray(i[h]))i[h]=[i[h]]}if(Array.isArray(i[h]))i[h].push(d);else i[h]=d}));Object.keys(r).filter((function(t,i,o){if(!r[t]||typeof r[t]!=="object"||Array.isArray(r[t]))return false;var a=dotSplit(t);var c=r;var l=a.pop();var u=l.replace(/\\\./g,".");a.forEach((function(t,r,i){if(t==="__proto__")return;if(!c[t]||typeof c[t]!=="object")c[t]={};c=c[t]}));if(c===r&&u===l)return false;c[u]=r[t];return true})).forEach((function(t,i,o){delete r[t]}));return r}function isQuoted(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function safe(t){return typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&isQuoted(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(t,r){t=(t||"").trim();if(isQuoted(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{var i=false;var o="";for(var a=0,c=t.length;a<c;a++){var l=t.charAt(a);if(i){if("\\;#".indexOf(l)!==-1)o+=l;else o+="\\"+l;i=false}else if(";#".indexOf(l)!==-1)break;else if(l==="\\")i=true;else o+=l}if(i)o+="\\";return o.trim()}return t}},9999:t=>{
|
|
41
41
|
/*!
|
|
42
42
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
43
43
|
*
|
|
44
44
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
45
45
|
* Licensed under the MIT License.
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
t.exports=function isExtglob(t){if(typeof t!=="string"||t===""){return false}var r;while(r=/(\\).|([@?!+*]\(.*\))/g.exec(t)){if(r[2])return true;t=t.slice(r.index+r[0].length)}return false}},2755:(t,r,i)=>{
|
|
48
48
|
/*!
|
|
49
49
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
50
50
|
*
|
|
51
51
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
52
52
|
* Released under the MIT License.
|
|
53
53
|
*/
|
|
54
|
-
var
|
|
54
|
+
var o=i(9999);var a={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0]==="!"){return true}var r=0;var i=-2;var o=-2;var c=-2;var l=-2;var u=-2;while(r<t.length){if(t[r]==="*"){return true}if(t[r+1]==="?"&&/[\].+)]/.test(t[r])){return true}if(o!==-1&&t[r]==="["&&t[r+1]!=="]"){if(o<r){o=t.indexOf("]",r)}if(o>r){if(u===-1||u>o){return true}u=t.indexOf("\\",r);if(u===-1||u>o){return true}}}if(c!==-1&&t[r]==="{"&&t[r+1]!=="}"){c=t.indexOf("}",r);if(c>r){u=t.indexOf("\\",r);if(u===-1||u>c){return true}}}if(l!==-1&&t[r]==="("&&t[r+1]==="?"&&/[:!=]/.test(t[r+2])&&t[r+3]!==")"){l=t.indexOf(")",r);if(l>r){u=t.indexOf("\\",r);if(u===-1||u>l){return true}}}if(i!==-1&&t[r]==="("&&t[r+1]!=="|"){if(i<r){i=t.indexOf("|",r)}if(i!==-1&&t[i+1]!==")"){l=t.indexOf(")",i);if(l>i){u=t.indexOf("\\",i);if(u===-1||u>l){return true}}}}if(t[r]==="\\"){var h=t[r+1];r+=2;var d=a[h];if(d){var p=t.indexOf(d,r);if(p!==-1){r=p+1}}if(t[r]==="!"){return true}}else{r++}}return false};var relaxedCheck=function(t){if(t[0]==="!"){return true}var r=0;while(r<t.length){if(/[*?{}()[\]]/.test(t[r])){return true}if(t[r]==="\\"){var i=t[r+1];r+=2;var o=a[i];if(o){var c=t.indexOf(o,r);if(c!==-1){r=c+1}}if(t[r]==="!"){return true}}else{r++}}return false};t.exports=function isGlob(t,r){if(typeof t!=="string"||t===""){return false}if(o(t)){return true}var i=strictCheck;if(r&&r.strict===false){i=relaxedCheck}return i(t)}},3357:t=>{"use strict";
|
|
55
55
|
/*!
|
|
56
56
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
57
57
|
*
|
|
58
58
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
59
59
|
* Released under the MIT License.
|
|
60
|
-
*/e.exports=function(e){if(typeof e==="number"){return e-e===0}if(typeof e==="string"&&e.trim()!==""){return Number.isFinite?Number.isFinite(+e):isFinite(+e)}return false}},8683:e=>{"use strict";e.exports=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")}},7745:(e,t,r)=>{var s=r(7147);var n;if(process.platform==="win32"||global.TESTING_WINDOWS){n=r(4438)}else{n=r(7138)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,r){if(typeof t==="function"){r=t;t={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,s){isexe(e,t||{},(function(e,t){if(e){s(e)}else{r(t)}}))}))}n(e,t||{},(function(e,s){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;s=false}}r(e,s)}))}function sync(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},7138:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var s=r(7147);function isexe(e,t,r){s.stat(e,(function(e,s){r(e,e?false:checkStat(s,t))}))}function sync(e,t){return checkStat(s.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var r=e.mode;var s=e.uid;var n=e.gid;var i=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var o=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var c=parseInt("010",8);var l=parseInt("001",8);var u=a|c;var h=r&l||r&c&&n===o||r&a&&s===i||r&u&&i===0;return h}},4438:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var s=r(7147);function checkPathExt(e,t){var r=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var s=0;s<r.length;s++){var n=r[s].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n){return true}}return false}function checkStat(e,t,r){if(!e.isSymbolicLink()&&!e.isFile()){return false}return checkPathExt(t,r)}function isexe(e,t,r){s.stat(e,(function(s,n){r(s,s?false:checkStat(n,e,t))}))}function sync(e,t){return checkStat(s.statSync(e),e,t)}},9604:(e,t)=>{t.stringify=function stringify(e){if("undefined"==typeof e)return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON)e=e.toJSON();if(e&&"object"===typeof e){var t="";var r=Array.isArray(e);t=r?"[":"{";var s=true;for(var n in e){var i="function"==typeof e[n]||!r&&"undefined"===typeof e[n];if(Object.hasOwnProperty.call(e,n)&&!i){if(!s)t+=",";s=false;if(r){if(e[n]==undefined)t+="null";else t+=stringify(e[n])}else if(e[n]!==void 0){t+=stringify(n)+":"+stringify(e[n])}}}t+=r?"]":"}";return t}else if("string"===typeof e){return JSON.stringify(/^:/.test(e)?":"+e:e)}else if("undefined"===typeof e){return"null"}else return JSON.stringify(e)};t.parse=function(e){return JSON.parse(e,(function(e,t){if("string"===typeof t){if(/^:base64:/.test(t))return Buffer.from(t.substring(8),"base64");else return/^:/.test(t)?t.substring(1):t}return t}))}},9122:e=>{"use strict";var t=e.exports=function(e,t,r){if(typeof t=="function"){r=t;t={}}r=t.cb||r;var s=typeof r=="function"?r:r.pre||function(){};var n=r.post||function(){};_traverse(t,s,n,e,"",e)};t.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};t.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};t.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};t.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,r,s,n,i,o,a,c,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){r(n,i,o,a,c,l,u);for(var h in n){var d=n[h];if(Array.isArray(d)){if(h in t.arrayKeywords){for(var p=0;p<d.length;p++)_traverse(e,r,s,d[p],i+"/"+h+"/"+p,o,i,h,n,p)}}else if(h in t.propsKeywords){if(d&&typeof d=="object"){for(var m in d)_traverse(e,r,s,d[m],i+"/"+h+"/"+escapeJsonPtr(m),o,i,h,n,m)}}else if(h in t.keywords||e.allKeys&&!(h in t.skipKeywords)){_traverse(e,r,s,d,i+"/"+h,o,i,h,n)}}s(n,i,o,a,c,l,u)}}function escapeJsonPtr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}},55:(e,t,r)=>{"use strict";const s=r(2361);const n=r(9604);const loadStore=e=>{const t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){const r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};class Keyv extends s{constructor(e,t){super();this.opts=Object.assign({namespace:"keyv",serialize:n.stringify,deserialize:n.parse},typeof e==="string"?{uri:e}:e,t);if(!this.opts.store){const e=Object.assign({},this.opts);this.opts.store=loadStore(e)}if(typeof this.opts.store.on==="function"){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,t){e=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((()=>r.get(e))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined){return undefined}if(typeof r.expires==="number"&&Date.now()>r.expires){this.delete(e);return undefined}return t&&t.raw?r:r.value}))}set(e,t,r){e=this._getKeyPrefix(e);if(typeof r==="undefined"){r=this.opts.ttl}if(r===0){r=undefined}const{store:s}=this.opts;return Promise.resolve().then((()=>{const e=typeof r==="number"?Date.now()+r:null;t={value:t,expires:e};return this.opts.serialize(t)})).then((t=>s.set(e,t,r))).then((()=>true))}delete(e){e=this._getKeyPrefix(e);const{store:t}=this.opts;return Promise.resolve().then((()=>t.delete(e)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}}e.exports=Keyv},7836:e=>{"use strict";const{FORCE_COLOR:t,NODE_DISABLE_COLORS:r,TERM:s}=process.env;const n={enabled:!r&&s!=="dumb"&&t!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(e,t){let r=0,s,n="",i="";for(;r<e.length;r++){s=e[r];n+=s.open;i+=s.close;if(t.includes(s.close)){t=t.replace(s.rgx,s.close+s.open)}}return n+t+i}function chain(e,t){let r={has:e,keys:t};r.reset=n.reset.bind(r);r.bold=n.bold.bind(r);r.dim=n.dim.bind(r);r.italic=n.italic.bind(r);r.underline=n.underline.bind(r);r.inverse=n.inverse.bind(r);r.hidden=n.hidden.bind(r);r.strikethrough=n.strikethrough.bind(r);r.black=n.black.bind(r);r.red=n.red.bind(r);r.green=n.green.bind(r);r.yellow=n.yellow.bind(r);r.blue=n.blue.bind(r);r.magenta=n.magenta.bind(r);r.cyan=n.cyan.bind(r);r.white=n.white.bind(r);r.gray=n.gray.bind(r);r.grey=n.grey.bind(r);r.bgBlack=n.bgBlack.bind(r);r.bgRed=n.bgRed.bind(r);r.bgGreen=n.bgGreen.bind(r);r.bgYellow=n.bgYellow.bind(r);r.bgBlue=n.bgBlue.bind(r);r.bgMagenta=n.bgMagenta.bind(r);r.bgCyan=n.bgCyan.bind(r);r.bgWhite=n.bgWhite.bind(r);return r}function init(e,t){let r={open:`[${e}m`,close:`[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){if(this!==void 0&&this.has!==void 0){this.has.includes(e)||(this.has.push(e),this.keys.push(r));return t===void 0?this:n.enabled?run(this.keys,t+""):t+""}return t===void 0?chain([e],[r]):n.enabled?run([r],t+""):t+""}}e.exports=n},3722:(e,t,r)=>{"use strict";const s=r(1017);const n=r(3883);const i=r(4604);e.exports=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);return i(e,(e=>n(s.resolve(t.cwd,e))),t)};e.exports.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e){if(n.sync(s.resolve(t.cwd,r))){return r}}}},4162:e=>{"use strict";e.exports=e=>{const t={};for(const[r,s]of Object.entries(e)){t[r.toLowerCase()]=s}return t}},8443:(e,t,r)=>{"use strict";const s=r(3401);const n=Symbol("max");const i=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const c=Symbol("maxAge");const l=Symbol("dispose");const u=Symbol("noDisposeOnSet");const h=Symbol("lruList");const d=Symbol("cache");const p=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[o]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0;this[l]=e.dispose;this[u]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[c]=e;trim(this)}get maxAge(){return this[c]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[o]){this[o]=e;this[i]=0;this[h].forEach((e=>{e.length=this[o](e.value,e.key);this[i]+=e.length}))}trim(this)}get lengthCalculator(){return this[o]}get length(){return this[i]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let r=this[h].tail;r!==null;){const s=r.prev;forEachStep(this,e,r,t);r=s}}forEach(e,t){t=t||this;for(let r=this[h].head;r!==null;){const s=r.next;forEachStep(this,e,r,t);r=s}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){if(this[l]&&this[h]&&this[h].length){this[h].forEach((e=>this[l](e.key,e.value)))}this[d]=new Map;this[h]=new s;this[i]=0}dump(){return this[h].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,r){r=r||this[c];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0;const a=this[o](t,e);if(this[d].has(e)){if(a>this[n]){del(this,this[d].get(e));return false}const o=this[d].get(e);const c=o.value;if(this[l]){if(!this[u])this[l](e,c.value)}c.now=s;c.maxAge=r;c.value=t;this[i]+=a-c.length;c.length=a;this.get(e);trim(this);return true}const p=new Entry(e,t,a,s,r);if(p.length>this[n]){if(this[l])this[l](e,t);return false}this[i]+=p.length;this[h].unshift(p);this[d].set(e,this[h].head);trim(this);return true}has(e){if(!this[d].has(e))return false;const t=this[d].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[h].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const e=n-t;if(e>0){this.set(s.k,s.v,e)}}}}prune(){this[d].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const s=e[d].get(t);if(s){const t=s.value;if(isStale(e,t)){del(e,s);if(!e[a])return undefined}else{if(r){if(e[p])s.value.now=Date.now();e[h].unshiftNode(s)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[c])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]};const trim=e=>{if(e[i]>e[n]){for(let t=e[h].tail;e[i]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[l])e[l](r.key,r.value);e[i]-=r.length;e[d].delete(r.key);e[h].removeNode(t)}};class Entry{constructor(e,t,r,s,n){this.key=e;this.value=t;this.length=r;this.now=s;this.maxAge=n||0}}const forEachStep=(e,t,r,s)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[a])n=undefined}if(n)t.call(s,n.value,n.key,e)};e.exports=LRUCache},9117:(e,t,r)=>{"use strict";const s=r(2781);const n=s.PassThrough;const i=Array.prototype.slice;e.exports=merge2;function merge2(){const e=[];const t=i.call(arguments);let r=false;let s=t[t.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){t.pop()}else{s={}}const o=s.end!==false;const a=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const c=n(s);function addStream(){for(let t=0,r=arguments.length;t<r;t++){e.push(pauseStreams(arguments[t],s))}mergeStream();return this}function mergeStream(){if(r){return}r=true;let t=e.shift();if(!t){process.nextTick(endStream);return}if(!Array.isArray(t)){t=[t]}let s=t.length+1;function next(){if(--s>0){return}r=false;mergeStream()}function pipe(e){function onend(){e.removeListener("merge2UnpipeEnd",onend);e.removeListener("end",onend);if(a){e.removeListener("error",onerror)}next()}function onerror(e){c.emit("error",e)}if(e._readableState.endEmitted){return next()}e.on("merge2UnpipeEnd",onend);e.on("end",onend);if(a){e.on("error",onerror)}e.pipe(c,{end:false});e.resume()}for(let e=0;e<t.length;e++){pipe(t[e])}next()}function endStream(){r=false;c.emit("queueDrain");if(o){c.end()}}c.setMaxListeners(0);c.add=addStream;c.on("unpipe",(function(e){e.emit("merge2UnpipeEnd")}));if(t.length){addStream.apply(null,t)}return c}function pauseStreams(e,t){if(!Array.isArray(e)){if(!e._readableState&&e.pipe){e=e.pipe(n(t))}if(!e._readableState||!e.pause||!e.pipe){throw new Error("Only readable stream can be merged.")}e.pause()}else{for(let r=0,s=e.length;r<s;r++){e[r]=pauseStreams(e[r],t)}}return e}},1065:(e,t,r)=>{"use strict";const s=r(3837);const n=r(8333);const i=r(3846);const o=r(5502);const isEmptyString=e=>e===""||e==="./";const micromatch=(e,t,r)=>{t=[].concat(t);e=[].concat(e);let s=new Set;let n=new Set;let o=new Set;let a=0;let onResult=e=>{o.add(e.output);if(r&&r.onResult){r.onResult(e)}};for(let o=0;o<t.length;o++){let c=i(String(t[o]),{...r,onResult:onResult},true);let l=c.state.negated||c.state.negatedExtglob;if(l)a++;for(let t of e){let e=c(t,true);let r=l?!e.isMatch:e.isMatch;if(!r)continue;if(l){s.add(e.output)}else{s.delete(e.output);n.add(e.output)}}}let c=a===t.length?[...o]:[...n];let l=c.filter((e=>!s.has(e)));if(r&&l.length===0){if(r.failglob===true){throw new Error(`No matches found for "${t.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?t.map((e=>e.replace(/\\/g,""))):t}}return l};micromatch.match=micromatch;micromatch.matcher=(e,t)=>i(e,t);micromatch.isMatch=(e,t,r)=>i(t,r)(e);micromatch.any=micromatch.isMatch;micromatch.not=(e,t,r={})=>{t=[].concat(t).map(String);let s=new Set;let n=[];let onResult=e=>{if(r.onResult)r.onResult(e);n.push(e.output)};let i=new Set(micromatch(e,t,{...r,onResult:onResult}));for(let e of n){if(!i.has(e)){s.add(e)}}return[...s]};micromatch.contains=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected a string: "${s.inspect(e)}"`)}if(Array.isArray(t)){return t.some((t=>micromatch.contains(e,t,r)))}if(typeof t==="string"){if(isEmptyString(e)||isEmptyString(t)){return false}if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t)){return true}}return micromatch.isMatch(e,t,{...r,contains:true})};micromatch.matchKeys=(e,t,r)=>{if(!o.isObject(e)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(e),t,r);let n={};for(let t of s)n[t]=e[t];return n};micromatch.some=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(s.some((e=>t(e)))){return true}}return false};micromatch.every=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(!s.every((e=>t(e)))){return false}}return true};micromatch.all=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected a string: "${s.inspect(e)}"`)}return[].concat(t).every((t=>i(t,r)(e)))};micromatch.capture=(e,t,r)=>{let s=o.isWindows(r);let n=i.makeRe(String(e),{...r,capture:true});let a=n.exec(s?o.toPosixSlashes(t):t);if(a){return a.slice(1).map((e=>e===void 0?"":e))}};micromatch.makeRe=(...e)=>i.makeRe(...e);micromatch.scan=(...e)=>i.scan(...e);micromatch.parse=(e,t)=>{let r=[];for(let s of[].concat(e||[])){for(let e of n(String(s),t)){r.push(i.parse(e,t))}}return r};micromatch.braces=(e,t)=>{if(typeof e!=="string")throw new TypeError("Expected a string");if(t&&t.nobrace===true||!/\{.*\}/.test(e)){return[e]}return n(e,t)};micromatch.braceExpand=(e,t)=>{if(typeof e!=="string")throw new TypeError("Expected a string");return micromatch.braces(e,{...t,expand:true})};e.exports=micromatch},5469:e=>{"use strict";const mimicFn=(e,t)=>{for(const r of Reflect.ownKeys(t)){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}return e};e.exports=mimicFn;e.exports["default"]=mimicFn},1867:e=>{"use strict";const copyProperty=(e,t,r,s)=>{if(r==="length"||r==="prototype"){return}if(r==="arguments"||r==="caller"){return}const n=Object.getOwnPropertyDescriptor(e,r);const i=Object.getOwnPropertyDescriptor(t,r);if(!canCopyProperty(n,i)&&s){return}Object.defineProperty(e,r,i)};const canCopyProperty=function(e,t){return e===undefined||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)};const changePrototype=(e,t)=>{const r=Object.getPrototypeOf(t);if(r===Object.getPrototypeOf(e)){return}Object.setPrototypeOf(e,r)};const wrappedToString=(e,t)=>`/* Wrapped ${e}*/\n${t}`;const t=Object.getOwnPropertyDescriptor(Function.prototype,"toString");const r=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const changeToString=(e,s,n)=>{const i=n===""?"":`with ${n.trim()}() `;const o=wrappedToString.bind(null,i,s.toString());Object.defineProperty(o,"name",r);Object.defineProperty(e,"toString",{...t,value:o})};const mimicFn=(e,t,{ignoreNonConfigurable:r=false}={})=>{const{name:s}=e;for(const s of Reflect.ownKeys(t)){copyProperty(e,t,s,r)}changePrototype(e,t);changeToString(e,t,s);return e};e.exports=mimicFn},4240:e=>{"use strict";const t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];e.exports=(e,r)=>{const s=new Set(Object.keys(e).concat(t));for(const t of s){if(t in r){continue}r[t]=typeof e[t]==="function"?e[t].bind(e):e[t]}}},5479:e=>{"use strict";const t=["aborted","complete","destroy","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];e.exports=(e,r)=>{const s=new Set(Object.keys(e).concat(t));for(const t of s){if(t in r){continue}r[t]=typeof e[t]==="function"?e[t].bind(e):e[t]}return r}},1254:e=>{e.exports=function(e,t){if(!t)t={};var r={bools:{},strings:{},unknownFn:null};if(typeof t["unknown"]==="function"){r.unknownFn=t["unknown"]}if(typeof t["boolean"]==="boolean"&&t["boolean"]){r.allBools=true}else{[].concat(t["boolean"]).filter(Boolean).forEach((function(e){r.bools[e]=true}))}var s={};Object.keys(t.alias||{}).forEach((function(e){s[e]=[].concat(t.alias[e]);s[e].forEach((function(t){s[t]=[e].concat(s[e].filter((function(e){return t!==e})))}))}));[].concat(t.string).filter(Boolean).forEach((function(e){r.strings[e]=true;if(s[e]){r.strings[s[e]]=true}}));var n=t["default"]||{};var i={_:[]};Object.keys(r.bools).forEach((function(e){setArg(e,n[e]===undefined?false:n[e])}));var o=[];if(e.indexOf("--")!==-1){o=e.slice(e.indexOf("--")+1);e=e.slice(0,e.indexOf("--"))}function argDefined(e,t){return r.allBools&&/^--[^=]+$/.test(t)||r.strings[e]||r.bools[e]||s[e]}function setArg(e,t,n){if(n&&r.unknownFn&&!argDefined(e,n)){if(r.unknownFn(n)===false)return}var o=!r.strings[e]&&isNumber(t)?Number(t):t;setKey(i,e.split("."),o);(s[e]||[]).forEach((function(e){setKey(i,e.split("."),o)}))}function setKey(e,t,s){var n=e;for(var i=0;i<t.length-1;i++){var o=t[i];if(isConstructorOrProto(n,o))return;if(n[o]===undefined)n[o]={};if(n[o]===Object.prototype||n[o]===Number.prototype||n[o]===String.prototype)n[o]={};if(n[o]===Array.prototype)n[o]=[];n=n[o]}var o=t[t.length-1];if(isConstructorOrProto(n,o))return;if(n===Object.prototype||n===Number.prototype||n===String.prototype)n={};if(n===Array.prototype)n=[];if(n[o]===undefined||r.bools[o]||typeof n[o]==="boolean"){n[o]=s}else if(Array.isArray(n[o])){n[o].push(s)}else{n[o]=[n[o],s]}}function aliasIsBoolean(e){return s[e].some((function(e){return r.bools[e]}))}for(var a=0;a<e.length;a++){var c=e[a];if(/^--.+=/.test(c)){var l=c.match(/^--([^=]+)=([\s\S]*)$/);var u=l[1];var h=l[2];if(r.bools[u]){h=h!=="false"}setArg(u,h,c)}else if(/^--no-.+/.test(c)){var u=c.match(/^--no-(.+)/)[1];setArg(u,false,c)}else if(/^--.+/.test(c)){var u=c.match(/^--(.+)/)[1];var d=e[a+1];if(d!==undefined&&!/^-/.test(d)&&!r.bools[u]&&!r.allBools&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,d,c);a++}else if(/^(true|false)$/.test(d)){setArg(u,d==="true",c);a++}else{setArg(u,r.strings[u]?"":true,c)}}else if(/^-[^-]+/.test(c)){var p=c.slice(1,-1).split("");var m=false;for(var y=0;y<p.length;y++){var d=c.slice(y+2);if(d==="-"){setArg(p[y],d,c);continue}if(/[A-Za-z]/.test(p[y])&&/=/.test(d)){setArg(p[y],d.split("=")[1],c);m=true;break}if(/[A-Za-z]/.test(p[y])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(d)){setArg(p[y],d,c);m=true;break}if(p[y+1]&&p[y+1].match(/\W/)){setArg(p[y],c.slice(y+2),c);m=true;break}else{setArg(p[y],r.strings[p[y]]?"":true,c)}}var u=c.slice(-1)[0];if(!m&&u!=="-"){if(e[a+1]&&!/^(-|--)[^-]/.test(e[a+1])&&!r.bools[u]&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,e[a+1],c);a++}else if(e[a+1]&&/^(true|false)$/.test(e[a+1])){setArg(u,e[a+1]==="true",c);a++}else{setArg(u,r.strings[u]?"":true,c)}}}else{if(!r.unknownFn||r.unknownFn(c)!==false){i._.push(r.strings["_"]||!isNumber(c)?c:Number(c))}if(t.stopEarly){i._.push.apply(i._,e.slice(a+1));break}}}Object.keys(n).forEach((function(e){if(!hasKey(i,e.split("."))){setKey(i,e.split("."),n[e]);(s[e]||[]).forEach((function(t){setKey(i,t.split("."),n[e])}))}}));if(t["--"]){i["--"]=new Array;o.forEach((function(e){i["--"].push(e)}))}else{o.forEach((function(e){i._.push(e)}))}return i};function hasKey(e,t){var r=e;t.slice(0,-1).forEach((function(e){r=r[e]||{}}));var s=t[t.length-1];return s in r}function isNumber(e){if(typeof e==="number")return true;if(/^0x[0-9a-f]+$/i.test(e))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function isConstructorOrProto(e,t){return t==="constructor"&&typeof e[t]==="function"||t==="__proto__"}},7413:(e,t,r)=>{"use strict";const s=r(2361);const n=r(2781);const i=r(3401);const o=r(1576).StringDecoder;const a=Symbol("EOF");const c=Symbol("maybeEmitEnd");const l=Symbol("emittedEnd");const u=Symbol("emittingEnd");const h=Symbol("closed");const d=Symbol("read");const p=Symbol("flush");const m=Symbol("flushChunk");const y=Symbol("encoding");const g=Symbol("decoder");const v=Symbol("flowing");const b=Symbol("paused");const w=Symbol("resume");const E=Symbol("bufferLength");const S=Symbol("bufferPush");const x=Symbol("bufferShift");const R=Symbol("objectMode");const P=Symbol("destroyed");const O=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const $=O&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const A=O&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);e.exports=class Minipass extends n{constructor(e){super();this[v]=false;this[b]=false;this.pipes=new i;this.buffer=new i;this[R]=e&&e.objectMode||false;if(this[R])this[y]=null;else this[y]=e&&e.encoding||null;if(this[y]==="buffer")this[y]=null;this[g]=this[y]?new o(this[y]):null;this[a]=false;this[l]=false;this[u]=false;this[h]=false;this.writable=true;this.readable=true;this[E]=0;this[P]=false}get bufferLength(){return this[E]}get encoding(){return this[y]}set encoding(e){if(this[R])throw new Error("cannot set encoding in objectMode");if(this[y]&&e!==this[y]&&(this[g]&&this[g].lastNeed||this[E]))throw new Error("cannot change encoding");if(this[y]!==e){this[g]=e?new o(e):null;if(this.buffer.length)this.buffer=this.buffer.map((e=>this[g].write(e)))}this[y]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[R]}set objectMode(e){this[R]=this[R]||!!e}write(e,t,r){if(this[a])throw new Error("write after end");if(this[P]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")r=t,t="utf8";if(!t)t="utf8";if(!this[R]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(!this.objectMode&&!e.length){if(this[E]!==0)this.emit("readable");if(r)r();return this.flowing}if(typeof e==="string"&&!this[R]&&!(t===this[y]&&!this[g].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[y])e=this[g].write(e);if(this.flowing){if(this[E]!==0)this[p](true);this.emit("data",e)}else this[S](e);if(this[E]!==0)this.emit("readable");if(r)r();return this.flowing}read(e){if(this[P])return null;try{if(this[E]===0||e===0||e>this[E])return null;if(this[R])e=null;if(this.buffer.length>1&&!this[R]){if(this.encoding)this.buffer=new i([Array.from(this.buffer).join("")]);else this.buffer=new i([Buffer.concat(Array.from(this.buffer),this[E])])}return this[d](e||null,this.buffer.head.value)}finally{this[c]()}}[d](e,t){if(e===t.length||e===null)this[x]();else{this.buffer.head.value=t.slice(e);t=t.slice(0,e);this[E]-=e}this.emit("data",t);if(!this.buffer.length&&!this[a])this.emit("drain");return t}end(e,t,r){if(typeof e==="function")r=e,e=null;if(typeof t==="function")r=t,t="utf8";if(e)this.write(e,t);if(r)this.once("end",r);this[a]=true;this.writable=false;if(this.flowing||!this[b])this[c]();return this}[w](){if(this[P])return;this[b]=false;this[v]=true;this.emit("resume");if(this.buffer.length)this[p]();else if(this[a])this[c]();else this.emit("drain")}resume(){return this[w]()}pause(){this[v]=false;this[b]=true}get destroyed(){return this[P]}get flowing(){return this[v]}get paused(){return this[b]}[S](e){if(this[R])this[E]+=1;else this[E]+=e.length;return this.buffer.push(e)}[x](){if(this.buffer.length){if(this[R])this[E]-=1;else this[E]-=this.buffer.head.value.length}return this.buffer.shift()}[p](e){do{}while(this[m](this[x]()));if(!e&&!this.buffer.length&&!this[a])this.emit("drain")}[m](e){return e?(this.emit("data",e),this.flowing):false}pipe(e,t){if(this[P])return;const r=this[l];t=t||{};if(e===process.stdout||e===process.stderr)t.end=false;else t.end=t.end!==false;const s={dest:e,opts:t,ondrain:e=>this[w]()};this.pipes.push(s);e.on("drain",s.ondrain);this[w]();if(r&&s.opts.end)s.dest.end();return e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{if(e==="data"&&!this.pipes.length&&!this.flowing)this[w]();else if(isEndish(e)&&this[l]){super.emit(e);this.removeAllListeners(e)}}}get emittedEnd(){return this[l]}[c](){if(!this[u]&&!this[l]&&!this[P]&&this.buffer.length===0&&this[a]){this[u]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[h])this.emit("close");this[u]=false}}emit(e,t){if(e!=="error"&&e!=="close"&&e!==P&&this[P])return;else if(e==="data"){if(!t)return;if(this.pipes.length)this.pipes.forEach((e=>e.dest.write(t)===false&&this.pause()))}else if(e==="end"){if(this[l]===true)return;this[l]=true;this.readable=false;if(this[g]){t=this[g].end();if(t){this.pipes.forEach((e=>e.dest.write(t)));super.emit("data",t)}}this.pipes.forEach((e=>{e.dest.removeListener("drain",e.ondrain);if(e.opts.end)e.dest.end()}))}else if(e==="close"){this[h]=true;if(!this[l]&&!this[P])return}const r=new Array(arguments.length);r[0]=e;r[1]=t;if(arguments.length>2){for(let e=2;e<arguments.length;e++){r[e]=arguments[e]}}try{return super.emit.apply(this,r)}finally{if(!isEndish(e))this[c]();else this.removeAllListeners(e)}}collect(){const e=[];if(!this[R])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[R])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[R]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[R]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(P,(()=>t(new Error("stream destroyed"))));this.on("end",(()=>e()));this.on("error",(e=>t(e)))}))}[$](){const next=()=>{const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[a])return Promise.resolve({done:true});let t=null;let r=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);r(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.pause();t({value:e,done:!!this[a]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);t({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,s)=>{r=s;t=e;this.once(P,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next}}[A](){const next=()=>{const e=this.read();const t=e===null;return{value:e,done:t}};return{next:next}}destroy(e){if(this[P]){if(e)this.emit("error",e);else this.emit(P);return this}this[P]=true;this.buffer=new i;this[E]=0;if(typeof this.close==="function"&&!this[h])this.close();if(e)this.emit("error",e);else this.emit(P);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof n||e instanceof s&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}},5540:(e,t,r)=>{"use strict";const s=typeof process==="object"&&process?process:{stdout:null,stderr:null};const n=r(2361);const i=r(2781);const o=r(1576);const a=o.StringDecoder;const c=Symbol("EOF");const l=Symbol("maybeEmitEnd");const u=Symbol("emittedEnd");const h=Symbol("emittingEnd");const d=Symbol("emittedError");const p=Symbol("closed");const m=Symbol("read");const y=Symbol("flush");const g=Symbol("flushChunk");const v=Symbol("encoding");const b=Symbol("decoder");const w=Symbol("flowing");const E=Symbol("paused");const S=Symbol("resume");const x=Symbol("buffer");const R=Symbol("pipes");const P=Symbol("bufferLength");const O=Symbol("bufferPush");const $=Symbol("bufferShift");const A=Symbol("objectMode");const T=Symbol("destroyed");const C=Symbol("error");const k=Symbol("emitData");const I=Symbol("emitEnd");const N=Symbol("emitEnd2");const D=Symbol("async");const L=Symbol("abort");const M=Symbol("aborted");const j=Symbol("signal");const defer=e=>Promise.resolve().then(e);const F=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const U=F&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const B=F&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{constructor(e,t,r){this.src=e;this.dest=t;this.opts=r;this.ondrain=()=>e[S]();t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,r){super(e,t,r);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}class Minipass extends i{constructor(e){super();this[w]=false;this[E]=false;this[R]=[];this[x]=[];this[A]=e&&e.objectMode||false;if(this[A])this[v]=null;else this[v]=e&&e.encoding||null;if(this[v]==="buffer")this[v]=null;this[D]=e&&!!e.async||false;this[b]=this[v]?new a(this[v]):null;this[c]=false;this[u]=false;this[h]=false;this[p]=false;this[d]=null;this.writable=true;this.readable=true;this[P]=0;this[T]=false;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[x]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[R]})}this[j]=e&&e.signal;this[M]=false;if(this[j]){this[j].addEventListener("abort",(()=>this[L]()));if(this[j].aborted){this[L]()}}}get bufferLength(){return this[P]}get encoding(){return this[v]}set encoding(e){if(this[A])throw new Error("cannot set encoding in objectMode");if(this[v]&&e!==this[v]&&(this[b]&&this[b].lastNeed||this[P]))throw new Error("cannot change encoding");if(this[v]!==e){this[b]=e?new a(e):null;if(this[x].length)this[x]=this[x].map((e=>this[b].write(e)))}this[v]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[A]}set objectMode(e){this[A]=this[A]||!!e}get["async"](){return this[D]}set["async"](e){this[D]=this[D]||!!e}[L](){this[M]=true;this.emit("abort",this[j].reason);this.destroy(this[j].reason)}get aborted(){return this[M]}set aborted(e){}write(e,t,r){if(this[M])return false;if(this[c])throw new Error("write after end");if(this[T]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")r=t,t="utf8";if(!t)t="utf8";const s=this[D]?defer:e=>e();if(!this[A]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(this[A]){if(this.flowing&&this[P]!==0)this[y](true);if(this.flowing)this.emit("data",e);else this[O](e);if(this[P]!==0)this.emit("readable");if(r)s(r);return this.flowing}if(!e.length){if(this[P]!==0)this.emit("readable");if(r)s(r);return this.flowing}if(typeof e==="string"&&!(t===this[v]&&!this[b].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[v])e=this[b].write(e);if(this.flowing&&this[P]!==0)this[y](true);if(this.flowing)this.emit("data",e);else this[O](e);if(this[P]!==0)this.emit("readable");if(r)s(r);return this.flowing}read(e){if(this[T])return null;if(this[P]===0||e===0||e>this[P]){this[l]();return null}if(this[A])e=null;if(this[x].length>1&&!this[A]){if(this.encoding)this[x]=[this[x].join("")];else this[x]=[Buffer.concat(this[x],this[P])]}const t=this[m](e||null,this[x][0]);this[l]();return t}[m](e,t){if(e===t.length||e===null)this[$]();else{this[x][0]=t.slice(e);t=t.slice(0,e);this[P]-=e}this.emit("data",t);if(!this[x].length&&!this[c])this.emit("drain");return t}end(e,t,r){if(typeof e==="function")r=e,e=null;if(typeof t==="function")r=t,t="utf8";if(e)this.write(e,t);if(r)this.once("end",r);this[c]=true;this.writable=false;if(this.flowing||!this[E])this[l]();return this}[S](){if(this[T])return;this[E]=false;this[w]=true;this.emit("resume");if(this[x].length)this[y]();else if(this[c])this[l]();else this.emit("drain")}resume(){return this[S]()}pause(){this[w]=false;this[E]=true}get destroyed(){return this[T]}get flowing(){return this[w]}get paused(){return this[E]}[O](e){if(this[A])this[P]+=1;else this[P]+=e.length;this[x].push(e)}[$](){if(this[A])this[P]-=1;else this[P]-=this[x][0].length;return this[x].shift()}[y](e){do{}while(this[g](this[$]())&&this[x].length);if(!e&&!this[x].length&&!this[c])this.emit("drain")}[g](e){this.emit("data",e);return this.flowing}pipe(e,t){if(this[T])return;const r=this[u];t=t||{};if(e===s.stdout||e===s.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(r){if(t.end)e.end()}else{this[R].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[D])defer((()=>this[S]()));else this[S]()}return e}unpipe(e){const t=this[R].find((t=>t.dest===e));if(t){this[R].splice(this[R].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if(e==="data"&&!this[R].length&&!this.flowing)this[S]();else if(e==="readable"&&this[P]!==0)super.emit("readable");else if(isEndish(e)&&this[u]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[d]){if(this[D])defer((()=>t.call(this,this[d])));else t.call(this,this[d])}return r}get emittedEnd(){return this[u]}[l](){if(!this[h]&&!this[u]&&!this[T]&&this[x].length===0&&this[c]){this[h]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[p])this.emit("close");this[h]=false}}emit(e,t,...r){if(e!=="error"&&e!=="close"&&e!==T&&this[T])return;else if(e==="data"){return!this[A]&&!t?false:this[D]?defer((()=>this[k](t))):this[k](t)}else if(e==="end"){return this[I]()}else if(e==="close"){this[p]=true;if(!this[u]&&!this[T])return;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[d]=t;super.emit(C,t);const e=!this[j]||this.listeners("error").length?super.emit("error",t):false;this[l]();return e}else if(e==="resume"){const e=super.emit("resume");this[l]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const s=super.emit(e,t,...r);this[l]();return s}[k](e){for(const t of this[R]){if(t.dest.write(e)===false)this.pause()}const t=super.emit("data",e);this[l]();return t}[I](){if(this[u])return;this[u]=true;this.readable=false;if(this[D])defer((()=>this[N]()));else this[N]()}[N](){if(this[b]){const e=this[b].end();if(e){for(const t of this[R]){t.dest.write(e)}super.emit("data",e)}}for(const e of this[R]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}collect(){const e=[];if(!this[A])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[A])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[A]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[A]?Promise.reject(new Error("cannot concat in objectMode")):this[v]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(T,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[U](){let e=false;const stop=()=>{this.pause();e=true;return Promise.resolve({done:true})};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[c])return stop();let r=null;let s=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);this.removeListener(T,ondestroy);stop();s(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.removeListener(T,ondestroy);this.pause();r({value:e,done:!!this[c]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);this.removeListener(T,ondestroy);stop();r({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{s=t;r=e;this.once(T,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[U](){return this}}}[B](){let e=false;const stop=()=>{this.pause();this.removeListener(C,stop);this.removeListener(T,stop);this.removeListener("end",stop);e=true;return{done:true}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{value:t}};this.once("end",stop);this.once(C,stop);this.once(T,stop);return{next:next,throw:stop,return:stop,[B](){return this}}}destroy(e){if(this[T]){if(e)this.emit("error",e);else this.emit(T);return this}this[T]=true;this[x].length=0;this[P]=0;if(typeof this.close==="function"&&!this[p])this.close();if(e)this.emit("error",e);else this.emit(T);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof i||e instanceof n&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}t.Minipass=Minipass},5154:(e,t,r)=>{const s=r(9796).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},s))},7750:(e,t,r)=>{"use strict";const s=r(9491);const n=r(4300).Buffer;const i=r(9796);const o=t.constants=r(5154);const a=r(7413);const c=n.concat;const l=Symbol("_superWrite");class ZlibError extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code;this.errno=e.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+e.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const u=Symbol("opts");const h=Symbol("flushFlag");const d=Symbol("finishFlushFlag");const p=Symbol("fullFlushFlag");const m=Symbol("handle");const y=Symbol("onError");const g=Symbol("sawError");const v=Symbol("level");const b=Symbol("strategy");const w=Symbol("ended");const E=Symbol("_defaultFullFlush");class ZlibBase extends a{constructor(e,t){if(!e||typeof e!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[g]=false;this[w]=false;this[u]=e;this[h]=e.flush;this[d]=e.finishFlush;try{this[m]=new i[t](e)}catch(e){throw new ZlibError(e)}this[y]=e=>{if(this[g])return;this[g]=true;this.close();this.emit("error",e)};this[m].on("error",(e=>this[y](new ZlibError(e))));this.once("end",(()=>this.close))}close(){if(this[m]){this[m].close();this[m]=null;this.emit("close")}}reset(){if(!this[g]){s(this[m],"zlib binding closed");return this[m].reset()}}flush(e){if(this.ended)return;if(typeof e!=="number")e=this[p];this.write(Object.assign(n.alloc(0),{[h]:e}))}end(e,t,r){if(e)this.write(e,t);this.flush(this[d]);this[w]=true;return super.end(null,null,r)}get ended(){return this[w]}write(e,t,r){if(typeof t==="function")r=t,t="utf8";if(typeof e==="string")e=n.from(e,t);if(this[g])return;s(this[m],"zlib binding closed");const i=this[m]._handle;const o=i.close;i.close=()=>{};const a=this[m].close;this[m].close=()=>{};n.concat=e=>e;let u;try{const t=typeof e[h]==="number"?e[h]:this[h];u=this[m]._processChunk(e,t);n.concat=c}catch(e){n.concat=c;this[y](new ZlibError(e))}finally{if(this[m]){this[m]._handle=i;i.close=o;this[m].close=a;this[m].removeAllListeners("error")}}if(this[m])this[m].on("error",(e=>this[y](new ZlibError(e))));let d;if(u){if(Array.isArray(u)&&u.length>0){d=this[l](n.from(u[0]));for(let e=1;e<u.length;e++){d=this[l](u[e])}}else{d=this[l](n.from(u))}}if(r)r();return d}[l](e){return super.write(e)}}class Zlib extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||o.Z_NO_FLUSH;e.finishFlush=e.finishFlush||o.Z_FINISH;super(e,t);this[p]=o.Z_FULL_FLUSH;this[v]=e.level;this[b]=e.strategy}params(e,t){if(this[g])return;if(!this[m])throw new Error("cannot switch params when binding is closed");if(!this[m].params)throw new Error("not supported in this implementation");if(this[v]!==e||this[b]!==t){this.flush(o.Z_SYNC_FLUSH);s(this[m],"zlib binding closed");const r=this[m].flush;this[m].flush=(e,t)=>{this.flush(e);t()};try{this[m].params(e,t)}finally{this[m].flush=r}if(this[m]){this[v]=e;this[b]=t}}}}class Deflate extends Zlib{constructor(e){super(e,"Deflate")}}class Inflate extends Zlib{constructor(e){super(e,"Inflate")}}const S=Symbol("_portable");class Gzip extends Zlib{constructor(e){super(e,"Gzip");this[S]=e&&!!e.portable}[l](e){if(!this[S])return super[l](e);this[S]=false;e[9]=255;return super[l](e)}}class Gunzip extends Zlib{constructor(e){super(e,"Gunzip")}}class DeflateRaw extends Zlib{constructor(e){super(e,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(e){super(e,"InflateRaw")}}class Unzip extends Zlib{constructor(e){super(e,"Unzip")}}class Brotli extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||o.BROTLI_OPERATION_PROCESS;e.finishFlush=e.finishFlush||o.BROTLI_OPERATION_FINISH;super(e,t);this[p]=o.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(e){super(e,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(e){super(e,"BrotliDecompress")}}t.Deflate=Deflate;t.Inflate=Inflate;t.Gzip=Gzip;t.Gunzip=Gunzip;t.DeflateRaw=DeflateRaw;t.InflateRaw=InflateRaw;t.Unzip=Unzip;if(typeof i.BrotliCompress==="function"){t.BrotliCompress=BrotliCompress;t.BrotliDecompress=BrotliDecompress}else{t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},9806:(e,t,r)=>{const s=r(2288);const n=r(7637);const{mkdirpNative:i,mkdirpNativeSync:o}=r(3713);const{mkdirpManual:a,mkdirpManualSync:c}=r(2561);const{useNative:l,useNativeSync:u}=r(7449);const mkdirp=(e,t)=>{e=n(e);t=s(t);return l(t)?i(e,t):a(e,t)};const mkdirpSync=(e,t)=>{e=n(e);t=s(t);return u(t)?o(e,t):c(e,t)};mkdirp.sync=mkdirpSync;mkdirp.native=(e,t)=>i(n(e),s(t));mkdirp.manual=(e,t)=>a(n(e),s(t));mkdirp.nativeSync=(e,t)=>o(n(e),s(t));mkdirp.manualSync=(e,t)=>c(n(e),s(t));e.exports=mkdirp},5509:(e,t,r)=>{const{dirname:s}=r(1017);const findMade=(e,t,r=undefined)=>{if(r===t)return Promise.resolve();return e.statAsync(t).then((e=>e.isDirectory()?r:undefined),(r=>r.code==="ENOENT"?findMade(e,s(t),t):undefined))};const findMadeSync=(e,t,r=undefined)=>{if(r===t)return undefined;try{return e.statSync(t).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?findMadeSync(e,s(t),t):undefined}};e.exports={findMade:findMade,findMadeSync:findMadeSync}},2561:(e,t,r)=>{const{dirname:s}=r(1017);const mkdirpManual=(e,t,r)=>{t.recursive=false;const n=s(e);if(n===e){return t.mkdirAsync(e,t).catch((e=>{if(e.code!=="EISDIR")throw e}))}return t.mkdirAsync(e,t).then((()=>r||e),(s=>{if(s.code==="ENOENT")return mkdirpManual(n,t).then((r=>mkdirpManual(e,t,r)));if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;return t.statAsync(e).then((e=>{if(e.isDirectory())return r;else throw s}),(()=>{throw s}))}))};const mkdirpManualSync=(e,t,r)=>{const n=s(e);t.recursive=false;if(n===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return r||e}catch(s){if(s.code==="ENOENT")return mkdirpManualSync(e,t,mkdirpManualSync(n,t,r));if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;try{if(!t.statSync(e).isDirectory())throw s}catch(e){throw s}}};e.exports={mkdirpManual:mkdirpManual,mkdirpManualSync:mkdirpManualSync}},3713:(e,t,r)=>{const{dirname:s}=r(1017);const{findMade:n,findMadeSync:i}=r(5509);const{mkdirpManual:o,mkdirpManualSync:a}=r(2561);const mkdirpNative=(e,t)=>{t.recursive=true;const r=s(e);if(r===e)return t.mkdirAsync(e,t);return n(t,e).then((r=>t.mkdirAsync(e,t).then((()=>r)).catch((r=>{if(r.code==="ENOENT")return o(e,t);else throw r}))))};const mkdirpNativeSync=(e,t)=>{t.recursive=true;const r=s(e);if(r===e)return t.mkdirSync(e,t);const n=i(t,e);try{t.mkdirSync(e,t);return n}catch(r){if(r.code==="ENOENT")return a(e,t);else throw r}};e.exports={mkdirpNative:mkdirpNative,mkdirpNativeSync:mkdirpNativeSync}},2288:(e,t,r)=>{const{promisify:s}=r(3837);const n=r(7147);const optsArg=e=>{if(!e)e={mode:511,fs:n};else if(typeof e==="object")e={mode:511,fs:n,...e};else if(typeof e==="number")e={mode:e,fs:n};else if(typeof e==="string")e={mode:parseInt(e,8),fs:n};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||n.mkdir;e.mkdirAsync=s(e.mkdir);e.stat=e.stat||e.fs.stat||n.stat;e.statAsync=s(e.stat);e.statSync=e.statSync||e.fs.statSync||n.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||n.mkdirSync;return e};e.exports=optsArg},7637:(e,t,r)=>{const s=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:n,parse:i}=r(1017);const pathArg=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=n(e);if(s==="win32"){const t=/[*|"<>?:]/;const{root:r}=i(e);if(t.test(e.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=pathArg},7449:(e,t,r)=>{const s=r(7147);const n=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const i=n.replace(/^v/,"").split(".");const o=+i[0]>10||+i[0]===10&&+i[1]>=12;const a=!o?()=>false:e=>e.mkdir===s.mkdir;const c=!o?()=>false:e=>e.mkdirSync===s.mkdirSync;e.exports={useNative:a,useNativeSync:c}},9718:(e,t,r)=>{"use strict";const s=typeof URL==="undefined"?r(7310).URL:URL;const n="text/plain";const i="us-ascii";const testParameter=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));const normalizeDataURL=(e,{stripHash:t})=>{const r=e.match(/^data:(.*?),(.*?)(?:#(.*))?$/);if(!r){throw new Error(`Invalid URL: ${e}`)}const s=r[1].split(";");const o=r[2];const a=t?"":r[3];let c=false;if(s[s.length-1]==="base64"){s.pop();c=true}const l=(s.shift()||"").toLowerCase();const u=s.map((e=>{let[t,r=""]=e.split("=").map((e=>e.trim()));if(t==="charset"){r=r.toLowerCase();if(r===i){return""}}return`${t}${r?`=${r}`:""}`})).filter(Boolean);const h=[...u];if(c){h.push("base64")}if(h.length!==0||l&&l!==n){h.unshift(l)}return`data:${h.join(";")},${c?o.trim():o}${a?`#${a}`:""}`};const normalizeUrl=(e,t)=>{t={defaultProtocol:"http:",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeDirectoryIndex:false,sortQueryParameters:true,...t};if(Reflect.has(t,"normalizeHttps")){throw new Error("options.normalizeHttps is renamed to options.forceHttp")}if(Reflect.has(t,"normalizeHttp")){throw new Error("options.normalizeHttp is renamed to options.forceHttps")}if(Reflect.has(t,"stripFragment")){throw new Error("options.stripFragment is renamed to options.stripHash")}e=e.trim();if(/^data:/i.test(e)){return normalizeDataURL(e,t)}const r=e.startsWith("//");const n=!r&&/^\.*\//.test(e);if(!n){e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol)}const i=new s(e);if(t.forceHttp&&t.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(t.forceHttp&&i.protocol==="https:"){i.protocol="http:"}if(t.forceHttps&&i.protocol==="http:"){i.protocol="https:"}if(t.stripAuthentication){i.username="";i.password=""}if(t.stripHash){i.hash=""}if(i.pathname){i.pathname=i.pathname.replace(/((?!:).|^)\/{2,}/g,((e,t)=>{if(/^(?!\/)/g.test(t)){return`${t}/`}return"/"}))}if(i.pathname){i.pathname=decodeURI(i.pathname)}if(t.removeDirectoryIndex===true){t.removeDirectoryIndex=[/^index\.[a-z]+$/]}if(Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=i.pathname.split("/");const r=e[e.length-1];if(testParameter(r,t.removeDirectoryIndex)){e=e.slice(0,e.length-1);i.pathname=e.slice(1).join("/")+"/"}}if(i.hostname){i.hostname=i.hostname.replace(/\.$/,"");if(t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(i.hostname)){i.hostname=i.hostname.replace(/^www\./,"")}}if(Array.isArray(t.removeQueryParameters)){for(const e of[...i.searchParams.keys()]){if(testParameter(e,t.removeQueryParameters)){i.searchParams.delete(e)}}}if(t.sortQueryParameters){i.searchParams.sort()}if(t.removeTrailingSlash){i.pathname=i.pathname.replace(/\/$/,"")}e=i.toString();if((t.removeTrailingSlash||i.pathname==="/")&&i.hash===""){e=e.replace(/\/$/,"")}if(r&&!t.normalizeProtocol){e=e.replace(/^http:\/\//,"//")}if(t.stripProtocol){e=e.replace(/^(?:https?:)?\/\//,"")}return e};e.exports=normalizeUrl;e.exports["default"]=normalizeUrl},9852:(e,t,r)=>{var s=r(3270);e.exports=s(once);e.exports.strict=s(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},3430:(e,t,r)=>{"use strict";const s=r(5469);const n=new WeakMap;const onetime=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let r;let i=0;const o=e.displayName||e.name||"<anonymous>";const onetime=function(...s){n.set(onetime,++i);if(i===1){r=e.apply(this,s);e=null}else if(t.throw===true){throw new Error(`Function \`${o}\` can only be called once`)}return r};s(onetime,e);n.set(onetime,i);return onetime};e.exports=onetime;e.exports["default"]=onetime;e.exports.callCount=e=>{if(!n.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return n.get(e)}},3426:e=>{"use strict";class CancelError extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return true}}class PCancelable{static fn(e){return(...t)=>new PCancelable(((r,s,n)=>{t.push(n);e(...t).then(r,s)}))}constructor(e){this._cancelHandlers=[];this._isPending=true;this._isCanceled=false;this._rejectOnCancel=true;this._promise=new Promise(((t,r)=>{this._reject=r;const onResolve=e=>{this._isPending=false;t(e)};const onReject=e=>{this._isPending=false;r(e)};const onCancel=e=>{if(!this._isPending){throw new Error("The `onCancel` handler was attached after the promise settled.")}this._cancelHandlers.push(e)};Object.defineProperties(onCancel,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}});return e(onResolve,onReject,onCancel)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!this._isPending||this._isCanceled){return}if(this._cancelHandlers.length>0){try{for(const e of this._cancelHandlers){e()}}catch(e){this._reject(e)}}this._isCanceled=true;if(this._rejectOnCancel){this._reject(new CancelError(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(PCancelable.prototype,Promise.prototype);e.exports=PCancelable;e.exports.CancelError=CancelError},6291:(e,t,r)=>{"use strict";const s=r(7033);const n=Symbol.asyncIterator||"@@asyncIterator";const normalizeEmitter=e=>{const t=e.on||e.addListener||e.addEventListener;const r=e.off||e.removeListener||e.removeEventListener;if(!t||!r){throw new TypeError("Emitter is not compatible")}return{addListener:t.bind(e),removeListener:r.bind(e)}};const normalizeEvents=e=>Array.isArray(e)?e:[e];const multiple=(e,t,r)=>{let n;const i=new Promise(((s,i)=>{r={rejectionEvents:["error"],multiArgs:false,resolveImmediately:false,...r};if(!(r.count>=0&&(r.count===Infinity||Number.isInteger(r.count)))){throw new TypeError("The `count` option should be at least 0 or more")}const o=normalizeEvents(t);const a=[];const{addListener:c,removeListener:l}=normalizeEmitter(e);const onItem=(...e)=>{const t=r.multiArgs?e:e[0];if(r.filter&&!r.filter(t)){return}a.push(t);if(r.count===a.length){n();s(a)}};const rejectHandler=e=>{n();i(e)};n=()=>{for(const e of o){l(e,onItem)}for(const e of r.rejectionEvents){l(e,rejectHandler)}};for(const e of o){c(e,onItem)}for(const e of r.rejectionEvents){c(e,rejectHandler)}if(r.resolveImmediately){s(a)}}));i.cancel=n;if(typeof r.timeout==="number"){const e=s(i,r.timeout);e.cancel=n;return e}return i};const pEvent=(e,t,r)=>{if(typeof r==="function"){r={filter:r}}r={...r,count:1,resolveImmediately:false};const s=multiple(e,t,r);const n=s.then((e=>e[0]));n.cancel=s.cancel;return n};e.exports=pEvent;e.exports["default"]=pEvent;e.exports.multiple=multiple;e.exports.iterator=(e,t,r)=>{if(typeof r==="function"){r={filter:r}}const s=normalizeEvents(t);r={rejectionEvents:["error"],resolutionEvents:[],limit:Infinity,multiArgs:false,...r};const{limit:i}=r;const o=i>=0&&(i===Infinity||Number.isInteger(i));if(!o){throw new TypeError("The `limit` option should be a non-negative integer or Infinity")}if(i===0){return{[Symbol.asyncIterator](){return this},async next(){return{done:true,value:undefined}}}}const{addListener:a,removeListener:c}=normalizeEmitter(e);let l=false;let u;let h=false;const d=[];const p=[];let m=0;let y=false;const valueHandler=(...e)=>{m++;y=m===i;const t=r.multiArgs?e:e[0];if(d.length>0){const{resolve:e}=d.shift();e({done:false,value:t});if(y){cancel()}return}p.push(t);if(y){cancel()}};const cancel=()=>{l=true;for(const e of s){c(e,valueHandler)}for(const e of r.rejectionEvents){c(e,rejectHandler)}for(const e of r.resolutionEvents){c(e,resolveHandler)}while(d.length>0){const{resolve:e}=d.shift();e({done:true,value:undefined})}};const rejectHandler=(...e)=>{u=r.multiArgs?e:e[0];if(d.length>0){const{reject:e}=d.shift();e(u)}else{h=true}cancel()};const resolveHandler=(...e)=>{const t=r.multiArgs?e:e[0];if(r.filter&&!r.filter(t)){return}if(d.length>0){const{resolve:e}=d.shift();e({done:true,value:t})}else{p.push(t)}cancel()};for(const e of s){a(e,valueHandler)}for(const e of r.rejectionEvents){a(e,rejectHandler)}for(const e of r.resolutionEvents){a(e,resolveHandler)}return{[n](){return this},async next(){if(p.length>0){const e=p.shift();return{done:l&&p.length===0&&!y,value:e}}if(h){h=false;throw u}if(l){return{done:true,value:undefined}}return new Promise(((e,t)=>d.push({resolve:e,reject:t})))},async return(e){cancel();return{done:l,value:e}}}}},8213:e=>{"use strict";e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},6742:(e,t,r)=>{"use strict";const s=r(1857);const pLimit=e=>{if(!((Number.isInteger(e)||e===Infinity)&&e>0)){return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"))}const t=[];let r=0;const next=()=>{r--;if(t.length>0){t.shift()()}};const run=(e,t,...n)=>{r++;const i=s(e,...n);t(i);i.then(next,next)};const enqueue=(s,n,...i)=>{if(r<e){run(s,n,...i)}else{t.push(run.bind(null,s,n,...i))}};const generator=(e,...t)=>new Promise((r=>enqueue(e,r,...t)));Object.defineProperties(generator,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}});return generator};e.exports=pLimit;e.exports["default"]=pLimit},4604:(e,t,r)=>{"use strict";const s=r(6742);class EndError extends Error{constructor(e){super();this.value=e}}const testElement=(e,t)=>Promise.resolve(e).then(t);const finder=e=>Promise.all(e).then((e=>e[1]===true&&Promise.reject(new EndError(e[0]))));e.exports=(e,t,r)=>{r=Object.assign({concurrency:Infinity,preserveOrder:true},r);const n=s(r.concurrency);const i=[...e].map((e=>[e,n(testElement,e,t)]));const o=s(r.preserveOrder?1:Infinity);return Promise.all(i.map((e=>o(finder,e)))).then((()=>{})).catch((e=>e instanceof EndError?e.value:Promise.reject(e)))}},7033:(e,t,r)=>{"use strict";const s=r(8213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}e.exports=(e,t,r)=>new Promise(((n,i)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `ms` to be a positive number")}const o=setTimeout((()=>{if(typeof r==="function"){try{n(r())}catch(o){i(o)}return}const s=typeof r==="string"?r:`Promise timed out after ${t} milliseconds`;const o=r instanceof Error?r:new TimeoutError(s);if(typeof e.cancel==="function"){e.cancel()}i(o)}),t);s(e.then(n,i),(()=>{clearTimeout(o)}))}));e.exports.TimeoutError=TimeoutError},1857:e=>{"use strict";const pTry=(e,...t)=>new Promise((r=>{r(e(...t))}));e.exports=pTry;e.exports["default"]=pTry},3883:(e,t,r)=>{"use strict";const s=r(7147);e.exports=e=>new Promise((t=>{s.access(e,(e=>{t(!e)}))}));e.exports.sync=e=>{try{s.accessSync(e);return true}catch(e){return false}}},6516:e=>{"use strict";const pathKey=(e={})=>{const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).reverse().find((e=>e.toUpperCase()==="PATH"))||"Path"};e.exports=pathKey;e.exports["default"]=pathKey},9306:(e,t,r)=>{let s=r(6224);let n=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||s.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(e,t,r=e)=>s=>{let n=""+s;let i=n.indexOf(t,e.length);return~i?e+replaceClose(n,t,r,i)+t:e+n+t};let replaceClose=(e,t,r,s)=>{let n=e.substring(0,s)+r;let i=e.substring(s+t.length);let o=i.indexOf(t);return~o?n+replaceClose(i,t,r,o):n+i};let createColors=(e=n)=>({isColorSupported:e,reset:e?e=>`[0m${e}[0m`:String,bold:e?formatter("[1m","[22m","[22m[1m"):String,dim:e?formatter("[2m","[22m","[22m[2m"):String,italic:e?formatter("[3m","[23m"):String,underline:e?formatter("[4m","[24m"):String,inverse:e?formatter("[7m","[27m"):String,hidden:e?formatter("[8m","[28m"):String,strikethrough:e?formatter("[9m","[29m"):String,black:e?formatter("[30m","[39m"):String,red:e?formatter("[31m","[39m"):String,green:e?formatter("[32m","[39m"):String,yellow:e?formatter("[33m","[39m"):String,blue:e?formatter("[34m","[39m"):String,magenta:e?formatter("[35m","[39m"):String,cyan:e?formatter("[36m","[39m"):String,white:e?formatter("[37m","[39m"):String,gray:e?formatter("[90m","[39m"):String,bgBlack:e?formatter("[40m","[49m"):String,bgRed:e?formatter("[41m","[49m"):String,bgGreen:e?formatter("[42m","[49m"):String,bgYellow:e?formatter("[43m","[49m"):String,bgBlue:e?formatter("[44m","[49m"):String,bgMagenta:e?formatter("[45m","[49m"):String,bgCyan:e?formatter("[46m","[49m"):String,bgWhite:e?formatter("[47m","[49m"):String});e.exports=createColors();e.exports.createColors=createColors},3846:(e,t,r)=>{"use strict";e.exports=r(7250)},3380:(e,t,r)=>{"use strict";const s=r(1017);const n="\\\\/";const i=`[^${n}]`;const o="\\.";const a="\\+";const c="\\?";const l="\\/";const u="(?=.)";const h="[^/]";const d=`(?:${l}|$)`;const p=`(?:^|${l})`;const m=`${o}{1,2}${d}`;const y=`(?!${o})`;const g=`(?!${p}${m})`;const v=`(?!${o}{0,1}${d})`;const b=`(?!${m})`;const w=`[^.${l}]`;const E=`${h}*?`;const S={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:c,SLASH_LITERAL:l,ONE_CHAR:u,QMARK:h,END_ANCHOR:d,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:g,NO_DOT_SLASH:v,NO_DOTS_SLASH:b,QMARK_NO_DOT:w,STAR:E,START_ANCHOR:p};const x={...S,SLASH_LITERAL:`[${n}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${n}])${o}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`};const R={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};e.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:R,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?x:S}}},3632:(e,t,r)=>{"use strict";const s=r(3380);const n=r(5502);const{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:l}=s;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>n.escapeRegex(e))).join("..")}return r};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=l[e]||e;const r={...t};const u=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;let h=e.length;if(h>u){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${u}`)}const d={type:"bos",value:"",output:r.prepend||""};const p=[d];const m=r.capture?"":"?:";const y=n.isWindows(t);const g=s.globChars(y);const v=s.extglobChars(g);const{DOT_LITERAL:b,PLUS_LITERAL:w,SLASH_LITERAL:E,ONE_CHAR:S,DOTS_SLASH:x,NO_DOT:R,NO_DOT_SLASH:P,NO_DOTS_SLASH:O,QMARK:$,QMARK_NO_DOT:A,STAR:T,START_ANCHOR:C}=g;const globstar=e=>`(${m}(?:(?!${C}${e.dot?x:b}).)*?)`;const k=r.dot?"":R;const I=r.dot?$:A;let N=r.bash===true?globstar(r):T;if(r.capture){N=`(${N})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const D={input:e,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:p};e=n.removePrefix(e,D);h=e.length;const L=[];const M=[];const j=[];let F=d;let U;const eos=()=>D.index===h-1;const B=D.peek=(t=1)=>e[D.index+t];const H=D.advance=()=>e[++D.index]||"";const remaining=()=>e.slice(D.index+1);const consume=(e="",t=0)=>{D.consumed+=e;D.index+=t};const append=e=>{D.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while(B()==="!"&&(B(2)!=="("||B(3)==="?")){H();D.start++;e++}if(e%2===0){return false}D.negated=true;D.start++;return true};const increment=e=>{D[e]++;j.push(e)};const decrement=e=>{D[e]--;j.pop()};const push=e=>{if(F.type==="globstar"){const t=D.braces>0&&(e.type==="comma"||e.type==="brace");const r=e.extglob===true||L.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!r){D.output=D.output.slice(0,-F.output.length);F.type="star";F.value="*";F.output=N;D.output+=F.output}}if(L.length&&e.type!=="paren"){L[L.length-1].inner+=e.value}if(e.value||e.output)append(e);if(F&&F.type==="text"&&e.type==="text"){F.value+=e.value;F.output=(F.output||"")+e.value;return}e.prev=F;p.push(e);F=e};const extglobOpen=(e,t)=>{const s={...v[t],conditions:1,inner:""};s.prev=F;s.parens=D.parens;s.output=D.output;const n=(r.capture?"(":"")+s.open;increment("parens");push({type:e,value:t,output:D.output?"":S});push({type:"paren",extglob:true,value:H(),output:n});L.push(s)};const extglobClose=e=>{let s=e.close+(r.capture?")":"");let n;if(e.type==="negate"){let i=N;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){i=globstar(r)}if(i!==N||eos()||/^\)+$/.test(remaining())){s=e.close=`)$))${i}`}if(e.inner.includes("*")&&(n=remaining())&&/^\.[^\\/.]+$/.test(n)){const r=parse(n,{...t,fastpaths:false}).output;s=e.close=`)${r})${i})`}if(e.prev.type==="bos"){D.negatedExtglob=true}}push({type:"paren",extglob:true,value:U,output:s});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=false;let i=e.replace(c,((e,t,r,n,i,o)=>{if(n==="\\"){s=true;return e}if(n==="?"){if(t){return t+n+(i?$.repeat(i.length):"")}if(o===0){return I+(i?$.repeat(i.length):"")}return $.repeat(r.length)}if(n==="."){return b.repeat(r.length)}if(n==="*"){if(t){return t+n+(i?N:"")}return N}return t?e:`\\${e}`}));if(s===true){if(r.unescape===true){i=i.replace(/\\/g,"")}else{i=i.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(i===e&&r.contains===true){D.output=e;return D}D.output=n.wrapOutput(i,D,t);return D}while(!eos()){U=H();if(U==="\0"){continue}if(U==="\\"){const e=B();if(e==="/"&&r.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){U+="\\";push({type:"text",value:U});continue}const t=/^\\+/.exec(remaining());let s=0;if(t&&t[0].length>2){s=t[0].length;D.index+=s;if(s%2!==0){U+="\\"}}if(r.unescape===true){U=H()}else{U+=H()}if(D.brackets===0){push({type:"text",value:U});continue}}if(D.brackets>0&&(U!=="]"||F.value==="["||F.value==="[^")){if(r.posix!==false&&U===":"){const e=F.value.slice(1);if(e.includes("[")){F.posix=true;if(e.includes(":")){const e=F.value.lastIndexOf("[");const t=F.value.slice(0,e);const r=F.value.slice(e+2);const s=o[r];if(s){F.value=t+s;D.backtrack=true;H();if(!d.output&&p.indexOf(F)===1){d.output=S}continue}}}}if(U==="["&&B()!==":"||U==="-"&&B()==="]"){U=`\\${U}`}if(U==="]"&&(F.value==="["||F.value==="[^")){U=`\\${U}`}if(r.posix===true&&U==="!"&&F.value==="["){U="^"}F.value+=U;append({value:U});continue}if(D.quotes===1&&U!=='"'){U=n.escapeRegex(U);F.value+=U;append({value:U});continue}if(U==='"'){D.quotes=D.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:U})}continue}if(U==="("){increment("parens");push({type:"paren",value:U});continue}if(U===")"){if(D.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=L[L.length-1];if(e&&D.parens===e.parens+1){extglobClose(L.pop());continue}push({type:"paren",value:U,output:D.parens?")":"\\)"});decrement("parens");continue}if(U==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}U=`\\${U}`}else{increment("brackets")}push({type:"bracket",value:U});continue}if(U==="]"){if(r.nobracket===true||F&&F.type==="bracket"&&F.value.length===1){push({type:"text",value:U,output:`\\${U}`});continue}if(D.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:U,output:`\\${U}`});continue}decrement("brackets");const e=F.value.slice(1);if(F.posix!==true&&e[0]==="^"&&!e.includes("/")){U=`/${U}`}F.value+=U;append({value:U});if(r.literalBrackets===false||n.hasRegexChars(e)){continue}const t=n.escapeRegex(F.value);D.output=D.output.slice(0,-F.value.length);if(r.literalBrackets===true){D.output+=t;F.value=t;continue}F.value=`(${m}${t}|${F.value})`;D.output+=F.value;continue}if(U==="{"&&r.nobrace!==true){increment("braces");const e={type:"brace",value:U,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};M.push(e);push(e);continue}if(U==="}"){const e=M[M.length-1];if(r.nobrace===true||!e){push({type:"text",value:U,output:U});continue}let t=")";if(e.dots===true){const e=p.slice();const s=[];for(let t=e.length-1;t>=0;t--){p.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){s.unshift(e[t].value)}}t=expandRange(s,r);D.backtrack=true}if(e.comma!==true&&e.dots!==true){const r=D.output.slice(0,e.outputIndex);const s=D.tokens.slice(e.tokensIndex);e.value=e.output="\\{";U=t="\\}";D.output=r;for(const e of s){D.output+=e.output||e.value}}push({type:"brace",value:U,output:t});decrement("braces");M.pop();continue}if(U==="|"){if(L.length>0){L[L.length-1].conditions++}push({type:"text",value:U});continue}if(U===","){let e=U;const t=M[M.length-1];if(t&&j[j.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:U,output:e});continue}if(U==="/"){if(F.type==="dot"&&D.index===D.start+1){D.start=D.index+1;D.consumed="";D.output="";p.pop();F=d;continue}push({type:"slash",value:U,output:E});continue}if(U==="."){if(D.braces>0&&F.type==="dot"){if(F.value===".")F.output=b;const e=M[M.length-1];F.type="dots";F.output+=U;F.value+=U;e.dots=true;continue}if(D.braces+D.parens===0&&F.type!=="bos"&&F.type!=="slash"){push({type:"text",value:U,output:b});continue}push({type:"dot",value:U,output:b});continue}if(U==="?"){const e=F&&F.value==="(";if(!e&&r.noextglob!==true&&B()==="("&&B(2)!=="?"){extglobOpen("qmark",U);continue}if(F&&F.type==="paren"){const e=B();let t=U;if(e==="<"&&!n.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(F.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${U}`}push({type:"text",value:U,output:t});continue}if(r.dot!==true&&(F.type==="slash"||F.type==="bos")){push({type:"qmark",value:U,output:A});continue}push({type:"qmark",value:U,output:$});continue}if(U==="!"){if(r.noextglob!==true&&B()==="("){if(B(2)!=="?"||!/[!=<:]/.test(B(3))){extglobOpen("negate",U);continue}}if(r.nonegate!==true&&D.index===0){negate();continue}}if(U==="+"){if(r.noextglob!==true&&B()==="("&&B(2)!=="?"){extglobOpen("plus",U);continue}if(F&&F.value==="("||r.regex===false){push({type:"plus",value:U,output:w});continue}if(F&&(F.type==="bracket"||F.type==="paren"||F.type==="brace")||D.parens>0){push({type:"plus",value:U});continue}push({type:"plus",value:w});continue}if(U==="@"){if(r.noextglob!==true&&B()==="("&&B(2)!=="?"){push({type:"at",extglob:true,value:U,output:""});continue}push({type:"text",value:U});continue}if(U!=="*"){if(U==="$"||U==="^"){U=`\\${U}`}const e=a.exec(remaining());if(e){U+=e[0];D.index+=e[0].length}push({type:"text",value:U});continue}if(F&&(F.type==="globstar"||F.star===true)){F.type="star";F.star=true;F.value+=U;F.output=N;D.backtrack=true;D.globstar=true;consume(U);continue}let t=remaining();if(r.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",U);continue}if(F.type==="star"){if(r.noglobstar===true){consume(U);continue}const s=F.prev;const n=s.prev;const i=s.type==="slash"||s.type==="bos";const o=n&&(n.type==="star"||n.type==="globstar");if(r.bash===true&&(!i||t[0]&&t[0]!=="/")){push({type:"star",value:U,output:""});continue}const a=D.braces>0&&(s.type==="comma"||s.type==="brace");const c=L.length&&(s.type==="pipe"||s.type==="paren");if(!i&&s.type!=="paren"&&!a&&!c){push({type:"star",value:U,output:""});continue}while(t.slice(0,3)==="/**"){const r=e[D.index+4];if(r&&r!=="/"){break}t=t.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){F.type="globstar";F.value+=U;F.output=globstar(r);D.output=F.output;D.globstar=true;consume(U);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){D.output=D.output.slice(0,-(s.output+F.output).length);s.output=`(?:${s.output}`;F.type="globstar";F.output=globstar(r)+(r.strictSlashes?")":"|$)");F.value+=U;D.globstar=true;D.output+=s.output+F.output;consume(U);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";D.output=D.output.slice(0,-(s.output+F.output).length);s.output=`(?:${s.output}`;F.type="globstar";F.output=`${globstar(r)}${E}|${E}${e})`;F.value+=U;D.output+=s.output+F.output;D.globstar=true;consume(U+H());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&t[0]==="/"){F.type="globstar";F.value+=U;F.output=`(?:^|${E}|${globstar(r)}${E})`;D.output=F.output;D.globstar=true;consume(U+H());push({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-F.output.length);F.type="globstar";F.output=globstar(r);F.value+=U;D.output+=F.output;D.globstar=true;consume(U);continue}const s={type:"star",value:U,output:N};if(r.bash===true){s.output=".*?";if(F.type==="bos"||F.type==="slash"){s.output=k+s.output}push(s);continue}if(F&&(F.type==="bracket"||F.type==="paren")&&r.regex===true){s.output=U;push(s);continue}if(D.index===D.start||F.type==="slash"||F.type==="dot"){if(F.type==="dot"){D.output+=P;F.output+=P}else if(r.dot===true){D.output+=O;F.output+=O}else{D.output+=k;F.output+=k}if(B()!=="*"){D.output+=S;F.output+=S}}push(s)}while(D.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));D.output=n.escapeLast(D.output,"[");decrement("brackets")}while(D.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));D.output=n.escapeLast(D.output,"(");decrement("parens")}while(D.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));D.output=n.escapeLast(D.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(F.type==="star"||F.type==="bracket")){push({type:"maybe_slash",value:"",output:`${E}?`})}if(D.backtrack===true){D.output="";for(const e of D.tokens){D.output+=e.output!=null?e.output:e.value;if(e.suffix){D.output+=e.suffix}}}return D};parse.fastpaths=(e,t)=>{const r={...t};const o=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;const a=e.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}e=l[e]||e;const c=n.isWindows(t);const{DOT_LITERAL:u,SLASH_LITERAL:h,ONE_CHAR:d,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:y,NO_DOTS_SLASH:g,STAR:v,START_ANCHOR:b}=s.globChars(c);const w=r.dot?y:m;const E=r.dot?g:m;const S=r.capture?"":"?:";const x={negated:false,prefix:""};let R=r.bash===true?".*?":v;if(r.capture){R=`(${R})`}const globstar=e=>{if(e.noglobstar===true)return R;return`(${S}(?:(?!${b}${e.dot?p:u}).)*?)`};const create=e=>{switch(e){case"*":return`${w}${d}${R}`;case".*":return`${u}${d}${R}`;case"*.*":return`${w}${R}${u}${d}${R}`;case"*/*":return`${w}${R}${h}${d}${E}${R}`;case"**":return w+globstar(r);case"**/*":return`(?:${w}${globstar(r)}${h})?${E}${d}${R}`;case"**/*.*":return`(?:${w}${globstar(r)}${h})?${E}${R}${u}${d}${R}`;case"**/.*":return`(?:${w}${globstar(r)}${h})?${u}${d}${R}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=create(t[1]);if(!r)return;return r+u+t[2]}}};const P=n.removePrefix(e,x);let O=create(P);if(O&&r.strictSlashes!==true){O+=`${h}?`}return O};e.exports=parse},7250:(e,t,r)=>{"use strict";const s=r(1017);const n=r(2964);const i=r(3632);const o=r(5502);const a=r(3380);const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch=(e,t,r=false)=>{if(Array.isArray(e)){const s=e.map((e=>picomatch(e,t,r)));const arrayMatcher=e=>{for(const t of s){const r=t(e);if(r)return r}return false};return arrayMatcher}const s=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const n=t||{};const i=o.isWindows(t);const a=s?picomatch.compileRe(e,t):picomatch.makeRe(e,t,false,true);const c=a.state;delete a.state;let isIgnored=()=>false;if(n.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(n.ignore,e,r)}const matcher=(r,s=false)=>{const{isMatch:o,match:l,output:u}=picomatch.test(r,a,t,{glob:e,posix:i});const h={glob:e,state:c,regex:a,posix:i,input:r,output:u,match:l,isMatch:o};if(typeof n.onResult==="function"){n.onResult(h)}if(o===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof n.onIgnore==="function"){n.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof n.onMatch==="function"){n.onMatch(h)}return s?h:true};if(r){matcher.state=c}return matcher};picomatch.test=(e,t,r,{glob:s,posix:n}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const i=r||{};const a=i.format||(n?o.toPosixSlashes:null);let c=e===s;let l=c&&a?a(e):e;if(c===false){l=a?a(e):e;c=l===s}if(c===false||i.capture===true){if(i.matchBase===true||i.basename===true){c=picomatch.matchBase(e,t,r,n)}else{c=t.exec(l)}}return{isMatch:Boolean(c),match:c,output:l}};picomatch.matchBase=(e,t,r,n=o.isWindows(r))=>{const i=t instanceof RegExp?t:picomatch.makeRe(t,r);return i.test(s.basename(e))};picomatch.isMatch=(e,t,r)=>picomatch(t,r)(e);picomatch.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch.parse(e,t)));return i(e,{...t,fastpaths:false})};picomatch.scan=(e,t)=>n(e,t);picomatch.compileRe=(e,t,r=false,s=false)=>{if(r===true){return e.output}const n=t||{};const i=n.contains?"":"^";const o=n.contains?"":"$";let a=`${i}(?:${e.output})${o}`;if(e&&e.negated===true){a=`^(?!${a}).*$`}const c=picomatch.toRegex(a,t);if(s===true){c.state=e}return c};picomatch.makeRe=(e,t={},r=false,s=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}let n={negated:false,fastpaths:true};if(t.fastpaths!==false&&(e[0]==="."||e[0]==="*")){n.output=i.fastpaths(e,t)}if(!n.output){n=i(e,t)}return picomatch.compileRe(n,t,r,s)};picomatch.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch.constants=a;e.exports=picomatch},2964:(e,t,r)=>{"use strict";const s=r(5502);const{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:m,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:v,CHAR_RIGHT_SQUARE_BRACKET:b}=r(3380);const isPathSeparator=e=>e===u||e===o;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan=(e,t)=>{const r=t||{};const w=e.length-1;const E=r.parts===true||r.scanToEnd===true;const S=[];const x=[];const R=[];let P=e;let O=-1;let $=0;let A=0;let T=false;let C=false;let k=false;let I=false;let N=false;let D=false;let L=false;let M=false;let j=false;let F=false;let U=0;let B;let H;let z={value:"",depth:0,isGlob:false};const eos=()=>O>=w;const peek=()=>P.charCodeAt(O+1);const advance=()=>{B=H;return P.charCodeAt(++O)};while(O<w){H=advance();let e;if(H===o){L=z.backslashes=true;H=advance();if(H===h){D=true}continue}if(D===true||H===h){U++;while(eos()!==true&&(H=advance())){if(H===o){L=z.backslashes=true;advance();continue}if(H===h){U++;continue}if(D!==true&&H===c&&(H=advance())===c){T=z.isBrace=true;k=z.isGlob=true;F=true;if(E===true){continue}break}if(D!==true&&H===a){T=z.isBrace=true;k=z.isGlob=true;F=true;if(E===true){continue}break}if(H===g){U--;if(U===0){D=false;T=z.isBrace=true;F=true;break}}}if(E===true){continue}break}if(H===u){S.push(O);x.push(z);z={value:"",depth:0,isGlob:false};if(F===true)continue;if(B===c&&O===$+1){$+=2;continue}A=O+1;continue}if(r.noext!==true){const e=H===m||H===i||H===n||H===y||H===l;if(e===true&&peek()===d){k=z.isGlob=true;I=z.isExtglob=true;F=true;if(H===l&&O===$){j=true}if(E===true){while(eos()!==true&&(H=advance())){if(H===o){L=z.backslashes=true;H=advance();continue}if(H===v){k=z.isGlob=true;F=true;break}}continue}break}}if(H===n){if(B===n)N=z.isGlobstar=true;k=z.isGlob=true;F=true;if(E===true){continue}break}if(H===y){k=z.isGlob=true;F=true;if(E===true){continue}break}if(H===p){while(eos()!==true&&(e=advance())){if(e===o){L=z.backslashes=true;advance();continue}if(e===b){C=z.isBracket=true;k=z.isGlob=true;F=true;break}}if(E===true){continue}break}if(r.nonegate!==true&&H===l&&O===$){M=z.negated=true;$++;continue}if(r.noparen!==true&&H===d){k=z.isGlob=true;if(E===true){while(eos()!==true&&(H=advance())){if(H===d){L=z.backslashes=true;H=advance();continue}if(H===v){F=true;break}}continue}break}if(k===true){F=true;if(E===true){continue}break}}if(r.noext===true){I=false;k=false}let G=P;let V="";let q="";if($>0){V=P.slice(0,$);P=P.slice($);A-=$}if(G&&k===true&&A>0){G=P.slice(0,A);q=P.slice(A)}else if(k===true){G="";q=P}else{G=P}if(G&&G!==""&&G!=="/"&&G!==P){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(q)q=s.removeBackslashes(q);if(G&&L===true){G=s.removeBackslashes(G)}}const W={prefix:V,input:e,start:$,base:G,glob:q,isBrace:T,isBracket:C,isGlob:k,isExtglob:I,isGlobstar:N,negated:M,negatedExtglob:j};if(r.tokens===true){W.maxDepth=0;if(!isPathSeparator(H)){x.push(z)}W.tokens=x}if(r.parts===true||r.tokens===true){let t;for(let s=0;s<S.length;s++){const n=t?t+1:$;const i=S[s];const o=e.slice(n,i);if(r.tokens){if(s===0&&$!==0){x[s].isPrefix=true;x[s].value=V}else{x[s].value=o}depth(x[s]);W.maxDepth+=x[s].depth}if(s!==0||o!==""){R.push(o)}t=i}if(t&&t+1<e.length){const s=e.slice(t+1);R.push(s);if(r.tokens){x[x.length-1].value=s;depth(x[x.length-1]);W.maxDepth+=x[x.length-1].depth}}W.slashes=S;W.parts=R}return W};e.exports=scan},5502:(e,t,r)=>{"use strict";const s=r(1017);const n=process.platform==="win32";const{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=r(3380);t.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);t.hasRegexChars=e=>a.test(e);t.isRegexChar=e=>e.length===1&&t.hasRegexChars(e);t.escapeRegex=e=>e.replace(c,"\\$1");t.toPosixSlashes=e=>e.replace(i,"/");t.removeBackslashes=e=>e.replace(o,(e=>e==="\\"?"":e));t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};t.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return n===true||s.sep==="\\"};t.escapeLast=(e,r,s)=>{const n=e.lastIndexOf(r,s);if(n===-1)return e;if(e[n-1]==="\\")return t.escapeLast(e,r,n-1);return`${e.slice(0,n)}\\${e.slice(n)}`};t.removePrefix=(e,t={})=>{let r=e;if(r.startsWith("./")){r=r.slice(2);t.prefix="./"}return r};t.wrapOutput=(e,t={},r={})=>{const s=r.contains?"":"^";const n=r.contains?"":"$";let i=`${s}(?:${e})${n}`;if(t.negated===true){i=`(?:^(?!${i}).*$)`}return i}},990:(e,t,r)=>{"use strict";const s=r(7517);e.exports=async({cwd:e}={})=>s("package.json",{cwd:e});e.exports.sync=({cwd:e}={})=>s.sync("package.json",{cwd:e})},8272:e=>{"use strict";class DatePart{constructor({token:e,date:t,parts:r,locales:s}){this.token=e;this.date=t||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((t,r)=>r>e&&t instanceof DatePart))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const t=e.indexOf(this);return e.find(((e,r)=>r>t&&e instanceof DatePart))}toString(){return String(this.date)}}e.exports=DatePart},5236:(e,t,r)=>{"use strict";const s=r(8272);const pos=e=>{e=e%10;return e===1?"st":e===2?"nd":e===3?"rd":"th"};class Day extends s{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate();let t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+pos(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}}e.exports=Day},8507:(e,t,r)=>{"use strict";const s=r(8272);class Hours extends s{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();if(/h/.test(this.token))e=e%12||12;return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Hours},1442:(e,t,r)=>{"use strict";e.exports={DatePart:r(8272),Meridiem:r(3402),Day:r(5236),Hours:r(8507),Milliseconds:r(4055),Minutes:r(2859),Month:r(7436),Seconds:r(5847),Year:r(2751)}},3402:(e,t,r)=>{"use strict";const s=r(8272);class Meridiem extends s{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}e.exports=Meridiem},4055:(e,t,r)=>{"use strict";const s=r(8272);class Milliseconds extends s{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}e.exports=Milliseconds},2859:(e,t,r)=>{"use strict";const s=r(8272);class Minutes extends s{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Minutes},7436:(e,t,r)=>{"use strict";const s=r(8272);class Month extends s{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1;this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth();let t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}}e.exports=Month},5847:(e,t,r)=>{"use strict";const s=r(8272);class Seconds extends s{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Seconds},2751:(e,t,r)=>{"use strict";const s=r(8272);class Year extends s{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}}e.exports=Year},3475:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(4577),o=i.cursor;const a=r(669),c=a.style,l=a.clear,u=a.figures,h=a.strip;const getVal=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]);const getTitle=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);const getIndex=(e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:undefined};class AutocompletePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.suggest=e.suggest;this.choices=e.choices;this.initial=typeof e.initial==="number"?e.initial:getIndex(e.choices,e.initial);this.select=this.initial||e.cursor||0;this.fallback=e.fallback||(e.initial!==undefined?`${u.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${u.pointerSmall} ${e.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=e.limit||10;this.cursor=0;this.transform=c.render(e.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=l("");this.complete(this.render);this.render()}moveSelect(e){this.select=e;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],e)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}complete(e){var t=this;return _asyncToGenerator((function*(){const r=t.completing=t.suggest(t.input,t.choices);const s=yield r;if(t.completing!==r)return;t.suggestions=s.map(((e,t,r)=>({title:getTitle(r,t),value:getVal(r,t)}))).reduce(((e,r)=>{if(e[e.length-1].length<t.limit)e[e.length-1].push(r);else e.push([r]);return e}),[[]]);t.isFallback=false;t.completing=false;if(!t.suggestions[t.page])t.page=0;if(!t.suggestions.length&&t.fallback){const e=getIndex(t.choices,t.fallback);t.suggestions=[[]];if(e!==undefined)t.suggestions[0].push({title:getTitle(t.choices,e),value:getVal(t.choices,e)});t.isFallback=true}const n=Math.max(s.length-1,0);t.moveSelect(Math.min(n,t.select));e&&e()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1);let t=this.input.slice(this.cursor);this.input=`${e}${t}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor);let t=this.input.slice(this.cursor+1);this.input=`${e}${t}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(o.down(this.lineCount));let e=s.bold(`${c.symbol(this.done,this.aborted)} ${this.msg} `)+`${c.delimiter(this.completing)} `;let t=h(e).length;if(this.done&&this.suggestions[this.page][this.select]){e+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;t+=this.rendered.length;e+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let t=this.suggestions[this.page].reduce(((e,t,r)=>e+`\n${r===this.select?s.cyan(t.title):t.title}`),"");if(t&&!this.isFallback){e+=t;if(this.suggestions.length>1){this.lineCount++;e+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const t=getIndex(this.choices,this.fallback);const r=t!==undefined?getTitle(this.choices,t):this.fallback;e+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+e);this.clear=l(e);if(this.lineCount&&!this.done){let e=o.up(this.lineCount);e+=o.left+o.to(t);e+=o.move(-this.rendered.length+this.cursor*this.scale);this.out.write(e)}}}e.exports=AutocompletePrompt},8819:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4577),i=n.cursor;const o=r(8056);const a=r(669),c=a.clear,l=a.style,u=a.figures;class AutocompleteMultiselectPrompt extends o{constructor(e={}){e.overrideRender=true;super(e);this.inputValue="";this.clear=c("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>{if(this.inputValue){if(typeof e.title==="string"){if(e.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof e.value==="string"){if(e.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t;this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e;this.updateFilteredOptions()}_(e,t){if(e===" "){this.handleSpaceToggle()}else{this.handleInputChange(e)}}renderInstructions(){return`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(u.radioOn):u.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let e=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+e);this.clear=c(e)}}e.exports=AutocompleteMultiselectPrompt},5376:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4632);const i=r(669),o=i.style;const a=r(4577),c=a.erase,l=a.cursor;class ConfirmPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=e.initial;this.initialValue=!!e.initial;this.yesMsg=e.yes||"yes";this.yesOption=e.yesOption||"(Y/n)";this.noMsg=e.no||"no";this.noOption=e.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){if(e.toLowerCase()==="y"){this.value=true;return this.submit()}if(e.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();this.out.write(c.line+l.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}e.exports=ConfirmPrompt},1300:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(669),o=i.style,a=i.clear,c=i.figures,l=i.strip;const u=r(4577),h=u.erase,d=u.cursor;const p=r(1442),m=p.DatePart,y=p.Meridiem,g=p.Day,v=p.Hours,b=p.Milliseconds,w=p.Minutes,E=p.Month,S=p.Seconds,x=p.Year;const R=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const P={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new g(e),3:e=>new E(e),4:e=>new x(e),5:e=>new y(e),6:e=>new v(e),7:e=>new w(e),8:e=>new S(e),9:e=>new b(e)};const O={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.cursor=0;this.typed="";this.locales=Object.assign(O,e.locales);this._date=e.initial||new Date;this.errorMsg=e.error||"Please Enter A Valid Value";this.validator=e.validate||(()=>true);this.mask=e.mask||"YYYY-MM-DD HH:mm:ss";this.clear=a("");this.render()}get value(){return this.date}get date(){return this._date}set date(e){if(e)this._date.setTime(e.getTime())}set mask(e){let t;this.parts=[];while(t=R.exec(e)){let e=t.shift();let r=t.findIndex((e=>e!=null));this.parts.push(r in P?P[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>{if(typeof t==="string"&&typeof e[e.length-1]==="string")e[e.length-1]+=t;else e.push(t);return e}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(e){this.typed="";this.cursor=e;this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof m)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var e=this;return _asyncToGenerator((function*(){let t=yield e.validator(e.value);if(typeof t==="string"){e.errorMsg=t;t=false}e.error=!t}))()}submit(){var e=this;return _asyncToGenerator((function*(){yield e.validate();if(e.error){e.color="red";e.fire();e.render();return}e.done=true;e.aborted=false;e.fire();e.render();e.out.write("\n");e.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof m)));this.render()}_(e){if(/\d/.test(e)){this.typed+=e;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(h.lines(1));super.render();let e=h.line+(this.lines?h.down(this.lines):"")+d.to(0);this.lines=0;let t="";if(this.error){let e=this.errorMsg.split("\n");t=e.reduce(((e,t,r)=>e+`\n${r?` `:c.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.parts.reduce(((e,t,r)=>e.concat(r===this.cursor&&!this.done?s.cyan().underline(t.toString()):t)),[]).join("")].join(" ");let n="";if(this.lines){n+=d.up(this.lines);n+=d.left+d.to(l(r).length)}this.out.write(e+r+t+n)}}e.exports=DatePrompt},5960:(e,t,r)=>{"use strict";e.exports={TextPrompt:r(4665),SelectPrompt:r(8744),TogglePrompt:r(3666),DatePrompt:r(1300),NumberPrompt:r(6544),MultiselectPrompt:r(8056),AutocompletePrompt:r(3475),AutocompleteMultiselectPrompt:r(8819),ConfirmPrompt:r(5376)}},8056:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4577),i=n.cursor;const o=r(4632);const a=r(669),c=a.clear,l=a.figures,u=a.style;class MultiselectPrompt extends o{constructor(e={}){super(e);this.msg=e.message;this.cursor=e.cursor||0;this.scrollIndex=e.cursor||0;this.hint=e.hint||"";this.warn=e.warn||"- This option is disabled -";this.minSelected=e.min;this.showMinError=false;this.maxChoices=e.max;this.value=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.clear=c("");if(!e.overrideRender){this.render()}}reset(){this.value.map((e=>!e.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((e=>e.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const e=this.value.filter((e=>e.selected));if(this.minSelected&&e.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}_(e,t){if(e===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(l.radioOn):l.radioOff)+" "+n}paginateOptions(e){const t=this.cursor;let r=e.map(((e,r)=>this.renderOption(t,e,r)));const n=10;let i=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>n){let a=t-n/2;let c=t+n/2;if(a<0){a=0;c=n}else if(c>e.length){c=e.length;a=c-n}i=r.slice(a,c);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+i.join("\n")+"\n"+o}renderOptions(e){if(!this.done){return this.paginateOptions(e)}return""}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let e=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.value);this.out.write(this.clear+e);this.clear=c(e)}}e.exports=MultiselectPrompt},6544:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(4577),o=i.cursor,a=i.erase;const c=r(669),l=c.style,u=c.clear,h=c.figures,d=c.strip;const p=/[0-9]/;const isDef=e=>e!==undefined;const round=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};class NumberPrompt extends n{constructor(e={}){super(e);this.transform=l.render(e.style);this.msg=e.message;this.initial=isDef(e.initial)?e.initial:"";this.float=!!e.float;this.round=e.round||2;this.inc=e.increment||1;this.min=isDef(e.min)?e.min:-Infinity;this.max=isDef(e.max)?e.max:Infinity;this.errorMsg=e.error||`Please Enter A Valid Value`;this.validator=e.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(e){if(!e&&e!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(e,this.round)}`);this._value=round(e,this.round)}this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e===`-`||e===`.`&&this.float||p.test(e)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let e=this.value;this.value=e!==``?e:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var e=this;return _asyncToGenerator((function*(){let t=yield e.validator(e.value);if(typeof t===`string`){e.errorMsg=t;t=false}e.error=!t}))()}submit(){var e=this;return _asyncToGenerator((function*(){yield e.validate();if(e.error){e.color=`red`;e.fire();e.render();return}let t=e.value;e.value=t!==``?t:e.initial;e.done=true;e.aborted=false;e.error=false;e.fire();e.render();e.out.write(`\n`);e.close()}))()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=e;this.lastHit=r;this.color=`cyan`;if(e===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let e=a.line+(this.lines?a.down(this.lines):``)+o.to(0);this.lines=0;let t=``;if(this.error){let e=this.errorMsg.split(`\n`);t+=e.reduce(((e,t,r)=>e+`\n${r?` `:h.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=!this.done||!this.done&&!this.placeholder;let n=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let i=``;if(this.lines){i+=o.up(this.lines);i+=o.left+o.to(d(n).length)}this.out.write(e+n+t+i)}}e.exports=NumberPrompt},4632:(e,t,r)=>{"use strict";const s=r(4521);const n=r(669),i=n.action;const o=r(2361);const a=r(4577),c=a.beep,l=a.cursor;const u=r(7836);class Prompt extends o{constructor(e={}){super();this.firstRender=true;this.in=e.in||process.stdin;this.out=e.out||process.stdout;this.onRender=(e.onRender||(()=>void 0)).bind(this);const t=s.createInterface(this.in);s.emitKeypressEvents(this.in,t);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(e,t)=>{let r=i(t);if(r===false){this._&&this._(e,t)}else if(typeof this[r]==="function"){this[r](t)}else{this.bell()}};this.close=()=>{this.out.write(l.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);t.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(c)}render(){this.onRender(u);if(this.firstRender)this.firstRender=false}}e.exports=Prompt},8744:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4632);const i=r(669),o=i.style,a=i.clear,c=i.figures;const l=r(4577),u=l.erase,h=l.cursor;class SelectPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.hint=e.hint||"- Use arrow-keys. Return to submit.";this.warn=e.warn||"- This option is disabled";this.cursor=e.initial||0;this.choices=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=a("");this.render()}moveCursor(e){this.cursor=e;this.value=this.choices[e].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(u.lines(this.choices.length+1));super.render();this.out.write([o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((e,t)=>{let r,n;if(e.disabled){r=this.cursor===t?s.gray().underline(e.title):s.strikethrough().gray(e.title);n=this.cursor===t?s.bold().gray(c.pointer)+" ":" "}else{r=this.cursor===t?s.cyan().underline(e.title):e.title;n=this.cursor===t?s.cyan(c.pointer)+" ":" "}return`${n} ${r}`})).join("\n"))}}}e.exports=SelectPrompt},4665:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(4577),o=i.cursor;const a=r(669),c=a.style,l=a.clear,u=a.strip,h=a.figures;class TextPrompt extends n{constructor(e={}){super(e);this.transform=c.render(e.style);this.scale=this.transform.scale;this.msg=e.message;this.initial=e.initial||``;this.validator=e.validate||(()=>true);this.value=``;this.errorMsg=e.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=l(``);this.render()}set value(e){if(!e&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(e)}this._value=e;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var e=this;return _asyncToGenerator((function*(){let t=yield e.validator(e.value);if(typeof t===`string`){e.errorMsg=t;t=false}e.error=!t}))()}submit(){var e=this;return _asyncToGenerator((function*(){e.value=e.value||e.initial;yield e.validate();if(e.error){e.red=true;e.fire();e.render();return}e.done=true;e.aborted=false;e.fire();e.render();e.out.write("\n");e.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(e){if(this.placeholder)return;this.cursor=this.cursor+e}_(e,t){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.value.slice(0,this.cursor-1);let t=this.value.slice(this.cursor);this.value=`${e}${t}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor);let t=this.value.slice(this.cursor+1);this.value=`${e}${t}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let e=(this.lines?o.down(this.lines):``)+this.clear;this.lines=0;let t=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let e=this.errorMsg.split(`\n`);r+=e.reduce(((e,t,r)=>e+=`\n${r?" ":h.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let n=``;if(this.lines){n+=o.up(this.lines);n+=o.left+o.to(u(t).length)}n+=o.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(e+t+r+n);this.clear=l(t+r)}}e.exports=TextPrompt},3666:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4632);const i=r(669),o=i.style,a=i.clear;const c=r(4577),l=c.cursor,u=c.erase;class TogglePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=!!e.initial;this.active=e.active||"on";this.inactive=e.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(e,t){if(e===" "){this.value=!this.value}else if(e==="1"){this.value=true}else if(e==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();this.out.write(u.lines(this.first?1:this.msg.split(/\n/g).length)+l.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}e.exports=TogglePrompt},2102:(e,t,r)=>{"use strict";function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var s=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){s=s.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))}s.forEach((function(t){_defineProperty(e,t,r[t])}))}return e}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(8469);const n=["suggest","format","onState","validate","onRender"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(e=[],{onSubmit:t=noop,onCancel:r=noop}={}){const i={};const o=prompt._override||{};e=[].concat(e);let a,c,l,u,h;const d=function(){var e=_asyncToGenerator((function*(e,t,r=false){if(!r&&e.validate&&e.validate(t)!==true){return}return e.format?yield e.format(t,i):t}));return function getFormattedAnswer(t,r){return e.apply(this,arguments)}}();var p=true;var m=false;var y=undefined;try{for(var g=e[Symbol.iterator](),v;!(p=(v=g.next()).done);p=true){c=v.value;var b=c;u=b.name;h=b.type;for(let e in c){if(n.includes(e))continue;let t=c[e];c[e]=typeof t==="function"?yield t(a,_objectSpread({},i),c):t}if(typeof c.message!=="string"){throw new Error("prompt message is required")}var w=c;u=w.name;h=w.type;if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[c.name]!==undefined){a=yield d(c,o[c.name]);if(a!==undefined){i[u]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):yield s[h](c);i[u]=a=yield d(c,a,true);l=yield t(c,a,i)}catch(e){l=!(yield r(c,i))}if(l)return i}}catch(e){m=true;y=e}finally{try{if(!p&&g.return!=null){g.return()}}finally{if(m){throw y}}}return i}));return _prompt.apply(this,arguments)}function getInjectedAnswer(e){const t=e.shift();if(t instanceof Error){throw t}return t}function inject(e){prompt._injected=(prompt._injected||[]).concat(e)}function override(e){prompt._override=Object.assign({},e)}e.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},8469:(e,t,r)=>{"use strict";const s=t;const n=r(5960);const noop=e=>e;function toPrompt(e,t,r={}){return new Promise(((s,i)=>{const o=new n[e](t);const a=r.onAbort||noop;const c=r.onSubmit||noop;o.on("state",t.onState||noop);o.on("submit",(e=>s(c(e))));o.on("abort",(e=>i(a(e))))}))}s.text=e=>toPrompt("TextPrompt",e);s.password=e=>{e.style="password";return s.text(e)};s.invisible=e=>{e.style="invisible";return s.text(e)};s.number=e=>toPrompt("NumberPrompt",e);s.date=e=>toPrompt("DatePrompt",e);s.confirm=e=>toPrompt("ConfirmPrompt",e);s.list=e=>{const t=e.separator||",";return toPrompt("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})};s.toggle=e=>toPrompt("TogglePrompt",e);s.select=e=>toPrompt("SelectPrompt",e);s.multiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("MultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("AutocompleteMultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));s.autocomplete=e=>{e.suggest=e.suggest||byTitle;e.choices=[].concat(e.choices||[]);return toPrompt("AutocompletePrompt",e)}},5829:e=>{"use strict";e.exports=e=>{if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c")return"abort";if(e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(e.name==="return")return"submit";if(e.name==="enter")return"submit";if(e.name==="backspace")return"delete";if(e.name==="delete")return"deleteForward";if(e.name==="abort")return"abort";if(e.name==="escape")return"abort";if(e.name==="tab")return"next";if(e.name==="pagedown")return"nextPage";if(e.name==="pageup")return"prevPage";if(e.name==="up")return"up";if(e.name==="down")return"down";if(e.name==="right")return"right";if(e.name==="left")return"left";return false}},1155:(e,t,r)=>{"use strict";const s=r(1144);const n=r(4577),i=n.erase,o=n.cursor;const width=e=>[...s(e)].length;e.exports=function(e,t=process.stdout.columns){if(!t)return i.line+o.to(0);let r=0;const s=e.split(/\r?\n/);var n=true;var a=false;var c=undefined;try{for(var l=s[Symbol.iterator](),u;!(n=(u=l.next()).done);n=true){let e=u.value;r+=1+Math.floor(Math.max(width(e)-1,0)/t)}}catch(e){a=true;c=e}finally{try{if(!n&&l.return!=null){l.return()}}finally{if(a){throw c}}}return(i.line+o.prevLine()).repeat(r-1)+i.line+o.to(0)}},1920:e=>{"use strict";const t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:t;e.exports=s},669:(e,t,r)=>{"use strict";e.exports={action:r(5829),clear:r(1155),style:r(2057),strip:r(1144),figures:r(1920)}},1144:e=>{"use strict";e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(t,"g");return typeof e==="string"?e.replace(r,""):e}},2057:(e,t,r)=>{"use strict";const s=r(7836);const n=r(1920);const i=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}});const render=e=>i[e]||i.default;const o=Object.freeze({aborted:s.red(n.cross),done:s.green(n.tick),default:s.cyan("?")});const symbol=(e,t)=>t?o.aborted:e?o.done:o.default;const delimiter=e=>s.gray(e?n.ellipsis:n.pointerSmall);const item=(e,t)=>s.gray(e?t?n.pointerSmall:"+":n.line);e.exports={styles:i,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},9966:(e,t,r)=>{function isNodeLT(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,r=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(r[t]>e[t])return false;if(e[t]>r[t])return true}return false}e.exports=isNodeLT("8.6.0")?r(2102):r(6515)},8089:e=>{"use strict";class DatePart{constructor({token:e,date:t,parts:r,locales:s}){this.token=e;this.date=t||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((t,r)=>r>e&&t instanceof DatePart))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const t=e.indexOf(this);return e.find(((e,r)=>r>t&&e instanceof DatePart))}toString(){return String(this.date)}}e.exports=DatePart},7164:(e,t,r)=>{"use strict";const s=r(8089);const pos=e=>{e=e%10;return e===1?"st":e===2?"nd":e===3?"rd":"th"};class Day extends s{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate();let t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+pos(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}}e.exports=Day},1825:(e,t,r)=>{"use strict";const s=r(8089);class Hours extends s{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();if(/h/.test(this.token))e=e%12||12;return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Hours},902:(e,t,r)=>{"use strict";e.exports={DatePart:r(8089),Meridiem:r(9857),Day:r(7164),Hours:r(1825),Milliseconds:r(8569),Minutes:r(3409),Month:r(4082),Seconds:r(9521),Year:r(128)}},9857:(e,t,r)=>{"use strict";const s=r(8089);class Meridiem extends s{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}e.exports=Meridiem},8569:(e,t,r)=>{"use strict";const s=r(8089);class Milliseconds extends s{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}e.exports=Milliseconds},3409:(e,t,r)=>{"use strict";const s=r(8089);class Minutes extends s{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Minutes},4082:(e,t,r)=>{"use strict";const s=r(8089);class Month extends s{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1;this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth();let t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}}e.exports=Month},9521:(e,t,r)=>{"use strict";const s=r(8089);class Seconds extends s{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Seconds},128:(e,t,r)=>{"use strict";const s=r(8089);class Year extends s{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}}e.exports=Year},3226:(e,t,r)=>{"use strict";const s=r(7836);const n=r(7982);const{cursor:i}=r(4577);const{style:o,clear:a,figures:c,strip:l}=r(7588);const getVal=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]);const getTitle=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);const getIndex=(e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:undefined};class AutocompletePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.suggest=e.suggest;this.choices=e.choices;this.initial=typeof e.initial==="number"?e.initial:getIndex(e.choices,e.initial);this.select=this.initial||e.cursor||0;this.fallback=e.fallback||(e.initial!==undefined?`${c.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${c.pointerSmall} ${e.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=e.limit||10;this.cursor=0;this.transform=o.render(e.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=a("");this.complete(this.render);this.render()}moveSelect(e){this.select=e;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],e)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}async complete(e){const t=this.completing=this.suggest(this.input,this.choices);const r=await t;if(this.completing!==t)return;this.suggestions=r.map(((e,t,r)=>({title:getTitle(r,t),value:getVal(r,t)}))).reduce(((e,t)=>{if(e[e.length-1].length<this.limit)e[e.length-1].push(t);else e.push([t]);return e}),[[]]);this.isFallback=false;this.completing=false;if(!this.suggestions[this.page])this.page=0;if(!this.suggestions.length&&this.fallback){const e=getIndex(this.choices,this.fallback);this.suggestions=[[]];if(e!==undefined)this.suggestions[0].push({title:getTitle(this.choices,e),value:getVal(this.choices,e)});this.isFallback=true}const s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select));e&&e()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1);let t=this.input.slice(this.cursor);this.input=`${e}${t}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor);let t=this.input.slice(this.cursor+1);this.input=`${e}${t}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(i.down(this.lineCount));let e=s.bold(`${o.symbol(this.done,this.aborted)} ${this.msg} `)+`${o.delimiter(this.completing)} `;let t=l(e).length;if(this.done&&this.suggestions[this.page][this.select]){e+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;t+=this.rendered.length;e+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let t=this.suggestions[this.page].reduce(((e,t,r)=>e+`\n${r===this.select?s.cyan(t.title):t.title}`),"");if(t&&!this.isFallback){e+=t;if(this.suggestions.length>1){this.lineCount++;e+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const t=getIndex(this.choices,this.fallback);const r=t!==undefined?getTitle(this.choices,t):this.fallback;e+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+e);this.clear=a(e);if(this.lineCount&&!this.done){let e=i.up(this.lineCount);e+=i.left+i.to(t);e+=i.move(-this.rendered.length+this.cursor*this.scale);this.out.write(e)}}}e.exports=AutocompletePrompt},9677:(e,t,r)=>{"use strict";const s=r(7836);const{cursor:n}=r(4577);const i=r(7954);const{clear:o,style:a,figures:c}=r(7588);class AutocompleteMultiselectPrompt extends i{constructor(e={}){e.overrideRender=true;super(e);this.inputValue="";this.clear=o("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>{if(this.inputValue){if(typeof e.title==="string"){if(e.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof e.value==="string"){if(e.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t;this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e;this.updateFilteredOptions()}_(e,t){if(e===" "){this.handleSpaceToggle()}else{this.handleInputChange(e)}}renderInstructions(){return`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(c.radioOn):c.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let e=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+e);this.clear=o(e)}}e.exports=AutocompleteMultiselectPrompt},5729:(e,t,r)=>{const s=r(7836);const n=r(7982);const{style:i}=r(7588);const{erase:o,cursor:a}=r(4577);class ConfirmPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=e.initial;this.initialValue=!!e.initial;this.yesMsg=e.yes||"yes";this.yesOption=e.yesOption||"(Y/n)";this.noMsg=e.no||"no";this.noOption=e.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){if(e.toLowerCase()==="y"){this.value=true;return this.submit()}if(e.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(o.line+a.to(0)+[i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}e.exports=ConfirmPrompt},5969:(e,t,r)=>{"use strict";const s=r(7836);const n=r(7982);const{style:i,clear:o,figures:a,strip:c}=r(7588);const{erase:l,cursor:u}=r(4577);const{DatePart:h,Meridiem:d,Day:p,Hours:m,Milliseconds:y,Minutes:g,Month:v,Seconds:b,Year:w}=r(902);const E=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const S={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new p(e),3:e=>new v(e),4:e=>new w(e),5:e=>new d(e),6:e=>new m(e),7:e=>new g(e),8:e=>new b(e),9:e=>new y(e)};const x={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.cursor=0;this.typed="";this.locales=Object.assign(x,e.locales);this._date=e.initial||new Date;this.errorMsg=e.error||"Please Enter A Valid Value";this.validator=e.validate||(()=>true);this.mask=e.mask||"YYYY-MM-DD HH:mm:ss";this.clear=o("");this.render()}get value(){return this.date}get date(){return this._date}set date(e){if(e)this._date.setTime(e.getTime())}set mask(e){let t;this.parts=[];while(t=E.exec(e)){let e=t.shift();let r=t.findIndex((e=>e!=null));this.parts.push(r in S?S[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>{if(typeof t==="string"&&typeof e[e.length-1]==="string")e[e.length-1]+=t;else e.push(t);return e}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(e){this.typed="";this.cursor=e;this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof h)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let e=await this.validator(this.value);if(typeof e==="string"){this.errorMsg=e;e=false}this.error=!e}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof h)));this.render()}_(e){if(/\d/.test(e)){this.typed+=e;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l.lines(1));super.render();let e=l.line+(this.lines?l.down(this.lines):"")+u.to(0);this.lines=0;let t="";if(this.error){let e=this.errorMsg.split("\n");t=e.reduce(((e,t,r)=>e+`\n${r?` `:a.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=[i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(false),this.parts.reduce(((e,t,r)=>e.concat(r===this.cursor&&!this.done?s.cyan().underline(t.toString()):t)),[]).join("")].join(" ");let n="";if(this.lines){n+=u.up(this.lines);n+=u.left+u.to(c(r).length)}this.out.write(e+r+t+n)}}e.exports=DatePrompt},2392:(e,t,r)=>{"use strict";e.exports={TextPrompt:r(3195),SelectPrompt:r(539),TogglePrompt:r(2401),DatePrompt:r(5969),NumberPrompt:r(429),MultiselectPrompt:r(7954),AutocompletePrompt:r(3226),AutocompleteMultiselectPrompt:r(9677),ConfirmPrompt:r(5729)}},7954:(e,t,r)=>{"use strict";const s=r(7836);const{cursor:n}=r(4577);const i=r(7982);const{clear:o,figures:a,style:c}=r(7588);class MultiselectPrompt extends i{constructor(e={}){super(e);this.msg=e.message;this.cursor=e.cursor||0;this.scrollIndex=e.cursor||0;this.hint=e.hint||"";this.warn=e.warn||"- This option is disabled -";this.minSelected=e.min;this.showMinError=false;this.maxChoices=e.max;this.value=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.clear=o("");if(!e.overrideRender){this.render()}}reset(){this.value.map((e=>!e.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((e=>e.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const e=this.value.filter((e=>e.selected));if(this.minSelected&&e.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}_(e,t){if(e===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(a.radioOn):a.radioOff)+" "+n}paginateOptions(e){const t=this.cursor;let r=e.map(((e,r)=>this.renderOption(t,e,r)));const n=10;let i=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>n){let a=t-n/2;let c=t+n/2;if(a<0){a=0;c=n}else if(c>e.length){c=e.length;a=c-n}i=r.slice(a,c);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+i.join("\n")+"\n"+o}renderOptions(e){if(!this.done){return this.paginateOptions(e)}return""}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let e=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.value);this.out.write(this.clear+e);this.clear=o(e)}}e.exports=MultiselectPrompt},429:(e,t,r)=>{const s=r(7836);const n=r(7982);const{cursor:i,erase:o}=r(4577);const{style:a,clear:c,figures:l,strip:u}=r(7588);const h=/[0-9]/;const isDef=e=>e!==undefined;const round=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};class NumberPrompt extends n{constructor(e={}){super(e);this.transform=a.render(e.style);this.msg=e.message;this.initial=isDef(e.initial)?e.initial:"";this.float=!!e.float;this.round=e.round||2;this.inc=e.increment||1;this.min=isDef(e.min)?e.min:-Infinity;this.max=isDef(e.max)?e.max:Infinity;this.errorMsg=e.error||`Please Enter A Valid Value`;this.validator=e.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(e){if(!e&&e!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(e,this.round)}`);this._value=round(e,this.round)}this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e===`-`||e===`.`&&this.float||h.test(e)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let e=this.value;this.value=e!==``?e:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let e=await this.validator(this.value);if(typeof e===`string`){this.errorMsg=e;e=false}this.error=!e}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let e=this.value;this.value=e!==``?e:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=e;this.lastHit=r;this.color=`cyan`;if(e===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let e=o.line+(this.lines?o.down(this.lines):``)+i.to(0);this.lines=0;let t=``;if(this.error){let e=this.errorMsg.split(`\n`);t+=e.reduce(((e,t,r)=>e+`\n${r?` `:l.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=!this.done||!this.done&&!this.placeholder;let n=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let c=``;if(this.lines){c+=i.up(this.lines);c+=i.left+i.to(u(n).length)}this.out.write(e+n+t+c)}}e.exports=NumberPrompt},7982:(e,t,r)=>{"use strict";const s=r(4521);const{action:n}=r(7588);const i=r(2361);const{beep:o,cursor:a}=r(4577);const c=r(7836);class Prompt extends i{constructor(e={}){super();this.firstRender=true;this.in=e.in||process.stdin;this.out=e.out||process.stdout;this.onRender=(e.onRender||(()=>void 0)).bind(this);const t=s.createInterface(this.in);s.emitKeypressEvents(this.in,t);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(e,t)=>{let r=n(t);if(r===false){this._&&this._(e,t)}else if(typeof this[r]==="function"){this[r](t)}else{this.bell()}};this.close=()=>{this.out.write(a.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);t.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(o)}render(){this.onRender(c);if(this.firstRender)this.firstRender=false}}e.exports=Prompt},539:(e,t,r)=>{"use strict";const s=r(7836);const n=r(7982);const{style:i,clear:o,figures:a}=r(7588);const{erase:c,cursor:l}=r(4577);class SelectPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.hint=e.hint||"- Use arrow-keys. Return to submit.";this.warn=e.warn||"- This option is disabled";this.cursor=e.initial||0;this.choices=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=o("");this.render()}moveCursor(e){this.cursor=e;this.value=this.choices[e].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);else this.out.write(c.lines(this.choices.length+1));super.render();this.out.write([i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((e,t)=>{let r,n;if(e.disabled){r=this.cursor===t?s.gray().underline(e.title):s.strikethrough().gray(e.title);n=this.cursor===t?s.bold().gray(a.pointer)+" ":" "}else{r=this.cursor===t?s.cyan().underline(e.title):e.title;n=this.cursor===t?s.cyan(a.pointer)+" ":" "}return`${n} ${r}`})).join("\n"))}}}e.exports=SelectPrompt},3195:(e,t,r)=>{const s=r(7836);const n=r(7982);const{cursor:i}=r(4577);const{style:o,clear:a,strip:c,figures:l}=r(7588);class TextPrompt extends n{constructor(e={}){super(e);this.transform=o.render(e.style);this.scale=this.transform.scale;this.msg=e.message;this.initial=e.initial||``;this.validator=e.validate||(()=>true);this.value=``;this.errorMsg=e.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=a(``);this.render()}set value(e){if(!e&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(e)}this._value=e;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let e=await this.validator(this.value);if(typeof e===`string`){this.errorMsg=e;e=false}this.error=!e}async submit(){this.value=this.value||this.initial;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(e){if(this.placeholder)return;this.cursor=this.cursor+e}_(e,t){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.value.slice(0,this.cursor-1);let t=this.value.slice(this.cursor);this.value=`${e}${t}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor);let t=this.value.slice(this.cursor+1);this.value=`${e}${t}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let e=(this.lines?i.down(this.lines):``)+this.clear;this.lines=0;let t=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let e=this.errorMsg.split(`\n`);r+=e.reduce(((e,t,r)=>e+=`\n${r?" ":l.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let n=``;if(this.lines){n+=i.up(this.lines);n+=i.left+i.to(c(t).length)}n+=i.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(e+t+r+n);this.clear=a(t+r)}}e.exports=TextPrompt},2401:(e,t,r)=>{const s=r(7836);const n=r(7982);const{style:i,clear:o}=r(7588);const{cursor:a,erase:c}=r(4577);class TogglePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=!!e.initial;this.active=e.active||"on";this.inactive=e.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(e,t){if(e===" "){this.value=!this.value}else if(e==="1"){this.value=true}else if(e==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(c.lines(this.first?1:this.msg.split(/\n/g).length)+a.to(0)+[i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}e.exports=TogglePrompt},6515:(e,t,r)=>{"use strict";const s=r(2526);const n=["suggest","format","onState","validate","onRender"];const noop=()=>{};async function prompt(e=[],{onSubmit:t=noop,onCancel:r=noop}={}){const i={};const o=prompt._override||{};e=[].concat(e);let a,c,l,u,h;const getFormattedAnswer=async(e,t,r=false)=>{if(!r&&e.validate&&e.validate(t)!==true){return}return e.format?await e.format(t,i):t};for(c of e){({name:u,type:h}=c);for(let e in c){if(n.includes(e))continue;let t=c[e];c[e]=typeof t==="function"?await t(a,{...i},c):t}if(typeof c.message!=="string"){throw new Error("prompt message is required")}({name:u,type:h}=c);if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[c.name]!==undefined){a=await getFormattedAnswer(c,o[c.name]);if(a!==undefined){i[u]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):await s[h](c);i[u]=a=await getFormattedAnswer(c,a,true);l=await t(c,a,i)}catch(e){l=!await r(c,i)}if(l)return i}return i}function getInjectedAnswer(e){const t=e.shift();if(t instanceof Error){throw t}return t}function inject(e){prompt._injected=(prompt._injected||[]).concat(e)}function override(e){prompt._override=Object.assign({},e)}e.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},2526:(e,t,r)=>{"use strict";const s=t;const n=r(2392);const noop=e=>e;function toPrompt(e,t,r={}){return new Promise(((s,i)=>{const o=new n[e](t);const a=r.onAbort||noop;const c=r.onSubmit||noop;o.on("state",t.onState||noop);o.on("submit",(e=>s(c(e))));o.on("abort",(e=>i(a(e))))}))}s.text=e=>toPrompt("TextPrompt",e);s.password=e=>{e.style="password";return s.text(e)};s.invisible=e=>{e.style="invisible";return s.text(e)};s.number=e=>toPrompt("NumberPrompt",e);s.date=e=>toPrompt("DatePrompt",e);s.confirm=e=>toPrompt("ConfirmPrompt",e);s.list=e=>{const t=e.separator||",";return toPrompt("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})};s.toggle=e=>toPrompt("TogglePrompt",e);s.select=e=>toPrompt("SelectPrompt",e);s.multiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("MultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("AutocompleteMultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));s.autocomplete=e=>{e.suggest=e.suggest||byTitle;e.choices=[].concat(e.choices||[]);return toPrompt("AutocompletePrompt",e)}},1608:e=>{"use strict";e.exports=e=>{if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c")return"abort";if(e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(e.name==="return")return"submit";if(e.name==="enter")return"submit";if(e.name==="backspace")return"delete";if(e.name==="delete")return"deleteForward";if(e.name==="abort")return"abort";if(e.name==="escape")return"abort";if(e.name==="tab")return"next";if(e.name==="pagedown")return"nextPage";if(e.name==="pageup")return"prevPage";if(e.name==="up")return"up";if(e.name==="down")return"down";if(e.name==="right")return"right";if(e.name==="left")return"left";return false}},1129:(e,t,r)=>{"use strict";const s=r(7398);const{erase:n,cursor:i}=r(4577);const width=e=>[...s(e)].length;e.exports=function(e,t=process.stdout.columns){if(!t)return n.line+i.to(0);let r=0;const s=e.split(/\r?\n/);for(let e of s){r+=1+Math.floor(Math.max(width(e)-1,0)/t)}return(n.line+i.prevLine()).repeat(r-1)+n.line+i.to(0)}},2536:e=>{"use strict";const t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:t;e.exports=s},7588:(e,t,r)=>{"use strict";e.exports={action:r(1608),clear:r(1129),style:r(33),strip:r(7398),figures:r(2536)}},7398:e=>{"use strict";e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(t,"g");return typeof e==="string"?e.replace(r,""):e}},33:(e,t,r)=>{"use strict";const s=r(7836);const n=r(2536);const i=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}});const render=e=>i[e]||i.default;const o=Object.freeze({aborted:s.red(n.cross),done:s.green(n.tick),default:s.cyan("?")});const symbol=(e,t)=>t?o.aborted:e?o.done:o.default;const delimiter=e=>s.gray(e?n.ellipsis:n.pointerSmall);const item=(e,t)=>s.gray(e?t?n.pointerSmall:"+":n.line);e.exports={styles:i,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},1619:(e,t,r)=>{var s=r(9852);var n=r(1014);var i=r(7147);var noop=function(){};var o=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!o)return false;if(!i)return false;return(e instanceof(i.ReadStream||noop)||e instanceof(i.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,r,i){i=s(i);var o=false;e.on("close",(function(){o=true}));n(e,{readable:t,writable:r},(function(e){if(e)return i(e);o=true;i()}));var a=false;return function(t){if(o)return;if(a)return;a=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();i(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var s=e.map((function(n,i){var o=i<e.length-1;var a=i>0;return destroyer(n,o,a,(function(e){if(!r)r=e;if(e)s.forEach(call);if(o)return;s.forEach(call);t(r)}))}));return e.reduce(pipe)};e.exports=pump},592:e=>{
|
|
60
|
+
*/t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},8683:t=>{"use strict";t.exports=t=>{const r=typeof t;return t!==null&&(r==="object"||r==="function")}},7745:(t,r,i)=>{var o=i(7147);var a;if(process.platform==="win32"||global.TESTING_WINDOWS){a=i(4438)}else{a=i(7138)}t.exports=isexe;isexe.sync=sync;function isexe(t,r,i){if(typeof r==="function"){i=r;r={}}if(!i){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(i,o){isexe(t,r||{},(function(t,r){if(t){o(t)}else{i(r)}}))}))}a(t,r||{},(function(t,o){if(t){if(t.code==="EACCES"||r&&r.ignoreErrors){t=null;o=false}}i(t,o)}))}function sync(t,r){try{return a.sync(t,r||{})}catch(t){if(r&&r.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},7138:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7147);function isexe(t,r,i){o.stat(t,(function(t,o){i(t,t?false:checkStat(o,r))}))}function sync(t,r){return checkStat(o.statSync(t),r)}function checkStat(t,r){return t.isFile()&&checkMode(t,r)}function checkMode(t,r){var i=t.mode;var o=t.uid;var a=t.gid;var c=r.uid!==undefined?r.uid:process.getuid&&process.getuid();var l=r.gid!==undefined?r.gid:process.getgid&&process.getgid();var u=parseInt("100",8);var h=parseInt("010",8);var d=parseInt("001",8);var p=u|h;var m=i&d||i&h&&a===l||i&u&&o===c||i&p&&c===0;return m}},4438:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7147);function checkPathExt(t,r){var i=r.pathExt!==undefined?r.pathExt:process.env.PATHEXT;if(!i){return true}i=i.split(";");if(i.indexOf("")!==-1){return true}for(var o=0;o<i.length;o++){var a=i[o].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a){return true}}return false}function checkStat(t,r,i){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(r,i)}function isexe(t,r,i){o.stat(t,(function(o,a){i(o,o?false:checkStat(a,t,r))}))}function sync(t,r){return checkStat(o.statSync(t),t,r)}},9122:t=>{"use strict";var r=t.exports=function(t,r,i){if(typeof r=="function"){i=r;r={}}i=r.cb||i;var o=typeof i=="function"?i:i.pre||function(){};var a=i.post||function(){};_traverse(r,o,a,t,"",t)};r.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};r.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};r.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};r.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(t,i,o,a,c,l,u,h,d,p){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,c,l,u,h,d,p);for(var m in a){var y=a[m];if(Array.isArray(y)){if(m in r.arrayKeywords){for(var g=0;g<y.length;g++)_traverse(t,i,o,y[g],c+"/"+m+"/"+g,l,c,m,a,g)}}else if(m in r.propsKeywords){if(y&&typeof y=="object"){for(var v in y)_traverse(t,i,o,y[v],c+"/"+m+"/"+escapeJsonPtr(v),l,c,m,a,v)}}else if(m in r.keywords||t.allKeys&&!(m in r.skipKeywords)){_traverse(t,i,o,y,c+"/"+m,l,c,m,a)}}o(a,c,l,u,h,d,p)}}function escapeJsonPtr(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}},7836:t=>{"use strict";const{FORCE_COLOR:r,NODE_DISABLE_COLORS:i,TERM:o}=process.env;const a={enabled:!i&&o!=="dumb"&&r!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,r){let i=0,o,a="",c="";for(;i<t.length;i++){o=t[i];a+=o.open;c+=o.close;if(r.includes(o.close)){r=r.replace(o.rgx,o.close+o.open)}}return a+r+c}function chain(t,r){let i={has:t,keys:r};i.reset=a.reset.bind(i);i.bold=a.bold.bind(i);i.dim=a.dim.bind(i);i.italic=a.italic.bind(i);i.underline=a.underline.bind(i);i.inverse=a.inverse.bind(i);i.hidden=a.hidden.bind(i);i.strikethrough=a.strikethrough.bind(i);i.black=a.black.bind(i);i.red=a.red.bind(i);i.green=a.green.bind(i);i.yellow=a.yellow.bind(i);i.blue=a.blue.bind(i);i.magenta=a.magenta.bind(i);i.cyan=a.cyan.bind(i);i.white=a.white.bind(i);i.gray=a.gray.bind(i);i.grey=a.grey.bind(i);i.bgBlack=a.bgBlack.bind(i);i.bgRed=a.bgRed.bind(i);i.bgGreen=a.bgGreen.bind(i);i.bgYellow=a.bgYellow.bind(i);i.bgBlue=a.bgBlue.bind(i);i.bgMagenta=a.bgMagenta.bind(i);i.bgCyan=a.bgCyan.bind(i);i.bgWhite=a.bgWhite.bind(i);return i}function init(t,r){let i={open:`[${t}m`,close:`[${r}m`,rgx:new RegExp(`\\x1b\\[${r}m`,"g")};return function(r){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(i));return r===void 0?this:a.enabled?run(this.keys,r+""):r+""}return r===void 0?chain([t],[i]):a.enabled?run([i],r+""):r+""}}t.exports=a},3722:(t,r,i)=>{"use strict";const o=i(1017);const a=i(3883);const c=i(4604);t.exports=(t,r)=>{r=Object.assign({cwd:process.cwd()},r);return c(t,(t=>a(o.resolve(r.cwd,t))),r)};t.exports.sync=(t,r)=>{r=Object.assign({cwd:process.cwd()},r);for(const i of t){if(a.sync(o.resolve(r.cwd,i))){return i}}}},8443:(t,r,i)=>{"use strict";const o=i(3401);const a=Symbol("max");const c=Symbol("length");const l=Symbol("lengthCalculator");const u=Symbol("allowStale");const h=Symbol("maxAge");const d=Symbol("dispose");const p=Symbol("noDisposeOnSet");const m=Symbol("lruList");const y=Symbol("cache");const g=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const r=this[a]=t.max||Infinity;const i=t.length||naiveLength;this[l]=typeof i!=="function"?naiveLength:i;this[u]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[h]=t.maxAge||0;this[d]=t.dispose;this[p]=t.noDisposeOnSet||false;this[g]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[a]=t||Infinity;trim(this)}get max(){return this[a]}set allowStale(t){this[u]=!!t}get allowStale(){return this[u]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[h]=t;trim(this)}get maxAge(){return this[h]}set lengthCalculator(t){if(typeof t!=="function")t=naiveLength;if(t!==this[l]){this[l]=t;this[c]=0;this[m].forEach((t=>{t.length=this[l](t.value,t.key);this[c]+=t.length}))}trim(this)}get lengthCalculator(){return this[l]}get length(){return this[c]}get itemCount(){return this[m].length}rforEach(t,r){r=r||this;for(let i=this[m].tail;i!==null;){const o=i.prev;forEachStep(this,t,i,r);i=o}}forEach(t,r){r=r||this;for(let i=this[m].head;i!==null;){const o=i.next;forEachStep(this,t,i,r);i=o}}keys(){return this[m].toArray().map((t=>t.key))}values(){return this[m].toArray().map((t=>t.value))}reset(){if(this[d]&&this[m]&&this[m].length){this[m].forEach((t=>this[d](t.key,t.value)))}this[y]=new Map;this[m]=new o;this[c]=0}dump(){return this[m].map((t=>isStale(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[m]}set(t,r,i){i=i||this[h];if(i&&typeof i!=="number")throw new TypeError("maxAge must be a number");const o=i?Date.now():0;const u=this[l](r,t);if(this[y].has(t)){if(u>this[a]){del(this,this[y].get(t));return false}const l=this[y].get(t);const h=l.value;if(this[d]){if(!this[p])this[d](t,h.value)}h.now=o;h.maxAge=i;h.value=r;this[c]+=u-h.length;h.length=u;this.get(t);trim(this);return true}const g=new Entry(t,r,u,o,i);if(g.length>this[a]){if(this[d])this[d](t,r);return false}this[c]+=g.length;this[m].unshift(g);this[y].set(t,this[m].head);trim(this);return true}has(t){if(!this[y].has(t))return false;const r=this[y].get(t).value;return!isStale(this,r)}get(t){return get(this,t,true)}peek(t){return get(this,t,false)}pop(){const t=this[m].tail;if(!t)return null;del(this,t);return t.value}del(t){del(this,this[y].get(t))}load(t){this.reset();const r=Date.now();for(let i=t.length-1;i>=0;i--){const o=t[i];const a=o.e||0;if(a===0)this.set(o.k,o.v);else{const t=a-r;if(t>0){this.set(o.k,o.v,t)}}}}prune(){this[y].forEach(((t,r)=>get(this,r,false)))}}const get=(t,r,i)=>{const o=t[y].get(r);if(o){const r=o.value;if(isStale(t,r)){del(t,o);if(!t[u])return undefined}else{if(i){if(t[g])o.value.now=Date.now();t[m].unshiftNode(o)}}return r.value}};const isStale=(t,r)=>{if(!r||!r.maxAge&&!t[h])return false;const i=Date.now()-r.now;return r.maxAge?i>r.maxAge:t[h]&&i>t[h]};const trim=t=>{if(t[c]>t[a]){for(let r=t[m].tail;t[c]>t[a]&&r!==null;){const i=r.prev;del(t,r);r=i}}};const del=(t,r)=>{if(r){const i=r.value;if(t[d])t[d](i.key,i.value);t[c]-=i.length;t[y].delete(i.key);t[m].removeNode(r)}};class Entry{constructor(t,r,i,o,a){this.key=t;this.value=r;this.length=i;this.now=o;this.maxAge=a||0}}const forEachStep=(t,r,i,o)=>{let a=i.value;if(isStale(t,a)){del(t,i);if(!t[u])a=undefined}if(a)r.call(o,a.value,a.key,t)};t.exports=LRUCache},9117:(t,r,i)=>{"use strict";const o=i(2781);const a=o.PassThrough;const c=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const r=c.call(arguments);let i=false;let o=r[r.length-1];if(o&&!Array.isArray(o)&&o.pipe==null){r.pop()}else{o={}}const l=o.end!==false;const u=o.pipeError===true;if(o.objectMode==null){o.objectMode=true}if(o.highWaterMark==null){o.highWaterMark=64*1024}const h=a(o);function addStream(){for(let r=0,i=arguments.length;r<i;r++){t.push(pauseStreams(arguments[r],o))}mergeStream();return this}function mergeStream(){if(i){return}i=true;let r=t.shift();if(!r){process.nextTick(endStream);return}if(!Array.isArray(r)){r=[r]}let o=r.length+1;function next(){if(--o>0){return}i=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(u){t.removeListener("error",onerror)}next()}function onerror(t){h.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(u){t.on("error",onerror)}t.pipe(h,{end:false});t.resume()}for(let t=0;t<r.length;t++){pipe(r[t])}next()}function endStream(){i=false;h.emit("queueDrain");if(l){h.end()}}h.setMaxListeners(0);h.add=addStream;h.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(r.length){addStream.apply(null,r)}return h}function pauseStreams(t,r){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(a(r))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let i=0,o=t.length;i<o;i++){t[i]=pauseStreams(t[i],r)}}return t}},1065:(t,r,i)=>{"use strict";const o=i(3837);const a=i(8333);const c=i(3846);const l=i(5502);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,r,i)=>{r=[].concat(r);t=[].concat(t);let o=new Set;let a=new Set;let l=new Set;let u=0;let onResult=t=>{l.add(t.output);if(i&&i.onResult){i.onResult(t)}};for(let l=0;l<r.length;l++){let h=c(String(r[l]),{...i,onResult:onResult},true);let d=h.state.negated||h.state.negatedExtglob;if(d)u++;for(let r of t){let t=h(r,true);let i=d?!t.isMatch:t.isMatch;if(!i)continue;if(d){o.add(t.output)}else{o.delete(t.output);a.add(t.output)}}}let h=u===r.length?[...l]:[...a];let d=h.filter((t=>!o.has(t)));if(i&&d.length===0){if(i.failglob===true){throw new Error(`No matches found for "${r.join(", ")}"`)}if(i.nonull===true||i.nullglob===true){return i.unescape?r.map((t=>t.replace(/\\/g,""))):r}}return d};micromatch.match=micromatch;micromatch.matcher=(t,r)=>c(t,r);micromatch.isMatch=(t,r,i)=>c(r,i)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,r,i={})=>{r=[].concat(r).map(String);let o=new Set;let a=[];let onResult=t=>{if(i.onResult)i.onResult(t);a.push(t.output)};let c=new Set(micromatch(t,r,{...i,onResult:onResult}));for(let t of a){if(!c.has(t)){o.add(t)}}return[...o]};micromatch.contains=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}if(Array.isArray(r)){return r.some((r=>micromatch.contains(t,r,i)))}if(typeof r==="string"){if(isEmptyString(t)||isEmptyString(r)){return false}if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r)){return true}}return micromatch.isMatch(t,r,{...i,contains:true})};micromatch.matchKeys=(t,r,i)=>{if(!l.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let o=micromatch(Object.keys(t),r,i);let a={};for(let r of o)a[r]=t[r];return a};micromatch.some=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=c(String(t),i);if(o.some((t=>r(t)))){return true}}return false};micromatch.every=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=c(String(t),i);if(!o.every((t=>r(t)))){return false}}return true};micromatch.all=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}return[].concat(r).every((r=>c(r,i)(t)))};micromatch.capture=(t,r,i)=>{let o=l.isWindows(i);let a=c.makeRe(String(t),{...i,capture:true});let u=a.exec(o?l.toPosixSlashes(r):r);if(u){return u.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>c.makeRe(...t);micromatch.scan=(...t)=>c.scan(...t);micromatch.parse=(t,r)=>{let i=[];for(let o of[].concat(t||[])){for(let t of a(String(o),r)){i.push(c.parse(t,r))}}return i};micromatch.braces=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(r&&r.nobrace===true||!/\{.*\}/.test(t)){return[t]}return a(t,r)};micromatch.braceExpand=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...r,expand:true})};t.exports=micromatch},5469:t=>{"use strict";const mimicFn=(t,r)=>{for(const i of Reflect.ownKeys(r)){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))}return t};t.exports=mimicFn;t.exports["default"]=mimicFn},1867:t=>{"use strict";const copyProperty=(t,r,i,o)=>{if(i==="length"||i==="prototype"){return}if(i==="arguments"||i==="caller"){return}const a=Object.getOwnPropertyDescriptor(t,i);const c=Object.getOwnPropertyDescriptor(r,i);if(!canCopyProperty(a,c)&&o){return}Object.defineProperty(t,i,c)};const canCopyProperty=function(t,r){return t===undefined||t.configurable||t.writable===r.writable&&t.enumerable===r.enumerable&&t.configurable===r.configurable&&(t.writable||t.value===r.value)};const changePrototype=(t,r)=>{const i=Object.getPrototypeOf(r);if(i===Object.getPrototypeOf(t)){return}Object.setPrototypeOf(t,i)};const wrappedToString=(t,r)=>`/* Wrapped ${t}*/\n${r}`;const r=Object.getOwnPropertyDescriptor(Function.prototype,"toString");const i=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const changeToString=(t,o,a)=>{const c=a===""?"":`with ${a.trim()}() `;const l=wrappedToString.bind(null,c,o.toString());Object.defineProperty(l,"name",i);Object.defineProperty(t,"toString",{...r,value:l})};const mimicFn=(t,r,{ignoreNonConfigurable:i=false}={})=>{const{name:o}=t;for(const o of Reflect.ownKeys(r)){copyProperty(t,r,o,i)}changePrototype(t,r);changeToString(t,r,o);return t};t.exports=mimicFn},1254:t=>{t.exports=function(t,r){if(!r)r={};var i={bools:{},strings:{},unknownFn:null};if(typeof r["unknown"]==="function"){i.unknownFn=r["unknown"]}if(typeof r["boolean"]==="boolean"&&r["boolean"]){i.allBools=true}else{[].concat(r["boolean"]).filter(Boolean).forEach((function(t){i.bools[t]=true}))}var o={};Object.keys(r.alias||{}).forEach((function(t){o[t]=[].concat(r.alias[t]);o[t].forEach((function(r){o[r]=[t].concat(o[t].filter((function(t){return r!==t})))}))}));[].concat(r.string).filter(Boolean).forEach((function(t){i.strings[t]=true;if(o[t]){i.strings[o[t]]=true}}));var a=r["default"]||{};var c={_:[]};Object.keys(i.bools).forEach((function(t){setArg(t,a[t]===undefined?false:a[t])}));var l=[];if(t.indexOf("--")!==-1){l=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}function argDefined(t,r){return i.allBools&&/^--[^=]+$/.test(r)||i.strings[t]||i.bools[t]||o[t]}function setArg(t,r,a){if(a&&i.unknownFn&&!argDefined(t,a)){if(i.unknownFn(a)===false)return}var l=!i.strings[t]&&isNumber(r)?Number(r):r;setKey(c,t.split("."),l);(o[t]||[]).forEach((function(t){setKey(c,t.split("."),l)}))}function setKey(t,r,o){var a=t;for(var c=0;c<r.length-1;c++){var l=r[c];if(isConstructorOrProto(a,l))return;if(a[l]===undefined)a[l]={};if(a[l]===Object.prototype||a[l]===Number.prototype||a[l]===String.prototype)a[l]={};if(a[l]===Array.prototype)a[l]=[];a=a[l]}var l=r[r.length-1];if(isConstructorOrProto(a,l))return;if(a===Object.prototype||a===Number.prototype||a===String.prototype)a={};if(a===Array.prototype)a=[];if(a[l]===undefined||i.bools[l]||typeof a[l]==="boolean"){a[l]=o}else if(Array.isArray(a[l])){a[l].push(o)}else{a[l]=[a[l],o]}}function aliasIsBoolean(t){return o[t].some((function(t){return i.bools[t]}))}for(var u=0;u<t.length;u++){var h=t[u];if(/^--.+=/.test(h)){var d=h.match(/^--([^=]+)=([\s\S]*)$/);var p=d[1];var m=d[2];if(i.bools[p]){m=m!=="false"}setArg(p,m,h)}else if(/^--no-.+/.test(h)){var p=h.match(/^--no-(.+)/)[1];setArg(p,false,h)}else if(/^--.+/.test(h)){var p=h.match(/^--(.+)/)[1];var y=t[u+1];if(y!==undefined&&!/^-/.test(y)&&!i.bools[p]&&!i.allBools&&(o[p]?!aliasIsBoolean(p):true)){setArg(p,y,h);u++}else if(/^(true|false)$/.test(y)){setArg(p,y==="true",h);u++}else{setArg(p,i.strings[p]?"":true,h)}}else if(/^-[^-]+/.test(h)){var g=h.slice(1,-1).split("");var v=false;for(var b=0;b<g.length;b++){var y=h.slice(b+2);if(y==="-"){setArg(g[b],y,h);continue}if(/[A-Za-z]/.test(g[b])&&/=/.test(y)){setArg(g[b],y.split("=")[1],h);v=true;break}if(/[A-Za-z]/.test(g[b])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(y)){setArg(g[b],y,h);v=true;break}if(g[b+1]&&g[b+1].match(/\W/)){setArg(g[b],h.slice(b+2),h);v=true;break}else{setArg(g[b],i.strings[g[b]]?"":true,h)}}var p=h.slice(-1)[0];if(!v&&p!=="-"){if(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!i.bools[p]&&(o[p]?!aliasIsBoolean(p):true)){setArg(p,t[u+1],h);u++}else if(t[u+1]&&/^(true|false)$/.test(t[u+1])){setArg(p,t[u+1]==="true",h);u++}else{setArg(p,i.strings[p]?"":true,h)}}}else{if(!i.unknownFn||i.unknownFn(h)!==false){c._.push(i.strings["_"]||!isNumber(h)?h:Number(h))}if(r.stopEarly){c._.push.apply(c._,t.slice(u+1));break}}}Object.keys(a).forEach((function(t){if(!hasKey(c,t.split("."))){setKey(c,t.split("."),a[t]);(o[t]||[]).forEach((function(r){setKey(c,r.split("."),a[t])}))}}));if(r["--"]){c["--"]=new Array;l.forEach((function(t){c["--"].push(t)}))}else{l.forEach((function(t){c._.push(t)}))}return c};function hasKey(t,r){var i=t;r.slice(0,-1).forEach((function(t){i=i[t]||{}}));var o=r[r.length-1];return o in i}function isNumber(t){if(typeof t==="number")return true;if(/^0x[0-9a-f]+$/i.test(t))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,r){return r==="constructor"&&typeof t[r]==="function"||r==="__proto__"}},7413:(t,r,i)=>{"use strict";const o=i(2361);const a=i(2781);const c=i(3401);const l=i(1576).StringDecoder;const u=Symbol("EOF");const h=Symbol("maybeEmitEnd");const d=Symbol("emittedEnd");const p=Symbol("emittingEnd");const m=Symbol("closed");const y=Symbol("read");const g=Symbol("flush");const v=Symbol("flushChunk");const b=Symbol("encoding");const w=Symbol("decoder");const E=Symbol("flowing");const S=Symbol("paused");const x=Symbol("resume");const R=Symbol("bufferLength");const P=Symbol("bufferPush");const $=Symbol("bufferShift");const O=Symbol("objectMode");const T=Symbol("destroyed");const A=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const C=A&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const k=A&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBuffer=t=>t instanceof ArrayBuffer||typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);t.exports=class Minipass extends a{constructor(t){super();this[E]=false;this[S]=false;this.pipes=new c;this.buffer=new c;this[O]=t&&t.objectMode||false;if(this[O])this[b]=null;else this[b]=t&&t.encoding||null;if(this[b]==="buffer")this[b]=null;this[w]=this[b]?new l(this[b]):null;this[u]=false;this[d]=false;this[p]=false;this[m]=false;this.writable=true;this.readable=true;this[R]=0;this[T]=false}get bufferLength(){return this[R]}get encoding(){return this[b]}set encoding(t){if(this[O])throw new Error("cannot set encoding in objectMode");if(this[b]&&t!==this[b]&&(this[w]&&this[w].lastNeed||this[R]))throw new Error("cannot change encoding");if(this[b]!==t){this[w]=t?new l(t):null;if(this.buffer.length)this.buffer=this.buffer.map((t=>this[w].write(t)))}this[b]=t}setEncoding(t){this.encoding=t}get objectMode(){return this[O]}set objectMode(t){this[O]=this[O]||!!t}write(t,r,i){if(this[u])throw new Error("write after end");if(this[T]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof r==="function")i=r,r="utf8";if(!r)r="utf8";if(!this[O]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(isArrayBuffer(t))t=Buffer.from(t);else if(typeof t!=="string")this.objectMode=true}if(!this.objectMode&&!t.length){if(this[R]!==0)this.emit("readable");if(i)i();return this.flowing}if(typeof t==="string"&&!this[O]&&!(r===this[b]&&!this[w].lastNeed)){t=Buffer.from(t,r)}if(Buffer.isBuffer(t)&&this[b])t=this[w].write(t);if(this.flowing){if(this[R]!==0)this[g](true);this.emit("data",t)}else this[P](t);if(this[R]!==0)this.emit("readable");if(i)i();return this.flowing}read(t){if(this[T])return null;try{if(this[R]===0||t===0||t>this[R])return null;if(this[O])t=null;if(this.buffer.length>1&&!this[O]){if(this.encoding)this.buffer=new c([Array.from(this.buffer).join("")]);else this.buffer=new c([Buffer.concat(Array.from(this.buffer),this[R])])}return this[y](t||null,this.buffer.head.value)}finally{this[h]()}}[y](t,r){if(t===r.length||t===null)this[$]();else{this.buffer.head.value=r.slice(t);r=r.slice(0,t);this[R]-=t}this.emit("data",r);if(!this.buffer.length&&!this[u])this.emit("drain");return r}end(t,r,i){if(typeof t==="function")i=t,t=null;if(typeof r==="function")i=r,r="utf8";if(t)this.write(t,r);if(i)this.once("end",i);this[u]=true;this.writable=false;if(this.flowing||!this[S])this[h]();return this}[x](){if(this[T])return;this[S]=false;this[E]=true;this.emit("resume");if(this.buffer.length)this[g]();else if(this[u])this[h]();else this.emit("drain")}resume(){return this[x]()}pause(){this[E]=false;this[S]=true}get destroyed(){return this[T]}get flowing(){return this[E]}get paused(){return this[S]}[P](t){if(this[O])this[R]+=1;else this[R]+=t.length;return this.buffer.push(t)}[$](){if(this.buffer.length){if(this[O])this[R]-=1;else this[R]-=this.buffer.head.value.length}return this.buffer.shift()}[g](t){do{}while(this[v](this[$]()));if(!t&&!this.buffer.length&&!this[u])this.emit("drain")}[v](t){return t?(this.emit("data",t),this.flowing):false}pipe(t,r){if(this[T])return;const i=this[d];r=r||{};if(t===process.stdout||t===process.stderr)r.end=false;else r.end=r.end!==false;const o={dest:t,opts:r,ondrain:t=>this[x]()};this.pipes.push(o);t.on("drain",o.ondrain);this[x]();if(i&&o.opts.end)o.dest.end();return t}addListener(t,r){return this.on(t,r)}on(t,r){try{return super.on(t,r)}finally{if(t==="data"&&!this.pipes.length&&!this.flowing)this[x]();else if(isEndish(t)&&this[d]){super.emit(t);this.removeAllListeners(t)}}}get emittedEnd(){return this[d]}[h](){if(!this[p]&&!this[d]&&!this[T]&&this.buffer.length===0&&this[u]){this[p]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[m])this.emit("close");this[p]=false}}emit(t,r){if(t!=="error"&&t!=="close"&&t!==T&&this[T])return;else if(t==="data"){if(!r)return;if(this.pipes.length)this.pipes.forEach((t=>t.dest.write(r)===false&&this.pause()))}else if(t==="end"){if(this[d]===true)return;this[d]=true;this.readable=false;if(this[w]){r=this[w].end();if(r){this.pipes.forEach((t=>t.dest.write(r)));super.emit("data",r)}}this.pipes.forEach((t=>{t.dest.removeListener("drain",t.ondrain);if(t.opts.end)t.dest.end()}))}else if(t==="close"){this[m]=true;if(!this[d]&&!this[T])return}const i=new Array(arguments.length);i[0]=t;i[1]=r;if(arguments.length>2){for(let t=2;t<arguments.length;t++){i[t]=arguments[t]}}try{return super.emit.apply(this,i)}finally{if(!isEndish(t))this[h]();else this.removeAllListeners(t)}}collect(){const t=[];if(!this[O])t.dataLength=0;const r=this.promise();this.on("data",(r=>{t.push(r);if(!this[O])t.dataLength+=r.length}));return r.then((()=>t))}concat(){return this[O]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((t=>this[O]?Promise.reject(new Error("cannot concat in objectMode")):this[b]?t.join(""):Buffer.concat(t,t.dataLength)))}promise(){return new Promise(((t,r)=>{this.on(T,(()=>r(new Error("stream destroyed"))));this.on("end",(()=>t()));this.on("error",(t=>r(t)))}))}[C](){const next=()=>{const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[u])return Promise.resolve({done:true});let r=null;let i=null;const onerr=t=>{this.removeListener("data",ondata);this.removeListener("end",onend);i(t)};const ondata=t=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.pause();r({value:t,done:!!this[u]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);r({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,o)=>{i=o;r=t;this.once(T,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next}}[k](){const next=()=>{const t=this.read();const r=t===null;return{value:t,done:r}};return{next:next}}destroy(t){if(this[T]){if(t)this.emit("error",t);else this.emit(T);return this}this[T]=true;this.buffer=new c;this[R]=0;if(typeof this.close==="function"&&!this[m])this.close();if(t)this.emit("error",t);else this.emit(T);return this}static isStream(t){return!!t&&(t instanceof Minipass||t instanceof a||t instanceof o&&(typeof t.pipe==="function"||typeof t.write==="function"&&typeof t.end==="function"))}}},5540:(t,r,i)=>{"use strict";const o=typeof process==="object"&&process?process:{stdout:null,stderr:null};const a=i(2361);const c=i(2781);const l=i(1576);const u=l.StringDecoder;const h=Symbol("EOF");const d=Symbol("maybeEmitEnd");const p=Symbol("emittedEnd");const m=Symbol("emittingEnd");const y=Symbol("emittedError");const g=Symbol("closed");const v=Symbol("read");const b=Symbol("flush");const w=Symbol("flushChunk");const E=Symbol("encoding");const S=Symbol("decoder");const x=Symbol("flowing");const R=Symbol("paused");const P=Symbol("resume");const $=Symbol("buffer");const O=Symbol("pipes");const T=Symbol("bufferLength");const A=Symbol("bufferPush");const C=Symbol("bufferShift");const k=Symbol("objectMode");const I=Symbol("destroyed");const N=Symbol("error");const D=Symbol("emitData");const L=Symbol("emitEnd");const M=Symbol("emitEnd2");const j=Symbol("async");const U=Symbol("abort");const B=Symbol("aborted");const H=Symbol("signal");const defer=t=>Promise.resolve().then(t);const z=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const V=z&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const G=z&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBuffer=t=>t instanceof ArrayBuffer||typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{constructor(t,r,i){this.src=t;this.dest=r;this.opts=i;this.ondrain=()=>t[P]();r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,r,i){super(t,r,i);this.proxyErrors=t=>r.emit("error",t);t.on("error",this.proxyErrors)}}class Minipass extends c{constructor(t){super();this[x]=false;this[R]=false;this[O]=[];this[$]=[];this[k]=t&&t.objectMode||false;if(this[k])this[E]=null;else this[E]=t&&t.encoding||null;if(this[E]==="buffer")this[E]=null;this[j]=t&&!!t.async||false;this[S]=this[E]?new u(this[E]):null;this[h]=false;this[p]=false;this[m]=false;this[g]=false;this[y]=null;this.writable=true;this.readable=true;this[T]=0;this[I]=false;if(t&&t.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[$]})}if(t&&t.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[O]})}this[H]=t&&t.signal;this[B]=false;if(this[H]){this[H].addEventListener("abort",(()=>this[U]()));if(this[H].aborted){this[U]()}}}get bufferLength(){return this[T]}get encoding(){return this[E]}set encoding(t){if(this[k])throw new Error("cannot set encoding in objectMode");if(this[E]&&t!==this[E]&&(this[S]&&this[S].lastNeed||this[T]))throw new Error("cannot change encoding");if(this[E]!==t){this[S]=t?new u(t):null;if(this[$].length)this[$]=this[$].map((t=>this[S].write(t)))}this[E]=t}setEncoding(t){this.encoding=t}get objectMode(){return this[k]}set objectMode(t){this[k]=this[k]||!!t}get["async"](){return this[j]}set["async"](t){this[j]=this[j]||!!t}[U](){this[B]=true;this.emit("abort",this[H].reason);this.destroy(this[H].reason)}get aborted(){return this[B]}set aborted(t){}write(t,r,i){if(this[B])return false;if(this[h])throw new Error("write after end");if(this[I]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof r==="function")i=r,r="utf8";if(!r)r="utf8";const o=this[j]?defer:t=>t();if(!this[k]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(isArrayBuffer(t))t=Buffer.from(t);else if(typeof t!=="string")this.objectMode=true}if(this[k]){if(this.flowing&&this[T]!==0)this[b](true);if(this.flowing)this.emit("data",t);else this[A](t);if(this[T]!==0)this.emit("readable");if(i)o(i);return this.flowing}if(!t.length){if(this[T]!==0)this.emit("readable");if(i)o(i);return this.flowing}if(typeof t==="string"&&!(r===this[E]&&!this[S].lastNeed)){t=Buffer.from(t,r)}if(Buffer.isBuffer(t)&&this[E])t=this[S].write(t);if(this.flowing&&this[T]!==0)this[b](true);if(this.flowing)this.emit("data",t);else this[A](t);if(this[T]!==0)this.emit("readable");if(i)o(i);return this.flowing}read(t){if(this[I])return null;if(this[T]===0||t===0||t>this[T]){this[d]();return null}if(this[k])t=null;if(this[$].length>1&&!this[k]){if(this.encoding)this[$]=[this[$].join("")];else this[$]=[Buffer.concat(this[$],this[T])]}const r=this[v](t||null,this[$][0]);this[d]();return r}[v](t,r){if(t===r.length||t===null)this[C]();else{this[$][0]=r.slice(t);r=r.slice(0,t);this[T]-=t}this.emit("data",r);if(!this[$].length&&!this[h])this.emit("drain");return r}end(t,r,i){if(typeof t==="function")i=t,t=null;if(typeof r==="function")i=r,r="utf8";if(t)this.write(t,r);if(i)this.once("end",i);this[h]=true;this.writable=false;if(this.flowing||!this[R])this[d]();return this}[P](){if(this[I])return;this[R]=false;this[x]=true;this.emit("resume");if(this[$].length)this[b]();else if(this[h])this[d]();else this.emit("drain")}resume(){return this[P]()}pause(){this[x]=false;this[R]=true}get destroyed(){return this[I]}get flowing(){return this[x]}get paused(){return this[R]}[A](t){if(this[k])this[T]+=1;else this[T]+=t.length;this[$].push(t)}[C](){if(this[k])this[T]-=1;else this[T]-=this[$][0].length;return this[$].shift()}[b](t){do{}while(this[w](this[C]())&&this[$].length);if(!t&&!this[$].length&&!this[h])this.emit("drain")}[w](t){this.emit("data",t);return this.flowing}pipe(t,r){if(this[I])return;const i=this[p];r=r||{};if(t===o.stdout||t===o.stderr)r.end=false;else r.end=r.end!==false;r.proxyErrors=!!r.proxyErrors;if(i){if(r.end)t.end()}else{this[O].push(!r.proxyErrors?new Pipe(this,t,r):new PipeProxyErrors(this,t,r));if(this[j])defer((()=>this[P]()));else this[P]()}return t}unpipe(t){const r=this[O].find((r=>r.dest===t));if(r){this[O].splice(this[O].indexOf(r),1);r.unpipe()}}addListener(t,r){return this.on(t,r)}on(t,r){const i=super.on(t,r);if(t==="data"&&!this[O].length&&!this.flowing)this[P]();else if(t==="readable"&&this[T]!==0)super.emit("readable");else if(isEndish(t)&&this[p]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[y]){if(this[j])defer((()=>r.call(this,this[y])));else r.call(this,this[y])}return i}get emittedEnd(){return this[p]}[d](){if(!this[m]&&!this[p]&&!this[I]&&this[$].length===0&&this[h]){this[m]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[g])this.emit("close");this[m]=false}}emit(t,r,...i){if(t!=="error"&&t!=="close"&&t!==I&&this[I])return;else if(t==="data"){return!this[k]&&!r?false:this[j]?defer((()=>this[D](r))):this[D](r)}else if(t==="end"){return this[L]()}else if(t==="close"){this[g]=true;if(!this[p]&&!this[I])return;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[y]=r;super.emit(N,r);const t=!this[H]||this.listeners("error").length?super.emit("error",r):false;this[d]();return t}else if(t==="resume"){const t=super.emit("resume");this[d]();return t}else if(t==="finish"||t==="prefinish"){const r=super.emit(t);this.removeAllListeners(t);return r}const o=super.emit(t,r,...i);this[d]();return o}[D](t){for(const r of this[O]){if(r.dest.write(t)===false)this.pause()}const r=super.emit("data",t);this[d]();return r}[L](){if(this[p])return;this[p]=true;this.readable=false;if(this[j])defer((()=>this[M]()));else this[M]()}[M](){if(this[S]){const t=this[S].end();if(t){for(const r of this[O]){r.dest.write(t)}super.emit("data",t)}}for(const t of this[O]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}collect(){const t=[];if(!this[k])t.dataLength=0;const r=this.promise();this.on("data",(r=>{t.push(r);if(!this[k])t.dataLength+=r.length}));return r.then((()=>t))}concat(){return this[k]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((t=>this[k]?Promise.reject(new Error("cannot concat in objectMode")):this[E]?t.join(""):Buffer.concat(t,t.dataLength)))}promise(){return new Promise(((t,r)=>{this.on(I,(()=>r(new Error("stream destroyed"))));this.on("error",(t=>r(t)));this.on("end",(()=>t()))}))}[V](){let t=false;const stop=()=>{this.pause();t=true;return Promise.resolve({done:true})};const next=()=>{if(t)return stop();const r=this.read();if(r!==null)return Promise.resolve({done:false,value:r});if(this[h])return stop();let i=null;let o=null;const onerr=t=>{this.removeListener("data",ondata);this.removeListener("end",onend);this.removeListener(I,ondestroy);stop();o(t)};const ondata=t=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.removeListener(I,ondestroy);this.pause();i({value:t,done:!!this[h]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);this.removeListener(I,ondestroy);stop();i({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,r)=>{o=r;i=t;this.once(I,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[V](){return this}}}[G](){let t=false;const stop=()=>{this.pause();this.removeListener(N,stop);this.removeListener(I,stop);this.removeListener("end",stop);t=true;return{done:true}};const next=()=>{if(t)return stop();const r=this.read();return r===null?stop():{value:r}};this.once("end",stop);this.once(N,stop);this.once(I,stop);return{next:next,throw:stop,return:stop,[G](){return this}}}destroy(t){if(this[I]){if(t)this.emit("error",t);else this.emit(I);return this}this[I]=true;this[$].length=0;this[T]=0;if(typeof this.close==="function"&&!this[g])this.close();if(t)this.emit("error",t);else this.emit(I);return this}static isStream(t){return!!t&&(t instanceof Minipass||t instanceof c||t instanceof a&&(typeof t.pipe==="function"||typeof t.write==="function"&&typeof t.end==="function"))}}r.Minipass=Minipass},5154:(t,r,i)=>{const o=i(9796).constants||{ZLIB_VERNUM:4736};t.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},o))},7750:(t,r,i)=>{"use strict";const o=i(9491);const a=i(4300).Buffer;const c=i(9796);const l=r.constants=i(5154);const u=i(7413);const h=a.concat;const d=Symbol("_superWrite");class ZlibError extends Error{constructor(t){super("zlib: "+t.message);this.code=t.code;this.errno=t.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+t.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const p=Symbol("opts");const m=Symbol("flushFlag");const y=Symbol("finishFlushFlag");const g=Symbol("fullFlushFlag");const v=Symbol("handle");const b=Symbol("onError");const w=Symbol("sawError");const E=Symbol("level");const S=Symbol("strategy");const x=Symbol("ended");const R=Symbol("_defaultFullFlush");class ZlibBase extends u{constructor(t,r){if(!t||typeof t!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(t);this[w]=false;this[x]=false;this[p]=t;this[m]=t.flush;this[y]=t.finishFlush;try{this[v]=new c[r](t)}catch(t){throw new ZlibError(t)}this[b]=t=>{if(this[w])return;this[w]=true;this.close();this.emit("error",t)};this[v].on("error",(t=>this[b](new ZlibError(t))));this.once("end",(()=>this.close))}close(){if(this[v]){this[v].close();this[v]=null;this.emit("close")}}reset(){if(!this[w]){o(this[v],"zlib binding closed");return this[v].reset()}}flush(t){if(this.ended)return;if(typeof t!=="number")t=this[g];this.write(Object.assign(a.alloc(0),{[m]:t}))}end(t,r,i){if(t)this.write(t,r);this.flush(this[y]);this[x]=true;return super.end(null,null,i)}get ended(){return this[x]}write(t,r,i){if(typeof r==="function")i=r,r="utf8";if(typeof t==="string")t=a.from(t,r);if(this[w])return;o(this[v],"zlib binding closed");const c=this[v]._handle;const l=c.close;c.close=()=>{};const u=this[v].close;this[v].close=()=>{};a.concat=t=>t;let p;try{const r=typeof t[m]==="number"?t[m]:this[m];p=this[v]._processChunk(t,r);a.concat=h}catch(t){a.concat=h;this[b](new ZlibError(t))}finally{if(this[v]){this[v]._handle=c;c.close=l;this[v].close=u;this[v].removeAllListeners("error")}}if(this[v])this[v].on("error",(t=>this[b](new ZlibError(t))));let y;if(p){if(Array.isArray(p)&&p.length>0){y=this[d](a.from(p[0]));for(let t=1;t<p.length;t++){y=this[d](p[t])}}else{y=this[d](a.from(p))}}if(i)i();return y}[d](t){return super.write(t)}}class Zlib extends ZlibBase{constructor(t,r){t=t||{};t.flush=t.flush||l.Z_NO_FLUSH;t.finishFlush=t.finishFlush||l.Z_FINISH;super(t,r);this[g]=l.Z_FULL_FLUSH;this[E]=t.level;this[S]=t.strategy}params(t,r){if(this[w])return;if(!this[v])throw new Error("cannot switch params when binding is closed");if(!this[v].params)throw new Error("not supported in this implementation");if(this[E]!==t||this[S]!==r){this.flush(l.Z_SYNC_FLUSH);o(this[v],"zlib binding closed");const i=this[v].flush;this[v].flush=(t,r)=>{this.flush(t);r()};try{this[v].params(t,r)}finally{this[v].flush=i}if(this[v]){this[E]=t;this[S]=r}}}}class Deflate extends Zlib{constructor(t){super(t,"Deflate")}}class Inflate extends Zlib{constructor(t){super(t,"Inflate")}}const P=Symbol("_portable");class Gzip extends Zlib{constructor(t){super(t,"Gzip");this[P]=t&&!!t.portable}[d](t){if(!this[P])return super[d](t);this[P]=false;t[9]=255;return super[d](t)}}class Gunzip extends Zlib{constructor(t){super(t,"Gunzip")}}class DeflateRaw extends Zlib{constructor(t){super(t,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(t){super(t,"InflateRaw")}}class Unzip extends Zlib{constructor(t){super(t,"Unzip")}}class Brotli extends ZlibBase{constructor(t,r){t=t||{};t.flush=t.flush||l.BROTLI_OPERATION_PROCESS;t.finishFlush=t.finishFlush||l.BROTLI_OPERATION_FINISH;super(t,r);this[g]=l.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(t){super(t,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(t){super(t,"BrotliDecompress")}}r.Deflate=Deflate;r.Inflate=Inflate;r.Gzip=Gzip;r.Gunzip=Gunzip;r.DeflateRaw=DeflateRaw;r.InflateRaw=InflateRaw;r.Unzip=Unzip;if(typeof c.BrotliCompress==="function"){r.BrotliCompress=BrotliCompress;r.BrotliDecompress=BrotliDecompress}else{r.BrotliCompress=r.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},9806:(t,r,i)=>{const o=i(2288);const a=i(7637);const{mkdirpNative:c,mkdirpNativeSync:l}=i(3713);const{mkdirpManual:u,mkdirpManualSync:h}=i(2561);const{useNative:d,useNativeSync:p}=i(7449);const mkdirp=(t,r)=>{t=a(t);r=o(r);return d(r)?c(t,r):u(t,r)};const mkdirpSync=(t,r)=>{t=a(t);r=o(r);return p(r)?l(t,r):h(t,r)};mkdirp.sync=mkdirpSync;mkdirp.native=(t,r)=>c(a(t),o(r));mkdirp.manual=(t,r)=>u(a(t),o(r));mkdirp.nativeSync=(t,r)=>l(a(t),o(r));mkdirp.manualSync=(t,r)=>h(a(t),o(r));t.exports=mkdirp},5509:(t,r,i)=>{const{dirname:o}=i(1017);const findMade=(t,r,i=undefined)=>{if(i===r)return Promise.resolve();return t.statAsync(r).then((t=>t.isDirectory()?i:undefined),(i=>i.code==="ENOENT"?findMade(t,o(r),r):undefined))};const findMadeSync=(t,r,i=undefined)=>{if(i===r)return undefined;try{return t.statSync(r).isDirectory()?i:undefined}catch(i){return i.code==="ENOENT"?findMadeSync(t,o(r),r):undefined}};t.exports={findMade:findMade,findMadeSync:findMadeSync}},2561:(t,r,i)=>{const{dirname:o}=i(1017);const mkdirpManual=(t,r,i)=>{r.recursive=false;const a=o(t);if(a===t){return r.mkdirAsync(t,r).catch((t=>{if(t.code!=="EISDIR")throw t}))}return r.mkdirAsync(t,r).then((()=>i||t),(o=>{if(o.code==="ENOENT")return mkdirpManual(a,r).then((i=>mkdirpManual(t,r,i)));if(o.code!=="EEXIST"&&o.code!=="EROFS")throw o;return r.statAsync(t).then((t=>{if(t.isDirectory())return i;else throw o}),(()=>{throw o}))}))};const mkdirpManualSync=(t,r,i)=>{const a=o(t);r.recursive=false;if(a===t){try{return r.mkdirSync(t,r)}catch(t){if(t.code!=="EISDIR")throw t;else return}}try{r.mkdirSync(t,r);return i||t}catch(o){if(o.code==="ENOENT")return mkdirpManualSync(t,r,mkdirpManualSync(a,r,i));if(o.code!=="EEXIST"&&o.code!=="EROFS")throw o;try{if(!r.statSync(t).isDirectory())throw o}catch(t){throw o}}};t.exports={mkdirpManual:mkdirpManual,mkdirpManualSync:mkdirpManualSync}},3713:(t,r,i)=>{const{dirname:o}=i(1017);const{findMade:a,findMadeSync:c}=i(5509);const{mkdirpManual:l,mkdirpManualSync:u}=i(2561);const mkdirpNative=(t,r)=>{r.recursive=true;const i=o(t);if(i===t)return r.mkdirAsync(t,r);return a(r,t).then((i=>r.mkdirAsync(t,r).then((()=>i)).catch((i=>{if(i.code==="ENOENT")return l(t,r);else throw i}))))};const mkdirpNativeSync=(t,r)=>{r.recursive=true;const i=o(t);if(i===t)return r.mkdirSync(t,r);const a=c(r,t);try{r.mkdirSync(t,r);return a}catch(i){if(i.code==="ENOENT")return u(t,r);else throw i}};t.exports={mkdirpNative:mkdirpNative,mkdirpNativeSync:mkdirpNativeSync}},2288:(t,r,i)=>{const{promisify:o}=i(3837);const a=i(7147);const optsArg=t=>{if(!t)t={mode:511,fs:a};else if(typeof t==="object")t={mode:511,fs:a,...t};else if(typeof t==="number")t={mode:t,fs:a};else if(typeof t==="string")t={mode:parseInt(t,8),fs:a};else throw new TypeError("invalid options argument");t.mkdir=t.mkdir||t.fs.mkdir||a.mkdir;t.mkdirAsync=o(t.mkdir);t.stat=t.stat||t.fs.stat||a.stat;t.statAsync=o(t.stat);t.statSync=t.statSync||t.fs.statSync||a.statSync;t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||a.mkdirSync;return t};t.exports=optsArg},7637:(t,r,i)=>{const o=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:a,parse:c}=i(1017);const pathArg=t=>{if(/\0/.test(t)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=a(t);if(o==="win32"){const r=/[*|"<>?:]/;const{root:i}=c(t);if(r.test(t.substr(i.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};t.exports=pathArg},7449:(t,r,i)=>{const o=i(7147);const a=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const c=a.replace(/^v/,"").split(".");const l=+c[0]>10||+c[0]===10&&+c[1]>=12;const u=!l?()=>false:t=>t.mkdir===o.mkdir;const h=!l?()=>false:t=>t.mkdirSync===o.mkdirSync;t.exports={useNative:u,useNativeSync:h}},3430:(t,r,i)=>{"use strict";const o=i(5469);const a=new WeakMap;const onetime=(t,r={})=>{if(typeof t!=="function"){throw new TypeError("Expected a function")}let i;let c=0;const l=t.displayName||t.name||"<anonymous>";const onetime=function(...o){a.set(onetime,++c);if(c===1){i=t.apply(this,o);t=null}else if(r.throw===true){throw new Error(`Function \`${l}\` can only be called once`)}return i};o(onetime,t);a.set(onetime,c);return onetime};t.exports=onetime;t.exports["default"]=onetime;t.exports.callCount=t=>{if(!a.has(t)){throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`)}return a.get(t)}},6742:(t,r,i)=>{"use strict";const o=i(1857);const pLimit=t=>{if(!((Number.isInteger(t)||t===Infinity)&&t>0)){return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"))}const r=[];let i=0;const next=()=>{i--;if(r.length>0){r.shift()()}};const run=(t,r,...a)=>{i++;const c=o(t,...a);r(c);c.then(next,next)};const enqueue=(o,a,...c)=>{if(i<t){run(o,a,...c)}else{r.push(run.bind(null,o,a,...c))}};const generator=(t,...r)=>new Promise((i=>enqueue(t,i,...r)));Object.defineProperties(generator,{activeCount:{get:()=>i},pendingCount:{get:()=>r.length},clearQueue:{value:()=>{r.length=0}}});return generator};t.exports=pLimit;t.exports["default"]=pLimit},4604:(t,r,i)=>{"use strict";const o=i(6742);class EndError extends Error{constructor(t){super();this.value=t}}const testElement=(t,r)=>Promise.resolve(t).then(r);const finder=t=>Promise.all(t).then((t=>t[1]===true&&Promise.reject(new EndError(t[0]))));t.exports=(t,r,i)=>{i=Object.assign({concurrency:Infinity,preserveOrder:true},i);const a=o(i.concurrency);const c=[...t].map((t=>[t,a(testElement,t,r)]));const l=o(i.preserveOrder?1:Infinity);return Promise.all(c.map((t=>l(finder,t)))).then((()=>{})).catch((t=>t instanceof EndError?t.value:Promise.reject(t)))}},1857:t=>{"use strict";const pTry=(t,...r)=>new Promise((i=>{i(t(...r))}));t.exports=pTry;t.exports["default"]=pTry},3883:(t,r,i)=>{"use strict";const o=i(7147);t.exports=t=>new Promise((r=>{o.access(t,(t=>{r(!t)}))}));t.exports.sync=t=>{try{o.accessSync(t);return true}catch(t){return false}}},6516:t=>{"use strict";const pathKey=(t={})=>{const r=t.env||process.env;const i=t.platform||process.platform;if(i!=="win32"){return"PATH"}return Object.keys(r).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9306:(t,r,i)=>{let o=i(6224);let a=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||o.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(t,r,i=t)=>o=>{let a=""+o;let c=a.indexOf(r,t.length);return~c?t+replaceClose(a,r,i,c)+r:t+a+r};let replaceClose=(t,r,i,o)=>{let a=t.substring(0,o)+i;let c=t.substring(o+r.length);let l=c.indexOf(r);return~l?a+replaceClose(c,r,i,l):a+c};let createColors=(t=a)=>({isColorSupported:t,reset:t?t=>`[0m${t}[0m`:String,bold:t?formatter("[1m","[22m","[22m[1m"):String,dim:t?formatter("[2m","[22m","[22m[2m"):String,italic:t?formatter("[3m","[23m"):String,underline:t?formatter("[4m","[24m"):String,inverse:t?formatter("[7m","[27m"):String,hidden:t?formatter("[8m","[28m"):String,strikethrough:t?formatter("[9m","[29m"):String,black:t?formatter("[30m","[39m"):String,red:t?formatter("[31m","[39m"):String,green:t?formatter("[32m","[39m"):String,yellow:t?formatter("[33m","[39m"):String,blue:t?formatter("[34m","[39m"):String,magenta:t?formatter("[35m","[39m"):String,cyan:t?formatter("[36m","[39m"):String,white:t?formatter("[37m","[39m"):String,gray:t?formatter("[90m","[39m"):String,bgBlack:t?formatter("[40m","[49m"):String,bgRed:t?formatter("[41m","[49m"):String,bgGreen:t?formatter("[42m","[49m"):String,bgYellow:t?formatter("[43m","[49m"):String,bgBlue:t?formatter("[44m","[49m"):String,bgMagenta:t?formatter("[45m","[49m"):String,bgCyan:t?formatter("[46m","[49m"):String,bgWhite:t?formatter("[47m","[49m"):String});t.exports=createColors();t.exports.createColors=createColors},3846:(t,r,i)=>{"use strict";t.exports=i(7250)},7798:(t,r,i)=>{"use strict";const o=i(1017);const a="\\\\/";const c=`[^${a}]`;const l="\\.";const u="\\+";const h="\\?";const d="\\/";const p="(?=.)";const m="[^/]";const y=`(?:${d}|$)`;const g=`(?:^|${d})`;const v=`${l}{1,2}${y}`;const b=`(?!${l})`;const w=`(?!${g}${v})`;const E=`(?!${l}{0,1}${y})`;const S=`(?!${v})`;const x=`[^.${d}]`;const R=`${m}*?`;const P={DOT_LITERAL:l,PLUS_LITERAL:u,QMARK_LITERAL:h,SLASH_LITERAL:d,ONE_CHAR:p,QMARK:m,END_ANCHOR:y,DOTS_SLASH:v,NO_DOT:b,NO_DOTS:w,NO_DOT_SLASH:E,NO_DOTS_SLASH:S,QMARK_NO_DOT:x,STAR:R,START_ANCHOR:g};const $={...P,SLASH_LITERAL:`[${a}]`,QMARK:c,STAR:`${c}*?`,DOTS_SLASH:`${l}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${a}])${l}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`};const O={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:O,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:o.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?$:P}}},3632:(t,r,i)=>{"use strict";const o=i(7798);const a=i(5502);const{MAX_LENGTH:c,POSIX_REGEX_SOURCE:l,REGEX_NON_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_BACKREF:h,REPLACEMENTS:d}=o;const expandRange=(t,r)=>{if(typeof r.expandRange==="function"){return r.expandRange(...t,r)}t.sort();const i=`[${t.join("-")}]`;try{new RegExp(i)}catch(r){return t.map((t=>a.escapeRegex(t))).join("..")}return i};const syntaxError=(t,r)=>`Missing ${t}: "${r}" - use "\\\\${r}" to match literal characters`;const parse=(t,r)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=d[t]||t;const i={...r};const p=typeof i.maxLength==="number"?Math.min(c,i.maxLength):c;let m=t.length;if(m>p){throw new SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`)}const y={type:"bos",value:"",output:i.prepend||""};const g=[y];const v=i.capture?"":"?:";const b=a.isWindows(r);const w=o.globChars(b);const E=o.extglobChars(w);const{DOT_LITERAL:S,PLUS_LITERAL:x,SLASH_LITERAL:R,ONE_CHAR:P,DOTS_SLASH:$,NO_DOT:O,NO_DOT_SLASH:T,NO_DOTS_SLASH:A,QMARK:C,QMARK_NO_DOT:k,STAR:I,START_ANCHOR:N}=w;const globstar=t=>`(${v}(?:(?!${N}${t.dot?$:S}).)*?)`;const D=i.dot?"":O;const L=i.dot?C:k;let M=i.bash===true?globstar(i):I;if(i.capture){M=`(${M})`}if(typeof i.noext==="boolean"){i.noextglob=i.noext}const j={input:t,index:-1,start:0,dot:i.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:g};t=a.removePrefix(t,j);m=t.length;const U=[];const B=[];const H=[];let z=y;let V;const eos=()=>j.index===m-1;const G=j.peek=(r=1)=>t[j.index+r];const q=j.advance=()=>t[++j.index]||"";const remaining=()=>t.slice(j.index+1);const consume=(t="",r=0)=>{j.consumed+=t;j.index+=r};const append=t=>{j.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(G()==="!"&&(G(2)!=="("||G(3)==="?")){q();j.start++;t++}if(t%2===0){return false}j.negated=true;j.start++;return true};const increment=t=>{j[t]++;H.push(t)};const decrement=t=>{j[t]--;H.pop()};const push=t=>{if(z.type==="globstar"){const r=j.braces>0&&(t.type==="comma"||t.type==="brace");const i=t.extglob===true||U.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!r&&!i){j.output=j.output.slice(0,-z.output.length);z.type="star";z.value="*";z.output=M;j.output+=z.output}}if(U.length&&t.type!=="paren"){U[U.length-1].inner+=t.value}if(t.value||t.output)append(t);if(z&&z.type==="text"&&t.type==="text"){z.value+=t.value;z.output=(z.output||"")+t.value;return}t.prev=z;g.push(t);z=t};const extglobOpen=(t,r)=>{const o={...E[r],conditions:1,inner:""};o.prev=z;o.parens=j.parens;o.output=j.output;const a=(i.capture?"(":"")+o.open;increment("parens");push({type:t,value:r,output:j.output?"":P});push({type:"paren",extglob:true,value:q(),output:a});U.push(o)};const extglobClose=t=>{let o=t.close+(i.capture?")":"");let a;if(t.type==="negate"){let c=M;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){c=globstar(i)}if(c!==M||eos()||/^\)+$/.test(remaining())){o=t.close=`)$))${c}`}if(t.inner.includes("*")&&(a=remaining())&&/^\.[^\\/.]+$/.test(a)){const i=parse(a,{...r,fastpaths:false}).output;o=t.close=`)${i})${c})`}if(t.prev.type==="bos"){j.negatedExtglob=true}}push({type:"paren",extglob:true,value:V,output:o});decrement("parens")};if(i.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let o=false;let c=t.replace(h,((t,r,i,a,c,l)=>{if(a==="\\"){o=true;return t}if(a==="?"){if(r){return r+a+(c?C.repeat(c.length):"")}if(l===0){return L+(c?C.repeat(c.length):"")}return C.repeat(i.length)}if(a==="."){return S.repeat(i.length)}if(a==="*"){if(r){return r+a+(c?M:"")}return M}return r?t:`\\${t}`}));if(o===true){if(i.unescape===true){c=c.replace(/\\/g,"")}else{c=c.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(c===t&&i.contains===true){j.output=t;return j}j.output=a.wrapOutput(c,j,r);return j}while(!eos()){V=q();if(V==="\0"){continue}if(V==="\\"){const t=G();if(t==="/"&&i.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){V+="\\";push({type:"text",value:V});continue}const r=/^\\+/.exec(remaining());let o=0;if(r&&r[0].length>2){o=r[0].length;j.index+=o;if(o%2!==0){V+="\\"}}if(i.unescape===true){V=q()}else{V+=q()}if(j.brackets===0){push({type:"text",value:V});continue}}if(j.brackets>0&&(V!=="]"||z.value==="["||z.value==="[^")){if(i.posix!==false&&V===":"){const t=z.value.slice(1);if(t.includes("[")){z.posix=true;if(t.includes(":")){const t=z.value.lastIndexOf("[");const r=z.value.slice(0,t);const i=z.value.slice(t+2);const o=l[i];if(o){z.value=r+o;j.backtrack=true;q();if(!y.output&&g.indexOf(z)===1){y.output=P}continue}}}}if(V==="["&&G()!==":"||V==="-"&&G()==="]"){V=`\\${V}`}if(V==="]"&&(z.value==="["||z.value==="[^")){V=`\\${V}`}if(i.posix===true&&V==="!"&&z.value==="["){V="^"}z.value+=V;append({value:V});continue}if(j.quotes===1&&V!=='"'){V=a.escapeRegex(V);z.value+=V;append({value:V});continue}if(V==='"'){j.quotes=j.quotes===1?0:1;if(i.keepQuotes===true){push({type:"text",value:V})}continue}if(V==="("){increment("parens");push({type:"paren",value:V});continue}if(V===")"){if(j.parens===0&&i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=U[U.length-1];if(t&&j.parens===t.parens+1){extglobClose(U.pop());continue}push({type:"paren",value:V,output:j.parens?")":"\\)"});decrement("parens");continue}if(V==="["){if(i.nobracket===true||!remaining().includes("]")){if(i.nobracket!==true&&i.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}V=`\\${V}`}else{increment("brackets")}push({type:"bracket",value:V});continue}if(V==="]"){if(i.nobracket===true||z&&z.type==="bracket"&&z.value.length===1){push({type:"text",value:V,output:`\\${V}`});continue}if(j.brackets===0){if(i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:V,output:`\\${V}`});continue}decrement("brackets");const t=z.value.slice(1);if(z.posix!==true&&t[0]==="^"&&!t.includes("/")){V=`/${V}`}z.value+=V;append({value:V});if(i.literalBrackets===false||a.hasRegexChars(t)){continue}const r=a.escapeRegex(z.value);j.output=j.output.slice(0,-z.value.length);if(i.literalBrackets===true){j.output+=r;z.value=r;continue}z.value=`(${v}${r}|${z.value})`;j.output+=z.value;continue}if(V==="{"&&i.nobrace!==true){increment("braces");const t={type:"brace",value:V,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};B.push(t);push(t);continue}if(V==="}"){const t=B[B.length-1];if(i.nobrace===true||!t){push({type:"text",value:V,output:V});continue}let r=")";if(t.dots===true){const t=g.slice();const o=[];for(let r=t.length-1;r>=0;r--){g.pop();if(t[r].type==="brace"){break}if(t[r].type!=="dots"){o.unshift(t[r].value)}}r=expandRange(o,i);j.backtrack=true}if(t.comma!==true&&t.dots!==true){const i=j.output.slice(0,t.outputIndex);const o=j.tokens.slice(t.tokensIndex);t.value=t.output="\\{";V=r="\\}";j.output=i;for(const t of o){j.output+=t.output||t.value}}push({type:"brace",value:V,output:r});decrement("braces");B.pop();continue}if(V==="|"){if(U.length>0){U[U.length-1].conditions++}push({type:"text",value:V});continue}if(V===","){let t=V;const r=B[B.length-1];if(r&&H[H.length-1]==="braces"){r.comma=true;t="|"}push({type:"comma",value:V,output:t});continue}if(V==="/"){if(z.type==="dot"&&j.index===j.start+1){j.start=j.index+1;j.consumed="";j.output="";g.pop();z=y;continue}push({type:"slash",value:V,output:R});continue}if(V==="."){if(j.braces>0&&z.type==="dot"){if(z.value===".")z.output=S;const t=B[B.length-1];z.type="dots";z.output+=V;z.value+=V;t.dots=true;continue}if(j.braces+j.parens===0&&z.type!=="bos"&&z.type!=="slash"){push({type:"text",value:V,output:S});continue}push({type:"dot",value:V,output:S});continue}if(V==="?"){const t=z&&z.value==="(";if(!t&&i.noextglob!==true&&G()==="("&&G(2)!=="?"){extglobOpen("qmark",V);continue}if(z&&z.type==="paren"){const t=G();let r=V;if(t==="<"&&!a.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(z.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){r=`\\${V}`}push({type:"text",value:V,output:r});continue}if(i.dot!==true&&(z.type==="slash"||z.type==="bos")){push({type:"qmark",value:V,output:k});continue}push({type:"qmark",value:V,output:C});continue}if(V==="!"){if(i.noextglob!==true&&G()==="("){if(G(2)!=="?"||!/[!=<:]/.test(G(3))){extglobOpen("negate",V);continue}}if(i.nonegate!==true&&j.index===0){negate();continue}}if(V==="+"){if(i.noextglob!==true&&G()==="("&&G(2)!=="?"){extglobOpen("plus",V);continue}if(z&&z.value==="("||i.regex===false){push({type:"plus",value:V,output:x});continue}if(z&&(z.type==="bracket"||z.type==="paren"||z.type==="brace")||j.parens>0){push({type:"plus",value:V});continue}push({type:"plus",value:x});continue}if(V==="@"){if(i.noextglob!==true&&G()==="("&&G(2)!=="?"){push({type:"at",extglob:true,value:V,output:""});continue}push({type:"text",value:V});continue}if(V!=="*"){if(V==="$"||V==="^"){V=`\\${V}`}const t=u.exec(remaining());if(t){V+=t[0];j.index+=t[0].length}push({type:"text",value:V});continue}if(z&&(z.type==="globstar"||z.star===true)){z.type="star";z.star=true;z.value+=V;z.output=M;j.backtrack=true;j.globstar=true;consume(V);continue}let r=remaining();if(i.noextglob!==true&&/^\([^?]/.test(r)){extglobOpen("star",V);continue}if(z.type==="star"){if(i.noglobstar===true){consume(V);continue}const o=z.prev;const a=o.prev;const c=o.type==="slash"||o.type==="bos";const l=a&&(a.type==="star"||a.type==="globstar");if(i.bash===true&&(!c||r[0]&&r[0]!=="/")){push({type:"star",value:V,output:""});continue}const u=j.braces>0&&(o.type==="comma"||o.type==="brace");const h=U.length&&(o.type==="pipe"||o.type==="paren");if(!c&&o.type!=="paren"&&!u&&!h){push({type:"star",value:V,output:""});continue}while(r.slice(0,3)==="/**"){const i=t[j.index+4];if(i&&i!=="/"){break}r=r.slice(3);consume("/**",3)}if(o.type==="bos"&&eos()){z.type="globstar";z.value+=V;z.output=globstar(i);j.output=z.output;j.globstar=true;consume(V);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&!l&&eos()){j.output=j.output.slice(0,-(o.output+z.output).length);o.output=`(?:${o.output}`;z.type="globstar";z.output=globstar(i)+(i.strictSlashes?")":"|$)");z.value+=V;j.globstar=true;j.output+=o.output+z.output;consume(V);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&r[0]==="/"){const t=r[1]!==void 0?"|$":"";j.output=j.output.slice(0,-(o.output+z.output).length);o.output=`(?:${o.output}`;z.type="globstar";z.output=`${globstar(i)}${R}|${R}${t})`;z.value+=V;j.output+=o.output+z.output;j.globstar=true;consume(V+q());push({type:"slash",value:"/",output:""});continue}if(o.type==="bos"&&r[0]==="/"){z.type="globstar";z.value+=V;z.output=`(?:^|${R}|${globstar(i)}${R})`;j.output=z.output;j.globstar=true;consume(V+q());push({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-z.output.length);z.type="globstar";z.output=globstar(i);z.value+=V;j.output+=z.output;j.globstar=true;consume(V);continue}const o={type:"star",value:V,output:M};if(i.bash===true){o.output=".*?";if(z.type==="bos"||z.type==="slash"){o.output=D+o.output}push(o);continue}if(z&&(z.type==="bracket"||z.type==="paren")&&i.regex===true){o.output=V;push(o);continue}if(j.index===j.start||z.type==="slash"||z.type==="dot"){if(z.type==="dot"){j.output+=T;z.output+=T}else if(i.dot===true){j.output+=A;z.output+=A}else{j.output+=D;z.output+=D}if(G()!=="*"){j.output+=P;z.output+=P}}push(o)}while(j.brackets>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));j.output=a.escapeLast(j.output,"[");decrement("brackets")}while(j.parens>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));j.output=a.escapeLast(j.output,"(");decrement("parens")}while(j.braces>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));j.output=a.escapeLast(j.output,"{");decrement("braces")}if(i.strictSlashes!==true&&(z.type==="star"||z.type==="bracket")){push({type:"maybe_slash",value:"",output:`${R}?`})}if(j.backtrack===true){j.output="";for(const t of j.tokens){j.output+=t.output!=null?t.output:t.value;if(t.suffix){j.output+=t.suffix}}}return j};parse.fastpaths=(t,r)=>{const i={...r};const l=typeof i.maxLength==="number"?Math.min(c,i.maxLength):c;const u=t.length;if(u>l){throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${l}`)}t=d[t]||t;const h=a.isWindows(r);const{DOT_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:y,DOTS_SLASH:g,NO_DOT:v,NO_DOTS:b,NO_DOTS_SLASH:w,STAR:E,START_ANCHOR:S}=o.globChars(h);const x=i.dot?b:v;const R=i.dot?w:v;const P=i.capture?"":"?:";const $={negated:false,prefix:""};let O=i.bash===true?".*?":E;if(i.capture){O=`(${O})`}const globstar=t=>{if(t.noglobstar===true)return O;return`(${P}(?:(?!${S}${t.dot?g:p}).)*?)`};const create=t=>{switch(t){case"*":return`${x}${y}${O}`;case".*":return`${p}${y}${O}`;case"*.*":return`${x}${O}${p}${y}${O}`;case"*/*":return`${x}${O}${m}${y}${R}${O}`;case"**":return x+globstar(i);case"**/*":return`(?:${x}${globstar(i)}${m})?${R}${y}${O}`;case"**/*.*":return`(?:${x}${globstar(i)}${m})?${R}${O}${p}${y}${O}`;case"**/.*":return`(?:${x}${globstar(i)}${m})?${p}${y}${O}`;default:{const r=/^(.*?)\.(\w+)$/.exec(t);if(!r)return;const i=create(r[1]);if(!i)return;return i+p+r[2]}}};const T=a.removePrefix(t,$);let A=create(T);if(A&&i.strictSlashes!==true){A+=`${m}?`}return A};t.exports=parse},7250:(t,r,i)=>{"use strict";const o=i(1017);const a=i(2964);const c=i(3632);const l=i(5502);const u=i(7798);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,r,i=false)=>{if(Array.isArray(t)){const o=t.map((t=>picomatch(t,r,i)));const arrayMatcher=t=>{for(const r of o){const i=r(t);if(i)return i}return false};return arrayMatcher}const o=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!o){throw new TypeError("Expected pattern to be a non-empty string")}const a=r||{};const c=l.isWindows(r);const u=o?picomatch.compileRe(t,r):picomatch.makeRe(t,r,false,true);const h=u.state;delete u.state;let isIgnored=()=>false;if(a.ignore){const t={...r,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(a.ignore,t,i)}const matcher=(i,o=false)=>{const{isMatch:l,match:d,output:p}=picomatch.test(i,u,r,{glob:t,posix:c});const m={glob:t,state:h,regex:u,posix:c,input:i,output:p,match:d,isMatch:l};if(typeof a.onResult==="function"){a.onResult(m)}if(l===false){m.isMatch=false;return o?m:false}if(isIgnored(i)){if(typeof a.onIgnore==="function"){a.onIgnore(m)}m.isMatch=false;return o?m:false}if(typeof a.onMatch==="function"){a.onMatch(m)}return o?m:true};if(i){matcher.state=h}return matcher};picomatch.test=(t,r,i,{glob:o,posix:a}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const c=i||{};const u=c.format||(a?l.toPosixSlashes:null);let h=t===o;let d=h&&u?u(t):t;if(h===false){d=u?u(t):t;h=d===o}if(h===false||c.capture===true){if(c.matchBase===true||c.basename===true){h=picomatch.matchBase(t,r,i,a)}else{h=r.exec(d)}}return{isMatch:Boolean(h),match:h,output:d}};picomatch.matchBase=(t,r,i,a=l.isWindows(i))=>{const c=r instanceof RegExp?r:picomatch.makeRe(r,i);return c.test(o.basename(t))};picomatch.isMatch=(t,r,i)=>picomatch(r,i)(t);picomatch.parse=(t,r)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,r)));return c(t,{...r,fastpaths:false})};picomatch.scan=(t,r)=>a(t,r);picomatch.compileRe=(t,r,i=false,o=false)=>{if(i===true){return t.output}const a=r||{};const c=a.contains?"":"^";const l=a.contains?"":"$";let u=`${c}(?:${t.output})${l}`;if(t&&t.negated===true){u=`^(?!${u}).*$`}const h=picomatch.toRegex(u,r);if(o===true){h.state=t}return h};picomatch.makeRe=(t,r={},i=false,o=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let a={negated:false,fastpaths:true};if(r.fastpaths!==false&&(t[0]==="."||t[0]==="*")){a.output=c.fastpaths(t,r)}if(!a.output){a=c(t,r)}return picomatch.compileRe(a,r,i,o)};picomatch.toRegex=(t,r)=>{try{const i=r||{};return new RegExp(t,i.flags||(i.nocase?"i":""))}catch(t){if(r&&r.debug===true)throw t;return/$^/}};picomatch.constants=u;t.exports=picomatch},2964:(t,r,i)=>{"use strict";const o=i(5502);const{CHAR_ASTERISK:a,CHAR_AT:c,CHAR_BACKWARD_SLASH:l,CHAR_COMMA:u,CHAR_DOT:h,CHAR_EXCLAMATION_MARK:d,CHAR_FORWARD_SLASH:p,CHAR_LEFT_CURLY_BRACE:m,CHAR_LEFT_PARENTHESES:y,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_PLUS:v,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:w,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:S}=i(7798);const isPathSeparator=t=>t===p||t===l;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,r)=>{const i=r||{};const x=t.length-1;const R=i.parts===true||i.scanToEnd===true;const P=[];const $=[];const O=[];let T=t;let A=-1;let C=0;let k=0;let I=false;let N=false;let D=false;let L=false;let M=false;let j=false;let U=false;let B=false;let H=false;let z=false;let V=0;let G;let q;let K={value:"",depth:0,isGlob:false};const eos=()=>A>=x;const peek=()=>T.charCodeAt(A+1);const advance=()=>{G=q;return T.charCodeAt(++A)};while(A<x){q=advance();let t;if(q===l){U=K.backslashes=true;q=advance();if(q===m){j=true}continue}if(j===true||q===m){V++;while(eos()!==true&&(q=advance())){if(q===l){U=K.backslashes=true;advance();continue}if(q===m){V++;continue}if(j!==true&&q===h&&(q=advance())===h){I=K.isBrace=true;D=K.isGlob=true;z=true;if(R===true){continue}break}if(j!==true&&q===u){I=K.isBrace=true;D=K.isGlob=true;z=true;if(R===true){continue}break}if(q===w){V--;if(V===0){j=false;I=K.isBrace=true;z=true;break}}}if(R===true){continue}break}if(q===p){P.push(A);$.push(K);K={value:"",depth:0,isGlob:false};if(z===true)continue;if(G===h&&A===C+1){C+=2;continue}k=A+1;continue}if(i.noext!==true){const t=q===v||q===c||q===a||q===b||q===d;if(t===true&&peek()===y){D=K.isGlob=true;L=K.isExtglob=true;z=true;if(q===d&&A===C){H=true}if(R===true){while(eos()!==true&&(q=advance())){if(q===l){U=K.backslashes=true;q=advance();continue}if(q===E){D=K.isGlob=true;z=true;break}}continue}break}}if(q===a){if(G===a)M=K.isGlobstar=true;D=K.isGlob=true;z=true;if(R===true){continue}break}if(q===b){D=K.isGlob=true;z=true;if(R===true){continue}break}if(q===g){while(eos()!==true&&(t=advance())){if(t===l){U=K.backslashes=true;advance();continue}if(t===S){N=K.isBracket=true;D=K.isGlob=true;z=true;break}}if(R===true){continue}break}if(i.nonegate!==true&&q===d&&A===C){B=K.negated=true;C++;continue}if(i.noparen!==true&&q===y){D=K.isGlob=true;if(R===true){while(eos()!==true&&(q=advance())){if(q===y){U=K.backslashes=true;q=advance();continue}if(q===E){z=true;break}}continue}break}if(D===true){z=true;if(R===true){continue}break}}if(i.noext===true){L=false;D=false}let W=T;let Y="";let Z="";if(C>0){Y=T.slice(0,C);T=T.slice(C);k-=C}if(W&&D===true&&k>0){W=T.slice(0,k);Z=T.slice(k)}else if(D===true){W="";Z=T}else{W=T}if(W&&W!==""&&W!=="/"&&W!==T){if(isPathSeparator(W.charCodeAt(W.length-1))){W=W.slice(0,-1)}}if(i.unescape===true){if(Z)Z=o.removeBackslashes(Z);if(W&&U===true){W=o.removeBackslashes(W)}}const X={prefix:Y,input:t,start:C,base:W,glob:Z,isBrace:I,isBracket:N,isGlob:D,isExtglob:L,isGlobstar:M,negated:B,negatedExtglob:H};if(i.tokens===true){X.maxDepth=0;if(!isPathSeparator(q)){$.push(K)}X.tokens=$}if(i.parts===true||i.tokens===true){let r;for(let o=0;o<P.length;o++){const a=r?r+1:C;const c=P[o];const l=t.slice(a,c);if(i.tokens){if(o===0&&C!==0){$[o].isPrefix=true;$[o].value=Y}else{$[o].value=l}depth($[o]);X.maxDepth+=$[o].depth}if(o!==0||l!==""){O.push(l)}r=c}if(r&&r+1<t.length){const o=t.slice(r+1);O.push(o);if(i.tokens){$[$.length-1].value=o;depth($[$.length-1]);X.maxDepth+=$[$.length-1].depth}}X.slashes=P;X.parts=O}return X};t.exports=scan},5502:(t,r,i)=>{"use strict";const o=i(1017);const a=process.platform==="win32";const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:h}=i(7798);r.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);r.hasRegexChars=t=>u.test(t);r.isRegexChar=t=>t.length===1&&r.hasRegexChars(t);r.escapeRegex=t=>t.replace(h,"\\$1");r.toPosixSlashes=t=>t.replace(c,"/");r.removeBackslashes=t=>t.replace(l,(t=>t==="\\"?"":t));r.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};r.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return a===true||o.sep==="\\"};r.escapeLast=(t,i,o)=>{const a=t.lastIndexOf(i,o);if(a===-1)return t;if(t[a-1]==="\\")return r.escapeLast(t,i,a-1);return`${t.slice(0,a)}\\${t.slice(a)}`};r.removePrefix=(t,r={})=>{let i=t;if(i.startsWith("./")){i=i.slice(2);r.prefix="./"}return i};r.wrapOutput=(t,r={},i={})=>{const o=i.contains?"":"^";const a=i.contains?"":"$";let c=`${o}(?:${t})${a}`;if(r.negated===true){c=`(?:^(?!${c}).*$)`}return c}},990:(t,r,i)=>{"use strict";const o=i(7517);t.exports=async({cwd:t}={})=>o("package.json",{cwd:t});t.exports.sync=({cwd:t}={})=>o.sync("package.json",{cwd:t})},7127:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},9009:(t,r,i)=>{"use strict";const o=i(7127);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},7574:(t,r,i)=>{"use strict";const o=i(7127);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},1411:(t,r,i)=>{"use strict";t.exports={DatePart:i(7127),Meridiem:i(4375),Day:i(9009),Hours:i(7574),Milliseconds:i(8284),Minutes:i(2168),Month:i(7001),Seconds:i(3228),Year:i(494)}},4375:(t,r,i)=>{"use strict";const o=i(7127);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},8284:(t,r,i)=>{"use strict";const o=i(7127);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},2168:(t,r,i)=>{"use strict";const o=i(7127);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},7001:(t,r,i)=>{"use strict";const o=i(7127);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},3228:(t,r,i)=>{"use strict";const o=i(7127);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},494:(t,r,i)=>{"use strict";const o=i(7127);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},6074:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const c=i(1407),l=c.erase,u=c.cursor;const h=i(4115),d=h.style,p=h.clear,m=h.figures,y=h.wrap,g=h.entriesToDisplay;const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=d.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=p("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}complete(t){var r=this;return _asyncToGenerator((function*(){const i=r.completing=r.suggest(r.input,r.choices);const o=yield i;if(r.completing!==i)return;r.suggestions=o.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));r.completing=false;const a=Math.max(o.length-1,0);r.moveSelect(Math.min(a,r.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let c;let l=i?m.arrowUp:a?m.arrowDown:" ";let u=r?o.cyan().underline(t.title):t.title;l=(r?o.cyan(m.pointer)+" ":" ")+l;if(t.description){c=` - ${t.description}`;if(l.length+u.length+c.length>=this.out.columns||t.description.split(/\r?\n/).length>1){c="\n"+y(t.description,{margin:3,width:this.out.columns})}}return l+" "+u+o.gray(c||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(p(this.outputText,this.out.columns));super.render();let t=g(this.select,this.choices.length,this.limit),r=t.startIndex,i=t.endIndex;this.outputText=[d.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),d.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const t=this.suggestions.slice(r,i).map(((t,o)=>this.renderOption(t,this.select===o+r,o===0&&r>0,o+r===i-1&&i<this.choices.length))).join("\n");this.outputText+=`\n`+(t||o.gray(this.fallback.title))}this.out.write(l.line+u.to(0)+this.outputText)}}t.exports=AutocompletePrompt},555:(t,r,i)=>{"use strict";const o=i(7836);const a=i(1407),c=a.cursor;const l=i(3740);const u=i(4115),h=u.clear,d=u.style,p=u.figures;class AutocompleteMultiselectPrompt extends l{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=h("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${p.arrowUp}/${p.arrowDown}: Highlight option\n ${p.arrowLeft}/${p.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(p.radioOn):p.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);super.render();let t=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},9205:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const c=i(4115),l=c.style,u=c.clear;const h=i(1407),d=h.erase,p=h.cursor;class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(d.line+p.to(0)+this.outputText)}}t.exports=ConfirmPrompt},4244:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const c=i(4115),l=c.style,u=c.clear,h=c.figures;const d=i(1407),p=d.erase,m=d.cursor;const y=i(1411),g=y.DatePart,v=y.Meridiem,b=y.Day,w=y.Hours,E=y.Milliseconds,S=y.Minutes,x=y.Month,R=y.Seconds,P=y.Year;const $=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const O={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new b(t),3:t=>new x(t),4:t=>new P(t),5:t=>new v(t),6:t=>new w(t),7:t=>new S(t),8:t=>new R(t),9:t=>new E(t)};const T={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(T,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=u("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=$.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in O?O[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof g)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r==="string"){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof g)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(p.line+m.to(0)+this.outputText)}}t.exports=DatePrompt},8301:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(9548),SelectPrompt:i(4319),TogglePrompt:i(8999),DatePrompt:i(4244),NumberPrompt:i(6460),MultiselectPrompt:i(3740),AutocompletePrompt:i(6074),AutocompleteMultiselectPrompt:i(555),ConfirmPrompt:i(9205)}},3740:(t,r,i)=>{"use strict";const o=i(7836);const a=i(1407),c=a.cursor;const l=i(4458);const u=i(4115),h=u.clear,d=u.figures,p=u.style,m=u.wrap,y=u.entriesToDisplay;class MultiselectPrompt extends l{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=h("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${d.arrowUp}/${d.arrowDown}: Highlight option\n`+` ${d.arrowLeft}/${d.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const c=(r.selected?o.green(d.radioOn):d.radioOff)+" "+a+" ";let l,u;if(r.disabled){l=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{l=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){u=` - ${r.description}`;if(c.length+l.length+u.length>=this.out.columns||r.description.split(/\r?\n/).length>1){u="\n"+m(r.description,{margin:c.length,width:this.out.columns})}}}return c+l+o.gray(u||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let r=y(this.cursor,t.length,this.optionsPerPage),i=r.startIndex,a=r.endIndex;let c,l=[];for(let r=i;r<a;r++){if(r===i&&i>0){c=d.arrowUp}else if(r===a-1&&a<t.length){c=d.arrowDown}else{c=" "}l.push(this.renderOption(this.cursor,t[r],r,c))}return"\n"+l.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);super.render();let t=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=MultiselectPrompt},6460:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const c=i(1407),l=c.cursor,u=c.erase;const h=i(4115),d=h.style,p=h.figures,m=h.clear,y=h.lines;const g=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=d.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||g.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let r=t.value;t.value=r!==``?r:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(y(this.outputError,this.out.columns)-1)+m(this.outputError,this.out.columns));this.out.write(m(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:p.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(u.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore)}}t.exports=NumberPrompt},4458:(t,r,i)=>{"use strict";const o=i(4521);const a=i(4115),c=a.action;const l=i(2361);const u=i(1407),h=u.beep,d=u.cursor;const p=i(7836);class Prompt extends l{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=c(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(d.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(p);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},4319:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const c=i(4115),l=c.style,u=c.clear,h=c.figures,d=c.wrap,p=c.entriesToDisplay;const m=i(1407),y=m.cursor;class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=u("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(y.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();let t=p(this.cursor,this.choices.length,this.optionsPerPage),r=t.startIndex,i=t.endIndex;this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let t=r;t<i;t++){let a,c,l="",u=this.choices[t];if(t===r&&r>0){c=h.arrowUp}else if(t===i-1&&i<this.choices.length){c=h.arrowDown}else{c=" "}if(u.disabled){a=this.cursor===t?o.gray().underline(u.title):o.strikethrough().gray(u.title);c=(this.cursor===t?o.bold().gray(h.pointer)+" ":" ")+c}else{a=this.cursor===t?o.cyan().underline(u.title):u.title;c=(this.cursor===t?o.cyan(h.pointer)+" ":" ")+c;if(u.description&&this.cursor===t){l=` - ${u.description}`;if(c.length+a.length+l.length>=this.out.columns||u.description.split(/\r?\n/).length>1){l="\n"+d(u.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${c} ${a}${o.gray(l)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},9548:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const c=i(1407),l=c.erase,u=c.cursor;const h=i(4115),d=h.style,p=h.clear,m=h.lines,y=h.figures;class TextPrompt extends a{constructor(t={}){super(t);this.transform=d.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=p(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;t.cursorOffset=0;t.cursor=t.rendered.length;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(m(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns));this.out.write(p(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":y.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(l.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore+u.move(this.cursorOffset,0))}}t.exports=TextPrompt},8999:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const c=i(4115),l=c.style,u=c.clear;const h=i(1407),d=h.cursor,p=h.erase;class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(p.line+d.to(0)+this.outputText)}}t.exports=TogglePrompt},2024:(t,r,i)=>{"use strict";function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);if(r){o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))}i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){ownKeys(Object(i),true).forEach((function(r){_defineProperty(t,r,i[r])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(i))}else{ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}}return t}function _defineProperty(t,r,i){if(r in t){Object.defineProperty(t,r,{value:i,enumerable:true,configurable:true,writable:true})}else{t[r]=i}return t}function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=true,l=false,u;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=true;u=t},f:function f(){try{if(!c&&i.return!=null)i.return()}finally{if(l)throw u}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,c,l){try{var u=t[c](l);var h=u.value}catch(t){i(t);return}if(u.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(8422);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const c={};const l=prompt._override||{};t=[].concat(t);let u,h,d,p,m,y;const g=function(){var t=_asyncToGenerator((function*(t,r,i=false){if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?yield t.format(r,c):r}));return function getFormattedAnswer(r,i){return t.apply(this,arguments)}}();var v=_createForOfIteratorHelper(t),b;try{for(v.s();!(b=v.n()).done;){h=b.value;var w=h;p=w.name;m=w.type;if(typeof m==="function"){m=yield m(u,_objectSpread({},c),h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?yield r(u,_objectSpread({},c),y):r}y=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}var E=h;p=E.name;m=E.type;if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(l[h.name]!==undefined){u=yield g(h,l[h.name]);if(u!==undefined){c[p]=u;continue}}try{u=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):yield o[m](h);c[p]=u=yield g(h,u,true);d=yield r(h,u,c)}catch(t){d=!(yield i(h,c))}if(d)return c}}catch(t){v.e(t)}finally{v.f()}return c}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},8422:(t,r,i)=>{"use strict";const o=r;const a=i(8301);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,c)=>{const l=new a[t](r);const u=i.onAbort||noop;const h=i.onSubmit||noop;const d=i.onExit||noop;l.on("state",r.onState||noop);l.on("submit",(t=>o(h(t))));l.on("exit",(t=>o(d(t))));l.on("abort",(t=>c(u(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},4199:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},1817:(t,r,i)=>{"use strict";function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=true,l=false,u;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();c=t.done;return t},e:function e(t){l=true;u=t},f:function f(){try{if(!c&&i.return!=null)i.return()}finally{if(l)throw u}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}const o=i(4056);const a=i(1407),c=a.erase,l=a.cursor;const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return c.line+l.to(0);let i=0;const o=t.split(/\r?\n/);var a=_createForOfIteratorHelper(o),u;try{for(a.s();!(u=a.n()).done;){let t=u.value;i+=1+Math.floor(Math.max(width(t)-1,0)/r)}}catch(t){a.e(t)}finally{a.f()}return c.lines(i)}},308:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},8111:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},4115:(t,r,i)=>{"use strict";t.exports={action:i(4199),clear:i(1817),style:i(1640),strip:i(4056),figures:i(8111),lines:i(8886),wrap:i(2110),entriesToDisplay:i(308)}},8886:(t,r,i)=>{"use strict";const o=i(4056);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},4056:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},1640:(t,r,i)=>{"use strict";const o=i(7836);const a=i(8111);const c=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>c[t]||c.default;const l=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?l.aborted:i?l.exited:t?l.done:l.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:c,render:render,symbols:l,symbol:symbol,delimiter:delimiter,item:item}},2110:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},5713:(t,r,i)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let r=0,i=process.versions.node.split(".").map(Number);for(;r<t.length;r++){if(i[r]>t[r])return false;if(t[r]>i[r])return true}return false}t.exports=isNodeLT("8.6.0")?i(2024):i(5061)},8701:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5998:(t,r,i)=>{"use strict";const o=i(8701);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},9780:(t,r,i)=>{"use strict";const o=i(8701);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},399:(t,r,i)=>{"use strict";t.exports={DatePart:i(8701),Meridiem:i(3385),Day:i(5998),Hours:i(9780),Milliseconds:i(6858),Minutes:i(8616),Month:i(1325),Seconds:i(817),Year:i(5406)}},3385:(t,r,i)=>{"use strict";const o=i(8701);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},6858:(t,r,i)=>{"use strict";const o=i(8701);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},8616:(t,r,i)=>{"use strict";const o=i(8701);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},1325:(t,r,i)=>{"use strict";const o=i(8701);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},817:(t,r,i)=>{"use strict";const o=i(8701);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},5406:(t,r,i)=>{"use strict";const o=i(8701);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},5533:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{erase:c,cursor:l}=i(1407);const{style:u,clear:h,figures:d,wrap:p,entriesToDisplay:m}=i(327);const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=u.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=h("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}async complete(t){const r=this.completing=this.suggest(this.input,this.choices);const i=await r;if(this.completing!==r)return;this.suggestions=i.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));this.completing=false;const o=Math.max(i.length-1,0);this.moveSelect(Math.min(o,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let c;let l=i?d.arrowUp:a?d.arrowDown:" ";let u=r?o.cyan().underline(t.title):t.title;l=(r?o.cyan(d.pointer)+" ":" ")+l;if(t.description){c=` - ${t.description}`;if(l.length+u.length+c.length>=this.out.columns||t.description.split(/\r?\n/).length>1){c="\n"+p(t.description,{margin:3,width:this.out.columns})}}return l+" "+u+o.gray(c||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=m(this.select,this.choices.length,this.limit);this.outputText=[u.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),u.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const i=this.suggestions.slice(t,r).map(((i,o)=>this.renderOption(i,this.select===o+t,o===0&&t>0,o+t===r-1&&r<this.choices.length))).join("\n");this.outputText+=`\n`+(i||o.gray(this.fallback.title))}this.out.write(c.line+l.to(0)+this.outputText)}}t.exports=AutocompletePrompt},5474:(t,r,i)=>{"use strict";const o=i(7836);const{cursor:a}=i(1407);const c=i(3441);const{clear:l,style:u,figures:h}=i(327);class AutocompleteMultiselectPrompt extends c{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=l("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${h.arrowUp}/${h.arrowDown}: Highlight option\n ${h.arrowLeft}/${h.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(h.radioOn):h.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=l(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},252:(t,r,i)=>{const o=i(7836);const a=i(9850);const{style:c,clear:l}=i(327);const{erase:u,cursor:h}=i(1407);class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(u.line+h.to(0)+this.outputText)}}t.exports=ConfirmPrompt},3330:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{style:c,clear:l,figures:u}=i(327);const{erase:h,cursor:d}=i(1407);const{DatePart:p,Meridiem:m,Day:y,Hours:g,Milliseconds:v,Minutes:b,Month:w,Seconds:E,Year:S}=i(399);const x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const R={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new y(t),3:t=>new w(t),4:t=>new S(t),5:t=>new m(t),6:t=>new g(t),7:t=>new b(t),8:t=>new E(t),9:t=>new v(t)};const P={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(P,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=l("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=x.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in R?R[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof p)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof p)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:u.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(h.line+d.to(0)+this.outputText)}}t.exports=DatePrompt},697:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(6589),SelectPrompt:i(7682),TogglePrompt:i(4654),DatePrompt:i(3330),NumberPrompt:i(3281),MultiselectPrompt:i(3441),AutocompletePrompt:i(5533),AutocompleteMultiselectPrompt:i(5474),ConfirmPrompt:i(252)}},3441:(t,r,i)=>{"use strict";const o=i(7836);const{cursor:a}=i(1407);const c=i(9850);const{clear:l,figures:u,style:h,wrap:d,entriesToDisplay:p}=i(327);class MultiselectPrompt extends c{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=l("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${u.arrowUp}/${u.arrowDown}: Highlight option\n`+` ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const c=(r.selected?o.green(u.radioOn):u.radioOff)+" "+a+" ";let l,h;if(r.disabled){l=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{l=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){h=` - ${r.description}`;if(c.length+l.length+h.length>=this.out.columns||r.description.split(/\r?\n/).length>1){h="\n"+d(r.description,{margin:c.length,width:this.out.columns})}}}return c+l+o.gray(h||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let{startIndex:r,endIndex:i}=p(this.cursor,t.length,this.optionsPerPage);let a,c=[];for(let o=r;o<i;o++){if(o===r&&r>0){a=u.arrowUp}else if(o===i-1&&i<t.length){a=u.arrowDown}else{a=" "}c.push(this.renderOption(this.cursor,t[o],o,a))}return"\n"+c.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[h.symbol(this.done,this.aborted),o.bold(this.msg),h.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=l(t,this.out.columns)}}t.exports=MultiselectPrompt},3281:(t,r,i)=>{const o=i(7836);const a=i(9850);const{cursor:c,erase:l}=i(1407);const{style:u,figures:h,clear:d,lines:p}=i(327);const m=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=u.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||m.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(p(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(l.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore)}}t.exports=NumberPrompt},9850:(t,r,i)=>{"use strict";const o=i(4521);const{action:a}=i(327);const c=i(2361);const{beep:l,cursor:u}=i(1407);const h=i(7836);class Prompt extends c{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=a(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(u.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(l)}render(){this.onRender(h);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},7682:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{style:c,clear:l,figures:u,wrap:h,entriesToDisplay:d}=i(327);const{cursor:p}=i(1407);class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=l("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=d(this.cursor,this.choices.length,this.optionsPerPage);this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let i=t;i<r;i++){let a,c,l="",d=this.choices[i];if(i===t&&t>0){c=u.arrowUp}else if(i===r-1&&r<this.choices.length){c=u.arrowDown}else{c=" "}if(d.disabled){a=this.cursor===i?o.gray().underline(d.title):o.strikethrough().gray(d.title);c=(this.cursor===i?o.bold().gray(u.pointer)+" ":" ")+c}else{a=this.cursor===i?o.cyan().underline(d.title):d.title;c=(this.cursor===i?o.cyan(u.pointer)+" ":" ")+c;if(d.description&&this.cursor===i){l=` - ${d.description}`;if(c.length+a.length+l.length>=this.out.columns||d.description.split(/\r?\n/).length>1){l="\n"+h(d.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${c} ${a}${o.gray(l)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},6589:(t,r,i)=>{const o=i(7836);const a=i(9850);const{erase:c,cursor:l}=i(1407);const{style:u,clear:h,lines:d,figures:p}=i(327);class TextPrompt extends a{constructor(t={}){super(t);this.transform=u.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=h(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;this.cursorOffset=0;this.cursor=this.rendered.length;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(d(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns));this.out.write(h(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":p.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(c.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore+l.move(this.cursorOffset,0))}}t.exports=TextPrompt},4654:(t,r,i)=>{const o=i(7836);const a=i(9850);const{style:c,clear:l}=i(327);const{cursor:u,erase:h}=i(1407);class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(h.line+u.to(0)+this.outputText)}}t.exports=TogglePrompt},5061:(t,r,i)=>{"use strict";const o=i(4542);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};async function prompt(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const c={};const l=prompt._override||{};t=[].concat(t);let u,h,d,p,m,y;const getFormattedAnswer=async(t,r,i=false)=>{if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?await t.format(r,c):r};for(h of t){({name:p,type:m}=h);if(typeof m==="function"){m=await m(u,{...c},h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?await r(u,{...c},y):r}y=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}({name:p,type:m}=h);if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(l[h.name]!==undefined){u=await getFormattedAnswer(h,l[h.name]);if(u!==undefined){c[p]=u;continue}}try{u=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):await o[m](h);c[p]=u=await getFormattedAnswer(h,u,true);d=await r(h,u,c)}catch(t){d=!await i(h,c)}if(d)return c}return c}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},4542:(t,r,i)=>{"use strict";const o=r;const a=i(697);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,c)=>{const l=new a[t](r);const u=i.onAbort||noop;const h=i.onSubmit||noop;const d=i.onExit||noop;l.on("state",r.onState||noop);l.on("submit",(t=>o(h(t))));l.on("exit",(t=>o(d(t))));l.on("abort",(t=>c(u(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},7612:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},1335:(t,r,i)=>{"use strict";const o=i(8409);const{erase:a,cursor:c}=i(1407);const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return a.line+c.to(0);let i=0;const o=t.split(/\r?\n/);for(let t of o){i+=1+Math.floor(Math.max(width(t)-1,0)/r)}return a.lines(i)}},6606:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},5878:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},327:(t,r,i)=>{"use strict";t.exports={action:i(7612),clear:i(1335),style:i(3165),strip:i(8409),figures:i(5878),lines:i(2890),wrap:i(1669),entriesToDisplay:i(6606)}},2890:(t,r,i)=>{"use strict";const o=i(8409);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},8409:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},3165:(t,r,i)=>{"use strict";const o=i(7836);const a=i(5878);const c=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>c[t]||c.default;const l=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?l.aborted:i?l.exited:t?l.done:l.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:c,render:render,symbols:l,symbol:symbol,delimiter:delimiter,item:item}},1669:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},592:t=>{
|
|
61
61
|
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
62
|
-
let t
|
|
62
|
+
let r;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(r||(r=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},4446:(t,r,i)=>{var o=i(3574);var a=i(1017).join;var c=i(7360);var l="/etc";var u=process.platform==="win32";var h=u?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,r,d,p){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!d)d=i(1254)(process.argv.slice(2));r=("string"===typeof r?o.json(r):r)||{};p=p||o.parse;var m=o.env(t+"_");var y=[r];var g=[];function addConfigFile(t){if(g.indexOf(t)>=0)return;var r=o.file(t);if(r){y.push(p(r));g.push(t)}}if(!u)[a(l,t,"config"),a(l,t+"rc")].forEach(addConfigFile);if(h)[a(h,".config",t,"config"),a(h,".config",t),a(h,"."+t,"config"),a(h,"."+t+"rc")].forEach(addConfigFile);addConfigFile(o.find("."+t+"rc"));if(m.config)addConfigFile(m.config);if(d.config)addConfigFile(d.config);return c.apply(null,y.concat([m,d,g.length?{configs:g,config:g[g.length-1]}:undefined]))}},3574:(t,r,i)=>{"use strict";var o=i(7147);var a=i(7036);var c=i(1017);var l=i(2251);var u=r.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(l(t));return a.parse(t)};var h=r.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var r in t)if("string"!==typeof t[r])return;var i=c.join.apply(null,t);var a;try{return o.readFileSync(i,"utf-8")}catch(t){return}};var d=r.json=function(){var t=h.apply(null,arguments);return t?u(t):null};var p=r.env=function(t,r){r=r||process.env;var i={};var o=t.length;for(var a in r){if(a.toLowerCase().indexOf(t.toLowerCase())===0){var c=a.substring(o).split("__");var l;while((l=c.indexOf(""))>-1){c.splice(l,1)}var u=i;c.forEach((function _buildSubObj(t,i){if(!t||typeof u!=="object")return;if(i===c.length-1)u[t]=r[a];if(u[t]===undefined)u[t]={};u=u[t]}))}}return i};var m=r.find=function(){var t=c.join.apply(null,[].slice.call(arguments));function find(t,r){var i=c.join(t,r);try{o.statSync(i);return i}catch(i){if(c.dirname(t)!==t)return find(c.dirname(t),r)}}return find(process.cwd(),t)}},1913:(t,r,i)=>{const o=i(6911).Buffer;function decodeBase64(t){return o.from(t,"base64").toString("utf8")}function encodeBase64(t){return o.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1281:(t,r,i)=>{var o=i(7310);var a=i(1913);var c=a.decodeBase64;var l=a.encodeBase64;var u=":_authToken";var h=":username";var d=":_password";t.exports=function(){var t;var r;if(arguments.length>=2){t=arguments[0];r=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{r=arguments[0]}r=r||{};r.npmrc=r.npmrc||i(4446)("npm",{registry:"https://registry.npmjs.org/"});t=t||r.npmrc.registry;return getRegistryAuthInfo(t,r)||getLegacyAuthInfo(r.npmrc)};function getRegistryAuthInfo(t,r){var i=o.parse(t,false,true);var a;while(a!=="/"&&i.pathname!==a){a=i.pathname||"/";var c="//"+i.host+a.replace(/\/$/,"");var l=getAuthInfoForUrl(c,r.npmrc);if(l){return l}if(!r.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(o.resolve(t,"."),r)}i.pathname=o.resolve(normalizePath(a),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(t._auth){return{token:t._auth,type:"Basic"}}return undefined}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,r){var i=getBearerToken(r[t+u]||r[t+"/"+u]);if(i){return i}var o=r[t+h]||r[t+"/"+h];var a=r[t+d]||r[t+"/"+d];var c=getTokenForUsernameAndPassword(o,a);if(c){return c}return undefined}function getBearerToken(t){if(!t){return undefined}var r=t.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]}));return{token:r,type:"Bearer"}}function getTokenForUsernameAndPassword(t,r){if(!t||!r){return undefined}var i=c(r.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]})));var o=l(t+":"+i);return{token:o,type:"Basic",password:i,username:t}}},9074:(t,r,i)=>{"use strict";t.exports=function(t){var r=i(4446)("npm",{registry:"https://registry.npmjs.org/"});var o=r[t+":registry"]||r.registry;return o.slice(-1)==="/"?o:o+"/"}},6862:(t,r,i)=>{t.exports=i(6097)},6097:(t,r,i)=>{var o=i(6848);r.operation=function(t){var i=r.timeouts(t);return new o(i,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};r.timeouts=function(t){if(t instanceof Array){return[].concat(t)}var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var i in t){r[i]=t[i]}if(r.minTimeout>r.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var o=[];for(var a=0;a<r.retries;a++){o.push(this.createTimeout(a,r))}if(t&&t.forever&&!o.length){o.push(this.createTimeout(a,r))}o.sort((function(t,r){return t-r}));return o};r.createTimeout=function(t,r){var i=r.randomize?Math.random()+1:1;var o=Math.round(i*r.minTimeout*Math.pow(r.factor,t));o=Math.min(o,r.maxTimeout);return o};r.wrap=function(t,i,o){if(i instanceof Array){o=i;i=null}if(!o){o=[];for(var a in t){if(typeof t[a]==="function"){o.push(a)}}}for(var c=0;c<o.length;c++){var l=o[c];var u=t[l];t[l]=function retryWrapper(o){var a=r.operation(i);var c=Array.prototype.slice.call(arguments,1);var l=c.pop();c.push((function(t){if(a.retry(t)){return}if(t){arguments[0]=a.mainError()}l.apply(this,arguments)}));a.attempt((function(){o.apply(t,c)}))}.bind(t,u);t[l].options=i}}},6848:t=>{function RetryOperation(t,r){if(typeof r==="boolean"){r={forever:r}}this._originalTimeouts=JSON.parse(JSON.stringify(t));this._timeouts=t;this._options=r||{};this._maxRetryTime=r&&r.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}t.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(t){if(this._timeout){clearTimeout(this._timeout)}if(!t){return false}var r=(new Date).getTime();if(t&&r-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(t);var i=this._timeouts.shift();if(i===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);i=this._timeouts.shift()}else{return false}}var o=this;var a=setTimeout((function(){o._attempts++;if(o._operationTimeoutCb){o._timeout=setTimeout((function(){o._operationTimeoutCb(o._attempts)}),o._operationTimeout);if(o._options.unref){o._timeout.unref()}}o._fn(o._attempts)}),i);if(this._options.unref){a.unref()}return true};RetryOperation.prototype.attempt=function(t,r){this._fn=t;if(r){if(r.timeout){this._operationTimeout=r.timeout}if(r.cb){this._operationTimeoutCb=r.cb}}var i=this;if(this._operationTimeoutCb){this._timeout=setTimeout((function(){i._operationTimeoutCb()}),i._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated");this.attempt(t)};RetryOperation.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated");this.attempt(t)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var t={};var r=null;var i=0;for(var o=0;o<this._errors.length;o++){var a=this._errors[o];var c=a.message;var l=(t[c]||0)+1;t[c]=l;if(l>=i){r=a;i=l}}return r}},7327:t=>{"use strict";function reusify(t){var r=new t;var i=r;function get(){var o=r;if(o.next){r=o.next}else{r=new t;i=r}o.next=null;return o}function release(t){i.next=t;i=t}return{get:get,release:release}}t.exports=reusify},4796:(t,r,i)=>{
|
|
63
63
|
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
64
|
-
|
|
64
|
+
t.exports=runParallel;const o=i(592);function runParallel(t,r){let i,a,c;let l=true;if(Array.isArray(t)){i=[];a=t.length}else{c=Object.keys(t);i={};a=c.length}function done(t){function end(){if(r)r(t,i);r=null}if(l)o(end);else end()}function each(t,r,o){i[t]=o;if(--a===0||r){done(r)}}if(!a){done(null)}else if(c){c.forEach((function(r){t[r]((function(t,i){each(r,t,i)}))}))}else{t.forEach((function(t,r){t((function(t,i){each(r,t,i)}))}))}l=false}},6911:(t,r,i)=>{
|
|
65
65
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
66
|
-
var s=r(4300);var n=s.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=s}else{copyProps(s,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=n(e);if(t!==undefined){if(typeof r==="string"){s.fill(t,r)}else{s.fill(t)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},2485:(e,t,r)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}c("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=s}else{this.semver=new l(r[2],this.options.loose)}}toString(){return this.value}test(e){c("Comparator.test",e,this.options.loose);if(this.semver===s||e===s){return true}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new u(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new u(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const o=a(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const c=a(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||s||n&&i||o||c}}e.exports=Comparator;const n=r(3789);const{re:i,t:o}=r(4351);const a=r(2674);const c=r(5747);const l=r(7825);const u=r(7058)},7058:(e,t,r)=>{class Range{constructor(e,t){t=i(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof o){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const s=n.get(r);if(s){return s}const i=this.options.loose;const c=i?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(c,hyphenReplace(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(l[u.COMPARATORTRIM],h);a("comparator trim",e);e=e.replace(l[u.TILDETRIM],d);e=e.replace(l[u.CARETTRIM],p);e=e.split(/\s+/).join(" ");let m=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(i){m=m.filter((e=>{a("loose invalid filter",e,this.options);return!!e.match(l[u.COMPARATORLOOSE])}))}a("range list",m);const y=new Map;const g=m.map((e=>new o(e,this.options)));for(const e of g){if(isNullSet(e)){return[e]}y.set(e.value,e)}if(y.size>1&&y.has("")){y.delete("")}const v=[...y.values()];n.set(r,v);return v}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}for(let t=0;t<this.set.length;t++){if(testSet(this.set[t],e,this.options)){return true}}return false}}e.exports=Range;const s=r(8443);const n=new s({max:1e3});const i=r(3789);const o=r(2485);const a=r(5747);const c=r(7825);const{re:l,t:u,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:p}=r(4351);const isNullSet=e=>e.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const s=e.slice();let n=s.pop();while(r&&s.length){r=s.every((e=>n.intersects(e,t)));n=s.pop()}return r};const parseComparator=(e,t)=>{a("comp",e,t);e=replaceCarets(e,t);a("caret",e);e=replaceTildes(e,t);a("tildes",e);e=replaceXRanges(e,t);a("xrange",e);e=replaceStars(e,t);a("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,((t,r,s,n,i)=>{a("tilde",e,t,r,s,n,i);let o;if(isX(r)){o=""}else if(isX(s)){o=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`}else if(i){a("replaceTilde pr",i);o=`>=${r}.${s}.${n}-${i} <${r}.${+s+1}.0-0`}else{o=`>=${r}.${s}.${n} <${r}.${+s+1}.0-0`}a("tilde return",o);return o}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{a("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET];const s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,i,o)=>{a("caret",e,t,r,n,i,o);let c;if(isX(r)){c=""}else if(isX(n)){c=`>=${r}.0.0${s} <${+r+1}.0.0-0`}else if(isX(i)){if(r==="0"){c=`>=${r}.${n}.0${s} <${r}.${+n+1}.0-0`}else{c=`>=${r}.${n}.0${s} <${+r+1}.0.0-0`}}else if(o){a("replaceCaret pr",o);if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${i}-${o} <${r}.${n}.${+i+1}-0`}else{c=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${i}-${o} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${i}${s} <${r}.${n}.${+i+1}-0`}else{c=`>=${r}.${n}.${i}${s} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${i} <${+r+1}.0.0-0`}}a("caret return",c);return c}))};const replaceXRanges=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,((r,s,n,i,o,c)=>{a("xRange",e,r,s,n,i,o,c);const l=isX(n);const u=l||isX(i);const h=u||isX(o);const d=h;if(s==="="&&d){s=""}c=t.includePrerelease?"-0":"";if(l){if(s===">"||s==="<"){r="<0.0.0-0"}else{r="*"}}else if(s&&d){if(u){i=0}o=0;if(s===">"){s=">=";if(u){n=+n+1;i=0;o=0}else{i=+i+1;o=0}}else if(s==="<="){s="<";if(u){n=+n+1}else{i=+i+1}}if(s==="<"){c="-0"}r=`${s+n}.${i}.${o}${c}`}else if(u){r=`>=${n}.0.0${c} <${+n+1}.0.0-0`}else if(h){r=`>=${n}.${i}.0${c} <${n}.${+i+1}.0-0`}a("xRange return",r);return r}))};const replaceStars=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(l[u.STAR],"")};const replaceGTE0=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")};const hyphenReplace=e=>(t,r,s,n,i,o,a,c,l,u,h,d,p)=>{if(isX(s)){r=""}else if(isX(n)){r=`>=${s}.0.0${e?"-0":""}`}else if(isX(i)){r=`>=${s}.${n}.0${e?"-0":""}`}else if(o){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(l)){c=""}else if(isX(u)){c=`<${+l+1}.0.0-0`}else if(isX(h)){c=`<${l}.${+u+1}.0-0`}else if(d){c=`<=${l}.${u}.${h}-${d}`}else if(e){c=`<${l}.${u}.${+h+1}-0`}else{c=`<=${c}`}return`${r} ${c}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r<e.length;r++){if(!e[r].test(t)){return false}}if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++){a(e[r].semver);if(e[r].semver===o.ANY){continue}if(e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}},7825:(e,t,r)=>{const s=r(5747);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=r(8147);const{re:o,t:a}=r(4351);const c=r(3789);const{compareIdentifiers:l}=r(8307);class SemVer{constructor(e,t){t=c(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i){return t}}return e}))}this.build=r[5]?r[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(e){s("SemVer.compare",this.version,this.options,e);if(!(e instanceof SemVer)){if(typeof e==="string"&&e===this.version){return 0}e=new SemVer(e,this.options)}if(e.version===this.version){return 0}return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}return l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}if(this.prerelease.length&&!e.prerelease.length){return-1}else if(!this.prerelease.length&&e.prerelease.length){return 1}else if(!this.prerelease.length&&!e.prerelease.length){return 0}let t=0;do{const r=this.prerelease[t];const n=e.prerelease[t];s("prerelease compare",t,r,n);if(r===undefined&&n===undefined){return 0}else if(n===undefined){return 1}else if(r===undefined){return-1}else if(r===n){continue}else{return l(r,n)}}while(++t)}compareBuild(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}let t=0;do{const r=this.build[t];const n=e.build[t];s("prerelease compare",t,r,n);if(r===undefined&&n===undefined){return 0}else if(n===undefined){return 1}else if(r===undefined){return-1}else if(r===n){continue}else{return l(r,n)}}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",t);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",t);break;case"prepatch":this.prerelease.length=0;this.inc("patch",t);this.inc("pre",t);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",t)}this.inc("pre",t);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{let e=this.prerelease.length;while(--e>=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(l(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},6869:(e,t,r)=>{const s=r(4770);const clean=(e,t)=>{const r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},2674:(e,t,r)=>{const s=r(112);const n=r(4182);const i=r(2062);const o=r(6503);const a=r(1004);const c=r(3285);const cmp=(e,t,r,l)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e===r;case"!==":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e!==r;case"":case"=":case"==":return s(e,r,l);case"!=":return n(e,r,l);case">":return i(e,r,l);case">=":return o(e,r,l);case"<":return a(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},9608:(e,t,r)=>{const s=r(7825);const n=r(4770);const{re:i,t:o}=r(4351);const coerce=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(i[o.COERCE])}else{let t;while((t=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}i[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}i[o.COERCERTL].lastIndex=-1}if(r===null){return null}return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},9874:(e,t,r)=>{const s=r(7825);const compareBuild=(e,t,r)=>{const n=new s(e,r);const i=new s(t,r);return n.compare(i)||n.compareBuild(i)};e.exports=compareBuild},8325:(e,t,r)=>{const s=r(1878);const compareLoose=(e,t)=>s(e,t,true);e.exports=compareLoose},1878:(e,t,r)=>{const s=r(7825);const compare=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=compare},2464:(e,t,r)=>{const s=r(4770);const n=r(112);const diff=(e,t)=>{if(n(e,t)){return null}else{const r=s(e);const n=s(t);const i=r.prerelease.length||n.prerelease.length;const o=i?"pre":"";const a=i?"prerelease":"";for(const e in r){if(e==="major"||e==="minor"||e==="patch"){if(r[e]!==n[e]){return o+e}}}return a}};e.exports=diff},112:(e,t,r)=>{const s=r(1878);const eq=(e,t,r)=>s(e,t,r)===0;e.exports=eq},2062:(e,t,r)=>{const s=r(1878);const gt=(e,t,r)=>s(e,t,r)>0;e.exports=gt},6503:(e,t,r)=>{const s=r(1878);const gte=(e,t,r)=>s(e,t,r)>=0;e.exports=gte},6223:(e,t,r)=>{const s=r(7825);const inc=(e,t,r,n)=>{if(typeof r==="string"){n=r;r=undefined}try{return new s(e instanceof s?e.version:e,r).inc(t,n).version}catch(e){return null}};e.exports=inc},1004:(e,t,r)=>{const s=r(1878);const lt=(e,t,r)=>s(e,t,r)<0;e.exports=lt},3285:(e,t,r)=>{const s=r(1878);const lte=(e,t,r)=>s(e,t,r)<=0;e.exports=lte},6851:(e,t,r)=>{const s=r(7825);const major=(e,t)=>new s(e,t).major;e.exports=major},7443:(e,t,r)=>{const s=r(7825);const minor=(e,t)=>new s(e,t).minor;e.exports=minor},4182:(e,t,r)=>{const s=r(1878);const neq=(e,t,r)=>s(e,t,r)!==0;e.exports=neq},4770:(e,t,r)=>{const{MAX_LENGTH:s}=r(8147);const{re:n,t:i}=r(4351);const o=r(7825);const a=r(3789);const parse=(e,t)=>{t=a(t);if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[i.LOOSE]:n[i.FULL];if(!r.test(e)){return null}try{return new o(e,t)}catch(e){return null}};e.exports=parse},1550:(e,t,r)=>{const s=r(7825);const patch=(e,t)=>new s(e,t).patch;e.exports=patch},3340:(e,t,r)=>{const s=r(4770);const prerelease=(e,t)=>{const r=s(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},3119:(e,t,r)=>{const s=r(1878);const rcompare=(e,t,r)=>s(t,e,r);e.exports=rcompare},3379:(e,t,r)=>{const s=r(9874);const rsort=(e,t)=>e.sort(((e,r)=>s(r,e,t)));e.exports=rsort},4140:(e,t,r)=>{const s=r(7058);const satisfies=(e,t,r)=>{try{t=new s(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},7408:(e,t,r)=>{const s=r(9874);const sort=(e,t)=>e.sort(((e,r)=>s(e,r,t)));e.exports=sort},8994:(e,t,r)=>{const s=r(4770);const valid=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=valid},1452:(e,t,r)=>{const s=r(4351);const n=r(8147);const i=r(7825);const o=r(8307);const a=r(4770);const c=r(8994);const l=r(6869);const u=r(6223);const h=r(2464);const d=r(6851);const p=r(7443);const m=r(1550);const y=r(3340);const g=r(1878);const v=r(3119);const b=r(8325);const w=r(9874);const E=r(7408);const S=r(3379);const x=r(2062);const R=r(1004);const P=r(112);const O=r(4182);const $=r(6503);const A=r(3285);const T=r(2674);const C=r(9608);const k=r(2485);const I=r(7058);const N=r(4140);const D=r(8478);const L=r(4430);const M=r(4510);const j=r(2582);const F=r(4499);const U=r(3766);const B=r(3773);const H=r(8626);const z=r(4298);const G=r(6023);const V=r(5701);e.exports={parse:a,valid:c,clean:l,inc:u,diff:h,major:d,minor:p,patch:m,prerelease:y,compare:g,rcompare:v,compareLoose:b,compareBuild:w,sort:E,rsort:S,gt:x,lt:R,eq:P,neq:O,gte:$,lte:A,cmp:T,coerce:C,Comparator:k,Range:I,satisfies:N,toComparators:D,maxSatisfying:L,minSatisfying:M,minVersion:j,validRange:F,outside:U,gtr:B,ltr:H,intersects:z,simplifyRange:G,subset:V,SemVer:i,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},8147:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},5747:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},8307:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:e<r?-1:1};const rcompareIdentifiers=(e,t)=>compareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},3789:e=>{const t=["includePrerelease","loose","rtl"];const parseOptions=e=>!e?{}:typeof e!=="object"?{loose:true}:t.filter((t=>e[t])).reduce(((e,t)=>{e[t]=true;return e}),{});e.exports=parseOptions},4351:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s}=r(8147);const n=r(5747);t=e.exports={};const i=t.re=[];const o=t.src=[];const a=t.t={};let c=0;const createToken=(e,t,r)=>{const s=c++;n(e,s,t);a[e]=s;o[s]=t;i[s]=new RegExp(t,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`);createToken("FULL",`^${o[a.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`);createToken("LOOSE",`^${o[a.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",o[a.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},3773:(e,t,r)=>{const s=r(3766);const gtr=(e,t,r)=>s(e,t,">",r);e.exports=gtr},4298:(e,t,r)=>{const s=r(7058);const intersects=(e,t,r)=>{e=new s(e,r);t=new s(t,r);return e.intersects(t)};e.exports=intersects},8626:(e,t,r)=>{const s=r(3766);const ltr=(e,t,r)=>s(e,t,"<",r);e.exports=ltr},4430:(e,t,r)=>{const s=r(7825);const n=r(7058);const maxSatisfying=(e,t,r)=>{let i=null;let o=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!i||o.compare(e)===-1){i=e;o=new s(i,r)}}}));return i};e.exports=maxSatisfying},4510:(e,t,r)=>{const s=r(7825);const n=r(7058);const minSatisfying=(e,t,r)=>{let i=null;let o=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!i||o.compare(e)===1){i=e;o=new s(i,r)}}}));return i};e.exports=minSatisfying},2582:(e,t,r)=>{const s=r(7825);const n=r(7058);const i=r(2062);const minVersion=(e,t)=>{e=new n(e,t);let r=new s("0.0.0");if(e.test(r)){return r}r=new s("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t<e.set.length;++t){const n=e.set[t];let o=null;n.forEach((e=>{const t=new s(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!o||i(t,o)){o=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(o&&(!r||i(r,o))){r=o}}if(r&&e.test(r)){return r}return null};e.exports=minVersion},3766:(e,t,r)=>{const s=r(7825);const n=r(2485);const{ANY:i}=n;const o=r(7058);const a=r(4140);const c=r(2062);const l=r(1004);const u=r(3285);const h=r(6503);const outside=(e,t,r,d)=>{e=new s(e,d);t=new o(t,d);let p,m,y,g,v;switch(r){case">":p=c;m=u;y=l;g=">";v=">=";break;case"<":p=l;m=h;y=c;g="<";v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d)){return false}for(let r=0;r<t.set.length;++r){const s=t.set[r];let o=null;let a=null;s.forEach((e=>{if(e.semver===i){e=new n(">=0.0.0")}o=o||e;a=a||e;if(p(e.semver,o.semver,d)){o=e}else if(y(e.semver,a.semver,d)){a=e}}));if(o.operator===g||o.operator===v){return false}if((!a.operator||a.operator===g)&&m(e,a.semver)){return false}else if(a.operator===v&&y(e,a.semver)){return false}}return true};e.exports=outside},6023:(e,t,r)=>{const s=r(4140);const n=r(1878);e.exports=(e,t,r)=>{const i=[];let o=null;let a=null;const c=e.sort(((e,t)=>n(e,t,r)));for(const e of c){const n=s(e,t,r);if(n){a=e;if(!o){o=e}}else{if(a){i.push([o,a])}a=null;o=null}}if(o){i.push([o,null])}const l=[];for(const[e,t]of i){if(e===t){l.push(e)}else if(!t&&e===c[0]){l.push("*")}else if(!t){l.push(`>=${e}`)}else if(e===c[0]){l.push(`<=${t}`)}else{l.push(`${e} - ${t}`)}}const u=l.join(" || ");const h=typeof t.raw==="string"?t.raw:String(t);return u.length<h.length?u:t}},5701:(e,t,r)=>{const s=r(7058);const n=r(2485);const{ANY:i}=n;const o=r(4140);const a=r(1878);const subset=(e,t,r={})=>{if(e===t){return true}e=new s(e,r);t=new s(t,r);let n=false;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);n=n||t!==null;if(t){continue e}}if(n){return false}}return true};const simpleSubset=(e,t,r)=>{if(e===t){return true}if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i){return true}else if(r.includePrerelease){e=[new n(">=0.0.0-0")]}else{e=[new n(">=0.0.0")]}}if(t.length===1&&t[0].semver===i){if(r.includePrerelease){return true}else{t=[new n(">=0.0.0")]}}const s=new Set;let c,l;for(const t of e){if(t.operator===">"||t.operator===">="){c=higherGT(c,t,r)}else if(t.operator==="<"||t.operator==="<="){l=lowerLT(l,t,r)}else{s.add(t.semver)}}if(s.size>1){return null}let u;if(c&&l){u=a(c.semver,l.semver,r);if(u>0){return null}else if(u===0&&(c.operator!==">="||l.operator!=="<=")){return null}}for(const e of s){if(c&&!o(e,String(c),r)){return null}if(l&&!o(e,String(l),r)){return null}for(const s of t){if(!o(e,String(s),r)){return false}}return true}let h,d;let p,m;let y=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:false;let g=c&&!r.includePrerelease&&c.semver.prerelease.length?c.semver:false;if(y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0){y=false}for(const e of t){m=m||e.operator===">"||e.operator===">=";p=p||e.operator==="<"||e.operator==="<=";if(c){if(g){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch){g=false}}if(e.operator===">"||e.operator===">="){h=higherGT(c,e,r);if(h===e&&h!==c){return false}}else if(c.operator===">="&&!o(c.semver,String(e),r)){return false}}if(l){if(y){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch){y=false}}if(e.operator==="<"||e.operator==="<="){d=lowerLT(l,e,r);if(d===e&&d!==l){return false}}else if(l.operator==="<="&&!o(l.semver,String(e),r)){return false}}if(!e.operator&&(l||c)&&u!==0){return false}}if(c&&p&&!l&&u!==0){return false}if(l&&m&&!c&&u!==0){return false}if(g||y){return false}return true};const higherGT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s>0?e:s<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s<0?e:s>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},8478:(e,t,r)=>{const s=r(7058);const toComparators=(e,t)=>new s(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},4499:(e,t,r)=>{const s=r(7058);const validRange=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}};e.exports=validRange},530:(e,t,r)=>{"use strict";const s=r(4401);e.exports=(e="")=>{const t=e.match(s);if(!t){return null}const[r,n]=t[0].replace(/#! ?/,"").split(" ");const i=r.split("/").pop();if(i==="env"){return n}return n?`${i} ${n}`:i}},4401:e=>{"use strict";e.exports=/^#!(.*)/},4577:e=>{"use strict";const t="";const r=`${t}[`;const s="";const n={to(e,t){if(!t)return`${r}${e+1}G`;return`${r}${t+1};${e+1}H`},move(e,t){let s="";if(e<0)s+=`${r}${-e}D`;else if(e>0)s+=`${r}${e}C`;if(t<0)s+=`${r}${-t}A`;else if(t>0)s+=`${r}${t}B`;return s},up:(e=1)=>`${r}${e}A`,down:(e=1)=>`${r}${e}B`,forward:(e=1)=>`${r}${e}C`,backward:(e=1)=>`${r}${e}D`,nextLine:(e=1)=>`${r}E`.repeat(e),prevLine:(e=1)=>`${r}F`.repeat(e),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${t}7`,restore:`${t}8`};const i={up:(e=1)=>`${r}S`.repeat(e),down:(e=1)=>`${r}T`.repeat(e)};const o={screen:`${r}2J`,up:(e=1)=>`${r}1J`.repeat(e),down:(e=1)=>`${r}J`.repeat(e),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():"");if(e)t+=n.left;return t}};e.exports={cursor:n,scroll:i,erase:o,beep:s}},2251:e=>{"use strict";var t=1;var r=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(e,t,r){return e.slice(t,r).replace(/\S/g," ")}e.exports=function(e,s){s=s||{};var n;var i;var o=false;var a=false;var c=0;var l="";var u=s.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<e.length;h++){n=e[h];i=e[h+1];if(!a&&n==='"'){var d=e[h-1]==="\\"&&e[h-2]!=="\\";if(!d){o=!o}}if(o){continue}if(!a&&n+i==="//"){l+=e.slice(c,h);c=h;a=t;h++}else if(a===t&&n+i==="\r\n"){h++;a=false;l+=u(e,c,h);c=h;continue}else if(a===t&&n==="\n"){a=false;l+=u(e,c,h);c=h}else if(!a&&n+i==="/*"){l+=e.slice(c,h);c=h;a=r;h++;continue}else if(a===r&&n+i==="*/"){h++;a=false;l+=u(e,c,h+1);c=h+1;continue}}return l+(a?u(e.substr(c)):e.substr(c))}},5255:(e,t,r)=>{"use strict";t.c=t.create=r(7585);t.r=t.replace=r(1138);t.t=t.list=r(4975);t.u=t.update=r(9472);t.x=t.extract=r(9985);t.Pack=r(7301);t.Unpack=r(5951);t.Parse=r(5222);t.ReadEntry=r(5917);t.WriteEntry=r(1944);t.Header=r(1703);t.Pax=r(9037);t.types=r(1046)},7585:(e,t,r)=>{"use strict";const s=r(3831);const n=r(7301);const i=r(644);const o=r(4975);const a=r(1017);e.exports=(e,t,r)=>{if(typeof t==="function"){r=t}if(Array.isArray(e)){t=e,e={}}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);const n=s(e);if(n.sync&&typeof r==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!n.file&&typeof r==="function"){throw new TypeError("callback only supported with file option")}return n.file&&n.sync?createFileSync(n,t):n.file?createFile(n,t,r):n.sync?createSync(n,t):create(n,t)};const createFileSync=(e,t)=>{const r=new n.Sync(e);const s=new i.WriteStreamSync(e.file,{mode:e.mode||438});r.pipe(s);addFilesSync(r,t)};const createFile=(e,t,r)=>{const s=new n(e);const o=new i.WriteStream(e.file,{mode:e.mode||438});s.pipe(o);const a=new Promise(((e,t)=>{o.on("error",t);o.on("close",e);s.on("error",t)}));addFilesAsync(s,t);return r?a.then(r,r):a};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){o({file:a.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@"){return o({file:a.resolve(e.cwd,r.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)))}else{e.add(r)}}e.end()};const createSync=(e,t)=>{const r=new n.Sync(e);addFilesSync(r,t);return r};const create=(e,t)=>{const r=new n(e);addFilesAsync(r,t);return r}},9985:(e,t,r)=>{"use strict";const s=r(3831);const n=r(5951);const i=r(7147);const o=r(644);const a=r(1017);const c=r(2517);e.exports=(e,t,r)=>{if(typeof e==="function"){r=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){r=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const n=s(e);if(n.sync&&typeof r==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!n.file&&typeof r==="function"){throw new TypeError("callback only supported with file option")}if(t.length){filesFilter(n,t)}return n.file&&n.sync?extractFileSync(n):n.file?extractFile(n,r):n.sync?extractSync(n):extract(n)};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[c(e),true])));const s=e.filter;const mapHas=(e,t)=>{const s=t||a.parse(e).root||".";const n=e===s?false:r.has(e)?r.get(e):mapHas(a.dirname(e),s);r.set(e,n);return n};e.filter=s?(e,t)=>s(e,t)&&mapHas(c(e)):e=>mapHas(c(e))};const extractFileSync=e=>{const t=new n.Sync(e);const r=e.file;const s=i.statSync(r);const a=e.maxReadSize||16*1024*1024;const c=new o.ReadStreamSync(r,{readSize:a,size:s.size});c.pipe(t)};const extractFile=(e,t)=>{const r=new n(e);const s=e.maxReadSize||16*1024*1024;const a=e.file;const c=new Promise(((e,t)=>{r.on("error",t);r.on("close",e);i.stat(a,((e,n)=>{if(e){t(e)}else{const e=new o.ReadStream(a,{readSize:s,size:n.size});e.on("error",t);e.pipe(r)}}))}));return t?c.then(t,t):c};const extractSync=e=>new n.Sync(e);const extract=e=>new n(e)},9262:(e,t,r)=>{const s=process.env.__FAKE_PLATFORM__||process.platform;const n=s==="win32";const i=global.__FAKE_TESTING_FS__||r(7147);const{O_CREAT:o,O_TRUNC:a,O_WRONLY:c,UV_FS_O_FILEMAP:l=0}=i.constants;const u=n&&!!l;const h=512*1024;const d=l|a|o|c;e.exports=!u?()=>"w":e=>e<h?d:"w"},1703:(e,t,r)=>{"use strict";const s=r(1046);const n=r(1017).posix;const i=r(2933);const o=Symbol("slurp");const a=Symbol("type");class Header{constructor(e,t,r,s){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[a]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e)){this.decode(e,t||0,r,s)}else if(e){this.set(e)}}decode(e,t,r,s){if(!t){t=0}if(!e||!(e.length>=t+512)){throw new Error("need 512 bytes for header")}this.path=decString(e,t,100);this.mode=decNumber(e,t+100,8);this.uid=decNumber(e,t+108,8);this.gid=decNumber(e,t+116,8);this.size=decNumber(e,t+124,12);this.mtime=decDate(e,t+136,12);this.cksum=decNumber(e,t+148,12);this[o](r);this[o](s,true);this[a]=decString(e,t+156,1);if(this[a]===""){this[a]="0"}if(this[a]==="0"&&this.path.slice(-1)==="/"){this[a]="5"}if(this[a]==="5"){this.size=0}this.linkpath=decString(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=decString(e,t+265,32);this.gname=decString(e,t+297,32);this.devmaj=decNumber(e,t+329,8);this.devmin=decNumber(e,t+337,8);if(e[t+475]!==0){const r=decString(e,t+345,155);this.path=r+"/"+this.path}else{const r=decString(e,t+345,130);if(r){this.path=r+"/"+this.path}this.atime=decDate(e,t+476,12);this.ctime=decDate(e,t+488,12)}}let n=8*32;for(let r=t;r<t+148;r++){n+=e[r]}for(let r=t+156;r<t+512;r++){n+=e[r]}this.cksumValid=n===this.cksum;if(this.cksum===null&&n===8*32){this.nullBlock=true}}[o](e,t){for(const r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path")){this[r]=e[r]}}}encode(e,t){if(!e){e=this.block=Buffer.alloc(512);t=0}if(!t){t=0}if(!(e.length>=t+512)){throw new Error("need 512 bytes for header")}const r=this.ctime||this.atime?130:155;const s=splitPrefix(this.path||"",r);const n=s[0];const i=s[1];this.needPax=s[2];this.needPax=encString(e,t,100,n)||this.needPax;this.needPax=encNumber(e,t+100,8,this.mode)||this.needPax;this.needPax=encNumber(e,t+108,8,this.uid)||this.needPax;this.needPax=encNumber(e,t+116,8,this.gid)||this.needPax;this.needPax=encNumber(e,t+124,12,this.size)||this.needPax;this.needPax=encDate(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[a].charCodeAt(0);this.needPax=encString(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=encString(e,t+265,32,this.uname)||this.needPax;this.needPax=encString(e,t+297,32,this.gname)||this.needPax;this.needPax=encNumber(e,t+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(e,t+337,8,this.devmin)||this.needPax;this.needPax=encString(e,t+345,r,i)||this.needPax;if(e[t+475]!==0){this.needPax=encString(e,t+345,155,i)||this.needPax}else{this.needPax=encString(e,t+345,130,i)||this.needPax;this.needPax=encDate(e,t+476,12,this.atime)||this.needPax;this.needPax=encDate(e,t+488,12,this.ctime)||this.needPax}let o=8*32;for(let r=t;r<t+148;r++){o+=e[r]}for(let r=t+156;r<t+512;r++){o+=e[r]}this.cksum=o;encNumber(e,t+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(e){for(const t in e){if(e[t]!==null&&e[t]!==undefined){this[t]=e[t]}}}get type(){return s.name.get(this[a])||this[a]}get typeKey(){return this[a]}set type(e){if(s.code.has(e)){this[a]=s.code.get(e)}else{this[a]=e}}}const splitPrefix=(e,t)=>{const r=100;let s=e;let i="";let o;const a=n.parse(e).root||".";if(Buffer.byteLength(s)<r){o=[s,i,false]}else{i=n.dirname(s);s=n.basename(s);do{if(Buffer.byteLength(s)<=r&&Buffer.byteLength(i)<=t){o=[s,i,false]}else if(Buffer.byteLength(s)>r&&Buffer.byteLength(i)<=t){o=[s.slice(0,r-1),i,true]}else{s=n.join(n.basename(i),s);i=n.dirname(i)}}while(i!==a&&!o);if(!o){o=[e.slice(0,r-1),"",true]}}return o};const decString=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,"");const decDate=(e,t,r)=>numToDate(decNumber(e,t,r));const numToDate=e=>e===null?null:new Date(e*1e3);const decNumber=(e,t,r)=>e[t]&128?i.parse(e.slice(t,t+r)):decSmallNumber(e,t,r);const nanNull=e=>isNaN(e)?null:e;const decSmallNumber=(e,t,r)=>nanNull(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8));const c={12:8589934591,8:2097151};const encNumber=(e,t,r,s)=>s===null?false:s>c[r]||s<0?(i.encode(s,e.slice(t,t+r)),true):(encSmallNumber(e,t,r,s),false);const encSmallNumber=(e,t,r,s)=>e.write(octalString(s,r),t,r,"ascii");const octalString=(e,t)=>padOctal(Math.floor(e).toString(8),t);const padOctal=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const encDate=(e,t,r,s)=>s===null?false:encNumber(e,t,r,s.getTime()/1e3);const l=new Array(156).join("\0");const encString=(e,t,r,s)=>s===null?false:(e.write(s+l,t,r,"utf8"),s.length!==Buffer.byteLength(s)||s.length>r);e.exports=Header},3831:e=>{"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=e=>e?Object.keys(e).map((r=>[t.has(r)?t.get(r):r,e[r]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},2933:e=>{"use strict";const encode=(e,t)=>{if(!Number.isSafeInteger(e)){throw Error("cannot encode number outside of javascript safe integer range")}else if(e<0){encodeNegative(e,t)}else{encodePositive(e,t)}return t};const encodePositive=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--){t[r-1]=e&255;e=Math.floor(e/256)}};const encodeNegative=(e,t)=>{t[0]=255;var r=false;e=e*-1;for(var s=t.length;s>1;s--){var n=e&255;e=Math.floor(e/256);if(r){t[s-1]=onesComp(n)}else if(n===0){t[s-1]=0}else{r=true;t[s-1]=twosComp(n)}}};const parse=e=>{const t=e[0];const r=t===128?pos(e.slice(1,e.length)):t===255?twos(e):null;if(r===null){throw Error("invalid base256 encoding")}if(!Number.isSafeInteger(r)){throw Error("parsed number outside of javascript safe integer range")}return r};const twos=e=>{var t=e.length;var r=0;var s=false;for(var n=t-1;n>-1;n--){var i=e[n];var o;if(s){o=onesComp(i)}else if(i===0){o=i}else{s=true;o=twosComp(i)}if(o!==0){r-=o*Math.pow(256,t-n-1)}}return r};const pos=e=>{var t=e.length;var r=0;for(var s=t-1;s>-1;s--){var n=e[s];if(n!==0){r+=n*Math.pow(256,t-s-1)}}return r};const onesComp=e=>(255^e)&255;const twosComp=e=>(255^e)+1&255;e.exports={encode:encode,parse:parse}},4975:(e,t,r)=>{"use strict";const s=r(3831);const n=r(5222);const i=r(7147);const o=r(644);const a=r(1017);const c=r(2517);e.exports=(e,t,r)=>{if(typeof e==="function"){r=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){r=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const n=s(e);if(n.sync&&typeof r==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!n.file&&typeof r==="function"){throw new TypeError("callback only supported with file option")}if(t.length){filesFilter(n,t)}if(!n.noResume){onentryFunction(n)}return n.file&&n.sync?listFileSync(n):n.file?listFile(n,r):list(n)};const onentryFunction=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[c(e),true])));const s=e.filter;const mapHas=(e,t)=>{const s=t||a.parse(e).root||".";const n=e===s?false:r.has(e)?r.get(e):mapHas(a.dirname(e),s);r.set(e,n);return n};e.filter=s?(e,t)=>s(e,t)&&mapHas(c(e)):e=>mapHas(c(e))};const listFileSync=e=>{const t=list(e);const r=e.file;let s=true;let n;try{const o=i.statSync(r);const a=e.maxReadSize||16*1024*1024;if(o.size<a){t.end(i.readFileSync(r))}else{let e=0;const s=Buffer.allocUnsafe(a);n=i.openSync(r,"r");while(e<o.size){const r=i.readSync(n,s,0,a,e);e+=r;t.write(s.slice(0,r))}t.end()}s=false}finally{if(s&&n){try{i.closeSync(n)}catch(e){}}}};const listFile=(e,t)=>{const r=new n(e);const s=e.maxReadSize||16*1024*1024;const a=e.file;const c=new Promise(((e,t)=>{r.on("error",t);r.on("end",e);i.stat(a,((e,n)=>{if(e){t(e)}else{const e=new o.ReadStream(a,{readSize:s,size:n.size});e.on("error",t);e.pipe(r)}}))}));return t?c.then(t,t):c};const list=e=>new n(e)},6209:(e,t,r)=>{"use strict";const s=r(9806);const n=r(7147);const i=r(1017);const o=r(2975);const a=r(9740);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const cGet=(e,t)=>e.get(a(t));const cSet=(e,t,r)=>e.set(a(t),r);const checkCwd=(e,t)=>{n.stat(e,((r,s)=>{if(r||!s.isDirectory()){r=new CwdError(e,r&&r.code||"ENOTDIR")}t(r)}))};e.exports=(e,t,r)=>{e=a(e);const c=t.umask;const l=t.mode|448;const u=(l&c)!==0;const h=t.uid;const d=t.gid;const p=typeof h==="number"&&typeof d==="number"&&(h!==t.processUid||d!==t.processGid);const m=t.preserve;const y=t.unlink;const g=t.cache;const v=a(t.cwd);const done=(t,s)=>{if(t){r(t)}else{cSet(g,e,true);if(s&&p){o(s,h,d,(e=>done(e)))}else if(u){n.chmod(e,l,r)}else{r()}}};if(g&&cGet(g,e)===true){return done()}if(e===v){return checkCwd(e,done)}if(m){return s(e,{mode:l}).then((e=>done(null,e)),done)}const b=a(i.relative(v,e));const w=b.split("/");mkdir_(v,w,l,g,y,v,null,done)};const mkdir_=(e,t,r,s,o,c,l,u)=>{if(!t.length){return u(null,l)}const h=t.shift();const d=a(i.resolve(e+"/"+h));if(cGet(s,d)){return mkdir_(d,t,r,s,o,c,l,u)}n.mkdir(d,r,onmkdir(d,t,r,s,o,c,l,u))};const onmkdir=(e,t,r,s,i,o,c,l)=>u=>{if(u){n.lstat(e,((h,d)=>{if(h){h.path=h.path&&a(h.path);l(h)}else if(d.isDirectory()){mkdir_(e,t,r,s,i,o,c,l)}else if(i){n.unlink(e,(a=>{if(a){return l(a)}n.mkdir(e,r,onmkdir(e,t,r,s,i,o,c,l))}))}else if(d.isSymbolicLink()){return l(new SymlinkError(e,e+"/"+t.join("/")))}else{l(u)}}))}else{c=c||e;mkdir_(e,t,r,s,i,o,c,l)}};const checkCwdSync=e=>{let t=false;let r="ENOTDIR";try{t=n.statSync(e).isDirectory()}catch(e){r=e.code}finally{if(!t){throw new CwdError(e,r)}}};e.exports.sync=(e,t)=>{e=a(e);const r=t.umask;const c=t.mode|448;const l=(c&r)!==0;const u=t.uid;const h=t.gid;const d=typeof u==="number"&&typeof h==="number"&&(u!==t.processUid||h!==t.processGid);const p=t.preserve;const m=t.unlink;const y=t.cache;const g=a(t.cwd);const done=t=>{cSet(y,e,true);if(t&&d){o.sync(t,u,h)}if(l){n.chmodSync(e,c)}};if(y&&cGet(y,e)===true){return done()}if(e===g){checkCwdSync(g);return done()}if(p){return done(s.sync(e,c))}const v=a(i.relative(g,e));const b=v.split("/");let w=null;for(let e=b.shift(),t=g;e&&(t+="/"+e);e=b.shift()){t=a(i.resolve(t));if(cGet(y,t)){continue}try{n.mkdirSync(t,c);w=w||t;cSet(y,t,true)}catch(e){const r=n.lstatSync(t);if(r.isDirectory()){cSet(y,t,true);continue}else if(m){n.unlinkSync(t);n.mkdirSync(t,c);w=w||t;cSet(y,t,true);continue}else if(r.isSymbolicLink()){return new SymlinkError(t,t+"/"+b.join("/"))}}}return done(w)}},6601:e=>{"use strict";e.exports=(e,t,r)=>{e&=4095;if(r){e=(e|384)&~18}if(t){if(e&256){e|=64}if(e&32){e|=8}if(e&4){e|=1}}return e}},4711:e=>{const t=Object.create(null);const{hasOwnProperty:r}=Object.prototype;e.exports=e=>{if(!r.call(t,e)){t[e]=e.normalize("NFD")}return t[e]}},9740:e=>{const t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=t!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")},7301:(e,t,r)=>{"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const{Minipass:s}=r(5540);const n=r(7750);const i=r(5917);const o=r(1944);const a=o.Sync;const c=o.Tar;const l=r(3401);const u=Buffer.alloc(1024);const h=Symbol("onStat");const d=Symbol("ended");const p=Symbol("queue");const m=Symbol("current");const y=Symbol("process");const g=Symbol("processing");const v=Symbol("processJob");const b=Symbol("jobs");const w=Symbol("jobDone");const E=Symbol("addFSEntry");const S=Symbol("addTarEntry");const x=Symbol("stat");const R=Symbol("readdir");const P=Symbol("onreaddir");const O=Symbol("pipe");const $=Symbol("entry");const A=Symbol("entryOpt");const T=Symbol("writeEntryClass");const C=Symbol("write");const k=Symbol("ondrain");const I=r(7147);const N=r(1017);const D=r(8920);const L=r(9740);const M=D(class Pack extends s{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=L(e.prefix||"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[T]=o;if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object"){e.gzip={}}if(this.portable){e.gzip.portable=true}this.zip=new n.Gzip(e.gzip);this.zip.on("data",(e=>super.write(e)));this.zip.on("end",(e=>super.end()));this.zip.on("drain",(e=>this[k]()));this.on("resume",(e=>this.zip.resume()))}else{this.on("drain",this[k])}this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[p]=new l;this[b]=0;this.jobs=+e.jobs||4;this[g]=false;this[d]=false}[C](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e){this.write(e)}this[d]=true;this[y]();return this}write(e){if(this[d]){throw new Error("write after end")}if(e instanceof i){this[S](e)}else{this[E](e)}return this.flowing}[S](e){const t=L(N.resolve(this.cwd,e.path));if(!this.filter(e.path,e)){e.resume()}else{const r=new PackJob(e.path,t,false);r.entry=new c(e,this[A](r));r.entry.on("end",(e=>this[w](r)));this[b]+=1;this[p].push(r)}this[y]()}[E](e){const t=L(N.resolve(this.cwd,e));this[p].push(new PackJob(e,t));this[y]()}[x](e){e.pending=true;this[b]+=1;const t=this.follow?"stat":"lstat";I[t](e.absolute,((t,r)=>{e.pending=false;this[b]-=1;if(t){this.emit("error",t)}else{this[h](e,r)}}))}[h](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t)){e.ignore=true}this[y]()}[R](e){e.pending=true;this[b]+=1;I.readdir(e.absolute,((t,r)=>{e.pending=false;this[b]-=1;if(t){return this.emit("error",t)}this[P](e,r)}))}[P](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[y]()}[y](){if(this[g]){return}this[g]=true;for(let e=this[p].head;e!==null&&this[b]<this.jobs;e=e.next){this[v](e.value);if(e.value.ignore){const t=e.next;this[p].removeNode(e);e.next=t}}this[g]=false;if(this[d]&&!this[p].length&&this[b]===0){if(this.zip){this.zip.end(u)}else{super.write(u);super.end()}}}get[m](){return this[p]&&this[p].head&&this[p].head.value}[w](e){this[p].shift();this[b]-=1;this[y]()}[v](e){if(e.pending){return}if(e.entry){if(e===this[m]&&!e.piped){this[O](e)}return}if(!e.stat){if(this.statCache.has(e.absolute)){this[h](e,this.statCache.get(e.absolute))}else{this[x](e)}}if(!e.stat){return}if(e.ignore){return}if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){if(this.readdirCache.has(e.absolute)){this[P](e,this.readdirCache.get(e.absolute))}else{this[R](e)}if(!e.readdir){return}}e.entry=this[$](e);if(!e.entry){e.ignore=true;return}if(e===this[m]&&!e.piped){this[O](e)}}[A](e){return{onwarn:(e,t,r)=>this.warn(e,t,r),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[$](e){this[b]+=1;try{return new this[T](e.path,this[A](e)).on("end",(()=>this[w](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[k](){if(this[m]&&this[m].entry){this[m].entry.resume()}}[O](e){e.piped=true;if(e.readdir){e.readdir.forEach((t=>{const r=e.path;const s=r==="./"?"":r.replace(/\/*$/,"/");this[E](s+t)}))}const t=e.entry;const r=this.zip;if(r){t.on("data",(e=>{if(!r.write(e)){t.pause()}}))}else{t.on("data",(e=>{if(!super.write(e)){t.pause()}}))}}pause(){if(this.zip){this.zip.pause()}return super.pause()}});class PackSync extends M{constructor(e){super(e);this[T]=a}pause(){}resume(){}[x](e){const t=this.follow?"statSync":"lstatSync";this[h](e,I[t](e.absolute))}[R](e,t){this[P](e,I.readdirSync(e.absolute))}[O](e){const t=e.entry;const r=this.zip;if(e.readdir){e.readdir.forEach((t=>{const r=e.path;const s=r==="./"?"":r.replace(/\/*$/,"/");this[E](s+t)}))}if(r){t.on("data",(e=>{r.write(e)}))}else{t.on("data",(e=>{super[C](e)}))}}}M.Sync=PackSync;e.exports=M},5222:(e,t,r)=>{"use strict";const s=r(8920);const n=r(1703);const i=r(2361);const o=r(3401);const a=1024*1024;const c=r(5917);const l=r(9037);const u=r(7750);const{nextTick:h}=r(7282);const d=Buffer.from([31,139]);const p=Symbol("state");const m=Symbol("writeEntry");const y=Symbol("readEntry");const g=Symbol("nextEntry");const v=Symbol("processEntry");const b=Symbol("extendedHeader");const w=Symbol("globalExtendedHeader");const E=Symbol("meta");const S=Symbol("emitMeta");const x=Symbol("buffer");const R=Symbol("queue");const P=Symbol("ended");const O=Symbol("emittedEnd");const $=Symbol("emit");const A=Symbol("unzip");const T=Symbol("consumeChunk");const C=Symbol("consumeChunkSub");const k=Symbol("consumeBody");const I=Symbol("consumeMeta");const N=Symbol("consumeHeader");const D=Symbol("consuming");const L=Symbol("bufferConcat");const M=Symbol("maybeEnd");const j=Symbol("writing");const F=Symbol("aborted");const U=Symbol("onDone");const B=Symbol("sawValidEntry");const H=Symbol("sawNullBlock");const z=Symbol("sawEOF");const G=Symbol("closeStream");const noop=e=>true;e.exports=s(class Parser extends i{constructor(e){e=e||{};super(e);this.file=e.file||"";this[B]=null;this.on(U,(e=>{if(this[p]==="begin"||this[B]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(e.ondone){this.on(U,e.ondone)}else{this.on(U,(e=>{this.emit("prefinish");this.emit("finish");this.emit("end")}))}this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||a;this.filter=typeof e.filter==="function"?e.filter:noop;this.writable=true;this.readable=false;this[R]=new o;this[x]=null;this[y]=null;this[m]=null;this[p]="begin";this[E]="";this[b]=null;this[w]=null;this[P]=false;this[A]=null;this[F]=false;this[H]=false;this[z]=false;this.on("end",(()=>this[G]()));if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}if(typeof e.onentry==="function"){this.on("entry",e.onentry)}}[N](e,t){if(this[B]===null){this[B]=false}let r;try{r=new n(e,t,this[b],this[w])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(r.nullBlock){if(this[H]){this[z]=true;if(this[p]==="begin"){this[p]="header"}this[$]("eof")}else{this[H]=true;this[$]("nullBlock")}}else{this[H]=false;if(!r.cksumValid){this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r})}else if(!r.path){this.warn("TAR_ENTRY_INVALID","path is required",{header:r})}else{const e=r.type;if(/^(Symbolic)?Link$/.test(e)&&!r.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r})}else if(!/^(Symbolic)?Link$/.test(e)&&r.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:r})}else{const e=this[m]=new c(r,this[b],this[w]);if(!this[B]){if(e.remain){const onend=()=>{if(!e.invalid){this[B]=true}};e.on("end",onend)}else{this[B]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[$]("ignoredEntry",e);this[p]="ignore";e.resume()}else if(e.size>0){this[E]="";e.on("data",(e=>this[E]+=e));this[p]="meta"}}else{this[b]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[$]("ignoredEntry",e);this[p]=e.remain?"ignore":"header";e.resume()}else{if(e.remain){this[p]="body"}else{this[p]="header";e.end()}if(!this[y]){this[R].push(e);this[g]()}else{this[R].push(e)}}}}}}}[G](){h((()=>this.emit("close")))}[v](e){let t=true;if(!e){this[y]=null;t=false}else if(Array.isArray(e)){this.emit.apply(this,e)}else{this[y]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",(e=>this[g]()));t=false}}return t}[g](){do{}while(this[v](this[R].shift()));if(!this[R].length){const e=this[y];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[j]){this.emit("drain")}}else{e.once("drain",(e=>this.emit("drain")))}}}[k](e,t){const r=this[m];const s=r.blockRemain;const n=s>=e.length&&t===0?e:e.slice(t,t+s);r.write(n);if(!r.blockRemain){this[p]="header";this[m]=null;r.end()}return n.length}[I](e,t){const r=this[m];const s=this[k](e,t);if(!this[m]){this[S](r)}return s}[$](e,t,r){if(!this[R].length&&!this[y]){this.emit(e,t,r)}else{this[R].push([e,t,r])}}[S](e){this[$]("meta",this[E]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[b]=l.parse(this[E],this[b],false);break;case"GlobalExtendedHeader":this[w]=l.parse(this[E],this[w],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[b]=this[b]||Object.create(null);this[b].path=this[E].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[b]=this[b]||Object.create(null);this[b].linkpath=this[E].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[F]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[F]){return}if(this[A]===null&&e){if(this[x]){e=Buffer.concat([this[x],e]);this[x]=null}if(e.length<d.length){this[x]=e;return true}for(let t=0;this[A]===null&&t<d.length;t++){if(e[t]!==d[t]){this[A]=false}}if(this[A]===null){const t=this[P];this[P]=false;this[A]=new u.Unzip;this[A].on("data",(e=>this[T](e)));this[A].on("error",(e=>this.abort(e)));this[A].on("end",(e=>{this[P]=true;this[T]()}));this[j]=true;const r=this[A][t?"end":"write"](e);this[j]=false;return r}}this[j]=true;if(this[A]){this[A].write(e)}else{this[T](e)}this[j]=false;const t=this[R].length?false:this[y]?this[y].flowing:true;if(!t&&!this[R].length){this[y].once("drain",(e=>this.emit("drain")))}return t}[L](e){if(e&&!this[F]){this[x]=this[x]?Buffer.concat([this[x],e]):e}}[M](){if(this[P]&&!this[O]&&!this[F]&&!this[D]){this[O]=true;const e=this[m];if(e&&e.blockRemain){const t=this[x]?this[x].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[x]){e.write(this[x])}e.end()}this[$](U)}}[T](e){if(this[D]){this[L](e)}else if(!e&&!this[x]){this[M]()}else{this[D]=true;if(this[x]){this[L](e);const t=this[x];this[x]=null;this[C](t)}else{this[C](e)}while(this[x]&&this[x].length>=512&&!this[F]&&!this[z]){const e=this[x];this[x]=null;this[C](e)}this[D]=false}if(!this[x]||this[P]){this[M]()}}[C](e){let t=0;const r=e.length;while(t+512<=r&&!this[F]&&!this[z]){switch(this[p]){case"begin":case"header":this[N](e,t);t+=512;break;case"ignore":case"body":t+=this[k](e,t);break;case"meta":t+=this[I](e,t);break;default:throw new Error("invalid state: "+this[p])}}if(t<r){if(this[x]){this[x]=Buffer.concat([e.slice(t),this[x]])}else{this[x]=e.slice(t)}}}end(e){if(!this[F]){if(this[A]){this[A].end(e)}else{this[P]=true;this.write(e)}}}})},6716:(e,t,r)=>{const s=r(9491);const n=r(4711);const i=r(2517);const{join:o}=r(1017);const a=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const c=a==="win32";e.exports=()=>{const e=new Map;const t=new Map;const getDirs=e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>{if(e.length){t=o(e[e.length-1],t)}e.push(t||"/");return e}),[]);return t};const r=new Set;const getQueues=r=>{const s=t.get(r);if(!s){throw new Error("function does not have any path reservations")}return{paths:s.paths.map((t=>e.get(t))),dirs:[...s.dirs].map((t=>e.get(t)))}};const check=e=>{const{paths:t,dirs:r}=getQueues(e);return t.every((t=>t[0]===e))&&r.every((t=>t[0]instanceof Set&&t[0].has(e)))};const run=e=>{if(r.has(e)||!check(e)){return false}r.add(e);e((()=>clear(e)));return true};const clear=n=>{if(!r.has(n)){return false}const{paths:i,dirs:o}=t.get(n);const a=new Set;i.forEach((t=>{const r=e.get(t);s.equal(r[0],n);if(r.length===1){e.delete(t)}else{r.shift();if(typeof r[0]==="function"){a.add(r[0])}else{r[0].forEach((e=>a.add(e)))}}}));o.forEach((t=>{const r=e.get(t);s(r[0]instanceof Set);if(r[0].size===1&&r.length===1){e.delete(t)}else if(r[0].size===1){r.shift();a.add(r[0])}else{r[0].delete(n)}}));r.delete(n);a.forEach((e=>run(e)));return true};const reserve=(r,s)=>{r=c?["win32 parallelization disabled"]:r.map((e=>i(o(n(e))).toLowerCase()));const a=new Set(r.map((e=>getDirs(e))).reduce(((e,t)=>e.concat(t))));t.set(s,{dirs:a,paths:r});r.forEach((t=>{const r=e.get(t);if(!r){e.set(t,[s])}else{r.push(s)}}));a.forEach((t=>{const r=e.get(t);if(!r){e.set(t,[new Set([s])])}else if(r[r.length-1]instanceof Set){r[r.length-1].add(s)}else{r.push(new Set([s]))}}));return run(s)};return{check:check,reserve:reserve}}},9037:(e,t,r)=>{"use strict";const s=r(1703);const n=r(1017);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e===""){return null}const t=Buffer.byteLength(e);const r=512*Math.ceil(1+t/512);const i=Buffer.allocUnsafe(r);for(let e=0;e<512;e++){i[e]=0}new s({path:("PaxHeader/"+n.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(i);i.write(e,512,t,"utf8");for(let e=t+512;e<i.length;e++){i[e]=0}return i}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===undefined){return""}const t=this[e]instanceof Date?this[e].getTime()/1e3:this[e];const r=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+t+"\n";const s=Buffer.byteLength(r);let n=Math.floor(Math.log(s)/Math.log(10))+1;if(s+n>=Math.pow(10,n)){n+=1}const i=n+s;return i+r}}Pax.parse=(e,t,r)=>new Pax(merge(parseKV(e),t),r);const merge=(e,t)=>t?Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),t):e;const parseKV=e=>e.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(e,t)=>{const r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1){return e}t=t.slice((r+" ").length);const s=t.split("=");const n=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n){return e}const i=s.join("=");e[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(i*1e3):/^[0-9]+$/.test(i)?+i:i;return e};e.exports=Pax},5917:(e,t,r)=>{"use strict";const{Minipass:s}=r(5540);const n=r(9740);const i=Symbol("slurp");e.exports=class ReadEntry extends s{constructor(e,t,r){super();this.pause();this.extended=t;this.globalExtended=r;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=n(e.path);this.mode=e.mode;if(this.mode){this.mode=this.mode&4095}this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=n(e.linkpath);this.uname=e.uname;this.gname=e.gname;if(t){this[i](t)}if(r){this[i](r,true)}}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}const r=this.remain;const s=this.blockRemain;this.remain=Math.max(0,r-t);this.blockRemain=Math.max(0,s-t);if(this.ignore){return true}if(r>=t){return super.write(e)}return super.write(e.slice(0,r))}[i](e,t){for(const r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path")){this[r]=r==="path"||r==="linkpath"?n(e[r]):e[r]}}}}},1138:(e,t,r)=>{"use strict";const s=r(3831);const n=r(7301);const i=r(7147);const o=r(644);const a=r(4975);const c=r(1017);const l=r(1703);e.exports=(e,t,r)=>{const n=s(e);if(!n.file){throw new TypeError("file is required")}if(n.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);return n.sync?replaceSync(n,t):replace(n,t,r)};const replaceSync=(e,t)=>{const r=new n.Sync(e);let s=true;let o;let a;try{try{o=i.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT"){o=i.openSync(e.file,"w+")}else{throw t}}const n=i.fstatSync(o);const c=Buffer.alloc(512);e:for(a=0;a<n.size;a+=512){for(let e=0,t=0;e<512;e+=t){t=i.readSync(o,c,e,c.length-e,a+e);if(a===0&&c[0]===31&&c[1]===139){throw new Error("cannot append to compressed archives")}if(!t){break e}}const t=new l(c);if(!t.cksumValid){break}const r=512*Math.ceil(t.size/512);if(a+r+512>n.size){break}a+=r;if(e.mtimeCache){e.mtimeCache.set(t.path,t.mtime)}}s=false;streamSync(e,r,a,o,t)}finally{if(s){try{i.closeSync(o)}catch(e){}}}};const streamSync=(e,t,r,s,n)=>{const i=new o.WriteStreamSync(e.file,{fd:s,start:r});t.pipe(i);addFilesSync(t,n)};const replace=(e,t,r)=>{t=Array.from(t);const s=new n(e);const getPos=(t,r,s)=>{const cb=(e,r)=>{if(e){i.close(t,(t=>s(e)))}else{s(null,r)}};let n=0;if(r===0){return cb(null,0)}let o=0;const a=Buffer.alloc(512);const onread=(s,c)=>{if(s){return cb(s)}o+=c;if(o<512&&c){return i.read(t,a,o,a.length-o,n+o,onread)}if(n===0&&a[0]===31&&a[1]===139){return cb(new Error("cannot append to compressed archives"))}if(o<512){return cb(null,n)}const u=new l(a);if(!u.cksumValid){return cb(null,n)}const h=512*Math.ceil(u.size/512);if(n+h+512>r){return cb(null,n)}n+=h+512;if(n>=r){return cb(null,n)}if(e.mtimeCache){e.mtimeCache.set(u.path,u.mtime)}o=0;i.read(t,a,0,512,n,onread)};i.read(t,a,0,512,n,onread)};const a=new Promise(((r,n)=>{s.on("error",n);let a="r+";const onopen=(c,l)=>{if(c&&c.code==="ENOENT"&&a==="r+"){a="w+";return i.open(e.file,a,onopen)}if(c){return n(c)}i.fstat(l,((a,c)=>{if(a){return i.close(l,(()=>n(a)))}getPos(l,c.size,((i,a)=>{if(i){return n(i)}const c=new o.WriteStream(e.file,{fd:l,start:a});s.pipe(c);c.on("error",n);c.on("close",r);addFilesAsync(s,t)}))}))};i.open(e.file,a,onopen)}));return r?a.then(r,r):a};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){a({file:c.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@"){return a({file:c.resolve(e.cwd,r.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)))}else{e.add(r)}}e.end()}},332:(e,t,r)=>{const{isAbsolute:s,parse:n}=r(1017).win32;e.exports=e=>{let t="";let r=n(e);while(s(e)||r.root){const s=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":r.root;e=e.slice(s.length);t+=s;r=n(e)}return[t,e]}},2517:e=>{e.exports=e=>{let t=e.length-1;let r=-1;while(t>-1&&e.charAt(t)==="/"){r=t;t--}return r===-1?e:e.slice(0,r)}},1046:(e,t)=>{"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},5951:(e,t,r)=>{"use strict";const s=r(9491);const n=r(5222);const i=r(7147);const o=r(644);const a=r(1017);const c=r(6209);const l=r(4099);const u=r(6716);const h=r(332);const d=r(9740);const p=r(2517);const m=r(4711);const y=Symbol("onEntry");const g=Symbol("checkFs");const v=Symbol("checkFs2");const b=Symbol("pruneCache");const w=Symbol("isReusable");const E=Symbol("makeFs");const S=Symbol("file");const x=Symbol("directory");const R=Symbol("link");const P=Symbol("symlink");const O=Symbol("hardlink");const $=Symbol("unsupported");const A=Symbol("checkPath");const T=Symbol("mkdir");const C=Symbol("onError");const k=Symbol("pending");const I=Symbol("pend");const N=Symbol("unpend");const D=Symbol("ended");const L=Symbol("maybeClose");const M=Symbol("skip");const j=Symbol("doChown");const F=Symbol("uid");const U=Symbol("gid");const B=Symbol("checkedCwd");const H=r(6113);const z=r(9262);const G=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const V=G==="win32";const unlinkFile=(e,t)=>{if(!V){return i.unlink(e,t)}const r=e+".DELETE."+H.randomBytes(16).toString("hex");i.rename(e,r,(e=>{if(e){return t(e)}i.unlink(r,t)}))};const unlinkFileSync=e=>{if(!V){return i.unlinkSync(e)}const t=e+".DELETE."+H.randomBytes(16).toString("hex");i.renameSync(e,t);i.unlinkSync(t)};const uint32=(e,t,r)=>e===e>>>0?e:t===t>>>0?t:r;const cacheKeyNormalize=e=>p(d(m(e))).toLowerCase();const pruneCache=(e,t)=>{t=cacheKeyNormalize(t);for(const r of e.keys()){const s=cacheKeyNormalize(r);if(s===t||s.indexOf(t+"/")===0){e.delete(r)}}};const dropCache=e=>{for(const t of e.keys()){e.delete(t)}};class Unpack extends n{constructor(e){if(!e){e={}}e.ondone=e=>{this[D]=true;this[L]()};super(e);this[B]=false;this.reservations=u();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[k]=0;this[D]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number"){throw new TypeError("cannot set owner without number uid and gid")}if(e.preserveOwner){throw new TypeError("cannot preserve owner in archive and also set owner explicitly")}this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number"){this.preserveOwner=process.getuid&&process.getuid()===0}else{this.preserveOwner=!!e.preserveOwner}this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=e.forceChown===true;this.win32=!!e.win32||V;this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=d(a.resolve(e.cwd||process.cwd()));this.strip=+e.strip||0;this.processUmask=e.noChmod?0:process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",(e=>this[y](e)))}warn(e,t,r={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT"){r.recoverable=false}return super.warn(e,t,r)}[L](){if(this[D]&&this[k]===0){this.emit("prefinish");this.emit("finish");this.emit("end")}}[A](e){if(this.strip){const t=d(e.path).split("/");if(t.length<this.strip){return false}e.path=t.slice(this.strip).join("/");if(e.type==="Link"){const t=d(e.linkpath).split("/");if(t.length>=this.strip){e.linkpath=t.slice(this.strip).join("/")}else{return false}}}if(!this.preservePaths){const t=d(e.path);const r=t.split("/");if(r.includes("..")||V&&/^[a-z]:\.\.$/i.test(r[0])){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}const[s,n]=h(t);if(s){e.path=n;this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:e,path:t})}}if(a.isAbsolute(e.path)){e.absolute=d(a.resolve(e.path))}else{e.absolute=d(a.resolve(this.cwd,e.path))}if(!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd){this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:d(e.path),resolvedPath:e.absolute,cwd:this.cwd});return false}if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir"){return false}if(this.win32){const{root:t}=a.win32.parse(e.absolute);e.absolute=t+l.encode(e.absolute.slice(t.length));const{root:r}=a.win32.parse(e.path);e.path=r+l.encode(e.path.slice(r.length))}return true}[y](e){if(!this[A](e)){return e.resume()}s.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode){e.mode=e.mode|448}case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[g](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[$](e)}}[C](e,t){if(e.name==="CwdError"){this.emit("error",e)}else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[N]();t.resume()}}[T](e,t,r){c(d(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},r)}[j](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[F](e){return uint32(this.uid,e.uid,this.processUid)}[U](e){return uint32(this.gid,e.gid,this.processGid)}[S](e,t){const r=e.mode&4095||this.fmode;const s=new o.WriteStream(e.absolute,{flags:z(e.size),mode:r,autoClose:false});s.on("error",(r=>{if(s.fd){i.close(s.fd,(()=>{}))}s.write=()=>true;this[C](r,e);t()}));let n=1;const done=r=>{if(r){if(s.fd){i.close(s.fd,(()=>{}))}this[C](r,e);t();return}if(--n===0){i.close(s.fd,(r=>{if(r){this[C](r,e)}else{this[N]()}t()}))}};s.on("finish",(t=>{const r=e.absolute;const o=s.fd;if(e.mtime&&!this.noMtime){n++;const t=e.atime||new Date;const s=e.mtime;i.futimes(o,t,s,(e=>e?i.utimes(r,t,s,(t=>done(t&&e))):done()))}if(this[j](e)){n++;const t=this[F](e);const s=this[U](e);i.fchown(o,t,s,(e=>e?i.chown(r,t,s,(t=>done(t&&e))):done()))}done()}));const a=this.transform?this.transform(e)||e:e;if(a!==e){a.on("error",(r=>{this[C](r,e);t()}));e.pipe(a)}a.pipe(s)}[x](e,t){const r=e.mode&4095||this.dmode;this[T](e.absolute,r,(r=>{if(r){this[C](r,e);t();return}let s=1;const done=r=>{if(--s===0){t();this[N]();e.resume()}};if(e.mtime&&!this.noMtime){s++;i.utimes(e.absolute,e.atime||new Date,e.mtime,done)}if(this[j](e)){s++;i.chown(e.absolute,this[F](e),this[U](e),done)}done()}))}[$](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[P](e,t){this[R](e,e.linkpath,"symlink",t)}[O](e,t){const r=d(a.resolve(this.cwd,e.linkpath));this[R](e,r,"link",t)}[I](){this[k]++}[N](){this[k]--;this[L]()}[M](e){this[N]();e.resume()}[w](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!V}[g](e){this[I]();const t=[e.path];if(e.linkpath){t.push(e.linkpath)}this.reservations.reserve(t,(t=>this[v](e,t)))}[b](e){if(e.type==="SymbolicLink"){dropCache(this.dirCache)}else if(e.type!=="Directory"){pruneCache(this.dirCache,e.absolute)}}[v](e,t){this[b](e);const done=r=>{this[b](e);t(r)};const checkCwd=()=>{this[T](this.cwd,this.dmode,(t=>{if(t){this[C](t,e);done();return}this[B]=true;start()}))};const start=()=>{if(e.absolute!==this.cwd){const t=d(a.dirname(e.absolute));if(t!==this.cwd){return this[T](t,this.dmode,(t=>{if(t){this[C](t,e);done();return}afterMakeParent()}))}}afterMakeParent()};const afterMakeParent=()=>{i.lstat(e.absolute,((t,r)=>{if(r&&(this.keep||this.newer&&r.mtime>e.mtime)){this[M](e);done();return}if(t||this[w](e,r)){return this[E](null,e,done)}if(r.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(r.mode&4095)!==e.mode;const afterChmod=t=>this[E](t,e,done);if(!t){return afterChmod()}return i.chmod(e.absolute,e.mode,afterChmod)}if(e.absolute!==this.cwd){return i.rmdir(e.absolute,(t=>this[E](t,e,done)))}}if(e.absolute===this.cwd){return this[E](null,e,done)}unlinkFile(e.absolute,(t=>this[E](t,e,done)))}))};if(this[B]){start()}else{checkCwd()}}[E](e,t,r){if(e){this[C](e,t);r();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[S](t,r);case"Link":return this[O](t,r);case"SymbolicLink":return this[P](t,r);case"Directory":case"GNUDumpDir":return this[x](t,r)}}[R](e,t,r,s){i[r](t,e.absolute,(t=>{if(t){this[C](t,e)}else{this[N]();e.resume()}s()}))}}const callSync=e=>{try{return[null,e()]}catch(e){return[e,null]}};class UnpackSync extends Unpack{[E](e,t){return super[E](e,t,(()=>{}))}[g](e){this[b](e);if(!this[B]){const t=this[T](this.cwd,this.dmode);if(t){return this[C](t,e)}this[B]=true}if(e.absolute!==this.cwd){const t=d(a.dirname(e.absolute));if(t!==this.cwd){const r=this[T](t,this.dmode);if(r){return this[C](r,e)}}}const[t,r]=callSync((()=>i.lstatSync(e.absolute)));if(r&&(this.keep||this.newer&&r.mtime>e.mtime)){return this[M](e)}if(t||this[w](e,r)){return this[E](null,e)}if(r.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(r.mode&4095)!==e.mode;const[s]=t?callSync((()=>{i.chmodSync(e.absolute,e.mode)})):[];return this[E](s,e)}const[t]=callSync((()=>i.rmdirSync(e.absolute)));this[E](t,e)}const[s]=e.absolute===this.cwd?[]:callSync((()=>unlinkFileSync(e.absolute)));this[E](s,e)}[S](e,t){const r=e.mode&4095||this.fmode;const oner=r=>{let n;try{i.closeSync(s)}catch(e){n=e}if(r||n){this[C](r||n,e)}t()};let s;try{s=i.openSync(e.absolute,z(e.size),r)}catch(e){return oner(e)}const n=this.transform?this.transform(e)||e:e;if(n!==e){n.on("error",(t=>this[C](t,e)));e.pipe(n)}n.on("data",(e=>{try{i.writeSync(s,e,0,e.length)}catch(e){oner(e)}}));n.on("end",(t=>{let r=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const n=e.mtime;try{i.futimesSync(s,t,n)}catch(s){try{i.utimesSync(e.absolute,t,n)}catch(e){r=s}}}if(this[j](e)){const t=this[F](e);const n=this[U](e);try{i.fchownSync(s,t,n)}catch(s){try{i.chownSync(e.absolute,t,n)}catch(e){r=r||s}}}oner(r)}))}[x](e,t){const r=e.mode&4095||this.dmode;const s=this[T](e.absolute,r);if(s){this[C](s,e);t();return}if(e.mtime&&!this.noMtime){try{i.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(s){}}if(this[j](e)){try{i.chownSync(e.absolute,this[F](e),this[U](e))}catch(s){}}t();e.resume()}[T](e,t){try{return c.sync(d(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[R](e,t,r,s){try{i[r+"Sync"](t,e.absolute);s();e.resume()}catch(t){return this[C](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},9472:(e,t,r)=>{"use strict";const s=r(3831);const n=r(1138);e.exports=(e,t,r)=>{const i=s(e);if(!i.file){throw new TypeError("file is required")}if(i.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);mtimeFilter(i);return n(i,t,r)};const mtimeFilter=e=>{const t=e.filter;if(!e.mtimeCache){e.mtimeCache=new Map}e.filter=t?(r,s)=>t(r,s)&&!(e.mtimeCache.get(r)>s.mtime):(t,r)=>!(e.mtimeCache.get(t)>r.mtime)}},8920:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,r={}){if(this.file){r.file=this.file}if(this.cwd){r.cwd=this.cwd}r.code=t instanceof Error&&t.code||e;r.tarCode=e;if(!this.strict&&r.recoverable!==false){if(t instanceof Error){r=Object.assign(t,r);t=t.message}this.emit("warn",r.tarCode,t,r)}else if(t instanceof Error){this.emit("error",Object.assign(t,r))}else{this.emit("error",Object.assign(new Error(`${e}: ${t}`),r))}}}},4099:e=>{"use strict";const t=["|","<",">","?",":"];const r=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0))));const s=new Map(t.map(((e,t)=>[e,r[t]])));const n=new Map(r.map(((e,r)=>[e,t[r]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(s.get(t))),e),decode:e=>r.reduce(((e,t)=>e.split(t).join(n.get(t))),e)}},1944:(e,t,r)=>{"use strict";const{Minipass:s}=r(5540);const n=r(9037);const i=r(1703);const o=r(7147);const a=r(1017);const c=r(9740);const l=r(2517);const prefixPath=(e,t)=>{if(!t){return c(e)}e=c(e).replace(/^\.(\/|$)/,"");return l(t)+"/"+e};const u=16*1024*1024;const h=Symbol("process");const d=Symbol("file");const p=Symbol("directory");const m=Symbol("symlink");const y=Symbol("hardlink");const g=Symbol("header");const v=Symbol("read");const b=Symbol("lstat");const w=Symbol("onlstat");const E=Symbol("onread");const S=Symbol("onreadlink");const x=Symbol("openfile");const R=Symbol("onopenfile");const P=Symbol("close");const O=Symbol("mode");const $=Symbol("awaitDrain");const A=Symbol("ondrain");const T=Symbol("prefix");const C=Symbol("hadError");const k=r(8920);const I=r(4099);const N=r(332);const D=r(6601);const L=k(class WriteEntry extends s{constructor(e,t){t=t||{};super(t);if(typeof e!=="string"){throw new TypeError("path is required")}this.path=c(e);this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid()||0;this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||u;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=c(t.cwd||process.cwd());this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;this.prefix=t.prefix?c(t.prefix):null;this.fd=null;this.blockLen=null;this.blockRemain=null;this.buf=null;this.offset=null;this.length=null;this.pos=null;this.remain=null;if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let r=false;if(!this.preservePaths){const[e,t]=N(this.path);if(e){this.path=t;r=e}}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=I.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=c(t.absolute||a.resolve(this.cwd,e));if(this.path===""){this.path="./"}if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.statCache.has(this.absolute)){this[w](this.statCache.get(this.absolute))}else{this[b]()}}emit(e,...t){if(e==="error"){this[C]=true}return super.emit(e,...t)}[b](){o.lstat(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[w](t)}))}[w](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile()){e.size=0}this.type=getType(e);this.emit("stat",e);this[h]()}[h](){switch(this.type){case"File":return this[d]();case"Directory":return this[p]();case"SymbolicLink":return this[m]();default:return this.end()}}[O](e){return D(e,this.type==="Directory",this.portable)}[T](e){return prefixPath(e,this.prefix)}[g](){if(this.type==="Directory"&&this.portable){this.noMtime=true}this.header=new i({path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,mode:this[O](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax){super.write(new n({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode())}super.write(this.header.block)}[p](){if(this.path.slice(-1)!=="/"){this.path+="/"}this.stat.size=0;this[g]();this.end()}[m](){o.readlink(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[S](t)}))}[S](e){this.linkpath=c(e);this[g]();this.end()}[y](e){this.type="Link";this.linkpath=c(a.relative(this.cwd,e));this.stat.size=0;this[g]();this.end()}[d](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0){return this[y](t)}}this.linkCache.set(e,this.absolute)}this[g]();if(this.stat.size===0){return this.end()}this[x]()}[x](){o.open(this.absolute,"r",((e,t)=>{if(e){return this.emit("error",e)}this[R](t)}))}[R](e){this.fd=e;if(this[C]){return this[P]()}this.blockLen=512*Math.ceil(this.stat.size/512);this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t);this.offset=0;this.pos=0;this.remain=this.stat.size;this.length=this.buf.length;this[v]()}[v](){const{fd:e,buf:t,offset:r,length:s,pos:n}=this;o.read(e,t,r,s,n,((e,t)=>{if(e){return this[P]((()=>this.emit("error",e)))}this[E](t)}))}[P](e){o.close(this.fd,e)}[E](e){if(e<=0&&this.remain>0){const e=new Error("encountered unexpected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[P]((()=>this.emit("error",e)))}if(e>this.remain){const e=new Error("did not encounter expected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[P]((()=>this.emit("error",e)))}if(e===this.remain){for(let t=e;t<this.length&&e<this.blockRemain;t++){this.buf[t+this.offset]=0;e++;this.remain++}}const t=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);const r=this.write(t);if(!r){this[$]((()=>this[A]()))}else{this[A]()}}[$](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){const e=new Error("writing more data than expected");e.path=this.absolute;return this.emit("error",e)}this.remain-=e.length;this.blockRemain-=e.length;this.pos+=e.length;this.offset+=e.length;return super.write(e)}[A](){if(!this.remain){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return this[P]((e=>e?this.emit("error",e):this.end()))}if(this.offset>=this.length){this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length));this.offset=0}this.length=this.buf.length-this.offset;this[v]()}});class WriteEntrySync extends L{[b](){this[w](o.lstatSync(this.absolute))}[m](){this[S](o.readlinkSync(this.absolute))}[x](){this[R](o.openSync(this.absolute,"r"))}[v](){let e=true;try{const{fd:t,buf:r,offset:s,length:n,pos:i}=this;const a=o.readSync(t,r,s,n,i);this[E](a);e=false}finally{if(e){try{this[P]((()=>{}))}catch(e){}}}}[$](e){e()}[P](e){o.closeSync(this.fd);e()}}const M=k(class WriteEntryTar extends s{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable){this.noMtime=true}this.prefix=t.prefix||null;this.path=c(e.path);this.mode=this[O](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=c(e.linkpath);if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let r=false;if(!this.preservePaths){const[e,t]=N(this.path);if(e){this.path=t;r=e}}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new i({path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.header.encode()&&!this.noPax){super.write(new n({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode())}super.write(this.header.block);e.pipe(this)}[T](e){return prefixPath(e,this.prefix)}[O](e){return D(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return super.end()}});L.Sync=WriteEntrySync;L.Tar=M;const getType=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=L},3132:(e,t,r)=>{"use strict";const{Readable:s}=r(2781);const toReadableStream=e=>new s({read(){this.push(e);this.push(null)}});e.exports=toReadableStream;e.exports["default"]=toReadableStream},492:(e,t,r)=>{"use strict";
|
|
66
|
+
var o=i(4300);var a=o.Buffer;function copyProps(t,r){for(var i in t){r[i]=t[i]}}if(a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow){t.exports=o}else{copyProps(o,r);r.Buffer=SafeBuffer}function SafeBuffer(t,r,i){return a(t,r,i)}SafeBuffer.prototype=Object.create(a.prototype);copyProps(a,SafeBuffer);SafeBuffer.from=function(t,r,i){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return a(t,r,i)};SafeBuffer.alloc=function(t,r,i){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var o=a(t);if(r!==undefined){if(typeof i==="string"){o.fill(r,i)}else{o.fill(r)}}else{o.fill(0)}return o};SafeBuffer.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return a(t)};SafeBuffer.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return o.SlowBuffer(t)}},2485:(t,r,i)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(t,r){r=a(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}h("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}h("comp",this)}parse(t){const r=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR];const i=t.match(r);if(!i){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=i[1]!==undefined?i[1]:"";if(this.operator==="="){this.operator=""}if(!i[2]){this.semver=o}else{this.semver=new d(i[2],this.options.loose)}}toString(){return this.value}test(t){h("Comparator.test",t,this.options.loose);if(this.semver===o||t===o){return true}if(typeof t==="string"){try{t=new d(t,this.options)}catch(t){return false}}return u(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new p(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new p(this.value,r).test(t.semver)}const i=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">");const o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<");const a=this.semver.version===t.semver.version;const c=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<=");const l=u(this.semver,"<",t.semver,r)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<");const h=u(this.semver,">",t.semver,r)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return i||o||a&&c||l||h}}t.exports=Comparator;const a=i(3789);const{re:c,t:l}=i(4351);const u=i(2674);const h=i(5747);const d=i(7825);const p=i(7058)},7058:(t,r,i)=>{class Range{constructor(t,r){r=c(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof l){this.raw=t.value;this.set=[[t]];this.format();return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t;this.set=t.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${t}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.format()}format(){this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(t){t=t.trim();const r=Object.keys(this.options).join(",");const i=`parseRange:${r}:${t}`;const o=a.get(i);if(o){return o}const c=this.options.loose;const h=c?d[p.HYPHENRANGELOOSE]:d[p.HYPHENRANGE];t=t.replace(h,hyphenReplace(this.options.includePrerelease));u("hyphen replace",t);t=t.replace(d[p.COMPARATORTRIM],m);u("comparator trim",t);t=t.replace(d[p.TILDETRIM],y);t=t.replace(d[p.CARETTRIM],g);t=t.split(/\s+/).join(" ");let v=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(c){v=v.filter((t=>{u("loose invalid filter",t,this.options);return!!t.match(d[p.COMPARATORLOOSE])}))}u("range list",v);const b=new Map;const w=v.map((t=>new l(t,this.options)));for(const t of w){if(isNullSet(t)){return[t]}b.set(t.value,t)}if(b.size>1&&b.has("")){b.delete("")}const E=[...b.values()];a.set(i,E);return E}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((i=>isSatisfiable(i,r)&&t.set.some((t=>isSatisfiable(t,r)&&i.every((i=>t.every((t=>i.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new h(t,this.options)}catch(t){return false}}for(let r=0;r<this.set.length;r++){if(testSet(this.set[r],t,this.options)){return true}}return false}}t.exports=Range;const o=i(8443);const a=new o({max:1e3});const c=i(3789);const l=i(2485);const u=i(5747);const h=i(7825);const{re:d,t:p,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:g}=i(4351);const isNullSet=t=>t.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let i=true;const o=t.slice();let a=o.pop();while(i&&o.length){i=o.every((t=>a.intersects(t,r)));a=o.pop()}return i};const parseComparator=(t,r)=>{u("comp",t,r);t=replaceCarets(t,r);u("caret",t);t=replaceTildes(t,r);u("tildes",t);t=replaceXRanges(t,r);u("xrange",t);t=replaceStars(t,r);u("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const i=r.loose?d[p.TILDELOOSE]:d[p.TILDE];return t.replace(i,((r,i,o,a,c)=>{u("tilde",t,r,i,o,a,c);let l;if(isX(i)){l=""}else if(isX(o)){l=`>=${i}.0.0 <${+i+1}.0.0-0`}else if(isX(a)){l=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`}else if(c){u("replaceTilde pr",c);l=`>=${i}.${o}.${a}-${c} <${i}.${+o+1}.0-0`}else{l=`>=${i}.${o}.${a} <${i}.${+o+1}.0-0`}u("tilde return",l);return l}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{u("caret",t,r);const i=r.loose?d[p.CARETLOOSE]:d[p.CARET];const o=r.includePrerelease?"-0":"";return t.replace(i,((r,i,a,c,l)=>{u("caret",t,r,i,a,c,l);let h;if(isX(i)){h=""}else if(isX(a)){h=`>=${i}.0.0${o} <${+i+1}.0.0-0`}else if(isX(c)){if(i==="0"){h=`>=${i}.${a}.0${o} <${i}.${+a+1}.0-0`}else{h=`>=${i}.${a}.0${o} <${+i+1}.0.0-0`}}else if(l){u("replaceCaret pr",l);if(i==="0"){if(a==="0"){h=`>=${i}.${a}.${c}-${l} <${i}.${a}.${+c+1}-0`}else{h=`>=${i}.${a}.${c}-${l} <${i}.${+a+1}.0-0`}}else{h=`>=${i}.${a}.${c}-${l} <${+i+1}.0.0-0`}}else{u("no pr");if(i==="0"){if(a==="0"){h=`>=${i}.${a}.${c}${o} <${i}.${a}.${+c+1}-0`}else{h=`>=${i}.${a}.${c}${o} <${i}.${+a+1}.0-0`}}else{h=`>=${i}.${a}.${c} <${+i+1}.0.0-0`}}u("caret return",h);return h}))};const replaceXRanges=(t,r)=>{u("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const i=r.loose?d[p.XRANGELOOSE]:d[p.XRANGE];return t.replace(i,((i,o,a,c,l,h)=>{u("xRange",t,i,o,a,c,l,h);const d=isX(a);const p=d||isX(c);const m=p||isX(l);const y=m;if(o==="="&&y){o=""}h=r.includePrerelease?"-0":"";if(d){if(o===">"||o==="<"){i="<0.0.0-0"}else{i="*"}}else if(o&&y){if(p){c=0}l=0;if(o===">"){o=">=";if(p){a=+a+1;c=0;l=0}else{c=+c+1;l=0}}else if(o==="<="){o="<";if(p){a=+a+1}else{c=+c+1}}if(o==="<"){h="-0"}i=`${o+a}.${c}.${l}${h}`}else if(p){i=`>=${a}.0.0${h} <${+a+1}.0.0-0`}else if(m){i=`>=${a}.${c}.0${h} <${a}.${+c+1}.0-0`}u("xRange return",i);return i}))};const replaceStars=(t,r)=>{u("replaceStars",t,r);return t.trim().replace(d[p.STAR],"")};const replaceGTE0=(t,r)=>{u("replaceGTE0",t,r);return t.trim().replace(d[r.includePrerelease?p.GTE0PRE:p.GTE0],"")};const hyphenReplace=t=>(r,i,o,a,c,l,u,h,d,p,m,y,g)=>{if(isX(o)){i=""}else if(isX(a)){i=`>=${o}.0.0${t?"-0":""}`}else if(isX(c)){i=`>=${o}.${a}.0${t?"-0":""}`}else if(l){i=`>=${i}`}else{i=`>=${i}${t?"-0":""}`}if(isX(d)){h=""}else if(isX(p)){h=`<${+d+1}.0.0-0`}else if(isX(m)){h=`<${d}.${+p+1}.0-0`}else if(y){h=`<=${d}.${p}.${m}-${y}`}else if(t){h=`<${d}.${p}.${+m+1}-0`}else{h=`<=${h}`}return`${i} ${h}`.trim()};const testSet=(t,r,i)=>{for(let i=0;i<t.length;i++){if(!t[i].test(r)){return false}}if(r.prerelease.length&&!i.includePrerelease){for(let i=0;i<t.length;i++){u(t[i].semver);if(t[i].semver===l.ANY){continue}if(t[i].semver.prerelease.length>0){const o=t[i].semver;if(o.major===r.major&&o.minor===r.minor&&o.patch===r.patch){return true}}}return false}return true}},7825:(t,r,i)=>{const o=i(5747);const{MAX_LENGTH:a,MAX_SAFE_INTEGER:c}=i(8147);const{re:l,t:u}=i(4351);const h=i(3789);const{compareIdentifiers:d}=i(8307);class SemVer{constructor(t,r){r=h(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid Version: ${t}`)}if(t.length>a){throw new TypeError(`version is longer than ${a} characters`)}o("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const i=t.trim().match(r.loose?l[u.LOOSE]:l[u.FULL]);if(!i){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+i[1];this.minor=+i[2];this.patch=+i[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!i[4]){this.prerelease=[]}else{this.prerelease=i[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&r<c){return r}}return t}))}this.build=i[5]?i[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(t){o("SemVer.compare",this.version,this.options,t);if(!(t instanceof SemVer)){if(typeof t==="string"&&t===this.version){return 0}t=new SemVer(t,this.options)}if(t.version===this.version){return 0}return this.compareMain(t)||this.comparePre(t)}compareMain(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}return d(this.major,t.major)||d(this.minor,t.minor)||d(this.patch,t.patch)}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let r=0;do{const i=this.prerelease[r];const a=t.prerelease[r];o("prerelease compare",r,i,a);if(i===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(i===undefined){return-1}else if(i===a){continue}else{return d(i,a)}}while(++r)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let r=0;do{const i=this.build[r];const a=t.build[r];o("prerelease compare",r,i,a);if(i===undefined&&a===undefined){return 0}else if(a===undefined){return 1}else if(i===undefined){return-1}else if(i===a){continue}else{return d(i,a)}}while(++r)}inc(t,r){switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r);this.inc("pre",r);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",r)}this.inc("pre",r);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{let t=this.prerelease.length;while(--t>=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1){this.prerelease.push(0)}}if(r){if(d(this.prerelease[0],r)===0){if(isNaN(this.prerelease[1])){this.prerelease=[r,0]}}else{this.prerelease=[r,0]}}break;default:throw new Error(`invalid increment argument: ${t}`)}this.format();this.raw=this.version;return this}}t.exports=SemVer},6869:(t,r,i)=>{const o=i(4770);const clean=(t,r)=>{const i=o(t.trim().replace(/^[=v]+/,""),r);return i?i.version:null};t.exports=clean},2674:(t,r,i)=>{const o=i(112);const a=i(4182);const c=i(2062);const l=i(6503);const u=i(1004);const h=i(3285);const cmp=(t,r,i,d)=>{switch(r){case"===":if(typeof t==="object"){t=t.version}if(typeof i==="object"){i=i.version}return t===i;case"!==":if(typeof t==="object"){t=t.version}if(typeof i==="object"){i=i.version}return t!==i;case"":case"=":case"==":return o(t,i,d);case"!=":return a(t,i,d);case">":return c(t,i,d);case">=":return l(t,i,d);case"<":return u(t,i,d);case"<=":return h(t,i,d);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},9608:(t,r,i)=>{const o=i(7825);const a=i(4770);const{re:c,t:l}=i(4351);const coerce=(t,r)=>{if(t instanceof o){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let i=null;if(!r.rtl){i=t.match(c[l.COERCE])}else{let r;while((r=c[l.COERCERTL].exec(t))&&(!i||i.index+i[0].length!==t.length)){if(!i||r.index+r[0].length!==i.index+i[0].length){i=r}c[l.COERCERTL].lastIndex=r.index+r[1].length+r[2].length}c[l.COERCERTL].lastIndex=-1}if(i===null){return null}return a(`${i[2]}.${i[3]||"0"}.${i[4]||"0"}`,r)};t.exports=coerce},9874:(t,r,i)=>{const o=i(7825);const compareBuild=(t,r,i)=>{const a=new o(t,i);const c=new o(r,i);return a.compare(c)||a.compareBuild(c)};t.exports=compareBuild},8325:(t,r,i)=>{const o=i(1878);const compareLoose=(t,r)=>o(t,r,true);t.exports=compareLoose},1878:(t,r,i)=>{const o=i(7825);const compare=(t,r,i)=>new o(t,i).compare(new o(r,i));t.exports=compare},2464:(t,r,i)=>{const o=i(4770);const a=i(112);const diff=(t,r)=>{if(a(t,r)){return null}else{const i=o(t);const a=o(r);const c=i.prerelease.length||a.prerelease.length;const l=c?"pre":"";const u=c?"prerelease":"";for(const t in i){if(t==="major"||t==="minor"||t==="patch"){if(i[t]!==a[t]){return l+t}}}return u}};t.exports=diff},112:(t,r,i)=>{const o=i(1878);const eq=(t,r,i)=>o(t,r,i)===0;t.exports=eq},2062:(t,r,i)=>{const o=i(1878);const gt=(t,r,i)=>o(t,r,i)>0;t.exports=gt},6503:(t,r,i)=>{const o=i(1878);const gte=(t,r,i)=>o(t,r,i)>=0;t.exports=gte},6223:(t,r,i)=>{const o=i(7825);const inc=(t,r,i,a)=>{if(typeof i==="string"){a=i;i=undefined}try{return new o(t instanceof o?t.version:t,i).inc(r,a).version}catch(t){return null}};t.exports=inc},1004:(t,r,i)=>{const o=i(1878);const lt=(t,r,i)=>o(t,r,i)<0;t.exports=lt},3285:(t,r,i)=>{const o=i(1878);const lte=(t,r,i)=>o(t,r,i)<=0;t.exports=lte},6851:(t,r,i)=>{const o=i(7825);const major=(t,r)=>new o(t,r).major;t.exports=major},7443:(t,r,i)=>{const o=i(7825);const minor=(t,r)=>new o(t,r).minor;t.exports=minor},4182:(t,r,i)=>{const o=i(1878);const neq=(t,r,i)=>o(t,r,i)!==0;t.exports=neq},4770:(t,r,i)=>{const{MAX_LENGTH:o}=i(8147);const{re:a,t:c}=i(4351);const l=i(7825);const u=i(3789);const parse=(t,r)=>{r=u(r);if(t instanceof l){return t}if(typeof t!=="string"){return null}if(t.length>o){return null}const i=r.loose?a[c.LOOSE]:a[c.FULL];if(!i.test(t)){return null}try{return new l(t,r)}catch(t){return null}};t.exports=parse},1550:(t,r,i)=>{const o=i(7825);const patch=(t,r)=>new o(t,r).patch;t.exports=patch},3340:(t,r,i)=>{const o=i(4770);const prerelease=(t,r)=>{const i=o(t,r);return i&&i.prerelease.length?i.prerelease:null};t.exports=prerelease},3119:(t,r,i)=>{const o=i(1878);const rcompare=(t,r,i)=>o(r,t,i);t.exports=rcompare},3379:(t,r,i)=>{const o=i(9874);const rsort=(t,r)=>t.sort(((t,i)=>o(i,t,r)));t.exports=rsort},4140:(t,r,i)=>{const o=i(7058);const satisfies=(t,r,i)=>{try{r=new o(r,i)}catch(t){return false}return r.test(t)};t.exports=satisfies},7408:(t,r,i)=>{const o=i(9874);const sort=(t,r)=>t.sort(((t,i)=>o(t,i,r)));t.exports=sort},8994:(t,r,i)=>{const o=i(4770);const valid=(t,r)=>{const i=o(t,r);return i?i.version:null};t.exports=valid},1452:(t,r,i)=>{const o=i(4351);const a=i(8147);const c=i(7825);const l=i(8307);const u=i(4770);const h=i(8994);const d=i(6869);const p=i(6223);const m=i(2464);const y=i(6851);const g=i(7443);const v=i(1550);const b=i(3340);const w=i(1878);const E=i(3119);const S=i(8325);const x=i(9874);const R=i(7408);const P=i(3379);const $=i(2062);const O=i(1004);const T=i(112);const A=i(4182);const C=i(6503);const k=i(3285);const I=i(2674);const N=i(9608);const D=i(2485);const L=i(7058);const M=i(4140);const j=i(8478);const U=i(4430);const B=i(4510);const H=i(2582);const z=i(4499);const V=i(3766);const G=i(3773);const q=i(8626);const K=i(4298);const W=i(6023);const Y=i(5701);t.exports={parse:u,valid:h,clean:d,inc:p,diff:m,major:y,minor:g,patch:v,prerelease:b,compare:w,rcompare:E,compareLoose:S,compareBuild:x,sort:R,rsort:P,gt:$,lt:O,eq:T,neq:A,gte:C,lte:k,cmp:I,coerce:N,Comparator:D,Range:L,satisfies:M,toComparators:j,maxSatisfying:U,minSatisfying:B,minVersion:H,validRange:z,outside:V,gtr:G,ltr:q,intersects:K,simplifyRange:W,subset:Y,SemVer:c,re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,compareIdentifiers:l.compareIdentifiers,rcompareIdentifiers:l.rcompareIdentifiers}},8147:t=>{const r="2.0.0";const i=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const a=16;t.exports={SEMVER_SPEC_VERSION:r,MAX_LENGTH:i,MAX_SAFE_INTEGER:o,MAX_SAFE_COMPONENT_LENGTH:a}},5747:t=>{const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},8307:t=>{const r=/^[0-9]+$/;const compareIdentifiers=(t,i)=>{const o=r.test(t);const a=r.test(i);if(o&&a){t=+t;i=+i}return t===i?0:o&&!a?-1:a&&!o?1:t<i?-1:1};const rcompareIdentifiers=(t,r)=>compareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},3789:t=>{const r=["includePrerelease","loose","rtl"];const parseOptions=t=>!t?{}:typeof t!=="object"?{loose:true}:r.filter((r=>t[r])).reduce(((t,r)=>{t[r]=true;return t}),{});t.exports=parseOptions},4351:(t,r,i)=>{const{MAX_SAFE_COMPONENT_LENGTH:o}=i(8147);const a=i(5747);r=t.exports={};const c=r.re=[];const l=r.src=[];const u=r.t={};let h=0;const createToken=(t,r,i)=>{const o=h++;a(t,o,r);u[t]=o;l[o]=r;c[o]=new RegExp(r,i?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.`+`(${l[u.NUMERICIDENTIFIER]})\\.`+`(${l[u.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.`+`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.`+`(${l[u.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`);createToken("FULL",`^${l[u.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`);createToken("LOOSE",`^${l[u.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})`+`(?:\\.(${l[u.XRANGEIDENTIFIER]})`+`(?:\\.(${l[u.XRANGEIDENTIFIER]})`+`(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})`+`(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",l[u.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${l[u.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${l[u.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},3773:(t,r,i)=>{const o=i(3766);const gtr=(t,r,i)=>o(t,r,">",i);t.exports=gtr},4298:(t,r,i)=>{const o=i(7058);const intersects=(t,r,i)=>{t=new o(t,i);r=new o(r,i);return t.intersects(r)};t.exports=intersects},8626:(t,r,i)=>{const o=i(3766);const ltr=(t,r,i)=>o(t,r,"<",i);t.exports=ltr},4430:(t,r,i)=>{const o=i(7825);const a=i(7058);const maxSatisfying=(t,r,i)=>{let c=null;let l=null;let u=null;try{u=new a(r,i)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||l.compare(t)===-1){c=t;l=new o(c,i)}}}));return c};t.exports=maxSatisfying},4510:(t,r,i)=>{const o=i(7825);const a=i(7058);const minSatisfying=(t,r,i)=>{let c=null;let l=null;let u=null;try{u=new a(r,i)}catch(t){return null}t.forEach((t=>{if(u.test(t)){if(!c||l.compare(t)===1){c=t;l=new o(c,i)}}}));return c};t.exports=minSatisfying},2582:(t,r,i)=>{const o=i(7825);const a=i(7058);const c=i(2062);const minVersion=(t,r)=>{t=new a(t,r);let i=new o("0.0.0");if(t.test(i)){return i}i=new o("0.0.0-0");if(t.test(i)){return i}i=null;for(let r=0;r<t.set.length;++r){const a=t.set[r];let l=null;a.forEach((t=>{const r=new o(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!l||c(r,l)){l=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(l&&(!i||c(i,l))){i=l}}if(i&&t.test(i)){return i}return null};t.exports=minVersion},3766:(t,r,i)=>{const o=i(7825);const a=i(2485);const{ANY:c}=a;const l=i(7058);const u=i(4140);const h=i(2062);const d=i(1004);const p=i(3285);const m=i(6503);const outside=(t,r,i,y)=>{t=new o(t,y);r=new l(r,y);let g,v,b,w,E;switch(i){case">":g=h;v=p;b=d;w=">";E=">=";break;case"<":g=d;v=m;b=h;w="<";E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(t,r,y)){return false}for(let i=0;i<r.set.length;++i){const o=r.set[i];let l=null;let u=null;o.forEach((t=>{if(t.semver===c){t=new a(">=0.0.0")}l=l||t;u=u||t;if(g(t.semver,l.semver,y)){l=t}else if(b(t.semver,u.semver,y)){u=t}}));if(l.operator===w||l.operator===E){return false}if((!u.operator||u.operator===w)&&v(t,u.semver)){return false}else if(u.operator===E&&b(t,u.semver)){return false}}return true};t.exports=outside},6023:(t,r,i)=>{const o=i(4140);const a=i(1878);t.exports=(t,r,i)=>{const c=[];let l=null;let u=null;const h=t.sort(((t,r)=>a(t,r,i)));for(const t of h){const a=o(t,r,i);if(a){u=t;if(!l){l=t}}else{if(u){c.push([l,u])}u=null;l=null}}if(l){c.push([l,null])}const d=[];for(const[t,r]of c){if(t===r){d.push(t)}else if(!r&&t===h[0]){d.push("*")}else if(!r){d.push(`>=${t}`)}else if(t===h[0]){d.push(`<=${r}`)}else{d.push(`${t} - ${r}`)}}const p=d.join(" || ");const m=typeof r.raw==="string"?r.raw:String(r);return p.length<m.length?p:r}},5701:(t,r,i)=>{const o=i(7058);const a=i(2485);const{ANY:c}=a;const l=i(4140);const u=i(1878);const subset=(t,r,i={})=>{if(t===r){return true}t=new o(t,i);r=new o(r,i);let a=false;e:for(const o of t.set){for(const t of r.set){const r=simpleSubset(o,t,i);a=a||r!==null;if(r){continue e}}if(a){return false}}return true};const simpleSubset=(t,r,i)=>{if(t===r){return true}if(t.length===1&&t[0].semver===c){if(r.length===1&&r[0].semver===c){return true}else if(i.includePrerelease){t=[new a(">=0.0.0-0")]}else{t=[new a(">=0.0.0")]}}if(r.length===1&&r[0].semver===c){if(i.includePrerelease){return true}else{r=[new a(">=0.0.0")]}}const o=new Set;let h,d;for(const r of t){if(r.operator===">"||r.operator===">="){h=higherGT(h,r,i)}else if(r.operator==="<"||r.operator==="<="){d=lowerLT(d,r,i)}else{o.add(r.semver)}}if(o.size>1){return null}let p;if(h&&d){p=u(h.semver,d.semver,i);if(p>0){return null}else if(p===0&&(h.operator!==">="||d.operator!=="<=")){return null}}for(const t of o){if(h&&!l(t,String(h),i)){return null}if(d&&!l(t,String(d),i)){return null}for(const o of r){if(!l(t,String(o),i)){return false}}return true}let m,y;let g,v;let b=d&&!i.includePrerelease&&d.semver.prerelease.length?d.semver:false;let w=h&&!i.includePrerelease&&h.semver.prerelease.length?h.semver:false;if(b&&b.prerelease.length===1&&d.operator==="<"&&b.prerelease[0]===0){b=false}for(const t of r){v=v||t.operator===">"||t.operator===">=";g=g||t.operator==="<"||t.operator==="<=";if(h){if(w){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===w.major&&t.semver.minor===w.minor&&t.semver.patch===w.patch){w=false}}if(t.operator===">"||t.operator===">="){m=higherGT(h,t,i);if(m===t&&m!==h){return false}}else if(h.operator===">="&&!l(h.semver,String(t),i)){return false}}if(d){if(b){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===b.major&&t.semver.minor===b.minor&&t.semver.patch===b.patch){b=false}}if(t.operator==="<"||t.operator==="<="){y=lowerLT(d,t,i);if(y===t&&y!==d){return false}}else if(d.operator==="<="&&!l(d.semver,String(t),i)){return false}}if(!t.operator&&(d||h)&&p!==0){return false}}if(h&&g&&!d&&p!==0){return false}if(d&&v&&!h&&p!==0){return false}if(w||b){return false}return true};const higherGT=(t,r,i)=>{if(!t){return r}const o=u(t.semver,r.semver,i);return o>0?t:o<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,i)=>{if(!t){return r}const o=u(t.semver,r.semver,i);return o<0?t:o>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},8478:(t,r,i)=>{const o=i(7058);const toComparators=(t,r)=>new o(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},4499:(t,r,i)=>{const o=i(7058);const validRange=(t,r)=>{try{return new o(t,r).range||"*"}catch(t){return null}};t.exports=validRange},530:(t,r,i)=>{"use strict";const o=i(4401);t.exports=(t="")=>{const r=t.match(o);if(!r){return null}const[i,a]=r[0].replace(/#! ?/,"").split(" ");const c=i.split("/").pop();if(c==="env"){return a}return a?`${c} ${a}`:c}},4401:t=>{"use strict";t.exports=/^#!(.*)/},1407:t=>{"use strict";const r="";const i=`${r}[`;const o="";const a={to(t,r){if(!r)return`${i}${t+1}G`;return`${i}${r+1};${t+1}H`},move(t,r){let o="";if(t<0)o+=`${i}${-t}D`;else if(t>0)o+=`${i}${t}C`;if(r<0)o+=`${i}${-r}A`;else if(r>0)o+=`${i}${r}B`;return o},up:(t=1)=>`${i}${t}A`,down:(t=1)=>`${i}${t}B`,forward:(t=1)=>`${i}${t}C`,backward:(t=1)=>`${i}${t}D`,nextLine:(t=1)=>`${i}E`.repeat(t),prevLine:(t=1)=>`${i}F`.repeat(t),left:`${i}G`,hide:`${i}?25l`,show:`${i}?25h`,save:`${r}7`,restore:`${r}8`};const c={up:(t=1)=>`${i}S`.repeat(t),down:(t=1)=>`${i}T`.repeat(t)};const l={screen:`${i}2J`,up:(t=1)=>`${i}1J`.repeat(t),down:(t=1)=>`${i}J`.repeat(t),line:`${i}2K`,lineEnd:`${i}K`,lineStart:`${i}1K`,lines(t){let r="";for(let i=0;i<t;i++)r+=this.line+(i<t-1?a.up():"");if(t)r+=a.left;return r}};t.exports={cursor:a,scroll:c,erase:l,beep:o}},2251:t=>{"use strict";var r=1;var i=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,r,i){return t.slice(r,i).replace(/\S/g," ")}t.exports=function(t,o){o=o||{};var a;var c;var l=false;var u=false;var h=0;var d="";var p=o.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var m=0;m<t.length;m++){a=t[m];c=t[m+1];if(!u&&a==='"'){var y=t[m-1]==="\\"&&t[m-2]!=="\\";if(!y){l=!l}}if(l){continue}if(!u&&a+c==="//"){d+=t.slice(h,m);h=m;u=r;m++}else if(u===r&&a+c==="\r\n"){m++;u=false;d+=p(t,h,m);h=m;continue}else if(u===r&&a==="\n"){u=false;d+=p(t,h,m);h=m}else if(!u&&a+c==="/*"){d+=t.slice(h,m);h=m;u=i;m++;continue}else if(u===i&&a+c==="*/"){m++;u=false;d+=p(t,h,m+1);h=m+1;continue}}return d+(u?p(t.substr(h)):t.substr(h))}},5255:(t,r,i)=>{"use strict";r.c=r.create=i(7585);r.r=r.replace=i(1138);r.t=r.list=i(4975);r.u=r.update=i(9472);r.x=r.extract=i(9985);r.Pack=i(7301);r.Unpack=i(5951);r.Parse=i(5222);r.ReadEntry=i(5917);r.WriteEntry=i(1944);r.Header=i(1703);r.Pax=i(9037);r.types=i(1046)},7585:(t,r,i)=>{"use strict";const o=i(3831);const a=i(7301);const c=i(644);const l=i(4975);const u=i(1017);t.exports=(t,r,i)=>{if(typeof r==="function"){i=r}if(Array.isArray(t)){r=t,t={}}if(!r||!Array.isArray(r)||!r.length){throw new TypeError("no files or directories specified")}r=Array.from(r);const a=o(t);if(a.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!a.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}return a.file&&a.sync?createFileSync(a,r):a.file?createFile(a,r,i):a.sync?createSync(a,r):create(a,r)};const createFileSync=(t,r)=>{const i=new a.Sync(t);const o=new c.WriteStreamSync(t.file,{mode:t.mode||438});i.pipe(o);addFilesSync(i,r)};const createFile=(t,r,i)=>{const o=new a(t);const l=new c.WriteStream(t.file,{mode:t.mode||438});o.pipe(l);const u=new Promise(((t,r)=>{l.on("error",r);l.on("close",t);o.on("error",r)}));addFilesAsync(o,r);return i?u.then(i,i):u};const addFilesSync=(t,r)=>{r.forEach((r=>{if(r.charAt(0)==="@"){l({file:u.resolve(t.cwd,r.slice(1)),sync:true,noResume:true,onentry:r=>t.add(r)})}else{t.add(r)}}));t.end()};const addFilesAsync=(t,r)=>{while(r.length){const i=r.shift();if(i.charAt(0)==="@"){return l({file:u.resolve(t.cwd,i.slice(1)),noResume:true,onentry:r=>t.add(r)}).then((i=>addFilesAsync(t,r)))}else{t.add(i)}}t.end()};const createSync=(t,r)=>{const i=new a.Sync(t);addFilesSync(i,r);return i};const create=(t,r)=>{const i=new a(t);addFilesAsync(i,r);return i}},9985:(t,r,i)=>{"use strict";const o=i(3831);const a=i(5951);const c=i(7147);const l=i(644);const u=i(1017);const h=i(2517);t.exports=(t,r,i)=>{if(typeof t==="function"){i=t,r=null,t={}}else if(Array.isArray(t)){r=t,t={}}if(typeof r==="function"){i=r,r=null}if(!r){r=[]}else{r=Array.from(r)}const a=o(t);if(a.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!a.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}if(r.length){filesFilter(a,r)}return a.file&&a.sync?extractFileSync(a):a.file?extractFile(a,i):a.sync?extractSync(a):extract(a)};const filesFilter=(t,r)=>{const i=new Map(r.map((t=>[h(t),true])));const o=t.filter;const mapHas=(t,r)=>{const o=r||u.parse(t).root||".";const a=t===o?false:i.has(t)?i.get(t):mapHas(u.dirname(t),o);i.set(t,a);return a};t.filter=o?(t,r)=>o(t,r)&&mapHas(h(t)):t=>mapHas(h(t))};const extractFileSync=t=>{const r=new a.Sync(t);const i=t.file;const o=c.statSync(i);const u=t.maxReadSize||16*1024*1024;const h=new l.ReadStreamSync(i,{readSize:u,size:o.size});h.pipe(r)};const extractFile=(t,r)=>{const i=new a(t);const o=t.maxReadSize||16*1024*1024;const u=t.file;const h=new Promise(((t,r)=>{i.on("error",r);i.on("close",t);c.stat(u,((t,a)=>{if(t){r(t)}else{const t=new l.ReadStream(u,{readSize:o,size:a.size});t.on("error",r);t.pipe(i)}}))}));return r?h.then(r,r):h};const extractSync=t=>new a.Sync(t);const extract=t=>new a(t)},9262:(t,r,i)=>{const o=process.env.__FAKE_PLATFORM__||process.platform;const a=o==="win32";const c=global.__FAKE_TESTING_FS__||i(7147);const{O_CREAT:l,O_TRUNC:u,O_WRONLY:h,UV_FS_O_FILEMAP:d=0}=c.constants;const p=a&&!!d;const m=512*1024;const y=d|u|l|h;t.exports=!p?()=>"w":t=>t<m?y:"w"},1703:(t,r,i)=>{"use strict";const o=i(1046);const a=i(1017).posix;const c=i(2933);const l=Symbol("slurp");const u=Symbol("type");class Header{constructor(t,r,i,o){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[u]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(t)){this.decode(t,r||0,i,o)}else if(t){this.set(t)}}decode(t,r,i,o){if(!r){r=0}if(!t||!(t.length>=r+512)){throw new Error("need 512 bytes for header")}this.path=decString(t,r,100);this.mode=decNumber(t,r+100,8);this.uid=decNumber(t,r+108,8);this.gid=decNumber(t,r+116,8);this.size=decNumber(t,r+124,12);this.mtime=decDate(t,r+136,12);this.cksum=decNumber(t,r+148,12);this[l](i);this[l](o,true);this[u]=decString(t,r+156,1);if(this[u]===""){this[u]="0"}if(this[u]==="0"&&this.path.slice(-1)==="/"){this[u]="5"}if(this[u]==="5"){this.size=0}this.linkpath=decString(t,r+157,100);if(t.slice(r+257,r+265).toString()==="ustar\x0000"){this.uname=decString(t,r+265,32);this.gname=decString(t,r+297,32);this.devmaj=decNumber(t,r+329,8);this.devmin=decNumber(t,r+337,8);if(t[r+475]!==0){const i=decString(t,r+345,155);this.path=i+"/"+this.path}else{const i=decString(t,r+345,130);if(i){this.path=i+"/"+this.path}this.atime=decDate(t,r+476,12);this.ctime=decDate(t,r+488,12)}}let a=8*32;for(let i=r;i<r+148;i++){a+=t[i]}for(let i=r+156;i<r+512;i++){a+=t[i]}this.cksumValid=a===this.cksum;if(this.cksum===null&&a===8*32){this.nullBlock=true}}[l](t,r){for(const i in t){if(t[i]!==null&&t[i]!==undefined&&!(r&&i==="path")){this[i]=t[i]}}}encode(t,r){if(!t){t=this.block=Buffer.alloc(512);r=0}if(!r){r=0}if(!(t.length>=r+512)){throw new Error("need 512 bytes for header")}const i=this.ctime||this.atime?130:155;const o=splitPrefix(this.path||"",i);const a=o[0];const c=o[1];this.needPax=o[2];this.needPax=encString(t,r,100,a)||this.needPax;this.needPax=encNumber(t,r+100,8,this.mode)||this.needPax;this.needPax=encNumber(t,r+108,8,this.uid)||this.needPax;this.needPax=encNumber(t,r+116,8,this.gid)||this.needPax;this.needPax=encNumber(t,r+124,12,this.size)||this.needPax;this.needPax=encDate(t,r+136,12,this.mtime)||this.needPax;t[r+156]=this[u].charCodeAt(0);this.needPax=encString(t,r+157,100,this.linkpath)||this.needPax;t.write("ustar\x0000",r+257,8);this.needPax=encString(t,r+265,32,this.uname)||this.needPax;this.needPax=encString(t,r+297,32,this.gname)||this.needPax;this.needPax=encNumber(t,r+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(t,r+337,8,this.devmin)||this.needPax;this.needPax=encString(t,r+345,i,c)||this.needPax;if(t[r+475]!==0){this.needPax=encString(t,r+345,155,c)||this.needPax}else{this.needPax=encString(t,r+345,130,c)||this.needPax;this.needPax=encDate(t,r+476,12,this.atime)||this.needPax;this.needPax=encDate(t,r+488,12,this.ctime)||this.needPax}let l=8*32;for(let i=r;i<r+148;i++){l+=t[i]}for(let i=r+156;i<r+512;i++){l+=t[i]}this.cksum=l;encNumber(t,r+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(t){for(const r in t){if(t[r]!==null&&t[r]!==undefined){this[r]=t[r]}}}get type(){return o.name.get(this[u])||this[u]}get typeKey(){return this[u]}set type(t){if(o.code.has(t)){this[u]=o.code.get(t)}else{this[u]=t}}}const splitPrefix=(t,r)=>{const i=100;let o=t;let c="";let l;const u=a.parse(t).root||".";if(Buffer.byteLength(o)<i){l=[o,c,false]}else{c=a.dirname(o);o=a.basename(o);do{if(Buffer.byteLength(o)<=i&&Buffer.byteLength(c)<=r){l=[o,c,false]}else if(Buffer.byteLength(o)>i&&Buffer.byteLength(c)<=r){l=[o.slice(0,i-1),c,true]}else{o=a.join(a.basename(c),o);c=a.dirname(c)}}while(c!==u&&!l);if(!l){l=[t.slice(0,i-1),"",true]}}return l};const decString=(t,r,i)=>t.slice(r,r+i).toString("utf8").replace(/\0.*/,"");const decDate=(t,r,i)=>numToDate(decNumber(t,r,i));const numToDate=t=>t===null?null:new Date(t*1e3);const decNumber=(t,r,i)=>t[r]&128?c.parse(t.slice(r,r+i)):decSmallNumber(t,r,i);const nanNull=t=>isNaN(t)?null:t;const decSmallNumber=(t,r,i)=>nanNull(parseInt(t.slice(r,r+i).toString("utf8").replace(/\0.*$/,"").trim(),8));const h={12:8589934591,8:2097151};const encNumber=(t,r,i,o)=>o===null?false:o>h[i]||o<0?(c.encode(o,t.slice(r,r+i)),true):(encSmallNumber(t,r,i,o),false);const encSmallNumber=(t,r,i,o)=>t.write(octalString(o,i),r,i,"ascii");const octalString=(t,r)=>padOctal(Math.floor(t).toString(8),r);const padOctal=(t,r)=>(t.length===r-1?t:new Array(r-t.length-1).join("0")+t+" ")+"\0";const encDate=(t,r,i,o)=>o===null?false:encNumber(t,r,i,o.getTime()/1e3);const d=new Array(156).join("\0");const encString=(t,r,i,o)=>o===null?false:(t.write(o+d,r,i,"utf8"),o.length!==Buffer.byteLength(o)||o.length>i);t.exports=Header},3831:t=>{"use strict";const r=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);t.exports=t=>t?Object.keys(t).map((i=>[r.has(i)?r.get(i):i,t[i]])).reduce(((t,r)=>(t[r[0]]=r[1],t)),Object.create(null)):{}},2933:t=>{"use strict";const encode=(t,r)=>{if(!Number.isSafeInteger(t)){throw Error("cannot encode number outside of javascript safe integer range")}else if(t<0){encodeNegative(t,r)}else{encodePositive(t,r)}return r};const encodePositive=(t,r)=>{r[0]=128;for(var i=r.length;i>1;i--){r[i-1]=t&255;t=Math.floor(t/256)}};const encodeNegative=(t,r)=>{r[0]=255;var i=false;t=t*-1;for(var o=r.length;o>1;o--){var a=t&255;t=Math.floor(t/256);if(i){r[o-1]=onesComp(a)}else if(a===0){r[o-1]=0}else{i=true;r[o-1]=twosComp(a)}}};const parse=t=>{const r=t[0];const i=r===128?pos(t.slice(1,t.length)):r===255?twos(t):null;if(i===null){throw Error("invalid base256 encoding")}if(!Number.isSafeInteger(i)){throw Error("parsed number outside of javascript safe integer range")}return i};const twos=t=>{var r=t.length;var i=0;var o=false;for(var a=r-1;a>-1;a--){var c=t[a];var l;if(o){l=onesComp(c)}else if(c===0){l=c}else{o=true;l=twosComp(c)}if(l!==0){i-=l*Math.pow(256,r-a-1)}}return i};const pos=t=>{var r=t.length;var i=0;for(var o=r-1;o>-1;o--){var a=t[o];if(a!==0){i+=a*Math.pow(256,r-o-1)}}return i};const onesComp=t=>(255^t)&255;const twosComp=t=>(255^t)+1&255;t.exports={encode:encode,parse:parse}},4975:(t,r,i)=>{"use strict";const o=i(3831);const a=i(5222);const c=i(7147);const l=i(644);const u=i(1017);const h=i(2517);t.exports=(t,r,i)=>{if(typeof t==="function"){i=t,r=null,t={}}else if(Array.isArray(t)){r=t,t={}}if(typeof r==="function"){i=r,r=null}if(!r){r=[]}else{r=Array.from(r)}const a=o(t);if(a.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!a.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}if(r.length){filesFilter(a,r)}if(!a.noResume){onentryFunction(a)}return a.file&&a.sync?listFileSync(a):a.file?listFile(a,i):list(a)};const onentryFunction=t=>{const r=t.onentry;t.onentry=r?t=>{r(t);t.resume()}:t=>t.resume()};const filesFilter=(t,r)=>{const i=new Map(r.map((t=>[h(t),true])));const o=t.filter;const mapHas=(t,r)=>{const o=r||u.parse(t).root||".";const a=t===o?false:i.has(t)?i.get(t):mapHas(u.dirname(t),o);i.set(t,a);return a};t.filter=o?(t,r)=>o(t,r)&&mapHas(h(t)):t=>mapHas(h(t))};const listFileSync=t=>{const r=list(t);const i=t.file;let o=true;let a;try{const l=c.statSync(i);const u=t.maxReadSize||16*1024*1024;if(l.size<u){r.end(c.readFileSync(i))}else{let t=0;const o=Buffer.allocUnsafe(u);a=c.openSync(i,"r");while(t<l.size){const i=c.readSync(a,o,0,u,t);t+=i;r.write(o.slice(0,i))}r.end()}o=false}finally{if(o&&a){try{c.closeSync(a)}catch(t){}}}};const listFile=(t,r)=>{const i=new a(t);const o=t.maxReadSize||16*1024*1024;const u=t.file;const h=new Promise(((t,r)=>{i.on("error",r);i.on("end",t);c.stat(u,((t,a)=>{if(t){r(t)}else{const t=new l.ReadStream(u,{readSize:o,size:a.size});t.on("error",r);t.pipe(i)}}))}));return r?h.then(r,r):h};const list=t=>new a(t)},6209:(t,r,i)=>{"use strict";const o=i(9806);const a=i(7147);const c=i(1017);const l=i(2975);const u=i(9740);class SymlinkError extends Error{constructor(t,r){super("Cannot extract through symbolic link");this.path=r;this.symlink=t}get name(){return"SylinkError"}}class CwdError extends Error{constructor(t,r){super(r+": Cannot cd into '"+t+"'");this.path=t;this.code=r}get name(){return"CwdError"}}const cGet=(t,r)=>t.get(u(r));const cSet=(t,r,i)=>t.set(u(r),i);const checkCwd=(t,r)=>{a.stat(t,((i,o)=>{if(i||!o.isDirectory()){i=new CwdError(t,i&&i.code||"ENOTDIR")}r(i)}))};t.exports=(t,r,i)=>{t=u(t);const h=r.umask;const d=r.mode|448;const p=(d&h)!==0;const m=r.uid;const y=r.gid;const g=typeof m==="number"&&typeof y==="number"&&(m!==r.processUid||y!==r.processGid);const v=r.preserve;const b=r.unlink;const w=r.cache;const E=u(r.cwd);const done=(r,o)=>{if(r){i(r)}else{cSet(w,t,true);if(o&&g){l(o,m,y,(t=>done(t)))}else if(p){a.chmod(t,d,i)}else{i()}}};if(w&&cGet(w,t)===true){return done()}if(t===E){return checkCwd(t,done)}if(v){return o(t,{mode:d}).then((t=>done(null,t)),done)}const S=u(c.relative(E,t));const x=S.split("/");mkdir_(E,x,d,w,b,E,null,done)};const mkdir_=(t,r,i,o,l,h,d,p)=>{if(!r.length){return p(null,d)}const m=r.shift();const y=u(c.resolve(t+"/"+m));if(cGet(o,y)){return mkdir_(y,r,i,o,l,h,d,p)}a.mkdir(y,i,onmkdir(y,r,i,o,l,h,d,p))};const onmkdir=(t,r,i,o,c,l,h,d)=>p=>{if(p){a.lstat(t,((m,y)=>{if(m){m.path=m.path&&u(m.path);d(m)}else if(y.isDirectory()){mkdir_(t,r,i,o,c,l,h,d)}else if(c){a.unlink(t,(u=>{if(u){return d(u)}a.mkdir(t,i,onmkdir(t,r,i,o,c,l,h,d))}))}else if(y.isSymbolicLink()){return d(new SymlinkError(t,t+"/"+r.join("/")))}else{d(p)}}))}else{h=h||t;mkdir_(t,r,i,o,c,l,h,d)}};const checkCwdSync=t=>{let r=false;let i="ENOTDIR";try{r=a.statSync(t).isDirectory()}catch(t){i=t.code}finally{if(!r){throw new CwdError(t,i)}}};t.exports.sync=(t,r)=>{t=u(t);const i=r.umask;const h=r.mode|448;const d=(h&i)!==0;const p=r.uid;const m=r.gid;const y=typeof p==="number"&&typeof m==="number"&&(p!==r.processUid||m!==r.processGid);const g=r.preserve;const v=r.unlink;const b=r.cache;const w=u(r.cwd);const done=r=>{cSet(b,t,true);if(r&&y){l.sync(r,p,m)}if(d){a.chmodSync(t,h)}};if(b&&cGet(b,t)===true){return done()}if(t===w){checkCwdSync(w);return done()}if(g){return done(o.sync(t,h))}const E=u(c.relative(w,t));const S=E.split("/");let x=null;for(let t=S.shift(),r=w;t&&(r+="/"+t);t=S.shift()){r=u(c.resolve(r));if(cGet(b,r)){continue}try{a.mkdirSync(r,h);x=x||r;cSet(b,r,true)}catch(t){const i=a.lstatSync(r);if(i.isDirectory()){cSet(b,r,true);continue}else if(v){a.unlinkSync(r);a.mkdirSync(r,h);x=x||r;cSet(b,r,true);continue}else if(i.isSymbolicLink()){return new SymlinkError(r,r+"/"+S.join("/"))}}}return done(x)}},6601:t=>{"use strict";t.exports=(t,r,i)=>{t&=4095;if(i){t=(t|384)&~18}if(r){if(t&256){t|=64}if(t&32){t|=8}if(t&4){t|=1}}return t}},4711:t=>{const r=Object.create(null);const{hasOwnProperty:i}=Object.prototype;t.exports=t=>{if(!i.call(r,t)){r[t]=t.normalize("NFD")}return r[t]}},9740:t=>{const r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;t.exports=r!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")},7301:(t,r,i)=>{"use strict";class PackJob{constructor(t,r){this.path=t||"./";this.absolute=r;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const{Minipass:o}=i(5540);const a=i(7750);const c=i(5917);const l=i(1944);const u=l.Sync;const h=l.Tar;const d=i(3401);const p=Buffer.alloc(1024);const m=Symbol("onStat");const y=Symbol("ended");const g=Symbol("queue");const v=Symbol("current");const b=Symbol("process");const w=Symbol("processing");const E=Symbol("processJob");const S=Symbol("jobs");const x=Symbol("jobDone");const R=Symbol("addFSEntry");const P=Symbol("addTarEntry");const $=Symbol("stat");const O=Symbol("readdir");const T=Symbol("onreaddir");const A=Symbol("pipe");const C=Symbol("entry");const k=Symbol("entryOpt");const I=Symbol("writeEntryClass");const N=Symbol("write");const D=Symbol("ondrain");const L=i(7147);const M=i(1017);const j=i(8920);const U=i(9740);const B=j(class Pack extends o{constructor(t){super(t);t=t||Object.create(null);this.opt=t;this.file=t.file||"";this.cwd=t.cwd||process.cwd();this.maxReadSize=t.maxReadSize;this.preservePaths=!!t.preservePaths;this.strict=!!t.strict;this.noPax=!!t.noPax;this.prefix=U(t.prefix||"");this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.readdirCache=t.readdirCache||new Map;this[I]=l;if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}this.portable=!!t.portable;this.zip=null;if(t.gzip){if(typeof t.gzip!=="object"){t.gzip={}}if(this.portable){t.gzip.portable=true}this.zip=new a.Gzip(t.gzip);this.zip.on("data",(t=>super.write(t)));this.zip.on("end",(t=>super.end()));this.zip.on("drain",(t=>this[D]()));this.on("resume",(t=>this.zip.resume()))}else{this.on("drain",this[D])}this.noDirRecurse=!!t.noDirRecurse;this.follow=!!t.follow;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;this.filter=typeof t.filter==="function"?t.filter:t=>true;this[g]=new d;this[S]=0;this.jobs=+t.jobs||4;this[w]=false;this[y]=false}[N](t){return super.write(t)}add(t){this.write(t);return this}end(t){if(t){this.write(t)}this[y]=true;this[b]();return this}write(t){if(this[y]){throw new Error("write after end")}if(t instanceof c){this[P](t)}else{this[R](t)}return this.flowing}[P](t){const r=U(M.resolve(this.cwd,t.path));if(!this.filter(t.path,t)){t.resume()}else{const i=new PackJob(t.path,r,false);i.entry=new h(t,this[k](i));i.entry.on("end",(t=>this[x](i)));this[S]+=1;this[g].push(i)}this[b]()}[R](t){const r=U(M.resolve(this.cwd,t));this[g].push(new PackJob(t,r));this[b]()}[$](t){t.pending=true;this[S]+=1;const r=this.follow?"stat":"lstat";L[r](t.absolute,((r,i)=>{t.pending=false;this[S]-=1;if(r){this.emit("error",r)}else{this[m](t,i)}}))}[m](t,r){this.statCache.set(t.absolute,r);t.stat=r;if(!this.filter(t.path,r)){t.ignore=true}this[b]()}[O](t){t.pending=true;this[S]+=1;L.readdir(t.absolute,((r,i)=>{t.pending=false;this[S]-=1;if(r){return this.emit("error",r)}this[T](t,i)}))}[T](t,r){this.readdirCache.set(t.absolute,r);t.readdir=r;this[b]()}[b](){if(this[w]){return}this[w]=true;for(let t=this[g].head;t!==null&&this[S]<this.jobs;t=t.next){this[E](t.value);if(t.value.ignore){const r=t.next;this[g].removeNode(t);t.next=r}}this[w]=false;if(this[y]&&!this[g].length&&this[S]===0){if(this.zip){this.zip.end(p)}else{super.write(p);super.end()}}}get[v](){return this[g]&&this[g].head&&this[g].head.value}[x](t){this[g].shift();this[S]-=1;this[b]()}[E](t){if(t.pending){return}if(t.entry){if(t===this[v]&&!t.piped){this[A](t)}return}if(!t.stat){if(this.statCache.has(t.absolute)){this[m](t,this.statCache.get(t.absolute))}else{this[$](t)}}if(!t.stat){return}if(t.ignore){return}if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){if(this.readdirCache.has(t.absolute)){this[T](t,this.readdirCache.get(t.absolute))}else{this[O](t)}if(!t.readdir){return}}t.entry=this[C](t);if(!t.entry){t.ignore=true;return}if(t===this[v]&&!t.piped){this[A](t)}}[k](t){return{onwarn:(t,r,i)=>this.warn(t,r,i),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[C](t){this[S]+=1;try{return new this[I](t.path,this[k](t)).on("end",(()=>this[x](t))).on("error",(t=>this.emit("error",t)))}catch(t){this.emit("error",t)}}[D](){if(this[v]&&this[v].entry){this[v].entry.resume()}}[A](t){t.piped=true;if(t.readdir){t.readdir.forEach((r=>{const i=t.path;const o=i==="./"?"":i.replace(/\/*$/,"/");this[R](o+r)}))}const r=t.entry;const i=this.zip;if(i){r.on("data",(t=>{if(!i.write(t)){r.pause()}}))}else{r.on("data",(t=>{if(!super.write(t)){r.pause()}}))}}pause(){if(this.zip){this.zip.pause()}return super.pause()}});class PackSync extends B{constructor(t){super(t);this[I]=u}pause(){}resume(){}[$](t){const r=this.follow?"statSync":"lstatSync";this[m](t,L[r](t.absolute))}[O](t,r){this[T](t,L.readdirSync(t.absolute))}[A](t){const r=t.entry;const i=this.zip;if(t.readdir){t.readdir.forEach((r=>{const i=t.path;const o=i==="./"?"":i.replace(/\/*$/,"/");this[R](o+r)}))}if(i){r.on("data",(t=>{i.write(t)}))}else{r.on("data",(t=>{super[N](t)}))}}}B.Sync=PackSync;t.exports=B},5222:(t,r,i)=>{"use strict";const o=i(8920);const a=i(1703);const c=i(2361);const l=i(3401);const u=1024*1024;const h=i(5917);const d=i(9037);const p=i(7750);const{nextTick:m}=i(7282);const y=Buffer.from([31,139]);const g=Symbol("state");const v=Symbol("writeEntry");const b=Symbol("readEntry");const w=Symbol("nextEntry");const E=Symbol("processEntry");const S=Symbol("extendedHeader");const x=Symbol("globalExtendedHeader");const R=Symbol("meta");const P=Symbol("emitMeta");const $=Symbol("buffer");const O=Symbol("queue");const T=Symbol("ended");const A=Symbol("emittedEnd");const C=Symbol("emit");const k=Symbol("unzip");const I=Symbol("consumeChunk");const N=Symbol("consumeChunkSub");const D=Symbol("consumeBody");const L=Symbol("consumeMeta");const M=Symbol("consumeHeader");const j=Symbol("consuming");const U=Symbol("bufferConcat");const B=Symbol("maybeEnd");const H=Symbol("writing");const z=Symbol("aborted");const V=Symbol("onDone");const G=Symbol("sawValidEntry");const q=Symbol("sawNullBlock");const K=Symbol("sawEOF");const W=Symbol("closeStream");const noop=t=>true;t.exports=o(class Parser extends c{constructor(t){t=t||{};super(t);this.file=t.file||"";this[G]=null;this.on(V,(t=>{if(this[g]==="begin"||this[G]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(t.ondone){this.on(V,t.ondone)}else{this.on(V,(t=>{this.emit("prefinish");this.emit("finish");this.emit("end")}))}this.strict=!!t.strict;this.maxMetaEntrySize=t.maxMetaEntrySize||u;this.filter=typeof t.filter==="function"?t.filter:noop;this.writable=true;this.readable=false;this[O]=new l;this[$]=null;this[b]=null;this[v]=null;this[g]="begin";this[R]="";this[S]=null;this[x]=null;this[T]=false;this[k]=null;this[z]=false;this[q]=false;this[K]=false;this.on("end",(()=>this[W]()));if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}if(typeof t.onentry==="function"){this.on("entry",t.onentry)}}[M](t,r){if(this[G]===null){this[G]=false}let i;try{i=new a(t,r,this[S],this[x])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(i.nullBlock){if(this[q]){this[K]=true;if(this[g]==="begin"){this[g]="header"}this[C]("eof")}else{this[q]=true;this[C]("nullBlock")}}else{this[q]=false;if(!i.cksumValid){this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i})}else if(!i.path){this.warn("TAR_ENTRY_INVALID","path is required",{header:i})}else{const t=i.type;if(/^(Symbolic)?Link$/.test(t)&&!i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i})}else if(!/^(Symbolic)?Link$/.test(t)&&i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i})}else{const t=this[v]=new h(i,this[S],this[x]);if(!this[G]){if(t.remain){const onend=()=>{if(!t.invalid){this[G]=true}};t.on("end",onend)}else{this[G]=true}}if(t.meta){if(t.size>this.maxMetaEntrySize){t.ignore=true;this[C]("ignoredEntry",t);this[g]="ignore";t.resume()}else if(t.size>0){this[R]="";t.on("data",(t=>this[R]+=t));this[g]="meta"}}else{this[S]=null;t.ignore=t.ignore||!this.filter(t.path,t);if(t.ignore){this[C]("ignoredEntry",t);this[g]=t.remain?"ignore":"header";t.resume()}else{if(t.remain){this[g]="body"}else{this[g]="header";t.end()}if(!this[b]){this[O].push(t);this[w]()}else{this[O].push(t)}}}}}}}[W](){m((()=>this.emit("close")))}[E](t){let r=true;if(!t){this[b]=null;r=false}else if(Array.isArray(t)){this.emit.apply(this,t)}else{this[b]=t;this.emit("entry",t);if(!t.emittedEnd){t.on("end",(t=>this[w]()));r=false}}return r}[w](){do{}while(this[E](this[O].shift()));if(!this[O].length){const t=this[b];const r=!t||t.flowing||t.size===t.remain;if(r){if(!this[H]){this.emit("drain")}}else{t.once("drain",(t=>this.emit("drain")))}}}[D](t,r){const i=this[v];const o=i.blockRemain;const a=o>=t.length&&r===0?t:t.slice(r,r+o);i.write(a);if(!i.blockRemain){this[g]="header";this[v]=null;i.end()}return a.length}[L](t,r){const i=this[v];const o=this[D](t,r);if(!this[v]){this[P](i)}return o}[C](t,r,i){if(!this[O].length&&!this[b]){this.emit(t,r,i)}else{this[O].push([t,r,i])}}[P](t){this[C]("meta",this[R]);switch(t.type){case"ExtendedHeader":case"OldExtendedHeader":this[S]=d.parse(this[R],this[S],false);break;case"GlobalExtendedHeader":this[x]=d.parse(this[R],this[x],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[S]=this[S]||Object.create(null);this[S].path=this[R].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[S]=this[S]||Object.create(null);this[S].linkpath=this[R].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+t.type)}}abort(t){this[z]=true;this.emit("abort",t);this.warn("TAR_ABORT",t,{recoverable:false})}write(t){if(this[z]){return}if(this[k]===null&&t){if(this[$]){t=Buffer.concat([this[$],t]);this[$]=null}if(t.length<y.length){this[$]=t;return true}for(let r=0;this[k]===null&&r<y.length;r++){if(t[r]!==y[r]){this[k]=false}}if(this[k]===null){const r=this[T];this[T]=false;this[k]=new p.Unzip;this[k].on("data",(t=>this[I](t)));this[k].on("error",(t=>this.abort(t)));this[k].on("end",(t=>{this[T]=true;this[I]()}));this[H]=true;const i=this[k][r?"end":"write"](t);this[H]=false;return i}}this[H]=true;if(this[k]){this[k].write(t)}else{this[I](t)}this[H]=false;const r=this[O].length?false:this[b]?this[b].flowing:true;if(!r&&!this[O].length){this[b].once("drain",(t=>this.emit("drain")))}return r}[U](t){if(t&&!this[z]){this[$]=this[$]?Buffer.concat([this[$],t]):t}}[B](){if(this[T]&&!this[A]&&!this[z]&&!this[j]){this[A]=true;const t=this[v];if(t&&t.blockRemain){const r=this[$]?this[$].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${r} available)`,{entry:t});if(this[$]){t.write(this[$])}t.end()}this[C](V)}}[I](t){if(this[j]){this[U](t)}else if(!t&&!this[$]){this[B]()}else{this[j]=true;if(this[$]){this[U](t);const r=this[$];this[$]=null;this[N](r)}else{this[N](t)}while(this[$]&&this[$].length>=512&&!this[z]&&!this[K]){const t=this[$];this[$]=null;this[N](t)}this[j]=false}if(!this[$]||this[T]){this[B]()}}[N](t){let r=0;const i=t.length;while(r+512<=i&&!this[z]&&!this[K]){switch(this[g]){case"begin":case"header":this[M](t,r);r+=512;break;case"ignore":case"body":r+=this[D](t,r);break;case"meta":r+=this[L](t,r);break;default:throw new Error("invalid state: "+this[g])}}if(r<i){if(this[$]){this[$]=Buffer.concat([t.slice(r),this[$]])}else{this[$]=t.slice(r)}}}end(t){if(!this[z]){if(this[k]){this[k].end(t)}else{this[T]=true;this.write(t)}}}})},6716:(t,r,i)=>{const o=i(9491);const a=i(4711);const c=i(2517);const{join:l}=i(1017);const u=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const h=u==="win32";t.exports=()=>{const t=new Map;const r=new Map;const getDirs=t=>{const r=t.split("/").slice(0,-1).reduce(((t,r)=>{if(t.length){r=l(t[t.length-1],r)}t.push(r||"/");return t}),[]);return r};const i=new Set;const getQueues=i=>{const o=r.get(i);if(!o){throw new Error("function does not have any path reservations")}return{paths:o.paths.map((r=>t.get(r))),dirs:[...o.dirs].map((r=>t.get(r)))}};const check=t=>{const{paths:r,dirs:i}=getQueues(t);return r.every((r=>r[0]===t))&&i.every((r=>r[0]instanceof Set&&r[0].has(t)))};const run=t=>{if(i.has(t)||!check(t)){return false}i.add(t);t((()=>clear(t)));return true};const clear=a=>{if(!i.has(a)){return false}const{paths:c,dirs:l}=r.get(a);const u=new Set;c.forEach((r=>{const i=t.get(r);o.equal(i[0],a);if(i.length===1){t.delete(r)}else{i.shift();if(typeof i[0]==="function"){u.add(i[0])}else{i[0].forEach((t=>u.add(t)))}}}));l.forEach((r=>{const i=t.get(r);o(i[0]instanceof Set);if(i[0].size===1&&i.length===1){t.delete(r)}else if(i[0].size===1){i.shift();u.add(i[0])}else{i[0].delete(a)}}));i.delete(a);u.forEach((t=>run(t)));return true};const reserve=(i,o)=>{i=h?["win32 parallelization disabled"]:i.map((t=>c(l(a(t))).toLowerCase()));const u=new Set(i.map((t=>getDirs(t))).reduce(((t,r)=>t.concat(r))));r.set(o,{dirs:u,paths:i});i.forEach((r=>{const i=t.get(r);if(!i){t.set(r,[o])}else{i.push(o)}}));u.forEach((r=>{const i=t.get(r);if(!i){t.set(r,[new Set([o])])}else if(i[i.length-1]instanceof Set){i[i.length-1].add(o)}else{i.push(new Set([o]))}}));return run(o)};return{check:check,reserve:reserve}}},9037:(t,r,i)=>{"use strict";const o=i(1703);const a=i(1017);class Pax{constructor(t,r){this.atime=t.atime||null;this.charset=t.charset||null;this.comment=t.comment||null;this.ctime=t.ctime||null;this.gid=t.gid||null;this.gname=t.gname||null;this.linkpath=t.linkpath||null;this.mtime=t.mtime||null;this.path=t.path||null;this.size=t.size||null;this.uid=t.uid||null;this.uname=t.uname||null;this.dev=t.dev||null;this.ino=t.ino||null;this.nlink=t.nlink||null;this.global=r||false}encode(){const t=this.encodeBody();if(t===""){return null}const r=Buffer.byteLength(t);const i=512*Math.ceil(1+r/512);const c=Buffer.allocUnsafe(i);for(let t=0;t<512;t++){c[t]=0}new o({path:("PaxHeader/"+a.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(c);c.write(t,512,r,"utf8");for(let t=r+512;t<c.length;t++){c[t]=0}return c}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(this[t]===null||this[t]===undefined){return""}const r=this[t]instanceof Date?this[t].getTime()/1e3:this[t];const i=" "+(t==="dev"||t==="ino"||t==="nlink"?"SCHILY.":"")+t+"="+r+"\n";const o=Buffer.byteLength(i);let a=Math.floor(Math.log(o)/Math.log(10))+1;if(o+a>=Math.pow(10,a)){a+=1}const c=a+o;return c+i}}Pax.parse=(t,r,i)=>new Pax(merge(parseKV(t),r),i);const merge=(t,r)=>r?Object.keys(t).reduce(((r,i)=>(r[i]=t[i],r)),r):t;const parseKV=t=>t.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(t,r)=>{const i=parseInt(r,10);if(i!==Buffer.byteLength(r)+1){return t}r=r.slice((i+" ").length);const o=r.split("=");const a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a){return t}const c=o.join("=");t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(c*1e3):/^[0-9]+$/.test(c)?+c:c;return t};t.exports=Pax},5917:(t,r,i)=>{"use strict";const{Minipass:o}=i(5540);const a=i(9740);const c=Symbol("slurp");t.exports=class ReadEntry extends o{constructor(t,r,i){super();this.pause();this.extended=r;this.globalExtended=i;this.header=t;this.startBlockSize=512*Math.ceil(t.size/512);this.blockRemain=this.startBlockSize;this.remain=t.size;this.type=t.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=a(t.path);this.mode=t.mode;if(this.mode){this.mode=this.mode&4095}this.uid=t.uid;this.gid=t.gid;this.uname=t.uname;this.gname=t.gname;this.size=t.size;this.mtime=t.mtime;this.atime=t.atime;this.ctime=t.ctime;this.linkpath=a(t.linkpath);this.uname=t.uname;this.gname=t.gname;if(r){this[c](r)}if(i){this[c](i,true)}}write(t){const r=t.length;if(r>this.blockRemain){throw new Error("writing more to entry than is appropriate")}const i=this.remain;const o=this.blockRemain;this.remain=Math.max(0,i-r);this.blockRemain=Math.max(0,o-r);if(this.ignore){return true}if(i>=r){return super.write(t)}return super.write(t.slice(0,i))}[c](t,r){for(const i in t){if(t[i]!==null&&t[i]!==undefined&&!(r&&i==="path")){this[i]=i==="path"||i==="linkpath"?a(t[i]):t[i]}}}}},1138:(t,r,i)=>{"use strict";const o=i(3831);const a=i(7301);const c=i(7147);const l=i(644);const u=i(4975);const h=i(1017);const d=i(1703);t.exports=(t,r,i)=>{const a=o(t);if(!a.file){throw new TypeError("file is required")}if(a.gzip){throw new TypeError("cannot append to compressed archives")}if(!r||!Array.isArray(r)||!r.length){throw new TypeError("no files or directories specified")}r=Array.from(r);return a.sync?replaceSync(a,r):replace(a,r,i)};const replaceSync=(t,r)=>{const i=new a.Sync(t);let o=true;let l;let u;try{try{l=c.openSync(t.file,"r+")}catch(r){if(r.code==="ENOENT"){l=c.openSync(t.file,"w+")}else{throw r}}const a=c.fstatSync(l);const h=Buffer.alloc(512);e:for(u=0;u<a.size;u+=512){for(let t=0,r=0;t<512;t+=r){r=c.readSync(l,h,t,h.length-t,u+t);if(u===0&&h[0]===31&&h[1]===139){throw new Error("cannot append to compressed archives")}if(!r){break e}}const r=new d(h);if(!r.cksumValid){break}const i=512*Math.ceil(r.size/512);if(u+i+512>a.size){break}u+=i;if(t.mtimeCache){t.mtimeCache.set(r.path,r.mtime)}}o=false;streamSync(t,i,u,l,r)}finally{if(o){try{c.closeSync(l)}catch(t){}}}};const streamSync=(t,r,i,o,a)=>{const c=new l.WriteStreamSync(t.file,{fd:o,start:i});r.pipe(c);addFilesSync(r,a)};const replace=(t,r,i)=>{r=Array.from(r);const o=new a(t);const getPos=(r,i,o)=>{const cb=(t,i)=>{if(t){c.close(r,(r=>o(t)))}else{o(null,i)}};let a=0;if(i===0){return cb(null,0)}let l=0;const u=Buffer.alloc(512);const onread=(o,h)=>{if(o){return cb(o)}l+=h;if(l<512&&h){return c.read(r,u,l,u.length-l,a+l,onread)}if(a===0&&u[0]===31&&u[1]===139){return cb(new Error("cannot append to compressed archives"))}if(l<512){return cb(null,a)}const p=new d(u);if(!p.cksumValid){return cb(null,a)}const m=512*Math.ceil(p.size/512);if(a+m+512>i){return cb(null,a)}a+=m+512;if(a>=i){return cb(null,a)}if(t.mtimeCache){t.mtimeCache.set(p.path,p.mtime)}l=0;c.read(r,u,0,512,a,onread)};c.read(r,u,0,512,a,onread)};const u=new Promise(((i,a)=>{o.on("error",a);let u="r+";const onopen=(h,d)=>{if(h&&h.code==="ENOENT"&&u==="r+"){u="w+";return c.open(t.file,u,onopen)}if(h){return a(h)}c.fstat(d,((u,h)=>{if(u){return c.close(d,(()=>a(u)))}getPos(d,h.size,((c,u)=>{if(c){return a(c)}const h=new l.WriteStream(t.file,{fd:d,start:u});o.pipe(h);h.on("error",a);h.on("close",i);addFilesAsync(o,r)}))}))};c.open(t.file,u,onopen)}));return i?u.then(i,i):u};const addFilesSync=(t,r)=>{r.forEach((r=>{if(r.charAt(0)==="@"){u({file:h.resolve(t.cwd,r.slice(1)),sync:true,noResume:true,onentry:r=>t.add(r)})}else{t.add(r)}}));t.end()};const addFilesAsync=(t,r)=>{while(r.length){const i=r.shift();if(i.charAt(0)==="@"){return u({file:h.resolve(t.cwd,i.slice(1)),noResume:true,onentry:r=>t.add(r)}).then((i=>addFilesAsync(t,r)))}else{t.add(i)}}t.end()}},332:(t,r,i)=>{const{isAbsolute:o,parse:a}=i(1017).win32;t.exports=t=>{let r="";let i=a(t);while(o(t)||i.root){const o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":i.root;t=t.slice(o.length);r+=o;i=a(t)}return[r,t]}},2517:t=>{t.exports=t=>{let r=t.length-1;let i=-1;while(r>-1&&t.charAt(r)==="/"){i=r;r--}return i===-1?t:t.slice(0,i)}},1046:(t,r)=>{"use strict";r.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);r.code=new Map(Array.from(r.name).map((t=>[t[1],t[0]])))},5951:(t,r,i)=>{"use strict";const o=i(9491);const a=i(5222);const c=i(7147);const l=i(644);const u=i(1017);const h=i(6209);const d=i(4099);const p=i(6716);const m=i(332);const y=i(9740);const g=i(2517);const v=i(4711);const b=Symbol("onEntry");const w=Symbol("checkFs");const E=Symbol("checkFs2");const S=Symbol("pruneCache");const x=Symbol("isReusable");const R=Symbol("makeFs");const P=Symbol("file");const $=Symbol("directory");const O=Symbol("link");const T=Symbol("symlink");const A=Symbol("hardlink");const C=Symbol("unsupported");const k=Symbol("checkPath");const I=Symbol("mkdir");const N=Symbol("onError");const D=Symbol("pending");const L=Symbol("pend");const M=Symbol("unpend");const j=Symbol("ended");const U=Symbol("maybeClose");const B=Symbol("skip");const H=Symbol("doChown");const z=Symbol("uid");const V=Symbol("gid");const G=Symbol("checkedCwd");const q=i(6113);const K=i(9262);const W=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const Y=W==="win32";const unlinkFile=(t,r)=>{if(!Y){return c.unlink(t,r)}const i=t+".DELETE."+q.randomBytes(16).toString("hex");c.rename(t,i,(t=>{if(t){return r(t)}c.unlink(i,r)}))};const unlinkFileSync=t=>{if(!Y){return c.unlinkSync(t)}const r=t+".DELETE."+q.randomBytes(16).toString("hex");c.renameSync(t,r);c.unlinkSync(r)};const uint32=(t,r,i)=>t===t>>>0?t:r===r>>>0?r:i;const cacheKeyNormalize=t=>g(y(v(t))).toLowerCase();const pruneCache=(t,r)=>{r=cacheKeyNormalize(r);for(const i of t.keys()){const o=cacheKeyNormalize(i);if(o===r||o.indexOf(r+"/")===0){t.delete(i)}}};const dropCache=t=>{for(const r of t.keys()){t.delete(r)}};class Unpack extends a{constructor(t){if(!t){t={}}t.ondone=t=>{this[j]=true;this[U]()};super(t);this[G]=false;this.reservations=p();this.transform=typeof t.transform==="function"?t.transform:null;this.writable=true;this.readable=false;this[D]=0;this[j]=false;this.dirCache=t.dirCache||new Map;if(typeof t.uid==="number"||typeof t.gid==="number"){if(typeof t.uid!=="number"||typeof t.gid!=="number"){throw new TypeError("cannot set owner without number uid and gid")}if(t.preserveOwner){throw new TypeError("cannot preserve owner in archive and also set owner explicitly")}this.uid=t.uid;this.gid=t.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(t.preserveOwner===undefined&&typeof t.uid!=="number"){this.preserveOwner=process.getuid&&process.getuid()===0}else{this.preserveOwner=!!t.preserveOwner}this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=t.forceChown===true;this.win32=!!t.win32||Y;this.newer=!!t.newer;this.keep=!!t.keep;this.noMtime=!!t.noMtime;this.preservePaths=!!t.preservePaths;this.unlink=!!t.unlink;this.cwd=y(u.resolve(t.cwd||process.cwd()));this.strip=+t.strip||0;this.processUmask=t.noChmod?0:process.umask();this.umask=typeof t.umask==="number"?t.umask:this.processUmask;this.dmode=t.dmode||511&~this.umask;this.fmode=t.fmode||438&~this.umask;this.on("entry",(t=>this[b](t)))}warn(t,r,i={}){if(t==="TAR_BAD_ARCHIVE"||t==="TAR_ABORT"){i.recoverable=false}return super.warn(t,r,i)}[U](){if(this[j]&&this[D]===0){this.emit("prefinish");this.emit("finish");this.emit("end")}}[k](t){if(this.strip){const r=y(t.path).split("/");if(r.length<this.strip){return false}t.path=r.slice(this.strip).join("/");if(t.type==="Link"){const r=y(t.linkpath).split("/");if(r.length>=this.strip){t.linkpath=r.slice(this.strip).join("/")}else{return false}}}if(!this.preservePaths){const r=y(t.path);const i=r.split("/");if(i.includes("..")||Y&&/^[a-z]:\.\.$/i.test(i[0])){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:t,path:r});return false}const[o,a]=m(r);if(o){t.path=a;this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:t,path:r})}}if(u.isAbsolute(t.path)){t.absolute=y(u.resolve(t.path))}else{t.absolute=y(u.resolve(this.cwd,t.path))}if(!this.preservePaths&&t.absolute.indexOf(this.cwd+"/")!==0&&t.absolute!==this.cwd){this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:y(t.path),resolvedPath:t.absolute,cwd:this.cwd});return false}if(t.absolute===this.cwd&&t.type!=="Directory"&&t.type!=="GNUDumpDir"){return false}if(this.win32){const{root:r}=u.win32.parse(t.absolute);t.absolute=r+d.encode(t.absolute.slice(r.length));const{root:i}=u.win32.parse(t.path);t.path=i+d.encode(t.path.slice(i.length))}return true}[b](t){if(!this[k](t)){return t.resume()}o.equal(typeof t.absolute,"string");switch(t.type){case"Directory":case"GNUDumpDir":if(t.mode){t.mode=t.mode|448}case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[w](t);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[C](t)}}[N](t,r){if(t.name==="CwdError"){this.emit("error",t)}else{this.warn("TAR_ENTRY_ERROR",t,{entry:r});this[M]();r.resume()}}[I](t,r,i){h(y(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},i)}[H](t){return this.forceChown||this.preserveOwner&&(typeof t.uid==="number"&&t.uid!==this.processUid||typeof t.gid==="number"&&t.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[z](t){return uint32(this.uid,t.uid,this.processUid)}[V](t){return uint32(this.gid,t.gid,this.processGid)}[P](t,r){const i=t.mode&4095||this.fmode;const o=new l.WriteStream(t.absolute,{flags:K(t.size),mode:i,autoClose:false});o.on("error",(i=>{if(o.fd){c.close(o.fd,(()=>{}))}o.write=()=>true;this[N](i,t);r()}));let a=1;const done=i=>{if(i){if(o.fd){c.close(o.fd,(()=>{}))}this[N](i,t);r();return}if(--a===0){c.close(o.fd,(i=>{if(i){this[N](i,t)}else{this[M]()}r()}))}};o.on("finish",(r=>{const i=t.absolute;const l=o.fd;if(t.mtime&&!this.noMtime){a++;const r=t.atime||new Date;const o=t.mtime;c.futimes(l,r,o,(t=>t?c.utimes(i,r,o,(r=>done(r&&t))):done()))}if(this[H](t)){a++;const r=this[z](t);const o=this[V](t);c.fchown(l,r,o,(t=>t?c.chown(i,r,o,(r=>done(r&&t))):done()))}done()}));const u=this.transform?this.transform(t)||t:t;if(u!==t){u.on("error",(i=>{this[N](i,t);r()}));t.pipe(u)}u.pipe(o)}[$](t,r){const i=t.mode&4095||this.dmode;this[I](t.absolute,i,(i=>{if(i){this[N](i,t);r();return}let o=1;const done=i=>{if(--o===0){r();this[M]();t.resume()}};if(t.mtime&&!this.noMtime){o++;c.utimes(t.absolute,t.atime||new Date,t.mtime,done)}if(this[H](t)){o++;c.chown(t.absolute,this[z](t),this[V](t),done)}done()}))}[C](t){t.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t});t.resume()}[T](t,r){this[O](t,t.linkpath,"symlink",r)}[A](t,r){const i=y(u.resolve(this.cwd,t.linkpath));this[O](t,i,"link",r)}[L](){this[D]++}[M](){this[D]--;this[U]()}[B](t){this[M]();t.resume()}[x](t,r){return t.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Y}[w](t){this[L]();const r=[t.path];if(t.linkpath){r.push(t.linkpath)}this.reservations.reserve(r,(r=>this[E](t,r)))}[S](t){if(t.type==="SymbolicLink"){dropCache(this.dirCache)}else if(t.type!=="Directory"){pruneCache(this.dirCache,t.absolute)}}[E](t,r){this[S](t);const done=i=>{this[S](t);r(i)};const checkCwd=()=>{this[I](this.cwd,this.dmode,(r=>{if(r){this[N](r,t);done();return}this[G]=true;start()}))};const start=()=>{if(t.absolute!==this.cwd){const r=y(u.dirname(t.absolute));if(r!==this.cwd){return this[I](r,this.dmode,(r=>{if(r){this[N](r,t);done();return}afterMakeParent()}))}}afterMakeParent()};const afterMakeParent=()=>{c.lstat(t.absolute,((r,i)=>{if(i&&(this.keep||this.newer&&i.mtime>t.mtime)){this[B](t);done();return}if(r||this[x](t,i)){return this[R](null,t,done)}if(i.isDirectory()){if(t.type==="Directory"){const r=!this.noChmod&&t.mode&&(i.mode&4095)!==t.mode;const afterChmod=r=>this[R](r,t,done);if(!r){return afterChmod()}return c.chmod(t.absolute,t.mode,afterChmod)}if(t.absolute!==this.cwd){return c.rmdir(t.absolute,(r=>this[R](r,t,done)))}}if(t.absolute===this.cwd){return this[R](null,t,done)}unlinkFile(t.absolute,(r=>this[R](r,t,done)))}))};if(this[G]){start()}else{checkCwd()}}[R](t,r,i){if(t){this[N](t,r);i();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[P](r,i);case"Link":return this[A](r,i);case"SymbolicLink":return this[T](r,i);case"Directory":case"GNUDumpDir":return this[$](r,i)}}[O](t,r,i,o){c[i](r,t.absolute,(r=>{if(r){this[N](r,t)}else{this[M]();t.resume()}o()}))}}const callSync=t=>{try{return[null,t()]}catch(t){return[t,null]}};class UnpackSync extends Unpack{[R](t,r){return super[R](t,r,(()=>{}))}[w](t){this[S](t);if(!this[G]){const r=this[I](this.cwd,this.dmode);if(r){return this[N](r,t)}this[G]=true}if(t.absolute!==this.cwd){const r=y(u.dirname(t.absolute));if(r!==this.cwd){const i=this[I](r,this.dmode);if(i){return this[N](i,t)}}}const[r,i]=callSync((()=>c.lstatSync(t.absolute)));if(i&&(this.keep||this.newer&&i.mtime>t.mtime)){return this[B](t)}if(r||this[x](t,i)){return this[R](null,t)}if(i.isDirectory()){if(t.type==="Directory"){const r=!this.noChmod&&t.mode&&(i.mode&4095)!==t.mode;const[o]=r?callSync((()=>{c.chmodSync(t.absolute,t.mode)})):[];return this[R](o,t)}const[r]=callSync((()=>c.rmdirSync(t.absolute)));this[R](r,t)}const[o]=t.absolute===this.cwd?[]:callSync((()=>unlinkFileSync(t.absolute)));this[R](o,t)}[P](t,r){const i=t.mode&4095||this.fmode;const oner=i=>{let a;try{c.closeSync(o)}catch(t){a=t}if(i||a){this[N](i||a,t)}r()};let o;try{o=c.openSync(t.absolute,K(t.size),i)}catch(t){return oner(t)}const a=this.transform?this.transform(t)||t:t;if(a!==t){a.on("error",(r=>this[N](r,t)));t.pipe(a)}a.on("data",(t=>{try{c.writeSync(o,t,0,t.length)}catch(t){oner(t)}}));a.on("end",(r=>{let i=null;if(t.mtime&&!this.noMtime){const r=t.atime||new Date;const a=t.mtime;try{c.futimesSync(o,r,a)}catch(o){try{c.utimesSync(t.absolute,r,a)}catch(t){i=o}}}if(this[H](t)){const r=this[z](t);const a=this[V](t);try{c.fchownSync(o,r,a)}catch(o){try{c.chownSync(t.absolute,r,a)}catch(t){i=i||o}}}oner(i)}))}[$](t,r){const i=t.mode&4095||this.dmode;const o=this[I](t.absolute,i);if(o){this[N](o,t);r();return}if(t.mtime&&!this.noMtime){try{c.utimesSync(t.absolute,t.atime||new Date,t.mtime)}catch(o){}}if(this[H](t)){try{c.chownSync(t.absolute,this[z](t),this[V](t))}catch(o){}}r();t.resume()}[I](t,r){try{return h.sync(y(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(t){return t}}[O](t,r,i,o){try{c[i+"Sync"](r,t.absolute);o();t.resume()}catch(r){return this[N](r,t)}}}Unpack.Sync=UnpackSync;t.exports=Unpack},9472:(t,r,i)=>{"use strict";const o=i(3831);const a=i(1138);t.exports=(t,r,i)=>{const c=o(t);if(!c.file){throw new TypeError("file is required")}if(c.gzip){throw new TypeError("cannot append to compressed archives")}if(!r||!Array.isArray(r)||!r.length){throw new TypeError("no files or directories specified")}r=Array.from(r);mtimeFilter(c);return a(c,r,i)};const mtimeFilter=t=>{const r=t.filter;if(!t.mtimeCache){t.mtimeCache=new Map}t.filter=r?(i,o)=>r(i,o)&&!(t.mtimeCache.get(i)>o.mtime):(r,i)=>!(t.mtimeCache.get(r)>i.mtime)}},8920:t=>{"use strict";t.exports=t=>class extends t{warn(t,r,i={}){if(this.file){i.file=this.file}if(this.cwd){i.cwd=this.cwd}i.code=r instanceof Error&&r.code||t;i.tarCode=t;if(!this.strict&&i.recoverable!==false){if(r instanceof Error){i=Object.assign(r,i);r=r.message}this.emit("warn",i.tarCode,r,i)}else if(r instanceof Error){this.emit("error",Object.assign(r,i))}else{this.emit("error",Object.assign(new Error(`${t}: ${r}`),i))}}}},4099:t=>{"use strict";const r=["|","<",">","?",":"];const i=r.map((t=>String.fromCharCode(61440+t.charCodeAt(0))));const o=new Map(r.map(((t,r)=>[t,i[r]])));const a=new Map(i.map(((t,i)=>[t,r[i]])));t.exports={encode:t=>r.reduce(((t,r)=>t.split(r).join(o.get(r))),t),decode:t=>i.reduce(((t,r)=>t.split(r).join(a.get(r))),t)}},1944:(t,r,i)=>{"use strict";const{Minipass:o}=i(5540);const a=i(9037);const c=i(1703);const l=i(7147);const u=i(1017);const h=i(9740);const d=i(2517);const prefixPath=(t,r)=>{if(!r){return h(t)}t=h(t).replace(/^\.(\/|$)/,"");return d(r)+"/"+t};const p=16*1024*1024;const m=Symbol("process");const y=Symbol("file");const g=Symbol("directory");const v=Symbol("symlink");const b=Symbol("hardlink");const w=Symbol("header");const E=Symbol("read");const S=Symbol("lstat");const x=Symbol("onlstat");const R=Symbol("onread");const P=Symbol("onreadlink");const $=Symbol("openfile");const O=Symbol("onopenfile");const T=Symbol("close");const A=Symbol("mode");const C=Symbol("awaitDrain");const k=Symbol("ondrain");const I=Symbol("prefix");const N=Symbol("hadError");const D=i(8920);const L=i(4099);const M=i(332);const j=i(6601);const U=D(class WriteEntry extends o{constructor(t,r){r=r||{};super(r);if(typeof t!=="string"){throw new TypeError("path is required")}this.path=h(t);this.portable=!!r.portable;this.myuid=process.getuid&&process.getuid()||0;this.myuser=process.env.USER||"";this.maxReadSize=r.maxReadSize||p;this.linkCache=r.linkCache||new Map;this.statCache=r.statCache||new Map;this.preservePaths=!!r.preservePaths;this.cwd=h(r.cwd||process.cwd());this.strict=!!r.strict;this.noPax=!!r.noPax;this.noMtime=!!r.noMtime;this.mtime=r.mtime||null;this.prefix=r.prefix?h(r.prefix):null;this.fd=null;this.blockLen=null;this.blockRemain=null;this.buf=null;this.offset=null;this.length=null;this.pos=null;this.remain=null;if(typeof r.onwarn==="function"){this.on("warn",r.onwarn)}let i=false;if(!this.preservePaths){const[t,r]=M(this.path);if(t){this.path=r;i=t}}this.win32=!!r.win32||process.platform==="win32";if(this.win32){this.path=L.decode(this.path.replace(/\\/g,"/"));t=t.replace(/\\/g,"/")}this.absolute=h(r.absolute||u.resolve(this.cwd,t));if(this.path===""){this.path="./"}if(i){this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path})}if(this.statCache.has(this.absolute)){this[x](this.statCache.get(this.absolute))}else{this[S]()}}emit(t,...r){if(t==="error"){this[N]=true}return super.emit(t,...r)}[S](){l.lstat(this.absolute,((t,r)=>{if(t){return this.emit("error",t)}this[x](r)}))}[x](t){this.statCache.set(this.absolute,t);this.stat=t;if(!t.isFile()){t.size=0}this.type=getType(t);this.emit("stat",t);this[m]()}[m](){switch(this.type){case"File":return this[y]();case"Directory":return this[g]();case"SymbolicLink":return this[v]();default:return this.end()}}[A](t){return j(t,this.type==="Directory",this.portable)}[I](t){return prefixPath(t,this.prefix)}[w](){if(this.type==="Directory"&&this.portable){this.noMtime=true}this.header=new c({path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,mode:this[A](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax){super.write(new a({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode())}super.write(this.header.block)}[g](){if(this.path.slice(-1)!=="/"){this.path+="/"}this.stat.size=0;this[w]();this.end()}[v](){l.readlink(this.absolute,((t,r)=>{if(t){return this.emit("error",t)}this[P](r)}))}[P](t){this.linkpath=h(t);this[w]();this.end()}[b](t){this.type="Link";this.linkpath=h(u.relative(this.cwd,t));this.stat.size=0;this[w]();this.end()}[y](){if(this.stat.nlink>1){const t=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(t)){const r=this.linkCache.get(t);if(r.indexOf(this.cwd)===0){return this[b](r)}}this.linkCache.set(t,this.absolute)}this[w]();if(this.stat.size===0){return this.end()}this[$]()}[$](){l.open(this.absolute,"r",((t,r)=>{if(t){return this.emit("error",t)}this[O](r)}))}[O](t){this.fd=t;if(this[N]){return this[T]()}this.blockLen=512*Math.ceil(this.stat.size/512);this.blockRemain=this.blockLen;const r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r);this.offset=0;this.pos=0;this.remain=this.stat.size;this.length=this.buf.length;this[E]()}[E](){const{fd:t,buf:r,offset:i,length:o,pos:a}=this;l.read(t,r,i,o,a,((t,r)=>{if(t){return this[T]((()=>this.emit("error",t)))}this[R](r)}))}[T](t){l.close(this.fd,t)}[R](t){if(t<=0&&this.remain>0){const t=new Error("encountered unexpected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[T]((()=>this.emit("error",t)))}if(t>this.remain){const t=new Error("did not encounter expected EOF");t.path=this.absolute;t.syscall="read";t.code="EOF";return this[T]((()=>this.emit("error",t)))}if(t===this.remain){for(let r=t;r<this.length&&t<this.blockRemain;r++){this.buf[r+this.offset]=0;t++;this.remain++}}const r=this.offset===0&&t===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+t);const i=this.write(r);if(!i){this[C]((()=>this[k]()))}else{this[k]()}}[C](t){this.once("drain",t)}write(t){if(this.blockRemain<t.length){const t=new Error("writing more data than expected");t.path=this.absolute;return this.emit("error",t)}this.remain-=t.length;this.blockRemain-=t.length;this.pos+=t.length;this.offset+=t.length;return super.write(t)}[k](){if(!this.remain){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return this[T]((t=>t?this.emit("error",t):this.end()))}if(this.offset>=this.length){this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length));this.offset=0}this.length=this.buf.length-this.offset;this[E]()}});class WriteEntrySync extends U{[S](){this[x](l.lstatSync(this.absolute))}[v](){this[P](l.readlinkSync(this.absolute))}[$](){this[O](l.openSync(this.absolute,"r"))}[E](){let t=true;try{const{fd:r,buf:i,offset:o,length:a,pos:c}=this;const u=l.readSync(r,i,o,a,c);this[R](u);t=false}finally{if(t){try{this[T]((()=>{}))}catch(t){}}}}[C](t){t()}[T](t){l.closeSync(this.fd);t()}}const B=D(class WriteEntryTar extends o{constructor(t,r){r=r||{};super(r);this.preservePaths=!!r.preservePaths;this.portable=!!r.portable;this.strict=!!r.strict;this.noPax=!!r.noPax;this.noMtime=!!r.noMtime;this.readEntry=t;this.type=t.type;if(this.type==="Directory"&&this.portable){this.noMtime=true}this.prefix=r.prefix||null;this.path=h(t.path);this.mode=this[A](t.mode);this.uid=this.portable?null:t.uid;this.gid=this.portable?null:t.gid;this.uname=this.portable?null:t.uname;this.gname=this.portable?null:t.gname;this.size=t.size;this.mtime=this.noMtime?null:r.mtime||t.mtime;this.atime=this.portable?null:t.atime;this.ctime=this.portable?null:t.ctime;this.linkpath=h(t.linkpath);if(typeof r.onwarn==="function"){this.on("warn",r.onwarn)}let i=false;if(!this.preservePaths){const[t,r]=M(this.path);if(t){this.path=r;i=t}}this.remain=t.size;this.blockRemain=t.startBlockSize;this.header=new c({path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(i){this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path})}if(this.header.encode()&&!this.noPax){super.write(new a({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[I](this.path),linkpath:this.type==="Link"?this[I](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode())}super.write(this.header.block);t.pipe(this)}[I](t){return prefixPath(t,this.prefix)}[A](t){return j(t,this.type==="Directory",this.portable)}write(t){const r=t.length;if(r>this.blockRemain){throw new Error("writing more to entry than is appropriate")}this.blockRemain-=r;return super.write(t)}end(){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return super.end()}});U.Sync=WriteEntrySync;U.Tar=B;const getType=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";t.exports=U},492:(t,r,i)=>{"use strict";
|
|
67
67
|
/*!
|
|
68
68
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
69
69
|
*
|
|
70
70
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
71
71
|
* Released under the MIT License.
|
|
72
|
-
*/const
|
|
72
|
+
*/const o=i(3357);const toRegexRange=(t,r,i)=>{if(o(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(r===void 0||t===r){return String(t)}if(o(r)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let a={relaxZeros:true,...i};if(typeof a.strictZeros==="boolean"){a.relaxZeros=a.strictZeros===false}let c=String(a.relaxZeros);let l=String(a.shorthand);let u=String(a.capture);let h=String(a.wrap);let d=t+":"+r+"="+c+l+u+h;if(toRegexRange.cache.hasOwnProperty(d)){return toRegexRange.cache[d].result}let p=Math.min(t,r);let m=Math.max(t,r);if(Math.abs(p-m)===1){let i=t+"|"+r;if(a.capture){return`(${i})`}if(a.wrap===false){return i}return`(?:${i})`}let y=hasPadding(t)||hasPadding(r);let g={min:t,max:r,a:p,b:m};let v=[];let b=[];if(y){g.isPadded=y;g.maxLen=String(g.max).length}if(p<0){let t=m<0?Math.abs(m):1;b=splitToPatterns(t,Math.abs(p),g,a);p=g.a=0}if(m>=0){v=splitToPatterns(p,m,g,a)}g.negatives=b;g.positives=v;g.result=collatePatterns(b,v,a);if(a.capture===true){g.result=`(${g.result})`}else if(a.wrap!==false&&v.length+b.length>1){g.result=`(?:${g.result})`}toRegexRange.cache[d]=g;return g.result};function collatePatterns(t,r,i){let o=filterPatterns(t,r,"-",false,i)||[];let a=filterPatterns(r,t,"",false,i)||[];let c=filterPatterns(t,r,"-?",true,i)||[];let l=o.concat(c).concat(a);return l.join("|")}function splitToRanges(t,r){let i=1;let o=1;let a=countNines(t,i);let c=new Set([r]);while(t<=a&&a<=r){c.add(a);i+=1;a=countNines(t,i)}a=countZeros(r+1,o)-1;while(t<a&&a<=r){c.add(a);o+=1;a=countZeros(r+1,o)-1}c=[...c];c.sort(compare);return c}function rangeToPattern(t,r,i){if(t===r){return{pattern:t,count:[],digits:0}}let o=zip(t,r);let a=o.length;let c="";let l=0;for(let t=0;t<a;t++){let[r,a]=o[t];if(r===a){c+=r}else if(r!=="0"||a!=="9"){c+=toCharacterClass(r,a,i)}else{l++}}if(l){c+=i.shorthand===true?"\\d":"[0-9]"}return{pattern:c,count:[l],digits:a}}function splitToPatterns(t,r,i,o){let a=splitToRanges(t,r);let c=[];let l=t;let u;for(let t=0;t<a.length;t++){let r=a[t];let h=rangeToPattern(String(l),String(r),o);let d="";if(!i.isPadded&&u&&u.pattern===h.pattern){if(u.count.length>1){u.count.pop()}u.count.push(h.count[0]);u.string=u.pattern+toQuantifier(u.count);l=r+1;continue}if(i.isPadded){d=padZeros(r,i,o)}h.string=d+h.pattern+toQuantifier(h.count);c.push(h);l=r+1;u=h}return c}function filterPatterns(t,r,i,o,a){let c=[];for(let a of t){let{string:t}=a;if(!o&&!contains(r,"string",t)){c.push(i+t)}if(o&&contains(r,"string",t)){c.push(i+t)}}return c}function zip(t,r){let i=[];for(let o=0;o<t.length;o++)i.push([t[o],r[o]]);return i}function compare(t,r){return t>r?1:r>t?-1:0}function contains(t,r,i){return t.some((t=>t[r]===i))}function countNines(t,r){return Number(String(t).slice(0,-r)+"9".repeat(r))}function countZeros(t,r){return t-t%Math.pow(10,r)}function toQuantifier(t){let[r=0,i=""]=t;if(i||r>1){return`{${r+(i?","+i:"")}}`}return""}function toCharacterClass(t,r,i){return`[${t}${r-t===1?"":"-"}${r}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,r,i){if(!r.isPadded){return t}let o=Math.abs(r.maxLen-String(t).length);let a=i.relaxZeros!==false;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:{return a?`0{0,${o}}`:`0{${o}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5656:(t,r,i)=>{const{URL:o}=i(7310);const{join:a}=i(1017);const c=i(7147);const{promisify:l}=i(3837);const{tmpdir:u}=i(2037);const h=i(9074);const d=l(c.writeFile);const p=l(c.mkdir);const m=l(c.readFile);const compareVersions=(t,r)=>t.localeCompare(r,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,r)=>{const i=u();const o=a(i,"update-check");if(!c.existsSync(o)){await p(o)}let l=`${t.name}-${r}.json`;if(t.scope){l=`${t.scope}-${l}`}return a(o,l)};const evaluateCache=async(t,r,i)=>{if(c.existsSync(t)){const o=await m(t,"utf8");const{lastUpdate:a,latest:c}=JSON.parse(o);const l=a+i;if(l>r){return{shouldCheck:false,latest:c}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,r,i)=>{const o=JSON.stringify({latest:r,lastUpdate:i});await d(t,o,"utf8")};const loadPackage=(t,r)=>new Promise(((o,a)=>{const c={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(r){c.headers.authorization=`${r.type} ${r.token}`}const{get:l}=i(t.protocol==="https:"?5687:3685);l(c,(t=>{const{statusCode:r}=t;if(r!==200){const i=new Error(`Request failed with code ${r}`);i.code=r;a(i);t.resume();return}let i="";t.setEncoding("utf8");t.on("data",(t=>{i+=t}));t.on("end",(()=>{try{const t=JSON.parse(i);o(t)}catch(t){a(t)}}))})).on("error",a).on("timeout",a)}));const getMostRecent=async({full:t,scope:r},a)=>{const c=h(r);const l=new o(t,c);let u=null;try{u=await loadPackage(l)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=i(1281);const r=t(c,{recursive:true});u=await loadPackage(l,r)}else{throw t}}const d=u["dist-tags"][a];if(!d){throw new Error(`Distribution tag ${a} is not available`)}return d};const y={interval:36e5,distTag:"latest"};const getDetails=t=>{const r={full:encode(t)};if(t.includes("/")){const i=t.split("/");r.scope=i[0];r.name=i[1]}else{r.scope=null;r.name=t}return r};t.exports=async(t,r)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const i=getDetails(t.name);const o=Date.now();const{distTag:a,interval:c}=Object.assign({},y,r);const l=await getFile(i,a);let u=null;let h=true;({shouldCheck:h,latest:u}=await evaluateCache(l,o,c));if(h){u=await getMostRecent(i,a);await updateCache(l,u,o)}const d=compareVersions(t.version,u);if(d===-1){return{latest:u,fromCache:!h}}return null}},4856:function(t,r){
|
|
73
73
|
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
74
|
-
(function(e,r){true?r(t):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length>1){t[0]=t[0].slice(0,-1);var s=t.length-1;for(var n=1;n<s;++n){t[n]=t[n].slice(1,-1)}t[s]=t[s].slice(1);return t.join("")}else{return t[0]}}function subexp(e){return"(?:"+e+")"}function typeOf(e){return e===undefined?"undefined":e===null?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return e!==undefined&&e!==null?e instanceof Array?e:typeof e.length!=="number"||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t){for(var s in t){r[s]=t[s]}}return r}function buildExps(e){var t="[A-Za-z]",r="[\\x0D]",s="[0-9]",n="[\\x22]",i=merge(s,"[A-Fa-f]"),o="[\\x0A]",a="[\\x20]",c=subexp(subexp("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+subexp("%[89A-Fa-f]"+i+"%"+i+i)+"|"+subexp("%"+i+i)),l="[\\:\\/\\?\\#\\[\\]\\@]",u="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",h=merge(l,u),d=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",p=e?"[\\uE000-\\uF8FF]":"[]",m=merge(t,s,"[\\-\\.\\_\\~]",d),y=subexp(t+merge(t,s,"[\\+\\-\\.]")+"*"),g=subexp(subexp(c+"|"+merge(m,u,"[\\:]"))+"*"),v=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("[1-9]"+s)+"|"+s),b=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("0?[1-9]"+s)+"|0?0?"+s),w=subexp(b+"\\."+b+"\\."+b+"\\."+b),E=subexp(i+"{1,4}"),S=subexp(subexp(E+"\\:"+E)+"|"+w),x=subexp(subexp(E+"\\:")+"{6}"+S),R=subexp("\\:\\:"+subexp(E+"\\:")+"{5}"+S),P=subexp(subexp(E)+"?\\:\\:"+subexp(E+"\\:")+"{4}"+S),O=subexp(subexp(subexp(E+"\\:")+"{0,1}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{3}"+S),$=subexp(subexp(subexp(E+"\\:")+"{0,2}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{2}"+S),A=subexp(subexp(subexp(E+"\\:")+"{0,3}"+E)+"?\\:\\:"+E+"\\:"+S),T=subexp(subexp(subexp(E+"\\:")+"{0,4}"+E)+"?\\:\\:"+S),C=subexp(subexp(subexp(E+"\\:")+"{0,5}"+E)+"?\\:\\:"+E),k=subexp(subexp(subexp(E+"\\:")+"{0,6}"+E)+"?\\:\\:"),I=subexp([x,R,P,O,$,A,T,C,k].join("|")),N=subexp(subexp(m+"|"+c)+"+"),D=subexp(I+"\\%25"+N),L=subexp(I+subexp("\\%25|\\%(?!"+i+"{2})")+N),M=subexp("[vV]"+i+"+\\."+merge(m,u,"[\\:]")+"+"),j=subexp("\\["+subexp(L+"|"+I+"|"+M)+"\\]"),F=subexp(subexp(c+"|"+merge(m,u))+"*"),U=subexp(j+"|"+w+"(?!"+F+")"+"|"+F),B=subexp(s+"*"),H=subexp(subexp(g+"@")+"?"+U+subexp("\\:"+B)+"?"),z=subexp(c+"|"+merge(m,u,"[\\:\\@]")),G=subexp(z+"*"),V=subexp(z+"+"),q=subexp(subexp(c+"|"+merge(m,u,"[\\@]"))+"+"),W=subexp(subexp("\\/"+G)+"*"),K=subexp("\\/"+subexp(V+W)+"?"),Y=subexp(q+W),Z=subexp(V+W),J="(?!"+z+")",X=subexp(W+"|"+K+"|"+Y+"|"+Z+"|"+J),Q=subexp(subexp(z+"|"+merge("[\\/\\?]",p))+"*"),ee=subexp(subexp(z+"|[\\/\\?]")+"*"),te=subexp(subexp("\\/\\/"+H+W)+"|"+K+"|"+Z+"|"+J),re=subexp(y+"\\:"+te+subexp("\\?"+Q)+"?"+subexp("\\#"+ee)+"?"),se=subexp(subexp("\\/\\/"+H+W)+"|"+K+"|"+Y+"|"+J),ne=subexp(se+subexp("\\?"+Q)+"?"+subexp("\\#"+ee)+"?"),ie=subexp(re+"|"+ne),oe=subexp(y+"\\:"+te+subexp("\\?"+Q)+"?"),ae="^("+y+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Z+"|"+J+")")+subexp("\\?("+Q+")")+"?"+subexp("\\#("+ee+")")+"?$",ce="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Y+"|"+J+")")+subexp("\\?("+Q+")")+"?"+subexp("\\#("+ee+")")+"?$",le="^("+y+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Z+"|"+J+")")+subexp("\\?("+Q+")")+"?$",ue="^"+subexp("\\#("+ee+")")+"?$",he="^"+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",t,s,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",m,u),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",m,u),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",m,u),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",m,u),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",m,u,"[\\:\\@\\/\\?]",p),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",m,u,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",m,u),"g"),UNRESERVED:new RegExp(m,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",m,h),"g"),PCT_ENCODED:new RegExp(c,"g"),IPV4ADDRESS:new RegExp("^("+w+")$"),IPV6ADDRESS:new RegExp("^\\[?("+I+")"+subexp(subexp("\\%25|\\%(?!"+i+"{2})")+"("+N+")")+"?\\]?$")}}var t=buildExps(false);var r=buildExps(true);var s=function(){function sliceIterator(e,t){var r=[];var s=true;var n=false;var i=undefined;try{for(var o=e[Symbol.iterator](),a;!(s=(a=o.next()).done);s=true){r.push(a.value);if(t&&r.length===t)break}}catch(e){n=true;i=e}finally{try{if(!s&&o["return"])o["return"]()}finally{if(n)throw i}}return r}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else{return Array.from(e)}};var n=2147483647;var i=36;var o=1;var a=26;var c=38;var l=700;var u=72;var h=128;var d="-";var p=/^xn--/;var m=/[^\0-\x7E]/;var y=/[\x2E\u3002\uFF0E\uFF61]/g;var g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var v=i-o;var b=Math.floor;var w=String.fromCharCode;function error$1(e){throw new RangeError(g[e])}function map(e,t){var r=[];var s=e.length;while(s--){r[s]=t(e[s])}return r}function mapDomain(e,t){var r=e.split("@");var s="";if(r.length>1){s=r[0]+"@";e=r[1]}e=e.replace(y,".");var n=e.split(".");var i=map(n,t).join(".");return s+i}function ucs2decode(e){var t=[];var r=0;var s=e.length;while(r<s){var n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<s){var i=e.charCodeAt(r++);if((i&64512)==56320){t.push(((n&1023)<<10)+(i&1023)+65536)}else{t.push(n);r--}}else{t.push(n)}}return t}var E=function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))};var S=function basicToDigit(e){if(e-48<10){return e-22}if(e-65<26){return e-65}if(e-97<26){return e-97}return i};var x=function digitToBasic(e,t){return e+22+75*(e<26)-((t!=0)<<5)};var R=function adapt(e,t,r){var s=0;e=r?b(e/l):e>>1;e+=b(e/t);for(;e>v*a>>1;s+=i){e=b(e/v)}return b(s+(v+1)*e/(e+c))};var P=function decode(e){var t=[];var r=e.length;var s=0;var c=h;var l=u;var p=e.lastIndexOf(d);if(p<0){p=0}for(var m=0;m<p;++m){if(e.charCodeAt(m)>=128){error$1("not-basic")}t.push(e.charCodeAt(m))}for(var y=p>0?p+1:0;y<r;){var g=s;for(var v=1,w=i;;w+=i){if(y>=r){error$1("invalid-input")}var E=S(e.charCodeAt(y++));if(E>=i||E>b((n-s)/v)){error$1("overflow")}s+=E*v;var x=w<=l?o:w>=l+a?a:w-l;if(E<x){break}var P=i-x;if(v>b(n/P)){error$1("overflow")}v*=P}var O=t.length+1;l=R(s-g,O,g==0);if(b(s/O)>n-c){error$1("overflow")}c+=b(s/O);s%=O;t.splice(s++,0,c)}return String.fromCodePoint.apply(String,t)};var O=function encode(e){var t=[];e=ucs2decode(e);var r=e.length;var s=h;var c=0;var l=u;var p=true;var m=false;var y=undefined;try{for(var g=e[Symbol.iterator](),v;!(p=(v=g.next()).done);p=true){var E=v.value;if(E<128){t.push(w(E))}}}catch(e){m=true;y=e}finally{try{if(!p&&g.return){g.return()}}finally{if(m){throw y}}}var S=t.length;var P=S;if(S){t.push(d)}while(P<r){var O=n;var $=true;var A=false;var T=undefined;try{for(var C=e[Symbol.iterator](),k;!($=(k=C.next()).done);$=true){var I=k.value;if(I>=s&&I<O){O=I}}}catch(e){A=true;T=e}finally{try{if(!$&&C.return){C.return()}}finally{if(A){throw T}}}var N=P+1;if(O-s>b((n-c)/N)){error$1("overflow")}c+=(O-s)*N;s=O;var D=true;var L=false;var M=undefined;try{for(var j=e[Symbol.iterator](),F;!(D=(F=j.next()).done);D=true){var U=F.value;if(U<s&&++c>n){error$1("overflow")}if(U==s){var B=c;for(var H=i;;H+=i){var z=H<=l?o:H>=l+a?a:H-l;if(B<z){break}var G=B-z;var V=i-z;t.push(w(x(z+G%V,0)));B=b(G/V)}t.push(w(x(B,0)));l=R(c,N,P==S);c=0;++P}}}catch(e){L=true;M=e}finally{try{if(!D&&j.return){j.return()}}finally{if(L){throw M}}}++c;++s}return t.join("")};var $=function toUnicode(e){return mapDomain(e,(function(e){return p.test(e)?P(e.slice(4).toLowerCase()):e}))};var A=function toASCII(e){return mapDomain(e,(function(e){return m.test(e)?"xn--"+O(e):e}))};var T={version:"2.1.0",ucs2:{decode:ucs2decode,encode:E},decode:P,encode:O,toASCII:A,toUnicode:$};var C={};function pctEncChar(e){var t=e.charCodeAt(0);var r=void 0;if(t<16)r="%0"+t.toString(16).toUpperCase();else if(t<128)r="%"+t.toString(16).toUpperCase();else if(t<2048)r="%"+(t>>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else r="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var t="";var r=0;var s=e.length;while(r<s){var n=parseInt(e.substr(r+1,2),16);if(n<128){t+=String.fromCharCode(n);r+=3}else if(n>=194&&n<224){if(s-r>=6){var i=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((n&31)<<6|i&63)}else{t+=e.substr(r,6)}r+=6}else if(n>=224){if(s-r>=9){var o=parseInt(e.substr(r+4,2),16);var a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((n&15)<<12|(o&63)<<6|a&63)}else{t+=e.substr(r,9)}r+=9}else{t+=e.substr(r,3);r+=3}}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(t.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[];var n=s(r,2),i=n[1];if(i){return i.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[];var n=s(r,3),i=n[1],o=n[2];if(i){var a=i.toLowerCase().split("::").reverse(),c=s(a,2),l=c[0],u=c[1];var h=u?u.split(":").map(_stripLeadingZeros):[];var d=l.split(":").map(_stripLeadingZeros);var p=t.IPV4ADDRESS.test(d[d.length-1]);var m=p?7:8;var y=d.length-m;var g=Array(m);for(var v=0;v<m;++v){g[v]=h[v]||d[y+v]||""}if(p){g[m-1]=_normalizeIPv4(g[m-1],t)}var b=g.reduce((function(e,t,r){if(!t||t==="0"){var s=e[e.length-1];if(s&&s.index+s.length===r){s.length++}else{e.push({index:r,length:1})}}return e}),[]);var w=b.sort((function(e,t){return t.length-e.length}))[0];var E=void 0;if(w&&w.length>1){var S=g.slice(0,w.index);var x=g.slice(w.index+w.length);E=S.join(":")+"::"+x.join(":")}else{E=g.join(":")}if(o){E+="%"+o}return E}else{return e}}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var I="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n={};var i=s.iri!==false?r:t;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var o=e.match(k);if(o){if(I){n.scheme=o[1];n.userinfo=o[3];n.host=o[4];n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=o[7];n.fragment=o[8];if(isNaN(n.port)){n.port=o[5]}}else{n.scheme=o[1]||undefined;n.userinfo=e.indexOf("@")!==-1?o[3]:undefined;n.host=e.indexOf("//")!==-1?o[4]:undefined;n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=e.indexOf("?")!==-1?o[7]:undefined;n.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(n.port)){n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}}if(n.host){n.host=_normalizeIPv6(_normalizeIPv4(n.host,i),i)}if(n.scheme===undefined&&n.userinfo===undefined&&n.host===undefined&&n.port===undefined&&!n.path&&n.query===undefined){n.reference="same-document"}else if(n.scheme===undefined){n.reference="relative"}else if(n.fragment===undefined){n.reference="absolute"}else{n.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==n.reference){n.error=n.error||"URI is not a "+s.reference+" reference."}var a=C[(s.scheme||n.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!a||!a.unicodeSupport)){if(n.host&&(s.domainHost||a&&a.domainHost)){try{n.host=T.toASCII(n.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(n,t)}else{_normalizeComponentEncoding(n,i)}if(a&&a.parse){a.parse(n,s)}}else{n.error=n.error||"URI can not be parsed."}return n}function _recomposeAuthority(e,s){var n=s.iri!==false?r:t;var i=[];if(e.userinfo!==undefined){i.push(e.userinfo);i.push("@")}if(e.host!==undefined){i.push(_normalizeIPv6(_normalizeIPv4(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})))}if(typeof e.port==="number"||typeof e.port==="string"){i.push(":");i.push(String(e.port))}return i.length?i.join(""):undefined}var N=/^\.\.?\//;var D=/^\/\.(\/|$)/;var L=/^\/\.\.(\/|$)/;var M=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var t=[];while(e.length){if(e.match(N)){e=e.replace(N,"")}else if(e.match(D)){e=e.replace(D,"/")}else if(e.match(L)){e=e.replace(L,"/");t.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(M);if(r){var s=r[0];e=e.slice(s.length);t.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return t.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=s.iri?r:t;var i=[];var o=C[(s.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(e,s);if(e.host){if(n.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||o&&o.domainHost){try{e.host=!s.iri?T.toASCII(e.host.replace(n.PCT_ENCODED,pctDecChars).toLowerCase()):T.toUnicode(e.host)}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+t}}}_normalizeComponentEncoding(e,n);if(s.reference!=="suffix"&&e.scheme){i.push(e.scheme);i.push(":")}var a=_recomposeAuthority(e,s);if(a!==undefined){if(s.reference!=="suffix"){i.push("//")}i.push(a);if(e.path&&e.path.charAt(0)!=="/"){i.push("/")}}if(e.path!==undefined){var c=e.path;if(!s.absolutePath&&(!o||!o.absolutePath)){c=removeDotSegments(c)}if(a===undefined){c=c.replace(/^\/\//,"/%2F")}i.push(c)}if(e.query!==undefined){i.push("?");i.push(e.query)}if(e.fragment!==undefined){i.push("#");i.push(e.fragment)}return i.join("")}function resolveComponents(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var n={};if(!s){e=parse(serialize(e,r),r);t=parse(serialize(t,r),r)}r=r||{};if(!r.tolerant&&t.scheme){n.scheme=t.scheme;n.userinfo=t.userinfo;n.host=t.host;n.port=t.port;n.path=removeDotSegments(t.path||"");n.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){n.userinfo=t.userinfo;n.host=t.host;n.port=t.port;n.path=removeDotSegments(t.path||"");n.query=t.query}else{if(!t.path){n.path=e.path;if(t.query!==undefined){n.query=t.query}else{n.query=e.query}}else{if(t.path.charAt(0)==="/"){n.path=removeDotSegments(t.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){n.path="/"+t.path}else if(!e.path){n.path=t.path}else{n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path}n.path=removeDotSegments(n.path)}n.query=t.query}n.userinfo=e.userinfo;n.host=e.host;n.port=e.port}n.scheme=e.scheme}n.fragment=t.fragment;return n}function resolve(e,t,r){var s=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,s),parse(t,s),s,true),s)}function normalize(e,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=parse(serialize(e,t),t)}return e}function equal(e,t,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=serialize(t,r)}return e===t}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var j={scheme:"http",domainHost:true,parse:function parse(e,t){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,t){var r=String(e.scheme).toLowerCase()==="https";if(e.port===(r?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var F={scheme:"https",domainHost:j.domainHost,parse:j.parse,serialize:j.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var U={scheme:"ws",domainHost:true,parse:function parse(e,t){var r=e;r.secure=isSecure(r);r.resourceName=(r.path||"/")+(r.query?"?"+r.query:"");r.path=undefined;r.query=undefined;return r},serialize:function serialize(e,t){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var r=e.resourceName.split("?"),n=s(r,2),i=n[0],o=n[1];e.path=i&&i!=="/"?i:undefined;e.query=o;e.resourceName=undefined}e.fragment=undefined;return e}};var B={scheme:"wss",domainHost:U.domainHost,parse:U.parse,serialize:U.serialize};var H={};var z=true;var G="[A-Za-z0-9\\-\\.\\_\\~"+(z?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var V="[0-9A-Fa-f]";var q=subexp(subexp("%[EFef]"+V+"%"+V+V+"%"+V+V)+"|"+subexp("%[89A-Fa-f]"+V+"%"+V+V)+"|"+subexp("%"+V+V));var W="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var K="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var Y=merge(K,'[\\"\\\\]');var Z="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var J=new RegExp(G,"g");var X=new RegExp(q,"g");var Q=new RegExp(merge("[^]",W,"[\\.]",'[\\"]',Y),"g");var ee=new RegExp(merge("[^]",G,Z),"g");var te=ee;function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(J)?e:t}var re={scheme:"mailto",parse:function parse$$1(e,t){var r=e;var s=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var n=false;var i={};var o=r.query.split("&");for(var a=0,c=o.length;a<c;++a){var l=o[a].split("=");switch(l[0]){case"to":var u=l[1].split(",");for(var h=0,d=u.length;h<d;++h){s.push(u[h])}break;case"subject":r.subject=unescapeComponent(l[1],t);break;case"body":r.body=unescapeComponent(l[1],t);break;default:n=true;i[unescapeComponent(l[0],t)]=unescapeComponent(l[1],t);break}}if(n)r.headers=i}r.query=undefined;for(var p=0,m=s.length;p<m;++p){var y=s[p].split("@");y[0]=unescapeComponent(y[0]);if(!t.unicodeSupport){try{y[1]=T.toASCII(unescapeComponent(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}}else{y[1]=unescapeComponent(y[1],t).toLowerCase()}s[p]=y.join("@")}return r},serialize:function serialize$$1(e,t){var r=e;var s=toArray(e.to);if(s){for(var n=0,i=s.length;n<i;++n){var o=String(s[n]);var a=o.lastIndexOf("@");var c=o.slice(0,a).replace(X,decodeUnreserved).replace(X,toUpperCase).replace(Q,pctEncChar);var l=o.slice(a+1);try{l=!t.iri?T.toASCII(unescapeComponent(l,t).toLowerCase()):T.toUnicode(l)}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(!t.iri?"ASCII":"Unicode")+" via punycode: "+e}s[n]=c+"@"+l}r.path=s.join(",")}var u=e.headers=e.headers||{};if(e.subject)u["subject"]=e.subject;if(e.body)u["body"]=e.body;var h=[];for(var d in u){if(u[d]!==H[d]){h.push(d.replace(X,decodeUnreserved).replace(X,toUpperCase).replace(ee,pctEncChar)+"="+u[d].replace(X,decodeUnreserved).replace(X,toUpperCase).replace(te,pctEncChar))}}if(h.length){r.query=h.join("&")}return r}};var se=/^([^\:]+)\:(.*)/;var ne={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(se);var s=e;if(r){var n=t.scheme||s.scheme||"urn";var i=r[1].toLowerCase();var o=r[2];var a=n+":"+(t.nid||i);var c=C[a];s.nid=i;s.nss=o;s.path=undefined;if(c){s=c.parse(s,t)}}else{s.error=s.error||"URN can not be parsed."}return s},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn";var s=e.nid;var n=r+":"+(t.nid||s);var i=C[n];if(i){e=i.serialize(e,t)}var o=e;var a=e.nss;o.path=(s||t.nid)+":"+a;return o}};var ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var oe={scheme:"urn:uuid",parse:function parse(e,t){var r=e;r.uuid=r.nss;r.nss=undefined;if(!t.tolerant&&(!r.uuid||!r.uuid.match(ie))){r.error=r.error||"UUID is not valid."}return r},serialize:function serialize(e,t){var r=e;r.nss=(e.uuid||"").toLowerCase();return r}};C[j.scheme]=j;C[F.scheme]=F;C[U.scheme]=U;C[B.scheme]=B;C[re.scheme]=re;C[ne.scheme]=ne;C[oe.scheme]=oe;e.SCHEMES=C;e.pctEncChar=pctEncChar;e.pctDecChars=pctDecChars;e.parse=parse;e.removeDotSegments=removeDotSegments;e.serialize=serialize;e.resolveComponents=resolveComponents;e.resolve=resolve;e.normalize=normalize;e.equal=equal;e.escapeComponent=escapeComponent;e.unescapeComponent=unescapeComponent;Object.defineProperty(e,"__esModule",{value:true})}))},2338:(e,t,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var n=r(3113);var i=["node_modules","favicon.ico"];var o=e.exports=function(e){var t=[];var r=[];if(e===null){r.push("name cannot be null");return done(t,r)}if(e===undefined){r.push("name cannot be undefined");return done(t,r)}if(typeof e!=="string"){r.push("name must be a string");return done(t,r)}if(!e.length){r.push("name length must be greater than zero")}if(e.match(/^\./)){r.push("name cannot start with a period")}if(e.match(/^_/)){r.push("name cannot start with an underscore")}if(e.trim()!==e){r.push("name cannot contain leading or trailing spaces")}i.forEach((function(t){if(e.toLowerCase()===t){r.push(t+" is a blacklisted name")}}));n.forEach((function(r){if(e.toLowerCase()===r){t.push(r+" is a core module name")}}));if(e.length>214){t.push("name can no longer contain more than 214 characters")}if(e.toLowerCase()!==e){t.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(e.split("/").slice(-1)[0])){t.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(e)!==e){var o=e.match(s);if(o){var a=o[1];var c=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(c)===c){return done(t,r)}}r.push("name can only contain URL-friendly characters")}return done(t,r)};o.scopedPackagePattern=s;var done=function(e,t){var r={validForNewPackages:t.length===0&&e.length===0,validForOldPackages:t.length===0,warnings:e,errors:t};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},7200:(e,t,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const n=r(1017);const i=s?";":":";const o=r(7745);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const r=t.colon||i;const n=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)];const o=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:n,pathExt:a,pathExtExe:o}};const which=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}if(!t)t={};const{pathEnv:s,pathExt:i,pathExtExe:a}=getPathInfo(e,t);const c=[];const step=r=>new Promise(((i,o)=>{if(r===s.length)return t.all&&c.length?i(c):o(getNotFoundError(e));const a=s[r];const l=/^".*"$/.test(a)?a.slice(1,-1):a;const u=n.join(l,e);const h=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;i(subStep(h,r,0))}));const subStep=(e,r,s)=>new Promise(((n,l)=>{if(s===i.length)return n(step(r+1));const u=i[s];o(e+u,{pathExt:a},((i,o)=>{if(!i&&o){if(t.all)c.push(e+u);else return n(e+u)}return n(subStep(e,r,s+1))}))}));return r?step(0).then((e=>r(null,e)),r):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:s,pathExtExe:i}=getPathInfo(e,t);const a=[];for(let c=0;c<r.length;c++){const l=r[c];const u=/^".*"$/.test(l)?l.slice(1,-1):l;const h=n.join(u,e);const d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;for(let e=0;e<s.length;e++){const r=d+s[e];try{const e=o.sync(r,{pathExt:i});if(e){if(t.all)a.push(r);else return r}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},3270:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}var s=e.apply(this,t);var n=t[t.length-1];if(typeof s==="function"&&s!==n){Object.keys(n).forEach((function(e){s[e]=n[e]}))}return s}}},9414:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},3401:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,s=arguments.length;r<s;r++){t.push(arguments[r])}}return t}Yallist.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var r=e.prev;if(t){t.prev=r}if(r){r.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=r}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};Yallist.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};Yallist.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){push(this,arguments[e])}return this.length};Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){unshift(this,arguments[e])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};Yallist.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};Yallist.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;r!==null;s++){e.call(t,r.value,s,this);r=r.next}};Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;r!==null;s--){e.call(t,r.value,s,this);r=r.prev}};Yallist.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++){r=r.next}if(t===e&&r!==null){return r.value}};Yallist.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++){r=r.prev}if(t===e&&r!==null){return r.value}};Yallist.prototype.map=function(e,t){t=t||this;var r=new Yallist;for(var s=this.head;s!==null;){r.push(e.call(t,s.value,this));s=s.next}return r};Yallist.prototype.mapReverse=function(e,t){t=t||this;var r=new Yallist;for(var s=this.tail;s!==null;){r.push(e.call(t,s.value,this));s=s.prev}return r};Yallist.prototype.reduce=function(e,t){var r;var s=this.head;if(arguments.length>1){r=t}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){r=e(r,s.value,n);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var s=this.tail;if(arguments.length>1){r=t}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){r=e(r,s.value,n);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var s=0,n=this.head;n!==null&&s<e;s++){n=n.next}for(;n!==null&&s<t;s++,n=n.next){r.push(n.value)}return r};Yallist.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var s=this.length,n=this.tail;n!==null&&s>t;s--){n=n.prev}for(;n!==null&&s>e;s--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,n=this.head;n!==null&&s<e;s++){n=n.next}var i=[];for(var s=0;n&&s<t;s++){i.push(n.value);n=this.removeNode(n)}if(n===null){n=this.tail}if(n!==this.head&&n!==this.tail){n=n.prev}for(var s=0;s<r.length;s++){n=insert(this,n,r[s])}return i};Yallist.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var r=e;r!==null;r=r.prev){var s=r.prev;r.prev=r.next;r.next=s}this.head=t;this.tail=e;return this};function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);if(s.next===null){e.tail=s}if(s.prev===null){e.head=s}e.length++;return s}function push(e,t){e.tail=new Node(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function Node(e,t,r,s){if(!(this instanceof Node)){return new Node(e,t,r,s)}this.list=s;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(r){r.prev=this;this.next=r}else{this.next=null}}try{r(9414)(Yallist)}catch(e){}},4282:(e,t,r)=>{"use strict";r.r(t);var s=r(9306);var n=r(4101);var i=r.n(n);var o=r(7136);var a=r.n(o);var c=r(1017);var l=r.n(c);var u=r(9966);var h=r.n(u);var d=r(5656);var p=r.n(d);var m=r(9239);var y=r.n(m);var g=r(7147);var v=r.n(g);var b=r(9312);var w=r.n(b);var E=r(5255);var S=r(2781);var x=r(3837);var R=r(2037);var P=r.n(R);const O=(0,x.promisify)(S.Stream.pipeline);async function isUrlOk(e){const t=await w().head(e).catch((e=>e));return t.statusCode===200}async function getRepoInfo(e,t){const[,r,s,n,i,...o]=e.pathname.split("/");const a=t?t.replace(/^\//,""):o.join("/");if(n===undefined||n===""&&i===undefined){const e=await w()(`https://api.github.com/repos/${r}/${s}`).catch((e=>e));if(e.statusCode!==200){return}const t=JSON.parse(e.body);return{username:r,name:s,branch:t["default_branch"],filePath:a}}const c=t?`${i}/${o.join("/")}`.replace(new RegExp(`/${a}|/$`),""):i;if(r&&s&&c&&n==="tree"){return{username:r,name:s,branch:c,filePath:a}}}function hasRepo({username:e,name:t,branch:r,filePath:s}){const n=`https://api.github.com/repos/${e}/${t}/contents`;const i=`${s?`/${s}`:""}/package.json`;return isUrlOk(n+i+`?ref=${r}`)}function existsInRepo(e){try{const t=new URL(e);return isUrlOk(t.href)}catch{return isUrlOk(`https://api.github.com/repos/vercel/next.js/contents/examples/${encodeURIComponent(e)}`)}}async function downloadTar(e){const t=(0,c.join)((0,R.tmpdir)(),`next.js-cna-example.temp-${Date.now()}`);await O(w().stream(e),(0,g.createWriteStream)(t));return t}async function downloadAndExtractRepo(e,{username:t,name:r,branch:s,filePath:n}){const i=await downloadTar(`https://codeload.github.com/${t}/${r}/tar.gz/${s}`);await E.x({file:i,cwd:e,strip:n?n.split("/").length+1:1,filter:e=>e.startsWith(`${r}-${s.replace(/\//g,"-")}${n?`/${n}/`:"/"}`)});await g.promises.unlink(i)}async function downloadAndExtractExample(e,t){if(t==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}const r=await downloadTar("https://codeload.github.com/vercel/next.js/tar.gz/canary");await E.x({file:r,cwd:e,strip:2+t.split("/").length,filter:e=>e.includes(`next.js-canary/examples/${t}/`)});await g.promises.unlink(r)}function makeDir(e,t={recursive:true}){return v().promises.mkdir(e,t)}var $=r(2081);function isInGitRepository(){try{(0,$.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(e){}return false}function isInMercurialRepository(){try{(0,$.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(e){}return false}function isDefaultBranchSet(){try{(0,$.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(e){}return false}function tryGitInit(e){let t=false;try{(0,$.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,$.execSync)("git init",{stdio:"ignore"});t=true;if(!isDefaultBranchSet()){(0,$.execSync)("git checkout -b main",{stdio:"ignore"})}(0,$.execSync)("git add -A",{stdio:"ignore"});(0,$.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(t){try{v().rmSync(l().join(e,".git"),{recursive:true,force:true})}catch(e){}}return false}}var A=r(4488);var T=r.n(A);async function install(e,t){let r=["install"];if(!t){console.log((0,s.yellow)("You appear to be offline.\nFalling back to the local cache."));r.push("--offline")}return new Promise(((t,s)=>{const n=T()(e,r,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});n.on("close",(n=>{if(n!==0){s({command:`${e} ${r.join(" ")}`});return}t()}))}))}function isFolderEmpty(e,t){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const n=v().readdirSync(e).filter((e=>!r.includes(e))).filter((e=>!/\.iml$/.test(e)));if(n.length>0){console.log(`The directory ${(0,s.green)(t)} contains files that could conflict:`);console.log();for(const t of n){try{const r=v().lstatSync(l().join(e,t));if(r.isDirectory()){console.log(` ${(0,s.blue)(t)}/`)}else{console.log(` ${t}`)}}catch{console.log(` ${t}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}var C=r(9523);var k=r.n(C);var I=r(7310);var N=r.n(I);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const e=(0,$.execSync)("npm config get https-proxy").toString().trim();return e!=="null"?e:undefined}catch(e){return}}function getOnline(){return new Promise((e=>{k().lookup("registry.yarnpkg.com",(t=>{if(!t){return e(true)}const r=getProxy();if(!r){return e(false)}const{hostname:s}=N().parse(r);if(!s){return e(false)}k().lookup(s,(t=>{e(t==null)}))}))}))}async function isWriteable(e){try{await v().promises.access(e,(v().constants||v()).W_OK);return true}catch(e){return false}}var D=r(8695);const identity=e=>e;const copy=async(e,t,{cwd:r,rename:s=identity,parents:n=true}={})=>{const i=typeof e==="string"?[e]:e;if(i.length===0||!t){throw new TypeError("`src` and `dest` are required")}const o=await(0,D.async)(i,{cwd:r,dot:true,absolute:false,stats:false});const a=r?l().resolve(r,t):t;return Promise.all(o.map((async e=>{const t=l().dirname(e);const i=s(l().basename(e));const o=r?l().resolve(r,e):e;const c=n?l().join(a,t,i):l().join(a,i);await v().promises.mkdir(l().dirname(c),{recursive:true});return v().promises.copyFile(o,c)})))};const L=require("fs/promises");var M=r.n(L);var j=r(8383);const F=JSON.parse('{"name":"create-next-app","version":"14.0.5-canary.8","keywords":["react","next","next.js"],"description":"Create Next.js-powered React apps with one command","repository":{"type":"git","url":"https://github.com/vercel/next.js","directory":"packages/create-next-app"},"author":"Next.js Team <support@vercel.com>","license":"MIT","bin":{"create-next-app":"./dist/index.js"},"files":["dist"],"scripts":{"dev":"ncc build ./index.ts -w -o dist/","prerelease":"node ../../scripts/rm.mjs dist","release":"ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register","prepublishOnly":"cd ../../ && turbo run build","build":"pnpm release","lint-fix":"pnpm prettier -w --plugin prettier-plugin-tailwindcss \'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}\'"},"devDependencies":{"@types/async-retry":"1.4.2","@types/ci-info":"2.0.0","@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/tar":"6.1.5","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","async-retry":"1.3.1","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","commander":"2.20.0","conf":"10.2.0","cross-spawn":"7.0.3","fast-glob":"3.3.1","got":"10.7.0","picocolors":"1.0.0","prettier-plugin-tailwindcss":"0.3.0","prompts":"2.1.0","tar":"6.1.15","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.17.0"}}');const getTemplateFile=({template:e,mode:t,file:s})=>r.ab+"templates/"+e+"/"+t+"/"+s;const U=["app","pages","styles"];const installTemplate=async({appName:e,root:t,packageManager:n,isOnline:i,template:o,mode:a,tailwind:c,eslint:u,srcDir:h,importAlias:d})=>{var p;console.log((0,s.bold)(`Using ${n}.`));console.log("\nInitializing project with template:",o,"\n");const m=r.ab+"templates/"+o+"/"+a;const y=["**"];if(!u)y.push("!eslintrc.json");if(!c)y.push(a=="ts"?"tailwind.config.ts":"!tailwind.config.js","!postcss.config.js");await copy(y,t,{parents:true,cwd:m,rename(e){switch(e){case"gitignore":case"eslintrc.json":{return`.${e}`}case"README-template.md":{return"README.md"}default:{return e}}}});const g=l().join(t,a==="js"?"jsconfig.json":"tsconfig.json");await M().writeFile(g,(await M().readFile(g,"utf8")).replace(`"@/*": ["./*"]`,h?`"@/*": ["./src/*"]`:`"@/*": ["./*"]`).replace(`"@/*":`,`"${d}":`));if(d!=="@/*"){const e=await(0,D.async)("**/*",{cwd:t,dot:true,stats:false});const r=new j.Sema(8,{capacity:e.length});await Promise.all(e.map((async e=>{if(e==="tsconfig.json"||e==="jsconfig.json")return;await r.acquire();const s=l().join(t,e);if((await M().stat(s)).isFile()){await M().writeFile(s,(await M().readFile(s,"utf8")).replace(`@/`,`${d.replace(/\*/g,"")}`))}await r.release()})))}if(h){await makeDir(l().join(t,"src"));await Promise.all(U.map((async e=>{await M().rename(l().join(t,e),l().join(t,"src",e)).catch((e=>{if(e.code!=="ENOENT"){throw e}}))})));const e=o.startsWith("app");const r=l().join("src",e?"app":"pages",`${e?"page":"index"}.${a==="ts"?"tsx":"js"}`);await M().writeFile(r,(await M().readFile(r,"utf8")).replace(e?"app/page":"pages/index",e?"src/app/page":"src/pages/index"));if(c){const e=l().join(t,a==="ts"?"tailwind.config.ts":"tailwind.config.js");await M().writeFile(e,(await M().readFile(e,"utf8")).replace(/\.\/(\w+)\/\*\*\/\*\.\{js,ts,jsx,tsx,mdx\}/g,"./src/$1/**/*.{js,ts,jsx,tsx,mdx}"))}}const v=(p=process.env.NEXT_PRIVATE_TEST_VERSION)!==null&&p!==void 0?p:F.version;const b={name:e,version:"0.1.0",private:true,scripts:{dev:"next dev",build:"next build",start:"next start",lint:"next lint"},dependencies:{react:"^18","react-dom":"^18",next:v},devDependencies:{}};if(a==="ts"){b.devDependencies={...b.devDependencies,typescript:"^5","@types/node":"^20","@types/react":"^18","@types/react-dom":"^18"}}if(c){b.devDependencies={...b.devDependencies,autoprefixer:"^10.0.1",postcss:"^8",tailwindcss:"^3.3.0"}}if(u){b.devDependencies={...b.devDependencies,eslint:"^8","eslint-config-next":v}}const w=Object.keys(b.devDependencies).length;if(!w)delete b.devDependencies;await M().writeFile(l().join(t,"package.json"),JSON.stringify(b,null,2)+P().EOL);console.log("\nInstalling dependencies:");for(const e in b.dependencies)console.log(`- ${(0,s.cyan)(e)}`);if(w){console.log("\nInstalling devDependencies:");for(const e in b.devDependencies)console.log(`- ${(0,s.cyan)(e)}`)}console.log();await install(n,i)};class DownloadError extends Error{}async function createApp({appPath:e,packageManager:t,example:r,examplePath:n,typescript:i,tailwind:o,eslint:a,appRouter:c,srcDir:u,importAlias:h}){let d;const p=i?"ts":"js";const m=c?o?"app-tw":"app":o?"default-tw":"default";if(r){let e;try{e=new URL(r)}catch(e){if(e.code!=="ERR_INVALID_URL"){console.error(e);process.exit(1)}}if(e){if(e.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,s.red)(`"${r}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}d=await getRepoInfo(e,n);if(!d){console.error(`Found invalid GitHub URL: ${(0,s.red)(`"${r}"`)}. Please fix the URL and try again.`);process.exit(1)}const t=await hasRepo(d);if(!t){console.error(`Could not locate the repository for ${(0,s.red)(`"${r}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(r!=="__internal-testing-retry"){const e=await existsInRepo(r);if(!e){console.error(`Could not locate an example named ${(0,s.red)(`"${r}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,s.red)(`"${r}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const g=l().resolve(e);if(!await isWriteable(l().dirname(g))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const b=l().basename(g);await makeDir(g);if(!isFolderEmpty(g,b)){process.exit(1)}const w=t==="yarn";const E=!w||await getOnline();const S=process.cwd();console.log(`Creating a new Next.js app in ${(0,s.green)(g)}.`);console.log();process.chdir(g);const x=l().join(g,"package.json");let R=false;if(r){try{if(d){const e=d;console.log(`Downloading files from repo ${(0,s.cyan)(r)}. This might take a moment.`);console.log();await y()((()=>downloadAndExtractRepo(g,e)),{retries:3})}else{console.log(`Downloading files for example ${(0,s.cyan)(r)}. This might take a moment.`);console.log();await y()((()=>downloadAndExtractExample(g,r)),{retries:3})}}catch(e){function isErrorLike(e){return typeof e==="object"&&e!==null&&typeof e.message==="string"}throw new DownloadError(isErrorLike(e)?e.message:e+"")}const e=l().join(g,".gitignore");if(!v().existsSync(e)){v().copyFileSync(getTemplateFile({template:m,mode:p,file:"gitignore"}),e)}const n=l().join(g,"tsconfig.json");if(v().existsSync(n)){v().copyFileSync(getTemplateFile({template:m,mode:"ts",file:"next-env.d.ts"}),l().join(g,"next-env.d.ts"))}R=v().existsSync(x);if(R){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(t,E);console.log()}}else{await installTemplate({appName:b,root:g,template:m,mode:p,packageManager:t,isOnline:E,tailwind:o,eslint:a,srcDir:u,importAlias:h})}if(tryGitInit(g)){console.log("Initialized a git repository.");console.log()}let P;if(l().join(S,b)===e){P=b}else{P=e}console.log(`${(0,s.green)("Success!")} Created ${b} at ${e}`);if(R){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,s.cyan)(` ${t} ${w?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,s.cyan)(` ${t} ${w?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,s.cyan)(` ${t} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,s.cyan)(" cd"),P);console.log(` ${(0,s.cyan)(`${t} ${w?"":"run "}dev`)}`)}console.log()}function getPkgManager(){const e=process.env.npm_config_user_agent||"";if(e.startsWith("yarn")){return"yarn"}if(e.startsWith("pnpm")){return"pnpm"}if(e.startsWith("bun")){return"bun"}return"npm"}var B=r(2338);var H=r.n(B);function validateNpmName(e){const t=H()(e);if(t.validForNewPackages){return{valid:true}}return{valid:false,problems:[...t.errors||[],...t.warnings||[]]}}var z=r(7741);var G=r.n(z);let V="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=e=>{if(e.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const q=new(i().Command)(F.name).version(F.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((e=>{V=e})).option("--ts, --typescript",`\n\n Initialize as a TypeScript project. (default)\n`).option("--js, --javascript",`\n\n Initialize as a JavaScript project.\n`).option("--tailwind",`\n\n Initialize with Tailwind CSS config. (default)\n`).option("--eslint",`\n\n Initialize with eslint config.\n`).option("--app",`\n\n Initialize as an App Router project.\n`).option("--src-dir",`\n\n Initialize inside a \`src/\` directory.\n`).option("--import-alias <alias-to-configure>",`\n\n Specify import alias to use (default "@/*").\n`).option("--use-npm",`\n\n Explicitly tell the CLI to bootstrap the application using npm\n`).option("--use-pnpm",`\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`).option("--use-yarn",`\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`).option("--use-bun",`\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`).option("-e, --example [name]|[github-url]",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Next.js repo or a GitHub URL. The URL can use\n any branch and/or subdirectory\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).option("--reset-preferences",`\n\n Explicitly tell the CLI to reset any stored preferences\n`).allowUnknownOption().parse(process.argv);const W=!!q.useNpm?"npm":!!q.usePnpm?"pnpm":!!q.useYarn?"yarn":!!q.useBun?"bun":getPkgManager();async function run(){const e=new(a())({projectName:"create-next-app"});if(q.resetPreferences){e.clear();console.log(`Preferences reset successfully`);return}if(typeof V==="string"){V=V.trim()}if(!V){const e=await h()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:e=>{const t=validateNpmName(l().basename(l().resolve(e)));if(t.valid){return true}return"Invalid project name: "+t.problems[0]}});if(typeof e.path==="string"){V=e.path.trim()}}if(!V){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(q.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(q.name())} ${(0,s.green)("my-next-app")}\n\n`+`Run ${(0,s.cyan)(`${q.name()} --help`)} to see all options.`);process.exit(1)}const t=l().resolve(V);const r=l().basename(t);const{valid:n,problems:i}=validateNpmName(r);if(!n){console.error(`Could not create a project called ${(0,s.red)(`"${r}"`)} because of npm naming restrictions:`);i.forEach((e=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${e}`)));process.exit(1)}if(q.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}const o=l().resolve(t);const c=l().basename(o);const u=v().existsSync(o);if(u&&!isFolderEmpty(o,c)){process.exit(1)}const d=typeof q.example==="string"&&q.example.trim();const p=e.get("preferences")||{};if(!d){const e={typescript:true,eslint:true,tailwind:true,app:true,srcDir:false,importAlias:"@/*",customizeImportAlias:false};const getPrefOrDefault=t=>{var r;return(r=p[t])!==null&&r!==void 0?r:e[t]};if(!q.typescript&&!q.javascript){if(G().isCI){q.typescript=getPrefOrDefault("typescript")}else{const e=(0,s.blue)("TypeScript");const{typescript:t}=await h()({type:"toggle",name:"typescript",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});q.typescript=Boolean(t);q.javascript=!Boolean(t);p.typescript=Boolean(t)}}if(!process.argv.includes("--eslint")&&!process.argv.includes("--no-eslint")){if(G().isCI){q.eslint=getPrefOrDefault("eslint")}else{const e=(0,s.blue)("ESLint");const{eslint:t}=await h()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});q.eslint=Boolean(t);p.eslint=Boolean(t)}}if(!process.argv.includes("--tailwind")&&!process.argv.includes("--no-tailwind")){if(G().isCI){q.tailwind=getPrefOrDefault("tailwind")}else{const e=(0,s.blue)("Tailwind CSS");const{tailwind:t}=await h()({onState:onPromptState,type:"toggle",name:"tailwind",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("tailwind"),active:"Yes",inactive:"No"});q.tailwind=Boolean(t);p.tailwind=Boolean(t)}}if(!process.argv.includes("--src-dir")&&!process.argv.includes("--no-src-dir")){if(G().isCI){q.srcDir=getPrefOrDefault("srcDir")}else{const e=(0,s.blue)("`src/` directory");const{srcDir:t}=await h()({onState:onPromptState,type:"toggle",name:"srcDir",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("srcDir"),active:"Yes",inactive:"No"});q.srcDir=Boolean(t);p.srcDir=Boolean(t)}}if(!process.argv.includes("--app")&&!process.argv.includes("--no-app")){if(G().isCI){q.app=getPrefOrDefault("app")}else{const e=(0,s.blue)("App Router");const{appRouter:t}=await h()({onState:onPromptState,type:"toggle",name:"appRouter",message:`Would you like to use ${e}? (recommended)`,initial:getPrefOrDefault("app"),active:"Yes",inactive:"No"});q.app=Boolean(t)}}if(typeof q.importAlias!=="string"||!q.importAlias.length){if(G().isCI){q.importAlias=e.importAlias}else{const t=(0,s.blue)("import alias");const{customizeImportAlias:r}=await h()({onState:onPromptState,type:"toggle",name:"customizeImportAlias",message:`Would you like to customize the default ${t} (${e.importAlias})?`,initial:getPrefOrDefault("customizeImportAlias"),active:"Yes",inactive:"No"});if(!r){q.importAlias=e.importAlias}else{const{importAlias:e}=await h()({onState:onPromptState,type:"text",name:"importAlias",message:`What ${t} would you like configured?`,initial:getPrefOrDefault("importAlias"),validate:e=>/.+\/\*/.test(e)?true:"Import alias must follow the pattern <prefix>/*"});q.importAlias=e;p.importAlias=e}}}}try{await createApp({appPath:t,packageManager:W,example:d&&d!=="default"?d:undefined,examplePath:q.examplePath,typescript:q.typescript,tailwind:q.tailwind,eslint:q.eslint,appRouter:q.app,srcDir:q.srcDir,importAlias:q.importAlias})}catch(e){if(!(e instanceof DownloadError)){throw e}const r=await h()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${d}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!r.builtin){throw e}await createApp({appPath:t,packageManager:W,typescript:q.typescript,eslint:q.eslint,tailwind:q.tailwind,appRouter:q.app,srcDir:q.srcDir,importAlias:q.importAlias})}e.set("preferences",p)}const K=p()(F).catch((()=>null));async function notifyUpdate(){try{const e=await K;if(e===null||e===void 0?void 0:e.latest){const e=W==="yarn"?"yarn global add create-next-app":W==="pnpm"?"pnpm add -g create-next-app":W==="bun"?"bun add -g create-next-app":"npm i -g create-next-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-next-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(e)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async e=>{console.log();console.log("Aborting installation.");if(e.command){console.log(` ${(0,s.cyan)(e.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",e)}console.log();await notifyUpdate();process.exit(1)}))},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},7918:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},9520:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3113:e=>{"use strict";e.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')},6107:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={id:r,loaded:false,exports:{}};var i=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;__nccwpck_require__.d(t,{a:t});return t}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(4282);module.exports=r})();
|
|
74
|
+
(function(t,i){true?i(r):0})(this,(function(t){"use strict";function merge(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++){r[i]=arguments[i]}if(r.length>1){r[0]=r[0].slice(0,-1);var o=r.length-1;for(var a=1;a<o;++a){r[a]=r[a].slice(1,-1)}r[o]=r[o].slice(1);return r.join("")}else{return r[0]}}function subexp(t){return"(?:"+t+")"}function typeOf(t){return t===undefined?"undefined":t===null?"null":Object.prototype.toString.call(t).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(t){return t.toUpperCase()}function toArray(t){return t!==undefined&&t!==null?t instanceof Array?t:typeof t.length!=="number"||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[]}function assign(t,r){var i=t;if(r){for(var o in r){i[o]=r[o]}}return i}function buildExps(t){var r="[A-Za-z]",i="[\\x0D]",o="[0-9]",a="[\\x22]",c=merge(o,"[A-Fa-f]"),l="[\\x0A]",u="[\\x20]",h=subexp(subexp("%[EFef]"+c+"%"+c+c+"%"+c+c)+"|"+subexp("%[89A-Fa-f]"+c+"%"+c+c)+"|"+subexp("%"+c+c)),d="[\\:\\/\\?\\#\\[\\]\\@]",p="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",m=merge(d,p),y=t?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",g=t?"[\\uE000-\\uF8FF]":"[]",v=merge(r,o,"[\\-\\.\\_\\~]",y),b=subexp(r+merge(r,o,"[\\+\\-\\.]")+"*"),w=subexp(subexp(h+"|"+merge(v,p,"[\\:]"))+"*"),E=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+o)+"|"+subexp("1"+o+o)+"|"+subexp("[1-9]"+o)+"|"+o),S=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+o)+"|"+subexp("1"+o+o)+"|"+subexp("0?[1-9]"+o)+"|0?0?"+o),x=subexp(S+"\\."+S+"\\."+S+"\\."+S),R=subexp(c+"{1,4}"),P=subexp(subexp(R+"\\:"+R)+"|"+x),$=subexp(subexp(R+"\\:")+"{6}"+P),O=subexp("\\:\\:"+subexp(R+"\\:")+"{5}"+P),T=subexp(subexp(R)+"?\\:\\:"+subexp(R+"\\:")+"{4}"+P),A=subexp(subexp(subexp(R+"\\:")+"{0,1}"+R)+"?\\:\\:"+subexp(R+"\\:")+"{3}"+P),C=subexp(subexp(subexp(R+"\\:")+"{0,2}"+R)+"?\\:\\:"+subexp(R+"\\:")+"{2}"+P),k=subexp(subexp(subexp(R+"\\:")+"{0,3}"+R)+"?\\:\\:"+R+"\\:"+P),I=subexp(subexp(subexp(R+"\\:")+"{0,4}"+R)+"?\\:\\:"+P),N=subexp(subexp(subexp(R+"\\:")+"{0,5}"+R)+"?\\:\\:"+R),D=subexp(subexp(subexp(R+"\\:")+"{0,6}"+R)+"?\\:\\:"),L=subexp([$,O,T,A,C,k,I,N,D].join("|")),M=subexp(subexp(v+"|"+h)+"+"),j=subexp(L+"\\%25"+M),U=subexp(L+subexp("\\%25|\\%(?!"+c+"{2})")+M),B=subexp("[vV]"+c+"+\\."+merge(v,p,"[\\:]")+"+"),H=subexp("\\["+subexp(U+"|"+L+"|"+B)+"\\]"),z=subexp(subexp(h+"|"+merge(v,p))+"*"),V=subexp(H+"|"+x+"(?!"+z+")"+"|"+z),G=subexp(o+"*"),q=subexp(subexp(w+"@")+"?"+V+subexp("\\:"+G)+"?"),K=subexp(h+"|"+merge(v,p,"[\\:\\@]")),W=subexp(K+"*"),Y=subexp(K+"+"),Z=subexp(subexp(h+"|"+merge(v,p,"[\\@]"))+"+"),X=subexp(subexp("\\/"+W)+"*"),J=subexp("\\/"+subexp(Y+X)+"?"),Q=subexp(Z+X),ee=subexp(Y+X),te="(?!"+K+")",re=subexp(X+"|"+J+"|"+Q+"|"+ee+"|"+te),se=subexp(subexp(K+"|"+merge("[\\/\\?]",g))+"*"),ie=subexp(subexp(K+"|[\\/\\?]")+"*"),ne=subexp(subexp("\\/\\/"+q+X)+"|"+J+"|"+ee+"|"+te),oe=subexp(b+"\\:"+ne+subexp("\\?"+se)+"?"+subexp("\\#"+ie)+"?"),ae=subexp(subexp("\\/\\/"+q+X)+"|"+J+"|"+Q+"|"+te),ce=subexp(ae+subexp("\\?"+se)+"?"+subexp("\\#"+ie)+"?"),le=subexp(oe+"|"+ce),ue=subexp(b+"\\:"+ne+subexp("\\?"+se)+"?"),he="^("+b+")\\:"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+ee+"|"+te+")")+subexp("\\?("+se+")")+"?"+subexp("\\#("+ie+")")+"?$",fe="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+Q+"|"+te+")")+subexp("\\?("+se+")")+"?"+subexp("\\#("+ie+")")+"?$",de="^("+b+")\\:"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+ee+"|"+te+")")+subexp("\\?("+se+")")+"?$",pe="^"+subexp("\\#("+ie+")")+"?$",me="^"+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",r,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",v,p),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",v,p),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",v,p),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",v,p),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",v,p,"[\\:\\@\\/\\?]",g),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",v,p,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",v,p),"g"),UNRESERVED:new RegExp(v,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",v,m),"g"),PCT_ENCODED:new RegExp(h,"g"),IPV4ADDRESS:new RegExp("^("+x+")$"),IPV6ADDRESS:new RegExp("^\\[?("+L+")"+subexp(subexp("\\%25|\\%(?!"+c+"{2})")+"("+M+")")+"?\\]?$")}}var r=buildExps(false);var i=buildExps(true);var o=function(){function sliceIterator(t,r){var i=[];var o=true;var a=false;var c=undefined;try{for(var l=t[Symbol.iterator](),u;!(o=(u=l.next()).done);o=true){i.push(u.value);if(r&&i.length===r)break}}catch(t){a=true;c=t}finally{try{if(!o&&l["return"])l["return"]()}finally{if(a)throw c}}return i}return function(t,r){if(Array.isArray(t)){return t}else if(Symbol.iterator in Object(t)){return sliceIterator(t,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(t){if(Array.isArray(t)){for(var r=0,i=Array(t.length);r<t.length;r++)i[r]=t[r];return i}else{return Array.from(t)}};var a=2147483647;var c=36;var l=1;var u=26;var h=38;var d=700;var p=72;var m=128;var y="-";var g=/^xn--/;var v=/[^\0-\x7E]/;var b=/[\x2E\u3002\uFF0E\uFF61]/g;var w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var E=c-l;var S=Math.floor;var x=String.fromCharCode;function error$1(t){throw new RangeError(w[t])}function map(t,r){var i=[];var o=t.length;while(o--){i[o]=r(t[o])}return i}function mapDomain(t,r){var i=t.split("@");var o="";if(i.length>1){o=i[0]+"@";t=i[1]}t=t.replace(b,".");var a=t.split(".");var c=map(a,r).join(".");return o+c}function ucs2decode(t){var r=[];var i=0;var o=t.length;while(i<o){var a=t.charCodeAt(i++);if(a>=55296&&a<=56319&&i<o){var c=t.charCodeAt(i++);if((c&64512)==56320){r.push(((a&1023)<<10)+(c&1023)+65536)}else{r.push(a);i--}}else{r.push(a)}}return r}var R=function ucs2encode(t){return String.fromCodePoint.apply(String,toConsumableArray(t))};var P=function basicToDigit(t){if(t-48<10){return t-22}if(t-65<26){return t-65}if(t-97<26){return t-97}return c};var $=function digitToBasic(t,r){return t+22+75*(t<26)-((r!=0)<<5)};var O=function adapt(t,r,i){var o=0;t=i?S(t/d):t>>1;t+=S(t/r);for(;t>E*u>>1;o+=c){t=S(t/E)}return S(o+(E+1)*t/(t+h))};var T=function decode(t){var r=[];var i=t.length;var o=0;var h=m;var d=p;var g=t.lastIndexOf(y);if(g<0){g=0}for(var v=0;v<g;++v){if(t.charCodeAt(v)>=128){error$1("not-basic")}r.push(t.charCodeAt(v))}for(var b=g>0?g+1:0;b<i;){var w=o;for(var E=1,x=c;;x+=c){if(b>=i){error$1("invalid-input")}var R=P(t.charCodeAt(b++));if(R>=c||R>S((a-o)/E)){error$1("overflow")}o+=R*E;var $=x<=d?l:x>=d+u?u:x-d;if(R<$){break}var T=c-$;if(E>S(a/T)){error$1("overflow")}E*=T}var A=r.length+1;d=O(o-w,A,w==0);if(S(o/A)>a-h){error$1("overflow")}h+=S(o/A);o%=A;r.splice(o++,0,h)}return String.fromCodePoint.apply(String,r)};var A=function encode(t){var r=[];t=ucs2decode(t);var i=t.length;var o=m;var h=0;var d=p;var g=true;var v=false;var b=undefined;try{for(var w=t[Symbol.iterator](),E;!(g=(E=w.next()).done);g=true){var R=E.value;if(R<128){r.push(x(R))}}}catch(t){v=true;b=t}finally{try{if(!g&&w.return){w.return()}}finally{if(v){throw b}}}var P=r.length;var T=P;if(P){r.push(y)}while(T<i){var A=a;var C=true;var k=false;var I=undefined;try{for(var N=t[Symbol.iterator](),D;!(C=(D=N.next()).done);C=true){var L=D.value;if(L>=o&&L<A){A=L}}}catch(t){k=true;I=t}finally{try{if(!C&&N.return){N.return()}}finally{if(k){throw I}}}var M=T+1;if(A-o>S((a-h)/M)){error$1("overflow")}h+=(A-o)*M;o=A;var j=true;var U=false;var B=undefined;try{for(var H=t[Symbol.iterator](),z;!(j=(z=H.next()).done);j=true){var V=z.value;if(V<o&&++h>a){error$1("overflow")}if(V==o){var G=h;for(var q=c;;q+=c){var K=q<=d?l:q>=d+u?u:q-d;if(G<K){break}var W=G-K;var Y=c-K;r.push(x($(K+W%Y,0)));G=S(W/Y)}r.push(x($(G,0)));d=O(h,M,T==P);h=0;++T}}}catch(t){U=true;B=t}finally{try{if(!j&&H.return){H.return()}}finally{if(U){throw B}}}++h;++o}return r.join("")};var C=function toUnicode(t){return mapDomain(t,(function(t){return g.test(t)?T(t.slice(4).toLowerCase()):t}))};var k=function toASCII(t){return mapDomain(t,(function(t){return v.test(t)?"xn--"+A(t):t}))};var I={version:"2.1.0",ucs2:{decode:ucs2decode,encode:R},decode:T,encode:A,toASCII:k,toUnicode:C};var N={};function pctEncChar(t){var r=t.charCodeAt(0);var i=void 0;if(r<16)i="%0"+r.toString(16).toUpperCase();else if(r<128)i="%"+r.toString(16).toUpperCase();else if(r<2048)i="%"+(r>>6|192).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();else i="%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();return i}function pctDecChars(t){var r="";var i=0;var o=t.length;while(i<o){var a=parseInt(t.substr(i+1,2),16);if(a<128){r+=String.fromCharCode(a);i+=3}else if(a>=194&&a<224){if(o-i>=6){var c=parseInt(t.substr(i+4,2),16);r+=String.fromCharCode((a&31)<<6|c&63)}else{r+=t.substr(i,6)}i+=6}else if(a>=224){if(o-i>=9){var l=parseInt(t.substr(i+4,2),16);var u=parseInt(t.substr(i+7,2),16);r+=String.fromCharCode((a&15)<<12|(l&63)<<6|u&63)}else{r+=t.substr(i,9)}i+=9}else{r+=t.substr(i,3);i+=3}}return r}function _normalizeComponentEncoding(t,r){function decodeUnreserved(t){var i=pctDecChars(t);return!i.match(r.UNRESERVED)?t:i}if(t.scheme)t.scheme=String(t.scheme).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_SCHEME,"");if(t.userinfo!==undefined)t.userinfo=String(t.userinfo).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_USERINFO,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.host!==undefined)t.host=String(t.host).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_HOST,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.path!==undefined)t.path=String(t.path).replace(r.PCT_ENCODED,decodeUnreserved).replace(t.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.query!==undefined)t.query=String(t.query).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_QUERY,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.fragment!==undefined)t.fragment=String(t.fragment).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_FRAGMENT,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);return t}function _stripLeadingZeros(t){return t.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(t,r){var i=t.match(r.IPV4ADDRESS)||[];var a=o(i,2),c=a[1];if(c){return c.split(".").map(_stripLeadingZeros).join(".")}else{return t}}function _normalizeIPv6(t,r){var i=t.match(r.IPV6ADDRESS)||[];var a=o(i,3),c=a[1],l=a[2];if(c){var u=c.toLowerCase().split("::").reverse(),h=o(u,2),d=h[0],p=h[1];var m=p?p.split(":").map(_stripLeadingZeros):[];var y=d.split(":").map(_stripLeadingZeros);var g=r.IPV4ADDRESS.test(y[y.length-1]);var v=g?7:8;var b=y.length-v;var w=Array(v);for(var E=0;E<v;++E){w[E]=m[E]||y[b+E]||""}if(g){w[v-1]=_normalizeIPv4(w[v-1],r)}var S=w.reduce((function(t,r,i){if(!r||r==="0"){var o=t[t.length-1];if(o&&o.index+o.length===i){o.length++}else{t.push({index:i,length:1})}}return t}),[]);var x=S.sort((function(t,r){return r.length-t.length}))[0];var R=void 0;if(x&&x.length>1){var P=w.slice(0,x.index);var $=w.slice(x.index+x.length);R=P.join(":")+"::"+$.join(":")}else{R=w.join(":")}if(l){R+="%"+l}return R}else{return t}}var D=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var L="".match(/(){0}/)[1]===undefined;function parse(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a={};var c=o.iri!==false?i:r;if(o.reference==="suffix")t=(o.scheme?o.scheme+":":"")+"//"+t;var l=t.match(D);if(l){if(L){a.scheme=l[1];a.userinfo=l[3];a.host=l[4];a.port=parseInt(l[5],10);a.path=l[6]||"";a.query=l[7];a.fragment=l[8];if(isNaN(a.port)){a.port=l[5]}}else{a.scheme=l[1]||undefined;a.userinfo=t.indexOf("@")!==-1?l[3]:undefined;a.host=t.indexOf("//")!==-1?l[4]:undefined;a.port=parseInt(l[5],10);a.path=l[6]||"";a.query=t.indexOf("?")!==-1?l[7]:undefined;a.fragment=t.indexOf("#")!==-1?l[8]:undefined;if(isNaN(a.port)){a.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?l[4]:undefined}}if(a.host){a.host=_normalizeIPv6(_normalizeIPv4(a.host,c),c)}if(a.scheme===undefined&&a.userinfo===undefined&&a.host===undefined&&a.port===undefined&&!a.path&&a.query===undefined){a.reference="same-document"}else if(a.scheme===undefined){a.reference="relative"}else if(a.fragment===undefined){a.reference="absolute"}else{a.reference="uri"}if(o.reference&&o.reference!=="suffix"&&o.reference!==a.reference){a.error=a.error||"URI is not a "+o.reference+" reference."}var u=N[(o.scheme||a.scheme||"").toLowerCase()];if(!o.unicodeSupport&&(!u||!u.unicodeSupport)){if(a.host&&(o.domainHost||u&&u.domainHost)){try{a.host=I.toASCII(a.host.replace(c.PCT_ENCODED,pctDecChars).toLowerCase())}catch(t){a.error=a.error||"Host's domain name can not be converted to ASCII via punycode: "+t}}_normalizeComponentEncoding(a,r)}else{_normalizeComponentEncoding(a,c)}if(u&&u.parse){u.parse(a,o)}}else{a.error=a.error||"URI can not be parsed."}return a}function _recomposeAuthority(t,o){var a=o.iri!==false?i:r;var c=[];if(t.userinfo!==undefined){c.push(t.userinfo);c.push("@")}if(t.host!==undefined){c.push(_normalizeIPv6(_normalizeIPv4(String(t.host),a),a).replace(a.IPV6ADDRESS,(function(t,r,i){return"["+r+(i?"%25"+i:"")+"]"})))}if(typeof t.port==="number"||typeof t.port==="string"){c.push(":");c.push(String(t.port))}return c.length?c.join(""):undefined}var M=/^\.\.?\//;var j=/^\/\.(\/|$)/;var U=/^\/\.\.(\/|$)/;var B=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(t){var r=[];while(t.length){if(t.match(M)){t=t.replace(M,"")}else if(t.match(j)){t=t.replace(j,"/")}else if(t.match(U)){t=t.replace(U,"/");r.pop()}else if(t==="."||t===".."){t=""}else{var i=t.match(B);if(i){var o=i[0];t=t.slice(o.length);r.push(o)}else{throw new Error("Unexpected dot segment condition")}}}return r.join("")}function serialize(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=o.iri?i:r;var c=[];var l=N[(o.scheme||t.scheme||"").toLowerCase()];if(l&&l.serialize)l.serialize(t,o);if(t.host){if(a.IPV6ADDRESS.test(t.host)){}else if(o.domainHost||l&&l.domainHost){try{t.host=!o.iri?I.toASCII(t.host.replace(a.PCT_ENCODED,pctDecChars).toLowerCase()):I.toUnicode(t.host)}catch(r){t.error=t.error||"Host's domain name can not be converted to "+(!o.iri?"ASCII":"Unicode")+" via punycode: "+r}}}_normalizeComponentEncoding(t,a);if(o.reference!=="suffix"&&t.scheme){c.push(t.scheme);c.push(":")}var u=_recomposeAuthority(t,o);if(u!==undefined){if(o.reference!=="suffix"){c.push("//")}c.push(u);if(t.path&&t.path.charAt(0)!=="/"){c.push("/")}}if(t.path!==undefined){var h=t.path;if(!o.absolutePath&&(!l||!l.absolutePath)){h=removeDotSegments(h)}if(u===undefined){h=h.replace(/^\/\//,"/%2F")}c.push(h)}if(t.query!==undefined){c.push("?");c.push(t.query)}if(t.fragment!==undefined){c.push("#");c.push(t.fragment)}return c.join("")}function resolveComponents(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var o=arguments[3];var a={};if(!o){t=parse(serialize(t,i),i);r=parse(serialize(r,i),i)}i=i||{};if(!i.tolerant&&r.scheme){a.scheme=r.scheme;a.userinfo=r.userinfo;a.host=r.host;a.port=r.port;a.path=removeDotSegments(r.path||"");a.query=r.query}else{if(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined){a.userinfo=r.userinfo;a.host=r.host;a.port=r.port;a.path=removeDotSegments(r.path||"");a.query=r.query}else{if(!r.path){a.path=t.path;if(r.query!==undefined){a.query=r.query}else{a.query=t.query}}else{if(r.path.charAt(0)==="/"){a.path=removeDotSegments(r.path)}else{if((t.userinfo!==undefined||t.host!==undefined||t.port!==undefined)&&!t.path){a.path="/"+r.path}else if(!t.path){a.path=r.path}else{a.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+r.path}a.path=removeDotSegments(a.path)}a.query=r.query}a.userinfo=t.userinfo;a.host=t.host;a.port=t.port}a.scheme=t.scheme}a.fragment=r.fragment;return a}function resolve(t,r,i){var o=assign({scheme:"null"},i);return serialize(resolveComponents(parse(t,o),parse(r,o),o,true),o)}function normalize(t,r){if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=parse(serialize(t,r),r)}return t}function equal(t,r,i){if(typeof t==="string"){t=serialize(parse(t,i),i)}else if(typeOf(t)==="object"){t=serialize(t,i)}if(typeof r==="string"){r=serialize(parse(r,i),i)}else if(typeOf(r)==="object"){r=serialize(r,i)}return t===r}function escapeComponent(t,o){return t&&t.toString().replace(!o||!o.iri?r.ESCAPE:i.ESCAPE,pctEncChar)}function unescapeComponent(t,o){return t&&t.toString().replace(!o||!o.iri?r.PCT_ENCODED:i.PCT_ENCODED,pctDecChars)}var H={scheme:"http",domainHost:true,parse:function parse(t,r){if(!t.host){t.error=t.error||"HTTP URIs must have a host."}return t},serialize:function serialize(t,r){var i=String(t.scheme).toLowerCase()==="https";if(t.port===(i?443:80)||t.port===""){t.port=undefined}if(!t.path){t.path="/"}return t}};var z={scheme:"https",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize};function isSecure(t){return typeof t.secure==="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}var V={scheme:"ws",domainHost:true,parse:function parse(t,r){var i=t;i.secure=isSecure(i);i.resourceName=(i.path||"/")+(i.query?"?"+i.query:"");i.path=undefined;i.query=undefined;return i},serialize:function serialize(t,r){if(t.port===(isSecure(t)?443:80)||t.port===""){t.port=undefined}if(typeof t.secure==="boolean"){t.scheme=t.secure?"wss":"ws";t.secure=undefined}if(t.resourceName){var i=t.resourceName.split("?"),a=o(i,2),c=a[0],l=a[1];t.path=c&&c!=="/"?c:undefined;t.query=l;t.resourceName=undefined}t.fragment=undefined;return t}};var G={scheme:"wss",domainHost:V.domainHost,parse:V.parse,serialize:V.serialize};var q={};var K=true;var W="[A-Za-z0-9\\-\\.\\_\\~"+(K?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var Y="[0-9A-Fa-f]";var Z=subexp(subexp("%[EFef]"+Y+"%"+Y+Y+"%"+Y+Y)+"|"+subexp("%[89A-Fa-f]"+Y+"%"+Y+Y)+"|"+subexp("%"+Y+Y));var X="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var J="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var Q=merge(J,'[\\"\\\\]');var ee="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var te=new RegExp(W,"g");var re=new RegExp(Z,"g");var se=new RegExp(merge("[^]",X,"[\\.]",'[\\"]',Q),"g");var ie=new RegExp(merge("[^]",W,ee),"g");var ne=ie;function decodeUnreserved(t){var r=pctDecChars(t);return!r.match(te)?t:r}var oe={scheme:"mailto",parse:function parse$$1(t,r){var i=t;var o=i.to=i.path?i.path.split(","):[];i.path=undefined;if(i.query){var a=false;var c={};var l=i.query.split("&");for(var u=0,h=l.length;u<h;++u){var d=l[u].split("=");switch(d[0]){case"to":var p=d[1].split(",");for(var m=0,y=p.length;m<y;++m){o.push(p[m])}break;case"subject":i.subject=unescapeComponent(d[1],r);break;case"body":i.body=unescapeComponent(d[1],r);break;default:a=true;c[unescapeComponent(d[0],r)]=unescapeComponent(d[1],r);break}}if(a)i.headers=c}i.query=undefined;for(var g=0,v=o.length;g<v;++g){var b=o[g].split("@");b[0]=unescapeComponent(b[0]);if(!r.unicodeSupport){try{b[1]=I.toASCII(unescapeComponent(b[1],r).toLowerCase())}catch(t){i.error=i.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}}else{b[1]=unescapeComponent(b[1],r).toLowerCase()}o[g]=b.join("@")}return i},serialize:function serialize$$1(t,r){var i=t;var o=toArray(t.to);if(o){for(var a=0,c=o.length;a<c;++a){var l=String(o[a]);var u=l.lastIndexOf("@");var h=l.slice(0,u).replace(re,decodeUnreserved).replace(re,toUpperCase).replace(se,pctEncChar);var d=l.slice(u+1);try{d=!r.iri?I.toASCII(unescapeComponent(d,r).toLowerCase()):I.toUnicode(d)}catch(t){i.error=i.error||"Email address's domain name can not be converted to "+(!r.iri?"ASCII":"Unicode")+" via punycode: "+t}o[a]=h+"@"+d}i.path=o.join(",")}var p=t.headers=t.headers||{};if(t.subject)p["subject"]=t.subject;if(t.body)p["body"]=t.body;var m=[];for(var y in p){if(p[y]!==q[y]){m.push(y.replace(re,decodeUnreserved).replace(re,toUpperCase).replace(ie,pctEncChar)+"="+p[y].replace(re,decodeUnreserved).replace(re,toUpperCase).replace(ne,pctEncChar))}}if(m.length){i.query=m.join("&")}return i}};var ae=/^([^\:]+)\:(.*)/;var ce={scheme:"urn",parse:function parse$$1(t,r){var i=t.path&&t.path.match(ae);var o=t;if(i){var a=r.scheme||o.scheme||"urn";var c=i[1].toLowerCase();var l=i[2];var u=a+":"+(r.nid||c);var h=N[u];o.nid=c;o.nss=l;o.path=undefined;if(h){o=h.parse(o,r)}}else{o.error=o.error||"URN can not be parsed."}return o},serialize:function serialize$$1(t,r){var i=r.scheme||t.scheme||"urn";var o=t.nid;var a=i+":"+(r.nid||o);var c=N[a];if(c){t=c.serialize(t,r)}var l=t;var u=t.nss;l.path=(o||r.nid)+":"+u;return l}};var le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var ue={scheme:"urn:uuid",parse:function parse(t,r){var i=t;i.uuid=i.nss;i.nss=undefined;if(!r.tolerant&&(!i.uuid||!i.uuid.match(le))){i.error=i.error||"UUID is not valid."}return i},serialize:function serialize(t,r){var i=t;i.nss=(t.uuid||"").toLowerCase();return i}};N[H.scheme]=H;N[z.scheme]=z;N[V.scheme]=V;N[G.scheme]=G;N[oe.scheme]=oe;N[ce.scheme]=ce;N[ue.scheme]=ue;t.SCHEMES=N;t.pctEncChar=pctEncChar;t.pctDecChars=pctDecChars;t.parse=parse;t.removeDotSegments=removeDotSegments;t.serialize=serialize;t.resolveComponents=resolveComponents;t.resolve=resolve;t.normalize=normalize;t.equal=equal;t.escapeComponent=escapeComponent;t.unescapeComponent=unescapeComponent;Object.defineProperty(t,"__esModule",{value:true})}))},2338:(t,r,i)=>{"use strict";var o=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var a=i(3113);var c=["node_modules","favicon.ico"];var l=t.exports=function(t){var r=[];var i=[];if(t===null){i.push("name cannot be null");return done(r,i)}if(t===undefined){i.push("name cannot be undefined");return done(r,i)}if(typeof t!=="string"){i.push("name must be a string");return done(r,i)}if(!t.length){i.push("name length must be greater than zero")}if(t.match(/^\./)){i.push("name cannot start with a period")}if(t.match(/^_/)){i.push("name cannot start with an underscore")}if(t.trim()!==t){i.push("name cannot contain leading or trailing spaces")}c.forEach((function(r){if(t.toLowerCase()===r){i.push(r+" is a blacklisted name")}}));a.forEach((function(i){if(t.toLowerCase()===i){r.push(i+" is a core module name")}}));if(t.length>214){r.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){r.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){r.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var l=t.match(o);if(l){var u=l[1];var h=l[2];if(encodeURIComponent(u)===u&&encodeURIComponent(h)===h){return done(r,i)}}i.push("name can only contain URL-friendly characters")}return done(r,i)};l.scopedPackagePattern=o;var done=function(t,r){var i={validForNewPackages:r.length===0&&t.length===0,validForOldPackages:r.length===0,warnings:t,errors:r};if(!i.warnings.length)delete i.warnings;if(!i.errors.length)delete i.errors;return i}},7200:(t,r,i)=>{const o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const a=i(1017);const c=o?";":":";const l=i(7745);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,r)=>{const i=r.colon||c;const a=t.match(/\//)||o&&t.match(/\\/)?[""]:[...o?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(i)];const l=o?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const u=o?l.split(i):[""];if(o){if(t.indexOf(".")!==-1&&u[0]!=="")u.unshift("")}return{pathEnv:a,pathExt:u,pathExtExe:l}};const which=(t,r,i)=>{if(typeof r==="function"){i=r;r={}}if(!r)r={};const{pathEnv:o,pathExt:c,pathExtExe:u}=getPathInfo(t,r);const h=[];const step=i=>new Promise(((c,l)=>{if(i===o.length)return r.all&&h.length?c(h):l(getNotFoundError(t));const u=o[i];const d=/^".*"$/.test(u)?u.slice(1,-1):u;const p=a.join(d,t);const m=!d&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(subStep(m,i,0))}));const subStep=(t,i,o)=>new Promise(((a,d)=>{if(o===c.length)return a(step(i+1));const p=c[o];l(t+p,{pathExt:u},((c,l)=>{if(!c&&l){if(r.all)h.push(t+p);else return a(t+p)}return a(subStep(t,i,o+1))}))}));return i?step(0).then((t=>i(null,t)),i):step(0)};const whichSync=(t,r)=>{r=r||{};const{pathEnv:i,pathExt:o,pathExtExe:c}=getPathInfo(t,r);const u=[];for(let h=0;h<i.length;h++){const d=i[h];const p=/^".*"$/.test(d)?d.slice(1,-1):d;const m=a.join(p,t);const y=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;for(let t=0;t<o.length;t++){const i=y+o[t];try{const t=l.sync(i,{pathExt:c});if(t){if(r.all)u.push(i);else return i}}catch(t){}}}if(r.all&&u.length)return u;if(r.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},9414:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},3401:(t,r,i)=>{"use strict";t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var r=this;if(!(r instanceof Yallist)){r=new Yallist}r.tail=null;r.head=null;r.length=0;if(t&&typeof t.forEach==="function"){t.forEach((function(t){r.push(t)}))}else if(arguments.length>0){for(var i=0,o=arguments.length;i<o;i++){r.push(arguments[i])}}return r}Yallist.prototype.removeNode=function(t){if(t.list!==this){throw new Error("removing node which does not belong to this list")}var r=t.next;var i=t.prev;if(r){r.prev=i}if(i){i.next=r}if(t===this.head){this.head=r}if(t===this.tail){this.tail=i}t.list.length--;t.next=null;t.prev=null;t.list=null;return r};Yallist.prototype.unshiftNode=function(t){if(t===this.head){return}if(t.list){t.list.removeNode(t)}var r=this.head;t.list=this;t.next=r;if(r){r.prev=t}this.head=t;if(!this.tail){this.tail=t}this.length++};Yallist.prototype.pushNode=function(t){if(t===this.tail){return}if(t.list){t.list.removeNode(t)}var r=this.tail;t.list=this;t.prev=r;if(r){r.next=t}this.tail=t;if(!this.head){this.head=t}this.length++};Yallist.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++){push(this,arguments[t])}return this.length};Yallist.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++){unshift(this,arguments[t])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var t=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return t};Yallist.prototype.shift=function(){if(!this.head){return undefined}var t=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return t};Yallist.prototype.forEach=function(t,r){r=r||this;for(var i=this.head,o=0;i!==null;o++){t.call(r,i.value,o,this);i=i.next}};Yallist.prototype.forEachReverse=function(t,r){r=r||this;for(var i=this.tail,o=this.length-1;i!==null;o--){t.call(r,i.value,o,this);i=i.prev}};Yallist.prototype.get=function(t){for(var r=0,i=this.head;i!==null&&r<t;r++){i=i.next}if(r===t&&i!==null){return i.value}};Yallist.prototype.getReverse=function(t){for(var r=0,i=this.tail;i!==null&&r<t;r++){i=i.prev}if(r===t&&i!==null){return i.value}};Yallist.prototype.map=function(t,r){r=r||this;var i=new Yallist;for(var o=this.head;o!==null;){i.push(t.call(r,o.value,this));o=o.next}return i};Yallist.prototype.mapReverse=function(t,r){r=r||this;var i=new Yallist;for(var o=this.tail;o!==null;){i.push(t.call(r,o.value,this));o=o.prev}return i};Yallist.prototype.reduce=function(t,r){var i;var o=this.head;if(arguments.length>1){i=r}else if(this.head){o=this.head.next;i=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=0;o!==null;a++){i=t(i,o.value,a);o=o.next}return i};Yallist.prototype.reduceReverse=function(t,r){var i;var o=this.tail;if(arguments.length>1){i=r}else if(this.tail){o=this.tail.prev;i=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=this.length-1;o!==null;a--){i=t(i,o.value,a);o=o.prev}return i};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var r=0,i=this.head;i!==null;r++){t[r]=i.value;i=i.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var r=0,i=this.tail;i!==null;r++){t[r]=i.value;i=i.prev}return t};Yallist.prototype.slice=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}for(;a!==null&&o<r;o++,a=a.next){i.push(a.value)}return i};Yallist.prototype.sliceReverse=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=this.length,a=this.tail;a!==null&&o>r;o--){a=a.prev}for(;a!==null&&o>t;o--,a=a.prev){i.push(a.value)}return i};Yallist.prototype.splice=function(t,r,...i){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}var c=[];for(var o=0;a&&o<r;o++){c.push(a.value);a=this.removeNode(a)}if(a===null){a=this.tail}if(a!==this.head&&a!==this.tail){a=a.prev}for(var o=0;o<i.length;o++){a=insert(this,a,i[o])}return c};Yallist.prototype.reverse=function(){var t=this.head;var r=this.tail;for(var i=t;i!==null;i=i.prev){var o=i.prev;i.prev=i.next;i.next=o}this.head=r;this.tail=t;return this};function insert(t,r,i){var o=r===t.head?new Node(i,null,r,t):new Node(i,r,r.next,t);if(o.next===null){t.tail=o}if(o.prev===null){t.head=o}t.length++;return o}function push(t,r){t.tail=new Node(r,t.tail,null,t);if(!t.head){t.head=t.tail}t.length++}function unshift(t,r){t.head=new Node(r,null,t.head,t);if(!t.tail){t.tail=t.head}t.length++}function Node(t,r,i,o){if(!(this instanceof Node)){return new Node(t,r,i,o)}this.list=o;this.value=t;if(r){r.next=this;this.prev=r}else{this.prev=null}if(i){i.prev=this;this.next=i}else{this.next=null}}try{i(9414)(Yallist)}catch(t){}},8776:(t,r,i)=>{"use strict";i.r(r);var o=i(9306);var a=i(4101);var c=i.n(a);var l=i(7136);var u=i.n(l);var h=i(1017);var d=i.n(h);var p=i(5713);var m=i.n(p);var y=i(5656);var g=i.n(y);var v=i(9239);var b=i.n(v);var w=i(7147);var E=i.n(w);var S=i(5255);var x=i(2781);const R=require("stream/promises");async function isUrlOk(t){try{const r=await fetch(t,{method:"HEAD"});return r.status===200}catch{return false}}async function getRepoInfo(t,r){const[,i,o,a,c,...l]=t.pathname.split("/");const u=r?r.replace(/^\//,""):l.join("/");if(a===undefined||a===""&&c===undefined){try{const t=await fetch(`https://api.github.com/repos/${i}/${o}`);if(t.status!==200){return}const r=await t.json();return{username:i,name:o,branch:r["default_branch"],filePath:u}}catch{return}}const h=r?`${c}/${l.join("/")}`.replace(new RegExp(`/${u}|/$`),""):c;if(i&&o&&h&&a==="tree"){return{username:i,name:o,branch:h,filePath:u}}}function hasRepo({username:t,name:r,branch:i,filePath:o}){const a=`https://api.github.com/repos/${t}/${r}/contents`;const c=`${o?`/${o}`:""}/package.json`;return isUrlOk(a+c+`?ref=${i}`)}function existsInRepo(t){try{const r=new URL(t);return isUrlOk(r.href)}catch{return isUrlOk(`https://api.github.com/repos/vercel/next.js/contents/examples/${encodeURIComponent(t)}`)}}async function downloadTarStream(t){const r=await fetch(t);if(!r.body){throw new Error(`Failed to download: ${t}`)}return x.Readable.fromWeb(r.body)}async function downloadAndExtractRepo(t,{username:r,name:i,branch:o,filePath:a}){await(0,R.pipeline)(await downloadTarStream(`https://codeload.github.com/${r}/${i}/tar.gz/${o}`),S.x({cwd:t,strip:a?a.split("/").length+1:1,filter:t=>t.startsWith(`${i}-${o.replace(/\//g,"-")}${a?`/${a}/`:"/"}`)}))}async function downloadAndExtractExample(t,r){if(r==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}await(0,R.pipeline)(await downloadTarStream("https://codeload.github.com/vercel/next.js/tar.gz/canary"),S.x({cwd:t,strip:2+r.split("/").length,filter:t=>t.includes(`next.js-canary/examples/${r}/`)}))}var P=i(2081);function isInGitRepository(){try{(0,P.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,P.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,P.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let r=false;try{(0,P.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,P.execSync)("git init",{stdio:"ignore"});r=true;if(!isDefaultBranchSet()){(0,P.execSync)("git checkout -b main",{stdio:"ignore"})}(0,P.execSync)("git add -A",{stdio:"ignore"});(0,P.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(i){if(r){try{E().rmSync(d().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}var $=i(4488);var O=i.n($);async function install(t,r){const i=["install"];if(!r){console.log((0,o.yellow)("You appear to be offline.\nFalling back to the local cache."));i.push("--offline")}return new Promise(((r,o)=>{const a=O()(t,i,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});a.on("close",(a=>{if(a!==0){o({command:`${t} ${i.join(" ")}`});return}r()}))}))}function isFolderEmpty(t,r){const i=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const a=E().readdirSync(t).filter((t=>!i.includes(t)&&!/\.iml$/.test(t)));if(a.length>0){console.log(`The directory ${(0,o.green)(r)} contains files that could conflict:`);console.log();for(const r of a){try{const i=E().lstatSync(d().join(t,r));if(i.isDirectory()){console.log(` ${(0,o.blue)(r)}/`)}else{console.log(` ${r}`)}}catch{console.log(` ${r}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}const T=require("dns/promises");var A=i.n(T);var C=i(7310);var k=i.n(C);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const t=(0,P.execSync)("npm config get https-proxy").toString().trim();return t!=="null"?t:undefined}catch(t){return}}async function getOnline(){try{await A().lookup("registry.yarnpkg.com");return true}catch{const t=getProxy();if(!t){return false}const{hostname:r}=k().parse(t);if(!r){return false}try{await A().lookup(r);return true}catch{return false}}}async function isWriteable(t){try{await E().promises.access(t,(E().constants||E()).W_OK);return true}catch(t){return false}}var I=i(8695);const identity=t=>t;const copy=async(t,r,{cwd:i,rename:o=identity,parents:a=true}={})=>{const c=typeof t==="string"?[t]:t;if(c.length===0||!r){throw new TypeError("`src` and `dest` are required")}const l=await(0,I.async)(c,{cwd:i,dot:true,absolute:false,stats:false});const u=i?d().resolve(i,r):r;return Promise.all(l.map((async t=>{const r=d().dirname(t);const c=o(d().basename(t));const l=i?d().resolve(i,t):t;const h=a?d().join(u,r,c):d().join(u,c);await E().promises.mkdir(d().dirname(h),{recursive:true});return E().promises.copyFile(l,h)})))};var N=i(2037);var D=i.n(N);const L=require("fs/promises");var M=i.n(L);var j=i(8383);const U=JSON.parse('{"name":"create-next-app","version":"14.1.0","keywords":["react","next","next.js"],"description":"Create Next.js-powered React apps with one command","repository":{"type":"git","url":"https://github.com/vercel/next.js","directory":"packages/create-next-app"},"author":"Next.js Team <support@vercel.com>","license":"MIT","bin":{"create-next-app":"./dist/index.js"},"files":["dist"],"scripts":{"dev":"ncc build ./index.ts -w -o dist/","prerelease":"node ../../scripts/rm.mjs dist","release":"ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register","prepublishOnly":"cd ../../ && turbo run build","build":"pnpm release","lint-fix":"pnpm prettier -w --plugin prettier-plugin-tailwindcss \'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}\'"},"devDependencies":{"@types/async-retry":"1.4.2","@types/ci-info":"2.0.0","@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.4.2","@types/tar":"6.1.5","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","async-retry":"1.3.1","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","commander":"2.20.0","conf":"10.2.0","cross-spawn":"7.0.3","fast-glob":"3.3.1","picocolors":"1.0.0","prettier-plugin-tailwindcss":"0.3.0","prompts":"2.4.2","tar":"6.1.15","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.17.0"}}');const getTemplateFile=({template:t,mode:r,file:o})=>i.ab+"templates/"+t+"/"+r+"/"+o;const B=["app","pages","styles"];const installTemplate=async({appName:t,root:r,packageManager:a,isOnline:c,template:l,mode:u,tailwind:h,eslint:p,srcDir:m,importAlias:y})=>{var g;console.log((0,o.bold)(`Using ${a}.`));console.log("\nInitializing project with template:",l,"\n");const v=i.ab+"templates/"+l+"/"+u;const b=["**"];if(!p)b.push("!eslintrc.json");if(!h)b.push(u=="ts"?"tailwind.config.ts":"!tailwind.config.js","!postcss.config.js");await copy(b,r,{parents:true,cwd:v,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const w=d().join(r,u==="js"?"jsconfig.json":"tsconfig.json");await M().writeFile(w,(await M().readFile(w,"utf8")).replace(`"@/*": ["./*"]`,m?`"@/*": ["./src/*"]`:`"@/*": ["./*"]`).replace(`"@/*":`,`"${y}":`));if(y!=="@/*"){const t=await(0,I.async)("**/*",{cwd:r,dot:true,stats:false});const i=new j.Sema(8,{capacity:t.length});await Promise.all(t.map((async t=>{if(t==="tsconfig.json"||t==="jsconfig.json")return;await i.acquire();const o=d().join(r,t);if((await M().stat(o)).isFile()){await M().writeFile(o,(await M().readFile(o,"utf8")).replace(`@/`,`${y.replace(/\*/g,"")}`))}await i.release()})))}if(m){await M().mkdir(d().join(r,"src"),{recursive:true});await Promise.all(B.map((async t=>{await M().rename(d().join(r,t),d().join(r,"src",t)).catch((t=>{if(t.code!=="ENOENT"){throw t}}))})));const t=l.startsWith("app");const i=d().join("src",t?"app":"pages",`${t?"page":"index"}.${u==="ts"?"tsx":"js"}`);await M().writeFile(i,(await M().readFile(i,"utf8")).replace(t?"app/page":"pages/index",t?"src/app/page":"src/pages/index"));if(h){const t=d().join(r,u==="ts"?"tailwind.config.ts":"tailwind.config.js");await M().writeFile(t,(await M().readFile(t,"utf8")).replace(/\.\/(\w+)\/\*\*\/\*\.\{js,ts,jsx,tsx,mdx\}/g,"./src/$1/**/*.{js,ts,jsx,tsx,mdx}"))}}const E=(g=process.env.NEXT_PRIVATE_TEST_VERSION)!==null&&g!==void 0?g:U.version;const S={name:t,version:"0.1.0",private:true,scripts:{dev:"next dev",build:"next build",start:"next start",lint:"next lint"},dependencies:{react:"^18","react-dom":"^18",next:E},devDependencies:{}};if(u==="ts"){S.devDependencies={...S.devDependencies,typescript:"^5","@types/node":"^20","@types/react":"^18","@types/react-dom":"^18"}}if(h){S.devDependencies={...S.devDependencies,autoprefixer:"^10.0.1",postcss:"^8",tailwindcss:"^3.3.0"}}if(p){S.devDependencies={...S.devDependencies,eslint:"^8","eslint-config-next":E}}const x=Object.keys(S.devDependencies).length;if(!x)delete S.devDependencies;await M().writeFile(d().join(r,"package.json"),JSON.stringify(S,null,2)+D().EOL);console.log("\nInstalling dependencies:");for(const t in S.dependencies)console.log(`- ${(0,o.cyan)(t)}`);if(x){console.log("\nInstalling devDependencies:");for(const t in S.devDependencies)console.log(`- ${(0,o.cyan)(t)}`)}console.log();await install(a,c)};class DownloadError extends Error{}async function createApp({appPath:t,packageManager:r,example:i,examplePath:a,typescript:c,tailwind:l,eslint:u,appRouter:h,srcDir:p,importAlias:m}){let y;const g=c?"ts":"js";const v=h?l?"app-tw":"app":l?"default-tw":"default";if(i){let t;try{t=new URL(i)}catch(t){const r=t;if(r.code!=="ERR_INVALID_URL"){console.error(t);process.exit(1)}}if(t){if(t.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,o.red)(`"${i}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}y=await getRepoInfo(t,a);if(!y){console.error(`Found invalid GitHub URL: ${(0,o.red)(`"${i}"`)}. Please fix the URL and try again.`);process.exit(1)}const r=await hasRepo(y);if(!r){console.error(`Could not locate the repository for ${(0,o.red)(`"${i}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(i!=="__internal-testing-retry"){const t=await existsInRepo(i);if(!t){console.error(`Could not locate an example named ${(0,o.red)(`"${i}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,o.red)(`"${i}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const w=d().resolve(t);if(!await isWriteable(d().dirname(w))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const S=d().basename(w);E().mkdirSync(w,{recursive:true});if(!isFolderEmpty(w,S)){process.exit(1)}const x=r==="yarn";const R=!x||await getOnline();const P=process.cwd();console.log(`Creating a new Next.js app in ${(0,o.green)(w)}.`);console.log();process.chdir(w);const $=d().join(w,"package.json");let O=false;if(i){try{if(y){const t=y;console.log(`Downloading files from repo ${(0,o.cyan)(i)}. This might take a moment.`);console.log();await b()((()=>downloadAndExtractRepo(w,t)),{retries:3})}else{console.log(`Downloading files for example ${(0,o.cyan)(i)}. This might take a moment.`);console.log();await b()((()=>downloadAndExtractExample(w,i)),{retries:3})}}catch(t){function isErrorLike(t){return typeof t==="object"&&t!==null&&typeof t.message==="string"}throw new DownloadError(isErrorLike(t)?t.message:t+"")}const t=d().join(w,".gitignore");if(!E().existsSync(t)){E().copyFileSync(getTemplateFile({template:v,mode:g,file:"gitignore"}),t)}const a=d().join(w,"tsconfig.json");if(E().existsSync(a)){E().copyFileSync(getTemplateFile({template:v,mode:"ts",file:"next-env.d.ts"}),d().join(w,"next-env.d.ts"))}O=E().existsSync($);if(O){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(r,R);console.log()}}else{await installTemplate({appName:S,root:w,template:v,mode:g,packageManager:r,isOnline:R,tailwind:l,eslint:u,srcDir:p,importAlias:m})}if(tryGitInit(w)){console.log("Initialized a git repository.");console.log()}let T;if(d().join(P,S)===t){T=S}else{T=t}console.log(`${(0,o.green)("Success!")} Created ${S} at ${t}`);if(O){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,o.cyan)(` ${r} ${x?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,o.cyan)(` ${r} ${x?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,o.cyan)(` ${r} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,o.cyan)(" cd"),T);console.log(` ${(0,o.cyan)(`${r} ${x?"":"run "}dev`)}`)}console.log()}function getPkgManager(){const t=process.env.npm_config_user_agent||"";if(t.startsWith("yarn")){return"yarn"}if(t.startsWith("pnpm")){return"pnpm"}if(t.startsWith("bun")){return"bun"}return"npm"}var H=i(2338);var z=i.n(H);function validateNpmName(t){const r=z()(t);if(r.validForNewPackages){return{valid:true}}return{valid:false,problems:[...r.errors||[],...r.warnings||[]]}}var V=i(7741);var G=i.n(V);let q="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const K=new(c().Command)(U.name).version(U.version).arguments("<project-directory>").usage(`${(0,o.green)("<project-directory>")} [options]`).action((t=>{q=t})).option("--ts, --typescript",`\n\n Initialize as a TypeScript project. (default)\n`).option("--js, --javascript",`\n\n Initialize as a JavaScript project.\n`).option("--tailwind",`\n\n Initialize with Tailwind CSS config. (default)\n`).option("--eslint",`\n\n Initialize with eslint config.\n`).option("--app",`\n\n Initialize as an App Router project.\n`).option("--src-dir",`\n\n Initialize inside a \`src/\` directory.\n`).option("--import-alias <alias-to-configure>",`\n\n Specify import alias to use (default "@/*").\n`).option("--use-npm",`\n\n Explicitly tell the CLI to bootstrap the application using npm\n`).option("--use-pnpm",`\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`).option("--use-yarn",`\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`).option("--use-bun",`\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`).option("-e, --example [name]|[github-url]",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Next.js repo or a GitHub URL. The URL can use\n any branch and/or subdirectory\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).option("--reset-preferences",`\n\n Explicitly tell the CLI to reset any stored preferences\n`).allowUnknownOption().parse(process.argv);const W=!!K.useNpm?"npm":!!K.usePnpm?"pnpm":!!K.useYarn?"yarn":!!K.useBun?"bun":getPkgManager();async function run(){const t=new(u())({projectName:"create-next-app"});if(K.resetPreferences){t.clear();console.log(`Preferences reset successfully`);return}if(typeof q==="string"){q=q.trim()}if(!q){const t=await m()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const r=validateNpmName(d().basename(d().resolve(t)));if(r.valid){return true}return"Invalid project name: "+r.problems[0]}});if(typeof t.path==="string"){q=t.path.trim()}}if(!q){console.log("\nPlease specify the project directory:\n"+` ${(0,o.cyan)(K.name())} ${(0,o.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,o.cyan)(K.name())} ${(0,o.green)("my-next-app")}\n\n`+`Run ${(0,o.cyan)(`${K.name()} --help`)} to see all options.`);process.exit(1)}const r=d().resolve(q);const i=d().basename(r);const a=validateNpmName(i);if(!a.valid){console.error(`Could not create a project called ${(0,o.red)(`"${i}"`)} because of npm naming restrictions:`);a.problems.forEach((t=>console.error(` ${(0,o.red)((0,o.bold)("*"))} ${t}`)));process.exit(1)}if(K.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}const c=d().resolve(r);const l=d().basename(c);const h=E().existsSync(c);if(h&&!isFolderEmpty(c,l)){process.exit(1)}const p=typeof K.example==="string"&&K.example.trim();const y=t.get("preferences")||{};if(!p){const t={typescript:true,eslint:true,tailwind:true,app:true,srcDir:false,importAlias:"@/*",customizeImportAlias:false};const getPrefOrDefault=r=>{var i;return(i=y[r])!==null&&i!==void 0?i:t[r]};if(!K.typescript&&!K.javascript){if(G().isCI){K.typescript=getPrefOrDefault("typescript")}else{const t=(0,o.blue)("TypeScript");const{typescript:r}=await m()({type:"toggle",name:"typescript",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});K.typescript=Boolean(r);K.javascript=!Boolean(r);y.typescript=Boolean(r)}}if(!process.argv.includes("--eslint")&&!process.argv.includes("--no-eslint")){if(G().isCI){K.eslint=getPrefOrDefault("eslint")}else{const t=(0,o.blue)("ESLint");const{eslint:r}=await m()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});K.eslint=Boolean(r);y.eslint=Boolean(r)}}if(!process.argv.includes("--tailwind")&&!process.argv.includes("--no-tailwind")){if(G().isCI){K.tailwind=getPrefOrDefault("tailwind")}else{const t=(0,o.blue)("Tailwind CSS");const{tailwind:r}=await m()({onState:onPromptState,type:"toggle",name:"tailwind",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("tailwind"),active:"Yes",inactive:"No"});K.tailwind=Boolean(r);y.tailwind=Boolean(r)}}if(!process.argv.includes("--src-dir")&&!process.argv.includes("--no-src-dir")){if(G().isCI){K.srcDir=getPrefOrDefault("srcDir")}else{const t=(0,o.blue)("`src/` directory");const{srcDir:r}=await m()({onState:onPromptState,type:"toggle",name:"srcDir",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("srcDir"),active:"Yes",inactive:"No"});K.srcDir=Boolean(r);y.srcDir=Boolean(r)}}if(!process.argv.includes("--app")&&!process.argv.includes("--no-app")){if(G().isCI){K.app=getPrefOrDefault("app")}else{const t=(0,o.blue)("App Router");const{appRouter:r}=await m()({onState:onPromptState,type:"toggle",name:"appRouter",message:`Would you like to use ${t}? (recommended)`,initial:getPrefOrDefault("app"),active:"Yes",inactive:"No"});K.app=Boolean(r)}}if(typeof K.importAlias!=="string"||!K.importAlias.length){if(G().isCI){K.importAlias=t.importAlias}else{const r=(0,o.blue)("import alias");const{customizeImportAlias:i}=await m()({onState:onPromptState,type:"toggle",name:"customizeImportAlias",message:`Would you like to customize the default ${r} (${t.importAlias})?`,initial:getPrefOrDefault("customizeImportAlias"),active:"Yes",inactive:"No"});if(!i){K.importAlias=t.importAlias}else{const{importAlias:t}=await m()({onState:onPromptState,type:"text",name:"importAlias",message:`What ${r} would you like configured?`,initial:getPrefOrDefault("importAlias"),validate:t=>/.+\/\*/.test(t)?true:"Import alias must follow the pattern <prefix>/*"});K.importAlias=t;y.importAlias=t}}}}try{await createApp({appPath:r,packageManager:W,example:p&&p!=="default"?p:undefined,examplePath:K.examplePath,typescript:K.typescript,tailwind:K.tailwind,eslint:K.eslint,appRouter:K.app,srcDir:K.srcDir,importAlias:K.importAlias})}catch(t){if(!(t instanceof DownloadError)){throw t}const i=await m()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${p}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!i.builtin){throw t}await createApp({appPath:r,packageManager:W,typescript:K.typescript,eslint:K.eslint,tailwind:K.tailwind,appRouter:K.app,srcDir:K.srcDir,importAlias:K.importAlias})}t.set("preferences",y)}const Y=g()(U).catch((()=>null));async function notifyUpdate(){try{const t=await Y;if(t===null||t===void 0?void 0:t.latest){const t=W==="yarn"?"yarn global add create-next-app":W==="pnpm"?"pnpm add -g create-next-app":W==="bun"?"bun add -g create-next-app":"npm i -g create-next-app";console.log((0,o.yellow)((0,o.bold)("A new version of `create-next-app` is available!"))+"\n"+"You can update by running: "+(0,o.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,o.cyan)(t.command)} has failed.`)}else{console.log((0,o.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},9491:t=>{"use strict";t.exports=require("assert")},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},7282:t=>{"use strict";t.exports=require("process")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},1576:t=>{"use strict";t.exports=require("string_decoder")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")},7918:t=>{"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},9520:t=>{"use strict";t.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3113:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')},6107:t=>{"use strict";t.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')}};var r={};function __nccwpck_require__(i){var o=r[i];if(o!==undefined){return o.exports}var a=r[i]={id:i,loaded:false,exports:{}};var c=true;try{t[i].call(a.exports,a,a.exports,__nccwpck_require__);c=false}finally{if(c)delete r[i]}a.loaded=true;return a.exports}(()=>{__nccwpck_require__.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(r,{a:r});return r}})();(()=>{__nccwpck_require__.d=(t,r)=>{for(var i in r){if(__nccwpck_require__.o(r,i)&&!__nccwpck_require__.o(t,i)){Object.defineProperty(t,i,{enumerable:true,get:r[i]})}}}})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=t=>{t.paths=[];if(!t.children)t.children=[];return t}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(8776);module.exports=i})();
|