From 5997d5c6e996514dea88cc1ac1772141f9544aa7 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Sat, 7 Jan 2023 23:12:56 +0700 Subject: [PATCH] Remember indexing error (#2493) Signed-off-by: Andrey Sobolev --- dev/prod/webpack.config.js | 5 ----- pods/server/Dockerfile | 2 +- pods/server/package.json | 2 +- server/core/src/indexer/content.ts | 7 +++++++ server/openai/src/openai.ts | 7 +++++++ server/translate/src/retranslate.ts | 7 +++++++ tools/apm/apm.js | 22 +++++++++++++--------- 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/dev/prod/webpack.config.js b/dev/prod/webpack.config.js index d17be74a42..212fab3be5 100644 --- a/dev/prod/webpack.config.js +++ b/dev/prod/webpack.config.js @@ -59,11 +59,6 @@ module.exports = { chunkFilename: '[name].[contenthash].js', publicPath: '/' }, - cache: { - type: 'filesystem', - allowCollectingMemory: true, - cacheLocation: path.resolve(__dirname, '../../common/temp/webpack_cache'), - }, module: { rules: [ { diff --git a/pods/server/Dockerfile b/pods/server/Dockerfile index c554be8135..35598b7429 100644 --- a/pods/server/Dockerfile +++ b/pods/server/Dockerfile @@ -5,4 +5,4 @@ WORKDIR /usr/src/app COPY bundle.js ./ EXPOSE 8080 -CMD [ "node", "bundle.js" ] +CMD [ "node", "--enable-source-maps", "bundle.js" ] diff --git a/pods/server/package.json b/pods/server/package.json index 37b96052e3..98d585f12b 100644 --- a/pods/server/package.json +++ b/pods/server/package.json @@ -8,7 +8,7 @@ "start": "cross-env MONGO_URL=mongodb://localhost:27017 ELASTIC_URL=http://localhost:9200 FRONT_URL=http://localhost:8087 MINIO_ENDPOINT=localhost MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin METRICS_CONSOLE=true SERVER_SECRET=secret ts-node src/__start.ts", "build": "heft build", "lint:fix": "eslint --fix src", - "bundle": "esbuild src/__start.ts --bundle --platform=node > bundle.js", + "bundle": "esbuild src/__start.ts --bundle --sourcemap=inline --minify --platform=node > bundle.js", "docker:build": "docker build -t hardcoreeng/transactor .", "docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/transactor staging", "docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/transactor", diff --git a/server/core/src/indexer/content.ts b/server/core/src/indexer/content.ts index bb63c3e3a2..2f5270b37a 100644 --- a/server/core/src/indexer/content.ts +++ b/server/core/src/indexer/content.ts @@ -151,6 +151,13 @@ export class ContentRetrievalStage implements FullTextPipelineStage { } } } catch (err: any) { + const wasError = (doc as any).error !== undefined + + await pipeline.update(doc._id, false, { [docKey('error')]: JSON.stringify({ message: err.message, err }) }, {}) + if (wasError) { + return + } + // Print error only first time, and update it in doc index console.error(err) return } diff --git a/server/openai/src/openai.ts b/server/openai/src/openai.ts index 260350a1d4..1cf4595844 100644 --- a/server/openai/src/openai.ts +++ b/server/openai/src/openai.ts @@ -238,6 +238,13 @@ export class OpenAIEmbeddingsStage implements FullTextPipelineStage { if (err.message === 'Response code 401 (Unauthorized)') { this.unauthorized = true } + const wasError = doc.attributes.error !== undefined + + await pipeline.update(doc._id, false, { [docKey('error')]: JSON.stringify(err) }, {}) + if (wasError) { + continue + } + // Print error only first time, and update it in doc index console.error(err) continue } diff --git a/server/translate/src/retranslate.ts b/server/translate/src/retranslate.ts index 39fc6159fb..c8166880b6 100644 --- a/server/translate/src/retranslate.ts +++ b/server/translate/src/retranslate.ts @@ -200,6 +200,13 @@ export class LibRetranslateStage implements TranslationStage { } } } catch (err: any) { + const wasError = doc.attributes.error !== undefined + + await pipeline.update(doc._id, false, { [docKey('error')]: JSON.stringify(err) }, {}) + if (wasError) { + return + } + // Print error only first time, and update it in doc index console.error(err) return } diff --git a/tools/apm/apm.js b/tools/apm/apm.js index 8204730aa9..e42c75907a 100644 --- a/tools/apm/apm.js +++ b/tools/apm/apm.js @@ -5,9 +5,9 @@ `)}};Et.Help=Te});var Pe=_(Ie=>{var{InvalidArgumentError:zr}=ee(),_e=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let s=gt(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e,this.parseArg=(r,s)=>{if(!e.includes(r))throw new zr(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Hr(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}};function Hr(u){return u.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function gt(u){let e,r,s=u.split(/[ |,]+/);return s.length>1&&!/^[[<]/.test(s[1])&&(e=s.shift()),r=s.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}Ie.Option=_e;Ie.splitOptionFlags=gt});var Ct=_(vt=>{function jr(u,e){if(Math.abs(u.length-e.length)>3)return Math.max(u.length,e.length);let r=[];for(let s=0;s<=u.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++)for(let h=1;h<=u.length;h++){let l=1;u[h-1]===e[s-1]?l=0:l=1,r[h][s]=Math.min(r[h-1][s]+1,r[h][s-1]+1,r[h-1][s-1]+l),h>1&&s>1&&u[h-1]===e[s-2]&&u[h-2]===e[s-1]&&(r[h][s]=Math.min(r[h][s],r[h-2][s-2]+1))}return r[u.length][e.length]}function Vr(u,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=u.startsWith("--");r&&(u=u.slice(2),e=e.map(o=>o.slice(2)));let s=[],h=3,l=.4;return e.forEach(o=>{if(o.length<=1)return;let D=jr(u,o),m=Math.max(u.length,o.length);(m-D)/m>l&&(Do.localeCompare(D)),r&&(s=s.map(o=>`--${o}`)),s.length>1?` (Did you mean one of ${s.join(", ")}?)`:s.length===1?` (Did you mean ${s[0]}?)`:""}vt.suggestSimilar=Vr});var wt=_(Ft=>{var Kr=require("events").EventEmitter,Oe=require("child_process"),$=require("path"),Me=require("fs"),{Argument:$r,humanReadableArgName:Gr}=me(),{CommanderError:Le}=ee(),{Help:Wr}=Ne(),{Option:qr,splitOptionFlags:Yr}=Pe(),{suggestSimilar:At}=Ct(),te=class extends Kr{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!1,this._outputConfiguration={writeOut:r=>process.stdout.write(r),writeErr:r=>process.stderr.write(r),getOutHelpWidth:()=>process.stdout.isTTY?process.stdout.columns:void 0,getErrHelpWidth:()=>process.stderr.isTTY?process.stderr.columns:void 0,outputError:(r,s)=>s(r)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,r,s){let h=r,l=s;typeof h=="object"&&h!==null&&(l=h,h=null),l=l||{};let[,o,D]=e.match(/([^ ]+) *(.*)/),m=this.createCommand(o);return h&&(m.description(h),m._executableHandler=!0),l.isDefault&&(this._defaultCommandName=m._name),m._hidden=!!(l.noHelp||l.hidden),m._executableFile=l.executableFile||null,D&&m.arguments(D),this.commands.push(m),m.parent=this,m.copyInheritedSettings(this),h?this:m}createCommand(e){return new te(e)}createHelp(){return Object.assign(new Wr,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function s(h){h.forEach(l=>{if(l._executableHandler&&!l._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${l.name()}`);s(l.commands)})}return s(e.commands),r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,r){return new $r(e,r)}argument(e,r,s,h){let l=this.createArgument(e,r);return typeof s=="function"?l.default(h).argParser(s):l.default(s),this.addArgument(l),this}arguments(e){return e.split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this._args.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,r){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=r||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,r){let s=["preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'. -Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,s){this._exitCallback&&this._exitCallback(new Le(e,r,s)),process.exit(e)}action(e){let r=s=>{let h=this._args.length,l=s.slice(0,h);return this._storeOptionsAsProperties?l[h]=this:l[h]=this.opts(),l.push(this),e.apply(this,l)};return this._actionHandler=r,this}createOption(e,r){return new qr(e,r)}addOption(e){let r=e.name(),s=e.attributeName(),h=e.defaultValue;if(e.negate||e.optional||e.required||typeof h=="boolean"){if(e.negate){let o=e.long.replace(/^--no-/,"--");h=this._findOption(o)?this.getOptionValue(s):!0}h!==void 0&&this.setOptionValueWithSource(s,h,"default")}this.options.push(e);let l=(o,D,m)=>{let f=this.getOptionValue(s);if(o!==null&&e.parseArg)try{o=e.parseArg(o,f===void 0?h:f)}catch(p){if(p.code==="commander.invalidArgument"){let d=`${D} ${p.message}`;this._displayError(p.exitCode,p.code,d)}throw p}else o!==null&&e.variadic&&(o=e._concatValue(o,f));typeof f=="boolean"||typeof f>"u"?o==null?this.setOptionValueWithSource(s,e.negate?!1:h||!0,m):this.setOptionValueWithSource(s,o,m):o!==null&&this.setOptionValueWithSource(s,e.negate?!1:o,m)};return this.on("option:"+r,o=>{let D=`error: option '${e.flags}' argument '${o}' is invalid.`;l(o,D,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let D=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;l(o,D,"env")}),this}_optionEx(e,r,s,h,l){let o=this.createOption(r,s);if(o.makeOptionMandatory(!!e.mandatory),typeof h=="function")o.default(l).argParser(h);else if(h instanceof RegExp){let D=h;h=(m,f)=>{let p=D.exec(m);return p?p[0]:f},o.default(l).argParser(h)}else o.default(h);return this.addOption(o)}option(e,r,s,h){return this._optionEx({},e,r,s,h)}requiredOption(e,r,s,h){return this._optionEx({mandatory:!0},e,r,s,h)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,!!this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this}setOptionValueWithSource(e,r,s){return this.setOptionValue(e,r),this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");r=r||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(r.from="electron")),this.rawArgs=e.slice();let s;switch(r.from){case void 0:case"node":this._scriptPath=e[1],s=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case"user":s=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._scriptPath&&require.main&&(this._scriptPath=require.main.filename),this._name=this._name||this._scriptPath&&$.basename(this._scriptPath,$.extname(this._scriptPath)),s}parse(e,r){let s=this._prepareUserArgs(e,r);return this._parseCommand([],s),this}async parseAsync(e,r){let s=this._prepareUserArgs(e,r);return await this._parseCommand([],s),this}_executeSubCommand(e,r){r=r.slice();let s=!1,h=[".js",".ts",".tsx",".mjs",".cjs"];this._checkForMissingMandatoryOptions();let l=this._scriptPath;!l&&require.main&&(l=require.main.filename);let o;try{let c=Me.realpathSync(l);o=$.dirname(c)}catch{o="."}let D=$.basename(l,$.extname(l))+"-"+e._name;e._executableFile&&(D=e._executableFile);let m=$.join(o,D);Me.existsSync(m)?D=m:h.forEach(c=>{Me.existsSync(`${m}${c}`)&&(D=`${m}${c}`)}),s=h.includes($.extname(D));let f;process.platform!=="win32"?s?(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.argv[0],r,{stdio:"inherit"})):f=Oe.spawn(D,r,{stdio:"inherit"}):(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.execPath,r,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{process.on(c,()=>{f.killed===!1&&f.exitCode===null&&f.kill(c)})});let d=this._exitCallback;d?f.on("close",()=>{d(new Le(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):f.on("close",process.exit.bind(process)),f.on("error",c=>{if(c.code==="ENOENT"){let t=`'${D}' does not exist +Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,s){this._exitCallback&&this._exitCallback(new Le(e,r,s)),process.exit(e)}action(e){let r=s=>{let h=this._args.length,l=s.slice(0,h);return this._storeOptionsAsProperties?l[h]=this:l[h]=this.opts(),l.push(this),e.apply(this,l)};return this._actionHandler=r,this}createOption(e,r){return new qr(e,r)}addOption(e){let r=e.name(),s=e.attributeName(),h=e.defaultValue;if(e.negate||e.optional||e.required||typeof h=="boolean"){if(e.negate){let o=e.long.replace(/^--no-/,"--");h=this._findOption(o)?this.getOptionValue(s):!0}h!==void 0&&this.setOptionValueWithSource(s,h,"default")}this.options.push(e);let l=(o,D,m)=>{let f=this.getOptionValue(s);if(o!==null&&e.parseArg)try{o=e.parseArg(o,f===void 0?h:f)}catch(p){if(p.code==="commander.invalidArgument"){let d=`${D} ${p.message}`;this._displayError(p.exitCode,p.code,d)}throw p}else o!==null&&e.variadic&&(o=e._concatValue(o,f));typeof f=="boolean"||typeof f>"u"?o==null?this.setOptionValueWithSource(s,e.negate?!1:h||!0,m):this.setOptionValueWithSource(s,o,m):o!==null&&this.setOptionValueWithSource(s,e.negate?!1:o,m)};return this.on("option:"+r,o=>{let D=`error: option '${e.flags}' argument '${o}' is invalid.`;l(o,D,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let D=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;l(o,D,"env")}),this}_optionEx(e,r,s,h,l){let o=this.createOption(r,s);if(o.makeOptionMandatory(!!e.mandatory),typeof h=="function")o.default(l).argParser(h);else if(h instanceof RegExp){let D=h;h=(m,f)=>{let p=D.exec(m);return p?p[0]:f},o.default(l).argParser(h)}else o.default(h);return this.addOption(o)}option(e,r,s,h){return this._optionEx({},e,r,s,h)}requiredOption(e,r,s,h){return this._optionEx({mandatory:!0},e,r,s,h)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this}setOptionValueWithSource(e,r,s){return this.setOptionValue(e,r),this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");r=r||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(r.from="electron")),this.rawArgs=e.slice();let s;switch(r.from){case void 0:case"node":this._scriptPath=e[1],s=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case"user":s=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._scriptPath&&require.main&&(this._scriptPath=require.main.filename),this._name=this._name||this._scriptPath&&$.basename(this._scriptPath,$.extname(this._scriptPath)),s}parse(e,r){let s=this._prepareUserArgs(e,r);return this._parseCommand([],s),this}async parseAsync(e,r){let s=this._prepareUserArgs(e,r);return await this._parseCommand([],s),this}_executeSubCommand(e,r){r=r.slice();let s=!1,h=[".js",".ts",".tsx",".mjs",".cjs"];this._checkForMissingMandatoryOptions();let l=this._scriptPath;!l&&require.main&&(l=require.main.filename);let o;try{let c=Me.realpathSync(l);o=$.dirname(c)}catch{o="."}let D=$.basename(l,$.extname(l))+"-"+e._name;e._executableFile&&(D=e._executableFile);let m=$.join(o,D);Me.existsSync(m)?D=m:h.forEach(c=>{Me.existsSync(`${m}${c}`)&&(D=`${m}${c}`)}),s=h.includes($.extname(D));let f;process.platform!=="win32"?s?(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.argv[0],r,{stdio:"inherit"})):f=Oe.spawn(D,r,{stdio:"inherit"}):(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.execPath,r,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{process.on(c,()=>{f.killed===!1&&f.exitCode===null&&f.kill(c)})});let d=this._exitCallback;d?f.on("close",()=>{d(new Le(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):f.on("close",process.exit.bind(process)),f.on("error",c=>{if(c.code==="ENOENT"){let t=`'${D}' does not exist - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}else if(c.code==="EACCES")throw new Error(`'${D}' not executable`);if(!d)process.exit(1);else{let t=new Le(1,"commander.executeSubCommandAsync","(error)");t.nestedError=c,d(t)}}),this.runningCommand=f}_dispatchSubcommand(e,r,s){let h=this._findCommand(e);if(h||this.help({error:!0}),h._executableHandler)this._executeSubCommand(h,r.concat(s));else return h._parseCommand(r,s)}_checkNumberOfArguments(){this._args.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(s,h,l)=>{let o=h;if(h!==null&&s.parseArg)try{o=s.parseArg(h,l)}catch(D){if(D.code==="commander.invalidArgument"){let m=`error: command-argument value '${h}' is invalid for argument '${s.name()}'. ${D.message}`;this._displayError(D.exitCode,D.code,m)}throw D}return o};this._checkNumberOfArguments();let r=[];this._args.forEach((s,h)=>{let l=s.defaultValue;s.variadic?he(s,D,o),s.defaultValue))):l===void 0&&(l=[]):hr()):r()}_chainOrCallHooks(e,r){let s=e,h=[];return Re(this).reverse().filter(l=>l._lifeCycleHooks[r]!==void 0).forEach(l=>{l._lifeCycleHooks[r].forEach(o=>{h.push({hookedCommand:l,callback:o})})}),r==="postAction"&&h.reverse(),h.forEach(l=>{s=this._chainOrCall(s,()=>l.callback(l.hookedCommand,this))}),s}_parseCommand(e,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),e=e.concat(s.operands),r=s.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return yt(this,r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),yt(this,s.unknown),this._checkForMissingMandatoryOptions();let h=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0])},l=`command:${this.name()}`;if(this._actionHandler){h(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&this.parent.emit(l,e,r),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(l))h(),this._processArguments(),this.parent.emit(l,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(h(),this._processArguments())}else this.commands.length?(h(),this.help({error:!0})):(h(),this._processArguments())}_findCommand(e){if(!!e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})}parseOptions(e){let r=[],s=[],h=r,l=e.slice();function o(m){return m.length>1&&m[0]==="-"}let D=null;for(;l.length;){let m=l.shift();if(m==="--"){h===s&&h.push(m),h.push(...l);break}if(D&&!o(m)){this.emit(`option:${D.name()}`,m);continue}if(D=null,o(m)){let f=this._findOption(m);if(f){if(f.required){let p=l.shift();p===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,p)}else if(f.optional){let p=null;l.length>0&&!o(l[0])&&(p=l.shift()),this.emit(`option:${f.name()}`,p)}else this.emit(`option:${f.name()}`);D=f.variadic?f:null;continue}}if(m.length>2&&m[0]==="-"&&m[1]!=="-"){let f=this._findOption(`-${m[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,m.slice(2)):(this.emit(`option:${f.name()}`),l.unshift(`-${m.slice(2)}`));continue}}if(/^--[^=]+=/.test(m)){let f=m.indexOf("="),p=this._findOption(m.slice(0,f));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,m.slice(f+1));continue}}if(o(m)&&(h=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(m)){r.push(m),l.length>0&&s.push(...l);break}else if(m===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(m),l.length>0&&r.push(...l);break}else if(this._defaultCommandName){s.push(m),l.length>0&&s.push(...l);break}}if(this._passThroughOptions){h.push(m),l.length>0&&h.push(...l);break}h.push(m)}return{operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let s=0;s{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(s,h,l)=>{let o=h;if(h!==null&&s.parseArg)try{o=s.parseArg(h,l)}catch(D){if(D.code==="commander.invalidArgument"){let m=`error: command-argument value '${h}' is invalid for argument '${s.name()}'. ${D.message}`;this._displayError(D.exitCode,D.code,m)}throw D}return o};this._checkNumberOfArguments();let r=[];this._args.forEach((s,h)=>{let l=s.defaultValue;s.variadic?he(s,D,o),s.defaultValue))):l===void 0&&(l=[]):hr()):r()}_chainOrCallHooks(e,r){let s=e,h=[];return Re(this).reverse().filter(l=>l._lifeCycleHooks[r]!==void 0).forEach(l=>{l._lifeCycleHooks[r].forEach(o=>{h.push({hookedCommand:l,callback:o})})}),r==="postAction"&&h.reverse(),h.forEach(l=>{s=this._chainOrCall(s,()=>l.callback(l.hookedCommand,this))}),s}_parseCommand(e,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),e=e.concat(s.operands),r=s.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return yt(this,r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),yt(this,s.unknown),this._checkForMissingMandatoryOptions();let h=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0])},l=`command:${this.name()}`;if(this._actionHandler){h(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&this.parent.emit(l,e,r),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(l))h(),this._processArguments(),this.parent.emit(l,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(h(),this._processArguments())}else this.commands.length?(h(),this.help({error:!0})):(h(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})}parseOptions(e){let r=[],s=[],h=r,l=e.slice();function o(m){return m.length>1&&m[0]==="-"}let D=null;for(;l.length;){let m=l.shift();if(m==="--"){h===s&&h.push(m),h.push(...l);break}if(D&&!o(m)){this.emit(`option:${D.name()}`,m);continue}if(D=null,o(m)){let f=this._findOption(m);if(f){if(f.required){let p=l.shift();p===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,p)}else if(f.optional){let p=null;l.length>0&&!o(l[0])&&(p=l.shift()),this.emit(`option:${f.name()}`,p)}else this.emit(`option:${f.name()}`);D=f.variadic?f:null;continue}}if(m.length>2&&m[0]==="-"&&m[1]!=="-"){let f=this._findOption(`-${m[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,m.slice(2)):(this.emit(`option:${f.name()}`),l.unshift(`-${m.slice(2)}`));continue}}if(/^--[^=]+=/.test(m)){let f=m.indexOf("="),p=this._findOption(m.slice(0,f));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,m.slice(f+1));continue}}if(o(m)&&(h=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(m)){r.push(m),l.length>0&&s.push(...l);break}else if(m===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(m),l.length>0&&r.push(...l);break}else if(this._defaultCommandName){s.push(m),l.length>0&&s.push(...l);break}}if(this._passThroughOptions){h.push(m),l.length>0&&h.push(...l);break}h.push(m)}return{operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let s=0;s{if(e.envVar&&e.envVar in process.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,process.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}missingArgument(e){let r=`error: missing required argument '${e}'`;this._displayError(1,"commander.missingArgument",r)}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this._displayError(1,"commander.optionMissingArgument",r)}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this._displayError(1,"commander.missingMandatoryOptionValue",r)}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let h=[],l=this;do{let o=l.createHelp().visibleOptions(l).filter(D=>D.long).map(D=>D.long);h=h.concat(o),l=l.parent}while(l&&!l._enablePositionalOptions);r=At(e,h)}let s=`error: unknown option '${e}'${r}`;this._displayError(1,"commander.unknownOption",s)}_excessArguments(e){if(this._allowExcessArguments)return;let r=this._args.length,s=r===1?"":"s",l=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${s} but got ${e.length}.`;this._displayError(1,"commander.excessArguments",l)}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let h=[];this.createHelp().visibleCommands(this).forEach(l=>{h.push(l.name()),l.alias()&&h.push(l.alias())}),r=At(e,h)}let s=`error: unknown command '${e}'${r}`;this._displayError(1,"commander.unknownCommand",s)}version(e,r,s){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",s=s||"output the version number";let h=this.createOption(r,s);return this._versionOptionName=h.attributeName(),this.options.push(h),this.on("option:"+h.name(),()=>{this._outputConfiguration.writeOut(`${e} @@ -20,11 +20,15 @@ Expecting one of '${s.join("', '")}'`);let h=`${e}Help`;return this.on(h,l=>{let `&&++this.index,this.lineStart=this.index;else switch(a){case"n":p+=` `;break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,p+=this.scanUnicodeCodePointEscape();else{var x=this.index,E=this.scanHexEscape(a);E!==null?p+=E:(this.index=x,p+=a)}break;case"x":var C=this.scanHexEscape(a);C===null&&this.throwUnexpectedToken(l.Messages.InvalidHexEscapeSequence),p+=C;break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;default:a==="0"?(h.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral),p+="\0"):h.Character.isOctalDigit(a.charCodeAt(0))?this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral):p+=a;break}else h.Character.isLineTerminator(a.charCodeAt(0))?(++this.lineNumber,a==="\r"&&this.source[this.index]===` `&&++this.index,this.lineStart=this.index,p+=` -`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];s.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],h.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(h.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!h.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&h.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(10),h=r(12),l=r(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new h.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function is(u){return Array.isArray?Array.isArray(u):de(u)==="[object Array]"}I.isArray=is;function rs(u){return typeof u=="boolean"}I.isBoolean=rs;function ss(u){return u===null}I.isNull=ss;function ns(u){return u==null}I.isNullOrUndefined=ns;function as(u){return typeof u=="number"}I.isNumber=as;function os(u){return typeof u=="string"}I.isString=os;function us(u){return typeof u=="symbol"}I.isSymbol=us;function hs(u){return u===void 0}I.isUndefined=hs;function ls(u){return de(u)==="[object RegExp]"}I.isRegExp=ls;function cs(u){return typeof u=="object"&&u!==null}I.isObject=cs;function ps(u){return de(u)==="[object Date]"}I.isDate=ps;function fs(u){return de(u)==="[object Error]"||u instanceof Error}I.isError=fs;function ms(u){return typeof u=="function"}I.isFunction=ms;function ds(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||typeof u=="symbol"||typeof u>"u"}I.isPrimitive=ds;I.isBuffer=require("buffer").Buffer.isBuffer;function de(u){return Object.prototype.toString.call(u)}});var Xt=_((Hn,Rt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=u=>u<1e5?u<100?u<10?0:1:u<1e4?u<1e3?2:3:4:u<1e7?u<1e6?5:6:u<1e9?u<1e8?7:8:9;function Pt(u,e){if(u===e)return 0;if(~~u===u&&~~e===e){if(u===0||e===0)return u=0)return-1;if(u>=0)return 1;u=-u,e=-e}let h=It(u),l=It(e),o=0;return hl&&(e*=_t[h-l-1],u/=10,o=1),u===e?o:u=32;)e|=u&1,u>>=1;return u+e}function Ot(u,e,r,s){let h=e+1;if(h===r)return 1;if(s(u[h++],u[e])<0){for(;h=0;)h++;return h-e}function Mt(u,e,r){for(r--;e>>1;h(l,u[p])<0?m=p:D=p+1}let f=s-D;switch(f){case 3:u[D+3]=u[D+2],F[D+3]=F[D+2];case 2:u[D+2]=u[D+1],F[D+2]=F[D+1];case 1:u[D+1]=u[D],F[D+1]=F[D];break;default:for(;f>0;)u[D+f]=u[D+f-1],F[D+f]=F[D+f-1],f--}u[D]=l,F[D]=o}}function Je(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])>0){for(D=s-h;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}else{for(D=h+1;mD&&(m=D);let f=o;o=h-m,m=h-f}for(o++;o>>1);l(u,e[r+f])>0?o=f+1:m=f}return m}function Ue(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])<0){for(D=h+1;mD&&(m=D);let f=o;o=h-m,m=h-f}else{for(D=s-h;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}for(o++;o>>1);l(u,e[r+f])<0?m=f:o=f+1}return m}var ze=class{constructor(e,r){this.array=e,this.compare=r;let{length:s}=e;this.length=s,this.minGallop=7,this.tmpStorageLength=s<2*256?s>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=s<120?5:s<1542?10:s<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,r){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=r,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),r===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--r===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--h===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(r===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--h===1){E=!0;break}if(x=h-Je(o[p],D,0,h,h-1,l),x!==0){for(c-=x,d-=x,h-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),h===1){for(c-=r,p-=r,i=c+1,t=p+1,f=r-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(h===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(h-1),f=0;ff&&(p=f),Lt(u,r,r+p,r+D,e),D=p}m.pushRun(r,D),m.mergeRuns(),o-=D,r+=D}while(o!==0);return m.forceMergeRuns(),F}Rt.exports={sort:Ds}});var Ut=_((jn,Jt)=>{"use strict";var Es=Object.prototype.hasOwnProperty;Jt.exports=(u,e)=>Es.call(u,e)});var se=_((Vn,Qt)=>{var Ve=Ut(),{isObject:zt,isArray:gs,isString:vs,isNumber:Cs}=xe(),Ke="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",As="[",ys="]",Ss="{",Fs="}",ws=",",bs="",ks="-",$e=[Ke,jt,Vt,Kt,$t],Bs=[Ke,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(u,e)=>Symbol.for(u+qt+e),De=(u,e,r)=>Object.defineProperty(u,e,{value:r,writable:!0,configurable:!0}),je=(u,e,r,s,h,l)=>{let o=re(h,s);if(!Ve(e,o))return;let D=r===s?o:re(h,r);De(u,D,e[o]),l&&delete e[o]},Yt=(u,e,r,s,h)=>{$e.forEach(l=>{je(u,e,r,s,l,h)})},Ts=(u,e,r)=>{e!==r&&$e.forEach(s=>{let h=re(s,r);if(!Ve(u,h)){je(u,u,r,e,s,!0);return}let l=u[h];delete u[h],je(u,u,r,e,s,!0),De(u,re(s,e),l)})},He=(u,e)=>{Bs.forEach(r=>{let s=e[r];s&&De(u,r,s)})},Ns=(u,e,r)=>(r.forEach(s=>{!vs(s)&&!Cs(s)||!Ve(e,s)||(u[s]=e[s],Yt(u,e,s,s))}),u);Qt.exports={SYMBOL_PREFIXES:$e,PREFIX_BEFORE:Ke,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:As,BRACKET_CLOSE:ys,CURLY_BRACKET_OPEN:Ss,CURLY_BRACKET_CLOSE:Fs,COLON:qt,COMMA:ws,MINUS:ks,EMPTY:bs,UNDEFINED:Ht,symbol:re,define:De,copy_comments:Yt,swap_comments:Ts,assign_non_prop_comments:He,assign(u,e,r){if(!zt(u))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return u;if(r===Ht)r=Object.keys(e),He(u,e);else if(gs(r))r.length===0&&He(u,e);else throw new TypeError("keys must be array or undefined");return Ns(u,e,r)}}});var Ge=_((Kn,ri)=>{var{isArray:_s}=xe(),{sort:Is}=Xt(),{SYMBOL_PREFIXES:Ps,UNDEFINED:Zt,symbol:Os,copy_comments:Ms,swap_comments:ii}=se(),Ls=u=>{let{length:e}=u,r=0,s=e/2;for(;r{Ms(u,e,r+s,r,h)},Y=(u,e,r,s,h,l)=>{if(h>0){let D=s;for(;D-- >0;)ei(u,e,r+D,h,l);return}let o=0;for(;o{Ps.forEach(r=>{let s=Os(r,e);delete u[s]})},Rs=(u,e)=>{let r=e;for(;r in u;)r=u[r];return r},Q=class extends Array{splice(...e){let{length:r}=this,s=super.splice(...e),[h,l,...o]=e;h<0&&(h+=r),arguments.length===1?l=r-h:l=Math.min(r-h,l);let{length:D}=o,m=D-l,f=h+l,p=r-f;return Y(this,this,f,p,m,!0),s}slice(...e){let{length:r}=this,s=super.slice(...e);if(!s.length)return new Q;let[h,l]=e;return l===Zt?l=r:l<0&&(l+=r),h<0?h+=r:h===Zt&&(h=0),Y(s,this,h,l-h,-h),s}unshift(...e){let{length:r}=this,s=super.unshift(...e),{length:h}=e;return h>0&&Y(this,this,0,r,h,!0),s}shift(){let e=super.shift(),{length:r}=this;return ti(this,0),Y(this,this,1,r,-1,!0),e}reverse(){return super.reverse(),Ls(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:r}=this,s=super.concat(...e);return e.length&&(Y(s,this,0,this.length,0),e.forEach(h=>{let l=r;r+=_s(h)?h.length:1,h instanceof Q&&Y(s,h,0,h.length,l)})),s}sort(...e){let r=Is(this,...e.slice(0,1)),s=Object.create(null);return r.forEach((h,l)=>{if(h===l)return;let o=Rs(s,h);o!==l&&(s[l]=o,ii(this,l,o))}),this}};ri.exports={CommentArray:Q}});var vi=_(($n,gi)=>{var Xs=Nt(),{CommentArray:Js}=Ge(),{PREFIX_BEFORE:ge,PREFIX_AFTER_PROP:Us,PREFIX_AFTER_COLON:zs,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:qe,PREFIX_BEFORE_ALL:Hs,PREFIX_AFTER_ALL:js,BRACKET_OPEN:Vs,BRACKET_CLOSE:si,CURLY_BRACKET_OPEN:Ks,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$s,UNDEFINED:Ae,define:Ye,assign_non_prop_comments:Gs}=se(),li=u=>Xs.tokenize(u,{comment:!0,loc:!0}),Qe=[],V=null,U=null,Ze=[],K,ci=!1,pi=!1,ne=null,ae=null,P=null,fi,ve=null,mi=()=>{Ze.length=Qe.length=0,ae=null,K=Ae},Ws=()=>{mi(),ne.length=0,U=V=ne=ae=P=ve=null},et=u=>Symbol.for(K!==Ae?u+ui+K:u),tt=(u,e)=>ve?ve(u,e):e,di=()=>{let u=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(u,P.loc.start),u},xi=()=>{let u=new SyntaxError("Unexpected end of JSON input");throw Object.assign(u,ae?ae.loc.end:{line:1,column:0}),u},X=()=>{let u=ne[++fi];pi=P&&u&&P.loc.end.line===u.loc.start.line||!1,ae=P,P=u},We=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),G=u=>We()===u,Ee=u=>{G(u)||di()},it=u=>{Qe.push(V),V=u},rt=()=>{V=Qe.pop()},Di=()=>{if(!U)return;let u=[];for(let r of U)if(r.inline)u.push(r);else break;let{length:e}=u;!e||(e===U.length?U=null:U.splice(0,e),Ye(V,et(qe),u))},j=u=>{!U||(Ye(V,et(u),U),U=null)},z=u=>{let e=[];for(;P&&(G("LineComment")||G("BlockComment"));){let r={...P,inline:pi};e.push(r),X()}if(!ci&&!!e.length){if(u){Ye(V,et(u),e);return}U=e}},Ce=(u,e)=>{e&&Ze.push(K),K=u},Ei=()=>{K=Ze.pop()},qs=()=>{let u={};it(u),Ce(Ae,!0);let e=!1,r;for(z();!G(ni)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(ni)));)e=!0,Ee("String"),r=JSON.parse(P.value),Ce(r),j(ge),X(),z(Us),Ee(ui),X(),z(zs),u[r]=tt(r,st()),z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u},Ys=()=>{let u=new Js;it(u),Ce(Ae,!0);let e=!1,r=0;for(z();!G(si)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(si)));)e=!0,Ce(r),j(ge),u[r]=tt(r,st()),r++,z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u};function st(){let u=We();if(u===Ks)return X(),qs();if(u===Vs)return X(),Ys();let e=$s;u===ai&&(X(),u=We(),e=ai);let r;switch(u){case"String":case"Boolean":case"Null":case"Numeric":return r=P.value,X(),JSON.parse(e+r);default:}}var Qs=u=>Object(u)===u,Zs=(u,e,r)=>{mi(),ne=li(u),ve=e,ci=r,ne.length||xi(),fi=-1,X(),it({}),z(Hs);let s=st();return z(js),P&&di(),!r&&s!==null&&(Qs(s)||(s=new Object(s)),Gs(s,V)),rt(),s=tt("",s),Ws(),s};gi.exports={parse:Zs,tokenize:li}});var Ai=_((Gn,Ci)=>{"use strict";var H="",nt;Ci.exports=en;function en(u,e){if(typeof u!="string")throw new TypeError("expected a string");if(e===1)return u;if(e===2)return u+u;var r=u.length*e;if(nt!==u||typeof nt>"u")nt=u,H="";else if(H.length>=r)return H.substr(0,r);for(;r>H.length&&e>1;)e&1&&(H+=u),e>>=1,u+=u;return H+=u,H=H.substr(0,r),H}});var Ii=_((Wn,_i)=>{var{isArray:ut,isObject:yi,isFunction:ot,isNumber:tn,isString:rn}=xe(),sn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:ht,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:R,UNDEFINED:dn}=se(),at=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,lt=" ",W=` +`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];s.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],h.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(h.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!h.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t=55296&&p<57343&&h.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(10),h=r(12),l=r(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new h.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p{function is(u){return Array.isArray?Array.isArray(u):de(u)==="[object Array]"}I.isArray=is;function rs(u){return typeof u=="boolean"}I.isBoolean=rs;function ss(u){return u===null}I.isNull=ss;function ns(u){return u==null}I.isNullOrUndefined=ns;function as(u){return typeof u=="number"}I.isNumber=as;function os(u){return typeof u=="string"}I.isString=os;function us(u){return typeof u=="symbol"}I.isSymbol=us;function hs(u){return u===void 0}I.isUndefined=hs;function ls(u){return de(u)==="[object RegExp]"}I.isRegExp=ls;function cs(u){return typeof u=="object"&&u!==null}I.isObject=cs;function ps(u){return de(u)==="[object Date]"}I.isDate=ps;function fs(u){return de(u)==="[object Error]"||u instanceof Error}I.isError=fs;function ms(u){return typeof u=="function"}I.isFunction=ms;function ds(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||typeof u=="symbol"||typeof u>"u"}I.isPrimitive=ds;I.isBuffer=require("buffer").Buffer.isBuffer;function de(u){return Object.prototype.toString.call(u)}});var Xt=_((Hn,Rt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=u=>u<1e5?u<100?u<10?0:1:u<1e4?u<1e3?2:3:4:u<1e7?u<1e6?5:6:u<1e9?u<1e8?7:8:9;function Pt(u,e){if(u===e)return 0;if(~~u===u&&~~e===e){if(u===0||e===0)return u=0)return-1;if(u>=0)return 1;u=-u,e=-e}let h=It(u),l=It(e),o=0;return hl&&(e*=_t[h-l-1],u/=10,o=1),u===e?o:u=32;)e|=u&1,u>>=1;return u+e}function Ot(u,e,r,s){let h=e+1;if(h===r)return 1;if(s(u[h++],u[e])<0){for(;h=0;)h++;return h-e}function Mt(u,e,r){for(r--;e>>1;h(l,u[p])<0?m=p:D=p+1}let f=s-D;switch(f){case 3:u[D+3]=u[D+2],F[D+3]=F[D+2];case 2:u[D+2]=u[D+1],F[D+2]=F[D+1];case 1:u[D+1]=u[D],F[D+1]=F[D];break;default:for(;f>0;)u[D+f]=u[D+f-1],F[D+f]=F[D+f-1],f--}u[D]=l,F[D]=o}}function Je(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])>0){for(D=s-h;m0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}else{for(D=h+1;mD&&(m=D);let f=o;o=h-m,m=h-f}for(o++;o>>1);l(u,e[r+f])>0?o=f+1:m=f}return m}function Ue(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])<0){for(D=h+1;mD&&(m=D);let f=o;o=h-m,m=h-f}else{for(D=s-h;m=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}for(o++;o>>1);l(u,e[r+f])<0?m=f:o=f+1}return m}var ze=class{constructor(e,r){this.array=e,this.compare=r;let{length:s}=e;this.length=s,this.minGallop=7,this.tmpStorageLength=s<2*256?s>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=s<120?5:s<1542?10:s<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,r){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=r,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),r===1){for(f=0;f=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--r===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--h===1){E=!0;break}while((a|x)=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(r===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--h===1){E=!0;break}if(x=h-Je(o[p],D,0,h,h-1,l),x!==0){for(c-=x,d-=x,h-=x,i=c+1,t=d+1,f=0;f=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),h===1){for(c-=r,p-=r,i=c+1,t=p+1,f=r-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(h===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(h-1),f=0;ff&&(p=f),Lt(u,r,r+p,r+D,e),D=p}m.pushRun(r,D),m.mergeRuns(),o-=D,r+=D}while(o!==0);return m.forceMergeRuns(),F}Rt.exports={sort:Ds}});var Ut=_((jn,Jt)=>{"use strict";var Es=Object.prototype.hasOwnProperty;Jt.exports=(u,e)=>Es.call(u,e)});var se=_((Vn,Qt)=>{var Ve=Ut(),{isObject:zt,isArray:gs,isString:vs,isNumber:Cs}=xe(),Ke="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",As="[",ys="]",Ss="{",Fs="}",ws=",",bs="",ks="-",$e=[Ke,jt,Vt,Kt,$t],Bs=[Ke,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(u,e)=>Symbol.for(u+qt+e),De=(u,e,r)=>Object.defineProperty(u,e,{value:r,writable:!0,configurable:!0}),je=(u,e,r,s,h,l)=>{let o=re(h,s);if(!Ve(e,o))return;let D=r===s?o:re(h,r);De(u,D,e[o]),l&&delete e[o]},Yt=(u,e,r,s,h)=>{$e.forEach(l=>{je(u,e,r,s,l,h)})},Ts=(u,e,r)=>{e!==r&&$e.forEach(s=>{let h=re(s,r);if(!Ve(u,h)){je(u,u,r,e,s,!0);return}let l=u[h];delete u[h],je(u,u,r,e,s,!0),De(u,re(s,e),l)})},He=(u,e)=>{Bs.forEach(r=>{let s=e[r];s&&De(u,r,s)})},Ns=(u,e,r)=>(r.forEach(s=>{!vs(s)&&!Cs(s)||Ve(e,s)&&(u[s]=e[s],Yt(u,e,s,s))}),u);Qt.exports={SYMBOL_PREFIXES:$e,PREFIX_BEFORE:Ke,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:As,BRACKET_CLOSE:ys,CURLY_BRACKET_OPEN:Ss,CURLY_BRACKET_CLOSE:Fs,COLON:qt,COMMA:ws,MINUS:ks,EMPTY:bs,UNDEFINED:Ht,symbol:re,define:De,copy_comments:Yt,swap_comments:Ts,assign_non_prop_comments:He,assign(u,e,r){if(!zt(u))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return u;if(r===Ht)r=Object.keys(e),He(u,e);else if(gs(r))r.length===0&&He(u,e);else throw new TypeError("keys must be array or undefined");return Ns(u,e,r)}}});var Ge=_((Kn,ri)=>{var{isArray:_s}=xe(),{sort:Is}=Xt(),{SYMBOL_PREFIXES:Ps,UNDEFINED:Zt,symbol:Os,copy_comments:Ms,swap_comments:ii}=se(),Ls=u=>{let{length:e}=u,r=0,s=e/2;for(;r{Ms(u,e,r+s,r,h)},Y=(u,e,r,s,h,l)=>{if(h>0){let D=s;for(;D-- >0;)ei(u,e,r+D,h,l);return}let o=0;for(;o{Ps.forEach(r=>{let s=Os(r,e);delete u[s]})},Rs=(u,e)=>{let r=e;for(;r in u;)r=u[r];return r},Q=class extends Array{splice(...e){let{length:r}=this,s=super.splice(...e),[h,l,...o]=e;h<0&&(h+=r),arguments.length===1?l=r-h:l=Math.min(r-h,l);let{length:D}=o,m=D-l,f=h+l,p=r-f;return Y(this,this,f,p,m,!0),s}slice(...e){let{length:r}=this,s=super.slice(...e);if(!s.length)return new Q;let[h,l]=e;return l===Zt?l=r:l<0&&(l+=r),h<0?h+=r:h===Zt&&(h=0),Y(s,this,h,l-h,-h),s}unshift(...e){let{length:r}=this,s=super.unshift(...e),{length:h}=e;return h>0&&Y(this,this,0,r,h,!0),s}shift(){let e=super.shift(),{length:r}=this;return ti(this,0),Y(this,this,1,r,-1,!0),e}reverse(){return super.reverse(),Ls(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:r}=this,s=super.concat(...e);return e.length&&(Y(s,this,0,this.length,0),e.forEach(h=>{let l=r;r+=_s(h)?h.length:1,h instanceof Q&&Y(s,h,0,h.length,l)})),s}sort(...e){let r=Is(this,...e.slice(0,1)),s=Object.create(null);return r.forEach((h,l)=>{if(h===l)return;let o=Rs(s,h);o!==l&&(s[l]=o,ii(this,l,o))}),this}};ri.exports={CommentArray:Q}});var vi=_(($n,gi)=>{var Xs=Nt(),{CommentArray:Js}=Ge(),{PREFIX_BEFORE:ge,PREFIX_AFTER_PROP:Us,PREFIX_AFTER_COLON:zs,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:qe,PREFIX_BEFORE_ALL:Hs,PREFIX_AFTER_ALL:js,BRACKET_OPEN:Vs,BRACKET_CLOSE:si,CURLY_BRACKET_OPEN:Ks,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$s,UNDEFINED:Ae,define:Ye,assign_non_prop_comments:Gs}=se(),li=u=>Xs.tokenize(u,{comment:!0,loc:!0}),Qe=[],V=null,U=null,Ze=[],K,ci=!1,pi=!1,ne=null,ae=null,P=null,fi,ve=null,mi=()=>{Ze.length=Qe.length=0,ae=null,K=Ae},Ws=()=>{mi(),ne.length=0,U=V=ne=ae=P=ve=null},et=u=>Symbol.for(K!==Ae?u+ui+K:u),tt=(u,e)=>ve?ve(u,e):e,di=()=>{let u=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(u,P.loc.start),u},xi=()=>{let u=new SyntaxError("Unexpected end of JSON input");throw Object.assign(u,ae?ae.loc.end:{line:1,column:0}),u},X=()=>{let u=ne[++fi];pi=P&&u&&P.loc.end.line===u.loc.start.line||!1,ae=P,P=u},We=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),G=u=>We()===u,Ee=u=>{G(u)||di()},it=u=>{Qe.push(V),V=u},rt=()=>{V=Qe.pop()},Di=()=>{if(!U)return;let u=[];for(let r of U)if(r.inline)u.push(r);else break;let{length:e}=u;e&&(e===U.length?U=null:U.splice(0,e),Ye(V,et(qe),u))},j=u=>{U&&(Ye(V,et(u),U),U=null)},z=u=>{let e=[];for(;P&&(G("LineComment")||G("BlockComment"));){let r={...P,inline:pi};e.push(r),X()}if(!ci&&e.length){if(u){Ye(V,et(u),e);return}U=e}},Ce=(u,e)=>{e&&Ze.push(K),K=u},Ei=()=>{K=Ze.pop()},qs=()=>{let u={};it(u),Ce(Ae,!0);let e=!1,r;for(z();!G(ni)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(ni)));)e=!0,Ee("String"),r=JSON.parse(P.value),Ce(r),j(ge),X(),z(Us),Ee(ui),X(),z(zs),u[r]=tt(r,st()),z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u},Ys=()=>{let u=new Js;it(u),Ce(Ae,!0);let e=!1,r=0;for(z();!G(si)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(si)));)e=!0,Ce(r),j(ge),u[r]=tt(r,st()),r++,z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u};function st(){let u=We();if(u===Ks)return X(),qs();if(u===Vs)return X(),Ys();let e=$s;u===ai&&(X(),u=We(),e=ai);let r;switch(u){case"String":case"Boolean":case"Null":case"Numeric":return r=P.value,X(),JSON.parse(e+r);default:}}var Qs=u=>Object(u)===u,Zs=(u,e,r)=>{mi(),ne=li(u),ve=e,ci=r,ne.length||xi(),fi=-1,X(),it({}),z(Hs);let s=st();return z(js),P&&di(),!r&&s!==null&&(Qs(s)||(s=new Object(s)),Gs(s,V)),rt(),s=tt("",s),Ws(),s};gi.exports={parse:Zs,tokenize:li}});var Ai=_((Gn,Ci)=>{"use strict";var H="",nt;Ci.exports=en;function en(u,e){if(typeof u!="string")throw new TypeError("expected a string");if(e===1)return u;if(e===2)return u+u;var r=u.length*e;if(nt!==u||typeof nt>"u")nt=u,H="";else if(H.length>=r)return H.substr(0,r);for(;r>H.length&&e>1;)e&1&&(H+=u),e>>=1,u+=u;return H+=u,H=H.substr(0,r),H}});var Ii=_((Wn,_i)=>{var{isArray:ut,isObject:yi,isFunction:ot,isNumber:tn,isString:rn}=xe(),sn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:ht,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:R,UNDEFINED:dn}=se(),at=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,lt=" ",W=` `,wi="null",bi=u=>`${Si}:${u}`,xn=u=>`${an}:${u}`,Dn=u=>`${on}:${u}`,ki=u=>`${un}:${u}`,Bi=u=>`${ht}:${u}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=u=>(at.lastIndex=0,at.test(u)?u.replace(at,e=>{let r=En[e];return typeof r=="string"?r:e}):u),Ti=u=>`"${gn(u)}"`,vn=(u,e)=>e?`//${u}`:`/*${u}*/`,L=(u,e,r,s)=>{let h=u[Symbol.for(e)];if(!h||!h.length)return R;let l=!1,o=h.reduce((D,{inline:m,type:f,value:p})=>{let d=m?lt:W+r;return l=f==="LineComment",D+d+vn(p,l)},R);return s||l?o+W+r:o},Z=null,ue=R,Cn=()=>{Z=null,ue=R},oe=(u,e,r)=>u?e?u+e.trim()+W+r:u.trimRight()+W+r:e?e.trimRight()+W+r:R,Ni=(u,e,r)=>{let s=L(e,Si,r+ue,!0);return oe(s,u,r)},An=(u,e)=>{let r=e+ue,{length:s}=u,h=R,l=R;for(let o=0;o{if(!u)return"null";let r=e+ue,s=R,h=R,l=!0,o=ut(Z)?Z:Object.keys(u),D=m=>{let f=ct(m,u,r);if(f===dn)return;l||(s+=Fi),l=!1;let p=oe(h,L(u,bi(m),r),r);s+=p||W+r,s+=Ti(m)+L(u,xn(m),r)+mn+L(u,Dn(m),r)+lt+f+L(u,ki(m),r),h=L(u,Bi(m),r)};return o.forEach(D),s+=oe(h,L(u,ht,r),r),pn+Ni(s,u,e)+fn};function ct(u,e,r){let s=e[u];switch(yi(s)&&ot(s.toJSON)&&(s=s.toJSON(u)),ot(Z)&&(s=Z.call(e,u,s)),typeof s){case"string":return Ti(s);case"number":return Number.isFinite(s)?String(s):wi;case"boolean":case"null":return String(s);case"object":return ut(s)?An(s,r):yn(s,r);default:}}var Sn=u=>rn(u)?u:tn(u)?sn(lt,u):R,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=u=>{if(typeof u!="object")return!1;let e=Fn.call(u);return wn.includes(e)};_i.exports=(u,e,r)=>{let s=Sn(r);if(!s)return JSON.stringify(u,e);!ot(e)&&!ut(e)&&(e=null),Z=e,ue=s;let h=bn(u)?JSON.stringify(u):ct("",{"":u},R);return Cn(),yi(u)?L(u,nn,R).trimLeft()+h+L(u,hn,R).trimRight():h}});var Oi=_((qn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=Ge(),{assign:_n}=se();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var pe=Dt(Tt());var le=Dt(Oi()),ce=require("fs/promises"),he=require("path");var In=new Set(["@hcengineering/prod","@hcengineering/pod-front","@hcengineering/pod-server","@hcengineering/pod-account"]);function Pn(u){return e=>!e.projectFolder.startsWith(u)}async function Mi(u,e){let r=(0,le.parse)((await(0,ce.readFile)((0,he.join)(u,e,"rush.json"))).toString()),s=(0,he.join)(u,"rush.json"),h=(0,he.join)(u,"rush_source.json"),l=(0,le.parse)((await(0,ce.readFile)(h)).toString()),o=r.projects.filter(f=>!In.has(f.packageName)),m=l.projects.filter(Pn(e));m.push(...o.map(f=>xt(dt({},f),{projectFolder:(0,he.join)(e,f.projectFolder),shouldPublish:!1}))),l.projects=m,await(0,ce.writeFile)(s,(0,le.stringify)(l,void 0,2))}async function Li(u,e){}console.info("Anticrm Platform Manager");pe.program.version("0.6.0");pe.program.command("rush-sync ").description("Synchronized rush.js files with platform.").action(async(u,e)=>{await Mi(process.cwd(),u)});pe.program.command("template-apply ").description("Create necessary startup packages").requiredOption("--root ","user password","platform").action(async(u,e)=>{await Li(process.cwd(),u)});pe.program.parse(process.argv); -/*! - * repeat-string - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ +/*! Bundled license information: + +repeat-string/index.js: + (*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + *) +*/