mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 19:44:59 +03:00
41650925c0
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
35 lines
180 KiB
JavaScript
35 lines
180 KiB
JavaScript
"use strict";var ws=Object.create;var pt=Object.defineProperty;var bs=Object.getOwnPropertyDescriptor;var ks=Object.getOwnPropertyNames;var Bs=Object.getPrototypeOf,Ts=Object.prototype.hasOwnProperty;var _=(h,e)=>()=>(e||h((e={exports:{}}).exports,e),e.exports);var Ns=(h,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of ks(e))!Ts.call(h,u)&&u!==s&&pt(h,u,{get:()=>e[u],enumerable:!(r=bs(e,u))||r.enumerable});return h};var Fe=(h,e,s)=>(s=h!=null?ws(Bs(h)):{},Ns(e||!h||!h.__esModule?pt(s,"default",{value:h,enumerable:!0}):s,h));var te=_(be=>{var pe=class extends Error{constructor(e,s,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=s,this.exitCode=e,this.nestedError=void 0}},we=class extends pe{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};be.CommanderError=pe;be.InvalidArgumentError=we});var fe=_(Be=>{var{InvalidArgumentError:_s}=te(),ke=class{constructor(e,s){switch(this.description=s||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,s){return s===this.defaultValue||!Array.isArray(s)?[e]:s.concat(e)}default(e,s){return this.defaultValue=e,this.defaultValueDescription=s,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e,this.parseArg=(s,r)=>{if(!e.includes(s))throw new _s(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(s,r):s},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Is(h){let e=h.name()+(h.variadic===!0?"...":"");return h.required?"<"+e+">":"["+e+"]"}Be.Argument=ke;Be.humanReadableArgName=Is});var Ne=_(ft=>{var{humanReadableArgName:Ps}=fe(),Te=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){let s=e.commands.filter(r=>!r._hidden);if(e._hasImplicitHelpCommand()){let[,r,u]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),l=e.createCommand(r).helpOption(!1);l.description(e._helpCommandDescription),u&&l.arguments(u),s.push(l)}return this.sortSubcommands&&s.sort((r,u)=>r.name().localeCompare(u.name())),s}visibleOptions(e){let s=e.options.filter(l=>!l.hidden),r=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),u=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(r||u){let l;r?u?l=e.createOption(e._helpFlags,e._helpDescription):l=e.createOption(e._helpShortFlag,e._helpDescription):l=e.createOption(e._helpLongFlag,e._helpDescription),s.push(l)}if(this.sortOptions){let l=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");s.sort((o,D)=>l(o).localeCompare(l(D)))}return s}visibleArguments(e){return e._argsDescription&&e._args.forEach(s=>{s.description=s.description||e._argsDescription[s.name()]||""}),e._args.find(s=>s.description)?e._args:[]}subcommandTerm(e){let s=e._args.map(r=>Ps(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(s?" "+s:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,s){return s.visibleCommands(e).reduce((r,u)=>Math.max(r,s.subcommandTerm(u).length),0)}longestOptionTermLength(e,s){return s.visibleOptions(e).reduce((r,u)=>Math.max(r,s.optionTerm(u).length),0)}longestArgumentTermLength(e,s){return s.visibleArguments(e).reduce((r,u)=>Math.max(r,s.argumentTerm(u).length),0)}commandUsage(e){let s=e._name;e._aliases[0]&&(s=s+"|"+e._aliases[0]);let r="";for(let u=e.parent;u;u=u.parent)r=u.name()+" "+r;return r+s+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.description()}optionDescription(e){let s=[];return e.argChoices&&!e.negate&&s.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&!e.negate&&s.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.envVar!==void 0&&s.push(`env: ${e.envVar}`),s.length>0?`${e.description} (${s.join(", ")})`:e.description}argumentDescription(e){let s=[];if(e.argChoices&&s.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&s.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),s.length>0){let r=`(${s.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,s){let r=s.padWidth(e,s),u=s.helpWidth||80,l=2,o=2;function D(i,n){if(n){let a=`${i.padEnd(r+o)}${n}`;return s.wrap(a,u-l,r+o)}return i}function m(i){return i.join(`
|
|
`).replace(/^/gm," ".repeat(l))}let f=[`Usage: ${s.commandUsage(e)}`,""],p=s.commandDescription(e);p.length>0&&(f=f.concat([p,""]));let d=s.visibleArguments(e).map(i=>D(s.argumentTerm(i),s.argumentDescription(i)));d.length>0&&(f=f.concat(["Arguments:",m(d),""]));let c=s.visibleOptions(e).map(i=>D(s.optionTerm(i),s.optionDescription(i)));c.length>0&&(f=f.concat(["Options:",m(c),""]));let t=s.visibleCommands(e).map(i=>D(s.subcommandTerm(i),s.subcommandDescription(i)));return t.length>0&&(f=f.concat(["Commands:",m(t),""])),f.join(`
|
|
`)}padWidth(e,s){return Math.max(s.longestOptionTermLength(e,s),s.longestSubcommandTermLength(e,s),s.longestArgumentTermLength(e,s))}wrap(e,s,r,u=40){if(e.match(/[\n]\s+/))return e;let l=s-r;if(l<u)return e;let o=e.substr(0,r),D=e.substr(r),m=" ".repeat(r),f=new RegExp(".{1,"+(l-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g"),p=D.match(f)||[];return o+p.map((d,c)=>(d.slice(-1)===`
|
|
`&&(d=d.slice(0,d.length-1)),(c>0?m:"")+d.trimRight())).join(`
|
|
`)}};ft.Help=Te});var Pe=_(Ie=>{var{InvalidArgumentError:Os}=te(),_e=class{constructor(e,s){this.flags=e,this.description=s||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=mt(e);this.short=r.shortFlag,this.long=r.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,s){return this.defaultValue=e,this.defaultValueDescription=s,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,s){return s===this.defaultValue||!Array.isArray(s)?[e]:s.concat(e)}choices(e){return this.argChoices=e,this.parseArg=(s,r)=>{if(!e.includes(s))throw new Os(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(s,r):s},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Ms(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}};function Ms(h){return h.split("-").reduce((e,s)=>e+s[0].toUpperCase()+s.slice(1))}function mt(h){let e,s,r=h.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(e=r.shift()),s=r.shift(),!e&&/^-[^-]$/.test(s)&&(e=s,s=void 0),{shortFlag:e,longFlag:s}}Ie.Option=_e;Ie.splitOptionFlags=mt});var xt=_(dt=>{function Ls(h,e){if(Math.abs(h.length-e.length)>3)return Math.max(h.length,e.length);let s=[];for(let r=0;r<=h.length;r++)s[r]=[r];for(let r=0;r<=e.length;r++)s[0][r]=r;for(let r=1;r<=e.length;r++)for(let u=1;u<=h.length;u++){let l=1;h[u-1]===e[r-1]?l=0:l=1,s[u][r]=Math.min(s[u-1][r]+1,s[u][r-1]+1,s[u-1][r-1]+l),u>1&&r>1&&h[u-1]===e[r-2]&&h[u-2]===e[r-1]&&(s[u][r]=Math.min(s[u][r],s[u-2][r-2]+1))}return s[h.length][e.length]}function Xs(h,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let s=h.startsWith("--");s&&(h=h.slice(2),e=e.map(o=>o.slice(2)));let r=[],u=3,l=.4;return e.forEach(o=>{if(o.length<=1)return;let D=Ls(h,o),m=Math.max(h.length,o.length);(m-D)/m>l&&(D<u?(u=D,r=[o]):D===u&&r.push(o))}),r.sort((o,D)=>o.localeCompare(D)),s&&(r=r.map(o=>`--${o}`)),r.length>1?`
|
|
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
|
(Did you mean ${r[0]}?)`:""}dt.suggestSimilar=Xs});var Ct=_(vt=>{var Rs=require("events").EventEmitter,Oe=require("child_process"),G=require("path"),Me=require("fs"),{Argument:Js,humanReadableArgName:Us}=fe(),{CommanderError:Le}=te(),{Help:zs}=Ne(),{Option:Hs,splitOptionFlags:js}=Pe(),{suggestSimilar:Dt}=xt(),ie=class extends Rs{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:s=>process.stdout.write(s),writeErr:s=>process.stderr.write(s),getOutHelpWidth:()=>process.stdout.isTTY?process.stdout.columns:void 0,getErrHelpWidth:()=>process.stderr.isTTY?process.stderr.columns:void 0,outputError:(s,r)=>r(s)},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,s,r){let u=s,l=r;typeof u=="object"&&u!==null&&(l=u,u=null),l=l||{};let[,o,D]=e.match(/([^ ]+) *(.*)/),m=this.createCommand(o);return u&&(m.description(u),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),u?this:m}createCommand(e){return new ie(e)}createHelp(){return Object.assign(new zs,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,s){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function r(u){u.forEach(l=>{if(l._executableHandler&&!l._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${l.name()}`);r(l.commands)})}return r(e.commands),s=s||{},s.isDefault&&(this._defaultCommandName=e._name),(s.noHelp||s.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,s){return new Js(e,s)}argument(e,s,r,u){let l=this.createArgument(e,s);return typeof r=="function"?l.default(u).argParser(r):l.default(r),this.addArgument(l),this}arguments(e){return e.split(/ +/).forEach(s=>{this.argument(s)}),this}addArgument(e){let s=this._args.slice(-1)[0];if(s&&s.variadic)throw new Error(`only the last argument can be variadic '${s.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,s){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=s||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,s){let r=["preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(s):this._lifeCycleHooks[e]=[s],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=s=>{if(s.code!=="commander.executeSubCommandAsync")throw s},this}_exit(e,s,r){this._exitCallback&&this._exitCallback(new Le(e,s,r)),process.exit(e)}action(e){let s=r=>{let u=this._args.length,l=r.slice(0,u);return this._storeOptionsAsProperties?l[u]=this:l[u]=this.opts(),l.push(this),e.apply(this,l)};return this._actionHandler=s,this}createOption(e,s){return new Hs(e,s)}addOption(e){let s=e.name(),r=e.attributeName(),u=e.defaultValue;if(e.negate||e.optional||e.required||typeof u=="boolean"){if(e.negate){let o=e.long.replace(/^--no-/,"--");u=this._findOption(o)?this.getOptionValue(r):!0}u!==void 0&&this.setOptionValueWithSource(r,u,"default")}this.options.push(e);let l=(o,D,m)=>{let f=this.getOptionValue(r);if(o!==null&&e.parseArg)try{o=e.parseArg(o,f===void 0?u: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(r,e.negate?!1:u||!0,m):this.setOptionValueWithSource(r,o,m):o!==null&&this.setOptionValueWithSource(r,e.negate?!1:o,m)};return this.on("option:"+s,o=>{let D=`error: option '${e.flags}' argument '${o}' is invalid.`;l(o,D,"cli")}),e.envVar&&this.on("optionEnv:"+s,o=>{let D=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;l(o,D,"env")}),this}_optionEx(e,s,r,u,l){let o=this.createOption(s,r);if(o.makeOptionMandatory(!!e.mandatory),typeof u=="function")o.default(l).argParser(u);else if(u instanceof RegExp){let D=u;u=(m,f)=>{let p=D.exec(m);return p?p[0]:f},o.default(l).argParser(u)}else o.default(u);return this.addOption(o)}option(e,s,r,u){return this._optionEx({},e,s,r,u)}requiredOption(e,s,r,u){return this._optionEx({mandatory:!0},e,s,r,u)}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,s){return this._storeOptionsAsProperties?this[e]=s:this._optionValues[e]=s,this}setOptionValueWithSource(e,s,r){return this.setOptionValue(e,s),this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,s){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");s=s||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(s.from="electron")),this.rawArgs=e.slice();let r;switch(s.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${s.from}' }`)}return!this._scriptPath&&require.main&&(this._scriptPath=require.main.filename),this._name=this._name||this._scriptPath&&G.basename(this._scriptPath,G.extname(this._scriptPath)),r}parse(e,s){let r=this._prepareUserArgs(e,s);return this._parseCommand([],r),this}async parseAsync(e,s){let r=this._prepareUserArgs(e,s);return await this._parseCommand([],r),this}_executeSubCommand(e,s){s=s.slice();let r=!1,u=[".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=G.dirname(c)}catch{o="."}let D=G.basename(l,G.extname(l))+"-"+e._name;e._executableFile&&(D=e._executableFile);let m=G.join(o,D);Me.existsSync(m)?D=m:u.forEach(c=>{Me.existsSync(`${m}${c}`)&&(D=`${m}${c}`)}),r=u.includes(G.extname(D));let f;process.platform!=="win32"?r?(s.unshift(D),s=gt(process.execArgv).concat(s),f=Oe.spawn(process.argv[0],s,{stdio:"inherit"})):f=Oe.spawn(D,s,{stdio:"inherit"}):(s.unshift(D),s=gt(process.execArgv).concat(s),f=Oe.spawn(process.execPath,s,{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,s,r){let u=this._findCommand(e);if(u||this.help({error:!0}),u._executableHandler)this._executeSubCommand(u,s.concat(r));else return u._parseCommand(s,r)}_checkNumberOfArguments(){this._args.forEach((e,s)=>{e.required&&this.args[s]==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=(r,u,l)=>{let o=u;if(u!==null&&r.parseArg)try{o=r.parseArg(u,l)}catch(D){if(D.code==="commander.invalidArgument"){let m=`error: command-argument value '${u}' is invalid for argument '${r.name()}'. ${D.message}`;this._displayError(D.exitCode,D.code,m)}throw D}return o};this._checkNumberOfArguments();let s=[];this._args.forEach((r,u)=>{let l=r.defaultValue;r.variadic?u<this.args.length?(l=this.args.slice(u),r.parseArg&&(l=l.reduce((o,D)=>e(r,D,o),r.defaultValue))):l===void 0&&(l=[]):u<this.args.length&&(l=this.args[u],r.parseArg&&(l=e(r,l,r.defaultValue))),s[u]=l}),this.processedArgs=s}_chainOrCall(e,s){return e&&e.then&&typeof e.then=="function"?e.then(()=>s()):s()}_chainOrCallHooks(e,s){let r=e,u=[];return Xe(this).reverse().filter(l=>l._lifeCycleHooks[s]!==void 0).forEach(l=>{l._lifeCycleHooks[s].forEach(o=>{u.push({hookedCommand:l,callback:o})})}),s==="postAction"&&u.reverse(),u.forEach(l=>{r=this._chainOrCall(r,()=>l.callback(l.hookedCommand,this))}),r}_parseCommand(e,s){let r=this.parseOptions(s);if(this._parseOptionsEnv(),e=e.concat(r.operands),s=r.unknown,this.args=e.concat(s),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),s);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return Et(this,s),this._dispatchSubcommand(this._defaultCommandName,e,s);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),Et(this,r.unknown),this._checkForMissingMandatoryOptions();let u=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},l=`command:${this.name()}`;if(this._actionHandler){u(),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,s),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(l))u(),this._processArguments(),this.parent.emit(l,e,s);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,s);this.listenerCount("command:*")?this.emit("command:*",e,s):this.commands.length?this.unknownCommand():(u(),this._processArguments())}else this.commands.length?(u(),this.help({error:!0})):(u(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(s=>s._name===e||s._aliases.includes(e))}_findOption(e){return this.options.find(s=>s.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(s=>{s.mandatory&&e.getOptionValue(s.attributeName())===void 0&&e.missingMandatoryOptionValue(s)})}parseOptions(e){let s=[],r=[],u=s,l=e.slice();function o(m){return m.length>1&&m[0]==="-"}let D=null;for(;l.length;){let m=l.shift();if(m==="--"){u===r&&u.push(m),u.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)&&(u=r),(this._enablePositionalOptions||this._passThroughOptions)&&s.length===0&&r.length===0){if(this._findCommand(m)){s.push(m),l.length>0&&r.push(...l);break}else if(m===this._helpCommandName&&this._hasImplicitHelpCommand()){s.push(m),l.length>0&&s.push(...l);break}else if(this._defaultCommandName){r.push(m),l.length>0&&r.push(...l);break}}if(this._passThroughOptions){u.push(m),l.length>0&&u.push(...l);break}u.push(m)}return{operands:s,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},s=this.options.length;for(let r=0;r<s;r++){let u=this.options[r].attributeName();e[u]=u===this._versionOptionName?this._version:this[u]}return e}return this._optionValues}_displayError(e,s,r){this._outputConfiguration.outputError(`${r}
|
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
`),this.outputHelp({error:!0})),this._exit(e,s,r)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in process.env){let s=e.attributeName();(this.getOptionValue(s)===void 0||["default","config","env"].includes(this.getOptionValueSource(s)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,process.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}missingArgument(e){let s=`error: missing required argument '${e}'`;this._displayError(1,"commander.missingArgument",s)}optionMissingArgument(e){let s=`error: option '${e.flags}' argument missing`;this._displayError(1,"commander.optionMissingArgument",s)}missingMandatoryOptionValue(e){let s=`error: required option '${e.flags}' not specified`;this._displayError(1,"commander.missingMandatoryOptionValue",s)}unknownOption(e){if(this._allowUnknownOption)return;let s="";if(e.startsWith("--")&&this._showSuggestionAfterError){let u=[],l=this;do{let o=l.createHelp().visibleOptions(l).filter(D=>D.long).map(D=>D.long);u=u.concat(o),l=l.parent}while(l&&!l._enablePositionalOptions);s=Dt(e,u)}let r=`error: unknown option '${e}'${s}`;this._displayError(1,"commander.unknownOption",r)}_excessArguments(e){if(this._allowExcessArguments)return;let s=this._args.length,r=s===1?"":"s",l=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${s} argument${r} but got ${e.length}.`;this._displayError(1,"commander.excessArguments",l)}unknownCommand(){let e=this.args[0],s="";if(this._showSuggestionAfterError){let u=[];this.createHelp().visibleCommands(this).forEach(l=>{u.push(l.name()),l.alias()&&u.push(l.alias())}),s=Dt(e,u)}let r=`error: unknown command '${e}'${s}`;this._displayError(1,"commander.unknownCommand",r)}version(e,s,r){if(e===void 0)return this._version;this._version=e,s=s||"-V, --version",r=r||"output the version number";let u=this.createOption(s,r);return this._versionOptionName=u.attributeName(),this.options.push(u),this.on("option:"+u.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
`),this._exit(0,"commander.version",e)}),this}description(e,s){return e===void 0&&s===void 0?this._description:(this._description=e,s&&(this._argsDescription=s),this)}alias(e){if(e===void 0)return this._aliases[0];let s=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(s=this.commands[this.commands.length-1]),e===s._name)throw new Error("Command alias can't be the same as its name");return s._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(s=>this.alias(s)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let s=this._args.map(r=>Us(r));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?s:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpInformation(e){let s=this.createHelp();return s.helpWidth===void 0&&(s.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),s.formatHelp(this,s)}_getHelpContext(e){e=e||{};let s={error:!!e.error},r;return s.error?r=u=>this._outputConfiguration.writeErr(u):r=u=>this._outputConfiguration.writeOut(u),s.write=e.write||r,s.command=this,s}outputHelp(e){let s;typeof e=="function"&&(s=e,e=void 0);let r=this._getHelpContext(e);Xe(this).reverse().forEach(l=>l.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let u=this.helpInformation(r);if(s&&(u=s(u),typeof u!="string"&&!Buffer.isBuffer(u)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(u),this.emit(this._helpLongFlag),this.emit("afterHelp",r),Xe(this).forEach(l=>l.emit("afterAllHelp",r))}helpOption(e,s){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=s||this._helpDescription;let r=js(this._helpFlags);return this._helpShortFlag=r.shortFlag,this._helpLongFlag=r.longFlag,this}help(e){this.outputHelp(e);let s=process.exitCode||0;s===0&&e&&typeof e!="function"&&e.error&&(s=1),this._exit(s,"commander.help","(outputHelp)")}addHelpText(e,s){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
Expecting one of '${r.join("', '")}'`);let u=`${e}Help`;return this.on(u,l=>{let o;typeof s=="function"?o=s({error:l.error,command:l.command}):o=s,o&&l.write(`${o}
|
|
`)}),this}};function Et(h,e){h._hasHelpOption&&e.find(r=>r===h._helpLongFlag||r===h._helpShortFlag)&&(h.outputHelp(),h._exit(0,"commander.helpDisplayed","(outputHelp)"))}function gt(h){return h.map(e=>{if(!e.startsWith("--inspect"))return e;let s,r="127.0.0.1",u="9229",l;return(l=e.match(/^(--inspect(-brk)?)$/))!==null?s=l[1]:(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(s=l[1],/^\d+$/.test(l[3])?u=l[3]:r=l[3]):(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(s=l[1],r=l[3],u=l[4]),s&&u!=="0"?`${s}=${r}:${parseInt(u)+1}`:e})}function Xe(h){let e=[];for(let s=h;s;s=s.parent)e.push(s);return e}vt.Command=ie});var Ft=_((U,St)=>{var{Argument:Vs}=fe(),{Command:At}=Ct(),{CommanderError:Ks,InvalidArgumentError:yt}=te(),{Help:$s}=Ne(),{Option:Gs}=Pe();U=St.exports=new At;U.program=U;U.Argument=Vs;U.Command=At;U.CommanderError=Ks;U.Help=$s;U.InvalidArgumentError=yt;U.InvalidOptionArgumentError=yt;U.Option=Gs});var wt=_((se,Re)=>{(function(e,s){typeof se=="object"&&typeof Re=="object"?Re.exports=s():typeof define=="function"&&define.amd?define([],s):typeof se=="object"?se.esprima=s():e.esprima=s()})(se,function(){return function(h){var e={};function s(r){if(e[r])return e[r].exports;var u=e[r]={exports:{},id:r,loaded:!1};return h[r].call(u.exports,u,u.exports,s),u.loaded=!0,u.exports}return s.m=h,s.c=e,s.p="",s(0)}([function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(1),u=s(3),l=s(8),o=s(15);function D(c,t,i){var n=null,a=function(B,T){i&&i(B,T),n&&n.visit(B,T)},x=typeof i=="function"?a:null,E=!1;if(t){E=typeof t.comment=="boolean"&&t.comment;var C=typeof t.attachComment=="boolean"&&t.attachComment;(E||C)&&(n=new r.CommentHandler,n.attach=C,t.comment=!0,x=a)}var y=!1;t&&typeof t.sourceType=="string"&&(y=t.sourceType==="module");var S;t&&typeof t.jsx=="boolean"&&t.jsx?S=new u.JSXParser(c,t,x):S=new l.Parser(c,t,x);var w=y?S.parseModule():S.parseScript(),b=w;return E&&n&&(b.comments=n.comments),S.config.tokens&&(b.tokens=S.tokens),S.config.tolerant&&(b.errors=S.errorHandler.errors),b}e.parse=D;function m(c,t,i){var n=t||{};return n.sourceType="module",D(c,n,i)}e.parseModule=m;function f(c,t,i){var n=t||{};return n.sourceType="script",D(c,n,i)}e.parseScript=f;function p(c,t,i){var n=new o.Tokenizer(c,t),a;a=[];try{for(;;){var x=n.getNextToken();if(!x)break;i&&(x=i(x)),a.push(x)}}catch(E){n.errorHandler.tolerate(E)}return n.errorHandler.tolerant&&(a.errors=n.errors()),a}e.tokenize=p;var d=s(2);e.Syntax=d.Syntax,e.version="4.0.1"},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(2),u=function(){function l(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return l.prototype.insertInnerComments=function(o,D){if(o.type===r.Syntax.BlockStatement&&o.body.length===0){for(var m=[],f=this.leading.length-1;f>=0;--f){var p=this.leading[f];D.end.offset>=p.start&&(m.unshift(p.comment),this.leading.splice(f,1),this.trailing.splice(f,1))}m.length&&(o.innerComments=m)}},l.prototype.findTrailingComments=function(o){var D=[];if(this.trailing.length>0){for(var m=this.trailing.length-1;m>=0;--m){var f=this.trailing[m];f.start>=o.end.offset&&D.unshift(f.comment)}return this.trailing.length=0,D}var p=this.stack[this.stack.length-1];if(p&&p.node.trailingComments){var d=p.node.trailingComments[0];d&&d.range[0]>=o.end.offset&&(D=p.node.trailingComments,delete p.node.trailingComments)}return D},l.prototype.findLeadingComments=function(o){for(var D=[],m;this.stack.length>0;){var f=this.stack[this.stack.length-1];if(f&&f.start>=o.start.offset)m=f.node,this.stack.pop();else break}if(m){for(var p=m.leadingComments?m.leadingComments.length:0,d=p-1;d>=0;--d){var c=m.leadingComments[d];c.range[1]<=o.start.offset&&(D.unshift(c),m.leadingComments.splice(d,1))}return m.leadingComments&&m.leadingComments.length===0&&delete m.leadingComments,D}for(var d=this.leading.length-1;d>=0;--d){var f=this.leading[d];f.start<=o.start.offset&&(D.unshift(f.comment),this.leading.splice(d,1))}return D},l.prototype.visitNode=function(o,D){if(!(o.type===r.Syntax.Program&&o.body.length>0)){this.insertInnerComments(o,D);var m=this.findTrailingComments(D),f=this.findLeadingComments(D);f.length>0&&(o.leadingComments=f),m.length>0&&(o.trailingComments=m),this.stack.push({node:o,start:D.start.offset})}},l.prototype.visitComment=function(o,D){var m=o.type[0]==="L"?"Line":"Block",f={type:m,value:o.value};if(o.range&&(f.range=o.range),o.loc&&(f.loc=o.loc),this.comments.push(f),this.attach){var p={comment:{type:m,value:o.value,range:[D.start.offset,D.end.offset]},start:D.start.offset};o.loc&&(p.comment.loc=o.loc),o.type=m,this.leading.push(p),this.trailing.push(p)}},l.prototype.visit=function(o,D){o.type==="LineComment"?this.visitComment(o,D):o.type==="BlockComment"?this.visitComment(o,D):this.attach&&this.visitNode(o,D)},l}();e.CommentHandler=u},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(h,e,s){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])};return function(i,n){t(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0});var u=s(4),l=s(5),o=s(6),D=s(7),m=s(8),f=s(13),p=s(14);f.TokenName[100]="JSXIdentifier",f.TokenName[101]="JSXText";function d(t){var i;switch(t.type){case o.JSXSyntax.JSXIdentifier:var n=t;i=n.name;break;case o.JSXSyntax.JSXNamespacedName:var a=t;i=d(a.namespace)+":"+d(a.name);break;case o.JSXSyntax.JSXMemberExpression:var x=t;i=d(x.object)+"."+d(x.property);break;default:break}return i}var c=function(t){r(i,t);function i(n,a,x){return t.call(this,n,a,x)||this}return i.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},i.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},i.prototype.finishJSX=function(){this.nextToken()},i.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},i.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.scanXHTMLEntity=function(n){for(var a="&",x=!0,E=!1,C=!1,y=!1;!this.scanner.eof()&&x&&!E;){var S=this.scanner.source[this.scanner.index];if(S===n)break;if(E=S===";",a+=S,++this.scanner.index,!E)switch(a.length){case 2:C=S==="#";break;case 3:C&&(y=S==="x",x=y||u.Character.isDecimalDigit(S.charCodeAt(0)),C=C&&!y);break;default:x=x&&!(C&&!u.Character.isDecimalDigit(S.charCodeAt(0))),x=x&&!(y&&!u.Character.isHexDigit(S.charCodeAt(0)));break}}if(x&&E&&a.length>2){var w=a.substr(1,a.length-2);C&&w.length>1?a=String.fromCharCode(parseInt(w.substr(1),10)):y&&w.length>2?a=String.fromCharCode(parseInt("0"+w.substr(1),16)):!C&&!y&&p.XHTMLEntities[w]&&(a=p.XHTMLEntities[w])}return a},i.prototype.lexJSX=function(){var n=this.scanner.source.charCodeAt(this.scanner.index);if(n===60||n===62||n===47||n===58||n===61||n===123||n===125){var a=this.scanner.source[this.scanner.index++];return{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(n===34||n===39){for(var x=this.scanner.index,E=this.scanner.source[this.scanner.index++],C="";!this.scanner.eof();){var y=this.scanner.source[this.scanner.index++];if(y===E)break;y==="&"?C+=this.scanXHTMLEntity(E):C+=y}return{type:8,value:C,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===46){var S=this.scanner.source.charCodeAt(this.scanner.index+1),w=this.scanner.source.charCodeAt(this.scanner.index+2),a=S===46&&w===46?"...":".",x=this.scanner.index;return this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(u.Character.isIdentifierStart(n)&&n!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var y=this.scanner.source.charCodeAt(this.scanner.index);if(u.Character.isIdentifierPart(y)&&y!==92)++this.scanner.index;else if(y===45)++this.scanner.index;else break}var b=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:b,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},i.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var n=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(n)),n},i.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var n=this.scanner.index,a="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,a+=x,u.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===`
|
|
`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var E={type:101,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index};return a.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(E)),E},i.prototype.peekJSXToken=function(){var n=this.scanner.saveState();this.scanner.scanComments();var a=this.lexJSX();return this.scanner.restoreState(n),a},i.prototype.expectJSX=function(n){var a=this.nextJSXToken();(a.type!==7||a.value!==n)&&this.throwUnexpectedToken(a)},i.prototype.matchJSX=function(n){var a=this.peekJSXToken();return a.type===7&&a.value===n},i.prototype.parseJSXIdentifier=function(){var n=this.createJSXNode(),a=this.nextJSXToken();return a.type!==100&&this.throwUnexpectedToken(a),this.finalize(n,new l.JSXIdentifier(a.value))},i.prototype.parseJSXElementName=function(){var n=this.createJSXNode(),a=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=a;this.expectJSX(":");var E=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(x,E))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var C=a;this.expectJSX(".");var y=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXMemberExpression(C,y))}return a},i.prototype.parseJSXAttributeName=function(){var n=this.createJSXNode(),a,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var E=x;this.expectJSX(":");var C=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(E,C))}else a=x;return a},i.prototype.parseJSXStringLiteralAttribute=function(){var n=this.createJSXNode(),a=this.nextJSXToken();a.type!==8&&this.throwUnexpectedToken(a);var x=this.getTokenRaw(a);return this.finalize(n,new D.Literal(a.value,x))},i.prototype.parseJSXExpressionAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},i.prototype.parseJSXNameValueAttribute=function(){var n=this.createJSXNode(),a=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(n,new l.JSXAttribute(a,x))},i.prototype.parseJSXSpreadAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXSpreadAttribute(a))},i.prototype.parseJSXAttributes=function(){for(var n=[];!this.matchJSX("/")&&!this.matchJSX(">");){var a=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();n.push(a)}return n},i.prototype.parseJSXOpeningElement=function(){var n=this.createJSXNode();this.expectJSX("<");var a=this.parseJSXElementName(),x=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(a,E,x))},i.prototype.parseJSXBoundaryElement=function(){var n=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var a=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(n,new l.JSXClosingElement(a))}var x=this.parseJSXElementName(),E=this.parseJSXAttributes(),C=this.matchJSX("/");return C&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(x,C,E))},i.prototype.parseJSXEmptyExpression=function(){var n=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(n,new l.JSXEmptyExpression)},i.prototype.parseJSXExpressionContainer=function(){var n=this.createJSXNode();this.expectJSX("{");var a;return this.matchJSX("}")?(a=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),a=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXChildren=function(){for(var n=[];!this.scanner.eof();){var a=this.createJSXChildNode(),x=this.nextJSXText();if(x.start<x.end){var E=this.getTokenRaw(x),C=this.finalize(a,new l.JSXText(x.value,E));n.push(C)}if(this.scanner.source[this.scanner.index]==="{"){var y=this.parseJSXExpressionContainer();n.push(y)}else break}return n},i.prototype.parseComplexJSXElement=function(n){for(var a=[];!this.scanner.eof();){n.children=n.children.concat(this.parseJSXChildren());var x=this.createJSXChildNode(),E=this.parseJSXBoundaryElement();if(E.type===o.JSXSyntax.JSXOpeningElement){var C=E;if(C.selfClosing){var y=this.finalize(x,new l.JSXElement(C,[],null));n.children.push(y)}else a.push(n),n={node:x,opening:C,closing:null,children:[]}}if(E.type===o.JSXSyntax.JSXClosingElement){n.closing=E;var S=d(n.opening.name),w=d(n.closing.name);if(S!==w&&this.tolerateError("Expected corresponding JSX closing tag for %0",S),a.length>0){var y=this.finalize(n.node,new l.JSXElement(n.opening,n.children,n.closing));n=a[a.length-1],n.children.push(y),a.pop()}else break}}return n},i.prototype.parseJSXElement=function(){var n=this.createJSXNode(),a=this.parseJSXOpeningElement(),x=[],E=null;if(!a.selfClosing){var C=this.parseComplexJSXElement({node:n,opening:a,closing:E,children:x});x=C.children,E=C.closing}return this.finalize(n,new l.JSXElement(a,x,E))},i.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var n=this.parseJSXElement();return this.finishJSX(),n},i.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},i}(m.Parser);e.JSXParser=c},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(r){return r<65536?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10))+String.fromCharCode(56320+(r-65536&1023))},isWhiteSpace:function(r){return r===32||r===9||r===11||r===12||r===160||r>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(r)>=0},isLineTerminator:function(r){return r===10||r===13||r===8232||r===8233},isIdentifierStart:function(r){return r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r===92||r>=128&&s.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(r))},isIdentifierPart:function(r){return r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=48&&r<=57||r===92||r>=128&&s.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(r))},isDecimalDigit:function(r){return r>=48&&r<=57},isHexDigit:function(r){return r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102},isOctalDigit:function(r){return r>=48&&r<=55}}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(6),u=function(){function n(a){this.type=r.JSXSyntax.JSXClosingElement,this.name=a}return n}();e.JSXClosingElement=u;var l=function(){function n(a,x,E){this.type=r.JSXSyntax.JSXElement,this.openingElement=a,this.children=x,this.closingElement=E}return n}();e.JSXElement=l;var o=function(){function n(){this.type=r.JSXSyntax.JSXEmptyExpression}return n}();e.JSXEmptyExpression=o;var D=function(){function n(a){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=a}return n}();e.JSXExpressionContainer=D;var m=function(){function n(a){this.type=r.JSXSyntax.JSXIdentifier,this.name=a}return n}();e.JSXIdentifier=m;var f=function(){function n(a,x){this.type=r.JSXSyntax.JSXMemberExpression,this.object=a,this.property=x}return n}();e.JSXMemberExpression=f;var p=function(){function n(a,x){this.type=r.JSXSyntax.JSXAttribute,this.name=a,this.value=x}return n}();e.JSXAttribute=p;var d=function(){function n(a,x){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=a,this.name=x}return n}();e.JSXNamespacedName=d;var c=function(){function n(a,x,E){this.type=r.JSXSyntax.JSXOpeningElement,this.name=a,this.selfClosing=x,this.attributes=E}return n}();e.JSXOpeningElement=c;var t=function(){function n(a){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=a}return n}();e.JSXSpreadAttribute=t;var i=function(){function n(a,x){this.type=r.JSXSyntax.JSXText,this.value=a,this.raw=x}return n}();e.JSXText=i},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(2),u=function(){function g(v){this.type=r.Syntax.ArrayExpression,this.elements=v}return g}();e.ArrayExpression=u;var l=function(){function g(v){this.type=r.Syntax.ArrayPattern,this.elements=v}return g}();e.ArrayPattern=l;var o=function(){function g(v,A,k){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!1}return g}();e.ArrowFunctionExpression=o;var D=function(){function g(v,A,k){this.type=r.Syntax.AssignmentExpression,this.operator=v,this.left=A,this.right=k}return g}();e.AssignmentExpression=D;var m=function(){function g(v,A){this.type=r.Syntax.AssignmentPattern,this.left=v,this.right=A}return g}();e.AssignmentPattern=m;var f=function(){function g(v,A,k){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!0}return g}();e.AsyncArrowFunctionExpression=f;var p=function(){function g(v,A,k){this.type=r.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionDeclaration=p;var d=function(){function g(v,A,k){this.type=r.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionExpression=d;var c=function(){function g(v){this.type=r.Syntax.AwaitExpression,this.argument=v}return g}();e.AwaitExpression=c;var t=function(){function g(v,A,k){var M=v==="||"||v==="&&";this.type=M?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=v,this.left=A,this.right=k}return g}();e.BinaryExpression=t;var i=function(){function g(v){this.type=r.Syntax.BlockStatement,this.body=v}return g}();e.BlockStatement=i;var n=function(){function g(v){this.type=r.Syntax.BreakStatement,this.label=v}return g}();e.BreakStatement=n;var a=function(){function g(v,A){this.type=r.Syntax.CallExpression,this.callee=v,this.arguments=A}return g}();e.CallExpression=a;var x=function(){function g(v,A){this.type=r.Syntax.CatchClause,this.param=v,this.body=A}return g}();e.CatchClause=x;var E=function(){function g(v){this.type=r.Syntax.ClassBody,this.body=v}return g}();e.ClassBody=E;var C=function(){function g(v,A,k){this.type=r.Syntax.ClassDeclaration,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassDeclaration=C;var y=function(){function g(v,A,k){this.type=r.Syntax.ClassExpression,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassExpression=y;var S=function(){function g(v,A){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=v,this.property=A}return g}();e.ComputedMemberExpression=S;var w=function(){function g(v,A,k){this.type=r.Syntax.ConditionalExpression,this.test=v,this.consequent=A,this.alternate=k}return g}();e.ConditionalExpression=w;var b=function(){function g(v){this.type=r.Syntax.ContinueStatement,this.label=v}return g}();e.ContinueStatement=b;var B=function(){function g(){this.type=r.Syntax.DebuggerStatement}return g}();e.DebuggerStatement=B;var T=function(){function g(v,A){this.type=r.Syntax.ExpressionStatement,this.expression=v,this.directive=A}return g}();e.Directive=T;var N=function(){function g(v,A){this.type=r.Syntax.DoWhileStatement,this.body=v,this.test=A}return g}();e.DoWhileStatement=N;var O=function(){function g(){this.type=r.Syntax.EmptyStatement}return g}();e.EmptyStatement=O;var Y=function(){function g(v){this.type=r.Syntax.ExportAllDeclaration,this.source=v}return g}();e.ExportAllDeclaration=Y;var ye=function(){function g(v){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=v}return g}();e.ExportDefaultDeclaration=ye;var Ii=function(){function g(v,A,k){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=v,this.specifiers=A,this.source=k}return g}();e.ExportNamedDeclaration=Ii;var Pi=function(){function g(v,A){this.type=r.Syntax.ExportSpecifier,this.exported=A,this.local=v}return g}();e.ExportSpecifier=Pi;var Oi=function(){function g(v){this.type=r.Syntax.ExpressionStatement,this.expression=v}return g}();e.ExpressionStatement=Oi;var Mi=function(){function g(v,A,k){this.type=r.Syntax.ForInStatement,this.left=v,this.right=A,this.body=k,this.each=!1}return g}();e.ForInStatement=Mi;var Li=function(){function g(v,A,k){this.type=r.Syntax.ForOfStatement,this.left=v,this.right=A,this.body=k}return g}();e.ForOfStatement=Li;var Xi=function(){function g(v,A,k,M){this.type=r.Syntax.ForStatement,this.init=v,this.test=A,this.update=k,this.body=M}return g}();e.ForStatement=Xi;var Ri=function(){function g(v,A,k,M){this.type=r.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionDeclaration=Ri;var Ji=function(){function g(v,A,k,M){this.type=r.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionExpression=Ji;var Ui=function(){function g(v){this.type=r.Syntax.Identifier,this.name=v}return g}();e.Identifier=Ui;var zi=function(){function g(v,A,k){this.type=r.Syntax.IfStatement,this.test=v,this.consequent=A,this.alternate=k}return g}();e.IfStatement=zi;var Hi=function(){function g(v,A){this.type=r.Syntax.ImportDeclaration,this.specifiers=v,this.source=A}return g}();e.ImportDeclaration=Hi;var ji=function(){function g(v){this.type=r.Syntax.ImportDefaultSpecifier,this.local=v}return g}();e.ImportDefaultSpecifier=ji;var Vi=function(){function g(v){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=v}return g}();e.ImportNamespaceSpecifier=Vi;var Ki=function(){function g(v,A){this.type=r.Syntax.ImportSpecifier,this.local=v,this.imported=A}return g}();e.ImportSpecifier=Ki;var $i=function(){function g(v,A){this.type=r.Syntax.LabeledStatement,this.label=v,this.body=A}return g}();e.LabeledStatement=$i;var Gi=function(){function g(v,A){this.type=r.Syntax.Literal,this.value=v,this.raw=A}return g}();e.Literal=Gi;var Wi=function(){function g(v,A){this.type=r.Syntax.MetaProperty,this.meta=v,this.property=A}return g}();e.MetaProperty=Wi;var qi=function(){function g(v,A,k,M,Se){this.type=r.Syntax.MethodDefinition,this.key=v,this.computed=A,this.value=k,this.kind=M,this.static=Se}return g}();e.MethodDefinition=qi;var Yi=function(){function g(v){this.type=r.Syntax.Program,this.body=v,this.sourceType="module"}return g}();e.Module=Yi;var Qi=function(){function g(v,A){this.type=r.Syntax.NewExpression,this.callee=v,this.arguments=A}return g}();e.NewExpression=Qi;var Zi=function(){function g(v){this.type=r.Syntax.ObjectExpression,this.properties=v}return g}();e.ObjectExpression=Zi;var es=function(){function g(v){this.type=r.Syntax.ObjectPattern,this.properties=v}return g}();e.ObjectPattern=es;var ts=function(){function g(v,A,k,M,Se,Fs){this.type=r.Syntax.Property,this.key=A,this.computed=k,this.value=M,this.kind=v,this.method=Se,this.shorthand=Fs}return g}();e.Property=ts;var is=function(){function g(v,A,k,M){this.type=r.Syntax.Literal,this.value=v,this.raw=A,this.regex={pattern:k,flags:M}}return g}();e.RegexLiteral=is;var ss=function(){function g(v){this.type=r.Syntax.RestElement,this.argument=v}return g}();e.RestElement=ss;var rs=function(){function g(v){this.type=r.Syntax.ReturnStatement,this.argument=v}return g}();e.ReturnStatement=rs;var ns=function(){function g(v){this.type=r.Syntax.Program,this.body=v,this.sourceType="script"}return g}();e.Script=ns;var as=function(){function g(v){this.type=r.Syntax.SequenceExpression,this.expressions=v}return g}();e.SequenceExpression=as;var os=function(){function g(v){this.type=r.Syntax.SpreadElement,this.argument=v}return g}();e.SpreadElement=os;var us=function(){function g(v,A){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=v,this.property=A}return g}();e.StaticMemberExpression=us;var hs=function(){function g(){this.type=r.Syntax.Super}return g}();e.Super=hs;var ls=function(){function g(v,A){this.type=r.Syntax.SwitchCase,this.test=v,this.consequent=A}return g}();e.SwitchCase=ls;var cs=function(){function g(v,A){this.type=r.Syntax.SwitchStatement,this.discriminant=v,this.cases=A}return g}();e.SwitchStatement=cs;var ps=function(){function g(v,A){this.type=r.Syntax.TaggedTemplateExpression,this.tag=v,this.quasi=A}return g}();e.TaggedTemplateExpression=ps;var fs=function(){function g(v,A){this.type=r.Syntax.TemplateElement,this.value=v,this.tail=A}return g}();e.TemplateElement=fs;var ms=function(){function g(v,A){this.type=r.Syntax.TemplateLiteral,this.quasis=v,this.expressions=A}return g}();e.TemplateLiteral=ms;var ds=function(){function g(){this.type=r.Syntax.ThisExpression}return g}();e.ThisExpression=ds;var xs=function(){function g(v){this.type=r.Syntax.ThrowStatement,this.argument=v}return g}();e.ThrowStatement=xs;var Ds=function(){function g(v,A,k){this.type=r.Syntax.TryStatement,this.block=v,this.handler=A,this.finalizer=k}return g}();e.TryStatement=Ds;var Es=function(){function g(v,A){this.type=r.Syntax.UnaryExpression,this.operator=v,this.argument=A,this.prefix=!0}return g}();e.UnaryExpression=Es;var gs=function(){function g(v,A,k){this.type=r.Syntax.UpdateExpression,this.operator=v,this.argument=A,this.prefix=k}return g}();e.UpdateExpression=gs;var vs=function(){function g(v,A){this.type=r.Syntax.VariableDeclaration,this.declarations=v,this.kind=A}return g}();e.VariableDeclaration=vs;var Cs=function(){function g(v,A){this.type=r.Syntax.VariableDeclarator,this.id=v,this.init=A}return g}();e.VariableDeclarator=Cs;var As=function(){function g(v,A){this.type=r.Syntax.WhileStatement,this.test=v,this.body=A}return g}();e.WhileStatement=As;var ys=function(){function g(v,A){this.type=r.Syntax.WithStatement,this.object=v,this.body=A}return g}();e.WithStatement=ys;var Ss=function(){function g(v,A){this.type=r.Syntax.YieldExpression,this.argument=v,this.delegate=A}return g}();e.YieldExpression=Ss},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(9),u=s(10),l=s(11),o=s(7),D=s(12),m=s(2),f=s(13),p="ArrowParameterPlaceHolder",d=function(){function c(t,i,n){i===void 0&&(i={}),this.config={range:typeof i.range=="boolean"&&i.range,loc:typeof i.loc=="boolean"&&i.loc,source:null,tokens:typeof i.tokens=="boolean"&&i.tokens,comment:typeof i.comment=="boolean"&&i.comment,tolerant:typeof i.tolerant=="boolean"&&i.tolerant},this.config.loc&&i.source&&i.source!==null&&(this.config.source=String(i.source)),this.delegate=n,this.errorHandler=new u.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new D.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return c.prototype.throwError=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var a=Array.prototype.slice.call(arguments,1),x=t.replace(/%(\d)/g,function(S,w){return r.assert(w<a.length,"Message reference must be in range"),a[w]}),E=this.lastMarker.index,C=this.lastMarker.line,y=this.lastMarker.column+1;throw this.errorHandler.createError(E,C,y,x)},c.prototype.tolerateError=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var a=Array.prototype.slice.call(arguments,1),x=t.replace(/%(\d)/g,function(S,w){return r.assert(w<a.length,"Message reference must be in range"),a[w]}),E=this.lastMarker.index,C=this.scanner.lineNumber,y=this.lastMarker.column+1;this.errorHandler.tolerateError(E,C,y,x)},c.prototype.unexpectedTokenError=function(t,i){var n=i||l.Messages.UnexpectedToken,a;if(t?(i||(n=t.type===2?l.Messages.UnexpectedEOS:t.type===3?l.Messages.UnexpectedIdentifier:t.type===6?l.Messages.UnexpectedNumber:t.type===8?l.Messages.UnexpectedString:t.type===10?l.Messages.UnexpectedTemplate:l.Messages.UnexpectedToken,t.type===4&&(this.scanner.isFutureReservedWord(t.value)?n=l.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(t.value)&&(n=l.Messages.StrictReservedWord))),a=t.value):a="ILLEGAL",n=n.replace("%0",a),t&&typeof t.lineNumber=="number"){var x=t.start,E=t.lineNumber,C=this.lastMarker.index-this.lastMarker.column,y=t.start-C+1;return this.errorHandler.createError(x,E,y,n)}else{var x=this.lastMarker.index,E=this.lastMarker.line,y=this.lastMarker.column+1;return this.errorHandler.createError(x,E,y,n)}},c.prototype.throwUnexpectedToken=function(t,i){throw this.unexpectedTokenError(t,i)},c.prototype.tolerateUnexpectedToken=function(t,i){this.errorHandler.tolerate(this.unexpectedTokenError(t,i))},c.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var t=this.scanner.scanComments();if(t.length>0&&this.delegate)for(var i=0;i<t.length;++i){var n=t[i],a=void 0;a={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(a.range=n.range),this.config.loc&&(a.loc=n.loc);var x={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(a,x)}}},c.prototype.getTokenRaw=function(t){return this.scanner.source.slice(t.start,t.end)},c.prototype.convertToken=function(t){var i={type:f.TokenName[t.type],value:this.getTokenRaw(t)};if(this.config.range&&(i.range=[t.start,t.end]),this.config.loc&&(i.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),t.type===9){var n=t.pattern,a=t.flags;i.regex={pattern:n,flags:a}}return i},c.prototype.nextToken=function(){var t=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var i=this.scanner.lex();return this.hasLineTerminator=t.lineNumber!==i.lineNumber,i&&this.context.strict&&i.type===3&&this.scanner.isStrictModeReservedWord(i.value)&&(i.type=4),this.lookahead=i,this.config.tokens&&i.type!==2&&this.tokens.push(this.convertToken(i)),t},c.prototype.nextRegexToken=function(){this.collectComments();var t=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(t))),this.lookahead=t,this.nextToken(),t},c.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},c.prototype.startNode=function(t,i){i===void 0&&(i=0);var n=t.start-t.lineStart,a=t.lineNumber;return n<0&&(n+=i,a--),{index:t.start,line:a,column:n}},c.prototype.finalize=function(t,i){if(this.config.range&&(i.range=[t.index,this.lastMarker.index]),this.config.loc&&(i.loc={start:{line:t.line,column:t.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(i.loc.source=this.config.source)),this.delegate){var n={start:{line:t.line,column:t.column,offset:t.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(i,n)}return i},c.prototype.expect=function(t){var i=this.nextToken();(i.type!==7||i.value!==t)&&this.throwUnexpectedToken(i)},c.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var t=this.lookahead;t.type===7&&t.value===","?this.nextToken():t.type===7&&t.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(t)):this.tolerateUnexpectedToken(t,l.Messages.UnexpectedToken)}else this.expect(",")},c.prototype.expectKeyword=function(t){var i=this.nextToken();(i.type!==4||i.value!==t)&&this.throwUnexpectedToken(i)},c.prototype.match=function(t){return this.lookahead.type===7&&this.lookahead.value===t},c.prototype.matchKeyword=function(t){return this.lookahead.type===4&&this.lookahead.value===t},c.prototype.matchContextualKeyword=function(t){return this.lookahead.type===3&&this.lookahead.value===t},c.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var t=this.lookahead.value;return t==="="||t==="*="||t==="**="||t==="/="||t==="%="||t==="+="||t==="-="||t==="<<="||t===">>="||t===">>>="||t==="&="||t==="^="||t==="|="},c.prototype.isolateCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=i,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=a,x},c.prototype.inheritCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&i,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=a||this.context.firstCoverInitializedNameError,x},c.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},c.prototype.parsePrimaryExpression=function(){var t=this.createNode(),i,n,a;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),i=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(t,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value,a));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value==="true",a));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(null,a));break;case 10:i=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,i=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":i=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":i=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.RegexLiteral(n.regex,a,n.pattern,n.flags));break;default:i=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?i=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?i=this.finalize(t,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?i=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),i=this.finalize(t,new o.ThisExpression)):this.matchKeyword("class")?i=this.parseClassExpression():i=this.throwUnexpectedToken(this.nextToken()));break;default:i=this.throwUnexpectedToken(this.nextToken())}return i},c.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var i=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new o.SpreadElement(i))},c.prototype.parseArrayInitializer=function(){var t=this.createNode(),i=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),i.push(n)}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new o.ArrayExpression(i))},c.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var a=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=i,this.context.allowStrictDirective=n,a},c.prototype.parsePropertyMethodFunction=function(){var t=!1,i=this.createNode(),n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(i,new o.FunctionExpression(null,a.params,x,t))},c.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),i=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=i,this.context.await=n,this.finalize(t,new o.AsyncFunctionExpression(null,a.params,x))},c.prototype.parseObjectPropertyKey=function(){var t=this.createNode(),i=this.nextToken(),n;switch(i.type){case 8:case 6:this.context.strict&&i.octal&&this.tolerateUnexpectedToken(i,l.Messages.StrictOctalLiteral);var a=this.getTokenRaw(i);n=this.finalize(t,new o.Literal(i.value,a));break;case 3:case 1:case 5:case 4:n=this.finalize(t,new o.Identifier(i.value));break;case 7:i.value==="["?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(i);break;default:n=this.throwUnexpectedToken(i)}return n},c.prototype.isPropertyKey=function(t,i){return t.type===m.Syntax.Identifier&&t.name===i||t.type===m.Syntax.Literal&&t.value===i},c.prototype.parseObjectProperty=function(t){var i=this.createNode(),n=this.lookahead,a,x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(n.type===3){var b=n.value;this.nextToken(),C=this.match("["),w=!this.hasLineTerminator&&b==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=w?this.parseObjectPropertyKey():this.finalize(i,new o.Identifier(b))}else this.match("*")?this.nextToken():(C=this.match("["),x=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(n.type===3&&!w&&n.value==="get"&&B)a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod();else if(n.type===3&&!w&&n.value==="set"&&B)a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod();else if(n.type===7&&n.value==="*"&&B)a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0;else if(x||this.throwUnexpectedToken(this.lookahead),a="init",this.match(":")&&!w)!C&&this.isPropertyKey(x,"__proto__")&&(t.value&&this.tolerateError(l.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),E=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0;else if(n.type===3){var b=this.finalize(i,new o.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),S=!0;var T=this.isolateCoverGrammar(this.parseAssignmentExpression);E=this.finalize(i,new o.AssignmentPattern(b,T))}else S=!0,E=b}else this.throwUnexpectedToken(this.nextToken());return this.finalize(i,new o.Property(a,x,C,E,y,S))},c.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var i=[],n={value:!1};!this.match("}");)i.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new o.ObjectExpression(i))},c.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateLiteral=function(){var t=this.createNode(),i=[],n=[],a=this.parseTemplateHead();for(n.push(a);!a.tail;)i.push(this.parseExpression()),a=this.parseTemplateElement(),n.push(a);return this.finalize(t,new o.TemplateLiteral(n,i))},c.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case m.Syntax.Identifier:case m.Syntax.MemberExpression:case m.Syntax.RestElement:case m.Syntax.AssignmentPattern:break;case m.Syntax.SpreadElement:t.type=m.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case m.Syntax.ArrayExpression:t.type=m.Syntax.ArrayPattern;for(var i=0;i<t.elements.length;i++)t.elements[i]!==null&&this.reinterpretExpressionAsPattern(t.elements[i]);break;case m.Syntax.ObjectExpression:t.type=m.Syntax.ObjectPattern;for(var i=0;i<t.properties.length;i++)this.reinterpretExpressionAsPattern(t.properties[i].value);break;case m.Syntax.AssignmentExpression:t.type=m.Syntax.AssignmentPattern,delete t.operator,this.reinterpretExpressionAsPattern(t.left);break;default:break}},c.prototype.parseGroupExpression=function(){var t;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),t={type:p,params:[],async:!1};else{var i=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:p,params:[t],async:!1};else{var a=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(t);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var E=0;E<x.length;E++)this.reinterpretExpressionAsPattern(x[E]);a=!0,t={type:p,params:x,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),x.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var E=0;E<x.length;E++)this.reinterpretExpressionAsPattern(x[E]);a=!0,t={type:p,params:x,async:!1}}else x.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(a)break}a||(t=this.finalize(this.startNode(i),new o.SequenceExpression(x)))}if(!a){if(this.expect(")"),this.match("=>")&&(t.type===m.Syntax.Identifier&&t.name==="yield"&&(a=!0,t={type:p,params:[t],async:!1}),!a)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===m.Syntax.SequenceExpression)for(var E=0;E<t.expressions.length;E++)this.reinterpretExpressionAsPattern(t.expressions[E]);else this.reinterpretExpressionAsPattern(t);var C=t.type===m.Syntax.SequenceExpression?t.expressions:[t];t={type:p,params:C,async:!1}}this.context.isBindingElement=!1}}}return t},c.prototype.parseArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var i=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(t.push(i),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),t},c.prototype.isIdentifierName=function(t){return t.type===3||t.type===4||t.type===1||t.type===5},c.prototype.parseIdentifierName=function(){var t=this.createNode(),i=this.nextToken();return this.isIdentifierName(i)||this.throwUnexpectedToken(i),this.finalize(t,new o.Identifier(i.value))},c.prototype.parseNewExpression=function(){var t=this.createNode(),i=this.parseIdentifierName();r.assert(i.name==="new","New expression must start with `new`");var n;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var a=this.parseIdentifierName();n=new o.MetaProperty(i,a)}else this.throwUnexpectedToken(this.lookahead);else{var x=this.isolateCoverGrammar(this.parseLeftHandSideExpression),E=this.match("(")?this.parseArguments():[];n=new o.NewExpression(x,E),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,n)},c.prototype.parseAsyncArgument=function(){var t=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,t},c.prototype.parseAsyncArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var i=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(t.push(i),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),t},c.prototype.parseLeftHandSideExpressionAllowCall=function(){var t=this.lookahead,i=this.matchContextualKeyword("async"),n=this.context.allowIn;this.context.allowIn=!0;var a;for(this.matchKeyword("super")&&this.context.inFunctionBody?(a=this.createNode(),this.nextToken(),a=this.finalize(a,new o.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):a=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var x=this.parseIdentifierName();a=this.finalize(this.startNode(t),new o.StaticMemberExpression(a,x))}else if(this.match("(")){var E=i&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var C=E?this.parseAsyncArguments():this.parseArguments();if(a=this.finalize(this.startNode(t),new o.CallExpression(a,C)),E&&this.match("=>")){for(var y=0;y<C.length;++y)this.reinterpretExpressionAsPattern(C[y]);a={type:p,params:C,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var x=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),a=this.finalize(this.startNode(t),new o.ComputedMemberExpression(a,x))}else if(this.lookahead.type===10&&this.lookahead.head){var S=this.parseTemplateLiteral();a=this.finalize(this.startNode(t),new o.TaggedTemplateExpression(a,S))}else break;return this.context.allowIn=n,a},c.prototype.parseSuper=function(){var t=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(t,new o.Super)},c.prototype.parseLeftHandSideExpression=function(){r.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var t=this.startNode(this.lookahead),i=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),i=this.finalize(t,new o.ComputedMemberExpression(i,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var n=this.parseIdentifierName();i=this.finalize(t,new o.StaticMemberExpression(i,n))}else if(this.lookahead.type===10&&this.lookahead.head){var a=this.parseTemplateLiteral();i=this.finalize(t,new o.TaggedTemplateExpression(i,a))}else break;return i},c.prototype.parseUpdateExpression=function(){var t,i=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(i),a=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&t.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(l.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment);var x=!0;t=this.finalize(n,new o.UpdateExpression(a.value,t,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(t=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&t.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(l.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var E=this.nextToken().value,x=!1;t=this.finalize(this.startNode(i),new o.UpdateExpression(E,t,x))}return t},c.prototype.parseAwaitExpression=function(){var t=this.createNode();this.nextToken();var i=this.parseUnaryExpression();return this.finalize(t,new o.AwaitExpression(i))},c.prototype.parseUnaryExpression=function(){var t;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var i=this.startNode(this.lookahead),n=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),t=this.finalize(i,new o.UnaryExpression(n.value,t)),this.context.strict&&t.operator==="delete"&&t.argument.type===m.Syntax.Identifier&&this.tolerateError(l.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?t=this.parseAwaitExpression():t=this.parseUpdateExpression();return t},c.prototype.parseExponentiationExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseUnaryExpression);if(i.type!==m.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=i,a=this.isolateCoverGrammar(this.parseExponentiationExpression);i=this.finalize(this.startNode(t),new o.BinaryExpression("**",n,a))}return i},c.prototype.binaryPrecedence=function(t){var i=t.value,n;return t.type===7?n=this.operatorPrecedence[i]||0:t.type===4?n=i==="instanceof"||this.context.allowIn&&i==="in"?7:0:n=0,n},c.prototype.parseBinaryExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,a=this.binaryPrecedence(n);if(a>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[t,this.lookahead],E=i,C=this.isolateCoverGrammar(this.parseExponentiationExpression),y=[E,n.value,C],S=[a];a=this.binaryPrecedence(this.lookahead),!(a<=0);){for(;y.length>2&&a<=S[S.length-1];){C=y.pop();var w=y.pop();S.pop(),E=y.pop(),x.pop();var b=this.startNode(x[x.length-1]);y.push(this.finalize(b,new o.BinaryExpression(w,E,C)))}y.push(this.nextToken().value),S.push(a),x.push(this.lookahead),y.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=y.length-1;i=y[B];for(var T=x.pop();B>1;){var N=x.pop(),O=T&&T.lineStart,b=this.startNode(N,O),w=y[B-1];i=this.finalize(b,new o.BinaryExpression(w,y[B-2],i)),B-=2,T=N}}return i},c.prototype.parseConditionalExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);i=this.finalize(this.startNode(t),new o.ConditionalExpression(i,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return i},c.prototype.checkPatternParam=function(t,i){switch(i.type){case m.Syntax.Identifier:this.validateParam(t,i,i.name);break;case m.Syntax.RestElement:this.checkPatternParam(t,i.argument);break;case m.Syntax.AssignmentPattern:this.checkPatternParam(t,i.left);break;case m.Syntax.ArrayPattern:for(var n=0;n<i.elements.length;n++)i.elements[n]!==null&&this.checkPatternParam(t,i.elements[n]);break;case m.Syntax.ObjectPattern:for(var n=0;n<i.properties.length;n++)this.checkPatternParam(t,i.properties[n].value);break;default:break}t.simple=t.simple&&i instanceof o.Identifier},c.prototype.reinterpretAsCoverFormalsList=function(t){var i=[t],n,a=!1;switch(t.type){case m.Syntax.Identifier:break;case p:i=t.params,a=t.async;break;default:return null}n={simple:!0,paramSet:{}};for(var x=0;x<i.length;++x){var E=i[x];E.type===m.Syntax.AssignmentPattern?E.right.type===m.Syntax.YieldExpression&&(E.right.argument&&this.throwUnexpectedToken(this.lookahead),E.right.type=m.Syntax.Identifier,E.right.name="yield",delete E.right.argument,delete E.right.delegate):a&&E.type===m.Syntax.Identifier&&E.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(n,E),i[x]=E}if(this.context.strict||!this.context.allowYield)for(var x=0;x<i.length;++x){var E=i[x];E.type===m.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(n.message===l.Messages.StrictParamDupe){var C=this.context.strict?n.stricted:n.firstRestricted;this.throwUnexpectedToken(C,n.message)}return{simple:n.simple,params:i,stricted:n.stricted,firstRestricted:n.firstRestricted,message:n.message}},c.prototype.parseAssignmentExpression=function(){var t;if(!this.context.allowYield&&this.matchKeyword("yield"))t=this.parseYieldExpression();else{var i=this.lookahead,n=i;if(t=this.parseConditionalExpression(),n.type===3&&n.lineNumber===this.lookahead.lineNumber&&n.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var a=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(a),t={type:p,params:[a],async:!0}}if(t.type===p||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=t.async,E=this.reinterpretAsCoverFormalsList(t);if(E){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var C=this.context.strict,y=this.context.allowStrictDirective;this.context.allowStrictDirective=E.simple;var S=this.context.allowYield,w=this.context.await;this.context.allowYield=!0,this.context.await=x;var b=this.startNode(i);this.expect("=>");var B=void 0;if(this.match("{")){var T=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=T}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var N=B.type!==m.Syntax.BlockStatement;this.context.strict&&E.firstRestricted&&this.throwUnexpectedToken(E.firstRestricted,E.message),this.context.strict&&E.stricted&&this.tolerateUnexpectedToken(E.stricted,E.message),t=x?this.finalize(b,new o.AsyncArrowFunctionExpression(E.params,B,N)):this.finalize(b,new o.ArrowFunctionExpression(E.params,B,N)),this.context.strict=C,this.context.allowStrictDirective=y,this.context.allowYield=S,this.context.await=w}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===m.Syntax.Identifier){var O=t;this.scanner.isRestrictedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var Y=n.value,ye=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(i),new o.AssignmentExpression(Y,t,ye)),this.context.firstCoverInitializedNameError=null}}return t},c.prototype.parseExpression=function(){var t=this.lookahead,i=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(i);this.lookahead.type!==2&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(t),new o.SequenceExpression(n))}return i},c.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement();break}else t=this.parseStatement();return t},c.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var i=[];!this.match("}");)i.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new o.BlockStatement(i))},c.prototype.parseLexicalBinding=function(t,i){var n=this.createNode(),a=[],x=this.parsePattern(a,t);this.context.strict&&x.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(l.Messages.StrictVarName);var E=null;return t==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),E=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(l.Messages.DeclarationMissingInitializer,"const")):(!i.inFor&&x.type!==m.Syntax.Identifier||this.match("="))&&(this.expect("="),E=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(x,E))},c.prototype.parseBindingList=function(t,i){for(var n=[this.parseLexicalBinding(t,i)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,i));return n},c.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var i=this.scanner.lex();return this.scanner.restoreState(t),i.type===3||i.type===7&&i.value==="["||i.type===7&&i.value==="{"||i.type===4&&i.value==="let"||i.type===4&&i.value==="yield"},c.prototype.parseLexicalDeclaration=function(t){var i=this.createNode(),n=this.nextToken().value;r.assert(n==="let"||n==="const","Lexical declaration must be either let or const");var a=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(i,new o.VariableDeclaration(a,n))},c.prototype.parseBindingRestElement=function(t,i){var n=this.createNode();this.expect("...");var a=this.parsePattern(t,i);return this.finalize(n,new o.RestElement(a))},c.prototype.parseArrayPattern=function(t,i){var n=this.createNode();this.expect("[");for(var a=[];!this.match("]");)if(this.match(","))this.nextToken(),a.push(null);else{if(this.match("...")){a.push(this.parseBindingRestElement(t,i));break}else a.push(this.parsePatternWithDefault(t,i));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(a))},c.prototype.parsePropertyPattern=function(t,i){var n=this.createNode(),a=!1,x=!1,E=!1,C,y;if(this.lookahead.type===3){var S=this.lookahead;C=this.parseVariableIdentifier();var w=this.finalize(n,new o.Identifier(S.value));if(this.match("=")){t.push(S),x=!0,this.nextToken();var b=this.parseAssignmentExpression();y=this.finalize(this.startNode(S),new o.AssignmentPattern(w,b))}else this.match(":")?(this.expect(":"),y=this.parsePatternWithDefault(t,i)):(t.push(S),x=!0,y=w)}else a=this.match("["),C=this.parseObjectPropertyKey(),this.expect(":"),y=this.parsePatternWithDefault(t,i);return this.finalize(n,new o.Property("init",C,a,y,E,x))},c.prototype.parseObjectPattern=function(t,i){var n=this.createNode(),a=[];for(this.expect("{");!this.match("}");)a.push(this.parsePropertyPattern(t,i)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(a))},c.prototype.parsePattern=function(t,i){var n;return this.match("[")?n=this.parseArrayPattern(t,i):this.match("{")?n=this.parseObjectPattern(t,i):(this.matchKeyword("let")&&(i==="const"||i==="let")&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.LetInLexicalBinding),t.push(this.lookahead),n=this.parseVariableIdentifier(i)),n},c.prototype.parsePatternWithDefault=function(t,i){var n=this.lookahead,a=this.parsePattern(t,i);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var E=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,a=this.finalize(this.startNode(n),new o.AssignmentPattern(a,E))}return a},c.prototype.parseVariableIdentifier=function(t){var i=this.createNode(),n=this.nextToken();return n.type===4&&n.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):n.type!==3?this.context.strict&&n.type===4&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):(this.context.strict||n.value!=="let"||t!=="var")&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&n.type===3&&n.value==="await"&&this.tolerateUnexpectedToken(n),this.finalize(i,new o.Identifier(n.value))},c.prototype.parseVariableDeclaration=function(t){var i=this.createNode(),n=[],a=this.parsePattern(n,"var");this.context.strict&&a.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(l.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):a.type!==m.Syntax.Identifier&&!t.inFor&&this.expect("="),this.finalize(i,new o.VariableDeclarator(a,x))},c.prototype.parseVariableDeclarationList=function(t){var i={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(i));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(i));return n},c.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var i=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(i,"var"))},c.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new o.EmptyStatement)},c.prototype.parseExpressionStatement=function(){var t=this.createNode(),i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ExpressionStatement(i))},c.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(l.Messages.StrictFunction),this.parseStatement()},c.prototype.parseIfStatement=function(){var t=this.createNode(),i,n=null;this.expectKeyword("if"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(a,i,n))},c.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var i=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=i,this.expectKeyword("while"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new o.DoWhileStatement(n,a))},c.prototype.parseWhileStatement=function(){var t=this.createNode(),i;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var a=this.context.inIteration;this.context.inIteration=!0,i=this.parseStatement(),this.context.inIteration=a}return this.finalize(t,new o.WhileStatement(n,i))},c.prototype.parseForStatement=function(){var t=null,i=null,n=null,a=!0,x,E,C=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){t=this.createNode(),this.nextToken();var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=y,S.length===1&&this.matchKeyword("in")){var w=S[0];w.init&&(w.id.type===m.Syntax.ArrayPattern||w.id.type===m.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(l.Messages.ForInOfLoopInitializer,"for-in"),t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseExpression(),t=null}else S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){t=this.createNode();var b=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")t=this.finalize(t,new o.Identifier(b)),this.nextToken(),x=t,E=this.parseExpression(),t=null;else{var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseBindingList(b,{inFor:!0});this.context.allowIn=y,S.length===1&&S[0].init===null&&this.matchKeyword("in")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseExpression(),t=null):S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(this.consumeSemicolon(),t=this.finalize(t,new o.VariableDeclaration(S,b)))}}else{var B=this.lookahead,y=this.context.allowIn;if(this.context.allowIn=!1,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=y,this.matchKeyword("in"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseExpression(),t=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseAssignmentExpression(),t=null,a=!1;else{if(this.match(",")){for(var T=[t];this.match(",");)this.nextToken(),T.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(B),new o.SequenceExpression(T))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(n=this.parseExpression()));var N;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),N=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var O=this.context.inIteration;this.context.inIteration=!0,N=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=O}return typeof x>"u"?this.finalize(C,new o.ForStatement(t,i,n,N)):a?this.finalize(C,new o.ForInStatement(x,E,N)):this.finalize(C,new o.ForOfStatement(x,E,N))},c.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();i=n;var a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&this.throwError(l.Messages.IllegalContinue),this.finalize(t,new o.ContinueStatement(i))},c.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name),i=n}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(l.Messages.IllegalBreak),this.finalize(t,new o.BreakStatement(i))},c.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(l.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var i=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,n=i?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(t,new o.ReturnStatement(n))},c.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(l.Messages.StrictModeWith);var t=this.createNode(),i;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseStatement()),this.finalize(t,new o.WithStatement(n,i))},c.prototype.parseSwitchCase=function(){var t=this.createNode(),i;this.matchKeyword("default")?(this.nextToken(),i=null):(this.expectKeyword("case"),i=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(i,n))},c.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var i=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var a=[],x=!1;for(this.expect("{");!this.match("}");){var E=this.parseSwitchCase();E.test===null&&(x&&this.throwError(l.Messages.MultipleDefaultsInSwitch),x=!0),a.push(E)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new o.SwitchStatement(i,a))},c.prototype.parseLabelledStatement=function(){var t=this.createNode(),i=this.parseExpression(),n;if(i.type===m.Syntax.Identifier&&this.match(":")){this.nextToken();var a=i,x="$"+a.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(l.Messages.Redeclaration,"Label",a.name),this.context.labelSet[x]=!0;var E=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),E=this.parseClassDeclaration();else if(this.matchKeyword("function")){var C=this.lookahead,y=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(C,l.Messages.StrictFunction):y.generator&&this.tolerateUnexpectedToken(C,l.Messages.GeneratorInLegacyContext),E=y}else E=this.parseStatement();delete this.context.labelSet[x],n=new o.LabeledStatement(a,E)}else this.consumeSemicolon(),n=new o.ExpressionStatement(i);return this.finalize(t,n)},c.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(l.Messages.NewlineAfterThrow);var i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ThrowStatement(i))},c.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var i=[],n=this.parsePattern(i),a={},x=0;x<i.length;x++){var E="$"+i[x].value;Object.prototype.hasOwnProperty.call(a,E)&&this.tolerateError(l.Messages.DuplicateBinding,i[x].value),a[E]=!0}this.context.strict&&n.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(l.Messages.StrictCatchVariable),this.expect(")");var C=this.parseBlock();return this.finalize(t,new o.CatchClause(n,C))},c.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},c.prototype.parseTryStatement=function(){var t=this.createNode();this.expectKeyword("try");var i=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,a=this.matchKeyword("finally")?this.parseFinallyClause():null;return!n&&!a&&this.throwError(l.Messages.NoCatchOrFinally),this.finalize(t,new o.TryStatement(i,n,a))},c.prototype.parseDebuggerStatement=function(){var t=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(t,new o.DebuggerStatement)},c.prototype.parseStatement=function(){var t;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:t=this.parseExpressionStatement();break;case 7:var i=this.lookahead.value;i==="{"?t=this.parseBlock():i==="("?t=this.parseExpressionStatement():i===";"?t=this.parseEmptyStatement():t=this.parseExpressionStatement();break;case 3:t=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":t=this.parseBreakStatement();break;case"continue":t=this.parseContinueStatement();break;case"debugger":t=this.parseDebuggerStatement();break;case"do":t=this.parseDoWhileStatement();break;case"for":t=this.parseForStatement();break;case"function":t=this.parseFunctionDeclaration();break;case"if":t=this.parseIfStatement();break;case"return":t=this.parseReturnStatement();break;case"switch":t=this.parseSwitchStatement();break;case"throw":t=this.parseThrowStatement();break;case"try":t=this.parseTryStatement();break;case"var":t=this.parseVariableStatement();break;case"while":t=this.parseWhileStatement();break;case"with":t=this.parseWithStatement();break;default:t=this.parseExpressionStatement();break}break;default:t=this.throwUnexpectedToken(this.lookahead)}return t},c.prototype.parseFunctionSourceElements=function(){var t=this.createNode();this.expect("{");var i=this.parseDirectivePrologues(),n=this.context.labelSet,a=this.context.inIteration,x=this.context.inSwitch,E=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)i.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=a,this.context.inSwitch=x,this.context.inFunctionBody=E,this.finalize(t,new o.BlockStatement(i))},c.prototype.validateParam=function(t,i,n){var a="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(t.stricted=i,t.message=l.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(t.paramSet,a)&&(t.stricted=i,t.message=l.Messages.StrictParamDupe)):t.firstRestricted||(this.scanner.isRestrictedWord(n)?(t.firstRestricted=i,t.message=l.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(t.firstRestricted=i,t.message=l.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(t.paramSet,a)&&(t.stricted=i,t.message=l.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(t.paramSet,a,{value:!0,enumerable:!0,writable:!0,configurable:!0}):t.paramSet[a]=!0},c.prototype.parseRestElement=function(t){var i=this.createNode();this.expect("...");var n=this.parsePattern(t);return this.match("=")&&this.throwError(l.Messages.DefaultRestParameter),this.match(")")||this.throwError(l.Messages.ParameterAfterRestParameter),this.finalize(i,new o.RestElement(n))},c.prototype.parseFormalParameter=function(t){for(var i=[],n=this.match("...")?this.parseRestElement(i):this.parsePatternWithDefault(i),a=0;a<i.length;a++)this.validateParam(t,i[a],i[a].value);t.simple=t.simple&&n instanceof o.Identifier,t.params.push(n)},c.prototype.parseFormalParameters=function(t){var i;if(i={simple:!0,params:[],firstRestricted:t},this.expect("("),!this.match(")"))for(i.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(i),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:i.simple,params:i.params,stricted:i.stricted,firstRestricted:i.firstRestricted,message:i.message}},c.prototype.matchAsyncFunction=function(){var t=this.matchContextualKeyword("async");if(t){var i=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(i),t=i.lineNumber===n.lineNumber&&n.type===4&&n.value==="function"}return t},c.prototype.parseFunctionDeclaration=function(t){var i=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var a=n?!1:this.match("*");a&&this.nextToken();var x,E=null,C=null;if(!t||!this.match("(")){var y=this.lookahead;E=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(y.value)&&this.tolerateUnexpectedToken(y,l.Messages.StrictFunctionName):this.scanner.isRestrictedWord(y.value)?(C=y,x=l.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(y.value)&&(C=y,x=l.Messages.StrictReservedWord)}var S=this.context.await,w=this.context.allowYield;this.context.await=n,this.context.allowYield=!a;var b=this.parseFormalParameters(C),B=b.params,T=b.stricted;C=b.firstRestricted,b.message&&(x=b.message);var N=this.context.strict,O=this.context.allowStrictDirective;this.context.allowStrictDirective=b.simple;var Y=this.parseFunctionSourceElements();return this.context.strict&&C&&this.throwUnexpectedToken(C,x),this.context.strict&&T&&this.tolerateUnexpectedToken(T,x),this.context.strict=N,this.context.allowStrictDirective=O,this.context.await=S,this.context.allowYield=w,n?this.finalize(i,new o.AsyncFunctionDeclaration(E,B,Y)):this.finalize(i,new o.FunctionDeclaration(E,B,Y,a))},c.prototype.parseFunctionExpression=function(){var t=this.createNode(),i=this.matchContextualKeyword("async");i&&this.nextToken(),this.expectKeyword("function");var n=i?!1:this.match("*");n&&this.nextToken();var a,x=null,E,C=this.context.await,y=this.context.allowYield;if(this.context.await=i,this.context.allowYield=!n,!this.match("(")){var S=this.lookahead;x=!this.context.strict&&!n&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(S.value)&&this.tolerateUnexpectedToken(S,l.Messages.StrictFunctionName):this.scanner.isRestrictedWord(S.value)?(E=S,a=l.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(S.value)&&(E=S,a=l.Messages.StrictReservedWord)}var w=this.parseFormalParameters(E),b=w.params,B=w.stricted;E=w.firstRestricted,w.message&&(a=w.message);var T=this.context.strict,N=this.context.allowStrictDirective;this.context.allowStrictDirective=w.simple;var O=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,a),this.context.strict&&B&&this.tolerateUnexpectedToken(B,a),this.context.strict=T,this.context.allowStrictDirective=N,this.context.await=C,this.context.allowYield=y,i?this.finalize(t,new o.AsyncFunctionExpression(x,b,O)):this.finalize(t,new o.FunctionExpression(x,b,O,n))},c.prototype.parseDirective=function(){var t=this.lookahead,i=this.createNode(),n=this.parseExpression(),a=n.type===m.Syntax.Literal?this.getTokenRaw(t).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(i,a?new o.Directive(n,a):new o.ExpressionStatement(n))},c.prototype.parseDirectivePrologues=function(){for(var t=null,i=[];;){var n=this.lookahead;if(n.type!==8)break;var a=this.parseDirective();i.push(a);var x=a.directive;if(typeof x!="string")break;x==="use strict"?(this.context.strict=!0,t&&this.tolerateUnexpectedToken(t,l.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,l.Messages.IllegalLanguageModeDirective)):!t&&n.octal&&(t=n)}return i},c.prototype.qualifiedPropertyName=function(t){switch(t.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return t.value==="[";default:break}return!1},c.prototype.parseGetterMethod=function(){var t=this.createNode(),i=!1,n=this.context.allowYield;this.context.allowYield=!i;var a=this.parseFormalParameters();a.params.length>0&&this.tolerateError(l.Messages.BadGetterArity);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseSetterMethod=function(){var t=this.createNode(),i=!1,n=this.context.allowYield;this.context.allowYield=!i;var a=this.parseFormalParameters();a.params.length!==1?this.tolerateError(l.Messages.BadSetterArity):a.params[0]instanceof o.RestElement&&this.tolerateError(l.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseGeneratorMethod=function(){var t=this.createNode(),i=!0,n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.isStartOfExpression=function(){var t=!0,i=this.lookahead.value;switch(this.lookahead.type){case 7:t=i==="["||i==="("||i==="{"||i==="+"||i==="-"||i==="!"||i==="~"||i==="++"||i==="--"||i==="/"||i==="/=";break;case 4:t=i==="class"||i==="delete"||i==="function"||i==="let"||i==="new"||i==="super"||i==="this"||i==="typeof"||i==="void"||i==="yield";break;default:break}return t},c.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var i=null,n=!1;if(!this.hasLineTerminator){var a=this.context.allowYield;this.context.allowYield=!1,n=this.match("*"),n?(this.nextToken(),i=this.parseAssignmentExpression()):this.isStartOfExpression()&&(i=this.parseAssignmentExpression()),this.context.allowYield=a}return this.finalize(t,new o.YieldExpression(i,n))},c.prototype.parseClassElement=function(t){var i=this.lookahead,n=this.createNode(),a="",x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(this.match("*"))this.nextToken();else{C=this.match("["),x=this.parseObjectPropertyKey();var b=x;if(b.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(i=this.lookahead,S=!0,C=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),i.type===3&&!this.hasLineTerminator&&i.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(w=!0,i=this.lookahead,x=this.parseObjectPropertyKey(),i.type===3&&i.value==="constructor"&&this.tolerateUnexpectedToken(i,l.Messages.ConstructorIsAsync))}}var T=this.qualifiedPropertyName(this.lookahead);return i.type===3?i.value==="get"&&T?(a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod()):i.value==="set"&&T&&(a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod()):i.type===7&&i.value==="*"&&T&&(a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0),!a&&x&&this.match("(")&&(a="init",E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0),a||this.throwUnexpectedToken(this.lookahead),a==="init"&&(a="method"),C||(S&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(i,l.Messages.StaticPrototype),!S&&this.isPropertyKey(x,"constructor")&&((a!=="method"||!y||E&&E.generator)&&this.throwUnexpectedToken(i,l.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(i,l.Messages.DuplicateConstructor):t.value=!0,a="constructor")),this.finalize(n,new o.MethodDefinition(x,C,E,a,S))},c.prototype.parseClassElementList=function(){var t=[],i={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(i));return this.expect("}"),t},c.prototype.parseClassBody=function(){var t=this.createNode(),i=this.parseClassElementList();return this.finalize(t,new o.ClassBody(i))},c.prototype.parseClassDeclaration=function(t){var i=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var a=t&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var E=this.parseClassBody();return this.context.strict=n,this.finalize(i,new o.ClassDeclaration(a,x,E))},c.prototype.parseClassExpression=function(){var t=this.createNode(),i=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=this.lookahead.type===3?this.parseVariableIdentifier():null,a=null;this.matchKeyword("extends")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=i,this.finalize(t,new o.ClassExpression(n,a,x))},c.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Module(i))},c.prototype.parseScript=function(){for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Script(i))},c.prototype.parseModuleSpecifier=function(){var t=this.createNode();this.lookahead.type!==8&&this.throwError(l.Messages.InvalidModuleSpecifier);var i=this.nextToken(),n=this.getTokenRaw(i);return this.finalize(t,new o.Literal(i.value,n))},c.prototype.parseImportSpecifier=function(){var t=this.createNode(),i,n;return this.lookahead.type===3?(i=this.parseVariableIdentifier(),n=i,this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseVariableIdentifier())):(i=this.parseIdentifierName(),n=i,this.matchContextualKeyword("as")?(this.nextToken(),n=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(t,new o.ImportSpecifier(n,i))},c.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},c.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName();return this.finalize(t,new o.ImportDefaultSpecifier(i))},c.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(l.Messages.NoAsAfterImportNamespace),this.nextToken();var i=this.parseIdentifierName();return this.finalize(t,new o.ImportNamespaceSpecifier(i))},c.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalImportDeclaration);var t=this.createNode();this.expectKeyword("import");var i,n=[];if(this.lookahead.type===8)i=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken(),i=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,i))},c.prototype.parseExportSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName(),n=i;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new o.ExportSpecifier(i,n))},c.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalExportDeclaration);var t=this.createNode();this.expectKeyword("export");var i;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){var n=this.parseClassDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){var n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(l.Messages.UnexpectedToken,this.lookahead.value);var n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),i=this.finalize(t,new o.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){var n=this.parseFunctionDeclaration();i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else{var E=[],C=null,y=!1;for(this.expect("{");!this.match("}");)y=y||this.matchKeyword("default"),E.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),C=this.parseModuleSpecifier(),this.consumeSemicolon();else if(y){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}else this.consumeSemicolon();i=this.finalize(t,new o.ExportNamedDeclaration(null,E,C))}return i},c}();e.Parser=d},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function s(r,u){if(!r)throw new Error("ASSERT: "+u)}e.assert=s},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function r(){this.errors=[],this.tolerant=!1}return r.prototype.recordError=function(u){this.errors.push(u)},r.prototype.tolerate=function(u){if(this.tolerant)this.recordError(u);else throw u},r.prototype.constructError=function(u,l){var o=new Error(u);try{throw o}catch(D){Object.create&&Object.defineProperty&&(o=Object.create(D),Object.defineProperty(o,"column",{value:l}))}return o},r.prototype.createError=function(u,l,o,D){var m="Line "+l+": "+D,f=this.constructError(m,o);return f.index=u,f.lineNumber=l,f.description=D,f},r.prototype.throwError=function(u,l,o,D){throw this.createError(u,l,o,D)},r.prototype.tolerateError=function(u,l,o,D){var m=this.createError(u,l,o,D);if(this.tolerant)this.recordError(m);else throw m},r}();e.ErrorHandler=s},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(9),u=s(4),l=s(11);function o(f){return"0123456789abcdef".indexOf(f.toLowerCase())}function D(f){return"01234567".indexOf(f)}var m=function(){function f(p,d){this.source=p,this.errorHandler=d,this.trackComment=!1,this.isModule=!1,this.length=p.length,this.index=0,this.lineNumber=p.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return f.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},f.prototype.restoreState=function(p){this.index=p.index,this.lineNumber=p.lineNumber,this.lineStart=p.lineStart},f.prototype.eof=function(){return this.index>=this.length},f.prototype.throwUnexpectedToken=function(p){return p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.tolerateUnexpectedToken=function(p){p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.skipSingleLineComment=function(p){var d=[],c,t;for(this.trackComment&&(d=[],c=this.index-p,t={start:{line:this.lineNumber,column:this.index-this.lineStart-p},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,u.Character.isLineTerminator(i)){if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart-1};var n={multiLine:!1,slice:[c+p,this.index-1],range:[c,this.index-1],loc:t};d.push(n)}return i===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d}}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!1,slice:[c+p,this.index],range:[c,this.index],loc:t};d.push(n)}return d},f.prototype.skipMultiLineComment=function(){var p=[],d,c;for(this.trackComment&&(p=[],d=this.index-2,c={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var t=this.source.charCodeAt(this.index);if(u.Character.isLineTerminator(t))t===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(t===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index-2],range:[d,this.index],loc:c};p.push(i)}return p}++this.index}else++this.index}if(this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index],range:[d,this.index],loc:c};p.push(i)}return this.tolerateUnexpectedToken(),p},f.prototype.scanComments=function(){var p;this.trackComment&&(p=[]);for(var d=this.index===0;!this.eof();){var c=this.source.charCodeAt(this.index);if(u.Character.isWhiteSpace(c))++this.index;else if(u.Character.isLineTerminator(c))++this.index,c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d=!0;else if(c===47)if(c=this.source.charCodeAt(this.index+1),c===47){this.index+=2;var t=this.skipSingleLineComment(2);this.trackComment&&(p=p.concat(t)),d=!0}else if(c===42){this.index+=2;var t=this.skipMultiLineComment();this.trackComment&&(p=p.concat(t))}else break;else if(d&&c===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var t=this.skipSingleLineComment(3);this.trackComment&&(p=p.concat(t))}else break;else if(c===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var t=this.skipSingleLineComment(4);this.trackComment&&(p=p.concat(t))}else break;else break}return p},f.prototype.isFutureReservedWord=function(p){switch(p){case"enum":case"export":case"import":case"super":return!0;default:return!1}},f.prototype.isStrictModeReservedWord=function(p){switch(p){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},f.prototype.isRestrictedWord=function(p){return p==="eval"||p==="arguments"},f.prototype.isKeyword=function(p){switch(p.length){case 2:return p==="if"||p==="in"||p==="do";case 3:return p==="var"||p==="for"||p==="new"||p==="try"||p==="let";case 4:return p==="this"||p==="else"||p==="case"||p==="void"||p==="with"||p==="enum";case 5:return p==="while"||p==="break"||p==="catch"||p==="throw"||p==="const"||p==="yield"||p==="class"||p==="super";case 6:return p==="return"||p==="typeof"||p==="delete"||p==="switch"||p==="export"||p==="import";case 7:return p==="default"||p==="finally"||p==="extends";case 8:return p==="function"||p==="continue"||p==="debugger";case 10:return p==="instanceof";default:return!1}},f.prototype.codePointAt=function(p){var d=this.source.charCodeAt(p);if(d>=55296&&d<=56319){var c=this.source.charCodeAt(p+1);if(c>=56320&&c<=57343){var t=d;d=(t-55296)*1024+c-56320+65536}}return d},f.prototype.scanHexEscape=function(p){for(var d=p==="u"?4:2,c=0,t=0;t<d;++t)if(!this.eof()&&u.Character.isHexDigit(this.source.charCodeAt(this.index)))c=c*16+o(this.source[this.index++]);else return null;return String.fromCharCode(c)},f.prototype.scanUnicodeCodePointEscape=function(){var p=this.source[this.index],d=0;for(p==="}"&&this.throwUnexpectedToken();!this.eof()&&(p=this.source[this.index++],!!u.Character.isHexDigit(p.charCodeAt(0)));)d=d*16+o(p);return(d>1114111||p!=="}")&&this.throwUnexpectedToken(),u.Character.fromCodePoint(d)},f.prototype.getIdentifier=function(){for(var p=this.index++;!this.eof();){var d=this.source.charCodeAt(this.index);if(d===92)return this.index=p,this.getComplexIdentifier();if(d>=55296&&d<57343)return this.index=p,this.getComplexIdentifier();if(u.Character.isIdentifierPart(d))++this.index;else break}return this.source.slice(p,this.index)},f.prototype.getComplexIdentifier=function(){var p=this.codePointAt(this.index),d=u.Character.fromCodePoint(p);this.index+=d.length;var c;for(p===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!u.Character.isIdentifierStart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d=c);!this.eof()&&(p=this.codePointAt(this.index),!!u.Character.isIdentifierPart(p));)c=u.Character.fromCodePoint(p),d+=c,this.index+=c.length,p===92&&(d=d.substr(0,d.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!u.Character.isIdentifierPart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d+=c);return d},f.prototype.octalToDecimal=function(p){var d=p!=="0",c=D(p);return!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=!0,c=c*8+D(this.source[this.index++]),"0123".indexOf(p)>=0&&!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(c=c*8+D(this.source[this.index++]))),{code:c,octal:d}},f.prototype.scanIdentifier=function(){var p,d=this.index,c=this.source.charCodeAt(d)===92?this.getComplexIdentifier():this.getIdentifier();if(c.length===1?p=3:this.isKeyword(c)?p=4:c==="null"?p=5:c==="true"||c==="false"?p=1:p=3,p!==3&&d+c.length!==this.index){var t=this.index;this.index=d,this.tolerateUnexpectedToken(l.Messages.InvalidEscapedReservedWord),this.index=t}return{type:p,value:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.scanPunctuator=function(){var p=this.index,d=this.source[this.index];switch(d){case"(":case"{":d==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,d="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:d=this.source.substr(this.index,4),d===">>>="?this.index+=4:(d=d.substr(0,3),d==="==="||d==="!=="||d===">>>"||d==="<<="||d===">>="||d==="**="?this.index+=3:(d=d.substr(0,2),d==="&&"||d==="||"||d==="=="||d==="!="||d==="+="||d==="-="||d==="*="||d==="/="||d==="++"||d==="--"||d==="<<"||d===">>"||d==="&="||d==="|="||d==="^="||d==="%="||d==="<="||d===">="||d==="=>"||d==="**"?this.index+=2:(d=this.source[this.index],"<>=!+-*%&|^/".indexOf(d)>=0&&++this.index)))}return this.index===p&&this.throwUnexpectedToken(),{type:7,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanHexLiteral=function(p){for(var d="";!this.eof()&&u.Character.isHexDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),u.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+d,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanBinaryLiteral=function(p){for(var d="",c;!this.eof()&&(c=this.source[this.index],!(c!=="0"&&c!=="1"));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),this.eof()||(c=this.source.charCodeAt(this.index),(u.Character.isIdentifierStart(c)||u.Character.isDecimalDigit(c))&&this.throwUnexpectedToken()),{type:6,value:parseInt(d,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanOctalLiteral=function(p,d){var c="",t=!1;for(u.Character.isOctalDigit(p.charCodeAt(0))?(t=!0,c="0"+this.source[this.index++]):++this.index;!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];return!t&&c.length===0&&this.throwUnexpectedToken(),(u.Character.isIdentifierStart(this.source.charCodeAt(this.index))||u.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(c,8),octal:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.isImplicitOctalLiteral=function(){for(var p=this.index+1;p<this.length;++p){var d=this.source[p];if(d==="8"||d==="9")return!1;if(!u.Character.isOctalDigit(d.charCodeAt(0)))return!0}return!0},f.prototype.scanNumericLiteral=function(){var p=this.index,d=this.source[p];r.assert(u.Character.isDecimalDigit(d.charCodeAt(0))||d===".","Numeric literal must start with a decimal digit or a decimal point");var c="";if(d!=="."){if(c=this.source[this.index++],d=this.source[this.index],c==="0"){if(d==="x"||d==="X")return++this.index,this.scanHexLiteral(p);if(d==="b"||d==="B")return++this.index,this.scanBinaryLiteral(p);if(d==="o"||d==="O")return this.scanOctalLiteral(d,p);if(d&&u.Character.isOctalDigit(d.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(d,p)}for(;u.Character.isDecimalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];d=this.source[this.index]}if(d==="."){for(c+=this.source[this.index++];u.Character.isDecimalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];d=this.source[this.index]}if(d==="e"||d==="E")if(c+=this.source[this.index++],d=this.source[this.index],(d==="+"||d==="-")&&(c+=this.source[this.index++]),u.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;u.Character.isDecimalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];else this.throwUnexpectedToken();return u.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(c),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanStringLiteral=function(){var p=this.index,d=this.source[p];r.assert(d==="'"||d==='"',"String literal must starts with a quote"),++this.index;for(var c=!1,t="";!this.eof();){var i=this.source[this.index++];if(i===d){d="";break}else if(i==="\\")if(i=this.source[this.index++],!i||!u.Character.isLineTerminator(i.charCodeAt(0)))switch(i){case"u":if(this.source[this.index]==="{")++this.index,t+=this.scanUnicodeCodePointEscape();else{var n=this.scanHexEscape(i);n===null&&this.throwUnexpectedToken(),t+=n}break;case"x":var a=this.scanHexEscape(i);a===null&&this.throwUnexpectedToken(l.Messages.InvalidHexEscapeSequence),t+=a;break;case"n":t+=`
|
|
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;case"8":case"9":t+=i,this.tolerateUnexpectedToken();break;default:if(i&&u.Character.isOctalDigit(i.charCodeAt(0))){var x=this.octalToDecimal(i);c=x.octal||c,t+=String.fromCharCode(x.code)}else t+=i;break}else++this.lineNumber,i==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index;else{if(u.Character.isLineTerminator(i.charCodeAt(0)))break;t+=i}}return d!==""&&(this.index=p,this.throwUnexpectedToken()),{type:8,value:t,octal:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanTemplate=function(){var p="",d=!1,c=this.index,t=this.source[c]==="`",i=!1,n=2;for(++this.index;!this.eof();){var a=this.source[this.index++];if(a==="`"){n=1,i=!0,d=!0;break}else if(a==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,d=!0;break}p+=a}else if(a==="\\")if(a=this.source[this.index++],u.Character.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,a==="\r"&&this.source[this.index]===`
|
|
`&&++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"?(u.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral),p+="\0"):u.Character.isOctalDigit(a.charCodeAt(0))?this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral):p+=a;break}else u.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];r.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++],u.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(u.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(!u.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<this.index;++t)p+=this.source[t];else this.index=t,d+="u",p+="\\u";this.tolerateUnexpectedToken()}else p+="\\",this.tolerateUnexpectedToken();else d+=c,p+=c}return d},f.prototype.scanRegExp=function(){var p=this.index,d=this.scanRegExpBody(),c=this.scanRegExpFlags(),t=this.testRegExp(d,c);return{type:9,value:"",pattern:d,flags:c,regex:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var p=this.source.charCodeAt(this.index);return u.Character.isIdentifierStart(p)?this.scanIdentifier():p===40||p===41||p===59?this.scanPunctuator():p===39||p===34?this.scanStringLiteral():p===46?u.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():u.Character.isDecimalDigit(p)?this.scanNumericLiteral():p===96||p===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():p>=55296&&p<57343&&u.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(h,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="<end>",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(h,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(h,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(10),u=s(12),l=s(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 r.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new u.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<f.length;++p){var d=f[p],c=this.scanner.source.slice(d.slice[0],d.slice[1]),t={type:d.multiLine?"BlockComment":"LineComment",value:c};this.trackRange&&(t.range=d.range),this.trackLoc&&(t.loc=d.loc),this.buffer.push(t)}if(!this.scanner.eof()){var i=void 0;this.trackLoc&&(i={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var n=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),a=n?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(a);var x={type:l.TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(x.range=[a.start,a.end]),this.trackLoc&&(i.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},x.loc=i),a.type===9){var E=a.pattern,C=a.flags;x.regex={pattern:E,flags:C}}this.buffer.push(x)}}return this.buffer.shift()},m}();e.Tokenizer=D}])})});var de=_(I=>{function Ws(h){return Array.isArray?Array.isArray(h):me(h)==="[object Array]"}I.isArray=Ws;function qs(h){return typeof h=="boolean"}I.isBoolean=qs;function Ys(h){return h===null}I.isNull=Ys;function Qs(h){return h==null}I.isNullOrUndefined=Qs;function Zs(h){return typeof h=="number"}I.isNumber=Zs;function er(h){return typeof h=="string"}I.isString=er;function tr(h){return typeof h=="symbol"}I.isSymbol=tr;function ir(h){return h===void 0}I.isUndefined=ir;function sr(h){return me(h)==="[object RegExp]"}I.isRegExp=sr;function rr(h){return typeof h=="object"&&h!==null}I.isObject=rr;function nr(h){return me(h)==="[object Date]"}I.isDate=nr;function ar(h){return me(h)==="[object Error]"||h instanceof Error}I.isError=ar;function or(h){return typeof h=="function"}I.isFunction=or;function ur(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||typeof h=="symbol"||typeof h>"u"}I.isPrimitive=ur;I.isBuffer=require("buffer").Buffer.isBuffer;function me(h){return Object.prototype.toString.call(h)}});var Pt=_((On,It)=>{var bt=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,kt=h=>h<1e5?h<100?h<10?0:1:h<1e4?h<1e3?2:3:4:h<1e7?h<1e6?5:6:h<1e9?h<1e8?7:8:9;function Bt(h,e){if(h===e)return 0;if(~~h===h&&~~e===e){if(h===0||e===0)return h<e?-1:1;if(h<0||e<0){if(e>=0)return-1;if(h>=0)return 1;h=-h,e=-e}let u=kt(h),l=kt(e),o=0;return u<l?(h*=bt[l-u-1],e/=10,o=-1):u>l&&(e*=bt[u-l-1],h/=10,o=1),h===e?o:h<e?-1:1}let s=String(h),r=String(e);return s===r?0:s<r?-1:1}function hr(h){let e=0;for(;h>=32;)e|=h&1,h>>=1;return h+e}function Tt(h,e,s,r){let u=e+1;if(u===s)return 1;if(r(h[u++],h[e])<0){for(;u<s&&r(h[u],h[u-1])<0;)u++;Nt(h,e,u),Nt(F,e,u)}else for(;u<s&&r(h[u],h[u-1])>=0;)u++;return u-e}function Nt(h,e,s){for(s--;e<s;){let r=h[e];h[e++]=h[s],h[s--]=r}}function _t(h,e,s,r,u){for(r===e&&r++;r<s;r++){let l=h[r],o=F[r],D=e,m=r;for(;D<m;){let p=D+m>>>1;u(l,h[p])<0?m=p:D=p+1}let f=r-D;switch(f){case 3:h[D+3]=h[D+2],F[D+3]=F[D+2];case 2:h[D+2]=h[D+1],F[D+2]=F[D+1];case 1:h[D+1]=h[D],F[D+1]=F[D];break;default:for(;f>0;)h[D+f]=h[D+f-1],F[D+f]=F[D+f-1],f--}h[D]=l,F[D]=o}}function Je(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])>0){for(D=r-u;m<D&&l(h,e[s+u+m])>0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}else{for(D=u+1;m<D&&l(h,e[s+u-m])<=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D);let f=o;o=u-m,m=u-f}for(o++;o<m;){let f=o+(m-o>>>1);l(h,e[s+f])>0?o=f+1:m=f}return m}function Ue(h,e,s,r,u,l){let o=0,D=0,m=1;if(l(h,e[s+u])<0){for(D=u+1;m<D&&l(h,e[s+u-m])<0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D);let f=o;o=u-m,m=u-f}else{for(D=r-u;m<D&&l(h,e[s+u+m])>=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=u,m+=u}for(o++;o<m;){let f=o+(m-o>>>1);l(h,e[s+f])<0?m=f:o=f+1}return m}var ze=class{constructor(e,s){this.array=e,this.compare=s;let{length:r}=e;this.length=r,this.minGallop=7,this.tmpStorageLength=r<2*256?r>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=r<120?5:r<1542?10:r<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,s){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=s,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]&&e--;else if(this.runLength[e]>this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]<this.runLength[e+1]&&e--,this.mergeAt(e)}}mergeAt(e){let{compare:s}=this,{array:r}=this,u=this.runStart[e],l=this.runLength[e],o=this.runStart[e+1],D=this.runLength[e+1];this.runLength[e]=l+D,e===this.stackSize-3&&(this.runStart[e+1]=this.runStart[e+2],this.runLength[e+1]=this.runLength[e+2]),this.stackSize--;let m=Ue(r[o],r,u,l,0,s);u+=m,l-=m,l!==0&&(D=Je(r[u+l-1],r,o,D,D-1,s),D!==0&&(l<=D?this.mergeLow(u,l,o,D):this.mergeHigh(u,l,o,D)))}mergeLow(e,s,r,u){let{compare:l}=this,{array:o}=this,{tmp:D}=this,{tmpIndex:m}=this,f=0;for(f=0;f<s;f++)D[f]=o[e+f],m[f]=F[e+f];let p=0,d=r,c=e;if(o[c]=o[d],F[c]=F[d],c++,d++,--u===0){for(f=0;f<s;f++)o[c+f]=D[p+f],F[c+f]=m[p+f];return}if(s===1){for(f=0;f<u;f++)o[c+f]=o[d+f],F[c+f]=F[d+f];o[c+u]=D[p],F[c+u]=m[p];return}let{minGallop:t}=this;for(;;){let i=0,n=0,a=!1;do if(l(o[d],D[p])<0){if(o[c]=o[d],F[c]=F[d],c++,d++,n++,i=0,--u===0){a=!0;break}}else if(o[c]=D[p],F[c]=m[p],c++,p++,i++,n=0,--s===1){a=!0;break}while((i|n)<t);if(a)break;do{if(i=Ue(o[d],D,p,s,0,l),i!==0){for(f=0;f<i;f++)o[c+f]=D[p+f],F[c+f]=m[p+f];if(c+=i,p+=i,s-=i,s<=1){a=!0;break}}if(o[c]=o[d],F[c]=F[d],c++,d++,--u===0){a=!0;break}if(n=Je(D[p],o,d,u,0,l),n!==0){for(f=0;f<n;f++)o[c+f]=o[d+f],F[c+f]=F[d+f];if(c+=n,d+=n,u-=n,u===0){a=!0;break}}if(o[c]=D[p],F[c]=m[p],c++,p++,--s===1){a=!0;break}t--}while(i>=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),s===1){for(f=0;f<u;f++)o[c+f]=o[d+f],F[c+f]=F[d+f];o[c+u]=D[p],F[c+u]=m[p]}else{if(s===0)throw new Error("mergeLow preconditions were not respected");for(f=0;f<s;f++)o[c+f]=D[p+f],F[c+f]=m[p+f]}}mergeHigh(e,s,r,u){let{compare:l}=this,{array:o}=this,{tmp:D}=this,{tmpIndex:m}=this,f=0;for(f=0;f<u;f++)D[f]=o[r+f],m[f]=F[r+f];let p=e+s-1,d=u-1,c=r+u-1,t=0,i=0;if(o[c]=o[p],F[c]=F[p],c--,p--,--s===0){for(t=c-(u-1),f=0;f<u;f++)o[t+f]=D[f],F[t+f]=m[f];return}if(u===1){for(c-=s,p-=s,i=c+1,t=p+1,f=s-1;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,--s===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--u===1){E=!0;break}while((a|x)<n);if(E)break;do{if(a=s-Ue(D[d],o,e,s,s-1,l),a!==0){for(c-=a,p-=a,s-=a,i=c+1,t=p+1,f=a-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(s===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--u===1){E=!0;break}if(x=u-Je(o[p],D,0,u,u-1,l),x!==0){for(c-=x,d-=x,u-=x,i=c+1,t=d+1,f=0;f<x;f++)o[i+f]=D[t+f],F[i+f]=m[t+f];if(u<=1){E=!0;break}}if(o[c]=o[p],F[c]=F[p],c--,p--,--s===0){E=!0;break}n--}while(a>=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),u===1){for(c-=s,p-=s,i=c+1,t=p+1,f=s-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(u===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(u-1),f=0;f<u;f++)o[t+f]=D[f],F[t+f]=m[f]}}};function lr(h,e,s,r){if(!Array.isArray(h))throw new TypeError(`The "array" argument must be an array. Received ${h}`);F=[];let{length:u}=h,l=0;for(;l<u;)F[l]=l++;e?typeof e!="function"&&(r=s,s=e,e=Bt):e=Bt,s||(s=0),r||(r=u);let o=r-s;if(o<2)return F;let D=0;if(o<32)return D=Tt(h,s,r,e),_t(h,s,r,s+D,e),F;let m=new ze(h,e),f=hr(o);do{if(D=Tt(h,s,r,e),D<f){let p=o;p>f&&(p=f),_t(h,s,s+p,s+D,e),D=p}m.pushRun(s,D),m.mergeRuns(),o-=D,s+=D}while(o!==0);return m.forceMergeRuns(),F}It.exports={sort:lr}});var Mt=_((Mn,Ot)=>{"use strict";var cr=Object.prototype.hasOwnProperty;Ot.exports=(h,e)=>cr.call(h,e)});var ne=_((Ln,$t)=>{var Ve=Mt(),{isObject:Lt,isArray:pr,isString:fr,isNumber:mr}=de(),Ke="before",Rt="after-prop",Jt="after-colon",Ut="after-value",zt="after",Ht="before-all",jt="after-all",dr="[",xr="]",Dr="{",Er="}",gr=",",vr="",Cr="-",$e=[Ke,Rt,Jt,Ut,zt],Ar=[Ke,Ht,jt].map(Symbol.for),Vt=":",Xt=void 0,re=(h,e)=>Symbol.for(h+Vt+e),xe=(h,e,s)=>Object.defineProperty(h,e,{value:s,writable:!0,configurable:!0}),je=(h,e,s,r,u,l)=>{let o=re(u,r);if(!Ve(e,o))return;let D=s===r?o:re(u,s);xe(h,D,e[o]),l&&delete e[o]},Kt=(h,e,s,r,u)=>{$e.forEach(l=>{je(h,e,s,r,l,u)})},yr=(h,e,s)=>{e!==s&&$e.forEach(r=>{let u=re(r,s);if(!Ve(h,u)){je(h,h,s,e,r,!0);return}let l=h[u];delete h[u],je(h,h,s,e,r,!0),xe(h,re(r,e),l)})},He=(h,e)=>{Ar.forEach(s=>{let r=e[s];r&&xe(h,s,r)})},Sr=(h,e,s)=>(s.forEach(r=>{!fr(r)&&!mr(r)||Ve(e,r)&&(h[r]=e[r],Kt(h,e,r,r))}),h);$t.exports={SYMBOL_PREFIXES:$e,PREFIX_BEFORE:Ke,PREFIX_AFTER_PROP:Rt,PREFIX_AFTER_COLON:Jt,PREFIX_AFTER_VALUE:Ut,PREFIX_AFTER:zt,PREFIX_BEFORE_ALL:Ht,PREFIX_AFTER_ALL:jt,BRACKET_OPEN:dr,BRACKET_CLOSE:xr,CURLY_BRACKET_OPEN:Dr,CURLY_BRACKET_CLOSE:Er,COLON:Vt,COMMA:gr,MINUS:Cr,EMPTY:vr,UNDEFINED:Xt,symbol:re,define:xe,copy_comments:Kt,swap_comments:yr,assign_non_prop_comments:He,assign(h,e,s){if(!Lt(h))throw new TypeError("Cannot convert undefined or null to object");if(!Lt(e))return h;if(s===Xt)s=Object.keys(e),He(h,e);else if(pr(s))s.length===0&&He(h,e);else throw new TypeError("keys must be array or undefined");return Sr(h,e,s)}}});var Ge=_((Xn,Qt)=>{var{isArray:Fr}=de(),{sort:wr}=Pt(),{SYMBOL_PREFIXES:br,UNDEFINED:Gt,symbol:kr,copy_comments:Br,swap_comments:Yt}=ne(),Tr=h=>{let{length:e}=h,s=0,r=e/2;for(;s<r;s++)Yt(h,s,e-s-1)},Wt=(h,e,s,r,u)=>{Br(h,e,s+r,s,u)},Q=(h,e,s,r,u,l)=>{if(u>0){let D=r;for(;D-- >0;)Wt(h,e,s+D,u,l);return}let o=0;for(;o<r;){let D=o++;Wt(h,e,s+D,u,l)}},qt=(h,e)=>{br.forEach(s=>{let r=kr(s,e);delete h[r]})},Nr=(h,e)=>{let s=e;for(;s in h;)s=h[s];return s},Z=class extends Array{splice(...e){let{length:s}=this,r=super.splice(...e),[u,l,...o]=e;u<0&&(u+=s),arguments.length===1?l=s-u:l=Math.min(s-u,l);let{length:D}=o,m=D-l,f=u+l,p=s-f;return Q(this,this,f,p,m,!0),r}slice(...e){let{length:s}=this,r=super.slice(...e);if(!r.length)return new Z;let[u,l]=e;return l===Gt?l=s:l<0&&(l+=s),u<0?u+=s:u===Gt&&(u=0),Q(r,this,u,l-u,-u),r}unshift(...e){let{length:s}=this,r=super.unshift(...e),{length:u}=e;return u>0&&Q(this,this,0,s,u,!0),r}shift(){let e=super.shift(),{length:s}=this;return qt(this,0),Q(this,this,1,s,-1,!0),e}reverse(){return super.reverse(),Tr(this),this}pop(){let e=super.pop();return qt(this,this.length),e}concat(...e){let{length:s}=this,r=super.concat(...e);return e.length&&(Q(r,this,0,this.length,0),e.forEach(u=>{let l=s;s+=Fr(u)?u.length:1,u instanceof Z&&Q(r,u,0,u.length,l)})),r}sort(...e){let s=wr(this,...e.slice(0,1)),r=Object.create(null);return s.forEach((u,l)=>{if(u===l)return;let o=Nr(r,u);o!==l&&(r[l]=o,Yt(this,l,o))}),this}};Qt.exports={CommentArray:Z}});var di=_((Rn,mi)=>{var _r=wt(),{CommentArray:Ir}=Ge(),{PREFIX_BEFORE:Ee,PREFIX_AFTER_PROP:Pr,PREFIX_AFTER_COLON:Or,PREFIX_AFTER_VALUE:ii,PREFIX_AFTER:qe,PREFIX_BEFORE_ALL:Mr,PREFIX_AFTER_ALL:Lr,BRACKET_OPEN:Xr,BRACKET_CLOSE:Zt,CURLY_BRACKET_OPEN:Rr,CURLY_BRACKET_CLOSE:ei,COLON:si,COMMA:ri,MINUS:ti,EMPTY:Jr,UNDEFINED:Ce,define:Ye,assign_non_prop_comments:Ur}=ne(),ni=h=>_r.tokenize(h,{comment:!0,loc:!0}),Qe=[],K=null,z=null,Ze=[],$,ai=!1,oi=!1,ae=null,oe=null,P=null,ui,ge=null,hi=()=>{Ze.length=Qe.length=0,oe=null,$=Ce},zr=()=>{hi(),ae.length=0,z=K=ae=oe=P=ge=null},et=h=>Symbol.for($!==Ce?h+si+$:h),tt=(h,e)=>ge?ge(h,e):e,li=()=>{let h=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(h,P.loc.start),h},ci=()=>{let h=new SyntaxError("Unexpected end of JSON input");throw Object.assign(h,oe?oe.loc.end:{line:1,column:0}),h},R=()=>{let h=ae[++ui];oi=P&&h&&P.loc.end.line===h.loc.start.line||!1,oe=P,P=h},We=()=>(P||ci(),P.type==="Punctuator"?P.value:P.type),W=h=>We()===h,De=h=>{W(h)||li()},it=h=>{Qe.push(K),K=h},st=()=>{K=Qe.pop()},pi=()=>{if(!z)return;let h=[];for(let s of z)if(s.inline)h.push(s);else break;let{length:e}=h;e&&(e===z.length?z=null:z.splice(0,e),Ye(K,et(qe),h))},V=h=>{z&&(Ye(K,et(h),z),z=null)},H=h=>{let e=[];for(;P&&(W("LineComment")||W("BlockComment"));){let s={...P,inline:oi};e.push(s),R()}if(!ai&&e.length){if(h){Ye(K,et(h),e);return}z=e}},ve=(h,e)=>{e&&Ze.push($),$=h},fi=()=>{$=Ze.pop()},Hr=()=>{let h={};it(h),ve(Ce,!0);let e=!1,s;for(H();!W(ei)&&!(e&&(V(ii),De(ri),R(),H(),pi(),W(ei)));)e=!0,De("String"),s=JSON.parse(P.value),ve(s),V(Ee),R(),H(Pr),De(si),R(),H(Or),h[s]=tt(s,rt()),H();return e&&V(qe),R(),$=void 0,e||V(Ee),st(),fi(),h},jr=()=>{let h=new Ir;it(h),ve(Ce,!0);let e=!1,s=0;for(H();!W(Zt)&&!(e&&(V(ii),De(ri),R(),H(),pi(),W(Zt)));)e=!0,ve(s),V(Ee),h[s]=tt(s,rt()),s++,H();return e&&V(qe),R(),$=void 0,e||V(Ee),st(),fi(),h};function rt(){let h=We();if(h===Rr)return R(),Hr();if(h===Xr)return R(),jr();let e=Jr;h===ti&&(R(),h=We(),e=ti);let s;switch(h){case"String":case"Boolean":case"Null":case"Numeric":return s=P.value,R(),JSON.parse(e+s);default:}}var Vr=h=>Object(h)===h,Kr=(h,e,s)=>{hi(),ae=ni(h),ge=e,ai=s,ae.length||ci(),ui=-1,R(),it({}),H(Mr);let r=rt();return H(Lr),P&&li(),!s&&r!==null&&(Vr(r)||(r=new Object(r)),Ur(r,K)),st(),r=tt("",r),zr(),r};mi.exports={parse:Kr,tokenize:ni}});var Di=_((Jn,xi)=>{"use strict";var j="",nt;xi.exports=$r;function $r(h,e){if(typeof h!="string")throw new TypeError("expected a string");if(e===1)return h;if(e===2)return h+h;var s=h.length*e;if(nt!==h||typeof nt>"u")nt=h,j="";else if(j.length>=s)return j.substr(0,s);for(;s>j.length&&e>1;)e&1&&(j+=h),e>>=1,h+=h;return j+=h,j=j.substr(0,s),j}});var ki=_((Un,bi)=>{var{isArray:ut,isObject:Ei,isFunction:ot,isNumber:Gr,isString:Wr}=de(),qr=Di(),{PREFIX_BEFORE_ALL:Yr,PREFIX_BEFORE:gi,PREFIX_AFTER_PROP:Qr,PREFIX_AFTER_COLON:Zr,PREFIX_AFTER_VALUE:en,PREFIX_AFTER:ht,PREFIX_AFTER_ALL:tn,BRACKET_OPEN:sn,BRACKET_CLOSE:rn,CURLY_BRACKET_OPEN:nn,CURLY_BRACKET_CLOSE:an,COLON:on,COMMA:vi,EMPTY:X,UNDEFINED:un}=ne(),at=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,lt=" ",q=`
|
|
`,Ci="null",Ai=h=>`${gi}:${h}`,hn=h=>`${Qr}:${h}`,ln=h=>`${Zr}:${h}`,yi=h=>`${en}:${h}`,Si=h=>`${ht}:${h}`,cn={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},pn=h=>(at.lastIndex=0,at.test(h)?h.replace(at,e=>{let s=cn[e];return typeof s=="string"?s:e}):h),Fi=h=>`"${pn(h)}"`,fn=(h,e)=>e?`//${h}`:`/*${h}*/`,L=(h,e,s,r)=>{let u=h[Symbol.for(e)];if(!u||!u.length)return X;let l=!1,o=u.reduce((D,{inline:m,type:f,value:p})=>{let d=m?lt:q+s;return l=f==="LineComment",D+d+fn(p,l)},X);return r||l?o+q+s:o},ee=null,he=X,mn=()=>{ee=null,he=X},ue=(h,e,s)=>h?e?h+e.trim()+q+s:h.trimRight()+q+s:e?e.trimRight()+q+s:X,wi=(h,e,s)=>{let r=L(e,gi,s+he,!0);return ue(r,h,s)},dn=(h,e)=>{let s=e+he,{length:r}=h,u=X,l=X;for(let o=0;o<r;o++){o!==0&&(u+=vi);let D=ue(l,L(h,Ai(o),s),s);u+=D||q+s,u+=ct(o,h,s)||Ci,u+=L(h,yi(o),s),l=L(h,Si(o),s)}return u+=ue(l,L(h,ht,s),s),sn+wi(u,h,e)+rn},xn=(h,e)=>{if(!h)return"null";let s=e+he,r=X,u=X,l=!0,o=ut(ee)?ee:Object.keys(h),D=m=>{let f=ct(m,h,s);if(f===un)return;l||(r+=vi),l=!1;let p=ue(u,L(h,Ai(m),s),s);r+=p||q+s,r+=Fi(m)+L(h,hn(m),s)+on+L(h,ln(m),s)+lt+f+L(h,yi(m),s),u=L(h,Si(m),s)};return o.forEach(D),r+=ue(u,L(h,ht,s),s),nn+wi(r,h,e)+an};function ct(h,e,s){let r=e[h];switch(Ei(r)&&ot(r.toJSON)&&(r=r.toJSON(h)),ot(ee)&&(r=ee.call(e,h,r)),typeof r){case"string":return Fi(r);case"number":return Number.isFinite(r)?String(r):Ci;case"boolean":case"null":return String(r);case"object":return ut(r)?dn(r,s):xn(r,s);default:}}var Dn=h=>Wr(h)?h:Gr(h)?qr(lt,h):X,{toString:En}=Object.prototype,gn=["[object Number]","[object String]","[object Boolean]"],vn=h=>{if(typeof h!="object")return!1;let e=En.call(h);return gn.includes(e)};bi.exports=(h,e,s)=>{let r=Dn(s);if(!r)return JSON.stringify(h,e);!ot(e)&&!ut(e)&&(e=null),ee=e,he=r;let u=vn(h)?JSON.stringify(h):ct("",{"":h},X);return mn(),Ei(h)?L(h,Yr,X).trimLeft()+u+L(h,tn,X).trimRight():u}});var Ti=_((zn,Bi)=>{var{parse:Cn,tokenize:An}=di(),yn=ki(),{CommentArray:Sn}=Ge(),{assign:Fn}=ne();Bi.exports={parse:Cn,stringify:yn,tokenize:An,CommentArray:Sn,assign:Fn}});var Ae=Fe(Ft()),_i=require("path");var le=Fe(Ti()),ce=require("fs/promises"),J=Fe(require("path"));async function Ni(h,e,s,r,u){let l=(0,le.parse)((await(0,ce.readFile)((0,J.join)(process.cwd(),s,"rush.json"))).toString()),o=(0,J.join)(e,"rush.json"),D=J.default.resolve(e).split(J.default.sep),m=[];for(let f of[(0,J.join)(s,"rush.json"),...h]){let p=J.default.dirname(J.default.resolve(f)).split(J.default.sep),d=J.default.join(...p.slice(D.length));console.log("processing",d);let c=await(0,le.parse)((await(0,ce.readFile)(f)).toString()),t=c.projects;for(let[i,n]of Object.entries(c))l[i]=n;m.push(...t.filter(i=>wn(i,r,u)).map(i=>({...i,projectFolder:(0,J.join)(d,i.projectFolder),shouldPublish:d==="."?i.shouldPublish:!1})))}l.projects=m,await(0,ce.writeFile)(o,(0,le.stringify)(l,void 0,2))}function wn(h,e,s){let r=h.packageName;for(let u of e)if(r.includes(u))return console.log("Include",r,u),!0;for(let u of s)if(r.includes(u))return console.log("Exclude",r,u),!1;return console.log("Default",r),!0}console.info("Anticrm Platform Manager");Ae.program.version("0.6.0");Ae.program.command("rush-sync <root>").description("Synchronized rush.js files with platform.").option("-e, --exclude <exclude>","List of exclude patterns to override excludes (comma separated)","").option("-i, --include <include>","List of include patterns to override excludes (comma separated)","").option("-s, --source <source>","Comma separated list of rush_source.json files","rush_source.json").action(async(h,e)=>{await Ni(e.source.split(",").map(s=>(0,_i.join)(process.cwd(),s.trim())),process.cwd(),h,e.include.split(",").map(s=>s.trim()).filter(s=>s.length>0),e.exclude.split(",").map(s=>s.trim()).filter(s=>s.length>0))});Ae.program.parse(process.argv);
|
|
/*! Bundled license information:
|
|
|
|
repeat-string/index.js:
|
|
(*!
|
|
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
|
*
|
|
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*)
|
|
*/
|