@layerzerolabs/verify-contract 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -11
- package/cli.js +3 -0
- package/dist/antlr/SolidityLexer.tokens +249 -0
- package/dist/cli.js +495 -0
- package/dist/index.d.mts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +1769 -12518
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1769 -12518
- package/dist/index.mjs.map +1 -1
- package/package.json +33 -39
- package/cli/index.js +0 -26
- /package/{cli → dist/antlr}/Solidity.tokens +0 -0
package/dist/cli.js
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jE = require('assert');
|
|
4
|
+
var J8 = require('path');
|
|
5
|
+
var LO = require('events');
|
|
6
|
+
var cx = require('process');
|
|
7
|
+
var buffer = require('buffer');
|
|
8
|
+
var IO = require('stream');
|
|
9
|
+
var Ju = require('url');
|
|
10
|
+
var P5 = require('http');
|
|
11
|
+
var util = require('util');
|
|
12
|
+
var PO = require('crypto');
|
|
13
|
+
var ZO = require('net');
|
|
14
|
+
var tls = require('tls');
|
|
15
|
+
var I5 = require('https');
|
|
16
|
+
var dns = require('dns');
|
|
17
|
+
var iF = require('os');
|
|
18
|
+
var fs = require('fs');
|
|
19
|
+
|
|
20
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
|
|
22
|
+
var jE__default = /*#__PURE__*/_interopDefault(jE);
|
|
23
|
+
var J8__default = /*#__PURE__*/_interopDefault(J8);
|
|
24
|
+
var LO__default = /*#__PURE__*/_interopDefault(LO);
|
|
25
|
+
var cx__default = /*#__PURE__*/_interopDefault(cx);
|
|
26
|
+
var IO__default = /*#__PURE__*/_interopDefault(IO);
|
|
27
|
+
var Ju__default = /*#__PURE__*/_interopDefault(Ju);
|
|
28
|
+
var P5__default = /*#__PURE__*/_interopDefault(P5);
|
|
29
|
+
var PO__default = /*#__PURE__*/_interopDefault(PO);
|
|
30
|
+
var ZO__default = /*#__PURE__*/_interopDefault(ZO);
|
|
31
|
+
var I5__default = /*#__PURE__*/_interopDefault(I5);
|
|
32
|
+
var iF__default = /*#__PURE__*/_interopDefault(iF);
|
|
33
|
+
|
|
34
|
+
var KR=Object.create;var No=Object.defineProperty;var GR=Object.getOwnPropertyDescriptor;var WR=Object.getOwnPropertyNames;var YR=Object.getPrototypeOf,ZR=Object.prototype.hasOwnProperty;var XR=(t,e,r)=>e in t?No(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var me=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var JR=(t,e)=>()=>(t&&(e=t(t=0)),e);var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),QR=(t,e)=>{for(var r in e)No(t,r,{get:e[r],enumerable:!0});},fg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of WR(e))!ZR.call(t,n)&&n!==r&&No(t,n,{get:()=>e[n],enumerable:!(i=GR(e,n))||i.enumerable});return t};var $t=(t,e,r)=>(r=t!=null?KR(YR(t)):{},fg(e||!t||!t.__esModule?No(r,"default",{value:t,enumerable:!0}):r,t)),e4=t=>fg(No({},"__esModule",{value:!0}),t);var Oo=(t,e,r)=>(XR(t,typeof e!="symbol"?e+"":e,r),r);var Fo=z(of=>{var wu=class extends Error{constructor(e,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0;}},sf=class extends wu{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};of.CommanderError=wu;of.InvalidArgumentError=sf;});var Du=z(uf=>{var{InvalidArgumentError:t4}=Fo(),af=class{constructor(e,r){switch(this.description=r||"",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,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new t4(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r4(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}uf.Argument=af;uf.humanReadableArgName=r4;});var hf=z(dg=>{var{humanReadableArgName:i4}=Du(),lf=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1;}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden);if(e._hasImplicitHelpCommand()){let[,i,n]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),o=e.createCommand(i).helpOption(!1);o.description(e._helpCommandDescription),n&&o.arguments(n),r.push(o);}return this.sortSubcommands&&r.sort((i,n)=>i.name().localeCompare(n.name())),r}compareOptions(e,r){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(e).localeCompare(i(r))}visibleOptions(e){let r=e.options.filter(o=>!o.hidden),i=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),n=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(i||n){let o;i?n?o=e.createOption(e._helpFlags,e._helpDescription):o=e.createOption(e._helpShortFlag,e._helpDescription):o=e.createOption(e._helpLongFlag,e._helpDescription),r.push(o);}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return [];let r=[];for(let i=e.parent;i;i=i.parent){let n=i.options.filter(o=>!o.hidden);r.push(...n);}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||"";}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(i=>i4(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((i,n)=>Math.max(i,r.subcommandTerm(n).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((i,n)=>Math.max(i,r.optionTerm(n).length),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((i,n)=>Math.max(i,r.optionTerm(n).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((i,n)=>Math.max(i,r.argumentTerm(n).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,r){let i=r.padWidth(e,r),n=r.helpWidth||80,o=2,s=2;function a(m,_){if(_){let x=`${m.padEnd(i+s)}${_}`;return r.wrap(x,n-o,i+s)}return m}function u(m){return m.join(`
|
|
35
|
+
`).replace(/^/gm," ".repeat(o))}let l=[`Usage: ${r.commandUsage(e)}`,""],h=r.commandDescription(e);h.length>0&&(l=l.concat([r.wrap(h,n,0),""]));let c=r.visibleArguments(e).map(m=>a(r.argumentTerm(m),r.argumentDescription(m)));c.length>0&&(l=l.concat(["Arguments:",u(c),""]));let p=r.visibleOptions(e).map(m=>a(r.optionTerm(m),r.optionDescription(m)));if(p.length>0&&(l=l.concat(["Options:",u(p),""])),this.showGlobalOptions){let m=r.visibleGlobalOptions(e).map(_=>a(r.optionTerm(_),r.optionDescription(_)));m.length>0&&(l=l.concat(["Global Options:",u(m),""]));}let f=r.visibleCommands(e).map(m=>a(r.subcommandTerm(m),r.subcommandDescription(m)));return f.length>0&&(l=l.concat(["Commands:",u(f),""])),l.join(`
|
|
36
|
+
`)}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}wrap(e,r,i,n=40){let o=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${o}]+`);if(e.match(s))return e;let a=r-i;if(a<n)return e;let u=e.slice(0,i),l=e.slice(i).replace(`\r
|
|
37
|
+
`,`
|
|
38
|
+
`),h=" ".repeat(i),p="\\s\u200B",f=new RegExp(`
|
|
39
|
+
|.{1,${a-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g"),m=l.match(f)||[];return u+m.map((_,x)=>_===`
|
|
40
|
+
`?"":(x>0?h:"")+_.trimEnd()).join(`
|
|
41
|
+
`)}};dg.Help=lf;});var df=z(Su=>{var{InvalidArgumentError:n4}=Fo(),cf=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=pg(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0;}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new n4(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return s4(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return !this.required&&!this.optional&&!this.negate}},ff=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r);}),this.negativeOptions.forEach((r,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i);});}valueFromOption(e,r){let i=r.attributeName();if(!this.dualOptions.has(i))return !0;let n=this.negativeOptions.get(i).presetArg,o=n!==void 0?n:!1;return r.negate===(o===e)}};function s4(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function pg(t){let e,r,i=t.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),r=i.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}Su.Option=cf;Su.splitOptionFlags=pg;Su.DualOptions=ff;});var _g=z(mg=>{function o4(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let i=0;i<=t.length;i++)r[i]=[i];for(let i=0;i<=e.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++){let o=1;t[n-1]===e[i-1]?o=0:o=1,r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+o),n>1&&i>1&&t[n-1]===e[i-2]&&t[n-2]===e[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1));}return r[t.length][e.length]}function a4(t,e){if(!e||e.length===0)return "";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let i=[],n=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=o4(t,s),u=Math.max(t.length,s.length);(u-a)/u>o&&(a<n?(n=a,i=[s]):a===n&&i.push(s));}),i.sort((s,a)=>s.localeCompare(a)),r&&(i=i.map(s=>`--${s}`)),i.length>1?`
|
|
42
|
+
(Did you mean one of ${i.join(", ")}?)`:i.length===1?`
|
|
43
|
+
(Did you mean ${i[0]}?)`:""}mg.suggestSimilar=a4;});var bg=z(Eg=>{var u4=me("events").EventEmitter,pf=me("child_process"),di=me("path"),mf=me("fs"),At=me("process"),{Argument:l4,humanReadableArgName:h4}=Du(),{CommanderError:_f}=Fo(),{Help:c4}=hf(),{Option:gg,splitOptionFlags:f4,DualOptions:d4}=df(),{suggestSimilar:yg}=_g(),gf=class t extends u4{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,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._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:r=>At.stdout.write(r),writeErr:r=>At.stderr.write(r),getOutHelpWidth:()=>At.stdout.isTTY?At.stdout.columns:void 0,getErrHelpWidth:()=>At.stderr.isTTY?At.stderr.columns:void 0,outputError:(r,i)=>i(r)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={};}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let r=this;r;r=r.parent)e.push(r);return e}command(e,r,i){let n=r,o=i;typeof n=="object"&&n!==null&&(o=n,n=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return n&&(u.description(n),u._executableHandler=!0),o.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(o.noHelp||o.hidden),u._executableFile=o.executableFile||null,a&&u.arguments(a),this.commands.push(u),u.parent=this,u.copyInheritedSettings(this),n?this:u}createCommand(e){return new t(e)}createHelp(){return Object.assign(new c4,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
44
|
+
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,r){return new l4(e,r)}argument(e,r,i,n){let o=this.createArgument(e,r);return typeof i=="function"?o.default(n).argParser(i):o.default(i),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r);}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}addHelpCommand(e,r){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=r||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,r){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
45
|
+
Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,i){this._exitCallback&&this._exitCallback(new _f(e,r,i)),At.exit(e);}action(e){let r=i=>{let n=this.registeredArguments.length,o=i.slice(0,n);return this._storeOptionsAsProperties?o[n]=this:o[n]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=r,this}createOption(e,r){return new gg(e,r)}_callParseArg(e,r,i,n){try{return e.parseArg(r,i)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${n} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code});}throw o}}addOption(e){let r=e.name(),i=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default");}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");this.options.push(e);let n=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let u=this.getOptionValue(i);o!==null&&e.parseArg?o=this._callParseArg(e,o,u,s):o!==null&&e.variadic&&(o=e._concatValue(o,u)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,a);};return this.on("option:"+r,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;n(o,s,"cli");}),e.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;n(o,s,"env");}),this}_optionEx(e,r,i,n,o){if(typeof r=="object"&&r instanceof gg)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,i);if(s.makeOptionMandatory(!!e.mandatory),typeof n=="function")s.default(o).argParser(n);else if(n instanceof RegExp){let a=n;n=(u,l)=>{let h=a.exec(u);return h?h[0]:l},s.default(o).argParser(n);}else s.default(n);return this.addOption(s)}option(e,r,i,n){return this._optionEx({},e,r,i,n)}requiredOption(e,r,i,n){return this._optionEx({mandatory:!0},e,r,i,n)}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.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,i){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(r=i.getOptionValueSource(e));}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");r=r||{},e===void 0&&(e=At.argv,At.versions&&At.versions.electron&&(r.from="electron")),this.rawArgs=e.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":At.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return !this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,r){let i=this._prepareUserArgs(e,r);return this._parseCommand([],i),this}async parseAsync(e,r){let i=this._prepareUserArgs(e,r);return await this._parseCommand([],i),this}_executeSubCommand(e,r){r=r.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function o(h,c){let p=di.resolve(h,c);if(mf.existsSync(p))return p;if(n.includes(di.extname(c)))return;let f=n.find(m=>mf.existsSync(`${p}${m}`));if(f)return `${p}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let h;try{h=mf.realpathSync(this._scriptPath);}catch(c){h=this._scriptPath;}a=di.resolve(di.dirname(h),a);}if(a){let h=o(a,s);if(!h&&!e._executableFile&&this._scriptPath){let c=di.basename(this._scriptPath,di.extname(this._scriptPath));c!==this._name&&(h=o(a,`${c}-${e._name}`));}s=h||s;}i=n.includes(di.extname(s));let u;At.platform!=="win32"?i?(r.unshift(s),r=vg(At.execArgv).concat(r),u=pf.spawn(At.argv[0],r,{stdio:"inherit"})):u=pf.spawn(s,r,{stdio:"inherit"}):(r.unshift(s),r=vg(At.execArgv).concat(r),u=pf.spawn(At.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{At.on(c,()=>{u.killed===!1&&u.exitCode===null&&u.kill(c);});});let l=this._exitCallback;l?u.on("close",()=>{l(new _f(At.exitCode||0,"commander.executeSubCommandAsync","(close)"));}):u.on("close",At.exit.bind(At)),u.on("error",h=>{if(h.code==="ENOENT"){let c=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",p=`'${s}' does not exist
|
|
46
|
+
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
47
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
48
|
+
- ${c}`;throw new Error(p)}else if(h.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)At.exit(1);else {let c=new _f(1,"commander.executeSubCommandAsync","(error)");c.nestedError=h,l(c);}}),this.runningCommand=u;}_dispatchSubcommand(e,r,i){let n=this._findCommand(e);n||this.help({error:!0});let o;return o=this._chainOrCallSubCommandHook(o,n,"preSubcommand"),o=this._chainOrCall(o,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(i));else return n._parseCommand(r,i)}),o}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name());}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args);}_processArguments(){let e=(i,n,o)=>{let s=n;if(n!==null&&i.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,n,o,a);}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((i,n)=>{let o=i.defaultValue;i.variadic?n<this.args.length?(o=this.args.slice(n),i.parseArg&&(o=o.reduce((s,a)=>e(i,a,s),i.defaultValue))):o===void 0&&(o=[]):n<this.args.length&&(o=this.args[n],i.parseArg&&(o=e(i,o,i.defaultValue))),r[n]=o;}),this.processedArgs=r;}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let i=e,n=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:o,callback:s});});}),r==="postAction"&&n.reverse(),n.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this));}),i}_chainOrCallSubCommandHook(e,r,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{n=this._chainOrCall(n,()=>o(this,r));}),n}_parseCommand(e,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),r=i.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return xg(this,r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),xg(this,i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0]);},o=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,r);})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(n(),this._processArguments());}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments());}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r);});});}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(o=>i.conflictsWith.includes(o.attributeName()));n&&this._conflictingOption(i,n);});}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions();});}parseOptions(e){let r=[],i=[],n=r,o=e.slice();function s(u){return u.length>1&&u[0]==="-"}let a=null;for(;o.length;){let u=o.shift();if(u==="--"){n===i&&n.push(u),n.push(...o);break}if(a&&!s(u)){this.emit(`option:${a.name()}`,u);continue}if(a=null,s(u)){let l=this._findOption(u);if(l){if(l.required){let h=o.shift();h===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,h);}else if(l.optional){let h=null;o.length>0&&!s(o[0])&&(h=o.shift()),this.emit(`option:${l.name()}`,h);}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),o.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),h=this._findOption(u.slice(0,l));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,u.slice(l+1));continue}}if(s(u)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(u)){r.push(u),o.length>0&&i.push(...o);break}else if(u===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(u),o.length>0&&r.push(...o);break}else if(this._defaultCommandName){i.push(u),o.length>0&&i.push(...o);break}}if(this._passThroughOptions){n.push(u),o.length>0&&n.push(...o);break}n.push(u);}return {operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n];}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
|
|
49
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
50
|
+
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
51
|
+
`),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,o=i.code||"commander.error";this._exit(n,o,e);}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in At.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,At.env[e.envVar]):this.emit(`optionEnv:${e.name()}`));}});}_parseOptionsImplied(){let e=new d4(this.options),r=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&r(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied");});});}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"});}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"});}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"});}_conflictingOption(e,r){let i=s=>{let a=s.attributeName(),u=this.getOptionValue(a),l=this.options.find(c=>c.negate&&a===c.attributeName()),h=this.options.find(c=>!c.negate&&a===c.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:h||s},n=s=>{let a=i(s),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${n(e)} cannot be used with ${n(r)}`;this.error(o,{code:"commander.conflictingOption"});}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);n=n.concat(s),o=o.parent;}while(o&&!o._enablePositionalOptions);r=yg(e,n);}let i=`error: unknown option '${e}'${r}`;this.error(i,{code:"commander.unknownOption"});}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,i=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${i} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"});}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(o=>{n.push(o.name()),o.alias()&&n.push(o.alias());}),r=yg(e,n);}let i=`error: unknown command '${e}'${r}`;this.error(i,{code:"commander.unknownCommand"});}version(e,r,i){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",i=i||"output the version number";let n=this.createOption(r,i);return this._versionOptionName=n.attributeName(),this.options.push(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
52
|
+
`),this._exit(0,"commander.version",e);}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>h4(i));return [].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=di.basename(e,di.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},i;return r.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),r.write=e.write||i,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._helpLongFlag&&this.emit(this._helpLongFlag),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i));}helpOption(e,r){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=r||this._helpDescription;let i=f4(this._helpFlags);return this._helpShortFlag=i.shortFlag,this._helpLongFlag=i.longFlag,this}help(e){this.outputHelp(e);let r=At.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)");}addHelpText(e,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
53
|
+
Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
|
|
54
|
+
`);}),this}};function xg(t,e){t._hasHelpOption&&e.find(i=>i===t._helpLongFlag||i===t._helpShortFlag)&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"));}function vg(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,i="127.0.0.1",n="9229",o;return (o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?n=o[3]:i=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],n=o[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:e})}Eg.Command=gf;});var wg=z((kr,Ag)=>{var{Argument:p4}=Du(),{Command:Tg}=bg(),{CommanderError:m4,InvalidArgumentError:Cg}=Fo(),{Help:_4}=hf(),{Option:g4}=df();kr=Ag.exports=new Tg;kr.program=kr;kr.Command=Tg;kr.Option=g4;kr.Argument=p4;kr.Help=_4;kr.CommanderError=m4;kr.InvalidArgumentError=Cg;kr.InvalidOptionArgumentError=Cg;});var yf=z((FU,Fg)=>{Fg.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var xf=z((LU,Pg)=>{var Lo=yf(),Lg={};for(let t of Object.keys(Lo))Lg[Lo[t]]=t;var Ae={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Pg.exports=Ae;for(let t of Object.keys(Ae)){if(!("channels"in Ae[t]))throw new Error("missing channels property: "+t);if(!("labels"in Ae[t]))throw new Error("missing channel labels property: "+t);if(Ae[t].labels.length!==Ae[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=Ae[t];delete Ae[t].channels,delete Ae[t].labels,Object.defineProperty(Ae[t],"channels",{value:e}),Object.defineProperty(Ae[t],"labels",{value:r});}Ae.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),o=Math.max(e,r,i),s=o-n,a,u;o===n?a=0:e===o?a=(r-i)/s:r===o?a=2+(i-e)/s:i===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let l=(n+o)/2;return o===n?u=0:l<=.5?u=s/(o+n):u=s/(2-o-n),[a,u*100,l*100]};Ae.rgb.hsv=function(t){let e,r,i,n,o,s=t[0]/255,a=t[1]/255,u=t[2]/255,l=Math.max(s,a,u),h=l-Math.min(s,a,u),c=function(p){return (l-p)/6/h+1/2};return h===0?(n=0,o=0):(o=h/l,e=c(s),r=c(a),i=c(u),s===l?n=i-r:a===l?n=1/3+e-i:u===l&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,o*100,l*100]};Ae.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=Ae.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,o*100,i*100]};Ae.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(1-e,1-r,1-i),o=(1-e-n)/(1-n)||0,s=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return [o*100,s*100,a*100,n*100]};function x4(t,e){return (t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}Ae.rgb.keyword=function(t){let e=Lg[t];if(e)return e;let r=1/0,i;for(let n of Object.keys(Lo)){let o=Lo[n],s=x4(t,o);s<r&&(r=s,i=n);}return i};Ae.keyword.rgb=function(t){return Lo[t]};Ae.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let n=e*.4124+r*.3576+i*.1805,o=e*.2126+r*.7152+i*.0722,s=e*.0193+r*.1192+i*.9505;return [n*100,o*100,s*100]};Ae.rgb.lab=function(t){let e=Ae.rgb.xyz(t),r=e[0],i=e[1],n=e[2];r/=95.047,i/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let o=116*i-16,s=500*(r-i),a=200*(i-n);return [o,s,a]};Ae.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n,o,s;if(r===0)return s=i*255,[s,s,s];i<.5?n=i*(1+r):n=i+r-i*r;let a=2*i-n,u=[0,0,0];for(let l=0;l<3;l++)o=e+1/3*-(l-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(n-a)*6*o:2*o<1?s=n:3*o<2?s=a+(n-a)*(2/3-o)*6:s=a,u[l]=s*255;return u};Ae.hsl.hsv=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=r,o=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=o<=1?o:2-o;let s=(i+r)/2,a=i===0?2*n/(o+n):2*r/(i+r);return [e,a*100,s*100]};Ae.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,o=e-Math.floor(e),s=255*i*(1-r),a=255*i*(1-r*o),u=255*i*(1-r*(1-o));switch(i*=255,n){case 0:return [i,u,s];case 1:return [a,i,s];case 2:return [s,i,u];case 3:return [s,a,i];case 4:return [u,s,i];case 5:return [i,s,a]}};Ae.hsv.hsl=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),o,s;s=(2-r)*i;let a=(2-r)*n;return o=r*n,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};Ae.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,o;n>1&&(r/=n,i/=n);let s=Math.floor(6*e),a=1-i;o=6*e-s,s&1&&(o=1-o);let u=r+o*(a-r),l,h,c;switch(s){default:case 6:case 0:l=a,h=u,c=r;break;case 1:l=u,h=a,c=r;break;case 2:l=r,h=a,c=u;break;case 3:l=r,h=u,c=a;break;case 4:l=u,h=r,c=a;break;case 5:l=a,h=r,c=u;break}return [l*255,h*255,c*255]};Ae.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,o=1-Math.min(1,e*(1-n)+n),s=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return [o*255,s*255,a*255]};Ae.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n,o,s;return n=e*3.2406+r*-1.5372+i*-.4986,o=e*-.9689+r*1.8758+i*.0415,s=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,n=Math.min(Math.max(0,n),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[n*255,o*255,s*255]};Ae.xyz.lab=function(t){let e=t[0],r=t[1],i=t[2];e/=95.047,r/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let n=116*r-16,o=500*(e-r),s=200*(r-i);return [n,o,s]};Ae.lab.xyz=function(t){let e=t[0],r=t[1],i=t[2],n,o,s;o=(e+16)/116,n=r/500+o,s=o-i/200;let a=o**3,u=n**3,l=s**3;return o=a>.008856?a:(o-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,s=l>.008856?l:(s-16/116)/7.787,n*=95.047,o*=100,s*=108.883,[n,o,s]};Ae.lab.lch=function(t){let e=t[0],r=t[1],i=t[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let s=Math.sqrt(r*r+i*i);return [e,s,n]};Ae.lch.lab=function(t){let e=t[0],r=t[1],n=t[2]/360*2*Math.PI,o=r*Math.cos(n),s=r*Math.sin(n);return [e,o,s]};Ae.rgb.ansi16=function(t,e=null){let[r,i,n]=t,o=e===null?Ae.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};Ae.hsv.ansi16=function(t){return Ae.rgb.ansi16(Ae.hsv.rgb(t),t[2])};Ae.rgb.ansi256=function(t){let e=t[0],r=t[1],i=t[2];return e===r&&r===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};Ae.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return [i,n,o]};Ae.ansi256.rgb=function(t){if(t>=232){let o=(t-232)*10+8;return [o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return [r,i,n]};Ae.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return "000000".substring(r.length)+r};Ae.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return [0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let i=parseInt(r,16),n=i>>16&255,o=i>>8&255,s=i&255;return [n,o,s]};Ae.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),o=Math.min(Math.min(e,r),i),s=n-o,a,u;return s<1?a=o/(1-s):a=0,s<=0?u=0:n===e?u=(r-i)/s%6:n===r?u=2+(i-e)/s:u=4+(e-r)/s,u/=6,u%=1,[u*360,s*100,a*100]};Ae.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=r<.5?2*e*r:2*e*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};Ae.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};Ae.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return [i*255,i*255,i*255];let n=[0,0,0],o=e%1*6,s=o%1,a=1-s,u=0;switch(Math.floor(o)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=a,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=a,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=a;}return u=(1-r)*i,[(r*n[0]+u)*255,(r*n[1]+u)*255,(r*n[2]+u)*255]};Ae.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};Ae.hcg.hsl=function(t){let e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};Ae.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return [t[0],(i-e)*100,(1-i)*100]};Ae.hwb.hcg=function(t){let e=t[1]/100,i=1-t[2]/100,n=i-e,o=0;return n<1&&(o=(i-n)/(1-n)),[t[0],n*100,o*100]};Ae.apple.rgb=function(t){return [t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};Ae.rgb.apple=function(t){return [t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};Ae.gray.rgb=function(t){return [t[0]/100*255,t[0]/100*255,t[0]/100*255]};Ae.gray.hsl=function(t){return [0,0,t[0]]};Ae.gray.hsv=Ae.gray.hsl;Ae.gray.hwb=function(t){return [0,100,t[0]]};Ae.gray.cmyk=function(t){return [0,0,0,t[0]]};Ae.gray.lab=function(t){return [t[0],0,0]};Ae.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return "000000".substring(i.length)+i};Ae.rgb.gray=function(t){return [(t[0]+t[1]+t[2])/3/255*100]};});var kg=z((PU,Ig)=>{var Nu=xf();function v4(){let t={},e=Object.keys(Nu);for(let r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function E4(t){let e=v4(),r=[t];for(e[t].distance=0;r.length;){let i=r.pop(),n=Object.keys(Nu[i]);for(let o=n.length,s=0;s<o;s++){let a=n[s],u=e[a];u.distance===-1&&(u.distance=e[i].distance+1,u.parent=i,r.unshift(a));}}return e}function b4(t,e){return function(r){return e(t(r))}}function T4(t,e){let r=[e[t].parent,t],i=Nu[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),i=b4(Nu[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}Ig.exports=function(t){let e=E4(t),r={},i=Object.keys(e);for(let n=i.length,o=0;o<n;o++){let s=i[o];e[s].parent!==null&&(r[s]=T4(s,e));}return r};});var Bg=z((IU,Mg)=>{var vf=xf(),C4=kg(),ws={},A4=Object.keys(vf);function w4(t){let e=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),t(r))};return "conversion"in t&&(e.conversion=t.conversion),e}function D4(t){let e=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=t(r);if(typeof n=="object")for(let o=n.length,s=0;s<o;s++)n[s]=Math.round(n[s]);return n};return "conversion"in t&&(e.conversion=t.conversion),e}A4.forEach(t=>{ws[t]={},Object.defineProperty(ws[t],"channels",{value:vf[t].channels}),Object.defineProperty(ws[t],"labels",{value:vf[t].labels});let e=C4(t);Object.keys(e).forEach(i=>{let n=e[i];ws[t][i]=D4(n),ws[t][i].raw=w4(n);});});Mg.exports=ws;});var $g=z((kU,Vg)=>{var qg=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Hg=(t,e)=>(...r)=>{let i=t(...r);return `\x1B[${38+e};5;${i}m`},jg=(t,e)=>(...r)=>{let i=t(...r);return `\x1B[${38+e};2;${i[0]};${i[1]};${i[2]}m`},Ou=t=>t,Ug=(t,e,r)=>[t,e,r],Ds=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let i=r();return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0}),i},enumerable:!0,configurable:!0});},Ef,Ss=(t,e,r,i)=>{Ef===void 0&&(Ef=Bg());let n=i?10:0,o={};for(let[s,a]of Object.entries(Ef)){let u=s==="ansi16"?"ansi":s;s===e?o[u]=t(r,n):typeof a=="object"&&(o[u]=t(a[e],n));}return o};function S4(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,i]of Object.entries(e)){for(let[n,o]of Object.entries(i))e[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[n]=e[n],t.set(o[0],o[1]);Object.defineProperty(e,r,{value:i,enumerable:!1});}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",Ds(e.color,"ansi",()=>Ss(qg,"ansi16",Ou,!1)),Ds(e.color,"ansi256",()=>Ss(Hg,"ansi256",Ou,!1)),Ds(e.color,"ansi16m",()=>Ss(jg,"rgb",Ug,!1)),Ds(e.bgColor,"ansi",()=>Ss(qg,"ansi16",Ou,!0)),Ds(e.bgColor,"ansi256",()=>Ss(Hg,"ansi256",Ou,!0)),Ds(e.bgColor,"ansi16m",()=>Ss(jg,"rgb",Ug,!0)),e}Object.defineProperty(Vg,"exports",{enumerable:!0,get:S4});});var Kg=z((MU,zg)=>{zg.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)};});var Yg=z((BU,Wg)=>{var R4=me("os"),Gg=me("tty"),Rr=Kg(),{env:zt}=process,qi;Rr("no-color")||Rr("no-colors")||Rr("color=false")||Rr("color=never")?qi=0:(Rr("color")||Rr("colors")||Rr("color=true")||Rr("color=always"))&&(qi=1);"FORCE_COLOR"in zt&&(zt.FORCE_COLOR==="true"?qi=1:zt.FORCE_COLOR==="false"?qi=0:qi=zt.FORCE_COLOR.length===0?1:Math.min(parseInt(zt.FORCE_COLOR,10),3));function bf(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Tf(t,e){if(qi===0)return 0;if(Rr("color=16m")||Rr("color=full")||Rr("color=truecolor"))return 3;if(Rr("color=256"))return 2;if(t&&!e&&qi===void 0)return 0;let r=qi||0;if(zt.TERM==="dumb")return r;if(process.platform==="win32"){let i=R4.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in zt)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in zt)||zt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in zt)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(zt.TEAMCITY_VERSION)?1:0;if(zt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in zt){let i=parseInt((zt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(zt.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(zt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(zt.TERM)||"COLORTERM"in zt?1:r}function N4(t){let e=Tf(t,t&&t.isTTY);return bf(e)}Wg.exports={supportsColor:N4,stdout:bf(Tf(!0,Gg.isatty(1))),stderr:bf(Tf(!0,Gg.isatty(2)))};});var Xg=z((qU,Zg)=>{var O4=(t,e,r)=>{let i=t.indexOf(e);if(i===-1)return t;let n=e.length,o=0,s="";do s+=t.substr(o,i-o)+e+r,o=i+n,i=t.indexOf(e,o);while(i!==-1);return s+=t.substr(o),s},F4=(t,e,r,i)=>{let n=0,o="";do{let s=t[i-1]==="\r";o+=t.substr(n,(s?i-1:i)-n)+e+(s?`\r
|
|
55
|
+
`:`
|
|
56
|
+
`)+r,n=i+1,i=t.indexOf(`
|
|
57
|
+
`,n);}while(i!==-1);return o+=t.substr(n),o};Zg.exports={stringReplaceAll:O4,stringEncaseCRLFWithFirstIndex:F4};});var r1=z((HU,t1)=>{var L4=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Jg=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,P4=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,I4=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,k4=new Map([["n",`
|
|
58
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function e1(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):k4.get(t)||t}function M4(t,e){let r=[],i=e.trim().split(/\s*,\s*/g),n;for(let o of i){let s=Number(o);if(!Number.isNaN(s))r.push(s);else if(n=o.match(P4))r.push(n[2].replace(I4,(a,u,l)=>u?e1(u):l));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function B4(t){Jg.lastIndex=0;let e=[],r;for(;(r=Jg.exec(t))!==null;){let i=r[1];if(r[2]){let n=M4(i,r[2]);e.push([i].concat(n));}else e.push([i]);}return e}function Qg(t,e){let r={};for(let n of e)for(let o of n.styles)r[o[0]]=n.inverse?null:o.slice(1);let i=t;for(let[n,o]of Object.entries(r))if(Array.isArray(o)){if(!(n in i))throw new Error(`Unknown Chalk style: ${n}`);i=o.length>0?i[n](...o):i[n];}return i}t1.exports=(t,e)=>{let r=[],i=[],n=[];if(e.replace(L4,(o,s,a,u,l,h)=>{if(s)n.push(e1(s));else if(u){let c=n.join("");n=[],i.push(r.length===0?c:Qg(t,r)(c)),r.push({inverse:a,styles:B4(u)});}else if(l){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(Qg(t,r)(n.join(""))),n=[],r.pop();}else n.push(h);}),i.push(n.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return i.join("")};});var Io=z((jU,u1)=>{var Po=$g(),{stdout:Af,stderr:wf}=Yg(),{stringReplaceAll:q4,stringEncaseCRLFWithFirstIndex:H4}=Xg(),{isArray:Fu}=Array,n1=["ansi","ansi","ansi256","ansi16m"],Rs=Object.create(null),j4=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Af?Af.level:0;t.level=e.level===void 0?r:e.level;},Df=class{constructor(e){return s1(e)}},s1=t=>{let e={};return j4(e,t),e.template=(...r)=>a1(e.template,...r),Object.setPrototypeOf(e,Lu.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Df,e.template};function Lu(t){return s1(t)}for(let[t,e]of Object.entries(Po))Rs[t]={get(){let r=Pu(this,Sf(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Rs.visible={get(){let t=Pu(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var o1=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of o1)Rs[t]={get(){let{level:e}=this;return function(...r){let i=Sf(Po.color[n1[e]][t](...r),Po.color.close,this._styler);return Pu(this,i,this._isEmpty)}}};for(let t of o1){let e="bg"+t[0].toUpperCase()+t.slice(1);Rs[e]={get(){let{level:r}=this;return function(...i){let n=Sf(Po.bgColor[n1[r]][t](...i),Po.bgColor.close,this._styler);return Pu(this,n,this._isEmpty)}}};}var U4=Object.defineProperties(()=>{},{...Rs,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t;}}}),Sf=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},Pu=(t,e,r)=>{let i=(...n)=>Fu(n[0])&&Fu(n[0].raw)?i1(i,a1(i,...n)):i1(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,U4),i._generator=t,i._styler=e,i._isEmpty=r,i},i1=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=q4(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
|
|
59
|
+
`);return o!==-1&&(e=H4(e,n,i,o)),i+e+n},Cf,a1=(t,...e)=>{let[r]=e;if(!Fu(r)||!Fu(r.raw))return e.join(" ");let i=e.slice(1),n=[r.raw[0]];for(let o=1;o<r.length;o++)n.push(String(i[o-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[o]));return Cf===void 0&&(Cf=r1()),Cf(t,n.join(""))};Object.defineProperties(Lu.prototype,Rs);var Iu=Lu();Iu.supportsColor=Af;Iu.stderr=Lu({level:wf?wf.level:0});Iu.stderr.supportsColor=wf;u1.exports=Iu;});var T1=z((Uf,Vf)=>{Object.defineProperty(Uf,"__esModule",{value:!0});function aO(t){return t.encrypted}var jf=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let i=typeof r.connect=="function",n=typeof r.secureConnect=="function",o=typeof r.close=="function",s=()=>{i&&r.connect(),aO(t)&&n&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),o&&t.once("close",r.close);};t.writable&&!t.connecting?s():t.connecting?t.once("connect",s):t.destroyed&&o&&r.close(t._hadError);};Uf.default=jf;Vf.exports=jf;Vf.exports.default=jf;});var D1=z((sV,w1)=>{var{PassThrough:_O}=me("stream");w1.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let o=new _O({objectMode:n});r&&o.setEncoding(r);let s=0,a=[];return o.on("data",u=>{a.push(u),n?s=a.length:s+=u.length;}),o.getBufferedValue=()=>e?a:i?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o};});var Gf=z((oV,Uo)=>{var{constants:gO}=me("buffer"),yO=me("stream"),{promisify:xO}=me("util"),vO=D1(),EO=xO(yO.pipeline),Zu=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError";}};async function Kf(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=vO(e);return await new Promise((n,o)=>{let s=a=>{a&&i.getBufferedLength()<=gO.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),o(a);};(async()=>{try{await EO(t,i),n();}catch(a){s(a);}})(),i.on("data",()=>{i.getBufferedLength()>r&&s(new Zu);});}),i.getBufferedValue()}Uo.exports=Kf;Uo.exports.buffer=(t,e)=>Kf(t,{...e,encoding:"buffer"});Uo.exports.array=(t,e)=>Kf(t,{...e,array:!0});Uo.exports.MaxBufferError=Zu;});var R1=z((uV,S1)=>{var bO=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),TO=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),CO=new Set([500,502,503,504]),AO={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},wO={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function $n(t){let e=parseInt(t,10);return isFinite(e)?e:0}function DO(t){return t?CO.has(t.status):!0}function Wf(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let i of r){let[n,o]=i.split(/=/,2);e[n.trim()]=o===void 0?!0:o.trim().replace(/^"|"$/g,"");}return e}function SO(t){let e=[];for(let r in t){let i=t[r];e.push(i===!0?r:r+"="+i);}if(e.length)return e.join(", ")}S1.exports=class{constructor(e,r,{shared:i,cacheHeuristic:n,immutableMinTimeToLive:o,ignoreCargoCult:s,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=i!==!1,this._cacheHeuristic=n!==void 0?n:.1,this._immutableMinTtl=o!==void 0?o:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=Wf(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=Wf(e.headers["cache-control"]),s&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":SO(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0);}now(){return Date.now()}storable(){return !!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&TO.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||bO.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=Wf(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return (!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return !0;if(this._resHeaders.vary==="*")return !1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let i of r)if(e.headers[i]!==this._reqHeaders[i])return !1;return !0}_copyWithoutHopByHopHeaders(e){let r={};for(let i in e)AO[i]||(r[i]=e[i]);if(e.connection){let i=e.connection.trim().split(/\s*,\s*/);for(let n of i)delete r[n];}if(r.warning){let i=r.warning.split(/,/).filter(n=>!/^\s*1[0-9][0-9]/.test(n));i.length?r.warning=i.join(",").trim():delete r.warning;}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return $n(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return $n(this._rescc["s-maxage"])}if(this._rescc["max-age"])return $n(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||i<r?0:Math.max(e,(i-r)/1e3)}if(this._resHeaders["last-modified"]){let i=Date.parse(this._resHeaders["last-modified"]);if(isFinite(i)&&r>i)return Math.max(e,(r-i)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+$n(this._rescc["stale-if-error"]),i=e+$n(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,i)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+$n(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+$n(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc;}toObject(){return {v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let n=r["if-none-match"].split(/,/).filter(o=>!/^\s*W\//.test(o));n.length?r["if-none-match"]=n.join(",").trim():delete r["if-none-match"];}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&DO(r))return {modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let i=!1;if(r.status!==void 0&&r.status!=304?i=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(i=!0),!i)return {policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let n={};for(let s in this._resHeaders)n[s]=s in r.headers&&!wO[s]?r.headers[s]:this._resHeaders[s];let o=Object.assign({},r,{status:this._status,method:this._method,headers:n});return {policy:new this.constructor(e,o,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}};});var N1=z(Yf=>{Yf.stringify=function t(e){if(typeof e=="undefined")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",i=Array.isArray(e);r=i?"[":"{";var n=!0;for(var o in e){var s=typeof e[o]=="function"||!i&&typeof e[o]=="undefined";Object.hasOwnProperty.call(e,o)&&!s&&(n||(r+=","),n=!1,i?e[o]==null?r+="null":r+=t(e[o]):e[o]!==void 0&&(r+=t(o)+":"+t(e[o])));}return r+=i?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e=="undefined"?"null":JSON.stringify(e)};Yf.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})};});var P1=z((mV,L1)=>{var NO=me("events"),O1=N1(),OO=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(me(e[r]))(t)}return new Map},F1=["sqlite","postgres","mysql","mongo","redis","tiered"],Zf=class extends NO{constructor(e,{emitErrors:r=!0,...i}={}){if(super(),this.opts={namespace:"keyv",serialize:O1.stringify,deserialize:O1.parse,...typeof e=="string"?{uri:e}:e,...i},!this.opts.store){let o={...this.opts};this.opts.store=OO(o);}if(this.opts.compression){let o=this.opts.compression;this.opts.serialize=o.serialize.bind(o),this.opts.deserialize=o.deserialize.bind(o);}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",o=>this.emit("error",o)),this.opts.store.namespace=this.opts.namespace;let n=o=>async function*(){for await(let[s,a]of typeof o=="function"?o(this.opts.store.namespace):o){let u=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!s.includes(this.opts.store.namespace))){if(typeof u.expires=="number"&&Date.now()>u.expires){this.delete(s);continue}yield [this._getKeyUnprefix(s),u.value];}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=n(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=n(this.opts.store.iterator.bind(this.opts.store)));}_checkIterableAdaptar(){return F1.includes(this.opts.store.opts.dialect)||F1.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return `${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:i}=this.opts,n=Array.isArray(e),o=n?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(n&&i.getMany===void 0){let s=[];for(let a of o)s.push(Promise.resolve().then(()=>i.get(a)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return typeof u.expires=="number"&&Date.now()>u.expires?this.delete(a).then(()=>{}):r&&r.raw?u:u.value}));return Promise.allSettled(s).then(a=>{let u=[];for(let l of a)u.push(l.value);return u})}return Promise.resolve().then(()=>n?i.getMany(o):i.get(o)).then(s=>typeof s=="string"?this.opts.deserialize(s):this.opts.compression?this.opts.deserialize(s):s).then(s=>{if(s!=null)return n?s.map((a,u)=>{if(typeof a=="string"&&(a=this.opts.deserialize(a)),a!=null){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e[u]).then(()=>{});return}return r&&r.raw?a:a.value}}):typeof s.expires=="number"&&Date.now()>s.expires?this.delete(e).then(()=>{}):r&&r.raw?s:s.value})}set(e,r,i){let n=this._getKeyPrefix(e);typeof i=="undefined"&&(i=this.opts.ttl),i===0&&(i=void 0);let{store:o}=this.opts;return Promise.resolve().then(()=>{let s=typeof i=="number"?Date.now()+i:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:s},this.opts.serialize(r)}).then(s=>o.set(n,s,i)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let n=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let o=[];for(let s of n)o.push(r.delete(s));return Promise.allSettled(o).then(s=>s.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(n))}let i=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(i))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:i}=this.opts;return Promise.resolve().then(async()=>typeof i.has=="function"?i.has(r):await i.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};L1.exports=Zf;});var q1=z((RV,B1)=>{var HO=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];B1.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(HO)),i={};for(let n of r)n in e||(i[n]={get(){let o=t[n];return typeof o=="function"?o.bind(t):o},set(o){t[n]=o;},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),t.once("aborted",()=>{e.destroy(),e.emit("aborted");}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close");}):e.emit("close");}),e};});var j1=z((NV,H1)=>{var{Transform:jO,PassThrough:UO}=me("stream"),ed=me("zlib"),VO=q1();H1.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof ed.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let i=!0,n=new jO({transform(a,u,l){i=!1,l(null,a);},flush(a){a();}}),o=new UO({autoDestroy:!1,destroy(a,u){t.destroy(),u(a);}}),s=r?ed.createBrotliDecompress():ed.createUnzip();return s.once("error",a=>{if(i&&!t.readable){o.end();return}o.destroy(a);}),VO(t,o),t.pipe(n).pipe(s).pipe(o),o};});var fd=z((y$,ry)=>{var cd=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0;}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[i,n]of this.oldCache.entries())this.onEviction(i,n);this.oldCache=this.cache,this.cache=new Map;}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0;}*keys(){for(let[e]of this)yield e;}*values(){for(let[,e]of this)yield e;}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e);}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};ry.exports=cd;});var dd=z((x$,iy)=>{iy.exports=t=>{if(t.listenerCount("error")!==0)return t;t.__destroy=t._destroy,t._destroy=(...r)=>{let i=r.pop();t.__destroy(...r,async n=>{await Promise.resolve(),i(n);});};let e=r=>{Promise.resolve().then(()=>{t.emit("error",r);});};return t.once("error",e),Promise.resolve().then(()=>{t.off("error",e);}),t};});var Kn=z((v$,ly)=>{var{URL:ny}=me("url"),hF=me("events"),cF=me("tls"),fF=me("http2"),dF=fd(),pF=dd(),nr=Symbol("currentStreamCount"),sy=Symbol("request"),sr=Symbol("cachedOriginSet"),Gi=Symbol("gracefullyClosing"),sl=Symbol("length"),oy=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],mF=(t,e,r)=>{let i=0,n=t.length;for(;i<n;){let o=i+n>>>1;r(t[o],e)?i=o+1:n=o;}return i},_F=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,pd=(t,e)=>{for(let r=0;r<t.length;r++){let i=t[r];i[sr].length>0&&i[sr].length<e[sr].length&&i[sr].every(n=>e[sr].includes(n))&&i[nr]+e[nr]<=e.remoteSettings.maxConcurrentStreams&&uy(i);}},ay=(t,e)=>{for(let r=0;r<t.length;r++){let i=t[r];if(e[sr].length>0&&e[sr].length<i[sr].length&&e[sr].every(n=>i[sr].includes(n))&&e[nr]+i[nr]<=i.remoteSettings.maxConcurrentStreams)return uy(e),!0}return !1},uy=t=>{t[Gi]=!0,t[nr]===0&&t.close();},zs=class t extends hF{constructor({timeout:e=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:i=10,maxCachedTlsSessions:n=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxEmptySessions=i,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new dF({maxSize:n});}get protocol(){return "https:"}normalizeOptions(e){let r="";for(let i=0;i<oy.length;i++){let n=oy[i];r+=":",e&&e[n]!==void 0&&(r+=e[n]);}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let e in this.queue)for(let r in this.queue[e]){let i=this.queue[e][r];i.completed||(i.completed=!0,i());}}_isBetterSession(e,r){return e>r}_accept(e,r,i,n){let o=0;for(;o<r.length&&e[nr]<e.remoteSettings.maxConcurrentStreams;)r[o].resolve(e),o++;r.splice(0,o),r.length>0&&(this.getSession(i,n,r),r.length=0);}getSession(e,r,i){return new Promise((n,o)=>{Array.isArray(i)&&i.length>0?(i=[...i],n()):i=[{resolve:n,reject:o}];try{if(typeof e=="string")e=new ny(e);else if(!(e instanceof ny))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){let{servername:h}=r,{hostname:c}=e;if(h&&c!==h)throw new Error(`Origin ${c} differs from servername ${h}`)}}catch(h){for(let c=0;c<i.length;c++)i[c].reject(h);return}let s=this.normalizeOptions(r),a=e.origin;if(s in this.sessions){let h=this.sessions[s],c=-1,p=-1,f;for(let m=0;m<h.length;m++){let _=h[m],x=_.remoteSettings.maxConcurrentStreams;if(x<c)break;if(!_[sr].includes(a))continue;let v=_[nr];v>=x||_[Gi]||_.destroyed||(f||(c=x),this._isBetterSession(v,p)&&(f=_,p=v));}if(f){this._accept(f,i,a,r);return}}if(s in this.queue){if(a in this.queue[s]){this.queue[s][a].listeners.push(...i);return}}else this.queue[s]={[sl]:0};let u=()=>{s in this.queue&&this.queue[s][a]===l&&(delete this.queue[s][a],--this.queue[s][sl]===0&&delete this.queue[s]);},l=async()=>{this._sessionCount++;let h=`${a}:${s}`,c=!1,p;try{let f={...r};f.settings===void 0&&(f.settings=this.settings),f.session===void 0&&(f.session=this.tlsSessionCache.get(h)),p=await(f.createConnection||this.createConnection).call(this,e,f),f.createConnection=()=>p;let _=fF.connect(e,f);_[nr]=0,_[Gi]=!1;let x=()=>{let{socket:b}=_,E;return b.servername===!1?(b.servername=b.remoteAddress,E=_.originSet,b.servername=!1):E=_.originSet,E},v=()=>_[nr]<_.remoteSettings.maxConcurrentStreams;_.socket.once("session",b=>{this.tlsSessionCache.set(h,b);}),_.once("error",b=>{for(let E=0;E<i.length;E++)i[E].reject(b);this.tlsSessionCache.delete(h);}),_.setTimeout(this.timeout,()=>{_.destroy();}),_.once("close",()=>{if(this._sessionCount--,c){this._emptySessionCount--;let b=this.sessions[s];b.length===1?delete this.sessions[s]:b.splice(b.indexOf(_),1);}else {u();let b=new Error("Session closed without receiving a SETTINGS frame");b.code="HTTP2WRAPPER_NOSETTINGS";for(let E=0;E<i.length;E++)i[E].reject(b);}this._processQueue();});let g=()=>{let b=this.queue[s];if(!b)return;let E=_[sr];for(let w=0;w<E.length;w++){let D=E[w];if(D in b){let{listeners:N,completed:F}=b[D],V=0;for(;V<N.length&&v();)N[V].resolve(_),V++;if(b[D].listeners.splice(0,V),b[D].listeners.length===0&&!F&&(delete b[D],--b[sl]===0)){delete this.queue[s];break}if(!v())break}}};_.on("origin",()=>{_[sr]=x()||[],_[Gi]=!1,ay(this.sessions[s],_),!(_[Gi]||!v())&&(g(),v()&&pd(this.sessions[s],_));}),_.once("remoteSettings",()=>{if(l.destroyed){let b=new Error("Agent has been destroyed");for(let E=0;E<i.length;E++)i[E].reject(b);_.destroy();return}if(_.setLocalWindowSize&&_.setLocalWindowSize(1024*1024*4),_[sr]=x()||[],_.socket.encrypted){let b=_[sr][0];if(b!==a){let E=new Error(`Requested origin ${a} does not match server ${b}`);for(let w=0;w<i.length;w++)i[w].reject(E);_.destroy();return}}u();{let b=this.sessions;if(s in b){let E=b[s];E.splice(mF(E,_,_F),0,_);}else b[s]=[_];}c=!0,this._emptySessionCount++,this.emit("session",_),this._accept(_,i,a,r),_[nr]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),_.on("remoteSettings",()=>{v()&&(g(),v()&&pd(this.sessions[s],_));});}),_[sy]=_.request,_.request=(b,E)=>{if(_[Gi])throw new Error("The session is gracefully closing. No new streams are allowed.");let w=_[sy](b,E);return _.ref(),_[nr]++===0&&this._emptySessionCount--,w.once("close",()=>{if(--_[nr]===0&&(this._emptySessionCount++,_.unref(),this._emptySessionCount>this.maxEmptySessions||_[Gi])){_.close();return}_.destroyed||_.closed||v()&&!ay(this.sessions[s],_)&&(pd(this.sessions[s],_),g(),_[nr]===0&&this._processQueue());}),w};}catch(f){u(),this._sessionCount--;for(let m=0;m<i.length;m++)i[m].reject(f);}};l.listeners=i,l.completed=!1,l.destroyed=!1,this.queue[s][a]=l,this.queue[s][sl]++,this._processQueue();})}request(e,r,i,n){return new Promise((o,s)=>{this.getSession(e,r,[{reject:s,resolve:a=>{try{let u=a.request(i,n);pF(u),o(u);}catch(u){s(u);}}}]);})}async createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let i=e.port||443,n=e.hostname;typeof r.servername=="undefined"&&(r.servername=n);let o=cF.connect(i,n,r);return r.socket&&(o._peername={family:void 0,address:void 0,port:i}),o}closeEmptySessions(e=Number.POSITIVE_INFINITY){let r=0,{sessions:i}=this;for(let n in i){let o=i[n];for(let s=0;s<o.length;s++){let a=o[s];if(a[nr]===0&&(r++,a.close(),r>=e))return r}}return r}destroy(e){let{sessions:r,queue:i}=this;for(let n in r){let o=r[n];for(let s=0;s<o.length;s++)o[s].destroy(e);}for(let n in i){let o=i[n];for(let s in o)o[s].destroyed=!0;}this.queue={},this.tlsSessionCache.clear();}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};zs.kCurrentStreamCount=nr;zs.kGracefullyClosing=Gi;ly.exports={Agent:zs,globalAgent:new zs};});var _d=z((E$,hy)=>{var{Readable:gF}=me("stream"),md=class extends gF{constructor(e,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1;}get connection(){return this.socket}set connection(e){this.socket=e;}_destroy(e,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(e);}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume());}_read(){this.req&&this.req._request.resume();}};hy.exports=md;});var fy=z((b$,cy)=>{cy.exports=(t,e,r)=>{for(let i of r)t.on(i,(...n)=>e.emit(i,...n));};});var ta=z((C$,dy)=>{var Gn=(t,e,r)=>{dy.exports[e]=class extends t{constructor(...n){super(typeof r=="string"?r:r(n)),this.name=`${super.name} [${e}]`,this.code=e;}};};Gn(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],i=Array.isArray(r);return i&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${i?"one of":"of"} type ${r}. Received ${typeof t[2]}`});Gn(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);Gn(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);Gn(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);Gn(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);Gn(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`);Gn(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)");});var my=z((A$,py)=>{py.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return !0;default:return !1}};});var gd=z((w$,_y)=>{var{ERR_INVALID_HTTP_TOKEN:yF}=ta(),xF=my(),vF=/^[\^`\-\w!#$%&*+.|~]+$/;_y.exports=t=>{if(typeof t!="string"||!vF.test(t)&&!xF(t))throw new yF("Header name",t)};});var yd=z((D$,gy)=>{var{ERR_HTTP_INVALID_HEADER_VALUE:EF,ERR_INVALID_CHAR:bF}=ta(),TF=/[^\t\u0020-\u007E\u0080-\u00FF]/;gy.exports=(t,e)=>{if(typeof e=="undefined")throw new EF(e,t);if(TF.test(e))throw new bF("header content",t)};});var vy=z((S$,xy)=>{var{ERR_HTTP2_NO_SOCKET_MANIPULATION:yy}=ta(),CF={has(t,e){let r=t.session===void 0?t:t.session.socket;return e in t||e in r},get(t,e){switch(e){case"on":case"once":case"end":case"emit":case"destroy":return t[e].bind(t);case"writable":case"destroyed":return t[e];case"readable":return t.destroyed?!1:t.readable;case"setTimeout":{let{session:r}=t;return r!==void 0?r.setTimeout.bind(r):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new yy;default:{let r=t.session===void 0?t:t.session.socket,i=r[e];return typeof i=="function"?i.bind(r):i}}},getPrototypeOf(t){return t.session!==void 0?Reflect.getPrototypeOf(t.session.socket):Reflect.getPrototypeOf(t)},set(t,e,r){switch(e){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[e]=r,!0;case"setTimeout":{let{session:i}=t;return i===void 0?t.setTimeout=r:i.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new yy;default:{let i=t.session===void 0?t:t.session.socket;return i[e]=r,!0}}}};xy.exports=CF;});var bd=z((R$,wy)=>{var{URL:xd,urlToHttpOptions:Ey}=me("url"),AF=me("http2"),{Writable:wF}=me("stream"),{Agent:DF,globalAgent:SF}=Kn(),RF=_d(),NF=fy(),{ERR_INVALID_ARG_TYPE:ol,ERR_INVALID_PROTOCOL:OF,ERR_HTTP_HEADERS_SENT:by}=ta(),FF=gd(),LF=yd(),PF=vy(),{HTTP2_HEADER_STATUS:Ty,HTTP2_HEADER_METHOD:Cy,HTTP2_HEADER_PATH:Ay,HTTP2_HEADER_AUTHORITY:ra,HTTP2_METHOD_CONNECT:IF}=AF.constants,Wt=Symbol("headers"),Ks=Symbol("origin"),ia=Symbol("session"),vd=Symbol("options"),al=Symbol("flushedHeaders"),Gs=Symbol("jobs"),na=Symbol("pendingAgentPromise"),Ed=class extends wF{constructor(e,r,i){if(super({autoDestroy:!1,emitClose:!1}),typeof e=="string"?e=Ey(new xd(e)):e instanceof xd?e=Ey(e):e={...e},typeof r=="function"||r===void 0?(i=r,r=e):r=Object.assign(e,r),r.h2session){if(this[ia]=r.h2session,this[ia].destroyed)throw new Error("The session has been closed already");this.protocol=this[ia].socket.encrypted?"https:":"http:";}else if(r.agent===!1)this.agent=new DF({maxEmptySessions:0});else if(typeof r.agent=="undefined"||r.agent===null)this.agent=SF;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new ol("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new OF(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;let{timeout:n}=r;r.timeout=void 0,this[Wt]=Object.create(null),this[Gs]=[],this[na]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:o}=r;if(o)for(let a in o)this.setHeader(a,o[a]);r.auth&&!("authorization"in this[Wt])&&(this[Wt].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[vd]=r,this[Ks]=new xd(`${this.protocol}//${r.servername||r.host}:${r.port}`);let s=r._reuseSocket;s&&(r.createConnection=(...a)=>s.destroyed?this.agent.createConnection(...a):s,this.agent.getSession(this[Ks],this[vd]).catch(()=>{})),n&&this.setTimeout(n),i&&this.once("response",i),this[al]=!1;}get method(){return this[Wt][Cy]}set method(e){e&&(this[Wt][Cy]=e.toUpperCase());}get path(){let e=this.method==="CONNECT"?ra:Ay;return this[Wt][e]}set path(e){if(e){let r=this.method==="CONNECT"?ra:Ay;this[Wt][r]=e;}}get host(){return this[Ks].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,i){if(this._mustNotHaveABody){i(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let n=()=>this._request.write(e,r,i);this._request?n():this[Gs].push(n);}_final(e){this.flushHeaders();let r=()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e);};this._request?r():this[Gs].push(r);}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy());}async _destroy(e,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close");});try{await this[na];}catch(i){this.aborted&&(e=i);}r(e);}async flushHeaders(){if(this[al]||this.destroyed)return;this[al]=!0;let e=this.method===IF,r=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||NF(i,this,["timeout","continue"]),i.once("error",o=>{this.destroy(o);}),i.once("aborted",()=>{let{res:o}=this;o?(o.aborted=!0,o.emit("aborted"),o.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"));});let n=(o,s,a)=>{let u=new RF(this.socket,i.readableHighWaterMark);this.res=u,u.url=`${this[Ks].origin}${this.path}`,u.req=this,u.statusCode=o[Ty],u.headers=o,u.rawHeaders=a,u.once("end",()=>{u.complete=!0,u.socket=null,u.connection=null;}),e?(u.upgrade=!0,this.emit("connect",u,i,Buffer.alloc(0))?this.emit("close"):i.destroy()):(i.on("data",l=>{!u._dumped&&!u.push(l)&&i.pause();}),i.once("end",()=>{this.aborted||u.push(null);}),this.emit("response",u)||u._dump());};i.once("response",n),i.once("headers",o=>this.emit("information",{statusCode:o[Ty]})),i.once("trailers",(o,s,a)=>{let{res:u}=this;if(u===null){n(o,s,a);return}u.trailers=o,u.rawTrailers=a;}),i.once("close",()=>{let{aborted:o,res:s}=this;if(s){o&&(s.aborted=!0,s.emit("aborted"),s.destroy());let a=()=>{s.emit("close"),this.destroy(),this.emit("close");};s.readable?s.once("end",a):a();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close");}),this.socket=new Proxy(i,PF);for(let o of this[Gs])o();this[Gs].length=0,this.emit("socket",this.socket);};if(!(ra in this[Wt])&&!e&&(this[Wt][ra]=this[Ks].host),this[ia])try{r(this[ia].request(this[Wt]));}catch(i){this.destroy(i);}else {this.reusedSocket=!0;try{let i=this.agent.request(this[Ks],this[vd],this[Wt]);this[na]=i,r(await i),this[na]=!1;}catch(i){this[na]=!1,this.destroy(i);}}}get connection(){return this.socket}set connection(e){this.socket=e;}getHeaderNames(){return Object.keys(this[Wt])}hasHeader(e){if(typeof e!="string")throw new ol("name","string",e);return !!this[Wt][e.toLowerCase()]}getHeader(e){if(typeof e!="string")throw new ol("name","string",e);return this[Wt][e.toLowerCase()]}get headersSent(){return this[al]}removeHeader(e){if(typeof e!="string")throw new ol("name","string",e);if(this.headersSent)throw new by("remove");delete this[Wt][e.toLowerCase()];}setHeader(e,r){if(this.headersSent)throw new by("set");FF(e),LF(e,r);let i=e.toLowerCase();if(i==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}i==="host"&&this.method==="CONNECT"?this[Wt][ra]=r:this[Wt][i]=r;}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let i=()=>this._request.setTimeout(e,r);return this._request?i():this[Gs].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};wy.exports=Ed;});var Sy=z((N$,Dy)=>{var kF=me("tls");Dy.exports=(t={},e=kF.connect)=>new Promise((r,i)=>{let n=!1,o,s=async()=>{await u,o.off("timeout",a),o.off("error",i),t.resolveSocket?(r({alpnProtocol:o.alpnProtocol,socket:o,timeout:n}),n&&(await Promise.resolve(),o.emit("timeout"))):(o.destroy(),r({alpnProtocol:o.alpnProtocol,timeout:n}));},a=async()=>{n=!0,s();},u=(async()=>{try{o=await e(t,s),o.on("error",i),o.once("timeout",a);}catch(l){i(l);}})();});});var Ny=z((O$,Ry)=>{var{isIP:MF}=me("net"),BF=me("assert"),qF=t=>{if(t[0]==="["){let r=t.indexOf("]");return BF(r!==-1),t.slice(1,r)}let e=t.indexOf(":");return e===-1?t:t.slice(0,e)};Ry.exports=t=>{let e=qF(t);return MF(e)?"":e};});var By=z((F$,sa)=>{var{URL:Oy,urlToHttpOptions:Fy}=me("url"),Ly=me("http"),Td=me("https"),HF=Sy(),jF=fd(),{Agent:UF,globalAgent:VF}=Kn(),$F=bd(),zF=Ny(),Py=dd(),Iy=new jF({maxSize:100}),KF=new Map,GF=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let i=()=>{t.emit("free",e,r);};e.on("free",i);let n=()=>{t.removeSocket(e,r);};e.on("close",n);let o=()=>{let{freeSockets:a}=t;for(let u of Object.values(a))if(u.includes(e)){e.destroy();return}};e.on("timeout",o);let s=()=>{t.removeSocket(e,r),e.off("close",n),e.off("free",i),e.off("timeout",o),e.off("agentRemove",s);};e.on("agentRemove",s),t.emit("free",e,r);},ky=(t,e=new Map,r=void 0)=>async i=>{let n=`${i.host}:${i.port}:${i.ALPNProtocols.sort()}`;if(!t.has(n)){if(e.has(n))return {alpnProtocol:(await e.get(n)).alpnProtocol};let{path:o}=i;i.path=i.socketPath;let s=HF(i,r);e.set(n,s);try{let a=await s;return t.set(n,a.alpnProtocol),e.delete(n),i.path=o,a}catch(a){throw e.delete(n),i.path=o,a}}return {alpnProtocol:t.get(n)}},My=ky(Iy,KF);sa.exports=async(t,e,r)=>{if(typeof t=="string"?t=Fy(new Oy(t)):t instanceof Oy?t=Fy(t):t={...t},typeof e=="function"||e===void 0?(r=e,e=t):e=Object.assign(t,e),e.ALPNProtocols=e.ALPNProtocols||["h2","http/1.1"],!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let i=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||zF(e.headers&&e.headers.host||e.host),e.port=e.port||(i?443:80),e._defaultAgent=i?Td.globalAgent:Ly.globalAgent;let n=e.resolveProtocol||My,{agent:o}=e;if(o!==void 0&&o!==!1&&o.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(i){e.resolveSocket=!0;let{socket:s,alpnProtocol:a,timeout:u}=await n(e);if(u){s&&s.destroy();let h=new Error(`Timed out resolving ALPN: ${e.timeout} ms`);throw h.code="ETIMEDOUT",h.ms=e.timeout,h}s&&e.createConnection&&(s.destroy(),s=void 0),delete e.resolveSocket;let l=a==="h2";if(o&&(o=l?o.http2:o.https,e.agent=o),o===void 0&&(o=l?VF:Td.globalAgent),s)if(o===!1)s.destroy();else {let h=(l?UF:Td.Agent).prototype.createConnection;o.createConnection===h?l?e._reuseSocket=s:GF(o,s,e):s.destroy();}if(l)return Py(new $F(e,r))}else o&&(e.agent=o.http);return e.headers&&(e.headers={...e.headers},e.headers[":authority"]&&(e.headers.host||(e.headers.host=e.headers[":authority"]),delete e.headers[":authority"]),delete e.headers[":method"],delete e.headers[":scheme"],delete e.headers[":path"]),Py(Ly.request(e,r))};sa.exports.protocolCache=Iy;sa.exports.resolveProtocol=My;sa.exports.createResolveProtocol=ky;});var Cd=z((L$,qy)=>{var WF=me("stream"),YF=me("tls"),ZF=new YF.TLSSocket(new WF.PassThrough)._handle._parentWrap.constructor;qy.exports=ZF;});var wd=z((P$,Hy)=>{var Ad=class extends Error{constructor(e,r=""){super(`The proxy server rejected the request with status code ${e} (${r||"empty status message"})`),this.statusCode=e,this.statusMessage=r;}};Hy.exports=Ad;});var Uy=z((I$,jy)=>{var XF=(t,e,r)=>{if(!r.some(n=>typeof n==="string"?typeof e===n:e instanceof n)){let n=r.map(o=>typeof o=="string"?o:o.name);throw new TypeError(`Expected '${t}' to be a type of ${n.join(" or ")}, got ${typeof e}`)}};jy.exports=XF;});var Dd=z((k$,$y)=>{var{URL:Vy}=me("url"),ul=Uy();$y.exports=(t,e)=>{ul("proxyOptions",e,["object"]),ul("proxyOptions.headers",e.headers,["object","undefined"]),ul("proxyOptions.raw",e.raw,["boolean","undefined"]),ul("proxyOptions.url",e.url,[Vy,"string"]);let r=new Vy(e.url);t.proxyOptions={raw:!0,...e,headers:{...e.headers},url:r};};});var ll=z((M$,zy)=>{zy.exports=t=>{let{username:e,password:r}=t.proxyOptions.url;if(e||r){let i=`${e}:${r}`,n=`Basic ${Buffer.from(i).toString("base64")}`;return {"proxy-authorization":n,authorization:n}}return {}};});var Zy=z((B$,Yy)=>{var JF=me("tls"),QF=me("http"),Ky=me("https"),e5=Cd(),{globalAgent:t5}=Kn(),r5=wd(),Gy=Dd(),i5=ll(),Wy=(t,e,r)=>{(async()=>{try{let{proxyOptions:i}=t,{url:n,headers:o,raw:s}=i,a=await t5.request(n,i,{...i5(t),...o,":method":"CONNECT",":authority":`${e.host}:${e.port}`});a.once("error",r),a.once("response",u=>{let l=u[":status"];if(l!==200){r(new r5(l,""));return}let h=t instanceof Ky.Agent;if(s&&h){e.socket=a;let p=JF.connect(e);p.once("close",()=>{a.destroy();}),r(null,p);return}let c=new e5(a);c.encrypted=!1,c._handle.getpeername=p=>{p.family=void 0,p.address=void 0,p.port=void 0;},r(null,c);});}catch(i){r(i);}})();},Sd=class extends QF.Agent{constructor(e){super(e),Gy(this,e.proxyOptions);}createConnection(e,r){Wy(this,e,r);}},Rd=class extends Ky.Agent{constructor(e){super(e),Gy(this,e.proxyOptions);}createConnection(e,r){Wy(this,e,r);}};Yy.exports={HttpOverHttp2:Sd,HttpsOverHttp2:Rd};});var Od=z((q$,Xy)=>{var{Agent:n5}=Kn(),s5=Cd(),o5=wd(),a5=Dd(),Nd=class extends n5{constructor(e){super(e),a5(this,e.proxyOptions);}async createConnection(e,r){let i=`${e.hostname}:${e.port||443}`,[n,o,s]=await this._getProxyStream(i);if(o!==200)throw new o5(o,s);if(this.proxyOptions.raw)r.socket=n;else {let a=new s5(n);return a.encrypted=!1,a._handle.getpeername=u=>{u.family=void 0,u.address=void 0,u.port=void 0;},a}return super.createConnection(e,r)}};Xy.exports=Nd;});var Qy=z((H$,Jy)=>{var{globalAgent:u5}=Kn(),l5=Od(),h5=ll(),c5=t=>new Promise((e,r)=>{t.once("error",r),t.once("response",i=>{t.off("error",r),e(i[":status"]);});}),Fd=class extends l5{async _getProxyStream(e){let{proxyOptions:r}=this,i={...h5(this),...r.headers,":method":"CONNECT",":authority":e},n=await u5.request(r.url,r,i),o=await c5(n);return [n,o,""]}};Jy.exports=Fd;});var tx=z((j$,ex)=>{var f5=me("http"),d5=me("https"),p5=Od(),m5=ll(),_5=t=>new Promise((e,r)=>{let i=(n,o,s)=>{o.unshift(s),t.off("error",r),e([o,n.statusCode,n.statusMessage]);};t.once("error",r),t.once("connect",i);}),hl=class extends p5{async _getProxyStream(e){let{proxyOptions:r}=this,{url:i,headers:n}=this.proxyOptions,s=(i.protocol==="https:"?d5:f5).request({...r,hostname:i.hostname,port:i.port,path:e,headers:{...m5(this),...n,host:e},method:"CONNECT"}).end();return _5(s)}};ex.exports={Http2OverHttp:hl,Http2OverHttps:hl};});var ix=z((U$,rx)=>{var g5=me("http2"),{Agent:y5,globalAgent:x5}=Kn(),Ld=bd(),v5=_d(),E5=By(),{HttpOverHttp2:b5,HttpsOverHttp2:T5}=Zy(),C5=Qy(),{Http2OverHttp:A5,Http2OverHttps:w5}=tx(),D5=gd(),S5=yd(),R5=(t,e,r)=>new Ld(t,e,r),N5=(t,e,r)=>{let i=new Ld(t,e,r);return i.end(),i};rx.exports={...g5,ClientRequest:Ld,IncomingMessage:v5,Agent:y5,globalAgent:x5,request:R5,get:N5,auto:E5,proxies:{HttpOverHttp2:b5,HttpsOverHttp2:T5,Http2OverHttp2:C5,Http2OverHttp:A5,Http2OverHttps:w5},validateHeaderName:D5,validateHeaderValue:S5};});var Ex=z((vx,Ud)=>{(function(t,e){function r(k,y){if(!k)throw new Error(y||"Assertion failed")}function i(k,y){k.super_=y;var T=function(){};T.prototype=y.prototype,k.prototype=new T,k.prototype.constructor=k;}function n(k,y,T){if(n.isBN(k))return k;this.negative=0,this.words=null,this.length=0,this.red=null,k!==null&&((y==="le"||y==="be")&&(T=y,y=10),this._init(k||0,y||10,T||"be"));}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?o=window.Buffer:o=me("buffer").Buffer;}catch(k){}n.isBN=function(y){return y instanceof n?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===n.wordSize&&Array.isArray(y.words)},n.max=function(y,T){return y.cmp(T)>0?y:T},n.min=function(y,T){return y.cmp(T)<0?y:T},n.prototype._init=function(y,T,S){if(typeof y=="number")return this._initNumber(y,T,S);if(typeof y=="object")return this._initArray(y,T,S);T==="hex"&&(T=16),r(T===(T|0)&&T>=2&&T<=36),y=y.toString().replace(/\s+/g,"");var R=0;y[0]==="-"&&(R++,this.negative=1),R<y.length&&(T===16?this._parseHex(y,R,S):(this._parseBase(y,T,R),S==="le"&&this._initArray(this.toArray(),T,S)));},n.prototype._initNumber=function(y,T,S){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(r(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),T,S);},n.prototype._initArray=function(y,T,S){if(r(typeof y.length=="number"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var L,I,K=0;if(S==="be")for(R=y.length-1,L=0;R>=0;R-=3)I=y[R]|y[R-1]<<8|y[R-2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);else if(S==="le")for(R=0,L=0;R<y.length;R+=3)I=y[R]|y[R+1]<<8|y[R+2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);return this._strip()};function s(k,y){var T=k.charCodeAt(y);if(T>=48&&T<=57)return T-48;if(T>=65&&T<=70)return T-55;if(T>=97&&T<=102)return T-87;r(!1,"Invalid character in "+k);}function a(k,y,T){var S=s(k,T);return T-1>=y&&(S|=s(k,T-1)<<4),S}n.prototype._parseHex=function(y,T,S){this.length=Math.ceil((y.length-T)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var L=0,I=0,K;if(S==="be")for(R=y.length-1;R>=T;R-=2)K=a(y,T,R)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;else {var q=y.length-T;for(R=q%2===0?T+1:T;R<y.length;R+=2)K=a(y,T,R)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;}this._strip();};function u(k,y,T,S){for(var R=0,L=0,I=Math.min(k.length,T),K=y;K<I;K++){var q=k.charCodeAt(K)-48;R*=S,q>=49?L=q-49+10:q>=17?L=q-17+10:L=q,r(q>=0&&L<S,"Invalid character"),R+=L;}return R}n.prototype._parseBase=function(y,T,S){this.words=[0],this.length=1;for(var R=0,L=1;L<=67108863;L*=T)R++;R--,L=L/T|0;for(var I=y.length-S,K=I%R,q=Math.min(I,I-K)+S,A=0,H=S;H<q;H+=R)A=u(y,H,H+R,T),this.imuln(L),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A);if(K!==0){var B=1;for(A=u(y,H,y.length,T),H=0;H<K;H++)B*=T;this.imuln(B),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A);}this._strip();},n.prototype.copy=function(y){y.words=new Array(this.length);for(var T=0;T<this.length;T++)y.words[T]=this.words[T];y.length=this.length,y.negative=this.negative,y.red=this.red;};function l(k,y){k.words=y.words,k.length=y.length,k.negative=y.negative,k.red=y.red;}if(n.prototype._move=function(y){l(y,this);},n.prototype.clone=function(){var y=new n(null);return this.copy(y),y},n.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol!="undefined"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=h;}catch(k){n.prototype.inspect=h;}else n.prototype.inspect=h;function h(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(y,T){y=y||10,T=T|0||1;var S;if(y===16||y==="hex"){S="";for(var R=0,L=0,I=0;I<this.length;I++){var K=this.words[I],q=((K<<R|L)&16777215).toString(16);L=K>>>24-R&16777215,R+=2,R>=26&&(R-=26,I--),L!==0||I!==this.length-1?S=c[6-q.length]+q+S:S=q+S;}for(L!==0&&(S=L.toString(16)+S);S.length%T!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(y===(y|0)&&y>=2&&y<=36){var A=p[y],H=f[y];S="";var B=this.clone();for(B.negative=0;!B.isZero();){var C=B.modrn(H).toString(y);B=B.idivn(H),B.isZero()?S=C+S:S=c[A-C.length]+C+S;}for(this.isZero()&&(S="0"+S);S.length%T!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}r(!1,"Base should be between 2 and 36");},n.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(y,T){return this.toArrayLike(o,y,T)}),n.prototype.toArray=function(y,T){return this.toArrayLike(Array,y,T)};var m=function(y,T){return y.allocUnsafe?y.allocUnsafe(T):new y(T)};n.prototype.toArrayLike=function(y,T,S){this._strip();var R=this.byteLength(),L=S||Math.max(1,R);r(R<=L,"byte array longer than desired length"),r(L>0,"Requested array length <= 0");var I=m(y,L),K=T==="le"?"LE":"BE";return this["_toArrayLike"+K](I,R),I},n.prototype._toArrayLikeLE=function(y,T){for(var S=0,R=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|R;y[S++]=K&255,S<y.length&&(y[S++]=K>>8&255),S<y.length&&(y[S++]=K>>16&255),I===6?(S<y.length&&(y[S++]=K>>24&255),R=0,I=0):(R=K>>>24,I+=2);}if(S<y.length)for(y[S++]=R;S<y.length;)y[S++]=0;},n.prototype._toArrayLikeBE=function(y,T){for(var S=y.length-1,R=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|R;y[S--]=K&255,S>=0&&(y[S--]=K>>8&255),S>=0&&(y[S--]=K>>16&255),I===6?(S>=0&&(y[S--]=K>>24&255),R=0,I=0):(R=K>>>24,I+=2);}if(S>=0)for(y[S--]=R;S>=0;)y[S--]=0;},Math.clz32?n.prototype._countBits=function(y){return 32-Math.clz32(y)}:n.prototype._countBits=function(y){var T=y,S=0;return T>=4096&&(S+=13,T>>>=13),T>=64&&(S+=7,T>>>=7),T>=8&&(S+=4,T>>>=4),T>=2&&(S+=2,T>>>=2),S+T},n.prototype._zeroBits=function(y){if(y===0)return 26;var T=y,S=0;return T&8191||(S+=13,T>>>=13),T&127||(S+=7,T>>>=7),T&15||(S+=4,T>>>=4),T&3||(S+=2,T>>>=2),T&1||S++,S},n.prototype.bitLength=function(){var y=this.words[this.length-1],T=this._countBits(y);return (this.length-1)*26+T};function _(k){for(var y=new Array(k.bitLength()),T=0;T<y.length;T++){var S=T/26|0,R=T%26;y[T]=k.words[S]>>>R&1;}return y}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,T=0;T<this.length;T++){var S=this._zeroBits(this.words[T]);if(y+=S,S!==26)break}return y},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},n.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var T=0;T<y.length;T++)this.words[T]=this.words[T]|y.words[T];return this._strip()},n.prototype.ior=function(y){return r((this.negative|y.negative)===0),this.iuor(y)},n.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},n.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},n.prototype.iuand=function(y){var T;this.length>y.length?T=y:T=this;for(var S=0;S<T.length;S++)this.words[S]=this.words[S]&y.words[S];return this.length=T.length,this._strip()},n.prototype.iand=function(y){return r((this.negative|y.negative)===0),this.iuand(y)},n.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},n.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},n.prototype.iuxor=function(y){var T,S;this.length>y.length?(T=this,S=y):(T=y,S=this);for(var R=0;R<S.length;R++)this.words[R]=T.words[R]^S.words[R];if(this!==T)for(;R<T.length;R++)this.words[R]=T.words[R];return this.length=T.length,this._strip()},n.prototype.ixor=function(y){return r((this.negative|y.negative)===0),this.iuxor(y)},n.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},n.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},n.prototype.inotn=function(y){r(typeof y=="number"&&y>=0);var T=Math.ceil(y/26)|0,S=y%26;this._expand(T),S>0&&T--;for(var R=0;R<T;R++)this.words[R]=~this.words[R]&67108863;return S>0&&(this.words[R]=~this.words[R]&67108863>>26-S),this._strip()},n.prototype.notn=function(y){return this.clone().inotn(y)},n.prototype.setn=function(y,T){r(typeof y=="number"&&y>=0);var S=y/26|0,R=y%26;return this._expand(S+1),T?this.words[S]=this.words[S]|1<<R:this.words[S]=this.words[S]&~(1<<R),this._strip()},n.prototype.iadd=function(y){var T;if(this.negative!==0&&y.negative===0)return this.negative=0,T=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,T=this.isub(y),y.negative=1,T._normSign();var S,R;this.length>y.length?(S=this,R=y):(S=y,R=this);for(var L=0,I=0;I<R.length;I++)T=(S.words[I]|0)+(R.words[I]|0)+L,this.words[I]=T&67108863,L=T>>>26;for(;L!==0&&I<S.length;I++)T=(S.words[I]|0)+L,this.words[I]=T&67108863,L=T>>>26;if(this.length=S.length,L!==0)this.words[this.length]=L,this.length++;else if(S!==this)for(;I<S.length;I++)this.words[I]=S.words[I];return this},n.prototype.add=function(y){var T;return y.negative!==0&&this.negative===0?(y.negative=0,T=this.sub(y),y.negative^=1,T):y.negative===0&&this.negative!==0?(this.negative=0,T=y.sub(this),this.negative=1,T):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},n.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var T=this.iadd(y);return y.negative=1,T._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var S=this.cmp(y);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,L;S>0?(R=this,L=y):(R=y,L=this);for(var I=0,K=0;K<L.length;K++)T=(R.words[K]|0)-(L.words[K]|0)+I,I=T>>26,this.words[K]=T&67108863;for(;I!==0&&K<R.length;K++)T=(R.words[K]|0)+I,I=T>>26,this.words[K]=T&67108863;if(I===0&&K<R.length&&R!==this)for(;K<R.length;K++)this.words[K]=R.words[K];return this.length=Math.max(this.length,K),R!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(y){return this.clone().isub(y)};function x(k,y,T){T.negative=y.negative^k.negative;var S=k.length+y.length|0;T.length=S,S=S-1|0;var R=k.words[0]|0,L=y.words[0]|0,I=R*L,K=I&67108863,q=I/67108864|0;T.words[0]=K;for(var A=1;A<S;A++){for(var H=q>>>26,B=q&67108863,C=Math.min(A,y.length-1),P=Math.max(0,A-k.length+1);P<=C;P++){var j=A-P|0;R=k.words[j]|0,L=y.words[P]|0,I=R*L+B,H+=I/67108864|0,B=I&67108863;}T.words[A]=B|0,q=H|0;}return q!==0?T.words[A]=q|0:T.length--,T._strip()}var v=function(y,T,S){var R=y.words,L=T.words,I=S.words,K=0,q,A,H,B=R[0]|0,C=B&8191,P=B>>>13,j=R[1]|0,$=j&8191,G=j>>>13,oe=R[2]|0,se=oe&8191,J=oe>>>13,ee=R[3]|0,U=ee&8191,M=ee>>>13,Z=R[4]|0,W=Z&8191,ne=Z>>>13,le=R[5]|0,Q=le&8191,_e=le>>>13,De=R[6]|0,ge=De&8191,be=De>>>13,et=R[7]|0,Oe=et&8191,He=et>>>13,Kt=R[8]|0,Je=Kt&8191,st=Kt>>>13,fi=R[9]|0,it=fi&8191,tt=fi>>>13,he=L[0]|0,ve=he&8191,Ce=he>>>13,Fe=L[1]|0,Re=Fe&8191,We=Fe>>>13,ut=L[2]|0,Ue=ut&8191,Qe=ut>>>13,Tn=L[3]|0,lt=Tn&8191,ht=Tn>>>13,Cn=L[4]|0,ct=Cn&8191,ft=Cn>>>13,An=L[5]|0,dt=An&8191,pt=An>>>13,wn=L[6]|0,mt=wn&8191,_t=wn>>>13,Dn=L[7]|0,gt=Dn&8191,yt=Dn>>>13,Sn=L[8]|0,xt=Sn&8191,vt=Sn>>>13,Rn=L[9]|0,Et=Rn&8191,bt=Rn>>>13;S.negative=y.negative^T.negative,S.length=19,q=Math.imul(C,ve),A=Math.imul(C,Ce),A=A+Math.imul(P,ve)|0,H=Math.imul(P,Ce);var Pi=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,q=Math.imul($,ve),A=Math.imul($,Ce),A=A+Math.imul(G,ve)|0,H=Math.imul(G,Ce),q=q+Math.imul(C,Re)|0,A=A+Math.imul(C,We)|0,A=A+Math.imul(P,Re)|0,H=H+Math.imul(P,We)|0;var Ii=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,q=Math.imul(se,ve),A=Math.imul(se,Ce),A=A+Math.imul(J,ve)|0,H=Math.imul(J,Ce),q=q+Math.imul($,Re)|0,A=A+Math.imul($,We)|0,A=A+Math.imul(G,Re)|0,H=H+Math.imul(G,We)|0,q=q+Math.imul(C,Ue)|0,A=A+Math.imul(C,Qe)|0,A=A+Math.imul(P,Ue)|0,H=H+Math.imul(P,Qe)|0;var ki=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(ki>>>26)|0,ki&=67108863,q=Math.imul(U,ve),A=Math.imul(U,Ce),A=A+Math.imul(M,ve)|0,H=Math.imul(M,Ce),q=q+Math.imul(se,Re)|0,A=A+Math.imul(se,We)|0,A=A+Math.imul(J,Re)|0,H=H+Math.imul(J,We)|0,q=q+Math.imul($,Ue)|0,A=A+Math.imul($,Qe)|0,A=A+Math.imul(G,Ue)|0,H=H+Math.imul(G,Qe)|0,q=q+Math.imul(C,lt)|0,A=A+Math.imul(C,ht)|0,A=A+Math.imul(P,lt)|0,H=H+Math.imul(P,ht)|0;var Mi=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,q=Math.imul(W,ve),A=Math.imul(W,Ce),A=A+Math.imul(ne,ve)|0,H=Math.imul(ne,Ce),q=q+Math.imul(U,Re)|0,A=A+Math.imul(U,We)|0,A=A+Math.imul(M,Re)|0,H=H+Math.imul(M,We)|0,q=q+Math.imul(se,Ue)|0,A=A+Math.imul(se,Qe)|0,A=A+Math.imul(J,Ue)|0,H=H+Math.imul(J,Qe)|0,q=q+Math.imul($,lt)|0,A=A+Math.imul($,ht)|0,A=A+Math.imul(G,lt)|0,H=H+Math.imul(G,ht)|0,q=q+Math.imul(C,ct)|0,A=A+Math.imul(C,ft)|0,A=A+Math.imul(P,ct)|0,H=H+Math.imul(P,ft)|0;var Bi=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,q=Math.imul(Q,ve),A=Math.imul(Q,Ce),A=A+Math.imul(_e,ve)|0,H=Math.imul(_e,Ce),q=q+Math.imul(W,Re)|0,A=A+Math.imul(W,We)|0,A=A+Math.imul(ne,Re)|0,H=H+Math.imul(ne,We)|0,q=q+Math.imul(U,Ue)|0,A=A+Math.imul(U,Qe)|0,A=A+Math.imul(M,Ue)|0,H=H+Math.imul(M,Qe)|0,q=q+Math.imul(se,lt)|0,A=A+Math.imul(se,ht)|0,A=A+Math.imul(J,lt)|0,H=H+Math.imul(J,ht)|0,q=q+Math.imul($,ct)|0,A=A+Math.imul($,ft)|0,A=A+Math.imul(G,ct)|0,H=H+Math.imul(G,ft)|0,q=q+Math.imul(C,dt)|0,A=A+Math.imul(C,pt)|0,A=A+Math.imul(P,dt)|0,H=H+Math.imul(P,pt)|0;var $c=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+($c>>>26)|0,$c&=67108863,q=Math.imul(ge,ve),A=Math.imul(ge,Ce),A=A+Math.imul(be,ve)|0,H=Math.imul(be,Ce),q=q+Math.imul(Q,Re)|0,A=A+Math.imul(Q,We)|0,A=A+Math.imul(_e,Re)|0,H=H+Math.imul(_e,We)|0,q=q+Math.imul(W,Ue)|0,A=A+Math.imul(W,Qe)|0,A=A+Math.imul(ne,Ue)|0,H=H+Math.imul(ne,Qe)|0,q=q+Math.imul(U,lt)|0,A=A+Math.imul(U,ht)|0,A=A+Math.imul(M,lt)|0,H=H+Math.imul(M,ht)|0,q=q+Math.imul(se,ct)|0,A=A+Math.imul(se,ft)|0,A=A+Math.imul(J,ct)|0,H=H+Math.imul(J,ft)|0,q=q+Math.imul($,dt)|0,A=A+Math.imul($,pt)|0,A=A+Math.imul(G,dt)|0,H=H+Math.imul(G,pt)|0,q=q+Math.imul(C,mt)|0,A=A+Math.imul(C,_t)|0,A=A+Math.imul(P,mt)|0,H=H+Math.imul(P,_t)|0;var zc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(zc>>>26)|0,zc&=67108863,q=Math.imul(Oe,ve),A=Math.imul(Oe,Ce),A=A+Math.imul(He,ve)|0,H=Math.imul(He,Ce),q=q+Math.imul(ge,Re)|0,A=A+Math.imul(ge,We)|0,A=A+Math.imul(be,Re)|0,H=H+Math.imul(be,We)|0,q=q+Math.imul(Q,Ue)|0,A=A+Math.imul(Q,Qe)|0,A=A+Math.imul(_e,Ue)|0,H=H+Math.imul(_e,Qe)|0,q=q+Math.imul(W,lt)|0,A=A+Math.imul(W,ht)|0,A=A+Math.imul(ne,lt)|0,H=H+Math.imul(ne,ht)|0,q=q+Math.imul(U,ct)|0,A=A+Math.imul(U,ft)|0,A=A+Math.imul(M,ct)|0,H=H+Math.imul(M,ft)|0,q=q+Math.imul(se,dt)|0,A=A+Math.imul(se,pt)|0,A=A+Math.imul(J,dt)|0,H=H+Math.imul(J,pt)|0,q=q+Math.imul($,mt)|0,A=A+Math.imul($,_t)|0,A=A+Math.imul(G,mt)|0,H=H+Math.imul(G,_t)|0,q=q+Math.imul(C,gt)|0,A=A+Math.imul(C,yt)|0,A=A+Math.imul(P,gt)|0,H=H+Math.imul(P,yt)|0;var Kc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Kc>>>26)|0,Kc&=67108863,q=Math.imul(Je,ve),A=Math.imul(Je,Ce),A=A+Math.imul(st,ve)|0,H=Math.imul(st,Ce),q=q+Math.imul(Oe,Re)|0,A=A+Math.imul(Oe,We)|0,A=A+Math.imul(He,Re)|0,H=H+Math.imul(He,We)|0,q=q+Math.imul(ge,Ue)|0,A=A+Math.imul(ge,Qe)|0,A=A+Math.imul(be,Ue)|0,H=H+Math.imul(be,Qe)|0,q=q+Math.imul(Q,lt)|0,A=A+Math.imul(Q,ht)|0,A=A+Math.imul(_e,lt)|0,H=H+Math.imul(_e,ht)|0,q=q+Math.imul(W,ct)|0,A=A+Math.imul(W,ft)|0,A=A+Math.imul(ne,ct)|0,H=H+Math.imul(ne,ft)|0,q=q+Math.imul(U,dt)|0,A=A+Math.imul(U,pt)|0,A=A+Math.imul(M,dt)|0,H=H+Math.imul(M,pt)|0,q=q+Math.imul(se,mt)|0,A=A+Math.imul(se,_t)|0,A=A+Math.imul(J,mt)|0,H=H+Math.imul(J,_t)|0,q=q+Math.imul($,gt)|0,A=A+Math.imul($,yt)|0,A=A+Math.imul(G,gt)|0,H=H+Math.imul(G,yt)|0,q=q+Math.imul(C,xt)|0,A=A+Math.imul(C,vt)|0,A=A+Math.imul(P,xt)|0,H=H+Math.imul(P,vt)|0;var Gc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Gc>>>26)|0,Gc&=67108863,q=Math.imul(it,ve),A=Math.imul(it,Ce),A=A+Math.imul(tt,ve)|0,H=Math.imul(tt,Ce),q=q+Math.imul(Je,Re)|0,A=A+Math.imul(Je,We)|0,A=A+Math.imul(st,Re)|0,H=H+Math.imul(st,We)|0,q=q+Math.imul(Oe,Ue)|0,A=A+Math.imul(Oe,Qe)|0,A=A+Math.imul(He,Ue)|0,H=H+Math.imul(He,Qe)|0,q=q+Math.imul(ge,lt)|0,A=A+Math.imul(ge,ht)|0,A=A+Math.imul(be,lt)|0,H=H+Math.imul(be,ht)|0,q=q+Math.imul(Q,ct)|0,A=A+Math.imul(Q,ft)|0,A=A+Math.imul(_e,ct)|0,H=H+Math.imul(_e,ft)|0,q=q+Math.imul(W,dt)|0,A=A+Math.imul(W,pt)|0,A=A+Math.imul(ne,dt)|0,H=H+Math.imul(ne,pt)|0,q=q+Math.imul(U,mt)|0,A=A+Math.imul(U,_t)|0,A=A+Math.imul(M,mt)|0,H=H+Math.imul(M,_t)|0,q=q+Math.imul(se,gt)|0,A=A+Math.imul(se,yt)|0,A=A+Math.imul(J,gt)|0,H=H+Math.imul(J,yt)|0,q=q+Math.imul($,xt)|0,A=A+Math.imul($,vt)|0,A=A+Math.imul(G,xt)|0,H=H+Math.imul(G,vt)|0,q=q+Math.imul(C,Et)|0,A=A+Math.imul(C,bt)|0,A=A+Math.imul(P,Et)|0,H=H+Math.imul(P,bt)|0;var Wc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Wc>>>26)|0,Wc&=67108863,q=Math.imul(it,Re),A=Math.imul(it,We),A=A+Math.imul(tt,Re)|0,H=Math.imul(tt,We),q=q+Math.imul(Je,Ue)|0,A=A+Math.imul(Je,Qe)|0,A=A+Math.imul(st,Ue)|0,H=H+Math.imul(st,Qe)|0,q=q+Math.imul(Oe,lt)|0,A=A+Math.imul(Oe,ht)|0,A=A+Math.imul(He,lt)|0,H=H+Math.imul(He,ht)|0,q=q+Math.imul(ge,ct)|0,A=A+Math.imul(ge,ft)|0,A=A+Math.imul(be,ct)|0,H=H+Math.imul(be,ft)|0,q=q+Math.imul(Q,dt)|0,A=A+Math.imul(Q,pt)|0,A=A+Math.imul(_e,dt)|0,H=H+Math.imul(_e,pt)|0,q=q+Math.imul(W,mt)|0,A=A+Math.imul(W,_t)|0,A=A+Math.imul(ne,mt)|0,H=H+Math.imul(ne,_t)|0,q=q+Math.imul(U,gt)|0,A=A+Math.imul(U,yt)|0,A=A+Math.imul(M,gt)|0,H=H+Math.imul(M,yt)|0,q=q+Math.imul(se,xt)|0,A=A+Math.imul(se,vt)|0,A=A+Math.imul(J,xt)|0,H=H+Math.imul(J,vt)|0,q=q+Math.imul($,Et)|0,A=A+Math.imul($,bt)|0,A=A+Math.imul(G,Et)|0,H=H+Math.imul(G,bt)|0;var Yc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Yc>>>26)|0,Yc&=67108863,q=Math.imul(it,Ue),A=Math.imul(it,Qe),A=A+Math.imul(tt,Ue)|0,H=Math.imul(tt,Qe),q=q+Math.imul(Je,lt)|0,A=A+Math.imul(Je,ht)|0,A=A+Math.imul(st,lt)|0,H=H+Math.imul(st,ht)|0,q=q+Math.imul(Oe,ct)|0,A=A+Math.imul(Oe,ft)|0,A=A+Math.imul(He,ct)|0,H=H+Math.imul(He,ft)|0,q=q+Math.imul(ge,dt)|0,A=A+Math.imul(ge,pt)|0,A=A+Math.imul(be,dt)|0,H=H+Math.imul(be,pt)|0,q=q+Math.imul(Q,mt)|0,A=A+Math.imul(Q,_t)|0,A=A+Math.imul(_e,mt)|0,H=H+Math.imul(_e,_t)|0,q=q+Math.imul(W,gt)|0,A=A+Math.imul(W,yt)|0,A=A+Math.imul(ne,gt)|0,H=H+Math.imul(ne,yt)|0,q=q+Math.imul(U,xt)|0,A=A+Math.imul(U,vt)|0,A=A+Math.imul(M,xt)|0,H=H+Math.imul(M,vt)|0,q=q+Math.imul(se,Et)|0,A=A+Math.imul(se,bt)|0,A=A+Math.imul(J,Et)|0,H=H+Math.imul(J,bt)|0;var Zc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Zc>>>26)|0,Zc&=67108863,q=Math.imul(it,lt),A=Math.imul(it,ht),A=A+Math.imul(tt,lt)|0,H=Math.imul(tt,ht),q=q+Math.imul(Je,ct)|0,A=A+Math.imul(Je,ft)|0,A=A+Math.imul(st,ct)|0,H=H+Math.imul(st,ft)|0,q=q+Math.imul(Oe,dt)|0,A=A+Math.imul(Oe,pt)|0,A=A+Math.imul(He,dt)|0,H=H+Math.imul(He,pt)|0,q=q+Math.imul(ge,mt)|0,A=A+Math.imul(ge,_t)|0,A=A+Math.imul(be,mt)|0,H=H+Math.imul(be,_t)|0,q=q+Math.imul(Q,gt)|0,A=A+Math.imul(Q,yt)|0,A=A+Math.imul(_e,gt)|0,H=H+Math.imul(_e,yt)|0,q=q+Math.imul(W,xt)|0,A=A+Math.imul(W,vt)|0,A=A+Math.imul(ne,xt)|0,H=H+Math.imul(ne,vt)|0,q=q+Math.imul(U,Et)|0,A=A+Math.imul(U,bt)|0,A=A+Math.imul(M,Et)|0,H=H+Math.imul(M,bt)|0;var Xc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Xc>>>26)|0,Xc&=67108863,q=Math.imul(it,ct),A=Math.imul(it,ft),A=A+Math.imul(tt,ct)|0,H=Math.imul(tt,ft),q=q+Math.imul(Je,dt)|0,A=A+Math.imul(Je,pt)|0,A=A+Math.imul(st,dt)|0,H=H+Math.imul(st,pt)|0,q=q+Math.imul(Oe,mt)|0,A=A+Math.imul(Oe,_t)|0,A=A+Math.imul(He,mt)|0,H=H+Math.imul(He,_t)|0,q=q+Math.imul(ge,gt)|0,A=A+Math.imul(ge,yt)|0,A=A+Math.imul(be,gt)|0,H=H+Math.imul(be,yt)|0,q=q+Math.imul(Q,xt)|0,A=A+Math.imul(Q,vt)|0,A=A+Math.imul(_e,xt)|0,H=H+Math.imul(_e,vt)|0,q=q+Math.imul(W,Et)|0,A=A+Math.imul(W,bt)|0,A=A+Math.imul(ne,Et)|0,H=H+Math.imul(ne,bt)|0;var Jc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Jc>>>26)|0,Jc&=67108863,q=Math.imul(it,dt),A=Math.imul(it,pt),A=A+Math.imul(tt,dt)|0,H=Math.imul(tt,pt),q=q+Math.imul(Je,mt)|0,A=A+Math.imul(Je,_t)|0,A=A+Math.imul(st,mt)|0,H=H+Math.imul(st,_t)|0,q=q+Math.imul(Oe,gt)|0,A=A+Math.imul(Oe,yt)|0,A=A+Math.imul(He,gt)|0,H=H+Math.imul(He,yt)|0,q=q+Math.imul(ge,xt)|0,A=A+Math.imul(ge,vt)|0,A=A+Math.imul(be,xt)|0,H=H+Math.imul(be,vt)|0,q=q+Math.imul(Q,Et)|0,A=A+Math.imul(Q,bt)|0,A=A+Math.imul(_e,Et)|0,H=H+Math.imul(_e,bt)|0;var Qc=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(Qc>>>26)|0,Qc&=67108863,q=Math.imul(it,mt),A=Math.imul(it,_t),A=A+Math.imul(tt,mt)|0,H=Math.imul(tt,_t),q=q+Math.imul(Je,gt)|0,A=A+Math.imul(Je,yt)|0,A=A+Math.imul(st,gt)|0,H=H+Math.imul(st,yt)|0,q=q+Math.imul(Oe,xt)|0,A=A+Math.imul(Oe,vt)|0,A=A+Math.imul(He,xt)|0,H=H+Math.imul(He,vt)|0,q=q+Math.imul(ge,Et)|0,A=A+Math.imul(ge,bt)|0,A=A+Math.imul(be,Et)|0,H=H+Math.imul(be,bt)|0;var ef=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(ef>>>26)|0,ef&=67108863,q=Math.imul(it,gt),A=Math.imul(it,yt),A=A+Math.imul(tt,gt)|0,H=Math.imul(tt,yt),q=q+Math.imul(Je,xt)|0,A=A+Math.imul(Je,vt)|0,A=A+Math.imul(st,xt)|0,H=H+Math.imul(st,vt)|0,q=q+Math.imul(Oe,Et)|0,A=A+Math.imul(Oe,bt)|0,A=A+Math.imul(He,Et)|0,H=H+Math.imul(He,bt)|0;var tf=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(tf>>>26)|0,tf&=67108863,q=Math.imul(it,xt),A=Math.imul(it,vt),A=A+Math.imul(tt,xt)|0,H=Math.imul(tt,vt),q=q+Math.imul(Je,Et)|0,A=A+Math.imul(Je,bt)|0,A=A+Math.imul(st,Et)|0,H=H+Math.imul(st,bt)|0;var rf=(K+q|0)+((A&8191)<<13)|0;K=(H+(A>>>13)|0)+(rf>>>26)|0,rf&=67108863,q=Math.imul(it,Et),A=Math.imul(it,bt),A=A+Math.imul(tt,Et)|0,H=Math.imul(tt,bt);var nf=(K+q|0)+((A&8191)<<13)|0;return K=(H+(A>>>13)|0)+(nf>>>26)|0,nf&=67108863,I[0]=Pi,I[1]=Ii,I[2]=ki,I[3]=Mi,I[4]=Bi,I[5]=$c,I[6]=zc,I[7]=Kc,I[8]=Gc,I[9]=Wc,I[10]=Yc,I[11]=Zc,I[12]=Xc,I[13]=Jc,I[14]=Qc,I[15]=ef,I[16]=tf,I[17]=rf,I[18]=nf,K!==0&&(I[19]=K,S.length++),S};Math.imul||(v=x);function g(k,y,T){T.negative=y.negative^k.negative,T.length=k.length+y.length;for(var S=0,R=0,L=0;L<T.length-1;L++){var I=R;R=0;for(var K=S&67108863,q=Math.min(L,y.length-1),A=Math.max(0,L-k.length+1);A<=q;A++){var H=L-A,B=k.words[H]|0,C=y.words[A]|0,P=B*C,j=P&67108863;I=I+(P/67108864|0)|0,j=j+K|0,K=j&67108863,I=I+(j>>>26)|0,R+=I>>>26,I&=67108863;}T.words[L]=K,S=I,I=R;}return S!==0?T.words[L]=S:T.length--,T._strip()}function b(k,y,T){return g(k,y,T)}n.prototype.mulTo=function(y,T){var S,R=this.length+y.length;return this.length===10&&y.length===10?S=v(this,y,T):R<63?S=x(this,y,T):R<1024?S=g(this,y,T):S=b(this,y,T),S};n.prototype.mul=function(y){var T=new n(null);return T.words=new Array(this.length+y.length),this.mulTo(y,T)},n.prototype.mulf=function(y){var T=new n(null);return T.words=new Array(this.length+y.length),b(this,y,T)},n.prototype.imul=function(y){return this.clone().mulTo(y,this)},n.prototype.imuln=function(y){var T=y<0;T&&(y=-y),r(typeof y=="number"),r(y<67108864);for(var S=0,R=0;R<this.length;R++){var L=(this.words[R]|0)*y,I=(L&67108863)+(S&67108863);S>>=26,S+=L/67108864|0,S+=I>>>26,this.words[R]=I&67108863;}return S!==0&&(this.words[R]=S,this.length++),T?this.ineg():this},n.prototype.muln=function(y){return this.clone().imuln(y)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(y){var T=_(y);if(T.length===0)return new n(1);for(var S=this,R=0;R<T.length&&T[R]===0;R++,S=S.sqr());if(++R<T.length)for(var L=S.sqr();R<T.length;R++,L=L.sqr())T[R]!==0&&(S=S.mul(L));return S},n.prototype.iushln=function(y){r(typeof y=="number"&&y>=0);var T=y%26,S=(y-T)/26,R=67108863>>>26-T<<26-T,L;if(T!==0){var I=0;for(L=0;L<this.length;L++){var K=this.words[L]&R,q=(this.words[L]|0)-K<<T;this.words[L]=q|I,I=K>>>26-T;}I&&(this.words[L]=I,this.length++);}if(S!==0){for(L=this.length-1;L>=0;L--)this.words[L+S]=this.words[L];for(L=0;L<S;L++)this.words[L]=0;this.length+=S;}return this._strip()},n.prototype.ishln=function(y){return r(this.negative===0),this.iushln(y)},n.prototype.iushrn=function(y,T,S){r(typeof y=="number"&&y>=0);var R;T?R=(T-T%26)/26:R=0;var L=y%26,I=Math.min((y-L)/26,this.length),K=67108863^67108863>>>L<<L,q=S;if(R-=I,R=Math.max(0,R),q){for(var A=0;A<I;A++)q.words[A]=this.words[A];q.length=I;}if(I!==0)if(this.length>I)for(this.length-=I,A=0;A<this.length;A++)this.words[A]=this.words[A+I];else this.words[0]=0,this.length=1;var H=0;for(A=this.length-1;A>=0&&(H!==0||A>=R);A--){var B=this.words[A]|0;this.words[A]=H<<26-L|B>>>L,H=B&K;}return q&&H!==0&&(q.words[q.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(y,T,S){return r(this.negative===0),this.iushrn(y,T,S)},n.prototype.shln=function(y){return this.clone().ishln(y)},n.prototype.ushln=function(y){return this.clone().iushln(y)},n.prototype.shrn=function(y){return this.clone().ishrn(y)},n.prototype.ushrn=function(y){return this.clone().iushrn(y)},n.prototype.testn=function(y){r(typeof y=="number"&&y>=0);var T=y%26,S=(y-T)/26,R=1<<T;if(this.length<=S)return !1;var L=this.words[S];return !!(L&R)},n.prototype.imaskn=function(y){r(typeof y=="number"&&y>=0);var T=y%26,S=(y-T)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(T!==0&&S++,this.length=Math.min(S,this.length),T!==0){var R=67108863^67108863>>>T<<T;this.words[this.length-1]&=R;}return this._strip()},n.prototype.maskn=function(y){return this.clone().imaskn(y)},n.prototype.iaddn=function(y){return r(typeof y=="number"),r(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},n.prototype._iaddn=function(y){this.words[0]+=y;for(var T=0;T<this.length&&this.words[T]>=67108864;T++)this.words[T]-=67108864,T===this.length-1?this.words[T+1]=1:this.words[T+1]++;return this.length=Math.max(this.length,T+1),this},n.prototype.isubn=function(y){if(r(typeof y=="number"),r(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var T=0;T<this.length&&this.words[T]<0;T++)this.words[T]+=67108864,this.words[T+1]-=1;return this._strip()},n.prototype.addn=function(y){return this.clone().iaddn(y)},n.prototype.subn=function(y){return this.clone().isubn(y)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(y,T,S){var R=y.length+S,L;this._expand(R);var I,K=0;for(L=0;L<y.length;L++){I=(this.words[L+S]|0)+K;var q=(y.words[L]|0)*T;I-=q&67108863,K=(I>>26)-(q/67108864|0),this.words[L+S]=I&67108863;}for(;L<this.length-S;L++)I=(this.words[L+S]|0)+K,K=I>>26,this.words[L+S]=I&67108863;if(K===0)return this._strip();for(r(K===-1),K=0,L=0;L<this.length;L++)I=-(this.words[L]|0)+K,K=I>>26,this.words[L]=I&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(y,T){var S=this.length-y.length,R=this.clone(),L=y,I=L.words[L.length-1]|0,K=this._countBits(I);S=26-K,S!==0&&(L=L.ushln(S),R.iushln(S),I=L.words[L.length-1]|0);var q=R.length-L.length,A;if(T!=="mod"){A=new n(null),A.length=q+1,A.words=new Array(A.length);for(var H=0;H<A.length;H++)A.words[H]=0;}var B=R.clone()._ishlnsubmul(L,1,q);B.negative===0&&(R=B,A&&(A.words[q]=1));for(var C=q-1;C>=0;C--){var P=(R.words[L.length+C]|0)*67108864+(R.words[L.length+C-1]|0);for(P=Math.min(P/I|0,67108863),R._ishlnsubmul(L,P,C);R.negative!==0;)P--,R.negative=0,R._ishlnsubmul(L,1,C),R.isZero()||(R.negative^=1);A&&(A.words[C]=P);}return A&&A._strip(),R._strip(),T!=="div"&&S!==0&&R.iushrn(S),{div:A||null,mod:R}},n.prototype.divmod=function(y,T,S){if(r(!y.isZero()),this.isZero())return {div:new n(0),mod:new n(0)};var R,L,I;return this.negative!==0&&y.negative===0?(I=this.neg().divmod(y,T),T!=="mod"&&(R=I.div.neg()),T!=="div"&&(L=I.mod.neg(),S&&L.negative!==0&&L.iadd(y)),{div:R,mod:L}):this.negative===0&&y.negative!==0?(I=this.divmod(y.neg(),T),T!=="mod"&&(R=I.div.neg()),{div:R,mod:I.mod}):this.negative&y.negative?(I=this.neg().divmod(y.neg(),T),T!=="div"&&(L=I.mod.neg(),S&&L.negative!==0&&L.isub(y)),{div:I.div,mod:L}):y.length>this.length||this.cmp(y)<0?{div:new n(0),mod:this}:y.length===1?T==="div"?{div:this.divn(y.words[0]),mod:null}:T==="mod"?{div:null,mod:new n(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new n(this.modrn(y.words[0]))}:this._wordDiv(y,T)},n.prototype.div=function(y){return this.divmod(y,"div",!1).div},n.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},n.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},n.prototype.divRound=function(y){var T=this.divmod(y);if(T.mod.isZero())return T.div;var S=T.div.negative!==0?T.mod.isub(y):T.mod,R=y.ushrn(1),L=y.andln(1),I=S.cmp(R);return I<0||L===1&&I===0?T.div:T.div.negative!==0?T.div.isubn(1):T.div.iaddn(1)},n.prototype.modrn=function(y){var T=y<0;T&&(y=-y),r(y<=67108863);for(var S=(1<<26)%y,R=0,L=this.length-1;L>=0;L--)R=(S*R+(this.words[L]|0))%y;return T?-R:R},n.prototype.modn=function(y){return this.modrn(y)},n.prototype.idivn=function(y){var T=y<0;T&&(y=-y),r(y<=67108863);for(var S=0,R=this.length-1;R>=0;R--){var L=(this.words[R]|0)+S*67108864;this.words[R]=L/y|0,S=L%y;}return this._strip(),T?this.ineg():this},n.prototype.divn=function(y){return this.clone().idivn(y)},n.prototype.egcd=function(y){r(y.negative===0),r(!y.isZero());var T=this,S=y.clone();T.negative!==0?T=T.umod(y):T=T.clone();for(var R=new n(1),L=new n(0),I=new n(0),K=new n(1),q=0;T.isEven()&&S.isEven();)T.iushrn(1),S.iushrn(1),++q;for(var A=S.clone(),H=T.clone();!T.isZero();){for(var B=0,C=1;!(T.words[0]&C)&&B<26;++B,C<<=1);if(B>0)for(T.iushrn(B);B-- >0;)(R.isOdd()||L.isOdd())&&(R.iadd(A),L.isub(H)),R.iushrn(1),L.iushrn(1);for(var P=0,j=1;!(S.words[0]&j)&&P<26;++P,j<<=1);if(P>0)for(S.iushrn(P);P-- >0;)(I.isOdd()||K.isOdd())&&(I.iadd(A),K.isub(H)),I.iushrn(1),K.iushrn(1);T.cmp(S)>=0?(T.isub(S),R.isub(I),L.isub(K)):(S.isub(T),I.isub(R),K.isub(L));}return {a:I,b:K,gcd:S.iushln(q)}},n.prototype._invmp=function(y){r(y.negative===0),r(!y.isZero());var T=this,S=y.clone();T.negative!==0?T=T.umod(y):T=T.clone();for(var R=new n(1),L=new n(0),I=S.clone();T.cmpn(1)>0&&S.cmpn(1)>0;){for(var K=0,q=1;!(T.words[0]&q)&&K<26;++K,q<<=1);if(K>0)for(T.iushrn(K);K-- >0;)R.isOdd()&&R.iadd(I),R.iushrn(1);for(var A=0,H=1;!(S.words[0]&H)&&A<26;++A,H<<=1);if(A>0)for(S.iushrn(A);A-- >0;)L.isOdd()&&L.iadd(I),L.iushrn(1);T.cmp(S)>=0?(T.isub(S),R.isub(L)):(S.isub(T),L.isub(R));}var B;return T.cmpn(1)===0?B=R:B=L,B.cmpn(0)<0&&B.iadd(y),B},n.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var T=this.clone(),S=y.clone();T.negative=0,S.negative=0;for(var R=0;T.isEven()&&S.isEven();R++)T.iushrn(1),S.iushrn(1);do{for(;T.isEven();)T.iushrn(1);for(;S.isEven();)S.iushrn(1);var L=T.cmp(S);if(L<0){var I=T;T=S,S=I;}else if(L===0||S.cmpn(1)===0)break;T.isub(S);}while(!0);return S.iushln(R)},n.prototype.invm=function(y){return this.egcd(y).a.umod(y)},n.prototype.isEven=function(){return (this.words[0]&1)===0},n.prototype.isOdd=function(){return (this.words[0]&1)===1},n.prototype.andln=function(y){return this.words[0]&y},n.prototype.bincn=function(y){r(typeof y=="number");var T=y%26,S=(y-T)/26,R=1<<T;if(this.length<=S)return this._expand(S+1),this.words[S]|=R,this;for(var L=R,I=S;L!==0&&I<this.length;I++){var K=this.words[I]|0;K+=L,L=K>>>26,K&=67108863,this.words[I]=K;}return L!==0&&(this.words[I]=L,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(y){var T=y<0;if(this.negative!==0&&!T)return -1;if(this.negative===0&&T)return 1;this._strip();var S;if(this.length>1)S=1;else {T&&(y=-y),r(y<=67108863,"Number is too big");var R=this.words[0]|0;S=R===y?0:R<y?-1:1;}return this.negative!==0?-S|0:S},n.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return -1;if(this.negative===0&&y.negative!==0)return 1;var T=this.ucmp(y);return this.negative!==0?-T|0:T},n.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return -1;for(var T=0,S=this.length-1;S>=0;S--){var R=this.words[S]|0,L=y.words[S]|0;if(R!==L){R<L?T=-1:R>L&&(T=1);break}}return T},n.prototype.gtn=function(y){return this.cmpn(y)===1},n.prototype.gt=function(y){return this.cmp(y)===1},n.prototype.gten=function(y){return this.cmpn(y)>=0},n.prototype.gte=function(y){return this.cmp(y)>=0},n.prototype.ltn=function(y){return this.cmpn(y)===-1},n.prototype.lt=function(y){return this.cmp(y)===-1},n.prototype.lten=function(y){return this.cmpn(y)<=0},n.prototype.lte=function(y){return this.cmp(y)<=0},n.prototype.eqn=function(y){return this.cmpn(y)===0},n.prototype.eq=function(y){return this.cmp(y)===0},n.red=function(y){return new te(y)},n.prototype.toRed=function(y){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(y){return this.red=y,this},n.prototype.forceRed=function(y){return r(!this.red,"Already a number in reduction context"),this._forceRed(y)},n.prototype.redAdd=function(y){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},n.prototype.redIAdd=function(y){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},n.prototype.redSub=function(y){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},n.prototype.redISub=function(y){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},n.prototype.redShl=function(y){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},n.prototype.redMul=function(y){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},n.prototype.redIMul=function(y){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(y){return r(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var w={k256:null,p224:null,p192:null,p25519:null};function D(k,y){this.name=k,this.p=new n(y,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}D.prototype._tmp=function(){var y=new n(null);return y.words=new Array(Math.ceil(this.n/13)),y},D.prototype.ireduce=function(y){var T=y,S;do this.split(T,this.tmp),T=this.imulK(T),T=T.iadd(this.tmp),S=T.bitLength();while(S>this.n);var R=S<this.n?-1:T.ucmp(this.p);return R===0?(T.words[0]=0,T.length=1):R>0?T.isub(this.p):T.strip!==void 0?T.strip():T._strip(),T},D.prototype.split=function(y,T){y.iushrn(this.n,0,T);},D.prototype.imulK=function(y){return y.imul(this.k)};function N(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}i(N,D),N.prototype.split=function(y,T){for(var S=4194303,R=Math.min(y.length,9),L=0;L<R;L++)T.words[L]=y.words[L];if(T.length=R,y.length<=9){y.words[0]=0,y.length=1;return}var I=y.words[9];for(T.words[T.length++]=I&S,L=10;L<y.length;L++){var K=y.words[L]|0;y.words[L-10]=(K&S)<<4|I>>>22,I=K;}I>>>=22,y.words[L-10]=I,I===0&&y.length>10?y.length-=10:y.length-=9;},N.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var T=0,S=0;S<y.length;S++){var R=y.words[S]|0;T+=R*977,y.words[S]=T&67108863,T=R*64+(T/67108864|0);}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}i(F,D);function V(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}i(V,D);function X(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}i(X,D),X.prototype.imulK=function(y){for(var T=0,S=0;S<y.length;S++){var R=(y.words[S]|0)*19+T,L=R&67108863;R>>>=26,y.words[S]=L,T=R;}return T!==0&&(y.words[y.length++]=T),y},n._prime=function(y){if(w[y])return w[y];var T;if(y==="k256")T=new N;else if(y==="p224")T=new F;else if(y==="p192")T=new V;else if(y==="p25519")T=new X;else throw new Error("Unknown prime "+y);return w[y]=T,T};function te(k){if(typeof k=="string"){var y=n._prime(k);this.m=y.p,this.prime=y;}else r(k.gtn(1),"modulus must be greater than 1"),this.m=k,this.prime=null;}te.prototype._verify1=function(y){r(y.negative===0,"red works only with positives"),r(y.red,"red works only with red numbers");},te.prototype._verify2=function(y,T){r((y.negative|T.negative)===0,"red works only with positives"),r(y.red&&y.red===T.red,"red works only with red numbers");},te.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(l(y,y.umod(this.m)._forceRed(this)),y)},te.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},te.prototype.add=function(y,T){this._verify2(y,T);var S=y.add(T);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},te.prototype.iadd=function(y,T){this._verify2(y,T);var S=y.iadd(T);return S.cmp(this.m)>=0&&S.isub(this.m),S},te.prototype.sub=function(y,T){this._verify2(y,T);var S=y.sub(T);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},te.prototype.isub=function(y,T){this._verify2(y,T);var S=y.isub(T);return S.cmpn(0)<0&&S.iadd(this.m),S},te.prototype.shl=function(y,T){return this._verify1(y),this.imod(y.ushln(T))},te.prototype.imul=function(y,T){return this._verify2(y,T),this.imod(y.imul(T))},te.prototype.mul=function(y,T){return this._verify2(y,T),this.imod(y.mul(T))},te.prototype.isqr=function(y){return this.imul(y,y.clone())},te.prototype.sqr=function(y){return this.mul(y,y)},te.prototype.sqrt=function(y){if(y.isZero())return y.clone();var T=this.m.andln(3);if(r(T%2===1),T===3){var S=this.m.add(new n(1)).iushrn(2);return this.pow(y,S)}for(var R=this.m.subn(1),L=0;!R.isZero()&&R.andln(1)===0;)L++,R.iushrn(1);r(!R.isZero());var I=new n(1).toRed(this),K=I.redNeg(),q=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new n(2*A*A).toRed(this);this.pow(A,q).cmp(K)!==0;)A.redIAdd(K);for(var H=this.pow(A,R),B=this.pow(y,R.addn(1).iushrn(1)),C=this.pow(y,R),P=L;C.cmp(I)!==0;){for(var j=C,$=0;j.cmp(I)!==0;$++)j=j.redSqr();r($<P);var G=this.pow(H,new n(1).iushln(P-$-1));B=B.redMul(G),H=G.redSqr(),C=C.redMul(H),P=$;}return B},te.prototype.invm=function(y){var T=y._invmp(this.m);return T.negative!==0?(T.negative=0,this.imod(T).redNeg()):this.imod(T)},te.prototype.pow=function(y,T){if(T.isZero())return new n(1).toRed(this);if(T.cmpn(1)===0)return y.clone();var S=4,R=new Array(1<<S);R[0]=new n(1).toRed(this),R[1]=y;for(var L=2;L<R.length;L++)R[L]=this.mul(R[L-1],y);var I=R[0],K=0,q=0,A=T.bitLength()%26;for(A===0&&(A=26),L=T.length-1;L>=0;L--){for(var H=T.words[L],B=A-1;B>=0;B--){var C=H>>B&1;if(I!==R[0]&&(I=this.sqr(I)),C===0&&K===0){q=0;continue}K<<=1,K|=C,q++,!(q!==S&&(L!==0||B!==0))&&(I=this.mul(I,R[K]),q=0,K=0);}A=26;}return I},te.prototype.convertTo=function(y){var T=y.umod(this.m);return T===y?T.clone():T},te.prototype.convertFrom=function(y){var T=y.clone();return T.red=null,T},n.mont=function(y){return new ae(y)};function ae(k){te.call(this,k),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}i(ae,te),ae.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},ae.prototype.convertFrom=function(y){var T=this.imod(y.mul(this.rinv));return T.red=null,T},ae.prototype.imul=function(y,T){if(y.isZero()||T.isZero())return y.words[0]=0,y.length=1,y;var S=y.imul(T),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=S.isub(R).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},ae.prototype.mul=function(y,T){if(y.isZero()||T.isZero())return new n(0)._forceRed(this);var S=y.mul(T),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=S.isub(R).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},ae.prototype.invm=function(y){var T=this.imod(y._invmp(this.m).mul(this.r2));return T._forceRed(this)};})(typeof Ud=="undefined"||Ud,vx);});var $x=z((HK,Al)=>{(function(){var t="input is invalid type",e="finalize already called",r=typeof window=="object",i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var n=!r&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=global:n&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&typeof Al=="object"&&Al.exports,a=typeof define=="function"&&define.amd,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],c=[4,1024,262144,67108864],p=[1,256,65536,16777216],f=[6,1536,393216,100663296],m=[0,8,16,24],_=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],x=[224,256,384,512],v=[128,256],g=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(C){return Object.prototype.toString.call(C)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(C){return typeof C=="object"&&C.buffer&&C.buffer.constructor===ArrayBuffer});for(var E=function(C,P,j){return function($){return new A(C,P,C).update($)[j]()}},w=function(C,P,j){return function($,G){return new A(C,P,G).update($)[j]()}},D=function(C,P,j){return function($,G,oe,se){return y["cshake"+C].update($,G,oe,se)[j]()}},N=function(C,P,j){return function($,G,oe,se){return y["kmac"+C].update($,G,oe,se)[j]()}},F=function(C,P,j,$){for(var G=0;G<g.length;++G){var oe=g[G];C[oe]=P(j,$,oe);}return C},V=function(C,P){var j=E(C,P,"hex");return j.create=function(){return new A(C,P,C)},j.update=function($){return j.create().update($)},F(j,E,C,P)},X=function(C,P){var j=w(C,P,"hex");return j.create=function($){return new A(C,P,$)},j.update=function($,G){return j.create(G).update($)},F(j,w,C,P)},te=function(C,P){var j=b[C],$=D(C,P,"hex");return $.create=function(G,oe,se){return !oe&&!se?y["shake"+C].create(G):new A(C,P,G).bytepad([oe,se],j)},$.update=function(G,oe,se,J){return $.create(oe,se,J).update(G)},F($,D,C,P)},ae=function(C,P){var j=b[C],$=N(C,P,"hex");return $.create=function(G,oe,se){return new H(C,P,oe).bytepad(["KMAC",se],j).bytepad([G],j)},$.update=function(G,oe,se,J){return $.create(G,se,J).update(oe)},F($,N,C,P)},k=[{name:"keccak",padding:p,bits:x,createMethod:V},{name:"sha3",padding:f,bits:x,createMethod:V},{name:"shake",padding:h,bits:v,createMethod:X},{name:"cshake",padding:c,bits:v,createMethod:te},{name:"kmac",padding:c,bits:v,createMethod:ae}],y={},T=[],S=0;S<k.length;++S)for(var R=k[S],L=R.bits,I=0;I<L.length;++I){var K=R.name+"_"+L[I];if(T.push(K),y[K]=R.createMethod(L[I],R.padding),R.name!=="sha3"){var q=R.name+L[I];T.push(q),y[q]=y[K];}}function A(C,P,j){this.blocks=[],this.s=[],this.padding=P,this.outputBits=j,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(C<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=j>>5,this.extraBytes=(j&31)>>3;for(var $=0;$<50;++$)this.s[$]=0;}A.prototype.update=function(C){if(this.finalized)throw new Error(e);var P,j=typeof C;if(j!=="string"){if(j==="object"){if(C===null)throw new Error(t);if(u&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!u||!ArrayBuffer.isView(C)))throw new Error(t)}else throw new Error(t);P=!0;}for(var $=this.blocks,G=this.byteCount,oe=C.length,se=this.blockCount,J=0,ee=this.s,U,M;J<oe;){if(this.reset)for(this.reset=!1,$[0]=this.block,U=1;U<se+1;++U)$[U]=0;if(P)for(U=this.start;J<oe&&U<G;++J)$[U>>2]|=C[J]<<m[U++&3];else for(U=this.start;J<oe&&U<G;++J)M=C.charCodeAt(J),M<128?$[U>>2]|=M<<m[U++&3]:M<2048?($[U>>2]|=(192|M>>6)<<m[U++&3],$[U>>2]|=(128|M&63)<<m[U++&3]):M<55296||M>=57344?($[U>>2]|=(224|M>>12)<<m[U++&3],$[U>>2]|=(128|M>>6&63)<<m[U++&3],$[U>>2]|=(128|M&63)<<m[U++&3]):(M=65536+((M&1023)<<10|C.charCodeAt(++J)&1023),$[U>>2]|=(240|M>>18)<<m[U++&3],$[U>>2]|=(128|M>>12&63)<<m[U++&3],$[U>>2]|=(128|M>>6&63)<<m[U++&3],$[U>>2]|=(128|M&63)<<m[U++&3]);if(this.lastByteIndex=U,U>=G){for(this.start=U-G,this.block=$[se],U=0;U<se;++U)ee[U]^=$[U];B(ee),this.reset=!0;}else this.start=U;}return this},A.prototype.encode=function(C,P){var j=C&255,$=1,G=[j];for(C=C>>8,j=C&255;j>0;)G.unshift(j),C=C>>8,j=C&255,++$;return P?G.push($):G.unshift($),this.update(G),G.length},A.prototype.encodeString=function(C){var P,j=typeof C;if(j!=="string"){if(j==="object"){if(C===null)throw new Error(t);if(u&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!u||!ArrayBuffer.isView(C)))throw new Error(t)}else throw new Error(t);P=!0;}var $=0,G=C.length;if(P)$=G;else for(var oe=0;oe<C.length;++oe){var se=C.charCodeAt(oe);se<128?$+=1:se<2048?$+=2:se<55296||se>=57344?$+=3:(se=65536+((se&1023)<<10|C.charCodeAt(++oe)&1023),$+=4);}return $+=this.encode($*8),this.update(C),$},A.prototype.bytepad=function(C,P){for(var j=this.encode(P),$=0;$<C.length;++$)j+=this.encodeString(C[$]);var G=P-j%P,oe=[];return oe.length=G,this.update(oe),this},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var C=this.blocks,P=this.lastByteIndex,j=this.blockCount,$=this.s;if(C[P>>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(C[0]=C[j],P=1;P<j+1;++P)C[P]=0;for(C[j-1]|=2147483648,P=0;P<j;++P)$[P]^=C[P];B($);}},A.prototype.toString=A.prototype.hex=function(){this.finalize();for(var C=this.blockCount,P=this.s,j=this.outputBlocks,$=this.extraBytes,G=0,oe=0,se="",J;oe<j;){for(G=0;G<C&&oe<j;++G,++oe)J=P[G],se+=l[J>>4&15]+l[J&15]+l[J>>12&15]+l[J>>8&15]+l[J>>20&15]+l[J>>16&15]+l[J>>28&15]+l[J>>24&15];oe%C===0&&(B(P),G=0);}return $&&(J=P[G],se+=l[J>>4&15]+l[J&15],$>1&&(se+=l[J>>12&15]+l[J>>8&15]),$>2&&(se+=l[J>>20&15]+l[J>>16&15])),se},A.prototype.arrayBuffer=function(){this.finalize();var C=this.blockCount,P=this.s,j=this.outputBlocks,$=this.extraBytes,G=0,oe=0,se=this.outputBits>>3,J;$?J=new ArrayBuffer(j+1<<2):J=new ArrayBuffer(se);for(var ee=new Uint32Array(J);oe<j;){for(G=0;G<C&&oe<j;++G,++oe)ee[oe]=P[G];oe%C===0&&B(P);}return $&&(ee[G]=P[G],J=J.slice(0,se)),J},A.prototype.buffer=A.prototype.arrayBuffer,A.prototype.digest=A.prototype.array=function(){this.finalize();for(var C=this.blockCount,P=this.s,j=this.outputBlocks,$=this.extraBytes,G=0,oe=0,se=[],J,ee;oe<j;){for(G=0;G<C&&oe<j;++G,++oe)J=oe<<2,ee=P[G],se[J]=ee&255,se[J+1]=ee>>8&255,se[J+2]=ee>>16&255,se[J+3]=ee>>24&255;oe%C===0&&B(P);}return $&&(J=oe<<2,ee=P[G],se[J]=ee&255,$>1&&(se[J+1]=ee>>8&255),$>2&&(se[J+2]=ee>>16&255)),se};function H(C,P,j){A.call(this,C,P,j);}H.prototype=new A,H.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var B=function(C){var P,j,$,G,oe,se,J,ee,U,M,Z,W,ne,le,Q,_e,De,ge,be,et,Oe,He,Kt,Je,st,fi,it,tt,he,ve,Ce,Fe,Re,We,ut,Ue,Qe,Tn,lt,ht,Cn,ct,ft,An,dt,pt,wn,mt,_t,Dn,gt,yt,Sn,xt,vt,Rn,Et,bt,Pi,Ii,ki,Mi,Bi;for($=0;$<48;$+=2)G=C[0]^C[10]^C[20]^C[30]^C[40],oe=C[1]^C[11]^C[21]^C[31]^C[41],se=C[2]^C[12]^C[22]^C[32]^C[42],J=C[3]^C[13]^C[23]^C[33]^C[43],ee=C[4]^C[14]^C[24]^C[34]^C[44],U=C[5]^C[15]^C[25]^C[35]^C[45],M=C[6]^C[16]^C[26]^C[36]^C[46],Z=C[7]^C[17]^C[27]^C[37]^C[47],W=C[8]^C[18]^C[28]^C[38]^C[48],ne=C[9]^C[19]^C[29]^C[39]^C[49],P=W^(se<<1|J>>>31),j=ne^(J<<1|se>>>31),C[0]^=P,C[1]^=j,C[10]^=P,C[11]^=j,C[20]^=P,C[21]^=j,C[30]^=P,C[31]^=j,C[40]^=P,C[41]^=j,P=G^(ee<<1|U>>>31),j=oe^(U<<1|ee>>>31),C[2]^=P,C[3]^=j,C[12]^=P,C[13]^=j,C[22]^=P,C[23]^=j,C[32]^=P,C[33]^=j,C[42]^=P,C[43]^=j,P=se^(M<<1|Z>>>31),j=J^(Z<<1|M>>>31),C[4]^=P,C[5]^=j,C[14]^=P,C[15]^=j,C[24]^=P,C[25]^=j,C[34]^=P,C[35]^=j,C[44]^=P,C[45]^=j,P=ee^(W<<1|ne>>>31),j=U^(ne<<1|W>>>31),C[6]^=P,C[7]^=j,C[16]^=P,C[17]^=j,C[26]^=P,C[27]^=j,C[36]^=P,C[37]^=j,C[46]^=P,C[47]^=j,P=M^(G<<1|oe>>>31),j=Z^(oe<<1|G>>>31),C[8]^=P,C[9]^=j,C[18]^=P,C[19]^=j,C[28]^=P,C[29]^=j,C[38]^=P,C[39]^=j,C[48]^=P,C[49]^=j,le=C[0],Q=C[1],pt=C[11]<<4|C[10]>>>28,wn=C[10]<<4|C[11]>>>28,tt=C[20]<<3|C[21]>>>29,he=C[21]<<3|C[20]>>>29,Ii=C[31]<<9|C[30]>>>23,ki=C[30]<<9|C[31]>>>23,ct=C[40]<<18|C[41]>>>14,ft=C[41]<<18|C[40]>>>14,We=C[2]<<1|C[3]>>>31,ut=C[3]<<1|C[2]>>>31,_e=C[13]<<12|C[12]>>>20,De=C[12]<<12|C[13]>>>20,mt=C[22]<<10|C[23]>>>22,_t=C[23]<<10|C[22]>>>22,ve=C[33]<<13|C[32]>>>19,Ce=C[32]<<13|C[33]>>>19,Mi=C[42]<<2|C[43]>>>30,Bi=C[43]<<2|C[42]>>>30,xt=C[5]<<30|C[4]>>>2,vt=C[4]<<30|C[5]>>>2,Ue=C[14]<<6|C[15]>>>26,Qe=C[15]<<6|C[14]>>>26,ge=C[25]<<11|C[24]>>>21,be=C[24]<<11|C[25]>>>21,Dn=C[34]<<15|C[35]>>>17,gt=C[35]<<15|C[34]>>>17,Fe=C[45]<<29|C[44]>>>3,Re=C[44]<<29|C[45]>>>3,Je=C[6]<<28|C[7]>>>4,st=C[7]<<28|C[6]>>>4,Rn=C[17]<<23|C[16]>>>9,Et=C[16]<<23|C[17]>>>9,Tn=C[26]<<25|C[27]>>>7,lt=C[27]<<25|C[26]>>>7,et=C[36]<<21|C[37]>>>11,Oe=C[37]<<21|C[36]>>>11,yt=C[47]<<24|C[46]>>>8,Sn=C[46]<<24|C[47]>>>8,An=C[8]<<27|C[9]>>>5,dt=C[9]<<27|C[8]>>>5,fi=C[18]<<20|C[19]>>>12,it=C[19]<<20|C[18]>>>12,bt=C[29]<<7|C[28]>>>25,Pi=C[28]<<7|C[29]>>>25,ht=C[38]<<8|C[39]>>>24,Cn=C[39]<<8|C[38]>>>24,He=C[48]<<14|C[49]>>>18,Kt=C[49]<<14|C[48]>>>18,C[0]=le^~_e&ge,C[1]=Q^~De&be,C[10]=Je^~fi&tt,C[11]=st^~it&he,C[20]=We^~Ue&Tn,C[21]=ut^~Qe<,C[30]=An^~pt&mt,C[31]=dt^~wn&_t,C[40]=xt^~Rn&bt,C[41]=vt^~Et&Pi,C[2]=_e^~ge&et,C[3]=De^~be&Oe,C[12]=fi^~tt&ve,C[13]=it^~he&Ce,C[22]=Ue^~Tn&ht,C[23]=Qe^~lt&Cn,C[32]=pt^~mt&Dn,C[33]=wn^~_t>,C[42]=Rn^~bt&Ii,C[43]=Et^~Pi&ki,C[4]=ge^~et&He,C[5]=be^~Oe&Kt,C[14]=tt^~ve&Fe,C[15]=he^~Ce&Re,C[24]=Tn^~ht&ct,C[25]=lt^~Cn&ft,C[34]=mt^~Dn&yt,C[35]=_t^~gt&Sn,C[44]=bt^~Ii&Mi,C[45]=Pi^~ki&Bi,C[6]=et^~He&le,C[7]=Oe^~Kt&Q,C[16]=ve^~Fe&Je,C[17]=Ce^~Re&st,C[26]=ht^~ct&We,C[27]=Cn^~ft&ut,C[36]=Dn^~yt&An,C[37]=gt^~Sn&dt,C[46]=Ii^~Mi&xt,C[47]=ki^~Bi&vt,C[8]=He^~le&_e,C[9]=Kt^~Q&De,C[18]=Fe^~Je&fi,C[19]=Re^~st&it,C[28]=ct^~We&Ue,C[29]=ft^~ut&Qe,C[38]=yt^~An&pt,C[39]=Sn^~dt&wn,C[48]=Mi^~xt&Rn,C[49]=Bi^~vt&Et,C[0]^=_[$],C[1]^=_[$+1];};if(s)Al.exports=y;else {for(S=0;S<T.length;++S)i[T[S]]=y[T[S]];a&&define(function(){return y});}})();});var HE=z(sp=>{var LL=Object.create,Aa=Object.defineProperty,PL=Object.getPrototypeOf,nv=Object.prototype.hasOwnProperty,IL=Object.getOwnPropertyNames,kL=Object.getOwnPropertyDescriptor,tv=Object.getOwnPropertySymbols,ML=Object.prototype.propertyIsEnumerable,rv=(t,e,r)=>e in t?Aa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Hl=(t,e)=>{for(var r in e||(e={}))nv.call(e,r)&&rv(t,r,e[r]);if(tv)for(var r of tv(e))ML.call(e,r)&&rv(t,r,e[r]);return t},sv=t=>Aa(t,"__esModule",{value:!0}),re=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),BL=(t,e)=>{for(var r in e)Aa(t,r,{get:e[r],enumerable:!0});},qL=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of IL(e))!nv.call(t,i)&&i!=="default"&&Aa(t,i,{get:()=>e[i],enumerable:!(r=kL(e,i))||r.enumerable});return t},Mt=t=>qL(sv(Aa(t!=null?LL(PL(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),HL=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),jL=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),ce=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SuppressWarnings=t.Override=t.Nullable=t.NotNull=void 0;function e(o,s,a){}t.NotNull=e;function r(o,s,a){}t.Nullable=r;function i(o,s,a){}t.Override=i;function n(o){return (s,a,u)=>{}}t.SuppressWarnings=n;}),Qi=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IntStream=void 0;(function(r){r.EOF=-1,r.UNKNOWN_SOURCE_NAME="<unknown>";})(t.IntStream||(t.IntStream={}));}),UL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.ANTLRInputStream=void 0;var r=me("assert"),i=ce(),n=Qi(),o=class{constructor(s){this.p=0,this.data=s,this.n=s.length;}reset(){this.p=0;}consume(){if(this.p>=this.n)throw r(this.LA(1)===n.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++;}LA(s){return s===0?0:s<0&&(s++,this.p+s-1<0)||this.p+s-1>=this.n?n.IntStream.EOF:this.data.charCodeAt(this.p+s-1)}LT(s){return this.LA(s)}get index(){return this.p}get size(){return this.n}mark(){return -1}release(s){}seek(s){if(s<=this.p){this.p=s;return}for(s=Math.min(s,this.n);this.p<s;)this.consume();}getText(s){let a=s.a,u=s.b;u>=this.n&&(u=this.n-1);let l=u-a+1;return a>=this.n?"":this.data.substr(a,l)}get sourceName(){return this.name?this.name:n.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};e([i.Override],o.prototype,"consume",null),e([i.Override],o.prototype,"LA",null),e([i.Override],o.prototype,"index",null),e([i.Override],o.prototype,"size",null),e([i.Override],o.prototype,"mark",null),e([i.Override],o.prototype,"release",null),e([i.Override],o.prototype,"seek",null),e([i.Override],o.prototype,"getText",null),e([i.Override],o.prototype,"sourceName",null),e([i.Override],o.prototype,"toString",null),t.ANTLRInputStream=o;}),Ei=re(t=>{var e=t&&t.__decorate||function(n,o,s,a){var u=arguments.length,l=u<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,o,s,a);else for(var c=n.length-1;c>=0;c--)(h=n[c])&&(l=(u<3?h(l):u>3?h(o,s,l):h(o,s))||l);return u>3&&l&&Object.defineProperty(o,s,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNState=void 0;var r=ce(),i=class{constructor(){this.stateNumber=i.INVALID_STATE_NUMBER,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.optimizedTransitions=this.transitions;}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(n){return n instanceof i?this.stateNumber===n.stateNumber:!1}get isNonGreedyExitState(){return !1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(n,o){if(this.transitions.length===0)this.epsilonOnlyTransitions=n.isEpsilon;else if(this.epsilonOnlyTransitions!==n.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(o!==void 0?o:this.transitions.length,0,n);}transition(n){return this.transitions[n]}setTransition(n,o){this.transitions[n]=o;}removeTransition(n){return this.transitions.splice(n,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(n){this.ruleIndex=n;}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(n){return this.optimizedTransitions[n]}addOptimizedTransition(n){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(n);}setOptimizedTransition(n,o){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[n]=o;}removeOptimizedTransition(n){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(n,1);}};e([r.Override],i.prototype,"hashCode",null),e([r.Override],i.prototype,"equals",null),e([r.Override],i.prototype,"toString",null),t.ATNState=i,function(n){n.INVALID_STATE_NUMBER=-1;}(i=t.ATNState||(t.ATNState={}));}),Zt=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATNStateType=void 0;(function(r){r[r.INVALID_TYPE=0]="INVALID_TYPE",r[r.BASIC=1]="BASIC",r[r.RULE_START=2]="RULE_START",r[r.BLOCK_START=3]="BLOCK_START",r[r.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",r[r.STAR_BLOCK_START=5]="STAR_BLOCK_START",r[r.TOKEN_START=6]="TOKEN_START",r[r.RULE_STOP=7]="RULE_STOP",r[r.BLOCK_END=8]="BLOCK_END",r[r.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",r[r.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",r[r.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",r[r.LOOP_END=12]="LOOP_END";})(t.ATNStateType||(t.ATNStateType={}));}),en=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RecognitionException=void 0;var e=class extends Error{constructor(r,i,n,o){super(o),this._offendingState=-1,this._recognizer=r,this.input=i,this.ctx=n,r&&(this._offendingState=r.state);}get offendingState(){return this._offendingState}setOffendingState(r){this._offendingState=r;}get expectedTokens(){if(this._recognizer)return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(r){if(!(r&&r!==this._recognizer))return this.offendingToken}setOffendingToken(r,i){r===this._recognizer&&(this.offendingToken=i);}get recognizer(){return this._recognizer}};t.RecognitionException=e;}),tn=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h},r=t&&t.__param||function(o,s){return function(a,u){s(a,u,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transition=void 0;var i=ce(),n=class{constructor(s){if(s==null)throw new Error("target cannot be null.");this.target=s;}get isEpsilon(){return !1}get label(){}};n.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],e([i.NotNull],n.prototype,"target",void 0),n=e([r(0,i.NotNull)],n),t.Transition=n;}),O0=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractPredicateTransition=void 0;var e=tn(),r=class extends e.Transition{constructor(i){super(i);}};t.AbstractPredicateTransition=r;}),Bt=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash=void 0;(function(r){function n(l=0){return l}r.initialize=n;function o(l,h){h==null?h=0:typeof h=="string"?h=u(h):typeof h=="object"&&(h=h.hashCode());let v=h;return v=Math.imul(v,3432918353),v=v<<15|v>>>17,v=Math.imul(v,461845907),l=l^v,l=l<<13|l>>>19,l=Math.imul(l,5)+3864292196,l&4294967295}r.update=o;function s(l,h){return l=l^h*4,l=l^l>>>16,l=Math.imul(l,2246822507),l=l^l>>>13,l=Math.imul(l,3266489909),l=l^l>>>16,l}r.finish=s;function a(l,h=0){let c=n(h),p=0;for(let f of l)c=o(c,f),p++;return c=s(c,p),c}r.hashCode=a;function u(l){let h=l.length;if(h===0)return 0;let c=0;for(let p=0;p<h;p++){let f=l.charCodeAt(p);c=(c<<5>>>0)-c+f,c|=0;}return c}})(t.MurmurHash||(t.MurmurHash={}));}),Jr=re(t=>{var e=t&&t.__decorate||function(n,o,s,a){var u=arguments.length,l=u<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,o,s,a);else for(var c=n.length-1;c>=0;c--)(h=n[c])&&(l=(u<3?h(l):u>3?h(o,s,l):h(o,s))||l);return u>3&&l&&Object.defineProperty(o,s,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectEqualityComparator=void 0;var r=ce(),i=class{hashCode(n){return n==null?0:n.hashCode()}equals(n,o){return n==null?o==null:n.equals(o)}};i.INSTANCE=new i,e([r.Override],i.prototype,"hashCode",null),e([r.Override],i.prototype,"equals",null),t.ObjectEqualityComparator=i;}),VL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultEqualityComparator=void 0;var r=ce(),i=Bt(),n=Jr(),o=class{hashCode(s){return s==null?0:typeof s=="string"||typeof s=="number"?i.MurmurHash.hashCode([s]):n.ObjectEqualityComparator.INSTANCE.hashCode(s)}equals(s,a){return s==null?a==null:typeof s=="string"||typeof s=="number"?s===a:n.ObjectEqualityComparator.INSTANCE.equals(s,a)}};o.INSTANCE=new o,e([r.Override],o.prototype,"hashCode",null),e([r.Override],o.prototype,"equals",null),t.DefaultEqualityComparator=o;}),rn=re(t=>{var e=t&&t.__decorate||function(h,c,p,f){var m=arguments.length,_=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,p):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(h,c,p,f);else for(var v=h.length-1;v>=0;v--)(x=h[v])&&(_=(m<3?x(_):m>3?x(c,p,_):x(c,p))||_);return m>3&&_&&Object.defineProperty(c,p,_),_},r=t&&t.__param||function(h,c){return function(p,f){c(p,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Array2DHashSet=void 0;var i=me("assert"),n=VL(),o=ce(),s=Bt(),a=16,u=.75,l=class{constructor(h,c=a){if(this.n=0,this.threshold=Math.floor(a*u),h instanceof l){this.comparator=h.comparator,this.buckets=h.buckets.slice(0);for(let p=0;p<this.buckets.length;p++){let f=this.buckets[p];f&&(this.buckets[p]=f.slice(0));}this.n=h.n,this.threshold=h.threshold;}else this.comparator=h||n.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(c);}getOrAdd(h){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(h)}getOrAddImpl(h){let c=this.getBucket(h),p=this.buckets[c];if(!p)return p=[h],this.buckets[c]=p,this.n++,h;for(let f of p)if(this.comparator.equals(f,h))return f;return p.push(h),this.n++,h}get(h){if(h==null)return h;let c=this.getBucket(h),p=this.buckets[c];if(p){for(let f of p)if(this.comparator.equals(f,h))return f}}getBucket(h){return this.comparator.hashCode(h)&this.buckets.length-1}hashCode(){let h=s.MurmurHash.initialize();for(let c of this.buckets)if(c!=null)for(let p of c){if(p==null)break;h=s.MurmurHash.update(h,this.comparator.hashCode(p));}return h=s.MurmurHash.finish(h,this.size),h}equals(h){return h===this?!0:!(h instanceof l)||h.size!==this.size?!1:this.containsAll(h)}expand(){let h=this.buckets,c=this.buckets.length*2,p=this.createBuckets(c);this.buckets=p,this.threshold=Math.floor(c*u);let f=this.size;for(let m of h)if(m)for(let _ of m){let x=this.getBucket(_),v=this.buckets[x];v||(v=[],this.buckets[x]=v),v.push(_);}i(this.n===f);}add(h){return this.getOrAdd(h)===h}get size(){return this.n}get isEmpty(){return this.n===0}contains(h){return this.containsFast(this.asElementType(h))}containsFast(h){return h==null?!1:this.get(h)!=null}*[Symbol.iterator](){yield*this.toArray();}toArray(){let h=new Array(this.size),c=0;for(let p of this.buckets)if(p!=null)for(let f of p){if(f==null)break;h[c++]=f;}return h}containsAll(h){if(h instanceof l){let c=h;for(let p of c.buckets)if(p!=null)for(let f of p){if(f==null)break;if(!this.containsFast(this.asElementType(f)))return !1}}else for(let c of h)if(!this.containsFast(this.asElementType(c)))return !1;return !0}addAll(h){let c=!1;for(let p of h)this.getOrAdd(p)!==p&&(c=!0);return c}clear(){this.buckets=this.createBuckets(a),this.n=0,this.threshold=Math.floor(a*u);}toString(){if(this.size===0)return "{}";let h="{",c=!0;for(let p of this.buckets)if(p!=null)for(let f of p){if(f==null)break;c?c=!1:h+=", ",h+=f.toString();}return h+="}",h}toTableString(){let h="";for(let c of this.buckets){if(c==null){h+=`null
|
|
60
|
+
`;continue}h+="[";let p=!0;for(let f of c)p?p=!1:h+=" ",f==null?h+="_":h+=f.toString();h+=`]
|
|
61
|
+
`;}return h}asElementType(h){return h}createBuckets(h){return new Array(h)}};e([o.NotNull],l.prototype,"comparator",void 0),e([o.Override],l.prototype,"hashCode",null),e([o.Override],l.prototype,"equals",null),e([o.Override],l.prototype,"add",null),e([o.Override],l.prototype,"size",null),e([o.Override],l.prototype,"isEmpty",null),e([o.Override],l.prototype,"contains",null),e([r(0,o.Nullable)],l.prototype,"containsFast",null),e([o.Override],l.prototype,Symbol.iterator,null),e([o.Override],l.prototype,"toArray",null),e([o.Override],l.prototype,"containsAll",null),e([o.Override],l.prototype,"addAll",null),e([o.Override],l.prototype,"clear",null),e([o.Override],l.prototype,"toString",null),e([o.SuppressWarnings("unchecked")],l.prototype,"asElementType",null),e([o.SuppressWarnings("unchecked")],l.prototype,"createBuckets",null),t.Array2DHashSet=l;}),Zl=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayEqualityComparator=void 0;var r=ce(),i=Bt(),n=Jr(),o=class{hashCode(s){return s==null?0:i.MurmurHash.hashCode(s,0)}equals(s,a){if(s==null)return a==null;if(a==null||s.length!==a.length)return !1;for(let u=0;u<s.length;u++)if(!n.ObjectEqualityComparator.INSTANCE.equals(s[u],a[u]))return !1;return !0}};o.INSTANCE=new o,e([r.Override],o.prototype,"hashCode",null),e([r.Override],o.prototype,"equals",null),t.ArrayEqualityComparator=o;}),Qr=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toCharArray=t.toMap=t.equals=t.join=t.escapeWhitespace=void 0;function e(s,a){return a?s.replace(/ /,"\xB7"):s.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}t.escapeWhitespace=e;function r(s,a){let u="",l=!0;for(let h of s)l?l=!1:u+=a,u+=h;return u}t.join=r;function i(s,a){return s===a?!0:s===void 0||a===void 0?!1:s.equals(a)}t.equals=i;function n(s){let a=new Map;for(let u=0;u<s.length;u++)a.set(s[u],u);return a}t.toMap=n;function o(s){if(typeof s=="string"){let a=new Uint16Array(s.length);for(let u=0;u<s.length;u++)a[u]=s.charCodeAt(u);return a}else return s.toCharArray()}t.toCharArray=o;}),to=re(t=>{var e=t&&t.__decorate||function(p,f,m,_){var x=arguments.length,v=x<3?f:_===null?_=Object.getOwnPropertyDescriptor(f,m):_,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(p,f,m,_);else for(var b=p.length-1;b>=0;b--)(g=p[b])&&(v=(x<3?g(v):x>3?g(f,m,v):g(f,m))||v);return x>3&&v&&Object.defineProperty(f,m,v),v},r=t&&t.__param||function(p,f){return function(m,_){f(m,_,p);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticContext=void 0;var i=rn(),n=Zl(),o=Bt(),s=ce(),a=Jr(),u=Qr();function l(p){let f;for(let m of p){if(f===void 0){f=m;continue}f.compareTo(m)<0&&(f=m);}return f}function h(p){let f;for(let m of p){if(f===void 0){f=m;continue}f.compareTo(m)>0&&(f=m);}return f}var c=class{static get NONE(){return c._NONE===void 0&&(c._NONE=new c.Predicate),c._NONE}evalPrecedence(p,f){return this}static and(p,f){if(!p||p===c.NONE)return f;if(f===c.NONE)return p;let m=new c.AND(p,f);return m.opnds.length===1?m.opnds[0]:m}static or(p,f){if(!p)return f;if(p===c.NONE||f===c.NONE)return c.NONE;let m=new c.OR(p,f);return m.opnds.length===1?m.opnds[0]:m}};t.SemanticContext=c,function(p){function _(w){let D=[];for(let N=0;N<w.length;N++){let F=w[N];F instanceof p.PrecedencePredicate&&(D.push(F),w.splice(N,1),N--);}return D}class x extends p{constructor(D=-1,N=-1,F=!1){super(),this.ruleIndex=D,this.predIndex=N,this.isCtxDependent=F;}eval(D,N){let F=this.isCtxDependent?N:void 0;return D.sempred(F,this.ruleIndex,this.predIndex)}hashCode(){let D=o.MurmurHash.initialize();return D=o.MurmurHash.update(D,this.ruleIndex),D=o.MurmurHash.update(D,this.predIndex),D=o.MurmurHash.update(D,this.isCtxDependent?1:0),D=o.MurmurHash.finish(D,3),D}equals(D){return D instanceof x?this===D?!0:this.ruleIndex===D.ruleIndex&&this.predIndex===D.predIndex&&this.isCtxDependent===D.isCtxDependent:!1}toString(){return "{"+this.ruleIndex+":"+this.predIndex+"}?"}}e([s.Override],x.prototype,"eval",null),e([s.Override],x.prototype,"hashCode",null),e([s.Override],x.prototype,"equals",null),e([s.Override],x.prototype,"toString",null),p.Predicate=x;class v extends p{constructor(D){super(),this.precedence=D;}eval(D,N){return D.precpred(N,this.precedence)}evalPrecedence(D,N){if(D.precpred(N,this.precedence))return p.NONE}compareTo(D){return this.precedence-D.precedence}hashCode(){let D=1;return D=31*D+this.precedence,D}equals(D){return D instanceof v?this===D?!0:this.precedence===D.precedence:!1}toString(){return "{"+this.precedence+">=prec}?"}}e([s.Override],v.prototype,"eval",null),e([s.Override],v.prototype,"evalPrecedence",null),e([s.Override],v.prototype,"compareTo",null),e([s.Override],v.prototype,"hashCode",null),e([s.Override],v.prototype,"equals",null),e([s.Override],v.prototype,"toString",null),p.PrecedencePredicate=v;class g extends p{}p.Operator=g;let b=class Bl extends g{constructor(D,N){super();let F=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);D instanceof Bl?F.addAll(D.opnds):F.add(D),N instanceof Bl?F.addAll(N.opnds):F.add(N),this.opnds=F.toArray();let V=_(this.opnds),X=h(V);X&&this.opnds.push(X);}get operands(){return this.opnds}equals(D){return this===D?!0:D instanceof Bl?n.ArrayEqualityComparator.INSTANCE.equals(this.opnds,D.opnds):!1}hashCode(){return o.MurmurHash.hashCode(this.opnds,40363613)}eval(D,N){for(let F of this.opnds)if(!F.eval(D,N))return !1;return !0}evalPrecedence(D,N){let F=!1,V=[];for(let te of this.opnds){let ae=te.evalPrecedence(D,N);if(F=F||ae!==te,ae==null)return;ae!==p.NONE&&V.push(ae);}if(!F)return this;if(V.length===0)return p.NONE;let X=V[0];for(let te=1;te<V.length;te++)X=p.and(X,V[te]);return X}toString(){return u.join(this.opnds,"&&")}};e([s.Override],b.prototype,"operands",null),e([s.Override],b.prototype,"equals",null),e([s.Override],b.prototype,"hashCode",null),e([s.Override],b.prototype,"eval",null),e([s.Override],b.prototype,"evalPrecedence",null),e([s.Override],b.prototype,"toString",null),b=e([r(0,s.NotNull),r(1,s.NotNull)],b),p.AND=b;let E=class ql extends g{constructor(D,N){super();let F=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);D instanceof ql?F.addAll(D.opnds):F.add(D),N instanceof ql?F.addAll(N.opnds):F.add(N),this.opnds=F.toArray();let V=_(this.opnds),X=l(V);X&&this.opnds.push(X);}get operands(){return this.opnds}equals(D){return this===D?!0:D instanceof ql?n.ArrayEqualityComparator.INSTANCE.equals(this.opnds,D.opnds):!1}hashCode(){return o.MurmurHash.hashCode(this.opnds,486279973)}eval(D,N){for(let F of this.opnds)if(F.eval(D,N))return !0;return !1}evalPrecedence(D,N){let F=!1,V=[];for(let te of this.opnds){let ae=te.evalPrecedence(D,N);if(F=F||ae!==te,ae===p.NONE)return p.NONE;ae&&V.push(ae);}if(!F)return this;if(V.length===0)return;let X=V[0];for(let te=1;te<V.length;te++)X=p.or(X,V[te]);return X}toString(){return u.join(this.opnds,"||")}};e([s.Override],E.prototype,"operands",null),e([s.Override],E.prototype,"equals",null),e([s.Override],E.prototype,"hashCode",null),e([s.Override],E.prototype,"eval",null),e([s.Override],E.prototype,"evalPrecedence",null),e([s.Override],E.prototype,"toString",null),E=e([r(0,s.NotNull),r(1,s.NotNull)],E),p.OR=E;}(c=t.SemanticContext||(t.SemanticContext={}));}),ov=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PredicateTransition=void 0;var i=O0(),n=ce(),o=to(),s=class extends i.AbstractPredicateTransition{constructor(u,l,h,c){super(u),this.ruleIndex=l,this.predIndex=h,this.isCtxDependent=c;}get serializationType(){return 4}get isEpsilon(){return !0}matches(u,l,h){return !1}get predicate(){return new o.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return "pred_"+this.ruleIndex+":"+this.predIndex}};e([n.Override],s.prototype,"serializationType",null),e([n.Override],s.prototype,"isEpsilon",null),e([n.Override],s.prototype,"matches",null),e([n.Override,n.NotNull],s.prototype,"toString",null),s=e([r(0,n.NotNull)],s),t.PredicateTransition=s;}),Xl=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.FailedPredicateException=void 0;var i=en(),n=ce(),o=ov(),s=class av extends i.RecognitionException{constructor(u,l,h){super(u,u.inputStream,u.context,av.formatMessage(l,h));let p=u.interpreter.atn.states[u.state].transition(0);p instanceof o.PredicateTransition?(this._ruleIndex=p.ruleIndex,this._predicateIndex=p.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=l,super.setOffendingToken(u,u.currentToken);}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(u,l){return l||`failed predicate: {${u}}?`}};e([n.NotNull],s,"formatMessage",null),s=e([r(0,n.NotNull)],s),t.FailedPredicateException=s;}),Jl=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.InputMismatchException=void 0;var i=en(),n=ce(),o=class extends i.RecognitionException{constructor(a,u,l){l===void 0&&(l=a.context),super(a,a.inputStream,l),u!==void 0&&this.setOffendingState(u),this.setOffendingToken(a,a.currentToken);}};o=e([r(0,n.NotNull)],o),t.InputMismatchException=o;}),F0=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Arrays=void 0;(function(r){function i(s,a,u,l){return n(s,u!==void 0?u:0,l!==void 0?l:s.length,a)}r.binarySearch=i;function n(s,a,u,l){let h=a,c=u-1;for(;h<=c;){let p=h+c>>>1,f=s[p];if(f<l)h=p+1;else if(f>l)c=p-1;else return p}return -(h+1)}function o(s){let a="[",u=!0;for(let l of s)u?u=!1:a+=", ",l===null?a+="null":l===void 0?a+="undefined":a+=l;return a+="]",a}r.toString=o;})(t.Arrays||(t.Arrays={}));}),L0=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.IntegerList=void 0;var r=F0(),i=ce(),n=new Int32Array(0),o=4,s=(1<<31>>>0)-1-8,a=class{constructor(u){if(!u)this._data=n,this._size=0;else if(u instanceof a)this._data=u._data.slice(0),this._size=u._size;else if(typeof u=="number")u===0?(this._data=n,this._size=0):(this._data=new Int32Array(u),this._size=0);else {this._data=n,this._size=0;for(let l of u)this.add(l);}}add(u){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=u,this._size++;}addAll(u){if(Array.isArray(u))this.ensureCapacity(this._size+u.length),this._data.subarray(this._size,this._size+u.length).set(u),this._size+=u.length;else if(u instanceof a)this.ensureCapacity(this._size+u._size),this._data.subarray(this._size,this._size+u.size).set(u._data),this._size+=u._size;else {this.ensureCapacity(this._size+u.size);let l=0;for(let h of u)this._data[this._size+l]=h,l++;this._size+=u.size;}}get(u){if(u<0||u>=this._size)throw RangeError();return this._data[u]}contains(u){for(let l=0;l<this._size;l++)if(this._data[l]===u)return !0;return !1}set(u,l){if(u<0||u>=this._size)throw RangeError();let h=this._data[u];return this._data[u]=l,h}removeAt(u){let l=this.get(u);return this._data.copyWithin(u,u+1,this._size),this._data[this._size-1]=0,this._size--,l}removeRange(u,l){if(u<0||l<0||u>this._size||l>this._size||u>l)throw RangeError();this._data.copyWithin(l,u,this._size),this._data.fill(0,this._size-(l-u),this._size),this._size-=l-u;}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){this._data.length!==this._size&&(this._data=this._data.slice(0,this._size));}clear(){this._data.fill(0,0,this._size),this._size=0;}toArray(){return this._size===0?[]:Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort();}equals(u){if(u===this)return !0;if(!(u instanceof a)||this._size!==u._size)return !1;for(let l=0;l<this._size;l++)if(this._data[l]!==u._data[l])return !1;return !0}hashCode(){let u=1;for(let l=0;l<this._size;l++)u=31*u+this._data[l];return u}toString(){return this._data.toString()}binarySearch(u,l,h){if(l===void 0&&(l=0),h===void 0&&(h=this._size),l<0||h<0||l>this._size||h>this._size)throw new RangeError;if(l>h)throw new RangeError;return r.Arrays.binarySearch(this._data,u,l,h)}ensureCapacity(u){if(u<0||u>s)throw new RangeError;let l;for(this._data.length===0?l=o:l=this._data.length;l<u;)l=l*2,(l<0||l>s)&&(l=s);let h=new Int32Array(l);h.set(this._data),this._data=h;}toCharArray(){let u=new Uint16Array(this._size),l=0,h=!1;for(let c=0;c<this._size;c++){let p=this._data[c];if(p>=0&&p<65536){u[l]=p,l++;continue}if(!h){let m=new Uint16Array(this.charArraySize());m.set(u,0),u=m,h=!0;}let f=String.fromCodePoint(p);u[l]=f.charCodeAt(0),u[l+1]=f.charCodeAt(1),l+=2;}return u}charArraySize(){let u=0;for(let l=0;l<this._size;l++)u+=this._data[l]>=65536?2:1;return u}};e([i.NotNull],a.prototype,"_data",void 0),e([i.Override],a.prototype,"equals",null),e([i.Override],a.prototype,"hashCode",null),e([i.Override],a.prototype,"toString",null),t.IntegerList=a;}),pr=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.Interval=void 0;var r=ce(),i=1e3,n=class{constructor(o,s){this.a=o,this.b=s;}static get INVALID(){return n._INVALID}static of(o,s){return o!==s||o<0||o>i?new n(o,s):(n.cache[o]==null&&(n.cache[o]=new n(o,o)),n.cache[o])}get length(){return this.b<this.a?0:this.b-this.a+1}equals(o){return o===this?!0:o instanceof n?this.a===o.a&&this.b===o.b:!1}hashCode(){let o=23;return o=o*31+this.a,o=o*31+this.b,o}startsBeforeDisjoint(o){return this.a<o.a&&this.b<o.a}startsBeforeNonDisjoint(o){return this.a<=o.a&&this.b>=o.a}startsAfter(o){return this.a>o.a}startsAfterDisjoint(o){return this.a>o.b}startsAfterNonDisjoint(o){return this.a>o.a&&this.a<=o.b}disjoint(o){return this.startsBeforeDisjoint(o)||this.startsAfterDisjoint(o)}adjacent(o){return this.a===o.b+1||this.b===o.a-1}properlyContains(o){return o.a>=this.a&&o.b<=this.b}union(o){return n.of(Math.min(this.a,o.a),Math.max(this.b,o.b))}intersection(o){return n.of(Math.max(this.a,o.a),Math.min(this.b,o.b))}differenceNotProperlyContained(o){let s;return o.startsBeforeNonDisjoint(this)?s=n.of(Math.max(this.a,o.b+1),this.b):o.startsAfterNonDisjoint(this)&&(s=n.of(this.a,o.a-1)),s}toString(){return this.a+".."+this.b}};n._INVALID=new n(-1,-2),n.cache=new Array(i+1),e([r.Override],n.prototype,"equals",null),e([r.Override],n.prototype,"hashCode",null),e([r.Override],n.prototype,"toString",null),t.Interval=n;}),Ct=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0;var e=Qi();(function(i){i.INVALID_TYPE=0,i.EPSILON=-2,i.MIN_USER_TOKEN_TYPE=1,i.EOF=e.IntStream.EOF,i.DEFAULT_CHANNEL=0,i.HIDDEN_CHANNEL=1,i.MIN_USER_CHANNEL_VALUE=2;})(t.Token||(t.Token={}));}),wa=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonToken=void 0;var i=pr(),n=ce(),o=Ct(),s=class va{constructor(u,l,h=va.EMPTY_SOURCE,c=o.Token.DEFAULT_CHANNEL,p=0,f=0){this._line=0,this._charPositionInLine=-1,this._channel=o.Token.DEFAULT_CHANNEL,this.index=-1,this._text=l,this._type=u,this.source=h,this._channel=c,this.start=p,this.stop=f,h.source!=null&&(this._line=h.source.line,this._charPositionInLine=h.source.charPositionInLine);}static fromToken(u){let l=new va(u.type,void 0,va.EMPTY_SOURCE,u.channel,u.startIndex,u.stopIndex);return l._line=u.line,l.index=u.tokenIndex,l._charPositionInLine=u.charPositionInLine,u instanceof va?(l._text=u._text,l.source=u.source):(l._text=u.text,l.source={source:u.tokenSource,stream:u.inputStream}),l}get type(){return this._type}set type(u){this._type=u;}get line(){return this._line}set line(u){this._line=u;}get text(){if(this._text!=null)return this._text;let u=this.inputStream;if(u==null)return;let l=u.size;return this.start<l&&this.stop<l?u.getText(i.Interval.of(this.start,this.stop)):"<EOF>"}set text(u){this._text=u;}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(u){this._charPositionInLine=u;}get channel(){return this._channel}set channel(u){this._channel=u;}get startIndex(){return this.start}set startIndex(u){this.start=u;}get stopIndex(){return this.stop}set stopIndex(u){this.stop=u;}get tokenIndex(){return this.index}set tokenIndex(u){this.index=u;}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(u){let l="";this._channel>0&&(l=",channel="+this._channel);let h=this.text;h!=null?(h=h.replace(/\n/g,"\\n"),h=h.replace(/\r/g,"\\r"),h=h.replace(/\t/g,"\\t")):h="<no text>";let c=String(this._type);return u&&(c=u.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+h+"',<"+c+">"+l+","+this._line+":"+this.charPositionInLine+"]"}};s.EMPTY_SOURCE={source:void 0,stream:void 0},e([n.NotNull],s.prototype,"source",void 0),e([n.Override],s.prototype,"type",null),e([n.Override],s.prototype,"line",null),e([n.Override],s.prototype,"text",null),e([n.Override],s.prototype,"charPositionInLine",null),e([n.Override],s.prototype,"channel",null),e([n.Override],s.prototype,"startIndex",null),e([n.Override],s.prototype,"stopIndex",null),e([n.Override],s.prototype,"tokenIndex",null),e([n.Override],s.prototype,"tokenSource",null),e([n.Override],s.prototype,"inputStream",null),e([n.Override],s.prototype,"toString",null),e([r(0,n.NotNull)],s,"fromToken",null),s=e([r(2,n.NotNull)],s),t.CommonToken=s;}),P0=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonTokenFactory=void 0;var r=wa(),i=pr(),n=ce(),o=class{constructor(s=!1){this.copyText=s;}create(s,a,u,l,h,c,p,f){let m=new r.CommonToken(a,u,s,l,h,c);return m.line=p,m.charPositionInLine=f,u==null&&this.copyText&&s.stream!=null&&(m.text=s.stream.getText(i.Interval.of(h,c))),m}createSimple(s,a){return new r.CommonToken(s,a)}};e([n.Override],o.prototype,"create",null),e([n.Override],o.prototype,"createSimple",null),t.CommonTokenFactory=o,function(s){s.DEFAULT=new s;}(o=t.CommonTokenFactory||(t.CommonTokenFactory={}));}),uv=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IntegerStack=void 0;var e=L0(),r=class extends e.IntegerList{constructor(i){super(i);}push(i){this.add(i);}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};t.IntegerStack=r;}),lv=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptStateInfo=void 0;var e=class{constructor(r,i){this._prediction=r,this._lexerActionExecutor=i;}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};t.AcceptStateInfo=e;}),ro=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Array2DHashMap=void 0;var e=rn(),r=class{constructor(n){this.keyComparator=n;}hashCode(n){return this.keyComparator.hashCode(n.key)}equals(n,o){return this.keyComparator.equals(n.key,o.key)}},i=class{constructor(n){n instanceof i?this.backingStore=new e.Array2DHashSet(n.backingStore):this.backingStore=new e.Array2DHashSet(new r(n));}clear(){this.backingStore.clear();}containsKey(n){return this.backingStore.contains({key:n})}get(n){let o=this.backingStore.get({key:n});if(o)return o.value}get isEmpty(){return this.backingStore.isEmpty}put(n,o){let s=this.backingStore.get({key:n,value:o}),a;return s?(a=s.value,s.value=o):this.backingStore.add({key:n,value:o}),a}putIfAbsent(n,o){let s=this.backingStore.get({key:n,value:o}),a;return s?a=s.value:this.backingStore.add({key:n,value:o}),a}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(n){return n instanceof i?this.backingStore.equals(n.backingStore):!1}};t.Array2DHashMap=i;}),ss=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionState=void 0;var e=Ei(),r=class extends e.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1;}};t.DecisionState=r;}),I0=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionContextCache=void 0;var r=ro(),i=ce(),n=Jr(),o=jr(),s=me("assert"),a=class{constructor(u=!0){this.contexts=new r.Array2DHashMap(n.ObjectEqualityComparator.INSTANCE),this.childContexts=new r.Array2DHashMap(n.ObjectEqualityComparator.INSTANCE),this.joinContexts=new r.Array2DHashMap(n.ObjectEqualityComparator.INSTANCE),this.enableCache=u;}getAsCached(u){if(!this.enableCache)return u;let l=this.contexts.get(u);return l||(l=u,this.contexts.put(u,u)),l}getChild(u,l){if(!this.enableCache)return u.getChild(l);let h=new a.PredictionContextAndInt(u,l),c=this.childContexts.get(h);return c||(c=u.getChild(l),c=this.getAsCached(c),this.childContexts.put(h,c)),c}join(u,l){if(!this.enableCache)return o.PredictionContext.join(u,l,this);let h=new a.IdentityCommutativePredictionContextOperands(u,l),c=this.joinContexts.get(h);return c||(c=o.PredictionContext.join(u,l,this),c=this.getAsCached(c),this.joinContexts.put(h,c),c)}};t.PredictionContextCache=a,a.UNCACHED=new a(!1),function(u){class l{constructor(p,f){this.obj=p,this.value=f;}equals(p){if(p instanceof l){if(p===this)return !0}else return !1;let f=p;return this.value===f.value&&(this.obj===f.obj||this.obj!=null&&this.obj.equals(f.obj))}hashCode(){let p=5;return p=7*p+(this.obj!=null?this.obj.hashCode():0),p=7*p+this.value,p}}e([i.Override],l.prototype,"equals",null),e([i.Override],l.prototype,"hashCode",null),u.PredictionContextAndInt=l;class h{constructor(p,f){s(p!=null),s(f!=null),this._x=p,this._y=f;}get x(){return this._x}get y(){return this._y}equals(p){if(p instanceof h){if(this===p)return !0}else return !1;let f=p;return this._x===f._x&&this._y===f._y||this._x===f._y&&this._y===f._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}e([i.Override],h.prototype,"equals",null),e([i.Override],h.prototype,"hashCode",null),u.IdentityCommutativePredictionContextOperands=h;}(a=t.PredictionContextCache||(t.PredictionContextCache={}));}),jr=re(t=>{var e=t&&t.__decorate||function(_,x,v,g){var b=arguments.length,E=b<3?x:g===null?g=Object.getOwnPropertyDescriptor(x,v):g,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,x,v,g);else for(var D=_.length-1;D>=0;D--)(w=_[D])&&(E=(b<3?w(E):b>3?w(x,v,E):w(x,v))||E);return b>3&&E&&Object.defineProperty(x,v,E),E},r=t&&t.__param||function(_,x){return function(v,g){x(v,g,_);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SingletonPredictionContext=t.PredictionContext=void 0;var i=ro(),n=rn(),o=F0(),s=Bt(),a=ce(),u=I0(),l=me("assert"),h=1,c=class{constructor(_){this.cachedHashCode=_;}static calculateEmptyHashCode(){let _=s.MurmurHash.initialize(h);return _=s.MurmurHash.finish(_,0),_}static calculateSingleHashCode(_,x){let v=s.MurmurHash.initialize(h);return v=s.MurmurHash.update(v,_),v=s.MurmurHash.update(v,x),v=s.MurmurHash.finish(v,2),v}static calculateHashCode(_,x){let v=s.MurmurHash.initialize(h);for(let g of _)v=s.MurmurHash.update(v,g);for(let g of x)v=s.MurmurHash.update(v,g);return v=s.MurmurHash.finish(v,2*_.length),v}static fromRuleContext(_,x,v=!0){if(x.isEmpty)return v?c.EMPTY_FULL:c.EMPTY_LOCAL;let g;x._parent?g=c.fromRuleContext(_,x._parent,v):g=v?c.EMPTY_FULL:c.EMPTY_LOCAL;let E=_.states[x.invokingState].transition(0);return g.getChild(E.followState.stateNumber)}static addEmptyContext(_){return _.addEmptyContext()}static removeEmptyContext(_){return _.removeEmptyContext()}static join(_,x,v=u.PredictionContextCache.UNCACHED){if(_===x)return _;if(_.isEmpty)return c.isEmptyLocal(_)?_:c.addEmptyContext(x);if(x.isEmpty)return c.isEmptyLocal(x)?x:c.addEmptyContext(_);let g=_.size,b=x.size;if(g===1&&b===1&&_.getReturnState(0)===x.getReturnState(0)){let te=v.join(_.getParent(0),x.getParent(0));return te===_.getParent(0)?_:te===x.getParent(0)?x:te.getChild(_.getReturnState(0))}let E=0,w=new Array(g+b),D=new Array(w.length),N=0,F=0,V=!0,X=!0;for(;N<g&&F<b;)_.getReturnState(N)===x.getReturnState(F)?(w[E]=v.join(_.getParent(N),x.getParent(F)),D[E]=_.getReturnState(N),V=V&&w[E]===_.getParent(N),X=X&&w[E]===x.getParent(F),N++,F++):_.getReturnState(N)<x.getReturnState(F)?(w[E]=_.getParent(N),D[E]=_.getReturnState(N),X=!1,N++):(l(x.getReturnState(F)<_.getReturnState(N)),w[E]=x.getParent(F),D[E]=x.getReturnState(F),V=!1,F++),E++;for(;N<g;)w[E]=_.getParent(N),D[E]=_.getReturnState(N),N++,X=!1,E++;for(;F<b;)w[E]=x.getParent(F),D[E]=x.getReturnState(F),F++,V=!1,E++;return V?_:X?x:(E<w.length&&(w=w.slice(0,E),D=D.slice(0,E)),w.length===0?c.EMPTY_FULL:w.length===1?new m(w[0],D[0]):new f(w,D))}static isEmptyLocal(_){return _===c.EMPTY_LOCAL}static getCachedContext(_,x,v){if(_.isEmpty)return _;let g=v.get(_);if(g)return g;if(g=x.get(_),g)return v.put(_,g),g;let b=!1,E=new Array(_.size);for(let D=0;D<E.length;D++){let N=c.getCachedContext(_.getParent(D),x,v);if(b||N!==_.getParent(D)){if(!b){E=new Array(_.size);for(let F=0;F<_.size;F++)E[F]=_.getParent(F);b=!0;}E[D]=N;}}if(!b)return g=x.putIfAbsent(_,_),v.put(_,g!=null?g:_),_;let w;if(E.length===1)w=new m(E[0],_.getReturnState(0));else {let D=new Array(_.size);for(let N=0;N<_.size;N++)D[N]=_.getReturnState(N);w=new f(E,D,_.hashCode());}return g=x.putIfAbsent(w,w),v.put(w,g||w),v.put(_,g||w),w}appendSingleContext(_,x){return this.appendContext(c.EMPTY_FULL.getChild(_),x)}getChild(_){return new m(this,_)}hashCode(){return this.cachedHashCode}toStrings(_,x,v=c.EMPTY_FULL){let g=[];e:for(let b=0;;b++){let E=0,w=!0,D=this,N=x,F="";for(F+="[";!D.isEmpty&&D!==v;){let V=0;if(D.size>0){let X=1;for(;1<<X>>>0<D.size;)X++;let te=(1<<X>>>0)-1;if(V=b>>E&te,w=w&&V>=D.size-1,V>=D.size)continue e;E+=X;}if(_){F.length>1&&(F+=" ");let te=_.atn.states[N],ae=_.ruleNames[te.ruleIndex];F+=ae;}else D.getReturnState(V)!==c.EMPTY_FULL_STATE_KEY&&(D.isEmpty||(F.length>1&&(F+=" "),F+=D.getReturnState(V)));N=D.getReturnState(V),D=D.getParent(V);}if(F+="]",g.push(F),w)break}return g}};e([a.Override],c.prototype,"hashCode",null),e([r(0,a.NotNull),r(1,a.NotNull),r(2,a.NotNull)],c,"join",null),e([r(0,a.NotNull),r(1,a.NotNull),r(2,a.NotNull)],c,"getCachedContext",null),t.PredictionContext=c;var p=class extends c{constructor(_){super(c.calculateEmptyHashCode()),this.fullContext=_;}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(_){throw new Error("index out of bounds")}getReturnState(_){throw new Error("index out of bounds")}findReturnState(_){return -1}get size(){return 0}appendSingleContext(_,x){return x.getChild(this,_)}appendContext(_,x){return _}get isEmpty(){return !0}get hasEmpty(){return !0}equals(_){return this===_}toStrings(_,x,v){return ["[]"]}};e([a.Override],p.prototype,"addEmptyContext",null),e([a.Override],p.prototype,"removeEmptyContext",null),e([a.Override],p.prototype,"getParent",null),e([a.Override],p.prototype,"getReturnState",null),e([a.Override],p.prototype,"findReturnState",null),e([a.Override],p.prototype,"size",null),e([a.Override],p.prototype,"appendSingleContext",null),e([a.Override],p.prototype,"appendContext",null),e([a.Override],p.prototype,"isEmpty",null),e([a.Override],p.prototype,"hasEmpty",null),e([a.Override],p.prototype,"equals",null),e([a.Override],p.prototype,"toStrings",null);var f=class is extends c{constructor(x,v,g){super(g||c.calculateHashCode(x,v)),l(x.length===v.length),l(v.length>1||v[0]!==c.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=x,this.returnStates=v;}getParent(x){return this.parents[x]}getReturnState(x){return this.returnStates[x]}findReturnState(x){return o.Arrays.binarySearch(this.returnStates,x)}get size(){return this.returnStates.length}get isEmpty(){return !1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===c.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let x=this.parents.slice(0),v=this.returnStates.slice(0);return x.push(c.EMPTY_FULL),v.push(c.EMPTY_FULL_STATE_KEY),new is(x,v)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new m(this.parents[0],this.returnStates[0]);{let x=this.parents.slice(0,this.parents.length-1),v=this.returnStates.slice(0,this.returnStates.length-1);return new is(x,v)}}appendContext(x,v){return is.appendContextImpl(this,x,new c.IdentityHashMap)}static appendContextImpl(x,v,g){if(v.isEmpty){if(c.isEmptyLocal(v)){if(x.hasEmpty)return c.EMPTY_LOCAL;throw new Error("what to do here?")}return x}if(v.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let b=g.get(x);if(!b){if(x.isEmpty)b=v;else {let E=x.size;x.hasEmpty&&E--;let w=new Array(E),D=new Array(E);for(let N=0;N<E;N++)D[N]=x.getReturnState(N);for(let N=0;N<E;N++)w[N]=is.appendContextImpl(x.getParent(N),v,g);w.length===1?b=new m(w[0],D[0]):(l(w.length>1),b=new is(w,D)),x.hasEmpty&&(b=c.join(b,v));}g.put(x,b);}return b}equals(x){if(this===x)return !0;if(!(x instanceof is)||this.hashCode()!==x.hashCode())return !1;let v=x;return this.equalsImpl(v,new n.Array2DHashSet)}equalsImpl(x,v){let g=[],b=[];for(g.push(this),b.push(x);;){let E=g.pop(),w=b.pop();if(!E||!w)break;let D=new u.PredictionContextCache.IdentityCommutativePredictionContextOperands(E,w);if(!v.add(D))continue;let N=D.x.size;if(N===0){if(!D.x.equals(D.y))return !1;continue}let F=D.y.size;if(N!==F)return !1;for(let V=0;V<N;V++){if(D.x.getReturnState(V)!==D.y.getReturnState(V))return !1;let X=D.x.getParent(V),te=D.y.getParent(V);if(X.hashCode()!==te.hashCode())return !1;X!==te&&(g.push(X),b.push(te));}}return !0}};e([a.NotNull],f.prototype,"parents",void 0),e([a.NotNull],f.prototype,"returnStates",void 0),e([a.Override],f.prototype,"getParent",null),e([a.Override],f.prototype,"getReturnState",null),e([a.Override],f.prototype,"findReturnState",null),e([a.Override],f.prototype,"size",null),e([a.Override],f.prototype,"isEmpty",null),e([a.Override],f.prototype,"hasEmpty",null),e([a.Override],f.prototype,"addEmptyContext",null),e([a.Override],f.prototype,"removeEmptyContext",null),e([a.Override],f.prototype,"appendContext",null),e([a.Override],f.prototype,"equals",null),f=e([r(0,a.NotNull)],f);var m=class hv extends c{constructor(x,v){super(c.calculateSingleHashCode(x,v)),this.parent=x,this.returnState=v;}getParent(x){return this.parent}getReturnState(x){return this.returnState}findReturnState(x){return this.returnState===x?0:-1}get size(){return 1}get isEmpty(){return !1}get hasEmpty(){return !1}appendContext(x,v){return v.getChild(this.parent.appendContext(x,v),this.returnState)}addEmptyContext(){let x=[this.parent,c.EMPTY_FULL],v=[this.returnState,c.EMPTY_FULL_STATE_KEY];return new f(x,v)}removeEmptyContext(){return this}equals(x){if(x===this)return !0;if(!(x instanceof hv))return !1;let v=x;return this.hashCode()!==v.hashCode()?!1:this.returnState===v.returnState&&this.parent.equals(v.parent)}};e([a.NotNull],m.prototype,"parent",void 0),e([a.Override],m.prototype,"getParent",null),e([a.Override],m.prototype,"getReturnState",null),e([a.Override],m.prototype,"findReturnState",null),e([a.Override],m.prototype,"size",null),e([a.Override],m.prototype,"isEmpty",null),e([a.Override],m.prototype,"hasEmpty",null),e([a.Override],m.prototype,"appendContext",null),e([a.Override],m.prototype,"addEmptyContext",null),e([a.Override],m.prototype,"removeEmptyContext",null),e([a.Override],m.prototype,"equals",null),m=e([r(0,a.NotNull)],m),t.SingletonPredictionContext=m,function(_){_.EMPTY_LOCAL=new p(!1),_.EMPTY_FULL=new p(!0),_.EMPTY_LOCAL_STATE_KEY=-(1<<31>>>0),_.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class x extends i.Array2DHashMap{constructor(){super(v.INSTANCE);}}_.IdentityHashMap=x;class v{IdentityEqualityComparator(){}hashCode(b){return b.hashCode()}equals(b,E){return b===E}}v.INSTANCE=new v,e([a.Override],v.prototype,"hashCode",null),e([a.Override],v.prototype,"equals",null),_.IdentityEqualityComparator=v;}(c=t.PredictionContext||(t.PredictionContext={}));}),Ql=re(t=>{var e=t&&t.__decorate||function(x,v,g,b){var E=arguments.length,w=E<3?v:b===null?b=Object.getOwnPropertyDescriptor(v,g):b,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(x,v,g,b);else for(var N=x.length-1;N>=0;N--)(D=x[N])&&(w=(E<3?D(w):E>3?D(v,g,w):D(v,g))||w);return E>3&&w&&Object.defineProperty(v,g,w),w},r=t&&t.__param||function(x,v){return function(g,b){v(g,b,x);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNConfig=void 0;var i=ro(),n=ss(),o=Bt(),s=ce(),a=Jr(),u=jr(),l=to(),h=me("assert"),c=2147483648,p=class Ea{constructor(v,g,b){typeof g=="number"?(h((g&16777215)===g),this._state=v,this.altAndOuterContextDepth=g,this._context=b):(this._state=v,this.altAndOuterContextDepth=g.altAndOuterContextDepth,this._context=b);}static create(v,g,b,E=l.SemanticContext.NONE,w){return E!==l.SemanticContext.NONE?w!=null?new _(w,E,v,g,b,!1):new f(E,v,g,b):w!=null?new m(w,v,g,b,!1):new Ea(v,g,b)}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(v){this._context=v;}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(v){h(v>=0),v=Math.min(v,127),this.altAndOuterContextDepth=v<<24|(this.altAndOuterContextDepth&-2130706433)>>>0;}get lexerActionExecutor(){}get semanticContext(){return l.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return !1}clone(){return this.transform(this.state,!1)}transform(v,g,b){return b==null?this.transformImpl(v,this._context,this.semanticContext,g,this.lexerActionExecutor):b instanceof u.PredictionContext?this.transformImpl(v,b,this.semanticContext,g,this.lexerActionExecutor):b instanceof l.SemanticContext?this.transformImpl(v,this._context,b,g,this.lexerActionExecutor):this.transformImpl(v,this._context,this.semanticContext,g,b)}transformImpl(v,g,b,E,w){let D=E&&Ea.checkNonGreedyDecision(this,v);return b!==l.SemanticContext.NONE?w!=null||D?new _(w,b,v,this,g,D):new f(b,v,this,g):w!=null||D?new m(w,v,this,g,D):new Ea(v,this,g)}static checkNonGreedyDecision(v,g){return v.hasPassedThroughNonGreedyDecision||g instanceof n.DecisionState&&g.nonGreedy}appendContext(v,g){if(typeof v=="number"){let b=this.context.appendSingleContext(v,g);return this.transform(this.state,!1,b)}else {let b=this.context.appendContext(v,g);return this.transform(this.state,!1,b)}}contains(v){if(this.state.stateNumber!==v.state.stateNumber||this.alt!==v.alt||!this.semanticContext.equals(v.semanticContext))return !1;let g=[],b=[];for(g.push(this.context),b.push(v.context);;){let E=g.pop(),w=b.pop();if(!E||!w)break;if(E===w)return !0;if(E.size<w.size)return !1;if(w.isEmpty)return E.hasEmpty;for(let D=0;D<w.size;D++){let N=E.findReturnState(w.getReturnState(D));if(N<0)return !1;g.push(E.getParent(N)),b.push(w.getParent(D));}}return !1}get isPrecedenceFilterSuppressed(){return (this.altAndOuterContextDepth&c)!==0}set isPrecedenceFilterSuppressed(v){v?this.altAndOuterContextDepth|=c:this.altAndOuterContextDepth&=~c;}equals(v){return this===v?!0:v instanceof Ea?this.state.stateNumber===v.state.stateNumber&&this.alt===v.alt&&this.reachesIntoOuterContext===v.reachesIntoOuterContext&&this.context.equals(v.context)&&this.semanticContext.equals(v.semanticContext)&&this.isPrecedenceFilterSuppressed===v.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===v.hasPassedThroughNonGreedyDecision&&a.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,v.lexerActionExecutor):!1}hashCode(){let v=o.MurmurHash.initialize(7);return v=o.MurmurHash.update(v,this.state.stateNumber),v=o.MurmurHash.update(v,this.alt),v=o.MurmurHash.update(v,this.reachesIntoOuterContext?1:0),v=o.MurmurHash.update(v,this.context),v=o.MurmurHash.update(v,this.semanticContext),v=o.MurmurHash.update(v,this.hasPassedThroughNonGreedyDecision?1:0),v=o.MurmurHash.update(v,this.lexerActionExecutor),v=o.MurmurHash.finish(v,7),v}toDotString(){let v="";v+=`digraph G {
|
|
62
|
+
`,v+=`rankdir=LR;
|
|
63
|
+
`;let g=new i.Array2DHashMap(u.PredictionContext.IdentityEqualityComparator.INSTANCE),b=[];function E(w){let D=g.size,N=g.putIfAbsent(w,D);return N!=null?N:(b.push(w),D)}for(b.push(this.context),g.put(this.context,0);;){let w=b.pop();if(!w)break;for(let D=0;D<w.size;D++)v+=" s"+E(w),v+="->",v+="s"+E(w.getParent(D)),v+='[label="'+w.getReturnState(D)+`"];
|
|
64
|
+
`;}return v+=`}
|
|
65
|
+
`,v.toString()}toString(v,g,b){b==null&&(b=g!=null),g==null&&(g=!0);let E="",w;b?w=this.context.toStrings(v,this.state.stateNumber):w=["?"];let D=!0;for(let N of w)D?D=!1:E+=", ",E+="(",E+=this.state,g&&(E+=",",E+=this.alt),this.context&&(E+=",",E+=N),this.semanticContext!==l.SemanticContext.NONE&&(E+=",",E+=this.semanticContext),this.reachesIntoOuterContext&&(E+=",up="+this.outerContextDepth),E+=")";return E.toString()}};e([s.NotNull],p.prototype,"_state",void 0),e([s.NotNull],p.prototype,"_context",void 0),e([s.NotNull],p.prototype,"state",null),e([s.NotNull,r(0,s.NotNull)],p.prototype,"context",null),e([s.NotNull],p.prototype,"semanticContext",null),e([s.Override],p.prototype,"clone",null),e([r(0,s.NotNull),r(2,s.NotNull)],p.prototype,"transformImpl",null),e([s.Override],p.prototype,"equals",null),e([s.Override],p.prototype,"hashCode",null),e([r(0,s.NotNull),r(3,s.NotNull)],p,"create",null),p=e([r(0,s.NotNull),r(2,s.NotNull)],p),t.ATNConfig=p;var f=class extends p{constructor(v,g,b,E){typeof b=="number"?super(g,b,E):super(g,b,E),this._semanticContext=v;}get semanticContext(){return this._semanticContext}};e([s.NotNull],f.prototype,"_semanticContext",void 0),e([s.Override],f.prototype,"semanticContext",null),f=e([r(1,s.NotNull),r(2,s.NotNull)],f);var m=class extends p{constructor(v,g,b,E,w){if(typeof b=="number")super(g,b,E);else if(super(g,b,E),b.semanticContext!==l.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=v,this.passedThroughNonGreedyDecision=w;}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};e([s.Override],m.prototype,"lexerActionExecutor",null),e([s.Override],m.prototype,"hasPassedThroughNonGreedyDecision",null),m=e([r(1,s.NotNull),r(2,s.NotNull)],m);var _=class extends f{constructor(v,g,b,E,w,D){typeof E=="number"?super(g,b,E,w):super(g,b,E,w),this._lexerActionExecutor=v,this.passedThroughNonGreedyDecision=D;}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};e([s.Override],_.prototype,"lexerActionExecutor",null),e([s.Override],_.prototype,"hasPassedThroughNonGreedyDecision",null),_=e([r(1,s.NotNull),r(2,s.NotNull)],_);}),nn=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitSet=void 0;var e=me("util"),r=Bt(),i=new Uint16Array(0);function n(p){return p>>>4}function o(p){return p*16}function s(p){let f=1;for(let m=0;m<16;m++){if(p&f)return m;f=f<<1>>>0;}throw new RangeError("No specified bit found")}function a(p){let f=32768;for(let m=15;m>=0;m--){if(p&f)return m;f=f>>>1;}throw new RangeError("No specified bit found")}function u(p,f){return p&=15,f&=15,p===f?1<<p>>>0:65535>>>15-f^65535>>>16-p}var l=new Uint8Array(65536);for(let p=0;p<16;p++){let f=1<<p>>>0,m=0;for(;m<l.length;){m+=f;for(let _=0;_<f;_++)l[m]++,m++;}}var h=class{constructor(p){if(!p)this.data=i;else if(typeof p=="number"){if(p<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(n(p-1)+1);}else if(p instanceof h)this.data=p.data.slice(0);else {let f=-1;for(let m of p)f<m&&(f=m);this.data=new Uint16Array(n(f-1)+1);for(let m of p)this.set(m);}}and(p){let f=this.data,m=p.data,_=Math.min(f.length,m.length),x=-1;for(let v=0;v<_;v++)(f[v]&=m[v])!==0&&(x=v);x===-1&&(this.data=i),x<f.length-1&&(this.data=f.slice(0,x+1));}andNot(p){let f=this.data,m=p.data,_=Math.min(f.length,m.length),x=-1;for(let v=0;v<_;v++)(f[v]&=m[v]^65535)!==0&&(x=v);x===-1&&(this.data=i),x<f.length-1&&(this.data=f.slice(0,x+1));}cardinality(){if(this.isEmpty)return 0;let p=this.data,f=p.length,m=0;for(let _=0;_<f;_++)m+=l[p[_]];return m}clear(p,f){p==null?this.data.fill(0):f==null?this.set(p,!1):this.set(p,f,!1);}flip(p,f){if(f==null&&(f=p),p<0||f<p)throw new RangeError;let m=n(p),_=n(f);if(m===_)this.data[m]^=u(p,f);else {for(this.data[m++]^=u(p,15);m<_;)this.data[m++]^=65535;this.data[m++]^=u(0,f);}}get(p,f){if(f===void 0)return !!(this.data[n(p)]&u(p,p));{let m=new h(f+1);for(let _=p;_<=f;_++)m.set(_,this.get(_));return m}}intersects(p){let f=Math.min(this.length(),p.length());if(f===0)return !1;let m=n(f-1);for(let _=0;_<=m;_++)if(this.data[_]&p.data[_])return !0;return !1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(o(this.data.length)-1)+1:0}nextClearBit(p){if(p<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,_=n(p);if(_>m)return -1;let x=65535^u(p,15);if((f[_]|x)===65535){for(_++,x=0;_<m&&f[_]===65535;_++);if(_===m)return -1}return o(_)+s((f[_]|x)^65535)}nextSetBit(p){if(p<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,_=n(p);if(_>m)return -1;let x=u(p,15);if(!(f[_]&x)){for(_++,x=65535;_<m&&f[_]===0;_++);if(_>=m)return -1}return o(_)+s(f[_]&x)}or(p){let f=this.data,m=p.data,_=Math.min(f.length,m.length),x=Math.max(f.length,m.length),v=f.length===x?f:new Uint16Array(x),g=-1;for(let E=0;E<_;E++)(v[E]=f[E]|m[E])!==0&&(g=E);let b=f.length>m.length?f:m;for(let E=_;E<x;E++)(v[E]=b[E])!==0&&(g=E);g===-1?this.data=i:v.length===g+1?this.data=v:this.data=v.slice(0,g);}previousClearBit(p){if(p<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,_=n(p);_>=m&&(_=m-1);let x=65535^u(0,p);if((f[_]|x)===65535){for(x=0,_--;_>=0&&f[_]===65535;_--);if(_<0)return -1}return o(_)+a((f[_]|x)^65535)}previousSetBit(p){if(p<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,_=n(p);_>=m&&(_=m-1);let x=u(0,p);if(!(f[_]&x)){for(_--,x=65535;_>=0&&f[_]===0;_--);if(_<0)return -1}return o(_)+a(f[_]&x)}set(p,f,m){if(f===void 0?(f=p,m=!0):typeof f=="boolean"&&(m=f,f=p),m===void 0&&(m=!0),p<0||p>f)throw new RangeError;let _=n(p),x=n(f);if(m&&x>=this.data.length){let v=new Uint16Array(x+1);this.data.forEach((g,b)=>v[b]=g),this.data=v;}else if(!m){if(_>=this.data.length)return;x>=this.data.length&&(x=this.data.length-1,f=this.data.length*16-1);}if(_===x)this._setBits(_,m,u(p,f));else {for(this._setBits(_++,m,u(p,15));_<x;)this.data[_++]=m?65535:0;this._setBits(_,m,u(0,f));}}_setBits(p,f,m){f?this.data[p]|=m:this.data[p]&=65535^m;}get size(){return this.data.byteLength*8}hashCode(){return r.MurmurHash.hashCode(this.data,22)}equals(p){if(p===this)return !0;if(!(p instanceof h))return !1;let f=this.length();if(f!==p.length())return !1;if(f===0)return !0;let m=n(f-1);for(let _=0;_<=m;_++)if(this.data[_]!==p.data[_])return !1;return !0}toString(){let p="{",f=!0;for(let m=this.nextSetBit(0);m>=0;m=this.nextSetBit(m+1))f?f=!1:p+=", ",p+=m;return p+="}",p}xor(p){let f=this.data,m=p.data,_=Math.min(f.length,m.length),x=Math.max(f.length,m.length),v=f.length===x?f:new Uint16Array(x),g=-1;for(let E=0;E<_;E++)(v[E]=f[E]^m[E])!==0&&(g=E);let b=f.length>m.length?f:m;for(let E=_;E<x;E++)(v[E]=b[E])!==0&&(g=E);g===-1?this.data=i:v.length===g+1?this.data=v:this.data=v.slice(0,g+1);}clone(){return new h(this)}[Symbol.iterator](){return new c(this.data)}[e.inspect.custom](){return "BitSet "+this.toString()}};t.BitSet=h;var c=class{constructor(p){this.data=p,this.index=0,this.mask=65535;}next(){for(;this.index<this.data.length;){let p=this.data[this.index]&this.mask;if(p!==0){let f=o(this.index)+s(p);return this.mask=u(f+1,15),{done:!1,value:f}}this.index++,this.mask=65535;}return {done:!0,value:-1}}[Symbol.iterator](){return this}};}),Da=re(t=>{var e=t&&t.__decorate||function(g,b,E,w){var D=arguments.length,N=D<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,E):w,F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,b,E,w);else for(var V=g.length-1;V>=0;V--)(F=g[V])&&(N=(D<3?F(N):D>3?F(b,E,N):F(b,E))||N);return D>3&&N&&Object.defineProperty(b,E,N),N};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNConfigSet=void 0;var r=ro(),i=rn(),n=Zl(),o=ei(),s=Ql(),a=nn(),u=ce(),l=Jr(),h=jr(),c=I0(),p=to(),f=me("assert"),m=Qr(),_=class{hashCode(g){return g.state^g.alt}equals(g,b){return g.state===b.state&&g.alt===b.alt}};_.INSTANCE=new _;function x(g){return g?new r.Array2DHashMap(g):new r.Array2DHashMap(_.INSTANCE)}var v=class{constructor(g,b){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,g?(b?(this.mergedConfigs=void 0,this.unmerged=void 0):g.isReadOnly?(this.mergedConfigs=x(),this.unmerged=[]):(this.mergedConfigs=x(g.mergedConfigs),this.unmerged=g.unmerged.slice(0)),this.configs=g.configs.slice(0),this._dipsIntoOuterContext=g._dipsIntoOuterContext,this._hasSemanticContext=g._hasSemanticContext,this.outermostConfigSet=g.outermostConfigSet,(b||!g.isReadOnly)&&(this._uniqueAlt=g._uniqueAlt,this._conflictInfo=g._conflictInfo)):(this.mergedConfigs=x(),this.unmerged=[],this.configs=[],this._uniqueAlt=o.ATN.INVALID_ALT_NUMBER);}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let g=new a.BitSet;for(let b of this)g.set(b.alt);return g}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(g){if(this.outermostConfigSet&&!g)throw new Error("IllegalStateException");f(!g||!this._dipsIntoOuterContext),this.outermostConfigSet=g;}getStates(){let g=new i.Array2DHashSet(l.ObjectEqualityComparator.INSTANCE);for(let b of this.configs)g.add(b.state);return g}optimizeConfigs(g){if(this.configs.length!==0)for(let b of this.configs)b.context=g.atn.getCachedContext(b.context);}clone(g){let b=new v(this,g);return !g&&this.isReadOnly&&b.addAll(this.configs),b}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(g){if(!(g instanceof s.ATNConfig))return !1;if(this.mergedConfigs&&this.unmerged){let b=g,E=this.getKey(b),w=this.mergedConfigs.get(E);if(w!=null&&this.canMerge(b,E,w))return w.contains(b);for(let D of this.unmerged)if(D.contains(g))return !0}else for(let b of this.configs)if(b.contains(g))return !0;return !1}*[Symbol.iterator](){yield*this.configs;}toArray(){return this.configs}add(g,b){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");f(!this.outermostConfigSet||!g.reachesIntoOuterContext),b==null&&(b=c.PredictionContextCache.UNCACHED);let E,w=this.getKey(g),D=this.mergedConfigs.get(w);if(E=D==null,D!=null&&this.canMerge(g,w,D)){D.outerContextDepth=Math.max(D.outerContextDepth,g.outerContextDepth),g.isPrecedenceFilterSuppressed&&(D.isPrecedenceFilterSuppressed=!0);let N=h.PredictionContext.join(D.context,g.context,b);return this.updatePropertiesForMergedConfig(g),D.context===N?!1:(D.context=N,!0)}for(let N=0;N<this.unmerged.length;N++){let F=this.unmerged[N];if(this.canMerge(g,w,F)){F.outerContextDepth=Math.max(F.outerContextDepth,g.outerContextDepth),g.isPrecedenceFilterSuppressed&&(F.isPrecedenceFilterSuppressed=!0);let V=h.PredictionContext.join(F.context,g.context,b);return this.updatePropertiesForMergedConfig(g),F.context===V?!1:(F.context=V,E&&(this.mergedConfigs.put(w,F),this.unmerged.splice(N,1)),!0)}}return this.configs.push(g),E?this.mergedConfigs.put(w,g):this.unmerged.push(g),this.updatePropertiesForAddedConfig(g),!0}updatePropertiesForMergedConfig(g){this._dipsIntoOuterContext=this._dipsIntoOuterContext||g.reachesIntoOuterContext,f(!this.outermostConfigSet||!this._dipsIntoOuterContext);}updatePropertiesForAddedConfig(g){this.configs.length===1?this._uniqueAlt=g.alt:this._uniqueAlt!==g.alt&&(this._uniqueAlt=o.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!p.SemanticContext.NONE.equals(g.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||g.reachesIntoOuterContext,f(!this.outermostConfigSet||!this._dipsIntoOuterContext);}canMerge(g,b,E){return g.state.stateNumber!==E.state.stateNumber||b.alt!==E.alt?!1:g.semanticContext.equals(E.semanticContext)}getKey(g){return {state:g.state.stateNumber,alt:g.alt}}containsAll(g){for(let b of g)if(!(b instanceof s.ATNConfig)||!this.contains(b))return !1;return !0}addAll(g,b){this.ensureWritable();let E=!1;for(let w of g)this.add(w,b)&&(E=!0);return E}clear(){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");this.mergedConfigs.clear(),this.unmerged.length=0,this.configs.length=0,this._dipsIntoOuterContext=!1,this._hasSemanticContext=!1,this._uniqueAlt=o.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0;}equals(g){return this===g?!0:g instanceof v?this.outermostConfigSet===g.outermostConfigSet&&m.equals(this._conflictInfo,g._conflictInfo)&&n.ArrayEqualityComparator.INSTANCE.equals(this.configs,g.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let g=1;return g=5*g^(this.outermostConfigSet?1:0),g=5*g^n.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=g),g}toString(g){g==null&&(g=!1);let b="",E=this.configs.slice(0);E.sort((w,D)=>w.alt!==D.alt?w.alt-D.alt:w.state.stateNumber!==D.state.stateNumber?w.state.stateNumber-D.state.stateNumber:w.semanticContext.toString().localeCompare(D.semanticContext.toString())),b+="[";for(let w=0;w<E.length;w++)w>0&&(b+=", "),b+=E[w].toString(void 0,!0,g);return b+="]",this._hasSemanticContext&&(b+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==o.ATN.INVALID_ALT_NUMBER&&(b+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(b+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(b+="*")),this._dipsIntoOuterContext&&(b+=",dipsIntoOuterContext"),b.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(g){this.ensureWritable(),this._hasSemanticContext=g;}get conflictInfo(){return this._conflictInfo}set conflictInfo(g){this.ensureWritable(),this._conflictInfo=g;}get conflictingAlts(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts}get isExactConflict(){return this._conflictInfo==null?!1:this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(g){return this.configs[g]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};e([u.NotNull],v.prototype,"getRepresentedAlternatives",null),e([u.Override],v.prototype,"size",null),e([u.Override],v.prototype,"isEmpty",null),e([u.Override],v.prototype,"contains",null),e([u.Override],v.prototype,Symbol.iterator,null),e([u.Override],v.prototype,"toArray",null),e([u.Override],v.prototype,"containsAll",null),e([u.Override],v.prototype,"clear",null),e([u.Override],v.prototype,"equals",null),e([u.Override],v.prototype,"hashCode",null),t.ATNConfigSet=v;}),eh=re(t=>{var e=t&&t.__decorate||function(h,c,p,f){var m=arguments.length,_=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,p):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(h,c,p,f);else for(var v=h.length-1;v>=0;v--)(x=h[v])&&(_=(m<3?x(_):m>3?x(c,p,_):x(c,p))||_);return m>3&&_&&Object.defineProperty(c,p,_),_},r=t&&t.__param||function(h,c){return function(p,f){c(p,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DFAState=void 0;var i=ei(),n=nn(),o=Bt(),s=ce(),a=jr(),u=me("assert"),l=class{constructor(h){this.stateNumber=-1,this.configs=h,this.edges=new Map,this.contextEdges=new Map;}get isContextSensitive(){return !!this.contextSymbols}isContextSymbol(h){return this.isContextSensitive?this.contextSymbols.get(h):!1}setContextSymbol(h){u(this.isContextSensitive),this.contextSymbols.set(h);}setContextSensitive(h){u(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new n.BitSet));}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(h){this._acceptStateInfo=h;}get isAcceptState(){return !!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:i.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(h){return this.edges.get(h)}setTarget(h,c){this.edges.set(h,c);}getEdgeMap(){return this.edges}getContextTarget(h){return h===a.PredictionContext.EMPTY_FULL_STATE_KEY&&(h=-1),this.contextEdges.get(h)}setContextTarget(h,c){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");h===a.PredictionContext.EMPTY_FULL_STATE_KEY&&(h=-1),this.contextEdges.set(h,c);}getContextEdgeMap(){let h=new Map(this.contextEdges),c=h.get(-1);if(c!==void 0)if(h.size===1){let p=new Map;return p.set(a.PredictionContext.EMPTY_FULL_STATE_KEY,c),p}else h.delete(-1),h.set(a.PredictionContext.EMPTY_FULL_STATE_KEY,c);return h}hashCode(){let h=o.MurmurHash.initialize(7);return h=o.MurmurHash.update(h,this.configs.hashCode()),h=o.MurmurHash.finish(h,1),h}equals(h){if(this===h)return !0;if(!(h instanceof l))return !1;let c=h;return this.configs.equals(c.configs)}toString(){let h="";return h+=this.stateNumber+":"+this.configs,this.isAcceptState&&(h+="=>",this.predicates?h+=this.predicates:h+=this.prediction),h.toString()}};e([s.NotNull],l.prototype,"configs",void 0),e([s.NotNull],l.prototype,"edges",void 0),e([s.NotNull],l.prototype,"contextEdges",void 0),e([s.Override],l.prototype,"hashCode",null),e([s.Override],l.prototype,"equals",null),e([s.Override],l.prototype,"toString",null),t.DFAState=l,function(h){let c=class{constructor(f,m){this.alt=m,this.pred=f;}toString(){return "("+this.pred+", "+this.alt+")"}};e([s.NotNull],c.prototype,"pred",void 0),e([s.Override],c.prototype,"toString",null),c=e([r(0,s.NotNull)],c),h.PredPrediction=c;}(l=t.DFAState||(t.DFAState={}));}),th=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNSimulator=void 0;var i=Da(),n=eh(),o=ce(),s=jr(),a=class ba{constructor(l){this.atn=l;}static get ERROR(){return ba._ERROR||(ba._ERROR=new n.DFAState(new i.ATNConfigSet),ba._ERROR.stateNumber=s.PredictionContext.EMPTY_FULL_STATE_KEY),ba._ERROR}clearDFA(){this.atn.clearDFA();}};e([o.NotNull],a.prototype,"atn",void 0),e([o.NotNull],a,"ERROR",null),a=e([r(0,o.NotNull)],a),t.ATNSimulator=a,a=t.ATNSimulator||(t.ATNSimulator={}),t.ATNSimulator=a;}),cv=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleErrorListener=void 0;var e=class{syntaxError(r,i,n,o,s,a){console.error(`line ${n}:${o} ${s}`);}};t.ConsoleErrorListener=e,e.INSTANCE=new e;}),k0=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h},r=t&&t.__param||function(o,s){return function(a,u){s(a,u,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyErrorListener=void 0;var i=ce(),n=class{constructor(o){if(this.delegates=o,!o)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(o,s,a,u,l,h){this.delegates.forEach(c=>{c.syntaxError&&c.syntaxError(o,s,a,u,l,h);});}};e([i.Override,r(0,i.NotNull),r(4,i.NotNull)],n.prototype,"syntaxError",null),t.ProxyErrorListener=n;}),Sa=re(t=>{var e=t&&t.__decorate||function(l,h,c,p){var f=arguments.length,m=f<3?h:p===null?p=Object.getOwnPropertyDescriptor(h,c):p,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,h,c,p);else for(var x=l.length-1;x>=0;x--)(_=l[x])&&(m=(f<3?_(m):f>3?_(h,c,m):_(h,c))||m);return f>3&&m&&Object.defineProperty(h,c,m),m},r=t&&t.__param||function(l,h){return function(c,p){h(c,p,l);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Recognizer=void 0;var i=cv(),n=k0(),o=ce(),s=Ct(),a=Qr(),u=class{constructor(){this._listeners=[i.ConsoleErrorListener.INSTANCE],this._stateNumber=-1;}getTokenTypeMap(){let l=this.vocabulary,h=u.tokenTypeMapCache.get(l);if(h==null){let c=new Map;for(let p=0;p<=this.atn.maxTokenType;p++){let f=l.getLiteralName(p);f!=null&&c.set(f,p);let m=l.getSymbolicName(p);m!=null&&c.set(m,p);}c.set("EOF",s.Token.EOF),h=c,u.tokenTypeMapCache.set(l,h);}return h}getRuleIndexMap(){let l=this.ruleNames;if(l==null)throw new Error("The current recognizer does not provide a list of rule names.");let h=u.ruleIndexMapCache.get(l);return h==null&&(h=a.toMap(l),u.ruleIndexMapCache.set(l,h)),h}getTokenType(l){let h=this.getTokenTypeMap().get(l);return h!=null?h:s.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(l){this._interp=l;}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(l){let h=l.getOffendingToken();if(!h)return "";let c=h.line,p=h.charPositionInLine;return "line "+c+":"+p}addErrorListener(l){if(!l)throw new TypeError("listener must not be null");this._listeners.push(l);}removeErrorListener(l){let h=this._listeners.indexOf(l);h!==-1&&this._listeners.splice(h,1);}removeErrorListeners(){this._listeners.length=0;}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new n.ProxyErrorListener(this.getErrorListeners())}sempred(l,h,c){return !0}precpred(l,h){return !0}action(l,h,c){}get state(){return this._stateNumber}set state(l){this._stateNumber=l;}};u.EOF=-1,u.tokenTypeMapCache=new WeakMap,u.ruleIndexMapCache=new WeakMap,e([o.SuppressWarnings("serial"),o.NotNull],u.prototype,"_listeners",void 0),e([o.NotNull],u.prototype,"getTokenTypeMap",null),e([o.NotNull],u.prototype,"getRuleIndexMap",null),e([o.NotNull],u.prototype,"serializedATN",null),e([o.NotNull],u.prototype,"atn",null),e([o.NotNull,r(0,o.NotNull)],u.prototype,"interpreter",null),e([o.NotNull,r(0,o.NotNull)],u.prototype,"getErrorHeader",null),e([r(0,o.NotNull)],u.prototype,"addErrorListener",null),e([r(0,o.NotNull)],u.prototype,"removeErrorListener",null),e([o.NotNull],u.prototype,"getErrorListeners",null),t.Recognizer=u;}),sn=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.VocabularyImpl=void 0;var r=ce(),i=Ct(),n=class{constructor(o,s,a){this.literalNames=o,this.symbolicNames=s,this.displayNames=a,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1;}get maxTokenType(){return this._maxTokenType}getLiteralName(o){if(o>=0&&o<this.literalNames.length)return this.literalNames[o]}getSymbolicName(o){if(o>=0&&o<this.symbolicNames.length)return this.symbolicNames[o];if(o===i.Token.EOF)return "EOF"}getDisplayName(o){if(o>=0&&o<this.displayNames.length){let u=this.displayNames[o];if(u)return u}let s=this.getLiteralName(o);if(s)return s;let a=this.getSymbolicName(o);return a||String(o)}};n.EMPTY_VOCABULARY=new n([],[],[]),e([r.NotNull],n.prototype,"literalNames",void 0),e([r.NotNull],n.prototype,"symbolicNames",void 0),e([r.NotNull],n.prototype,"displayNames",void 0),e([r.Override],n.prototype,"maxTokenType",null),e([r.Override],n.prototype,"getLiteralName",null),e([r.Override],n.prototype,"getSymbolicName",null),e([r.Override,r.NotNull],n.prototype,"getDisplayName",null),e([r.NotNull],n,"EMPTY_VOCABULARY",void 0),t.VocabularyImpl=n;}),fv=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.DFASerializer=void 0;var r=th(),i=ce(),n=jr(),o=Sa(),s=sn(),a=class{constructor(u,l,h,c){l instanceof o.Recognizer?(h=l.ruleNames,c=l.atn,l=l.vocabulary):l||(l=s.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=u,this.vocabulary=l,this.ruleNames=h,this.atn=c;}toString(){if(!this.dfa.s0)return "";let u="";if(this.dfa.states){let h=new Array(...this.dfa.states.toArray());h.sort((c,p)=>c.stateNumber-p.stateNumber);for(let c of h){let p=c.getEdgeMap(),f=[...p.keys()].sort((x,v)=>x-v),m=c.getContextEdgeMap(),_=[...m.keys()].sort((x,v)=>x-v);for(let x of f){let v=p.get(x);if((v==null||v===r.ATNSimulator.ERROR)&&!c.isContextSymbol(x))continue;let g=!1;u+=this.getStateString(c)+"-"+this.getEdgeLabel(x)+"->",c.isContextSymbol(x)&&(u+="!",g=!0);let b=v;b&&b.stateNumber!==r.ATNSimulator.ERROR.stateNumber?u+=this.getStateString(b)+`
|
|
66
|
+
`:g&&(u+=`ctx
|
|
67
|
+
`);}if(c.isContextSensitive)for(let x of _)u+=this.getStateString(c)+"-"+this.getContextLabel(x)+"->"+this.getStateString(m.get(x))+`
|
|
68
|
+
`;}}let l=u;return l.length===0?"":l}getContextLabel(u){if(u===n.PredictionContext.EMPTY_FULL_STATE_KEY)return "ctx:EMPTY_FULL";if(u===n.PredictionContext.EMPTY_LOCAL_STATE_KEY)return "ctx:EMPTY_LOCAL";if(this.atn&&u>0&&u<=this.atn.states.length){let h=this.atn.states[u].ruleIndex;if(this.ruleNames&&h>=0&&h<this.ruleNames.length)return "ctx:"+String(u)+"("+this.ruleNames[h]+")"}return "ctx:"+String(u)}getEdgeLabel(u){return this.vocabulary.getDisplayName(u)}getStateString(u){if(u===r.ATNSimulator.ERROR)return "ERROR";let l=u.stateNumber,h="s"+l;if(u.isAcceptState&&(u.predicates?h=":s"+l+"=>"+u.predicates:h=":s"+l+"=>"+u.prediction),u.isContextSensitive){h+="*";for(let c of u.configs)if(c.reachesIntoOuterContext){h+="*";break}}return h}};e([i.NotNull],a.prototype,"dfa",void 0),e([i.NotNull],a.prototype,"vocabulary",void 0),e([i.Override],a.prototype,"toString",null),t.DFASerializer=a;}),$L=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerDFASerializer=void 0;var i=fv(),n=ce(),o=sn(),s=class extends i.DFASerializer{constructor(u){super(u,o.VocabularyImpl.EMPTY_VOCABULARY);}getEdgeLabel(u){return "'"+String.fromCodePoint(u)+"'"}};e([n.Override,n.NotNull],s.prototype,"getEdgeLabel",null),s=e([r(0,n.NotNull)],s),t.LexerDFASerializer=s;}),M0=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.StarLoopEntryState=void 0;var r=Zt(),i=nn(),n=ss(),o=ce(),s=class extends n.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new i.BitSet;}get stateType(){return r.ATNStateType.STAR_LOOP_ENTRY}};e([o.Override],s.prototype,"stateType",null),t.StarLoopEntryState=s;}),dv=re(t=>{var e=t&&t.__decorate||function(f,m,_,x){var v=arguments.length,g=v<3?m:x===null?x=Object.getOwnPropertyDescriptor(m,_):x,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(f,m,_,x);else for(var E=f.length-1;E>=0;E--)(b=f[E])&&(g=(v<3?b(g):v>3?b(m,_,g):b(m,_))||g);return v>3&&g&&Object.defineProperty(m,_,g),g},r=t&&t.__param||function(f,m){return function(_,x){m(_,x,f);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DFA=void 0;var i=rn(),n=Da(),o=fv(),s=eh(),a=$L(),u=ce(),l=Jr(),h=M0(),c=sn(),p=class{constructor(m,_=0){if(this.states=new i.Array2DHashSet(l.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!m.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=m,this.atn=m.atn,this.decision=_;let x=!1;m instanceof h.StarLoopEntryState&&m.precedenceRuleDecision&&(x=!0,this.s0=new s.DFAState(new n.ATNConfigSet),this.s0full=new s.DFAState(new n.ATNConfigSet)),this.precedenceDfa=x;}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(m,_){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return _?this.s0full.getTarget(m):this.s0.getTarget(m)}setPrecedenceStartState(m,_,x){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");m<0||(_?this.s0full.setTarget(m,x):this.s0.setTarget(m,x));}get isEmpty(){return this.isPrecedenceDfa?this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0:this.s0==null&&this.s0full==null}get isContextSensitive(){return this.isPrecedenceDfa?this.s0full.getEdgeMap().size>0:this.s0full!=null}addState(m){return m.stateNumber=this.nextStateNumber++,this.states.getOrAdd(m)}toString(m,_){if(m||(m=c.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return "";let x;return _?x=new o.DFASerializer(this,m,_,this.atnStartState.atn):x=new o.DFASerializer(this,m),x.toString()}toLexerString(){return this.s0?new a.LexerDFASerializer(this).toString():""}};e([u.NotNull],p.prototype,"states",void 0),e([u.NotNull],p.prototype,"atnStartState",void 0),e([u.NotNull],p.prototype,"atn",void 0),p=e([r(0,u.NotNull)],p),t.DFA=p;}),pv=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BasicState=void 0;var r=Ei(),i=Zt(),n=ce(),o=class extends r.ATNState{get stateType(){return i.ATNStateType.BASIC}};e([n.Override],o.prototype,"stateType",null),t.BasicState=o;}),mv=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidState=void 0;var r=Zt(),i=pv(),n=ce(),o=class extends i.BasicState{get stateType(){return r.ATNStateType.INVALID_TYPE}};e([n.Override],o.prototype,"stateType",null),t.InvalidState=o;}),B0=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SetTransition=void 0;var i=os(),n=ce(),o=Ct(),s=tn(),a=class extends s.Transition{constructor(l,h){super(l),h==null&&(h=i.IntervalSet.of(o.Token.INVALID_TYPE)),this.set=h;}get serializationType(){return 7}get label(){return this.set}matches(l,h,c){return this.set.contains(l)}toString(){return this.set.toString()}};e([n.NotNull],a.prototype,"set",void 0),e([n.Override],a.prototype,"serializationType",null),e([n.Override,n.NotNull],a.prototype,"label",null),e([n.Override],a.prototype,"matches",null),e([n.Override,n.NotNull],a.prototype,"toString",null),a=e([r(0,n.NotNull),r(1,n.Nullable)],a),t.SetTransition=a;}),q0=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotSetTransition=void 0;var i=ce(),n=B0(),o=class extends n.SetTransition{constructor(a,u){super(a,u);}get serializationType(){return 8}matches(a,u,l){return a>=u&&a<=l&&!super.matches(a,u,l)}toString(){return "~"+super.toString()}};e([i.Override],o.prototype,"serializationType",null),e([i.Override],o.prototype,"matches",null),e([i.Override],o.prototype,"toString",null),o=e([r(0,i.NotNull),r(1,i.Nullable)],o),t.NotSetTransition=o;}),Ra=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleStopState=void 0;var r=Ei(),i=Zt(),n=ce(),o=class extends r.ATNState{get nonStopStateNumber(){return -1}get stateType(){return i.ATNStateType.RULE_STOP}};e([n.Override],o.prototype,"nonStopStateNumber",null),e([n.Override],o.prototype,"stateType",null),t.RuleStopState=o;}),H0=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleTransition=void 0;var i=ce(),n=tn(),o=class extends n.Transition{constructor(a,u,l,h){super(a),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=u,this.precedence=l,this.followState=h;}get serializationType(){return 3}get isEpsilon(){return !0}matches(a,u,l){return !1}};e([i.NotNull],o.prototype,"followState",void 0),e([i.Override],o.prototype,"serializationType",null),e([i.Override],o.prototype,"isEpsilon",null),e([i.Override],o.prototype,"matches",null),o=e([r(0,i.NotNull),r(3,i.NotNull)],o),t.RuleTransition=o;}),_v=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardTransition=void 0;var i=ce(),n=tn(),o=class extends n.Transition{constructor(a){super(a);}get serializationType(){return 9}matches(a,u,l){return a>=u&&a<=l}toString(){return "."}};e([i.Override],o.prototype,"serializationType",null),e([i.Override],o.prototype,"matches",null),e([i.Override,i.NotNull],o.prototype,"toString",null),o=e([r(0,i.NotNull)],o),t.WildcardTransition=o;}),zL=re(t=>{var e=t&&t.__decorate||function(v,g,b,E){var w=arguments.length,D=w<3?g:E===null?E=Object.getOwnPropertyDescriptor(g,b):E,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(v,g,b,E);else for(var F=v.length-1;F>=0;F--)(N=v[F])&&(D=(w<3?N(D):w>3?N(g,b,D):N(g,b))||D);return w>3&&D&&Object.defineProperty(g,b,D),D},r=t&&t.__param||function(v,g){return function(b,E){g(b,E,v);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LL1Analyzer=void 0;var i=O0(),n=rn(),o=Ql(),s=nn(),a=os(),u=ce(),l=q0(),h=Jr(),c=jr(),p=Ra(),f=H0(),m=Ct(),_=_v(),x=class a0{constructor(g){this.atn=g;}getDecisionLookahead(g){if(g==null)return;let b=new Array(g.numberOfTransitions);for(let E=0;E<g.numberOfTransitions;E++){let w=new a.IntervalSet;b[E]=w;let D=new n.Array2DHashSet(h.ObjectEqualityComparator.INSTANCE);this._LOOK(g.transition(E).target,void 0,c.PredictionContext.EMPTY_LOCAL,w,D,new s.BitSet,!1,!1),(w.size===0||w.contains(a0.HIT_PRED))&&(w=void 0,b[E]=w);}return b}LOOK(g,b,E){if(E===void 0){if(g.atn==null)throw new Error("Illegal state");E=g.atn.ruleToStopState[g.ruleIndex];}else E===null&&(E=void 0);let w=new a.IntervalSet;return this._LOOK(g,E,b,w,new n.Array2DHashSet,new s.BitSet,!0,!0),w}_LOOK(g,b,E,w,D,N,F,V){let X=o.ATNConfig.create(g,0,E);if(!D.add(X))return;if(g===b){if(c.PredictionContext.isEmptyLocal(E)){w.add(m.Token.EPSILON);return}else if(E.isEmpty){V&&w.add(m.Token.EOF);return}}if(g instanceof p.RuleStopState){if(E.isEmpty&&!c.PredictionContext.isEmptyLocal(E)){V&&w.add(m.Token.EOF);return}let ae=N.get(g.ruleIndex);try{N.clear(g.ruleIndex);for(let k=0;k<E.size;k++){if(E.getReturnState(k)===c.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let y=this.atn.states[E.getReturnState(k)];this._LOOK(y,b,E.getParent(k),w,D,N,F,V);}}finally{ae&&N.set(g.ruleIndex);}}let te=g.numberOfTransitions;for(let ae=0;ae<te;ae++){let k=g.transition(ae);if(k instanceof f.RuleTransition){if(N.get(k.ruleIndex))continue;let y=E.getChild(k.followState.stateNumber);try{N.set(k.ruleIndex),this._LOOK(k.target,b,y,w,D,N,F,V);}finally{N.clear(k.ruleIndex);}}else if(k instanceof i.AbstractPredicateTransition)F?this._LOOK(k.target,b,E,w,D,N,F,V):w.add(a0.HIT_PRED);else if(k.isEpsilon)this._LOOK(k.target,b,E,w,D,N,F,V);else if(k instanceof _.WildcardTransition)w.addAll(a.IntervalSet.of(m.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else {let y=k.label;y!=null&&(k instanceof l.NotSetTransition&&(y=y.complement(a.IntervalSet.of(m.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),w.addAll(y));}}}};x.HIT_PRED=m.Token.INVALID_TYPE,e([u.NotNull],x.prototype,"atn",void 0),e([u.NotNull,r(0,u.NotNull),r(1,u.NotNull)],x.prototype,"LOOK",null),e([r(0,u.NotNull),r(2,u.NotNull),r(3,u.NotNull),r(4,u.NotNull),r(5,u.NotNull)],x.prototype,"_LOOK",null),x=e([r(0,u.NotNull)],x),t.LL1Analyzer=x;}),ei=re(t=>{var e=t&&t.__decorate||function(m,_,x,v){var g=arguments.length,b=g<3?_:v===null?v=Object.getOwnPropertyDescriptor(_,x):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(m,_,x,v);else for(var w=m.length-1;w>=0;w--)(E=m[w])&&(b=(g<3?E(b):g>3?E(_,x,b):E(_,x))||b);return g>3&&b&&Object.defineProperty(_,x,b),b},r=t&&t.__param||function(m,_){return function(x,v){_(x,v,m);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATN=void 0;var i=ro(),n=dv(),o=os(),s=mv(),a=zL(),u=ce(),l=Jr(),h=jr(),c=Ct(),p=me("assert"),f=class{constructor(_,x){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new i.Array2DHashMap(l.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=_,this.maxTokenType=x;}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let _=0;_<this.decisionToDFA.length;_++)this.decisionToDFA[_]=new n.DFA(this.decisionToState[_],_);this.modeToDFA=new Array(this.modeToStartState.length);for(let _=0;_<this.modeToDFA.length;_++)this.modeToDFA[_]=new n.DFA(this.modeToStartState[_]);this.contextCache.clear(),this.LL1Table.clear();}get contextCacheSize(){return this.contextCache.size}getCachedContext(_){return h.PredictionContext.getCachedContext(_,this.contextCache,new h.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return p(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(_,x){return x?new a.LL1Analyzer(this).LOOK(_,x):(_.nextTokenWithinRule||(_.nextTokenWithinRule=this.nextTokens(_,h.PredictionContext.EMPTY_LOCAL),_.nextTokenWithinRule.setReadonly(!0)),_.nextTokenWithinRule)}addState(_){_.atn=this,_.stateNumber=this.states.length,this.states.push(_);}removeState(_){let x=new s.InvalidState;x.atn=this,x.stateNumber=_.stateNumber,this.states[_.stateNumber]=x;}defineMode(_,x){this.modeNameToStartState.set(_,x),this.modeToStartState.push(x),this.modeToDFA.push(new n.DFA(x)),this.defineDecisionState(x);}defineDecisionState(_){return this.decisionToState.push(_),_.decision=this.decisionToState.length-1,this.decisionToDFA.push(new n.DFA(_,_.decision)),_.decision}getDecisionState(_){if(this.decisionToState.length>0)return this.decisionToState[_]}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(_,x){if(_<0||_>=this.states.length)throw new RangeError("Invalid state number.");let v=x,g=this.states[_],b=this.nextTokens(g);if(!b.contains(c.Token.EPSILON))return b;let E=new o.IntervalSet;for(E.addAll(b),E.remove(c.Token.EPSILON);v!=null&&v.invokingState>=0&&b.contains(c.Token.EPSILON);){let D=this.states[v.invokingState].transition(0);b=this.nextTokens(D.followState),E.addAll(b),E.remove(c.Token.EPSILON),v=v._parent;}return b.contains(c.Token.EPSILON)&&E.add(c.Token.EOF),E}};e([u.NotNull],f.prototype,"states",void 0),e([u.NotNull],f.prototype,"decisionToState",void 0),e([u.NotNull],f.prototype,"modeNameToStartState",void 0),e([u.NotNull],f.prototype,"modeToStartState",void 0),e([u.NotNull],f.prototype,"decisionToDFA",void 0),e([u.NotNull],f.prototype,"modeToDFA",void 0),e([u.NotNull],f.prototype,"nextTokens",null),e([r(0,u.NotNull)],f.prototype,"removeState",null),e([r(0,u.NotNull),r(1,u.NotNull)],f.prototype,"defineMode",null),e([r(0,u.NotNull)],f.prototype,"defineDecisionState",null),e([u.NotNull],f.prototype,"getExpectedTokens",null),f=e([r(0,u.NotNull)],f),t.ATN=f,function(m){m.INVALID_ALT_NUMBER=0;}(f=t.ATN||(t.ATN={})),t.ATN=f;}),KL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerIndexedCustomAction=void 0;var i=Bt(),n=ce(),o=class gv{constructor(a,u){this._offset=a,this._action=u;}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return !0}execute(a){this._action.execute(a);}hashCode(){let a=i.MurmurHash.initialize();return a=i.MurmurHash.update(a,this._offset),a=i.MurmurHash.update(a,this._action),i.MurmurHash.finish(a,2)}equals(a){return a===this?!0:a instanceof gv?this._offset===a._offset&&this._action.equals(a._action):!1}};e([n.NotNull],o.prototype,"action",null),e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),o=e([r(1,n.NotNull)],o),t.LexerIndexedCustomAction=o;}),GL=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerActionExecutor=void 0;var i=Zl(),n=KL(),o=Bt(),s=ce(),a=class Ta{constructor(l){this._lexerActions=l;let h=o.MurmurHash.initialize();for(let c of l)h=o.MurmurHash.update(h,c);this.cachedHashCode=o.MurmurHash.finish(h,l.length);}static append(l,h){if(!l)return new Ta([h]);let c=l._lexerActions.slice(0);return c.push(h),new Ta(c)}fixOffsetBeforeMatch(l){let h;for(let c=0;c<this._lexerActions.length;c++)this._lexerActions[c].isPositionDependent&&!(this._lexerActions[c]instanceof n.LexerIndexedCustomAction)&&(h||(h=this._lexerActions.slice(0)),h[c]=new n.LexerIndexedCustomAction(l,this._lexerActions[c]));return h?new Ta(h):this}get lexerActions(){return this._lexerActions}execute(l,h,c){let p=!1,f=h.index;try{for(let m of this._lexerActions){if(m instanceof n.LexerIndexedCustomAction){let _=m.offset;h.seek(c+_),m=m.action,p=c+_!==f;}else m.isPositionDependent&&(h.seek(f),p=!1);m.execute(l);}}finally{p&&h.seek(f);}}hashCode(){return this.cachedHashCode}equals(l){return l===this?!0:l instanceof Ta?this.cachedHashCode===l.cachedHashCode&&i.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,l._lexerActions):!1}};e([s.NotNull],a.prototype,"_lexerActions",void 0),e([s.NotNull],a.prototype,"lexerActions",null),e([r(0,s.NotNull)],a.prototype,"execute",null),e([s.Override],a.prototype,"hashCode",null),e([s.Override],a.prototype,"equals",null),e([s.NotNull,r(1,s.NotNull)],a,"append",null),a=e([r(0,s.NotNull)],a),t.LexerActionExecutor=a;}),rh=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerNoViableAltException=void 0;var i=en(),n=ce(),o=pr(),s=Qr(),a=class extends i.RecognitionException{constructor(l,h,c,p){super(l,h),this._startIndex=c,this._deadEndConfigs=p;}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let l="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(l=this.inputStream.getText(o.Interval.of(this._startIndex,this._startIndex)),l=s.escapeWhitespace(l,!1)),`LexerNoViableAltException('${l}')`}};e([n.Override],a.prototype,"inputStream",null),e([n.Override],a.prototype,"toString",null),a=e([r(1,n.NotNull)],a),t.LexerNoViableAltException=a;}),WL=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.OrderedATNConfigSet=void 0;var r=Da(),i=ce(),n=class extends r.ATNConfigSet{constructor(o,s){o!=null&&s!=null?super(o,s):super();}clone(o){let s=new n(this,o);return !o&&this.isReadOnly&&s.addAll(this),s}getKey(o){return {state:0,alt:o.hashCode()}}canMerge(o,s,a){return o.equals(a)}};e([i.Override],n.prototype,"clone",null),e([i.Override],n.prototype,"getKey",null),e([i.Override],n.prototype,"canMerge",null),t.OrderedATNConfigSet=n;}),ih=re(t=>{var e=t&&t.__decorate||function(w,D,N,F){var V=arguments.length,X=V<3?D:F===null?F=Object.getOwnPropertyDescriptor(D,N):F,te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(w,D,N,F);else for(var ae=w.length-1;ae>=0;ae--)(te=w[ae])&&(X=(V<3?te(X):V>3?te(D,N,X):te(D,N))||X);return V>3&&X&&Object.defineProperty(D,N,X),X},r=t&&t.__param||function(w,D){return function(N,F){D(N,F,w);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerATNSimulator=void 0;var i=lv(),n=ei(),o=Ql(),s=Da(),a=th(),u=eh(),l=pr(),h=Qi(),c=on(),p=GL(),f=rh(),m=ce(),_=WL(),x=jr(),v=Ra(),g=Ct(),b=me("assert"),E=class Tr extends a.ATNSimulator{constructor(D,N){super(D),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=c.Lexer.DEFAULT_MODE,this.prevAccept=new Tr.SimState,this.recog=N;}copyState(D){this._charPositionInLine=D.charPositionInLine,this._line=D._line,this.mode=D.mode,this.startIndex=D.startIndex;}match(D,N){this.mode=N;let F=D.mark();try{this.startIndex=D.index,this.prevAccept.reset();let V=this.atn.modeToDFA[N].s0;return V==null?this.matchATN(D):this.execATN(D,V)}finally{D.release(F);}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=c.Lexer.DEFAULT_MODE;}matchATN(D){let N=this.atn.modeToStartState[this.mode];Tr.debug&&console.log(`matchATN mode ${this.mode} start: ${N}`);let F=this.mode,V=this.computeStartState(D,N),X=V.hasSemanticContext;X&&(V.hasSemanticContext=!1);let te=this.addDFAState(V);if(!X){let k=this.atn.modeToDFA[this.mode];k.s0?te=k.s0:k.s0=te;}let ae=this.execATN(D,te);return Tr.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[F].toLexerString()}`),ae}execATN(D,N){Tr.debug&&console.log(`start state closure=${N.configs}`),N.isAcceptState&&this.captureSimState(this.prevAccept,D,N);let F=D.LA(1),V=N;for(;;){Tr.debug&&console.log(`execATN loop starting closure: ${V.configs}`);let X=this.getExistingTargetState(V,F);if(X==null&&(X=this.computeTargetState(D,V,F)),X===a.ATNSimulator.ERROR||(F!==h.IntStream.EOF&&this.consume(D),X.isAcceptState&&(this.captureSimState(this.prevAccept,D,X),F===h.IntStream.EOF)))break;F=D.LA(1),V=X;}return this.failOrAccept(this.prevAccept,D,V.configs,F)}getExistingTargetState(D,N){let F=D.getTarget(N);return Tr.debug&&F!=null&&console.log("reuse state "+D.stateNumber+" edge to "+F.stateNumber),F}computeTargetState(D,N,F){let V=new _.OrderedATNConfigSet;return this.getReachableConfigSet(D,N.configs,V,F),V.isEmpty?(V.hasSemanticContext||this.addDFAEdge(N,F,a.ATNSimulator.ERROR),a.ATNSimulator.ERROR):this.addDFAEdge(N,F,V)}failOrAccept(D,N,F,V){if(D.dfaState!=null){let X=D.dfaState.lexerActionExecutor;return this.accept(N,X,this.startIndex,D.index,D.line,D.charPos),D.dfaState.prediction}else {if(V===h.IntStream.EOF&&N.index===this.startIndex)return g.Token.EOF;throw new f.LexerNoViableAltException(this.recog,N,this.startIndex,F)}}getReachableConfigSet(D,N,F,V){let X=n.ATN.INVALID_ALT_NUMBER;for(let te of N){let ae=te.alt===X;if(ae&&te.hasPassedThroughNonGreedyDecision)continue;Tr.debug&&console.log(`testing ${this.getTokenName(V)} at ${te.toString(this.recog,!0)}`);let k=te.state.numberOfOptimizedTransitions;for(let y=0;y<k;y++){let T=te.state.getOptimizedTransition(y),S=this.getReachableTarget(T,V);if(S!=null){let R=te.lexerActionExecutor,L;R!=null?(R=R.fixOffsetBeforeMatch(D.index-this.startIndex),L=te.transform(S,!0,R)):(b(te.lexerActionExecutor==null),L=te.transform(S,!0));let I=V===h.IntStream.EOF;if(this.closure(D,L,F,ae,!0,I)){X=te.alt;break}}}}}accept(D,N,F,V,X,te){Tr.debug&&console.log(`ACTION ${N}`),D.seek(V),this._line=X,this._charPositionInLine=te,N!=null&&this.recog!=null&&N.execute(this.recog,D,F);}getReachableTarget(D,N){if(D.matches(N,c.Lexer.MIN_CHAR_VALUE,c.Lexer.MAX_CHAR_VALUE))return D.target}computeStartState(D,N){let F=x.PredictionContext.EMPTY_FULL,V=new _.OrderedATNConfigSet;for(let X=0;X<N.numberOfTransitions;X++){let te=N.transition(X).target,ae=o.ATNConfig.create(te,X+1,F);this.closure(D,ae,V,!1,!1,!1);}return V}closure(D,N,F,V,X,te){if(Tr.debug&&console.log("closure("+N.toString(this.recog,!0)+")"),N.state instanceof v.RuleStopState){Tr.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[N.state.ruleIndex]} rule stop ${N}`):console.log(`closure at rule stop ${N}`));let k=N.context;if(k.isEmpty)return F.add(N),!0;k.hasEmpty&&(F.add(N.transform(N.state,!0,x.PredictionContext.EMPTY_FULL)),V=!0);for(let y=0;y<k.size;y++){let T=k.getReturnState(y);if(T===x.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let S=k.getParent(y),R=this.atn.states[T],L=N.transform(R,!1,S);V=this.closure(D,L,F,V,X,te);}return V}N.state.onlyHasEpsilonTransitions||(!V||!N.hasPassedThroughNonGreedyDecision)&&F.add(N);let ae=N.state;for(let k=0;k<ae.numberOfOptimizedTransitions;k++){let y=ae.getOptimizedTransition(k),T=this.getEpsilonTarget(D,N,y,F,X,te);T!=null&&(V=this.closure(D,T,F,V,X,te));}return V}getEpsilonTarget(D,N,F,V,X,te){let ae;switch(F.serializationType){case 3:let k=F;if(this.optimize_tail_calls&&k.optimizedTailCall&&!N.context.hasEmpty)ae=N.transform(F.target,!0);else {let T=N.context.getChild(k.followState.stateNumber);ae=N.transform(F.target,!0,T);}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let y=F;Tr.debug&&console.log("EVAL rule "+y.ruleIndex+":"+y.predIndex),V.hasSemanticContext=!0,this.evaluatePredicate(D,y.ruleIndex,y.predIndex,X)?ae=N.transform(F.target,!0):ae=void 0;break;case 6:if(N.context.hasEmpty){let T=p.LexerActionExecutor.append(N.lexerActionExecutor,this.atn.lexerActions[F.actionIndex]);ae=N.transform(F.target,!0,T);break}else {ae=N.transform(F.target,!0);break}case 1:ae=N.transform(F.target,!0);break;case 5:case 2:case 7:if(te&&F.matches(h.IntStream.EOF,c.Lexer.MIN_CHAR_VALUE,c.Lexer.MAX_CHAR_VALUE)){ae=N.transform(F.target,!1);break}ae=void 0;break;default:ae=void 0;break}return ae}evaluatePredicate(D,N,F,V){if(this.recog==null)return !0;if(!V)return this.recog.sempred(void 0,N,F);let X=this._charPositionInLine,te=this._line,ae=D.index,k=D.mark();try{return this.consume(D),this.recog.sempred(void 0,N,F)}finally{this._charPositionInLine=X,this._line=te,D.seek(ae),D.release(k);}}captureSimState(D,N,F){D.index=N.index,D.line=this._line,D.charPos=this._charPositionInLine,D.dfaState=F;}addDFAEdge(D,N,F){if(F instanceof s.ATNConfigSet){let V=F.hasSemanticContext;V&&(F.hasSemanticContext=!1);let X=this.addDFAState(F);return V||this.addDFAEdge(D,N,X),X}else Tr.debug&&console.log("EDGE "+D+" -> "+F+" upon "+String.fromCharCode(N)),D!=null&&D.setTarget(N,F);}addDFAState(D){b(!D.hasSemanticContext);let N=new u.DFAState(D),F=this.atn.modeToDFA[this.mode].states.get(N);if(F!=null)return F;D.optimizeConfigs(this);let V=new u.DFAState(D.clone(!0)),X;for(let te of D)if(te.state instanceof v.RuleStopState){X=te;break}if(X!=null){let te=this.atn.ruleToTokenType[X.state.ruleIndex],ae=X.lexerActionExecutor;V.acceptStateInfo=new i.AcceptStateInfo(te,ae);}return this.atn.modeToDFA[this.mode].addState(V)}getDFA(D){return this.atn.modeToDFA[D]}getText(D){return D.getText(l.Interval.of(this.startIndex,D.index-1))}get line(){return this._line}set line(D){this._line=D;}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(D){this._charPositionInLine=D;}consume(D){D.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,D.consume();}getTokenName(D){return D===-1?"EOF":"'"+String.fromCharCode(D)+"'"}};e([m.NotNull],E.prototype,"prevAccept",void 0),e([r(0,m.NotNull)],E.prototype,"copyState",null),e([r(0,m.NotNull)],E.prototype,"match",null),e([m.Override],E.prototype,"reset",null),e([r(0,m.NotNull)],E.prototype,"matchATN",null),e([r(0,m.NotNull),r(1,m.NotNull)],E.prototype,"execATN",null),e([r(0,m.NotNull)],E.prototype,"getExistingTargetState",null),e([m.NotNull,r(0,m.NotNull),r(1,m.NotNull)],E.prototype,"computeTargetState",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],E.prototype,"getReachableConfigSet",null),e([r(0,m.NotNull)],E.prototype,"accept",null),e([m.NotNull,r(0,m.NotNull),r(1,m.NotNull)],E.prototype,"computeStartState",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],E.prototype,"closure",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull),r(3,m.NotNull)],E.prototype,"getEpsilonTarget",null),e([r(0,m.NotNull)],E.prototype,"evaluatePredicate",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],E.prototype,"captureSimState",null),e([m.NotNull,r(0,m.NotNull)],E.prototype,"addDFAState",null),e([m.NotNull],E.prototype,"getDFA",null),e([m.NotNull,r(0,m.NotNull)],E.prototype,"getText",null),e([r(0,m.NotNull)],E.prototype,"consume",null),e([m.NotNull],E.prototype,"getTokenName",null),E=e([r(0,m.NotNull)],E),t.LexerATNSimulator=E,function(w){w.debug=!1,w.dfa_debug=!1;class D{constructor(){this.index=-1,this.line=0,this.charPos=-1;}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0;}}w.SimState=D;}(E=t.LexerATNSimulator||(t.LexerATNSimulator={})),t.LexerATNSimulator=E;}),on=re(t=>{var e=t&&t.__decorate||function(p,f,m,_){var x=arguments.length,v=x<3?f:_===null?_=Object.getOwnPropertyDescriptor(f,m):_,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(p,f,m,_);else for(var b=p.length-1;b>=0;b--)(g=p[b])&&(v=(x<3?g(v):x>3?g(f,m,v):g(f,m))||v);return x>3&&v&&Object.defineProperty(f,m,v),v};Object.defineProperty(t,"__esModule",{value:!0}),t.Lexer=void 0;var r=P0(),i=uv(),n=pr(),o=Qi(),s=ih(),a=rh(),u=ce(),l=Sa(),h=Ct(),c=class extends l.Recognizer{constructor(p){super(),this._factory=r.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new i.IntegerStack,this._mode=c.DEFAULT_MODE,this._input=p,this._tokenFactorySourcePair={source:this,stream:p};}static get DEFAULT_TOKEN_CHANNEL(){return h.Token.DEFAULT_CHANNEL}static get HIDDEN(){return h.Token.HIDDEN_CHANNEL}reset(p){(p===void 0||p)&&this._input.seek(0),this._token=void 0,this._type=h.Token.INVALID_TYPE,this._channel=h.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=c.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset();}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let p=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=h.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine,this._tokenStartLine=this.interpreter.line,this._text=void 0;do{this._type=h.Token.INVALID_TYPE;let f;try{f=this.interpreter.match(this._input,this._mode);}catch(m){if(m instanceof a.LexerNoViableAltException)this.notifyListeners(m),this.recover(m),f=c.SKIP;else throw m}if(this._input.LA(1)===o.IntStream.EOF&&(this._hitEOF=!0),this._type===h.Token.INVALID_TYPE&&(this._type=f),this._type===c.SKIP)continue e}while(this._type===c.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(p);}}skip(){this._type=c.SKIP;}more(){this._type=c.MORE;}mode(p){this._mode=p;}pushMode(p){s.LexerATNSimulator.debug&&console.log("pushMode "+p),this._modeStack.push(this._mode),this.mode(p);}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return s.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(p){this._factory=p;}get inputStream(){return this._input}set inputStream(p){this.reset(!1),this._input=p,this._tokenFactorySourcePair={source:this,stream:this._input};}get sourceName(){return this._input.sourceName}emit(p){return p||(p=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=p,p}emitEOF(){let p=this.charPositionInLine,f=this.line,m=this._factory.create(this._tokenFactorySourcePair,h.Token.EOF,void 0,h.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,f,p);return this.emit(m),m}get line(){return this.interpreter.line}set line(p){this.interpreter.line=p;}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(p){this.interpreter.charPositionInLine=p;}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(p){this._text=p;}get token(){return this._token}set token(p){this._token=p;}set type(p){this._type=p;}get type(){return this._type}set channel(p){this._channel=p;}get channel(){return this._channel}getAllTokens(){let p=[],f=this.nextToken();for(;f.type!==h.Token.EOF;)p.push(f),f=this.nextToken();return p}notifyListeners(p){let f=this._input.getText(n.Interval.of(this._tokenStartCharIndex,this._input.index)),m="token recognition error at: '"+this.getErrorDisplay(f)+"'",_=this.getErrorListenerDispatch();_.syntaxError&&_.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,m,p);}getErrorDisplay(p){if(typeof p=="number"){switch(p){case h.Token.EOF:return "<EOF>";case 10:return "\\n";case 9:return "\\t";case 13:return "\\r"}return String.fromCharCode(p)}return p.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(p){return "'"+this.getErrorDisplay(p)+"'"}recover(p){p instanceof a.LexerNoViableAltException?this._input.LA(1)!==o.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume();}};c.DEFAULT_MODE=0,c.MORE=-2,c.SKIP=-3,c.MIN_CHAR_VALUE=0,c.MAX_CHAR_VALUE=1114111,e([u.Override],c.prototype,"nextToken",null),e([u.Override],c.prototype,"tokenFactory",null),e([u.Override],c.prototype,"inputStream",null),e([u.Override],c.prototype,"sourceName",null),e([u.Override],c.prototype,"line",null),e([u.Override],c.prototype,"charPositionInLine",null),t.Lexer=c;}),os=re(t=>{var e=t&&t.__decorate||function(c,p,f,m){var _=arguments.length,x=_<3?p:m===null?m=Object.getOwnPropertyDescriptor(p,f):m,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,p,f,m);else for(var g=c.length-1;g>=0;g--)(v=c[g])&&(x=(_<3?v(x):_>3?v(p,f,x):v(p,f))||x);return _>3&&x&&Object.defineProperty(p,f,x),x},r=t&&t.__param||function(c,p){return function(f,m){p(f,m,c);}};Object.defineProperty(t,"__esModule",{value:!0}),t.IntervalSet=void 0;var i=Zl(),n=L0(),o=pr(),s=on(),a=Bt(),u=ce(),l=Ct(),h=class{constructor(c){this.readonly=!1,c!=null?this._intervals=c.slice(0):this._intervals=[];}static get COMPLETE_CHAR_SET(){return h._COMPLETE_CHAR_SET===void 0&&(h._COMPLETE_CHAR_SET=h.of(s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE),h._COMPLETE_CHAR_SET.setReadonly(!0)),h._COMPLETE_CHAR_SET}static get EMPTY_SET(){return h._EMPTY_SET==null&&(h._EMPTY_SET=new h,h._EMPTY_SET.setReadonly(!0)),h._EMPTY_SET}static of(c,p=c){let f=new h;return f.add(c,p),f}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0;}add(c,p=c){this.addRange(o.Interval.of(c,p));}addRange(c){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(c.b<c.a)){for(let p=0;p<this._intervals.length;p++){let f=this._intervals[p];if(c.equals(f))return;if(c.adjacent(f)||!c.disjoint(f)){let m=c.union(f);for(this._intervals[p]=m;p<this._intervals.length-1;){p++;let _=this._intervals[p];if(!m.adjacent(_)&&m.disjoint(_))break;this._intervals.splice(p,1),p--,this._intervals[p]=m.union(_);}return}if(c.startsBeforeDisjoint(f)){this._intervals.splice(p,0,c);return}}this._intervals.push(c);}}static or(c){let p=new h;for(let f of c)p.addAll(f);return p}addAll(c){if(c==null)return this;if(c instanceof h){let p=c,f=p._intervals.length;for(let m=0;m<f;m++){let _=p._intervals[m];this.add(_.a,_.b);}}else for(let p of c.toArray())this.add(p);return this}complementRange(c,p){return this.complement(h.of(c,p))}complement(c){if(c.isNil)return h.EMPTY_SET;let p;return c instanceof h?p=c:(p=new h,p.addAll(c)),p.subtract(this)}subtract(c){if(c==null||c.isNil)return new h(this._intervals);if(c instanceof h)return h.subtract(this,c);let p=new h;return p.addAll(c),h.subtract(this,p)}static subtract(c,p){if(c.isNil)return new h;let f=new h(c._intervals);if(p.isNil)return f;let m=0,_=0;for(;m<f._intervals.length&&_<p._intervals.length;){let x=f._intervals[m],v=p._intervals[_];if(v.b<x.a){_++;continue}if(v.a>x.b){m++;continue}let g,b;if(v.a>x.a&&(g=new o.Interval(x.a,v.a-1)),v.b<x.b&&(b=new o.Interval(v.b+1,x.b)),g)if(b){f._intervals[m]=g,f._intervals.splice(m+1,0,b),m++,_++;continue}else {f._intervals[m]=g,m++;continue}else if(b){f._intervals[m]=b,_++;continue}else {f._intervals.splice(m,1);continue}}return f}or(c){let p=new h;return p.addAll(this),p.addAll(c),p}and(c){if(c.isNil)return new h;let p=this._intervals,f=c._intervals,m,_=p.length,x=f.length,v=0,g=0;for(;v<_&&g<x;){let b=p[v],E=f[g];b.startsBeforeDisjoint(E)?v++:E.startsBeforeDisjoint(b)?g++:b.properlyContains(E)?(m||(m=new h),m.addRange(b.intersection(E)),g++):E.properlyContains(b)?(m||(m=new h),m.addRange(b.intersection(E)),v++):b.disjoint(E)||(m||(m=new h),m.addRange(b.intersection(E)),b.startsAfterNonDisjoint(E)?g++:E.startsAfterNonDisjoint(b)&&v++);}return m||new h}contains(c){let p=this._intervals.length,f=0,m=p-1;for(;f<=m;){let _=f+m>>1,x=this._intervals[_],v=x.a;if(x.b<c)f=_+1;else if(v>c)m=_-1;else return !0}return !1}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[this._intervals.length-1].b}get minElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let c=a.MurmurHash.initialize();for(let p of this._intervals)c=a.MurmurHash.update(c,p.a),c=a.MurmurHash.update(c,p.b);return c=a.MurmurHash.finish(c,this._intervals.length*2),c}equals(c){return c==null||!(c instanceof h)?!1:i.ArrayEqualityComparator.INSTANCE.equals(this._intervals,c._intervals)}toString(c=!1){let p="";if(this._intervals==null||this._intervals.length===0)return "{}";this.size>1&&(p+="{");let f=!0;for(let m of this._intervals){f?f=!1:p+=", ";let _=m.a,x=m.b;_===x?_===l.Token.EOF?p+="<EOF>":c?p+="'"+String.fromCodePoint(_)+"'":p+=_:c?p+="'"+String.fromCodePoint(_)+"'..'"+String.fromCodePoint(x)+"'":p+=_+".."+x;}return this.size>1&&(p+="}"),p}toStringVocabulary(c){if(this._intervals==null||this._intervals.length===0)return "{}";let p="";this.size>1&&(p+="{");let f=!0;for(let m of this._intervals){f?f=!1:p+=", ";let _=m.a,x=m.b;if(_===x)p+=this.elementName(c,_);else for(let v=_;v<=x;v++)v>_&&(p+=", "),p+=this.elementName(c,v);}return this.size>1&&(p+="}"),p}elementName(c,p){return p===l.Token.EOF?"<EOF>":p===l.Token.EPSILON?"<EPSILON>":c.getDisplayName(p)}get size(){let c=0,p=this._intervals.length;if(p===1){let f=this._intervals[0];return f.b-f.a+1}for(let f=0;f<p;f++){let m=this._intervals[f];c+=m.b-m.a+1;}return c}toIntegerList(){let c=new n.IntegerList(this.size),p=this._intervals.length;for(let f=0;f<p;f++){let m=this._intervals[f],_=m.a,x=m.b;for(let v=_;v<=x;v++)c.add(v);}return c}toSet(){let c=new Set;for(let p of this._intervals){let f=p.a,m=p.b;for(let _=f;_<=m;_++)c.add(_);}return c}toArray(){let c=new Array,p=this._intervals.length;for(let f=0;f<p;f++){let m=this._intervals[f],_=m.a,x=m.b;for(let v=_;v<=x;v++)c.push(v);}return c}remove(c){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let p=this._intervals.length;for(let f=0;f<p;f++){let m=this._intervals[f],_=m.a,x=m.b;if(c<_)break;if(c===_&&c===x){this._intervals.splice(f,1);break}if(c===_){this._intervals[f]=o.Interval.of(m.a+1,m.b);break}if(c===x){this._intervals[f]=o.Interval.of(m.a,m.b-1);break}if(c>_&&c<x){let v=m.b;this._intervals[f]=o.Interval.of(m.a,c-1),this.add(c+1,v);}}}get isReadonly(){return this.readonly}setReadonly(c){if(this.readonly&&!c)throw new Error("can't alter readonly IntervalSet");this.readonly=c;}};e([u.Override],h.prototype,"addAll",null),e([u.Override],h.prototype,"complement",null),e([u.Override],h.prototype,"subtract",null),e([u.Override],h.prototype,"or",null),e([u.Override],h.prototype,"and",null),e([u.Override],h.prototype,"contains",null),e([u.Override],h.prototype,"isNil",null),e([u.Override],h.prototype,"hashCode",null),e([u.Override],h.prototype,"equals",null),e([r(0,u.NotNull)],h.prototype,"toStringVocabulary",null),e([u.NotNull,r(0,u.NotNull)],h.prototype,"elementName",null),e([u.Override],h.prototype,"size",null),e([u.Override],h.prototype,"remove",null),e([u.NotNull],h,"of",null),e([u.NotNull],h,"subtract",null),t.IntervalSet=h;}),yv=re(t=>{var e=t&&t.__decorate||function(n,o,s,a){var u=arguments.length,l=u<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,o,s,a);else for(var c=n.length-1;c>=0;c--)(h=n[c])&&(l=(u<3?h(l):u>3?h(o,s,l):h(o,s))||l);return u>3&&l&&Object.defineProperty(o,s,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNDeserializationOptions=void 0;var r=ce(),i=class{constructor(n){this.readOnly=!1,n?(this.verifyATN=n.verifyATN,this.generateRuleBypassTransitions=n.generateRuleBypassTransitions,this.optimize=n.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0);}static get defaultOptions(){return i._defaultOptions==null&&(i._defaultOptions=new i,i._defaultOptions.makeReadOnly()),i._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0;}get isVerifyATN(){return this.verifyATN}set isVerifyATN(n){this.throwIfReadOnly(),this.verifyATN=n;}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(n){this.throwIfReadOnly(),this.generateRuleBypassTransitions=n;}get isOptimize(){return this.optimize}set isOptimize(n){this.throwIfReadOnly(),this.optimize=n;}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};e([r.NotNull],i,"defaultOptions",null),t.ATNDeserializationOptions=i;}),xv=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTransition=void 0;var i=ce(),n=tn(),o=class extends n.Transition{constructor(a,u,l=-1,h=!1){super(a),this.ruleIndex=u,this.actionIndex=l,this.isCtxDependent=h;}get serializationType(){return 6}get isEpsilon(){return !0}matches(a,u,l){return !1}toString(){return "action_"+this.ruleIndex+":"+this.actionIndex}};e([i.Override],o.prototype,"serializationType",null),e([i.Override],o.prototype,"isEpsilon",null),e([i.Override],o.prototype,"matches",null),e([i.Override],o.prototype,"toString",null),o=e([r(0,i.NotNull)],o),t.ActionTransition=o;}),vv=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AtomTransition=void 0;var i=os(),n=ce(),o=tn(),s=class extends o.Transition{constructor(u,l){super(u),this._label=l;}get serializationType(){return 5}get label(){return i.IntervalSet.of(this._label)}matches(u,l,h){return this._label===u}toString(){return String(this.label)}};e([n.Override],s.prototype,"serializationType",null),e([n.Override,n.NotNull],s.prototype,"label",null),e([n.Override],s.prototype,"matches",null),e([n.Override,n.NotNull],s.prototype,"toString",null),s=e([r(0,n.NotNull)],s),t.AtomTransition=s;}),nh=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BlockStartState=void 0;var e=ss(),r=class extends e.DecisionState{};t.BlockStartState=r;}),YL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BasicBlockStartState=void 0;var r=Zt(),i=nh(),n=ce(),o=class extends i.BlockStartState{get stateType(){return r.ATNStateType.BLOCK_START}};e([n.Override],o.prototype,"stateType",null),t.BasicBlockStartState=o;}),ZL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockEndState=void 0;var r=Ei(),i=Zt(),n=ce(),o=class extends r.ATNState{get stateType(){return i.ATNStateType.BLOCK_END}};e([n.Override],o.prototype,"stateType",null),t.BlockEndState=o;}),XL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.EpsilonTransition=void 0;var i=ce(),n=tn(),o=class extends n.Transition{constructor(a,u=-1){super(a),this._outermostPrecedenceReturn=u;}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return !0}matches(a,u,l){return !1}toString(){return "epsilon"}};e([i.Override],o.prototype,"serializationType",null),e([i.Override],o.prototype,"isEpsilon",null),e([i.Override],o.prototype,"matches",null),e([i.Override,i.NotNull],o.prototype,"toString",null),o=e([r(0,i.NotNull)],o),t.EpsilonTransition=o;}),JL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerChannelAction=void 0;var i=Bt(),n=ce(),o=class{constructor(s){this._channel=s;}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return !1}execute(s){s.channel=this._channel;}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),s=i.MurmurHash.update(s,this._channel),i.MurmurHash.finish(s,2)}equals(s){return s===this?!0:s instanceof o?this._channel===s._channel:!1}toString(){return `channel(${this._channel})`}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),e([n.Override],o.prototype,"toString",null),t.LexerChannelAction=o;}),QL=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerCustomAction=void 0;var i=Bt(),n=ce(),o=class{constructor(s,a){this._ruleIndex=s,this._actionIndex=a;}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return !0}execute(s){s.action(void 0,this._ruleIndex,this._actionIndex);}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),s=i.MurmurHash.update(s,this._ruleIndex),s=i.MurmurHash.update(s,this._actionIndex),i.MurmurHash.finish(s,3)}equals(s){return s===this?!0:s instanceof o?this._ruleIndex===s._ruleIndex&&this._actionIndex===s._actionIndex:!1}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),t.LexerCustomAction=o;}),e7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerModeAction=void 0;var i=Bt(),n=ce(),o=class{constructor(s){this._mode=s;}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return !1}execute(s){s.mode(this._mode);}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),s=i.MurmurHash.update(s,this._mode),i.MurmurHash.finish(s,2)}equals(s){return s===this?!0:s instanceof o?this._mode===s._mode:!1}toString(){return `mode(${this._mode})`}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),e([n.Override],o.prototype,"toString",null),t.LexerModeAction=o;}),t7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerMoreAction=void 0;var i=Bt(),n=ce(),o=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return !1}execute(s){s.more();}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),i.MurmurHash.finish(s,1)}equals(s){return s===this}toString(){return "more"}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),e([n.Override],o.prototype,"toString",null),t.LexerMoreAction=o,function(s){s.INSTANCE=new s;}(o=t.LexerMoreAction||(t.LexerMoreAction={}));}),r7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerPopModeAction=void 0;var i=Bt(),n=ce(),o=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return !1}execute(s){s.popMode();}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),i.MurmurHash.finish(s,1)}equals(s){return s===this}toString(){return "popMode"}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),e([n.Override],o.prototype,"toString",null),t.LexerPopModeAction=o,function(s){s.INSTANCE=new s;}(o=t.LexerPopModeAction||(t.LexerPopModeAction={}));}),i7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerPushModeAction=void 0;var i=Bt(),n=ce(),o=class{constructor(s){this._mode=s;}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return !1}execute(s){s.pushMode(this._mode);}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),s=i.MurmurHash.update(s,this._mode),i.MurmurHash.finish(s,2)}equals(s){return s===this?!0:s instanceof o?this._mode===s._mode:!1}toString(){return `pushMode(${this._mode})`}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),e([n.Override],o.prototype,"toString",null),t.LexerPushModeAction=o;}),n7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerSkipAction=void 0;var i=Bt(),n=ce(),o=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return !1}execute(s){s.skip();}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),i.MurmurHash.finish(s,1)}equals(s){return s===this}toString(){return "skip"}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),e([n.Override],o.prototype,"toString",null),t.LexerSkipAction=o,function(s){s.INSTANCE=new s;}(o=t.LexerSkipAction||(t.LexerSkipAction={}));}),s7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerTypeAction=void 0;var i=Bt(),n=ce(),o=class{constructor(s){this._type=s;}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return !1}execute(s){s.type=this._type;}hashCode(){let s=i.MurmurHash.initialize();return s=i.MurmurHash.update(s,this.actionType),s=i.MurmurHash.update(s,this._type),i.MurmurHash.finish(s,2)}equals(s){return s===this?!0:s instanceof o?this._type===s._type:!1}toString(){return `type(${this._type})`}};e([n.Override],o.prototype,"actionType",null),e([n.Override],o.prototype,"isPositionDependent",null),e([n.Override,r(0,n.NotNull)],o.prototype,"execute",null),e([n.Override],o.prototype,"hashCode",null),e([n.Override],o.prototype,"equals",null),e([n.Override],o.prototype,"toString",null),t.LexerTypeAction=o;}),Ev=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.LoopEndState=void 0;var r=Ei(),i=Zt(),n=ce(),o=class extends r.ATNState{get stateType(){return i.ATNStateType.LOOP_END}};e([n.Override],o.prototype,"stateType",null),t.LoopEndState=o;}),o7=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ConflictInfo=void 0;var r=ce(),i=Qr(),n=class{constructor(o,s){this._conflictedAlts=o,this.exact=s;}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(o){return o===this?!0:o instanceof n?this.isExact===o.isExact&&i.equals(this.conflictedAlts,o.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};e([r.Override],n.prototype,"equals",null),e([r.Override],n.prototype,"hashCode",null),t.ConflictInfo=n;}),io=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNode=void 0;var r=pr(),i=ce(),n=Ct(),o=class{constructor(s){this._symbol=s;}getChild(s){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(s){this._parent=s;}get payload(){return this._symbol}get sourceInterval(){let s=this._symbol.tokenIndex;return new r.Interval(s,s)}get childCount(){return 0}accept(s){return s.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(s){return this.toString()}toString(){return this._symbol.type===n.Token.EOF?"<EOF>":this._symbol.text||""}};e([i.Override],o.prototype,"getChild",null),e([i.Override],o.prototype,"parent",null),e([i.Override],o.prototype,"setParent",null),e([i.Override],o.prototype,"payload",null),e([i.Override],o.prototype,"sourceInterval",null),e([i.Override],o.prototype,"childCount",null),e([i.Override],o.prototype,"accept",null),e([i.Override],o.prototype,"text",null),e([i.Override],o.prototype,"toStringTree",null),e([i.Override],o.prototype,"toString",null),t.TerminalNode=o;}),sh=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorNode=void 0;var r=ce(),i=io(),n=class extends i.TerminalNode{constructor(o){super(o);}accept(o){return o.visitErrorNode(this)}};e([r.Override],n.prototype,"accept",null),t.ErrorNode=n;}),j0=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleNode=void 0;var e=class{};t.RuleNode=e;}),as=re(t=>{var e=t&&t.__decorate||function(m,_,x,v){var g=arguments.length,b=g<3?_:v===null?v=Object.getOwnPropertyDescriptor(_,x):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(m,_,x,v);else for(var w=m.length-1;w>=0;w--)(E=m[w])&&(b=(g<3?E(b):g>3?E(_,x,b):E(_,x))||b);return g>3&&b&&Object.defineProperty(_,x,b),b},r=t&&t.__param||function(m,_){return function(x,v){_(x,v,m);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Trees=void 0;var i=ei(),n=wa(),o=sh(),s=ce(),a=Fa(),u=Ur(),l=j0(),h=io(),c=Ct(),p=Qr(),f=class{static toStringTree(m,_){let x;_ instanceof a.Parser?x=_.ruleNames:x=_;let v=p.escapeWhitespace(this.getNodeText(m,x),!1);if(m.childCount===0)return v;let g="";g+="(",v=p.escapeWhitespace(this.getNodeText(m,x),!1),g+=v,g+=" ";for(let b=0;b<m.childCount;b++)b>0&&(g+=" "),g+=this.toStringTree(m.getChild(b),x);return g+=")",g}static getNodeText(m,_){let x;if(_ instanceof a.Parser)x=_.ruleNames;else if(_)x=_;else {let v=m.payload;return typeof v.text=="string"?v.text:m.payload.toString()}if(m instanceof l.RuleNode){let v=m.ruleContext,g=v.ruleIndex,b=x[g],E=v.altNumber;return E!==i.ATN.INVALID_ALT_NUMBER?b+":"+E:b}else {if(m instanceof o.ErrorNode)return m.toString();if(m instanceof h.TerminalNode)return m.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(m){let _=[];for(let x=0;x<m.childCount;x++)_.push(m.getChild(x));return _}static getAncestors(m){let _=[],x=m.parent;for(;x;)_.unshift(x),x=x.parent;return _}static isAncestorOf(m,_){if(!m||!_||!m.parent)return !1;let x=_.parent;for(;x;){if(m===x)return !0;x=x.parent;}return !1}static findAllTokenNodes(m,_){return f.findAllNodes(m,_,!0)}static findAllRuleNodes(m,_){return f.findAllNodes(m,_,!1)}static findAllNodes(m,_,x){let v=[];return f._findAllNodes(m,_,x,v),v}static _findAllNodes(m,_,x,v){x&&m instanceof h.TerminalNode?m.symbol.type===_&&v.push(m):!x&&m instanceof u.ParserRuleContext&&m.ruleIndex===_&&v.push(m);for(let g=0;g<m.childCount;g++)f._findAllNodes(m.getChild(g),_,x,v);}static getDescendants(m){let _=[];function x(v){_.push(v);let g=v.childCount;for(let b=0;b<g;b++)x(v.getChild(b));}return x(m),_}static getRootOfSubtreeEnclosingRegion(m,_,x){let v=m.childCount;for(let g=0;g<v;g++){let b=m.getChild(g),E=f.getRootOfSubtreeEnclosingRegion(b,_,x);if(E)return E}if(m instanceof u.ParserRuleContext){let g=m.stop;if(_>=m.start.tokenIndex&&(g==null||x<=g.tokenIndex))return m}}static stripChildrenOutOfRange(m,_,x,v){if(!m)return;let g=m.childCount;for(let b=0;b<g;b++){let E=m.getChild(b),w=E.sourceInterval;if(E instanceof u.ParserRuleContext&&(w.b<x||w.a>v)&&f.isAncestorOf(E,_)){let D=new n.CommonToken(c.Token.INVALID_TYPE,"...");m.children[b]=new h.TerminalNode(D);}}}static findNodeSuchThat(m,_){if(_(m))return m;let x=m.childCount;for(let v=0;v<x;v++){let g=f.findNodeSuchThat(m.getChild(v),_);if(g!==void 0)return g}}};e([r(0,s.NotNull)],f,"toStringTree",null),e([s.NotNull,r(0,s.NotNull)],f,"getAncestors",null),e([r(0,s.NotNull)],f,"getRootOfSubtreeEnclosingRegion",null),t.Trees=f;}),bv=re(t=>{var e=t&&t.__decorate||function(h,c,p,f){var m=arguments.length,_=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,p):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(h,c,p,f);else for(var v=h.length-1;v>=0;v--)(x=h[v])&&(_=(m<3?x(_):m>3?x(c,p,_):x(c,p))||_);return m>3&&_&&Object.defineProperty(c,p,_),_};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleContext=void 0;var r=ei(),i=Sa(),n=j0(),o=pr(),s=ce(),a=as(),u=Ur(),l=class extends n.RuleNode{constructor(h,c){super(),this._parent=h,this.invokingState=c!=null?c:-1;}static getChildContext(h,c){return new l(h,c)}depth(){let h=0,c=this;for(;c;)c=c._parent,h++;return h}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return o.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(h){this._parent=h;}get payload(){return this}get text(){if(this.childCount===0)return "";let h="";for(let c=0;c<this.childCount;c++)h+=this.getChild(c).text;return h.toString()}get ruleIndex(){return -1}get altNumber(){return r.ATN.INVALID_ALT_NUMBER}set altNumber(h){}getChild(h){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(h){return h.visitChildren(this)}toStringTree(h){return a.Trees.toStringTree(this,h)}toString(h,c){let p=h instanceof i.Recognizer?h.ruleNames:h;c=c||u.ParserRuleContext.emptyContext();let f="",m=this;for(f+="[";m&&m!==c;){if(!p)m.isEmpty||(f+=m.invokingState);else {let _=m.ruleIndex,x=_>=0&&_<p.length?p[_]:_.toString();f+=x;}m._parent&&(p||!m._parent.isEmpty)&&(f+=" "),m=m._parent;}return f+="]",f.toString()}};e([s.Override],l.prototype,"sourceInterval",null),e([s.Override],l.prototype,"ruleContext",null),e([s.Override],l.prototype,"parent",null),e([s.Override],l.prototype,"setParent",null),e([s.Override],l.prototype,"payload",null),e([s.Override],l.prototype,"text",null),e([s.Override],l.prototype,"getChild",null),e([s.Override],l.prototype,"childCount",null),e([s.Override],l.prototype,"accept",null),e([s.Override],l.prototype,"toStringTree",null),t.RuleContext=l;}),Ur=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserRuleContext=void 0;var r=sh(),i=pr(),n=ce(),o=bv(),s=io(),a=class extends o.RuleContext{constructor(u,l){l==null?super():super(u,l);}static emptyContext(){return a.EMPTY}copyFrom(u){if(this._parent=u._parent,this.invokingState=u.invokingState,this._start=u._start,this._stop=u._stop,u.children){this.children=[];for(let l of u.children)l instanceof r.ErrorNode&&this.addChild(l);}}enterRule(u){}exitRule(u){}addAnyChild(u){return this.children?this.children.push(u):this.children=[u],u}addChild(u){if(u instanceof s.TerminalNode){u.setParent(this),this.addAnyChild(u);return}else if(u instanceof o.RuleContext){this.addAnyChild(u);return}else return u=new s.TerminalNode(u),this.addAnyChild(u),u.setParent(this),u}addErrorNode(u){if(u instanceof r.ErrorNode){let l=u;return l.setParent(this),this.addAnyChild(l)}else {let l=u,h=new r.ErrorNode(l);return this.addAnyChild(h),h.setParent(this),h}}removeLastChild(){this.children&&this.children.pop();}get parent(){let u=super.parent;if(u===void 0||u instanceof a)return u;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(u,l){if(!this.children||u<0||u>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(l==null)return this.children[u];let h=this.tryGetChild(u,l);if(h===void 0)throw new Error("The specified node does not exist");return h}tryGetChild(u,l){if(!this.children||u<0||u>=this.children.length)return;let h=-1;for(let c of this.children)if(c instanceof l&&(h++,h===u))return c}getToken(u,l){let h=this.tryGetToken(u,l);if(h===void 0)throw new Error("The specified token does not exist");return h}tryGetToken(u,l){if(!this.children||l<0||l>=this.children.length)return;let h=-1;for(let c of this.children)if(c instanceof s.TerminalNode&&c.symbol.type===u&&(h++,h===l))return c}getTokens(u){let l=[];if(!this.children)return l;for(let h of this.children)h instanceof s.TerminalNode&&h.symbol.type===u&&l.push(h);return l}get ruleContext(){return this}getRuleContext(u,l){return this.getChild(u,l)}tryGetRuleContext(u,l){return this.tryGetChild(u,l)}getRuleContexts(u){let l=[];if(!this.children)return l;for(let h of this.children)h instanceof u&&l.push(h);return l}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?i.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):i.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):i.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(u){return "ParserRuleContext"+u.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};a.EMPTY=new a,e([n.Override],a.prototype,"parent",null),e([n.Override],a.prototype,"childCount",null),e([n.Override],a.prototype,"sourceInterval",null),t.ParserRuleContext=a;}),a7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionMode=void 0;var r=ro(),i=Bt(),n=ce(),o=Ra();((function(a){a[a.SLL=0]="SLL",a[a.LL=1]="LL",a[a.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION";}))(t.PredictionMode||(t.PredictionMode={})),function(a){class u extends r.Array2DHashMap{constructor(){super(l.INSTANCE);}}class l{AltAndContextConfigEqualityComparator(){}hashCode(f){let m=i.MurmurHash.initialize(7);return m=i.MurmurHash.update(m,f.state.stateNumber),m=i.MurmurHash.update(m,f.context),m=i.MurmurHash.finish(m,2),m}equals(f,m){return f===m?!0:f==null||m==null?!1:f.state.stateNumber===m.state.stateNumber&&f.context.equals(m.context)}}l.INSTANCE=new l,e([n.Override],l.prototype,"hashCode",null),e([n.Override],l.prototype,"equals",null);function h(p){for(let f of p)if(f.state instanceof o.RuleStopState)return !0;return !1}a.hasConfigInRuleStopState=h;function c(p){for(let f of p)if(!(f.state instanceof o.RuleStopState))return !1;return !0}a.allConfigsInRuleStopStates=c;}(t.PredictionMode||(t.PredictionMode={}));}),Tv=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SimulatorState=void 0;var i=ce(),n=Ur(),o=class{constructor(a,u,l,h){this.outerContext=a!=null?a:n.ParserRuleContext.emptyContext(),this.s0=u,this.useContext=l,this.remainingOuterContext=h;}};o=e([r(1,i.NotNull)],o),t.SimulatorState=o;}),Na=re(t=>{var e=t&&t.__decorate||function(H,B,C,P){var j=arguments.length,$=j<3?B:P===null?P=Object.getOwnPropertyDescriptor(B,C):P,G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(H,B,C,P);else for(var oe=H.length-1;oe>=0;oe--)(G=H[oe])&&($=(j<3?G($):j>3?G(B,C,$):G(B,C))||$);return j>3&&$&&Object.defineProperty(B,C,$),$},r=t&&t.__param||function(H,B){return function(C,P){B(C,P,H);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserATNSimulator=void 0;var i=lv(),n=xv(),o=rn(),s=F0(),a=ei(),u=Ql(),l=Da(),h=th(),c=Zt(),p=vv(),f=nn(),m=o7(),_=ss(),x=eh(),v=L0(),g=pr(),b=Qi(),E=ce(),w=q0(),D=ah(),N=Jr(),F=Ur(),V=jr(),X=I0(),te=a7(),ae=Ra(),k=H0(),y=to(),T=B0(),S=Tv(),R=Ct(),L=sn(),I=me("assert"),K=65535,q=-(1<<31>>>0),A=class qe extends h.ATNSimulator{constructor(B,C){super(B),this.predictionMode=te.PredictionMode.LL,this.force_global_context=!1,this.always_try_local_context=!0,this.enable_global_context_dfa=!1,this.optimize_unique_closure=!0,this.optimize_ll1=!0,this.optimize_tail_calls=!0,this.tail_call_preserves_sll=!0,this.treat_sllk1_conflict_as_ambiguity=!1,this.reportAmbiguities=!1,this.userWantsCtxSensitive=!0,this._parser=C;}getPredictionMode(){return this.predictionMode}setPredictionMode(B){this.predictionMode=B;}reset(){}adaptivePredict(B,C,P,j){j===void 0&&(j=!1);let $=this.atn.decisionToDFA[C];if(I($!=null),this.optimize_ll1&&!$.isPrecedenceDfa&&!$.isEmpty){let J=B.LA(1);if(J>=0&&J<=65535){let ee=(C<<16>>>0)+J,U=this.atn.LL1Table.get(ee);if(U!=null)return U}}this.dfa=$,this.force_global_context?j=!0:this.always_try_local_context||(j=j||$.isContextSensitive),this.userWantsCtxSensitive=j||this.predictionMode!==te.PredictionMode.SLL&&P!=null&&!this.atn.decisionToState[C].sll,P==null&&(P=F.ParserRuleContext.emptyContext());let G;$.isEmpty||(G=this.getStartState($,B,P,j)),G==null&&(P==null&&(P=F.ParserRuleContext.emptyContext()),qe.debug&&console.log("ATN decision "+$.decision+" exec LA(1)=="+this.getLookaheadName(B)+", outerContext="+P.toString(this._parser)),G=this.computeStartState($,P,j));let oe=B.mark(),se=B.index;try{let J=this.execDFA($,B,se,G);return qe.debug&&console.log("DFA after predictATN: "+$.toString(this._parser.vocabulary,this._parser.ruleNames)),J}finally{this.dfa=void 0,B.seek(se),B.release(oe);}}getStartState(B,C,P,j){if(!j)if(B.isPrecedenceDfa){let oe=B.getPrecedenceStartState(this._parser.precedence,!1);return oe==null?void 0:new S.SimulatorState(P,oe,!1,P)}else return B.s0==null?void 0:new S.SimulatorState(P,B.s0,!1,P);if(!this.enable_global_context_dfa)return;let $=P;I(P!=null);let G;for(B.isPrecedenceDfa?G=B.getPrecedenceStartState(this._parser.precedence,!0):G=B.s0full;$!=null&&G!=null&&G.isContextSensitive;)$=this.skipTailCalls($),G=G.getContextTarget(this.getReturnState($)),$.isEmpty?I(G==null||!G.isContextSensitive):$=$.parent;if(G!=null)return new S.SimulatorState(P,G,j,$)}execDFA(B,C,P,j){let $=j.outerContext;qe.dfa_debug&&console.log("DFA decision "+B.decision+" exec LA(1)=="+this.getLookaheadName(C)+", outerContext="+$.toString(this._parser)),qe.dfa_debug&&console.log(B.toString(this._parser.vocabulary,this._parser.ruleNames));let G=j.s0,oe=C.LA(1),se=j.remainingOuterContext;for(;;){if(qe.dfa_debug&&console.log("DFA state "+G.stateNumber+" LA(1)=="+this.getLookaheadName(C)),j.useContext)for(;G.isContextSymbol(oe);){let U;if(se!=null&&(se=this.skipTailCalls(se),U=G.getContextTarget(this.getReturnState(se))),U==null){let M=new S.SimulatorState(j.outerContext,G,j.useContext,se);return this.execATN(B,C,P,M)}I(se!=null),se=se.parent,G=U;}if(this.isAcceptState(G,j.useContext)){G.predicates!=null?qe.dfa_debug&&console.log("accept "+G):qe.dfa_debug&&console.log("accept; predict "+G.prediction+" in state "+G.stateNumber);break}I(!this.isAcceptState(G,j.useContext));let ee=this.getExistingTargetState(G,oe);if(ee==null){qe.dfa_debug&&oe>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(oe));let U;if(qe.dfa_debug){let Z=g.Interval.of(P,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(Z)+" at DFA state "+G.stateNumber);}let M=new S.SimulatorState($,G,j.useContext,se);return U=this.execATN(B,C,P,M),qe.dfa_debug&&console.log("back from DFA update, alt="+U+`, dfa=
|
|
69
|
+
`+B.toString(this._parser.vocabulary,this._parser.ruleNames)),qe.dfa_debug&&console.log("DFA decision "+B.decision+" predicts "+U),U}else if(ee===h.ATNSimulator.ERROR){let U=new S.SimulatorState($,G,j.useContext,se);return this.handleNoViableAlt(C,P,U)}G=ee,!this.isAcceptState(G,j.useContext)&&oe!==b.IntStream.EOF&&(C.consume(),oe=C.LA(1));}if(!j.useContext&&G.configs.conflictInfo!=null&&B.atnStartState instanceof _.DecisionState&&!(!this.userWantsCtxSensitive||!G.configs.dipsIntoOuterContext&&G.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&C.index===P)){I(!j.useContext);let ee,U=G.predicates;if(U!=null){let M=C.index;if(M!==P&&C.seek(P),ee=this.evalSemanticContext(U,$,!0),ee.cardinality()===1)return ee.nextSetBit(0);M!==P&&C.seek(M);}if(this.reportAmbiguities){let M=new S.SimulatorState($,G,j.useContext,se);this.reportAttemptingFullContext(B,ee,M,P,C.index);}return C.seek(P),this.adaptivePredict(C,B.decision,$,!0)}let J=G.predicates;if(J!=null){let ee=C.index;P!==ee&&C.seek(P);let U=this.evalSemanticContext(J,$,this.reportAmbiguities&&this.predictionMode===te.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(U.cardinality()){case 0:throw this.noViableAlt(C,$,G.configs,P);case 1:return U.nextSetBit(0);default:return P!==ee&&C.seek(ee),this.reportAmbiguity(B,G,P,ee,G.configs.isExactConflict,U,G.configs),U.nextSetBit(0)}}return qe.dfa_debug&&console.log("DFA decision "+B.decision+" predicts "+G.prediction),G.prediction}isAcceptState(B,C){return B.isAcceptState?B.configs.conflictingAlts==null?!0:C&&this.predictionMode===te.PredictionMode.LL_EXACT_AMBIG_DETECTION?B.configs.isExactConflict:!0:!1}execATN(B,C,P,j){qe.debug&&console.log("execATN decision "+B.decision+" exec LA(1)=="+this.getLookaheadName(C));let $=j.outerContext,G=j.useContext,oe=C.LA(1),se=j,J=new X.PredictionContextCache;for(;;){let ee=this.computeReachSet(B,se,oe,J);if(ee==null)return this.setDFAEdge(se.s0,C.LA(1),h.ATNSimulator.ERROR),this.handleNoViableAlt(C,P,se);let U=ee.s0;if(I(U.isAcceptState||U.prediction===a.ATN.INVALID_ALT_NUMBER),I(U.isAcceptState||U.configs.conflictInfo==null),this.isAcceptState(U,G)){let M=U.configs.conflictingAlts,Z=M==null?U.prediction:a.ATN.INVALID_ALT_NUMBER;if(Z!==a.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&C.index===P&&!B.isPrecedenceDfa&&ee.outerContext===ee.remainingOuterContext&&B.decision>=0&&!U.configs.hasSemanticContext&&oe>=0&&oe<=K){let ne=(B.decision<<16>>>0)+oe;this.atn.LL1Table.set(ne,Z);}G&&this.always_try_local_context&&this.reportContextSensitivity(B,Z,ee,P,C.index);}Z=U.prediction;let W=M!=null&&this.userWantsCtxSensitive;if(W&&(W=!G&&(U.configs.dipsIntoOuterContext||!U.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||C.index!==P)),U.configs.hasSemanticContext){let ne=U.predicates;if(ne!=null){let le=C.index;switch(le!==P&&C.seek(P),M=this.evalSemanticContext(ne,$,W||this.reportAmbiguities),M.cardinality()){case 0:throw this.noViableAlt(C,$,U.configs,P);case 1:return M.nextSetBit(0);}le!==P&&C.seek(le);}}if(W){I(!G),I(this.isAcceptState(U,!1)),qe.debug&&console.log("RETRY with outerContext="+$);let ne=this.computeStartState(B,$,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(B,M,ee,P,C.index),C.seek(P),this.execATN(B,C,P,ne)}else return M!=null&&(this.reportAmbiguities&&M.cardinality()>1&&this.reportAmbiguity(B,U,P,C.index,U.configs.isExactConflict,M,U.configs),Z=M.nextSetBit(0)),Z}se=ee,oe!==b.IntStream.EOF&&(C.consume(),oe=C.LA(1));}}handleNoViableAlt(B,C,P){if(P.s0!=null){let j=new f.BitSet,$=0;for(let G of P.s0.configs)(G.reachesIntoOuterContext||G.state instanceof ae.RuleStopState)&&(j.set(G.alt),$=Math.max($,G.alt));switch(j.cardinality()){case 0:break;case 1:return j.nextSetBit(0);default:if(!P.s0.configs.hasSemanticContext)return j.nextSetBit(0);let G=new l.ATNConfigSet;for(let se of P.s0.configs)(se.reachesIntoOuterContext||se.state instanceof ae.RuleStopState)&&G.add(se);let oe=this.getPredsForAmbigAlts(j,G,$);if(oe!=null){let se=this.getPredicatePredictions(j,oe);if(se!=null){let J=B.index;try{B.seek(C);let ee=this.evalSemanticContext(se,P.outerContext,!1);if(!ee.isEmpty)return ee.nextSetBit(0)}finally{B.seek(J);}}}return j.nextSetBit(0)}}throw this.noViableAlt(B,P.outerContext,P.s0.configs,C)}computeReachSet(B,C,P,j){let $=C.useContext,G=C.remainingOuterContext,oe=C.s0;if($)for(;oe.isContextSymbol(P);){let ee;if(G!=null&&(G=this.skipTailCalls(G),ee=oe.getContextTarget(this.getReturnState(G))),ee==null)break;I(G!=null),G=G.parent,oe=ee;}if(I(!this.isAcceptState(oe,$)),this.isAcceptState(oe,$))return new S.SimulatorState(C.outerContext,oe,$,G);let se=oe,J=this.getExistingTargetState(se,P);if(J==null){let ee=this.computeTargetState(B,se,G,P,$,j);J=ee[0],G=ee[1];}if(J!==h.ATNSimulator.ERROR)return I(!$||!J.configs.dipsIntoOuterContext),new S.SimulatorState(C.outerContext,J,$,G)}getExistingTargetState(B,C){return B.getTarget(C)}computeTargetState(B,C,P,j,$,G){let oe=C.configs.toArray(),se,J=new l.ATNConfigSet,ee;do{let M=!$||P!=null;M||(J.isOutermostConfigSet=!0);let Z=new l.ATNConfigSet,W;for(let Q of oe){if(qe.debug&&console.log("testing "+this.getTokenName(j)+" at "+Q.toString()),Q.state instanceof ae.RuleStopState){I(Q.context.isEmpty),($&&!Q.reachesIntoOuterContext||j===b.IntStream.EOF)&&(W==null&&(W=[]),W.push(Q));continue}let _e=Q.state.numberOfOptimizedTransitions;for(let De=0;De<_e;De++){let ge=Q.state.getOptimizedTransition(De),be=this.getReachableTarget(Q,ge,j);be!=null&&Z.add(Q.transform(be,!1),G);}}if(this.optimize_unique_closure&&W==null&&j!==R.Token.EOF&&Z.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER){Z.isOutermostConfigSet=J.isOutermostConfigSet,J=Z;break}let ne=!1,le=j===R.Token.EOF;if(this.closure(Z,J,ne,M,G,le),ee=J.dipsIntoOuterContext,j===b.IntStream.EOF&&(J=this.removeAllConfigsNotInRuleStopState(J,G)),W!=null&&(!$||!te.PredictionMode.hasConfigInRuleStopState(J))){I(W.length>0);for(let Q of W)J.add(Q,G);}if($&&ee){J.clear(),P=P,P=this.skipTailCalls(P);let Q=this.getReturnState(P);if(se==null&&(se=new v.IntegerList),P.isEmpty?P=void 0:P=P.parent,se.add(Q),Q!==V.PredictionContext.EMPTY_FULL_STATE_KEY)for(let _e=0;_e<oe.length;_e++)oe[_e]=oe[_e].appendContext(Q,G);}}while($&&ee);return J.isEmpty?(this.setDFAEdge(C,j,h.ATNSimulator.ERROR),[h.ATNSimulator.ERROR,P]):[this.addDFAEdge(B,C,j,se,J,G),P]}removeAllConfigsNotInRuleStopState(B,C){if(te.PredictionMode.allConfigsInRuleStopStates(B))return B;let P=new l.ATNConfigSet;for(let j of B)j.state instanceof ae.RuleStopState&&P.add(j,C);return P}computeStartState(B,C,P){let j=B.isPrecedenceDfa?B.getPrecedenceStartState(this._parser.precedence,P):P?B.s0full:B.s0;if(j!=null){if(!P)return new S.SimulatorState(C,j,P,C);j.setContextSensitive(this.atn);}B.decision;let G=B.atnStartState,oe=0,se=C,J=P?V.PredictionContext.EMPTY_FULL:V.PredictionContext.EMPTY_LOCAL,ee=new X.PredictionContextCache;if(P){if(!this.enable_global_context_dfa)for(;se!=null;)se.isEmpty?(oe=V.PredictionContext.EMPTY_FULL_STATE_KEY,se=void 0):(oe=this.getReturnState(se),J=J.appendSingleContext(oe,ee),se=se.parent);for(;j!=null&&j.isContextSensitive&&se!=null;){let M;if(se=this.skipTailCalls(se),se.isEmpty?(M=j.getContextTarget(V.PredictionContext.EMPTY_FULL_STATE_KEY),oe=V.PredictionContext.EMPTY_FULL_STATE_KEY,se=void 0):(oe=this.getReturnState(se),M=j.getContextTarget(oe),J=J.appendSingleContext(oe,ee),se=se.parent),M==null)break;j=M;}}if(j!=null&&!j.isContextSensitive)return new S.SimulatorState(C,j,P,se);let U=new l.ATNConfigSet;for(;;){let M=new l.ATNConfigSet,Z=G.numberOfTransitions;for(let De=0;De<Z;De++){let ge=G.transition(De).target;M.add(u.ATNConfig.create(ge,De+1,J));}let W=se!=null;W||(U.isOutermostConfigSet=!0),this.closure(M,U,!0,W,ee,!1);let le=U.dipsIntoOuterContext,Q;if(P&&!this.enable_global_context_dfa){j=this.addDFAState(B,U,ee);break}else j==null?B.isPrecedenceDfa?(U=this.applyPrecedenceFilter(U,C,ee),Q=this.addDFAState(B,U,ee),B.setPrecedenceStartState(this._parser.precedence,P,Q)):(Q=this.addDFAState(B,U,ee),P?B.s0full?Q=B.s0full:B.s0full=Q:B.s0?Q=B.s0:B.s0=Q):(B.isPrecedenceDfa&&(U=this.applyPrecedenceFilter(U,C,ee)),Q=this.addDFAState(B,U,ee),j.setContextTarget(oe,Q));if(j=Q,!P||!le)break;Q.setContextSensitive(this.atn),se=se,U.clear(),se=this.skipTailCalls(se);let _e=this.getReturnState(se);se.isEmpty?se=void 0:se=se.parent,_e!==V.PredictionContext.EMPTY_FULL_STATE_KEY&&(J=J.appendSingleContext(_e,ee)),oe=_e;}return new S.SimulatorState(C,j,P,se)}applyPrecedenceFilter(B,C,P){let j=new Map,$=new l.ATNConfigSet;for(let G of B){if(G.alt!==1)continue;let oe=G.semanticContext.evalPrecedence(this._parser,C);oe!=null&&(j.set(G.state.stateNumber,G.context),oe!==G.semanticContext?$.add(G.transform(G.state,!1,oe),P):$.add(G,P));}for(let G of B)if(G.alt!==1){if(!G.isPrecedenceFilterSuppressed){let oe=j.get(G.state.stateNumber);if(oe!=null&&oe.equals(G.context))continue}$.add(G,P);}return $}getReachableTarget(B,C,P){if(C.matches(P,0,this.atn.maxTokenType))return C.target}predicateDFAState(B,C,P){let j=this.getConflictingAltsFromConfigSet(C);if(!j)throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.");qe.debug&&console.log("predicateDFAState "+B);let $=this.getPredsForAmbigAlts(j,C,P),G;return $!=null&&(G=this.getPredicatePredictions(j,$),B.predicates=G),G}getPredsForAmbigAlts(B,C,P){let j=new Array(P+1),$=j.length;for(let se of C)B.get(se.alt)&&(j[se.alt]=y.SemanticContext.or(j[se.alt],se.semanticContext));let G=0;for(let se=0;se<$;se++)j[se]==null?j[se]=y.SemanticContext.NONE:j[se]!==y.SemanticContext.NONE&&G++;let oe=j;return G===0&&(oe=void 0),qe.debug&&console.log("getPredsForAmbigAlts result "+(oe?s.Arrays.toString(oe):"undefined")),oe}getPredicatePredictions(B,C){let P=[],j=!1;for(let $=1;$<C.length;$++){let G=C[$];I(G!=null),B!=null&&B.get($)&&G===y.SemanticContext.NONE?P.push(new x.DFAState.PredPrediction(G,$)):G!==y.SemanticContext.NONE&&(j=!0,P.push(new x.DFAState.PredPrediction(G,$)));}if(j)return P}evalSemanticContext(B,C,P){let j=new f.BitSet;for(let $ of B){if($.pred===y.SemanticContext.NONE){if(j.set($.alt),!P)break;continue}let G=this.evalSemanticContextImpl($.pred,C,$.alt);if((qe.debug||qe.dfa_debug)&&console.log("eval pred "+$+"="+G),G&&((qe.debug||qe.dfa_debug)&&console.log("PREDICT "+$.alt),j.set($.alt),!P))break}return j}evalSemanticContextImpl(B,C,P){return B.eval(this._parser,C)}closure(B,C,P,j,$,G){$==null&&($=X.PredictionContextCache.UNCACHED);let oe=B,se=new o.Array2DHashSet(N.ObjectEqualityComparator.INSTANCE);for(;oe.size>0;){let J=new l.ATNConfigSet;for(let ee of oe)this.closureImpl(ee,C,J,se,P,j,$,0,G);oe=J;}}closureImpl(B,C,P,j,$,G,oe,se,J){if(qe.debug&&console.log("closure("+B.toString(this._parser,!0)+")"),B.state instanceof ae.RuleStopState)if(B.context.isEmpty)if(G)qe.debug&&console.log("FALLING off rule "+this.getRuleName(B.state.ruleIndex)),B.context===V.PredictionContext.EMPTY_FULL?B=B.transform(B.state,!1,V.PredictionContext.EMPTY_LOCAL):!B.reachesIntoOuterContext&&V.PredictionContext.isEmptyLocal(B.context)&&C.add(B,oe);else {C.add(B,oe);return}else {let U=B.context.hasEmpty,M=B.context.size-(U?1:0);for(let Z=0;Z<M;Z++){let W=B.context.getParent(Z),ne=this.atn.states[B.context.getReturnState(Z)],le=u.ATNConfig.create(ne,B.alt,W,B.semanticContext);le.outerContextDepth=B.outerContextDepth,le.isPrecedenceFilterSuppressed=B.isPrecedenceFilterSuppressed,I(se>q),this.closureImpl(le,C,P,j,$,G,oe,se-1,J);}if(!U||!G)return;B=B.transform(B.state,!1,V.PredictionContext.EMPTY_LOCAL);}let ee=B.state;ee.onlyHasEpsilonTransitions||(C.add(B,oe),qe.debug&&console.log("added config "+C));for(let U=0;U<ee.numberOfOptimizedTransitions;U++){if(U===0&&ee.stateType===c.ATNStateType.STAR_LOOP_ENTRY&&ee.precedenceRuleDecision&&!B.context.hasEmpty){let ne=ee,le=!0;for(let Q=0;Q<B.context.size;Q++)if(!ne.precedenceLoopbackStates.get(B.context.getReturnState(Q))){le=!1;break}if(le)continue}let M=ee.getOptimizedTransition(U),Z=!(M instanceof n.ActionTransition)&&$,W=this.getEpsilonTarget(B,M,Z,se===0,oe,J);if(W!=null){if(M instanceof k.RuleTransition&&P!=null&&!$){P.add(W,oe);continue}let ne=se;if(B.state instanceof ae.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&M.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(W.isPrecedenceFilterSuppressed=!0),W.outerContextDepth=W.outerContextDepth+1,!j.add(W))continue;I(ne>q),ne--,qe.debug&&console.log("dips into outer ctx: "+W);}else if(M instanceof k.RuleTransition)this.optimize_tail_calls&&M.optimizedTailCall&&(!this.tail_call_preserves_sll||!V.PredictionContext.isEmptyLocal(B.context))?(I(W.context===B.context),ne===0&&(ne--,!this.tail_call_preserves_sll&&V.PredictionContext.isEmptyLocal(B.context)&&(W.outerContextDepth=W.outerContextDepth+1))):ne>=0&&ne++;else if(!M.isEpsilon&&!j.add(W))continue;this.closureImpl(W,C,P,j,Z,G,oe,ne,J);}}}getRuleName(B){return this._parser!=null&&B>=0?this._parser.ruleNames[B]:"<rule "+B+">"}getEpsilonTarget(B,C,P,j,$,G){switch(C.serializationType){case 3:return this.ruleTransition(B,C,$);case 10:return this.precedenceTransition(B,C,P,j);case 4:return this.predTransition(B,C,P,j);case 6:return this.actionTransition(B,C);case 1:return B.transform(C.target,!1);case 5:case 2:case 7:return G&&C.matches(R.Token.EOF,0,1)?B.transform(C.target,!1):void 0;default:return}}actionTransition(B,C){return qe.debug&&console.log("ACTION edge "+C.ruleIndex+":"+C.actionIndex),B.transform(C.target,!1)}precedenceTransition(B,C,P,j){qe.debug&&(console.log("PRED (collectPredicates="+P+") "+C.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let $;if(P&&j){let G=y.SemanticContext.and(B.semanticContext,C.predicate);$=B.transform(C.target,!1,G);}else $=B.transform(C.target,!1);return qe.debug&&console.log("config from pred transition="+$),$}predTransition(B,C,P,j){qe.debug&&(console.log("PRED (collectPredicates="+P+") "+C.ruleIndex+":"+C.predIndex+", ctx dependent="+C.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let $;if(P&&(!C.isCtxDependent||C.isCtxDependent&&j)){let G=y.SemanticContext.and(B.semanticContext,C.predicate);$=B.transform(C.target,!1,G);}else $=B.transform(C.target,!1);return qe.debug&&console.log("config from pred transition="+$),$}ruleTransition(B,C,P){qe.debug&&console.log("CALL rule "+this.getRuleName(C.target.ruleIndex)+", ctx="+B.context);let j=C.followState,$;return this.optimize_tail_calls&&C.optimizedTailCall&&(!this.tail_call_preserves_sll||!V.PredictionContext.isEmptyLocal(B.context))?$=B.context:P!=null?$=P.getChild(B.context,j.stateNumber):$=B.context.getChild(j.stateNumber),B.transform(C.target,!1,$)}isConflicted(B,C){if(B.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER||B.size<=1)return;let P=B.toArray();P.sort(qe.STATE_ALT_SORT_COMPARATOR);let j=!B.dipsIntoOuterContext,$=new f.BitSet,G=P[0].alt;$.set(G);let oe=P[0].state.nonStopStateNumber;for(let M of P){let Z=M.state.nonStopStateNumber;if(Z!==oe){if(M.alt!==G)return;oe=Z;}}let se;if(j){oe=P[0].state.nonStopStateNumber,se=new f.BitSet;let M=G;for(let W of P){if(W.state.nonStopStateNumber!==oe)break;let ne=W.alt;se.set(ne),M=ne;}oe=P[0].state.nonStopStateNumber;let Z=G;for(let W of P){let ne=W.state.nonStopStateNumber,le=W.alt;if(ne!==oe){if(Z!==M){j=!1;break}oe=ne,Z=G;}else if(le!==Z){if(le!==se.nextSetBit(Z+1)){j=!1;break}Z=le;}}}oe=P[0].state.nonStopStateNumber;let J=0,ee=0,U=P[0].context;for(let M=1;M<P.length;M++){let Z=P[M];if(Z.alt!==G||Z.state.nonStopStateNumber!==oe)break;ee=M,U=C.join(U,P[M].context);}for(let M=ee+1;M<P.length;M++){let Z=P[M],W=Z.state;if($.set(Z.alt),W.nonStopStateNumber!==oe){oe=W.nonStopStateNumber,J=M,ee=M,U=Z.context;for(let De=J+1;De<P.length;De++){let ge=P[De];if(ge.alt!==G||ge.state.nonStopStateNumber!==oe)break;ee=De,U=C.join(U,ge.context);}M=ee;continue}let ne=Z.context,le=Z.alt,Q=M;for(let De=Q+1;De<P.length;De++){let ge=P[De];if(ge.alt!==le||ge.state.nonStopStateNumber!==oe)break;Q=De,ne=C.join(ne,ge.context);}M=Q;let _e=C.join(U,ne);if(!U.equals(_e))return;j=j&&U.equals(ne);}return new m.ConflictInfo($,j)}getConflictingAltsFromConfigSet(B){let C=B.conflictingAlts;return C==null&&B.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER&&(C=new f.BitSet,C.set(B.uniqueAlt)),C}getTokenName(B){if(B===R.Token.EOF)return "EOF";let P=(this._parser!=null?this._parser.vocabulary:L.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(B);return P===String(B)?P:P+"<"+B+">"}getLookaheadName(B){return this.getTokenName(B.LA(1))}dumpDeadEndConfigs(B){console.log("dead end configs: ");let C=B.deadEndConfigs;if(C)for(let P of C){let j="no edges";if(P.state.numberOfOptimizedTransitions>0){let $=P.state.getOptimizedTransition(0);$ instanceof p.AtomTransition?j="Atom "+this.getTokenName($._label):$ instanceof T.SetTransition&&(j=($ instanceof w.NotSetTransition?"~":"")+"Set "+$.set.toString());}console.log(P.toString(this._parser,!0)+":"+j);}}noViableAlt(B,C,P,j){return new D.NoViableAltException(this._parser,B,B.get(j),B.LT(1),P,C)}getUniqueAlt(B){let C=a.ATN.INVALID_ALT_NUMBER;for(let P of B)if(C===a.ATN.INVALID_ALT_NUMBER)C=P.alt;else if(P.alt!==C)return a.ATN.INVALID_ALT_NUMBER;return C}configWithAltAtStopState(B,C){for(let P of B)if(P.alt===C&&P.state instanceof ae.RuleStopState)return !0;return !1}addDFAEdge(B,C,P,j,$,G){I(j==null||j.isEmpty||B.isContextSensitive);let oe=C,se=this.addDFAState(B,$,G);if(j!=null)for(let J of j.toArray()){if(J===V.PredictionContext.EMPTY_FULL_STATE_KEY&&oe.configs.isOutermostConfigSet)continue;oe.setContextSensitive(this.atn),oe.setContextSymbol(P);let ee=oe.getContextTarget(J);if(ee!=null){oe=ee;continue}ee=this.addDFAContextState(B,oe.configs,J,G),I(J!==V.PredictionContext.EMPTY_FULL_STATE_KEY||ee.configs.isOutermostConfigSet),oe.setContextTarget(J,ee),oe=ee;}return qe.debug&&console.log("EDGE "+oe+" -> "+se+" upon "+this.getTokenName(P)),this.setDFAEdge(oe,P,se),qe.debug&&console.log(`DFA=
|
|
70
|
+
`+B.toString(this._parser!=null?this._parser.vocabulary:L.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),se}setDFAEdge(B,C,P){B!=null&&B.setTarget(C,P);}addDFAContextState(B,C,P,j){if(P!==V.PredictionContext.EMPTY_FULL_STATE_KEY){let $=new l.ATNConfigSet;for(let G of C)$.add(G.appendContext(P,j));return this.addDFAState(B,$,j)}else return I(!C.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),C=C.clone(!0),C.isOutermostConfigSet=!0,this.addDFAState(B,C,j)}addDFAState(B,C,P){let j=this.enable_global_context_dfa||!C.isOutermostConfigSet;if(j){C.isReadOnly||C.optimizeConfigs(this);let J=this.createDFAState(B,C),ee=B.states.get(J);if(ee!=null)return ee}C.isReadOnly||C.conflictInfo==null&&(C.conflictInfo=this.isConflicted(C,P));let $=this.createDFAState(B,C.clone(!0)),G=this.atn.getDecisionState(B.decision),oe=this.getUniqueAlt(C);if(oe!==a.ATN.INVALID_ALT_NUMBER)$.acceptStateInfo=new i.AcceptStateInfo(oe);else if(C.conflictingAlts!=null){let J=C.conflictingAlts;J&&($.acceptStateInfo=new i.AcceptStateInfo(J.nextSetBit(0)));}if($.isAcceptState&&C.hasSemanticContext&&this.predicateDFAState($,C,G.numberOfTransitions),!j)return $;let se=B.addState($);return qe.debug&&se===$&&console.log("adding new DFA state: "+$),se}createDFAState(B,C){return new x.DFAState(C)}reportAttemptingFullContext(B,C,P,j,$){if(qe.debug||qe.retry_debug){let G=g.Interval.of(j,$);console.log("reportAttemptingFullContext decision="+B.decision+":"+P.s0.configs+", input="+this._parser.inputStream.getText(G));}if(this._parser!=null){let G=this._parser.getErrorListenerDispatch();G.reportAttemptingFullContext&&G.reportAttemptingFullContext(this._parser,B,j,$,C,P);}}reportContextSensitivity(B,C,P,j,$){if(qe.debug||qe.retry_debug){let G=g.Interval.of(j,$);console.log("reportContextSensitivity decision="+B.decision+":"+P.s0.configs+", input="+this._parser.inputStream.getText(G));}if(this._parser!=null){let G=this._parser.getErrorListenerDispatch();G.reportContextSensitivity&&G.reportContextSensitivity(this._parser,B,j,$,C,P);}}reportAmbiguity(B,C,P,j,$,G,oe){if(qe.debug||qe.retry_debug){let se=g.Interval.of(P,j);console.log("reportAmbiguity "+G+":"+oe+", input="+this._parser.inputStream.getText(se));}if(this._parser!=null){let se=this._parser.getErrorListenerDispatch();se.reportAmbiguity&&se.reportAmbiguity(this._parser,B,P,j,$,G,oe);}}getReturnState(B){return B.isEmpty?V.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[B.invokingState].transition(0).followState.stateNumber}skipTailCalls(B){if(!this.optimize_tail_calls)return B;for(;!B.isEmpty;){let C=this.atn.states[B.invokingState];if(I(C.numberOfTransitions===1&&C.transition(0).serializationType===3),!C.transition(0).tailCall)break;B=B.parent;}return B}get parser(){return this._parser}};A.debug=!1,A.dfa_debug=!1,A.retry_debug=!1,A.STATE_ALT_SORT_COMPARATOR=(H,B)=>{let C=H.state.nonStopStateNumber-B.state.nonStopStateNumber;return C!==0||(C=H.alt-B.alt,C!==0)?C:0},e([E.NotNull],A.prototype,"predictionMode",void 0),e([E.NotNull],A.prototype,"getPredictionMode",null),e([r(0,E.NotNull)],A.prototype,"setPredictionMode",null),e([E.Override],A.prototype,"reset",null),e([r(0,E.NotNull)],A.prototype,"adaptivePredict",null),e([r(0,E.NotNull),r(1,E.NotNull),r(2,E.NotNull)],A.prototype,"getStartState",null),e([r(0,E.NotNull),r(1,E.NotNull),r(3,E.NotNull)],A.prototype,"execDFA",null),e([r(0,E.NotNull),r(1,E.NotNull),r(3,E.NotNull)],A.prototype,"execATN",null),e([r(0,E.NotNull),r(2,E.NotNull)],A.prototype,"handleNoViableAlt",null),e([r(0,E.NotNull)],A.prototype,"getExistingTargetState",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"computeTargetState",null),e([E.NotNull,r(0,E.NotNull)],A.prototype,"removeAllConfigsNotInRuleStopState",null),e([E.NotNull],A.prototype,"computeStartState",null),e([E.NotNull,r(0,E.NotNull)],A.prototype,"applyPrecedenceFilter",null),e([r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"getReachableTarget",null),e([r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"getPredsForAmbigAlts",null),e([r(0,E.NotNull)],A.prototype,"evalSemanticContext",null),e([r(0,E.NotNull)],A.prototype,"evalSemanticContextImpl",null),e([r(1,E.NotNull),r(4,E.Nullable)],A.prototype,"closure",null),e([r(0,E.NotNull),r(1,E.NotNull),r(2,E.Nullable),r(3,E.NotNull),r(6,E.NotNull)],A.prototype,"closureImpl",null),e([E.NotNull],A.prototype,"getRuleName",null),e([r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"getEpsilonTarget",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"actionTransition",null),e([E.Nullable,r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"precedenceTransition",null),e([E.Nullable,r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"predTransition",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull),r(2,E.Nullable)],A.prototype,"ruleTransition",null),e([r(0,E.NotNull)],A.prototype,"isConflicted",null),e([E.NotNull],A.prototype,"getTokenName",null),e([r(0,E.NotNull)],A.prototype,"dumpDeadEndConfigs",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull),r(2,E.NotNull)],A.prototype,"noViableAlt",null),e([r(0,E.NotNull)],A.prototype,"getUniqueAlt",null),e([r(0,E.NotNull)],A.prototype,"configWithAltAtStopState",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull),r(4,E.NotNull)],A.prototype,"addDFAEdge",null),e([r(0,E.Nullable),r(2,E.Nullable)],A.prototype,"setDFAEdge",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"addDFAContextState",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"addDFAState",null),e([E.NotNull,r(0,E.NotNull),r(1,E.NotNull)],A.prototype,"createDFAState",null),e([r(0,E.NotNull),r(2,E.NotNull)],A.prototype,"reportAttemptingFullContext",null),e([r(0,E.NotNull),r(2,E.NotNull)],A.prototype,"reportContextSensitivity",null),e([r(0,E.NotNull),r(5,E.NotNull),r(6,E.NotNull)],A.prototype,"reportAmbiguity",null),A=e([r(0,E.NotNull)],A),t.ParserATNSimulator=A;}),u7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.PlusBlockStartState=void 0;var r=Zt(),i=nh(),n=ce(),o=class extends i.BlockStartState{get stateType(){return r.ATNStateType.PLUS_BLOCK_START}};e([n.Override],o.prototype,"stateType",null),t.PlusBlockStartState=o;}),l7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.PlusLoopbackState=void 0;var r=Zt(),i=ss(),n=ce(),o=class extends i.DecisionState{get stateType(){return r.ATNStateType.PLUS_LOOP_BACK}};e([n.Override],o.prototype,"stateType",null),t.PlusLoopbackState=o;}),h7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PrecedencePredicateTransition=void 0;var i=O0(),n=ce(),o=to(),s=class extends i.AbstractPredicateTransition{constructor(u,l){super(u),this.precedence=l;}get serializationType(){return 10}get isEpsilon(){return !0}matches(u,l,h){return !1}get predicate(){return new o.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};e([n.Override],s.prototype,"serializationType",null),e([n.Override],s.prototype,"isEpsilon",null),e([n.Override],s.prototype,"matches",null),e([n.Override],s.prototype,"toString",null),s=e([r(0,n.NotNull)],s),t.PrecedencePredicateTransition=s;}),c7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RangeTransition=void 0;var i=os(),n=ce(),o=tn(),s=class extends o.Transition{constructor(u,l,h){super(u),this.from=l,this.to=h;}get serializationType(){return 2}get label(){return i.IntervalSet.of(this.from,this.to)}matches(u,l,h){return u>=this.from&&u<=this.to}toString(){return "'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};e([n.Override],s.prototype,"serializationType",null),e([n.Override,n.NotNull],s.prototype,"label",null),e([n.Override],s.prototype,"matches",null),e([n.Override,n.NotNull],s.prototype,"toString",null),s=e([r(0,n.NotNull)],s),t.RangeTransition=s;}),f7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleStartState=void 0;var r=Ei(),i=Zt(),n=ce(),o=class extends r.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1;}get stateType(){return i.ATNStateType.RULE_START}};e([n.Override],o.prototype,"stateType",null),t.RuleStartState=o;}),d7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.StarBlockStartState=void 0;var r=Zt(),i=nh(),n=ce(),o=class extends i.BlockStartState{get stateType(){return r.ATNStateType.STAR_BLOCK_START}};e([n.Override],o.prototype,"stateType",null),t.StarBlockStartState=o;}),p7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.StarLoopbackState=void 0;var r=Ei(),i=Zt(),n=ce(),o=class extends r.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return i.ATNStateType.STAR_LOOP_BACK}};e([n.Override],o.prototype,"stateType",null),t.StarLoopbackState=o;}),m7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensStartState=void 0;var r=Zt(),i=ss(),n=ce(),o=class extends i.DecisionState{get stateType(){return r.ATNStateType.TOKEN_START}};e([n.Override],o.prototype,"stateType",null),t.TokensStartState=o;}),_7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UUID=void 0;var e=Bt(),r=class{constructor(i,n,o,s){this.data=new Uint32Array(4),this.data[0]=i,this.data[1]=n,this.data[2]=o,this.data[3]=s;}static fromString(i){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(i))throw new Error("Incorrectly formatted UUID");let n=i.split("-"),o=parseInt(n[0],16),s=(parseInt(n[1],16)<<16>>>0)+parseInt(n[2],16),a=(parseInt(n[3],16)<<16>>>0)+parseInt(n[4].substr(0,4),16),u=parseInt(n[4].substr(-8),16);return new r(o,s,a,u)}hashCode(){return e.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(i){return i===this?!0:i instanceof r?this.data[0]===i.data[0]&&this.data[1]===i.data[1]&&this.data[2]===i.data[2]&&this.data[3]===i.data[3]:!1}toString(){return ("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};t.UUID=r;}),oh=re(t=>{var e=t&&t.__decorate||function(ee,U,M,Z){var W=arguments.length,ne=W<3?U:Z===null?Z=Object.getOwnPropertyDescriptor(U,M):Z,le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(ee,U,M,Z);else for(var Q=ee.length-1;Q>=0;Q--)(le=ee[Q])&&(ne=(W<3?le(ne):W>3?le(U,M,ne):le(U,M))||ne);return W>3&&ne&&Object.defineProperty(U,M,ne),ne},r=t&&t.__param||function(ee,U){return function(M,Z){U(M,Z,ee);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNDeserializer=void 0;var i=xv(),n=rn(),o=ei(),s=yv(),a=Zt(),u=vv(),l=YL(),h=pv(),c=nn(),p=ZL(),f=nh(),m=ss(),_=dv(),x=XL(),v=os(),g=mv(),b=JL(),E=QL(),w=e7(),D=t7(),N=r7(),F=i7(),V=n7(),X=s7(),te=Ev(),ae=ce(),k=q0(),y=Na(),T=u7(),S=l7(),R=h7(),L=ov(),I=c7(),K=f7(),q=Ra(),A=H0(),H=B0(),B=d7(),C=p7(),P=M0(),j=Ct(),$=m7(),G=_7(),oe=_v(),se;(function(ee){ee[ee.UNICODE_BMP=0]="UNICODE_BMP",ee[ee.UNICODE_SMP=1]="UNICODE_SMP";})(se||(se={}));var J=class{constructor(ee){ee===void 0&&(ee=s.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=ee;}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(ee,U){let M=J.SUPPORTED_UUIDS.findIndex(Z=>Z.equals(ee));return M<0?!1:J.SUPPORTED_UUIDS.findIndex(Z=>Z.equals(U))>=M}static getUnicodeDeserializer(ee){return ee===0?{readUnicode:(U,M)=>J.toInt(U[M]),size:1}:{readUnicode:(U,M)=>J.toInt32(U,M),size:2}}deserialize(ee){ee=ee.slice(0);for(let he=1;he<ee.length;he++)ee[he]=ee[he]-2&65535;let U=0,M=J.toInt(ee[U++]);if(M!==J.SERIALIZED_VERSION){let he=`Could not deserialize ATN with version ${M} (expected ${J.SERIALIZED_VERSION}).`;throw new Error(he)}let Z=J.toUUID(ee,U);if(U+=8,J.SUPPORTED_UUIDS.findIndex(he=>he.equals(Z))<0){let he=`Could not deserialize ATN with UUID ${Z} (expected ${J.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(he)}let W=J.isFeatureSupported(J.ADDED_LEXER_ACTIONS,Z),ne=J.toInt(ee[U++]),le=J.toInt(ee[U++]),Q=new o.ATN(ne,le),_e=[],De=[],ge=J.toInt(ee[U++]);for(let he=0;he<ge;he++){let ve=J.toInt(ee[U++]);if(ve===a.ATNStateType.INVALID_TYPE){Q.addState(new g.InvalidState);continue}let Ce=J.toInt(ee[U++]);Ce===65535&&(Ce=-1);let Fe=this.stateFactory(ve,Ce);if(ve===a.ATNStateType.LOOP_END){let Re=J.toInt(ee[U++]);_e.push([Fe,Re]);}else if(Fe instanceof f.BlockStartState){let Re=J.toInt(ee[U++]);De.push([Fe,Re]);}Q.addState(Fe);}for(let he of _e)he[0].loopBackState=Q.states[he[1]];for(let he of De)he[0].endState=Q.states[he[1]];let be=J.toInt(ee[U++]);for(let he=0;he<be;he++){let ve=J.toInt(ee[U++]);Q.states[ve].nonGreedy=!0;}let et=J.toInt(ee[U++]);for(let he=0;he<et;he++){let ve=J.toInt(ee[U++]);Q.states[ve].sll=!0;}let Oe=J.toInt(ee[U++]);for(let he=0;he<Oe;he++){let ve=J.toInt(ee[U++]);Q.states[ve].isPrecedenceRule=!0;}let He=J.toInt(ee[U++]);Q.grammarType===0&&(Q.ruleToTokenType=new Int32Array(He)),Q.ruleToStartState=new Array(He);for(let he=0;he<He;he++){let ve=J.toInt(ee[U++]),Ce=Q.states[ve];if(Ce.leftFactored=J.toInt(ee[U++])!==0,Q.ruleToStartState[he]=Ce,Q.grammarType===0){let Fe=J.toInt(ee[U++]);if(Fe===65535&&(Fe=j.Token.EOF),Q.ruleToTokenType[he]=Fe,!J.isFeatureSupported(J.ADDED_LEXER_ACTIONS,Z)){J.toInt(ee[U++]);}}}Q.ruleToStopState=new Array(He);for(let he of Q.states)he instanceof q.RuleStopState&&(Q.ruleToStopState[he.ruleIndex]=he,Q.ruleToStartState[he.ruleIndex].stopState=he);let Kt=J.toInt(ee[U++]);for(let he=0;he<Kt;he++){let ve=J.toInt(ee[U++]);Q.modeToStartState.push(Q.states[ve]);}Q.modeToDFA=new Array(Kt);for(let he=0;he<Kt;he++)Q.modeToDFA[he]=new _.DFA(Q.modeToStartState[he]);let Je=[];U=this.deserializeSets(ee,U,Je,J.getUnicodeDeserializer(0)),J.isFeatureSupported(J.ADDED_UNICODE_SMP,Z)&&(U=this.deserializeSets(ee,U,Je,J.getUnicodeDeserializer(1)));let st=J.toInt(ee[U++]);for(let he=0;he<st;he++){let ve=J.toInt(ee[U]),Ce=J.toInt(ee[U+1]),Fe=J.toInt(ee[U+2]),Re=J.toInt(ee[U+3]),We=J.toInt(ee[U+4]),ut=J.toInt(ee[U+5]),Ue=this.edgeFactory(Q,Fe,ve,Ce,Re,We,ut,Je);Q.states[ve].addTransition(Ue),U+=6;}let fi=new n.Array2DHashSet({hashCode:he=>he.stopState^he.returnState^he.outermostPrecedenceReturn,equals:(he,ve)=>he.stopState===ve.stopState&&he.returnState===ve.returnState&&he.outermostPrecedenceReturn===ve.outermostPrecedenceReturn}),it=[];for(let he of Q.states){let ve=he.ruleIndex>=0&&Q.ruleToStartState[he.ruleIndex].leftFactored;for(let Ce=0;Ce<he.numberOfTransitions;Ce++){let Fe=he.transition(Ce);if(!(Fe instanceof A.RuleTransition))continue;let Re=Fe;if(!Q.ruleToStartState[Re.target.ruleIndex].leftFactored&&ve)continue;let ut=-1;Q.ruleToStartState[Re.target.ruleIndex].isPrecedenceRule&&Re.precedence===0&&(ut=Re.target.ruleIndex);let Ue={stopState:Re.target.ruleIndex,returnState:Re.followState.stateNumber,outermostPrecedenceReturn:ut};fi.add(Ue)&&it.push(Ue);}}for(let he of it){let ve=new x.EpsilonTransition(Q.states[he.returnState],he.outermostPrecedenceReturn);Q.ruleToStopState[he.stopState].addTransition(ve);}for(let he of Q.states){if(he instanceof f.BlockStartState){if(he.endState===void 0)throw new Error("IllegalStateException");if(he.endState.startState!==void 0)throw new Error("IllegalStateException");he.endState.startState=he;}if(he instanceof S.PlusLoopbackState){let ve=he;for(let Ce=0;Ce<ve.numberOfTransitions;Ce++){let Fe=ve.transition(Ce).target;Fe instanceof T.PlusBlockStartState&&(Fe.loopBackState=ve);}}else if(he instanceof C.StarLoopbackState){let ve=he;for(let Ce=0;Ce<ve.numberOfTransitions;Ce++){let Fe=ve.transition(Ce).target;Fe instanceof P.StarLoopEntryState&&(Fe.loopBackState=ve);}}}let tt=J.toInt(ee[U++]);for(let he=1;he<=tt;he++){let ve=J.toInt(ee[U++]),Ce=Q.states[ve];Q.decisionToState.push(Ce),Ce.decision=he-1;}if(Q.grammarType===0)if(W){Q.lexerActions=new Array(J.toInt(ee[U++]));for(let he=0;he<Q.lexerActions.length;he++){let ve=J.toInt(ee[U++]),Ce=J.toInt(ee[U++]);Ce===65535&&(Ce=-1);let Fe=J.toInt(ee[U++]);Fe===65535&&(Fe=-1);let Re=this.lexerActionFactory(ve,Ce,Fe);Q.lexerActions[he]=Re;}}else {let he=[];for(let ve of Q.states)for(let Ce=0;Ce<ve.numberOfTransitions;Ce++){let Fe=ve.transition(Ce);if(!(Fe instanceof i.ActionTransition))continue;let Re=Fe.ruleIndex,We=Fe.actionIndex,ut=new E.LexerCustomAction(Re,We);ve.setTransition(Ce,new i.ActionTransition(Fe.target,Re,he.length,!1)),he.push(ut);}Q.lexerActions=he;}this.markPrecedenceDecisions(Q),Q.decisionToDFA=new Array(tt);for(let he=0;he<tt;he++)Q.decisionToDFA[he]=new _.DFA(Q.decisionToState[he],he);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(Q),this.deserializationOptions.isGenerateRuleBypassTransitions&&Q.grammarType===1){Q.ruleToTokenType=new Int32Array(Q.ruleToStartState.length);for(let he=0;he<Q.ruleToStartState.length;he++)Q.ruleToTokenType[he]=Q.maxTokenType+he+1;for(let he=0;he<Q.ruleToStartState.length;he++){let ve=new l.BasicBlockStartState;ve.ruleIndex=he,Q.addState(ve);let Ce=new p.BlockEndState;Ce.ruleIndex=he,Q.addState(Ce),ve.endState=Ce,Q.defineDecisionState(ve),Ce.startState=ve;let Fe,Re;if(Q.ruleToStartState[he].isPrecedenceRule){Fe=void 0;for(let ut of Q.states){if(ut.ruleIndex!==he||!(ut instanceof P.StarLoopEntryState))continue;let Ue=ut.transition(ut.numberOfTransitions-1).target;if(Ue instanceof te.LoopEndState&&Ue.epsilonOnlyTransitions&&Ue.transition(0).target instanceof q.RuleStopState){Fe=ut;break}}if(!Fe)throw new Error("Couldn't identify final state of the precedence rule prefix section.");Re=Fe.loopBackState.transition(0);}else Fe=Q.ruleToStopState[he];for(let ut of Q.states)for(let Ue=0;Ue<ut.numberOfTransitions;Ue++){let Qe=ut.transition(Ue);Qe!==Re&&Qe.target===Fe&&(Qe.target=Ce);}for(;Q.ruleToStartState[he].numberOfTransitions>0;){let ut=Q.ruleToStartState[he].removeTransition(Q.ruleToStartState[he].numberOfTransitions-1);ve.addTransition(ut);}Q.ruleToStartState[he].addTransition(new x.EpsilonTransition(ve)),Ce.addTransition(new x.EpsilonTransition(Fe));let We=new h.BasicState;Q.addState(We),We.addTransition(new u.AtomTransition(Ce,Q.ruleToTokenType[he])),ve.addTransition(new x.EpsilonTransition(We));}this.deserializationOptions.isVerifyATN&&this.verifyATN(Q);}if(this.deserializationOptions.isOptimize){for(;;){let he=0;he+=J.inlineSetRules(Q),he+=J.combineChainedEpsilons(Q);let ve=Q.grammarType===0;if(he+=J.optimizeSets(Q,ve),he===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(Q);}return J.identifyTailCalls(Q),Q}deserializeSets(ee,U,M,Z){let W=J.toInt(ee[U++]);for(let ne=0;ne<W;ne++){let le=J.toInt(ee[U]);U++;let Q=new v.IntervalSet;M.push(Q),J.toInt(ee[U++])!==0&&Q.add(-1);for(let De=0;De<le;De++){let ge=Z.readUnicode(ee,U);U+=Z.size;let be=Z.readUnicode(ee,U);U+=Z.size,Q.add(ge,be);}}return U}markPrecedenceDecisions(ee){let U=new Map;for(let M of ee.states)if(M instanceof P.StarLoopEntryState&&ee.ruleToStartState[M.ruleIndex].isPrecedenceRule){let Z=M.transition(M.numberOfTransitions-1).target;Z instanceof te.LoopEndState&&Z.epsilonOnlyTransitions&&Z.transition(0).target instanceof q.RuleStopState&&(U.set(M.ruleIndex,M),M.precedenceRuleDecision=!0,M.precedenceLoopbackStates=new c.BitSet(ee.states.length));}for(let M of U)for(let Z of ee.ruleToStopState[M[0]].getTransitions())Z.serializationType!==1||Z.outermostPrecedenceReturn!==-1||M[1].precedenceLoopbackStates.set(Z.target.stateNumber);}verifyATN(ee){for(let U of ee.states)if(this.checkCondition(U!==void 0,"ATN states should not be undefined."),U.stateType!==a.ATNStateType.INVALID_TYPE){if(this.checkCondition(U.onlyHasEpsilonTransitions||U.numberOfTransitions<=1),U instanceof T.PlusBlockStartState&&this.checkCondition(U.loopBackState!==void 0),U instanceof P.StarLoopEntryState){let M=U;if(this.checkCondition(M.loopBackState!==void 0),this.checkCondition(M.numberOfTransitions===2),M.transition(0).target instanceof B.StarBlockStartState)this.checkCondition(M.transition(1).target instanceof te.LoopEndState),this.checkCondition(!M.nonGreedy);else if(M.transition(0).target instanceof te.LoopEndState)this.checkCondition(M.transition(1).target instanceof B.StarBlockStartState),this.checkCondition(M.nonGreedy);else throw new Error("IllegalStateException")}if(U instanceof C.StarLoopbackState&&(this.checkCondition(U.numberOfTransitions===1),this.checkCondition(U.transition(0).target instanceof P.StarLoopEntryState)),U instanceof te.LoopEndState&&this.checkCondition(U.loopBackState!==void 0),U instanceof K.RuleStartState&&this.checkCondition(U.stopState!==void 0),U instanceof f.BlockStartState&&this.checkCondition(U.endState!==void 0),U instanceof p.BlockEndState&&this.checkCondition(U.startState!==void 0),U instanceof m.DecisionState){let M=U;this.checkCondition(M.numberOfTransitions<=1||M.decision>=0);}else this.checkCondition(U.numberOfTransitions<=1||U instanceof q.RuleStopState);}}checkCondition(ee,U){if(!ee)throw new Error("IllegalStateException: "+U)}static inlineSetRules(ee){let U=0,M=new Array(ee.ruleToStartState.length);for(let Z=0;Z<ee.ruleToStartState.length;Z++){let ne=ee.ruleToStartState[Z];for(;ne.onlyHasEpsilonTransitions&&ne.numberOfOptimizedTransitions===1&&ne.getOptimizedTransition(0).serializationType===1;)ne=ne.getOptimizedTransition(0).target;if(ne.numberOfOptimizedTransitions!==1)continue;let le=ne.getOptimizedTransition(0),Q=le.target;if(!(le.isEpsilon||!Q.onlyHasEpsilonTransitions||Q.numberOfOptimizedTransitions!==1||!(Q.getOptimizedTransition(0).target instanceof q.RuleStopState)))switch(le.serializationType){case 5:case 2:case 7:M[Z]=le;break;case 8:case 9:continue;default:continue}}for(let Z of ee.states){if(Z.ruleIndex<0)continue;let W;for(let ne=0;ne<Z.numberOfOptimizedTransitions;ne++){let le=Z.getOptimizedTransition(ne);if(!(le instanceof A.RuleTransition)){W!==void 0&&W.push(le);continue}let Q=le,_e=M[Q.target.ruleIndex];if(_e===void 0){W!==void 0&&W.push(le);continue}if(W===void 0){W=[];for(let be=0;be<ne;be++)W.push(Z.getOptimizedTransition(ne));}U++;let De=Q.followState,ge=new h.BasicState;switch(ge.setRuleIndex(De.ruleIndex),ee.addState(ge),W.push(new x.EpsilonTransition(ge)),_e.serializationType){case 5:ge.addTransition(new u.AtomTransition(De,_e._label));break;case 2:ge.addTransition(new I.RangeTransition(De,_e.from,_e.to));break;case 7:ge.addTransition(new H.SetTransition(De,_e.label));break;default:throw new Error("UnsupportedOperationException")}}if(W!==void 0){if(Z.isOptimized)for(;Z.numberOfOptimizedTransitions>0;)Z.removeOptimizedTransition(Z.numberOfOptimizedTransitions-1);for(let ne of W)Z.addOptimizedTransition(ne);}}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+U+" rule invocations by inlining sets."),U}static combineChainedEpsilons(ee){let U=0;for(let M of ee.states){if(!M.onlyHasEpsilonTransitions||M instanceof q.RuleStopState)continue;let Z;e:for(let W=0;W<M.numberOfOptimizedTransitions;W++){let ne=M.getOptimizedTransition(W),le=ne.target;if(ne.serializationType!==1||ne.outermostPrecedenceReturn!==-1||le.stateType!==a.ATNStateType.BASIC||!le.onlyHasEpsilonTransitions){Z!==void 0&&Z.push(ne);continue e}for(let Q=0;Q<le.numberOfOptimizedTransitions;Q++)if(le.getOptimizedTransition(Q).serializationType!==1||le.getOptimizedTransition(Q).outermostPrecedenceReturn!==-1){Z!==void 0&&Z.push(ne);continue e}if(U++,Z===void 0){Z=[];for(let Q=0;Q<W;Q++)Z.push(M.getOptimizedTransition(Q));}for(let Q=0;Q<le.numberOfOptimizedTransitions;Q++){let _e=le.getOptimizedTransition(Q).target;Z.push(new x.EpsilonTransition(_e));}}if(Z!==void 0){if(M.isOptimized)for(;M.numberOfOptimizedTransitions>0;)M.removeOptimizedTransition(M.numberOfOptimizedTransitions-1);for(let W of Z)M.addOptimizedTransition(W);}}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+U+" transitions by combining chained epsilon transitions."),U}static optimizeSets(ee,U){if(U)return 0;let M=0,Z=ee.decisionToState;for(let W of Z){let ne=new v.IntervalSet;for(let be=0;be<W.numberOfOptimizedTransitions;be++){let et=W.getOptimizedTransition(be);if(!(et instanceof x.EpsilonTransition)||et.target.numberOfOptimizedTransitions!==1)continue;let Oe=et.target.getOptimizedTransition(0);Oe.target instanceof p.BlockEndState&&(Oe instanceof k.NotSetTransition||(Oe instanceof u.AtomTransition||Oe instanceof I.RangeTransition||Oe instanceof H.SetTransition)&&ne.add(be));}if(ne.size<=1)continue;let le=[];for(let be=0;be<W.numberOfOptimizedTransitions;be++)ne.contains(be)||le.push(W.getOptimizedTransition(be));let Q=W.getOptimizedTransition(ne.minElement).target.getOptimizedTransition(0).target,_e=new v.IntervalSet;for(let be of ne.intervals)for(let et=be.a;et<=be.b;et++){let Oe=W.getOptimizedTransition(et).target.getOptimizedTransition(0);if(Oe instanceof k.NotSetTransition)throw new Error("Not yet implemented.");_e.addAll(Oe.label);}let De;if(_e.intervals.length===1)if(_e.size===1)De=new u.AtomTransition(Q,_e.minElement);else {let be=_e.intervals[0];De=new I.RangeTransition(Q,be.a,be.b);}else De=new H.SetTransition(Q,_e);let ge=new h.BasicState;if(ge.setRuleIndex(W.ruleIndex),ee.addState(ge),ge.addTransition(De),le.push(new x.EpsilonTransition(ge)),M+=W.numberOfOptimizedTransitions-le.length,W.isOptimized)for(;W.numberOfOptimizedTransitions>0;)W.removeOptimizedTransition(W.numberOfOptimizedTransitions-1);for(let be of le)W.addOptimizedTransition(be);}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+M+" paths by collapsing sets."),M}static identifyTailCalls(ee){for(let U of ee.states){for(let M=0;M<U.numberOfTransitions;M++){let Z=U.transition(M);Z instanceof A.RuleTransition&&(Z.tailCall=this.testTailCall(ee,Z,!1),Z.optimizedTailCall=this.testTailCall(ee,Z,!0));}if(U.isOptimized)for(let M=0;M<U.numberOfOptimizedTransitions;M++){let Z=U.getOptimizedTransition(M);Z instanceof A.RuleTransition&&(Z.tailCall=this.testTailCall(ee,Z,!1),Z.optimizedTailCall=this.testTailCall(ee,Z,!0));}}}static testTailCall(ee,U,M){if(!M&&U.tailCall||M&&U.optimizedTailCall)return !0;let Z=new c.BitSet(ee.states.length),W=[];for(W.push(U.followState);;){let ne=W.pop();if(!ne)break;if(Z.get(ne.stateNumber)||ne instanceof q.RuleStopState)continue;if(!ne.onlyHasEpsilonTransitions)return !1;let le=M?ne.numberOfOptimizedTransitions:ne.numberOfTransitions;for(let Q=0;Q<le;Q++){let _e=M?ne.getOptimizedTransition(Q):ne.transition(Q);if(_e.serializationType!==1)return !1;W.push(_e.target);}}return !0}static toInt(ee){return ee}static toInt32(ee,U){return (ee[U]|ee[U+1]<<16)>>>0}static toUUID(ee,U){let M=J.toInt32(ee,U),Z=J.toInt32(ee,U+2),W=J.toInt32(ee,U+4),ne=J.toInt32(ee,U+6);return new G.UUID(ne,W,Z,M)}edgeFactory(ee,U,M,Z,W,ne,le,Q){let _e=ee.states[Z];switch(U){case 1:return new x.EpsilonTransition(_e);case 2:return le!==0?new I.RangeTransition(_e,j.Token.EOF,ne):new I.RangeTransition(_e,W,ne);case 3:return new A.RuleTransition(ee.states[W],ne,le,_e);case 4:return new L.PredicateTransition(_e,W,ne,le!==0);case 10:return new R.PrecedencePredicateTransition(_e,W);case 5:return le!==0?new u.AtomTransition(_e,j.Token.EOF):new u.AtomTransition(_e,W);case 6:return new i.ActionTransition(_e,W,ne,le!==0);case 7:return new H.SetTransition(_e,Q[W]);case 8:return new k.NotSetTransition(_e,Q[W]);case 9:return new oe.WildcardTransition(_e)}throw new Error("The specified transition type is not valid.")}stateFactory(ee,U){let M;switch(ee){case a.ATNStateType.INVALID_TYPE:return new g.InvalidState;case a.ATNStateType.BASIC:M=new h.BasicState;break;case a.ATNStateType.RULE_START:M=new K.RuleStartState;break;case a.ATNStateType.BLOCK_START:M=new l.BasicBlockStartState;break;case a.ATNStateType.PLUS_BLOCK_START:M=new T.PlusBlockStartState;break;case a.ATNStateType.STAR_BLOCK_START:M=new B.StarBlockStartState;break;case a.ATNStateType.TOKEN_START:M=new $.TokensStartState;break;case a.ATNStateType.RULE_STOP:M=new q.RuleStopState;break;case a.ATNStateType.BLOCK_END:M=new p.BlockEndState;break;case a.ATNStateType.STAR_LOOP_BACK:M=new C.StarLoopbackState;break;case a.ATNStateType.STAR_LOOP_ENTRY:M=new P.StarLoopEntryState;break;case a.ATNStateType.PLUS_LOOP_BACK:M=new S.PlusLoopbackState;break;case a.ATNStateType.LOOP_END:M=new te.LoopEndState;break;default:let Z=`The specified state type ${ee} is not valid.`;throw new Error(Z)}return M.ruleIndex=U,M}lexerActionFactory(ee,U,M){switch(ee){case 0:return new b.LexerChannelAction(U);case 1:return new E.LexerCustomAction(U,M);case 2:return new w.LexerModeAction(U);case 3:return D.LexerMoreAction.INSTANCE;case 4:return N.LexerPopModeAction.INSTANCE;case 5:return new F.LexerPushModeAction(U);case 6:return V.LexerSkipAction.INSTANCE;case 7:return new X.LexerTypeAction(U);default:let Z=`The specified lexer action type ${ee} is not valid.`;throw new Error(Z)}}};J.BASE_SERIALIZED_UUID=G.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),J.ADDED_LEXER_ACTIONS=G.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),J.ADDED_UNICODE_SMP=G.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),J.SUPPORTED_UUIDS=[J.BASE_SERIALIZED_UUID,J.ADDED_LEXER_ACTIONS,J.ADDED_UNICODE_SMP],J.SERIALIZED_UUID=J.ADDED_UNICODE_SMP,e([ae.NotNull],J.prototype,"deserializationOptions",void 0),e([r(0,ae.NotNull)],J.prototype,"deserialize",null),e([r(0,ae.NotNull)],J.prototype,"markPrecedenceDecisions",null),e([ae.NotNull,r(0,ae.NotNull)],J.prototype,"edgeFactory",null),t.ATNDeserializer=J;}),g7=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h},r=t&&t.__param||function(o,s){return function(a,u){s(a,u,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseInfo=void 0;var i=ce(),n=class{constructor(s){this.atnSimulator=s;}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let s=this.atnSimulator.getDecisionInfo(),a=[];for(let u=0;u<s.length;u++)s[u].LL_Fallback>0&&a.push(u);return a}getTotalTimeInPrediction(){let s=this.atnSimulator.getDecisionInfo(),a=0;for(let u of s)a+=u.timeInPrediction;return a}getTotalSLLLookaheadOps(){let s=this.atnSimulator.getDecisionInfo(),a=0;for(let u of s)a+=u.SLL_TotalLook;return a}getTotalLLLookaheadOps(){let s=this.atnSimulator.getDecisionInfo(),a=0;for(let u of s)a+=u.LL_TotalLook;return a}getTotalSLLATNLookaheadOps(){let s=this.atnSimulator.getDecisionInfo(),a=0;for(let u of s)a+=u.SLL_ATNTransitions;return a}getTotalLLATNLookaheadOps(){let s=this.atnSimulator.getDecisionInfo(),a=0;for(let u of s)a+=u.LL_ATNTransitions;return a}getTotalATNLookaheadOps(){let s=this.atnSimulator.getDecisionInfo(),a=0;for(let u of s)a+=u.SLL_ATNTransitions,a+=u.LL_ATNTransitions;return a}getDFASize(s){if(s)return this.atnSimulator.atn.decisionToDFA[s].states.size;{let a=0,u=this.atnSimulator.atn.decisionToDFA;for(let l=0;l<u.length;l++)a+=this.getDFASize(l);return a}}};e([i.NotNull],n.prototype,"getDecisionInfo",null),e([i.NotNull],n.prototype,"getLLDecisions",null),n=e([r(0,i.NotNull)],n),t.ParseInfo=n;}),Cv=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyParserErrorListener=void 0;var r=k0(),i=ce(),n=class extends r.ProxyErrorListener{constructor(o){super(o);}reportAmbiguity(o,s,a,u,l,h,c){this.getDelegates().forEach(p=>{p.reportAmbiguity&&p.reportAmbiguity(o,s,a,u,l,h,c);});}reportAttemptingFullContext(o,s,a,u,l,h){this.getDelegates().forEach(c=>{c.reportAttemptingFullContext&&c.reportAttemptingFullContext(o,s,a,u,l,h);});}reportContextSensitivity(o,s,a,u,l,h){this.getDelegates().forEach(c=>{c.reportContextSensitivity&&c.reportContextSensitivity(o,s,a,u,l,h);});}};e([i.Override],n.prototype,"reportAmbiguity",null),e([i.Override],n.prototype,"reportAttemptingFullContext",null),e([i.Override],n.prototype,"reportContextSensitivity",null),t.ProxyParserErrorListener=n;}),y7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSupplementaryCodePoint=t.isLowSurrogate=t.isHighSurrogate=void 0;function e(n){return n>=55296&&n<=56319}t.isHighSurrogate=e;function r(n){return n>=56320&&n<=57343}t.isLowSurrogate=r;function i(n){return n>=65536}t.isSupplementaryCodePoint=i;}),Av=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodePointBuffer=void 0;var e=me("assert"),r=y7(),i=class{constructor(n,o){this.buffer=n,this._position=0,this._size=o;}static withArray(n){return new i(n,n.length)}get position(){return this._position}set position(n){if(n<0||n>this._size)throw new RangeError;this._position=n;}get remaining(){return this._size-this.position}get(n){return this.buffer[n]}array(){return this.buffer.slice(0,this._size)}static builder(n){return new i.Builder(n)}};t.CodePointBuffer=i,function(n){let o;(function(a){a[a.BYTE=0]="BYTE",a[a.CHAR=1]="CHAR",a[a.INT=2]="INT";})(o||(o={}));class s{constructor(u){this.type=0,this.buffer=new Uint8Array(u),this.prevHighSurrogate=-1,this.position=0;}build(){return new n(this.buffer,this.position)}static roundUpToNextPowerOfTwo(u){let l=32-Math.clz32(u-1);return Math.pow(2,l)}ensureRemaining(u){switch(this.type){case 0:if(this.buffer.length-this.position<u){let l=s.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Uint8Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break;case 1:if(this.buffer.length-this.position<u){let l=s.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Uint16Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break;case 2:if(this.buffer.length-this.position<u){let l=s.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Int32Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break}}append(u){this.ensureRemaining(u.length),this.appendArray(u);}appendArray(u){switch(this.type){case 0:this.appendArrayByte(u);break;case 1:this.appendArrayChar(u);break;case 2:this.appendArrayInt(u);break}}appendArrayByte(u){e(this.prevHighSurrogate===-1);let l=u,h=0,c=u.length,p=this.buffer,f=this.position;for(;h<c;){let m=l[h];if(m<=255)p[f]=m;else if(u=u.subarray(h,c),this.position=f,r.isHighSurrogate(m)){this.byteToIntBuffer(u.length),this.appendArrayInt(u);return}else {this.byteToCharBuffer(u.length),this.appendArrayChar(u);return}h++,f++;}this.position=f;}appendArrayChar(u){e(this.prevHighSurrogate===-1);let l=u,h=0,c=u.length,p=this.buffer,f=this.position;for(;h<c;){let m=l[h];if(!r.isHighSurrogate(m))p[f]=m;else {u=u.subarray(h,c),this.position=f,this.charToIntBuffer(u.length),this.appendArrayInt(u);return}h++,f++;}this.position=f;}appendArrayInt(u){let l=u,h=0,c=u.length,p=this.buffer,f=this.position;for(;h<c;){let m=l[h];h++,this.prevHighSurrogate!==-1?r.isLowSurrogate(m)?(p[f]=String.fromCharCode(this.prevHighSurrogate,m).codePointAt(0),f++,this.prevHighSurrogate=-1):(p[f]=this.prevHighSurrogate,f++,r.isHighSurrogate(m)?this.prevHighSurrogate=m:(p[f]=m,f++,this.prevHighSurrogate=-1)):r.isHighSurrogate(m)?this.prevHighSurrogate=m:(p[f]=m,f++);}this.prevHighSurrogate!==-1&&(p[f]=this.prevHighSurrogate,f++),this.position=f;}byteToCharBuffer(u){let l=new Uint16Array(Math.max(this.position+u,this.buffer.length>>1));l.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=l;}byteToIntBuffer(u){let l=new Int32Array(Math.max(this.position+u,this.buffer.length>>2));l.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=l;}charToIntBuffer(u){let l=new Int32Array(Math.max(this.position+u,this.buffer.length>>1));l.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=l;}}n.Builder=s;}(i=t.CodePointBuffer||(t.CodePointBuffer={}));}),wv=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.CodePointCharStream=void 0;var r=me("assert"),i=Qi(),n=pr(),o=ce(),s=class{constructor(a,u,l,h){r(u===0),this._array=a,this._size=l,this._name=h,this._position=0;}get internalStorage(){return this._array}static fromBuffer(a,u){return (u===void 0||u.length===0)&&(u=i.IntStream.UNKNOWN_SOURCE_NAME),new s(a.array(),a.position,a.remaining,u)}consume(){if(this._size-this._position===0)throw r(this.LA(1)===i.IntStream.EOF),new RangeError("cannot consume EOF");this._position++;}get index(){return this._position}get size(){return this._size}mark(){return -1}release(a){}seek(a){this._position=a;}get sourceName(){return this._name}toString(){return this.getText(n.Interval.of(0,this.size-1))}LA(a){let u;switch(Math.sign(a)){case-1:return u=this.index+a,u<0?i.IntStream.EOF:this._array[u];case 0:return 0;case 1:return u=this.index+a-1,u>=this.size?i.IntStream.EOF:this._array[u]}throw new RangeError("Not reached")}getText(a){let u=Math.min(a.a,this.size),l=Math.min(a.b-a.a+1,this.size-u);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(u,u+l))):String.fromCharCode(...Array.from(this._array.subarray(u,u+l)))}};e([o.Override],s.prototype,"consume",null),e([o.Override],s.prototype,"index",null),e([o.Override],s.prototype,"size",null),e([o.Override],s.prototype,"mark",null),e([o.Override],s.prototype,"release",null),e([o.Override],s.prototype,"seek",null),e([o.Override],s.prototype,"sourceName",null),e([o.Override],s.prototype,"toString",null),e([o.Override],s.prototype,"LA",null),e([o.Override],s.prototype,"getText",null),t.CodePointCharStream=s;}),U0=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharStreams=void 0;var e=Av(),r=wv(),i=Qi();(function(o){function s(a,u){(u===void 0||u.length===0)&&(u=i.IntStream.UNKNOWN_SOURCE_NAME);let l=e.CodePointBuffer.builder(a.length),h=new Uint16Array(a.length);for(let c=0;c<a.length;c++)h[c]=a.charCodeAt(c);return l.append(h),r.CodePointCharStream.fromBuffer(l.build(),u)}o.fromString=s;})(t.CharStreams||(t.CharStreams={}));}),Dv=re(t=>{var e=t&&t.__decorate||function(h,c,p,f){var m=arguments.length,_=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,p):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(h,c,p,f);else for(var v=h.length-1;v>=0;v--)(x=h[v])&&(_=(m<3?x(_):m>3?x(c,p,_):x(c,p))||_);return m>3&&_&&Object.defineProperty(c,p,_),_},r=t&&t.__param||function(h,c){return function(p,f){c(p,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferedTokenStream=void 0;var i=me("assert"),n=wa(),o=pr(),s=on(),a=ce(),u=Ct(),l=class{constructor(c){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,c==null)throw new Error("tokenSource cannot be null");this._tokenSource=c;}get tokenSource(){return this._tokenSource}set tokenSource(c){this._tokenSource=c,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1;}get index(){return this.p}mark(){return 0}release(c){}seek(c){this.lazyInit(),this.p=this.adjustSeekIndex(c);}get size(){return this.tokens.length}consume(){let c;if(this.p>=0?this.fetchedEOF?c=this.p<this.tokens.length-1:c=this.p<this.tokens.length:c=!1,!c&&this.LA(1)===u.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1));}sync(c){i(c>=0);let p=c-this.tokens.length+1;return p>0?this.fetch(p)>=p:!0}fetch(c){if(this.fetchedEOF)return 0;for(let p=0;p<c;p++){let f=this.tokenSource.nextToken();if(this.isWritableToken(f)&&(f.tokenIndex=this.tokens.length),this.tokens.push(f),f.type===u.Token.EOF)return this.fetchedEOF=!0,p+1}return c}get(c){if(c<0||c>=this.tokens.length)throw new RangeError("token index "+c+" out of range 0.."+(this.tokens.length-1));return this.tokens[c]}getRange(c,p){if(c<0||p<0)return [];this.lazyInit();let f=new Array;p>=this.tokens.length&&(p=this.tokens.length-1);for(let m=c;m<=p;m++){let _=this.tokens[m];if(_.type===u.Token.EOF)break;f.push(_);}return f}LA(c){let p=this.LT(c);return p?p.type:u.Token.INVALID_TYPE}tryLB(c){if(!(this.p-c<0))return this.tokens[this.p-c]}LT(c){let p=this.tryLT(c);if(p===void 0)throw new RangeError("requested lookback index out of range");return p}tryLT(c){if(this.lazyInit(),c===0)throw new RangeError("0 is not a valid lookahead index");if(c<0)return this.tryLB(-c);let p=this.p+c-1;return this.sync(p),p>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[p]}adjustSeekIndex(c){return c}lazyInit(){this.p===-1&&this.setup();}setup(){this.sync(0),this.p=this.adjustSeekIndex(0);}getTokens(c,p,f){if(this.lazyInit(),c===void 0)return i(p===void 0&&f===void 0),this.tokens;if(p===void 0&&(p=this.tokens.length-1),c<0||p>=this.tokens.length||p<0||c>=this.tokens.length)throw new RangeError("start "+c+" or stop "+p+" not in 0.."+(this.tokens.length-1));if(c>p)return [];if(f===void 0)return this.tokens.slice(c,p+1);typeof f=="number"&&(f=new Set().add(f));let m=f,_=this.tokens.slice(c,p+1);return _=_.filter(x=>m.has(x.type)),_}nextTokenOnChannel(c,p){if(this.sync(c),c>=this.size)return this.size-1;let f=this.tokens[c];for(;f.channel!==p;){if(f.type===u.Token.EOF)return c;c++,this.sync(c),f=this.tokens[c];}return c}previousTokenOnChannel(c,p){if(this.sync(c),c>=this.size)return this.size-1;for(;c>=0;){let f=this.tokens[c];if(f.type===u.Token.EOF||f.channel===p)return c;c--;}return c}getHiddenTokensToRight(c,p=-1){if(this.lazyInit(),c<0||c>=this.tokens.length)throw new RangeError(c+" not in 0.."+(this.tokens.length-1));let f=this.nextTokenOnChannel(c+1,s.Lexer.DEFAULT_TOKEN_CHANNEL),m,_=c+1;return f===-1?m=this.size-1:m=f,this.filterForChannel(_,m,p)}getHiddenTokensToLeft(c,p=-1){if(this.lazyInit(),c<0||c>=this.tokens.length)throw new RangeError(c+" not in 0.."+(this.tokens.length-1));if(c===0)return [];let f=this.previousTokenOnChannel(c-1,s.Lexer.DEFAULT_TOKEN_CHANNEL);if(f===c-1)return [];let m=f+1,_=c-1;return this.filterForChannel(m,_,p)}filterForChannel(c,p,f){let m=new Array;for(let _=c;_<=p;_++){let x=this.tokens[_];f===-1?x.channel!==s.Lexer.DEFAULT_TOKEN_CHANNEL&&m.push(x):x.channel===f&&m.push(x);}return m}get sourceName(){return this.tokenSource.sourceName}getText(c){c===void 0?c=o.Interval.of(0,this.size-1):c instanceof o.Interval||(c=c.sourceInterval);let p=c.a,f=c.b;if(p<0||f<0)return "";this.fill(),f>=this.tokens.length&&(f=this.tokens.length-1);let m="";for(let _=p;_<=f;_++){let x=this.tokens[_];if(x.type===u.Token.EOF)break;m+=x.text;}return m.toString()}getTextFromRange(c,p){return this.isToken(c)&&this.isToken(p)?this.getText(o.Interval.of(c.tokenIndex,p.tokenIndex)):""}fill(){this.lazyInit();let c=1e3;for(;;)if(this.fetch(c)<c)return}isWritableToken(c){return c instanceof n.CommonToken}isToken(c){return c instanceof n.CommonToken}};e([a.NotNull],l.prototype,"_tokenSource",void 0),e([a.Override],l.prototype,"tokenSource",null),e([a.Override],l.prototype,"index",null),e([a.Override],l.prototype,"mark",null),e([a.Override],l.prototype,"release",null),e([a.Override],l.prototype,"seek",null),e([a.Override],l.prototype,"size",null),e([a.Override],l.prototype,"consume",null),e([a.Override],l.prototype,"get",null),e([a.Override],l.prototype,"LA",null),e([a.NotNull,a.Override],l.prototype,"LT",null),e([a.Override],l.prototype,"sourceName",null),e([a.NotNull,a.Override],l.prototype,"getText",null),e([a.NotNull,a.Override],l.prototype,"getTextFromRange",null),l=e([r(0,a.NotNull)],l),t.BufferedTokenStream=l;}),V0=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonTokenStream=void 0;var i=Dv(),n=ce(),o=Ct(),s=class extends i.BufferedTokenStream{constructor(u,l=o.Token.DEFAULT_CHANNEL){super(u),this.channel=l;}adjustSeekIndex(u){return this.nextTokenOnChannel(u,this.channel)}tryLB(u){if(this.p-u<0)return;let l=this.p,h=1;for(;h<=u&&l>0;)l=this.previousTokenOnChannel(l-1,this.channel),h++;if(!(l<0))return this.tokens[l]}tryLT(u){if(this.lazyInit(),u===0)throw new RangeError("0 is not a valid lookahead index");if(u<0)return this.tryLB(-u);let l=this.p,h=1;for(;h<u;)this.sync(l+1)&&(l=this.nextTokenOnChannel(l+1,this.channel)),h++;return this.tokens[l]}getNumberOfOnChannelTokens(){let u=0;this.fill();for(let l of this.tokens)if(l.channel===this.channel&&u++,l.type===o.Token.EOF)break;return u}};e([n.Override],s.prototype,"adjustSeekIndex",null),e([n.Override],s.prototype,"tryLB",null),e([n.Override],s.prototype,"tryLT",null),s=e([r(0,n.NotNull)],s),t.CommonTokenStream=s;}),Sv=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ListTokenSource=void 0;var i=P0(),n=ce(),o=Ct(),s=class{constructor(u,l){if(this.i=0,this._factory=i.CommonTokenFactory.DEFAULT,u==null)throw new Error("tokens cannot be null");this.tokens=u,this._sourceName=l;}get charPositionInLine(){if(this.i<this.tokens.length)return this.tokens[this.i].charPositionInLine;if(this.eofToken!=null)return this.eofToken.charPositionInLine;if(this.tokens.length>0){let u=this.tokens[this.tokens.length-1],l=u.text;if(l!=null){let h=l.lastIndexOf(`
|
|
71
|
+
`);if(h>=0)return l.length-h-1}return u.charPositionInLine+u.stopIndex-u.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let l=-1;if(this.tokens.length>0){let c=this.tokens[this.tokens.length-1].stopIndex;c!==-1&&(l=c+1);}let h=Math.max(-1,l-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},o.Token.EOF,"EOF",o.Token.DEFAULT_CHANNEL,l,h,this.line,this.charPositionInLine);}return this.eofToken}let u=this.tokens[this.i];return this.i===this.tokens.length-1&&u.type===o.Token.EOF&&(this.eofToken=u),this.i++,u}get line(){if(this.i<this.tokens.length)return this.tokens[this.i].line;if(this.eofToken!=null)return this.eofToken.line;if(this.tokens.length>0){let u=this.tokens[this.tokens.length-1],l=u.line,h=u.text;if(h!=null)for(let c=0;c<h.length;c++)h.charAt(c)===`
|
|
72
|
+
`&&l++;return l}return 1}get inputStream(){if(this.i<this.tokens.length)return this.tokens[this.i].inputStream;if(this.eofToken!=null)return this.eofToken.inputStream;if(this.tokens.length>0)return this.tokens[this.tokens.length-1].inputStream}get sourceName(){if(this._sourceName)return this._sourceName;let u=this.inputStream;return u!=null?u.sourceName:"List"}set tokenFactory(u){this._factory=u;}get tokenFactory(){return this._factory}};e([n.Override],s.prototype,"charPositionInLine",null),e([n.Override],s.prototype,"nextToken",null),e([n.Override],s.prototype,"line",null),e([n.Override],s.prototype,"inputStream",null),e([n.Override],s.prototype,"sourceName",null),e([n.Override,n.NotNull,r(0,n.NotNull)],s.prototype,"tokenFactory",null),s=e([r(0,n.NotNull)],s),t.ListTokenSource=s;}),x7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MultiMap=void 0;var e=class extends Map{constructor(){super();}map(r,i){let n=super.get(r);n||(n=[],super.set(r,n)),n.push(i);}getPairs(){let r=[];return this.forEach((i,n)=>{i.forEach(o=>{r.push([n,o]);});}),r}};t.MultiMap=e;}),Rv=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParseCancellationException=void 0;var e=class extends Error{constructor(r){super(r.message),this.cause=r,this.stack=r.stack;}getCause(){return this.cause}};t.ParseCancellationException=e;}),Nv=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.InterpreterRuleContext=void 0;var r=ce(),i=Ur(),n=class extends i.ParserRuleContext{constructor(o,s,a){a!==void 0?super(s,a):super(),this._ruleIndex=o;}get ruleIndex(){return this._ruleIndex}};e([r.Override],n.prototype,"ruleIndex",null),t.InterpreterRuleContext=n;}),Ov=re(t=>{var e=t&&t.__decorate||function(g,b,E,w){var D=arguments.length,N=D<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,E):w,F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,b,E,w);else for(var V=g.length-1;V>=0;V--)(F=g[V])&&(N=(D<3?F(N):D>3?F(b,E,N):F(b,E))||N);return D>3&&N&&Object.defineProperty(b,E,N),N},r=t&&t.__param||function(g,b){return function(E,w){b(E,w,g);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserInterpreter=void 0;var i=Ei(),n=Zt(),o=nn(),s=Xl(),a=Jl(),u=Nv(),l=Ev(),h=ce(),c=ce(),p=Fa(),f=Na(),m=en(),_=M0(),x=Ct(),v=class u0 extends p.Parser{constructor(b,E,w,D,N){if(super(b instanceof u0?b.inputStream:N),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,b instanceof u0){let F=b;this._grammarFileName=F._grammarFileName,this._atn=F._atn,this.pushRecursionContextStates=F.pushRecursionContextStates,this._ruleNames=F._ruleNames,this._vocabulary=F._vocabulary,this.interpreter=new f.ParserATNSimulator(this._atn,this);}else {E=E,w=w,D=D,this._grammarFileName=b,this._atn=D,this._ruleNames=w.slice(0),this._vocabulary=E,this.pushRecursionContextStates=new o.BitSet(D.states.length);for(let F of D.states)F instanceof _.StarLoopEntryState&&F.precedenceRuleDecision&&this.pushRecursionContextStates.set(F.stateNumber);this.interpreter=new f.ParserATNSimulator(D,this);}}reset(b){b===void 0?super.reset():super.reset(b),this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0;}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(b){let E=this._atn.ruleToStartState[b];for(this._rootContext=this.createInterpreterRuleContext(void 0,i.ATNState.INVALID_STATE_NUMBER,b),E.isPrecedenceRule?this.enterRecursionRule(this._rootContext,E.stateNumber,b,0):this.enterRule(this._rootContext,E.stateNumber,b);;){let w=this.atnState;switch(w.stateType){case n.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(E.isPrecedenceRule){let D=this._ctx,N=this._parentContextStack.pop();return this.unrollRecursionContexts(N[0]),D}else return this.exitRule(),this._rootContext;this.visitRuleStopState(w);break;default:try{this.visitState(w);}catch(D){if(D instanceof m.RecognitionException)this.state=this._atn.ruleToStopState[w.ruleIndex].stateNumber,this.context.exception=D,this.errorHandler.reportError(this,D),this.recover(D);else throw D}break}}}enterRecursionRule(b,E,w,D){this._parentContextStack.push([this._ctx,b.invokingState]),super.enterRecursionRule(b,E,w,D);}get atnState(){return this._atn.states[this.state]}visitState(b){let E=1;b.numberOfTransitions>1&&(E=this.visitDecisionState(b));let w=b.transition(E-1);switch(w.serializationType){case 1:if(this.pushRecursionContextStates.get(b.stateNumber)&&!(w.target instanceof l.LoopEndState)){let te=this._parentContextStack[this._parentContextStack.length-1],ae=this.createInterpreterRuleContext(te[0],te[1],this._ctx.ruleIndex);this.pushNewRecursionContext(ae,this._atn.ruleToStartState[b.ruleIndex].stateNumber,this._ctx.ruleIndex);}break;case 5:this.match(w._label);break;case 2:case 7:case 8:w.matches(this._input.LA(1),x.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let D=w.target,N=D.ruleIndex,F=this.createInterpreterRuleContext(this._ctx,b.stateNumber,N);D.isPrecedenceRule?this.enterRecursionRule(F,D.stateNumber,N,w.precedence):this.enterRule(F,w.target.stateNumber,N);break;case 4:let V=w;if(!this.sempred(this._ctx,V.ruleIndex,V.predIndex))throw new s.FailedPredicateException(this);break;case 6:let X=w;this.action(this._ctx,X.ruleIndex,X.actionIndex);break;case 10:if(!this.precpred(this._ctx,w.precedence)){let te=w.precedence;throw new s.FailedPredicateException(this,`precpred(_ctx, ${te})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=w.target.stateNumber;}visitDecisionState(b){let E;this.errorHandler.sync(this);let w=b.decision;return w===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(E=this.overrideDecisionAlt,this.overrideDecisionReached=!0):E=this.interpreter.adaptivePredict(this._input,w,this._ctx),E}createInterpreterRuleContext(b,E,w){return new u.InterpreterRuleContext(w,b,E)}visitRuleStopState(b){if(this._atn.ruleToStartState[b.ruleIndex].isPrecedenceRule){let D=this._parentContextStack.pop();this.unrollRecursionContexts(D[0]),this.state=D[1];}else this.exitRule();let w=this._atn.states[this.state].transition(0);this.state=w.followState.stateNumber;}addDecisionOverride(b,E,w){this.overrideDecision=b,this.overrideDecisionInputIndex=E,this.overrideDecisionAlt=w;}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(b){let E=this._input.index;if(this.errorHandler.recover(this,b),this._input.index===E){let w=b.getOffendingToken();if(!w)throw new Error("Expected exception to have an offending token");let D=w.tokenSource,N=D!==void 0?D.inputStream:void 0,F={source:D,stream:N};if(b instanceof a.InputMismatchException){let V=b.expectedTokens;if(V===void 0)throw new Error("Expected the exception to provide expected tokens");let X=x.Token.INVALID_TYPE;V.isNil||(X=V.minElement);let te=this.tokenFactory.create(F,X,w.text,x.Token.DEFAULT_CHANNEL,-1,-1,w.line,w.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,te));}else {w.tokenSource;let X=this.tokenFactory.create(F,x.Token.INVALID_TYPE,w.text,x.Token.DEFAULT_CHANNEL,-1,-1,w.line,w.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,X));}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};e([h.NotNull],v.prototype,"_vocabulary",void 0),e([c.Override],v.prototype,"reset",null),e([c.Override],v.prototype,"atn",null),e([c.Override],v.prototype,"vocabulary",null),e([c.Override],v.prototype,"ruleNames",null),e([c.Override],v.prototype,"grammarFileName",null),e([c.Override],v.prototype,"enterRecursionRule",null),v=e([r(1,h.NotNull)],v),t.ParserInterpreter=v;}),v7=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h},r=t&&t.__param||function(o,s){return function(a,u){s(a,u,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreeMatch=void 0;var i=ce(),n=class{constructor(s,a,u,l){if(!s)throw new Error("tree cannot be null");if(!a)throw new Error("pattern cannot be null");if(!u)throw new Error("labels cannot be null");this._tree=s,this._pattern=a,this._labels=u,this._mismatchedNode=l;}get(s){let a=this._labels.get(s);if(!(!a||a.length===0))return a[a.length-1]}getAll(s){let a=this._labels.get(s);return a||[]}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return !this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return `Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};e([i.NotNull,r(0,i.NotNull)],n.prototype,"getAll",null),e([i.NotNull],n.prototype,"labels",null),e([i.NotNull],n.prototype,"pattern",null),e([i.NotNull],n.prototype,"tree",null),e([i.Override],n.prototype,"toString",null),n=e([r(0,i.NotNull),r(1,i.NotNull),r(2,i.NotNull)],n),t.ParseTreeMatch=n;}),E7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XPathLexer=void 0;var e=oh(),r=on(),i=ih(),n=sn(),o=Qr(),s=class extends r.Lexer{constructor(a){super(a),this._interp=new i.LexerATNSimulator(s._ATN,this);}get vocabulary(){return s.VOCABULARY}get grammarFileName(){return "XPathLexer.g4"}get ruleNames(){return s.ruleNames}get serializedATN(){return s._serializedATN}get channelNames(){return s.channelNames}get modeNames(){return s.modeNames}action(a,u,l){switch(u){case 4:this.ID_action(a,l);break}}ID_action(a,u){switch(u){case 0:let l=this.text;l.charAt(0)===l.charAt(0).toUpperCase()?this.type=s.TOKEN_REF:this.type=s.RULE_REF;break}}static get _ATN(){return s.__ATN||(s.__ATN=new e.ATNDeserializer().deserialize(o.toCharArray(s._serializedATN))),s.__ATN}};t.XPathLexer=s,s.TOKEN_REF=1,s.RULE_REF=2,s.ANYWHERE=3,s.ROOT=4,s.WILDCARD=5,s.BANG=6,s.ID=7,s.STRING=8,s.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],s.modeNames=["DEFAULT_MODE"],s.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],s._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],s._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],s.VOCABULARY=new n.VocabularyImpl(s._LITERAL_NAMES,s._SYMBOLIC_NAMES,[]),s._serializedATNSegments=2,s._serializedATNSegment0=`\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241
|
|
73
|
+
2\b \x07 \x07\b \b \x07
|
|
74
|
+
\f"\v\x07\x07\b\b \x07 ,
|
|
75
|
+
\f /\v -
|
|
76
|
+
\x07\x07 \b\v \r
|
|
77
|
+
\u02B6
|
|
78
|
+
2;C\\aac|\x81\xA1\xAC\xAC\xAF\xAF\xB7\xB7\xBC\xBC\xC2\xD8\xDA\xF8\xFA\u02C3\u02C8\u02D3\u02E2\u02E6\u02EE\u02EE\u02F0\u02F0\u0302\u0376\u0378\u0379\u037C\u037F\u0381\u0381\u0388\u0388\u038A\u038C\u038E\u038E\u0390\u03A3\u03A5\u03F7\u03F9\u0483\u0485\u0489\u048C\u0531\u0533\u0558\u055B\u055B\u0563\u0589\u0593\u05BF\u05C1\u05C1\u05C3\u05C4\u05C6\u05C7\u05C9\u05C9\u05D2\u05EC\u05F2\u05F4\u0602\u0607\u0612\u061C\u061E\u061E\u0622\u066B\u0670\u06D5\u06D7\u06DF\u06E1\u06EA\u06EC\u06FE\u0701\u0701\u0711\u074C\u074F\u07B3\u07C2\u07F7\u07FC\u07FC\u0802\u082F\u0842\u085D\u08A2\u08B6\u08B8\u08BF\u08D6\u0965\u0968\u0971\u0973\u0985\u0987\u098E\u0991\u0992\u0995\u09AA\u09AC\u09B2\u09B4\u09B4\u09B8\u09BB\u09BE\u09C6\u09C9\u09CA\u09CD\u09D0\u09D9\u09D9\u09DE\u09DF\u09E1\u09E5\u09E8\u09F3\u0A03\u0A05\u0A07\u0A0C\u0A11\u0A12\u0A15\u0A2A\u0A2C\u0A32\u0A34\u0A35\u0A37\u0A38\u0A3A\u0A3B\u0A3E\u0A3E\u0A40\u0A44\u0A49\u0A4A\u0A4D\u0A4F\u0A53\u0A53\u0A5B\u0A5E\u0A60\u0A60\u0A68\u0A77\u0A83\u0A85\u0A87\u0A8F\u0A91\u0A93\u0A95\u0AAA\u0AAC\u0AB2\u0AB4\u0AB5\u0AB7\u0ABB\u0ABE\u0AC7\u0AC9\u0ACB\u0ACD\u0ACF\u0AD2\u0AD2\u0AE2\u0AE5\u0AE8\u0AF1\u0AFB\u0AFB\u0B03\u0B05\u0B07\u0B0E\u0B11\u0B12\u0B15\u0B2A\u0B2C\u0B32\u0B34\u0B35\u0B37\u0B3B\u0B3E\u0B46\u0B49\u0B4A\u0B4D\u0B4F\u0B58\u0B59\u0B5E\u0B5F\u0B61\u0B65\u0B68\u0B71\u0B73\u0B73\u0B84\u0B85\u0B87\u0B8C\u0B90\u0B92\u0B94\u0B97\u0B9B\u0B9C\u0B9E\u0B9E\u0BA0\u0BA1\u0BA5\u0BA6\u0BAA\u0BAC\u0BB0\u0BBB\u0BC0\u0BC4\u0BC8\u0BCA\u0BCC\u0BCF\u0BD2\u0BD2\u0BD9\u0BD9\u0BE8\u0BF1\u0C02\u0C05\u0C07\u0C0E\u0C10\u0C12\u0C14\u0C2A\u0C2C\u0C3B\u0C3F\u0C46\u0C48\u0C4A\u0C4C\u0C4F\u0C57\u0C58\u0C5A\u0C5C\u0C62\u0C65\u0C68\u0C71\u0C82\u0C85\u0C87\u0C8E\u0C90\u0C92\u0C94\u0CAA\u0CAC\u0CB5\u0CB7\u0CBB\u0CBE\u0CC6\u0CC8\u0CCA\u0CCC\u0CCF\u0CD7\u0CD8\u0CE0\u0CE0\u0CE2\u0CE5\u0CE8\u0CF1\u0CF3\u0CF4\u0D03\u0D05\u0D07\u0D0E\u0D10\u0D12\u0D14\u0D3C\u0D3F\u0D46\u0D48\u0D4A\u0D4C\u0D50\u0D56\u0D59\u0D61\u0D65\u0D68\u0D71\u0D7C\u0D81\u0D84\u0D85\u0D87\u0D98\u0D9C\u0DB3\u0DB5\u0DBD\u0DBF\u0DBF\u0DC2\u0DC8\u0DCC\u0DCC\u0DD1\u0DD6\u0DD8\u0DD8\u0DDA\u0DE1\u0DE8\u0DF1\u0DF4\u0DF5\u0E03\u0E3C\u0E42\u0E50\u0E52\u0E5B\u0E83\u0E84\u0E86\u0E86\u0E89\u0E8A\u0E8C\u0E8C\u0E8F\u0E8F\u0E96\u0E99\u0E9B\u0EA1\u0EA3\u0EA5\u0EA7\u0EA7\u0EA9\u0EA9\u0EAC\u0EAD\u0EAF\u0EBB\u0EBD\u0EBF\u0EC2\u0EC6\u0EC8\u0EC8\u0ECA\u0ECF\u0ED2\u0EDB\u0EDE\u0EE1\u0F02\u0F02\u0F1A\u0F1B\u0F22\u0F2B\u0F37\u0F37\u0F39\u0F39\u0F3B\u0F3B\u0F40\u0F49\u0F4B\u0F6E\u0F73\u0F86\u0F88\u0F99\u0F9B\u0FBE\u0FC8\u0FC8\u1002\u104B\u1052\u109F\u10A2\u10C7\u10C9\u10C9\u10CF\u10CF\u10D2\u10FC\u10FE\u124A\u124C\u124F\u1252\u1258\u125A\u125A\u125C\u125F\u1262\u128A\u128C\u128F\u1292\u12B2\u12B4\u12B7\u12BA\u12C0\u12C2\u12C2\u12C4\u12C7\u12CA\u12D8\u12DA\u1312\u1314\u1317\u131A\u135C\u135F\u1361\u1382\u1391\u13A2\u13F7\u13FA\u13FF\u1403\u166E\u1671\u1681\u1683\u169C\u16A2\u16EC\u16F0\u16FA\u1702\u170E\u1710\u1716\u1722\u1736\u1742\u1755\u1762\u176E\u1770\u1772\u1774\u1775\u1782\u17D5\u17D9\u17D9\u17DE\u17DF\u17E2\u17EB\u180D\u1810\u1812\u181B\u1822\u1879\u1882\u18AC\u18B2\u18F7\u1902\u1920\u1922\u192D\u1932\u193D\u1948\u196F\u1972\u1976\u1982\u19AD\u19B2\u19CB\u19D2\u19DB\u1A02\u1A1D\u1A22\u1A60\u1A62\u1A7E\u1A81\u1A8B\u1A92\u1A9B\u1AA9\u1AA9\u1AB2\u1ABF\u1B02\u1B4D\u1B52\u1B5B\u1B6D\u1B75\u1B82\u1BF5\u1C02\u1C39\u1C42\u1C4B\u1C4F\u1C7F\u1C82\u1C8A\u1CD2\u1CD4\u1CD6\u1CF8\u1CFA\u1CFB\u1D02\u1DF7\u1DFD\u1F17\u1F1A\u1F1F\u1F22\u1F47\u1F4A\u1F4F\u1F52\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F5F\u1F61\u1F7F\u1F82\u1FB6\u1FB8\u1FBE\u1FC0\u1FC0\u1FC4\u1FC6\u1FC8\u1FCE\u1FD2\u1FD5\u1FD8\u1FDD\u1FE2\u1FEE\u1FF4\u1FF6\u1FF8\u1FFE\u200D\u2011\u202C\u2030\u2041\u2042\u2056\u2056\u2062\u2066\u2068\u2071\u2073\u2073\u2081\u2081\u2092\u209E\u20D2\u20DE\u20E3\u20E3\u20E7\u20F2\u2104\u2104\u2109\u2109\u210C\u2115\u2117\u2117\u211B\u211F\u2126\u2126\u2128\u2128\u212A\u212A\u212C\u212F\u2131\u213B\u213E\u2141\u2147\u214B\u2150\u2150\u2162\u218A\u2C02\u2C30\u2C32\u2C60\u2C62\u2CE6\u2CED\u2CF5\u2D02\u2D27\u2D29\u2D29\u2D2F\u2D2F\u2D32\u2D69\u2D71\u2D71\u2D81\u2D98\u2DA2\u2DA8\u2DAA\u2DB0\u2DB2\u2DB8\u2DBA\u2DC0\u2DC2\u2DC8\u2DCA\u2DD0\u2DD2\u2DD8\u2DDA\u2DE0\u2DE2\u2E01\u2E31\u2E31\u3007\u3009\u3023\u3031\u3033\u3037\u303A\u303E\u3043\u3098\u309B\u309C\u309F\u30A1\u30A3\u30FC\u30FE\u3101\u3107\u312F\u3133\u3190\u31A2\u31BC\u31F2\u3201\u3402\u4DB7\u4E02\u9FD7\uA002\uA48E\uA4D2\uA4FF\uA502\uA60E\uA612\uA62D\uA642\uA671\uA676\uA67F\uA681\uA6F3\uA719\uA721\uA724\uA78A\uA78D\uA7B0\uA7B2\uA7B9\uA7F9\uA829\uA842\uA875\uA882\uA8C7\uA8D2\uA8DB\uA8E2\uA8F9\uA8FD\uA8FD\uA8FF\uA8FF\uA902\uA92F\uA932\uA955\uA962\uA97E\uA982\uA9C2\uA9D1\uA9DB\uA9E2\uAA00\uAA02\uAA38\uAA42\uAA4F\uAA52\uAA5B\uAA62\uAA78\uAA7C\uAAC4\uAADD\uAADF\uAAE2\uAAF1\uAAF4\uAAF8\uAB03\uAB08\uAB0B\uAB10\uAB13\uAB18\uAB22\uAB28\uAB2A\uAB30\uAB32\uAB5C\uAB5E\uAB67\uAB72\uABEC\uABEE\uABEF\uABF2\uABFB\uAC02\uD7A5\uD7B2\uD7C8\uD7CD\uD7FD\uF902\uFA6F\uFA72\uFADB\uFB02\uFB08\uFB15\uFB19\uFB1F\uFB2A\uFB2C\uFB38\uFB3A\uFB3E\uFB40\uFB40\uFB42\uFB43\uFB45\uFB46\uFB48\uFBB3\uFBD5\uFD3F\uFD52\uFD91\uFD94\uFDC9\uFDF2\uFDFD\uFE02\uFE11\uFE22\uFE31\uFE35\uFE36\uFE4F\uFE51\uFE72\uFE76\uFE78\uFEFE\uFF01\uFF01\uFF12\uFF1B\uFF23\uFF3C\uFF41\uFF41\uFF43\uFF5C\uFF68\uFFC0\uFFC4\uFFC9\uFFCC\uFFD1\uFFD4\uFFD9\uFFDC\uFFDE\uFFFB\uFFFD\r(*<>?AOR_\x82\xFC\u0142\u0176\u01FF\u01FF\u0282\u029E\u02A2\u02D2\u02E2\u02E2\u0302\u0321\u0332\u034C\u0352\u037C\u0382\u039F\u03A2\u03C5\u03CA\u03D1\u03D3\u03D7\u0402\u049F\u04A2\u04AB\u04B2\u04D5\u04DA\u04FD\u0502\u0529\u0532\u0565\u0602\u0738\u0742\u0757\u0762\u0769\u0802\u0807\u080A\u080A\u080C\u0837\u0839\u083A\u083E\u083E\u0841\u0857\u0862\u0878\u0882\u08A0\u08E2\u08F4\u08F6\u08F7\u0902\u0917\u0922\u093B\u0982\u09B9\u09C0\u09C1\u0A02\u0A05\u0A07\u0A08\u0A0E\u0A15\u0A17\u0A19\u0A1B\u0A35\u0A3A\u0A3C\u0A41\u0A41\u0A62\u0A7E\u0A82\u0A9E\u0AC2\u0AC9\u0ACB\u0AE8\u0B02\u0B37\u0B42\u0B57\u0B62\u0B74\u0B82\u0B93\u0C02\u0C4A\u0C82\u0CB4\u0CC2\u0CF4\u1002\u1048\u1068\u1071\u1081\u10BC\u10BF\u10BF\u10D2\u10EA\u10F2\u10FB\u1102\u1136\u1138\u1141\u1152\u1175\u1178\u1178\u1182\u11C6\u11CC\u11CE\u11D2\u11DC\u11DE\u11DE\u1202\u1213\u1215\u1239\u1240\u1240\u1282\u1288\u128A\u128A\u128C\u128F\u1291\u129F\u12A1\u12AA\u12B2\u12EC\u12F2\u12FB\u1302\u1305\u1307\u130E\u1311\u1312\u1315\u132A\u132C\u1332\u1334\u1335\u1337\u133B\u133E\u1346\u1349\u134A\u134D\u134F\u1352\u1352\u1359\u1359\u135F\u1365\u1368\u136E\u1372\u1376\u1402\u144C\u1452\u145B\u1482\u14C7\u14C9\u14C9\u14D2\u14DB\u1582\u15B7\u15BA\u15C2\u15DA\u15DF\u1602\u1642\u1646\u1646\u1652\u165B\u1682\u16B9\u16C2\u16CB\u1702\u171B\u171F\u172D\u1732\u173B\u18A2\u18EB\u1901\u1901\u1AC2\u1AFA\u1C02\u1C0A\u1C0C\u1C38\u1C3A\u1C42\u1C52\u1C5B\u1C74\u1C91\u1C94\u1CA9\u1CAB\u1CB8\u2002\u239B\u2402\u2470\u2482\u2545\u3002\u3430\u4402\u4648\u6802\u6A3A\u6A42\u6A60\u6A62\u6A6B\u6AD2\u6AEF\u6AF2\u6AF6\u6B02\u6B38\u6B42\u6B45\u6B52\u6B5B\u6B65\u6B79\u6B7F\u6B91\u6F02\u6F46\u6F52\u6F80\u6F91\u6FA1\u6FE2\u6FE2\u7002\u87EE\u8802\u8AF4\uB002\uB003\uBC02\uBC6C\uBC72\uBC7E\uBC82\uBC8A\uBC92\uBC9B\uBC9F\uBCA0\uBCA2\uBCA5\uD167\uD16B\uD16F\uD184\uD187\uD18D\uD1AC\uD1AF\uD244\uD246\uD402\uD456\uD458\uD49E\uD4A0\uD4A1\uD4A4\uD4A4\uD4A7\uD4A8\uD4AB\uD4AE\uD4B0\uD4BB\uD4BD\uD4BD\uD4BF\uD4C5\uD4C7\uD507\uD509\uD50C\uD50F\uD516\uD518\uD51E\uD520\uD53B\uD53D\uD540\uD542\uD546\uD548\uD548\uD54C\uD552\uD554\uD6A7\uD6AA\uD6C2\uD6C4\uD6DC\uD6DE\uD6FC\uD6FE\uD716\uD718\uD736\uD738\uD750\uD752\uD770\uD772\uD78A\uD78C\uD7AA\uD7AC\uD7C4\uD7C6\uD7CD\uD7D0\uD801\uDA02\uDA38\uDA3D\uDA6E\uDA77\uDA77\uDA86\uDA86\uDA9D\uDAA1\uDAA3\uDAB1\uE002\uE008\uE00A\uE01A\uE01D\uE023\uE025\uE026\uE028\uE02C\uE802\uE8C6\uE8D2\uE8D8\uE902\uE94C\uE952\uE95B\uEE02\uEE05\uEE07\uEE21\uEE23\uEE24\uEE26\uEE26\uEE29\uEE29\uEE2B\uEE34\uEE36\uEE39\uEE3B\uEE3B\uEE3D\uEE3D\uEE44\uEE44\uEE49\uEE49\uEE4B\uEE4B\uEE4D\uEE4D\uEE4F\uEE51\uEE53\uEE54\uEE56\uEE56\uEE59\uEE59\uEE5B\uEE5B\uEE5D\uEE5D\uEE5F\uEE5F\uEE61\uEE61\uEE63\uEE64\uEE66\uEE66\uEE69\uEE6C\uEE6E\uEE74\uEE76\uEE79\uEE7B\uEE7E\uEE80\uEE80\uEE82\uEE8B\uEE8D\uEE9D\uEEA3\uEEA5\uEEA7\uEEAB\uEEAD\uEEBD\uA6D8\uA702\uB736\uB742\uB81F\uB822\uCEA3\uF802\uFA1F"\x81\u0102\u01F1\u0240C\\c|\xAC\xAC\xB7\xB7\xBC\xBC\xC2\xD8\xDA\xF8\xFA\u02C3\u02C8\u02D3\u02E2\u02E6\u02EE\u02EE\u02F0\u02F0\u0372\u0376\u0378\u0379\u037C\u037F\u0381\u0381\u0388\u0388\u038A\u038C\u038E\u038E\u0390\u03A3\u03A5\u03F7\u03F9\u0483\u048C\u0531\u0533\u0558\u055B\u055B\u0563\u0589\u05D2\u05EC\u05F2\u05F4\u0622\u064C\u0670\u0671\u0673\u06D5\u06D7\u06D7\u06E7\u06E8\u06F0\u06F1\u06FC\u06FE\u0701\u0701\u0712\u0712\u0714\u0731\u074F\u07A7\u07B3\u07B3\u07CC\u07EC\u07F6\u07F7\u07FC\u07FC\u0802\u0817\u081C\u081C\u0826\u0826\u082A\u082A\u0842\u085A\u08A2\u08B6\u08B8\u08BF\u0906\u093B\u093F\u093F\u0952\u0952\u095A\u0963\u0973\u0982\u0987\u098E\u0991\u0992\u0995\u09AA\u09AC\u09B2\u09B4\u09B4\u09B8\u09BB\u09BF\u09BF\u09D0\u09D0\u09DE\u09DF\u09E1\u09E3\u09F2\u09F3\u0A07\u0A0C\u0A11\u0A12\u0A15\u0A2A\u0A2C\u0A32\u0A34\u0A35\u0A37\u0A38\u0A3A\u0A3B\u0A5B\u0A5E\u0A60\u0A60\u0A74\u0A76\u0A87\u0A8F\u0A91\u0A93\u0A95\u0AAA\u0AAC\u0AB2\u0AB4\u0AB5\u0AB7\u0ABB\u0ABF\u0ABF\u0AD2\u0AD2\u0AE2\u0AE3\u0AFB\u0AFB\u0B07\u0B0E\u0B11\u0B12\u0B15\u0B2A\u0B2C\u0B32\u0B34\u0B35\u0B37\u0B3B\u0B3F\u0B3F\u0B5E\u0B5F\u0B61\u0B63\u0B73\u0B73\u0B85\u0B85\u0B87\u0B8C\u0B90\u0B92\u0B94\u0B97\u0B9B\u0B9C\u0B9E\u0B9E\u0BA0\u0BA1\u0BA5\u0BA6\u0BAA\u0BAC\u0BB0\u0BBB\u0BD2\u0BD2\u0C07\u0C0E\u0C10\u0C12\u0C14\u0C2A\u0C2C\u0C3B\u0C3F\u0C3F\u0C5A\u0C5C\u0C62\u0C63\u0C82\u0C82\u0C87\u0C8E\u0C90\u0C92\u0C94\u0CAA\u0CAC\u0CB5\u0CB7\u0CBB\u0CBF\u0CBF\u0CE0\u0CE0\u0CE2\u0CE3\u0CF3\u0CF4\u0D07\u0D0E\u0D10\u0D12\u0D14\u0D3C\u0D3F\u0D3F\u0D50\u0D50\u0D56\u0D58\u0D61\u0D63\u0D7C\u0D81\u0D87\u0D98\u0D9C\u0DB3\u0DB5\u0DBD\u0DBF\u0DBF\u0DC2\u0DC8\u0E03\u0E32\u0E34\u0E35\u0E42\u0E48\u0E83\u0E84\u0E86\u0E86\u0E89\u0E8A\u0E8C\u0E8C\u0E8F\u0E8F\u0E96\u0E99\u0E9B\u0EA1\u0EA3\u0EA5\u0EA7\u0EA7\u0EA9\u0EA9\u0EAC\u0EAD\u0EAF\u0EB2\u0EB4\u0EB5\u0EBF\u0EBF\u0EC2\u0EC6\u0EC8\u0EC8\u0EDE\u0EE1\u0F02\u0F02\u0F42\u0F49\u0F4B\u0F6E\u0F8A\u0F8E\u1002\u102C\u1041\u1041\u1052\u1057\u105C\u105F\u1063\u1063\u1067\u1068\u1070\u1072\u1077\u1083\u1090\u1090\u10A2\u10C7\u10C9\u10C9\u10CF\u10CF\u10D2\u10FC\u10FE\u124A\u124C\u124F\u1252\u1258\u125A\u125A\u125C\u125F\u1262\u128A\u128C\u128F\u1292\u12B2\u12B4\u12B7\u12BA\u12C0\u12C2\u12C2\u12C4\u12C7\u12CA\u12D8\u12DA\u1312\u1314\u1317\u131A\u135C\u1382\u1391\u13A2\u13F7\u13FA\u13FF\u1403\u166E\u1671\u1681\u1683\u169C\u16A2\u16EC\u16F0\u16FA\u1702\u170E\u1710\u1713\u1722\u1733\u1742\u1753\u1762\u176E\u1770\u1772\u1782\u17B5\u17D9\u17D9\u17DE\u17DE\u1822\u1879\u1882\u1886\u1889\u18AA\u18AC\u18AC\u18B2\u18F7\u1902\u1920\u1952\u196F\u1972\u1976\u1982\u19AD\u19B2\u19CB\u1A02\u1A18\u1A22\u1A56\u1AA9\u1AA9\u1B07\u1B35\u1B47\u1B4D\u1B85\u1BA2\u1BB0\u1BB1\u1BBC\u1BE7\u1C02\u1C25\u1C4F\u1C51\u1C5C\u1C7F\u1C82\u1C8A\u1CEB\u1CEE\u1CF0\u1CF3\u1CF7\u1CF8\u1D02\u1DC1\u1E02\u1F17\u1F1A\u1F1F\u1F22\u1F47\u1F4A\u1F4F\u1F52\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F5F\u1F61\u1F7F\u1F82\u1FB6\u1FB8\u1FBE\u1FC0\u1FC0\u1FC4\u1FC6\u1FC8\u1FCE\u1FD2\u1FD5\u1FD8\u1FDD\u1FE2\u1FEE\u1FF4\u1FF6\u1FF8\u1FFE\u2073\u2073\u2081\u2081\u2092\u209E\u2104\u2104\u2109\u2109\u210C\u2115\u2117\u2117\u211B\u211F\u2126\u2126\u2128\u2128\u212A\u212A\u212C\u212F\u2131\u213B\u213E\u2141\u2147\u214B\u2150\u2150\u2162\u218A\u2C02\u2C30\u2C32\u2C60\u2C62\u2CE6\u2CED\u2CF0\u2CF4\u2CF5\u2D02\u2D27\u2D29\u2D29\u2D2F\u2D2F\u2D32\u2D69\u2D71\u2D71\u2D82\u2D98\u2DA2\u2DA8\u2DAA\u2DB0\u2DB2\u2DB8\u2DBA\u2DC0\u2DC2\u2DC8\u2DCA\u2DD0\u2DD2\u2DD8\u2DDA\u2DE0\u2E31\u2E31\u3007\u3009\u3023\u302B\u3033\u3037\u303A\u303E\u3043\u3098\u309F\u30A1\u30A3\u30FC\u30FE\u3101\u3107\u312F\u3133\u3190\u31A2\u31BC\u31F2\u3201\u3402\u4DB7\u4E02\u9FD7\uA002\uA48E\uA4D2\uA4FF\uA502\uA60E\uA612\uA621\uA62C\uA62D\uA642\uA670\uA681\uA69F\uA6A2\uA6F1\uA719\uA721\uA724\uA78A\uA78D\uA7B0\uA7B2\uA7B9\uA7F9\uA803\uA805\uA807\uA809\uA80C\uA80E\uA824\uA842\uA875\uA884\uA8B5\uA8F4\uA8F9\uA8FD\uA8FD\uA8FF\uA8FF\uA90C\uA927\uA932\uA948\uA962\uA97E\uA986\uA9B4\uA9D1\uA9D1\uA9E2\uA9E6\uA9E8\uA9F1\uA9FC\uAA00\uAA02\uAA2A\uAA42\uAA44\uAA46\uAA4D\uAA62\uAA78\uAA7C\uAA7C\uAA80\uAAB1\uAAB3\uAAB3\uAAB7\uAAB8\uAABB\uAABF\uAAC2\uAAC2\uAAC4\uAAC4\uAADD\uAADF\uAAE2\uAAEC\uAAF4\uAAF6\uAB03\uAB08\uAB0B\uAB10\uAB13\uAB18\uAB22\uAB28\uAB2A\uAB30\uAB32\uAB5C\uAB5E\uAB67\uAB72\uABE4\uAC02\uD7A5\uD7B2\uD7C8\uD7CD\uD7FD\uF902\uFA6F\uFA72\uFADB\uFB02\uFB08\uFB15\uFB19\uFB1F\uFB1F\uFB21\uFB2A\uFB2C\uFB38\uFB3A\uFB3E\uFB40\uFB40\uFB42\uFB43\uFB45\uFB46\uFB48\uFBB3\uFBD5\uFD3F\uFD52\uFD91\uFD94\uFDC9\uFDF2\uFDFD\uFE72\uFE76\uFE78\uFEFE\uFF23\uFF3C\uFF43\uFF5C\uFF68\uFFC0\uFFC4\uFFC9\uFFCC\uFFD1\uFFD4\uFFD9\uFFDC\uFFDE\r(*<>?AOR_\x82\xFC\u0142\u0176\u0282\u029E\u02A2\u02D2\u0302\u0321\u0332\u034C\u0352\u0377\u0382\u039F\u03A2\u03C5\u03CA\u03D1\u03D3\u03D7\u0402\u049F\u04B2\u04D5\u04DA\u04FD\u0502\u0529\u0532\u0565\u0602\u0738\u0742\u0757\u0762\u0769\u0802\u0807\u080A\u080A\u080C\u0837\u0839\u083A\u083E\u083E\u0841\u0857\u0862\u0878\u0882\u08A0\u08E2\u08F4\u08F6\u08F7\u0902\u0917\u0922\u093B\u0982\u09B9\u09C0\u09C1\u0A02\u0A02\u0A12\u0A15\u0A17\u0A19\u0A1B\u0A35\u0A62\u0A7E\u0A82\u0A9E\u0AC2\u0AC9\u0ACB\u0AE6\u0B02\u0B37\u0B42\u0B57\u0B62\u0B74\u0B82\u0B93\u0C02\u0C4A\u0C82\u0CB4\u0CC2\u0CF4\u1005\u1039\u1085\u10B1\u10D2\u10EA\u1105\u1128\u1152\u1174\u1178\u1178\u1185\u11B4\u11C3\u11C6\u11DC\u11DC\u11DE\u11DE\u1202\u1213\u1215\u122D\u1282\u1288\u128A\u128A\u128C\u128F\u1291\u129F\u12A1\u12AA\u12B2\u12E0\u1307\u130E\u1311\u1312\u1315\u132A\u132C\u1332\u1334\u1335\u1337\u133B\u133F\u133F\u1352\u1352\u135F\u1363\u1402\u1436\u1449\u144C\u1482\u14B1\u14C6\u14C7\u14C9\u14C9\u1582\u15B0\u15DA\u15DD\u1602\u1631\u1646\u1646\u1682\u16AC\u1702\u171B\u18A2\u18E1\u1901\u1901\u1AC2\u1AFA\u1C02\u1C0A\u1C0C\u1C30\u1C42\u1C42\u1C74\u1C91\u2002\u239B\u2402\u2470\u2482\u2545\u3002\u3430\u4402\u4648\u6802\u6A3A\u6A42\u6A60\u6AD2\u6AEF\u6B02\u6B31\u6B42\u6B45\u6B65\u6B79\u6B7F\u6B91\u6F02\u6F46\u6F52\u6F52\u6F95\u6FA1\u6FE2\u6FE2\u7002\u87EE\u8802\u8AF4\uB002\uB003\uBC02\uBC6C\uBC72\uBC7E\uBC82\uBC8A\uBC92\uBC9B\uD402\uD456\uD458\uD49E\uD4A0\uD4A1\uD4A4\uD4A4\uD4A7\uD4A8\uD4AB\uD4AE\uD4B0\uD4BB\uD4BD\uD4BD\uD4BF\uD4C5\uD4C7\uD507\uD509\uD50C\uD50F\uD516\uD518\uD51E\uD520\uD53B\uD53D\uD540\uD542\uD546\uD548\uD548`,s._serializedATNSegment1=`\uD54C\uD552\uD554\uD6A7\uD6AA\uD6C2\uD6C4\uD6DC\uD6DE\uD6FC\uD6FE\uD716\uD718\uD736\uD738\uD750\uD752\uD770\uD772\uD78A\uD78C\uD7AA\uD7AC\uD7C4\uD7C6\uD7CD\uE802\uE8C6\uE902\uE945\uEE02\uEE05\uEE07\uEE21\uEE23\uEE24\uEE26\uEE26\uEE29\uEE29\uEE2B\uEE34\uEE36\uEE39\uEE3B\uEE3B\uEE3D\uEE3D\uEE44\uEE44\uEE49\uEE49\uEE4B\uEE4B\uEE4D\uEE4D\uEE4F\uEE51\uEE53\uEE54\uEE56\uEE56\uEE59\uEE59\uEE5B\uEE5B\uEE5D\uEE5D\uEE5F\uEE5F\uEE61\uEE61\uEE63\uEE64\uEE66\uEE66\uEE69\uEE6C\uEE6E\uEE74\uEE76\uEE79\uEE7B\uEE7E\uEE80\uEE80\uEE82\uEE8B\uEE8D\uEE9D\uEEA3\uEEA5\uEEA7\uEEAB\uEEAD\uEEBD\uA6D8\uA702\uB736\uB742\uB81F\uB822\uCEA3\uF802\uFA1F1\x07 \v\x07 \v\r%')\x071\x071\x071\x07,\b\x1B\x07#\x1B
|
|
79
|
+
\b\r\x07" !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,s._serializedATN=o.join([s._serializedATNSegment0,s._serializedATNSegment1],"");}),b7=re(t=>{var e=t&&t.__decorate||function(n,o,s,a){var u=arguments.length,l=u<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,o,s,a);else for(var c=n.length-1;c>=0;c--)(h=n[c])&&(l=(u<3?h(l):u>3?h(o,s,l):h(o,s))||l);return u>3&&l&&Object.defineProperty(o,s,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathLexerErrorListener=void 0;var r=ce(),i=class{syntaxError(n,o,s,a,u,l){}};e([r.Override],i.prototype,"syntaxError",null),t.XPathLexerErrorListener=i;}),no=re(t=>{var e=t&&t.__decorate||function(n,o,s,a){var u=arguments.length,l=u<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,o,s,a);else for(var c=n.length-1;c>=0;c--)(h=n[c])&&(l=(u<3?h(l):u>3?h(o,s,l):h(o,s))||l);return u>3&&l&&Object.defineProperty(o,s,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathElement=void 0;var r=ce(),i=class{constructor(n){this.nodeName=n,this.invert=!1;}toString(){let n=this.invert?"!":"";return Object.constructor.name+"["+n+this.nodeName+"]"}};e([r.Override],i.prototype,"toString",null),t.XPathElement=i;}),T7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathRuleAnywhereElement=void 0;var r=ce(),i=as(),n=no(),o=class extends n.XPathElement{constructor(s,a){super(s),this.ruleIndex=a;}evaluate(s){return i.Trees.findAllRuleNodes(s,this.ruleIndex)}};e([r.Override],o.prototype,"evaluate",null),t.XPathRuleAnywhereElement=o;}),C7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathRuleElement=void 0;var r=Ur(),i=ce(),n=as(),o=no(),s=class extends o.XPathElement{constructor(a,u){super(a),this.ruleIndex=u;}evaluate(a){let u=[];for(let l of n.Trees.getChildren(a))l instanceof r.ParserRuleContext&&(l.ruleIndex===this.ruleIndex&&!this.invert||l.ruleIndex!==this.ruleIndex&&this.invert)&&u.push(l);return u}};e([i.Override],s.prototype,"evaluate",null),t.XPathRuleElement=s;}),A7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathTokenAnywhereElement=void 0;var r=ce(),i=as(),n=no(),o=class extends n.XPathElement{constructor(s,a){super(s),this.tokenType=a;}evaluate(s){return i.Trees.findAllTokenNodes(s,this.tokenType)}};e([r.Override],o.prototype,"evaluate",null),t.XPathTokenAnywhereElement=o;}),w7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathTokenElement=void 0;var r=ce(),i=io(),n=as(),o=no(),s=class extends o.XPathElement{constructor(a,u){super(a),this.tokenType=u;}evaluate(a){let u=[];for(let l of n.Trees.getChildren(a))l instanceof i.TerminalNode&&(l.symbol.type===this.tokenType&&!this.invert||l.symbol.type!==this.tokenType&&this.invert)&&u.push(l);return u}};e([r.Override],s.prototype,"evaluate",null),t.XPathTokenElement=s;}),D7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathWildcardAnywhereElement=void 0;var r=ce(),i=as(),n=$0(),o=no(),s=class extends o.XPathElement{constructor(){super(n.XPath.WILDCARD);}evaluate(a){return this.invert?[]:i.Trees.getDescendants(a)}};e([r.Override],s.prototype,"evaluate",null),t.XPathWildcardAnywhereElement=s;}),S7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathWildcardElement=void 0;var r=ce(),i=as(),n=$0(),o=no(),s=class extends o.XPathElement{constructor(){super(n.XPath.WILDCARD);}evaluate(a){let u=[];if(this.invert)return u;for(let l of i.Trees.getChildren(a))u.push(l);return u}};e([r.Override],s.prototype,"evaluate",null),t.XPathWildcardElement=s;}),$0=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XPath=void 0;var e=U0(),r=V0(),i=rh(),n=Ur(),o=Ct(),s=E7(),a=b7(),u=T7(),l=C7(),h=A7(),c=w7(),p=D7(),f=S7(),m=class{constructor(_,x){this.parser=_,this.path=x,this.elements=this.split(x);}split(_){let x=new s.XPathLexer(e.CharStreams.fromString(_));x.recover=D=>{throw D},x.removeErrorListeners(),x.addErrorListener(new a.XPathLexerErrorListener);let v=new r.CommonTokenStream(x);try{v.fill();}catch(D){if(D instanceof i.LexerNoViableAltException){let F="Invalid tokens or characters at index "+x.charPositionInLine+" in path '"+_+"' -- "+D.message;throw new RangeError(F)}throw D}let g=v.getTokens(),b=[],E=g.length,w=0;e:for(;w<E;){let D=g[w],N;switch(D.type){case s.XPathLexer.ROOT:case s.XPathLexer.ANYWHERE:let F=D.type===s.XPathLexer.ANYWHERE;w++,N=g[w];let V=N.type===s.XPathLexer.BANG;V&&(w++,N=g[w]);let X=this.getXPathElement(N,F);X.invert=V,b.push(X),w++;break;case s.XPathLexer.TOKEN_REF:case s.XPathLexer.RULE_REF:case s.XPathLexer.WILDCARD:b.push(this.getXPathElement(D,!1)),w++;break;case o.Token.EOF:break e;default:throw new Error("Unknowth path element "+D)}}return b}getXPathElement(_,x){if(_.type===o.Token.EOF)throw new Error("Missing path element at end of path");let v=_.text;if(v==null)throw new Error("Expected wordToken to have text content.");let g=this.parser.getTokenType(v),b=this.parser.getRuleIndex(v);switch(_.type){case s.XPathLexer.WILDCARD:return x?new p.XPathWildcardAnywhereElement:new f.XPathWildcardElement;case s.XPathLexer.TOKEN_REF:case s.XPathLexer.STRING:if(g===o.Token.INVALID_TYPE)throw new Error(v+" at index "+_.startIndex+" isn't a valid token name");return x?new h.XPathTokenAnywhereElement(v,g):new c.XPathTokenElement(v,g);default:if(b===-1)throw new Error(v+" at index "+_.startIndex+" isn't a valid rule name");return x?new u.XPathRuleAnywhereElement(v,b):new l.XPathRuleElement(v,b)}}static findAll(_,x,v){return new m(v,x).evaluate(_)}evaluate(_){let x=new n.ParserRuleContext;x.addChild(_);let v=new Set([x]),g=0;for(;g<this.elements.length;){let b=new Set;for(let E of v)E.childCount>0&&this.elements[g].evaluate(E).forEach(b.add,b);g++,v=b;}return v}};t.XPath=m,m.WILDCARD="*",m.NOT="!";}),R7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreePattern=void 0;var i=ce(),n=$0(),o=class{constructor(a,u,l,h){this._matcher=a,this._patternRuleIndex=l,this._pattern=u,this._patternTree=h;}match(a){return this._matcher.match(a,this)}matches(a){return this._matcher.match(a,this).succeeded}findAll(a,u){let l=n.XPath.findAll(a,u,this._matcher.parser),h=[];for(let c of l){let p=this.match(c);p.succeeded&&h.push(p);}return h}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};e([i.NotNull],o.prototype,"_pattern",void 0),e([i.NotNull],o.prototype,"_patternTree",void 0),e([i.NotNull],o.prototype,"_matcher",void 0),e([i.NotNull,r(0,i.NotNull)],o.prototype,"match",null),e([r(0,i.NotNull)],o.prototype,"matches",null),e([i.NotNull,r(0,i.NotNull),r(1,i.NotNull)],o.prototype,"findAll",null),e([i.NotNull],o.prototype,"matcher",null),e([i.NotNull],o.prototype,"pattern",null),e([i.NotNull],o.prototype,"patternTree",null),o=e([r(0,i.NotNull),r(1,i.NotNull),r(3,i.NotNull)],o),t.ParseTreePattern=o;}),N7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleTagToken=void 0;var i=ce(),n=Ct(),o=class{constructor(a,u,l){if(a==null||a.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=a,this.bypassTokenType=u,this._label=l;}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return n.Token.DEFAULT_CHANNEL}get text(){return this._label!=null?"<"+this._label+":"+this._ruleName+">":"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return -1}get tokenIndex(){return -1}get startIndex(){return -1}get stopIndex(){return -1}get tokenSource(){}get inputStream(){}toString(){return this._ruleName+":"+this.bypassTokenType}};e([i.NotNull],o.prototype,"ruleName",null),e([i.Override],o.prototype,"channel",null),e([i.Override],o.prototype,"text",null),e([i.Override],o.prototype,"type",null),e([i.Override],o.prototype,"line",null),e([i.Override],o.prototype,"charPositionInLine",null),e([i.Override],o.prototype,"tokenIndex",null),e([i.Override],o.prototype,"startIndex",null),e([i.Override],o.prototype,"stopIndex",null),e([i.Override],o.prototype,"tokenSource",null),e([i.Override],o.prototype,"inputStream",null),e([i.Override],o.prototype,"toString",null),o=e([r(0,i.NotNull)],o),t.RuleTagToken=o;}),Fv=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Chunk=void 0;var e=class{};t.Chunk=e;}),O7=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.TagChunk=void 0;var r=Fv(),i=ce(),n=class extends r.Chunk{constructor(o,s){if(super(),o==null||o.length===0)throw new Error("tag cannot be null or empty");this._tag=o,this._label=s;}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};e([i.NotNull],n.prototype,"tag",null),e([i.Override],n.prototype,"toString",null),t.TagChunk=n;}),F7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.TextChunk=void 0;var i=Fv(),n=ce(),o=class extends i.Chunk{constructor(a){if(super(),a==null)throw new Error("text cannot be null");this._text=a;}get text(){return this._text}toString(){return "'"+this._text+"'"}};e([n.NotNull],o.prototype,"_text",void 0),e([n.NotNull],o.prototype,"text",null),e([n.Override],o.prototype,"toString",null),o=e([r(0,n.NotNull)],o),t.TextChunk=o;}),L7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTagToken=void 0;var i=wa(),n=ce(),o=class extends i.CommonToken{constructor(a,u,l){super(u),this._tokenName=a,this._label=l;}get tokenName(){return this._tokenName}get label(){return this._label}get text(){return this._label!=null?"<"+this._label+":"+this._tokenName+">":"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};e([n.NotNull],o.prototype,"_tokenName",void 0),e([n.NotNull],o.prototype,"tokenName",null),e([n.Override],o.prototype,"text",null),e([n.Override],o.prototype,"toString",null),o=e([r(0,n.NotNull)],o),t.TokenTagToken=o;}),P7=re(t=>{var e=t&&t.__decorate||function(N,F,V,X){var te=arguments.length,ae=te<3?F:X===null?X=Object.getOwnPropertyDescriptor(F,V):X,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(N,F,V,X);else for(var y=N.length-1;y>=0;y--)(k=N[y])&&(ae=(te<3?k(ae):te>3?k(F,V,ae):k(F,V))||ae);return te>3&&ae&&Object.defineProperty(F,V,ae),ae},r=t&&t.__param||function(N,F){return function(V,X){F(V,X,N);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreePatternMatcher=void 0;var i=Lv(),n=U0(),o=V0(),s=Sv(),a=x7(),u=ce(),l=Rv(),h=Ov(),c=Ur(),p=v7(),f=R7(),m=en(),_=j0(),x=N7(),v=O7(),g=io(),b=F7(),E=Ct(),w=L7(),D=class{constructor(N,F){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=N,this._parser=F;}setDelimiters(N,F,V){if(!N)throw new Error("start cannot be null or empty");if(!F)throw new Error("stop cannot be null or empty");this.start=N,this.stop=F,this.escape=V,this.escapeRE=new RegExp(V.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");}matches(N,F,V=0){if(typeof F=="string"){let X=this.compile(F,V);return this.matches(N,X)}else {let X=new a.MultiMap;return !this.matchImpl(N,F.patternTree,X)}}match(N,F,V=0){if(typeof F=="string"){let X=this.compile(F,V);return this.match(N,X)}else {let X=new a.MultiMap,te=this.matchImpl(N,F.patternTree,X);return new p.ParseTreeMatch(N,F,X,te)}}compile(N,F){let V=this.tokenize(N),X=new s.ListTokenSource(V),te=new o.CommonTokenStream(X),ae=this._parser,k=new h.ParserInterpreter(ae.grammarFileName,ae.vocabulary,ae.ruleNames,ae.getATNWithBypassAlts(),te),y;try{k.errorHandler=new i.BailErrorStrategy,y=k.parse(F);}catch(T){throw T instanceof l.ParseCancellationException?T.getCause():T instanceof m.RecognitionException?T:T instanceof Error?new D.CannotInvokeStartRule(T):T}if(te.LA(1)!==E.Token.EOF)throw new D.StartRuleDoesNotConsumeFullPattern;return new f.ParseTreePattern(this,N,F,y)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(N,F,V){if(!N)throw new TypeError("tree cannot be null");if(!F)throw new TypeError("patternTree cannot be null");if(N instanceof g.TerminalNode&&F instanceof g.TerminalNode){let X;if(N.symbol.type===F.symbol.type)if(F.symbol instanceof w.TokenTagToken){let te=F.symbol;V.map(te.tokenName,N);let ae=te.label;ae&&V.map(ae,N);}else N.text===F.text||X||(X=N);else X||(X=N);return X}if(N instanceof c.ParserRuleContext&&F instanceof c.ParserRuleContext){let X,te=this.getRuleTagToken(F);if(te){if(N.ruleContext.ruleIndex===F.ruleContext.ruleIndex){V.map(te.ruleName,N);let y=te.label;y&&V.map(y,N);}else X||(X=N);return X}if(N.childCount!==F.childCount)return X||(X=N),X;let ae=N.childCount;for(let k=0;k<ae;k++){let y=this.matchImpl(N.getChild(k),F.getChild(k),V);if(y)return y}return X}return N}getRuleTagToken(N){if(N instanceof _.RuleNode&&N.childCount===1&&N.getChild(0)instanceof g.TerminalNode){let F=N.getChild(0);if(F.symbol instanceof x.RuleTagToken)return F.symbol}}tokenize(N){let F=this.split(N),V=[];for(let X of F)if(X instanceof v.TagChunk){let te=X,ae=te.tag.substr(0,1);if(ae===ae.toUpperCase()){let k=this._parser.getTokenType(te.tag);if(k===E.Token.INVALID_TYPE)throw new Error("Unknown token "+te.tag+" in pattern: "+N);let y=new w.TokenTagToken(te.tag,k,te.label);V.push(y);}else if(ae===ae.toLowerCase()){let k=this._parser.getRuleIndex(te.tag);if(k===-1)throw new Error("Unknown rule "+te.tag+" in pattern: "+N);let y=this._parser.getATNWithBypassAlts().ruleToTokenType[k];V.push(new x.RuleTagToken(te.tag,y,te.label));}else throw new Error("invalid tag: "+te.tag+" in pattern: "+N)}else {let te=X;this._lexer.inputStream=n.CharStreams.fromString(te.text);let ae=this._lexer.nextToken();for(;ae.type!==E.Token.EOF;)V.push(ae),ae=this._lexer.nextToken();}return V}split(N){let F=0,V=N.length,X=[],ae=[],k=[];for(;F<V;)F===N.indexOf(this.escape+this.start,F)?F+=this.escape.length+this.start.length:F===N.indexOf(this.escape+this.stop,F)?F+=this.escape.length+this.stop.length:F===N.indexOf(this.start,F)?(ae.push(F),F+=this.start.length):F===N.indexOf(this.stop,F)?(k.push(F),F+=this.stop.length):F++;if(ae.length>k.length)throw new Error("unterminated tag in pattern: "+N);if(ae.length<k.length)throw new Error("missing start tag in pattern: "+N);let y=ae.length;for(let T=0;T<y;T++)if(ae[T]>=k[T])throw new Error("tag delimiters out of order in pattern: "+N);if(y===0){let T=N.substring(0,V);X.push(new b.TextChunk(T));}if(y>0&&ae[0]>0){let T=N.substring(0,ae[0]);X.push(new b.TextChunk(T));}for(let T=0;T<y;T++){let S=N.substring(ae[T]+this.start.length,k[T]),R=S,L,I=S.indexOf(":");if(I>=0&&(L=S.substring(0,I),R=S.substring(I+1,S.length)),X.push(new v.TagChunk(R,L)),T+1<y){let K=N.substring(k[T]+this.stop.length,ae[T+1]);X.push(new b.TextChunk(K));}}if(y>0){let T=k[y-1]+this.stop.length;if(T<V){let S=N.substring(T,V);X.push(new b.TextChunk(S));}}for(let T=0;T<X.length;T++){let S=X[T];if(S instanceof b.TextChunk){let R=S.text.replace(this.escapeRE,"");R.length<S.text.length&&(X[T]=new b.TextChunk(R));}}return X}};e([u.NotNull,r(1,u.NotNull)],D.prototype,"match",null),e([u.NotNull],D.prototype,"lexer",null),e([u.NotNull],D.prototype,"parser",null),e([r(0,u.NotNull),r(1,u.NotNull),r(2,u.NotNull)],D.prototype,"matchImpl",null),t.ParseTreePatternMatcher=D,function(N){class F extends Error{constructor(te){super(`CannotInvokeStartRule: ${te}`),this.error=te;}}N.CannotInvokeStartRule=F;class V extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern");}}N.StartRuleDoesNotConsumeFullPattern=V;}(D=t.ParseTreePatternMatcher||(t.ParseTreePatternMatcher={}));}),Oa=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h},r=t&&t.__param||function(o,s){return function(a,u){s(a,u,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionEventInfo=void 0;var i=ce(),n=class{constructor(s,a,u,l,h,c){this.decision=s,this.fullCtx=c,this.stopIndex=h,this.input=u,this.startIndex=l,this.state=a;}};e([i.NotNull],n.prototype,"input",void 0),n=e([r(2,i.NotNull)],n),t.DecisionEventInfo=n;}),I7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AmbiguityInfo=void 0;var i=Oa(),n=ce(),o=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,p){super(a,u,h,c,p,u.useContext),this.ambigAlts=l;}get ambiguousAlternatives(){return this.ambigAlts}};e([n.NotNull],o.prototype,"ambigAlts",void 0),e([n.NotNull],o.prototype,"ambiguousAlternatives",null),o=e([r(1,n.NotNull),r(2,n.NotNull),r(3,n.NotNull)],o),t.AmbiguityInfo=o;}),k7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContextSensitivityInfo=void 0;var i=Oa(),n=ce(),o=class extends i.DecisionEventInfo{constructor(a,u,l,h,c){super(a,u,l,h,c,!0);}};o=e([r(1,n.NotNull),r(2,n.NotNull)],o),t.ContextSensitivityInfo=o;}),M7=re(t=>{var e=t&&t.__decorate||function(n,o,s,a){var u=arguments.length,l=u<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,o,s,a);else for(var c=n.length-1;c>=0;c--)(h=n[c])&&(l=(u<3?h(l):u>3?h(o,s,l):h(o,s))||l);return u>3&&l&&Object.defineProperty(o,s,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionInfo=void 0;var r=ce(),i=class{constructor(n){this.invocations=0,this.timeInPrediction=0,this.SLL_TotalLook=0,this.SLL_MinLook=0,this.SLL_MaxLook=0,this.LL_TotalLook=0,this.LL_MinLook=0,this.LL_MaxLook=0,this.contextSensitivities=[],this.errors=[],this.ambiguities=[],this.predicateEvals=[],this.SLL_ATNTransitions=0,this.SLL_DFATransitions=0,this.LL_Fallback=0,this.LL_ATNTransitions=0,this.LL_DFATransitions=0,this.decision=n;}toString(){return "{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};e([r.Override],i.prototype,"toString",null),t.DecisionInfo=i;}),B7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorInfo=void 0;var i=Oa(),n=ce(),o=class extends i.DecisionEventInfo{constructor(a,u,l,h,c){super(a,u,l,h,c,u.useContext);}};o=e([r(1,n.NotNull),r(2,n.NotNull)],o),t.ErrorInfo=o;}),q7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookaheadEventInfo=void 0;var i=Oa(),n=ce(),o=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,p,f){super(a,u,h,c,p,f),this.predictedAlt=l;}};o=e([r(3,n.NotNull)],o),t.LookaheadEventInfo=o;}),H7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(s,a){return function(u,l){a(u,l,s);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PredicateEvalInfo=void 0;var i=Oa(),n=ce(),o=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,p,f,m){super(u,a,l,h,c,a.useContext),this.semctx=p,this.evalResult=f,this.predictedAlt=m;}};o=e([r(0,n.NotNull),r(2,n.NotNull),r(5,n.NotNull)],o),t.PredicateEvalInfo=o;}),iv=re(t=>{var e=t&&t.__decorate||function(x,v,g,b){var E=arguments.length,w=E<3?v:b===null?b=Object.getOwnPropertyDescriptor(v,g):b,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(x,v,g,b);else for(var N=x.length-1;N>=0;N--)(D=x[N])&&(w=(E<3?D(w):E>3?D(v,g,w):D(v,g))||w);return E>3&&w&&Object.defineProperty(v,g,w),w},r=t&&t.__param||function(x,v){return function(g,b){v(g,b,x);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProfilingATNSimulator=void 0;var i=I7(),n=ei(),o=th(),s=k7(),a=M7(),u=B7(),l=ce(),h=q7(),c=Na(),p=H7(),f=to(),m=Tv(),_=class extends c.ParserATNSimulator{constructor(x){super(x.interpreter.atn,x),this._startIndex=0,this._sllStopIndex=0,this._llStopIndex=0,this.currentDecision=0,this.conflictingAltResolvedBySLL=0,this.optimize_ll1=!1,this.reportAmbiguities=!0,this.numDecisions=this.atn.decisionToState.length,this.decisions=[];for(let v=0;v<this.numDecisions;v++)this.decisions.push(new a.DecisionInfo(v));}adaptivePredict(x,v,g,b){if(b!==void 0)return super.adaptivePredict(x,v,g,b);try{this._input=x,this._startIndex=x.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=v,this.currentState=void 0,this.conflictingAltResolvedBySLL=n.ATN.INVALID_ALT_NUMBER;let E=process.hrtime(),w=super.adaptivePredict(x,v,g),D=process.hrtime(),N=(D[0]-E[0])*1e9;N===0?N=D[1]-E[1]:N+=1e9-E[1]+D[1],this.decisions[v].timeInPrediction+=N,this.decisions[v].invocations++;let F=this._sllStopIndex-this._startIndex+1;if(this.decisions[v].SLL_TotalLook+=F,this.decisions[v].SLL_MinLook=this.decisions[v].SLL_MinLook===0?F:Math.min(this.decisions[v].SLL_MinLook,F),F>this.decisions[v].SLL_MaxLook&&(this.decisions[v].SLL_MaxLook=F,this.decisions[v].SLL_MaxLookEvent=new h.LookaheadEventInfo(v,void 0,w,x,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let V=this._llStopIndex-this._startIndex+1;this.decisions[v].LL_TotalLook+=V,this.decisions[v].LL_MinLook=this.decisions[v].LL_MinLook===0?V:Math.min(this.decisions[v].LL_MinLook,V),V>this.decisions[v].LL_MaxLook&&(this.decisions[v].LL_MaxLook=V,this.decisions[v].LL_MaxLookEvent=new h.LookaheadEventInfo(v,void 0,w,x,this._startIndex,this._llStopIndex,!0));}return w}finally{this._input=void 0,this.currentDecision=-1;}}getStartState(x,v,g,b){let E=super.getStartState(x,v,g,b);return this.currentState=E,E}computeStartState(x,v,g){let b=super.computeStartState(x,v,g);return this.currentState=b,b}computeReachSet(x,v,g,b){if(this._input===void 0)throw new Error("Invalid state");let E=super.computeReachSet(x,v,g,b);return E==null&&this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision,v,this._input,this._startIndex,this._input.index)),this.currentState=E,E}getExistingTargetState(x,v){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");this.currentState.useContext?this._llStopIndex=this._input.index:this._sllStopIndex=this._input.index;let g=super.getExistingTargetState(x,v);if(g!=null&&(this.currentState=new m.SimulatorState(this.currentState.outerContext,g,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,g===o.ATNSimulator.ERROR)){let b=new m.SimulatorState(this.currentState.outerContext,x,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision,b,this._input,this._startIndex,this._input.index));}return g}computeTargetState(x,v,g,b,E,w){let D=super.computeTargetState(x,v,g,b,E,w);return E?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,D}evalSemanticContextImpl(x,v,g){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let b=super.evalSemanticContextImpl(x,v,g);if(!(x instanceof f.SemanticContext.PrecedencePredicate)){let w=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new p.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,w,x,b,g));}return b}reportContextSensitivity(x,v,g,b,E){if(this._input===void 0)throw new Error("Invalid state");v!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new s.ContextSensitivityInfo(this.currentDecision,g,this._input,b,E)),super.reportContextSensitivity(x,v,g,b,E);}reportAttemptingFullContext(x,v,g,b,E){v!=null?this.conflictingAltResolvedBySLL=v.nextSetBit(0):this.conflictingAltResolvedBySLL=g.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(x,v,g,b,E);}reportAmbiguity(x,v,g,b,E,w,D){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let N;w!=null?N=w.nextSetBit(0):N=D.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==n.ATN.INVALID_ALT_NUMBER&&N!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new s.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,g,b)),this.decisions[this.currentDecision].ambiguities.push(new i.AmbiguityInfo(this.currentDecision,this.currentState,w,this._input,g,b)),super.reportAmbiguity(x,v,g,b,E,w,D);}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};e([l.Override,r(0,l.NotNull)],_.prototype,"adaptivePredict",null),e([l.Override],_.prototype,"getStartState",null),e([l.Override],_.prototype,"computeStartState",null),e([l.Override],_.prototype,"computeReachSet",null),e([l.Override],_.prototype,"getExistingTargetState",null),e([l.Override],_.prototype,"computeTargetState",null),e([l.Override],_.prototype,"evalSemanticContextImpl",null),e([l.Override],_.prototype,"reportContextSensitivity",null),e([l.Override],_.prototype,"reportAttemptingFullContext",null),e([l.Override,r(0,l.NotNull),r(5,l.NotNull),r(6,l.NotNull)],_.prototype,"reportAmbiguity",null),t.ProfilingATNSimulator=_;}),Fa=re(t=>{var e=t&&t.__decorate||function(E,w,D,N){var F=arguments.length,V=F<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,D):N,X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(E,w,D,N);else for(var te=E.length-1;te>=0;te--)(X=E[te])&&(V=(F<3?X(V):F>3?X(w,D,V):X(w,D))||V);return F>3&&V&&Object.defineProperty(w,D,V),V},r=t&&t.__param||function(E,w){return function(D,N){w(D,N,E);}},i=t&&t.__awaiter||function(E,w,D,N){function F(V){return V instanceof D?V:new D(function(X){X(V);})}return new(D||(D=Promise))(function(V,X){function te(y){try{k(N.next(y));}catch(T){X(T);}}function ae(y){try{k(N.throw(y));}catch(T){X(T);}}function k(y){y.done?V(y.value):F(y.value).then(te,ae);}k((N=N.apply(E,w||[])).next());})};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var n=Qr(),o=yv(),s=oh(),a=z0(),u=sh(),l=uv(),h=on(),c=ce(),p=g7(),f=Na(),m=Cv(),_=Sa(),x=io(),v=Ct(),g=class{constructor(E,w){this.ruleNames=E,this.tokenStream=w;}enterEveryRule(E){console.log("enter "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text);}exitEveryRule(E){console.log("exit "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text);}visitErrorNode(E){}visitTerminal(E){let w=E.parent.ruleContext,D=E.symbol;console.log("consume "+D+" rule "+this.ruleNames[w.ruleIndex]);}};e([c.Override],g.prototype,"enterEveryRule",null),e([c.Override],g.prototype,"exitEveryRule",null),e([c.Override],g.prototype,"visitErrorNode",null),e([c.Override],g.prototype,"visitTerminal",null);var b=class extends _.Recognizer{constructor(E){super(),this._errHandler=new a.DefaultErrorStrategy,this._precedenceStack=new l.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=E;}reset(E){(E===void 0||E)&&this.inputStream.seek(0),this._errHandler.reset(this),this._ctx=void 0,this._syntaxErrors=0,this.matchedEOF=!1,this.isTrace=!1,this._precedenceStack.clear(),this._precedenceStack.push(0);let w=this.interpreter;w!=null&&w.reset();}match(E){let w=this.currentToken;return w.type===E?(E===v.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(w=this._errHandler.recoverInline(this),this._buildParseTrees&&w.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,w))),w}matchWildcard(){let E=this.currentToken;return E.type>0?(this._errHandler.reportMatch(this),this.consume()):(E=this._errHandler.recoverInline(this),this._buildParseTrees&&E.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,E))),E}set buildParseTree(E){this._buildParseTrees=E;}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(E){if(E==null)throw new TypeError("listener cannot be null");this._parseListeners.push(E);}removeParseListener(E){let w=this._parseListeners.findIndex(D=>D===E);w!==-1&&this._parseListeners.splice(w,1);}removeParseListeners(){this._parseListeners.length=0;}triggerEnterRuleEvent(){for(let E of this._parseListeners)E.enterEveryRule&&E.enterEveryRule(this._ctx),this._ctx.enterRule(E);}triggerExitRuleEvent(){for(let E=this._parseListeners.length-1;E>=0;E--){let w=this._parseListeners[E];this._ctx.exitRule(w),w.exitEveryRule&&w.exitEveryRule(this._ctx);}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let E=this.serializedATN;if(E==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let w=b.bypassAltsAtnCache.get(E);if(w==null){let D=new o.ATNDeserializationOptions;D.isGenerateRuleBypassTransitions=!0,w=new s.ATNDeserializer(D).deserialize(n.toCharArray(E)),b.bypassAltsAtnCache.set(E,w);}return w}compileParseTreePattern(E,w,D){return i(this,void 0,void 0,function*(){if(!D){if(this.inputStream){let X=this.inputStream.tokenSource;X instanceof h.Lexer&&(D=X);}if(!D)throw new Error("Parser can't discover a lexer to use")}let N=D,F=yield Promise.resolve().then(()=>P7());return new F.ParseTreePatternMatcher(N,this).compile(E,w)})}get errorHandler(){return this._errHandler}set errorHandler(E){this._errHandler=E;}get inputStream(){return this._input}set inputStream(E){this.reset(!1),this._input=E;}get currentToken(){return this._input.LT(1)}notifyErrorListeners(E,w,D){w===void 0?w=this.currentToken:w===null&&(w=void 0),this._syntaxErrors++;let N=-1,F=-1;w!=null&&(N=w.line,F=w.charPositionInLine);let V=this.getErrorListenerDispatch();V.syntaxError&&V.syntaxError(this,w,N,F,E,D);}consume(){let E=this.currentToken;E.type!==b.EOF&&this.inputStream.consume();let w=this._parseListeners.length!==0;if(this._buildParseTrees||w)if(this._errHandler.inErrorRecoveryMode(this)){let D=this._ctx.addErrorNode(this.createErrorNode(this._ctx,E));if(w)for(let N of this._parseListeners)N.visitErrorNode&&N.visitErrorNode(D);}else {let D=this.createTerminalNode(this._ctx,E);if(this._ctx.addChild(D),w)for(let N of this._parseListeners)N.visitTerminal&&N.visitTerminal(D);}return E}createTerminalNode(E,w){return new x.TerminalNode(w)}createErrorNode(E,w){return new u.ErrorNode(w)}addContextToParseTree(){let E=this._ctx._parent;E!=null&&E.addChild(this._ctx);}enterRule(E,w,D){this.state=w,this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent();}enterLeftFactoredRule(E,w,D){if(this.state=w,this._buildParseTrees){let N=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),N._parent=E,E.addChild(N);}this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent();}exitRule(){this.matchedEOF?this._ctx._stop=this._input.LT(1):this._ctx._stop=this._input.tryLT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx._parent;}enterOuterAlt(E,w){if(E.altNumber=w,this._buildParseTrees&&this._ctx!==E){let D=this._ctx._parent;D!=null&&(D.removeLastChild(),D.addChild(E));}this._ctx=E;}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(E,w,D,N){this.state=w,this._precedenceStack.push(N),this._ctx=E,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent();}pushNewRecursionContext(E,w,D){let N=this._ctx;N._parent=E,N.invokingState=w,N._stop=this._input.tryLT(-1),this._ctx=E,this._ctx._start=N._start,this._buildParseTrees&&this._ctx.addChild(N),this.triggerEnterRuleEvent();}unrollRecursionContexts(E){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let w=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==E;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=E;w._parent=E,this._buildParseTrees&&E!=null&&E.addChild(w);}getInvokingContext(E){let w=this._ctx;for(;w&&w.ruleIndex!==E;)w=w._parent;return w}get context(){return this._ctx}set context(E){this._ctx=E;}precpred(E,w){return w>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new m.ProxyParserErrorListener(this.getErrorListeners())}inContext(E){return !1}isExpectedToken(E){let w=this.interpreter.atn,D=this._ctx,N=w.states[this.state],F=w.nextTokens(N);if(F.contains(E))return !0;if(!F.contains(v.Token.EPSILON))return !1;for(;D!=null&&D.invokingState>=0&&F.contains(v.Token.EPSILON);){let X=w.states[D.invokingState].transition(0);if(F=w.nextTokens(X.followState),F.contains(E))return !0;D=D._parent;}return !!(F.contains(v.Token.EPSILON)&&E===v.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let E=this.interpreter.atn,w=E.states[this.state];return E.nextTokens(w)}getRuleIndex(E){let w=this.getRuleIndexMap().get(E);return w!=null?w:-1}get ruleContext(){return this._ctx}getRuleInvocationStack(E=this._ctx){let w=E,D=this.ruleNames,N=[];for(;w!=null;){let F=w.ruleIndex;F<0?N.push("n/a"):N.push(D[F]),w=w._parent;}return N}getDFAStrings(){let E=[];for(let w of this._interp.atn.decisionToDFA)E.push(w.toString(this.vocabulary,this.ruleNames));return E}dumpDFA(){let E=!1;for(let w of this._interp.atn.decisionToDFA)w.isEmpty||(E&&console.log(),console.log("Decision "+w.decision+":"),process.stdout.write(w.toString(this.vocabulary,this.ruleNames)),E=!0);}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>iv()).then(E=>{let w=this.interpreter;if(w instanceof E.ProfilingATNSimulator)return new p.ParseInfo(w)})}setProfile(E){return i(this,void 0,void 0,function*(){let w=yield Promise.resolve().then(()=>iv()),D=this.interpreter;E?D instanceof w.ProfilingATNSimulator||(this.interpreter=new w.ProfilingATNSimulator(this)):D instanceof w.ProfilingATNSimulator&&(this.interpreter=new f.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(D.getPredictionMode());})}set isTrace(E){E?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new g(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0);}get isTrace(){return this._tracer!=null}};b.bypassAltsAtnCache=new Map,e([c.NotNull],b.prototype,"_errHandler",void 0),e([c.NotNull],b.prototype,"match",null),e([c.NotNull],b.prototype,"matchWildcard",null),e([c.NotNull],b.prototype,"getParseListeners",null),e([r(0,c.NotNull)],b.prototype,"addParseListener",null),e([c.NotNull],b.prototype,"getATNWithBypassAlts",null),e([c.NotNull,r(0,c.NotNull)],b.prototype,"errorHandler",null),e([c.Override],b.prototype,"inputStream",null),e([c.NotNull],b.prototype,"currentToken",null),e([r(0,c.NotNull)],b.prototype,"enterRule",null),e([c.Override,r(0,c.Nullable)],b.prototype,"precpred",null),e([c.Override],b.prototype,"getErrorListenerDispatch",null),e([c.NotNull],b.prototype,"getExpectedTokens",null),e([c.NotNull],b.prototype,"getExpectedTokensWithinCurrentRule",null),e([c.Override],b.prototype,"parseInfo",null),t.Parser=b;}),ah=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.NoViableAltException=void 0;var r=Fa(),i=en(),n=ce(),o=class extends i.RecognitionException{constructor(s,a,u,l,h,c){s instanceof r.Parser&&(a===void 0&&(a=s.inputStream),u===void 0&&(u=s.currentToken),l===void 0&&(l=s.currentToken),c===void 0&&(c=s.context)),super(s,a,c),this._deadEndConfigs=h,this._startToken=u,this.setOffendingToken(s,l);}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};e([n.NotNull],o.prototype,"_startToken",void 0),t.NoViableAltException=o;}),z0=re(t=>{var e=t&&t.__decorate||function(f,m,_,x){var v=arguments.length,g=v<3?m:x===null?x=Object.getOwnPropertyDescriptor(m,_):x,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(f,m,_,x);else for(var E=f.length-1;E>=0;E--)(b=f[E])&&(g=(v<3?b(g):v>3?b(m,_,g):b(m,_))||g);return v>3&&g&&Object.defineProperty(m,_,g),g},r=t&&t.__param||function(f,m){return function(_,x){m(_,x,f);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultErrorStrategy=void 0;var i=Ei(),n=Zt(),o=Xl(),s=Jl(),a=os(),u=ah(),l=jr(),h=Ct(),c=ce(),p=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=i.ATNState.INVALID_STATE_NUMBER;}reset(f){this.endErrorCondition(f);}beginErrorCondition(f){this.errorRecoveryMode=!0;}inErrorRecoveryMode(f){return this.errorRecoveryMode}endErrorCondition(f){this.errorRecoveryMode=!1,this.lastErrorStates=void 0,this.lastErrorIndex=-1;}reportMatch(f){this.endErrorCondition(f);}reportError(f,m){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),m instanceof u.NoViableAltException?this.reportNoViableAlternative(f,m):m instanceof s.InputMismatchException?this.reportInputMismatch(f,m):m instanceof o.FailedPredicateException?this.reportFailedPredicate(f,m):(console.error(`unknown recognition error type: ${m}`),this.notifyErrorListeners(f,m.toString(),m)));}notifyErrorListeners(f,m,_){let x=_.getOffendingToken(f);x===void 0&&(x=null),f.notifyErrorListeners(m,x,_);}recover(f,m){this.lastErrorIndex===f.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(f.state)&&f.consume(),this.lastErrorIndex=f.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new a.IntervalSet),this.lastErrorStates.add(f.state);let _=this.getErrorRecoverySet(f);this.consumeUntil(f,_);}sync(f){let m=f.interpreter.atn.states[f.state];if(this.inErrorRecoveryMode(f))return;let x=f.inputStream.LA(1),v=f.atn.nextTokens(m);if(v.contains(x)){this.nextTokensContext=void 0,this.nextTokensState=i.ATNState.INVALID_STATE_NUMBER;return}if(v.contains(h.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=f.context,this.nextTokensState=f.state);return}switch(m.stateType){case n.ATNStateType.BLOCK_START:case n.ATNStateType.STAR_BLOCK_START:case n.ATNStateType.PLUS_BLOCK_START:case n.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f))return;throw new s.InputMismatchException(f);case n.ATNStateType.PLUS_LOOP_BACK:case n.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(f);let b=f.getExpectedTokens().or(this.getErrorRecoverySet(f));this.consumeUntil(f,b);break;}}reportNoViableAlternative(f,m){let _=f.inputStream,x;_?m.startToken.type===h.Token.EOF?x="<EOF>":x=_.getTextFromRange(m.startToken,m.getOffendingToken()):x="<unknown input>";let v="no viable alternative at input "+this.escapeWSAndQuote(x);this.notifyErrorListeners(f,v,m);}reportInputMismatch(f,m){let _=m.expectedTokens,x=_?_.toStringVocabulary(f.vocabulary):"",v="mismatched input "+this.getTokenErrorDisplay(m.getOffendingToken(f))+" expecting "+x;this.notifyErrorListeners(f,v,m);}reportFailedPredicate(f,m){let x="rule "+f.ruleNames[f.context.ruleIndex]+" "+m.message;this.notifyErrorListeners(f,x,m);}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.currentToken,_=this.getTokenErrorDisplay(m),x=this.getExpectedTokens(f),v="extraneous input "+_+" expecting "+x.toStringVocabulary(f.vocabulary);f.notifyErrorListeners(v,m,void 0);}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.currentToken,x="missing "+this.getExpectedTokens(f).toStringVocabulary(f.vocabulary)+" at "+this.getTokenErrorDisplay(m);f.notifyErrorListeners(x,m,void 0);}recoverInline(f){let m=this.singleTokenDeletion(f);if(m)return f.consume(),m;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw this.nextTokensContext===void 0?new s.InputMismatchException(f):new s.InputMismatchException(f,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(f){let m=f.inputStream.LA(1),x=f.interpreter.atn.states[f.state].transition(0).target,v=f.interpreter.atn;return v.nextTokens(x,l.PredictionContext.fromRuleContext(v,f.context)).contains(m)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let m=f.inputStream.LA(2);if(this.getExpectedTokens(f).contains(m)){this.reportUnwantedToken(f),f.consume();let x=f.currentToken;return this.reportMatch(f),x}}getMissingSymbol(f){let m=f.currentToken,_=this.getExpectedTokens(f),x=h.Token.INVALID_TYPE;_.isNil||(x=_.minElement);let v;x===h.Token.EOF?v="<missing EOF>":v="<missing "+f.vocabulary.getDisplayName(x)+">";let g=m,b=f.inputStream.tryLT(-1);return g.type===h.Token.EOF&&b!=null&&(g=b),this.constructToken(f.inputStream.tokenSource,x,v,g)}constructToken(f,m,_,x){let v=f.tokenFactory,g=x.tokenSource,b=g?g.inputStream:void 0;return v.create({source:f,stream:b},m,_,h.Token.DEFAULT_CHANNEL,-1,-1,x.line,x.charPositionInLine)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(!f)return "<no token>";let m=this.getSymbolText(f);return m||(this.getSymbolType(f)===h.Token.EOF?m="<EOF>":m=`<${this.getSymbolType(f)}>`),this.escapeWSAndQuote(m)}getSymbolText(f){return f.text}getSymbolType(f){return f.type}escapeWSAndQuote(f){return f=f.replace(`
|
|
80
|
+
`,"\\n"),f=f.replace("\r","\\r"),f=f.replace(" ","\\t"),"'"+f+"'"}getErrorRecoverySet(f){let m=f.interpreter.atn,_=f.context,x=new a.IntervalSet;for(;_&&_.invokingState>=0;){let g=m.states[_.invokingState].transition(0),b=m.nextTokens(g.followState);x.addAll(b),_=_._parent;}return x.remove(h.Token.EPSILON),x}consumeUntil(f,m){let _=f.inputStream.LA(1);for(;_!==h.Token.EOF&&!m.contains(_);)f.consume(),_=f.inputStream.LA(1);}};e([c.Override],p.prototype,"reset",null),e([r(0,c.NotNull)],p.prototype,"beginErrorCondition",null),e([c.Override],p.prototype,"inErrorRecoveryMode",null),e([r(0,c.NotNull)],p.prototype,"endErrorCondition",null),e([c.Override],p.prototype,"reportMatch",null),e([c.Override],p.prototype,"reportError",null),e([r(0,c.NotNull)],p.prototype,"notifyErrorListeners",null),e([c.Override],p.prototype,"recover",null),e([c.Override],p.prototype,"sync",null),e([r(0,c.NotNull),r(1,c.NotNull)],p.prototype,"reportNoViableAlternative",null),e([r(0,c.NotNull),r(1,c.NotNull)],p.prototype,"reportInputMismatch",null),e([r(0,c.NotNull),r(1,c.NotNull)],p.prototype,"reportFailedPredicate",null),e([r(0,c.NotNull)],p.prototype,"reportUnwantedToken",null),e([r(0,c.NotNull)],p.prototype,"reportMissingToken",null),e([c.Override],p.prototype,"recoverInline",null),e([r(0,c.NotNull)],p.prototype,"singleTokenInsertion",null),e([r(0,c.NotNull)],p.prototype,"singleTokenDeletion",null),e([c.NotNull,r(0,c.NotNull)],p.prototype,"getMissingSymbol",null),e([c.NotNull,r(0,c.NotNull)],p.prototype,"getExpectedTokens",null),e([r(0,c.NotNull)],p.prototype,"getSymbolText",null),e([r(0,c.NotNull)],p.prototype,"getSymbolType",null),e([c.NotNull,r(0,c.NotNull)],p.prototype,"escapeWSAndQuote",null),e([c.NotNull,r(0,c.NotNull)],p.prototype,"getErrorRecoverySet",null),e([r(0,c.NotNull),r(1,c.NotNull)],p.prototype,"consumeUntil",null),t.DefaultErrorStrategy=p;}),Lv=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p};Object.defineProperty(t,"__esModule",{value:!0}),t.BailErrorStrategy=void 0;var r=z0(),i=Jl(),n=ce(),o=Rv(),s=class extends r.DefaultErrorStrategy{recover(a,u){for(let l=a.context;l;l=l.parent)l.exception=u;throw new o.ParseCancellationException(u)}recoverInline(a){let u=new i.InputMismatchException(a);for(let l=a.context;l;l=l.parent)l.exception=u;throw new o.ParseCancellationException(u)}sync(a){}};e([n.Override],s.prototype,"recover",null),e([n.Override],s.prototype,"recoverInline",null),e([n.Override],s.prototype,"sync",null),t.BailErrorStrategy=s;}),j7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),U7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Dependents=void 0;(function(r){r[r.SELF=0]="SELF",r[r.PARENTS=1]="PARENTS",r[r.CHILDREN=2]="CHILDREN",r[r.ANCESTORS=3]="ANCESTORS",r[r.DESCENDANTS=4]="DESCENDANTS",r[r.SIBLINGS=5]="SIBLINGS",r[r.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",r[r.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",r[r.PRECEEDING=8]="PRECEEDING",r[r.FOLLOWING=9]="FOLLOWING";})(t.Dependents||(t.Dependents={}));}),V7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,p=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(p=(c<3?f(p):c>3?f(u,l,p):f(u,l))||p);return c>3&&p&&Object.defineProperty(u,l,p),p},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticErrorListener=void 0;var i=nn(),n=ce(),o=pr(),s=class{constructor(a=!0){this.exactOnly=a,this.exactOnly=a;}syntaxError(a,u,l,h,c,p){}reportAmbiguity(a,u,l,h,c,p,f){if(this.exactOnly&&!c)return;let m=this.getDecisionDescription(a,u),_=this.getConflictingAlts(p,f),x=a.inputStream.getText(o.Interval.of(l,h)),v=`reportAmbiguity d=${m}: ambigAlts=${_}, input='${x}'`;a.notifyErrorListeners(v);}reportAttemptingFullContext(a,u,l,h,c,p){let m=this.getDecisionDescription(a,u),_=a.inputStream.getText(o.Interval.of(l,h)),x=`reportAttemptingFullContext d=${m}, input='${_}'`;a.notifyErrorListeners(x);}reportContextSensitivity(a,u,l,h,c,p){let m=this.getDecisionDescription(a,u),_=a.inputStream.getText(o.Interval.of(l,h)),x=`reportContextSensitivity d=${m}, input='${_}'`;a.notifyErrorListeners(x);}getDecisionDescription(a,u){let l=u.decision,h=u.atnStartState.ruleIndex,c=a.ruleNames;if(h<0||h>=c.length)return l.toString();let p=c[h];return p?`${l} (${p})`:l.toString()}getConflictingAlts(a,u){if(a!=null)return a;let l=new i.BitSet;for(let h of u)l.set(h.alt);return l}};e([n.Override],s.prototype,"syntaxError",null),e([n.Override,r(0,n.NotNull),r(1,n.NotNull),r(6,n.NotNull)],s.prototype,"reportAmbiguity",null),e([n.Override,r(0,n.NotNull),r(1,n.NotNull),r(5,n.NotNull)],s.prototype,"reportAttemptingFullContext",null),e([n.Override,r(0,n.NotNull),r(1,n.NotNull),r(5,n.NotNull)],s.prototype,"reportContextSensitivity",null),e([r(0,n.NotNull),r(1,n.NotNull)],s.prototype,"getDecisionDescription",null),e([n.NotNull,r(1,n.NotNull)],s.prototype,"getConflictingAlts",null),t.DiagnosticErrorListener=s;}),$7=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var p=arguments.length,f=p<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var _=u.length-1;_>=0;_--)(m=u[_])&&(f=(p<3?m(f):p>3?m(l,h,f):m(l,h))||f);return p>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerInterpreter=void 0;var i=on(),n=ih(),o=ce(),s=ce(),a=class extends i.Lexer{constructor(l,h,c,p,f,m,_){if(super(_),m.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=l,this._atn=m,this._ruleNames=c.slice(0),this._channelNames=p.slice(0),this._modeNames=f.slice(0),this._vocabulary=h,this._interp=new n.LexerATNSimulator(m,this);}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};e([o.NotNull],a.prototype,"_vocabulary",void 0),e([s.Override],a.prototype,"atn",null),e([s.Override],a.prototype,"grammarFileName",null),e([s.Override],a.prototype,"ruleNames",null),e([s.Override],a.prototype,"channelNames",null),e([s.Override],a.prototype,"modeNames",null),e([s.Override],a.prototype,"vocabulary",null),a=e([r(1,o.NotNull)],a),t.LexerInterpreter=a;}),z7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),K7=re(t=>{var e=t&&t.__decorate||function(s,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,u,l);else for(var f=s.length-1;f>=0;f--)(p=s[f])&&(c=(h<3?p(c):h>3?p(a,u,c):p(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleContextWithAltNum=void 0;var r=ei(),i=ce(),n=Ur(),o=class extends n.ParserRuleContext{constructor(s,a){a!==void 0?super(s,a):super(),this._altNumber=r.ATN.INVALID_ALT_NUMBER;}get altNumber(){return this._altNumber}set altNumber(s){this._altNumber=s;}};e([i.Override],o.prototype,"altNumber",null),t.RuleContextWithAltNum=o;}),G7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleDependency=void 0;function e(r){return (i,n,o)=>{}}t.RuleDependency=e;}),W7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleVersion=void 0;function e(r){return (i,n,o)=>{}}t.RuleVersion=e;}),Y7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),Z7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),X7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),J7=re(t=>{var e=t&&t.__decorate||function(h,c,p,f){var m=arguments.length,_=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,p):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(h,c,p,f);else for(var v=h.length-1;v>=0;v--)(x=h[v])&&(_=(m<3?x(_):m>3?x(c,p,_):x(c,p))||_);return m>3&&_&&Object.defineProperty(c,p,_),_};Object.defineProperty(t,"__esModule",{value:!0}),t.RewriteOperation=t.TokenStreamRewriter=void 0;var r=pr(),i=ce(),n=Ct(),o=class{constructor(h){this.tokens=h,this.programs=new Map,this.programs.set(o.DEFAULT_PROGRAM_NAME,[]),this.lastRewriteTokenIndexes=new Map;}getTokenStream(){return this.tokens}rollback(h,c=o.DEFAULT_PROGRAM_NAME){let p=this.programs.get(c);p!=null&&this.programs.set(c,p.slice(o.MIN_TOKEN_INDEX,h));}deleteProgram(h=o.DEFAULT_PROGRAM_NAME){this.rollback(o.MIN_TOKEN_INDEX,h);}insertAfter(h,c,p=o.DEFAULT_PROGRAM_NAME){let f;typeof h=="number"?f=h:f=h.tokenIndex;let m=this.getProgram(p),_=new u(this.tokens,f,m.length,c);m.push(_);}insertBefore(h,c,p=o.DEFAULT_PROGRAM_NAME){let f;typeof h=="number"?f=h:f=h.tokenIndex;let m=this.getProgram(p),_=new a(this.tokens,f,m.length,c);m.push(_);}replaceSingle(h,c){typeof h=="number"?this.replace(h,h,c):this.replace(h,h,c);}replace(h,c,p,f=o.DEFAULT_PROGRAM_NAME){if(typeof h!="number"&&(h=h.tokenIndex),typeof c!="number"&&(c=c.tokenIndex),h>c||h<0||c<0||c>=this.tokens.size)throw new RangeError(`replace: range invalid: ${h}..${c}(size=${this.tokens.size})`);let m=this.getProgram(f),_=new l(this.tokens,h,c,m.length,p);m.push(_);}delete(h,c,p=o.DEFAULT_PROGRAM_NAME){c===void 0&&(c=h),typeof h=="number"?this.replace(h,c,"",p):this.replace(h,c,"",p);}getLastRewriteTokenIndex(h=o.DEFAULT_PROGRAM_NAME){let c=this.lastRewriteTokenIndexes.get(h);return c==null?-1:c}setLastRewriteTokenIndex(h,c){this.lastRewriteTokenIndexes.set(h,c);}getProgram(h){let c=this.programs.get(h);return c==null&&(c=this.initializeProgram(h)),c}initializeProgram(h){let c=[];return this.programs.set(h,c),c}getText(h,c=o.DEFAULT_PROGRAM_NAME){let p;h instanceof r.Interval?p=h:p=r.Interval.of(0,this.tokens.size-1),typeof h=="string"&&(c=h);let f=this.programs.get(c),m=p.a,_=p.b;if(_>this.tokens.size-1&&(_=this.tokens.size-1),m<0&&(m=0),f==null||f.length===0)return this.tokens.getText(p);let x=[],v=this.reduceToSingleOperationPerIndex(f),g=m;for(;g<=_&&g<this.tokens.size;){let b=v.get(g);v.delete(g);let E=this.tokens.get(g);b==null?(E.type!==n.Token.EOF&&x.push(String(E.text)),g++):g=b.execute(x);}if(_===this.tokens.size-1)for(let b of v.values())b.index>=this.tokens.size-1&&x.push(b.text.toString());return x.join("")}reduceToSingleOperationPerIndex(h){for(let p=0;p<h.length;p++){let f=h[p];if(f==null||!(f instanceof l))continue;let m=f,_=this.getKindOfOps(h,a,p);for(let v of _)v.index===m.index?(h[v.instructionIndex]=void 0,m.text=v.text.toString()+(m.text!=null?m.text.toString():"")):v.index>m.index&&v.index<=m.lastIndex&&(h[v.instructionIndex]=void 0);let x=this.getKindOfOps(h,l,p);for(let v of x){if(v.index>=m.index&&v.lastIndex<=m.lastIndex){h[v.instructionIndex]=void 0;continue}let g=v.lastIndex<m.index||v.index>m.lastIndex;if(v.text==null&&m.text==null&&!g)h[v.instructionIndex]=void 0,m.index=Math.min(v.index,m.index),m.lastIndex=Math.max(v.lastIndex,m.lastIndex);else if(!g)throw new Error(`replace op boundaries of ${m} overlap with previous ${v}`)}}for(let p=0;p<h.length;p++){let f=h[p];if(f==null||!(f instanceof a))continue;let m=f,_=this.getKindOfOps(h,a,p);for(let v of _)v.index===m.index&&(v instanceof u?(m.text=this.catOpText(v.text,m.text),h[v.instructionIndex]=void 0):v instanceof a&&(m.text=this.catOpText(m.text,v.text),h[v.instructionIndex]=void 0));let x=this.getKindOfOps(h,l,p);for(let v of x){if(m.index===v.index){v.text=this.catOpText(m.text,v.text),h[p]=void 0;continue}if(m.index>=v.index&&m.index<=v.lastIndex)throw new Error(`insert op ${m} within boundaries of previous ${v}`)}}let c=new Map;for(let p of h)if(p!=null){if(c.get(p.index)!=null)throw new Error("should only be one op per index");c.set(p.index,p);}return c}catOpText(h,c){let p="",f="";return h!=null&&(p=h.toString()),c!=null&&(f=c.toString()),p+f}getKindOfOps(h,c,p){let f=[];for(let m=0;m<p&&m<h.length;m++){let _=h[m];_!=null&&_ instanceof c&&f.push(_);}return f}};t.TokenStreamRewriter=o,o.DEFAULT_PROGRAM_NAME="default",o.PROGRAM_INIT_SIZE=100,o.MIN_TOKEN_INDEX=0;var s=class{constructor(h,c,p,f){this.tokens=h,this.instructionIndex=p,this.index=c,this.text=f===void 0?"":f;}execute(h){return this.index}toString(){let h=this.constructor.name,c=h.indexOf("$");return h=h.substring(c+1,h.length),"<"+h+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}};e([i.Override],s.prototype,"toString",null),t.RewriteOperation=s;var a=class extends s{constructor(h,c,p,f){super(h,c,p,f);}execute(h){return h.push(this.text.toString()),this.tokens.get(this.index).type!==n.Token.EOF&&h.push(String(this.tokens.get(this.index).text)),this.index+1}};e([i.Override],a.prototype,"execute",null);var u=class extends a{constructor(h,c,p,f){super(h,c+1,p,f);}},l=class extends s{constructor(h,c,p,f,m){super(h,c,f,m),this.lastIndex=p;}execute(h){return this.text!=null&&h.push(this.text.toString()),this.lastIndex+1}toString(){return this.text==null?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}};e([i.Override],l.prototype,"execute",null),e([i.Override],l.prototype,"toString",null);}),Q7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),e8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),t8=re(t=>{var e=t&&t.__createBinding||(Object.create?function(i,n,o,s){s===void 0&&(s=o),Object.defineProperty(i,s,{enumerable:!0,get:function(){return n[o]}});}:function(i,n,o,s){s===void 0&&(s=o),i[s]=n[o];}),r=t&&t.__exportStar||function(i,n){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&e(n,i,o);};Object.defineProperty(t,"__esModule",{value:!0}),r(HL(),t),r(jL(),t),r(UL(),t),r(Lv(),t),r(Dv(),t),r(j7(),t),r(U0(),t),r(Av(),t),r(wv(),t),r(wa(),t),r(P0(),t),r(V0(),t),r(cv(),t),r(z0(),t),r(U7(),t),r(V7(),t),r(Xl(),t),r(Jl(),t),r(Nv(),t),r(Qi(),t),r(on(),t),r($7(),t),r(rh(),t),r(Sv(),t),r(ah(),t),r(Fa(),t),r(z7(),t),r(Ov(),t),r(Ur(),t),r(k0(),t),r(Cv(),t),r(en(),t),r(Sa(),t),r(bv(),t),r(K7(),t),r(G7(),t),r(W7(),t),r(Ct(),t),r(Y7(),t),r(Z7(),t),r(X7(),t),r(J7(),t),r(Q7(),t),r(sn(),t),r(e8(),t);}),r8=re(t=>{var e=t&&t.__decorate||function(o,s,a,u){var l=arguments.length,h=l<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(o,s,a,u);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(h=(l<3?c(h):l>3?c(s,a,h):c(s,a))||h);return l>3&&h&&Object.defineProperty(s,a,h),h},r=t&&t.__param||function(o,s){return function(a,u){s(a,u,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractParseTreeVisitor=void 0;var i=ce(),n=class{visit(o){return o.accept(this)}visitChildren(o){let s=this.defaultResult(),a=o.childCount;for(let u=0;u<a&&this.shouldVisitNextChild(o,s);u++){let h=o.getChild(u).accept(this);s=this.aggregateResult(s,h);}return s}visitTerminal(o){return this.defaultResult()}visitErrorNode(o){return this.defaultResult()}aggregateResult(o,s){return s}shouldVisitNextChild(o,s){return !0}};e([i.Override,r(0,i.NotNull)],n.prototype,"visit",null),e([i.Override,r(0,i.NotNull)],n.prototype,"visitChildren",null),e([i.Override,r(0,i.NotNull)],n.prototype,"visitTerminal",null),e([i.Override,r(0,i.NotNull)],n.prototype,"visitErrorNode",null),e([r(0,i.NotNull)],n.prototype,"shouldVisitNextChild",null),t.AbstractParseTreeVisitor=n;}),mr=re((t,e)=>{function r(_){return Array.isArray(_)?"["+_.join(", ")+"]":"null"}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32)),String.prototype.hashCode=function(){let _=this.toString(),x,v,g=_.length&3,b=_.length-g,E=String.prototype.seed,w=3432918353,D=461845907,N=0;for(;N<b;)v=_.charCodeAt(N)&255|(_.charCodeAt(++N)&255)<<8|(_.charCodeAt(++N)&255)<<16|(_.charCodeAt(++N)&255)<<24,++N,v=(v&65535)*w+(((v>>>16)*w&65535)<<16)&4294967295,v=v<<15|v>>>17,v=(v&65535)*D+(((v>>>16)*D&65535)<<16)&4294967295,E^=v,E=E<<13|E>>>19,x=(E&65535)*5+(((E>>>16)*5&65535)<<16)&4294967295,E=(x&65535)+27492+(((x>>>16)+58964&65535)<<16);switch(v=0,g){case 3:v^=(_.charCodeAt(N+2)&255)<<16;case 2:v^=(_.charCodeAt(N+1)&255)<<8;case 1:v^=_.charCodeAt(N)&255,v=(v&65535)*w+(((v>>>16)*w&65535)<<16)&4294967295,v=v<<15|v>>>17,v=(v&65535)*D+(((v>>>16)*D&65535)<<16)&4294967295,E^=v;}return E^=_.length,E^=E>>>16,E=(E&65535)*2246822507+(((E>>>16)*2246822507&65535)<<16)&4294967295,E^=E>>>13,E=(E&65535)*3266489909+(((E>>>16)*3266489909&65535)<<16)&4294967295,E^=E>>>16,E>>>0};function i(_,x){return _?_.equals(x):_==x}function n(_){return _?_.hashCode():-1}var o=class{constructor(_,x){this.data={},this.hashFunction=_||n,this.equalsFunction=x||i;}add(_){let v="hash_"+this.hashFunction(_);if(v in this.data){let g=this.data[v];for(let b=0;b<g.length;b++)if(this.equalsFunction(_,g[b]))return g[b];return g.push(_),_}else return this.data[v]=[_],_}contains(_){return this.get(_)!=null}get(_){let v="hash_"+this.hashFunction(_);if(v in this.data){let g=this.data[v];for(let b=0;b<g.length;b++)if(this.equalsFunction(_,g[b]))return g[b]}return null}values(){let _=[];for(let x in this.data)x.indexOf("hash_")===0&&(_=_.concat(this.data[x]));return _}toString(){return r(this.values())}get length(){let _=0;for(let x in this.data)x.indexOf("hash_")===0&&(_=_+this.data[x].length);return _}},s=class{constructor(){this.data=[];}add(_){this.data[_]=!0;}or(_){let x=this;Object.keys(_.data).map(function(v){x.add(v);});}remove(_){delete this.data[_];}contains(_){return this.data[_]===!0}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){let _=new h;return _.update(this.values()),_.finish()}equals(_){return _ instanceof s?this.hashCode()===_.hashCode():!1}toString(){return "{"+this.values().join(", ")+"}"}get length(){return this.values().length}},a=class{constructor(_,x){this.data={},this.hashFunction=_||n,this.equalsFunction=x||i;}put(_,x){let v="hash_"+this.hashFunction(_);if(v in this.data){let g=this.data[v];for(let b=0;b<g.length;b++){let E=g[b];if(this.equalsFunction(_,E.key)){let w=E.value;return E.value=x,w}}return g.push({key:_,value:x}),x}else return this.data[v]=[{key:_,value:x}],x}containsKey(_){let x="hash_"+this.hashFunction(_);if(x in this.data){let v=this.data[x];for(let g=0;g<v.length;g++){let b=v[g];if(this.equalsFunction(_,b.key))return !0}}return !1}get(_){let x="hash_"+this.hashFunction(_);if(x in this.data){let v=this.data[x];for(let g=0;g<v.length;g++){let b=v[g];if(this.equalsFunction(_,b.key))return b.value}}return null}entries(){let _=[];for(let x in this.data)x.indexOf("hash_")===0&&(_=_.concat(this.data[x]));return _}getKeys(){return this.entries().map(function(_){return _.key})}getValues(){return this.entries().map(function(_){return _.value})}toString(){return "["+this.entries().map(function(x){return "{"+x.key+":"+x.value+"}"}).join(", ")+"]"}get length(){let _=0;for(let x in this.data)x.indexOf("hash_")===0&&(_=_+this.data[x].length);return _}},u=class{constructor(){this.data={};}get(_){return _="k-"+_,_ in this.data?this.data[_]:null}put(_,x){_="k-"+_,this.data[_]=x;}values(){let _=this.data;return Object.keys(this.data).map(function(v){return _[v]})}},l=class{constructor(_){this.defaultMapCtor=_||a,this.cacheMap=new this.defaultMapCtor;}get(_,x){let v=this.cacheMap.get(_)||null;return v===null?null:v.get(x)||null}set(_,x,v){let g=this.cacheMap.get(_)||null;g===null&&(g=new this.defaultMapCtor,this.cacheMap.put(_,g)),g.put(x,v);}},h=class{constructor(){this.count=0,this.hash=0;}update(){for(let _=0;_<arguments.length;_++){let x=arguments[_];if(x!=null)if(Array.isArray(x))this.update.apply(this,x);else {let v=0;switch(typeof x){case"undefined":case"function":continue;case"number":case"boolean":v=x;break;case"string":v=x.hashCode();break;default:x.updateHashCode?x.updateHashCode(this):console.log("No updateHashCode for "+x.toString());continue}v=v*3432918353,v=v<<15|v>>>17,v=v*461845907,this.count=this.count+1;let g=this.hash^v;g=g<<13|g>>>19,g=g*5+3864292196,this.hash=g;}}}finish(){let _=this.hash^this.count*4;return _=_^_>>>16,_=_*2246822507,_=_^_>>>13,_=_*3266489909,_=_^_>>>16,_}};function c(){let _=new h;return _.update.apply(_,arguments),_.finish()}function p(_,x){return _=_.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),x&&(_=_.replace(/ /g,"\xB7")),_}function f(_){return _.replace(/\w\S*/g,function(x){return x.charAt(0).toUpperCase()+x.substr(1)})}function m(_,x){if(!Array.isArray(_)||!Array.isArray(x))return !1;if(_===x)return !0;if(_.length!==x.length)return !1;for(let v=0;v<_.length;v++)if(_[v]!==x[v]&&(!_[v].equals||!_[v].equals(x[v])))return !1;return !0}e.exports={Hash:h,Set:o,Map:a,BitSet:s,AltDict:u,DoubleDict:l,hashStuff:c,escapeWhitespace:p,arrayToString:r,titleCase:f,equalArrays:m};}),Ut=re((t,e)=>{var r=class{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null;}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(n){this._text=n;}};r.INVALID_TYPE=0,r.EPSILON=-2,r.MIN_USER_TOKEN_TYPE=1,r.EOF=-1,r.DEFAULT_CHANNEL=0,r.HIDDEN_CHANNEL=1;var i=class extends r{constructor(n,o,s,a,u){super(),this.source=n!==void 0?n:i.EMPTY_SOURCE,this.type=o!==void 0?o:null,this.channel=s!==void 0?s:r.DEFAULT_CHANNEL,this.start=a!==void 0?a:-1,this.stop=u!==void 0?u:-1,this.tokenIndex=-1,this.source[0]!==null?(this.line=n[0].line,this.column=n[0].column):this.column=-1;}clone(){let n=new i(this.source,this.type,this.channel,this.start,this.stop);return n.tokenIndex=this.tokenIndex,n.line=this.line,n.column=this.column,n.text=this.text,n}toString(){let n=this.text;return n!==null?n=n.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):n="<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+n+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(this._text!==null)return this._text;let n=this.getInputStream();if(n===null)return null;let o=n.size;return this.start<o&&this.stop<o?n.getText(this.start,this.stop):"<EOF>"}set text(n){this._text=n;}};i.EMPTY_SOURCE=[null,null],e.exports={Token:r,CommonToken:i};}),an=re((t,e)=>{var r=class{constructor(){this.atn=null,this.stateNumber=r.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null;}toString(){return this.stateNumber}equals(v){return v instanceof r?this.stateNumber===v.stateNumber:!1}isNonGreedyExitState(){return !1}addTransition(v,g){g===void 0&&(g=-1),this.transitions.length===0?this.epsilonOnlyTransitions=v.isEpsilon:this.epsilonOnlyTransitions!==v.isEpsilon&&(this.epsilonOnlyTransitions=!1),g===-1?this.transitions.push(v):this.transitions.splice(g,1,v);}};r.INVALID_TYPE=0,r.BASIC=1,r.RULE_START=2,r.BLOCK_START=3,r.PLUS_BLOCK_START=4,r.STAR_BLOCK_START=5,r.TOKEN_START=6,r.RULE_STOP=7,r.BLOCK_END=8,r.STAR_LOOP_BACK=9,r.STAR_LOOP_ENTRY=10,r.PLUS_LOOP_BACK=11,r.LOOP_END=12,r.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],r.INVALID_STATE_NUMBER=-1;var i=class extends r{constructor(){super(),this.stateType=r.BASIC;}},n=class extends r{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}},o=class extends n{constructor(){return super(),this.endState=null,this}},s=class extends o{constructor(){return super(),this.stateType=r.BLOCK_START,this}},a=class extends r{constructor(){return super(),this.stateType=r.BLOCK_END,this.startState=null,this}},u=class extends r{constructor(){return super(),this.stateType=r.RULE_STOP,this}},l=class extends r{constructor(){return super(),this.stateType=r.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}},h=class extends n{constructor(){return super(),this.stateType=r.PLUS_LOOP_BACK,this}},c=class extends o{constructor(){return super(),this.stateType=r.PLUS_BLOCK_START,this.loopBackState=null,this}},p=class extends o{constructor(){return super(),this.stateType=r.STAR_BLOCK_START,this}},f=class extends r{constructor(){return super(),this.stateType=r.STAR_LOOP_BACK,this}},m=class extends n{constructor(){return super(),this.stateType=r.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}},_=class extends r{constructor(){return super(),this.stateType=r.LOOP_END,this.loopBackState=null,this}},x=class extends n{constructor(){return super(),this.stateType=r.TOKEN_START,this}};e.exports={ATNState:r,BasicState:i,DecisionState:n,BlockStartState:o,BlockEndState:a,LoopEndState:_,RuleStartState:l,RuleStopState:u,TokensStartState:x,PlusLoopbackState:h,StarLoopbackState:f,StarLoopEntryState:m,PlusBlockStartState:c,StarBlockStartState:p,BasicBlockStartState:s};}),La=re((t,e)=>{var{Set:r,Hash:i,equalArrays:n}=mr(),o=class{hashCode(){let h=new i;return this.updateHashCode(h),h.finish()}evaluate(h,c){}evalPrecedence(h,c){return this}static andContext(h,c){if(h===null||h===o.NONE)return c;if(c===null||c===o.NONE)return h;let p=new u(h,c);return p.opnds.length===1?p.opnds[0]:p}static orContext(h,c){if(h===null)return c;if(c===null)return h;if(h===o.NONE||c===o.NONE)return o.NONE;let p=new l(h,c);return p.opnds.length===1?p.opnds[0]:p}},s=class extends o{constructor(h,c,p){super(),this.ruleIndex=h===void 0?-1:h,this.predIndex=c===void 0?-1:c,this.isCtxDependent=p===void 0?!1:p;}evaluate(h,c){let p=this.isCtxDependent?c:null;return h.sempred(p,this.ruleIndex,this.predIndex)}updateHashCode(h){h.update(this.ruleIndex,this.predIndex,this.isCtxDependent);}equals(h){return this===h?!0:h instanceof s?this.ruleIndex===h.ruleIndex&&this.predIndex===h.predIndex&&this.isCtxDependent===h.isCtxDependent:!1}toString(){return "{"+this.ruleIndex+":"+this.predIndex+"}?"}};o.NONE=new s;var a=class extends o{constructor(h){super(),this.precedence=h===void 0?0:h;}evaluate(h,c){return h.precpred(c,this.precedence)}evalPrecedence(h,c){return h.precpred(c,this.precedence)?o.NONE:null}compareTo(h){return this.precedence-h.precedence}updateHashCode(h){h.update(this.precedence);}equals(h){return this===h?!0:h instanceof a?this.precedence===h.precedence:!1}toString(){return "{"+this.precedence+">=prec}?"}static filterPrecedencePredicates(h){let c=[];return h.values().map(function(p){p instanceof a&&c.push(p);}),c}},u=class extends o{constructor(h,c){super();let p=new r;h instanceof u?h.opnds.map(function(m){p.add(m);}):p.add(h),c instanceof u?c.opnds.map(function(m){p.add(m);}):p.add(c);let f=a.filterPrecedencePredicates(p);if(f.length>0){let m=null;f.map(function(_){(m===null||_.precedence<m.precedence)&&(m=_);}),p.add(m);}this.opnds=Array.from(p.values());}equals(h){return this===h?!0:h instanceof u?n(this.opnds,h.opnds):!1}updateHashCode(h){h.update(this.opnds,"AND");}evaluate(h,c){for(let p=0;p<this.opnds.length;p++)if(!this.opnds[p].evaluate(h,c))return !1;return !0}evalPrecedence(h,c){let p=!1,f=[];for(let _=0;_<this.opnds.length;_++){let x=this.opnds[_],v=x.evalPrecedence(h,c);if(p|=v!==x,v===null)return null;v!==o.NONE&&f.push(v);}if(!p)return this;if(f.length===0)return o.NONE;let m=null;return f.map(function(_){m=m===null?_:o.andContext(m,_);}),m}toString(){let h=this.opnds.map(c=>c.toString());return (h.length>3?h.slice(3):h).join("&&")}},l=class extends o{constructor(h,c){super();let p=new r;h instanceof l?h.opnds.map(function(m){p.add(m);}):p.add(h),c instanceof l?c.opnds.map(function(m){p.add(m);}):p.add(c);let f=a.filterPrecedencePredicates(p);if(f.length>0){let m=f.sort(function(x,v){return x.compareTo(v)}),_=m[m.length-1];p.add(_);}this.opnds=Array.from(p.values());}equals(h){return this===h?!0:h instanceof l?n(this.opnds,h.opnds):!1}updateHashCode(h){h.update(this.opnds,"OR");}evaluate(h,c){for(let p=0;p<this.opnds.length;p++)if(this.opnds[p].evaluate(h,c))return !0;return !1}evalPrecedence(h,c){let p=!1,f=[];for(let _=0;_<this.opnds.length;_++){let x=this.opnds[_],v=x.evalPrecedence(h,c);if(p|=v!==x,v===o.NONE)return o.NONE;v!==null&&f.push(v);}if(!p)return this;if(f.length===0)return null;let m=null;return m}toString(){let h=this.opnds.map(c=>c.toString());return (h.length>3?h.slice(3):h).join("||")}};e.exports={SemanticContext:o,PrecedencePredicate:a,Predicate:s};}),uh=re((t,e)=>{var{DecisionState:r}=an(),{SemanticContext:i}=La(),{Hash:n}=mr();function o(u,l){if(u===null){let h={state:null,alt:null,context:null,semanticContext:null};return l&&(h.reachesIntoOuterContext=0),h}else {let h={};return h.state=u.state||null,h.alt=u.alt===void 0?null:u.alt,h.context=u.context||null,h.semanticContext=u.semanticContext||null,l&&(h.reachesIntoOuterContext=u.reachesIntoOuterContext||0,h.precedenceFilterSuppressed=u.precedenceFilterSuppressed||!1),h}}var s=class{constructor(u,l){this.checkContext(u,l),u=o(u),l=o(l,!0),this.state=u.state!==null?u.state:l.state,this.alt=u.alt!==null?u.alt:l.alt,this.context=u.context!==null?u.context:l.context,this.semanticContext=u.semanticContext!==null?u.semanticContext:l.semanticContext!==null?l.semanticContext:i.NONE,this.reachesIntoOuterContext=l.reachesIntoOuterContext,this.precedenceFilterSuppressed=l.precedenceFilterSuppressed;}checkContext(u,l){(u.context===null||u.context===void 0)&&(l===null||l.context===null||l.context===void 0)&&(this.context=null);}hashCode(){let u=new n;return this.updateHashCode(u),u.finish()}updateHashCode(u){u.update(this.state.stateNumber,this.alt,this.context,this.semanticContext);}equals(u){return this===u?!0:u instanceof s?this.state.stateNumber===u.state.stateNumber&&this.alt===u.alt&&(this.context===null?u.context===null:this.context.equals(u.context))&&this.semanticContext.equals(u.semanticContext)&&this.precedenceFilterSuppressed===u.precedenceFilterSuppressed:!1}hashCodeForConfigSet(){let u=new n;return u.update(this.state.stateNumber,this.alt,this.semanticContext),u.finish()}equalsForConfigSet(u){return this===u?!0:u instanceof s?this.state.stateNumber===u.state.stateNumber&&this.alt===u.alt&&this.semanticContext.equals(u.semanticContext):!1}toString(){return "("+this.state+","+this.alt+(this.context!==null?",["+this.context.toString()+"]":"")+(this.semanticContext!==i.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}},a=class extends s{constructor(u,l){super(u,l);let h=u.lexerActionExecutor||null;return this.lexerActionExecutor=h||(l!==null?l.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=l!==null?this.checkNonGreedyDecision(l,this.state):!1,this.hashCodeForConfigSet=a.prototype.hashCode,this.equalsForConfigSet=a.prototype.equals,this}updateHashCode(u){u.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor);}equals(u){return this===u||u instanceof a&&this.passedThroughNonGreedyDecision===u.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(u.lexerActionExecutor):!u.lexerActionExecutor)&&super.equals(u)}checkNonGreedyDecision(u,l){return u.passedThroughNonGreedyDecision||l instanceof r&&l.nonGreedy}};e.exports.ATNConfig=s,e.exports.LexerATNConfig=a;}),Cr=re((t,e)=>{var{Token:r}=Ut(),i=class{constructor(o,s){this.start=o,this.stop=s;}contains(o){return o>=this.start&&o<this.stop}toString(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}get length(){return this.stop-this.start}},n=class{constructor(){this.intervals=null,this.readOnly=!1;}first(o){return this.intervals===null||this.intervals.length===0?r.INVALID_TYPE:this.intervals[0].start}addOne(o){this.addInterval(new i(o,o+1));}addRange(o,s){this.addInterval(new i(o,s+1));}addInterval(o){if(this.intervals===null)this.intervals=[],this.intervals.push(o);else {for(let s=0;s<this.intervals.length;s++){let a=this.intervals[s];if(o.stop<a.start){this.intervals.splice(s,0,o);return}else if(o.stop===a.start){this.intervals[s].start=o.start;return}else if(o.start<=a.stop){this.intervals[s]=new i(Math.min(a.start,o.start),Math.max(a.stop,o.stop)),this.reduce(s);return}}this.intervals.push(o);}}addSet(o){return o.intervals!==null&&o.intervals.forEach(s=>this.addInterval(s),this),this}reduce(o){if(o<this.intervals.length-1){let s=this.intervals[o],a=this.intervals[o+1];s.stop>=a.stop?(this.intervals.splice(o+1,1),this.reduce(o)):s.stop>=a.start&&(this.intervals[o]=new i(s.start,a.stop),this.intervals.splice(o+1,1));}}complement(o,s){let a=new n;return a.addInterval(new i(o,s+1)),this.intervals!==null&&this.intervals.forEach(u=>a.removeRange(u)),a}contains(o){if(this.intervals===null)return !1;for(let s=0;s<this.intervals.length;s++)if(this.intervals[s].contains(o))return !0;return !1}removeRange(o){if(o.start===o.stop-1)this.removeOne(o.start);else if(this.intervals!==null){let s=0;for(let a=0;a<this.intervals.length;a++){let u=this.intervals[s];if(o.stop<=u.start)return;if(o.start>u.start&&o.stop<u.stop){this.intervals[s]=new i(u.start,o.start);let l=new i(o.stop,u.stop);this.intervals.splice(s,0,l);return}else o.start<=u.start&&o.stop>=u.stop?(this.intervals.splice(s,1),s=s-1):o.start<u.stop?this.intervals[s]=new i(u.start,o.start):o.stop<u.stop&&(this.intervals[s]=new i(o.stop,u.stop));s+=1;}}}removeOne(o){if(this.intervals!==null)for(let s=0;s<this.intervals.length;s++){let a=this.intervals[s];if(o<a.start)return;if(o===a.start&&o===a.stop-1){this.intervals.splice(s,1);return}else if(o===a.start){this.intervals[s]=new i(a.start+1,a.stop);return}else if(o===a.stop-1){this.intervals[s]=new i(a.start,a.stop-1);return}else if(o<a.stop-1){let u=new i(a.start,o);a.start=o+1,this.intervals.splice(s,0,u);return}}}toString(o,s,a){return o=o||null,s=s||null,a=a||!1,this.intervals===null?"{}":o!==null||s!==null?this.toTokenString(o,s):a?this.toCharString():this.toIndexString()}toCharString(){let o=[];for(let s=0;s<this.intervals.length;s++){let a=this.intervals[s];a.stop===a.start+1?a.start===r.EOF?o.push("<EOF>"):o.push("'"+String.fromCharCode(a.start)+"'"):o.push("'"+String.fromCharCode(a.start)+"'..'"+String.fromCharCode(a.stop-1)+"'");}return o.length>1?"{"+o.join(", ")+"}":o[0]}toIndexString(){let o=[];for(let s=0;s<this.intervals.length;s++){let a=this.intervals[s];a.stop===a.start+1?a.start===r.EOF?o.push("<EOF>"):o.push(a.start.toString()):o.push(a.start.toString()+".."+(a.stop-1).toString());}return o.length>1?"{"+o.join(", ")+"}":o[0]}toTokenString(o,s){let a=[];for(let u=0;u<this.intervals.length;u++){let l=this.intervals[u];for(let h=l.start;h<l.stop;h++)a.push(this.elementName(o,s,h));}return a.length>1?"{"+a.join(", ")+"}":a[0]}elementName(o,s,a){return a===r.EOF?"<EOF>":a===r.EPSILON?"<EPSILON>":o[a]||s[a]}get length(){return this.intervals.map(o=>o.length).reduce((o,s)=>o+s)}};e.exports={Interval:i,IntervalSet:n};}),Pa=re((t,e)=>{var{Token:r}=Ut(),{IntervalSet:i}=Cr(),{Predicate:n,PrecedencePredicate:o}=La(),s=class{constructor(g){if(g==null)throw "target cannot be null.";this.target=g,this.isEpsilon=!1,this.label=null;}};s.EPSILON=1,s.RANGE=2,s.RULE=3,s.PREDICATE=4,s.ATOM=5,s.ACTION=6,s.SET=7,s.NOT_SET=8,s.WILDCARD=9,s.PRECEDENCE=10,s.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],s.serializationTypes={EpsilonTransition:s.EPSILON,RangeTransition:s.RANGE,RuleTransition:s.RULE,PredicateTransition:s.PREDICATE,AtomTransition:s.ATOM,ActionTransition:s.ACTION,SetTransition:s.SET,NotSetTransition:s.NOT_SET,WildcardTransition:s.WILDCARD,PrecedencePredicateTransition:s.PRECEDENCE};var a=class extends s{constructor(g,b){super(g),this.label_=b,this.label=this.makeLabel(),this.serializationType=s.ATOM;}makeLabel(){let g=new i;return g.addOne(this.label_),g}matches(g,b,E){return this.label_===g}toString(){return this.label_}},u=class extends s{constructor(g,b,E,w){super(g),this.ruleIndex=b,this.precedence=E,this.followState=w,this.serializationType=s.RULE,this.isEpsilon=!0;}matches(g,b,E){return !1}},l=class extends s{constructor(g,b){super(g),this.serializationType=s.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=b;}matches(g,b,E){return !1}toString(){return "epsilon"}},h=class extends s{constructor(g,b,E){super(g),this.serializationType=s.RANGE,this.start=b,this.stop=E,this.label=this.makeLabel();}makeLabel(){let g=new i;return g.addRange(this.start,this.stop),g}matches(g,b,E){return g>=this.start&&g<=this.stop}toString(){return "'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}},c=class extends s{constructor(g){super(g);}},p=class extends c{constructor(g,b,E,w){super(g),this.serializationType=s.PREDICATE,this.ruleIndex=b,this.predIndex=E,this.isCtxDependent=w,this.isEpsilon=!0;}matches(g,b,E){return !1}getPredicate(){return new n(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return "pred_"+this.ruleIndex+":"+this.predIndex}},f=class extends s{constructor(g,b,E,w){super(g),this.serializationType=s.ACTION,this.ruleIndex=b,this.actionIndex=E===void 0?-1:E,this.isCtxDependent=w===void 0?!1:w,this.isEpsilon=!0;}matches(g,b,E){return !1}toString(){return "action_"+this.ruleIndex+":"+this.actionIndex}},m=class extends s{constructor(g,b){super(g),this.serializationType=s.SET,b!=null?this.label=b:(this.label=new i,this.label.addOne(r.INVALID_TYPE));}matches(g,b,E){return this.label.contains(g)}toString(){return this.label.toString()}},_=class extends m{constructor(g,b){super(g,b),this.serializationType=s.NOT_SET;}matches(g,b,E){return g>=b&&g<=E&&!super.matches(g,b,E)}toString(){return "~"+super.toString()}},x=class extends s{constructor(g){super(g),this.serializationType=s.WILDCARD;}matches(g,b,E){return g>=b&&g<=E}toString(){return "."}},v=class extends c{constructor(g,b){super(g),this.serializationType=s.PRECEDENCE,this.precedence=b,this.isEpsilon=!0;}matches(g,b,E){return !1}getPredicate(){return new o(this.precedence)}toString(){return this.precedence+" >= _p"}};e.exports={Transition:s,AtomTransition:a,SetTransition:m,NotSetTransition:_,RuleTransition:u,ActionTransition:f,EpsilonTransition:l,RangeTransition:h,WildcardTransition:x,PredicateTransition:p,PrecedencePredicateTransition:v,AbstractPredicateTransition:c};}),Qs=re((t,e)=>{var{Token:r}=Ut(),{Interval:i}=Cr(),n=new i(-1,-2),o=class{},s=class extends o{constructor(){super();}},a=class extends s{constructor(){super();}},u=class extends a{constructor(){super();}getRuleContext(){throw new Error("missing interface implementation")}},l=class extends a{constructor(){super();}},h=class extends l{constructor(){super();}},c=class{visit(x){return Array.isArray(x)?x.map(function(v){return v.accept(this)},this):x.accept(this)}visitChildren(x){return x.children?this.visit(x.children):null}visitTerminal(x){}visitErrorNode(x){}},p=class{visitTerminal(x){}visitErrorNode(x){}enterEveryRule(x){}exitEveryRule(x){}},f=class extends l{constructor(x){super(),this.parentCtx=null,this.symbol=x;}getChild(x){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(this.symbol===null)return n;let x=this.symbol.tokenIndex;return new i(x,x)}getChildCount(){return 0}accept(x){return x.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===r.EOF?"<EOF>":this.symbol.text}},m=class extends f{constructor(x){super(x);}isErrorNode(){return !0}accept(x){return x.visitErrorNode(this)}},_=class{walk(x,v){if(v instanceof h||v.isErrorNode!==void 0&&v.isErrorNode())x.visitErrorNode(v);else if(v instanceof l)x.visitTerminal(v);else {this.enterRule(x,v);for(let b=0;b<v.getChildCount();b++){let E=v.getChild(b);this.walk(x,E);}this.exitRule(x,v);}}enterRule(x,v){let g=v.getRuleContext();x.enterEveryRule(g),g.enterRule(x);}exitRule(x,v){let g=v.getRuleContext();g.exitRule(x),x.exitEveryRule(g);}};_.DEFAULT=new _,e.exports={RuleNode:u,ErrorNode:h,TerminalNode:l,ErrorNodeImpl:m,TerminalNodeImpl:f,ParseTreeListener:p,ParseTreeVisitor:c,ParseTreeWalker:_,INVALID_INTERVAL:n};}),Pv=re((t,e)=>{var r=mr(),{Token:i}=Ut(),{ErrorNode:n,TerminalNode:o,RuleNode:s}=Qs(),a={toStringTree:function(u,l,h){l=l||null,h=h||null,h!==null&&(l=h.ruleNames);let c=a.getNodeText(u,l);c=r.escapeWhitespace(c,!1);let p=u.getChildCount();if(p===0)return c;let f="("+c+" ";p>0&&(c=a.toStringTree(u.getChild(0),l),f=f.concat(c));for(let m=1;m<p;m++)c=a.toStringTree(u.getChild(m),l),f=f.concat(" "+c);return f=f.concat(")"),f},getNodeText:function(u,l,h){if(l=l||null,h=h||null,h!==null&&(l=h.ruleNames),l!==null)if(u instanceof s){let f=u.getRuleContext().getAltNumber();return f!=0?l[u.ruleIndex]+":"+f:l[u.ruleIndex]}else {if(u instanceof n)return u.toString();if(u instanceof o&&u.symbol!==null)return u.symbol.text}let c=u.getPayload();return c instanceof i?c.text:u.getPayload().toString()},getChildren:function(u){let l=[];for(let h=0;h<u.getChildCount();h++)l.push(u.getChild(h));return l},getAncestors:function(u){let l=[];for(u=u.getParent();u!==null;)l=[u].concat(l),u=u.getParent();return l},findAllTokenNodes:function(u,l){return a.findAllNodes(u,l,!0)},findAllRuleNodes:function(u,l){return a.findAllNodes(u,l,!1)},findAllNodes:function(u,l,h){let c=[];return a._findAllNodes(u,l,h,c),c},_findAllNodes:function(u,l,h,c){h&&u instanceof o?u.symbol.type===l&&c.push(u):!h&&u instanceof s&&u.ruleIndex===l&&c.push(u);for(let p=0;p<u.getChildCount();p++)a._findAllNodes(u.getChild(p),l,h,c);},descendants:function(u){let l=[u];for(let h=0;h<u.getChildCount();h++)l=l.concat(a.descendants(u.getChild(h)));return l}};e.exports=a;}),K0=re((t,e)=>{var{RuleNode:r}=Qs(),{INVALID_INTERVAL:i}=Qs(),n=Pv(),o=class extends r{constructor(s,a){super(),this.parentCtx=s||null,this.invokingState=a||-1;}depth(){let s=0,a=this;for(;a!==null;)a=a.parentCtx,s+=1;return s}isEmpty(){return this.invokingState===-1}getSourceInterval(){return i}getRuleContext(){return this}getPayload(){return this}getText(){return this.getChildCount()===0?"":this.children.map(function(s){return s.getText()}).join("")}getAltNumber(){return 0}setAltNumber(s){}getChild(s){return null}getChildCount(){return 0}accept(s){return s.visitChildren(this)}toStringTree(s,a){return n.toStringTree(this,s,a)}toString(s,a){s=s||null,a=a||null;let u=this,l="[";for(;u!==null&&u!==a;){if(s===null)u.isEmpty()||(l+=u.invokingState);else {let h=u.ruleIndex,c=h>=0&&h<s.length?s[h]:""+h;l+=c;}u.parentCtx!==null&&(s!==null||!u.parentCtx.isEmpty())&&(l+=" "),u=u.parentCtx;}return l+="]",l}};e.exports=o;}),Yi=re((t,e)=>{var r=K0(),{Hash:i,Map:n,equalArrays:o}=mr(),s=class{constructor(g){this.cachedHashCode=g;}isEmpty(){return this===s.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===s.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(g){g.update(this.cachedHashCode);}};s.EMPTY=null,s.EMPTY_RETURN_STATE=2147483647,s.globalNodeCount=1,s.id=s.globalNodeCount;var a=class{constructor(){this.cache=new n;}add(g){if(g===s.EMPTY)return s.EMPTY;let b=this.cache.get(g)||null;return b!==null?b:(this.cache.put(g,g),g)}get(g){return this.cache.get(g)||null}get length(){return this.cache.length}},u=class extends s{constructor(g,b){let E=0,w=new i;g!==null?w.update(g,b):w.update(1),E=w.finish(),super(E),this.parentCtx=g,this.returnState=b;}getParent(g){return this.parentCtx}getReturnState(g){return this.returnState}equals(g){return this===g?!0:g instanceof u?this.hashCode()!==g.hashCode()||this.returnState!==g.returnState?!1:this.parentCtx==null?g.parentCtx==null:this.parentCtx.equals(g.parentCtx):!1}toString(){let g=this.parentCtx===null?"":this.parentCtx.toString();return g.length===0?this.returnState===s.EMPTY_RETURN_STATE?"$":""+this.returnState:""+this.returnState+" "+g}get length(){return 1}static create(g,b){return b===s.EMPTY_RETURN_STATE&&g===null?s.EMPTY:new u(g,b)}},l=class extends u{constructor(){super(null,s.EMPTY_RETURN_STATE);}isEmpty(){return !0}getParent(g){return null}getReturnState(g){return this.returnState}equals(g){return this===g}toString(){return "$"}};s.EMPTY=new l;var h=class extends s{constructor(g,b){let E=new i;E.update(g,b);let w=E.finish();return super(w),this.parents=g,this.returnStates=b,this}isEmpty(){return this.returnStates[0]===s.EMPTY_RETURN_STATE}getParent(g){return this.parents[g]}getReturnState(g){return this.returnStates[g]}equals(g){return this===g?!0:g instanceof h?this.hashCode()!==g.hashCode()?!1:o(this.returnStates,g.returnStates)&&o(this.parents,g.parents):!1}toString(){if(this.isEmpty())return "[]";{let g="[";for(let b=0;b<this.returnStates.length;b++){if(b>0&&(g=g+", "),this.returnStates[b]===s.EMPTY_RETURN_STATE){g=g+"$";continue}g=g+this.returnStates[b],this.parents[b]!==null?g=g+" "+this.parents[b]:g=g+"null";}return g+"]"}}get length(){return this.returnStates.length}};function c(g,b){if(b==null&&(b=r.EMPTY),b.parentCtx===null||b===r.EMPTY)return s.EMPTY;let E=c(g,b.parentCtx),D=g.states[b.invokingState].transitions[0];return u.create(E,D.followState.stateNumber)}function p(g,b,E,w){if(g===b)return g;if(g instanceof u&&b instanceof u)return f(g,b,E,w);if(E){if(g instanceof l)return g;if(b instanceof l)return b}return g instanceof u&&(g=new h([g.getParent()],[g.returnState])),b instanceof u&&(b=new h([b.getParent()],[b.returnState])),_(g,b,E,w)}function f(g,b,E,w){if(w!==null){let N=w.get(g,b);if(N!==null||(N=w.get(b,g),N!==null))return N}let D=m(g,b,E);if(D!==null)return w!==null&&w.set(g,b,D),D;if(g.returnState===b.returnState){let N=p(g.parentCtx,b.parentCtx,E,w);if(N===g.parentCtx)return g;if(N===b.parentCtx)return b;let F=u.create(N,g.returnState);return w!==null&&w.set(g,b,F),F}else {let N=null;if((g===b||g.parentCtx!==null&&g.parentCtx===b.parentCtx)&&(N=g.parentCtx),N!==null){let te=[g.returnState,b.returnState];g.returnState>b.returnState&&(te[0]=b.returnState,te[1]=g.returnState);let ae=[N,N],k=new h(ae,te);return w!==null&&w.set(g,b,k),k}let F=[g.returnState,b.returnState],V=[g.parentCtx,b.parentCtx];g.returnState>b.returnState&&(F[0]=b.returnState,F[1]=g.returnState,V=[b.parentCtx,g.parentCtx]);let X=new h(V,F);return w!==null&&w.set(g,b,X),X}}function m(g,b,E){if(E){if(g===s.EMPTY||b===s.EMPTY)return s.EMPTY}else {if(g===s.EMPTY&&b===s.EMPTY)return s.EMPTY;if(g===s.EMPTY){let w=[b.returnState,s.EMPTY_RETURN_STATE],D=[b.parentCtx,null];return new h(D,w)}else if(b===s.EMPTY){let w=[g.returnState,s.EMPTY_RETURN_STATE],D=[g.parentCtx,null];return new h(D,w)}}return null}function _(g,b,E,w){if(w!==null){let ae=w.get(g,b);if(ae!==null||(ae=w.get(b,g),ae!==null))return ae}let D=0,N=0,F=0,V=[],X=[];for(;D<g.returnStates.length&&N<b.returnStates.length;){let ae=g.parents[D],k=b.parents[N];if(g.returnStates[D]===b.returnStates[N]){let y=g.returnStates[D];y===s.EMPTY_RETURN_STATE&&ae===null&&k===null||ae!==null&&k!==null&&ae===k?(X[F]=ae,V[F]=y):(X[F]=p(ae,k,E,w),V[F]=y),D+=1,N+=1;}else g.returnStates[D]<b.returnStates[N]?(X[F]=ae,V[F]=g.returnStates[D],D+=1):(X[F]=k,V[F]=b.returnStates[N],N+=1);F+=1;}if(D<g.returnStates.length)for(let ae=D;ae<g.returnStates.length;ae++)X[F]=g.parents[ae],V[F]=g.returnStates[ae],F+=1;else for(let ae=N;ae<b.returnStates.length;ae++)X[F]=b.parents[ae],V[F]=b.returnStates[ae],F+=1;if(F<X.length){if(F===1){let ae=u.create(X[0],V[0]);return w!==null&&w.set(g,b,ae),ae}X=X.slice(0,F),V=V.slice(0,F);}let te=new h(X,V);return te===g?(w!==null&&w.set(g,b,g),g):te===b?(w!==null&&w.set(g,b,b),b):(x(X),w!==null&&w.set(g,b,te),te)}function x(g){let b=new n;for(let E=0;E<g.length;E++){let w=g[E];b.containsKey(w)||b.put(w,w);}for(let E=0;E<g.length;E++)g[E]=b.get(g[E]);}function v(g,b,E){if(g.isEmpty())return g;let w=E.get(g)||null;if(w!==null)return w;if(w=b.get(g),w!==null)return E.put(g,w),w;let D=!1,N=[];for(let V=0;V<N.length;V++){let X=v(g.getParent(V),b,E);if(D||X!==g.getParent(V)){if(!D){N=[];for(let te=0;te<g.length;te++)N[te]=g.getParent(te);D=!0;}N[V]=X;}}if(!D)return b.add(g),E.put(g,g),g;let F=null;return N.length===0?F=s.EMPTY:N.length===1?F=u.create(N[0],g.getReturnState(0)):F=new h(N,g.returnStates),b.add(F),E.put(F,F),E.put(g,F),F}e.exports={merge:p,PredictionContext:s,PredictionContextCache:a,SingletonPredictionContext:u,predictionContextFromRuleContext:c,getCachedPredictionContext:v};}),Iv=re((t,e)=>{var{Set:r,BitSet:i}=mr(),{Token:n}=Ut(),{ATNConfig:o}=uh(),{IntervalSet:s}=Cr(),{RuleStopState:a}=an(),{RuleTransition:u,NotSetTransition:l,WildcardTransition:h,AbstractPredicateTransition:c}=Pa(),{predictionContextFromRuleContext:p,PredictionContext:f,SingletonPredictionContext:m}=Yi(),_=class{constructor(x){this.atn=x;}getDecisionLookahead(x){if(x===null)return null;let v=x.transitions.length,g=[];for(let b=0;b<v;b++){g[b]=new s;let E=new r;this._LOOK(x.transition(b).target,null,f.EMPTY,g[b],E,new i,!1,!1),(g[b].length===0||g[b].contains(_.HIT_PRED))&&(g[b]=null);}return g}LOOK(x,v,g){let b=new s,E=!0;g=g||null;let w=g!==null?p(x.atn,g):null;return this._LOOK(x,v,w,b,new r,new i,E,!0),b}_LOOK(x,v,g,b,E,w,D,N){let F=new o({state:x,alt:0,context:g},null);if(!E.contains(F)){if(E.add(F),x===v){if(g===null){b.addOne(n.EPSILON);return}else if(g.isEmpty()&&N){b.addOne(n.EOF);return}}if(x instanceof a){if(g===null){b.addOne(n.EPSILON);return}else if(g.isEmpty()&&N){b.addOne(n.EOF);return}if(g!==f.EMPTY){let V=w.contains(x.ruleIndex);try{w.remove(x.ruleIndex);for(let X=0;X<g.length;X++){let te=this.atn.states[g.getReturnState(X)];this._LOOK(te,v,g.getParent(X),b,E,w,D,N);}}finally{V&&w.add(x.ruleIndex);}return}}for(let V=0;V<x.transitions.length;V++){let X=x.transitions[V];if(X.constructor===u){if(w.contains(X.target.ruleIndex))continue;let te=m.create(g,X.followState.stateNumber);try{w.add(X.target.ruleIndex),this._LOOK(X.target,v,te,b,E,w,D,N);}finally{w.remove(X.target.ruleIndex);}}else if(X instanceof c)D?this._LOOK(X.target,v,g,b,E,w,D,N):b.addOne(_.HIT_PRED);else if(X.isEpsilon)this._LOOK(X.target,v,g,b,E,w,D,N);else if(X.constructor===h)b.addRange(n.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else {let te=X.label;te!==null&&(X instanceof l&&(te=te.complement(n.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),b.addSet(te));}}}}};_.HIT_PRED=n.INVALID_TYPE,e.exports=_;}),so=re((t,e)=>{var r=Iv(),{IntervalSet:i}=Cr(),{Token:n}=Ut(),o=class{constructor(s,a){this.grammarType=s,this.maxTokenType=a,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[];}nextTokensInContext(s,a){return new r(this).LOOK(s,null,a)}nextTokensNoContext(s){return s.nextTokenWithinRule!==null||(s.nextTokenWithinRule=this.nextTokensInContext(s,null),s.nextTokenWithinRule.readOnly=!0),s.nextTokenWithinRule}nextTokens(s,a){return a===void 0?this.nextTokensNoContext(s):this.nextTokensInContext(s,a)}addState(s){s!==null&&(s.atn=this,s.stateNumber=this.states.length),this.states.push(s);}removeState(s){this.states[s.stateNumber]=null;}defineDecisionState(s){return this.decisionToState.push(s),s.decision=this.decisionToState.length-1,s.decision}getDecisionState(s){return this.decisionToState.length===0?null:this.decisionToState[s]}getExpectedTokens(s,a){if(s<0||s>=this.states.length)throw "Invalid state number.";let u=this.states[s],l=this.nextTokens(u);if(!l.contains(n.EPSILON))return l;let h=new i;for(h.addSet(l),h.removeOne(n.EPSILON);a!==null&&a.invokingState>=0&&l.contains(n.EPSILON);){let p=this.states[a.invokingState].transitions[0];l=this.nextTokens(p.followState),h.addSet(l),h.removeOne(n.EPSILON),a=a.parentCtx;}return l.contains(n.EPSILON)&&h.addOne(n.EOF),h}};o.INVALID_ALT_NUMBER=0,e.exports=o;}),i8=re((t,e)=>{e.exports={LEXER:0,PARSER:1};}),kv=re((t,e)=>{var r=class{constructor(i){i===void 0&&(i=null),this.readOnly=!1,this.verifyATN=i===null?!0:i.verifyATN,this.generateRuleBypassTransitions=i===null?!1:i.generateRuleBypassTransitions;}};r.defaultOptions=new r,r.defaultOptions.readOnly=!0,e.exports=r;}),Mv=re((t,e)=>{var r={CHANNEL:0,CUSTOM:1,MODE:2,MORE:3,POP_MODE:4,PUSH_MODE:5,SKIP:6,TYPE:7},i=class{constructor(f){this.actionType=f,this.isPositionDependent=!1;}hashCode(){let f=new Hash;return this.updateHashCode(f),f.finish()}updateHashCode(f){f.update(this.actionType);}equals(f){return this===f}},n=class extends i{constructor(){super(r.SKIP);}execute(f){f.skip();}toString(){return "skip"}};n.INSTANCE=new n;var o=class extends i{constructor(f){super(r.TYPE),this.type=f;}execute(f){f.type=this.type;}updateHashCode(f){f.update(this.actionType,this.type);}equals(f){return this===f?!0:f instanceof o?this.type===f.type:!1}toString(){return "type("+this.type+")"}},s=class extends i{constructor(f){super(r.PUSH_MODE),this.mode=f;}execute(f){f.pushMode(this.mode);}updateHashCode(f){f.update(this.actionType,this.mode);}equals(f){return this===f?!0:f instanceof s?this.mode===f.mode:!1}toString(){return "pushMode("+this.mode+")"}},a=class extends i{constructor(){super(r.POP_MODE);}execute(f){f.popMode();}toString(){return "popMode"}};a.INSTANCE=new a;var u=class extends i{constructor(){super(r.MORE);}execute(f){f.more();}toString(){return "more"}};u.INSTANCE=new u;var l=class extends i{constructor(f){super(r.MODE),this.mode=f;}execute(f){f.mode(this.mode);}updateHashCode(f){f.update(this.actionType,this.mode);}equals(f){return this===f?!0:f instanceof l?this.mode===f.mode:!1}toString(){return "mode("+this.mode+")"}},h=class extends i{constructor(f,m){super(r.CUSTOM),this.ruleIndex=f,this.actionIndex=m,this.isPositionDependent=!0;}execute(f){f.action(null,this.ruleIndex,this.actionIndex);}updateHashCode(f){f.update(this.actionType,this.ruleIndex,this.actionIndex);}equals(f){return this===f?!0:f instanceof h?this.ruleIndex===f.ruleIndex&&this.actionIndex===f.actionIndex:!1}},c=class extends i{constructor(f){super(r.CHANNEL),this.channel=f;}execute(f){f._channel=this.channel;}updateHashCode(f){f.update(this.actionType,this.channel);}equals(f){return this===f?!0:f instanceof c?this.channel===f.channel:!1}toString(){return "channel("+this.channel+")"}},p=class extends i{constructor(f,m){super(m.actionType),this.offset=f,this.action=m,this.isPositionDependent=!0;}execute(f){this.action.execute(f);}updateHashCode(f){f.update(this.actionType,this.offset,this.action);}equals(f){return this===f?!0:f instanceof p?this.offset===f.offset&&this.action===f.action:!1}};e.exports={LexerActionType:r,LexerSkipAction:n,LexerChannelAction:c,LexerCustomAction:h,LexerIndexedCustomAction:p,LexerMoreAction:u,LexerTypeAction:o,LexerPushModeAction:s,LexerPopModeAction:a,LexerModeAction:l};}),Bv=re((t,e)=>{var{Token:r}=Ut(),i=so(),n=i8(),{ATNState:o,BasicState:s,DecisionState:a,BlockStartState:u,BlockEndState:l,LoopEndState:h,RuleStartState:c,RuleStopState:p,TokensStartState:f,PlusLoopbackState:m,StarLoopbackState:_,StarLoopEntryState:x,PlusBlockStartState:v,StarBlockStartState:g,BasicBlockStartState:b}=an(),{Transition:E,AtomTransition:w,SetTransition:D,NotSetTransition:N,RuleTransition:F,RangeTransition:V,ActionTransition:X,EpsilonTransition:te,WildcardTransition:ae,PredicateTransition:k,PrecedencePredicateTransition:y}=Pa(),{IntervalSet:T}=Cr(),S=kv(),{LexerActionType:R,LexerSkipAction:L,LexerChannelAction:I,LexerCustomAction:K,LexerMoreAction:q,LexerTypeAction:A,LexerPushModeAction:H,LexerPopModeAction:B,LexerModeAction:C}=Mv(),P="AADB8D7E-AEEF-4415-AD2B-8204D6CF042E",j="59627784-3BE5-417A-B9EB-8131A7286089",$=[P,j],G=3,oe=j;function se(M,Z){let W=[];return W[M-1]=Z,W.map(function(ne){return Z})}var J=class{constructor(M){M==null&&(M=S.defaultOptions),this.deserializationOptions=M,this.stateFactories=null,this.actionFactories=null;}isFeatureSupported(M,Z){let W=$.indexOf(M);return W<0?!1:$.indexOf(Z)>=W}deserialize(M){this.reset(M),this.checkVersion(),this.checkUUID();let Z=this.readATN();this.readStates(Z),this.readRules(Z),this.readModes(Z);let W=[];return this.readSets(Z,W,this.readInt.bind(this)),this.isFeatureSupported(j,this.uuid)&&this.readSets(Z,W,this.readInt32.bind(this)),this.readEdges(Z,W),this.readDecisions(Z),this.readLexerActions(Z),this.markPrecedenceDecisions(Z),this.verifyATN(Z),this.deserializationOptions.generateRuleBypassTransitions&&Z.grammarType===n.PARSER&&(this.generateRuleBypassTransitions(Z),this.verifyATN(Z)),Z}reset(M){let Z=function(ne){let le=ne.charCodeAt(0);return le>1?le-2:le+65534},W=M.split("").map(Z);W[0]=M.charCodeAt(0),this.data=W,this.pos=0;}checkVersion(){let M=this.readInt();if(M!==G)throw "Could not deserialize ATN with version "+M+" (expected "+G+")."}checkUUID(){let M=this.readUUID();if($.indexOf(M)<0)throw oe;this.uuid=M;}readATN(){let M=this.readInt(),Z=this.readInt();return new i(M,Z)}readStates(M){let Z,W,ne,le=[],Q=[],_e=this.readInt();for(let be=0;be<_e;be++){let et=this.readInt();if(et===o.INVALID_TYPE){M.addState(null);continue}let Oe=this.readInt();Oe===65535&&(Oe=-1);let He=this.stateFactory(et,Oe);if(et===o.LOOP_END){let Kt=this.readInt();le.push([He,Kt]);}else if(He instanceof u){let Kt=this.readInt();Q.push([He,Kt]);}M.addState(He);}for(Z=0;Z<le.length;Z++)W=le[Z],W[0].loopBackState=M.states[W[1]];for(Z=0;Z<Q.length;Z++)W=Q[Z],W[0].endState=M.states[W[1]];let De=this.readInt();for(Z=0;Z<De;Z++)ne=this.readInt(),M.states[ne].nonGreedy=!0;let ge=this.readInt();for(Z=0;Z<ge;Z++)ne=this.readInt(),M.states[ne].isPrecedenceRule=!0;}readRules(M){let Z,W=this.readInt();for(M.grammarType===n.LEXER&&(M.ruleToTokenType=se(W,0)),M.ruleToStartState=se(W,0),Z=0;Z<W;Z++){let ne=this.readInt();if(M.ruleToStartState[Z]=M.states[ne],M.grammarType===n.LEXER){let le=this.readInt();le===65535&&(le=r.EOF),M.ruleToTokenType[Z]=le;}}for(M.ruleToStopState=se(W,0),Z=0;Z<M.states.length;Z++){let ne=M.states[Z];ne instanceof p&&(M.ruleToStopState[ne.ruleIndex]=ne,M.ruleToStartState[ne.ruleIndex].stopState=ne);}}readModes(M){let Z=this.readInt();for(let W=0;W<Z;W++){let ne=this.readInt();M.modeToStartState.push(M.states[ne]);}}readSets(M,Z,W){let ne=this.readInt();for(let le=0;le<ne;le++){let Q=new T;Z.push(Q);let _e=this.readInt();this.readInt()!==0&&Q.addOne(-1);for(let ge=0;ge<_e;ge++){let be=W(),et=W();Q.addRange(be,et);}}}readEdges(M,Z){let W,ne,le,Q,_e,De=this.readInt();for(W=0;W<De;W++){let ge=this.readInt(),be=this.readInt(),et=this.readInt(),Oe=this.readInt(),He=this.readInt(),Kt=this.readInt();Q=this.edgeFactory(M,et,ge,be,Oe,He,Kt,Z),M.states[ge].addTransition(Q);}for(W=0;W<M.states.length;W++)for(le=M.states[W],ne=0;ne<le.transitions.length;ne++){let ge=le.transitions[ne];if(!(ge instanceof F))continue;let be=-1;M.ruleToStartState[ge.target.ruleIndex].isPrecedenceRule&&ge.precedence===0&&(be=ge.target.ruleIndex),Q=new te(ge.followState,be),M.ruleToStopState[ge.target.ruleIndex].addTransition(Q);}for(W=0;W<M.states.length;W++){if(le=M.states[W],le instanceof u){if(le.endState===null||le.endState.startState!==null)throw "IllegalState";le.endState.startState=le;}if(le instanceof m)for(ne=0;ne<le.transitions.length;ne++)_e=le.transitions[ne].target,_e instanceof v&&(_e.loopBackState=le);else if(le instanceof _)for(ne=0;ne<le.transitions.length;ne++)_e=le.transitions[ne].target,_e instanceof x&&(_e.loopBackState=le);}}readDecisions(M){let Z=this.readInt();for(let W=0;W<Z;W++){let ne=this.readInt(),le=M.states[ne];M.decisionToState.push(le),le.decision=W;}}readLexerActions(M){if(M.grammarType===n.LEXER){let Z=this.readInt();M.lexerActions=se(Z,null);for(let W=0;W<Z;W++){let ne=this.readInt(),le=this.readInt();le===65535&&(le=-1);let Q=this.readInt();Q===65535&&(Q=-1),M.lexerActions[W]=this.lexerActionFactory(ne,le,Q);}}}generateRuleBypassTransitions(M){let Z,W=M.ruleToStartState.length;for(Z=0;Z<W;Z++)M.ruleToTokenType[Z]=M.maxTokenType+Z+1;for(Z=0;Z<W;Z++)this.generateRuleBypassTransition(M,Z);}generateRuleBypassTransition(M,Z){let W,ne,le=new b;le.ruleIndex=Z,M.addState(le);let Q=new l;Q.ruleIndex=Z,M.addState(Q),le.endState=Q,M.defineDecisionState(le),Q.startState=le;let _e=null,De=null;if(M.ruleToStartState[Z].isPrecedenceRule){for(De=null,W=0;W<M.states.length;W++)if(ne=M.states[W],this.stateIsEndStateFor(ne,Z)){De=ne,_e=ne.loopBackState.transitions[0];break}if(_e===null)throw "Couldn't identify final state of the precedence rule prefix section."}else De=M.ruleToStopState[Z];for(W=0;W<M.states.length;W++){ne=M.states[W];for(let Oe=0;Oe<ne.transitions.length;Oe++){let He=ne.transitions[Oe];He!==_e&&He.target===De&&(He.target=Q);}}let ge=M.ruleToStartState[Z],be=ge.transitions.length;for(;be>0;)le.addTransition(ge.transitions[be-1]),ge.transitions=ge.transitions.slice(-1);M.ruleToStartState[Z].addTransition(new te(le)),Q.addTransition(new te(De));let et=new s;M.addState(et),et.addTransition(new w(Q,M.ruleToTokenType[Z])),le.addTransition(new te(et));}stateIsEndStateFor(M,Z){if(M.ruleIndex!==Z||!(M instanceof x))return null;let W=M.transitions[M.transitions.length-1].target;return W instanceof h&&W.epsilonOnlyTransitions&&W.transitions[0].target instanceof p?M:null}markPrecedenceDecisions(M){for(let Z=0;Z<M.states.length;Z++){let W=M.states[Z];if(W instanceof x&&M.ruleToStartState[W.ruleIndex].isPrecedenceRule){let ne=W.transitions[W.transitions.length-1].target;ne instanceof h&&ne.epsilonOnlyTransitions&&ne.transitions[0].target instanceof p&&(W.isPrecedenceDecision=!0);}}}verifyATN(M){if(this.deserializationOptions.verifyATN)for(let Z=0;Z<M.states.length;Z++){let W=M.states[Z];if(W!==null)if(this.checkCondition(W.epsilonOnlyTransitions||W.transitions.length<=1),W instanceof v)this.checkCondition(W.loopBackState!==null);else if(W instanceof x)if(this.checkCondition(W.loopBackState!==null),this.checkCondition(W.transitions.length===2),W.transitions[0].target instanceof g)this.checkCondition(W.transitions[1].target instanceof h),this.checkCondition(!W.nonGreedy);else if(W.transitions[0].target instanceof h)this.checkCondition(W.transitions[1].target instanceof g),this.checkCondition(W.nonGreedy);else throw "IllegalState";else W instanceof _?(this.checkCondition(W.transitions.length===1),this.checkCondition(W.transitions[0].target instanceof x)):W instanceof h?this.checkCondition(W.loopBackState!==null):W instanceof c?this.checkCondition(W.stopState!==null):W instanceof u?this.checkCondition(W.endState!==null):W instanceof l?this.checkCondition(W.startState!==null):W instanceof a?this.checkCondition(W.transitions.length<=1||W.decision>=0):this.checkCondition(W.transitions.length<=1||W instanceof p);}}checkCondition(M,Z){if(!M)throw Z==null&&(Z="IllegalState"),Z}readInt(){return this.data[this.pos++]}readInt32(){let M=this.readInt(),Z=this.readInt();return M|Z<<16}readLong(){let M=this.readInt32(),Z=this.readInt32();return M&4294967295|Z<<32}readUUID(){let M=[];for(let Z=7;Z>=0;Z--){let W=this.readInt();M[2*Z+1]=W&255,M[2*Z]=W>>8&255;}return U[M[0]]+U[M[1]]+U[M[2]]+U[M[3]]+"-"+U[M[4]]+U[M[5]]+"-"+U[M[6]]+U[M[7]]+"-"+U[M[8]]+U[M[9]]+"-"+U[M[10]]+U[M[11]]+U[M[12]]+U[M[13]]+U[M[14]]+U[M[15]]}edgeFactory(M,Z,W,ne,le,Q,_e,De){let ge=M.states[ne];switch(Z){case E.EPSILON:return new te(ge);case E.RANGE:return _e!==0?new V(ge,r.EOF,Q):new V(ge,le,Q);case E.RULE:return new F(M.states[le],Q,_e,ge);case E.PREDICATE:return new k(ge,le,Q,_e!==0);case E.PRECEDENCE:return new y(ge,le);case E.ATOM:return _e!==0?new w(ge,r.EOF):new w(ge,le);case E.ACTION:return new X(ge,le,Q,_e!==0);case E.SET:return new D(ge,De[le]);case E.NOT_SET:return new N(ge,De[le]);case E.WILDCARD:return new ae(ge);default:throw "The specified transition type: "+Z+" is not valid."}}stateFactory(M,Z){if(this.stateFactories===null){let W=[];W[o.INVALID_TYPE]=null,W[o.BASIC]=()=>new s,W[o.RULE_START]=()=>new c,W[o.BLOCK_START]=()=>new b,W[o.PLUS_BLOCK_START]=()=>new v,W[o.STAR_BLOCK_START]=()=>new g,W[o.TOKEN_START]=()=>new f,W[o.RULE_STOP]=()=>new p,W[o.BLOCK_END]=()=>new l,W[o.STAR_LOOP_BACK]=()=>new _,W[o.STAR_LOOP_ENTRY]=()=>new x,W[o.PLUS_LOOP_BACK]=()=>new m,W[o.LOOP_END]=()=>new h,this.stateFactories=W;}if(M>this.stateFactories.length||this.stateFactories[M]===null)throw "The specified state type "+M+" is not valid.";{let W=this.stateFactories[M]();if(W!==null)return W.ruleIndex=Z,W}}lexerActionFactory(M,Z,W){if(this.actionFactories===null){let ne=[];ne[R.CHANNEL]=(le,Q)=>new I(le),ne[R.CUSTOM]=(le,Q)=>new K(le,Q),ne[R.MODE]=(le,Q)=>new C(le),ne[R.MORE]=(le,Q)=>q.INSTANCE,ne[R.POP_MODE]=(le,Q)=>B.INSTANCE,ne[R.PUSH_MODE]=(le,Q)=>new H(le),ne[R.SKIP]=(le,Q)=>L.INSTANCE,ne[R.TYPE]=(le,Q)=>new A(le),this.actionFactories=ne;}if(M>this.actionFactories.length||this.actionFactories[M]===null)throw "The specified lexer action type "+M+" is not valid.";return this.actionFactories[M](Z,W)}};function ee(){let M=[];for(let Z=0;Z<256;Z++)M[Z]=(Z+256).toString(16).substr(1).toUpperCase();return M}var U=ee();e.exports=J;}),jl=re((t,e)=>{var r=class{syntaxError(o,s,a,u,l,h){}reportAmbiguity(o,s,a,u,l,h,c){}reportAttemptingFullContext(o,s,a,u,l,h){}reportContextSensitivity(o,s,a,u,l,h){}},i=class extends r{constructor(){super();}syntaxError(o,s,a,u,l,h){console.error("line "+a+":"+u+" "+l);}};i.INSTANCE=new i;var n=class extends r{constructor(o){if(super(),o===null)throw "delegates";return this.delegates=o,this}syntaxError(o,s,a,u,l,h){this.delegates.map(c=>c.syntaxError(o,s,a,u,l,h));}reportAmbiguity(o,s,a,u,l,h,c){this.delegates.map(p=>p.reportAmbiguity(o,s,a,u,l,h,c));}reportAttemptingFullContext(o,s,a,u,l,h){this.delegates.map(c=>c.reportAttemptingFullContext(o,s,a,u,l,h));}reportContextSensitivity(o,s,a,u,l,h){this.delegates.map(c=>c.reportContextSensitivity(o,s,a,u,l,h));}};e.exports={ErrorListener:r,ConsoleErrorListener:i,ProxyErrorListener:n};}),qv=re((t,e)=>{var{Token:r}=Ut(),{ConsoleErrorListener:i}=jl(),{ProxyErrorListener:n}=jl(),o=class{constructor(){this._listeners=[i.INSTANCE],this._interp=null,this._stateNumber=-1;}checkVersion(s){let a="4.9.2";a!==s&&console.log("ANTLR runtime and generated code versions disagree: "+a+"!="+s);}addErrorListener(s){this._listeners.push(s);}removeErrorListeners(){this._listeners=[];}getTokenTypeMap(){let s=this.getTokenNames();if(s===null)throw "The current recognizer does not provide a list of token names.";let a=this.tokenTypeMapCache[s];return a===void 0&&(a=s.reduce(function(u,l,h){u[l]=h;}),a.EOF=r.EOF,this.tokenTypeMapCache[s]=a),a}getRuleIndexMap(){let s=this.ruleNames;if(s===null)throw "The current recognizer does not provide a list of rule names.";let a=this.ruleIndexMapCache[s];return a===void 0&&(a=s.reduce(function(u,l,h){u[l]=h;}),this.ruleIndexMapCache[s]=a),a}getTokenType(s){let a=this.getTokenTypeMap()[s];return a!==void 0?a:r.INVALID_TYPE}getErrorHeader(s){let a=s.getOffendingToken().line,u=s.getOffendingToken().column;return "line "+a+":"+u}getTokenErrorDisplay(s){if(s===null)return "<no token>";let a=s.text;return a===null&&(s.type===r.EOF?a="<EOF>":a="<"+s.type+">"),a=a.replace(`
|
|
81
|
+
`,"\\n").replace("\r","\\r").replace(" ","\\t"),"'"+a+"'"}getErrorListenerDispatch(){return new n(this._listeners)}sempred(s,a,u){return !0}precpred(s,a){return !0}get state(){return this._stateNumber}set state(s){this._stateNumber=s;}};o.tokenTypeMapCache={},o.ruleIndexMapCache={},e.exports=o;}),n8=re((t,e)=>{var r=Ut().CommonToken,i=class{},n=class extends i{constructor(o){super(),this.copyText=o===void 0?!1:o;}create(o,s,a,u,l,h,c,p){let f=new r(o,s,u,l,h);return f.line=c,f.column=p,a!==null?f.text=a:this.copyText&&o[1]!==null&&(f.text=o[1].getText(l,h)),f}createThin(o,s){let a=new r(null,o);return a.text=s,a}};n.DEFAULT=new n,e.exports=n;}),Xr=re((t,e)=>{var{PredicateTransition:r}=Pa(),{Interval:i}=Cr().Interval,n=class extends Error{constructor(c){if(super(c.message),Error.captureStackTrace)Error.captureStackTrace(this,n);else var p=new Error().stack;this.message=c.message,this.recognizer=c.recognizer,this.input=c.input,this.ctx=c.ctx,this.offendingToken=null,this.offendingState=-1,this.recognizer!==null&&(this.offendingState=this.recognizer.state);}getExpectedTokens(){return this.recognizer!==null?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}},o=class extends n{constructor(c,p,f,m){super({message:"",recognizer:c,input:p,ctx:null}),this.startIndex=f,this.deadEndConfigs=m;}toString(){let c="";return this.startIndex>=0&&this.startIndex<this.input.size&&(c=this.input.getText(new i(this.startIndex,this.startIndex))),"LexerNoViableAltException"+c}},s=class extends n{constructor(c,p,f,m,_,x){x=x||c._ctx,m=m||c.getCurrentToken(),f=f||c.getCurrentToken(),p=p||c.getInputStream(),super({message:"",recognizer:c,input:p,ctx:x}),this.deadEndConfigs=_,this.startToken=f,this.offendingToken=m;}},a=class extends n{constructor(c){super({message:"",recognizer:c,input:c.getInputStream(),ctx:c._ctx}),this.offendingToken=c.getCurrentToken();}};function u(c,p){return p!==null?p:"failed predicate: {"+c+"}?"}var l=class extends n{constructor(c,p,f){super({message:u(p,f||null),recognizer:c,input:c.getInputStream(),ctx:c._ctx});let _=c._interp.atn.states[c.state].transitions[0];_ instanceof r?(this.ruleIndex=_.ruleIndex,this.predicateIndex=_.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=p,this.offendingToken=c.getCurrentToken();}},h=class extends Error{constructor(){super(),Error.captureStackTrace(this,h);}};e.exports={RecognitionException:n,NoViableAltException:s,LexerNoViableAltException:o,InputMismatchException:a,FailedPredicateException:l,ParseCancellationException:h};}),lh=re((t,e)=>{var{Token:r}=Ut(),i=qv(),n=n8(),{RecognitionException:o}=Xr(),{LexerNoViableAltException:s}=Xr(),a=class extends i{constructor(u){super(),this._input=u,this._factory=n.DEFAULT,this._tokenFactorySourcePair=[this,u],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=r.DEFAULT_CHANNEL,this._type=r.INVALID_TYPE,this._modeStack=[],this._mode=a.DEFAULT_MODE,this._text=null;}reset(){this._input!==null&&this._input.seek(0),this._token=null,this._type=r.INVALID_TYPE,this._channel=r.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=a.DEFAULT_MODE,this._modeStack=[],this._interp.reset();}nextToken(){if(this._input===null)throw "nextToken requires a non-null input stream.";let u=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=r.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;let l=!1;for(;;){this._type=r.INVALID_TYPE;let h=a.SKIP;try{h=this._interp.match(this._input,this._mode);}catch(c){if(c instanceof o)this.notifyListeners(c),this.recover(c);else throw console.log(c.stack),c}if(this._input.LA(1)===r.EOF&&(this._hitEOF=!0),this._type===r.INVALID_TYPE&&(this._type=h),this._type===a.SKIP){l=!0;break}if(this._type!==a.MORE)break}if(!l)return this._token===null&&this.emit(),this._token}}finally{this._input.release(u);}}skip(){this._type=a.SKIP;}more(){this._type=a.MORE;}mode(u){this._mode=u;}pushMode(u){this._interp.debug&&console.log("pushMode "+u),this._modeStack.push(this._mode),this.mode(u);}popMode(){if(this._modeStack.length===0)throw "Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.mode(this._modeStack.pop()),this._mode}emitToken(u){this._token=u;}emit(){let u=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(u),u}emitEOF(){let u=this.column,l=this.line,h=this._factory.create(this._tokenFactorySourcePair,r.EOF,null,r.DEFAULT_CHANNEL,this._input.index,this._input.index-1,l,u);return this.emitToken(h),h}getCharIndex(){return this._input.index}getAllTokens(){let u=[],l=this.nextToken();for(;l.type!==r.EOF;)u.push(l),l=this.nextToken();return u}notifyListeners(u){let l=this._tokenStartCharIndex,h=this._input.index,c=this._input.getText(l,h),p="token recognition error at: '"+this.getErrorDisplay(c)+"'";this.getErrorListenerDispatch().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,p,u);}getErrorDisplay(u){let l=[];for(let h=0;h<u.length;h++)l.push(u[h]);return l.join("")}getErrorDisplayForChar(u){return u.charCodeAt(0)===r.EOF?"<EOF>":u===`
|
|
82
|
+
`?"\\n":u===" "?"\\t":u==="\r"?"\\r":u}getCharErrorDisplay(u){return "'"+this.getErrorDisplayForChar(u)+"'"}recover(u){this._input.LA(1)!==r.EOF&&(u instanceof s?this._interp.consume(this._input):this._input.consume());}get inputStream(){return this._input}set inputStream(u){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=u,this._tokenFactorySourcePair=[this,this._input];}get sourceName(){return this._input.sourceName}get type(){return this.type}set type(u){this._type=u;}get line(){return this._interp.line}set line(u){this._interp.line=u;}get column(){return this._interp.column}set column(u){this._interp.column=u;}get text(){return this._text!==null?this._text:this._interp.getText(this._input)}set text(u){this._text=u;}};a.DEFAULT_MODE=0,a.MORE=-2,a.SKIP=-3,a.DEFAULT_TOKEN_CHANNEL=r.DEFAULT_CHANNEL,a.HIDDEN=r.HIDDEN_CHANNEL,a.MIN_CHAR_VALUE=0,a.MAX_CHAR_VALUE=1114111,e.exports=a;}),oo=re((t,e)=>{var r=so(),i=mr(),{SemanticContext:n}=La(),{merge:o}=Yi();function s(h){return h.hashCodeForConfigSet()}function a(h,c){return h===c?!0:h===null||c===null?!1:h.equalsForConfigSet(c)}var u=class{constructor(h){this.configLookup=new i.Set(s,a),this.fullCtx=h===void 0?!0:h,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1;}add(h,c){if(c===void 0&&(c=null),this.readOnly)throw "This set is readonly";h.semanticContext!==n.NONE&&(this.hasSemanticContext=!0),h.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);let p=this.configLookup.add(h);if(p===h)return this.cachedHashCode=-1,this.configs.push(h),!0;let f=!this.fullCtx,m=o(p.context,h.context,f,c);return p.reachesIntoOuterContext=Math.max(p.reachesIntoOuterContext,h.reachesIntoOuterContext),h.precedenceFilterSuppressed&&(p.precedenceFilterSuppressed=!0),p.context=m,!0}getStates(){let h=new i.Set;for(let c=0;c<this.configs.length;c++)h.add(this.configs[c].state);return h}getPredicates(){let h=[];for(let c=0;c<this.configs.length;c++){let p=this.configs[c].semanticContext;p!==n.NONE&&h.push(p.semanticContext);}return h}optimizeConfigs(h){if(this.readOnly)throw "This set is readonly";if(this.configLookup.length!==0)for(let c=0;c<this.configs.length;c++){let p=this.configs[c];p.context=h.getCachedContext(p.context);}}addAll(h){for(let c=0;c<h.length;c++)this.add(h[c]);return !1}equals(h){return this===h||h instanceof u&&i.equalArrays(this.configs,h.configs)&&this.fullCtx===h.fullCtx&&this.uniqueAlt===h.uniqueAlt&&this.conflictingAlts===h.conflictingAlts&&this.hasSemanticContext===h.hasSemanticContext&&this.dipsIntoOuterContext===h.dipsIntoOuterContext}hashCode(){let h=new i.Hash;return h.update(this.configs),h.finish()}updateHashCode(h){this.readOnly?(this.cachedHashCode===-1&&(this.cachedHashCode=this.hashCode()),h.update(this.cachedHashCode)):h.update(this.hashCode());}isEmpty(){return this.configs.length===0}contains(h){if(this.configLookup===null)throw "This method is not implemented for readonly sets.";return this.configLookup.contains(h)}containsFast(h){if(this.configLookup===null)throw "This method is not implemented for readonly sets.";return this.configLookup.containsFast(h)}clear(){if(this.readOnly)throw "This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new i.Set;}setReadonly(h){this.readOnly=h,h&&(this.configLookup=null);}toString(){return i.arrayToString(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==r.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(this.conflictingAlts!==null?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}},l=class extends u{constructor(){super(),this.configLookup=new i.Set;}};e.exports={ATNConfigSet:u,OrderedATNConfigSet:l};}),Ia=re((t,e)=>{var{ATNConfigSet:r}=oo(),{Hash:i,Set:n}=mr(),o=class{constructor(a,u){this.alt=u,this.pred=a;}toString(){return "("+this.pred+", "+this.alt+")"}},s=class{constructor(a,u){return a===null&&(a=-1),u===null&&(u=new r),this.stateNumber=a,this.configs=u,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}getAltSet(){let a=new n;if(this.configs!==null)for(let u=0;u<this.configs.length;u++){let l=this.configs[u];a.add(l.alt);}return a.length===0?null:a}equals(a){return this===a||a instanceof s&&this.configs.equals(a.configs)}toString(){let a=""+this.stateNumber+":"+this.configs;return this.isAcceptState&&(a=a+"=>",this.predicates!==null?a=a+this.predicates:a=a+this.prediction),a}hashCode(){let a=new i;return a.update(this.configs),a.finish()}};e.exports={DFAState:s,PredPrediction:o};}),Hv=re((t,e)=>{var{DFAState:r}=Ia(),{ATNConfigSet:i}=oo(),{getCachedPredictionContext:n}=Yi(),{Map:o}=mr(),s=class{constructor(a,u){return this.atn=a,this.sharedContextCache=u,this}getCachedContext(a){if(this.sharedContextCache===null)return a;let u=new o;return n(a,this.sharedContextCache,u)}};s.ERROR=new r(2147483647,new i),e.exports=s;}),s8=re((t,e)=>{var{hashStuff:r}=mr(),{LexerIndexedCustomAction:i}=Mv(),n=class{constructor(o){return this.lexerActions=o===null?[]:o,this.cachedHashCode=r(o),this}fixOffsetBeforeMatch(o){let s=null;for(let a=0;a<this.lexerActions.length;a++)this.lexerActions[a].isPositionDependent&&!(this.lexerActions[a]instanceof i)&&(s===null&&(s=this.lexerActions.concat([])),s[a]=new i(o,this.lexerActions[a]));return s===null?this:new n(s)}execute(o,s,a){let u=!1,l=s.index;try{for(let h=0;h<this.lexerActions.length;h++){let c=this.lexerActions[h];if(c instanceof i){let p=c.offset;s.seek(a+p),c=c.action,u=a+p!==l;}else c.isPositionDependent&&(s.seek(l),u=!1);c.execute(o);}}finally{u&&s.seek(l);}}hashCode(){return this.cachedHashCode}updateHashCode(o){o.update(this.cachedHashCode);}equals(o){if(this===o)return !0;if(o instanceof n){if(this.cachedHashCode!=o.cachedHashCode)return !1;if(this.lexerActions.length!=o.lexerActions.length)return !1;{let s=this.lexerActions.length;for(let a=0;a<s;++a)if(!this.lexerActions[a].equals(o.lexerActions[a]))return !1;return !0}}else return !1}static append(o,s){if(o===null)return new n([s]);let a=o.lexerActions.concat([s]);return new n(a)}};e.exports=n;}),o8=re((t,e)=>{var{Token:r}=Ut(),i=lh(),n=so(),o=Hv(),{DFAState:s}=Ia(),{OrderedATNConfigSet:a}=oo(),{PredictionContext:u}=Yi(),{SingletonPredictionContext:l}=Yi(),{RuleStopState:h}=an(),{LexerATNConfig:c}=uh(),{Transition:p}=Pa(),f=s8(),{LexerNoViableAltException:m}=Xr();function _(g){g.index=-1,g.line=0,g.column=-1,g.dfaState=null;}var x=class{constructor(){_(this);}reset(){_(this);}},v=class extends o{constructor(g,b,E,w){super(b,w),this.decisionToDFA=E,this.recog=g,this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE,this.prevAccept=new x;}copyState(g){this.column=g.column,this.line=g.line,this.mode=g.mode,this.startIndex=g.startIndex;}match(g,b){this.match_calls+=1,this.mode=b;let E=g.mark();try{this.startIndex=g.index,this.prevAccept.reset();let w=this.decisionToDFA[b];return w.s0===null?this.matchATN(g):this.execATN(g,w.s0)}finally{g.release(E);}}reset(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE;}matchATN(g){let b=this.atn.modeToStartState[this.mode];v.debug&&console.log("matchATN mode "+this.mode+" start: "+b);let E=this.mode,w=this.computeStartState(g,b),D=w.hasSemanticContext;w.hasSemanticContext=!1;let N=this.addDFAState(w);D||(this.decisionToDFA[this.mode].s0=N);let F=this.execATN(g,N);return v.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[E].toLexerString()),F}execATN(g,b){v.debug&&console.log("start state closure="+b.configs),b.isAcceptState&&this.captureSimState(this.prevAccept,g,b);let E=g.LA(1),w=b;for(;;){v.debug&&console.log("execATN loop starting closure: "+w.configs);let D=this.getExistingTargetState(w,E);if(D===null&&(D=this.computeTargetState(g,w,E)),D===o.ERROR||(E!==r.EOF&&this.consume(g),D.isAcceptState&&(this.captureSimState(this.prevAccept,g,D),E===r.EOF)))break;E=g.LA(1),w=D;}return this.failOrAccept(this.prevAccept,g,w.configs,E)}getExistingTargetState(g,b){if(g.edges===null||b<v.MIN_DFA_EDGE||b>v.MAX_DFA_EDGE)return null;let E=g.edges[b-v.MIN_DFA_EDGE];return E===void 0&&(E=null),v.debug&&E!==null&&console.log("reuse state "+g.stateNumber+" edge to "+E.stateNumber),E}computeTargetState(g,b,E){let w=new a;return this.getReachableConfigSet(g,b.configs,w,E),w.items.length===0?(w.hasSemanticContext||this.addDFAEdge(b,E,o.ERROR),o.ERROR):this.addDFAEdge(b,E,null,w)}failOrAccept(g,b,E,w){if(this.prevAccept.dfaState!==null){let D=g.dfaState.lexerActionExecutor;return this.accept(b,D,this.startIndex,g.index,g.line,g.column),g.dfaState.prediction}else {if(w===r.EOF&&b.index===this.startIndex)return r.EOF;throw new m(this.recog,b,this.startIndex,E)}}getReachableConfigSet(g,b,E,w){let D=n.INVALID_ALT_NUMBER;for(let N=0;N<b.items.length;N++){let F=b.items[N],V=F.alt===D;if(!(V&&F.passedThroughNonGreedyDecision)){v.debug&&console.log(`testing %s at %s
|
|
83
|
+
`,this.getTokenName(w),F.toString(this.recog,!0));for(let X=0;X<F.state.transitions.length;X++){let te=F.state.transitions[X],ae=this.getReachableTarget(te,w);if(ae!==null){let k=F.lexerActionExecutor;k!==null&&(k=k.fixOffsetBeforeMatch(g.index-this.startIndex));let y=w===r.EOF,T=new c({state:ae,lexerActionExecutor:k},F);this.closure(g,T,E,V,!0,y)&&(D=F.alt);}}}}}accept(g,b,E,w,D,N){v.debug&&console.log(`ACTION %s
|
|
84
|
+
`,b),g.seek(w),this.line=D,this.column=N,b!==null&&this.recog!==null&&b.execute(this.recog,g,E);}getReachableTarget(g,b){return g.matches(b,0,i.MAX_CHAR_VALUE)?g.target:null}computeStartState(g,b){let E=u.EMPTY,w=new a;for(let D=0;D<b.transitions.length;D++){let N=b.transitions[D].target,F=new c({state:N,alt:D+1,context:E},null);this.closure(g,F,w,!1,!1,!1);}return w}closure(g,b,E,w,D,N){let F=null;if(v.debug&&console.log("closure("+b.toString(this.recog,!0)+")"),b.state instanceof h){if(v.debug&&(this.recog!==null?console.log(`closure at %s rule stop %s
|
|
85
|
+
`,this.recog.ruleNames[b.state.ruleIndex],b):console.log(`closure at rule stop %s
|
|
86
|
+
`,b)),b.context===null||b.context.hasEmptyPath()){if(b.context===null||b.context.isEmpty())return E.add(b),!0;E.add(new c({state:b.state,context:u.EMPTY},b)),w=!0;}if(b.context!==null&&!b.context.isEmpty()){for(let V=0;V<b.context.length;V++)if(b.context.getReturnState(V)!==u.EMPTY_RETURN_STATE){let X=b.context.getParent(V),te=this.atn.states[b.context.getReturnState(V)];F=new c({state:te,context:X},b),w=this.closure(g,F,E,w,D,N);}}return w}b.state.epsilonOnlyTransitions||(!w||!b.passedThroughNonGreedyDecision)&&E.add(b);for(let V=0;V<b.state.transitions.length;V++){let X=b.state.transitions[V];F=this.getEpsilonTarget(g,b,X,E,D,N),F!==null&&(w=this.closure(g,F,E,w,D,N));}return w}getEpsilonTarget(g,b,E,w,D,N){let F=null;if(E.serializationType===p.RULE){let V=l.create(b.context,E.followState.stateNumber);F=new c({state:E.target,context:V},b);}else {if(E.serializationType===p.PRECEDENCE)throw "Precedence predicates are not supported in lexers.";if(E.serializationType===p.PREDICATE)v.debug&&console.log("EVAL rule "+E.ruleIndex+":"+E.predIndex),w.hasSemanticContext=!0,this.evaluatePredicate(g,E.ruleIndex,E.predIndex,D)&&(F=new c({state:E.target},b));else if(E.serializationType===p.ACTION)if(b.context===null||b.context.hasEmptyPath()){let V=f.append(b.lexerActionExecutor,this.atn.lexerActions[E.actionIndex]);F=new c({state:E.target,lexerActionExecutor:V},b);}else F=new c({state:E.target},b);else E.serializationType===p.EPSILON?F=new c({state:E.target},b):(E.serializationType===p.ATOM||E.serializationType===p.RANGE||E.serializationType===p.SET)&&N&&E.matches(r.EOF,0,i.MAX_CHAR_VALUE)&&(F=new c({state:E.target},b));}return F}evaluatePredicate(g,b,E,w){if(this.recog===null)return !0;if(!w)return this.recog.sempred(null,b,E);let D=this.column,N=this.line,F=g.index,V=g.mark();try{return this.consume(g),this.recog.sempred(null,b,E)}finally{this.column=D,this.line=N,g.seek(F),g.release(V);}}captureSimState(g,b,E){g.index=b.index,g.line=this.line,g.column=this.column,g.dfaState=E;}addDFAEdge(g,b,E,w){if(E===void 0&&(E=null),w===void 0&&(w=null),E===null&&w!==null){let D=w.hasSemanticContext;if(w.hasSemanticContext=!1,E=this.addDFAState(w),D)return E}return b<v.MIN_DFA_EDGE||b>v.MAX_DFA_EDGE||(v.debug&&console.log("EDGE "+g+" -> "+E+" upon "+b),g.edges===null&&(g.edges=[]),g.edges[b-v.MIN_DFA_EDGE]=E),E}addDFAState(g){let b=new s(null,g),E=null;for(let F=0;F<g.items.length;F++){let V=g.items[F];if(V.state instanceof h){E=V;break}}E!==null&&(b.isAcceptState=!0,b.lexerActionExecutor=E.lexerActionExecutor,b.prediction=this.atn.ruleToTokenType[E.state.ruleIndex]);let w=this.decisionToDFA[this.mode],D=w.states.get(b);if(D!==null)return D;let N=b;return N.stateNumber=w.states.length,g.setReadonly(!0),N.configs=g,w.states.add(N),N}getDFA(g){return this.decisionToDFA[g]}getText(g){return g.getText(this.startIndex,g.index-1)}consume(g){g.LA(1)===10?(this.line+=1,this.column=0):this.column+=1,g.consume();}getTokenName(g){return g===-1?"EOF":"'"+String.fromCharCode(g)+"'"}};v.debug=!1,v.dfa_debug=!1,v.MIN_DFA_EDGE=0,v.MAX_DFA_EDGE=127,v.match_calls=0,e.exports=v;}),jv=re((t,e)=>{var{Map:r,BitSet:i,AltDict:n,hashStuff:o}=mr(),s=so(),{RuleStopState:a}=an(),{ATNConfigSet:u}=oo(),{ATNConfig:l}=uh(),{SemanticContext:h}=La(),c={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(p,f){if(c.allConfigsInRuleStopStates(f))return !0;if(p===c.SLL&&f.hasSemanticContext){let _=new u;for(let x=0;x<f.items.length;x++){let v=f.items[x];v=new l({semanticContext:h.NONE},v),_.add(v);}f=_;}let m=c.getConflictingAltSubsets(f);return c.hasConflictingAltSet(m)&&!c.hasStateAssociatedWithOneAlt(f)},hasConfigInRuleStopState:function(p){for(let f=0;f<p.items.length;f++)if(p.items[f].state instanceof a)return !0;return !1},allConfigsInRuleStopStates:function(p){for(let f=0;f<p.items.length;f++)if(!(p.items[f].state instanceof a))return !1;return !0},resolvesToJustOneViableAlt:function(p){return c.getSingleViableAlt(p)},allSubsetsConflict:function(p){return !c.hasNonConflictingAltSet(p)},hasNonConflictingAltSet:function(p){for(let f=0;f<p.length;f++)if(p[f].length===1)return !0;return !1},hasConflictingAltSet:function(p){for(let f=0;f<p.length;f++)if(p[f].length>1)return !0;return !1},allSubsetsEqual:function(p){let f=null;for(let m=0;m<p.length;m++){let _=p[m];if(f===null)f=_;else if(_!==f)return !1}return !0},getUniqueAlt:function(p){let f=c.getAlts(p);return f.length===1?f.minValue():s.INVALID_ALT_NUMBER},getAlts:function(p){let f=new i;return p.map(function(m){f.or(m);}),f},getConflictingAltSubsets:function(p){let f=new r;return f.hashFunction=function(m){o(m.state.stateNumber,m.context);},f.equalsFunction=function(m,_){return m.state.stateNumber===_.state.stateNumber&&m.context.equals(_.context)},p.items.map(function(m){let _=f.get(m);_===null&&(_=new i,f.put(m,_)),_.add(m.alt);}),f.getValues()},getStateToAltMap:function(p){let f=new n;return p.items.map(function(m){let _=f.get(m.state);_===null&&(_=new i,f.put(m.state,_)),_.add(m.alt);}),f},hasStateAssociatedWithOneAlt:function(p){let f=c.getStateToAltMap(p).values();for(let m=0;m<f.length;m++)if(f[m].length===1)return !0;return !1},getSingleViableAlt:function(p){let f=null;for(let m=0;m<p.length;m++){let x=p[m].minValue();if(f===null)f=x;else if(f!==x)return s.INVALID_ALT_NUMBER}return f}};e.exports=c;}),Uv=re((t,e)=>{var r=K0(),i=Qs(),n=i.INVALID_INTERVAL,o=i.TerminalNode,s=i.TerminalNodeImpl,a=i.ErrorNodeImpl,u=Cr().Interval,l=class extends r{constructor(h,c){h=h||null,c=c||null,super(h,c),this.ruleIndex=-1,this.children=null,this.start=null,this.stop=null,this.exception=null;}copyFrom(h){this.parentCtx=h.parentCtx,this.invokingState=h.invokingState,this.children=null,this.start=h.start,this.stop=h.stop,h.children&&(this.children=[],h.children.map(function(c){c instanceof a&&(this.children.push(c),c.parentCtx=this);},this));}enterRule(h){}exitRule(h){}addChild(h){return this.children===null&&(this.children=[]),this.children.push(h),h}removeLastChild(){this.children!==null&&this.children.pop();}addTokenNode(h){let c=new s(h);return this.addChild(c),c.parentCtx=this,c}addErrorNode(h){let c=new a(h);return this.addChild(c),c.parentCtx=this,c}getChild(h,c){if(c=c||null,this.children===null||h<0||h>=this.children.length)return null;if(c===null)return this.children[h];for(let p=0;p<this.children.length;p++){let f=this.children[p];if(f instanceof c){if(h===0)return f;h-=1;}}return null}getToken(h,c){if(this.children===null||c<0||c>=this.children.length)return null;for(let p=0;p<this.children.length;p++){let f=this.children[p];if(f instanceof o&&f.symbol.type===h){if(c===0)return f;c-=1;}}return null}getTokens(h){if(this.children===null)return [];{let c=[];for(let p=0;p<this.children.length;p++){let f=this.children[p];f instanceof o&&f.symbol.type===h&&c.push(f);}return c}}getTypedRuleContext(h,c){return this.getChild(c,h)}getTypedRuleContexts(h){if(this.children===null)return [];{let c=[];for(let p=0;p<this.children.length;p++){let f=this.children[p];f instanceof h&&c.push(f);}return c}}getChildCount(){return this.children===null?0:this.children.length}getSourceInterval(){return this.start===null||this.stop===null?n:new u(this.start.tokenIndex,this.stop.tokenIndex)}};r.EMPTY=new l,e.exports=l;}),a8=re((t,e)=>{var r=mr(),{Set:i,BitSet:n,DoubleDict:o}=r,s=so(),{ATNState:a,RuleStopState:u}=an(),{ATNConfig:l}=uh(),{ATNConfigSet:h}=oo(),{Token:c}=Ut(),{DFAState:p,PredPrediction:f}=Ia(),m=Hv(),_=jv(),x=K0();Uv();var {SemanticContext:g}=La(),{PredictionContext:b}=Yi(),{Interval:E}=Cr(),{Transition:w,SetTransition:D,NotSetTransition:N,RuleTransition:F,ActionTransition:V}=Pa(),{NoViableAltException:X}=Xr(),{SingletonPredictionContext:te,predictionContextFromRuleContext:ae}=Yi(),k=class extends m{constructor(y,T,S,R){super(T,R),this.parser=y,this.decisionToDFA=S,this.predictionMode=_.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this.debug=!1,this.debug_closure=!1,this.debug_add=!1,this.debug_list_atn_decisions=!1,this.dfa_debug=!1,this.retry_debug=!1;}reset(){}adaptivePredict(y,T,S){(this.debug||this.debug_list_atn_decisions)&&console.log("adaptivePredict decision "+T+" exec LA(1)=="+this.getLookaheadName(y)+" line "+y.LT(1).line+":"+y.LT(1).column),this._input=y,this._startIndex=y.index,this._outerContext=S;let R=this.decisionToDFA[T];this._dfa=R;let L=y.mark(),I=y.index;try{let K;if(R.precedenceDfa?K=R.getPrecedenceStartState(this.parser.getPrecedence()):K=R.s0,K===null){S===null&&(S=x.EMPTY),(this.debug||this.debug_list_atn_decisions)&&console.log("predictATN decision "+R.decision+" exec LA(1)=="+this.getLookaheadName(y)+", outerContext="+S.toString(this.parser.ruleNames));let H=this.computeStartState(R.atnStartState,x.EMPTY,!1);R.precedenceDfa?(R.s0.configs=H,H=this.applyPrecedenceFilter(H),K=this.addDFAState(R,new p(null,H)),R.setPrecedenceStartState(this.parser.getPrecedence(),K)):(K=this.addDFAState(R,new p(null,H)),R.s0=K);}let q=this.execATN(R,K,y,I,S);return this.debug&&console.log("DFA after predictATN: "+R.toString(this.parser.literalNames)),q}finally{this._dfa=null,this.mergeCache=null,y.seek(I),y.release(L);}}execATN(y,T,S,R,L){(this.debug||this.debug_list_atn_decisions)&&console.log("execATN decision "+y.decision+" exec LA(1)=="+this.getLookaheadName(S)+" line "+S.LT(1).line+":"+S.LT(1).column);let I,K=T;this.debug&&console.log("s0 = "+T);let q=S.LA(1);for(;;){let A=this.getExistingTargetState(K,q);if(A===null&&(A=this.computeTargetState(y,K,q)),A===m.ERROR){let H=this.noViableAlt(S,L,K.configs,R);if(S.seek(R),I=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(K.configs,L),I!==s.INVALID_ALT_NUMBER)return I;throw H}if(A.requiresFullContext&&this.predictionMode!==_.SLL){let H=null;if(A.predicates!==null){this.debug&&console.log("DFA state has preds in DFA sim LL failover");let P=S.index;if(P!==R&&S.seek(R),H=this.evalSemanticContext(A.predicates,L,!0),H.length===1)return this.debug&&console.log("Full LL avoided"),H.minValue();P!==R&&S.seek(P);}this.dfa_debug&&console.log("ctx sensitive state "+L+" in "+A);let C=this.computeStartState(y.atnStartState,L,!0);return this.reportAttemptingFullContext(y,H,A.configs,R,S.index),I=this.execATNWithFullContext(y,A,C,S,R,L),I}if(A.isAcceptState){if(A.predicates===null)return A.prediction;let H=S.index;S.seek(R);let B=this.evalSemanticContext(A.predicates,L,!0);if(B.length===0)throw this.noViableAlt(S,L,A.configs,R);return B.length===1||this.reportAmbiguity(y,A,R,H,!1,B,A.configs),B.minValue()}K=A,q!==c.EOF&&(S.consume(),q=S.LA(1));}}getExistingTargetState(y,T){let S=y.edges;return S===null?null:S[T+1]||null}computeTargetState(y,T,S){let R=this.computeReachSet(T.configs,S,!1);if(R===null)return this.addDFAEdge(y,T,S,m.ERROR),m.ERROR;let L=new p(null,R),I=this.getUniqueAlt(R);if(this.debug){let K=_.getConflictingAltSubsets(R);console.log("SLL altSubSets="+r.arrayToString(K)+", previous="+T.configs+", configs="+R+", predict="+I+", allSubsetsConflict="+_.allSubsetsConflict(K)+", conflictingAlts="+this.getConflictingAlts(R));}return I!==s.INVALID_ALT_NUMBER?(L.isAcceptState=!0,L.configs.uniqueAlt=I,L.prediction=I):_.hasSLLConflictTerminatingPrediction(this.predictionMode,R)&&(L.configs.conflictingAlts=this.getConflictingAlts(R),L.requiresFullContext=!0,L.isAcceptState=!0,L.prediction=L.configs.conflictingAlts.minValue()),L.isAcceptState&&L.configs.hasSemanticContext&&(this.predicateDFAState(L,this.atn.getDecisionState(y.decision)),L.predicates!==null&&(L.prediction=s.INVALID_ALT_NUMBER)),L=this.addDFAEdge(y,T,S,L),L}predicateDFAState(y,T){let S=T.transitions.length,R=this.getConflictingAltsOrUniqueAlt(y.configs),L=this.getPredsForAmbigAlts(R,y.configs,S);L!==null?(y.predicates=this.getPredicatePredictions(R,L),y.prediction=s.INVALID_ALT_NUMBER):y.prediction=R.minValue();}execATNWithFullContext(y,T,S,R,L,I){(this.debug||this.debug_list_atn_decisions)&&console.log("execATNWithFullContext "+S);let K=!0,q=!1,A,H=S;R.seek(L);let B=R.LA(1),C=-1;for(;;){if(A=this.computeReachSet(H,B,K),A===null){let j=this.noViableAlt(R,I,H,L);R.seek(L);let $=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(H,I);if($!==s.INVALID_ALT_NUMBER)return $;throw j}let P=_.getConflictingAltSubsets(A);if(this.debug&&console.log("LL altSubSets="+P+", predict="+_.getUniqueAlt(P)+", resolvesToJustOneViableAlt="+_.resolvesToJustOneViableAlt(P)),A.uniqueAlt=this.getUniqueAlt(A),A.uniqueAlt!==s.INVALID_ALT_NUMBER){C=A.uniqueAlt;break}else if(this.predictionMode!==_.LL_EXACT_AMBIG_DETECTION){if(C=_.resolvesToJustOneViableAlt(P),C!==s.INVALID_ALT_NUMBER)break}else if(_.allSubsetsConflict(P)&&_.allSubsetsEqual(P)){q=!0,C=_.getSingleViableAlt(P);break}H=A,B!==c.EOF&&(R.consume(),B=R.LA(1));}return A.uniqueAlt!==s.INVALID_ALT_NUMBER?(this.reportContextSensitivity(y,C,A,L,R.index),C):(this.reportAmbiguity(y,T,L,R.index,q,null,A),C)}computeReachSet(y,T,S){this.debug&&console.log("in computeReachSet, starting closure: "+y),this.mergeCache===null&&(this.mergeCache=new o);let R=new h(S),L=null;for(let K=0;K<y.items.length;K++){let q=y.items[K];if(this.debug&&console.log("testing "+this.getTokenName(T)+" at "+q),q.state instanceof u){(S||T===c.EOF)&&(L===null&&(L=[]),L.push(q),this.debug_add&&console.log("added "+q+" to skippedStopStates"));continue}for(let A=0;A<q.state.transitions.length;A++){let H=q.state.transitions[A],B=this.getReachableTarget(H,T);if(B!==null){let C=new l({state:B},q);R.add(C,this.mergeCache),this.debug_add&&console.log("added "+C+" to intermediate");}}}let I=null;if(L===null&&T!==c.EOF&&(R.items.length===1||this.getUniqueAlt(R)!==s.INVALID_ALT_NUMBER)&&(I=R),I===null){I=new h(S);let K=new i,q=T===c.EOF;for(let A=0;A<R.items.length;A++)this.closure(R.items[A],I,K,!1,S,q);}if(T===c.EOF&&(I=this.removeAllConfigsNotInRuleStopState(I,I===R)),L!==null&&(!S||!_.hasConfigInRuleStopState(I)))for(let K=0;K<L.length;K++)I.add(L[K],this.mergeCache);return I.items.length===0?null:I}removeAllConfigsNotInRuleStopState(y,T){if(_.allConfigsInRuleStopStates(y))return y;let S=new h(y.fullCtx);for(let R=0;R<y.items.length;R++){let L=y.items[R];if(L.state instanceof u){S.add(L,this.mergeCache);continue}if(T&&L.state.epsilonOnlyTransitions&&this.atn.nextTokens(L.state).contains(c.EPSILON)){let K=this.atn.ruleToStopState[L.state.ruleIndex];S.add(new l({state:K},L),this.mergeCache);}}return S}computeStartState(y,T,S){let R=ae(this.atn,T),L=new h(S);for(let I=0;I<y.transitions.length;I++){let K=y.transitions[I].target,q=new l({state:K,alt:I+1,context:R},null),A=new i;this.closure(q,L,A,!0,S,!1);}return L}applyPrecedenceFilter(y){let T,S=[],R=new h(y.fullCtx);for(let L=0;L<y.items.length;L++){if(T=y.items[L],T.alt!==1)continue;let I=T.semanticContext.evalPrecedence(this.parser,this._outerContext);I!==null&&(S[T.state.stateNumber]=T.context,I!==T.semanticContext?R.add(new l({semanticContext:I},T),this.mergeCache):R.add(T,this.mergeCache));}for(let L=0;L<y.items.length;L++)if(T=y.items[L],T.alt!==1){if(!T.precedenceFilterSuppressed){let I=S[T.state.stateNumber]||null;if(I!==null&&I.equals(T.context))continue}R.add(T,this.mergeCache);}return R}getReachableTarget(y,T){return y.matches(T,0,this.atn.maxTokenType)?y.target:null}getPredsForAmbigAlts(y,T,S){let R=[];for(let I=0;I<T.items.length;I++){let K=T.items[I];y.contains(K.alt)&&(R[K.alt]=g.orContext(R[K.alt]||null,K.semanticContext));}let L=0;for(let I=1;I<S+1;I++){let K=R[I]||null;K===null?R[I]=g.NONE:K!==g.NONE&&(L+=1);}return L===0&&(R=null),this.debug&&console.log("getPredsForAmbigAlts result "+r.arrayToString(R)),R}getPredicatePredictions(y,T){let S=[],R=!1;for(let L=1;L<T.length;L++){let I=T[L];y!==null&&y.contains(L)&&S.push(new f(I,L)),I!==g.NONE&&(R=!0);}return R?S:null}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(y,T){let S=this.splitAccordingToSemanticValidity(y,T),R=S[0],L=S[1],I=this.getAltThatFinishedDecisionEntryRule(R);return I!==s.INVALID_ALT_NUMBER||L.items.length>0&&(I=this.getAltThatFinishedDecisionEntryRule(L),I!==s.INVALID_ALT_NUMBER)?I:s.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(y){let T=[];for(let S=0;S<y.items.length;S++){let R=y.items[S];(R.reachesIntoOuterContext>0||R.state instanceof u&&R.context.hasEmptyPath())&&T.indexOf(R.alt)<0&&T.push(R.alt);}return T.length===0?s.INVALID_ALT_NUMBER:Math.min.apply(null,T)}splitAccordingToSemanticValidity(y,T){let S=new h(y.fullCtx),R=new h(y.fullCtx);for(let L=0;L<y.items.length;L++){let I=y.items[L];I.semanticContext!==g.NONE?I.semanticContext.evaluate(this.parser,T)?S.add(I):R.add(I):S.add(I);}return [S,R]}evalSemanticContext(y,T,S){let R=new n;for(let L=0;L<y.length;L++){let I=y[L];if(I.pred===g.NONE){if(R.add(I.alt),!S)break;continue}let K=I.pred.evaluate(this.parser,T);if((this.debug||this.dfa_debug)&&console.log("eval pred "+I+"="+K),K&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+I.alt),R.add(I.alt),!S))break}return R}closure(y,T,S,R,L,I){this.closureCheckingStopState(y,T,S,R,L,0,I);}closureCheckingStopState(y,T,S,R,L,I,K){if((this.debug||this.debug_closure)&&(console.log("closure("+y.toString(this.parser,!0)+")"),y.reachesIntoOuterContext>50))throw "problem";if(y.state instanceof u)if(y.context.isEmpty())if(L){T.add(y,this.mergeCache);return}else this.debug&&console.log("FALLING off rule "+this.getRuleName(y.state.ruleIndex));else {for(let q=0;q<y.context.length;q++){if(y.context.getReturnState(q)===b.EMPTY_RETURN_STATE){if(L){T.add(new l({state:y.state,context:b.EMPTY},y),this.mergeCache);continue}else this.debug&&console.log("FALLING off rule "+this.getRuleName(y.state.ruleIndex)),this.closure_(y,T,S,R,L,I,K);continue}let A=this.atn.states[y.context.getReturnState(q)],H=y.context.getParent(q),B={state:A,alt:y.alt,context:H,semanticContext:y.semanticContext},C=new l(B,null);C.reachesIntoOuterContext=y.reachesIntoOuterContext,this.closureCheckingStopState(C,T,S,R,L,I-1,K);}return}this.closure_(y,T,S,R,L,I,K);}closure_(y,T,S,R,L,I,K){let q=y.state;q.epsilonOnlyTransitions||T.add(y,this.mergeCache);for(let A=0;A<q.transitions.length;A++){if(A===0&&this.canDropLoopEntryEdgeInLeftRecursiveRule(y))continue;let H=q.transitions[A],B=R&&!(H instanceof V),C=this.getEpsilonTarget(y,H,B,I===0,L,K);if(C!==null){let P=I;if(y.state instanceof u){if(this._dfa!==null&&this._dfa.precedenceDfa&&H.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(C.precedenceFilterSuppressed=!0),C.reachesIntoOuterContext+=1,S.add(C)!==C)continue;T.dipsIntoOuterContext=!0,P-=1,this.debug&&console.log("dips into outer ctx: "+C);}else {if(!H.isEpsilon&&S.add(C)!==C)continue;H instanceof F&&P>=0&&(P+=1);}this.closureCheckingStopState(C,T,S,B,L,P,K);}}}canDropLoopEntryEdgeInLeftRecursiveRule(y){let T=y.state;if(T.stateType!==a.STAR_LOOP_ENTRY||T.stateType!==a.STAR_LOOP_ENTRY||!T.isPrecedenceDecision||y.context.isEmpty()||y.context.hasEmptyPath())return !1;let S=y.context.length;for(let K=0;K<S;K++)if(this.atn.states[y.context.getReturnState(K)].ruleIndex!==T.ruleIndex)return !1;let L=T.transitions[0].target.endState.stateNumber,I=this.atn.states[L];for(let K=0;K<S;K++){let q=y.context.getReturnState(K),A=this.atn.states[q];if(A.transitions.length!==1||!A.transitions[0].isEpsilon)return !1;let H=A.transitions[0].target;if(!(A.stateType===a.BLOCK_END&&H===T)&&A!==I&&H!==I&&!(H.stateType===a.BLOCK_END&&H.transitions.length===1&&H.transitions[0].isEpsilon&&H.transitions[0].target===T))return !1}return !0}getRuleName(y){return this.parser!==null&&y>=0?this.parser.ruleNames[y]:"<rule "+y+">"}getEpsilonTarget(y,T,S,R,L,I){switch(T.serializationType){case w.RULE:return this.ruleTransition(y,T);case w.PRECEDENCE:return this.precedenceTransition(y,T,S,R,L);case w.PREDICATE:return this.predTransition(y,T,S,R,L);case w.ACTION:return this.actionTransition(y,T);case w.EPSILON:return new l({state:T.target},y);case w.ATOM:case w.RANGE:case w.SET:return I&&T.matches(c.EOF,0,1)?new l({state:T.target},y):null;default:return null}}actionTransition(y,T){if(this.debug){let S=T.actionIndex===-1?65535:T.actionIndex;console.log("ACTION edge "+T.ruleIndex+":"+S);}return new l({state:T.target},y)}precedenceTransition(y,T,S,R,L){this.debug&&(console.log("PRED (collectPredicates="+S+") "+T.precedence+">=_p, ctx dependent=true"),this.parser!==null&&console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack())));let I=null;if(S&&R)if(L){let K=this._input.index;this._input.seek(this._startIndex);let q=T.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(K),q&&(I=new l({state:T.target},y));}else {let K=g.andContext(y.semanticContext,T.getPredicate());I=new l({state:T.target,semanticContext:K},y);}else I=new l({state:T.target},y);return this.debug&&console.log("config from pred transition="+I),I}predTransition(y,T,S,R,L){this.debug&&(console.log("PRED (collectPredicates="+S+") "+T.ruleIndex+":"+T.predIndex+", ctx dependent="+T.isCtxDependent),this.parser!==null&&console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack())));let I=null;if(S&&(T.isCtxDependent&&R||!T.isCtxDependent))if(L){let K=this._input.index;this._input.seek(this._startIndex);let q=T.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(K),q&&(I=new l({state:T.target},y));}else {let K=g.andContext(y.semanticContext,T.getPredicate());I=new l({state:T.target,semanticContext:K},y);}else I=new l({state:T.target},y);return this.debug&&console.log("config from pred transition="+I),I}ruleTransition(y,T){this.debug&&console.log("CALL rule "+this.getRuleName(T.target.ruleIndex)+", ctx="+y.context);let S=T.followState,R=te.create(y.context,S.stateNumber);return new l({state:T.target,context:R},y)}getConflictingAlts(y){let T=_.getConflictingAltSubsets(y);return _.getAlts(T)}getConflictingAltsOrUniqueAlt(y){let T=null;return y.uniqueAlt!==s.INVALID_ALT_NUMBER?(T=new n,T.add(y.uniqueAlt)):T=y.conflictingAlts,T}getTokenName(y){if(y===c.EOF)return "EOF";if(this.parser!==null&&this.parser.literalNames!==null)if(y>=this.parser.literalNames.length&&y>=this.parser.symbolicNames.length)console.log(""+y+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens());else return (this.parser.literalNames[y]||this.parser.symbolicNames[y])+"<"+y+">";return ""+y}getLookaheadName(y){return this.getTokenName(y.LA(1))}dumpDeadEndConfigs(y){console.log("dead end configs: ");let T=y.getDeadEndConfigs();for(let S=0;S<T.length;S++){let R=T[S],L="no edges";if(R.state.transitions.length>0){let I=R.state.transitions[0];I instanceof AtomTransition?L="Atom "+this.getTokenName(I.label):I instanceof D&&(L=(I instanceof N?"~":"")+"Set "+I.set);}console.error(R.toString(this.parser,!0)+":"+L);}}noViableAlt(y,T,S,R){return new X(this.parser,y,y.get(R),y.LT(1),S,T)}getUniqueAlt(y){let T=s.INVALID_ALT_NUMBER;for(let S=0;S<y.items.length;S++){let R=y.items[S];if(T===s.INVALID_ALT_NUMBER)T=R.alt;else if(R.alt!==T)return s.INVALID_ALT_NUMBER}return T}addDFAEdge(y,T,S,R){if(this.debug&&console.log("EDGE "+T+" -> "+R+" upon "+this.getTokenName(S)),R===null)return null;if(R=this.addDFAState(y,R),T===null||S<-1||S>this.atn.maxTokenType)return R;if(T.edges===null&&(T.edges=[]),T.edges[S+1]=R,this.debug){let L=this.parser===null?null:this.parser.literalNames,I=this.parser===null?null:this.parser.symbolicNames;console.log(`DFA=
|
|
87
|
+
`+y.toString(L,I));}return R}addDFAState(y,T){if(T===m.ERROR)return T;let S=y.states.get(T);return S!==null?S:(T.stateNumber=y.states.length,T.configs.readOnly||(T.configs.optimizeConfigs(this),T.configs.setReadonly(!0)),y.states.add(T),this.debug&&console.log("adding new DFA state: "+T),T)}reportAttemptingFullContext(y,T,S,R,L){if(this.debug||this.retry_debug){let I=new E(R,L+1);console.log("reportAttemptingFullContext decision="+y.decision+":"+S+", input="+this.parser.getTokenStream().getText(I));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,y,R,L,T,S);}reportContextSensitivity(y,T,S,R,L){if(this.debug||this.retry_debug){let I=new E(R,L+1);console.log("reportContextSensitivity decision="+y.decision+":"+S+", input="+this.parser.getTokenStream().getText(I));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,y,R,L,T,S);}reportAmbiguity(y,T,S,R,L,I,K){if(this.debug||this.retry_debug){let q=new E(S,R+1);console.log("reportAmbiguity "+I+":"+K+", input="+this.parser.getTokenStream().getText(q));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,y,S,R,L,I,K);}};e.exports=k;}),u8=re(t=>{t.ATN=so(),t.ATNDeserializer=Bv(),t.LexerATNSimulator=o8(),t.ParserATNSimulator=a8(),t.PredictionMode=jv();}),Vv=re(()=>{String.prototype.codePointAt||function(){var t=function(){let r;try{let i={},n=Object.defineProperty;r=n(i,i,i)&&n;}catch(i){}return r}();let e=function(r){if(this==null)throw TypeError();let i=String(this),n=i.length,o=r?Number(r):0;if(o!==o&&(o=0),o<0||o>=n)return;let s=i.charCodeAt(o),a;return s>=55296&&s<=56319&&n>o+1&&(a=i.charCodeAt(o+1),a>=56320&&a<=57343)?(s-55296)*1024+a-56320+65536:s};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e;}();}),Ul=re((t,e)=>{var r=class{constructor(n,o,s){this.dfa=n,this.literalNames=o||[],this.symbolicNames=s||[];}toString(){if(this.dfa.s0===null)return null;let n="",o=this.dfa.sortedStates();for(let s=0;s<o.length;s++){let a=o[s];if(a.edges!==null){let u=a.edges.length;for(let l=0;l<u;l++){let h=a.edges[l]||null;h!==null&&h.stateNumber!==2147483647&&(n=n.concat(this.getStateString(a)),n=n.concat("-"),n=n.concat(this.getEdgeLabel(l)),n=n.concat("->"),n=n.concat(this.getStateString(h)),n=n.concat(`
|
|
88
|
+
`));}}}return n.length===0?null:n}getEdgeLabel(n){return n===0?"EOF":this.literalNames!==null||this.symbolicNames!==null?this.literalNames[n-1]||this.symbolicNames[n-1]:String.fromCharCode(n-1)}getStateString(n){let o=(n.isAcceptState?":":"")+"s"+n.stateNumber+(n.requiresFullContext?"^":"");return n.isAcceptState?n.predicates!==null?o+"=>"+n.predicates.toString():o+"=>"+n.prediction.toString():o}},i=class extends r{constructor(n){super(n,null);}getEdgeLabel(n){return "'"+String.fromCharCode(n)+"'"}};e.exports={DFASerializer:r,LexerDFASerializer:i};}),l8=re((t,e)=>{var{Set:r}=mr(),{DFAState:i}=Ia(),{StarLoopEntryState:n}=an(),{ATNConfigSet:o}=oo(),{DFASerializer:s}=Ul(),{LexerDFASerializer:a}=Ul(),u=class{constructor(l,h){if(h===void 0&&(h=0),this.atnStartState=l,this.decision=h,this._states=new r,this.s0=null,this.precedenceDfa=!1,l instanceof n&&l.isPrecedenceDecision){this.precedenceDfa=!0;let c=new i(null,new o);c.edges=[],c.isAcceptState=!1,c.requiresFullContext=!1,this.s0=c;}}getPrecedenceStartState(l){if(!this.precedenceDfa)throw "Only precedence DFAs may contain a precedence start state.";return l<0||l>=this.s0.edges.length?null:this.s0.edges[l]||null}setPrecedenceStartState(l,h){if(!this.precedenceDfa)throw "Only precedence DFAs may contain a precedence start state.";l<0||(this.s0.edges[l]=h);}setPrecedenceDfa(l){if(this.precedenceDfa!==l){if(this._states=new r,l){let h=new i(null,new o);h.edges=[],h.isAcceptState=!1,h.requiresFullContext=!1,this.s0=h;}else this.s0=null;this.precedenceDfa=l;}}sortedStates(){return this._states.values().sort(function(h,c){return h.stateNumber-c.stateNumber})}toString(l,h){return l=l||null,h=h||null,this.s0===null?"":new s(this,l,h).toString()}toLexerString(){return this.s0===null?"":new a(this).toString()}get states(){return this._states}};e.exports=u;}),h8=re(t=>{t.DFA=l8(),t.DFASerializer=Ul().DFASerializer,t.LexerDFASerializer=Ul().LexerDFASerializer,t.PredPrediction=Ia().PredPrediction;}),$v=re(()=>{String.fromCodePoint||function(){let t=function(){let n;try{let o={},s=Object.defineProperty;n=s(o,o,o)&&s;}catch(o){}return n}(),e=String.fromCharCode,r=Math.floor,i=function(n){let s=[],a,u,l=-1,h=arguments.length;if(!h)return "";let c="";for(;++l<h;){let p=Number(arguments[l]);if(!isFinite(p)||p<0||p>1114111||r(p)!==p)throw RangeError("Invalid code point: "+p);p<=65535?s.push(p):(p-=65536,a=(p>>10)+55296,u=p%1024+56320,s.push(a,u)),(l+1===h||s.length>16384)&&(c+=e.apply(null,s),s.length=0);}return c};t?t(String,"fromCodePoint",{value:i,configurable:!0,writable:!0}):String.fromCodePoint=i;}();}),c8=re((t,e)=>{var r=Qs(),i=Pv();e.exports=Hl(Hl({},r),{Trees:i});}),f8=re((t,e)=>{var{BitSet:r}=mr(),{ErrorListener:i}=jl(),{Interval:n}=Cr(),o=class extends i{constructor(s){super(),s=s||!0,this.exactOnly=s;}reportAmbiguity(s,a,u,l,h,c,p){if(this.exactOnly&&!h)return;let f="reportAmbiguity d="+this.getDecisionDescription(s,a)+": ambigAlts="+this.getConflictingAlts(c,p)+", input='"+s.getTokenStream().getText(new n(u,l))+"'";s.notifyErrorListeners(f);}reportAttemptingFullContext(s,a,u,l,h,c){let p="reportAttemptingFullContext d="+this.getDecisionDescription(s,a)+", input='"+s.getTokenStream().getText(new n(u,l))+"'";s.notifyErrorListeners(p);}reportContextSensitivity(s,a,u,l,h,c){let p="reportContextSensitivity d="+this.getDecisionDescription(s,a)+", input='"+s.getTokenStream().getText(new n(u,l))+"'";s.notifyErrorListeners(p);}getDecisionDescription(s,a){let u=a.decision,l=a.atnStartState.ruleIndex,h=s.ruleNames;if(l<0||l>=h.length)return ""+u;let c=h[l]||null;return c===null||c.length===0?""+u:`${u} (${c})`}getConflictingAlts(s,a){if(s!==null)return s;let u=new r;for(let l=0;l<a.items.length;l++)u.add(a.items[l].alt);return `{${u.values().join(", ")}}`}};e.exports=o;}),l0=re((t,e)=>{var{Token:r}=Ut(),{NoViableAltException:i,InputMismatchException:n,FailedPredicateException:o,ParseCancellationException:s}=Xr(),{ATNState:a}=an(),{Interval:u,IntervalSet:l}=Cr(),h=class{reset(f){}recoverInline(f){}recover(f,m){}sync(f){}inErrorRecoveryMode(f){}reportError(f){}},c=class extends h{constructor(){super(),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this.nextTokensContext=null,this.nextTokenState=0;}reset(f){this.endErrorCondition(f);}beginErrorCondition(f){this.errorRecoveryMode=!0;}inErrorRecoveryMode(f){return this.errorRecoveryMode}endErrorCondition(f){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1;}reportMatch(f){this.endErrorCondition(f);}reportError(f,m){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),m instanceof i?this.reportNoViableAlternative(f,m):m instanceof n?this.reportInputMismatch(f,m):m instanceof o?this.reportFailedPredicate(f,m):(console.log("unknown recognition error type: "+m.constructor.name),console.log(m.stack),f.notifyErrorListeners(m.getOffendingToken(),m.getMessage(),m)));}recover(f,m){this.lastErrorIndex===f.getInputStream().index&&this.lastErrorStates!==null&&this.lastErrorStates.indexOf(f.state)>=0&&f.consume(),this.lastErrorIndex=f._input.index,this.lastErrorStates===null&&(this.lastErrorStates=[]),this.lastErrorStates.push(f.state);let _=this.getErrorRecoverySet(f);this.consumeUntil(f,_);}sync(f){if(this.inErrorRecoveryMode(f))return;let m=f._interp.atn.states[f.state],_=f.getTokenStream().LA(1),x=f.atn.nextTokens(m);if(x.contains(_)){this.nextTokensContext=null,this.nextTokenState=a.INVALID_STATE_NUMBER;return}else if(x.contains(r.EPSILON)){this.nextTokensContext===null&&(this.nextTokensContext=f._ctx,this.nextTokensState=f._stateNumber);return}switch(m.stateType){case a.BLOCK_START:case a.STAR_BLOCK_START:case a.PLUS_BLOCK_START:case a.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f)!==null)return;throw new n(f);case a.PLUS_LOOP_BACK:case a.STAR_LOOP_BACK:this.reportUnwantedToken(f);let v=new l;v.addSet(f.getExpectedTokens());let g=v.addSet(this.getErrorRecoverySet(f));this.consumeUntil(f,g);break;}}reportNoViableAlternative(f,m){let _=f.getTokenStream(),x;_!==null?m.startToken.type===r.EOF?x="<EOF>":x=_.getText(new u(m.startToken.tokenIndex,m.offendingToken.tokenIndex)):x="<unknown input>";let v="no viable alternative at input "+this.escapeWSAndQuote(x);f.notifyErrorListeners(v,m.offendingToken,m);}reportInputMismatch(f,m){let _="mismatched input "+this.getTokenErrorDisplay(m.offendingToken)+" expecting "+m.getExpectedTokens().toString(f.literalNames,f.symbolicNames);f.notifyErrorListeners(_,m.offendingToken,m);}reportFailedPredicate(f,m){let x="rule "+f.ruleNames[f._ctx.ruleIndex]+" "+m.message;f.notifyErrorListeners(x,m.offendingToken,m);}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.getCurrentToken(),_=this.getTokenErrorDisplay(m),x=this.getExpectedTokens(f),v="extraneous input "+_+" expecting "+x.toString(f.literalNames,f.symbolicNames);f.notifyErrorListeners(v,m,null);}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.getCurrentToken(),x="missing "+this.getExpectedTokens(f).toString(f.literalNames,f.symbolicNames)+" at "+this.getTokenErrorDisplay(m);f.notifyErrorListeners(x,m,null);}recoverInline(f){let m=this.singleTokenDeletion(f);if(m!==null)return f.consume(),m;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw new n(f)}singleTokenInsertion(f){let m=f.getTokenStream().LA(1),_=f._interp.atn,v=_.states[f.state].transitions[0].target;return _.nextTokens(v,f._ctx).contains(m)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let m=f.getTokenStream().LA(2);if(this.getExpectedTokens(f).contains(m)){this.reportUnwantedToken(f),f.consume();let x=f.getCurrentToken();return this.reportMatch(f),x}else return null}getMissingSymbol(f){let m=f.getCurrentToken(),x=this.getExpectedTokens(f).first(),v;x===r.EOF?v="<missing EOF>":v="<missing "+f.literalNames[x]+">";let g=m,b=f.getTokenStream().LT(-1);return g.type===r.EOF&&b!==null&&(g=b),f.getTokenFactory().create(g.source,x,v,r.DEFAULT_CHANNEL,-1,-1,g.line,g.column)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(f===null)return "<no token>";let m=f.text;return m===null&&(f.type===r.EOF?m="<EOF>":m="<"+f.type+">"),this.escapeWSAndQuote(m)}escapeWSAndQuote(f){return f=f.replace(/\n/g,"\\n"),f=f.replace(/\r/g,"\\r"),f=f.replace(/\t/g,"\\t"),"'"+f+"'"}getErrorRecoverySet(f){let m=f._interp.atn,_=f._ctx,x=new l;for(;_!==null&&_.invokingState>=0;){let g=m.states[_.invokingState].transitions[0],b=m.nextTokens(g.followState);x.addSet(b),_=_.parentCtx;}return x.removeOne(r.EPSILON),x}consumeUntil(f,m){let _=f.getTokenStream().LA(1);for(;_!==r.EOF&&!m.contains(_);)f.consume(),_=f.getTokenStream().LA(1);}},p=class extends c{constructor(){super();}recover(f,m){let _=f._ctx;for(;_!==null;)_.exception=m,_=_.parentCtx;throw new s(m)}recoverInline(f){this.recover(f,new n(f));}sync(f){}};e.exports={BailErrorStrategy:p,DefaultErrorStrategy:c};}),d8=re((t,e)=>{e.exports.RecognitionException=Xr().RecognitionException,e.exports.NoViableAltException=Xr().NoViableAltException,e.exports.LexerNoViableAltException=Xr().LexerNoViableAltException,e.exports.InputMismatchException=Xr().InputMismatchException,e.exports.FailedPredicateException=Xr().FailedPredicateException,e.exports.DiagnosticErrorListener=f8(),e.exports.BailErrorStrategy=l0().BailErrorStrategy,e.exports.DefaultErrorStrategy=l0().DefaultErrorStrategy,e.exports.ErrorListener=jl().ErrorListener;}),G0=re((t,e)=>{var{Token:r}=Ut();Vv(),$v();var i=class{constructor(n,o){if(this.name="<empty>",this.strdata=n,this.decodeToUnicodeCodePoints=o||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let s=0;s<this.strdata.length;){let a=this.strdata.codePointAt(s);this.data.push(a),s+=a<=65535?1:2;}else for(let s=0;s<this.strdata.length;s++){let a=this.strdata.charCodeAt(s);this.data.push(a);}this._size=this.data.length;}reset(){this._index=0;}consume(){if(this._index>=this._size)throw "cannot consume EOF";this._index+=1;}LA(n){if(n===0)return 0;n<0&&(n+=1);let o=this._index+n-1;return o<0||o>=this._size?r.EOF:this.data[o]}LT(n){return this.LA(n)}mark(){return -1}release(n){}seek(n){if(n<=this._index){this._index=n;return}this._index=Math.min(n,this._size);}getText(n,o){if(o>=this._size&&(o=this._size-1),n>=this._size)return "";if(this.decodeToUnicodeCodePoints){let s="";for(let a=n;a<=o;a++)s+=String.fromCodePoint(this.data[a]);return s}else return this.strdata.slice(n,o+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}};e.exports=i;}),p8=re((t,e)=>{var r=G0(),i=me("fs"),n={fromString:function(o){return new r(o,!0)},fromBlob:function(o,s,a,u){let l=new window.FileReader;l.onload=function(h){let c=new r(h.target.result,!0);a(c);},l.onerror=u,l.readAsText(o,s);},fromBuffer:function(o,s){return new r(o.toString(s),!0)},fromPath:function(o,s,a){i.readFile(o,s,function(u,l){let h=null;l!==null&&(h=new r(l,!0)),a(u,h);});},fromPathSync:function(o,s){let a=i.readFileSync(o,s);return new r(a,!0)}};e.exports=n;}),m8=re((t,e)=>{var r=G0(),i=me("fs"),n=class extends r{constructor(o,s){let a=i.readFileSync(o,"utf8");super(a,s),this.fileName=o;}};e.exports=n;}),_8=re((t,e)=>{var{Token:r}=Ut(),i=lh(),{Interval:n}=Cr(),o=class{},s=class extends o{constructor(a){super(),this.tokenSource=a,this.tokens=[],this.index=-1,this.fetchedEOF=!1;}mark(){return 0}release(a){}reset(){this.seek(0);}seek(a){this.lazyInit(),this.index=this.adjustSeekIndex(a);}get(a){return this.lazyInit(),this.tokens[a]}consume(){let a=!1;if(this.index>=0?this.fetchedEOF?a=this.index<this.tokens.length-1:a=this.index<this.tokens.length:a=!1,!a&&this.LA(1)===r.EOF)throw "cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1));}sync(a){let u=a-this.tokens.length+1;return u>0?this.fetch(u)>=u:!0}fetch(a){if(this.fetchedEOF)return 0;for(let u=0;u<a;u++){let l=this.tokenSource.nextToken();if(l.tokenIndex=this.tokens.length,this.tokens.push(l),l.type===r.EOF)return this.fetchedEOF=!0,u+1}return a}getTokens(a,u,l){if(l===void 0&&(l=null),a<0||u<0)return null;this.lazyInit();let h=[];u>=this.tokens.length&&(u=this.tokens.length-1);for(let c=a;c<u;c++){let p=this.tokens[c];if(p.type===r.EOF)break;(l===null||l.contains(p.type))&&h.push(p);}return h}LA(a){return this.LT(a).type}LB(a){return this.index-a<0?null:this.tokens[this.index-a]}LT(a){if(this.lazyInit(),a===0)return null;if(a<0)return this.LB(-a);let u=this.index+a-1;return this.sync(u),u>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[u]}adjustSeekIndex(a){return a}lazyInit(){this.index===-1&&this.setup();}setup(){this.sync(0),this.index=this.adjustSeekIndex(0);}setTokenSource(a){this.tokenSource=a,this.tokens=[],this.index=-1,this.fetchedEOF=!1;}nextTokenOnChannel(a,u){if(this.sync(a),a>=this.tokens.length)return -1;let l=this.tokens[a];for(;l.channel!==this.channel;){if(l.type===r.EOF)return -1;a+=1,this.sync(a),l=this.tokens[a];}return a}previousTokenOnChannel(a,u){for(;a>=0&&this.tokens[a].channel!==u;)a-=1;return a}getHiddenTokensToRight(a,u){if(u===void 0&&(u=-1),this.lazyInit(),a<0||a>=this.tokens.length)throw ""+a+" not in 0.."+this.tokens.length-1;let l=this.nextTokenOnChannel(a+1,i.DEFAULT_TOKEN_CHANNEL),h=a+1,c=l===-1?this.tokens.length-1:l;return this.filterForChannel(h,c,u)}getHiddenTokensToLeft(a,u){if(u===void 0&&(u=-1),this.lazyInit(),a<0||a>=this.tokens.length)throw ""+a+" not in 0.."+this.tokens.length-1;let l=this.previousTokenOnChannel(a-1,i.DEFAULT_TOKEN_CHANNEL);if(l===a-1)return null;let h=l+1,c=a-1;return this.filterForChannel(h,c,u)}filterForChannel(a,u,l){let h=[];for(let c=a;c<u+1;c++){let p=this.tokens[c];l===-1?p.channel!==i.DEFAULT_TOKEN_CHANNEL&&h.push(p):p.channel===l&&h.push(p);}return h.length===0?null:h}getSourceName(){return this.tokenSource.getSourceName()}getText(a){this.lazyInit(),this.fill(),a==null&&(a=new n(0,this.tokens.length-1));let u=a.start;u instanceof r&&(u=u.tokenIndex);let l=a.stop;if(l instanceof r&&(l=l.tokenIndex),u===null||l===null||u<0||l<0)return "";l>=this.tokens.length&&(l=this.tokens.length-1);let h="";for(let c=u;c<l+1;c++){let p=this.tokens[c];if(p.type===r.EOF)break;h=h+p.text;}return h}fill(){for(this.lazyInit();this.fetch(1e3)===1e3;);}};e.exports=s;}),g8=re((t,e)=>{var r=Ut().Token,i=_8(),n=class extends i{constructor(o,s){super(o),this.channel=s===void 0?r.DEFAULT_CHANNEL:s;}adjustSeekIndex(o){return this.nextTokenOnChannel(o,this.channel)}LB(o){if(o===0||this.index-o<0)return null;let s=this.index,a=1;for(;a<=o;)s=this.previousTokenOnChannel(s-1,this.channel),a+=1;return s<0?null:this.tokens[s]}LT(o){if(this.lazyInit(),o===0)return null;if(o<0)return this.LB(-o);let s=this.index,a=1;for(;a<o;)this.sync(s+1)&&(s=this.nextTokenOnChannel(s+1,this.channel)),a+=1;return this.tokens[s]}getNumberOfOnChannelTokens(){let o=0;this.fill();for(let s=0;s<this.tokens.length;s++){let a=this.tokens[s];if(a.channel===this.channel&&(o+=1),a.type===r.EOF)break}return o}};e.exports=n;}),y8=re((t,e)=>{var{Token:r}=Ut(),{ParseTreeListener:i,TerminalNode:n,ErrorNode:o}=Qs(),s=qv(),{DefaultErrorStrategy:a}=l0(),u=Bv(),l=kv(),h=lh(),c=class extends i{constructor(f){super(),this.parser=f;}enterEveryRule(f){console.log("enter "+this.parser.ruleNames[f.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text);}visitTerminal(f){console.log("consume "+f.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex]);}exitEveryRule(f){console.log("exit "+this.parser.ruleNames[f.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text);}},p=class extends s{constructor(f){super(),this._input=null,this._errHandler=new a,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(f);}reset(){this._input!==null&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),this._interp!==null&&this._interp.reset();}match(f){let m=this.getCurrentToken();return m.type===f?(this._errHandler.reportMatch(this),this.consume()):(m=this._errHandler.recoverInline(this),this.buildParseTrees&&m.tokenIndex===-1&&this._ctx.addErrorNode(m)),m}matchWildcard(){let f=this.getCurrentToken();return f.type>0?(this._errHandler.reportMatch(this),this.consume()):(f=this._errHandler.recoverInline(this),this._buildParseTrees&&f.tokenIndex===-1&&this._ctx.addErrorNode(f)),f}getParseListeners(){return this._parseListeners||[]}addParseListener(f){if(f===null)throw "listener";this._parseListeners===null&&(this._parseListeners=[]),this._parseListeners.push(f);}removeParseListener(f){if(this._parseListeners!==null){let m=this._parseListeners.indexOf(f);m>=0&&this._parseListeners.splice(m,1),this._parseListeners.length===0&&(this._parseListeners=null);}}removeParseListeners(){this._parseListeners=null;}triggerEnterRuleEvent(){if(this._parseListeners!==null){let f=this._ctx;this._parseListeners.map(function(m){m.enterEveryRule(f),f.enterRule(m);});}}triggerExitRuleEvent(){if(this._parseListeners!==null){let f=this._ctx;this._parseListeners.slice(0).reverse().map(function(m){f.exitRule(m),m.exitEveryRule(f);});}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(f){this._input.tokenSource._factory=f;}getATNWithBypassAlts(){let f=this.getSerializedATN();if(f===null)throw "The current parser does not support an ATN with bypass alternatives.";let m=this.bypassAltsAtnCache[f];if(m===null){let _=new l;_.generateRuleBypassTransitions=!0,m=new u(_).deserialize(f),this.bypassAltsAtnCache[f]=m;}return m}compileParseTreePattern(f,m,_){if(_=_||null,_===null&&this.getTokenStream()!==null){let v=this.getTokenStream().tokenSource;v instanceof h&&(_=v);}if(_===null)throw "Parser can't discover a lexer to use";return new ParseTreePatternMatcher(_,this).compile(f,m)}getInputStream(){return this.getTokenStream()}setInputStream(f){this.setTokenStream(f);}getTokenStream(){return this._input}setTokenStream(f){this._input=null,this.reset(),this._input=f;}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(f,m,_){m=m||null,_=_||null,m===null&&(m=this.getCurrentToken()),this._syntaxErrors+=1;let x=m.line,v=m.column;this.getErrorListenerDispatch().syntaxError(this,m,x,v,f,_);}consume(){let f=this.getCurrentToken();f.type!==r.EOF&&this.getInputStream().consume();let m=this._parseListeners!==null&&this._parseListeners.length>0;if(this.buildParseTrees||m){let _;this._errHandler.inErrorRecoveryMode(this)?_=this._ctx.addErrorNode(f):_=this._ctx.addTokenNode(f),_.invokingState=this.state,m&&this._parseListeners.map(function(x){_ instanceof o||_.isErrorNode!==void 0&&_.isErrorNode()?x.visitErrorNode(_):_ instanceof n&&x.visitTerminal(_);});}return f}addContextToParseTree(){this._ctx.parentCtx!==null&&this._ctx.parentCtx.addChild(this._ctx);}enterRule(f,m,_){this.state=m,this._ctx=f,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this._parseListeners!==null&&this.triggerEnterRuleEvent();}exitRule(){this._ctx.stop=this._input.LT(-1),this._parseListeners!==null&&this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx;}enterOuterAlt(f,m){f.setAltNumber(m),this.buildParseTrees&&this._ctx!==f&&this._ctx.parentCtx!==null&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(f)),this._ctx=f;}getPrecedence(){return this._precedenceStack.length===0?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(f,m,_,x){this.state=m,this._precedenceStack.push(x),this._ctx=f,this._ctx.start=this._input.LT(1),this._parseListeners!==null&&this.triggerEnterRuleEvent();}pushNewRecursionContext(f,m,_){let x=this._ctx;x.parentCtx=f,x.invokingState=m,x.stop=this._input.LT(-1),this._ctx=f,this._ctx.start=x.start,this.buildParseTrees&&this._ctx.addChild(x),this._parseListeners!==null&&this.triggerEnterRuleEvent();}unrollRecursionContexts(f){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);let m=this._ctx;if(this._parseListeners!==null)for(;this._ctx!==f;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=f;m.parentCtx=f,this.buildParseTrees&&f!==null&&f.addChild(m);}getInvokingContext(f){let m=this._ctx;for(;m!==null;){if(m.ruleIndex===f)return m;m=m.parentCtx;}return null}precpred(f,m){return m>=this._precedenceStack[this._precedenceStack.length-1]}inContext(f){return !1}isExpectedToken(f){let m=this._interp.atn,_=this._ctx,x=m.states[this.state],v=m.nextTokens(x);if(v.contains(f))return !0;if(!v.contains(r.EPSILON))return !1;for(;_!==null&&_.invokingState>=0&&v.contains(r.EPSILON);){let b=m.states[_.invokingState].transitions[0];if(v=m.nextTokens(b.followState),v.contains(f))return !0;_=_.parentCtx;}return !!(v.contains(r.EPSILON)&&f===r.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){let f=this._interp.atn,m=f.states[this.state];return f.nextTokens(m)}getRuleIndex(f){let m=this.getRuleIndexMap()[f];return m!==null?m:-1}getRuleInvocationStack(f){f=f||null,f===null&&(f=this._ctx);let m=[];for(;f!==null;){let _=f.ruleIndex;_<0?m.push("n/a"):m.push(this.ruleNames[_]),f=f.parentCtx;}return m}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let f=!1;for(let m=0;m<this._interp.decisionToDFA.length;m++){let _=this._interp.decisionToDFA[m];_.states.length>0&&(f&&console.log(),this.printer.println("Decision "+_.decision+":"),this.printer.print(_.toString(this.literalNames,this.symbolicNames)),f=!0);}}getSourceName(){return this._input.sourceName}setTrace(f){f?(this._tracer!==null&&this.removeParseListener(this._tracer),this._tracer=new c(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null);}};p.bypassAltsAtnCache={},e.exports=p;}),x8=re(t=>{t.atn=u8(),t.codepointat=Vv(),t.dfa=h8(),t.fromcodepoint=$v(),t.tree=c8(),t.error=d8(),t.Token=Ut().Token,t.CharStreams=p8(),t.CommonToken=Ut().CommonToken,t.InputStream=G0(),t.FileStream=m8(),t.CommonTokenStream=g8(),t.Lexer=lh(),t.Parser=y8();var e=Yi();t.PredictionContextCache=e.PredictionContextCache,t.ParserRuleContext=Uv(),t.Interval=Cr().Interval,t.IntervalSet=Cr().IntervalSet,t.Utils=mr(),t.LL1Analyzer=Iv().LL1Analyzer;}),v8=re((t,e)=>{e.exports="./Solidity-LWZUP6Z4.tokens";}),E8=re((t,e)=>{typeof BROWSER!="undefined"?e.exports=v8():e.exports=me("fs").readFileSync(me("path").join(__dirname,"./antlr/Solidity.tokens")).toString();});sv(sp);BL(sp,{ParserError:()=>qE,parse:()=>Z8,tokenize:()=>Y8,visit:()=>N0});var h0=Mt(t8()),b8=Mt(oh()),T8=Mt(on()),C8=Mt(ih()),A8=Mt(sn()),zv=Mt(Qr()),er=class extends T8.Lexer{get vocabulary(){return er.VOCABULARY}constructor(t){super(t),this._interp=new C8.LexerATNSimulator(er._ATN,this);}get grammarFileName(){return "Solidity.g4"}get ruleNames(){return er.ruleNames}get serializedATN(){return er._serializedATN}get channelNames(){return er.channelNames}get modeNames(){return er.modeNames}static get _ATN(){return er.__ATN||(er.__ATN=new b8.ATNDeserializer().deserialize(zv.toCharArray(er._serializedATN))),er.__ATN}},ue=er;ue.T__0=1;ue.T__1=2;ue.T__2=3;ue.T__3=4;ue.T__4=5;ue.T__5=6;ue.T__6=7;ue.T__7=8;ue.T__8=9;ue.T__9=10;ue.T__10=11;ue.T__11=12;ue.T__12=13;ue.T__13=14;ue.T__14=15;ue.T__15=16;ue.T__16=17;ue.T__17=18;ue.T__18=19;ue.T__19=20;ue.T__20=21;ue.T__21=22;ue.T__22=23;ue.T__23=24;ue.T__24=25;ue.T__25=26;ue.T__26=27;ue.T__27=28;ue.T__28=29;ue.T__29=30;ue.T__30=31;ue.T__31=32;ue.T__32=33;ue.T__33=34;ue.T__34=35;ue.T__35=36;ue.T__36=37;ue.T__37=38;ue.T__38=39;ue.T__39=40;ue.T__40=41;ue.T__41=42;ue.T__42=43;ue.T__43=44;ue.T__44=45;ue.T__45=46;ue.T__46=47;ue.T__47=48;ue.T__48=49;ue.T__49=50;ue.T__50=51;ue.T__51=52;ue.T__52=53;ue.T__53=54;ue.T__54=55;ue.T__55=56;ue.T__56=57;ue.T__57=58;ue.T__58=59;ue.T__59=60;ue.T__60=61;ue.T__61=62;ue.T__62=63;ue.T__63=64;ue.T__64=65;ue.T__65=66;ue.T__66=67;ue.T__67=68;ue.T__68=69;ue.T__69=70;ue.T__70=71;ue.T__71=72;ue.T__72=73;ue.T__73=74;ue.T__74=75;ue.T__75=76;ue.T__76=77;ue.T__77=78;ue.T__78=79;ue.T__79=80;ue.T__80=81;ue.T__81=82;ue.T__82=83;ue.T__83=84;ue.T__84=85;ue.T__85=86;ue.T__86=87;ue.T__87=88;ue.T__88=89;ue.T__89=90;ue.T__90=91;ue.T__91=92;ue.T__92=93;ue.T__93=94;ue.T__94=95;ue.T__95=96;ue.Int=97;ue.Uint=98;ue.Byte=99;ue.Fixed=100;ue.Ufixed=101;ue.BooleanLiteral=102;ue.DecimalNumber=103;ue.HexNumber=104;ue.NumberUnit=105;ue.HexLiteralFragment=106;ue.ReservedKeyword=107;ue.AnonymousKeyword=108;ue.BreakKeyword=109;ue.ConstantKeyword=110;ue.ImmutableKeyword=111;ue.ContinueKeyword=112;ue.LeaveKeyword=113;ue.ExternalKeyword=114;ue.IndexedKeyword=115;ue.InternalKeyword=116;ue.PayableKeyword=117;ue.PrivateKeyword=118;ue.PublicKeyword=119;ue.VirtualKeyword=120;ue.PureKeyword=121;ue.TypeKeyword=122;ue.ViewKeyword=123;ue.GlobalKeyword=124;ue.ConstructorKeyword=125;ue.FallbackKeyword=126;ue.ReceiveKeyword=127;ue.Identifier=128;ue.StringLiteralFragment=129;ue.VersionLiteral=130;ue.WS=131;ue.COMMENT=132;ue.LINE_COMMENT=133;ue.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];ue.modeNames=["DEFAULT_MODE"];ue.ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","T__29","T__30","T__31","T__32","T__33","T__34","T__35","T__36","T__37","T__38","T__39","T__40","T__41","T__42","T__43","T__44","T__45","T__46","T__47","T__48","T__49","T__50","T__51","T__52","T__53","T__54","T__55","T__56","T__57","T__58","T__59","T__60","T__61","T__62","T__63","T__64","T__65","T__66","T__67","T__68","T__69","T__70","T__71","T__72","T__73","T__74","T__75","T__76","T__77","T__78","T__79","T__80","T__81","T__82","T__83","T__84","T__85","T__86","T__87","T__88","T__89","T__90","T__91","T__92","T__93","T__94","T__95","Int","Uint","Byte","Fixed","Ufixed","NumberOfBits","NumberOfBytes","BooleanLiteral","DecimalNumber","DecimalDigits","HexNumber","HexDigits","NumberUnit","HexLiteralFragment","HexCharacter","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","IdentifierStart","IdentifierPart","StringLiteralFragment","DoubleQuotedStringCharacter","SingleQuotedStringCharacter","VersionLiteral","WS","COMMENT","LINE_COMMENT"];ue._LITERAL_NAMES=[void 0,"'pragma'","';'","'*'","'||'","'^'","'~'","'>='","'>'","'<'","'<='","'='","'as'","'import'","'from'","'{'","','","'}'","'abstract'","'contract'","'interface'","'library'","'is'","'('","')'","'error'","'using'","'for'","'|'","'&'","'+'","'-'","'/'","'%'","'=='","'!='","'struct'","'modifier'","'function'","'returns'","'event'","'enum'","'['","']'","'address'","'.'","'mapping'","'=>'","'memory'","'storage'","'calldata'","'if'","'else'","'try'","'catch'","'while'","'unchecked'","'assembly'","'do'","'return'","'throw'","'emit'","'revert'","'var'","'bool'","'string'","'byte'","'++'","'--'","'new'","':'","'delete'","'!'","'**'","'<<'","'>>'","'&&'","'?'","'|='","'^='","'&='","'<<='","'>>='","'+='","'-='","'*='","'/='","'%='","'let'","':='","'=:'","'switch'","'case'","'default'","'->'","'callback'","'override'",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"'anonymous'","'break'","'constant'","'immutable'","'continue'","'leave'","'external'","'indexed'","'internal'","'payable'","'private'","'public'","'virtual'","'pure'","'type'","'view'","'global'","'constructor'","'fallback'","'receive'"];ue._SYMBOLIC_NAMES=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"Int","Uint","Byte","Fixed","Ufixed","BooleanLiteral","DecimalNumber","HexNumber","NumberUnit","HexLiteralFragment","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","StringLiteralFragment","VersionLiteral","WS","COMMENT","LINE_COMMENT"];ue.VOCABULARY=new A8.VocabularyImpl(er._LITERAL_NAMES,er._SYMBOLIC_NAMES,[]);ue._serializedATNSegments=3;ue._serializedATNSegment0=`\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x87\u053A\b \x07 \x07\b \b
|
|
89
|
+
|
|
90
|
+
\v \v\f \f\r \r \x1B \x1B ! !" "# #$ $% %& &' '( () )* *+ +, ,- -. ./ /0 01 12 23 34 45 56 67 78 89 9: :; ;< <= => >? ?@ @A AB BC CD DE EF FG GH HI IJ JK KL LM MN NO OP PQ QR RS ST TU UV VW WX XY YZ Z[ [\\ \\] ]^ ^_ _\` \`a ab bc cd de ef fg gh hi ij jk kl lm mn no op pq qr rs st tu uv vw wx xy yz z{ {| |} }~ ~\x7F \x7F\x80 \x80\x81 \x81\x82 \x82\x83 \x83\x84 \x84\x85 \x85\x86 \x86\x87 \x87\x88 \x88\x89 \x89\x8A \x8A\x8B \x8B\x8C \x8C\x8D \x8D\x8E \x8E\x8F \x8F\x07\x07\b\b\b
|
|
91
|
+
|
|
92
|
+
\v\v\v\f\f\r\r\r\x1B\x1B\x1B\x1B\x1B\x1B !!""###$$$%%%%%%%&&&&&&&&&'''''''''(((((((())))))*****++,,--------..////////0001111111222222223333333334445555566667777778888889999999999:::::::::;;;<<<<<<<======>>>>>???????@@@@AAAAABBBBBBBCCCCCDDDEEEFFFFGGHHHHHHHIIJJJKKKLLLMMMNNOOOPPPQQQRRRRSSSSTTTUUUVVVWWWXXXYYYYZZZ[[[\\\\\\\\\\\\\\]]]]]^^^^^^^^___\`\`\`\`\`\`\`\`\`aaaaaaaaabbbbbb\u02D4
|
|
93
|
+
bccccccc\u02DC
|
|
94
|
+
cdddddddd\u02E5
|
|
95
|
+
deeeeeeeeee\u02F0
|
|
96
|
+
e\ree\u02F1e\u02F4
|
|
97
|
+
efffffffffff\u0300
|
|
98
|
+
f\rff\u0301f\u0304
|
|
99
|
+
fgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg\u0359
|
|
100
|
+
ghhhhhh\u0360
|
|
101
|
+
hiiiiiiiiii\u036B
|
|
102
|
+
ijjj\u036F
|
|
103
|
+
jjjj\u0373
|
|
104
|
+
jjjj\u0377
|
|
105
|
+
jjj\u037A
|
|
106
|
+
jkkk\u037E
|
|
107
|
+
kk\x07k\u0381
|
|
108
|
+
k\fkk\u0384\vkllllmmm\u038C
|
|
109
|
+
mm\x07m\u038F
|
|
110
|
+
m\fmm\u0392\vmnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\u03CC
|
|
111
|
+
nooooooo\u03D4
|
|
112
|
+
ooooo\u03D9
|
|
113
|
+
ooo\u03DC
|
|
114
|
+
oppqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\u0438
|
|
115
|
+
qrrrrrrrrrrsssssstttttttttuuuuuuuuuuvvvvvvvvvwwwwwwxxxxxxxxxyyyyyyyyzzzzzzzzz{{{{{{{{||||||||}}}}}}}~~~~~~~~\x7F\x7F\x7F\x7F\x7F\x80\x80\x80\x80\x80\x81\x81\x81\x81\x81\x82\x82\x82\x82\x82\x82\x82\x83\x83\x83\x83\x83\x83\x83\x83\x83\x83\x83\x83\x84\x84\x84\x84\x84\x84\x84\x84\x84\x85\x85\x85\x85\x85\x85\x85\x85\x86\x86\x07\x86\u04DA
|
|
116
|
+
\x86\f\x86\x86\u04DD\v\x86\x87\x87\x88\x88\x89\x89\x89\x89\x89\x89\x89\x89\u04EA
|
|
117
|
+
\x89\x89\x89\x07\x89\u04EE
|
|
118
|
+
\x89\f\x89\x89\u04F1\v\x89\x89\x89\x89\x07\x89\u04F6
|
|
119
|
+
\x89\f\x89\x89\u04F9\v\x89\x89\x89\u04FC
|
|
120
|
+
\x89\x8A\x8A\x8A\x8A\u0501
|
|
121
|
+
\x8A\x8B\x8B\x8B\x8B\u0506
|
|
122
|
+
\x8B\x8C\x8C\u0509
|
|
123
|
+
\x8C\r\x8C\x8C\u050A\x8C\x8C\x8C\u050F
|
|
124
|
+
\x8C\r\x8C\x8C\u0510\x8C\x8C\x8C\u0515
|
|
125
|
+
\x8C\r\x8C\x8C\u0516\x8C\u0519
|
|
126
|
+
\x8C\x8D\x8D\u051C
|
|
127
|
+
\x8D\r\x8D\x8D\u051D\x8D\x8D\x8E\x8E\x8E\x8E\x07\x8E\u0526
|
|
128
|
+
\x8E\f\x8E\x8E\u0529\v\x8E\x8E\x8E\x8E\x8E\x8E\x8F\x8F\x8F\x8F\x07\x8F\u0534
|
|
129
|
+
\x8F\f\x8F\x8F\u0537\v\x8F\x8F\x8F\u0527\x90\x07 \v\x07\r\b
|
|
130
|
+
\v\f\r\x1B!#%')+-/13\x1B579;= ?!A"C#E$G%I&K'M(O)Q*S+U,W-Y.[/]0_1a2c3e4g5i6k7m8o9q:s;u<w=y>{?}@\x7FA\x81B\x83C\x85D\x87E\x89F\x8BG\x8DH\x8FI\x91J\x93K\x95L\x97M\x99N\x9BO\x9DP\x9FQ\xA1R\xA3S\xA5T\xA7U\xA9V\xABW\xADX\xAFY\xB1Z\xB3[\xB5\\\xB7]\xB9^\xBB_\xBD\`\xBFa\xC1b\xC3c\xC5d\xC7e\xC9f\xCBg\xCD\xCF\xD1h\xD3i\xD5\xD7j\xD9\xDBk\xDDl\xDF\xE1m\xE3n\xE5o\xE7p\xE9q\xEBr\xEDs\xEFt\xF1u\xF3v\xF5w\xF7x\xF9y\xFBz\xFD{\xFF|\u0101}\u0103~\u0105\x7F\u0107\x80\u0109\x81\u010B\x82\u010D\u010F\u0111\x83\u0113\u0115\u0117\x84\u0119\x85\u011B\x86\u011D\x872;3;3424GGggZZzz2;CHch&&C\\aac|\x07&&2;C\\aac|\f\f$$^^\f\f))^^\v\f""\f\f\u058C\x07 \v\r\x1B!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}\x7F\x81\x83\x85\x87\x89\x8B\x8D\x8F\x91\x93\x95\x97\x99\x9B\x9D\x9F\xA1\xA3\xA5\xA7\xA9\xAB\xAD\xAF\xB1\xB3\xB5\xB7\xB9\xBB\xBD\xBF\xC1\xC3\xC5\xC7\xC9\xCB\xD1\xD3\xD7\xDB\xDD\xE1\xE3\xE5\xE7\xE9\xEB\xED\xEF\xF1\xF3\xF5\xF7\xF9\xFB\xFD\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u0111\u0117\u0119\u011B\u011D\u011F\u0126\x07\u0128 \u012A\v\u012D\r\u012F\u0131\u0134\u0136\u0138\u013B\u013D\x1B\u0140\u0147\u014C!\u014E#\u0150%\u0152'\u015B)\u0164+\u016E-\u0176/\u01791\u017B3\u017D5\u01837\u01899\u018D;\u018F=\u0191?\u0193A\u0195C\u0197E\u0199G\u019CI\u019FK\u01A6M\u01AFO\u01B8Q\u01C0S\u01C6U\u01CBW\u01CDY\u01CF[\u01D7]\u01D9_\u01E1a\u01E4c\u01EBe\u01F3g\u01FCi\u01FFk\u0204m\u0208o\u020Eq\u0214s\u021Eu\u0227w\u022Ay\u0231{\u0237}\u023C\x7F\u0243\x81\u0247\x83\u024C\x85\u0253\x87\u0258\x89\u025B\x8B\u025E\x8D\u0262\x8F\u0264\x91\u026B\x93\u026D\x95\u0270\x97\u0273\x99\u0276\x9B\u0279\x9D\u027B\x9F\u027E\xA1\u0281\xA3\u0284\xA5\u0288\xA7\u028C\xA9\u028F\xAB\u0292\xAD\u0295\xAF\u0298\xB1\u029B\xB3\u029F\xB5\u02A2\xB7\u02A5\xB9\u02AC\xBB\u02B1\xBD\u02B9\xBF\u02BC\xC1\u02C5\xC3\u02CE\xC5\u02D5\xC7\u02DD\xC9\u02E6\xCB\u02F5\xCD\u0358\xCF\u035F\xD1\u036A\xD3\u0372\xD5\u037B\xD7\u0385\xD9\u0389\xDB\u03CB\xDD\u03CD\xDF\u03DD\xE1\u0437\xE3\u0439\xE5\u0443\xE7\u0449\xE9\u0452\xEB\u045C\xED\u0465\xEF\u046B\xF1\u0474\xF3\u047C\xF5\u0485\xF7\u048D\xF9\u0495\xFB\u049C\xFD\u04A4\xFF\u04A9\u0101\u04AE\u0103\u04B3\u0105\u04BA\u0107\u04C6\u0109\u04CF\u010B\u04D7\u010D\u04DE\u010F\u04E0\u0111\u04E9\u0113\u0500\u0115\u0505\u0117\u0508\u0119\u051B\u011B\u0521\u011D\u052F\u011F\u0120\x07r\u0120\u0121\x07t\u0121\u0122\x07c\u0122\u0123\x07i\u0123\u0124\x07o\u0124\u0125\x07c\u0125\u0126\u0127\x07=\u0127\u0128\u0129\x07,\u0129\b\u012A\u012B\x07~\u012B\u012C\x07~\u012C
|
|
131
|
+
\u012D\u012E\x07\``;ue._serializedATNSegment1="\u012E\f\u012F\u0130\x07\x80\u0130\u0131\u0132\x07@\u0132\u0133\x07?\u0133\u0134\u0135\x07@\u0135\u0136\u0137\x07>\u0137\u0138\u0139\x07>\u0139\u013A\x07?\u013A\u013B\u013C\x07?\u013C\u013D\u013E\x07c\u013E\u013F\x07u\u013F\u0140\u0141\x07k\u0141\u0142\x07o\u0142\u0143\x07r\u0143\u0144\x07q\u0144\u0145\x07t\u0145\u0146\x07v\u0146\u0147\u0148\x07h\u0148\u0149\x07t\u0149\u014A\x07q\u014A\u014B\x07o\u014B\u014C\u014D\x07}\u014D \u014E\u014F\x07.\u014F\"\u0150\u0151\x07\x7F\u0151$\u0152\u0153\x07c\u0153\u0154\x07d\u0154\u0155\x07u\u0155\u0156\x07v\u0156\u0157\x07t\u0157\u0158\x07c\u0158\u0159\x07e\u0159\u015A\x07v\u015A&\u015B\u015C\x07e\u015C\u015D\x07q\u015D\u015E\x07p\u015E\u015F\x07v\u015F\u0160\x07t\u0160\u0161\x07c\u0161\u0162\x07e\u0162\u0163\x07v\u0163(\u0164\u0165\x07k\u0165\u0166\x07p\u0166\u0167\x07v\u0167\u0168\x07g\u0168\u0169\x07t\u0169\u016A\x07h\u016A\u016B\x07c\u016B\u016C\x07e\u016C\u016D\x07g\u016D*\u016E\u016F\x07n\u016F\u0170\x07k\u0170\u0171\x07d\u0171\u0172\x07t\u0172\u0173\x07c\u0173\u0174\x07t\u0174\u0175\x07{\u0175,\u0176\u0177\x07k\u0177\u0178\x07u\u0178.\u0179\u017A\x07*\u017A0\u017B\u017C\x07+\u017C2\u017D\u017E\x07g\u017E\u017F\x07t\u017F\u0180\x07t\u0180\u0181\x07q\u0181\u0182\x07t\u01824\u0183\u0184\x07w\u0184\u0185\x07u\u0185\u0186\x07k\u0186\u0187\x07p\u0187\u0188\x07i\u01886\u0189\u018A\x07h\u018A\u018B\x07q\u018B\u018C\x07t\u018C8\u018D\u018E\x07~\u018E:\u018F\u0190\x07(\u0190<\u0191\u0192\x07-\u0192>\u0193\u0194\x07/\u0194@\u0195\u0196\x071\u0196B\u0197\u0198\x07'\u0198D\u0199\u019A\x07?\u019A\u019B\x07?\u019BF\u019C\u019D\x07#\u019D\u019E\x07?\u019EH\u019F\u01A0\x07u\u01A0\u01A1\x07v\u01A1\u01A2\x07t\u01A2\u01A3\x07w\u01A3\u01A4\x07e\u01A4\u01A5\x07v\u01A5J\u01A6\u01A7\x07o\u01A7\u01A8\x07q\u01A8\u01A9\x07f\u01A9\u01AA\x07k\u01AA\u01AB\x07h\u01AB\u01AC\x07k\u01AC\u01AD\x07g\u01AD\u01AE\x07t\u01AEL\u01AF\u01B0\x07h\u01B0\u01B1\x07w\u01B1\u01B2\x07p\u01B2\u01B3\x07e\u01B3\u01B4\x07v\u01B4\u01B5\x07k\u01B5\u01B6\x07q\u01B6\u01B7\x07p\u01B7N\u01B8\u01B9\x07t\u01B9\u01BA\x07g\u01BA\u01BB\x07v\u01BB\u01BC\x07w\u01BC\u01BD\x07t\u01BD\u01BE\x07p\u01BE\u01BF\x07u\u01BFP\u01C0\u01C1\x07g\u01C1\u01C2\x07x\u01C2\u01C3\x07g\u01C3\u01C4\x07p\u01C4\u01C5\x07v\u01C5R\u01C6\u01C7\x07g\u01C7\u01C8\x07p\u01C8\u01C9\x07w\u01C9\u01CA\x07o\u01CAT\u01CB\u01CC\x07]\u01CCV\u01CD\u01CE\x07_\u01CEX\u01CF\u01D0\x07c\u01D0\u01D1\x07f\u01D1\u01D2\x07f\u01D2\u01D3\x07t\u01D3\u01D4\x07g\u01D4\u01D5\x07u\u01D5\u01D6\x07u\u01D6Z\u01D7\u01D8\x070\u01D8\\\u01D9\u01DA\x07o\u01DA\u01DB\x07c\u01DB\u01DC\x07r\u01DC\u01DD\x07r\u01DD\u01DE\x07k\u01DE\u01DF\x07p\u01DF\u01E0\x07i\u01E0^\u01E1\u01E2\x07?\u01E2\u01E3\x07@\u01E3`\u01E4\u01E5\x07o\u01E5\u01E6\x07g\u01E6\u01E7\x07o\u01E7\u01E8\x07q\u01E8\u01E9\x07t\u01E9\u01EA\x07{\u01EAb\u01EB\u01EC\x07u\u01EC\u01ED\x07v\u01ED\u01EE\x07q\u01EE\u01EF\x07t\u01EF\u01F0\x07c\u01F0\u01F1\x07i\u01F1\u01F2\x07g\u01F2d\u01F3\u01F4\x07e\u01F4\u01F5\x07c\u01F5\u01F6\x07n\u01F6\u01F7\x07n\u01F7\u01F8\x07f\u01F8\u01F9\x07c\u01F9\u01FA\x07v\u01FA\u01FB\x07c\u01FBf\u01FC\u01FD\x07k\u01FD\u01FE\x07h\u01FEh\u01FF\u0200\x07g\u0200\u0201\x07n\u0201\u0202\x07u\u0202\u0203\x07g\u0203j\u0204\u0205\x07v\u0205\u0206\x07t\u0206\u0207\x07{\u0207l\u0208\u0209\x07e\u0209\u020A\x07c\u020A\u020B\x07v\u020B\u020C\x07e\u020C\u020D\x07j\u020Dn\u020E\u020F\x07y\u020F\u0210\x07j\u0210\u0211\x07k\u0211\u0212\x07n\u0212\u0213\x07g\u0213p\u0214\u0215\x07w\u0215\u0216\x07p\u0216\u0217\x07e\u0217\u0218\x07j\u0218\u0219\x07g\u0219\u021A\x07e\u021A\u021B\x07m\u021B\u021C\x07g\u021C\u021D\x07f\u021Dr\u021E\u021F\x07c\u021F\u0220\x07u\u0220\u0221\x07u\u0221\u0222\x07g\u0222\u0223\x07o\u0223\u0224\x07d\u0224\u0225\x07n\u0225\u0226\x07{\u0226t\u0227\u0228\x07f\u0228\u0229\x07q\u0229v\u022A\u022B\x07t\u022B\u022C\x07g\u022C\u022D\x07v\u022D\u022E\x07w\u022E\u022F\x07t\u022F\u0230\x07p\u0230x\u0231\u0232\x07v\u0232\u0233\x07j\u0233\u0234\x07t\u0234\u0235\x07q\u0235\u0236\x07y\u0236z\u0237\u0238\x07g\u0238\u0239\x07o\u0239\u023A\x07k\u023A\u023B\x07v\u023B|\u023C\u023D\x07t\u023D\u023E\x07g\u023E\u023F\x07x\u023F\u0240\x07g\u0240\u0241\x07t\u0241\u0242\x07v\u0242~\u0243\u0244\x07x\u0244\u0245\x07c\u0245\u0246\x07t\u0246\x80\u0247\u0248\x07d\u0248\u0249\x07q\u0249\u024A\x07q\u024A\u024B\x07n\u024B\x82\u024C\u024D\x07u\u024D\u024E\x07v\u024E\u024F\x07t\u024F\u0250\x07k\u0250\u0251\x07p\u0251\u0252\x07i\u0252\x84\u0253\u0254\x07d\u0254\u0255\x07{\u0255\u0256\x07v\u0256\u0257\x07g\u0257\x86\u0258\u0259\x07-\u0259\u025A\x07-\u025A\x88\u025B\u025C\x07/\u025C\u025D\x07/\u025D\x8A\u025E\u025F\x07p\u025F\u0260\x07g\u0260\u0261\x07y\u0261\x8C\u0262\u0263\x07<\u0263\x8E\u0264\u0265\x07f\u0265\u0266\x07g\u0266\u0267\x07n\u0267\u0268\x07g\u0268\u0269\x07v\u0269\u026A\x07g\u026A\x90\u026B\u026C\x07#\u026C\x92\u026D\u026E\x07,\u026E\u026F\x07,\u026F\x94\u0270\u0271\x07>\u0271\u0272\x07>\u0272\x96\u0273\u0274\x07@\u0274\u0275\x07@\u0275\x98\u0276\u0277\x07(\u0277\u0278\x07(\u0278\x9A\u0279\u027A\x07A\u027A\x9C\u027B\u027C\x07~\u027C\u027D\x07?\u027D\x9E\u027E\u027F\x07`\u027F\u0280\x07?\u0280\xA0\u0281\u0282\x07(\u0282\u0283\x07?\u0283\xA2\u0284\u0285\x07>\u0285\u0286\x07>\u0286\u0287\x07?\u0287\xA4\u0288\u0289\x07@\u0289\u028A\x07@\u028A\u028B\x07?\u028B\xA6\u028C\u028D\x07-\u028D\u028E\x07?\u028E\xA8\u028F\u0290\x07/\u0290\u0291\x07?\u0291\xAA\u0292\u0293\x07,\u0293\u0294\x07?\u0294\xAC\u0295\u0296\x071\u0296\u0297\x07?\u0297\xAE\u0298\u0299\x07'\u0299\u029A\x07?\u029A\xB0\u029B\u029C\x07n\u029C\u029D\x07g\u029D\u029E\x07v\u029E\xB2\u029F\u02A0\x07<\u02A0\u02A1\x07?\u02A1\xB4\u02A2\u02A3\x07?\u02A3\u02A4\x07<\u02A4\xB6\u02A5\u02A6\x07u\u02A6\u02A7\x07y\u02A7\u02A8\x07k\u02A8\u02A9\x07v\u02A9\u02AA\x07e\u02AA\u02AB\x07j\u02AB\xB8\u02AC\u02AD\x07e\u02AD\u02AE\x07c\u02AE\u02AF\x07u\u02AF\u02B0\x07g\u02B0\xBA\u02B1\u02B2\x07f\u02B2\u02B3\x07g\u02B3\u02B4\x07h\u02B4\u02B5\x07c\u02B5\u02B6\x07w\u02B6\u02B7\x07n\u02B7\u02B8\x07v\u02B8\xBC\u02B9\u02BA\x07/\u02BA\u02BB\x07@\u02BB\xBE\u02BC\u02BD\x07e\u02BD\u02BE\x07c\u02BE\u02BF\x07n\u02BF\u02C0\x07n\u02C0\u02C1\x07d\u02C1\u02C2\x07c\u02C2\u02C3\x07e\u02C3\u02C4\x07m\u02C4\xC0\u02C5\u02C6\x07q\u02C6\u02C7\x07x\u02C7\u02C8\x07g\u02C8\u02C9\x07t\u02C9\u02CA\x07t\u02CA\u02CB\x07k\u02CB\u02CC\x07f\u02CC\u02CD\x07g\u02CD\xC2\u02CE\u02CF\x07k\u02CF\u02D0\x07p\u02D0\u02D1\x07v\u02D1\u02D3\u02D2\u02D4\xCDg\u02D3\u02D2\u02D3\u02D4\u02D4\xC4\u02D5\u02D6\x07w\u02D6\u02D7\x07k\u02D7\u02D8\x07p\u02D8\u02D9\x07v\u02D9\u02DB\u02DA\u02DC\xCDg\u02DB\u02DA\u02DB\u02DC\u02DC\xC6\u02DD\u02DE\x07d\u02DE\u02DF\x07{\u02DF\u02E0\x07v\u02E0\u02E1\x07g\u02E1\u02E2\x07u\u02E2\u02E4\u02E3\u02E5\xCFh\u02E4\u02E3\u02E4\u02E5\u02E5\xC8\u02E6\u02E7\x07h\u02E7\u02E8\x07k\u02E8\u02E9\x07z\u02E9\u02EA\x07g\u02EA\u02EB\x07f\u02EB\u02F3\u02EC\u02ED\xCDg\u02ED\u02EF\x07z\u02EE\u02F0 \u02EF\u02EE\u02F0\u02F1\u02F1\u02EF\u02F1\u02F2\u02F2\u02F4\u02F3\u02EC\u02F3\u02F4\u02F4\xCA\u02F5\u02F6\x07w\u02F6\u02F7\x07h\u02F7\u02F8\x07k\u02F8\u02F9\x07z\u02F9\u02FA\x07g\u02FA\u02FB\x07f\u02FB\u0303\u02FC\u02FD\xCDg\u02FD\u02FF\x07z\u02FE\u0300 \u02FF\u02FE\u0300\u0301\u0301\u02FF\u0301\u0302\u0302\u0304\u0303\u02FC\u0303\u0304\u0304\xCC\u0305\u0359\x07:\u0306\u0307\x073\u0307\u0359\x078\u0308\u0309\x074\u0309\u0359\x076\u030A\u030B\x075\u030B\u0359\x074\u030C\u030D\x076\u030D\u0359\x072\u030E\u030F\x076\u030F\u0359\x07:\u0310\u0311\x077\u0311\u0359\x078\u0312\u0313\x078\u0313\u0359\x076\u0314\u0315\x079\u0315\u0359\x074\u0316\u0317\x07:\u0317\u0359\x072\u0318\u0319\x07:\u0319\u0359\x07:\u031A\u031B\x07;\u031B\u0359\x078\u031C\u031D\x073\u031D\u031E\x072\u031E\u0359\x076\u031F\u0320\x073\u0320\u0321\x073\u0321\u0359\x074\u0322\u0323\x073\u0323\u0324\x074\u0324\u0359\x072\u0325\u0326\x073\u0326\u0327\x074\u0327\u0359\x07:\u0328\u0329\x073\u0329\u032A\x075\u032A\u0359\x078\u032B\u032C\x073\u032C\u032D\x076\u032D\u0359\x076\u032E\u032F\x073\u032F\u0330\x077\u0330\u0359\x074\u0331\u0332\x073\u0332\u0333\x078\u0333\u0359\x072\u0334\u0335\x073\u0335\u0336\x078\u0336\u0359\x07:\u0337\u0338\x073\u0338\u0339\x079\u0339\u0359\x078\u033A\u033B\x073\u033B\u033C\x07:\u033C\u0359\x076\u033D\u033E\x073\u033E\u033F\x07;\u033F\u0359\x074\u0340\u0341\x074\u0341\u0342\x072\u0342\u0359\x072\u0343\u0344\x074\u0344\u0345\x072\u0345\u0359\x07:\u0346\u0347\x074\u0347\u0348\x073\u0348\u0359\x078\u0349\u034A\x074\u034A\u034B\x074\u034B\u0359\x076\u034C\u034D\x074\u034D\u034E\x075\u034E\u0359\x074\u034F\u0350\x074\u0350\u0351\x076\u0351\u0359\x072\u0352\u0353\x074\u0353\u0354\x076\u0354\u0359\x07:\u0355\u0356\x074\u0356\u0357\x077\u0357\u0359\x078\u0358\u0305\u0358\u0306\u0358\u0308\u0358\u030A\u0358\u030C\u0358\u030E\u0358\u0310\u0358\u0312\u0358\u0314\u0358\u0316\u0358\u0318\u0358\u031A\u0358\u031C\u0358\u031F\u0358\u0322\u0358\u0325\u0358\u0328\u0358\u032B\u0358\u032E\u0358\u0331\u0358\u0334\u0358\u0337\u0358\u033A\u0358\u033D\u0358\u0340\u0358\u0343\u0358\u0346\u0358\u0349\u0358\u034C\u0358\u034F\u0358\u0352\u0358\u0355\u0359\xCE\u035A\u0360 \u035B\u035C \u035C\u0360 \u035D\u035E\x075\u035E\u0360 \u035F\u035A\u035F\u035B\u035F\u035D\u0360\xD0\u0361\u0362\x07v\u0362\u0363\x07t\u0363\u0364\x07w\u0364\u036B\x07g\u0365\u0366\x07h\u0366\u0367\x07c\u0367\u0368\x07n\u0368\u0369\x07u\u0369\u036B\x07g\u036A\u0361\u036A\u0365\u036B\xD2\u036C\u0373\xD5k\u036D\u036F\xD5k\u036E\u036D\u036E\u036F\u036F\u0370\u0370\u0371\x070\u0371\u0373\xD5k\u0372\u036C\u0372\u036E\u0373\u0379\u0374\u0376 \u0375\u0377\x07/\u0376\u0375\u0376\u0377\u0377\u0378\u0378\u037A\xD5k\u0379\u0374\u0379\u037A\u037A\xD4\u037B\u0382 \u037C\u037E\x07a\u037D\u037C\u037D\u037E\u037E\u037F\u037F\u0381 \u0380\u037D\u0381\u0384\u0382\u0380\u0382\u0383\u0383\xD6\u0384\u0382\u0385\u0386\x072\u0386\u0387 \x07\u0387\u0388\xD9m\u0388\xD8\u0389\u0390\xDFp\u038A\u038C\x07a\u038B\u038A\u038B\u038C\u038C\u038D\u038D\u038F\xDFp\u038E\u038B\u038F\u0392\u0390\u038E\u0390\u0391\u0391\xDA\u0392\u0390\u0393\u0394\x07y\u0394\u0395\x07g\u0395\u03CC\x07k\u0396\u0397\x07i\u0397\u0398\x07y\u0398\u0399\x07g\u0399\u03CC\x07k\u039A\u039B\x07u\u039B\u039C\x07|\u039C\u039D\x07c\u039D\u039E\x07d\u039E\u03CC\x07q\u039F\u03A0\x07h\u03A0\u03A1\x07k\u03A1\u03A2\x07p\u03A2\u03A3\x07p\u03A3\u03A4\x07g\u03A4\u03CC\x07{\u03A5\u03A6\x07g\u03A6\u03A7\x07v\u03A7\u03A8\x07j\u03A8\u03A9\x07g\u03A9\u03CC\x07t\u03AA\u03AB\x07u\u03AB\u03AC\x07g\u03AC\u03AD\x07e\u03AD\u03AE\x07q\u03AE\u03AF\x07p\u03AF\u03B0\x07f\u03B0\u03CC\x07u\u03B1\u03B2\x07o\u03B2\u03B3\x07k\u03B3\u03B4\x07p\u03B4\u03B5\x07w\u03B5\u03B6\x07v\u03B6\u03B7\x07g\u03B7\u03CC\x07u\u03B8\u03B9\x07j\u03B9\u03BA\x07q\u03BA\u03BB\x07w\u03BB\u03BC\x07t\u03BC\u03CC\x07u\u03BD\u03BE\x07f\u03BE\u03BF\x07c\u03BF\u03C0\x07{\u03C0\u03CC\x07u\u03C1\u03C2\x07y\u03C2\u03C3\x07g\u03C3\u03C4\x07g\u03C4\u03C5\x07m\u03C5\u03CC\x07u\u03C6\u03C7\x07{\u03C7\u03C8\x07g\u03C8\u03C9\x07c\u03C9\u03CA\x07t\u03CA\u03CC\x07u\u03CB\u0393\u03CB\u0396\u03CB\u039A\u03CB\u039F\u03CB\u03A5\u03CB\u03AA\u03CB\u03B1\u03CB\u03B8\u03CB\u03BD\u03CB\u03C1\u03CB\u03C6\u03CC\xDC\u03CD\u03CE\x07j\u03CE\u03CF\x07g\u03CF\u03D0\x07z\u03D0\u03DB\u03D1\u03D3\x07$\u03D2\u03D4\xD9m\u03D3\u03D2\u03D3\u03D4\u03D4\u03D5\u03D5\u03DC\x07$\u03D6\u03D8\x07)\u03D7\u03D9\xD9m\u03D8\u03D7\u03D8\u03D9\u03D9\u03DA\u03DA\u03DC\x07)\u03DB\u03D1\u03DB\u03D6\u03DC\xDE\u03DD\u03DE \b\u03DE\xE0\u03DF\u03E0\x07c\u03E0\u03E1\x07d\u03E1\u03E2\x07u\u03E2\u03E3\x07v\u03E3\u03E4\x07t\u03E4\u03E5\x07c\u03E5\u03E6\x07e\u03E6\u0438\x07v\u03E7\u03E8\x07c\u03E8\u03E9\x07h\u03E9\u03EA\x07v\u03EA\u03EB\x07g\u03EB\u0438\x07t\u03EC\u03ED\x07e\u03ED\u03EE\x07c\u03EE\u03EF\x07u\u03EF\u0438\x07g\u03F0\u03F1\x07e\u03F1\u03F2\x07c\u03F2\u03F3\x07v\u03F3\u03F4\x07e\u03F4\u0438\x07j\u03F5\u03F6\x07f\u03F6\u03F7\x07g\u03F7\u03F8\x07h\u03F8\u03F9\x07c\u03F9\u03FA\x07w\u03FA\u03FB\x07n\u03FB\u0438\x07v\u03FC\u03FD\x07h\u03FD\u03FE\x07k\u03FE\u03FF\x07p\u03FF\u0400\x07c\u0400\u0438\x07n\u0401\u0402\x07k\u0402\u0438\x07p\u0403\u0404\x07k\u0404\u0405\x07p\u0405\u0406\x07n\u0406\u0407\x07k\u0407\u0408\x07p\u0408\u0438\x07g\u0409\u040A\x07n\u040A\u040B\x07g\u040B\u0438\x07v\u040C\u040D\x07o\u040D\u040E\x07c\u040E\u040F\x07v\u040F\u0410\x07e\u0410\u0438\x07j\u0411\u0412\x07p\u0412\u0413\x07w\u0413\u0414\x07n\u0414\u0438\x07n\u0415\u0416\x07q\u0416\u0438\x07h\u0417\u0418\x07t\u0418\u0419\x07g\u0419\u041A\x07n\u041A\u041B\x07q\u041B\u041C\x07e\u041C\u041D\x07c\u041D\u041E\x07v\u041E\u041F\x07c\u041F\u0420\x07d\u0420\u0421\x07n\u0421\u0438\x07g\u0422\u0423\x07u\u0423\u0424\x07v\u0424\u0425\x07c\u0425\u0426\x07v\u0426\u0427\x07k\u0427\u0438\x07e\u0428\u0429\x07u\u0429\u042A\x07y\u042A\u042B\x07k\u042B\u042C\x07v\u042C\u042D\x07e\u042D\u0438\x07j\u042E\u042F\x07v\u042F\u0430\x07t\u0430\u0438\x07{";ue._serializedATNSegment2=`\u0431\u0432\x07v\u0432\u0433\x07{\u0433\u0434\x07r\u0434\u0435\x07g\u0435\u0436\x07q\u0436\u0438\x07h\u0437\u03DF\u0437\u03E7\u0437\u03EC\u0437\u03F0\u0437\u03F5\u0437\u03FC\u0437\u0401\u0437\u0403\u0437\u0409\u0437\u040C\u0437\u0411\u0437\u0415\u0437\u0417\u0437\u0422\u0437\u0428\u0437\u042E\u0437\u0431\u0438\xE2\u0439\u043A\x07c\u043A\u043B\x07p\u043B\u043C\x07q\u043C\u043D\x07p\u043D\u043E\x07{\u043E\u043F\x07o\u043F\u0440\x07q\u0440\u0441\x07w\u0441\u0442\x07u\u0442\xE4\u0443\u0444\x07d\u0444\u0445\x07t\u0445\u0446\x07g\u0446\u0447\x07c\u0447\u0448\x07m\u0448\xE6\u0449\u044A\x07e\u044A\u044B\x07q\u044B\u044C\x07p\u044C\u044D\x07u\u044D\u044E\x07v\u044E\u044F\x07c\u044F\u0450\x07p\u0450\u0451\x07v\u0451\xE8\u0452\u0453\x07k\u0453\u0454\x07o\u0454\u0455\x07o\u0455\u0456\x07w\u0456\u0457\x07v\u0457\u0458\x07c\u0458\u0459\x07d\u0459\u045A\x07n\u045A\u045B\x07g\u045B\xEA\u045C\u045D\x07e\u045D\u045E\x07q\u045E\u045F\x07p\u045F\u0460\x07v\u0460\u0461\x07k\u0461\u0462\x07p\u0462\u0463\x07w\u0463\u0464\x07g\u0464\xEC\u0465\u0466\x07n\u0466\u0467\x07g\u0467\u0468\x07c\u0468\u0469\x07x\u0469\u046A\x07g\u046A\xEE\u046B\u046C\x07g\u046C\u046D\x07z\u046D\u046E\x07v\u046E\u046F\x07g\u046F\u0470\x07t\u0470\u0471\x07p\u0471\u0472\x07c\u0472\u0473\x07n\u0473\xF0\u0474\u0475\x07k\u0475\u0476\x07p\u0476\u0477\x07f\u0477\u0478\x07g\u0478\u0479\x07z\u0479\u047A\x07g\u047A\u047B\x07f\u047B\xF2\u047C\u047D\x07k\u047D\u047E\x07p\u047E\u047F\x07v\u047F\u0480\x07g\u0480\u0481\x07t\u0481\u0482\x07p\u0482\u0483\x07c\u0483\u0484\x07n\u0484\xF4\u0485\u0486\x07r\u0486\u0487\x07c\u0487\u0488\x07{\u0488\u0489\x07c\u0489\u048A\x07d\u048A\u048B\x07n\u048B\u048C\x07g\u048C\xF6\u048D\u048E\x07r\u048E\u048F\x07t\u048F\u0490\x07k\u0490\u0491\x07x\u0491\u0492\x07c\u0492\u0493\x07v\u0493\u0494\x07g\u0494\xF8\u0495\u0496\x07r\u0496\u0497\x07w\u0497\u0498\x07d\u0498\u0499\x07n\u0499\u049A\x07k\u049A\u049B\x07e\u049B\xFA\u049C\u049D\x07x\u049D\u049E\x07k\u049E\u049F\x07t\u049F\u04A0\x07v\u04A0\u04A1\x07w\u04A1\u04A2\x07c\u04A2\u04A3\x07n\u04A3\xFC\u04A4\u04A5\x07r\u04A5\u04A6\x07w\u04A6\u04A7\x07t\u04A7\u04A8\x07g\u04A8\xFE\u04A9\u04AA\x07v\u04AA\u04AB\x07{\u04AB\u04AC\x07r\u04AC\u04AD\x07g\u04AD\u0100\u04AE\u04AF\x07x\u04AF\u04B0\x07k\u04B0\u04B1\x07g\u04B1\u04B2\x07y\u04B2\u0102\u04B3\u04B4\x07i\u04B4\u04B5\x07n\u04B5\u04B6\x07q\u04B6\u04B7\x07d\u04B7\u04B8\x07c\u04B8\u04B9\x07n\u04B9\u0104\u04BA\u04BB\x07e\u04BB\u04BC\x07q\u04BC\u04BD\x07p\u04BD\u04BE\x07u\u04BE\u04BF\x07v\u04BF\u04C0\x07t\u04C0\u04C1\x07w\u04C1\u04C2\x07e\u04C2\u04C3\x07v\u04C3\u04C4\x07q\u04C4\u04C5\x07t\u04C5\u0106\u04C6\u04C7\x07h\u04C7\u04C8\x07c\u04C8\u04C9\x07n\u04C9\u04CA\x07n\u04CA\u04CB\x07d\u04CB\u04CC\x07c\u04CC\u04CD\x07e\u04CD\u04CE\x07m\u04CE\u0108\u04CF\u04D0\x07t\u04D0\u04D1\x07g\u04D1\u04D2\x07e\u04D2\u04D3\x07g\u04D3\u04D4\x07k\u04D4\u04D5\x07x\u04D5\u04D6\x07g\u04D6\u010A\u04D7\u04DB\u010D\x87\u04D8\u04DA\u010F\x88\u04D9\u04D8\u04DA\u04DD\u04DB\u04D9\u04DB\u04DC\u04DC\u010C\u04DD\u04DB\u04DE\u04DF \u04DF\u010E\u04E0\u04E1
|
|
132
|
+
\u04E1\u0110\u04E2\u04E3\x07w\u04E3\u04E4\x07p\u04E4\u04E5\x07k\u04E5\u04E6\x07e\u04E6\u04E7\x07q\u04E7\u04E8\x07f\u04E8\u04EA\x07g\u04E9\u04E2\u04E9\u04EA\u04EA\u04FB\u04EB\u04EF\x07$\u04EC\u04EE\u0113\x8A\u04ED\u04EC\u04EE\u04F1\u04EF\u04ED\u04EF\u04F0\u04F0\u04F2\u04F1\u04EF\u04F2\u04FC\x07$\u04F3\u04F7\x07)\u04F4\u04F6\u0115\x8B\u04F5\u04F4\u04F6\u04F9\u04F7\u04F5\u04F7\u04F8\u04F8\u04FA\u04F9\u04F7\u04FA\u04FC\x07)\u04FB\u04EB\u04FB\u04F3\u04FC\u0112\u04FD\u0501
|
|
133
|
+
\v\u04FE\u04FF\x07^\u04FF\u0501\v\u0500\u04FD\u0500\u04FE\u0501\u0114\u0502\u0506
|
|
134
|
+
\f\u0503\u0504\x07^\u0504\u0506\v\u0505\u0502\u0505\u0503\u0506\u0116\u0507\u0509 \u0508\u0507\u0509\u050A\u050A\u0508\u050A\u050B\u050B\u050C\u050C\u050E\x070\u050D\u050F \u050E\u050D\u050F\u0510\u0510\u050E\u0510\u0511\u0511\u0518\u0512\u0514\x070\u0513\u0515 \u0514\u0513\u0515\u0516\u0516\u0514\u0516\u0517\u0517\u0519\u0518\u0512\u0518\u0519\u0519\u0118\u051A\u051C \r\u051B\u051A\u051C\u051D\u051D\u051B\u051D\u051E\u051E\u051F\u051F\u0520\b\x8D\u0520\u011A\u0521\u0522\x071\u0522\u0523\x07,\u0523\u0527\u0524\u0526\v\u0525\u0524\u0526\u0529\u0527\u0528\u0527\u0525\u0528\u052A\u0529\u0527\u052A\u052B\x07,\u052B\u052C\x071\u052C\u052D\u052D\u052E\b\x8E\u052E\u011C\u052F\u0530\x071\u0530\u0531\x071\u0531\u0535\u0532\u0534
|
|
135
|
+
\u0533\u0532\u0534\u0537\u0535\u0533\u0535\u0536\u0536\u0538\u0537\u0535\u0538\u0539\b\x8F\u0539\u011E(\u02D3\u02DB\u02E4\u02F1\u02F3\u0301\u0303\u0358\u035F\u036A\u036E\u0372\u0376\u0379\u037D\u0382\u038B\u0390\u03CB\u03D3\u03D8\u03DB\u0437\u04DB\u04E9\u04EF\u04F7\u04FB\u0500\u0505\u050A\u0510\u0516\u0518\u051D\u0527\u0535\b`;ue._serializedATN=zv.join([er._serializedATNSegment0,er._serializedATNSegment1,er._serializedATNSegment2],"");var Wi=Mt(ei()),w8=Mt(oh()),D8=Mt(Xl()),jt=Mt(ah()),S8=Mt(Fa()),pe=Mt(Ur()),R8=Mt(Na()),de=Mt(en()),Yt=Mt(Ct()),N8=Mt(sn()),Kv=Mt(Qr()),d=class extends S8.Parser{get vocabulary(){return d.VOCABULARY}get grammarFileName(){return "Solidity.g4"}get ruleNames(){return d.ruleNames}get serializedATN(){return d._serializedATN}createFailedPredicateException(t,e){return new D8.FailedPredicateException(this,t,e)}constructor(t){super(t),this._interp=new R8.ParserATNSimulator(d._ATN,this);}sourceUnit(){let t=new O8(this._ctx,this.state);this.enterRule(t,0,d.RULE_sourceUnit);let e;try{this.enterOuterAlt(t,1);{for(this.state=215,this._errHandler.sync(this),e=this._input.LA(1);!(e&-32)&&1<<e&(1<<d.T__0|1<<d.T__12|1<<d.T__13|1<<d.T__17|1<<d.T__18|1<<d.T__19|1<<d.T__20|1<<d.T__24|1<<d.T__25)||!(e-36&-32)&&1<<e-36&(1<<d.T__35-36|1<<d.T__37-36|1<<d.T__39-36|1<<d.T__40-36|1<<d.T__43-36|1<<d.T__45-36|1<<d.T__49-36|1<<d.T__61-36|1<<d.T__62-36|1<<d.T__63-36|1<<d.T__64-36|1<<d.T__65-36)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.TypeKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95|1<<d.FallbackKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier;){switch(this.state=213,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,0,this._ctx)){case 1:this.state=202,this.pragmaDirective();break;case 2:this.state=203,this.importDirective();break;case 3:this.state=204,this.contractDefinition();break;case 4:this.state=205,this.enumDefinition();break;case 5:this.state=206,this.eventDefinition();break;case 6:this.state=207,this.structDefinition();break;case 7:this.state=208,this.functionDefinition();break;case 8:this.state=209,this.fileLevelConstant();break;case 9:this.state=210,this.customErrorDefinition();break;case 10:this.state=211,this.typeDefinition();break;case 11:this.state=212,this.usingForDeclaration();break}this.state=217,this._errHandler.sync(this),e=this._input.LA(1);}this.state=218,this.match(d.EOF);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}pragmaDirective(){let t=new c0(this._ctx,this.state);this.enterRule(t,2,d.RULE_pragmaDirective);try{this.enterOuterAlt(t,1),this.state=220,this.match(d.T__0),this.state=221,this.pragmaName(),this.state=222,this.pragmaValue(),this.state=223,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}pragmaName(){let t=new Gv(this._ctx,this.state);this.enterRule(t,4,d.RULE_pragmaName);try{this.enterOuterAlt(t,1),this.state=225,this.identifier();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}pragmaValue(){let t=new Wv(this._ctx,this.state);this.enterRule(t,6,d.RULE_pragmaValue);try{switch(this.state=230,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,2,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=227,this.match(d.T__2);break;case 2:this.enterOuterAlt(t,2),this.state=228,this.version();break;case 3:this.enterOuterAlt(t,3),this.state=229,this.expression(0);break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}version(){let t=new Yv(this._ctx,this.state);this.enterRule(t,8,d.RULE_version);let e;try{for(this.enterOuterAlt(t,1),this.state=232,this.versionConstraint(),this.state=239,this._errHandler.sync(this),e=this._input.LA(1);!(e&-32)&&1<<e&(1<<d.T__3|1<<d.T__4|1<<d.T__5|1<<d.T__6|1<<d.T__7|1<<d.T__8|1<<d.T__9|1<<d.T__10)||e===d.DecimalNumber||e===d.VersionLiteral;)this.state=234,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__3&&(this.state=233,this.match(d.T__3)),this.state=236,this.versionConstraint(),this.state=241,this._errHandler.sync(this),e=this._input.LA(1);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}versionOperator(){let t=new Zv(this._ctx,this.state);this.enterRule(t,10,d.RULE_versionOperator);let e;try{this.enterOuterAlt(t,1),this.state=242,e=this._input.LA(1),!(e&-32)&&1<<e&(1<<d.T__4|1<<d.T__5|1<<d.T__6|1<<d.T__7|1<<d.T__8|1<<d.T__9|1<<d.T__10)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}versionConstraint(){let t=new f0(this._ctx,this.state);this.enterRule(t,12,d.RULE_versionConstraint);let e;try{switch(this.state=252,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,7,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=245,this._errHandler.sync(this),e=this._input.LA(1),!(e&-32)&&1<<e&(1<<d.T__4|1<<d.T__5|1<<d.T__6|1<<d.T__7|1<<d.T__8|1<<d.T__9|1<<d.T__10)&&(this.state=244,this.versionOperator()),this.state=247,this.match(d.VersionLiteral);break;case 2:this.enterOuterAlt(t,2),this.state=249,this._errHandler.sync(this),e=this._input.LA(1),!(e&-32)&&1<<e&(1<<d.T__4|1<<d.T__5|1<<d.T__6|1<<d.T__7|1<<d.T__8|1<<d.T__9|1<<d.T__10)&&(this.state=248,this.versionOperator()),this.state=251,this.match(d.DecimalNumber);break}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}importDeclaration(){let t=new d0(this._ctx,this.state);this.enterRule(t,14,d.RULE_importDeclaration);let e;try{this.enterOuterAlt(t,1),this.state=254,this.identifier(),this.state=257,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__11&&(this.state=255,this.match(d.T__11),this.state=256,this.identifier());}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}importDirective(){let t=new p0(this._ctx,this.state);this.enterRule(t,16,d.RULE_importDirective);let e;try{switch(this.state=295,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,13,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=259,this.match(d.T__12),this.state=260,this.importPath(),this.state=263,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__11&&(this.state=261,this.match(d.T__11),this.state=262,this.identifier()),this.state=265,this.match(d.T__1);break;case 2:this.enterOuterAlt(t,2);{switch(this.state=267,this.match(d.T__12),this.state=270,this._errHandler.sync(this),this._input.LA(1)){case d.T__2:this.state=268,this.match(d.T__2);break;case d.T__13:case d.T__24:case d.T__43:case d.T__49:case d.T__61:case d.T__94:case d.LeaveKeyword:case d.PayableKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:this.state=269,this.identifier();break;default:throw new jt.NoViableAltException(this)}this.state=274,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__11&&(this.state=272,this.match(d.T__11),this.state=273,this.identifier()),this.state=276,this.match(d.T__13),this.state=277,this.importPath(),this.state=278,this.match(d.T__1);}break;case 3:this.enterOuterAlt(t,3);{for(this.state=280,this.match(d.T__12),this.state=281,this.match(d.T__14),this.state=282,this.importDeclaration(),this.state=287,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=283,this.match(d.T__15),this.state=284,this.importDeclaration(),this.state=289,this._errHandler.sync(this),e=this._input.LA(1);this.state=290,this.match(d.T__16),this.state=291,this.match(d.T__13),this.state=292,this.importPath(),this.state=293,this.match(d.T__1);}break}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}importPath(){let t=new Xv(this._ctx,this.state);this.enterRule(t,18,d.RULE_importPath);try{this.enterOuterAlt(t,1),this.state=297,this.match(d.StringLiteralFragment);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}contractDefinition(){let t=new m0(this._ctx,this.state);this.enterRule(t,20,d.RULE_contractDefinition);let e;try{this.enterOuterAlt(t,1);{if(this.state=300,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__17&&(this.state=299,this.match(d.T__17)),this.state=302,e=this._input.LA(1),!(e&-32)&&1<<e&(1<<d.T__18|1<<d.T__19|1<<d.T__20)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=303,this.identifier(),this.state=313,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__21)for(this.state=304,this.match(d.T__21),this.state=305,this.inheritanceSpecifier(),this.state=310,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=306,this.match(d.T__15),this.state=307,this.inheritanceSpecifier(),this.state=312,this._errHandler.sync(this),e=this._input.LA(1);for(this.state=315,this.match(d.T__14),this.state=319,this._errHandler.sync(this),e=this._input.LA(1);!(e&-32)&&1<<e&(1<<d.T__13|1<<d.T__24|1<<d.T__25)||!(e-36&-32)&&1<<e-36&(1<<d.T__35-36|1<<d.T__36-36|1<<d.T__37-36|1<<d.T__39-36|1<<d.T__40-36|1<<d.T__43-36|1<<d.T__45-36|1<<d.T__49-36|1<<d.T__61-36|1<<d.T__62-36|1<<d.T__63-36|1<<d.T__64-36|1<<d.T__65-36)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.TypeKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95|1<<d.FallbackKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier;)this.state=316,this.contractPart(),this.state=321,this._errHandler.sync(this),e=this._input.LA(1);this.state=322,this.match(d.T__16);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}inheritanceSpecifier(){let t=new _0(this._ctx,this.state);this.enterRule(t,22,d.RULE_inheritanceSpecifier);let e;try{this.enterOuterAlt(t,1),this.state=324,this.userDefinedTypeName(),this.state=330,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__22&&(this.state=325,this.match(d.T__22),this.state=327,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=326,this.expressionList()),this.state=329,this.match(d.T__23));}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}contractPart(){let t=new g0(this._ctx,this.state);this.enterRule(t,24,d.RULE_contractPart);try{switch(this.state=341,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,20,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=332,this.stateVariableDeclaration();break;case 2:this.enterOuterAlt(t,2),this.state=333,this.usingForDeclaration();break;case 3:this.enterOuterAlt(t,3),this.state=334,this.structDefinition();break;case 4:this.enterOuterAlt(t,4),this.state=335,this.modifierDefinition();break;case 5:this.enterOuterAlt(t,5),this.state=336,this.functionDefinition();break;case 6:this.enterOuterAlt(t,6),this.state=337,this.eventDefinition();break;case 7:this.enterOuterAlt(t,7),this.state=338,this.enumDefinition();break;case 8:this.enterOuterAlt(t,8),this.state=339,this.customErrorDefinition();break;case 9:this.enterOuterAlt(t,9),this.state=340,this.typeDefinition();break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}stateVariableDeclaration(){let t=new Jv(this._ctx,this.state);this.enterRule(t,26,d.RULE_stateVariableDeclaration);let e;try{this.enterOuterAlt(t,1);{for(this.state=343,this.typeName(0),this.state=352,this._errHandler.sync(this),e=this._input.LA(1);!(e-96&-32)&&1<<e-96&(1<<d.T__95-96|1<<d.ConstantKeyword-96|1<<d.ImmutableKeyword-96|1<<d.InternalKeyword-96|1<<d.PrivateKeyword-96|1<<d.PublicKeyword-96);){switch(this.state=350,this._errHandler.sync(this),this._input.LA(1)){case d.PublicKeyword:this.state=344,this.match(d.PublicKeyword);break;case d.InternalKeyword:this.state=345,this.match(d.InternalKeyword);break;case d.PrivateKeyword:this.state=346,this.match(d.PrivateKeyword);break;case d.ConstantKeyword:this.state=347,this.match(d.ConstantKeyword);break;case d.ImmutableKeyword:this.state=348,this.match(d.ImmutableKeyword);break;case d.T__95:this.state=349,this.overrideSpecifier();break;default:throw new jt.NoViableAltException(this)}this.state=354,this._errHandler.sync(this),e=this._input.LA(1);}this.state=355,this.identifier(),this.state=358,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__10&&(this.state=356,this.match(d.T__10),this.state=357,this.expression(0)),this.state=360,this.match(d.T__1);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}fileLevelConstant(){let t=new y0(this._ctx,this.state);this.enterRule(t,28,d.RULE_fileLevelConstant);try{this.enterOuterAlt(t,1),this.state=362,this.typeName(0),this.state=363,this.match(d.ConstantKeyword),this.state=364,this.identifier(),this.state=365,this.match(d.T__10),this.state=366,this.expression(0),this.state=367,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}customErrorDefinition(){let t=new Vl(this._ctx,this.state);this.enterRule(t,30,d.RULE_customErrorDefinition);try{this.enterOuterAlt(t,1),this.state=369,this.match(d.T__24),this.state=370,this.identifier(),this.state=371,this.parameterList(),this.state=372,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}typeDefinition(){let t=new $l(this._ctx,this.state);this.enterRule(t,32,d.RULE_typeDefinition);try{this.enterOuterAlt(t,1),this.state=374,this.match(d.TypeKeyword),this.state=375,this.identifier(),this.state=376,this.match(d.T__21),this.state=377,this.elementaryTypeName(),this.state=378,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}usingForDeclaration(){let t=new zl(this._ctx,this.state);this.enterRule(t,34,d.RULE_usingForDeclaration);let e;try{this.enterOuterAlt(t,1);{switch(this.state=380,this.match(d.T__25),this.state=381,this.usingForObject(),this.state=382,this.match(d.T__26),this.state=385,this._errHandler.sync(this),this._input.LA(1)){case d.T__2:this.state=383,this.match(d.T__2);break;case d.T__13:case d.T__24:case d.T__37:case d.T__43:case d.T__45:case d.T__49:case d.T__61:case d.T__62:case d.T__63:case d.T__64:case d.T__65:case d.T__94:case d.Int:case d.Uint:case d.Byte:case d.Fixed:case d.Ufixed:case d.LeaveKeyword:case d.PayableKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:this.state=384,this.typeName(0);break;default:throw new jt.NoViableAltException(this)}this.state=388,this._errHandler.sync(this),e=this._input.LA(1),e===d.GlobalKeyword&&(this.state=387,this.match(d.GlobalKeyword)),this.state=390,this.match(d.T__1);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}usingForObject(){let t=new Qv(this._ctx,this.state);this.enterRule(t,36,d.RULE_usingForObject);let e;try{switch(this.state=404,this._errHandler.sync(this),this._input.LA(1)){case d.T__13:case d.T__24:case d.T__43:case d.T__49:case d.T__61:case d.T__94:case d.LeaveKeyword:case d.PayableKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:this.enterOuterAlt(t,1),this.state=392,this.userDefinedTypeName();break;case d.T__14:this.enterOuterAlt(t,2);{for(this.state=393,this.match(d.T__14),this.state=394,this.usingForObjectDirective(),this.state=399,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=395,this.match(d.T__15),this.state=396,this.usingForObjectDirective(),this.state=401,this._errHandler.sync(this),e=this._input.LA(1);this.state=402,this.match(d.T__16);}break;default:throw new jt.NoViableAltException(this)}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}usingForObjectDirective(){let t=new x0(this._ctx,this.state);this.enterRule(t,38,d.RULE_usingForObjectDirective);let e;try{this.enterOuterAlt(t,1),this.state=406,this.userDefinedTypeName(),this.state=409,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__11&&(this.state=407,this.match(d.T__11),this.state=408,this.userDefinableOperators());}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}userDefinableOperators(){let t=new eE(this._ctx,this.state);this.enterRule(t,40,d.RULE_userDefinableOperators);let e;try{this.enterOuterAlt(t,1),this.state=411,e=this._input.LA(1),!(e&-32)&&1<<e&(1<<d.T__2|1<<d.T__4|1<<d.T__5|1<<d.T__6|1<<d.T__7|1<<d.T__8|1<<d.T__9|1<<d.T__27|1<<d.T__28|1<<d.T__29|1<<d.T__30)||!(e-32&-32)&&1<<e-32&(1<<d.T__31-32|1<<d.T__32-32|1<<d.T__33-32|1<<d.T__34-32)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}structDefinition(){let t=new Kl(this._ctx,this.state);this.enterRule(t,42,d.RULE_structDefinition);let e;try{this.enterOuterAlt(t,1);{if(this.state=413,this.match(d.T__35),this.state=414,this.identifier(),this.state=415,this.match(d.T__14),this.state=426,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__13||e===d.T__24||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)for(this.state=416,this.variableDeclaration(),this.state=417,this.match(d.T__1),this.state=423,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__13||e===d.T__24||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier;)this.state=418,this.variableDeclaration(),this.state=419,this.match(d.T__1),this.state=425,this._errHandler.sync(this),e=this._input.LA(1);this.state=428,this.match(d.T__16);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}modifierDefinition(){let t=new tE(this._ctx,this.state);this.enterRule(t,44,d.RULE_modifierDefinition);let e;try{this.enterOuterAlt(t,1);{for(this.state=430,this.match(d.T__36),this.state=431,this.identifier(),this.state=433,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__22&&(this.state=432,this.parameterList()),this.state=439,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__95||e===d.VirtualKeyword;){switch(this.state=437,this._errHandler.sync(this),this._input.LA(1)){case d.VirtualKeyword:this.state=435,this.match(d.VirtualKeyword);break;case d.T__95:this.state=436,this.overrideSpecifier();break;default:throw new jt.NoViableAltException(this)}this.state=441,this._errHandler.sync(this),e=this._input.LA(1);}switch(this.state=444,this._errHandler.sync(this),this._input.LA(1)){case d.T__1:this.state=442,this.match(d.T__1);break;case d.T__14:this.state=443,this.block();break;default:throw new jt.NoViableAltException(this)}}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}modifierInvocation(){let t=new v0(this._ctx,this.state);this.enterRule(t,46,d.RULE_modifierInvocation);let e;try{this.enterOuterAlt(t,1),this.state=446,this.identifier(),this.state=452,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__22&&(this.state=447,this.match(d.T__22),this.state=449,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=448,this.expressionList()),this.state=451,this.match(d.T__23));}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}functionDefinition(){let t=new Gl(this._ctx,this.state);this.enterRule(t,48,d.RULE_functionDefinition);let e;try{switch(this.enterOuterAlt(t,1),this.state=454,this.functionDescriptor(),this.state=455,this.parameterList(),this.state=456,this.modifierList(),this.state=458,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__38&&(this.state=457,this.returnParameters()),this.state=462,this._errHandler.sync(this),this._input.LA(1)){case d.T__1:this.state=460,this.match(d.T__1);break;case d.T__14:this.state=461,this.block();break;default:throw new jt.NoViableAltException(this)}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}functionDescriptor(){let t=new rE(this._ctx,this.state);this.enterRule(t,50,d.RULE_functionDescriptor);let e;try{switch(this.state=471,this._errHandler.sync(this),this._input.LA(1)){case d.T__37:this.enterOuterAlt(t,1),this.state=464,this.match(d.T__37),this.state=466,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=465,this.identifier());break;case d.ConstructorKeyword:this.enterOuterAlt(t,2),this.state=468,this.match(d.ConstructorKeyword);break;case d.FallbackKeyword:this.enterOuterAlt(t,3),this.state=469,this.match(d.FallbackKeyword);break;case d.ReceiveKeyword:this.enterOuterAlt(t,4),this.state=470,this.match(d.ReceiveKeyword);break;default:throw new jt.NoViableAltException(this)}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}returnParameters(){let t=new W0(this._ctx,this.state);this.enterRule(t,52,d.RULE_returnParameters);try{this.enterOuterAlt(t,1),this.state=473,this.match(d.T__38),this.state=474,this.parameterList();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}modifierList(){let t=new iE(this._ctx,this.state);this.enterRule(t,54,d.RULE_modifierList);let e;try{for(this.enterOuterAlt(t,1),this.state=486,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.T__95-95|1<<d.ConstantKeyword-95|1<<d.LeaveKeyword-95|1<<d.ExternalKeyword-95|1<<d.InternalKeyword-95|1<<d.PayableKeyword-95|1<<d.PrivateKeyword-95|1<<d.PublicKeyword-95|1<<d.VirtualKeyword-95|1<<d.PureKeyword-95|1<<d.ViewKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier;){switch(this.state=484,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,41,this._ctx)){case 1:this.state=476,this.match(d.ExternalKeyword);break;case 2:this.state=477,this.match(d.PublicKeyword);break;case 3:this.state=478,this.match(d.InternalKeyword);break;case 4:this.state=479,this.match(d.PrivateKeyword);break;case 5:this.state=480,this.match(d.VirtualKeyword);break;case 6:this.state=481,this.stateMutability();break;case 7:this.state=482,this.modifierInvocation();break;case 8:this.state=483,this.overrideSpecifier();break}this.state=488,this._errHandler.sync(this),e=this._input.LA(1);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}eventDefinition(){let t=new Wl(this._ctx,this.state);this.enterRule(t,56,d.RULE_eventDefinition);let e;try{this.enterOuterAlt(t,1),this.state=489,this.match(d.T__39),this.state=490,this.identifier(),this.state=491,this.eventParameterList(),this.state=493,this._errHandler.sync(this),e=this._input.LA(1),e===d.AnonymousKeyword&&(this.state=492,this.match(d.AnonymousKeyword)),this.state=495,this.match(d.T__1);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}enumValue(){let t=new E0(this._ctx,this.state);this.enterRule(t,58,d.RULE_enumValue);try{this.enterOuterAlt(t,1),this.state=497,this.identifier();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}enumDefinition(){let t=new Yl(this._ctx,this.state);this.enterRule(t,60,d.RULE_enumDefinition);let e;try{this.enterOuterAlt(t,1);{for(this.state=499,this.match(d.T__40),this.state=500,this.identifier(),this.state=501,this.match(d.T__14),this.state=503,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=502,this.enumValue()),this.state=509,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=505,this.match(d.T__15),this.state=506,this.enumValue(),this.state=511,this._errHandler.sync(this),e=this._input.LA(1);this.state=512,this.match(d.T__16);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}parameterList(){let t=new ao(this._ctx,this.state);this.enterRule(t,62,d.RULE_parameterList);let e;try{this.enterOuterAlt(t,1);{if(this.state=514,this.match(d.T__22),this.state=523,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__13||e===d.T__24||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)for(this.state=515,this.parameter(),this.state=520,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=516,this.match(d.T__15),this.state=517,this.parameter(),this.state=522,this._errHandler.sync(this),e=this._input.LA(1);this.state=525,this.match(d.T__23);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}parameter(){let t=new b0(this._ctx,this.state);this.enterRule(t,64,d.RULE_parameter);let e;try{this.enterOuterAlt(t,1);{switch(this.state=527,this.typeName(0),this.state=529,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,48,this._ctx)){case 1:this.state=528,this.storageLocation();break}this.state=532,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=531,this.identifier());}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}eventParameterList(){let t=new nE(this._ctx,this.state);this.enterRule(t,66,d.RULE_eventParameterList);let e;try{this.enterOuterAlt(t,1);{if(this.state=534,this.match(d.T__22),this.state=543,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__13||e===d.T__24||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)for(this.state=535,this.eventParameter(),this.state=540,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=536,this.match(d.T__15),this.state=537,this.eventParameter(),this.state=542,this._errHandler.sync(this),e=this._input.LA(1);this.state=545,this.match(d.T__23);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}eventParameter(){let t=new T0(this._ctx,this.state);this.enterRule(t,68,d.RULE_eventParameter);let e;try{this.enterOuterAlt(t,1),this.state=547,this.typeName(0),this.state=549,this._errHandler.sync(this),e=this._input.LA(1),e===d.IndexedKeyword&&(this.state=548,this.match(d.IndexedKeyword)),this.state=552,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=551,this.identifier());}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}functionTypeParameterList(){let t=new C0(this._ctx,this.state);this.enterRule(t,70,d.RULE_functionTypeParameterList);let e;try{this.enterOuterAlt(t,1);{if(this.state=554,this.match(d.T__22),this.state=563,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__13||e===d.T__24||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)for(this.state=555,this.functionTypeParameter(),this.state=560,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=556,this.match(d.T__15),this.state=557,this.functionTypeParameter(),this.state=562,this._errHandler.sync(this),e=this._input.LA(1);this.state=565,this.match(d.T__23);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}functionTypeParameter(){let t=new A0(this._ctx,this.state);this.enterRule(t,72,d.RULE_functionTypeParameter);let e;try{this.enterOuterAlt(t,1),this.state=567,this.typeName(0),this.state=569,this._errHandler.sync(this),e=this._input.LA(1),!(e-48&-32)&&1<<e-48&(1<<d.T__47-48|1<<d.T__48-48|1<<d.T__49-48)&&(this.state=568,this.storageLocation());}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}variableDeclaration(){let t=new eo(this._ctx,this.state);this.enterRule(t,74,d.RULE_variableDeclaration);try{this.enterOuterAlt(t,1);{switch(this.state=571,this.typeName(0),this.state=573,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,57,this._ctx)){case 1:this.state=572,this.storageLocation();break}this.state=575,this.identifier();}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}typeName(t){t===void 0&&(t=0);let e=this._ctx,r=this.state,i=new Ar(this._ctx,r),n=i,o=76;this.enterRecursionRule(i,76,d.RULE_typeName,t);let s;try{let a;this.enterOuterAlt(i,1);{switch(this.state=584,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,58,this._ctx)){case 1:this.state=578,this.elementaryTypeName();break;case 2:this.state=579,this.userDefinedTypeName();break;case 3:this.state=580,this.mapping();break;case 4:this.state=581,this.functionTypeName();break;case 5:this.state=582,this.match(d.T__43),this.state=583,this.match(d.PayableKeyword);break}for(this._ctx._stop=this._input.tryLT(-1),this.state=594,this._errHandler.sync(this),a=this.interpreter.adaptivePredict(this._input,60,this._ctx);a!==2&&a!==Wi.ATN.INVALID_ALT_NUMBER;){if(a===1){this._parseListeners!=null&&this.triggerExitRuleEvent(),n=i;{if(i=new Ar(e,r),this.pushNewRecursionContext(i,o,d.RULE_typeName),this.state=586,!this.precpred(this._ctx,3))throw this.createFailedPredicateException("this.precpred(this._ctx, 3)");this.state=587,this.match(d.T__41),this.state=589,this._errHandler.sync(this),s=this._input.LA(1),(!(s&-32)&&1<<s&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(s-38&-32)&&1<<s-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(s-71&-32)&&1<<s-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(s-103&-32)&&1<<s-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=588,this.expression(0)),this.state=591,this.match(d.T__42);}}this.state=596,this._errHandler.sync(this),a=this.interpreter.adaptivePredict(this._input,60,this._ctx);}}}catch(a){if(a instanceof de.RecognitionException)i.exception=a,this._errHandler.reportError(this,a),this._errHandler.recover(this,a);else throw a}finally{this.unrollRecursionContexts(e);}return i}userDefinedTypeName(){let t=new Zi(this._ctx,this.state);this.enterRule(t,78,d.RULE_userDefinedTypeName);try{let e;for(this.enterOuterAlt(t,1),this.state=597,this.identifier(),this.state=602,this._errHandler.sync(this),e=this.interpreter.adaptivePredict(this._input,61,this._ctx);e!==2&&e!==Wi.ATN.INVALID_ALT_NUMBER;)e===1&&(this.state=598,this.match(d.T__44),this.state=599,this.identifier()),this.state=604,this._errHandler.sync(this),e=this.interpreter.adaptivePredict(this._input,61,this._ctx);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}mappingKey(){let t=new sE(this._ctx,this.state);this.enterRule(t,80,d.RULE_mappingKey);try{switch(this.state=607,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,62,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=605,this.elementaryTypeName();break;case 2:this.enterOuterAlt(t,2),this.state=606,this.userDefinedTypeName();break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}mapping(){let t=new oE(this._ctx,this.state);this.enterRule(t,82,d.RULE_mapping);let e;try{this.enterOuterAlt(t,1),this.state=609,this.match(d.T__45),this.state=610,this.match(d.T__22),this.state=611,this.mappingKey(),this.state=613,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=612,this.mappingKeyName()),this.state=615,this.match(d.T__46),this.state=616,this.typeName(0),this.state=618,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=617,this.mappingValueName()),this.state=620,this.match(d.T__23);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}mappingKeyName(){let t=new aE(this._ctx,this.state);this.enterRule(t,84,d.RULE_mappingKeyName);try{this.enterOuterAlt(t,1),this.state=622,this.identifier();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}mappingValueName(){let t=new uE(this._ctx,this.state);this.enterRule(t,86,d.RULE_mappingValueName);try{this.enterOuterAlt(t,1),this.state=624,this.identifier();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}functionTypeName(){let t=new lE(this._ctx,this.state);this.enterRule(t,88,d.RULE_functionTypeName);try{let e;this.enterOuterAlt(t,1);{for(this.state=626,this.match(d.T__37),this.state=627,this.functionTypeParameterList(),this.state=633,this._errHandler.sync(this),e=this.interpreter.adaptivePredict(this._input,66,this._ctx);e!==2&&e!==Wi.ATN.INVALID_ALT_NUMBER;){if(e===1)switch(this.state=631,this._errHandler.sync(this),this._input.LA(1)){case d.InternalKeyword:this.state=628,this.match(d.InternalKeyword);break;case d.ExternalKeyword:this.state=629,this.match(d.ExternalKeyword);break;case d.ConstantKeyword:case d.PayableKeyword:case d.PureKeyword:case d.ViewKeyword:this.state=630,this.stateMutability();break;default:throw new jt.NoViableAltException(this)}this.state=635,this._errHandler.sync(this),e=this.interpreter.adaptivePredict(this._input,66,this._ctx);}switch(this.state=638,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,67,this._ctx)){case 1:this.state=636,this.match(d.T__38),this.state=637,this.functionTypeParameterList();break}}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}storageLocation(){let t=new hh(this._ctx,this.state);this.enterRule(t,90,d.RULE_storageLocation);let e;try{this.enterOuterAlt(t,1),this.state=640,e=this._input.LA(1),!(e-48&-32)&&1<<e-48&(1<<d.T__47-48|1<<d.T__48-48|1<<d.T__49-48)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}stateMutability(){let t=new Ca(this._ctx,this.state);this.enterRule(t,92,d.RULE_stateMutability);let e;try{this.enterOuterAlt(t,1),this.state=642,e=this._input.LA(1),!(e-110&-32)&&1<<e-110&(1<<d.ConstantKeyword-110|1<<d.PayableKeyword-110|1<<d.PureKeyword-110|1<<d.ViewKeyword-110)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}block(){let t=new us(this._ctx,this.state);this.enterRule(t,94,d.RULE_block);let e;try{this.enterOuterAlt(t,1);{for(this.state=644,this.match(d.T__14),this.state=648,this._errHandler.sync(this),e=this._input.LA(1);!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__14|1<<d.T__22|1<<d.T__24|1<<d.T__26|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__50-38|1<<d.T__52-38|1<<d.T__54-38|1<<d.T__55-38|1<<d.T__56-38|1<<d.T__57-38|1<<d.T__58-38|1<<d.T__59-38|1<<d.T__60-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.BreakKeyword-103|1<<d.ContinueKeyword-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103);)this.state=645,this.statement(),this.state=650,this._errHandler.sync(this),e=this._input.LA(1);this.state=651,this.match(d.T__16);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}statement(){let t=new Xi(this._ctx,this.state);this.enterRule(t,96,d.RULE_statement);try{switch(this.state=668,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,69,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=653,this.ifStatement();break;case 2:this.enterOuterAlt(t,2),this.state=654,this.tryStatement();break;case 3:this.enterOuterAlt(t,3),this.state=655,this.whileStatement();break;case 4:this.enterOuterAlt(t,4),this.state=656,this.forStatement();break;case 5:this.enterOuterAlt(t,5),this.state=657,this.block();break;case 6:this.enterOuterAlt(t,6),this.state=658,this.inlineAssemblyStatement();break;case 7:this.enterOuterAlt(t,7),this.state=659,this.doWhileStatement();break;case 8:this.enterOuterAlt(t,8),this.state=660,this.continueStatement();break;case 9:this.enterOuterAlt(t,9),this.state=661,this.breakStatement();break;case 10:this.enterOuterAlt(t,10),this.state=662,this.returnStatement();break;case 11:this.enterOuterAlt(t,11),this.state=663,this.throwStatement();break;case 12:this.enterOuterAlt(t,12),this.state=664,this.emitStatement();break;case 13:this.enterOuterAlt(t,13),this.state=665,this.simpleStatement();break;case 14:this.enterOuterAlt(t,14),this.state=666,this.uncheckedStatement();break;case 15:this.enterOuterAlt(t,15),this.state=667,this.revertStatement();break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}expressionStatement(){let t=new Y0(this._ctx,this.state);this.enterRule(t,98,d.RULE_expressionStatement);try{this.enterOuterAlt(t,1),this.state=670,this.expression(0),this.state=671,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}ifStatement(){let t=new hE(this._ctx,this.state);this.enterRule(t,100,d.RULE_ifStatement);try{switch(this.enterOuterAlt(t,1),this.state=673,this.match(d.T__50),this.state=674,this.match(d.T__22),this.state=675,this.expression(0),this.state=676,this.match(d.T__23),this.state=677,this.statement(),this.state=680,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,70,this._ctx)){case 1:this.state=678,this.match(d.T__51),this.state=679,this.statement();break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}tryStatement(){let t=new cE(this._ctx,this.state);this.enterRule(t,102,d.RULE_tryStatement);let e;try{this.enterOuterAlt(t,1);{this.state=682,this.match(d.T__52),this.state=683,this.expression(0),this.state=685,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__38&&(this.state=684,this.returnParameters()),this.state=687,this.block(),this.state=689,this._errHandler.sync(this),e=this._input.LA(1);do this.state=688,this.catchClause(),this.state=691,this._errHandler.sync(this),e=this._input.LA(1);while(e===d.T__53)}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}catchClause(){let t=new w0(this._ctx,this.state);this.enterRule(t,104,d.RULE_catchClause);let e;try{this.enterOuterAlt(t,1),this.state=693,this.match(d.T__53),this.state=698,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__13|1<<d.T__22|1<<d.T__24)||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=695,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=694,this.identifier()),this.state=697,this.parameterList()),this.state=700,this.block();}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}whileStatement(){let t=new fE(this._ctx,this.state);this.enterRule(t,106,d.RULE_whileStatement);try{this.enterOuterAlt(t,1),this.state=702,this.match(d.T__54),this.state=703,this.match(d.T__22),this.state=704,this.expression(0),this.state=705,this.match(d.T__23),this.state=706,this.statement();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}simpleStatement(){let t=new Z0(this._ctx,this.state);this.enterRule(t,108,d.RULE_simpleStatement);try{switch(this.enterOuterAlt(t,1),this.state=710,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,75,this._ctx)){case 1:this.state=708,this.variableDeclarationStatement();break;case 2:this.state=709,this.expressionStatement();break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}uncheckedStatement(){let t=new dE(this._ctx,this.state);this.enterRule(t,110,d.RULE_uncheckedStatement);try{this.enterOuterAlt(t,1),this.state=712,this.match(d.T__55),this.state=713,this.block();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}forStatement(){let t=new pE(this._ctx,this.state);this.enterRule(t,112,d.RULE_forStatement);let e;try{this.enterOuterAlt(t,1);{switch(this.state=715,this.match(d.T__26),this.state=716,this.match(d.T__22),this.state=719,this._errHandler.sync(this),this._input.LA(1)){case d.T__5:case d.T__13:case d.T__22:case d.T__24:case d.T__29:case d.T__30:case d.T__37:case d.T__41:case d.T__43:case d.T__45:case d.T__49:case d.T__61:case d.T__62:case d.T__63:case d.T__64:case d.T__65:case d.T__66:case d.T__67:case d.T__68:case d.T__70:case d.T__71:case d.T__94:case d.Int:case d.Uint:case d.Byte:case d.Fixed:case d.Ufixed:case d.BooleanLiteral:case d.DecimalNumber:case d.HexNumber:case d.HexLiteralFragment:case d.LeaveKeyword:case d.PayableKeyword:case d.TypeKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:case d.StringLiteralFragment:this.state=717,this.simpleStatement();break;case d.T__1:this.state=718,this.match(d.T__1);break;default:throw new jt.NoViableAltException(this)}switch(this.state=723,this._errHandler.sync(this),this._input.LA(1)){case d.T__5:case d.T__13:case d.T__22:case d.T__24:case d.T__29:case d.T__30:case d.T__37:case d.T__41:case d.T__43:case d.T__45:case d.T__49:case d.T__61:case d.T__62:case d.T__63:case d.T__64:case d.T__65:case d.T__66:case d.T__67:case d.T__68:case d.T__70:case d.T__71:case d.T__94:case d.Int:case d.Uint:case d.Byte:case d.Fixed:case d.Ufixed:case d.BooleanLiteral:case d.DecimalNumber:case d.HexNumber:case d.HexLiteralFragment:case d.LeaveKeyword:case d.PayableKeyword:case d.TypeKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:case d.StringLiteralFragment:this.state=721,this.expressionStatement();break;case d.T__1:this.state=722,this.match(d.T__1);break;default:throw new jt.NoViableAltException(this)}this.state=726,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=725,this.expression(0)),this.state=728,this.match(d.T__23),this.state=729,this.statement();}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}inlineAssemblyStatement(){let t=new mE(this._ctx,this.state);this.enterRule(t,114,d.RULE_inlineAssemblyStatement);let e;try{this.enterOuterAlt(t,1),this.state=731,this.match(d.T__56),this.state=733,this._errHandler.sync(this),e=this._input.LA(1),e===d.StringLiteralFragment&&(this.state=732,this.match(d.StringLiteralFragment)),this.state=739,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__22&&(this.state=735,this.match(d.T__22),this.state=736,this.inlineAssemblyStatementFlag(),this.state=737,this.match(d.T__23)),this.state=741,this.assemblyBlock();}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}inlineAssemblyStatementFlag(){let t=new _E(this._ctx,this.state);this.enterRule(t,116,d.RULE_inlineAssemblyStatementFlag);try{this.enterOuterAlt(t,1),this.state=743,this.stringLiteral();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}doWhileStatement(){let t=new gE(this._ctx,this.state);this.enterRule(t,118,d.RULE_doWhileStatement);try{this.enterOuterAlt(t,1),this.state=745,this.match(d.T__57),this.state=746,this.statement(),this.state=747,this.match(d.T__54),this.state=748,this.match(d.T__22),this.state=749,this.expression(0),this.state=750,this.match(d.T__23),this.state=751,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}continueStatement(){let t=new yE(this._ctx,this.state);this.enterRule(t,120,d.RULE_continueStatement);try{this.enterOuterAlt(t,1),this.state=753,this.match(d.ContinueKeyword),this.state=754,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}breakStatement(){let t=new xE(this._ctx,this.state);this.enterRule(t,122,d.RULE_breakStatement);try{this.enterOuterAlt(t,1),this.state=756,this.match(d.BreakKeyword),this.state=757,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}returnStatement(){let t=new vE(this._ctx,this.state);this.enterRule(t,124,d.RULE_returnStatement);let e;try{this.enterOuterAlt(t,1),this.state=759,this.match(d.T__58),this.state=761,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=760,this.expression(0)),this.state=763,this.match(d.T__1);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}throwStatement(){let t=new EE(this._ctx,this.state);this.enterRule(t,126,d.RULE_throwStatement);try{this.enterOuterAlt(t,1),this.state=765,this.match(d.T__59),this.state=766,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}emitStatement(){let t=new bE(this._ctx,this.state);this.enterRule(t,128,d.RULE_emitStatement);try{this.enterOuterAlt(t,1),this.state=768,this.match(d.T__60),this.state=769,this.functionCall(),this.state=770,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}revertStatement(){let t=new TE(this._ctx,this.state);this.enterRule(t,130,d.RULE_revertStatement);try{this.enterOuterAlt(t,1),this.state=772,this.match(d.T__61),this.state=773,this.functionCall(),this.state=774,this.match(d.T__1);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}variableDeclarationStatement(){let t=new CE(this._ctx,this.state);this.enterRule(t,132,d.RULE_variableDeclarationStatement);let e;try{this.enterOuterAlt(t,1);{switch(this.state=783,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,82,this._ctx)){case 1:this.state=776,this.match(d.T__62),this.state=777,this.identifierList();break;case 2:this.state=778,this.variableDeclaration();break;case 3:this.state=779,this.match(d.T__22),this.state=780,this.variableDeclarationList(),this.state=781,this.match(d.T__23);break}this.state=787,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__10&&(this.state=785,this.match(d.T__10),this.state=786,this.expression(0)),this.state=789,this.match(d.T__1);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}variableDeclarationList(){let t=new AE(this._ctx,this.state);this.enterRule(t,134,d.RULE_variableDeclarationList);let e;try{for(this.enterOuterAlt(t,1),this.state=792,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=791,this.variableDeclaration()),this.state=800,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=794,this.match(d.T__15),this.state=796,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.Int-95|1<<d.Uint-95|1<<d.Byte-95|1<<d.Fixed-95|1<<d.Ufixed-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=795,this.variableDeclaration()),this.state=802,this._errHandler.sync(this),e=this._input.LA(1);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}identifierList(){let t=new wE(this._ctx,this.state);this.enterRule(t,136,d.RULE_identifierList);let e;try{let r;this.enterOuterAlt(t,1);{for(this.state=803,this.match(d.T__22),this.state=810,this._errHandler.sync(this),r=this.interpreter.adaptivePredict(this._input,88,this._ctx);r!==2&&r!==Wi.ATN.INVALID_ALT_NUMBER;)r===1&&(this.state=805,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=804,this.identifier()),this.state=807,this.match(d.T__15)),this.state=812,this._errHandler.sync(this),r=this.interpreter.adaptivePredict(this._input,88,this._ctx);this.state=814,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=813,this.identifier()),this.state=816,this.match(d.T__23);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}elementaryTypeName(){let t=new ch(this._ctx,this.state);this.enterRule(t,138,d.RULE_elementaryTypeName);let e;try{this.enterOuterAlt(t,1),this.state=818,e=this._input.LA(1),!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__62-44|1<<d.T__63-44|1<<d.T__64-44|1<<d.T__65-44)||!(e-97&-32)&&1<<e-97&(1<<d.Int-97|1<<d.Uint-97|1<<d.Byte-97|1<<d.Fixed-97|1<<d.Ufixed-97)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}expression(t){t===void 0&&(t=0);let e=this._ctx,r=this.state,i=new ke(this._ctx,r),n=i,o=140;this.enterRecursionRule(i,140,d.RULE_expression,t);let s;try{let a;this.enterOuterAlt(i,1);{switch(this.state=838,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,90,this._ctx)){case 1:this.state=821,this.match(d.T__68),this.state=822,this.typeName(0);break;case 2:this.state=823,this.match(d.T__22),this.state=824,this.expression(0),this.state=825,this.match(d.T__23);break;case 3:this.state=827,s=this._input.LA(1),s===d.T__66||s===d.T__67?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=828,this.expression(19);break;case 4:this.state=829,s=this._input.LA(1),s===d.T__29||s===d.T__30?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=830,this.expression(18);break;case 5:this.state=831,this.match(d.T__70),this.state=832,this.expression(17);break;case 6:this.state=833,this.match(d.T__71),this.state=834,this.expression(16);break;case 7:this.state=835,this.match(d.T__5),this.state=836,this.expression(15);break;case 8:this.state=837,this.primaryExpression();break}for(this._ctx._stop=this._input.tryLT(-1),this.state=914,this._errHandler.sync(this),a=this.interpreter.adaptivePredict(this._input,94,this._ctx);a!==2&&a!==Wi.ATN.INVALID_ALT_NUMBER;){if(a===1)switch(this._parseListeners!=null&&this.triggerExitRuleEvent(),n=i,this.state=912,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,93,this._ctx)){case 1:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=840,!this.precpred(this._ctx,14))throw this.createFailedPredicateException("this.precpred(this._ctx, 14)");this.state=841,this.match(d.T__72),this.state=842,this.expression(15);}break;case 2:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=843,!this.precpred(this._ctx,13))throw this.createFailedPredicateException("this.precpred(this._ctx, 13)");this.state=844,s=this._input.LA(1),!(s-3&-32)&&1<<s-3&(1<<d.T__2-3|1<<d.T__31-3|1<<d.T__32-3)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=845,this.expression(14);}break;case 3:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=846,!this.precpred(this._ctx,12))throw this.createFailedPredicateException("this.precpred(this._ctx, 12)");this.state=847,s=this._input.LA(1),s===d.T__29||s===d.T__30?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=848,this.expression(13);}break;case 4:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=849,!this.precpred(this._ctx,11))throw this.createFailedPredicateException("this.precpred(this._ctx, 11)");this.state=850,s=this._input.LA(1),s===d.T__73||s===d.T__74?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=851,this.expression(12);}break;case 5:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=852,!this.precpred(this._ctx,10))throw this.createFailedPredicateException("this.precpred(this._ctx, 10)");this.state=853,this.match(d.T__28),this.state=854,this.expression(11);}break;case 6:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=855,!this.precpred(this._ctx,9))throw this.createFailedPredicateException("this.precpred(this._ctx, 9)");this.state=856,this.match(d.T__4),this.state=857,this.expression(10);}break;case 7:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=858,!this.precpred(this._ctx,8))throw this.createFailedPredicateException("this.precpred(this._ctx, 8)");this.state=859,this.match(d.T__27),this.state=860,this.expression(9);}break;case 8:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=861,!this.precpred(this._ctx,7))throw this.createFailedPredicateException("this.precpred(this._ctx, 7)");this.state=862,s=this._input.LA(1),!(s&-32)&&1<<s&(1<<d.T__6|1<<d.T__7|1<<d.T__8|1<<d.T__9)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=863,this.expression(8);}break;case 9:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=864,!this.precpred(this._ctx,6))throw this.createFailedPredicateException("this.precpred(this._ctx, 6)");this.state=865,s=this._input.LA(1),s===d.T__33||s===d.T__34?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=866,this.expression(7);}break;case 10:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=867,!this.precpred(this._ctx,5))throw this.createFailedPredicateException("this.precpred(this._ctx, 5)");this.state=868,this.match(d.T__75),this.state=869,this.expression(6);}break;case 11:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=870,!this.precpred(this._ctx,4))throw this.createFailedPredicateException("this.precpred(this._ctx, 4)");this.state=871,this.match(d.T__3),this.state=872,this.expression(5);}break;case 12:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=873,!this.precpred(this._ctx,3))throw this.createFailedPredicateException("this.precpred(this._ctx, 3)");this.state=874,this.match(d.T__76),this.state=875,this.expression(0),this.state=876,this.match(d.T__69),this.state=877,this.expression(4);}break;case 13:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=879,!this.precpred(this._ctx,2))throw this.createFailedPredicateException("this.precpred(this._ctx, 2)");this.state=880,s=this._input.LA(1),s===d.T__10||!(s-78&-32)&&1<<s-78&(1<<d.T__77-78|1<<d.T__78-78|1<<d.T__79-78|1<<d.T__80-78|1<<d.T__81-78|1<<d.T__82-78|1<<d.T__83-78|1<<d.T__84-78|1<<d.T__85-78|1<<d.T__86-78)?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=881,this.expression(3);}break;case 14:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=882,!this.precpred(this._ctx,27))throw this.createFailedPredicateException("this.precpred(this._ctx, 27)");this.state=883,s=this._input.LA(1),s===d.T__66||s===d.T__67?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this);}break;case 15:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=884,!this.precpred(this._ctx,25))throw this.createFailedPredicateException("this.precpred(this._ctx, 25)");this.state=885,this.match(d.T__41),this.state=886,this.expression(0),this.state=887,this.match(d.T__42);}break;case 16:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=889,!this.precpred(this._ctx,24))throw this.createFailedPredicateException("this.precpred(this._ctx, 24)");this.state=890,this.match(d.T__41),this.state=892,this._errHandler.sync(this),s=this._input.LA(1),(!(s&-32)&&1<<s&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(s-38&-32)&&1<<s-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(s-71&-32)&&1<<s-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(s-103&-32)&&1<<s-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=891,this.expression(0)),this.state=894,this.match(d.T__69),this.state=896,this._errHandler.sync(this),s=this._input.LA(1),(!(s&-32)&&1<<s&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(s-38&-32)&&1<<s-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(s-71&-32)&&1<<s-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(s-103&-32)&&1<<s-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=895,this.expression(0)),this.state=898,this.match(d.T__42);}break;case 17:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=899,!this.precpred(this._ctx,23))throw this.createFailedPredicateException("this.precpred(this._ctx, 23)");this.state=900,this.match(d.T__44),this.state=901,this.identifier();}break;case 18:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=902,!this.precpred(this._ctx,22))throw this.createFailedPredicateException("this.precpred(this._ctx, 22)");this.state=903,this.match(d.T__14),this.state=904,this.nameValueList(),this.state=905,this.match(d.T__16);}break;case 19:{if(i=new ke(e,r),this.pushNewRecursionContext(i,o,d.RULE_expression),this.state=907,!this.precpred(this._ctx,21))throw this.createFailedPredicateException("this.precpred(this._ctx, 21)");this.state=908,this.match(d.T__22),this.state=909,this.functionCallArguments(),this.state=910,this.match(d.T__23);}break}this.state=916,this._errHandler.sync(this),a=this.interpreter.adaptivePredict(this._input,94,this._ctx);}}}catch(a){if(a instanceof de.RecognitionException)i.exception=a,this._errHandler.reportError(this,a),this._errHandler.recover(this,a);else throw a}finally{this.unrollRecursionContexts(e);}return i}primaryExpression(){let t=new X0(this._ctx,this.state);this.enterRule(t,142,d.RULE_primaryExpression);try{switch(this.state=926,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,95,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=917,this.match(d.BooleanLiteral);break;case 2:this.enterOuterAlt(t,2),this.state=918,this.numberLiteral();break;case 3:this.enterOuterAlt(t,3),this.state=919,this.hexLiteral();break;case 4:this.enterOuterAlt(t,4),this.state=920,this.stringLiteral();break;case 5:this.enterOuterAlt(t,5),this.state=921,this.identifier();break;case 6:this.enterOuterAlt(t,6),this.state=922,this.match(d.TypeKeyword);break;case 7:this.enterOuterAlt(t,7),this.state=923,this.match(d.PayableKeyword);break;case 8:this.enterOuterAlt(t,8),this.state=924,this.tupleExpression();break;case 9:this.enterOuterAlt(t,9),this.state=925,this.typeName(0);break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}expressionList(){let t=new fh(this._ctx,this.state);this.enterRule(t,144,d.RULE_expressionList);let e;try{for(this.enterOuterAlt(t,1),this.state=928,this.expression(0),this.state=933,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=929,this.match(d.T__15),this.state=930,this.expression(0),this.state=935,this._errHandler.sync(this),e=this._input.LA(1);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}nameValueList(){let t=new J0(this._ctx,this.state);this.enterRule(t,146,d.RULE_nameValueList);let e;try{let r;this.enterOuterAlt(t,1);{for(this.state=936,this.nameValue(),this.state=941,this._errHandler.sync(this),r=this.interpreter.adaptivePredict(this._input,97,this._ctx);r!==2&&r!==Wi.ATN.INVALID_ALT_NUMBER;)r===1&&(this.state=937,this.match(d.T__15),this.state=938,this.nameValue()),this.state=943,this._errHandler.sync(this),r=this.interpreter.adaptivePredict(this._input,97,this._ctx);this.state=945,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__15&&(this.state=944,this.match(d.T__15));}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}nameValue(){let t=new D0(this._ctx,this.state);this.enterRule(t,148,d.RULE_nameValue);try{this.enterOuterAlt(t,1),this.state=947,this.identifier(),this.state=948,this.match(d.T__69),this.state=949,this.expression(0);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}functionCallArguments(){let t=new Q0(this._ctx,this.state);this.enterRule(t,150,d.RULE_functionCallArguments);let e;try{switch(this.state=959,this._errHandler.sync(this),this._input.LA(1)){case d.T__14:this.enterOuterAlt(t,1),this.state=951,this.match(d.T__14),this.state=953,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=952,this.nameValueList()),this.state=955,this.match(d.T__16);break;case d.T__5:case d.T__13:case d.T__22:case d.T__23:case d.T__24:case d.T__29:case d.T__30:case d.T__37:case d.T__41:case d.T__43:case d.T__45:case d.T__49:case d.T__61:case d.T__62:case d.T__63:case d.T__64:case d.T__65:case d.T__66:case d.T__67:case d.T__68:case d.T__70:case d.T__71:case d.T__94:case d.Int:case d.Uint:case d.Byte:case d.Fixed:case d.Ufixed:case d.BooleanLiteral:case d.DecimalNumber:case d.HexNumber:case d.HexLiteralFragment:case d.LeaveKeyword:case d.PayableKeyword:case d.TypeKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:case d.StringLiteralFragment:this.enterOuterAlt(t,2),this.state=957,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=956,this.expressionList());break;default:throw new jt.NoViableAltException(this)}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}functionCall(){let t=new ep(this._ctx,this.state);this.enterRule(t,152,d.RULE_functionCall);try{this.enterOuterAlt(t,1),this.state=961,this.expression(0),this.state=962,this.match(d.T__22),this.state=963,this.functionCallArguments(),this.state=964,this.match(d.T__23);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyBlock(){let t=new Ji(this._ctx,this.state);this.enterRule(t,154,d.RULE_assemblyBlock);let e;try{this.enterOuterAlt(t,1);{for(this.state=966,this.match(d.T__14),this.state=970,this._errHandler.sync(this),e=this._input.LA(1);!(e&-32)&&1<<e&(1<<d.T__13|1<<d.T__14|1<<d.T__22|1<<d.T__24|1<<d.T__26)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__43-38|1<<d.T__49-38|1<<d.T__50-38|1<<d.T__58-38|1<<d.T__61-38|1<<d.T__65-38)||!(e-88&-32)&&1<<e-88&(1<<d.T__87-88|1<<d.T__90-88|1<<d.T__94-88|1<<d.BooleanLiteral-88|1<<d.DecimalNumber-88|1<<d.HexNumber-88|1<<d.HexLiteralFragment-88|1<<d.BreakKeyword-88|1<<d.ContinueKeyword-88|1<<d.LeaveKeyword-88|1<<d.PayableKeyword-88)||!(e-124&-32)&&1<<e-124&(1<<d.GlobalKeyword-124|1<<d.ConstructorKeyword-124|1<<d.ReceiveKeyword-124|1<<d.Identifier-124|1<<d.StringLiteralFragment-124);)this.state=967,this.assemblyItem(),this.state=972,this._errHandler.sync(this),e=this._input.LA(1);this.state=973,this.match(d.T__16);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}assemblyItem(){let t=new S0(this._ctx,this.state);this.enterRule(t,156,d.RULE_assemblyItem);try{switch(this.state=992,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,103,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=975,this.identifier();break;case 2:this.enterOuterAlt(t,2),this.state=976,this.assemblyBlock();break;case 3:this.enterOuterAlt(t,3),this.state=977,this.assemblyExpression();break;case 4:this.enterOuterAlt(t,4),this.state=978,this.assemblyLocalDefinition();break;case 5:this.enterOuterAlt(t,5),this.state=979,this.assemblyAssignment();break;case 6:this.enterOuterAlt(t,6),this.state=980,this.assemblyStackAssignment();break;case 7:this.enterOuterAlt(t,7),this.state=981,this.labelDefinition();break;case 8:this.enterOuterAlt(t,8),this.state=982,this.assemblySwitch();break;case 9:this.enterOuterAlt(t,9),this.state=983,this.assemblyFunctionDefinition();break;case 10:this.enterOuterAlt(t,10),this.state=984,this.assemblyFor();break;case 11:this.enterOuterAlt(t,11),this.state=985,this.assemblyIf();break;case 12:this.enterOuterAlt(t,12),this.state=986,this.match(d.BreakKeyword);break;case 13:this.enterOuterAlt(t,13),this.state=987,this.match(d.ContinueKeyword);break;case 14:this.enterOuterAlt(t,14),this.state=988,this.match(d.LeaveKeyword);break;case 15:this.enterOuterAlt(t,15),this.state=989,this.numberLiteral();break;case 16:this.enterOuterAlt(t,16),this.state=990,this.stringLiteral();break;case 17:this.enterOuterAlt(t,17),this.state=991,this.hexLiteral();break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyExpression(){let t=new Hr(this._ctx,this.state);this.enterRule(t,158,d.RULE_assemblyExpression);try{switch(this.state=997,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,104,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=994,this.assemblyCall();break;case 2:this.enterOuterAlt(t,2),this.state=995,this.assemblyLiteral();break;case 3:this.enterOuterAlt(t,3),this.state=996,this.assemblyMember();break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyMember(){let t=new tp(this._ctx,this.state);this.enterRule(t,160,d.RULE_assemblyMember);try{this.enterOuterAlt(t,1),this.state=999,this.identifier(),this.state=1e3,this.match(d.T__44),this.state=1001,this.identifier();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyCall(){let t=new DE(this._ctx,this.state);this.enterRule(t,162,d.RULE_assemblyCall);let e;try{this.enterOuterAlt(t,1);{switch(this.state=1007,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,105,this._ctx)){case 1:this.state=1003,this.match(d.T__58);break;case 2:this.state=1004,this.match(d.T__43);break;case 3:this.state=1005,this.match(d.T__65);break;case 4:this.state=1006,this.identifier();break}switch(this.state=1021,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,108,this._ctx)){case 1:{for(this.state=1009,this.match(d.T__22),this.state=1011,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__58-44|1<<d.T__61-44|1<<d.T__65-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.BooleanLiteral-95|1<<d.DecimalNumber-95|1<<d.HexNumber-95|1<<d.HexLiteralFragment-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||!(e-127&-32)&&1<<e-127&(1<<d.ReceiveKeyword-127|1<<d.Identifier-127|1<<d.StringLiteralFragment-127))&&(this.state=1010,this.assemblyExpression()),this.state=1017,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=1013,this.match(d.T__15),this.state=1014,this.assemblyExpression(),this.state=1019,this._errHandler.sync(this),e=this._input.LA(1);this.state=1020,this.match(d.T__23);}break}}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}assemblyLocalDefinition(){let t=new SE(this._ctx,this.state);this.enterRule(t,164,d.RULE_assemblyLocalDefinition);let e;try{this.enterOuterAlt(t,1),this.state=1023,this.match(d.T__87),this.state=1024,this.assemblyIdentifierOrList(),this.state=1027,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__88&&(this.state=1025,this.match(d.T__88),this.state=1026,this.assemblyExpression());}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}assemblyAssignment(){let t=new RE(this._ctx,this.state);this.enterRule(t,166,d.RULE_assemblyAssignment);try{this.enterOuterAlt(t,1),this.state=1029,this.assemblyIdentifierOrList(),this.state=1030,this.match(d.T__88),this.state=1031,this.assemblyExpression();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyIdentifierOrList(){let t=new rp(this._ctx,this.state);this.enterRule(t,168,d.RULE_assemblyIdentifierOrList);try{switch(this.state=1040,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,110,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=1033,this.identifier();break;case 2:this.enterOuterAlt(t,2),this.state=1034,this.assemblyMember();break;case 3:this.enterOuterAlt(t,3),this.state=1035,this.assemblyIdentifierList();break;case 4:this.enterOuterAlt(t,4),this.state=1036,this.match(d.T__22),this.state=1037,this.assemblyIdentifierList(),this.state=1038,this.match(d.T__23);break}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyIdentifierList(){let t=new dh(this._ctx,this.state);this.enterRule(t,170,d.RULE_assemblyIdentifierList);let e;try{for(this.enterOuterAlt(t,1),this.state=1042,this.identifier(),this.state=1047,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=1043,this.match(d.T__15),this.state=1044,this.identifier(),this.state=1049,this._errHandler.sync(this),e=this._input.LA(1);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}assemblyStackAssignment(){let t=new NE(this._ctx,this.state);this.enterRule(t,172,d.RULE_assemblyStackAssignment);try{this.enterOuterAlt(t,1),this.state=1050,this.assemblyExpression(),this.state=1051,this.match(d.T__89),this.state=1052,this.identifier();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}labelDefinition(){let t=new OE(this._ctx,this.state);this.enterRule(t,174,d.RULE_labelDefinition);try{this.enterOuterAlt(t,1),this.state=1054,this.identifier(),this.state=1055,this.match(d.T__69);}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblySwitch(){let t=new FE(this._ctx,this.state);this.enterRule(t,176,d.RULE_assemblySwitch);let e;try{for(this.enterOuterAlt(t,1),this.state=1057,this.match(d.T__90),this.state=1058,this.assemblyExpression(),this.state=1062,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__91||e===d.T__92;)this.state=1059,this.assemblyCase(),this.state=1064,this._errHandler.sync(this),e=this._input.LA(1);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}assemblyCase(){let t=new R0(this._ctx,this.state);this.enterRule(t,178,d.RULE_assemblyCase);try{switch(this.state=1071,this._errHandler.sync(this),this._input.LA(1)){case d.T__91:this.enterOuterAlt(t,1),this.state=1065,this.match(d.T__91),this.state=1066,this.assemblyLiteral(),this.state=1067,this.assemblyBlock();break;case d.T__92:this.enterOuterAlt(t,2),this.state=1069,this.match(d.T__92),this.state=1070,this.assemblyBlock();break;default:throw new jt.NoViableAltException(this)}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyFunctionDefinition(){let t=new LE(this._ctx,this.state);this.enterRule(t,180,d.RULE_assemblyFunctionDefinition);let e;try{this.enterOuterAlt(t,1),this.state=1073,this.match(d.T__37),this.state=1074,this.identifier(),this.state=1075,this.match(d.T__22),this.state=1077,this._errHandler.sync(this),e=this._input.LA(1),(e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier)&&(this.state=1076,this.assemblyIdentifierList()),this.state=1079,this.match(d.T__23),this.state=1081,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__93&&(this.state=1080,this.assemblyFunctionReturns()),this.state=1083,this.assemblyBlock();}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}assemblyFunctionReturns(){let t=new PE(this._ctx,this.state);this.enterRule(t,182,d.RULE_assemblyFunctionReturns);try{this.enterOuterAlt(t,1),this.state=1085,this.match(d.T__93),this.state=1086,this.assemblyIdentifierList();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyFor(){let t=new IE(this._ctx,this.state);this.enterRule(t,184,d.RULE_assemblyFor);try{this.enterOuterAlt(t,1);{switch(this.state=1088,this.match(d.T__26),this.state=1091,this._errHandler.sync(this),this._input.LA(1)){case d.T__14:this.state=1089,this.assemblyBlock();break;case d.T__13:case d.T__24:case d.T__43:case d.T__49:case d.T__58:case d.T__61:case d.T__65:case d.T__94:case d.BooleanLiteral:case d.DecimalNumber:case d.HexNumber:case d.HexLiteralFragment:case d.LeaveKeyword:case d.PayableKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:case d.StringLiteralFragment:this.state=1090,this.assemblyExpression();break;default:throw new jt.NoViableAltException(this)}switch(this.state=1093,this.assemblyExpression(),this.state=1096,this._errHandler.sync(this),this._input.LA(1)){case d.T__14:this.state=1094,this.assemblyBlock();break;case d.T__13:case d.T__24:case d.T__43:case d.T__49:case d.T__58:case d.T__61:case d.T__65:case d.T__94:case d.BooleanLiteral:case d.DecimalNumber:case d.HexNumber:case d.HexLiteralFragment:case d.LeaveKeyword:case d.PayableKeyword:case d.GlobalKeyword:case d.ConstructorKeyword:case d.ReceiveKeyword:case d.Identifier:case d.StringLiteralFragment:this.state=1095,this.assemblyExpression();break;default:throw new jt.NoViableAltException(this)}this.state=1098,this.assemblyBlock();}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyIf(){let t=new kE(this._ctx,this.state);this.enterRule(t,186,d.RULE_assemblyIf);try{this.enterOuterAlt(t,1),this.state=1100,this.match(d.T__50),this.state=1101,this.assemblyExpression(),this.state=1102,this.assemblyBlock();}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}assemblyLiteral(){let t=new ip(this._ctx,this.state);this.enterRule(t,188,d.RULE_assemblyLiteral);try{switch(this.state=1109,this._errHandler.sync(this),this._input.LA(1)){case d.StringLiteralFragment:this.enterOuterAlt(t,1),this.state=1104,this.stringLiteral();break;case d.DecimalNumber:this.enterOuterAlt(t,2),this.state=1105,this.match(d.DecimalNumber);break;case d.HexNumber:this.enterOuterAlt(t,3),this.state=1106,this.match(d.HexNumber);break;case d.HexLiteralFragment:this.enterOuterAlt(t,4),this.state=1107,this.hexLiteral();break;case d.BooleanLiteral:this.enterOuterAlt(t,5),this.state=1108,this.match(d.BooleanLiteral);break;default:throw new jt.NoViableAltException(this)}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}tupleExpression(){let t=new ME(this._ctx,this.state);this.enterRule(t,190,d.RULE_tupleExpression);let e;try{switch(this.state=1137,this._errHandler.sync(this),this._input.LA(1)){case d.T__22:this.enterOuterAlt(t,1);{for(this.state=1111,this.match(d.T__22),this.state=1113,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=1112,this.expression(0)),this.state=1121,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=1115,this.match(d.T__15),this.state=1117,this._errHandler.sync(this),e=this._input.LA(1),(!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))&&(this.state=1116,this.expression(0)),this.state=1123,this._errHandler.sync(this),e=this._input.LA(1);this.state=1124,this.match(d.T__23);}break;case d.T__41:this.enterOuterAlt(t,2);{if(this.state=1125,this.match(d.T__41),this.state=1134,this._errHandler.sync(this),e=this._input.LA(1),!(e&-32)&&1<<e&(1<<d.T__5|1<<d.T__13|1<<d.T__22|1<<d.T__24|1<<d.T__29|1<<d.T__30)||!(e-38&-32)&&1<<e-38&(1<<d.T__37-38|1<<d.T__41-38|1<<d.T__43-38|1<<d.T__45-38|1<<d.T__49-38|1<<d.T__61-38|1<<d.T__62-38|1<<d.T__63-38|1<<d.T__64-38|1<<d.T__65-38|1<<d.T__66-38|1<<d.T__67-38|1<<d.T__68-38)||!(e-71&-32)&&1<<e-71&(1<<d.T__70-71|1<<d.T__71-71|1<<d.T__94-71|1<<d.Int-71|1<<d.Uint-71|1<<d.Byte-71|1<<d.Fixed-71|1<<d.Ufixed-71|1<<d.BooleanLiteral-71)||!(e-103&-32)&&1<<e-103&(1<<d.DecimalNumber-103|1<<d.HexNumber-103|1<<d.HexLiteralFragment-103|1<<d.LeaveKeyword-103|1<<d.PayableKeyword-103|1<<d.TypeKeyword-103|1<<d.GlobalKeyword-103|1<<d.ConstructorKeyword-103|1<<d.ReceiveKeyword-103|1<<d.Identifier-103|1<<d.StringLiteralFragment-103))for(this.state=1126,this.expression(0),this.state=1131,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=1127,this.match(d.T__15),this.state=1128,this.expression(0),this.state=1133,this._errHandler.sync(this),e=this._input.LA(1);this.state=1136,this.match(d.T__42);}break;default:throw new jt.NoViableAltException(this)}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}numberLiteral(){let t=new np(this._ctx,this.state);this.enterRule(t,192,d.RULE_numberLiteral);let e;try{switch(this.enterOuterAlt(t,1),this.state=1139,e=this._input.LA(1),e===d.DecimalNumber||e===d.HexNumber?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=1141,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,125,this._ctx)){case 1:this.state=1140,this.match(d.NumberUnit);break}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}identifier(){let t=new je(this._ctx,this.state);this.enterRule(t,194,d.RULE_identifier);let e;try{this.enterOuterAlt(t,1),this.state=1143,e=this._input.LA(1),e===d.T__13||e===d.T__24||!(e-44&-32)&&1<<e-44&(1<<d.T__43-44|1<<d.T__49-44|1<<d.T__61-44)||!(e-95&-32)&&1<<e-95&(1<<d.T__94-95|1<<d.LeaveKeyword-95|1<<d.PayableKeyword-95|1<<d.GlobalKeyword-95|1<<d.ConstructorKeyword-95)||e===d.ReceiveKeyword||e===d.Identifier?(this._input.LA(1)===Yt.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this);}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}hexLiteral(){let t=new ph(this._ctx,this.state);this.enterRule(t,196,d.RULE_hexLiteral);try{let e;this.enterOuterAlt(t,1);{this.state=1146,this._errHandler.sync(this),e=1;do{switch(e){case 1:this.state=1145,this.match(d.HexLiteralFragment);break;default:throw new jt.NoViableAltException(this)}this.state=1148,this._errHandler.sync(this),e=this.interpreter.adaptivePredict(this._input,126,this._ctx);}while(e!==2&&e!==Wi.ATN.INVALID_ALT_NUMBER)}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}overrideSpecifier(){let t=new ns(this._ctx,this.state);this.enterRule(t,198,d.RULE_overrideSpecifier);let e;try{if(this.enterOuterAlt(t,1),this.state=1150,this.match(d.T__95),this.state=1162,this._errHandler.sync(this),e=this._input.LA(1),e===d.T__22){for(this.state=1151,this.match(d.T__22),this.state=1152,this.userDefinedTypeName(),this.state=1157,this._errHandler.sync(this),e=this._input.LA(1);e===d.T__15;)this.state=1153,this.match(d.T__15),this.state=1154,this.userDefinedTypeName(),this.state=1159,this._errHandler.sync(this),e=this._input.LA(1);this.state=1160,this.match(d.T__23);}}catch(r){if(r instanceof de.RecognitionException)t.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule();}return t}stringLiteral(){let t=new ka(this._ctx,this.state);this.enterRule(t,200,d.RULE_stringLiteral);try{let e;this.enterOuterAlt(t,1);{this.state=1165,this._errHandler.sync(this),e=1;do{switch(e){case 1:this.state=1164,this.match(d.StringLiteralFragment);break;default:throw new jt.NoViableAltException(this)}this.state=1167,this._errHandler.sync(this),e=this.interpreter.adaptivePredict(this._input,129,this._ctx);}while(e!==2&&e!==Wi.ATN.INVALID_ALT_NUMBER)}}catch(e){if(e instanceof de.RecognitionException)t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e);else throw e}finally{this.exitRule();}return t}sempred(t,e,r){switch(e){case 38:return this.typeName_sempred(t,r);case 70:return this.expression_sempred(t,r)}return !0}typeName_sempred(t,e){switch(e){case 0:return this.precpred(this._ctx,3)}return !0}expression_sempred(t,e){switch(e){case 1:return this.precpred(this._ctx,14);case 2:return this.precpred(this._ctx,13);case 3:return this.precpred(this._ctx,12);case 4:return this.precpred(this._ctx,11);case 5:return this.precpred(this._ctx,10);case 6:return this.precpred(this._ctx,9);case 7:return this.precpred(this._ctx,8);case 8:return this.precpred(this._ctx,7);case 9:return this.precpred(this._ctx,6);case 10:return this.precpred(this._ctx,5);case 11:return this.precpred(this._ctx,4);case 12:return this.precpred(this._ctx,3);case 13:return this.precpred(this._ctx,2);case 14:return this.precpred(this._ctx,27);case 15:return this.precpred(this._ctx,25);case 16:return this.precpred(this._ctx,24);case 17:return this.precpred(this._ctx,23);case 18:return this.precpred(this._ctx,22);case 19:return this.precpred(this._ctx,21)}return !0}static get _ATN(){return d.__ATN||(d.__ATN=new w8.ATNDeserializer().deserialize(Kv.toCharArray(d._serializedATN))),d.__ATN}},O=d;O.T__0=1;O.T__1=2;O.T__2=3;O.T__3=4;O.T__4=5;O.T__5=6;O.T__6=7;O.T__7=8;O.T__8=9;O.T__9=10;O.T__10=11;O.T__11=12;O.T__12=13;O.T__13=14;O.T__14=15;O.T__15=16;O.T__16=17;O.T__17=18;O.T__18=19;O.T__19=20;O.T__20=21;O.T__21=22;O.T__22=23;O.T__23=24;O.T__24=25;O.T__25=26;O.T__26=27;O.T__27=28;O.T__28=29;O.T__29=30;O.T__30=31;O.T__31=32;O.T__32=33;O.T__33=34;O.T__34=35;O.T__35=36;O.T__36=37;O.T__37=38;O.T__38=39;O.T__39=40;O.T__40=41;O.T__41=42;O.T__42=43;O.T__43=44;O.T__44=45;O.T__45=46;O.T__46=47;O.T__47=48;O.T__48=49;O.T__49=50;O.T__50=51;O.T__51=52;O.T__52=53;O.T__53=54;O.T__54=55;O.T__55=56;O.T__56=57;O.T__57=58;O.T__58=59;O.T__59=60;O.T__60=61;O.T__61=62;O.T__62=63;O.T__63=64;O.T__64=65;O.T__65=66;O.T__66=67;O.T__67=68;O.T__68=69;O.T__69=70;O.T__70=71;O.T__71=72;O.T__72=73;O.T__73=74;O.T__74=75;O.T__75=76;O.T__76=77;O.T__77=78;O.T__78=79;O.T__79=80;O.T__80=81;O.T__81=82;O.T__82=83;O.T__83=84;O.T__84=85;O.T__85=86;O.T__86=87;O.T__87=88;O.T__88=89;O.T__89=90;O.T__90=91;O.T__91=92;O.T__92=93;O.T__93=94;O.T__94=95;O.T__95=96;O.Int=97;O.Uint=98;O.Byte=99;O.Fixed=100;O.Ufixed=101;O.BooleanLiteral=102;O.DecimalNumber=103;O.HexNumber=104;O.NumberUnit=105;O.HexLiteralFragment=106;O.ReservedKeyword=107;O.AnonymousKeyword=108;O.BreakKeyword=109;O.ConstantKeyword=110;O.ImmutableKeyword=111;O.ContinueKeyword=112;O.LeaveKeyword=113;O.ExternalKeyword=114;O.IndexedKeyword=115;O.InternalKeyword=116;O.PayableKeyword=117;O.PrivateKeyword=118;O.PublicKeyword=119;O.VirtualKeyword=120;O.PureKeyword=121;O.TypeKeyword=122;O.ViewKeyword=123;O.GlobalKeyword=124;O.ConstructorKeyword=125;O.FallbackKeyword=126;O.ReceiveKeyword=127;O.Identifier=128;O.StringLiteralFragment=129;O.VersionLiteral=130;O.WS=131;O.COMMENT=132;O.LINE_COMMENT=133;O.RULE_sourceUnit=0;O.RULE_pragmaDirective=1;O.RULE_pragmaName=2;O.RULE_pragmaValue=3;O.RULE_version=4;O.RULE_versionOperator=5;O.RULE_versionConstraint=6;O.RULE_importDeclaration=7;O.RULE_importDirective=8;O.RULE_importPath=9;O.RULE_contractDefinition=10;O.RULE_inheritanceSpecifier=11;O.RULE_contractPart=12;O.RULE_stateVariableDeclaration=13;O.RULE_fileLevelConstant=14;O.RULE_customErrorDefinition=15;O.RULE_typeDefinition=16;O.RULE_usingForDeclaration=17;O.RULE_usingForObject=18;O.RULE_usingForObjectDirective=19;O.RULE_userDefinableOperators=20;O.RULE_structDefinition=21;O.RULE_modifierDefinition=22;O.RULE_modifierInvocation=23;O.RULE_functionDefinition=24;O.RULE_functionDescriptor=25;O.RULE_returnParameters=26;O.RULE_modifierList=27;O.RULE_eventDefinition=28;O.RULE_enumValue=29;O.RULE_enumDefinition=30;O.RULE_parameterList=31;O.RULE_parameter=32;O.RULE_eventParameterList=33;O.RULE_eventParameter=34;O.RULE_functionTypeParameterList=35;O.RULE_functionTypeParameter=36;O.RULE_variableDeclaration=37;O.RULE_typeName=38;O.RULE_userDefinedTypeName=39;O.RULE_mappingKey=40;O.RULE_mapping=41;O.RULE_mappingKeyName=42;O.RULE_mappingValueName=43;O.RULE_functionTypeName=44;O.RULE_storageLocation=45;O.RULE_stateMutability=46;O.RULE_block=47;O.RULE_statement=48;O.RULE_expressionStatement=49;O.RULE_ifStatement=50;O.RULE_tryStatement=51;O.RULE_catchClause=52;O.RULE_whileStatement=53;O.RULE_simpleStatement=54;O.RULE_uncheckedStatement=55;O.RULE_forStatement=56;O.RULE_inlineAssemblyStatement=57;O.RULE_inlineAssemblyStatementFlag=58;O.RULE_doWhileStatement=59;O.RULE_continueStatement=60;O.RULE_breakStatement=61;O.RULE_returnStatement=62;O.RULE_throwStatement=63;O.RULE_emitStatement=64;O.RULE_revertStatement=65;O.RULE_variableDeclarationStatement=66;O.RULE_variableDeclarationList=67;O.RULE_identifierList=68;O.RULE_elementaryTypeName=69;O.RULE_expression=70;O.RULE_primaryExpression=71;O.RULE_expressionList=72;O.RULE_nameValueList=73;O.RULE_nameValue=74;O.RULE_functionCallArguments=75;O.RULE_functionCall=76;O.RULE_assemblyBlock=77;O.RULE_assemblyItem=78;O.RULE_assemblyExpression=79;O.RULE_assemblyMember=80;O.RULE_assemblyCall=81;O.RULE_assemblyLocalDefinition=82;O.RULE_assemblyAssignment=83;O.RULE_assemblyIdentifierOrList=84;O.RULE_assemblyIdentifierList=85;O.RULE_assemblyStackAssignment=86;O.RULE_labelDefinition=87;O.RULE_assemblySwitch=88;O.RULE_assemblyCase=89;O.RULE_assemblyFunctionDefinition=90;O.RULE_assemblyFunctionReturns=91;O.RULE_assemblyFor=92;O.RULE_assemblyIf=93;O.RULE_assemblyLiteral=94;O.RULE_tupleExpression=95;O.RULE_numberLiteral=96;O.RULE_identifier=97;O.RULE_hexLiteral=98;O.RULE_overrideSpecifier=99;O.RULE_stringLiteral=100;O.ruleNames=["sourceUnit","pragmaDirective","pragmaName","pragmaValue","version","versionOperator","versionConstraint","importDeclaration","importDirective","importPath","contractDefinition","inheritanceSpecifier","contractPart","stateVariableDeclaration","fileLevelConstant","customErrorDefinition","typeDefinition","usingForDeclaration","usingForObject","usingForObjectDirective","userDefinableOperators","structDefinition","modifierDefinition","modifierInvocation","functionDefinition","functionDescriptor","returnParameters","modifierList","eventDefinition","enumValue","enumDefinition","parameterList","parameter","eventParameterList","eventParameter","functionTypeParameterList","functionTypeParameter","variableDeclaration","typeName","userDefinedTypeName","mappingKey","mapping","mappingKeyName","mappingValueName","functionTypeName","storageLocation","stateMutability","block","statement","expressionStatement","ifStatement","tryStatement","catchClause","whileStatement","simpleStatement","uncheckedStatement","forStatement","inlineAssemblyStatement","inlineAssemblyStatementFlag","doWhileStatement","continueStatement","breakStatement","returnStatement","throwStatement","emitStatement","revertStatement","variableDeclarationStatement","variableDeclarationList","identifierList","elementaryTypeName","expression","primaryExpression","expressionList","nameValueList","nameValue","functionCallArguments","functionCall","assemblyBlock","assemblyItem","assemblyExpression","assemblyMember","assemblyCall","assemblyLocalDefinition","assemblyAssignment","assemblyIdentifierOrList","assemblyIdentifierList","assemblyStackAssignment","labelDefinition","assemblySwitch","assemblyCase","assemblyFunctionDefinition","assemblyFunctionReturns","assemblyFor","assemblyIf","assemblyLiteral","tupleExpression","numberLiteral","identifier","hexLiteral","overrideSpecifier","stringLiteral"];O._LITERAL_NAMES=[void 0,"'pragma'","';'","'*'","'||'","'^'","'~'","'>='","'>'","'<'","'<='","'='","'as'","'import'","'from'","'{'","','","'}'","'abstract'","'contract'","'interface'","'library'","'is'","'('","')'","'error'","'using'","'for'","'|'","'&'","'+'","'-'","'/'","'%'","'=='","'!='","'struct'","'modifier'","'function'","'returns'","'event'","'enum'","'['","']'","'address'","'.'","'mapping'","'=>'","'memory'","'storage'","'calldata'","'if'","'else'","'try'","'catch'","'while'","'unchecked'","'assembly'","'do'","'return'","'throw'","'emit'","'revert'","'var'","'bool'","'string'","'byte'","'++'","'--'","'new'","':'","'delete'","'!'","'**'","'<<'","'>>'","'&&'","'?'","'|='","'^='","'&='","'<<='","'>>='","'+='","'-='","'*='","'/='","'%='","'let'","':='","'=:'","'switch'","'case'","'default'","'->'","'callback'","'override'",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"'anonymous'","'break'","'constant'","'immutable'","'continue'","'leave'","'external'","'indexed'","'internal'","'payable'","'private'","'public'","'virtual'","'pure'","'type'","'view'","'global'","'constructor'","'fallback'","'receive'"];O._SYMBOLIC_NAMES=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"Int","Uint","Byte","Fixed","Ufixed","BooleanLiteral","DecimalNumber","HexNumber","NumberUnit","HexLiteralFragment","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","StringLiteralFragment","VersionLiteral","WS","COMMENT","LINE_COMMENT"];O.VOCABULARY=new N8.VocabularyImpl(d._LITERAL_NAMES,d._SYMBOLIC_NAMES,[]);O._serializedATNSegments=3;O._serializedATNSegment0=`\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x87\u0494 \x07 \x07\b \b
|
|
136
|
+
|
|
137
|
+
\v \v\f \f\r \r \x1B \x1B ! !" "# #$ $% %& &' '( () )* *+ +, ,- -. ./ /0 01 12 23 34 45 56 67 78 89 9: :; ;< <= => >? ?@ @A AB BC CD DE EF FG GH HI IJ JK KL LM MN NO OP PQ QR RS ST TU UV VW WX XY YZ Z[ [\\ \\] ]^ ^_ _\` \`a ab bc cd de ef f\x07\xD8
|
|
138
|
+
\f\xDB\v\xE9
|
|
139
|
+
\xED
|
|
140
|
+
\x07\xF0
|
|
141
|
+
\f\xF3\v\x07\x07\b\b\xF8
|
|
142
|
+
\b\b\b\b\xFC
|
|
143
|
+
\b\b\b\xFF
|
|
144
|
+
\b \u0104
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
\u010A
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
\u0111
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
\u0115
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
\x07
|
|
175
|
+
\u0120
|
|
176
|
+
|
|
177
|
+
\f
|
|
178
|
+
|
|
179
|
+
\u0123\v
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
\u012A
|
|
187
|
+
|
|
188
|
+
\v\v\f\f\u012F
|
|
189
|
+
\f\f\f\f\f\f\f\x07\f\u0137
|
|
190
|
+
\f\f\f\f\u013A\v\f\f\u013C
|
|
191
|
+
\f\f\f\x07\f\u0140
|
|
192
|
+
\f\f\f\f\u0143\v\f\f\f\r\r\r\r\u014A
|
|
193
|
+
\r\r\r\u014D
|
|
194
|
+
\r\u0158
|
|
195
|
+
\x07\u0161
|
|
196
|
+
\f\u0164\v\u0169
|
|
197
|
+
\u0184
|
|
198
|
+
\u0187
|
|
199
|
+
\x07\u0190
|
|
200
|
+
\f\u0193\v\u0197
|
|
201
|
+
\u019C
|
|
202
|
+
\x07\u01A8
|
|
203
|
+
\f\u01AB\v\u01AD
|
|
204
|
+
\u01B4
|
|
205
|
+
\x07\u01B8
|
|
206
|
+
\f\u01BB\v\u01BF
|
|
207
|
+
\u01C4
|
|
208
|
+
\u01C7
|
|
209
|
+
\u01CD
|
|
210
|
+
\u01D1
|
|
211
|
+
\x1B\x1B\x1B\u01D5
|
|
212
|
+
\x1B\x1B\x1B\x1B\x1B\u01DA
|
|
213
|
+
\x1B\x07\u01E7
|
|
214
|
+
\f\u01EA\v\u01F0
|
|
215
|
+
\u01FA
|
|
216
|
+
\x07 \u01FE
|
|
217
|
+
\f \u0201\v !!!!\x07!\u0209
|
|
218
|
+
!\f!!\u020C\v!!\u020E
|
|
219
|
+
!!!"""\u0214
|
|
220
|
+
"""\u0217
|
|
221
|
+
"####\x07#\u021D
|
|
222
|
+
#\f##\u0220\v##\u0222
|
|
223
|
+
###$$$\u0228
|
|
224
|
+
$$$\u022B
|
|
225
|
+
$%%%%\x07%\u0231
|
|
226
|
+
%\f%%\u0234\v%%\u0236
|
|
227
|
+
%%%&&&\u023C
|
|
228
|
+
&'''\u0240
|
|
229
|
+
'''((((((((\u024B
|
|
230
|
+
(((((\u0250
|
|
231
|
+
((\x07(\u0253
|
|
232
|
+
(\f((\u0256\v()))\x07)\u025B
|
|
233
|
+
)\f))\u025E\v)***\u0262
|
|
234
|
+
*+++++\u0268
|
|
235
|
+
+++++\u026D
|
|
236
|
+
+++,,--.....\x07.\u027A
|
|
237
|
+
.\f..\u027D\v....\u0281
|
|
238
|
+
.//0011\x071\u0289
|
|
239
|
+
1\f11\u028C\v1112222222222222222\u029F
|
|
240
|
+
233344444444\u02AB
|
|
241
|
+
45555\u02B0
|
|
242
|
+
5555\u02B4
|
|
243
|
+
5\r55\u02B5666\u02BA
|
|
244
|
+
666\u02BD
|
|
245
|
+
666777777888\u02C9
|
|
246
|
+
8999:::::\u02D2
|
|
247
|
+
::::\u02D6
|
|
248
|
+
:::\u02D9
|
|
249
|
+
::::;;;\u02E0
|
|
250
|
+
;;;;;;\u02E6
|
|
251
|
+
;;;<<========>>>???@@@\u02FC
|
|
252
|
+
@@@AAABBBBCCCCDDDDDDDD\u0312
|
|
253
|
+
DDDD\u0316
|
|
254
|
+
DDDEE\u031B
|
|
255
|
+
EEEE\u031F
|
|
256
|
+
E\x07E\u0321
|
|
257
|
+
E\fEE\u0324\vEFFF\u0328
|
|
258
|
+
FF\x07F\u032B
|
|
259
|
+
F\fFF\u032E\vFFF\u0331
|
|
260
|
+
FFFGGHHHHHHHHHHHHHHHHHHH\u0349
|
|
261
|
+
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH\u037F
|
|
262
|
+
HHHH\u0383
|
|
263
|
+
HHHHHHHHHHHHHHH\x07H\u0393
|
|
264
|
+
H\fHH\u0396\vHIIIIIIIIII\u03A1
|
|
265
|
+
IJJJ\x07J\u03A6
|
|
266
|
+
J\fJJ\u03A9\vJKKK\x07K\u03AE
|
|
267
|
+
K\fKK\u03B1\vKKK\u03B4
|
|
268
|
+
KLLLLMMM\u03BC
|
|
269
|
+
MMMM\u03C0
|
|
270
|
+
MM\u03C2
|
|
271
|
+
MNNNNNOO\x07O\u03CB
|
|
272
|
+
O\fOO\u03CE\vOOOPPPPPPPPPPPPPPPPPP\u03E3
|
|
273
|
+
PQQQQ\u03E8
|
|
274
|
+
QRRRRSSSSS\u03F2
|
|
275
|
+
SSSS\u03F6
|
|
276
|
+
SSS\x07S\u03FA
|
|
277
|
+
S\fSS\u03FD\vSSS\u0400
|
|
278
|
+
STTTTT\u0406
|
|
279
|
+
TUUUUVVVVVVVV\u0413
|
|
280
|
+
VWWW\x07W\u0418
|
|
281
|
+
W\fWW\u041B\vWXXXXYYYZZZ\x07Z\u0427
|
|
282
|
+
Z\fZZ\u042A\vZ[[[[[[[\u0432
|
|
283
|
+
[\\\\\\\\\\\u0438
|
|
284
|
+
\\\\\\\\\u043C
|
|
285
|
+
\\\\\\]]]^^^^\u0446
|
|
286
|
+
^^^^^\u044B
|
|
287
|
+
^^^____\`\`\`\`\`\`\u0458
|
|
288
|
+
\`aaa\u045C
|
|
289
|
+
aaaa\u0460
|
|
290
|
+
a\x07a\u0462
|
|
291
|
+
a\faa\u0465\vaaaaaa\x07a\u046C
|
|
292
|
+
a\faa\u046F\vaa\u0471
|
|
293
|
+
aaa\u0474
|
|
294
|
+
abbb\u0478
|
|
295
|
+
bccdd\u047D
|
|
296
|
+
d\rdd\u047Eeeeee\x07e\u0486
|
|
297
|
+
e\fee\u0489\veeee\u048D
|
|
298
|
+
eff\u0490
|
|
299
|
+
f\rff\u0491fN\x8Eg\b
|
|
300
|
+
\f "$&(*,.02468:<>@BDFHJLNPRTVXZ\\^\`bdfhjlnprtvxz|~\x80\x82\x84\x86\x88\x8A\x8C\x8E\x90\x92\x94\x96\x98\x9A\x9C\x9E\xA0\xA2\xA4\xA6\xA8\xAA\xAC\xAE\xB0\xB2\xB4\xB6\xB8\xBA\xBC\xBE\xC0\xC2\xC4\xC6\xC8\xCA\x07\r\x07\f%24ppww{{}}..ADcgEF !"#LM \f$%\r\rPYij\f\x1B\x1B..44@@aassww~\x7F\x81\x82\u0515\xD9\xDE\xE3\b\xE8
|
|
301
|
+
\xEA\f\xF4\xFE\u0100\u0129\u012B\u012E\u0146\u0157\u0159\u016C \u0173"\u0178$\u017E&\u0196(\u0198*\u019D,\u019F.\u01B00\u01C02\u01C84\u01D96\u01DB8\u01E8:\u01EB<\u01F3>\u01F5@\u0204B\u0211D\u0218F\u0225H\u022CJ\u0239L\u023DN\u024AP\u0257R\u0261T\u0263V\u0270X\u0272Z\u0274\\\u0282^\u0284\`\u0286b\u029Ed\u02A0f\u02A3h\u02ACj\u02B7l\u02C0n\u02C8p\u02CAr\u02CDt\u02DDv\u02E9x\u02EBz\u02F3|\u02F6~\u02F9\x80\u02FF\x82\u0302\x84\u0306\x86\u0311\x88\u031A\x8A\u0325\x8C\u0334\x8E\u0348\x90\u03A0\x92\u03A2\x94\u03AA\x96\u03B5\x98\u03C1\x9A\u03C3\x9C\u03C8\x9E\u03E2\xA0\u03E7\xA2\u03E9\xA4\u03F1\xA6\u0401\xA8\u0407\xAA\u0412\xAC\u0414\xAE\u041C\xB0\u0420\xB2\u0423\xB4\u0431\xB6\u0433\xB8\u043F\xBA\u0442\xBC\u044E\xBE\u0457\xC0\u0473\xC2\u0475\xC4\u0479\xC6\u047C\xC8\u0480\xCA\u048F\xCC\xD8\xCD\xD8
|
|
302
|
+
\xCE\xD8\f\xCF\xD8> \xD0\xD8:\xD1\xD8,\xD2\xD82\xD3\xD8\xD4\xD8 \xD5\xD8"\xD6\xD8$\xD7\xCC\xD7\xCD\xD7\xCE\xD7\xCF\xD7\xD0\xD7\xD1\xD7\xD2\xD7\xD3\xD7\xD4\xD7\xD5\xD7\xD6\xD8\xDB\xD9\xD7\xD9\xDA\xDA\xDC\xDB\xD9\xDC\xDD\x07\xDD\xDE\xDF\x07\xDF\xE0\xE0\xE1\b\xE1\xE2\x07\xE2\xE3\xE4\xC4c\xE4\x07\xE5\xE9\x07\xE6\xE9
|
|
303
|
+
\xE7\xE9\x8EH\xE8\xE5\xE8\xE6\xE8\xE7\xE9 \xEA\xF1\b\xEB\xED\x07\xEC\xEB\xEC\xED\xED\xEE\xEE\xF0\b\xEF\xEC\xF0\xF3\xF1\xEF\xF1\xF2\xF2\v\xF3\xF1\xF4\xF5 \xF5\r\xF6\xF8\f\x07\xF7\xF6\xF7\xF8\xF8\xF9\xF9\xFF\x07\x84\xFA\xFC\f\x07\xFB\xFA\xFB\xFC\xFC\xFD\xFD\xFF\x07i\xFE\xF7\xFE\xFB\xFF\u0100\u0103\xC4c\u0101\u0102\x07\u0102\u0104\xC4c\u0103\u0101\u0103\u0104\u0104\u0105\u0106\x07\u0106\u0109\v\u0107\u0108\x07\u0108\u010A\xC4c\u0109\u0107\u0109\u010A\u010A\u010B\u010B\u010C\x07\u010C\u012A\u010D\u0110\x07\u010E\u0111\x07\u010F\u0111\xC4c\u0110\u010E\u0110\u010F\u0111\u0114\u0112\u0113\x07\u0113\u0115\xC4c\u0114\u0112\u0114\u0115\u0115\u0116\u0116\u0117\x07\u0117\u0118\v\u0118\u0119\x07\u0119\u012A\u011A\u011B\x07\u011B\u011C\x07\u011C\u0121 \u011D\u011E\x07\u011E\u0120 \u011F\u011D\u0120\u0123\u0121\u011F\u0121\u0122\u0122\u0124\u0123\u0121\u0124\u0125\x07\u0125\u0126\x07\u0126\u0127\v\u0127\u0128\x07\u0128\u012A\u0129\u0105\u0129\u010D\u0129\u011A\u012A\u012B\u012C\x07\x83\u012C\u012D\u012F\x07\u012E\u012D\u012E\u012F\u012F\u0130\u0130\u0131 \u0131\u013B\xC4c\u0132\u0133\x07\u0133\u0138\r\u0134\u0135\x07\u0135\u0137\r\u0136\u0134\u0137\u013A\u0138\u0136\u0138\u0139\u0139\u013C\u013A\u0138\u013B\u0132\u013B\u013C\u013C\u013D\u013D\u0141\x07\u013E\u0140\u013F\u013E\u0140\u0143\u0141\u013F\u0141\u0142\u0142\u0144\u0143\u0141\u0144\u0145\x07\u0145\u0146\u014CP)\u0147\u0149\x07\u0148\u014A\x92J\u0149\u0148\u0149\u014A\u014A\u014B\u014B\u014D\x07\u014C\u0147\u014C\u014D\u014D\u014E\u0158\u014F\u0158$\u0150\u0158,\u0151\u0158.\u0152\u01582\u0153\u0158:\u0154\u0158> \u0155\u0158 \u0156\u0158"\u0157\u014E\u0157\u014F\u0157\u0150\u0157\u0151\u0157\u0152\u0157\u0153\u0157\u0154\u0157\u0155\u0157\u0156\u0158\x1B\u0159\u0162N(\u015A\u0161\x07y\u015B\u0161\x07v\u015C\u0161\x07x\u015D\u0161\x07p\u015E\u0161\x07q\u015F\u0161\xC8e\u0160\u015A\u0160\u015B\u0160\u015C\u0160\u015D\u0160\u015E\u0160\u015F\u0161\u0164\u0162\u0160\u0162\u0163\u0163\u0165\u0164\u0162\u0165\u0168\xC4c\u0166\u0167\x07\r\u0167\u0169\x8EH\u0168\u0166\u0168\u0169\u0169\u016A\u016A\u016B\x07\u016B\u016C\u016DN(\u016D\u016E\x07p\u016E\u016F\xC4c\u016F\u0170\x07\r\u0170\u0171\x8EH\u0171\u0172\x07\u0172\u0173\u0174\x07\x1B\u0174\u0175\xC4c\u0175\u0176@!\u0176\u0177\x07\u0177!\u0178\u0179\x07|\u0179\u017A\xC4c\u017A\u017B\x07\u017B\u017C\x8CG\u017C\u017D\x07\u017D#\u017E\u017F\x07\u017F\u0180&\u0180\u0183\x07\u0181\u0184\x07\u0182\u0184N(\u0183\u0181\u0183\u0182\u0184\u0186\u0185\u0187\x07~\u0186\u0185\u0186\u0187\u0187\u0188\u0188\u0189\x07\u0189%\u018A\u0197P)\u018B\u018C\x07\u018C\u0191(\u018D\u018E\x07\u018E\u0190(\u018F\u018D\u0190\u0193\u0191\u018F\u0191\u0192\u0192\u0194\u0193\u0191\u0194\u0195\x07\u0195\u0197\u0196\u018A\u0196\u018B\u0197'\u0198\u019BP)\u0199\u019A\x07\u019A\u019C*\u019B\u0199\u019B\u019C\u019C)\u019D\u019E \u019E+\u019F\u01A0\x07&`;O._serializedATNSegment1="\u01A0\u01A1\xC4c\u01A1\u01AC\x07\u01A2\u01A3L'\u01A3\u01A9\x07\u01A4\u01A5L'\u01A5\u01A6\x07\u01A6\u01A8\u01A7\u01A4\u01A8\u01AB\u01A9\u01A7\u01A9\u01AA\u01AA\u01AD\u01AB\u01A9\u01AC\u01A2\u01AC\u01AD\u01AD\u01AE\u01AE\u01AF\x07\u01AF-\u01B0\u01B1\x07'\u01B1\u01B3\xC4c\u01B2\u01B4@!\u01B3\u01B2\u01B3\u01B4\u01B4\u01B9\u01B5\u01B8\x07z\u01B6\u01B8\xC8e\u01B7\u01B5\u01B7\u01B6\u01B8\u01BB\u01B9\u01B7\u01B9\u01BA\u01BA\u01BE\u01BB\u01B9\u01BC\u01BF\x07\u01BD\u01BF`1\u01BE\u01BC\u01BE\u01BD\u01BF/\u01C0\u01C6\xC4c\u01C1\u01C3\x07\u01C2\u01C4\x92J\u01C3\u01C2\u01C3\u01C4\u01C4\u01C5\u01C5\u01C7\x07\u01C6\u01C1\u01C6\u01C7\u01C71\u01C8\u01C94\x1B\u01C9\u01CA@!\u01CA\u01CC8\u01CB\u01CD6\u01CC\u01CB\u01CC\u01CD\u01CD\u01D0\u01CE\u01D1\x07\u01CF\u01D1`1\u01D0\u01CE\u01D0\u01CF\u01D13\u01D2\u01D4\x07(\u01D3\u01D5\xC4c\u01D4\u01D3\u01D4\u01D5\u01D5\u01DA\u01D6\u01DA\x07\x7F\u01D7\u01DA\x07\x80\u01D8\u01DA\x07\x81\u01D9\u01D2\u01D9\u01D6\u01D9\u01D7\u01D9\u01D8\u01DA5\u01DB\u01DC\x07)\u01DC\u01DD@!\u01DD7\u01DE\u01E7\x07t\u01DF\u01E7\x07y\u01E0\u01E7\x07v\u01E1\u01E7\x07x\u01E2\u01E7\x07z\u01E3\u01E7^0\u01E4\u01E70\u01E5\u01E7\xC8e\u01E6\u01DE\u01E6\u01DF\u01E6\u01E0\u01E6\u01E1\u01E6\u01E2\u01E6\u01E3\u01E6\u01E4\u01E6\u01E5\u01E7\u01EA\u01E8\u01E6\u01E8\u01E9\u01E99\u01EA\u01E8\u01EB\u01EC\x07*\u01EC\u01ED\xC4c\u01ED\u01EFD#\u01EE\u01F0\x07n\u01EF\u01EE\u01EF\u01F0\u01F0\u01F1\u01F1\u01F2\x07\u01F2;\u01F3\u01F4\xC4c\u01F4=\u01F5\u01F6\x07+\u01F6\u01F7\xC4c\u01F7\u01F9\x07\u01F8\u01FA<\u01F9\u01F8\u01F9\u01FA\u01FA\u01FF\u01FB\u01FC\x07\u01FC\u01FE<\u01FD\u01FB\u01FE\u0201\u01FF\u01FD\u01FF\u0200\u0200\u0202\u0201\u01FF\u0202\u0203\x07\u0203?\u0204\u020D\x07\u0205\u020AB\"\u0206\u0207\x07\u0207\u0209B\"\u0208\u0206\u0209\u020C\u020A\u0208\u020A\u020B\u020B\u020E\u020C\u020A\u020D\u0205\u020D\u020E\u020E\u020F\u020F\u0210\x07\u0210A\u0211\u0213N(\u0212\u0214\\/\u0213\u0212\u0213\u0214\u0214\u0216\u0215\u0217\xC4c\u0216\u0215\u0216\u0217\u0217C\u0218\u0221\x07\u0219\u021EF$\u021A\u021B\x07\u021B\u021DF$\u021C\u021A\u021D\u0220\u021E\u021C\u021E\u021F\u021F\u0222\u0220\u021E\u0221\u0219\u0221\u0222\u0222\u0223\u0223\u0224\x07\u0224E\u0225\u0227N(\u0226\u0228\x07u\u0227\u0226\u0227\u0228\u0228\u022A\u0229\u022B\xC4c\u022A\u0229\u022A\u022B\u022BG\u022C\u0235\x07\u022D\u0232J&\u022E\u022F\x07\u022F\u0231J&\u0230\u022E\u0231\u0234\u0232\u0230\u0232\u0233\u0233\u0236\u0234\u0232\u0235\u022D\u0235\u0236\u0236\u0237\u0237\u0238\x07\u0238I\u0239\u023BN(\u023A\u023C\\/\u023B\u023A\u023B\u023C\u023CK\u023D\u023FN(\u023E\u0240\\/\u023F\u023E\u023F\u0240\u0240\u0241\u0241\u0242\xC4c\u0242M\u0243\u0244\b(\u0244\u024B\x8CG\u0245\u024BP)\u0246\u024BT+\u0247\u024BZ.\u0248\u0249\x07.\u0249\u024B\x07w\u024A\u0243\u024A\u0245\u024A\u0246\u024A\u0247\u024A\u0248\u024B\u0254\u024C\u024D\f\u024D\u024F\x07,\u024E\u0250\x8EH\u024F\u024E\u024F\u0250\u0250\u0251\u0251\u0253\x07-\u0252\u024C\u0253\u0256\u0254\u0252\u0254\u0255\u0255O\u0256\u0254\u0257\u025C\xC4c\u0258\u0259\x07/\u0259\u025B\xC4c\u025A\u0258\u025B\u025E\u025C\u025A\u025C\u025D\u025DQ\u025E\u025C\u025F\u0262\x8CG\u0260\u0262P)\u0261\u025F\u0261\u0260\u0262S\u0263\u0264\x070\u0264\u0265\x07\u0265\u0267R*\u0266\u0268V,\u0267\u0266\u0267\u0268\u0268\u0269\u0269\u026A\x071\u026A\u026CN(\u026B\u026DX-\u026C\u026B\u026C\u026D\u026D\u026E\u026E\u026F\x07\u026FU\u0270\u0271\xC4c\u0271W\u0272\u0273\xC4c\u0273Y\u0274\u0275\x07(\u0275\u027BH%\u0276\u027A\x07v\u0277\u027A\x07t\u0278\u027A^0\u0279\u0276\u0279\u0277\u0279\u0278\u027A\u027D\u027B\u0279\u027B\u027C\u027C\u0280\u027D\u027B\u027E\u027F\x07)\u027F\u0281H%\u0280\u027E\u0280\u0281\u0281[\u0282\u0283 \u0283]\u0284\u0285 \u0285_\u0286\u028A\x07\u0287\u0289b2\u0288\u0287\u0289\u028C\u028A\u0288\u028A\u028B\u028B\u028D\u028C\u028A\u028D\u028E\x07\u028Ea\u028F\u029Ff4\u0290\u029Fh5\u0291\u029Fl7\u0292\u029Fr:\u0293\u029F`1\u0294\u029Ft;\u0295\u029Fx=\u0296\u029Fz>\u0297\u029F|?\u0298\u029F~@\u0299\u029F\x80A\u029A\u029F\x82B\u029B\u029Fn8\u029C\u029Fp9\u029D\u029F\x84C\u029E\u028F\u029E\u0290\u029E\u0291\u029E\u0292\u029E\u0293\u029E\u0294\u029E\u0295\u029E\u0296\u029E\u0297\u029E\u0298\u029E\u0299\u029E\u029A\u029E\u029B\u029E\u029C\u029E\u029D\u029Fc\u02A0\u02A1\x8EH\u02A1\u02A2\x07\u02A2e\u02A3\u02A4\x075\u02A4\u02A5\x07\u02A5\u02A6\x8EH\u02A6\u02A7\x07\u02A7\u02AAb2\u02A8\u02A9\x076\u02A9\u02ABb2\u02AA\u02A8\u02AA\u02AB\u02ABg\u02AC\u02AD\x077\u02AD\u02AF\x8EH\u02AE\u02B06\u02AF\u02AE\u02AF\u02B0\u02B0\u02B1\u02B1\u02B3`1\u02B2\u02B4j6\u02B3\u02B2\u02B4\u02B5\u02B5\u02B3\u02B5\u02B6\u02B6i\u02B7\u02BC\x078\u02B8\u02BA\xC4c\u02B9\u02B8\u02B9\u02BA\u02BA\u02BB\u02BB\u02BD@!\u02BC\u02B9\u02BC\u02BD\u02BD\u02BE\u02BE\u02BF`1\u02BFk\u02C0\u02C1\x079\u02C1\u02C2\x07\u02C2\u02C3\x8EH\u02C3\u02C4\x07\u02C4\u02C5b2\u02C5m\u02C6\u02C9\x86D\u02C7\u02C9d3\u02C8\u02C6\u02C8\u02C7\u02C9o\u02CA\u02CB\x07:\u02CB\u02CC`1\u02CCq\u02CD\u02CE\x07\u02CE\u02D1\x07\u02CF\u02D2n8\u02D0\u02D2\x07\u02D1\u02CF\u02D1\u02D0\u02D2\u02D5\u02D3\u02D6d3\u02D4\u02D6\x07\u02D5\u02D3\u02D5\u02D4\u02D6\u02D8\u02D7\u02D9\x8EH\u02D8\u02D7\u02D8\u02D9\u02D9\u02DA\u02DA\u02DB\x07\u02DB\u02DCb2\u02DCs\u02DD\u02DF\x07;\u02DE\u02E0\x07\x83\u02DF\u02DE\u02DF\u02E0\u02E0\u02E5\u02E1\u02E2\x07\u02E2\u02E3v<\u02E3\u02E4\x07\u02E4\u02E6\u02E5\u02E1\u02E5\u02E6\u02E6\u02E7\u02E7\u02E8\x9CO\u02E8u\u02E9\u02EA\xCAf\u02EAw\u02EB\u02EC\x07<\u02EC\u02EDb2\u02ED\u02EE\x079\u02EE\u02EF\x07\u02EF\u02F0\x8EH\u02F0\u02F1\x07\u02F1\u02F2\x07\u02F2y\u02F3\u02F4\x07r\u02F4\u02F5\x07\u02F5{\u02F6\u02F7\x07o\u02F7\u02F8\x07\u02F8}\u02F9\u02FB\x07=\u02FA\u02FC\x8EH\u02FB\u02FA\u02FB\u02FC\u02FC\u02FD\u02FD\u02FE\x07\u02FE\x7F\u02FF\u0300\x07>\u0300\u0301\x07\u0301\x81\u0302\u0303\x07?\u0303\u0304\x9AN\u0304\u0305\x07\u0305\x83\u0306\u0307\x07@\u0307\u0308\x9AN\u0308\u0309\x07\u0309\x85\u030A\u030B\x07A\u030B\u0312\x8AF\u030C\u0312L'\u030D\u030E\x07\u030E\u030F\x88E\u030F\u0310\x07\u0310\u0312\u0311\u030A\u0311\u030C\u0311\u030D\u0312\u0315\u0313\u0314\x07\r\u0314\u0316\x8EH\u0315\u0313\u0315\u0316\u0316\u0317\u0317\u0318\x07\u0318\x87\u0319\u031BL'\u031A\u0319\u031A\u031B\u031B\u0322\u031C\u031E\x07\u031D\u031FL'\u031E\u031D\u031E\u031F\u031F\u0321\u0320\u031C\u0321\u0324\u0322\u0320\u0322\u0323\u0323\x89\u0324\u0322\u0325\u032C\x07\u0326\u0328\xC4c\u0327\u0326\u0327\u0328\u0328\u0329\u0329\u032B\x07\u032A\u0327\u032B\u032E\u032C\u032A\u032C\u032D\u032D\u0330\u032E\u032C\u032F\u0331\xC4c\u0330\u032F\u0330\u0331\u0331\u0332\u0332\u0333\x07\u0333\x8B\u0334\u0335 \x07\u0335\x8D\u0336\u0337\bH\u0337\u0338\x07G\u0338\u0349N(\u0339\u033A\x07\u033A\u033B\x8EH\u033B\u033C\x07\u033C\u0349\u033D\u033E \b\u033E\u0349\x8EH\u033F\u0340 \u0340\u0349\x8EH\u0341\u0342\x07I\u0342\u0349\x8EH\u0343\u0344\x07J\u0344\u0349\x8EH\u0345\u0346\x07\b\u0346\u0349\x8EH\u0347\u0349\x90I\u0348\u0336\u0348\u0339\u0348\u033D\u0348\u033F\u0348\u0341\u0348\u0343\u0348\u0345\u0348\u0347\u0349\u0394\u034A\u034B\f\u034B\u034C\x07K\u034C\u0393\x8EH\u034D\u034E\f\u034E\u034F \n\u034F\u0393\x8EH\u0350\u0351\f\u0351\u0352 \u0352\u0393\x8EH\u0353\u0354\f\r\u0354\u0355 \v\u0355\u0393\x8EH\u0356\u0357\f\f\u0357\u0358\x07\u0358\u0393\x8EH\r\u0359\u035A\f\v\u035A\u035B\x07\x07\u035B\u0393\x8EH\f\u035C\u035D\f\n\u035D\u035E\x07\u035E\u0393\x8EH\v\u035F\u0360\f \u0360\u0361 \f\u0361\u0393\x8EH\n\u0362\u0363\f\b\u0363\u0364 \r\u0364\u0393\x8EH \u0365\u0366\f\x07\u0366\u0367\x07N\u0367\u0393\x8EH\b\u0368\u0369\f\u0369\u036A\x07\u036A\u0393\x8EH\x07\u036B\u036C\f\u036C\u036D\x07O\u036D\u036E\x8EH\u036E\u036F\x07H\u036F\u0370\x8EH\u0370\u0393\u0371\u0372\f\u0372\u0373 \u0373\u0393\x8EH\u0374\u0375\f\u0375\u0393 \b\u0376\u0377\f\x1B\u0377\u0378\x07,\u0378\u0379\x8EH\u0379\u037A\x07-\u037A\u0393\u037B\u037C\f\u037C\u037E\x07,\u037D\u037F\x8EH\u037E\u037D\u037E\u037F\u037F\u0380\u0380\u0382\x07H\u0381\u0383\x8EH\u0382\u0381\u0382\u0383\u0383\u0384\u0384\u0393\x07-\u0385\u0386\f\u0386\u0387\x07/\u0387\u0393\xC4c\u0388\u0389\f\u0389\u038A\x07\u038A\u038B\x94K\u038B\u038C\x07\u038C\u0393\u038D\u038E\f\u038E\u038F\x07\u038F\u0390\x98M\u0390\u0391\x07\u0391\u0393\u0392\u034A\u0392\u034D\u0392\u0350\u0392\u0353\u0392\u0356\u0392\u0359\u0392\u035C\u0392\u035F\u0392\u0362\u0392\u0365\u0392\u0368\u0392\u036B\u0392\u0371\u0392\u0374\u0392\u0376\u0392\u037B\u0392\u0385\u0392\u0388\u0392\u038D\u0393\u0396\u0394\u0392\u0394\u0395\u0395\x8F\u0396\u0394\u0397\u03A1\x07h\u0398\u03A1\xC2b\u0399\u03A1\xC6d\u039A\u03A1\xCAf\u039B\u03A1\xC4c\u039C\u03A1\x07|\u039D\u03A1\x07w\u039E\u03A1\xC0a\u039F\u03A1N(\u03A0\u0397\u03A0\u0398\u03A0\u0399\u03A0\u039A\u03A0\u039B\u03A0\u039C\u03A0\u039D\u03A0\u039E\u03A0\u039F\u03A1\x91\u03A2\u03A7\x8EH\u03A3\u03A4\x07\u03A4\u03A6\x8EH\u03A5\u03A3\u03A6\u03A9\u03A7\u03A5\u03A7\u03A8\u03A8\x93\u03A9\u03A7\u03AA\u03AF\x96L\u03AB\u03AC\x07\u03AC\u03AE\x96L\u03AD\u03AB\u03AE\u03B1\u03AF\u03AD\u03AF\u03B0\u03B0\u03B3\u03B1\u03AF\u03B2\u03B4\x07\u03B3\u03B2\u03B3\u03B4\u03B4\x95\u03B5\u03B6\xC4c\u03B6\u03B7\x07H\u03B7\u03B8\x8EH\u03B8\x97\u03B9\u03BB\x07\u03BA\u03BC\x94K\u03BB\u03BA\u03BB\u03BC\u03BC\u03BD\u03BD\u03C2\x07\u03BE\u03C0\x92J\u03BF\u03BE\u03BF\u03C0\u03C0\u03C2\u03C1\u03B9\u03C1\u03BF\u03C2\x99\u03C3\u03C4\x8EH\u03C4\u03C5\x07\u03C5\u03C6\x98M\u03C6\u03C7\x07\u03C7\x9B\u03C8\u03CC\x07\u03C9\u03CB\x9EP\u03CA\u03C9\u03CB\u03CE\u03CC\u03CA\u03CC\u03CD\u03CD\u03CF\u03CE\u03CC\u03CF\u03D0\x07\u03D0\x9D\u03D1\u03E3\xC4c\u03D2\u03E3\x9CO\u03D3\u03E3\xA0Q\u03D4\u03E3\xA6T\u03D5\u03E3\xA8U\u03D6\u03E3\xAEX\u03D7\u03E3\xB0Y\u03D8\u03E3\xB2Z\u03D9\u03E3\xB6\\\u03DA\u03E3\xBA^\u03DB\u03E3\xBC_\u03DC\u03E3\x07o\u03DD\u03E3\x07r\u03DE\u03E3\x07s\u03DF\u03E3\xC2b\u03E0\u03E3\xCAf\u03E1\u03E3\xC6d\u03E2\u03D1\u03E2\u03D2\u03E2\u03D3\u03E2\u03D4\u03E2\u03D5\u03E2\u03D6\u03E2\u03D7\u03E2\u03D8\u03E2\u03D9\u03E2\u03DA\u03E2\u03DB\u03E2\u03DC\u03E2\u03DD\u03E2\u03DE\u03E2\u03DF\u03E2\u03E0\u03E2\u03E1\u03E3\x9F\u03E4\u03E8\xA4S\u03E5\u03E8\xBE`\u03E6\u03E8\xA2R\u03E7\u03E4\u03E7\u03E5\u03E7\u03E6\u03E8\xA1\u03E9\u03EA\xC4c\u03EA\u03EB\x07/\u03EB\u03EC\xC4c\u03EC\xA3\u03ED\u03F2\x07=\u03EE\u03F2\x07.\u03EF\u03F2\x07D\u03F0\u03F2\xC4c\u03F1\u03ED\u03F1\u03EE\u03F1\u03EF\u03F1\u03F0\u03F2\u03FF\u03F3\u03F5\x07\u03F4\u03F6\xA0Q\u03F5\u03F4\u03F5\u03F6\u03F6\u03FB\u03F7\u03F8\x07\u03F8\u03FA\xA0Q\u03F9\u03F7\u03FA\u03FD\u03FB\u03F9\u03FB\u03FC\u03FC\u03FE\u03FD\u03FB\u03FE\u0400\x07\u03FF\u03F3\u03FF\u0400\u0400\xA5\u0401\u0402\x07Z\u0402\u0405\xAAV\u0403\u0404\x07[\u0404\u0406\xA0Q\u0405\u0403\u0405\u0406\u0406\xA7\u0407\u0408\xAAV\u0408\u0409\x07[\u0409\u040A\xA0Q\u040A\xA9\u040B\u0413\xC4c\u040C\u0413\xA2R\u040D\u0413\xACW\u040E\u040F\x07\u040F\u0410\xACW\u0410\u0411\x07\u0411\u0413\u0412\u040B\u0412\u040C\u0412\u040D\u0412\u040E\u0413\xAB\u0414\u0419\xC4c\u0415\u0416\x07\u0416\u0418\xC4c\u0417\u0415\u0418\u041B\u0419\u0417\u0419\u041A\u041A\xAD\u041B\u0419\u041C\u041D\xA0Q\u041D\u041E\x07\\\u041E\u041F\xC4c\u041F\xAF\u0420\u0421\xC4c\u0421\u0422\x07H\u0422\xB1\u0423\u0424\x07]\u0424\u0428\xA0Q\u0425\u0427\xB4[\u0426\u0425\u0427\u042A\u0428\u0426\u0428\u0429\u0429\xB3\u042A\u0428\u042B\u042C\x07^\u042C\u042D\xBE`\u042D\u042E\x9CO\u042E\u0432\u042F\u0430\x07_\u0430\u0432\x9CO\u0431\u042B\u0431\u042F\u0432\xB5\u0433\u0434\x07(\u0434\u0435\xC4c\u0435\u0437\x07\u0436\u0438\xACW\u0437\u0436\u0437\u0438\u0438\u0439\u0439\u043B\x07\u043A\u043C\xB8]\u043B\u043A\u043B\u043C\u043C\u043D\u043D\u043E\x9CO\u043E";O._serializedATNSegment2="\xB7\u043F\u0440\x07`\u0440\u0441\xACW\u0441\xB9\u0442\u0445\x07\u0443\u0446\x9CO\u0444\u0446\xA0Q\u0445\u0443\u0445\u0444\u0446\u0447\u0447\u044A\xA0Q\u0448\u044B\x9CO\u0449\u044B\xA0Q\u044A\u0448\u044A\u0449\u044B\u044C\u044C\u044D\x9CO\u044D\xBB\u044E\u044F\x075\u044F\u0450\xA0Q\u0450\u0451\x9CO\u0451\xBD\u0452\u0458\xCAf\u0453\u0458\x07i\u0454\u0458\x07j\u0455\u0458\xC6d\u0456\u0458\x07h\u0457\u0452\u0457\u0453\u0457\u0454\u0457\u0455\u0457\u0456\u0458\xBF\u0459\u045B\x07\u045A\u045C\x8EH\u045B\u045A\u045B\u045C\u045C\u0463\u045D\u045F\x07\u045E\u0460\x8EH\u045F\u045E\u045F\u0460\u0460\u0462\u0461\u045D\u0462\u0465\u0463\u0461\u0463\u0464\u0464\u0466\u0465\u0463\u0466\u0474\x07\u0467\u0470\x07,\u0468\u046D\x8EH\u0469\u046A\x07\u046A\u046C\x8EH\u046B\u0469\u046C\u046F\u046D\u046B\u046D\u046E\u046E\u0471\u046F\u046D\u0470\u0468\u0470\u0471\u0471\u0472\u0472\u0474\x07-\u0473\u0459\u0473\u0467\u0474\xC1\u0475\u0477 \u0476\u0478\x07k\u0477\u0476\u0477\u0478\u0478\xC3\u0479\u047A \u047A\xC5\u047B\u047D\x07l\u047C\u047B\u047D\u047E\u047E\u047C\u047E\u047F\u047F\xC7\u0480\u048C\x07b\u0481\u0482\x07\u0482\u0487P)\u0483\u0484\x07\u0484\u0486P)\u0485\u0483\u0486\u0489\u0487\u0485\u0487\u0488\u0488\u048A\u0489\u0487\u048A\u048B\x07\u048B\u048D\u048C\u0481\u048C\u048D\u048D\xC9\u048E\u0490\x07\x83\u048F\u048E\u0490\u0491\u0491\u048F\u0491\u0492\u0492\xCB\x84\xD7\xD9\xE8\xEC\xF1\xF7\xFB\xFE\u0103\u0109\u0110\u0114\u0121\u0129\u012E\u0138\u013B\u0141\u0149\u014C\u0157\u0160\u0162\u0168\u0183\u0186\u0191\u0196\u019B\u01A9\u01AC\u01B3\u01B7\u01B9\u01BE\u01C3\u01C6\u01CC\u01D0\u01D4\u01D9\u01E6\u01E8\u01EF\u01F9\u01FF\u020A\u020D\u0213\u0216\u021E\u0221\u0227\u022A\u0232\u0235\u023B\u023F\u024A\u024F\u0254\u025C\u0261\u0267\u026C\u0279\u027B\u0280\u028A\u029E\u02AA\u02AF\u02B5\u02B9\u02BC\u02C8\u02D1\u02D5\u02D8\u02DF\u02E5\u02FB\u0311\u0315\u031A\u031E\u0322\u0327\u032C\u0330\u0348\u037E\u0382\u0392\u0394\u03A0\u03A7\u03AF\u03B3\u03BB\u03BF\u03C1\u03CC\u03E2\u03E7\u03F1\u03F5\u03FB\u03FF\u0405\u0412\u0419\u0428\u0431\u0437\u043B\u0445\u044A\u0457\u045B\u045F\u0463\u046D\u0470\u0473\u0477\u047E\u0487\u048C\u0491";O._serializedATN=Kv.join([d._serializedATNSegment0,d._serializedATNSegment1,d._serializedATNSegment2],"");var O8=class extends pe.ParserRuleContext{EOF(){return this.getToken(O.EOF,0)}pragmaDirective(t){return t===void 0?this.getRuleContexts(c0):this.getRuleContext(t,c0)}importDirective(t){return t===void 0?this.getRuleContexts(p0):this.getRuleContext(t,p0)}contractDefinition(t){return t===void 0?this.getRuleContexts(m0):this.getRuleContext(t,m0)}enumDefinition(t){return t===void 0?this.getRuleContexts(Yl):this.getRuleContext(t,Yl)}eventDefinition(t){return t===void 0?this.getRuleContexts(Wl):this.getRuleContext(t,Wl)}structDefinition(t){return t===void 0?this.getRuleContexts(Kl):this.getRuleContext(t,Kl)}functionDefinition(t){return t===void 0?this.getRuleContexts(Gl):this.getRuleContext(t,Gl)}fileLevelConstant(t){return t===void 0?this.getRuleContexts(y0):this.getRuleContext(t,y0)}customErrorDefinition(t){return t===void 0?this.getRuleContexts(Vl):this.getRuleContext(t,Vl)}typeDefinition(t){return t===void 0?this.getRuleContexts($l):this.getRuleContext(t,$l)}usingForDeclaration(t){return t===void 0?this.getRuleContexts(zl):this.getRuleContext(t,zl)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_sourceUnit}enterRule(t){t.enterSourceUnit&&t.enterSourceUnit(this);}exitRule(t){t.exitSourceUnit&&t.exitSourceUnit(this);}accept(t){return t.visitSourceUnit?t.visitSourceUnit(this):t.visitChildren(this)}},c0=class extends pe.ParserRuleContext{pragmaName(){return this.getRuleContext(0,Gv)}pragmaValue(){return this.getRuleContext(0,Wv)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_pragmaDirective}enterRule(t){t.enterPragmaDirective&&t.enterPragmaDirective(this);}exitRule(t){t.exitPragmaDirective&&t.exitPragmaDirective(this);}accept(t){return t.visitPragmaDirective?t.visitPragmaDirective(this):t.visitChildren(this)}},Gv=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_pragmaName}enterRule(t){t.enterPragmaName&&t.enterPragmaName(this);}exitRule(t){t.exitPragmaName&&t.exitPragmaName(this);}accept(t){return t.visitPragmaName?t.visitPragmaName(this):t.visitChildren(this)}},Wv=class extends pe.ParserRuleContext{version(){return this.tryGetRuleContext(0,Yv)}expression(){return this.tryGetRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_pragmaValue}enterRule(t){t.enterPragmaValue&&t.enterPragmaValue(this);}exitRule(t){t.exitPragmaValue&&t.exitPragmaValue(this);}accept(t){return t.visitPragmaValue?t.visitPragmaValue(this):t.visitChildren(this)}},Yv=class extends pe.ParserRuleContext{versionConstraint(t){return t===void 0?this.getRuleContexts(f0):this.getRuleContext(t,f0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_version}enterRule(t){t.enterVersion&&t.enterVersion(this);}exitRule(t){t.exitVersion&&t.exitVersion(this);}accept(t){return t.visitVersion?t.visitVersion(this):t.visitChildren(this)}},Zv=class extends pe.ParserRuleContext{constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_versionOperator}enterRule(t){t.enterVersionOperator&&t.enterVersionOperator(this);}exitRule(t){t.exitVersionOperator&&t.exitVersionOperator(this);}accept(t){return t.visitVersionOperator?t.visitVersionOperator(this):t.visitChildren(this)}},f0=class extends pe.ParserRuleContext{VersionLiteral(){return this.tryGetToken(O.VersionLiteral,0)}versionOperator(){return this.tryGetRuleContext(0,Zv)}DecimalNumber(){return this.tryGetToken(O.DecimalNumber,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_versionConstraint}enterRule(t){t.enterVersionConstraint&&t.enterVersionConstraint(this);}exitRule(t){t.exitVersionConstraint&&t.exitVersionConstraint(this);}accept(t){return t.visitVersionConstraint?t.visitVersionConstraint(this):t.visitChildren(this)}},d0=class extends pe.ParserRuleContext{identifier(t){return t===void 0?this.getRuleContexts(je):this.getRuleContext(t,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_importDeclaration}enterRule(t){t.enterImportDeclaration&&t.enterImportDeclaration(this);}exitRule(t){t.exitImportDeclaration&&t.exitImportDeclaration(this);}accept(t){return t.visitImportDeclaration?t.visitImportDeclaration(this):t.visitChildren(this)}},p0=class extends pe.ParserRuleContext{importPath(){return this.getRuleContext(0,Xv)}identifier(t){return t===void 0?this.getRuleContexts(je):this.getRuleContext(t,je)}importDeclaration(t){return t===void 0?this.getRuleContexts(d0):this.getRuleContext(t,d0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_importDirective}enterRule(t){t.enterImportDirective&&t.enterImportDirective(this);}exitRule(t){t.exitImportDirective&&t.exitImportDirective(this);}accept(t){return t.visitImportDirective?t.visitImportDirective(this):t.visitChildren(this)}},Xv=class extends pe.ParserRuleContext{StringLiteralFragment(){return this.getToken(O.StringLiteralFragment,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_importPath}enterRule(t){t.enterImportPath&&t.enterImportPath(this);}exitRule(t){t.exitImportPath&&t.exitImportPath(this);}accept(t){return t.visitImportPath?t.visitImportPath(this):t.visitChildren(this)}},m0=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}inheritanceSpecifier(t){return t===void 0?this.getRuleContexts(_0):this.getRuleContext(t,_0)}contractPart(t){return t===void 0?this.getRuleContexts(g0):this.getRuleContext(t,g0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_contractDefinition}enterRule(t){t.enterContractDefinition&&t.enterContractDefinition(this);}exitRule(t){t.exitContractDefinition&&t.exitContractDefinition(this);}accept(t){return t.visitContractDefinition?t.visitContractDefinition(this):t.visitChildren(this)}},_0=class extends pe.ParserRuleContext{userDefinedTypeName(){return this.getRuleContext(0,Zi)}expressionList(){return this.tryGetRuleContext(0,fh)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_inheritanceSpecifier}enterRule(t){t.enterInheritanceSpecifier&&t.enterInheritanceSpecifier(this);}exitRule(t){t.exitInheritanceSpecifier&&t.exitInheritanceSpecifier(this);}accept(t){return t.visitInheritanceSpecifier?t.visitInheritanceSpecifier(this):t.visitChildren(this)}},g0=class extends pe.ParserRuleContext{stateVariableDeclaration(){return this.tryGetRuleContext(0,Jv)}usingForDeclaration(){return this.tryGetRuleContext(0,zl)}structDefinition(){return this.tryGetRuleContext(0,Kl)}modifierDefinition(){return this.tryGetRuleContext(0,tE)}functionDefinition(){return this.tryGetRuleContext(0,Gl)}eventDefinition(){return this.tryGetRuleContext(0,Wl)}enumDefinition(){return this.tryGetRuleContext(0,Yl)}customErrorDefinition(){return this.tryGetRuleContext(0,Vl)}typeDefinition(){return this.tryGetRuleContext(0,$l)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_contractPart}enterRule(t){t.enterContractPart&&t.enterContractPart(this);}exitRule(t){t.exitContractPart&&t.exitContractPart(this);}accept(t){return t.visitContractPart?t.visitContractPart(this):t.visitChildren(this)}},Jv=class extends pe.ParserRuleContext{typeName(){return this.getRuleContext(0,Ar)}identifier(){return this.getRuleContext(0,je)}PublicKeyword(t){return t===void 0?this.getTokens(O.PublicKeyword):this.getToken(O.PublicKeyword,t)}InternalKeyword(t){return t===void 0?this.getTokens(O.InternalKeyword):this.getToken(O.InternalKeyword,t)}PrivateKeyword(t){return t===void 0?this.getTokens(O.PrivateKeyword):this.getToken(O.PrivateKeyword,t)}ConstantKeyword(t){return t===void 0?this.getTokens(O.ConstantKeyword):this.getToken(O.ConstantKeyword,t)}ImmutableKeyword(t){return t===void 0?this.getTokens(O.ImmutableKeyword):this.getToken(O.ImmutableKeyword,t)}overrideSpecifier(t){return t===void 0?this.getRuleContexts(ns):this.getRuleContext(t,ns)}expression(){return this.tryGetRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_stateVariableDeclaration}enterRule(t){t.enterStateVariableDeclaration&&t.enterStateVariableDeclaration(this);}exitRule(t){t.exitStateVariableDeclaration&&t.exitStateVariableDeclaration(this);}accept(t){return t.visitStateVariableDeclaration?t.visitStateVariableDeclaration(this):t.visitChildren(this)}},y0=class extends pe.ParserRuleContext{typeName(){return this.getRuleContext(0,Ar)}ConstantKeyword(){return this.getToken(O.ConstantKeyword,0)}identifier(){return this.getRuleContext(0,je)}expression(){return this.getRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_fileLevelConstant}enterRule(t){t.enterFileLevelConstant&&t.enterFileLevelConstant(this);}exitRule(t){t.exitFileLevelConstant&&t.exitFileLevelConstant(this);}accept(t){return t.visitFileLevelConstant?t.visitFileLevelConstant(this):t.visitChildren(this)}},Vl=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}parameterList(){return this.getRuleContext(0,ao)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_customErrorDefinition}enterRule(t){t.enterCustomErrorDefinition&&t.enterCustomErrorDefinition(this);}exitRule(t){t.exitCustomErrorDefinition&&t.exitCustomErrorDefinition(this);}accept(t){return t.visitCustomErrorDefinition?t.visitCustomErrorDefinition(this):t.visitChildren(this)}},$l=class extends pe.ParserRuleContext{TypeKeyword(){return this.getToken(O.TypeKeyword,0)}identifier(){return this.getRuleContext(0,je)}elementaryTypeName(){return this.getRuleContext(0,ch)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_typeDefinition}enterRule(t){t.enterTypeDefinition&&t.enterTypeDefinition(this);}exitRule(t){t.exitTypeDefinition&&t.exitTypeDefinition(this);}accept(t){return t.visitTypeDefinition?t.visitTypeDefinition(this):t.visitChildren(this)}},zl=class extends pe.ParserRuleContext{usingForObject(){return this.getRuleContext(0,Qv)}typeName(){return this.tryGetRuleContext(0,Ar)}GlobalKeyword(){return this.tryGetToken(O.GlobalKeyword,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_usingForDeclaration}enterRule(t){t.enterUsingForDeclaration&&t.enterUsingForDeclaration(this);}exitRule(t){t.exitUsingForDeclaration&&t.exitUsingForDeclaration(this);}accept(t){return t.visitUsingForDeclaration?t.visitUsingForDeclaration(this):t.visitChildren(this)}},Qv=class extends pe.ParserRuleContext{userDefinedTypeName(){return this.tryGetRuleContext(0,Zi)}usingForObjectDirective(t){return t===void 0?this.getRuleContexts(x0):this.getRuleContext(t,x0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_usingForObject}enterRule(t){t.enterUsingForObject&&t.enterUsingForObject(this);}exitRule(t){t.exitUsingForObject&&t.exitUsingForObject(this);}accept(t){return t.visitUsingForObject?t.visitUsingForObject(this):t.visitChildren(this)}},x0=class extends pe.ParserRuleContext{userDefinedTypeName(){return this.getRuleContext(0,Zi)}userDefinableOperators(){return this.tryGetRuleContext(0,eE)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_usingForObjectDirective}enterRule(t){t.enterUsingForObjectDirective&&t.enterUsingForObjectDirective(this);}exitRule(t){t.exitUsingForObjectDirective&&t.exitUsingForObjectDirective(this);}accept(t){return t.visitUsingForObjectDirective?t.visitUsingForObjectDirective(this):t.visitChildren(this)}},eE=class extends pe.ParserRuleContext{constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_userDefinableOperators}enterRule(t){t.enterUserDefinableOperators&&t.enterUserDefinableOperators(this);}exitRule(t){t.exitUserDefinableOperators&&t.exitUserDefinableOperators(this);}accept(t){return t.visitUserDefinableOperators?t.visitUserDefinableOperators(this):t.visitChildren(this)}},Kl=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}variableDeclaration(t){return t===void 0?this.getRuleContexts(eo):this.getRuleContext(t,eo)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_structDefinition}enterRule(t){t.enterStructDefinition&&t.enterStructDefinition(this);}exitRule(t){t.exitStructDefinition&&t.exitStructDefinition(this);}accept(t){return t.visitStructDefinition?t.visitStructDefinition(this):t.visitChildren(this)}},tE=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}block(){return this.tryGetRuleContext(0,us)}parameterList(){return this.tryGetRuleContext(0,ao)}VirtualKeyword(t){return t===void 0?this.getTokens(O.VirtualKeyword):this.getToken(O.VirtualKeyword,t)}overrideSpecifier(t){return t===void 0?this.getRuleContexts(ns):this.getRuleContext(t,ns)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_modifierDefinition}enterRule(t){t.enterModifierDefinition&&t.enterModifierDefinition(this);}exitRule(t){t.exitModifierDefinition&&t.exitModifierDefinition(this);}accept(t){return t.visitModifierDefinition?t.visitModifierDefinition(this):t.visitChildren(this)}},v0=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}expressionList(){return this.tryGetRuleContext(0,fh)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_modifierInvocation}enterRule(t){t.enterModifierInvocation&&t.enterModifierInvocation(this);}exitRule(t){t.exitModifierInvocation&&t.exitModifierInvocation(this);}accept(t){return t.visitModifierInvocation?t.visitModifierInvocation(this):t.visitChildren(this)}},Gl=class extends pe.ParserRuleContext{functionDescriptor(){return this.getRuleContext(0,rE)}parameterList(){return this.getRuleContext(0,ao)}modifierList(){return this.getRuleContext(0,iE)}block(){return this.tryGetRuleContext(0,us)}returnParameters(){return this.tryGetRuleContext(0,W0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_functionDefinition}enterRule(t){t.enterFunctionDefinition&&t.enterFunctionDefinition(this);}exitRule(t){t.exitFunctionDefinition&&t.exitFunctionDefinition(this);}accept(t){return t.visitFunctionDefinition?t.visitFunctionDefinition(this):t.visitChildren(this)}},rE=class extends pe.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,je)}ConstructorKeyword(){return this.tryGetToken(O.ConstructorKeyword,0)}FallbackKeyword(){return this.tryGetToken(O.FallbackKeyword,0)}ReceiveKeyword(){return this.tryGetToken(O.ReceiveKeyword,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_functionDescriptor}enterRule(t){t.enterFunctionDescriptor&&t.enterFunctionDescriptor(this);}exitRule(t){t.exitFunctionDescriptor&&t.exitFunctionDescriptor(this);}accept(t){return t.visitFunctionDescriptor?t.visitFunctionDescriptor(this):t.visitChildren(this)}},W0=class extends pe.ParserRuleContext{parameterList(){return this.getRuleContext(0,ao)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_returnParameters}enterRule(t){t.enterReturnParameters&&t.enterReturnParameters(this);}exitRule(t){t.exitReturnParameters&&t.exitReturnParameters(this);}accept(t){return t.visitReturnParameters?t.visitReturnParameters(this):t.visitChildren(this)}},iE=class extends pe.ParserRuleContext{ExternalKeyword(t){return t===void 0?this.getTokens(O.ExternalKeyword):this.getToken(O.ExternalKeyword,t)}PublicKeyword(t){return t===void 0?this.getTokens(O.PublicKeyword):this.getToken(O.PublicKeyword,t)}InternalKeyword(t){return t===void 0?this.getTokens(O.InternalKeyword):this.getToken(O.InternalKeyword,t)}PrivateKeyword(t){return t===void 0?this.getTokens(O.PrivateKeyword):this.getToken(O.PrivateKeyword,t)}VirtualKeyword(t){return t===void 0?this.getTokens(O.VirtualKeyword):this.getToken(O.VirtualKeyword,t)}stateMutability(t){return t===void 0?this.getRuleContexts(Ca):this.getRuleContext(t,Ca)}modifierInvocation(t){return t===void 0?this.getRuleContexts(v0):this.getRuleContext(t,v0)}overrideSpecifier(t){return t===void 0?this.getRuleContexts(ns):this.getRuleContext(t,ns)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_modifierList}enterRule(t){t.enterModifierList&&t.enterModifierList(this);}exitRule(t){t.exitModifierList&&t.exitModifierList(this);}accept(t){return t.visitModifierList?t.visitModifierList(this):t.visitChildren(this)}},Wl=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}eventParameterList(){return this.getRuleContext(0,nE)}AnonymousKeyword(){return this.tryGetToken(O.AnonymousKeyword,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_eventDefinition}enterRule(t){t.enterEventDefinition&&t.enterEventDefinition(this);}exitRule(t){t.exitEventDefinition&&t.exitEventDefinition(this);}accept(t){return t.visitEventDefinition?t.visitEventDefinition(this):t.visitChildren(this)}},E0=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_enumValue}enterRule(t){t.enterEnumValue&&t.enterEnumValue(this);}exitRule(t){t.exitEnumValue&&t.exitEnumValue(this);}accept(t){return t.visitEnumValue?t.visitEnumValue(this):t.visitChildren(this)}},Yl=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}enumValue(t){return t===void 0?this.getRuleContexts(E0):this.getRuleContext(t,E0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_enumDefinition}enterRule(t){t.enterEnumDefinition&&t.enterEnumDefinition(this);}exitRule(t){t.exitEnumDefinition&&t.exitEnumDefinition(this);}accept(t){return t.visitEnumDefinition?t.visitEnumDefinition(this):t.visitChildren(this)}},ao=class extends pe.ParserRuleContext{parameter(t){return t===void 0?this.getRuleContexts(b0):this.getRuleContext(t,b0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_parameterList}enterRule(t){t.enterParameterList&&t.enterParameterList(this);}exitRule(t){t.exitParameterList&&t.exitParameterList(this);}accept(t){return t.visitParameterList?t.visitParameterList(this):t.visitChildren(this)}},b0=class extends pe.ParserRuleContext{typeName(){return this.getRuleContext(0,Ar)}storageLocation(){return this.tryGetRuleContext(0,hh)}identifier(){return this.tryGetRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_parameter}enterRule(t){t.enterParameter&&t.enterParameter(this);}exitRule(t){t.exitParameter&&t.exitParameter(this);}accept(t){return t.visitParameter?t.visitParameter(this):t.visitChildren(this)}},nE=class extends pe.ParserRuleContext{eventParameter(t){return t===void 0?this.getRuleContexts(T0):this.getRuleContext(t,T0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_eventParameterList}enterRule(t){t.enterEventParameterList&&t.enterEventParameterList(this);}exitRule(t){t.exitEventParameterList&&t.exitEventParameterList(this);}accept(t){return t.visitEventParameterList?t.visitEventParameterList(this):t.visitChildren(this)}},T0=class extends pe.ParserRuleContext{typeName(){return this.getRuleContext(0,Ar)}IndexedKeyword(){return this.tryGetToken(O.IndexedKeyword,0)}identifier(){return this.tryGetRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_eventParameter}enterRule(t){t.enterEventParameter&&t.enterEventParameter(this);}exitRule(t){t.exitEventParameter&&t.exitEventParameter(this);}accept(t){return t.visitEventParameter?t.visitEventParameter(this):t.visitChildren(this)}},C0=class extends pe.ParserRuleContext{functionTypeParameter(t){return t===void 0?this.getRuleContexts(A0):this.getRuleContext(t,A0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_functionTypeParameterList}enterRule(t){t.enterFunctionTypeParameterList&&t.enterFunctionTypeParameterList(this);}exitRule(t){t.exitFunctionTypeParameterList&&t.exitFunctionTypeParameterList(this);}accept(t){return t.visitFunctionTypeParameterList?t.visitFunctionTypeParameterList(this):t.visitChildren(this)}},A0=class extends pe.ParserRuleContext{typeName(){return this.getRuleContext(0,Ar)}storageLocation(){return this.tryGetRuleContext(0,hh)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_functionTypeParameter}enterRule(t){t.enterFunctionTypeParameter&&t.enterFunctionTypeParameter(this);}exitRule(t){t.exitFunctionTypeParameter&&t.exitFunctionTypeParameter(this);}accept(t){return t.visitFunctionTypeParameter?t.visitFunctionTypeParameter(this):t.visitChildren(this)}},eo=class extends pe.ParserRuleContext{typeName(){return this.getRuleContext(0,Ar)}identifier(){return this.getRuleContext(0,je)}storageLocation(){return this.tryGetRuleContext(0,hh)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_variableDeclaration}enterRule(t){t.enterVariableDeclaration&&t.enterVariableDeclaration(this);}exitRule(t){t.exitVariableDeclaration&&t.exitVariableDeclaration(this);}accept(t){return t.visitVariableDeclaration?t.visitVariableDeclaration(this):t.visitChildren(this)}},Ar=class extends pe.ParserRuleContext{elementaryTypeName(){return this.tryGetRuleContext(0,ch)}userDefinedTypeName(){return this.tryGetRuleContext(0,Zi)}mapping(){return this.tryGetRuleContext(0,oE)}typeName(){return this.tryGetRuleContext(0,Ar)}expression(){return this.tryGetRuleContext(0,ke)}functionTypeName(){return this.tryGetRuleContext(0,lE)}PayableKeyword(){return this.tryGetToken(O.PayableKeyword,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_typeName}enterRule(t){t.enterTypeName&&t.enterTypeName(this);}exitRule(t){t.exitTypeName&&t.exitTypeName(this);}accept(t){return t.visitTypeName?t.visitTypeName(this):t.visitChildren(this)}},Zi=class extends pe.ParserRuleContext{identifier(t){return t===void 0?this.getRuleContexts(je):this.getRuleContext(t,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_userDefinedTypeName}enterRule(t){t.enterUserDefinedTypeName&&t.enterUserDefinedTypeName(this);}exitRule(t){t.exitUserDefinedTypeName&&t.exitUserDefinedTypeName(this);}accept(t){return t.visitUserDefinedTypeName?t.visitUserDefinedTypeName(this):t.visitChildren(this)}},sE=class extends pe.ParserRuleContext{elementaryTypeName(){return this.tryGetRuleContext(0,ch)}userDefinedTypeName(){return this.tryGetRuleContext(0,Zi)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_mappingKey}enterRule(t){t.enterMappingKey&&t.enterMappingKey(this);}exitRule(t){t.exitMappingKey&&t.exitMappingKey(this);}accept(t){return t.visitMappingKey?t.visitMappingKey(this):t.visitChildren(this)}},oE=class extends pe.ParserRuleContext{mappingKey(){return this.getRuleContext(0,sE)}typeName(){return this.getRuleContext(0,Ar)}mappingKeyName(){return this.tryGetRuleContext(0,aE)}mappingValueName(){return this.tryGetRuleContext(0,uE)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_mapping}enterRule(t){t.enterMapping&&t.enterMapping(this);}exitRule(t){t.exitMapping&&t.exitMapping(this);}accept(t){return t.visitMapping?t.visitMapping(this):t.visitChildren(this)}},aE=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_mappingKeyName}enterRule(t){t.enterMappingKeyName&&t.enterMappingKeyName(this);}exitRule(t){t.exitMappingKeyName&&t.exitMappingKeyName(this);}accept(t){return t.visitMappingKeyName?t.visitMappingKeyName(this):t.visitChildren(this)}},uE=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_mappingValueName}enterRule(t){t.enterMappingValueName&&t.enterMappingValueName(this);}exitRule(t){t.exitMappingValueName&&t.exitMappingValueName(this);}accept(t){return t.visitMappingValueName?t.visitMappingValueName(this):t.visitChildren(this)}},lE=class extends pe.ParserRuleContext{functionTypeParameterList(t){return t===void 0?this.getRuleContexts(C0):this.getRuleContext(t,C0)}InternalKeyword(t){return t===void 0?this.getTokens(O.InternalKeyword):this.getToken(O.InternalKeyword,t)}ExternalKeyword(t){return t===void 0?this.getTokens(O.ExternalKeyword):this.getToken(O.ExternalKeyword,t)}stateMutability(t){return t===void 0?this.getRuleContexts(Ca):this.getRuleContext(t,Ca)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_functionTypeName}enterRule(t){t.enterFunctionTypeName&&t.enterFunctionTypeName(this);}exitRule(t){t.exitFunctionTypeName&&t.exitFunctionTypeName(this);}accept(t){return t.visitFunctionTypeName?t.visitFunctionTypeName(this):t.visitChildren(this)}},hh=class extends pe.ParserRuleContext{constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_storageLocation}enterRule(t){t.enterStorageLocation&&t.enterStorageLocation(this);}exitRule(t){t.exitStorageLocation&&t.exitStorageLocation(this);}accept(t){return t.visitStorageLocation?t.visitStorageLocation(this):t.visitChildren(this)}},Ca=class extends pe.ParserRuleContext{PureKeyword(){return this.tryGetToken(O.PureKeyword,0)}ConstantKeyword(){return this.tryGetToken(O.ConstantKeyword,0)}ViewKeyword(){return this.tryGetToken(O.ViewKeyword,0)}PayableKeyword(){return this.tryGetToken(O.PayableKeyword,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_stateMutability}enterRule(t){t.enterStateMutability&&t.enterStateMutability(this);}exitRule(t){t.exitStateMutability&&t.exitStateMutability(this);}accept(t){return t.visitStateMutability?t.visitStateMutability(this):t.visitChildren(this)}},us=class extends pe.ParserRuleContext{statement(t){return t===void 0?this.getRuleContexts(Xi):this.getRuleContext(t,Xi)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_block}enterRule(t){t.enterBlock&&t.enterBlock(this);}exitRule(t){t.exitBlock&&t.exitBlock(this);}accept(t){return t.visitBlock?t.visitBlock(this):t.visitChildren(this)}},Xi=class extends pe.ParserRuleContext{ifStatement(){return this.tryGetRuleContext(0,hE)}tryStatement(){return this.tryGetRuleContext(0,cE)}whileStatement(){return this.tryGetRuleContext(0,fE)}forStatement(){return this.tryGetRuleContext(0,pE)}block(){return this.tryGetRuleContext(0,us)}inlineAssemblyStatement(){return this.tryGetRuleContext(0,mE)}doWhileStatement(){return this.tryGetRuleContext(0,gE)}continueStatement(){return this.tryGetRuleContext(0,yE)}breakStatement(){return this.tryGetRuleContext(0,xE)}returnStatement(){return this.tryGetRuleContext(0,vE)}throwStatement(){return this.tryGetRuleContext(0,EE)}emitStatement(){return this.tryGetRuleContext(0,bE)}simpleStatement(){return this.tryGetRuleContext(0,Z0)}uncheckedStatement(){return this.tryGetRuleContext(0,dE)}revertStatement(){return this.tryGetRuleContext(0,TE)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_statement}enterRule(t){t.enterStatement&&t.enterStatement(this);}exitRule(t){t.exitStatement&&t.exitStatement(this);}accept(t){return t.visitStatement?t.visitStatement(this):t.visitChildren(this)}},Y0=class extends pe.ParserRuleContext{expression(){return this.getRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_expressionStatement}enterRule(t){t.enterExpressionStatement&&t.enterExpressionStatement(this);}exitRule(t){t.exitExpressionStatement&&t.exitExpressionStatement(this);}accept(t){return t.visitExpressionStatement?t.visitExpressionStatement(this):t.visitChildren(this)}},hE=class extends pe.ParserRuleContext{expression(){return this.getRuleContext(0,ke)}statement(t){return t===void 0?this.getRuleContexts(Xi):this.getRuleContext(t,Xi)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_ifStatement}enterRule(t){t.enterIfStatement&&t.enterIfStatement(this);}exitRule(t){t.exitIfStatement&&t.exitIfStatement(this);}accept(t){return t.visitIfStatement?t.visitIfStatement(this):t.visitChildren(this)}},cE=class extends pe.ParserRuleContext{expression(){return this.getRuleContext(0,ke)}block(){return this.getRuleContext(0,us)}returnParameters(){return this.tryGetRuleContext(0,W0)}catchClause(t){return t===void 0?this.getRuleContexts(w0):this.getRuleContext(t,w0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_tryStatement}enterRule(t){t.enterTryStatement&&t.enterTryStatement(this);}exitRule(t){t.exitTryStatement&&t.exitTryStatement(this);}accept(t){return t.visitTryStatement?t.visitTryStatement(this):t.visitChildren(this)}},w0=class extends pe.ParserRuleContext{block(){return this.getRuleContext(0,us)}parameterList(){return this.tryGetRuleContext(0,ao)}identifier(){return this.tryGetRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_catchClause}enterRule(t){t.enterCatchClause&&t.enterCatchClause(this);}exitRule(t){t.exitCatchClause&&t.exitCatchClause(this);}accept(t){return t.visitCatchClause?t.visitCatchClause(this):t.visitChildren(this)}},fE=class extends pe.ParserRuleContext{expression(){return this.getRuleContext(0,ke)}statement(){return this.getRuleContext(0,Xi)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_whileStatement}enterRule(t){t.enterWhileStatement&&t.enterWhileStatement(this);}exitRule(t){t.exitWhileStatement&&t.exitWhileStatement(this);}accept(t){return t.visitWhileStatement?t.visitWhileStatement(this):t.visitChildren(this)}},Z0=class extends pe.ParserRuleContext{variableDeclarationStatement(){return this.tryGetRuleContext(0,CE)}expressionStatement(){return this.tryGetRuleContext(0,Y0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_simpleStatement}enterRule(t){t.enterSimpleStatement&&t.enterSimpleStatement(this);}exitRule(t){t.exitSimpleStatement&&t.exitSimpleStatement(this);}accept(t){return t.visitSimpleStatement?t.visitSimpleStatement(this):t.visitChildren(this)}},dE=class extends pe.ParserRuleContext{block(){return this.getRuleContext(0,us)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_uncheckedStatement}enterRule(t){t.enterUncheckedStatement&&t.enterUncheckedStatement(this);}exitRule(t){t.exitUncheckedStatement&&t.exitUncheckedStatement(this);}accept(t){return t.visitUncheckedStatement?t.visitUncheckedStatement(this):t.visitChildren(this)}},pE=class extends pe.ParserRuleContext{statement(){return this.getRuleContext(0,Xi)}simpleStatement(){return this.tryGetRuleContext(0,Z0)}expressionStatement(){return this.tryGetRuleContext(0,Y0)}expression(){return this.tryGetRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_forStatement}enterRule(t){t.enterForStatement&&t.enterForStatement(this);}exitRule(t){t.exitForStatement&&t.exitForStatement(this);}accept(t){return t.visitForStatement?t.visitForStatement(this):t.visitChildren(this)}},mE=class extends pe.ParserRuleContext{assemblyBlock(){return this.getRuleContext(0,Ji)}StringLiteralFragment(){return this.tryGetToken(O.StringLiteralFragment,0)}inlineAssemblyStatementFlag(){return this.tryGetRuleContext(0,_E)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_inlineAssemblyStatement}enterRule(t){t.enterInlineAssemblyStatement&&t.enterInlineAssemblyStatement(this);}exitRule(t){t.exitInlineAssemblyStatement&&t.exitInlineAssemblyStatement(this);}accept(t){return t.visitInlineAssemblyStatement?t.visitInlineAssemblyStatement(this):t.visitChildren(this)}},_E=class extends pe.ParserRuleContext{stringLiteral(){return this.getRuleContext(0,ka)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_inlineAssemblyStatementFlag}enterRule(t){t.enterInlineAssemblyStatementFlag&&t.enterInlineAssemblyStatementFlag(this);}exitRule(t){t.exitInlineAssemblyStatementFlag&&t.exitInlineAssemblyStatementFlag(this);}accept(t){return t.visitInlineAssemblyStatementFlag?t.visitInlineAssemblyStatementFlag(this):t.visitChildren(this)}},gE=class extends pe.ParserRuleContext{statement(){return this.getRuleContext(0,Xi)}expression(){return this.getRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_doWhileStatement}enterRule(t){t.enterDoWhileStatement&&t.enterDoWhileStatement(this);}exitRule(t){t.exitDoWhileStatement&&t.exitDoWhileStatement(this);}accept(t){return t.visitDoWhileStatement?t.visitDoWhileStatement(this):t.visitChildren(this)}},yE=class extends pe.ParserRuleContext{ContinueKeyword(){return this.getToken(O.ContinueKeyword,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_continueStatement}enterRule(t){t.enterContinueStatement&&t.enterContinueStatement(this);}exitRule(t){t.exitContinueStatement&&t.exitContinueStatement(this);}accept(t){return t.visitContinueStatement?t.visitContinueStatement(this):t.visitChildren(this)}},xE=class extends pe.ParserRuleContext{BreakKeyword(){return this.getToken(O.BreakKeyword,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_breakStatement}enterRule(t){t.enterBreakStatement&&t.enterBreakStatement(this);}exitRule(t){t.exitBreakStatement&&t.exitBreakStatement(this);}accept(t){return t.visitBreakStatement?t.visitBreakStatement(this):t.visitChildren(this)}},vE=class extends pe.ParserRuleContext{expression(){return this.tryGetRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_returnStatement}enterRule(t){t.enterReturnStatement&&t.enterReturnStatement(this);}exitRule(t){t.exitReturnStatement&&t.exitReturnStatement(this);}accept(t){return t.visitReturnStatement?t.visitReturnStatement(this):t.visitChildren(this)}},EE=class extends pe.ParserRuleContext{constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_throwStatement}enterRule(t){t.enterThrowStatement&&t.enterThrowStatement(this);}exitRule(t){t.exitThrowStatement&&t.exitThrowStatement(this);}accept(t){return t.visitThrowStatement?t.visitThrowStatement(this):t.visitChildren(this)}},bE=class extends pe.ParserRuleContext{functionCall(){return this.getRuleContext(0,ep)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_emitStatement}enterRule(t){t.enterEmitStatement&&t.enterEmitStatement(this);}exitRule(t){t.exitEmitStatement&&t.exitEmitStatement(this);}accept(t){return t.visitEmitStatement?t.visitEmitStatement(this):t.visitChildren(this)}},TE=class extends pe.ParserRuleContext{functionCall(){return this.getRuleContext(0,ep)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_revertStatement}enterRule(t){t.enterRevertStatement&&t.enterRevertStatement(this);}exitRule(t){t.exitRevertStatement&&t.exitRevertStatement(this);}accept(t){return t.visitRevertStatement?t.visitRevertStatement(this):t.visitChildren(this)}},CE=class extends pe.ParserRuleContext{identifierList(){return this.tryGetRuleContext(0,wE)}variableDeclaration(){return this.tryGetRuleContext(0,eo)}variableDeclarationList(){return this.tryGetRuleContext(0,AE)}expression(){return this.tryGetRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_variableDeclarationStatement}enterRule(t){t.enterVariableDeclarationStatement&&t.enterVariableDeclarationStatement(this);}exitRule(t){t.exitVariableDeclarationStatement&&t.exitVariableDeclarationStatement(this);}accept(t){return t.visitVariableDeclarationStatement?t.visitVariableDeclarationStatement(this):t.visitChildren(this)}},AE=class extends pe.ParserRuleContext{variableDeclaration(t){return t===void 0?this.getRuleContexts(eo):this.getRuleContext(t,eo)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_variableDeclarationList}enterRule(t){t.enterVariableDeclarationList&&t.enterVariableDeclarationList(this);}exitRule(t){t.exitVariableDeclarationList&&t.exitVariableDeclarationList(this);}accept(t){return t.visitVariableDeclarationList?t.visitVariableDeclarationList(this):t.visitChildren(this)}},wE=class extends pe.ParserRuleContext{identifier(t){return t===void 0?this.getRuleContexts(je):this.getRuleContext(t,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_identifierList}enterRule(t){t.enterIdentifierList&&t.enterIdentifierList(this);}exitRule(t){t.exitIdentifierList&&t.exitIdentifierList(this);}accept(t){return t.visitIdentifierList?t.visitIdentifierList(this):t.visitChildren(this)}},ch=class extends pe.ParserRuleContext{Int(){return this.tryGetToken(O.Int,0)}Uint(){return this.tryGetToken(O.Uint,0)}Byte(){return this.tryGetToken(O.Byte,0)}Fixed(){return this.tryGetToken(O.Fixed,0)}Ufixed(){return this.tryGetToken(O.Ufixed,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_elementaryTypeName}enterRule(t){t.enterElementaryTypeName&&t.enterElementaryTypeName(this);}exitRule(t){t.exitElementaryTypeName&&t.exitElementaryTypeName(this);}accept(t){return t.visitElementaryTypeName?t.visitElementaryTypeName(this):t.visitChildren(this)}},ke=class extends pe.ParserRuleContext{expression(t){return t===void 0?this.getRuleContexts(ke):this.getRuleContext(t,ke)}typeName(){return this.tryGetRuleContext(0,Ar)}identifier(){return this.tryGetRuleContext(0,je)}nameValueList(){return this.tryGetRuleContext(0,J0)}functionCallArguments(){return this.tryGetRuleContext(0,Q0)}primaryExpression(){return this.tryGetRuleContext(0,X0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_expression}enterRule(t){t.enterExpression&&t.enterExpression(this);}exitRule(t){t.exitExpression&&t.exitExpression(this);}accept(t){return t.visitExpression?t.visitExpression(this):t.visitChildren(this)}},X0=class extends pe.ParserRuleContext{BooleanLiteral(){return this.tryGetToken(O.BooleanLiteral,0)}numberLiteral(){return this.tryGetRuleContext(0,np)}hexLiteral(){return this.tryGetRuleContext(0,ph)}stringLiteral(){return this.tryGetRuleContext(0,ka)}identifier(){return this.tryGetRuleContext(0,je)}TypeKeyword(){return this.tryGetToken(O.TypeKeyword,0)}PayableKeyword(){return this.tryGetToken(O.PayableKeyword,0)}tupleExpression(){return this.tryGetRuleContext(0,ME)}typeName(){return this.tryGetRuleContext(0,Ar)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_primaryExpression}enterRule(t){t.enterPrimaryExpression&&t.enterPrimaryExpression(this);}exitRule(t){t.exitPrimaryExpression&&t.exitPrimaryExpression(this);}accept(t){return t.visitPrimaryExpression?t.visitPrimaryExpression(this):t.visitChildren(this)}},fh=class extends pe.ParserRuleContext{expression(t){return t===void 0?this.getRuleContexts(ke):this.getRuleContext(t,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_expressionList}enterRule(t){t.enterExpressionList&&t.enterExpressionList(this);}exitRule(t){t.exitExpressionList&&t.exitExpressionList(this);}accept(t){return t.visitExpressionList?t.visitExpressionList(this):t.visitChildren(this)}},J0=class extends pe.ParserRuleContext{nameValue(t){return t===void 0?this.getRuleContexts(D0):this.getRuleContext(t,D0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_nameValueList}enterRule(t){t.enterNameValueList&&t.enterNameValueList(this);}exitRule(t){t.exitNameValueList&&t.exitNameValueList(this);}accept(t){return t.visitNameValueList?t.visitNameValueList(this):t.visitChildren(this)}},D0=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}expression(){return this.getRuleContext(0,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_nameValue}enterRule(t){t.enterNameValue&&t.enterNameValue(this);}exitRule(t){t.exitNameValue&&t.exitNameValue(this);}accept(t){return t.visitNameValue?t.visitNameValue(this):t.visitChildren(this)}},Q0=class extends pe.ParserRuleContext{nameValueList(){return this.tryGetRuleContext(0,J0)}expressionList(){return this.tryGetRuleContext(0,fh)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_functionCallArguments}enterRule(t){t.enterFunctionCallArguments&&t.enterFunctionCallArguments(this);}exitRule(t){t.exitFunctionCallArguments&&t.exitFunctionCallArguments(this);}accept(t){return t.visitFunctionCallArguments?t.visitFunctionCallArguments(this):t.visitChildren(this)}},ep=class extends pe.ParserRuleContext{expression(){return this.getRuleContext(0,ke)}functionCallArguments(){return this.getRuleContext(0,Q0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_functionCall}enterRule(t){t.enterFunctionCall&&t.enterFunctionCall(this);}exitRule(t){t.exitFunctionCall&&t.exitFunctionCall(this);}accept(t){return t.visitFunctionCall?t.visitFunctionCall(this):t.visitChildren(this)}},Ji=class extends pe.ParserRuleContext{assemblyItem(t){return t===void 0?this.getRuleContexts(S0):this.getRuleContext(t,S0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyBlock}enterRule(t){t.enterAssemblyBlock&&t.enterAssemblyBlock(this);}exitRule(t){t.exitAssemblyBlock&&t.exitAssemblyBlock(this);}accept(t){return t.visitAssemblyBlock?t.visitAssemblyBlock(this):t.visitChildren(this)}},S0=class extends pe.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,je)}assemblyBlock(){return this.tryGetRuleContext(0,Ji)}assemblyExpression(){return this.tryGetRuleContext(0,Hr)}assemblyLocalDefinition(){return this.tryGetRuleContext(0,SE)}assemblyAssignment(){return this.tryGetRuleContext(0,RE)}assemblyStackAssignment(){return this.tryGetRuleContext(0,NE)}labelDefinition(){return this.tryGetRuleContext(0,OE)}assemblySwitch(){return this.tryGetRuleContext(0,FE)}assemblyFunctionDefinition(){return this.tryGetRuleContext(0,LE)}assemblyFor(){return this.tryGetRuleContext(0,IE)}assemblyIf(){return this.tryGetRuleContext(0,kE)}BreakKeyword(){return this.tryGetToken(O.BreakKeyword,0)}ContinueKeyword(){return this.tryGetToken(O.ContinueKeyword,0)}LeaveKeyword(){return this.tryGetToken(O.LeaveKeyword,0)}numberLiteral(){return this.tryGetRuleContext(0,np)}stringLiteral(){return this.tryGetRuleContext(0,ka)}hexLiteral(){return this.tryGetRuleContext(0,ph)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyItem}enterRule(t){t.enterAssemblyItem&&t.enterAssemblyItem(this);}exitRule(t){t.exitAssemblyItem&&t.exitAssemblyItem(this);}accept(t){return t.visitAssemblyItem?t.visitAssemblyItem(this):t.visitChildren(this)}},Hr=class extends pe.ParserRuleContext{assemblyCall(){return this.tryGetRuleContext(0,DE)}assemblyLiteral(){return this.tryGetRuleContext(0,ip)}assemblyMember(){return this.tryGetRuleContext(0,tp)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyExpression}enterRule(t){t.enterAssemblyExpression&&t.enterAssemblyExpression(this);}exitRule(t){t.exitAssemblyExpression&&t.exitAssemblyExpression(this);}accept(t){return t.visitAssemblyExpression?t.visitAssemblyExpression(this):t.visitChildren(this)}},tp=class extends pe.ParserRuleContext{identifier(t){return t===void 0?this.getRuleContexts(je):this.getRuleContext(t,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyMember}enterRule(t){t.enterAssemblyMember&&t.enterAssemblyMember(this);}exitRule(t){t.exitAssemblyMember&&t.exitAssemblyMember(this);}accept(t){return t.visitAssemblyMember?t.visitAssemblyMember(this):t.visitChildren(this)}},DE=class extends pe.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,je)}assemblyExpression(t){return t===void 0?this.getRuleContexts(Hr):this.getRuleContext(t,Hr)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyCall}enterRule(t){t.enterAssemblyCall&&t.enterAssemblyCall(this);}exitRule(t){t.exitAssemblyCall&&t.exitAssemblyCall(this);}accept(t){return t.visitAssemblyCall?t.visitAssemblyCall(this):t.visitChildren(this)}},SE=class extends pe.ParserRuleContext{assemblyIdentifierOrList(){return this.getRuleContext(0,rp)}assemblyExpression(){return this.tryGetRuleContext(0,Hr)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyLocalDefinition}enterRule(t){t.enterAssemblyLocalDefinition&&t.enterAssemblyLocalDefinition(this);}exitRule(t){t.exitAssemblyLocalDefinition&&t.exitAssemblyLocalDefinition(this);}accept(t){return t.visitAssemblyLocalDefinition?t.visitAssemblyLocalDefinition(this):t.visitChildren(this)}},RE=class extends pe.ParserRuleContext{assemblyIdentifierOrList(){return this.getRuleContext(0,rp)}assemblyExpression(){return this.getRuleContext(0,Hr)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyAssignment}enterRule(t){t.enterAssemblyAssignment&&t.enterAssemblyAssignment(this);}exitRule(t){t.exitAssemblyAssignment&&t.exitAssemblyAssignment(this);}accept(t){return t.visitAssemblyAssignment?t.visitAssemblyAssignment(this):t.visitChildren(this)}},rp=class extends pe.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,je)}assemblyMember(){return this.tryGetRuleContext(0,tp)}assemblyIdentifierList(){return this.tryGetRuleContext(0,dh)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyIdentifierOrList}enterRule(t){t.enterAssemblyIdentifierOrList&&t.enterAssemblyIdentifierOrList(this);}exitRule(t){t.exitAssemblyIdentifierOrList&&t.exitAssemblyIdentifierOrList(this);}accept(t){return t.visitAssemblyIdentifierOrList?t.visitAssemblyIdentifierOrList(this):t.visitChildren(this)}},dh=class extends pe.ParserRuleContext{identifier(t){return t===void 0?this.getRuleContexts(je):this.getRuleContext(t,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyIdentifierList}enterRule(t){t.enterAssemblyIdentifierList&&t.enterAssemblyIdentifierList(this);}exitRule(t){t.exitAssemblyIdentifierList&&t.exitAssemblyIdentifierList(this);}accept(t){return t.visitAssemblyIdentifierList?t.visitAssemblyIdentifierList(this):t.visitChildren(this)}},NE=class extends pe.ParserRuleContext{assemblyExpression(){return this.getRuleContext(0,Hr)}identifier(){return this.getRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyStackAssignment}enterRule(t){t.enterAssemblyStackAssignment&&t.enterAssemblyStackAssignment(this);}exitRule(t){t.exitAssemblyStackAssignment&&t.exitAssemblyStackAssignment(this);}accept(t){return t.visitAssemblyStackAssignment?t.visitAssemblyStackAssignment(this):t.visitChildren(this)}},OE=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_labelDefinition}enterRule(t){t.enterLabelDefinition&&t.enterLabelDefinition(this);}exitRule(t){t.exitLabelDefinition&&t.exitLabelDefinition(this);}accept(t){return t.visitLabelDefinition?t.visitLabelDefinition(this):t.visitChildren(this)}},FE=class extends pe.ParserRuleContext{assemblyExpression(){return this.getRuleContext(0,Hr)}assemblyCase(t){return t===void 0?this.getRuleContexts(R0):this.getRuleContext(t,R0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblySwitch}enterRule(t){t.enterAssemblySwitch&&t.enterAssemblySwitch(this);}exitRule(t){t.exitAssemblySwitch&&t.exitAssemblySwitch(this);}accept(t){return t.visitAssemblySwitch?t.visitAssemblySwitch(this):t.visitChildren(this)}},R0=class extends pe.ParserRuleContext{assemblyLiteral(){return this.tryGetRuleContext(0,ip)}assemblyBlock(){return this.getRuleContext(0,Ji)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyCase}enterRule(t){t.enterAssemblyCase&&t.enterAssemblyCase(this);}exitRule(t){t.exitAssemblyCase&&t.exitAssemblyCase(this);}accept(t){return t.visitAssemblyCase?t.visitAssemblyCase(this):t.visitChildren(this)}},LE=class extends pe.ParserRuleContext{identifier(){return this.getRuleContext(0,je)}assemblyBlock(){return this.getRuleContext(0,Ji)}assemblyIdentifierList(){return this.tryGetRuleContext(0,dh)}assemblyFunctionReturns(){return this.tryGetRuleContext(0,PE)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyFunctionDefinition}enterRule(t){t.enterAssemblyFunctionDefinition&&t.enterAssemblyFunctionDefinition(this);}exitRule(t){t.exitAssemblyFunctionDefinition&&t.exitAssemblyFunctionDefinition(this);}accept(t){return t.visitAssemblyFunctionDefinition?t.visitAssemblyFunctionDefinition(this):t.visitChildren(this)}},PE=class extends pe.ParserRuleContext{assemblyIdentifierList(){return this.tryGetRuleContext(0,dh)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyFunctionReturns}enterRule(t){t.enterAssemblyFunctionReturns&&t.enterAssemblyFunctionReturns(this);}exitRule(t){t.exitAssemblyFunctionReturns&&t.exitAssemblyFunctionReturns(this);}accept(t){return t.visitAssemblyFunctionReturns?t.visitAssemblyFunctionReturns(this):t.visitChildren(this)}},IE=class extends pe.ParserRuleContext{assemblyExpression(t){return t===void 0?this.getRuleContexts(Hr):this.getRuleContext(t,Hr)}assemblyBlock(t){return t===void 0?this.getRuleContexts(Ji):this.getRuleContext(t,Ji)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyFor}enterRule(t){t.enterAssemblyFor&&t.enterAssemblyFor(this);}exitRule(t){t.exitAssemblyFor&&t.exitAssemblyFor(this);}accept(t){return t.visitAssemblyFor?t.visitAssemblyFor(this):t.visitChildren(this)}},kE=class extends pe.ParserRuleContext{assemblyExpression(){return this.getRuleContext(0,Hr)}assemblyBlock(){return this.getRuleContext(0,Ji)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyIf}enterRule(t){t.enterAssemblyIf&&t.enterAssemblyIf(this);}exitRule(t){t.exitAssemblyIf&&t.exitAssemblyIf(this);}accept(t){return t.visitAssemblyIf?t.visitAssemblyIf(this):t.visitChildren(this)}},ip=class extends pe.ParserRuleContext{stringLiteral(){return this.tryGetRuleContext(0,ka)}DecimalNumber(){return this.tryGetToken(O.DecimalNumber,0)}HexNumber(){return this.tryGetToken(O.HexNumber,0)}hexLiteral(){return this.tryGetRuleContext(0,ph)}BooleanLiteral(){return this.tryGetToken(O.BooleanLiteral,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_assemblyLiteral}enterRule(t){t.enterAssemblyLiteral&&t.enterAssemblyLiteral(this);}exitRule(t){t.exitAssemblyLiteral&&t.exitAssemblyLiteral(this);}accept(t){return t.visitAssemblyLiteral?t.visitAssemblyLiteral(this):t.visitChildren(this)}},ME=class extends pe.ParserRuleContext{expression(t){return t===void 0?this.getRuleContexts(ke):this.getRuleContext(t,ke)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_tupleExpression}enterRule(t){t.enterTupleExpression&&t.enterTupleExpression(this);}exitRule(t){t.exitTupleExpression&&t.exitTupleExpression(this);}accept(t){return t.visitTupleExpression?t.visitTupleExpression(this):t.visitChildren(this)}},np=class extends pe.ParserRuleContext{DecimalNumber(){return this.tryGetToken(O.DecimalNumber,0)}HexNumber(){return this.tryGetToken(O.HexNumber,0)}NumberUnit(){return this.tryGetToken(O.NumberUnit,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_numberLiteral}enterRule(t){t.enterNumberLiteral&&t.enterNumberLiteral(this);}exitRule(t){t.exitNumberLiteral&&t.exitNumberLiteral(this);}accept(t){return t.visitNumberLiteral?t.visitNumberLiteral(this):t.visitChildren(this)}},je=class extends pe.ParserRuleContext{ReceiveKeyword(){return this.tryGetToken(O.ReceiveKeyword,0)}GlobalKeyword(){return this.tryGetToken(O.GlobalKeyword,0)}ConstructorKeyword(){return this.tryGetToken(O.ConstructorKeyword,0)}PayableKeyword(){return this.tryGetToken(O.PayableKeyword,0)}LeaveKeyword(){return this.tryGetToken(O.LeaveKeyword,0)}Identifier(){return this.tryGetToken(O.Identifier,0)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_identifier}enterRule(t){t.enterIdentifier&&t.enterIdentifier(this);}exitRule(t){t.exitIdentifier&&t.exitIdentifier(this);}accept(t){return t.visitIdentifier?t.visitIdentifier(this):t.visitChildren(this)}},ph=class extends pe.ParserRuleContext{HexLiteralFragment(t){return t===void 0?this.getTokens(O.HexLiteralFragment):this.getToken(O.HexLiteralFragment,t)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_hexLiteral}enterRule(t){t.enterHexLiteral&&t.enterHexLiteral(this);}exitRule(t){t.exitHexLiteral&&t.exitHexLiteral(this);}accept(t){return t.visitHexLiteral?t.visitHexLiteral(this):t.visitChildren(this)}},ns=class extends pe.ParserRuleContext{userDefinedTypeName(t){return t===void 0?this.getRuleContexts(Zi):this.getRuleContext(t,Zi)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_overrideSpecifier}enterRule(t){t.enterOverrideSpecifier&&t.enterOverrideSpecifier(this);}exitRule(t){t.exitOverrideSpecifier&&t.exitOverrideSpecifier(this);}accept(t){return t.visitOverrideSpecifier?t.visitOverrideSpecifier(this):t.visitChildren(this)}},ka=class extends pe.ParserRuleContext{StringLiteralFragment(t){return t===void 0?this.getTokens(O.StringLiteralFragment):this.getToken(O.StringLiteralFragment,t)}constructor(t,e){super(t,e);}get ruleIndex(){return O.RULE_stringLiteral}enterRule(t){t.enterStringLiteral&&t.enterStringLiteral(this);}exitRule(t){t.exitStringLiteral&&t.exitStringLiteral(this);}accept(t){return t.visitStringLiteral?t.visitStringLiteral(this):t.visitChildren(this)}},F8=["SourceUnit","PragmaDirective","ImportDirective","ContractDefinition","InheritanceSpecifier","StateVariableDeclaration","UsingForDeclaration","StructDefinition","ModifierDefinition","ModifierInvocation","FunctionDefinition","EventDefinition","CustomErrorDefinition","RevertStatement","EnumValue","EnumDefinition","VariableDeclaration","UserDefinedTypeName","Mapping","ArrayTypeName","FunctionTypeName","Block","ExpressionStatement","IfStatement","WhileStatement","ForStatement","InlineAssemblyStatement","DoWhileStatement","ContinueStatement","Break","Continue","BreakStatement","ReturnStatement","EmitStatement","ThrowStatement","VariableDeclarationStatement","ElementaryTypeName","FunctionCall","AssemblyBlock","AssemblyCall","AssemblyLocalDefinition","AssemblyAssignment","AssemblyStackAssignment","LabelDefinition","AssemblySwitch","AssemblyCase","AssemblyFunctionDefinition","AssemblyFor","AssemblyIf","TupleExpression","NameValueExpression","BooleanLiteral","NumberLiteral","Identifier","BinaryOperation","UnaryOperation","NewExpression","Conditional","StringLiteral","HexLiteral","HexNumber","DecimalNumber","MemberAccess","IndexAccess","IndexRangeAccess","NameValueList","UncheckedStatement","TryStatement","CatchClause","FileLevelConstant","AssemblyMemberAccess","TypeDefinition"],L8=["+","-","*","/","**","%","<<",">>","&&","||",",,","&",",","^","<",">","<=",">=","==","!=","=",",=","^=","&=","<<=",">>=","+=","-=","*=","/=","%=","|","|="],P8=["-","+","++","--","~","after","delete","!"],I8=Mt(r8()),k8=Mt(sh()),M8=class extends I8.AbstractParseTreeVisitor{constructor(t){super(),this.options=t,this.result=null;}defaultResult(){throw new Error("Unknown node")}aggregateResult(){return {type:""}}visitSourceUnit(t){var e;let i={type:"SourceUnit",children:((e=t.children)!=null?e:[]).filter(o=>!(o instanceof k8.ErrorNode)).slice(0,-1).map(o=>this.visit(o))},n=this._addMeta(i,t);return this.result=n,n}visitContractPart(t){return this.visit(t.getChild(0))}visitContractDefinition(t){let e=this._toText(t.identifier()),r=this._toText(t.getChild(0));this._currentContract=e;let i={type:"ContractDefinition",name:e,baseContracts:t.inheritanceSpecifier().map(n=>this.visitInheritanceSpecifier(n)),subNodes:t.contractPart().map(n=>this.visit(n)),kind:r};return this._addMeta(i,t)}visitStateVariableDeclaration(t){let e=this.visitTypeName(t.typeName()),r=t.identifier(),i=this._toText(r),n=null,o=t.expression();o&&(n=this.visitExpression(o));let s="default";t.InternalKeyword().length>0?s="internal":t.PublicKeyword().length>0?s="public":t.PrivateKeyword().length>0&&(s="private");let a=!1;t.ConstantKeyword().length>0&&(a=!0);let u,l=t.overrideSpecifier();l.length===0?u=null:u=l[0].userDefinedTypeName().map(f=>this.visitUserDefinedTypeName(f));let h=!1;t.ImmutableKeyword().length>0&&(h=!0);let c={type:"VariableDeclaration",typeName:e,name:i,identifier:this.visitIdentifier(r),expression:n,visibility:s,isStateVar:!0,isDeclaredConst:a,isIndexed:!1,isImmutable:h,override:u,storageLocation:null},p={type:"StateVariableDeclaration",variables:[this._addMeta(c,t)],initialValue:n};return this._addMeta(p,t)}visitVariableDeclaration(t){let e=null,r=t.storageLocation();r&&(e=this._toText(r));let i=t.identifier(),n={type:"VariableDeclaration",typeName:this.visitTypeName(t.typeName()),name:this._toText(i),identifier:this.visitIdentifier(i),storageLocation:e,isStateVar:!1,isIndexed:!1,expression:null};return this._addMeta(n,t)}visitVariableDeclarationStatement(t){let e=[],r=t.variableDeclaration(),i=t.identifierList(),n=t.variableDeclarationList();r!==void 0?e=[this.visitVariableDeclaration(r)]:i!==void 0?e=this.buildIdentifierList(i):n&&(e=this.buildVariableDeclarationList(n));let o=null,s=t.expression();s&&(o=this.visitExpression(s));let a={type:"VariableDeclarationStatement",variables:e,initialValue:o};return this._addMeta(a,t)}visitStatement(t){return this.visit(t.getChild(0))}visitSimpleStatement(t){return this.visit(t.getChild(0))}visitEventDefinition(t){let e=t.eventParameterList().eventParameter().map(i=>{let n=this.visitTypeName(i.typeName()),o=null,s=i.identifier();s&&(o=this._toText(s));let a={type:"VariableDeclaration",typeName:n,name:o,identifier:s!==void 0?this.visitIdentifier(s):null,isStateVar:!1,isIndexed:i.IndexedKeyword()!==void 0,storageLocation:null,expression:null};return this._addMeta(a,i)}),r={type:"EventDefinition",name:this._toText(t.identifier()),parameters:e,isAnonymous:t.AnonymousKeyword()!==void 0};return this._addMeta(r,t)}visitBlock(t){let e={type:"Block",statements:t.statement().map(r=>this.visitStatement(r))};return this._addMeta(e,t)}visitParameter(t){let e=null,r=t.storageLocation();r!==void 0&&(e=this._toText(r));let i=null,n=t.identifier();n!==void 0&&(i=this._toText(n));let o={type:"VariableDeclaration",typeName:this.visitTypeName(t.typeName()),name:i,identifier:n!==void 0?this.visitIdentifier(n):null,storageLocation:e,isStateVar:!1,isIndexed:!1,expression:null};return this._addMeta(o,t)}visitFunctionDefinition(t){let e=!1,r=!1,i=!1,n=!1,o=null,s=[],a=null,u="default",l=null,h=t.block();h!==void 0&&(l=this.visitBlock(h));let c=t.modifierList().modifierInvocation().map(v=>this.visitModifierInvocation(v)),p=null;t.modifierList().stateMutability().length>0&&(p=this._stateMutabilityToText(t.modifierList().stateMutability(0)));let f=t.returnParameters();switch(this._toText(t.functionDescriptor().getChild(0))){case"constructor":s=t.parameterList().parameter().map(v=>this.visit(v)),t.modifierList().InternalKeyword().length>0?u="internal":t.modifierList().PublicKeyword().length>0?u="public":u="default",e=!0;break;case"fallback":s=t.parameterList().parameter().map(v=>this.visit(v)),a=f!==void 0?this.visitReturnParameters(f):null,u="external",r=!0;break;case"receive":u="external",i=!0;break;case"function":{let v=t.functionDescriptor().identifier();o=v!==void 0?this._toText(v):"",s=t.parameterList().parameter().map(g=>this.visit(g)),a=f!==void 0?this.visitReturnParameters(f):null,t.modifierList().ExternalKeyword().length>0?u="external":t.modifierList().InternalKeyword().length>0?u="internal":t.modifierList().PublicKeyword().length>0?u="public":t.modifierList().PrivateKeyword().length>0&&(u="private"),e=o===this._currentContract,r=o==="";break}}t.modifierList().VirtualKeyword().length>0&&(n=!0);let m,_=t.modifierList().overrideSpecifier();_.length===0?m=null:m=_[0].userDefinedTypeName().map(v=>this.visitUserDefinedTypeName(v));let x={type:"FunctionDefinition",name:o,parameters:s,returnParameters:a,body:l,visibility:u,modifiers:c,override:m,isConstructor:e,isReceiveEther:i,isFallback:r,isVirtual:n,stateMutability:p};return this._addMeta(x,t)}visitEnumDefinition(t){let e={type:"EnumDefinition",name:this._toText(t.identifier()),members:t.enumValue().map(r=>this.visitEnumValue(r))};return this._addMeta(e,t)}visitEnumValue(t){let e={type:"EnumValue",name:this._toText(t.identifier())};return this._addMeta(e,t)}visitElementaryTypeName(t){let e={type:"ElementaryTypeName",name:this._toText(t),stateMutability:null};return this._addMeta(e,t)}visitIdentifier(t){let e={type:"Identifier",name:this._toText(t)};return this._addMeta(e,t)}visitTypeName(t){var e;if(t.children!==void 0&&t.children.length>2){let r=null;if(t.children.length===4){let o=t.expression();if(o===void 0)throw new Error("Assertion error: a typeName with 4 children should have an expression");r=this.visitExpression(o);}let i=t.typeName(),n={type:"ArrayTypeName",baseTypeName:this.visitTypeName(i),length:r};return this._addMeta(n,t)}if(((e=t.children)==null?void 0:e.length)===2){let r={type:"ElementaryTypeName",name:this._toText(t.getChild(0)),stateMutability:this._toText(t.getChild(1))};return this._addMeta(r,t)}if(t.elementaryTypeName()!==void 0)return this.visitElementaryTypeName(t.elementaryTypeName());if(t.userDefinedTypeName()!==void 0)return this.visitUserDefinedTypeName(t.userDefinedTypeName());if(t.mapping()!==void 0)return this.visitMapping(t.mapping());if(t.functionTypeName()!==void 0)return this.visitFunctionTypeName(t.functionTypeName());throw new Error("Assertion error: unhandled type name case")}visitUserDefinedTypeName(t){let e={type:"UserDefinedTypeName",namePath:this._toText(t)};return this._addMeta(e,t)}visitUsingForDeclaration(t){let e=null,r=t.typeName();r!==void 0&&(e=this.visitTypeName(r));let i=t.GlobalKeyword()!==void 0,n=t.usingForObject(),o=n.userDefinedTypeName(),s;if(o!==void 0)s={type:"UsingForDeclaration",isGlobal:i,typeName:e,libraryName:this._toText(o),functions:[],operators:[]};else {let a=n.usingForObjectDirective(),u=[],l=[];for(let h of a){u.push(this._toText(h.userDefinedTypeName()));let c=h.userDefinableOperators();c!==void 0?l.push(this._toText(c)):l.push(null);}s={type:"UsingForDeclaration",isGlobal:i,typeName:e,libraryName:null,functions:u,operators:l};}return this._addMeta(s,t)}visitPragmaDirective(t){let e=t.pragmaValue().version(),r=this._toText(t.pragmaValue());(e==null?void 0:e.children)!==void 0&&(r=e.children.map(n=>this._toText(n)).join(" "));let i={type:"PragmaDirective",name:this._toText(t.pragmaName()),value:r};return this._addMeta(i,t)}visitInheritanceSpecifier(t){let e=t.expressionList(),r=e!==void 0?e.expression().map(n=>this.visitExpression(n)):[],i={type:"InheritanceSpecifier",baseName:this.visitUserDefinedTypeName(t.userDefinedTypeName()),arguments:r};return this._addMeta(i,t)}visitModifierInvocation(t){let e=t.expressionList(),r;e!=null?r=e.expression().map(n=>this.visit(n)):t.children!==void 0&&t.children.length>1?r=[]:r=null;let i={type:"ModifierInvocation",name:this._toText(t.identifier()),arguments:r};return this._addMeta(i,t)}visitFunctionTypeName(t){let e=t.functionTypeParameterList(0).functionTypeParameter().map(s=>this.visitFunctionTypeParameter(s)),r=[];t.functionTypeParameterList().length>1&&(r=t.functionTypeParameterList(1).functionTypeParameter().map(s=>this.visitFunctionTypeParameter(s)));let i="default";t.InternalKeyword().length>0?i="internal":t.ExternalKeyword().length>0&&(i="external");let n=null;t.stateMutability().length>0&&(n=this._toText(t.stateMutability(0)));let o={type:"FunctionTypeName",parameterTypes:e,returnTypes:r,visibility:i,stateMutability:n};return this._addMeta(o,t)}visitFunctionTypeParameter(t){let e=null;t.storageLocation()&&(e=this._toText(t.storageLocation()));let r={type:"VariableDeclaration",typeName:this.visitTypeName(t.typeName()),name:null,identifier:null,storageLocation:e,isStateVar:!1,isIndexed:!1,expression:null};return this._addMeta(r,t)}visitThrowStatement(t){let e={type:"ThrowStatement"};return this._addMeta(e,t)}visitReturnStatement(t){let e=null,r=t.expression();r&&(e=this.visitExpression(r));let i={type:"ReturnStatement",expression:e};return this._addMeta(i,t)}visitEmitStatement(t){let e={type:"EmitStatement",eventCall:this.visitFunctionCall(t.functionCall())};return this._addMeta(e,t)}visitCustomErrorDefinition(t){let e={type:"CustomErrorDefinition",name:this._toText(t.identifier()),parameters:this.visitParameterList(t.parameterList())};return this._addMeta(e,t)}visitTypeDefinition(t){let e={type:"TypeDefinition",name:this._toText(t.identifier()),definition:this.visitElementaryTypeName(t.elementaryTypeName())};return this._addMeta(e,t)}visitRevertStatement(t){let e={type:"RevertStatement",revertCall:this.visitFunctionCall(t.functionCall())};return this._addMeta(e,t)}visitFunctionCall(t){let e=[],r=[],i=[],n=t.functionCallArguments(),o=n.expressionList(),s=n.nameValueList();if(o)e=o.expression().map(u=>this.visitExpression(u));else if(s)for(let u of s.nameValue())e.push(this.visitExpression(u.expression())),r.push(this._toText(u.identifier())),i.push(this.visitIdentifier(u.identifier()));let a={type:"FunctionCall",expression:this.visitExpression(t.expression()),arguments:e,names:r,identifiers:i};return this._addMeta(a,t)}visitStructDefinition(t){let e={type:"StructDefinition",name:this._toText(t.identifier()),members:t.variableDeclaration().map(r=>this.visitVariableDeclaration(r))};return this._addMeta(e,t)}visitWhileStatement(t){let e={type:"WhileStatement",condition:this.visitExpression(t.expression()),body:this.visitStatement(t.statement())};return this._addMeta(e,t)}visitDoWhileStatement(t){let e={type:"DoWhileStatement",condition:this.visitExpression(t.expression()),body:this.visitStatement(t.statement())};return this._addMeta(e,t)}visitIfStatement(t){let e=this.visitStatement(t.statement(0)),r=null;t.statement().length>1&&(r=this.visitStatement(t.statement(1)));let i={type:"IfStatement",condition:this.visitExpression(t.expression()),trueBody:e,falseBody:r};return this._addMeta(i,t)}visitTryStatement(t){let e=null,r=t.returnParameters();r!==void 0&&(e=this.visitReturnParameters(r));let i=t.catchClause().map(o=>this.visitCatchClause(o)),n={type:"TryStatement",expression:this.visitExpression(t.expression()),returnParameters:e,body:this.visitBlock(t.block()),catchClauses:i};return this._addMeta(n,t)}visitCatchClause(t){let e=null;if(t.parameterList()&&(e=this.visitParameterList(t.parameterList())),t.identifier()&&this._toText(t.identifier())!=="Error"&&this._toText(t.identifier())!=="Panic")throw new Error('Expected "Error" or "Panic" identifier in catch clause');let r=null,i=t.identifier();i!==void 0&&(r=this._toText(i));let n={type:"CatchClause",isReasonStringType:r==="Error",kind:r,parameters:e,body:this.visitBlock(t.block())};return this._addMeta(n,t)}visitExpressionStatement(t){if(!t)return null;let e={type:"ExpressionStatement",expression:this.visitExpression(t.expression())};return this._addMeta(e,t)}visitNumberLiteral(t){var e;let r=this._toText(t.getChild(0)),i=null;((e=t.children)==null?void 0:e.length)===2&&(i=this._toText(t.getChild(1)));let n={type:"NumberLiteral",number:r,subdenomination:i};return this._addMeta(n,t)}visitMappingKey(t){if(t.elementaryTypeName())return this.visitElementaryTypeName(t.elementaryTypeName());if(t.userDefinedTypeName())return this.visitUserDefinedTypeName(t.userDefinedTypeName());throw new Error("Expected MappingKey to have either elementaryTypeName or userDefinedTypeName")}visitMapping(t){let e=t.mappingKeyName(),r=t.mappingValueName(),i={type:"Mapping",keyType:this.visitMappingKey(t.mappingKey()),keyName:e===void 0?null:this.visitIdentifier(e.identifier()),valueType:this.visitTypeName(t.typeName()),valueName:r===void 0?null:this.visitIdentifier(r.identifier())};return this._addMeta(i,t)}visitModifierDefinition(t){let e=null;t.parameterList()&&(e=this.visitParameterList(t.parameterList()));let r=!1;t.VirtualKeyword().length>0&&(r=!0);let i,n=t.overrideSpecifier();n.length===0?i=null:i=n[0].userDefinedTypeName().map(u=>this.visitUserDefinedTypeName(u));let o=null,s=t.block();s!==void 0&&(o=this.visitBlock(s));let a={type:"ModifierDefinition",name:this._toText(t.identifier()),parameters:e,body:o,isVirtual:r,override:i};return this._addMeta(a,t)}visitUncheckedStatement(t){let e={type:"UncheckedStatement",block:this.visitBlock(t.block())};return this._addMeta(e,t)}visitExpression(t){let e;switch(t.children.length){case 1:{let r=t.tryGetRuleContext(0,X0);if(r===void 0)throw new Error("Assertion error: primary expression should exist when children length is 1");return this.visitPrimaryExpression(r)}case 2:if(e=this._toText(t.getChild(0)),e==="new"){let r={type:"NewExpression",typeName:this.visitTypeName(t.typeName())};return this._addMeta(r,t)}if(P8.includes(e)){let r={type:"UnaryOperation",operator:e,subExpression:this.visitExpression(t.getRuleContext(0,ke)),isPrefix:!0};return this._addMeta(r,t)}if(e=this._toText(t.getChild(1)),["++","--"].includes(e)){let r={type:"UnaryOperation",operator:e,subExpression:this.visitExpression(t.getRuleContext(0,ke)),isPrefix:!1};return this._addMeta(r,t)}break;case 3:if(this._toText(t.getChild(0))==="("&&this._toText(t.getChild(2))===")"){let r={type:"TupleExpression",components:[this.visitExpression(t.getRuleContext(0,ke))],isArray:!1};return this._addMeta(r,t)}if(e=this._toText(t.getChild(1)),e==="."){let r={type:"MemberAccess",expression:this.visitExpression(t.expression(0)),memberName:this._toText(t.identifier())};return this._addMeta(r,t)}if(B8(e)){let r={type:"BinaryOperation",operator:e,left:this.visitExpression(t.expression(0)),right:this.visitExpression(t.expression(1))};return this._addMeta(r,t)}break;case 4:if(this._toText(t.getChild(1))==="("&&this._toText(t.getChild(3))===")"){let r=[],i=[],n=[],o=t.functionCallArguments();if(o.expressionList())r=o.expressionList().expression().map(a=>this.visitExpression(a));else if(o.nameValueList())for(let a of o.nameValueList().nameValue())r.push(this.visitExpression(a.expression())),i.push(this._toText(a.identifier())),n.push(this.visitIdentifier(a.identifier()));let s={type:"FunctionCall",expression:this.visitExpression(t.expression(0)),arguments:r,names:i,identifiers:n};return this._addMeta(s,t)}if(this._toText(t.getChild(1))==="["&&this._toText(t.getChild(3))==="]"){if(t.getChild(2).text===":"){let i={type:"IndexRangeAccess",base:this.visitExpression(t.expression(0))};return this._addMeta(i,t)}let r={type:"IndexAccess",base:this.visitExpression(t.expression(0)),index:this.visitExpression(t.expression(1))};return this._addMeta(r,t)}if(this._toText(t.getChild(1))==="{"&&this._toText(t.getChild(3))==="}"){let r={type:"NameValueExpression",expression:this.visitExpression(t.expression(0)),arguments:this.visitNameValueList(t.nameValueList())};return this._addMeta(r,t)}break;case 5:if(this._toText(t.getChild(1))==="?"&&this._toText(t.getChild(3))===":"){let r={type:"Conditional",condition:this.visitExpression(t.expression(0)),trueExpression:this.visitExpression(t.expression(1)),falseExpression:this.visitExpression(t.expression(2))};return this._addMeta(r,t)}if(this._toText(t.getChild(1))==="["&&this._toText(t.getChild(2))===":"&&this._toText(t.getChild(4))==="]"){let r={type:"IndexRangeAccess",base:this.visitExpression(t.expression(0)),indexEnd:this.visitExpression(t.expression(1))};return this._addMeta(r,t)}else if(this._toText(t.getChild(1))==="["&&this._toText(t.getChild(3))===":"&&this._toText(t.getChild(4))==="]"){let r={type:"IndexRangeAccess",base:this.visitExpression(t.expression(0)),indexStart:this.visitExpression(t.expression(1))};return this._addMeta(r,t)}break;case 6:if(this._toText(t.getChild(1))==="["&&this._toText(t.getChild(3))===":"&&this._toText(t.getChild(5))==="]"){let r={type:"IndexRangeAccess",base:this.visitExpression(t.expression(0)),indexStart:this.visitExpression(t.expression(1)),indexEnd:this.visitExpression(t.expression(2))};return this._addMeta(r,t)}break}throw new Error("Unrecognized expression")}visitNameValueList(t){let e=[],r=[],i=[];for(let o of t.nameValue())e.push(this._toText(o.identifier())),r.push(this.visitIdentifier(o.identifier())),i.push(this.visitExpression(o.expression()));let n={type:"NameValueList",names:e,identifiers:r,arguments:i};return this._addMeta(n,t)}visitFileLevelConstant(t){let e=this.visitTypeName(t.typeName()),r=t.identifier(),i=this._toText(r),n=this.visitExpression(t.expression()),o={type:"FileLevelConstant",typeName:e,name:i,initialValue:n,isDeclaredConst:!0,isImmutable:!1};return this._addMeta(o,t)}visitForStatement(t){let e=this.visitExpressionStatement(t.expressionStatement());e&&(e=e.expression);let r={type:"ForStatement",initExpression:t.simpleStatement()?this.visitSimpleStatement(t.simpleStatement()):null,conditionExpression:e,loopExpression:{type:"ExpressionStatement",expression:t.expression()!==void 0?this.visitExpression(t.expression()):null},body:this.visitStatement(t.statement())};return this._addMeta(r,t)}visitHexLiteral(t){let e=t.HexLiteralFragment().map(i=>this._toText(i)).map(i=>i.substring(4,i.length-1)),r={type:"HexLiteral",value:e.join(""),parts:e};return this._addMeta(r,t)}visitPrimaryExpression(t){if(t.BooleanLiteral()){let e={type:"BooleanLiteral",value:this._toText(t.BooleanLiteral())==="true"};return this._addMeta(e,t)}if(t.hexLiteral())return this.visitHexLiteral(t.hexLiteral());if(t.stringLiteral()){let e=t.stringLiteral().StringLiteralFragment().map(n=>{let o=this._toText(n),s=o.slice(0,7)==="unicode";s&&(o=o.slice(7));let a=o[0]==="'",u=o.substring(1,o.length-1);return {value:a?u.replace(new RegExp("\\\\'","g"),"'"):u.replace(new RegExp('\\\\"',"g"),'"'),isUnicode:s}}),r=e.map(n=>n.value),i={type:"StringLiteral",value:r.join(""),parts:r,isUnicode:e.map(n=>n.isUnicode)};return this._addMeta(i,t)}if(t.numberLiteral())return this.visitNumberLiteral(t.numberLiteral());if(t.TypeKeyword()){let e={type:"Identifier",name:"type"};return this._addMeta(e,t)}return t.typeName()?this.visitTypeName(t.typeName()):this.visit(t.getChild(0))}visitTupleExpression(t){let e=t.children.slice(1,-1),i={type:"TupleExpression",components:this._mapCommasToNulls(e).map(n=>n===null?null:this.visit(n)),isArray:this._toText(t.getChild(0))==="["};return this._addMeta(i,t)}buildIdentifierList(t){let e=t.children.slice(1,-1),r=t.identifier(),i=0;return this._mapCommasToNulls(e).map(n=>{if(!n)return null;let o=r[i];i++;let s={type:"VariableDeclaration",name:this._toText(o),identifier:this.visitIdentifier(o),isStateVar:!1,isIndexed:!1,typeName:null,storageLocation:null,expression:null};return this._addMeta(s,o)})}buildVariableDeclarationList(t){var e;let r=t.variableDeclaration(),i=0;return this._mapCommasToNulls((e=t.children)!=null?e:[]).map(n=>{if(!n)return null;let o=r[i];i++;let s=null;o.storageLocation()&&(s=this._toText(o.storageLocation()));let a=o.identifier(),u={type:"VariableDeclaration",name:this._toText(a),identifier:this.visitIdentifier(a),typeName:this.visitTypeName(o.typeName()),storageLocation:s,isStateVar:!1,isIndexed:!1,expression:null};return this._addMeta(u,o)})}visitImportDirective(t){let e=this._toText(t.importPath()),r=null,i=null,n=null,o=null;if(t.importDeclaration().length>0)n=t.importDeclaration().map(l=>{let h=this._toText(l.identifier(0)),c=null;return l.identifier().length>1&&(c=this._toText(l.identifier(1))),[h,c]}),o=t.importDeclaration().map(l=>{let h=this.visitIdentifier(l.identifier(0)),c=null;return l.identifier().length>1&&(c=this.visitIdentifier(l.identifier(1))),[h,c]});else {let l=t.identifier();if(l.length!==0)if(l.length===1){let h=t.identifier(0);r=this._toText(h),i=this.visitIdentifier(h);}else if(l.length===2){let h=t.identifier(1);r=this._toText(h),i=this.visitIdentifier(h);}else throw new Error("Assertion error: an import should have one or two identifiers")}let s=e.substring(1,e.length-1),a={type:"StringLiteral",value:s,parts:[s],isUnicode:[!1]},u={type:"ImportDirective",path:s,pathLiteral:this._addMeta(a,t.importPath()),unitAlias:r,unitAliasIdentifier:i,symbolAliases:n,symbolAliasesIdentifiers:o};return this._addMeta(u,t)}buildEventParameterList(t){return t.eventParameter().map(e=>{let r=this.visit(e.typeName()),i=e.identifier(),n=i?this._toText(i):null;return {type:"VariableDeclaration",typeName:r,name:n,isStateVar:!1,isIndexed:!!e.IndexedKeyword()}})}visitReturnParameters(t){return this.visitParameterList(t.parameterList())}visitParameterList(t){return t.parameter().map(e=>this.visitParameter(e))}visitInlineAssemblyStatement(t){let e=null;t.StringLiteralFragment()&&(e=this._toText(t.StringLiteralFragment()),e=e.substring(1,e.length-1));let r=[],i=t.inlineAssemblyStatementFlag();if(i!==void 0){let o=this._toText(i.stringLiteral());r.push(o.slice(1,o.length-1));}let n={type:"InlineAssemblyStatement",language:e,flags:r,body:this.visitAssemblyBlock(t.assemblyBlock())};return this._addMeta(n,t)}visitAssemblyBlock(t){let r={type:"AssemblyBlock",operations:t.assemblyItem().map(i=>this.visitAssemblyItem(i))};return this._addMeta(r,t)}visitAssemblyItem(t){let e;if(t.hexLiteral())return this.visitHexLiteral(t.hexLiteral());if(t.stringLiteral()){e=this._toText(t.stringLiteral());let r=e.substring(1,e.length-1),i={type:"StringLiteral",value:r,parts:[r],isUnicode:[!1]};return this._addMeta(i,t)}if(t.BreakKeyword()){let r={type:"Break"};return this._addMeta(r,t)}if(t.ContinueKeyword()){let r={type:"Continue"};return this._addMeta(r,t)}return this.visit(t.getChild(0))}visitAssemblyExpression(t){return this.visit(t.getChild(0))}visitAssemblyCall(t){let e=this._toText(t.getChild(0)),r=t.assemblyExpression().map(n=>this.visitAssemblyExpression(n)),i={type:"AssemblyCall",functionName:e,arguments:r};return this._addMeta(i,t)}visitAssemblyLiteral(t){let e;if(t.stringLiteral()){e=this._toText(t);let r=e.substring(1,e.length-1),i={type:"StringLiteral",value:r,parts:[r],isUnicode:[!1]};return this._addMeta(i,t)}if(t.BooleanLiteral()){let r={type:"BooleanLiteral",value:this._toText(t.BooleanLiteral())==="true"};return this._addMeta(r,t)}if(t.DecimalNumber()){let r={type:"DecimalNumber",value:this._toText(t)};return this._addMeta(r,t)}if(t.HexNumber()){let r={type:"HexNumber",value:this._toText(t)};return this._addMeta(r,t)}if(t.hexLiteral())return this.visitHexLiteral(t.hexLiteral());throw new Error("Should never reach here")}visitAssemblySwitch(t){let e={type:"AssemblySwitch",expression:this.visitAssemblyExpression(t.assemblyExpression()),cases:t.assemblyCase().map(r=>this.visitAssemblyCase(r))};return this._addMeta(e,t)}visitAssemblyCase(t){let e=null;this._toText(t.getChild(0))==="case"&&(e=this.visitAssemblyLiteral(t.assemblyLiteral()));let r={type:"AssemblyCase",block:this.visitAssemblyBlock(t.assemblyBlock()),value:e,default:e===null};return this._addMeta(r,t)}visitAssemblyLocalDefinition(t){let e=t.assemblyIdentifierOrList(),r;e.identifier()?r=[this.visitIdentifier(e.identifier())]:e.assemblyMember()?r=[this.visitAssemblyMember(e.assemblyMember())]:r=e.assemblyIdentifierList().identifier().map(o=>this.visitIdentifier(o));let i=null;t.assemblyExpression()!==void 0&&(i=this.visitAssemblyExpression(t.assemblyExpression()));let n={type:"AssemblyLocalDefinition",names:r,expression:i};return this._addMeta(n,t)}visitAssemblyFunctionDefinition(t){let e=t.assemblyIdentifierList(),r=e!==void 0?e.identifier().map(s=>this.visitIdentifier(s)):[],i=t.assemblyFunctionReturns(),n=i?i.assemblyIdentifierList().identifier().map(s=>this.visitIdentifier(s)):[],o={type:"AssemblyFunctionDefinition",name:this._toText(t.identifier()),arguments:r,returnArguments:n,body:this.visitAssemblyBlock(t.assemblyBlock())};return this._addMeta(o,t)}visitAssemblyAssignment(t){let e=t.assemblyIdentifierOrList(),r;e.identifier()?r=[this.visitIdentifier(e.identifier())]:e.assemblyMember()?r=[this.visitAssemblyMember(e.assemblyMember())]:r=e.assemblyIdentifierList().identifier().map(n=>this.visitIdentifier(n));let i={type:"AssemblyAssignment",names:r,expression:this.visitAssemblyExpression(t.assemblyExpression())};return this._addMeta(i,t)}visitAssemblyMember(t){let[e,r]=t.identifier(),i={type:"AssemblyMemberAccess",expression:this.visitIdentifier(e),memberName:this.visitIdentifier(r)};return this._addMeta(i,t)}visitLabelDefinition(t){let e={type:"LabelDefinition",name:this._toText(t.identifier())};return this._addMeta(e,t)}visitAssemblyStackAssignment(t){let e={type:"AssemblyStackAssignment",name:this._toText(t.identifier()),expression:this.visitAssemblyExpression(t.assemblyExpression())};return this._addMeta(e,t)}visitAssemblyFor(t){let e={type:"AssemblyFor",pre:this.visit(t.getChild(1)),condition:this.visit(t.getChild(2)),post:this.visit(t.getChild(3)),body:this.visit(t.getChild(4))};return this._addMeta(e,t)}visitAssemblyIf(t){let e={type:"AssemblyIf",condition:this.visitAssemblyExpression(t.assemblyExpression()),body:this.visitAssemblyBlock(t.assemblyBlock())};return this._addMeta(e,t)}visitContinueStatement(t){let e={type:"ContinueStatement"};return this._addMeta(e,t)}visitBreakStatement(t){let e={type:"BreakStatement"};return this._addMeta(e,t)}_toText(t){let e=t.text;if(e===void 0)throw new Error("Assertion error: text should never be undefiend");return e}_stateMutabilityToText(t){if(t.PureKeyword()!==void 0)return "pure";if(t.ConstantKeyword()!==void 0)return "constant";if(t.PayableKeyword()!==void 0)return "payable";if(t.ViewKeyword()!==void 0)return "view";throw new Error("Assertion error: non-exhaustive stateMutability check")}_loc(t){return {start:{line:t.start.line,column:t.start.charPositionInLine},end:{line:t.stop?t.stop.line:t.start.line,column:t.stop?t.stop.charPositionInLine:t.start.charPositionInLine}}}_range(t){var e,r;return [t.start.startIndex,(r=(e=t.stop)==null?void 0:e.stopIndex)!=null?r:t.start.startIndex]}_addMeta(t,e){let r={type:t.type};return this.options.loc===!0&&(t.loc=this._loc(e)),this.options.range===!0&&(t.range=this._range(e)),Hl(Hl({},r),t)}_mapCommasToNulls(t){if(t.length===0)return [];let e=[],r=!0;for(let i of t)if(r)this._toText(i)===","?e.push(null):(e.push(i),r=!1);else {if(this._toText(i)!==",")throw new Error("expected comma");r=!0;}return r&&e.push(null),e}};function B8(t){return L8.includes(t)}var q8=Mt(x8()),H8=class extends q8.default.error.ErrorListener{constructor(){super(),this._errors=[];}syntaxError(t,e,r,i,n){this._errors.push({message:n,line:r,column:i});}getErrors(){return this._errors}hasErrors(){return this._errors.length>0}},j8=H8,U8=Mt(E8()),V8=U8.default,$8=["var","bool","address","string","Int","Uint","Byte","Fixed","UFixed"];function z8(t,e){let r=t.lastIndexOf(e);return [t.substring(0,r),t.substring(r+1,t.length)]}function K8(t){return t.endsWith("'")&&(t=t.substring(0,t.length-1)),t.startsWith("'")&&(t=t.substring(1,t.length)),t}function G8(t){return t==="Identifier"||t==="from"?"Identifier":t==="TrueLiteral"||t==="FalseLiteral"?"Boolean":t==="VersionLiteral"?"Version":t==="StringLiteral"?"String":$8.includes(t)?"Type":t==="NumberUnit"?"Subdenomination":t==="DecimalNumber"?"Numeric":t==="HexLiteral"?"Hex":t==="ReservedKeyword"?"Reserved":/^\W+$/.test(t)?"Punctuator":"Keyword"}function W8(){return V8.split(`
|
|
304
|
+
`).map(t=>z8(t,"=")).reduce((t,[e,r])=>(t[parseInt(r,10)]=K8(e),t),{})}function BE(t,e){let r=W8();return t.map(n=>{var o,s;let u={type:G8(r[n.type]),value:n.text};return e.range===!0&&(u.range=[n.startIndex,n.stopIndex+1]),e.loc===!0&&(u.loc={start:{line:n.line,column:n.charPositionInLine},end:{line:n.line,column:n.charPositionInLine+((s=(o=n.text)==null?void 0:o.length)!=null?s:0)}}),u})}var qE=class extends Error{constructor(t){super();let{message:e,line:r,column:i}=t.errors[0];this.message=`${e} (${r}:${i})`,this.errors=t.errors,Error.captureStackTrace!==void 0?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;}};function Y8(t,e={}){let r=new h0.ANTLRInputStream(t),i=new ue(r);return BE(i.getAllTokens(),e)}function Z8(t,e={}){let r=new h0.ANTLRInputStream(t),i=new ue(r),n=new h0.CommonTokenStream(i),o=new O(n),s=new j8;i.removeErrorListeners(),i.addErrorListener(s),o.removeErrorListeners(),o.addErrorListener(s),o.buildParseTree=!0;let a=o.sourceUnit(),u=new M8(e);u.visit(a);let l=u.result;if(l===null)throw new Error("ast should never be null");let h=[];if(e.tokens===!0&&(h=BE(n.getTokens(),e)),e.tolerant!==!0&&s.hasErrors())throw new qE({errors:s.getErrors()});return e.tolerant===!0&&s.hasErrors()&&(l.errors=s.getErrors()),e.tokens===!0&&(l.tokens=h),l}function X8(t){if(typeof t!="object"||t===null)return !1;let e=t;return Object.prototype.hasOwnProperty.call(e,"type")&&typeof e.type=="string"?F8.includes(e.type):!1}function N0(t,e,r){if(Array.isArray(t)&&t.forEach(o=>N0(o,e,r)),!X8(t))return;let i=!0;if(e[t.type]!==void 0&&(i=e[t.type](t,r)),i===!1)return;for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&N0(t[o],e,t);let n=t.type+":exit";e[n]!==void 0&&e[n](t,r);}});var _r=z((Dte,eb)=>{var lp=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
305
|
+
Found: ${e.toString().split(`
|
|
306
|
+
`)[0]}
|
|
307
|
+
`),Error.captureStackTrace(this,t);}};eb.exports=t=>{if(t.length>2)throw new lp(t);function e(i={}){this.options=i;}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r};});var nb=z((Ste,ib)=>{var rb={};ib.exports=rb;var tb={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(tb).forEach(function(t){var e=tb[t],r=rb[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m";});});var ob=z((Rte,sb)=>{sb.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),i=/^-{1,2}/.test(t)?"":"--",n=e.indexOf(i+t);return n!==-1&&(r===-1?!0:n<r)};});var ub=z((Nte,ab)=>{var Q8=me("os"),Vr=ob(),or=process.env,uo=void 0;Vr("no-color")||Vr("no-colors")||Vr("color=false")?uo=!1:(Vr("color")||Vr("colors")||Vr("color=true")||Vr("color=always"))&&(uo=!0);"FORCE_COLOR"in or&&(uo=or.FORCE_COLOR.length===0||parseInt(or.FORCE_COLOR,10)!==0);function eP(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function tP(t){if(uo===!1)return 0;if(Vr("color=16m")||Vr("color=full")||Vr("color=truecolor"))return 3;if(Vr("color=256"))return 2;if(t&&!t.isTTY&&uo!==!0)return 0;var e=uo?1:0;if(process.platform==="win32"){var r=Q8.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in or)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in or})||or.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in or)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(or.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in or){var i=parseInt((or.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(or.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(or.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(or.TERM)||"COLORTERM"in or?1:(or.TERM==="dumb",e)}function hp(t){var e=tP(t);return eP(e)}ab.exports={supportsColor:hp,stdout:hp(process.stdout),stderr:hp(process.stderr)};});var hb=z((Ote,lb)=>{lb.exports=function(e,r){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(o){o=o.toLowerCase();var s=n[o]||[" "],a=Math.floor(Math.random()*s.length);typeof n[o]!="undefined"?i+=n[o][a]:i+=o;}),i};});var fb=z((Fte,cb)=>{cb.exports=function(e,r){e=e||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(i.up,i.down,i.mid);function o(u){var l=Math.floor(Math.random()*u);return l}function s(u){var l=!1;return n.filter(function(h){l=h===u;}),l}function a(u,l){var h="",c,p;l=l||{},l.up=typeof l.up!="undefined"?l.up:!0,l.mid=typeof l.mid!="undefined"?l.mid:!0,l.down=typeof l.down!="undefined"?l.down:!0,l.size=typeof l.size!="undefined"?l.size:"maxi",u=u.split("");for(p in u)if(!s(p)){switch(h=h+u[p],c={up:0,down:0,mid:0},l.size){case"mini":c.up=o(8),c.mid=o(2),c.down=o(8);break;case"maxi":c.up=o(16)+3,c.mid=o(4)+1,c.down=o(64)+3;break;default:c.up=o(8)+1,c.mid=o(6)/2,c.down=o(8)+1;break}var f=["up","mid","down"];for(var m in f)for(var _=f[m],x=0;x<=c[_];x++)l[_]&&(h=h+i[_][o(i[_].length)]);}return h}return a(e,r)};});var pb=z((Lte,db)=>{db.exports=function(t){return function(e,r,i){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}};});var _b=z((Pte,mb)=>{mb.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}};});var yb=z((Ite,gb)=>{gb.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,i,n){return r===" "?r:t[e[i++%e.length]](r)}};});var vb=z((kte,xb)=>{xb.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,i,n){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}};});var wb=z((Bte,Ab)=>{var $e={};Ab.exports=$e;$e.themes={};var rP=me("util"),ls=$e.styles=nb(),bb=Object.defineProperties,iP=new RegExp(/[\r\n]+/g);$e.supportsColor=ub().supportsColor;typeof $e.enabled=="undefined"&&($e.enabled=$e.supportsColor()!==!1);$e.enable=function(){$e.enabled=!0;};$e.disable=function(){$e.enabled=!1;};$e.stripColors=$e.strip=function(t){return (""+t).replace(/\x1B\[\d+m/g,"")};$e.stylize=function(e,r){if(!$e.enabled)return e+"";var i=ls[r];return !i&&r in $e?$e[r](e):i.open+e+i.close};var nP=/[|\\{}()[\]^$+*?.]/g,sP=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(nP,"\\$&")};function Tb(t){var e=function r(){return aP.apply(r,arguments)};return e._styles=t,e.__proto__=oP,e}var Cb=function(){var t={};return ls.grey=ls.gray,Object.keys(ls).forEach(function(e){ls[e].closeRe=new RegExp(sP(ls[e].close),"g"),t[e]={get:function(){return Tb(this._styles.concat(e))}};}),t}(),oP=bb(function(){},Cb);function aP(){var t=Array.prototype.slice.call(arguments),e=t.map(function(s){return s!=null&&s.constructor===String?s:rP.inspect(s)}).join(" ");if(!$e.enabled||!e)return e;for(var r=e.indexOf(`
|
|
308
|
+
`)!=-1,i=this._styles,n=i.length;n--;){var o=ls[i[n]];e=o.open+e.replace(o.closeRe,o.open)+o.close,r&&(e=e.replace(iP,function(s){return o.close+s+o.open}));}return e}$e.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){$e[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var o in t[r])n=$e[t[r][o]](n);return n}return $e[t[r]](i)};})(e);};function uP(){var t={};return Object.keys(Cb).forEach(function(e){t[e]={get:function(){return Tb([e])}};}),t}var lP=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};$e.trap=hb();$e.zalgo=fb();$e.maps={};$e.maps.america=pb()($e);$e.maps.zebra=_b()($e);$e.maps.rainbow=yb()($e);$e.maps.random=vb()($e);for(Eb in $e.maps)(function(t){$e[t]=function(e){return lP($e.maps[t],e)};})(Eb);var Eb;bb($e,uP());});var cp=z((qte,Db)=>{var hP=wb();Db.exports=hP;});var Sb=z(fp=>{fp.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};fp.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"};});var Rb=z(dp=>{dp.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};dp.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"};});var Nb=z(pp=>{pp.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};pp.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"};});var Ob=z(_h=>{Object.defineProperty(_h,"cli",{value:Sb()});Object.defineProperty(_h,"npm",{value:Rb()});Object.defineProperty(_h,"syslog",{value:Nb()});});var Ht=z(Ba=>{Object.defineProperty(Ba,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Ba,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Ba,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Ba,"configs",{value:Ob()});});var xh=z((zte,yh)=>{var gp=cp(),{LEVEL:mp,MESSAGE:_p}=Ht();gp.enabled=!0;var Fb=/\s+/,gh=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e;}static addColors(e){let r=Object.keys(e).reduce((i,n)=>(i[n]=Fb.test(e[n])?e[n].split(Fb):e[n],i),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,i){if(typeof i=="undefined"&&(i=r),!Array.isArray(t.allColors[e]))return gp[t.allColors[e]](i);for(let n=0,o=t.allColors[e].length;n<o;n++)i=gp[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[_p]=="string"&&(e[_p]=this.colorize(e[mp],e.level,e[_p])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[mp],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[mp],e.level,e.message)),e}};yh.exports=t=>new gh(t);yh.exports.Colorizer=yh.exports.Format=gh;});var Pb=z((Kte,Lb)=>{var{Colorizer:cP}=xh();Lb.exports=t=>(cP.addColors(t.colors||t),t);});var kb=z((Gte,Ib)=>{var fP=_r();Ib.exports=fP(t=>(t.message=` ${t.message}`,t));});var qb=z((Wte,Bb)=>{var dP=_r(),{LEVEL:Mb,MESSAGE:yp}=Ht();Bb.exports=dP((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[Mb]:t[Mb]||t.level,message:t.message,[yp]:t[yp]||t.message});return e&&(n.stack=t.stack),r&&(n.cause=t.cause),n}if(!(t.message instanceof Error))return t;let i=t.message;return Object.assign(t,i),t.message=i.message,t[yp]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t});});var vp=z((Yte,Eh)=>{var{configs:pP,LEVEL:Hb,MESSAGE:xp}=Ht(),vh=class t{constructor(e={levels:pP.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e;}static getLongestLevel(e){let r=Object.keys(e).map(i=>i.length);return Math.max(...r)}static paddingForLevel(e,r,i){let n=i+1-e.length,o=Math.floor(n/r.length);return `${r}${r.repeat(o)}`.slice(0,n)}static paddingForLevels(e,r=" "){let i=t.getLongestLevel(e);return Object.keys(e).reduce((n,o)=>(n[o]=t.paddingForLevel(o,r,i),n),{})}transform(e,r){return e.message=`${this.paddings[e[Hb]]}${e.message}`,e[xp]&&(e[xp]=`${this.paddings[e[Hb]]}${e[xp]}`),e}};Eh.exports=t=>new vh(t);Eh.exports.Padder=Eh.exports.Format=vh;});var jb=z((Zte,Ep)=>{var{Colorizer:mP}=xh(),{Padder:_P}=vp(),{configs:gP,MESSAGE:yP}=Ht(),bh=class{constructor(e={}){e.levels||(e.levels=gP.cli.levels),this.colorizer=new mP(e),this.padder=new _P(e),this.options=e;}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[yP]=`${e.level}:${e.message}`,e}};Ep.exports=t=>new bh(t);Ep.exports.Format=bh;});var Vb=z((Xte,bp)=>{var xP=_r();function Ub(t){if(t.every(vP))return e=>{let r=e;for(let i=0;i<t.length;i++)if(r=t[i].transform(r,t[i].options),!r)return !1;return r}}function vP(t){if(typeof t.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
309
|
+
`));return !0}bp.exports=(...t)=>{let e=xP(Ub(t)),r=e();return r.Format=e.Format,r};bp.exports.cascade=Ub;});var qa=z((wp,Gb)=>{var{hasOwnProperty:Th}=Object.prototype,cs=Ap();cs.configure=Ap;cs.stringify=cs;cs.default=cs;wp.stringify=cs;wp.configure=Ap;Gb.exports=cs;var EP=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function un(t){return t.length<5e3&&!EP.test(t)?`"${t}"`:JSON.stringify(t)}function Tp(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],i=e;for(;i!==0&&t[i-1]>r;)t[i]=t[i-1],i--;t[i]=r;}return t}var bP=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Cp(t){return bP.call(t)!==void 0&&t.length!==0}function $b(t,e,r){t.length<r&&(r=t.length);let i=e===","?"":" ",n=`"0":${i}${t[0]}`;for(let o=1;o<r;o++)n+=`${e}"${o}":${i}${t[o]}`;return n}function TP(t){if(Th.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return `"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return {toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return '"[Circular]"'}function zb(t,e){let r;if(Th.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function Kb(t,e){let r;if(Th.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function hs(t){return t===1?"1 item":`${t} items`}function CP(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function AP(t){if(Th.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Ap(t){t={...t};let e=AP(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=TP(t),i=zb(t,"bigint"),n=zb(t,"deterministic"),o=Kb(t,"maximumDepth"),s=Kb(t,"maximumBreadth");function a(p,f,m,_,x,v){let g=f[p];switch(typeof g=="object"&&g!==null&&typeof g.toJSON=="function"&&(g=g.toJSON(p)),g=_.call(f,p,g),typeof g){case"string":return un(g);case"object":{if(g===null)return "null";if(m.indexOf(g)!==-1)return r;let b="",E=",",w=v;if(Array.isArray(g)){if(g.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(g),x!==""&&(v+=x,b+=`
|
|
310
|
+
${v}`,E=`,
|
|
311
|
+
${v}`);let te=Math.min(g.length,s),ae=0;for(;ae<te-1;ae++){let y=a(String(ae),g,m,_,x,v);b+=y!==void 0?y:"null",b+=E;}let k=a(String(ae),g,m,_,x,v);if(b+=k!==void 0?k:"null",g.length-1>s){let y=g.length-s-1;b+=`${E}"... ${hs(y)} not stringified"`;}return x!==""&&(b+=`
|
|
312
|
+
${w}`),m.pop(),`[${b}]`}let D=Object.keys(g),N=D.length;if(N===0)return "{}";if(o<m.length+1)return '"[Object]"';let F="",V="";x!==""&&(v+=x,E=`,
|
|
313
|
+
${v}`,F=" ");let X=Math.min(N,s);n&&!Cp(g)&&(D=Tp(D)),m.push(g);for(let te=0;te<X;te++){let ae=D[te],k=a(ae,g,m,_,x,v);k!==void 0&&(b+=`${V}${un(ae)}:${F}${k}`,V=E);}if(N>s){let te=N-s;b+=`${V}"...":${F}"${hs(te)} not stringified"`,V=E;}return x!==""&&V.length>1&&(b=`
|
|
314
|
+
${v}${b}
|
|
315
|
+
${w}`),m.pop(),`{${b}}`}case"number":return isFinite(g)?String(g):e?e(g):"null";case"boolean":return g===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(g);default:return e?e(g):void 0}}function u(p,f,m,_,x,v){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(p)),typeof f){case"string":return un(f);case"object":{if(f===null)return "null";if(m.indexOf(f)!==-1)return r;let g=v,b="",E=",";if(Array.isArray(f)){if(f.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(f),x!==""&&(v+=x,b+=`
|
|
316
|
+
${v}`,E=`,
|
|
317
|
+
${v}`);let N=Math.min(f.length,s),F=0;for(;F<N-1;F++){let X=u(String(F),f[F],m,_,x,v);b+=X!==void 0?X:"null",b+=E;}let V=u(String(F),f[F],m,_,x,v);if(b+=V!==void 0?V:"null",f.length-1>s){let X=f.length-s-1;b+=`${E}"... ${hs(X)} not stringified"`;}return x!==""&&(b+=`
|
|
318
|
+
${g}`),m.pop(),`[${b}]`}m.push(f);let w="";x!==""&&(v+=x,E=`,
|
|
319
|
+
${v}`,w=" ");let D="";for(let N of _){let F=u(N,f[N],m,_,x,v);F!==void 0&&(b+=`${D}${un(N)}:${w}${F}`,D=E);}return x!==""&&D.length>1&&(b=`
|
|
320
|
+
${v}${b}
|
|
321
|
+
${g}`),m.pop(),`{${b}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function l(p,f,m,_,x){switch(typeof f){case"string":return un(f);case"object":{if(f===null)return "null";if(typeof f.toJSON=="function"){if(f=f.toJSON(p),typeof f!="object")return l(p,f,m,_,x);if(f===null)return "null"}if(m.indexOf(f)!==-1)return r;let v=x;if(Array.isArray(f)){if(f.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(f),x+=_;let F=`
|
|
322
|
+
${x}`,V=`,
|
|
323
|
+
${x}`,X=Math.min(f.length,s),te=0;for(;te<X-1;te++){let k=l(String(te),f[te],m,_,x);F+=k!==void 0?k:"null",F+=V;}let ae=l(String(te),f[te],m,_,x);if(F+=ae!==void 0?ae:"null",f.length-1>s){let k=f.length-s-1;F+=`${V}"... ${hs(k)} not stringified"`;}return F+=`
|
|
324
|
+
${v}`,m.pop(),`[${F}]`}let g=Object.keys(f),b=g.length;if(b===0)return "{}";if(o<m.length+1)return '"[Object]"';x+=_;let E=`,
|
|
325
|
+
${x}`,w="",D="",N=Math.min(b,s);Cp(f)&&(w+=$b(f,E,s),g=g.slice(f.length),N-=f.length,D=E),n&&(g=Tp(g)),m.push(f);for(let F=0;F<N;F++){let V=g[F],X=l(V,f[V],m,_,x);X!==void 0&&(w+=`${D}${un(V)}: ${X}`,D=E);}if(b>s){let F=b-s;w+=`${D}"...": "${hs(F)} not stringified"`,D=E;}return D!==""&&(w=`
|
|
326
|
+
${x}${w}
|
|
327
|
+
${v}`),m.pop(),`{${w}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(p,f,m){switch(typeof f){case"string":return un(f);case"object":{if(f===null)return "null";if(typeof f.toJSON=="function"){if(f=f.toJSON(p),typeof f!="object")return h(p,f,m);if(f===null)return "null"}if(m.indexOf(f)!==-1)return r;let _="";if(Array.isArray(f)){if(f.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(f);let E=Math.min(f.length,s),w=0;for(;w<E-1;w++){let N=h(String(w),f[w],m);_+=N!==void 0?N:"null",_+=",";}let D=h(String(w),f[w],m);if(_+=D!==void 0?D:"null",f.length-1>s){let N=f.length-s-1;_+=`,"... ${hs(N)} not stringified"`;}return m.pop(),`[${_}]`}let x=Object.keys(f),v=x.length;if(v===0)return "{}";if(o<m.length+1)return '"[Object]"';let g="",b=Math.min(v,s);Cp(f)&&(_+=$b(f,",",s),x=x.slice(f.length),b-=f.length,g=","),n&&(x=Tp(x)),m.push(f);for(let E=0;E<b;E++){let w=x[E],D=h(w,f[w],m);D!==void 0&&(_+=`${g}${un(w)}:${D}`,g=",");}if(v>s){let E=v-s;_+=`${g}"...":"${hs(E)} not stringified"`;}return m.pop(),`{${_}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function c(p,f,m){if(arguments.length>1){let _="";if(typeof m=="number"?_=" ".repeat(Math.min(m,10)):typeof m=="string"&&(_=m.slice(0,10)),f!=null){if(typeof f=="function")return a("",{"":p},[],f,_,"");if(Array.isArray(f))return u("",p,[],CP(f),_,"")}if(_.length!==0)return l("",p,[],_,"")}return h("",p,[])}return c}});var Dp=z((Jte,Wb)=>{var wP=_r(),{MESSAGE:DP}=Ht(),SP=qa();function RP(t,e){return typeof e=="bigint"?e.toString():e}Wb.exports=wP((t,e)=>{let r=SP.configure(e);return t[DP]=r(t,e.replacer||RP,e.space),t});});var Zb=z((Qte,Yb)=>{var NP=_r();Yb.exports=NP((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t));});var Jb=z((ere,Xb)=>{var OP=_r(),{MESSAGE:FP}=Ht(),LP=qa();Xb.exports=OP(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[FP]=LP(e),t});});var e2=z((tre,Qb)=>{var PP=_r();function IP(t,e,r){let i=e.reduce((o,s)=>(o[s]=t[s],delete t[s],o),{}),n=Object.keys(t).reduce((o,s)=>(o[s]=t[s],delete t[s],o),{});return Object.assign(t,i,{[r]:n}),t}function kP(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}Qb.exports=PP((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return !e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?IP(t,i,r):e.fillWith?kP(t,e.fillWith,r):t});});var r2=z((rre,t2)=>{var lo=1e3,ho=lo*60,co=ho*60,fs=co*24,MP=fs*7,BP=fs*365.25;t2.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return qP(t);if(r==="number"&&isFinite(t))return e.long?jP(t):HP(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function qP(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*BP;case"weeks":case"week":case"w":return r*MP;case"days":case"day":case"d":return r*fs;case"hours":case"hour":case"hrs":case"hr":case"h":return r*co;case"minutes":case"minute":case"mins":case"min":case"m":return r*ho;case"seconds":case"second":case"secs":case"sec":case"s":return r*lo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function HP(t){var e=Math.abs(t);return e>=fs?Math.round(t/fs)+"d":e>=co?Math.round(t/co)+"h":e>=ho?Math.round(t/ho)+"m":e>=lo?Math.round(t/lo)+"s":t+"ms"}function jP(t){var e=Math.abs(t);return e>=fs?Ch(t,e,fs,"day"):e>=co?Ch(t,e,co,"hour"):e>=ho?Ch(t,e,ho,"minute"):e>=lo?Ch(t,e,lo,"second"):t+" ms"}function Ch(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var n2=z((Ha,i2)=>{var UP=_r(),VP=r2();i2.exports=UP(t=>{let e=+new Date;return Ha.diff=e-(Ha.prevTime||e),Ha.prevTime=e,t.ms=`+${VP(Ha.diff)}`,t});});var a2=z((ire,o2)=>{var $P=me("util").inspect,zP=_r(),{LEVEL:KP,MESSAGE:s2,SPLAT:GP}=Ht();o2.exports=zP((t,e={})=>{let r=Object.assign({},t);return delete r[KP],delete r[s2],delete r[GP],t[s2]=$P(r,!1,e.depth||null,e.colorize),t});});var u2=z((nre,wh)=>{var{MESSAGE:WP}=Ht(),Ah=class{constructor(e){this.template=e;}transform(e){return e[WP]=this.template(e),e}};wh.exports=t=>new Ah(t);wh.exports.Printf=wh.exports.Format=Ah;});var c2=z((sre,h2)=>{var YP=_r(),{MESSAGE:l2}=Ht(),ZP=qa();h2.exports=YP(t=>{let e=ZP(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[l2]=`${t.level}:${r} ${t.message} ${e}`:t[l2]=`${t.level}:${r} ${t.message}`,t});});var p2=z((ore,d2)=>{var XP=me("util"),{SPLAT:f2}=Ht(),JP=/%[scdjifoO%]/g,QP=/%%/g,Sp=class{constructor(e){this.options=e;}_splat(e,r){let i=e.message,n=e[f2]||e.splat||[],o=i.match(QP),s=o&&o.length||0,u=r.length-s-n.length,l=u<0?n.splice(u,-1*u):[],h=l.length;if(h)for(let c=0;c<h;c++)Object.assign(e,l[c]);return e.message=XP.format(i,...n),e}transform(e){let r=e.message,i=e[f2]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(JP);if(!n&&(i||i.length)){let o=i.length>1?i.splice(0):i,s=o.length;if(s)for(let a=0;a<s;a++)Object.assign(e,o[a]);return e}return n?this._splat(e,n):e}};d2.exports=t=>new Sp(t);});var O2={};QR(O2,{assign:()=>cn,default:()=>aI,defaultI18n:()=>Rp,format:()=>R2,parse:()=>N2,setGlobalDateI18n:()=>D2,setGlobalDateMasks:()=>S2});function C2(t,e){for(var r=[],i=0,n=t.length;i<n;i++)r.push(t[i].substr(0,e));return r}function cn(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var i=0,n=e;i<n.length;i++){var o=n[i];for(var s in o)t[s]=o[s];}return t}function N2(t,e,r){if(r===void 0&&(r={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=Sh[e]||e,t.length>1e3)return null;var i=new Date,n={year:i.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},o=[],s=[],a=e.replace(T2,function(E,w){return s.push(_2(w)),"@@@"}),u={},l={};a=_2(a).replace(b2,function(E){var w=sI[E],D=w[0],N=w[1],F=w[3];if(u[D])throw new Error("Invalid format. "+D+" specified twice in format");return u[D]=!0,F&&(l[F]=!0),o.push(w),"("+N+")"}),Object.keys(l).forEach(function(E){if(!u[E])throw new Error("Invalid format. "+E+" is required in specified format")}),a=a.replace(/@@@/g,function(){return s.shift()});var h=t.match(new RegExp(a,"i"));if(!h)return null;for(var c=cn(cn({},Dh),r),p=1;p<h.length;p++){var f=o[p-1],m=f[0],_=f[2],x=_?_(h[p],c):+h[p];if(x==null)return null;n[m]=x;}n.isPm===1&&n.hour!=null&&+n.hour!=12?n.hour=+n.hour+12:n.isPm===0&&+n.hour==12&&(n.hour=0);var v;if(n.timezoneOffset==null){v=new Date(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond);for(var g=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],p=0,b=g.length;p<b;p++)if(u[g[p][0]]&&n[g[p][0]]!==v[g[p][1]]())return null}else if(v=new Date(Date.UTC(n.year,n.month,n.day,n.hour,n.minute-n.timezoneOffset,n.second,n.millisecond)),n.month>11||n.month<0||n.day>31||n.day<1||n.hour>23||n.hour<0||n.minute>59||n.minute<0||n.second>59||n.second<0)return null;return v}var b2,hn,ln,eI,tI,ja,T2,m2,A2,w2,rI,iI,Rp,Dh,D2,_2,gr,nI,g2,y2,x2,v2,E2,sI,Sh,S2,R2,oI,aI,F2=JR(()=>{b2=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,hn="\\d\\d?",ln="\\d\\d",eI="\\d{3}",tI="\\d{4}",ja="[^\\s]+",T2=/\[([^]*?)\]/gm;m2=function(t){return function(e,r){var i=r[t].map(function(o){return o.toLowerCase()}),n=i.indexOf(e.toLowerCase());return n>-1?n:null}};A2=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],w2=["January","February","March","April","May","June","July","August","September","October","November","December"],rI=C2(w2,3),iI=C2(A2,3),Rp={dayNamesShort:iI,dayNames:A2,monthNamesShort:rI,monthNames:w2,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},Dh=cn({},Rp),D2=function(t){return Dh=cn(Dh,t)},_2=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},gr=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},nI={D:function(t){return String(t.getDate())},DD:function(t){return gr(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return gr(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return gr(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return gr(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return gr(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return gr(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return gr(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return gr(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return gr(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return gr(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return gr(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+gr(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+gr(Math.floor(Math.abs(e)/60),2)+":"+gr(Math.abs(e)%60,2)}},g2=function(t){return +t-1},y2=[null,hn],x2=[null,ja],v2=["isPm",ja,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],E2=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var r=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?r:-r}return 0}],sI={D:["day",hn],DD:["day",ln],Do:["day",hn+ja,function(t){return parseInt(t,10)}],M:["month",hn,g2],MM:["month",ln,g2],YY:["year",ln,function(t){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);return +(""+(+t>68?r-1:r)+t)}],h:["hour",hn,void 0,"isPm"],hh:["hour",ln,void 0,"isPm"],H:["hour",hn],HH:["hour",ln],m:["minute",hn],mm:["minute",ln],s:["second",hn],ss:["second",ln],YYYY:["year",tI],S:["millisecond","\\d",function(t){return +t*100}],SS:["millisecond",ln,function(t){return +t*10}],SSS:["millisecond",eI],d:y2,dd:y2,ddd:x2,dddd:x2,MMM:["month",ja,m2("monthNamesShort")],MMMM:["month",ja,m2("monthNames")],a:v2,A:v2,ZZ:E2,Z:E2},Sh={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},S2=function(t){return cn(Sh,t)},R2=function(t,e,r){if(e===void 0&&(e=Sh.default),r===void 0&&(r={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=Sh[e]||e;var i=[];e=e.replace(T2,function(o,s){return i.push(s),"@@@"});var n=cn(cn({},Dh),r);return e=e.replace(b2,function(o){return nI[o](t,n)}),e.replace(/@@@/g,function(){return i.shift()})};oI={format:R2,parse:N2,defaultI18n:Rp,setGlobalDateI18n:D2,setGlobalDateMasks:S2},aI=oI;});var P2=z((are,L2)=>{var uI=(F2(),e4(O2)),lI=_r();L2.exports=lI((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():uI.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t));});var k2=z((ure,I2)=>{var Np=cp(),hI=_r(),{MESSAGE:Op}=Ht();I2.exports=hI((t,e)=>(e.level!==!1&&(t.level=Np.strip(t.level)),e.message!==!1&&(t.message=Np.strip(String(t.message))),e.raw!==!1&&t[Op]&&(t[Op]=Np.strip(String(t[Op]))),t));});var Lp=z(Fp=>{var cI=Fp.format=_r();Fp.levels=Pb();function Xt(t,e){Object.defineProperty(cI,t,{get(){return e()},configurable:!0});}Xt("align",function(){return kb()});Xt("errors",function(){return qb()});Xt("cli",function(){return jb()});Xt("combine",function(){return Vb()});Xt("colorize",function(){return xh()});Xt("json",function(){return Dp()});Xt("label",function(){return Zb()});Xt("logstash",function(){return Jb()});Xt("metadata",function(){return e2()});Xt("ms",function(){return n2()});Xt("padLevels",function(){return vp()});Xt("prettyPrint",function(){return a2()});Xt("printf",function(){return u2()});Xt("simple",function(){return c2()});Xt("splat",function(){return p2()});Xt("timestamp",function(){return P2()});Xt("uncolorize",function(){return k2()});});var Pp=z(Rh=>{var{format:M2}=me("util");Rh.warn={deprecated(t){return ()=>{throw new Error(M2("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return ()=>{throw new Error([M2("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
328
|
+
`))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Rh.warn[e](i);});},forProperties(t,e,r){r.forEach(i=>{let n=Rh.warn[e](i);Object.defineProperty(t,i,{get:n,set:n});});}};});var B2=z((cre,fI)=>{fI.exports={name:"winston",description:"A logger for just about everything.",version:"3.11.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.5.0"},devDependencies:{"@babel/cli":"^7.17.0","@babel/core":"^7.17.2","@babel/preset-env":"^7.16.7","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.3.1","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.9.0",hock:"^1.4.1",mocha:"8.1.3",nyc:"^15.1.0",rimraf:"^5.0.5",split2:"^4.1.0","std-mocks":"^1.0.1",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"};});var H2=z((fre,q2)=>{q2.exports=me("util").deprecate;});var Ip=z((dre,j2)=>{j2.exports=me("stream");});var Mp=z((pre,V2)=>{function dI(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(kp,this,t)):process.nextTick(kp,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(Nh,r):(r._writableState.errorEmitted=!0,process.nextTick(U2,r,o)):process.nextTick(U2,r,o):e?(process.nextTick(Nh,r),e(o)):process.nextTick(Nh,r);}),this)}function U2(t,e){kp(t,e),Nh(t);}function Nh(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function pI(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function kp(t,e){t.emit("error",e);}function mI(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e);}V2.exports={destroy:dI,undestroy:pI,errorOrDestroy:mI};});var fn=z((mre,K2)=>{var z2={};function Pr(t,e,r){r||(r=Error);function i(o,s,a){return typeof e=="string"?e:e(o,s,a)}class n extends r{constructor(s,a,u){super(i(s,a,u));}}n.prototype.name=r.name,n.prototype.code=t,z2[t]=n;}function $2(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return `of ${e} ${String(t)}`}function _I(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function gI(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function yI(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Pr("ERR_INVALID_OPT_VALUE",function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Pr("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&_I(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(gI(t," argument"))n=`The ${t} ${i} ${$2(e,"type")}`;else {let o=yI(t,".")?"property":"argument";n=`The "${t}" ${o} ${i} ${$2(e,"type")}`;}return n+=`. Received type ${typeof r}`,n},TypeError);Pr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Pr("ERR_METHOD_NOT_IMPLEMENTED",function(t){return "The "+t+" method is not implemented"});Pr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Pr("ERR_STREAM_DESTROYED",function(t){return "Cannot call "+t+" after a stream was destroyed"});Pr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Pr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Pr("ERR_STREAM_WRITE_AFTER_END","write after end");Pr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Pr("ERR_UNKNOWN_ENCODING",function(t){return "Unknown encoding: "+t},TypeError);Pr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");K2.exports.codes=z2;});var Bp=z((_re,G2)=>{var xI=fn().codes.ERR_INVALID_OPT_VALUE;function vI(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function EI(t,e,r,i){var n=vI(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new xI(o,n)}return Math.floor(n)}return t.objectMode?16:16*1024}G2.exports={getHighWaterMark:EI};});var W2=z((gre,qp)=>{typeof Object.create=="function"?qp.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:qp.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e;}};});var fo=z((yre,jp)=>{try{if(Hp=me("util"),typeof Hp.inherits!="function")throw "";jp.exports=Hp.inherits;}catch(t){jp.exports=W2();}var Hp;});var eT=z((xre,Q2)=>{function Y2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i);}return r}function Z2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Y2(Object(r),!0).forEach(function(i){bI(t,i,r[i]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Y2(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i));});}return t}function bI(t,e,r){return e=J2(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X2(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,J2(i.key),i);}}function CI(t,e,r){return e&&X2(t.prototype,e),r&&X2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function J2(t){var e=AI(t,"string");return typeof e=="symbol"?e:String(e)}function AI(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var wI=me("buffer"),Oh=wI.Buffer,DI=me("util"),Up=DI.inspect,SI=Up&&Up.custom||"inspect";function RI(t,e,r){Oh.prototype.copy.call(t,e,r);}Q2.exports=function(){function t(){TI(this,t),this.head=null,this.tail=null,this.length=0;}return CI(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length;}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(r){if(this.length===0)return "";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Oh.alloc(0);for(var i=Oh.allocUnsafe(r>>>0),n=this.head,o=0;n;)RI(n.data,i,o),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,o=i.data;for(r-=o.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++n;}return this.length-=n,o}},{key:"_getBuffer",value:function(r){var i=Oh.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(s.copy(i,i.length-r,0,a),r-=a,r===0){a===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++o;}return this.length-=o,i}},{key:SI,value:function(r,i){return Up(this,Z2(Z2({},i),{},{depth:0,customInspect:!1}))}}]),t}();});var iT=z((Vp,rT)=>{var Fh=me("buffer"),ti=Fh.Buffer;function tT(t,e){for(var r in t)e[r]=t[r];}ti.from&&ti.alloc&&ti.allocUnsafe&&ti.allocUnsafeSlow?rT.exports=Fh:(tT(Fh,Vp),Vp.Buffer=ds);function ds(t,e,r){return ti(t,e,r)}ds.prototype=Object.create(ti.prototype);tT(ti,ds);ds.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ti(t,e,r)};ds.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=ti(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};ds.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ti(t)};ds.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Fh.SlowBuffer(t)};});var Kp=z(sT=>{var zp=iT().Buffer,nT=zp.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function NI(t){if(!t)return "utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0;}}function OI(t){var e=NI(t);if(typeof e!="string"&&(zp.isEncoding===nT||!nT(t)))throw new Error("Unknown encoding: "+t);return e||t}sT.StringDecoder=Ua;function Ua(t){this.encoding=OI(t);var e;switch(this.encoding){case"utf16le":this.text=MI,this.end=BI,e=4;break;case"utf8":this.fillLast=PI,e=4;break;case"base64":this.text=qI,this.end=HI,e=3;break;default:this.write=jI,this.end=UI;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=zp.allocUnsafe(e);}Ua.prototype.write=function(t){if(t.length===0)return "";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Ua.prototype.end=kI;Ua.prototype.text=II;Ua.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};function $p(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function FI(t,e,r){var i=e.length-1;if(i<r)return 0;var n=$p(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=$p(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=$p(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function LI(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function PI(t){var e=this.lastTotal-this.lastNeed,r=LI(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length;}function II(t,e){var r=FI(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function kI(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function MI(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function BI(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function qI(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function HI(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function jI(t){return t.toString(this.encoding)}function UI(t){return t&&t.length?this.write(t):""}});var Lh=z((Ere,uT)=>{var oT=fn().codes.ERR_STREAM_PREMATURE_CLOSE;function VI(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i);}}}function $I(){}function zI(t){return t.setHeader&&typeof t.abort=="function"}function aT(t,e,r){if(typeof e=="function")return aT(t,null,e);e||(e={}),r=VI(r||$I);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||a();},s=t._writableState&&t._writableState.finished,a=function(){n=!1,s=!0,i||r.call(t);},u=t._readableState&&t._readableState.endEmitted,l=function(){i=!1,u=!0,n||r.call(t);},h=function(m){r.call(t,m);},c=function(){var m;if(i&&!u)return (!t._readableState||!t._readableState.ended)&&(m=new oT),r.call(t,m);if(n&&!s)return (!t._writableState||!t._writableState.ended)&&(m=new oT),r.call(t,m)},p=function(){t.req.on("finish",a);};return zI(t)?(t.on("complete",a),t.on("abort",c),t.req?p():t.on("request",p)):n&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",l),t.on("finish",a),e.error!==!1&&t.on("error",h),t.on("close",c),function(){t.removeListener("complete",a),t.removeListener("abort",c),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",a),t.removeListener("end",l),t.removeListener("error",h),t.removeListener("close",c);}}uT.exports=aT;});var hT=z((bre,lT)=>{var Ph;function dn(t,e,r){return e=KI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KI(t){var e=GI(t,"string");return typeof e=="symbol"?e:String(e)}function GI(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var WI=Lh(),pn=Symbol("lastResolve"),ps=Symbol("lastReject"),Va=Symbol("error"),Ih=Symbol("ended"),ms=Symbol("lastPromise"),Gp=Symbol("handlePromise"),_s=Symbol("stream");function mn(t,e){return {value:t,done:e}}function YI(t){var e=t[pn];if(e!==null){var r=t[_s].read();r!==null&&(t[ms]=null,t[pn]=null,t[ps]=null,e(mn(r,!1)));}}function ZI(t){process.nextTick(YI,t);}function XI(t,e){return function(r,i){t.then(function(){if(e[Ih]){r(mn(void 0,!0));return}e[Gp](r,i);},i);}}var JI=Object.getPrototypeOf(function(){}),QI=Object.setPrototypeOf((Ph={get stream(){return this[_s]},next:function(){var e=this,r=this[Va];if(r!==null)return Promise.reject(r);if(this[Ih])return Promise.resolve(mn(void 0,!0));if(this[_s].destroyed)return new Promise(function(s,a){process.nextTick(function(){e[Va]?a(e[Va]):s(mn(void 0,!0));});});var i=this[ms],n;if(i)n=new Promise(XI(i,this));else {var o=this[_s].read();if(o!==null)return Promise.resolve(mn(o,!1));n=new Promise(this[Gp]);}return this[ms]=n,n}},dn(Ph,Symbol.asyncIterator,function(){return this}),dn(Ph,"return",function(){var e=this;return new Promise(function(r,i){e[_s].destroy(null,function(n){if(n){i(n);return}r(mn(void 0,!0));});})}),Ph),JI),e6=function(e){var r,i=Object.create(QI,(r={},dn(r,_s,{value:e,writable:!0}),dn(r,pn,{value:null,writable:!0}),dn(r,ps,{value:null,writable:!0}),dn(r,Va,{value:null,writable:!0}),dn(r,Ih,{value:e._readableState.endEmitted,writable:!0}),dn(r,Gp,{value:function(o,s){var a=i[_s].read();a?(i[ms]=null,i[pn]=null,i[ps]=null,o(mn(a,!1))):(i[pn]=o,i[ps]=s);},writable:!0}),r));return i[ms]=null,WI(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[ps];o!==null&&(i[ms]=null,i[pn]=null,i[ps]=null,o(n)),i[Va]=n;return}var s=i[pn];s!==null&&(i[ms]=null,i[pn]=null,i[ps]=null,s(mn(void 0,!0))),i[Ih]=!0;}),e.on("readable",ZI.bind(null,i)),i};lT.exports=e6;});var pT=z((Tre,dT)=>{function cT(t,e,r,i,n,o,s){try{var a=t[o](s),u=a.value;}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(i,n);}function t6(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var o=t.apply(e,r);function s(u){cT(o,i,n,s,a,"next",u);}function a(u){cT(o,i,n,s,a,"throw",u);}s(void 0);})}}function fT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i);}return r}function r6(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fT(Object(r),!0).forEach(function(i){i6(t,i,r[i]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fT(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i));});}return t}function i6(t,e,r){return e=n6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n6(t){var e=s6(t,"string");return typeof e=="symbol"?e:String(e)}function s6(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var o6=fn().codes.ERR_INVALID_ARG_TYPE;function a6(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new o6("iterable",["Iterable"],e);var n=new t(r6({objectMode:!0},r)),o=!1;n._read=function(){o||(o=!0,s());};function s(){return a.apply(this,arguments)}function a(){return a=t6(function*(){try{var u=yield i.next(),l=u.value,h=u.done;h?n.push(null):n.push(yield l)?s():o=!1;}catch(c){n.destroy(c);}}),a.apply(this,arguments)}return n}dT.exports=a6;});var im=z((Are,CT)=>{CT.exports=Ze;var po;Ze.ReadableState=yT;me("events").EventEmitter;var gT=function(e,r){return e.listeners(r).length},za=Ip(),kh=me("buffer").Buffer,u6=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function l6(t){return kh.from(t)}function h6(t){return kh.isBuffer(t)||t instanceof u6}var Wp=me("util"),Ve;Wp&&Wp.debuglog?Ve=Wp.debuglog("stream"):Ve=function(){};var c6=eT(),tm=Mp(),f6=Bp(),d6=f6.getHighWaterMark,Mh=fn().codes,p6=Mh.ERR_INVALID_ARG_TYPE,m6=Mh.ERR_STREAM_PUSH_AFTER_EOF,_6=Mh.ERR_METHOD_NOT_IMPLEMENTED,g6=Mh.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,mo,Yp,Zp;fo()(Ze,za);var $a=tm.errorOrDestroy,Xp=["error","close","destroy","pause","resume"];function y6(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}function yT(t,e,r){po=po||gs(),t=t||{},typeof r!="boolean"&&(r=e instanceof po),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=d6(this,t,"readableHighWaterMark",r),this.buffer=new c6,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(mo||(mo=Kp().StringDecoder),this.decoder=new mo(t.encoding),this.encoding=t.encoding);}function Ze(t){if(po=po||gs(),!(this instanceof Ze))return new Ze(t);var e=this instanceof po;this._readableState=new yT(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),za.call(this);}Object.defineProperty(Ze.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});Ze.prototype.destroy=tm.destroy;Ze.prototype._undestroy=tm.undestroy;Ze.prototype._destroy=function(t,e){e(t);};Ze.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=kh.from(t,e),e=""),i=!0),xT(this,t,e,!1,i)};Ze.prototype.unshift=function(t){return xT(this,t,null,!0,!1)};function xT(t,e,r,i,n){Ve("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,E6(t,o);else {var s;if(n||(s=x6(o,e)),s)$a(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==kh.prototype&&(e=l6(e)),i)o.endEmitted?$a(t,new g6):Jp(t,o,e,!0);else if(o.ended)$a(t,new m6);else {if(o.destroyed)return !1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?Jp(t,o,e,!1):em(t,o)):Jp(t,o,e,!1);}else i||(o.reading=!1,em(t,o));}return !o.ended&&(o.length<o.highWaterMark||o.length===0)}function Jp(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Bh(t)),em(t,e);}function x6(t,e){var r;return !h6(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new p6("chunk",["string","Buffer","Uint8Array"],e)),r}Ze.prototype.isPaused=function(){return this._readableState.flowing===!1};Ze.prototype.setEncoding=function(t){mo||(mo=Kp().StringDecoder);var e=new mo(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var mT=1073741824;function v6(t){return t>=mT?t=mT:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function _T(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=v6(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Ze.prototype.read=function(t){Ve("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ve("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Qp(this):Bh(this),null;if(t=_T(t,e),t===0&&e.ended)return e.length===0&&Qp(this),null;var i=e.needReadable;Ve("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ve("length less than watermark",i)),e.ended||e.reading?(i=!1,Ve("reading or ended",i)):i&&(Ve("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=_T(r,e)));var n;return t>0?n=bT(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Qp(this)),n!==null&&this.emit("data",n),n};function E6(t,e){if(Ve("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?Bh(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,vT(t)));}}function Bh(t){var e=t._readableState;Ve("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ve("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(vT,t));}function vT(t){var e=t._readableState;Ve("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,rm(t);}function em(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(b6,t,e));}function b6(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ve("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1;}Ze.prototype._read=function(t){$a(this,new _6("_read()"));};Ze.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ve("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=n?a:_;i.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);function s(x,v){Ve("onunpipe"),x===r&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,h());}function a(){Ve("onend"),t.end();}var u=T6(r);t.on("drain",u);var l=!1;function h(){Ve("cleanup"),t.removeListener("close",f),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",_),r.removeListener("data",c),l=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u();}r.on("data",c);function c(x){Ve("ondata");var v=t.write(x);Ve("dest.write",v),v===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&TT(i.pipes,t)!==-1)&&!l&&(Ve("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause());}function p(x){Ve("onerror",x),_(),t.removeListener("error",p),gT(t,"error")===0&&$a(t,x);}y6(t,"error",p);function f(){t.removeListener("finish",m),_();}t.once("close",f);function m(){Ve("onfinish"),t.removeListener("close",f),_();}t.once("finish",m);function _(){Ve("unpipe"),r.unpipe(t);}return t.emit("pipe",r),i.flowing||(Ve("pipe resume"),r.resume()),t};function T6(t){return function(){var r=t._readableState;Ve("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&gT(t,"data")&&(r.flowing=!0,rm(t));}}Ze.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=TT(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Ze.prototype.on=function(t,e){var r=za.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ve("on readable",i.length,i.reading),i.length?Bh(this):i.reading||process.nextTick(C6,this)),r};Ze.prototype.addListener=Ze.prototype.on;Ze.prototype.removeListener=function(t,e){var r=za.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(ET,this),r};Ze.prototype.removeAllListeners=function(t){var e=za.prototype.removeAllListeners.apply(this,arguments);return (t==="readable"||t===void 0)&&process.nextTick(ET,this),e};function ET(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume();}function C6(t){Ve("readable nexttick read 0"),t.read(0);}Ze.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ve("resume"),t.flowing=!t.readableListening,A6(this,t)),t.paused=!1,this};function A6(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(w6,t,e));}function w6(t,e){Ve("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),rm(t),e.flowing&&!e.reading&&t.read(0);}Ze.prototype.pause=function(){return Ve("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ve("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function rm(t){var e=t._readableState;for(Ve("flow",e.flowing);e.flowing&&t.read()!==null;);}Ze.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ve("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s);}e.push(null);}),t.on("data",function(s){if(Ve("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=e.push(s);a||(i=!0,t.pause());}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(a){return function(){return t[a].apply(t,arguments)}}(n));for(var o=0;o<Xp.length;o++)t.on(Xp[o],this.emit.bind(this,Xp[o]));return this._read=function(s){Ve("wrapped _read",s),i&&(i=!1,t.resume());},this};typeof Symbol=="function"&&(Ze.prototype[Symbol.asyncIterator]=function(){return Yp===void 0&&(Yp=hT()),Yp(this)});Object.defineProperty(Ze.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Ze.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Ze.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e);}});Ze._fromList=bT;Object.defineProperty(Ze.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function bT(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Qp(t){var e=t._readableState;Ve("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(D6,e,t));}function D6(t,e){if(Ve("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy();}}typeof Symbol=="function"&&(Ze.from=function(t,e){return Zp===void 0&&(Zp=pT()),Zp(Ze,t,e)});function TT(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return -1}});var gs=z((wre,wT)=>{var S6=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};wT.exports=ri;var AT=im(),sm=jh();fo()(ri,AT);for(nm=S6(sm.prototype),qh=0;qh<nm.length;qh++)Hh=nm[qh],ri.prototype[Hh]||(ri.prototype[Hh]=sm.prototype[Hh]);var nm,Hh,qh;function ri(t){if(!(this instanceof ri))return new ri(t);AT.call(this,t),sm.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",R6)));}Object.defineProperty(ri.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ri.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ri.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function R6(){this._writableState.ended||process.nextTick(N6,this);}function N6(t){t.end();}Object.defineProperty(ri.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});});var jh=z((Dre,FT)=>{FT.exports=Pt;function ST(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ik(e,t);};}var _o;Pt.WritableState=Ga;var O6={deprecate:H2()},RT=Ip(),Vh=me("buffer").Buffer,F6=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function L6(t){return Vh.from(t)}function P6(t){return Vh.isBuffer(t)||t instanceof F6}var am=Mp(),I6=Bp(),k6=I6.getHighWaterMark,_n=fn().codes,M6=_n.ERR_INVALID_ARG_TYPE,B6=_n.ERR_METHOD_NOT_IMPLEMENTED,q6=_n.ERR_MULTIPLE_CALLBACK,H6=_n.ERR_STREAM_CANNOT_PIPE,j6=_n.ERR_STREAM_DESTROYED,U6=_n.ERR_STREAM_NULL_VALUES,V6=_n.ERR_STREAM_WRITE_AFTER_END,$6=_n.ERR_UNKNOWN_ENCODING,go=am.errorOrDestroy;fo()(Pt,RT);function z6(){}function Ga(t,e,r){_o=_o||gs(),t=t||{},typeof r!="boolean"&&(r=e instanceof _o),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=k6(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){J6(e,n);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ST(this);}Ga.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ga.prototype,"buffer",{get:O6.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(t){}})();var Uh;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Uh=Function.prototype[Symbol.hasInstance],Object.defineProperty(Pt,Symbol.hasInstance,{value:function(e){return Uh.call(this,e)?!0:this!==Pt?!1:e&&e._writableState instanceof Ga}})):Uh=function(e){return e instanceof this};function Pt(t){_o=_o||gs();var e=this instanceof _o;if(!e&&!Uh.call(Pt,this))return new Pt(t);this._writableState=new Ga(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),RT.call(this);}Pt.prototype.pipe=function(){go(this,new H6);};function K6(t,e){var r=new V6;go(t,r),process.nextTick(e,r);}function G6(t,e,r,i){var n;return r===null?n=new U6:typeof r!="string"&&!e.objectMode&&(n=new M6("chunk",["string","Buffer"],r)),n?(go(t,n),process.nextTick(i,n),!1):!0}Pt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,o=!i.objectMode&&P6(t);return o&&!Vh.isBuffer(t)&&(t=L6(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=z6),i.ending?K6(this,r):(o||G6(this,i,t,r))&&(i.pendingcb++,n=Y6(this,i,o,t,e,r)),n};Pt.prototype.cork=function(){this._writableState.corked++;};Pt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&NT(this,t));};Pt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new $6(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Pt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function W6(t,e,r){return !t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Vh.from(e,r)),e}Object.defineProperty(Pt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Y6(t,e,r,i,n,o){if(!r){var s=W6(e,i,n);i!==s&&(r=!0,n="buffer",i=s);}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1;}else om(t,e,!1,a,i,n,o);return u}function om(t,e,r,i,n,o,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new j6("write")):r?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1;}function Z6(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Ka,t,e),t._writableState.errorEmitted=!0,go(t,i)):(n(i),t._writableState.errorEmitted=!0,go(t,i),Ka(t,e));}function X6(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0;}function J6(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new q6;if(X6(r),e)Z6(t,r,i,e,n);else {var o=OT(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&NT(t,r),i?process.nextTick(DT,t,r,o,n):DT(t,r,o,n);}}function DT(t,e,r,i){r||Q6(t,e),e.pendingcb--,i(),Ka(t,e);}function Q6(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));}function NT(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),o=e.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)n[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;n.allBuffers=a,om(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new ST(e),e.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,l=r.encoding,h=r.callback,c=e.objectMode?1:u.length;if(om(t,e,!1,c,u,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null);}e.bufferedRequest=r,e.bufferProcessing=!1;}Pt.prototype._write=function(t,e,r){r(new B6("_write()"));};Pt.prototype._writev=null;Pt.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||rk(this,i,r),this};Object.defineProperty(Pt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function OT(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function ek(t,e){t._final(function(r){e.pendingcb--,r&&go(t,r),e.prefinished=!0,t.emit("prefinish"),Ka(t,e);});}function tk(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(ek,t,e)):(e.prefinished=!0,t.emit("prefinish")));}function Ka(t,e){var r=OT(e);if(r&&(tk(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy();}return r}function rk(t,e,r){e.ending=!0,Ka(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1;}function ik(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next;}e.corkedRequestsFree.next=t;}Object.defineProperty(Pt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});Pt.prototype.destroy=am.destroy;Pt.prototype._undestroy=am.undestroy;Pt.prototype._destroy=function(t,e){e(t);};});var lm=z((Sre,PT)=>{var nk=me("util"),{LEVEL:um}=Ht(),LT=ys(),Wa=PT.exports=function(e={}){if(LT.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport);}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError));};nk.inherits(Wa,LT);Wa.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[um]])&&this.transport.log(e[um],e.message,e,this._nop),i(null);};Wa.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[um],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Wa.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
329
|
+
`));};Wa.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null);};});var ys=z((Rre,hm)=>{var sk=me("util"),IT=jh(),{LEVEL:kT}=Ht(),Ya=hm.exports=function(e={}){IT.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r;}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close());});};sk.inherits(Ya,IT);Ya.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[kT]]){if(e&&!this.format)return this.log(e,i);let o,s;try{s=this.format.transform(Object.assign({},e),this.format.options);}catch(a){o=a;}if(o||!s){if(i(),o)throw o;return}return this.log(s,i)}return this._writableState.sync=!1,i(null)};Ya.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,o;try{o=this.format.transform(Object.assign({},e[i].chunk),this.format.options);}catch(s){n=s;}if(n||!o){if(e[i].callback(),n)throw r(null),n}else this.log(o,e[i].callback);}return r(null)};Ya.prototype._accept=function(e){let r=e.chunk;if(this.silent)return !1;let i=this.level||this.parent&&this.parent.level;return !!((r.exception===!0||!i||this.levels[i]>=this.levels[r[kT]])&&(this.handleExceptions||r.exception!==!0))};Ya.prototype._nop=function(){};hm.exports.LegacyTransportStream=lm();});var qT=z((Ore,BT)=>{var ok=me("os"),{LEVEL:MT,MESSAGE:yo}=Ht(),ak=ys();BT.exports=class extends ak{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:ok.EOL,this.setMaxListeners(30);}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[MT]]){console._stderr?console._stderr.write(`${e[yo]}${this.eol}`):console.error(e[yo]),r&&r();return}else if(this.consoleWarnLevels[e[MT]]){console._stderr?console._stderr.write(`${e[yo]}${this.eol}`):console.warn(e[yo]),r&&r();return}console._stdout?console._stdout.write(`${e[yo]}${this.eol}`):console.log(e[yo]),r&&r();}_stringArrayToSet(e,r){if(!e)return {};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}};});var zh=z(($h,HT)=>{Object.defineProperty($h,"__esModule",{value:!0});$h.default=uk;function uk(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}HT.exports=$h.default;});var UT=z((Kh,jT)=>{Object.defineProperty(Kh,"__esModule",{value:!0});Kh.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};jT.exports=Kh.default;});var zT=z(gn=>{Object.defineProperty(gn,"__esModule",{value:!0});gn.fallback=VT;gn.wrap=$T;var lk=gn.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,hk=gn.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,ck=gn.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function VT(t){setTimeout(t,0);}function $T(t){return (e,...r)=>t(()=>e(...r))}var Za;lk?Za=queueMicrotask:hk?Za=setImmediate:ck?Za=process.nextTick:Za=VT;gn.default=$T(Za);});var ZT=z((Gh,YT)=>{Object.defineProperty(Gh,"__esModule",{value:!0});Gh.default=gk;var fk=UT(),dk=WT(fk),pk=zT(),mk=WT(pk),_k=xs();function WT(t){return t&&t.__esModule?t:{default:t}}function gk(t){return (0, _k.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return KT(i,r)}:(0, dk.default)(function(e,r){var i;try{i=t.apply(this,e);}catch(n){return r(n)}if(i&&typeof i.then=="function")return KT(i,r);r(null,i);})}function KT(t,e){return t.then(r=>{GT(e,null,r);},r=>{GT(e,r&&(r instanceof Error||r.message)?r:new Error(r));})}function GT(t,e,r){try{t(e,r);}catch(i){(0, mk.default)(n=>{throw n},i);}}YT.exports=Gh.default;});var xs=z(bi=>{Object.defineProperty(bi,"__esModule",{value:!0});bi.isAsyncIterable=bi.isAsyncGenerator=bi.isAsync=void 0;var yk=ZT(),xk=vk(yk);function vk(t){return t&&t.__esModule?t:{default:t}}function XT(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Ek(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function bk(t){return typeof t[Symbol.asyncIterator]=="function"}function Tk(t){if(typeof t!="function")throw new Error("expected a function");return XT(t)?(0, xk.default)(t):t}bi.default=Tk;bi.isAsync=XT;bi.isAsyncGenerator=Ek;bi.isAsyncIterable=bk;});var xo=z((Wh,JT)=>{Object.defineProperty(Wh,"__esModule",{value:!0});Wh.default=Ck;function Ck(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,o)=>{i[e-1]=(s,...a)=>{if(s)return o(s);n(a.length>1?a:a[0]);},t.apply(this,i);})}return r}JT.exports=Wh.default;});var eC=z((Yh,QT)=>{Object.defineProperty(Yh,"__esModule",{value:!0});var Ak=zh(),wk=cm(Ak),Dk=xs(),Sk=cm(Dk),Rk=xo(),Nk=cm(Rk);function cm(t){return t&&t.__esModule?t:{default:t}}Yh.default=(0, Nk.default)((t,e,r)=>{var i=(0, wk.default)(e)?[]:{};t(e,(n,o,s)=>{(0, Sk.default)(n)((a,...u)=>{u.length<2&&([u]=u),i[o]=u,s(a);});},n=>r(n,i));},3);QT.exports=Yh.default;});var fm=z((Zh,tC)=>{Object.defineProperty(Zh,"__esModule",{value:!0});Zh.default=Ok;function Ok(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r);}}return Object.assign(e,t),e}tC.exports=Zh.default;});var iC=z((Xh,rC)=>{Object.defineProperty(Xh,"__esModule",{value:!0});Xh.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};rC.exports=Xh.default;});var oC=z((Jh,sC)=>{Object.defineProperty(Jh,"__esModule",{value:!0});Jh.default=qk;var Fk=zh(),Lk=nC(Fk),Pk=iC(),Ik=nC(Pk);function nC(t){return t&&t.__esModule?t:{default:t}}function kk(t){var e=-1,r=t.length;return function(){return ++e<r?{value:t[e],key:e}:null}}function Mk(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Bk(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var o=e[++r];return o==="__proto__"?n():r<i?{value:t[o],key:o}:null}}function qk(t){if((0, Lk.default)(t))return kk(t);var e=(0, Ik.default)(t);return e?Mk(e):Bk(t)}sC.exports=Jh.default;});var dm=z((Qh,aC)=>{Object.defineProperty(Qh,"__esModule",{value:!0});Qh.default=Hk;function Hk(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e);}}aC.exports=Qh.default;});var tc=z((ec,uC)=>{Object.defineProperty(ec,"__esModule",{value:!0});var jk={};ec.default=jk;uC.exports=ec.default;});var hC=z((rc,lC)=>{Object.defineProperty(rc,"__esModule",{value:!0});rc.default=zk;var Uk=tc(),Vk=$k(Uk);function $k(t){return t&&t.__esModule?t:{default:t}}function zk(t,e,r,i){let n=!1,o=!1,s=!1,a=0,u=0;function l(){a>=e||s||n||(s=!0,t.next().then(({value:p,done:f})=>{if(!(o||n)){if(s=!1,f){n=!0,a<=0&&i(null);return}a++,r(p,u,h),u++,l();}}).catch(c));}function h(p,f){if(a-=1,!o){if(p)return c(p);if(p===!1){n=!0,o=!0;return}if(f===Vk.default||n&&a<=0)return n=!0,i(null);l();}}function c(p){o||(s=!1,n=!0,i(p));}l();}lC.exports=rc.default;});var pC=z((ic,dC)=>{Object.defineProperty(ic,"__esModule",{value:!0});var Kk=fm(),Gk=Xa(Kk),Wk=oC(),Yk=Xa(Wk),Zk=dm(),Xk=Xa(Zk),cC=xs(),Jk=hC(),fC=Xa(Jk),Qk=tc(),e9=Xa(Qk);function Xa(t){return t&&t.__esModule?t:{default:t}}ic.default=t=>(e,r,i)=>{if(i=(0, Gk.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0, cC.isAsyncGenerator)(e))return (0, fC.default)(e,t,r,i);if((0, cC.isAsyncIterable)(e))return (0, fC.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0, Yk.default)(e),o=!1,s=!1,a=0,u=!1;function l(c,p){if(!s)if(a-=1,c)o=!0,i(c);else if(c===!1)o=!0,s=!0;else {if(p===e9.default||o&&a<=0)return o=!0,i(null);u||h();}}function h(){for(u=!0;a<t&&!o;){var c=n();if(c===null){o=!0,a<=0&&i(null);return}a+=1,r(c.value,c.key,(0, Xk.default)(l));}u=!1;}h();};dC.exports=ic.default;});var mm=z((nc,mC)=>{Object.defineProperty(nc,"__esModule",{value:!0});var t9=pC(),r9=pm(t9),i9=xs(),n9=pm(i9),s9=xo(),o9=pm(s9);function pm(t){return t&&t.__esModule?t:{default:t}}function a9(t,e,r,i){return (0, r9.default)(e)(t,(0, n9.default)(r),i)}nc.default=(0, o9.default)(a9,4);mC.exports=nc.default;});var yC=z((sc,gC)=>{Object.defineProperty(sc,"__esModule",{value:!0});var u9=mm(),l9=_C(u9),h9=xo(),c9=_C(h9);function _C(t){return t&&t.__esModule?t:{default:t}}function f9(t,e,r){return (0, l9.default)(t,1,e,r)}sc.default=(0, c9.default)(f9,3);gC.exports=sc.default;});var EC=z((oc,vC)=>{Object.defineProperty(oc,"__esModule",{value:!0});oc.default=g9;var d9=eC(),p9=xC(d9),m9=yC(),_9=xC(m9);function xC(t){return t&&t.__esModule?t:{default:t}}function g9(t,e){return (0, p9.default)(_9.default,t,e)}vC.exports=oc.default;});var _m=z((Pre,TC)=>{TC.exports=Ti;var ac=fn().codes,y9=ac.ERR_METHOD_NOT_IMPLEMENTED,x9=ac.ERR_MULTIPLE_CALLBACK,v9=ac.ERR_TRANSFORM_ALREADY_TRANSFORMING,E9=ac.ERR_TRANSFORM_WITH_LENGTH_0,uc=gs();fo()(Ti,uc);function b9(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new x9);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}function Ti(t){if(!(this instanceof Ti))return new Ti(t);uc.call(this,t),this._transformState={afterTransform:b9.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",T9);}function T9(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){bC(t,e,r);}):bC(this,null,null);}Ti.prototype.push=function(t,e){return this._transformState.needTransform=!1,uc.prototype.push.call(this,t,e)};Ti.prototype._transform=function(t,e,r){r(new y9("_transform()"));};Ti.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}};Ti.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0;};Ti.prototype._destroy=function(t,e){uc.prototype._destroy.call(this,t,function(r){e(r);});};function bC(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new E9;if(t._transformState.transforming)throw new v9;return t.push(null)}});var wC=z((Ire,AC)=>{AC.exports=Ja;var CC=_m();fo()(Ja,CC);function Ja(t){if(!(this instanceof Ja))return new Ja(t);CC.call(this,t);}Ja.prototype._transform=function(t,e,r){r(null,t);};});var OC=z((kre,NC)=>{var gm;function C9(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments));}}var RC=fn().codes,A9=RC.ERR_MISSING_ARGS,w9=RC.ERR_STREAM_DESTROYED;function DC(t){if(t)throw t}function D9(t){return t.setHeader&&typeof t.abort=="function"}function S9(t,e,r,i){i=C9(i);var n=!1;t.on("close",function(){n=!0;}),gm===void 0&&(gm=Lh()),gm(t,{readable:e,writable:r},function(s){if(s)return i(s);n=!0,i();});var o=!1;return function(s){if(!n&&!o){if(o=!0,D9(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(s||new w9("pipe"));}}}function SC(t){t();}function R9(t,e){return t.pipe(e)}function N9(t){return !t.length||typeof t[t.length-1]!="function"?DC:t.pop()}function O9(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=N9(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new A9("streams");var n,o=e.map(function(s,a){var u=a<e.length-1,l=a>0;return S9(s,u,l,function(h){n||(n=h),h&&o.forEach(SC),!u&&(o.forEach(SC),i(n));})});return e.reduce(R9)}NC.exports=O9;});var vo=z((Ir,eu)=>{var Qa=me("stream");process.env.READABLE_STREAM==="disable"&&Qa?(eu.exports=Qa.Readable,Object.assign(eu.exports,Qa),eu.exports.Stream=Qa):(Ir=eu.exports=im(),Ir.Stream=Qa||Ir,Ir.Readable=Ir,Ir.Writable=jh(),Ir.Duplex=gs(),Ir.Transform=_m(),Ir.PassThrough=wC(),Ir.finished=Lh(),Ir.pipeline=OC());});var Cm=z((Mre,LC)=>{var Eo=[],tu=[],ym=function(){};function vm(t){return ~Eo.indexOf(t)?!1:(Eo.push(t),!0)}function Em(t){ym=t;}function F9(t){for(var e=[],r=0;r<Eo.length;r++){if(Eo[r].async){e.push(Eo[r]);continue}if(Eo[r](t))return !0}return e.length?new Promise(function(n){Promise.all(e.map(function(s){return s(t)})).then(function(s){n(s.some(Boolean));});}):!1}function bm(t){return ~tu.indexOf(t)?!1:(tu.push(t),!0)}function xm(){ym.apply(ym,arguments);}function FC(t){for(var e=0;e<tu.length;e++)t=tu[e].apply(tu[e],arguments);return t}function Tm(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function L9(t){return t.enabled=!1,t.modify=bm,t.set=Em,t.use=vm,Tm(function(){return !1},t)}function P9(t){function e(){var r=Array.prototype.slice.call(arguments,0);return xm.call(xm,t,FC(r,t)),!0}return t.enabled=!0,t.modify=bm,t.set=Em,t.use=vm,Tm(e,t)}LC.exports=function(e){return e.introduce=Tm,e.enabled=F9,e.process=FC,e.modify=bm,e.write=xm,e.nope=L9,e.yep=P9,e.set=Em,e.use=vm,e};});var IC=z((Bre,PC)=>{var I9=Cm(),k9=I9(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});PC.exports=k9;});var MC=z((qre,kC)=>{kC.exports=function(e){return !e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")};});var HC=z((Hre,qC)=>{var M9=MC(),B9=Array.prototype.concat,q9=Array.prototype.slice,BC=qC.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var o=e[i];M9(o)?r=B9.call(r,q9.call(o)):r.push(o);}return r};BC.wrap=function(t){return function(){return t(BC(arguments))}};});var $C=z((jre,VC)=>{var ru=yf(),iu=HC(),jC=Object.hasOwnProperty,UC=Object.create(null);for(lc in ru)jC.call(ru,lc)&&(UC[ru[lc]]=lc);var lc,wr=VC.exports={to:{},get:{}};wr.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=wr.get.hsl(t),i="hsl";break;case"hwb":r=wr.get.hwb(t),i="hwb";break;default:r=wr.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};wr.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,u,l;if(a=t.match(r)){for(l=a[2],a=a[1],u=0;u<3;u++){var h=u*2;s[u]=parseInt(a.slice(h,h+2),16);}l&&(s[3]=parseInt(l,16)/255);}else if(a=t.match(e)){for(a=a[1],l=a[3],u=0;u<3;u++)s[u]=parseInt(a[u]+a[u],16);l&&(s[3]=parseInt(l+l,16)/255);}else if(a=t.match(i)){for(u=0;u<3;u++)s[u]=parseInt(a[u+1],0);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]));}else if(a=t.match(n)){for(u=0;u<3;u++)s[u]=Math.round(parseFloat(a[u+1])*2.55);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]));}else return (a=t.match(o))?a[1]==="transparent"?[0,0,0,0]:jC.call(ru,a[1])?(s=ru[a[1]],s[3]=1,s):null:null;for(u=0;u<3;u++)s[u]=yn(s[u],0,255);return s[3]=yn(s[3],0,1),s};wr.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=yn(parseFloat(r[2]),0,100),s=yn(parseFloat(r[3]),0,100),a=yn(isNaN(i)?1:i,0,1);return [n,o,s,a]}return null};wr.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=yn(parseFloat(r[2]),0,100),s=yn(parseFloat(r[3]),0,100),a=yn(isNaN(i)?1:i,0,1);return [n,o,s,a]}return null};wr.to.hex=function(){var t=iu(arguments);return "#"+hc(t[0])+hc(t[1])+hc(t[2])+(t[3]<1?hc(Math.round(t[3]*255)):"")};wr.to.rgb=function(){var t=iu(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};wr.to.rgb.percent=function(){var t=iu(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};wr.to.hsl=function(){var t=iu(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};wr.to.hwb=function(){var t=iu(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};wr.to.keyword=function(t){return UC[t.slice(0,3)]};function yn(t,e,r){return Math.min(Math.max(e,t),r)}function hc(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var KC=z((Ure,zC)=>{zC.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var Am=z((Vre,ZC)=>{var vs=KC(),YC={};for(cc in vs)vs.hasOwnProperty(cc)&&(YC[vs[cc]]=cc);var cc,we=ZC.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(ar in we)if(we.hasOwnProperty(ar)){if(!("channels"in we[ar]))throw new Error("missing channels property: "+ar);if(!("labels"in we[ar]))throw new Error("missing channel labels property: "+ar);if(we[ar].labels.length!==we[ar].channels)throw new Error("channel and label counts mismatch: "+ar);GC=we[ar].channels,WC=we[ar].labels,delete we[ar].channels,delete we[ar].labels,Object.defineProperty(we[ar],"channels",{value:GC}),Object.defineProperty(we[ar],"labels",{value:WC});}var GC,WC,ar;we.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),o=Math.max(e,r,i),s=o-n,a,u,l;return o===n?a=0:e===o?a=(r-i)/s:r===o?a=2+(i-e)/s:i===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360),l=(n+o)/2,o===n?u=0:l<=.5?u=s/(o+n):u=s/(2-o-n),[a,u*100,l*100]};we.rgb.hsv=function(t){var e,r,i,n,o,s=t[0]/255,a=t[1]/255,u=t[2]/255,l=Math.max(s,a,u),h=l-Math.min(s,a,u),c=function(p){return (l-p)/6/h+1/2};return h===0?n=o=0:(o=h/l,e=c(s),r=c(a),i=c(u),s===l?n=i-r:a===l?n=1/3+e-i:u===l&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,o*100,l*100]};we.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=we.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,o*100,i*100]};we.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n,o,s,a;return a=Math.min(1-e,1-r,1-i),n=(1-e-a)/(1-a)||0,o=(1-r-a)/(1-a)||0,s=(1-i-a)/(1-a)||0,[n*100,o*100,s*100,a*100]};function H9(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}we.rgb.keyword=function(t){var e=YC[t];if(e)return e;var r=1/0,i;for(var n in vs)if(vs.hasOwnProperty(n)){var o=vs[n],s=H9(t,o);s<r&&(r=s,i=n);}return i};we.keyword.rgb=function(t){return vs[t]};we.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=e*.4124+r*.3576+i*.1805,o=e*.2126+r*.7152+i*.0722,s=e*.0193+r*.1192+i*.9505;return [n*100,o*100,s*100]};we.rgb.lab=function(t){var e=we.rgb.xyz(t),r=e[0],i=e[1],n=e[2],o,s,a;return r/=95.047,i/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,o=116*i-16,s=500*(r-i),a=200*(i-n),[o,s,a]};we.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,o,s,a,u;if(r===0)return u=i*255,[u,u,u];i<.5?o=i*(1+r):o=i+r-i*r,n=2*i-o,a=[0,0,0];for(var l=0;l<3;l++)s=e+1/3*-(l-1),s<0&&s++,s>1&&s--,6*s<1?u=n+(o-n)*6*s:2*s<1?u=o:3*s<2?u=n+(o-n)*(2/3-s)*6:u=n,a[l]=u*255;return a};we.hsl.hsv=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=r,o=Math.max(i,.01),s,a;return i*=2,r*=i<=1?i:2-i,n*=o<=1?o:2-o,a=(i+r)/2,s=i===0?2*n/(o+n):2*r/(i+r),[e,s*100,a*100]};we.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,o=e-Math.floor(e),s=255*i*(1-r),a=255*i*(1-r*o),u=255*i*(1-r*(1-o));switch(i*=255,n){case 0:return [i,u,s];case 1:return [a,i,s];case 2:return [s,i,u];case 3:return [s,a,i];case 4:return [u,s,i];case 5:return [i,s,a]}};we.hsv.hsl=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),o,s,a;return a=(2-r)*i,o=(2-r)*n,s=r*n,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]};we.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,o,s,a,u;n>1&&(r/=n,i/=n),o=Math.floor(6*e),s=1-i,a=6*e-o,o&1&&(a=1-a),u=r+a*(s-r);var l,h,c;switch(o){default:case 6:case 0:l=s,h=u,c=r;break;case 1:l=u,h=s,c=r;break;case 2:l=r,h=s,c=u;break;case 3:l=r,h=u,c=s;break;case 4:l=u,h=r,c=s;break;case 5:l=s,h=r,c=u;break}return [l*255,h*255,c*255]};we.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,o,s,a;return o=1-Math.min(1,e*(1-n)+n),s=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n),[o*255,s*255,a*255]};we.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n,o,s;return n=e*3.2406+r*-1.5372+i*-.4986,o=e*-.9689+r*1.8758+i*.0415,s=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,n=Math.min(Math.max(0,n),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[n*255,o*255,s*255]};we.xyz.lab=function(t){var e=t[0],r=t[1],i=t[2],n,o,s;return e/=95.047,r/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=116*r-16,o=500*(e-r),s=200*(r-i),[n,o,s]};we.lab.xyz=function(t){var e=t[0],r=t[1],i=t[2],n,o,s;o=(e+16)/116,n=r/500+o,s=o-i/200;var a=Math.pow(o,3),u=Math.pow(n,3),l=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,s=l>.008856?l:(s-16/116)/7.787,n*=95.047,o*=100,s*=108.883,[n,o,s]};we.lab.lch=function(t){var e=t[0],r=t[1],i=t[2],n,o,s;return n=Math.atan2(i,r),o=n*360/2/Math.PI,o<0&&(o+=360),s=Math.sqrt(r*r+i*i),[e,s,o]};we.lch.lab=function(t){var e=t[0],r=t[1],i=t[2],n,o,s;return s=i/360*2*Math.PI,n=r*Math.cos(s),o=r*Math.sin(s),[e,n,o]};we.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:we.rgb.hsv(t)[2];if(n=Math.round(n/50),n===0)return 30;var o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return n===2&&(o+=60),o};we.hsv.ansi16=function(t){return we.rgb.ansi16(we.hsv.rgb(t),t[2])};we.rgb.ansi256=function(t){var e=t[0],r=t[1],i=t[2];if(e===r&&r===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};we.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return [i,n,o]};we.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return [e,e,e]}t-=16;var r,i=Math.floor(t/36)/5*255,n=Math.floor((r=t%36)/6)/5*255,o=r%6/5*255;return [i,n,o]};we.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return "000000".substring(r.length)+r};we.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return [0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(a){return a+a}).join(""));var i=parseInt(r,16),n=i>>16&255,o=i>>8&255,s=i&255;return [n,o,s]};we.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),o=Math.min(Math.min(e,r),i),s=n-o,a,u;return s<1?a=o/(1-s):a=0,s<=0?u=0:n===e?u=(r-i)/s%6:n===r?u=2+(i-e)/s:u=4+(e-r)/s+4,u/=6,u%=1,[u*360,s*100,a*100]};we.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1,n=0;return r<.5?i=2*e*r:i=2*e*(1-r),i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};we.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};we.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return [i*255,i*255,i*255];var n=[0,0,0],o=e%1*6,s=o%1,a=1-s,u=0;switch(Math.floor(o)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=a,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=a,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=a;}return u=(1-r)*i,[(r*n[0]+u)*255,(r*n[1]+u)*255,(r*n[2]+u)*255]};we.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};we.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,i=r*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};we.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return [t[0],(i-e)*100,(1-i)*100]};we.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,o=0;return n<1&&(o=(i-n)/(1-n)),[t[0],n*100,o*100]};we.apple.rgb=function(t){return [t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};we.rgb.apple=function(t){return [t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};we.gray.rgb=function(t){return [t[0]/100*255,t[0]/100*255,t[0]/100*255]};we.gray.hsl=we.gray.hsv=function(t){return [0,0,t[0]]};we.gray.hwb=function(t){return [0,100,t[0]]};we.gray.cmyk=function(t){return [0,0,0,t[0]]};we.gray.lab=function(t){return [t[0],0,0]};we.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,i=r.toString(16).toUpperCase();return "000000".substring(i.length)+i};we.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return [e/255*100]};});var JC=z(($re,XC)=>{var fc=Am();function j9(){for(var t={},e=Object.keys(fc),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function U9(t){var e=j9(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(fc[i]),o=n.length,s=0;s<o;s++){var a=n[s],u=e[a];u.distance===-1&&(u.distance=e[i].distance+1,u.parent=i,r.unshift(a));}return e}function V9(t,e){return function(r){return e(t(r))}}function $9(t,e){for(var r=[e[t].parent,t],i=fc[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=V9(fc[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}XC.exports=function(t){for(var e=U9(t),r={},i=Object.keys(e),n=i.length,o=0;o<n;o++){var s=i[o],a=e[s];a.parent!==null&&(r[s]=$9(s,e));}return r};});var e3=z((zre,QC)=>{var wm=Am(),z9=JC(),bo={},K9=Object.keys(wm);function G9(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return "conversion"in t&&(e.conversion=t.conversion),e}function W9(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var i=t(r);if(typeof i=="object")for(var n=i.length,o=0;o<n;o++)i[o]=Math.round(i[o]);return i};return "conversion"in t&&(e.conversion=t.conversion),e}K9.forEach(function(t){bo[t]={},Object.defineProperty(bo[t],"channels",{value:wm[t].channels}),Object.defineProperty(bo[t],"labels",{value:wm[t].labels});var e=z9(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];bo[t][i]=W9(n),bo[t][i].raw=G9(n);});});QC.exports=bo;});var i3=z((Kre,r3)=>{var nu=$C(),Dr=e3(),Rm=[].slice,t3=["keyword","gray","hex"],Dm={};Object.keys(Dr).forEach(function(t){Dm[Rm.call(Dr[t].labels).sort().join("")]=t;});var dc={};function Jt(t,e){if(!(this instanceof Jt))return new Jt(t,e);if(e&&e in t3&&(e=null),e&&!(e in Dr))throw new Error("Unknown model: "+e);var r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof Jt)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=nu.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Dr[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1;}else if(t.length){this.model=e||"rgb",i=Dr[this.model].channels;var o=Rm.call(t,0,i);this.color=Sm(o,i),this.valpha=typeof t[i]=="number"?t[i]:1;}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else {this.valpha=1;var s=Object.keys(t);"alpha"in t&&(s.splice(s.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var a=s.sort().join("");if(!(a in Dm))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Dm[a];var u=Dr[this.model].labels,l=[];for(r=0;r<u.length;r++)l.push(t[u[r]]);this.color=Sm(l);}if(dc[this.model])for(i=Dr[this.model].channels,r=0;r<i;r++){var h=dc[this.model][r];h&&(this.color[r]=h(this.color[r]));}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this);}Jt.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in nu.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return nu.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return nu.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Dr[this.model].channels,r=Dr[this.model].labels,i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new Jt(this.color.map(Z9(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new Jt(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:It("rgb",0,Vt(255)),green:It("rgb",1,Vt(255)),blue:It("rgb",2,Vt(255)),hue:It(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return (t%360+360)%360}),saturationl:It("hsl",1,Vt(100)),lightness:It("hsl",2,Vt(100)),saturationv:It("hsv",1,Vt(100)),value:It("hsv",2,Vt(100)),chroma:It("hcg",1,Vt(100)),gray:It("hcg",2,Vt(100)),white:It("hwb",1,Vt(100)),wblack:It("hwb",2,Vt(100)),cyan:It("cmyk",0,Vt(100)),magenta:It("cmyk",1,Vt(100)),yellow:It("cmyk",2,Vt(100)),black:It("cmyk",3,Vt(100)),x:It("xyz",0,Vt(100)),y:It("xyz",1,Vt(100)),z:It("xyz",2,Vt(100)),l:It("lab",0,Vt(100)),a:It("lab",1),b:It("lab",2),keyword:function(t){return arguments.length?new Jt(t):Dr[this.model].keyword(this.color)},hex:function(t){return arguments.length?new Jt(t):nu.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return (t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var i=t[r]/255;e[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4);}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return !this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return Jt.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,o=2*n-1,s=r.alpha()-i.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,u=1-a;return Jt.rgb(a*r.red()+u*i.red(),a*r.green()+u*i.green(),a*r.blue()+u*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(Dr).forEach(function(t){if(t3.indexOf(t)===-1){var e=Dr[t].channels;Jt.prototype[t]=function(){if(this.model===t)return new Jt(this);if(arguments.length)return new Jt(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new Jt(X9(Dr[this.model][t].raw(this.color)).concat(r),t)},Jt[t]=function(r){return typeof r=="number"&&(r=Sm(Rm.call(arguments),e)),new Jt(r,t)};}});function Y9(t,e){return Number(t.toFixed(e))}function Z9(t){return function(e){return Y9(e,t)}}function It(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(dc[i]||(dc[i]=[]))[e]=r;}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function Vt(t){return function(e){return Math.max(0,Math.min(t,e))}}function X9(t){return Array.isArray(t)?t:[t]}function Sm(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}r3.exports=Jt;});var s3=z((Gre,n3)=>{n3.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return "#"+Array(6-n.length+1).join("0")+n};});var l3=z((Wre,u3)=>{var o3=i3(),a3=s3();u3.exports=function(e,r){var i=e.split(r||":"),n=a3(i[0]);if(!i.length)return n;for(var o=0,s=i.length-1;o<s;o++)n=o3(n).mix(o3(a3(i[o+1]))).saturate(1).hex();return n};});var c3=z((Yre,h3)=>{function $r(t,e){if(e)return new $r(t).style(e);if(!(this instanceof $r))return new $r(t);this.text=t;}$r.prototype.prefix="\x1B[";$r.prototype.suffix="m";$r.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return [parseInt(r,16),parseInt(i,16),parseInt(n,16)]};$r.prototype.rgb=function(e,r,i){var n=e/255*5,o=r/255*5,s=i/255*5;return this.ansi(n,o,s)};$r.prototype.ansi=function(e,r,i){var n=Math.round(e),o=Math.round(r),s=Math.round(i);return 16+n*36+o*6+s};$r.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$r.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};h3.exports=$r;});var d3=z((Zre,f3)=>{var J9=l3(),Q9=c3();f3.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?Q9(i+":",J9(i)):i+":";return e[0]=n+" "+e[0],e};});var m3=z((Xre,p3)=>{p3.exports=function(e,r){if(!r)return !1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return !1;continue}if(new RegExp("^"+r+"$").test(e))return !0}return !1};});var g3=z((Jre,_3)=>{var eM=m3();_3.exports=function(e){return function(i){try{return eM(i,e())}catch(n){}return !1}};});var x3=z((Qre,y3)=>{var tM=g3();y3.exports=tM(function(){return process.env.DEBUG||process.env.DIAGNOSTICS});});var E3=z((eie,v3)=>{v3.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e);}catch(r){}};});var T3=z((tie,b3)=>{var rM=Cm(),iM=me("tty").isatty(1),pc=rM(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:iM,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});pc.modify(d3());pc.use(x3());pc.set(E3());b3.exports=pc;});var su=z((rie,Nm)=>{process.env.NODE_ENV==="production"?Nm.exports=IC():Nm.exports=T3();});var A3=z((iie,C3)=>{var Om=me("fs"),{StringDecoder:nM}=me("string_decoder"),{Stream:sM}=vo();function oM(){}C3.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new nM("utf8"),n=new sM,o="",s=0,a=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close");},Om.open(t.file,"a+","0644",(u,l)=>{if(u){e?e(u):n.emit("error",u),n.destroy();return}(function h(){if(n.destroyed){Om.close(l,oM);return}return Om.read(l,r,0,r.length,s,(c,p)=>{if(c){e?e(c):n.emit("error",c),n.destroy();return}if(!p)return o&&((t.start==null||a>t.start)&&(e?e(null,o):n.emit("line",o)),a++,o=""),setTimeout(h,1e3);let f=i.write(r.slice(0,p));e||n.emit("data",f),f=(o+f).split(/\n+/);let m=f.length-1,_=0;for(;_<m;_++)(t.start==null||a>t.start)&&(e?e(null,f[_]):n.emit("line",f[_])),a++;return o=f[m],s+=p,h()})})();}),e?n.destroy:n};});var S3=z((sie,D3)=>{var Ci=me("fs"),tr=me("path"),aM=EC(),uM=me("zlib"),{MESSAGE:lM}=Ht(),{Stream:hM,PassThrough:w3}=vo(),cM=ys(),zr=su()("winston:file"),fM=me("os"),dM=A3();D3.exports=class extends cM{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(o=>{if(e[o])throw new Error(`Cannot set ${o} and ${i} together`)});}if(this._stream=new w3,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?tr.basename(e.filename):"winston.log",this.dirname=e.dirname||tr.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=tr.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:fM.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open();}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end());}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())));}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r);});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r);});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r);});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r);});});return}}let i=`${e[lM]}${this.eol}`,n=Buffer.byteLength(i);function o(){if(this._size+=n,this._pendingSize-=n,zr("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed");});return}this._rotate=!0,this._endStream(()=>this._rotateFile());}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let s=this._stream.write(i,o.bind(this));return s?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r();})),zr("written",s,this._drain),this.finishIfEnding(),s}query(e,r){typeof e=="function"&&(r=e,e={}),e=c(e);let i=tr.join(this.dirname,this.filename),n="",o=[],s=0,a=Ci.createReadStream(i,{encoding:"utf8"});a.on("error",p=>{if(a.readable&&a.destroy(),!!r)return p.code!=="ENOENT"?r(p):r(null,o)}),a.on("data",p=>{p=(n+p).split(/\n+/);let f=p.length-1,m=0;for(;m<f;m++)(!e.start||s>=e.start)&&u(p[m]),s++;n=p[f];}),a.on("close",()=>{n&&u(n,!0),e.order==="desc"&&(o=o.reverse()),r&&r(null,o);});function u(p,f){try{let m=JSON.parse(p);h(m)&&l(m);}catch(m){f||a.emit("error",m);}}function l(p){if(e.rows&&o.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(p=e.fields.reduce((f,m)=>(f[m]=p[m],f),{})),e.order==="desc"&&o.length>=e.rows&&o.shift(),o.push(p);}function h(p){if(!p||typeof p!="object")return;let f=new Date(p.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==p.level))return !0}function c(p){return p=p||{},p.rows=p.rows||p.limit||10,p.start=p.start||0,p.until=p.until||new Date,typeof p.until!="object"&&(p.until=new Date(p.until)),p.from=p.from||p.until-24*60*60*1e3,typeof p.from!="object"&&(p.from=new Date(p.from)),p.order=p.order||"desc",p}}stream(e={}){let r=tr.join(this.dirname,this.filename),i=new hM,n={file:r,start:e.start};return i.destroy=dM(n,(o,s)=>{if(o)return i.emit("error",o);try{i.emit("data",s),s=JSON.parse(s),i.emit("log",s);}catch(a){i.emit("error",a);}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);zr("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1;});})));}stat(e){let r=this._getFile(),i=tr.join(this.dirname,r);Ci.stat(i,(n,o)=>{if(n&&n.code==="ENOENT")return zr("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return zr(`err ${n.code} ${i}`),e(n);if(!o||this._needsNewFile(o.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,o.size);});}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed");});}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e);}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open());}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e();})):e();}_createStream(e){let r=tr.join(this.dirname,this.filename);zr("create stream start",r,this.options);let i=Ci.createWriteStream(r,this.options).on("error",n=>zr(n)).on("close",()=>zr("close",i.path,i.bytesWritten)).on("open",()=>{zr("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new w3,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end());});if(zr("create stream ok",r),this.zippedArchive){let n=uM.createGzip();return n.pipe(i),n}return i}_incFile(e){zr("_incFile",this.filename);let r=tr.extname(this._basename),i=tr.basename(this._basename,r);this.tailable?this._checkMaxFilesTailable(r,i,e):(this._created+=1,this._checkMaxFilesIncrementing(r,i,e));}_getFile(){let e=tr.extname(this._basename),r=tr.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created,n=!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`;return this.zippedArchive&&!this.tailable?`${n}.gz`:n}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,o=n!==0?n:"",s=this.zippedArchive?".gz":"",a=`${r}${o}${e}${s}`,u=tr.join(this.dirname,a);Ci.unlink(u,i);}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let o=this.zippedArchive?".gz":"";for(let s=this.maxFiles-1;s>1;s--)n.push(function(a,u){let l=`${r}${a-1}${e}${o}`,h=tr.join(this.dirname,l);Ci.exists(h,c=>{if(!c)return u(null);l=`${r}${a}${e}${o}`,Ci.rename(h,tr.join(this.dirname,l),u);});}.bind(this,s));aM(n,()=>{Ci.rename(tr.join(this.dirname,`${r}${e}`),tr.join(this.dirname,`${r}1${e}${o}`),i);});}_createLogDirIfNotExist(e){Ci.existsSync(e)||Ci.mkdirSync(e,{recursive:!0});}};});var N3=z((aie,R3)=>{var pM=me("http"),mM=me("https"),{Stream:_M}=vo(),gM=ys(),yM=qa();R3.exports=class extends gM{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80);}log(e,r){this._request(e,null,null,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e);}),r&&setImmediate(r);}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(o,s,a)=>{if(s&&s.statusCode!==200&&(o=new Error(`Invalid HTTP Status Code: ${s.statusCode}`)),o)return r(o);if(typeof a=="string")try{a=JSON.parse(a);}catch(u){return r(u)}r(null,a);});}stream(e={}){let r=new _M;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let o="",s=this._request(e,n,i);return r.destroy=()=>s.destroy(),s.on("data",a=>{a=(o+a).split(/\n+/);let u=a.length-1,l=0;for(;l<u;l++)try{r.emit("log",JSON.parse(a[l]));}catch(h){r.emit("error",h);}o=a[u];}),s.on("error",a=>r.emit("error",a)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i);}_doBatch(e,r,i,n){if(this.batchOptions.push(e),this.batchOptions.length===1){let o=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){o.batchTimeoutID=-1,o._doBatchRequest(o.batchCallback,i,n);},this.batchInterval);}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n);}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i);}_doRequest(e,r,i,n){let o=Object.assign({},this.headers);i&&i.bearer&&(o.Authorization=`Bearer ${i.bearer}`);let s=(this.ssl?mM:pM).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:o,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});s.on("error",r),s.on("response",a=>a.on("end",()=>r(null,a)).resume()),s.end(Buffer.from(yM(e,this.options.replacer),"utf8"));}};});var Fm=z((uie,O3)=>{var ii=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";ii.writable=t=>ii(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";ii.readable=t=>ii(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";ii.duplex=t=>ii.writable(t)&&ii.readable(t);ii.transform=t=>ii.duplex(t)&&typeof t._transform=="function";O3.exports=ii;});var L3=z((hie,F3)=>{var xM=Fm(),{MESSAGE:vM}=Ht(),EM=me("os"),bM=ys();F3.exports=class extends bM{constructor(e={}){if(super(e),!e.stream||!xM(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:EM.EOL;}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[vM]}${this.eol}`),r&&r();}};});var P3=z(ou=>{Object.defineProperty(ou,"Console",{configurable:!0,enumerable:!0,get(){return qT()}});Object.defineProperty(ou,"File",{configurable:!0,enumerable:!0,get(){return S3()}});Object.defineProperty(ou,"Http",{configurable:!0,enumerable:!0,get(){return N3()}});Object.defineProperty(ou,"Stream",{configurable:!0,enumerable:!0,get(){return L3()}});});var _c=z(au=>{var mc=Lp(),{configs:Lm}=Ht();au.cli=mc.levels(Lm.cli);au.npm=mc.levels(Lm.npm);au.syslog=mc.levels(Lm.syslog);au.addColors=mc.levels;});var k3=z((gc,I3)=>{Object.defineProperty(gc,"__esModule",{value:!0});var TM=zh(),CM=Es(TM),AM=tc(),wM=Es(AM),DM=mm(),SM=Es(DM),RM=fm(),NM=Es(RM),OM=dm(),FM=Es(OM),LM=xs(),PM=Es(LM),IM=xo(),kM=Es(IM);function Es(t){return t&&t.__esModule?t:{default:t}}function MM(t,e,r){r=(0, NM.default)(r);var i=0,n=0,{length:o}=t,s=!1;o===0&&r(null);function a(u,l){u===!1&&(s=!0),s!==!0&&(u?r(u):(++n===o||l===wM.default)&&r(null));}for(;i<o;i++)e(t[i],i,(0, FM.default)(a));}function BM(t,e,r){return (0, SM.default)(t,1/0,e,r)}function qM(t,e,r){var i=(0, CM.default)(t)?MM:BM;return i(t,(0, PM.default)(e),r)}gc.default=(0, kM.default)(qM,3);I3.exports=gc.default;});var B3=z((yc,M3)=>{Object.defineProperty(yc,"__esModule",{value:!0});yc.default=HM;function HM(t){return (e,r,i)=>t(e,i)}M3.exports=yc.default;});var Ec=z((vc,q3)=>{Object.defineProperty(vc,"__esModule",{value:!0});var jM=k3(),UM=xc(jM),VM=B3(),$M=xc(VM),zM=xs(),KM=xc(zM),GM=xo(),WM=xc(GM);function xc(t){return t&&t.__esModule?t:{default:t}}function YM(t,e,r){return (0, UM.default)(t,(0, $M.default)((0, KM.default)(e)),r)}vc.default=(0, WM.default)(YM,3);q3.exports=vc.default;});var j3=z((die,H3)=>{var ZM=Object.prototype.toString;H3.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=ZM.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"};});var Pm=z((pie,U3)=>{var XM=j3();U3.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=XM(e),n};});var Im=z(lu=>{lu.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(o,s){return s},Error.captureStackTrace(r,t||lu.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};lu.parse=function(t){if(!t.stack)return [];var e=this,r=t.stack.split(`
|
|
330
|
+
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var o=null,s=null,a=null,u=null,l=null,h=n[5]==="native";if(n[1]){a=n[1];var c=a.lastIndexOf(".");if(a[c-1]=="."&&c--,c>0){o=a.substr(0,c),s=a.substr(c+1);var p=o.indexOf(".Module");p>0&&(a=a.substr(p+1),o=o.substr(0,p));}u=null;}s&&(u=o,l=s),s==="<anonymous>"&&(l=null,a=null);var f={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:a,typeName:u,methodName:l,columnNumber:parseInt(n[4],10)||null,native:h};return e._createParsedCallSite(f)}}).filter(function(i){return !!i})};function uu(t){for(var e in t)this[e]=t[e];}var JM=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],QM=["topLevel","eval","native","constructor"];JM.forEach(function(t){uu.prototype[t]=null,uu.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]};});QM.forEach(function(t){uu.prototype[t]=!1,uu.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]};});lu._createParsedCallSite=function(t){return new uu(t)};});var km=z((gie,V3)=>{var{Writable:eB}=vo();V3.exports=class extends eB{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e;}_write(e,r,i){return e.exception?this.transport.log(e,i):(i(),!0)}};});var Bm=z((xie,K3)=>{var $3=me("os"),tB=Ec(),Mm=su()("winston:exception"),rB=Pm(),z3=Im(),iB=km();K3.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map;}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r);}),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher));}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)));}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
331
|
+
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return {pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return {loadavg:$3.loadavg(),uptime:$3.uptime()}}getTrace(e){return (e?z3.parse(e):z3.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new iB(e);this.handlers.set(e,r),this.logger.pipe(r);}}_uncaughtException(e){let r=this.getAllInfo(e),i=this._getExceptionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,o;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),n=!1);function s(){Mm("doExit",n),Mm("process._exiting",process._exiting),n&&!process._exiting&&(o&&clearTimeout(o),process.exit(1));}if(!i||i.length===0)return process.nextTick(s);tB(i,(a,u)=>{let l=rB(u),h=a.transport||a;function c(p){return ()=>{Mm(p),l();}}h._ending=!0,h.once("finish",c("finished")),h.once("error",c("error"));},()=>n&&s()),this.logger.log(r),n&&(o=setTimeout(s,3e3));}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}};});var Hm=z((Eie,Y3)=>{var G3=me("os"),nB=Ec(),qm=su()("winston:rejection"),sB=Pm(),W3=Im(),oB=km();Y3.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map;}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r);}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher));}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)));}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
332
|
+
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return {pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return {loadavg:G3.loadavg(),uptime:G3.uptime()}}getTrace(e){return (e?W3.parse(e):W3.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new oB(e);this.handlers.set(e,r),this.logger.pipe(r);}}_unhandledRejection(e){let r=this.getAllInfo(e),i=this._getRejectionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,o;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),n=!1);function s(){qm("doExit",n),qm("process._exiting",process._exiting),n&&!process._exiting&&(o&&clearTimeout(o),process.exit(1));}if(!i||i.length===0)return process.nextTick(s);nB(i,(a,u)=>{let l=sB(u),h=a.transport||a;function c(p){return ()=>{qm(p),l();}}h._ending=!0,h.once("finish",c("finished")),h.once("error",c("error"));},()=>n&&s()),this.logger.log(r),n&&(o=setTimeout(s,3e3));}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}};});var X3=z((bie,Z3)=>{var jm=class{constructor(e){let r=bc();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now();}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};Z3.exports=jm;});var bc=z((Tie,tA)=>{var{Stream:aB,Transform:uB}=vo(),J3=Ec(),{LEVEL:ni,SPLAT:Q3}=Ht(),eA=Fm(),lB=Bm(),hB=Hm(),cB=lm(),fB=X3(),{warn:dB}=Pp(),pB=_c(),mB=/%[scdjifoO%]/g,Tc=class extends uB{constructor(e){super({objectMode:!0}),this.configure(e);}child(e){let r=this;return Object.create(r,{write:{value:function(i){let n=Object.assign({},e,i);i instanceof Error&&(n.stack=i.stack,n.message=i.message),r.write(n);}}})}configure({silent:e,format:r,defaultMeta:i,levels:n,level:o="info",exitOnError:s=!0,transports:a,colors:u,emitErrs:l,formatters:h,padLevels:c,rewriters:p,stripColors:f,exceptionHandlers:m,rejectionHandlers:_}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Dp()(),this.defaultMeta=i||null,this.levels=n||this.levels||pB.npm.levels,this.level=o,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new lB(this),this.rejections=new hB(this),this.profilers={},this.exitOnError=s,a&&(a=Array.isArray(a)?a:[a],a.forEach(x=>this.add(x))),u||l||h||c||p||f)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
333
|
+
`));m&&this.exceptions.handle(m),_&&this.rejections.handle(_);}isLevelEnabled(e){let r=Um(this.levels,e);if(r===null)return !1;let i=Um(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(o=>{let s=Um(this.levels,o.level);return s===null&&(s=i),s>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[ni]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[ni]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[ni]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(mB))){let s=Object.assign({},this.defaultMeta,n,{[ni]:e,[Q3]:i,level:e,message:r});return n.message&&(s.message=`${s.message} ${n.message}`),n.stack&&(s.stack=n.stack),this.write(s),this}return this.write(Object.assign({},this.defaultMeta,{[ni]:e,[Q3]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[ni]||(e[ni]=e.level),!this.levels[e[ni]]&&this.levels[e[ni]]!==0&&console.error("[winston] Unknown logger level: %s",e[ni]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options));}finally{this._writableState.sync=!1,i();}}_final(e){let r=this.transports.slice();J3(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end();},e);}add(e){let r=!eA(e)||e.log.length>2?new cB({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return (!eA(e)||e.log.length>2)&&(r=this.transports.filter(i=>i.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){dB.deprecated("setLevels");}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let i={},n=Object.assign({},e.query||{});function o(a,u){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(n)),a.query(e,(l,h)=>{if(l)return u(l);typeof a.formatResults=="function"&&(h=a.formatResults(h,e.format)),u(null,h);});}function s(a,u){o(a,(l,h)=>{u&&(h=l||h,h&&(i[a.name]=h),u()),u=null;});}J3(this.transports.filter(a=>!!a.query),s,()=>r(null,i));}stream(e={}){let r=new aB,i=[];return r._streams=i,r.destroy=()=>{let n=i.length;for(;n--;)i[n].destroy();},this.transports.filter(n=>!!n.stream).forEach(n=>{let o=n.stream(e);o&&(i.push(o),o.on("log",s=>{s.transport=s.transport||[],s.transport.push(n.name),r.emit("log",s);}),o.on("error",s=>{s.transport=s.transport||[],s.transport.push(n.name),r.emit("error",s);}));}),r}startTimer(){return new fB(this)}profile(e,...r){let i=Date.now();if(this.profilers[e]){let n=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let o=typeof r[r.length-1]=="object"?r.pop():{};return o.level=o.level||"info",o.durationMs=i-n,o.message=o.message||e,this.write(o)}return this.profilers[e]=i,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e);}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e);}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
334
|
+
`))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r);}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]));}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta);}};function Um(t,e){let r=t[e];return !r&&r!==0?null:r}Object.defineProperty(Tc.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});tA.exports=Tc;});var Vm=z((Cie,rA)=>{var{LEVEL:_B}=Ht(),gB=_c(),yB=bc(),xB=su()("winston:create-logger");function vB(t){return "is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}rA.exports=function(t={}){t.levels=t.levels||gB.npm.levels;class e extends yB{constructor(n){super(n);}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(xB('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let o=this||r;if(n.length===1){let[s]=n,a=s&&s.message&&s||{message:s};return a.level=a[_B]=i,o._addDefaultMeta(a),o.write(a),this||r}return n.length===0?(o.log(i,""),o):o.log(i,...n)},e.prototype[vB(i)]=function(){return (this||r).isLevelEnabled(i)};}),r};});var nA=z((wie,iA)=>{var EB=Vm();iA.exports=class{constructor(e={}){this.loggers=new Map,this.options=e;}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=EB(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n);}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return !!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,i)=>this._removeLogger(i));}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e);}_delete(e){this.loggers.delete(e);}};});var oA=z(ot=>{var sA=Lp(),{warn:hu}=Pp();ot.version=B2().version;ot.transports=P3();ot.config=_c();ot.addColors=sA.levels;ot.format=sA.format;ot.createLogger=Vm();ot.Logger=bc();ot.ExceptionHandler=Bm();ot.RejectionHandler=Hm();ot.Container=nA();ot.Transport=ys();ot.loggers=new ot.Container;var Ai=ot.createLogger();Object.keys(ot.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>ot[t]=(...e)=>Ai[t](...e));Object.defineProperty(ot,"level",{get(){return Ai.level},set(t){Ai.level=t;}});Object.defineProperty(ot,"exceptions",{get(){return Ai.exceptions}});["exitOnError"].forEach(t=>{Object.defineProperty(ot,t,{get(){return Ai[t]},set(e){Ai[t]=e;}});});Object.defineProperty(ot,"default",{get(){return {exceptionHandlers:Ai.exceptionHandlers,rejectionHandlers:Ai.rejectionHandlers,transports:Ai.transports}}});hu.deprecated(ot,"setLevels");hu.forFunctions(ot,"useFormat",["cli"]);hu.forProperties(ot,"useFormat",["padLevels","stripColors"]);hu.forFunctions(ot,"deprecated",["addRewriter","addFilter","clone","extend"]);hu.forProperties(ot,"deprecated",["emitErrs","levelLength"]);});var Cc=z((Sie,uA)=>{var $m=[],aA=0,rr=(t,e)=>{aA>=e&&$m.push(t);};rr.WARN=1;rr.INFO=2;rr.DEBUG=3;rr.reset=()=>{$m=[];};rr.setDebugLevel=t=>{aA=t;};rr.warn=t=>rr(t,rr.WARN);rr.info=t=>rr(t,rr.INFO);rr.debug=t=>rr(t,rr.DEBUG);rr.debugMessages=()=>$m;uA.exports=rr;});var hA=z((Rie,lA)=>{lA.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")};});var fA=z((Nie,cA)=>{var bB=hA();cA.exports=t=>typeof t=="string"?t.replace(bB(),""):t;});var pA=z((Oie,zm)=>{var dA=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);zm.exports=dA;zm.exports.default=dA;});var _A=z((Fie,mA)=>{mA.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var yA=z((Lie,Km)=>{var TB=fA(),CB=pA(),AB=_A(),gA=t=>{if(typeof t!="string"||t.length===0||(t=TB(t),t.length===0))return 0;t=t.replace(AB()," ");let e=0;for(let r=0;r<t.length;r++){let i=t.codePointAt(r);i<=31||i>=127&&i<=159||i>=768&&i<=879||(i>65535&&r++,e+=CB(i)?2:1);}return e};Km.exports=gA;Km.exports.default=gA;});var Gm=z((Pie,bA)=>{var xA=yA();function Ac(t){return t?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function si(t){let e=Ac();return (""+t).replace(e,"").split(`
|
|
335
|
+
`).reduce(function(n,o){return xA(o)>n?xA(o):n},0)}function cu(t,e){return Array(e+1).join(t)}function wB(t,e,r,i){let n=si(t);if(e+1>=n){let o=e-n;switch(i){case"right":{t=cu(r,o)+t;break}case"center":{let s=Math.ceil(o/2),a=o-s;t=cu(r,a)+t+cu(r,s);break}default:{t=t+cu(r,o);break}}}return t}var To={};function fu(t,e,r){e="\x1B["+e+"m",r="\x1B["+r+"m",To[e]={set:t,to:!0},To[r]={set:t,to:!1},To[t]={on:e,off:r};}fu("bold",1,22);fu("italics",3,23);fu("underline",4,24);fu("inverse",7,27);fu("strikethrough",9,29);function vA(t,e){let r=e[1]?parseInt(e[1].split(";")[0]):0;if(r>=30&&r<=39||r>=90&&r<=97){t.lastForegroundAdded=e[0];return}if(r>=40&&r<=49||r>=100&&r<=107){t.lastBackgroundAdded=e[0];return}if(r===0){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&delete t[n];return}let i=To[e[0]];i&&(t[i.set]=i.to);}function DB(t){let e=Ac(!0),r=e.exec(t),i={};for(;r!==null;)vA(i,r),r=e.exec(t);return i}function EA(t,e){let r=t.lastBackgroundAdded,i=t.lastForegroundAdded;return delete t.lastBackgroundAdded,delete t.lastForegroundAdded,Object.keys(t).forEach(function(n){t[n]&&(e+=To[n].off);}),r&&r!="\x1B[49m"&&(e+="\x1B[49m"),i&&i!="\x1B[39m"&&(e+="\x1B[39m"),e}function SB(t,e){let r=t.lastBackgroundAdded,i=t.lastForegroundAdded;return delete t.lastBackgroundAdded,delete t.lastForegroundAdded,Object.keys(t).forEach(function(n){t[n]&&(e=To[n].on+e);}),r&&r!="\x1B[49m"&&(e=r+e),i&&i!="\x1B[39m"&&(e=i+e),e}function RB(t,e){if(t.length===si(t))return t.substr(0,e);for(;si(t)>e;)t=t.slice(0,-1);return t}function NB(t,e){let r=Ac(!0),i=t.split(Ac()),n=0,o=0,s="",a,u={};for(;o<e;){a=r.exec(t);let l=i[n];if(n++,o+si(l)>e&&(l=RB(l,e-o)),s+=l,o+=si(l),o<e){if(!a)break;s+=a[0],vA(u,a);}}return EA(u,s)}function OB(t,e,r){return r=r||"\u2026",si(t)<=e?t:(e-=si(r),NB(t,e)+r)}function FB(){return {chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function LB(t,e){t=t||{},e=e||FB();let r=Object.assign({},e,t);return r.chars=Object.assign({},e.chars,t.chars),r.style=Object.assign({},e.style,t.style),r}function PB(t,e){let r=[],i=e.split(/(\s+)/g),n=[],o=0,s;for(let a=0;a<i.length;a+=2){let u=i[a],l=o+si(u);o>0&&s&&(l+=s.length),l>t?(o!==0&&r.push(n.join("")),n=[u],o=si(u)):(n.push(s||"",u),o=l),s=i[a+1];}return o&&r.push(n.join("")),r}function IB(t,e){let r=[],i="";function n(s,a){for(i.length&&a&&(i+=a),i+=s;i.length>t;)r.push(i.slice(0,t)),i=i.slice(t);}let o=e.split(/(\s+)/g);for(let s=0;s<o.length;s+=2)n(o[s],s&&o[s-1]);return i.length&&r.push(i),r}function kB(t,e,r=!0){let i=[];e=e.split(`
|
|
336
|
+
`);let n=r?PB:IB;for(let o=0;o<e.length;o++)i.push.apply(i,n(t,e[o]));return i}function MB(t){let e={},r=[];for(let i=0;i<t.length;i++){let n=SB(e,t[i]);e=DB(n);let o=Object.assign({},e);r.push(EA(o,n));}return r}function BB(t,e){let r="\x1B]",i="\x07",n=";";return [r,"8",n,n,t||e,i,e,r,"8",n,n,i].join("")}bA.exports={strlen:si,repeat:cu,pad:wB,truncate:OB,mergeOptions:LB,wordWrap:kB,colorizeLines:MB,hyperlink:BB};});var wA=z((Iie,AA)=>{var CA={};AA.exports=CA;var TA={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(TA).forEach(function(t){var e=TA[t],r=CA[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m";});});var SA=z((kie,DA)=>{DA.exports=function(t,e){e=e||process.argv;var r=e.indexOf("--"),i=/^-{1,2}/.test(t)?"":"--",n=e.indexOf(i+t);return n!==-1&&(r===-1?!0:n<r)};});var NA=z((Mie,RA)=>{var qB=me("os"),Kr=SA(),ur=process.env,Co=void 0;Kr("no-color")||Kr("no-colors")||Kr("color=false")?Co=!1:(Kr("color")||Kr("colors")||Kr("color=true")||Kr("color=always"))&&(Co=!0);"FORCE_COLOR"in ur&&(Co=ur.FORCE_COLOR.length===0||parseInt(ur.FORCE_COLOR,10)!==0);function HB(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function jB(t){if(Co===!1)return 0;if(Kr("color=16m")||Kr("color=full")||Kr("color=truecolor"))return 3;if(Kr("color=256"))return 2;if(t&&!t.isTTY&&Co!==!0)return 0;var e=Co?1:0;if(process.platform==="win32"){var r=qB.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ur)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in ur})||ur.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in ur)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ur.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in ur){var i=parseInt((ur.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ur.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(ur.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(ur.TERM)||"COLORTERM"in ur?1:(ur.TERM==="dumb",e)}function Wm(t){var e=jB(t);return HB(e)}RA.exports={supportsColor:Wm,stdout:Wm(process.stdout),stderr:Wm(process.stderr)};});var FA=z((Bie,OA)=>{OA.exports=function(e,r){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(o){o=o.toLowerCase();var s=n[o]||[" "],a=Math.floor(Math.random()*s.length);typeof n[o]!="undefined"?i+=n[o][a]:i+=o;}),i};});var PA=z((qie,LA)=>{LA.exports=function(e,r){e=e||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(i.up,i.down,i.mid);function o(u){var l=Math.floor(Math.random()*u);return l}function s(u){var l=!1;return n.filter(function(h){l=h===u;}),l}function a(u,l){var h="",c,p;l=l||{},l.up=typeof l.up!="undefined"?l.up:!0,l.mid=typeof l.mid!="undefined"?l.mid:!0,l.down=typeof l.down!="undefined"?l.down:!0,l.size=typeof l.size!="undefined"?l.size:"maxi",u=u.split("");for(p in u)if(!s(p)){switch(h=h+u[p],c={up:0,down:0,mid:0},l.size){case"mini":c.up=o(8),c.mid=o(2),c.down=o(8);break;case"maxi":c.up=o(16)+3,c.mid=o(4)+1,c.down=o(64)+3;break;default:c.up=o(8)+1,c.mid=o(6)/2,c.down=o(8)+1;break}var f=["up","mid","down"];for(var m in f)for(var _=f[m],x=0;x<=c[_];x++)l[_]&&(h=h+i[_][o(i[_].length)]);}return h}return a(e,r)};});var kA=z((Hie,IA)=>{IA.exports=function(t){return function(e,r,i){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}};});var BA=z((jie,MA)=>{MA.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}};});var HA=z((Uie,qA)=>{qA.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,i,n){return r===" "?r:t[e[i++%e.length]](r)}};});var UA=z((Vie,jA)=>{jA.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,i,n){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}};});var WA=z((zie,GA)=>{var ze={};GA.exports=ze;ze.themes={};var UB=me("util"),bs=ze.styles=wA(),$A=Object.defineProperties,VB=new RegExp(/[\r\n]+/g);ze.supportsColor=NA().supportsColor;typeof ze.enabled=="undefined"&&(ze.enabled=ze.supportsColor()!==!1);ze.enable=function(){ze.enabled=!0;};ze.disable=function(){ze.enabled=!1;};ze.stripColors=ze.strip=function(t){return (""+t).replace(/\x1B\[\d+m/g,"")};ze.stylize=function(e,r){if(!ze.enabled)return e+"";var i=bs[r];return !i&&r in ze?ze[r](e):i.open+e+i.close};var $B=/[|\\{}()[\]^$+*?.]/g,zB=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace($B,"\\$&")};function zA(t){var e=function r(){return GB.apply(r,arguments)};return e._styles=t,e.__proto__=KB,e}var KA=function(){var t={};return bs.grey=bs.gray,Object.keys(bs).forEach(function(e){bs[e].closeRe=new RegExp(zB(bs[e].close),"g"),t[e]={get:function(){return zA(this._styles.concat(e))}};}),t}(),KB=$A(function(){},KA);function GB(){var t=Array.prototype.slice.call(arguments),e=t.map(function(s){return s!=null&&s.constructor===String?s:UB.inspect(s)}).join(" ");if(!ze.enabled||!e)return e;for(var r=e.indexOf(`
|
|
337
|
+
`)!=-1,i=this._styles,n=i.length;n--;){var o=bs[i[n]];e=o.open+e.replace(o.closeRe,o.open)+o.close,r&&(e=e.replace(VB,function(s){return o.close+s+o.open}));}return e}ze.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){ze[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var o in t[r])n=ze[t[r][o]](n);return n}return ze[t[r]](i)};})(e);};function WB(){var t={};return Object.keys(KA).forEach(function(e){t[e]={get:function(){return zA([e])}};}),t}var YB=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};ze.trap=FA();ze.zalgo=PA();ze.maps={};ze.maps.america=kA()(ze);ze.maps.zebra=BA()(ze);ze.maps.rainbow=HA()(ze);ze.maps.random=UA()(ze);for(VA in ze.maps)(function(t){ze[t]=function(e){return YB(ze.maps[t],e)};})(VA);var VA;$A(ze,WB());});var ZA=z((Kie,YA)=>{var ZB=WA();YA.exports=ZB;});var ew=z((Gie,wc)=>{var{info:XB,debug:QA}=Cc(),Sr=Gm(),Zm=class t{constructor(e){this.setOptions(e),this.x=null,this.y=null;}setOptions(e){["boolean","number","string"].indexOf(typeof e)!==-1&&(e={content:""+e}),e=e||{},this.options=e;let r=e.content;if(["boolean","number","string"].indexOf(typeof r)!==-1)this.content=String(r);else if(!r)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof r);this.colSpan=e.colSpan||1,this.rowSpan=e.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}});}mergeTableOptions(e,r){this.cells=r;let i=this.options.chars||{},n=e.chars,o=this.chars={};QB.forEach(function(u){Ym(i,n,u,o);}),this.truncate=this.options.truncate||e.truncate;let s=this.options.style=this.options.style||{},a=e.style;Ym(s,a,"padding-left",this),Ym(s,a,"padding-right",this),this.head=s.head||a.head,this.border=s.border||a.border,this.fixedWidth=e.colWidths[this.x],this.lines=this.computeLines(e),this.desiredWidth=Sr.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length;}computeLines(e){let r=e.wordWrap||e.textWrap,{wordWrap:i=r}=this.options;if(this.fixedWidth&&i){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let s=1;for(;s<this.colSpan;)this.fixedWidth+=e.colWidths[this.x+s],s++;}let{wrapOnWordBoundary:n=!0}=e,{wrapOnWordBoundary:o=n}=this.options;return this.wrapLines(Sr.wordWrap(this.fixedWidth,this.content,o))}return this.wrapLines(this.content.split(`
|
|
338
|
+
`))}wrapLines(e){let r=Sr.colorizeLines(e);return this.href?r.map(i=>Sr.hyperlink(this.href,i)):r}init(e){let r=this.x,i=this.y;this.widths=e.colWidths.slice(r,r+this.colSpan),this.heights=e.rowHeights.slice(i,i+this.rowSpan),this.width=this.widths.reduce(JA,-1),this.height=this.heights.reduce(JA,-1),this.hAlign=this.options.hAlign||e.colAligns[r],this.vAlign=this.options.vAlign||e.rowAligns[i],this.drawRight=r+this.colSpan==e.colWidths.length;}draw(e,r){if(e=="top")return this.drawTop(this.drawRight);if(e=="bottom")return this.drawBottom(this.drawRight);let i=Sr.truncate(this.content,10,this.truncate);e||XB(`${this.y}-${this.x}: ${this.rowSpan-e}x${this.colSpan} Cell ${i}`);let n=Math.max(this.height-this.lines.length,0),o;switch(this.vAlign){case"center":o=Math.ceil(n/2);break;case"bottom":o=n;break;default:o=0;}if(e<o||e>=o+this.lines.length)return this.drawEmpty(this.drawRight,r);let s=this.lines.length>this.height&&e+1>=this.height;return this.drawLine(e-o,this.drawRight,s,r)}drawTop(e){let r=[];return this.cells?this.widths.forEach(function(i,n){r.push(this._topLeftChar(n)),r.push(Sr.repeat(this.chars[this.y==0?"top":"mid"],i));},this):(r.push(this._topLeftChar(0)),r.push(Sr.repeat(this.chars[this.y==0?"top":"mid"],this.width))),e&&r.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",r.join(""))}_topLeftChar(e){let r=this.x+e,i;if(this.y==0)i=r==0?"topLeft":e==0?"topMid":"top";else if(r==0)i="leftMid";else if(i=e==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][r]instanceof t.ColSpanCell&&(i=e==0?"topMid":"mid"),e==0)){let o=1;for(;this.cells[this.y][r-o]instanceof t.ColSpanCell;)o++;this.cells[this.y][r-o]instanceof t.RowSpanCell&&(i="leftMid");}return this.chars[i]}wrapWithStyleColors(e,r){if(this[e]&&this[e].length)try{let i=ZA();for(let n=this[e].length-1;n>=0;n--)i=i[this[e][n]];return i(r)}catch(i){return r}else return r}drawLine(e,r,i,n){let o=this.chars[this.x==0?"left":"middle"];if(this.x&&n&&this.cells){let p=this.cells[this.y+n][this.x-1];for(;p instanceof du;)p=this.cells[p.y][p.x-1];p instanceof pu||(o=this.chars.rightMid);}let s=Sr.repeat(" ",this.paddingLeft),a=r?this.chars.right:"",u=Sr.repeat(" ",this.paddingRight),l=this.lines[e],h=this.width-(this.paddingLeft+this.paddingRight);i&&(l+=this.truncate||"\u2026");let c=Sr.truncate(l,h,this.truncate);return c=Sr.pad(c,h," ",this.hAlign),c=s+c+u,this.stylizeLine(o,c,a)}stylizeLine(e,r,i){return e=this.wrapWithStyleColors("border",e),i=this.wrapWithStyleColors("border",i),this.y===0&&(r=this.wrapWithStyleColors("head",r)),e+r+i}drawBottom(e){let r=this.chars[this.x==0?"bottomLeft":"bottomMid"],i=Sr.repeat(this.chars.bottom,this.width),n=e?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",r+i+n)}drawEmpty(e,r){let i=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let s=this.cells[this.y+r][this.x-1];for(;s instanceof du;)s=this.cells[s.y][s.x-1];s instanceof pu||(i=this.chars.rightMid);}let n=e?this.chars.right:"",o=Sr.repeat(" ",this.width);return this.stylizeLine(i,o,n)}},du=class{constructor(){}draw(e){return typeof e=="number"&&QA(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},pu=class{constructor(e){this.originalCell=e;}init(e){let r=this.y,i=this.originalCell.y;this.cellOffset=r-i,this.offset=JB(e.rowHeights,i,this.cellOffset);}draw(e){return e=="top"?this.originalCell.draw(this.offset,this.cellOffset):e=="bottom"?this.originalCell.draw("bottom"):(QA(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+e))}mergeTableOptions(){}};function XA(...t){return t.filter(e=>e!=null).shift()}function Ym(t,e,r,i){let n=r.split("-");n.length>1?(n[1]=n[1].charAt(0).toUpperCase()+n[1].substr(1),n=n.join(""),i[n]=XA(t[n],t[r],e[n],e[r])):i[r]=XA(t[r],e[r]);}function JB(t,e,r){let i=t[e];for(let n=1;n<r;n++)i+=1+t[e+n];return i}function JA(t,e){return t+e+1}var QB=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];wc.exports=Zm;wc.exports.ColSpanCell=du;wc.exports.RowSpanCell=pu;});var iw=z((Wie,rw)=>{var{warn:eq,debug:tq}=Cc(),Xm=ew(),{ColSpanCell:rq,RowSpanCell:iq}=Xm;(function(){function t(f,m){return f[m]>0?t(f,m+1):m}function e(f){let m={};f.forEach(function(_,x){let v=0;_.forEach(function(g){g.y=x,g.x=x?t(m,v):v;let b=g.rowSpan||1,E=g.colSpan||1;if(b>1)for(let w=0;w<E;w++)m[g.x+w]=b;v=g.x+E;}),Object.keys(m).forEach(g=>{m[g]--,m[g]<1&&delete m[g];});});}function r(f){let m=0;return f.forEach(function(_){_.forEach(function(x){m=Math.max(m,x.x+(x.colSpan||1));});}),m}function i(f){return f.length}function n(f,m){let _=f.y,x=f.y-1+(f.rowSpan||1),v=m.y,g=m.y-1+(m.rowSpan||1),b=!(_>g||v>x),E=f.x,w=f.x-1+(f.colSpan||1),D=m.x,N=m.x-1+(m.colSpan||1),F=!(E>N||D>w);return b&&F}function o(f,m,_){let x=Math.min(f.length-1,_),v={x:m,y:_};for(let g=0;g<=x;g++){let b=f[g];for(let E=0;E<b.length;E++)if(n(v,b[E]))return !0}return !1}function s(f,m,_,x){for(let v=_;v<x;v++)if(o(f,v,m))return !1;return !0}function a(f){f.forEach(function(m,_){m.forEach(function(x){for(let v=1;v<x.rowSpan;v++){let g=new iq(x);g.x=x.x,g.y=x.y+v,g.colSpan=x.colSpan,l(g,f[_+v]);}});});}function u(f){for(let m=f.length-1;m>=0;m--){let _=f[m];for(let x=0;x<_.length;x++){let v=_[x];for(let g=1;g<v.colSpan;g++){let b=new rq;b.x=v.x+g,b.y=v.y,_.splice(x+1,0,b);}}}}function l(f,m){let _=0;for(;_<m.length&&m[_].x<f.x;)_++;m.splice(_,0,f);}function h(f){let m=i(f),_=r(f);tq(`Max rows: ${m}; Max cols: ${_}`);for(let x=0;x<m;x++)for(let v=0;v<_;v++)if(!o(f,v,x)){let g={x:v,y:x,colSpan:1,rowSpan:1};for(v++;v<_&&!o(f,v,x);)g.colSpan++,v++;let b=x+1;for(;b<m&&s(f,b,g.x,g.x+g.colSpan);)g.rowSpan++,b++;let E=new Xm(g);E.x=g.x,E.y=g.y,eq(`Missing cell at ${E.y}-${E.x}.`),l(E,f[x]);}}function c(f){return f.map(function(m){if(!Array.isArray(m)){let _=Object.keys(m)[0];m=m[_],Array.isArray(m)?(m=m.slice(),m.unshift(_)):m=[_,m];}return m.map(function(_){return new Xm(_)})})}function p(f){let m=c(f);return e(m),h(m),a(m),u(m),m}rw.exports={makeTableLayout:p,layoutTable:e,addRowSpanCells:a,maxWidth:r,fillInTable:h,computeWidths:tw("colSpan","desiredWidth","x",1),computeHeights:tw("rowSpan","desiredHeight","y",1)};})();function tw(t,e,r,i){return function(n,o){let s=[],a=[],u={};o.forEach(function(l){l.forEach(function(h){(h[t]||1)>1?a.push(h):s[h[r]]=Math.max(s[h[r]]||0,h[e]||0,i);});}),n.forEach(function(l,h){typeof l=="number"&&(s[h]=l);});for(let l=a.length-1;l>=0;l--){let h=a[l],c=h[t],p=h[r],f=s[p],m=typeof n[p]=="number"?0:1;if(typeof f=="number")for(let _=1;_<c;_++)f+=1+s[p+_],typeof n[p+_]!="number"&&m++;else f=e==="desiredWidth"?h.desiredWidth-1:1,(!u[p]||u[p]<f)&&(u[p]=f);if(h[e]>f){let _=0;for(;m>0&&h[e]>f;){if(typeof n[p+_]!="number"){let x=Math.round((h[e]-f)/m);f+=x,s[p+_]+=x,m--;}_++;}}}Object.assign(n,s,u);for(let l=0;l<n.length;l++)n[l]=Math.max(i,n[l]||0);}}});var sw=z((Yie,nw)=>{var wi=Cc(),nq=Gm(),Jm=iw(),Dc=class extends Array{constructor(e){super();let r=nq.mergeOptions(e);if(Object.defineProperty(this,"options",{value:r,enumerable:r.debug}),r.debug){switch(typeof r.debug){case"boolean":wi.setDebugLevel(wi.WARN);break;case"number":wi.setDebugLevel(r.debug);break;case"string":wi.setDebugLevel(parseInt(r.debug,10));break;default:wi.setDebugLevel(wi.WARN),wi.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof r.debug}`);}Object.defineProperty(this,"messages",{get(){return wi.debugMessages()}});}}toString(){let e=this,r=this.options.head&&this.options.head.length;r?(e=[this.options.head],this.length&&e.push.apply(e,this)):this.options.style.head=[];let i=Jm.makeTableLayout(e);i.forEach(function(o){o.forEach(function(s){s.mergeTableOptions(this.options,i);},this);},this),Jm.computeWidths(this.options.colWidths,i),Jm.computeHeights(this.options.rowHeights,i),i.forEach(function(o){o.forEach(function(s){s.init(this.options);},this);},this);let n=[];for(let o=0;o<i.length;o++){let s=i[o],a=this.options.rowHeights[o];(o===0||!this.options.style.compact||o==1&&r)&&Qm(s,"top",n);for(let u=0;u<a;u++)Qm(s,u,n);o+1==i.length&&Qm(s,"bottom",n);}return n.join(`
|
|
339
|
+
`)}get width(){return this.toString().split(`
|
|
340
|
+
`)[0].length}};Dc.reset=()=>wi.reset();function Qm(t,e,r){let i=[];t.forEach(function(o){i.push(o.draw(e));});let n=i.join("");n.length&&r.push(n);}nw.exports=Dc;});var aw=z((Zie,ow)=>{ow.exports=sw();});var Nt=z((Xie,lw)=>{var{FORCE_COLOR:sq,NODE_DISABLE_COLORS:oq,TERM:aq}=process.env,rt={enabled:!oq&&aq!=="dumb"&&sq!=="0",reset:at(0,0),bold:at(1,22),dim:at(2,22),italic:at(3,23),underline:at(4,24),inverse:at(7,27),hidden:at(8,28),strikethrough:at(9,29),black:at(30,39),red:at(31,39),green:at(32,39),yellow:at(33,39),blue:at(34,39),magenta:at(35,39),cyan:at(36,39),white:at(37,39),gray:at(90,39),grey:at(90,39),bgBlack:at(40,49),bgRed:at(41,49),bgGreen:at(42,49),bgYellow:at(43,49),bgBlue:at(44,49),bgMagenta:at(45,49),bgCyan:at(46,49),bgWhite:at(47,49)};function uw(t,e){let r=0,i,n="",o="";for(;r<t.length;r++)i=t[r],n+=i.open,o+=i.close,e.includes(i.close)&&(e=e.replace(i.rgx,i.close+i.open));return n+e+o}function uq(t,e){let r={has:t,keys:e};return r.reset=rt.reset.bind(r),r.bold=rt.bold.bind(r),r.dim=rt.dim.bind(r),r.italic=rt.italic.bind(r),r.underline=rt.underline.bind(r),r.inverse=rt.inverse.bind(r),r.hidden=rt.hidden.bind(r),r.strikethrough=rt.strikethrough.bind(r),r.black=rt.black.bind(r),r.red=rt.red.bind(r),r.green=rt.green.bind(r),r.yellow=rt.yellow.bind(r),r.blue=rt.blue.bind(r),r.magenta=rt.magenta.bind(r),r.cyan=rt.cyan.bind(r),r.white=rt.white.bind(r),r.gray=rt.gray.bind(r),r.grey=rt.grey.bind(r),r.bgBlack=rt.bgBlack.bind(r),r.bgRed=rt.bgRed.bind(r),r.bgGreen=rt.bgGreen.bind(r),r.bgYellow=rt.bgYellow.bind(r),r.bgBlue=rt.bgBlue.bind(r),r.bgMagenta=rt.bgMagenta.bind(r),r.bgCyan=rt.bgCyan.bind(r),r.bgWhite=rt.bgWhite.bind(r),r}function at(t,e){let r={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(r)),i===void 0?this:rt.enabled?uw(this.keys,i+""):i+""):i===void 0?uq([t],[r]):rt.enabled?uw([r],i+""):i+""}}lw.exports=rt;});var cw=z((Jie,hw)=>{hw.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}};});var Sc=z((Qie,fw)=>{fw.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var Ft=z((ene,dw)=>{var e_="\x1B",Ot=`${e_}[`,lq="\x07",t_={to(t,e){return e?`${Ot}${e+1};${t+1}H`:`${Ot}${t+1}G`},move(t,e){let r="";return t<0?r+=`${Ot}${-t}D`:t>0&&(r+=`${Ot}${t}C`),e<0?r+=`${Ot}${-e}A`:e>0&&(r+=`${Ot}${e}B`),r},up:(t=1)=>`${Ot}${t}A`,down:(t=1)=>`${Ot}${t}B`,forward:(t=1)=>`${Ot}${t}C`,backward:(t=1)=>`${Ot}${t}D`,nextLine:(t=1)=>`${Ot}E`.repeat(t),prevLine:(t=1)=>`${Ot}F`.repeat(t),left:`${Ot}G`,hide:`${Ot}?25l`,show:`${Ot}?25h`,save:`${e_}7`,restore:`${e_}8`},hq={up:(t=1)=>`${Ot}S`.repeat(t),down:(t=1)=>`${Ot}T`.repeat(t)},cq={screen:`${Ot}2J`,up:(t=1)=>`${Ot}1J`.repeat(t),down:(t=1)=>`${Ot}J`.repeat(t),line:`${Ot}2K`,lineEnd:`${Ot}K`,lineStart:`${Ot}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?t_.up():"");return t&&(e+=t_.left),e}};dw.exports={cursor:t_,scroll:hq,erase:cq,beep:lq};});var yw=z((tne,gw)=>{function fq(t,e){var r=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=dq(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,n=function(){};return {s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
341
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return {s:function(){r=r.call(t);},n:function(){var l=r.next();return o=l.done,l},e:function(l){s=!0,a=l;},f:function(){try{!o&&r.return!=null&&r.return();}finally{if(s)throw a}}}}function dq(t,e){if(t){if(typeof t=="string")return pw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pw(t,e)}}function pw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}var pq=Sc(),_w=Ft(),mw=_w.erase,mq=_w.cursor,_q=t=>[...pq(t)].length;gw.exports=function(t,e){if(!e)return mw.line+mq.to(0);let r=0,i=t.split(/\r?\n/);var n=fq(i),o;try{for(n.s();!(o=n.n()).done;){let s=o.value;r+=1+Math.floor(Math.max(_q(s)-1,0)/e);}}catch(s){n.e(s);}finally{n.f();}return mw.lines(r)};});var r_=z((rne,xw)=>{var mu={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},gq={arrowUp:mu.arrowUp,arrowDown:mu.arrowDown,arrowLeft:mu.arrowLeft,arrowRight:mu.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},yq=process.platform==="win32"?gq:mu;xw.exports=yq;});var Ew=z((ine,vw)=>{var Ao=Nt(),Ts=r_(),i_=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),xq=t=>i_[t]||i_.default,_u=Object.freeze({aborted:Ao.red(Ts.cross),done:Ao.green(Ts.tick),exited:Ao.yellow(Ts.cross),default:Ao.cyan("?")}),vq=(t,e,r)=>e?_u.aborted:r?_u.exited:t?_u.done:_u.default,Eq=t=>Ao.gray(t?Ts.ellipsis:Ts.pointerSmall),bq=(t,e)=>Ao.gray(t?e?Ts.pointerSmall:"+":Ts.line);vw.exports={styles:i_,render:xq,symbols:_u,symbol:vq,delimiter:Eq,item:bq};});var Tw=z((nne,bw)=>{var Tq=Sc();bw.exports=function(t,e){let r=String(Tq(t)||"").split(/\r?\n/);return e?r.map(i=>Math.ceil(i.length/e)).reduce((i,n)=>i+n):r.length};});var Aw=z((sne,Cw)=>{Cw.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return (t||"").split(/\r?\n/g).map(n=>n.split(/\s+/g).reduce((o,s)=>(s.length+r.length>=i||o[o.length-1].length+s.length+1<i?o[o.length-1]+=` ${s}`:o.push(`${r}${s}`),o),[r]).join(`
|
|
342
|
+
`)).join(`
|
|
343
|
+
`)};});var Dw=z((one,ww)=>{ww.exports=(t,e,r)=>{r=r||e;let i=Math.min(e-r,t-Math.floor(r/2));i<0&&(i=0);let n=Math.min(i+r,e);return {startIndex:i,endIndex:n}};});var Gr=z((ane,Sw)=>{Sw.exports={action:cw(),clear:yw(),style:Ew(),strip:Sc(),figures:r_(),lines:Tw(),wrap:Aw(),entriesToDisplay:Dw()};});var Di=z((une,Ow)=>{var Rw=me("readline"),Cq=Gr(),Aq=Cq.action,wq=me("events"),Nw=Ft(),Dq=Nw.beep,Sq=Nw.cursor,Rq=Nt(),n_=class extends wq{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=Rw.createInterface({input:this.in,escapeCodeTimeout:50});Rw.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(o,s)=>{let a=Aq(s,i);a===!1?this._&&this._(o,s):typeof this[a]=="function"?this[a](s):this.bell();};this.close=()=>{this.out.write(Sq.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0;},this.in.on("keypress",n);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(Dq);}render(){this.onRender(Rq),this.firstRender&&(this.firstRender=!1);}};Ow.exports=n_;});var kw=z((lne,Iw)=>{function Fw(t,e,r,i,n,o,s){try{var a=t[o](s),u=a.value;}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(i,n);}function Lw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var o=t.apply(e,r);function s(u){Fw(o,i,n,s,a,"next",u);}function a(u){Fw(o,i,n,s,a,"throw",u);}s(void 0);})}}var Rc=Nt(),Nq=Di(),Pw=Ft(),Oq=Pw.erase,gu=Pw.cursor,Nc=Gr(),s_=Nc.style,o_=Nc.clear,Fq=Nc.lines,Lq=Nc.figures,a_=class extends Nq{constructor(e={}){super(e),this.transform=s_.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=o_("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Rc.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
344
|
+
`),this.close();}validate(){var e=this;return Lw(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r;})()}submit(){var e=this;return Lw(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
|
|
345
|
+
`),e.close();})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let i=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.value=`${i}${e}${n}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(gu.down(Fq(this.outputError,this.out.columns)-1)+o_(this.outputError,this.out.columns)),this.out.write(o_(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[s_.symbol(this.done,this.aborted),Rc.bold(this.msg),s_.delimiter(this.done),this.red?Rc.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
346
|
+
`).reduce((e,r,i)=>e+`
|
|
347
|
+
${i?" ":Lq.pointerSmall} ${Rc.red().italic(r)}`,"")),this.out.write(Oq.line+gu.to(0)+this.outputText+gu.save+this.outputError+gu.restore+gu.move(this.cursorOffset,0)));}};Iw.exports=a_;});var Hw=z((hne,qw)=>{var Si=Nt(),Pq=Di(),yu=Gr(),Mw=yu.style,Bw=yu.clear,Oc=yu.figures,Iq=yu.wrap,kq=yu.entriesToDisplay,Mq=Ft(),Bq=Mq.cursor,u_=class extends Pq{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Bw("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
348
|
+
`),this.close();}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
349
|
+
`),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(Bq.hide):this.out.write(Bw(this.outputText,this.out.columns)),super.render();let e=kq(this.cursor,this.choices.length,this.optionsPerPage),r=e.startIndex,i=e.endIndex;if(this.outputText=[Mw.symbol(this.done,this.aborted),Si.bold(this.msg),Mw.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Si.yellow(this.warn):Si.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
350
|
+
`;for(let n=r;n<i;n++){let o,s,a="",u=this.choices[n];n===r&&r>0?s=Oc.arrowUp:n===i-1&&i<this.choices.length?s=Oc.arrowDown:s=" ",u.disabled?(o=this.cursor===n?Si.gray().underline(u.title):Si.strikethrough().gray(u.title),s=(this.cursor===n?Si.bold().gray(Oc.pointer)+" ":" ")+s):(o=this.cursor===n?Si.cyan().underline(u.title):u.title,s=(this.cursor===n?Si.cyan(Oc.pointer)+" ":" ")+s,u.description&&this.cursor===n&&(a=` - ${u.description}`,(s.length+o.length+a.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(a=`
|
|
351
|
+
`+Iq(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${o}${Si.gray(a)}
|
|
352
|
+
`;}}this.out.write(this.outputText);}};qw.exports=u_;});var Kw=z((cne,zw)=>{var Fc=Nt(),qq=Di(),Vw=Gr(),jw=Vw.style,Hq=Vw.clear,$w=Ft(),Uw=$w.cursor,jq=$w.erase,l_=class extends qq{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
353
|
+
`),this.close();}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
354
|
+
`),this.close();}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render();}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(Uw.hide):this.out.write(Hq(this.outputText,this.out.columns)),super.render(),this.outputText=[jw.symbol(this.done,this.aborted),Fc.bold(this.msg),jw.delimiter(this.done),this.value?this.inactive:Fc.cyan().underline(this.inactive),Fc.gray("/"),this.value?Fc.cyan().underline(this.active):this.active].join(" "),this.out.write(jq.line+Uw.to(0)+this.outputText));}};zw.exports=l_;});var oi=z((fne,Gw)=>{var h_=class t{constructor({token:e,date:r,parts:i,locales:n}){this.token=e,this.date=r||new Date,this.parts=i||[this],this.locales=n||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,i)=>i>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((i,n)=>n>r&&i instanceof t)}toString(){return String(this.date)}};Gw.exports=h_;});var Yw=z((dne,Ww)=>{var Uq=oi(),c_=class extends Uq{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};Ww.exports=c_;});var Xw=z((pne,Zw)=>{var Vq=oi(),$q=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),f_=class extends Vq{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+$q(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};Zw.exports=f_;});var Qw=z((mne,Jw)=>{var zq=oi(),d_=class extends zq{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Jw.exports=d_;});var tD=z((_ne,eD)=>{var Kq=oi(),p_=class extends Kq{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};eD.exports=p_;});var iD=z((gne,rD)=>{var Gq=oi(),m_=class extends Gq{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};rD.exports=m_;});var sD=z((yne,nD)=>{var Wq=oi(),__=class extends Wq{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};nD.exports=__;});var aD=z((xne,oD)=>{var Yq=oi(),g_=class extends Yq{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};oD.exports=g_;});var lD=z((vne,uD)=>{var Zq=oi(),y_=class extends Zq{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};uD.exports=y_;});var cD=z((Ene,hD)=>{hD.exports={DatePart:oi(),Meridiem:Yw(),Day:Xw(),Hours:Qw(),Milliseconds:tD(),Minutes:iD(),Month:sD(),Seconds:aD(),Year:lD()};});var ED=z((bne,vD)=>{function fD(t,e,r,i,n,o,s){try{var a=t[o](s),u=a.value;}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(i,n);}function dD(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var o=t.apply(e,r);function s(u){fD(o,i,n,s,a,"next",u);}function a(u){fD(o,i,n,s,a,"throw",u);}s(void 0);})}}var x_=Nt(),Xq=Di(),E_=Gr(),pD=E_.style,mD=E_.clear,Jq=E_.figures,xD=Ft(),Qq=xD.erase,_D=xD.cursor,Ri=cD(),gD=Ri.DatePart,eH=Ri.Meridiem,tH=Ri.Day,rH=Ri.Hours,iH=Ri.Milliseconds,nH=Ri.Minutes,sH=Ri.Month,oH=Ri.Seconds,aH=Ri.Year,uH=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,yD={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new tH(t),3:t=>new sH(t),4:t=>new aH(t),5:t=>new eH(t),6:t=>new rH(t),7:t=>new nH(t),8:t=>new oH(t),9:t=>new iH(t)},lH={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},v_=class extends Xq{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(lH,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=mD("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=uH.exec(e);){let n=r.shift(),o=r.findIndex(s=>s!=null);this.parts.push(o in yD?yD[o]({token:r[o]||n,date:this.date,parts:this.parts,locales:this.locales}):r[o]||n);}let i=this.parts.reduce((n,o)=>(typeof o=="string"&&typeof n[n.length-1]=="string"?n[n.length-1]+=o:n.push(o),n),[]);this.parts.splice(0),this.parts.push(...i),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof gD)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
355
|
+
`),this.close();}validate(){var e=this;return dD(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r;})()}submit(){var e=this;return dD(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
|
|
356
|
+
`),e.close();})()}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof gD)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(_D.hide):this.out.write(mD(this.outputText,this.out.columns)),super.render(),this.outputText=[pD.symbol(this.done,this.aborted),x_.bold(this.msg),pD.delimiter(!1),this.parts.reduce((e,r,i)=>e.concat(i===this.cursor&&!this.done?x_.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
|
|
357
|
+
`).reduce((e,r,i)=>e+`
|
|
358
|
+
${i?" ":Jq.pointerSmall} ${x_.red().italic(r)}`,"")),this.out.write(Qq.line+_D.to(0)+this.outputText));}};vD.exports=v_;});var SD=z((Tne,DD)=>{function bD(t,e,r,i,n,o,s){try{var a=t[o](s),u=a.value;}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(i,n);}function TD(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var o=t.apply(e,r);function s(u){bD(o,i,n,s,a,"next",u);}function a(u){bD(o,i,n,s,a,"throw",u);}s(void 0);})}}var Lc=Nt(),hH=Di(),wD=Ft(),Pc=wD.cursor,cH=wD.erase,Ic=Gr(),b_=Ic.style,fH=Ic.figures,CD=Ic.clear,dH=Ic.lines,pH=/[0-9]/,T_=t=>t!==void 0,AD=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},C_=class extends hH{constructor(e={}){super(e),this.transform=b_.render(e.style),this.msg=e.message,this.initial=T_(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=T_(e.min)?e.min:-1/0,this.max=T_(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=Lc.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${AD(e,this.round)}`),this._value=AD(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||pH.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
359
|
+
`),this.close();}validate(){var e=this;return TD(function*(){let r=yield e.validator(e.value);typeof r=="string"&&(e.errorMsg=r,r=!1),e.error=!r;})()}submit(){var e=this;return TD(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let r=e.value;e.value=r!==""?r:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
|
|
360
|
+
`),e.close();})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=i,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Pc.down(dH(this.outputError,this.out.columns)-1)+CD(this.outputError,this.out.columns)),this.out.write(CD(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[b_.symbol(this.done,this.aborted),Lc.bold(this.msg),b_.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Lc[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
361
|
+
`).reduce((e,r,i)=>e+`
|
|
362
|
+
${i?" ":fH.pointerSmall} ${Lc.red().italic(r)}`,"")),this.out.write(cH.line+Pc.to(0)+this.outputText+Pc.save+this.outputError+Pc.restore));}};DD.exports=C_;});var w_=z((Cne,OD)=>{var ai=Nt(),mH=Ft(),_H=mH.cursor,gH=Di(),xu=Gr(),RD=xu.clear,xn=xu.figures,ND=xu.style,yH=xu.wrap,xH=xu.entriesToDisplay,A_=class extends gH{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=RD("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
363
|
+
`),this.close();}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
364
|
+
`),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=!1,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render();}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render();}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
365
|
+
Instructions:
|
|
366
|
+
${xn.arrowUp}/${xn.arrowDown}: Highlight option
|
|
367
|
+
${xn.arrowLeft}/${xn.arrowRight}/[space]: Toggle selection
|
|
368
|
+
`+(this.maxChoices===void 0?` a: Toggle all
|
|
369
|
+
`:"")+" enter/return: Complete answer":""}renderOption(e,r,i,n){let o=(r.selected?ai.green(xn.radioOn):xn.radioOff)+" "+n+" ",s,a;return r.disabled?s=e===i?ai.gray().underline(r.title):ai.strikethrough().gray(r.title):(s=e===i?ai.cyan().underline(r.title):r.title,e===i&&r.description&&(a=` - ${r.description}`,(o.length+s.length+a.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(a=`
|
|
370
|
+
`+yH(r.description,{margin:o.length,width:this.out.columns})))),o+s+ai.gray(a||"")}paginateOptions(e){if(e.length===0)return ai.red("No matches for this query.");let r=xH(this.cursor,e.length,this.optionsPerPage),i=r.startIndex,n=r.endIndex,o,s=[];for(let a=i;a<n;a++)a===i&&i>0?o=xn.arrowUp:a===n-1&&n<e.length?o=xn.arrowDown:o=" ",s.push(this.renderOption(this.cursor,e[a],a,o));return `
|
|
371
|
+
`+s.join(`
|
|
372
|
+
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[ai.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(ai.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(_H.hide),super.render();let e=[ND.symbol(this.done,this.aborted),ai.bold(this.msg),ND.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=ai.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=RD(e,this.out.columns);}};OD.exports=A_;});var BD=z((Ane,MD)=>{function FD(t,e,r,i,n,o,s){try{var a=t[o](s),u=a.value;}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(i,n);}function vH(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var o=t.apply(e,r);function s(u){FD(o,i,n,s,a,"next",u);}function a(u){FD(o,i,n,s,a,"throw",u);}s(void 0);})}}var vu=Nt(),EH=Di(),kD=Ft(),bH=kD.erase,LD=kD.cursor,Eu=Gr(),D_=Eu.style,PD=Eu.clear,S_=Eu.figures,TH=Eu.wrap,CH=Eu.entriesToDisplay,ID=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),AH=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),wH=(t,e)=>{let r=t.findIndex(i=>i.value===e||i.title===e);return r>-1?r:void 0},R_=class extends EH{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:wH(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=D_.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=PD("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=ID(this.suggestions,e):this.value=this.fallback.value,this.fire();}complete(e){var r=this;return vH(function*(){let i=r.completing=r.suggest(r.input,r.choices),n=yield i;if(r.completing!==i)return;r.suggestions=n.map((s,a,u)=>({title:AH(u,a),value:ID(u,a),description:s.description})),r.completing=!1;let o=Math.max(n.length-1,0);r.moveSelect(Math.min(o,r.select)),e&&e();})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
373
|
+
`),this.close());}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
374
|
+
`),this.close();}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
375
|
+
`),this.close();}_(e,r){let i=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor);this.input=`${i}${e}${n}`,this.cursor=i.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,i,n){let o,s=i?S_.arrowUp:n?S_.arrowDown:" ",a=r?vu.cyan().underline(e.title):e.title;return s=(r?vu.cyan(S_.pointer)+" ":" ")+s,e.description&&(o=` - ${e.description}`,(s.length+a.length+o.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(o=`
|
|
376
|
+
`+TH(e.description,{margin:3,width:this.out.columns}))),s+" "+a+vu.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(LD.hide):this.out.write(PD(this.outputText,this.out.columns)),super.render();let e=CH(this.select,this.choices.length,this.limit),r=e.startIndex,i=e.endIndex;if(this.outputText=[D_.symbol(this.done,this.aborted,this.exited),vu.bold(this.msg),D_.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let n=this.suggestions.slice(r,i).map((o,s)=>this.renderOption(o,this.select===s+r,s===0&&r>0,s+r===i-1&&i<this.choices.length)).join(`
|
|
377
|
+
`);this.outputText+=`
|
|
378
|
+
`+(n||vu.gray(this.fallback.title));}this.out.write(bH.line+LD.to(0)+this.outputText);}};MD.exports=R_;});var UD=z((wne,jD)=>{var Ni=Nt(),DH=Ft(),SH=DH.cursor,RH=w_(),O_=Gr(),qD=O_.clear,HD=O_.style,wo=O_.figures,N_=class extends RH{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=qD("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=!1,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let r=this.filteredOptions.findIndex(i=>i===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
379
|
+
Instructions:
|
|
380
|
+
${wo.arrowUp}/${wo.arrowDown}: Highlight option
|
|
381
|
+
${wo.arrowLeft}/${wo.arrowRight}/[space]: Toggle selection
|
|
382
|
+
[a,b,c]/delete: Filter choices
|
|
383
|
+
enter/return: Complete answer
|
|
384
|
+
`:""}renderCurrentInput(){return `
|
|
385
|
+
Filtered results for: ${this.inputValue?this.inputValue:Ni.gray("Enter something to filter")}
|
|
386
|
+
`}renderOption(e,r,i){let n;return r.disabled?n=e===i?Ni.gray().underline(r.title):Ni.strikethrough().gray(r.title):n=e===i?Ni.cyan().underline(r.title):r.title,(r.selected?Ni.green(wo.radioOn):wo.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[Ni.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(Ni.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(SH.hide),super.render();let e=[HD.symbol(this.done,this.aborted),Ni.bold(this.msg),HD.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Ni.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=qD(e,this.out.columns);}};jD.exports=N_;});var YD=z((Dne,WD)=>{var VD=Nt(),NH=Di(),KD=Gr(),$D=KD.style,OH=KD.clear,GD=Ft(),FH=GD.erase,zD=GD.cursor,F_=class extends NH{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
387
|
+
`),this.close();}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
388
|
+
`),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(zD.hide):this.out.write(OH(this.outputText,this.out.columns)),super.render(),this.outputText=[$D.symbol(this.done,this.aborted),VD.bold(this.msg),$D.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:VD.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(FH.line+zD.to(0)+this.outputText));}};WD.exports=F_;});var XD=z((Sne,ZD)=>{ZD.exports={TextPrompt:kw(),SelectPrompt:Hw(),TogglePrompt:Kw(),DatePrompt:ED(),NumberPrompt:SD(),MultiselectPrompt:w_(),AutocompletePrompt:BD(),AutocompleteMultiselectPrompt:UD(),ConfirmPrompt:YD()};});var QD=z(JD=>{var yr=JD,LH=XD(),kc=t=>t;function ui(t,e,r={}){return new Promise((i,n)=>{let o=new LH[t](e),s=r.onAbort||kc,a=r.onSubmit||kc,u=r.onExit||kc;o.on("state",e.onState||kc),o.on("submit",l=>i(a(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>n(s(l)));})}yr.text=t=>ui("TextPrompt",t);yr.password=t=>(t.style="password",yr.text(t));yr.invisible=t=>(t.style="invisible",yr.text(t));yr.number=t=>ui("NumberPrompt",t);yr.date=t=>ui("DatePrompt",t);yr.confirm=t=>ui("ConfirmPrompt",t);yr.list=t=>{let e=t.separator||",";return ui("TextPrompt",t,{onSubmit:r=>r.split(e).map(i=>i.trim())})};yr.toggle=t=>ui("TogglePrompt",t);yr.select=t=>ui("SelectPrompt",t);yr.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return ui("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};yr.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return ui("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var PH=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));yr.autocomplete=t=>(t.suggest=t.suggest||PH,t.choices=[].concat(t.choices||[]),ui("AutocompletePrompt",t));});var aS=z((Nne,oS)=>{function eS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i);}return r}function tS(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eS(Object(r),!0).forEach(function(i){IH(t,i,r[i]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i));});}return t}function IH(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kH(t,e){var r=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=MH(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,n=function(){};return {s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
389
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return {s:function(){r=r.call(t);},n:function(){var l=r.next();return o=l.done,l},e:function(l){s=!0,a=l;},f:function(){try{!o&&r.return!=null&&r.return();}finally{if(s)throw a}}}}function MH(t,e){if(t){if(typeof t=="string")return rS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rS(t,e)}}function rS(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function iS(t,e,r,i,n,o,s){try{var a=t[o](s),u=a.value;}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(i,n);}function nS(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var o=t.apply(e,r);function s(u){iS(o,i,n,s,a,"next",u);}function a(u){iS(o,i,n,s,a,"throw",u);}s(void 0);})}}var L_=QD(),BH=["suggest","format","onState","validate","onRender","type"],sS=()=>{};function vn(){return P_.apply(this,arguments)}function P_(){return P_=nS(function*(t=[],{onSubmit:e=sS,onCancel:r=sS}={}){let i={},n=vn._override||{};t=[].concat(t);let o,s,a,u,l,h,c=function(){var x=nS(function*(v,g,b=!1){if(!(!b&&v.validate&&v.validate(g)!==!0))return v.format?yield v.format(g,i):g});return function(g,b){return x.apply(this,arguments)}}();var p=kH(t),f;try{for(p.s();!(f=p.n()).done;){s=f.value;var m=s;if(u=m.name,l=m.type,typeof l=="function"&&(l=yield l(o,tS({},i),s),s.type=l),!!l){for(let x in s){if(BH.includes(x))continue;let v=s[x];s[x]=typeof v=="function"?yield v(o,tS({},i),h):v;}if(h=s,typeof s.message!="string")throw new Error("prompt message is required");var _=s;if(u=_.name,l=_.type,L_[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(n[s.name]!==void 0&&(o=yield c(s,n[s.name]),o!==void 0)){i[u]=o;continue}try{o=vn._injected?qH(vn._injected,s.initial):yield L_[l](s),i[u]=o=yield c(s,o,!0),a=yield e(s,o,i);}catch(x){a=!(yield r(s,i));}if(a)return i}}}catch(x){p.e(x);}finally{p.f();}return i}),P_.apply(this,arguments)}function qH(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function HH(t){vn._injected=(vn._injected||[]).concat(t);}function jH(t){vn._override=Object.assign({},t);}oS.exports=Object.assign(vn,{prompt:vn,prompts:L_,inject:HH,override:jH});});var lS=z((One,uS)=>{uS.exports=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return "first";if(t.name==="c"||t.name==="d")return "abort";if(t.name==="e")return "last";if(t.name==="g")return "reset"}if(e){if(t.name==="j")return "down";if(t.name==="k")return "up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}};});var Mc=z((Fne,hS)=>{hS.exports=t=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};});var dS=z((Lne,fS)=>{var UH=Mc(),{erase:cS,cursor:VH}=Ft(),$H=t=>[...UH(t)].length;fS.exports=function(t,e){if(!e)return cS.line+VH.to(0);let r=0,i=t.split(/\r?\n/);for(let n of i)r+=1+Math.floor(Math.max($H(n)-1,0)/e);return cS.lines(r)};});var I_=z((Pne,pS)=>{var bu={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},zH={arrowUp:bu.arrowUp,arrowDown:bu.arrowDown,arrowLeft:bu.arrowLeft,arrowRight:bu.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},KH=process.platform==="win32"?zH:bu;pS.exports=KH;});var _S=z((Ine,mS)=>{var Do=Nt(),Cs=I_(),k_=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),GH=t=>k_[t]||k_.default,Tu=Object.freeze({aborted:Do.red(Cs.cross),done:Do.green(Cs.tick),exited:Do.yellow(Cs.cross),default:Do.cyan("?")}),WH=(t,e,r)=>e?Tu.aborted:r?Tu.exited:t?Tu.done:Tu.default,YH=t=>Do.gray(t?Cs.ellipsis:Cs.pointerSmall),ZH=(t,e)=>Do.gray(t?e?Cs.pointerSmall:"+":Cs.line);mS.exports={styles:k_,render:GH,symbols:Tu,symbol:WH,delimiter:YH,item:ZH};});var yS=z((kne,gS)=>{var XH=Mc();gS.exports=function(t,e){let r=String(XH(t)||"").split(/\r?\n/);return e?r.map(i=>Math.ceil(i.length/e)).reduce((i,n)=>i+n):r.length};});var vS=z((Mne,xS)=>{xS.exports=(t,e={})=>{let r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return (t||"").split(/\r?\n/g).map(n=>n.split(/\s+/g).reduce((o,s)=>(s.length+r.length>=i||o[o.length-1].length+s.length+1<i?o[o.length-1]+=` ${s}`:o.push(`${r}${s}`),o),[r]).join(`
|
|
390
|
+
`)).join(`
|
|
391
|
+
`)};});var bS=z((Bne,ES)=>{ES.exports=(t,e,r)=>{r=r||e;let i=Math.min(e-r,t-Math.floor(r/2));i<0&&(i=0);let n=Math.min(i+r,e);return {startIndex:i,endIndex:n}};});var Wr=z((qne,TS)=>{TS.exports={action:lS(),clear:dS(),style:_S(),strip:Mc(),figures:I_(),lines:yS(),wrap:vS(),entriesToDisplay:bS()};});var Oi=z((Hne,AS)=>{var CS=me("readline"),{action:JH}=Wr(),QH=me("events"),{beep:ej,cursor:tj}=Ft(),rj=Nt(),M_=class extends QH{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let r=CS.createInterface({input:this.in,escapeCodeTimeout:50});CS.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(o,s)=>{let a=JH(s,i);a===!1?this._&&this._(o,s):typeof this[a]=="function"?this[a](s):this.bell();};this.close=()=>{this.out.write(tj.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0;},this.in.on("keypress",n);}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited});}bell(){this.out.write(ej);}render(){this.onRender(rj),this.firstRender&&(this.firstRender=!1);}};AS.exports=M_;});var DS=z((jne,wS)=>{var Bc=Nt(),ij=Oi(),{erase:nj,cursor:Cu}=Ft(),{style:B_,clear:q_,lines:sj,figures:oj}=Wr(),H_=class extends ij{constructor(e={}){super(e),this.transform=B_.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=q_("",this.out.columns),this.render();}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Bc.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire();}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render();}exit(){this.abort();}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
392
|
+
`),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e;}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
393
|
+
`),this.close();}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render();}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e);}_(e,r){let i=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor);this.value=`${i}${e}${n}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render();}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render();}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length,this.render();}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render();}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render();}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Cu.down(sj(this.outputError,this.out.columns)-1)+q_(this.outputError,this.out.columns)),this.out.write(q_(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[B_.symbol(this.done,this.aborted),Bc.bold(this.msg),B_.delimiter(this.done),this.red?Bc.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
394
|
+
`).reduce((e,r,i)=>e+`
|
|
395
|
+
${i?" ":oj.pointerSmall} ${Bc.red().italic(r)}`,"")),this.out.write(nj.line+Cu.to(0)+this.outputText+Cu.save+this.outputError+Cu.restore+Cu.move(this.cursorOffset,0)));}};wS.exports=H_;});var OS=z((Une,NS)=>{var Fi=Nt(),aj=Oi(),{style:SS,clear:RS,figures:qc,wrap:uj,entriesToDisplay:lj}=Wr(),{cursor:hj}=Ft(),j_=class extends aj{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?i:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=RS("",this.out.columns),this.render();}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire();}reset(){this.moveCursor(0),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
396
|
+
`),this.close();}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
397
|
+
`),this.close());}first(){this.moveCursor(0),this.render();}last(){this.moveCursor(this.choices.length-1),this.render();}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render();}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render();}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render();}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(hj.hide):this.out.write(RS(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=lj(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[SS.symbol(this.done,this.aborted),Fi.bold(this.msg),SS.delimiter(!1),this.done?this.selection.title:this.selection.disabled?Fi.yellow(this.warn):Fi.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
398
|
+
`;for(let i=e;i<r;i++){let n,o,s="",a=this.choices[i];i===e&&e>0?o=qc.arrowUp:i===r-1&&r<this.choices.length?o=qc.arrowDown:o=" ",a.disabled?(n=this.cursor===i?Fi.gray().underline(a.title):Fi.strikethrough().gray(a.title),o=(this.cursor===i?Fi.bold().gray(qc.pointer)+" ":" ")+o):(n=this.cursor===i?Fi.cyan().underline(a.title):a.title,o=(this.cursor===i?Fi.cyan(qc.pointer)+" ":" ")+o,a.description&&this.cursor===i&&(s=` - ${a.description}`,(o.length+n.length+s.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(s=`
|
|
399
|
+
`+uj(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${Fi.gray(s)}
|
|
400
|
+
`;}}this.out.write(this.outputText);}};NS.exports=j_;});var IS=z((Vne,PS)=>{var Hc=Nt(),cj=Oi(),{style:FS,clear:fj}=Wr(),{cursor:LS,erase:dj}=Ft(),U_=class extends cj{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
401
|
+
`),this.close();}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
402
|
+
`),this.close();}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render();}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render();}delete(){this.deactivate();}left(){this.deactivate();}right(){this.activate();}down(){this.deactivate();}up(){this.activate();}next(){this.value=!this.value,this.fire(),this.render();}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render();}render(){this.closed||(this.firstRender?this.out.write(LS.hide):this.out.write(fj(this.outputText,this.out.columns)),super.render(),this.outputText=[FS.symbol(this.done,this.aborted),Hc.bold(this.msg),FS.delimiter(this.done),this.value?this.inactive:Hc.cyan().underline(this.inactive),Hc.gray("/"),this.value?Hc.cyan().underline(this.active):this.active].join(" "),this.out.write(dj.line+LS.to(0)+this.outputText));}};PS.exports=U_;});var li=z(($ne,kS)=>{var V_=class t{constructor({token:e,date:r,parts:i,locales:n}){this.token=e,this.date=r||new Date,this.parts=i||[this],this.locales=n||{};}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((r,i)=>i>e&&r instanceof t)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),r=e.indexOf(this);return e.find((i,n)=>n>r&&i instanceof t)}toString(){return String(this.date)}};kS.exports=V_;});var BS=z((zne,MS)=>{var pj=li(),$_=class extends pj{constructor(e={}){super(e);}up(){this.date.setHours((this.date.getHours()+12)%24);}down(){this.up();}toString(){let e=this.date.getHours()>12?"pm":"am";return /\A/.test(this.token)?e.toUpperCase():e}};MS.exports=$_;});var HS=z((Kne,qS)=>{var mj=li(),_j=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th"),z_=class extends mj{constructor(e={}){super(e);}up(){this.date.setDate(this.date.getDate()+1);}down(){this.date.setDate(this.date.getDate()-1);}setTo(e){this.date.setDate(parseInt(e.substr(-2)));}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+_j(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};qS.exports=z_;});var US=z((Gne,jS)=>{var gj=li(),K_=class extends gj{constructor(e={}){super(e);}up(){this.date.setHours(this.date.getHours()+1);}down(){this.date.setHours(this.date.getHours()-1);}setTo(e){this.date.setHours(parseInt(e.substr(-2)));}toString(){let e=this.date.getHours();return /h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};jS.exports=K_;});var $S=z((Wne,VS)=>{var yj=li(),G_=class extends yj{constructor(e={}){super(e);}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1);}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1);}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)));}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};VS.exports=G_;});var KS=z((Yne,zS)=>{var xj=li(),W_=class extends xj{constructor(e={}){super(e);}up(){this.date.setMinutes(this.date.getMinutes()+1);}down(){this.date.setMinutes(this.date.getMinutes()-1);}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)));}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};zS.exports=W_;});var WS=z((Zne,GS)=>{var vj=li(),Y_=class extends vj{constructor(e={}){super(e);}up(){this.date.setMonth(this.date.getMonth()+1);}down(){this.date.setMonth(this.date.getMonth()-1);}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e);}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};GS.exports=Y_;});var ZS=z((Xne,YS)=>{var Ej=li(),Z_=class extends Ej{constructor(e={}){super(e);}up(){this.date.setSeconds(this.date.getSeconds()+1);}down(){this.date.setSeconds(this.date.getSeconds()-1);}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)));}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};YS.exports=Z_;});var JS=z((Jne,XS)=>{var bj=li(),X_=class extends bj{constructor(e={}){super(e);}up(){this.date.setFullYear(this.date.getFullYear()+1);}down(){this.date.setFullYear(this.date.getFullYear()-1);}setTo(e){this.date.setFullYear(e.substr(-4));}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};XS.exports=X_;});var eR=z((Qne,QS)=>{QS.exports={DatePart:li(),Meridiem:BS(),Day:HS(),Hours:US(),Milliseconds:$S(),Minutes:KS(),Month:WS(),Seconds:ZS(),Year:JS()};});var aR=z((ese,oR)=>{var J_=Nt(),Tj=Oi(),{style:tR,clear:rR,figures:Cj}=Wr(),{erase:Aj,cursor:iR}=Ft(),{DatePart:nR,Meridiem:wj,Day:Dj,Hours:Sj,Milliseconds:Rj,Minutes:Nj,Month:Oj,Seconds:Fj,Year:Lj}=eR(),Pj=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,sR={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new Dj(t),3:t=>new Oj(t),4:t=>new Lj(t),5:t=>new wj(t),6:t=>new Sj(t),7:t=>new Nj(t),8:t=>new Fj(t),9:t=>new Rj(t)},Ij={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Q_=class extends Tj{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(Ij,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=rR("",this.out.columns),this.render();}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime());}set mask(e){let r;for(this.parts=[];r=Pj.exec(e);){let n=r.shift(),o=r.findIndex(s=>s!=null);this.parts.push(o in sR?sR[o]({token:r[o]||n,date:this.date,parts:this.parts,locales:this.locales}):r[o]||n);}let i=this.parts.reduce((n,o)=>(typeof o=="string"&&typeof n[n.length-1]=="string"?n[n.length-1]+=o:n.push(o),n),[]);this.parts.splice(0),this.parts.push(...i),this.reset();}moveCursor(e){this.typed="",this.cursor=e,this.fire();}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof nR)),this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
403
|
+
`),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
404
|
+
`),this.close();}up(){this.typed="",this.parts[this.cursor].up(),this.render();}down(){this.typed="",this.parts[this.cursor].down(),this.render();}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render();}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof nR)),this.render();}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render());}render(){this.closed||(this.firstRender?this.out.write(iR.hide):this.out.write(rR(this.outputText,this.out.columns)),super.render(),this.outputText=[tR.symbol(this.done,this.aborted),J_.bold(this.msg),tR.delimiter(!1),this.parts.reduce((e,r,i)=>e.concat(i===this.cursor&&!this.done?J_.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
|
|
405
|
+
`).reduce((e,r,i)=>e+`
|
|
406
|
+
${i?" ":Cj.pointerSmall} ${J_.red().italic(r)}`,"")),this.out.write(Aj.line+iR.to(0)+this.outputText));}};oR.exports=Q_;});var cR=z((tse,hR)=>{var jc=Nt(),kj=Oi(),{cursor:Uc,erase:Mj}=Ft(),{style:eg,figures:Bj,clear:uR,lines:qj}=Wr(),Hj=/[0-9]/,tg=t=>t!==void 0,lR=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},rg=class extends kj{constructor(e={}){super(e),this.transform=eg.render(e.style),this.msg=e.message,this.initial=tg(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=tg(e.min)?e.min:-1/0,this.max=tg(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render();}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=jc.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${lR(e,this.round)}`),this._value=lR(e,this.round)),this.fire();}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||Hj.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render();}exit(){this.abort();}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
407
|
+
`),this.close();}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e;}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
408
|
+
`),this.close();}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render();}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render();}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render();}next(){this.value=this.initial,this.fire(),this.render();}_(e,r){if(!this.valid(e))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=i,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render();}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Uc.down(qj(this.outputError,this.out.columns)-1)+uR(this.outputError,this.out.columns)),this.out.write(uR(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[eg.symbol(this.done,this.aborted),jc.bold(this.msg),eg.delimiter(this.done),!this.done||!this.done&&!this.placeholder?jc[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
409
|
+
`).reduce((e,r,i)=>e+`
|
|
410
|
+
${i?" ":Bj.pointerSmall} ${jc.red().italic(r)}`,"")),this.out.write(Mj.line+Uc.to(0)+this.outputText+Uc.save+this.outputError+Uc.restore));}};hR.exports=rg;});var ng=z((rse,pR)=>{var hi=Nt(),{cursor:jj}=Ft(),Uj=Oi(),{clear:fR,figures:En,style:dR,wrap:Vj,entriesToDisplay:$j}=Wr(),ig=class extends Uj{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,i)=>(typeof r=="string"&&(r={title:r,value:i}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?i:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=fR("",this.out.columns),e.overrideRender||this.render();}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render();}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
411
|
+
`),this.close();}submit(){let e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
412
|
+
`),this.close());}first(){this.cursor=0,this.render();}last(){this.cursor=this.value.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.value.length,this.render();}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render();}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.value[this.cursor].selected=!1,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render();}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render();}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render();}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
413
|
+
Instructions:
|
|
414
|
+
${En.arrowUp}/${En.arrowDown}: Highlight option
|
|
415
|
+
${En.arrowLeft}/${En.arrowRight}/[space]: Toggle selection
|
|
416
|
+
`+(this.maxChoices===void 0?` a: Toggle all
|
|
417
|
+
`:"")+" enter/return: Complete answer":""}renderOption(e,r,i,n){let o=(r.selected?hi.green(En.radioOn):En.radioOff)+" "+n+" ",s,a;return r.disabled?s=e===i?hi.gray().underline(r.title):hi.strikethrough().gray(r.title):(s=e===i?hi.cyan().underline(r.title):r.title,e===i&&r.description&&(a=` - ${r.description}`,(o.length+s.length+a.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(a=`
|
|
418
|
+
`+Vj(r.description,{margin:o.length,width:this.out.columns})))),o+s+hi.gray(a||"")}paginateOptions(e){if(e.length===0)return hi.red("No matches for this query.");let{startIndex:r,endIndex:i}=$j(this.cursor,e.length,this.optionsPerPage),n,o=[];for(let s=r;s<i;s++)s===r&&r>0?n=En.arrowUp:s===i-1&&i<e.length?n=En.arrowDown:n=" ",o.push(this.renderOption(this.cursor,e[s],s,n));return `
|
|
419
|
+
`+o.join(`
|
|
420
|
+
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[hi.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(hi.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(jj.hide),super.render();let e=[dR.symbol(this.done,this.aborted),hi.bold(this.msg),dR.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=hi.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=fR(e,this.out.columns);}};pR.exports=ig;});var xR=z((ise,yR)=>{var Au=Nt(),zj=Oi(),{erase:Kj,cursor:mR}=Ft(),{style:sg,clear:_R,figures:og,wrap:Gj,entriesToDisplay:Wj}=Wr(),gR=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),Yj=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),Zj=(t,e)=>{let r=t.findIndex(i=>i.value===e||i.title===e);return r>-1?r:void 0},ag=class extends zj{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Zj(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=sg.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=_R("",this.out.columns),this.complete(this.render),this.render();}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e;}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=gR(this.suggestions,e):this.value=this.fallback.value,this.fire();}async complete(e){let r=this.completing=this.suggest(this.input,this.choices),i=await r;if(this.completing!==r)return;this.suggestions=i.map((o,s,a)=>({title:Yj(a,s),value:gR(a,s),description:o.description})),this.completing=!1;let n=Math.max(i.length-1,0);this.moveSelect(Math.min(n,this.select)),e&&e();}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render();}),this.render();}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
421
|
+
`),this.close());}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
422
|
+
`),this.close();}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
423
|
+
`),this.close();}_(e,r){let i=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor);this.input=`${i}${e}${n}`,this.cursor=i.length+1,this.complete(this.render),this.render();}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render();}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render();}first(){this.moveSelect(0),this.render();}last(){this.moveSelect(this.suggestions.length-1),this.render();}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render();}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render();}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render();}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render();}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render();}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render();}renderOption(e,r,i,n){let o,s=i?og.arrowUp:n?og.arrowDown:" ",a=r?Au.cyan().underline(e.title):e.title;return s=(r?Au.cyan(og.pointer)+" ":" ")+s,e.description&&(o=` - ${e.description}`,(s.length+a.length+o.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(o=`
|
|
424
|
+
`+Gj(e.description,{margin:3,width:this.out.columns}))),s+" "+a+Au.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(mR.hide):this.out.write(_R(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=Wj(this.select,this.choices.length,this.limit);if(this.outputText=[sg.symbol(this.done,this.aborted,this.exited),Au.bold(this.msg),sg.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(e,r).map((n,o)=>this.renderOption(n,this.select===o+e,o===0&&e>0,o+e===r-1&&r<this.choices.length)).join(`
|
|
425
|
+
`);this.outputText+=`
|
|
426
|
+
`+(i||Au.gray(this.fallback.title));}this.out.write(Kj.line+mR.to(0)+this.outputText);}};yR.exports=ag;});var TR=z((nse,bR)=>{var Li=Nt(),{cursor:Xj}=Ft(),Jj=ng(),{clear:vR,style:ER,figures:So}=Wr(),ug=class extends Jj{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=vR("",this.out.columns),this.filteredOptions=this.value,this.render();}last(){this.cursor=this.filteredOptions.length-1,this.render();}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render();}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render();}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render();}left(){this.filteredOptions[this.cursor].selected=!1,this.render();}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render();}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions());}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let r=this.filteredOptions.findIndex(i=>i===e);this.cursor=r<0?0:r,this.render();}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else {if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render();}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions();}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e);}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
427
|
+
Instructions:
|
|
428
|
+
${So.arrowUp}/${So.arrowDown}: Highlight option
|
|
429
|
+
${So.arrowLeft}/${So.arrowRight}/[space]: Toggle selection
|
|
430
|
+
[a,b,c]/delete: Filter choices
|
|
431
|
+
enter/return: Complete answer
|
|
432
|
+
`:""}renderCurrentInput(){return `
|
|
433
|
+
Filtered results for: ${this.inputValue?this.inputValue:Li.gray("Enter something to filter")}
|
|
434
|
+
`}renderOption(e,r,i){let n;return r.disabled?n=e===i?Li.gray().underline(r.title):Li.strikethrough().gray(r.title):n=e===i?Li.cyan().underline(r.title):r.title,(r.selected?Li.green(So.radioOn):So.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let e=[Li.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(Li.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Xj.hide),super.render();let e=[ER.symbol(this.done,this.aborted),Li.bold(this.msg),ER.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Li.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=vR(e,this.out.columns);}};bR.exports=ug;});var SR=z((sse,DR)=>{var CR=Nt(),Qj=Oi(),{style:AR,clear:eU}=Wr(),{erase:tU,cursor:wR}=Ft(),lg=class extends Qj{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render();}reset(){this.value=this.initialValue,this.fire(),this.render();}exit(){this.abort();}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
435
|
+
`),this.close();}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
436
|
+
`),this.close();}_(e,r){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(wR.hide):this.out.write(eU(this.outputText,this.out.columns)),super.render(),this.outputText=[AR.symbol(this.done,this.aborted),CR.bold(this.msg),AR.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:CR.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(tU.line+wR.to(0)+this.outputText));}};DR.exports=lg;});var NR=z((ose,RR)=>{RR.exports={TextPrompt:DS(),SelectPrompt:OS(),TogglePrompt:IS(),DatePrompt:aR(),NumberPrompt:cR(),MultiselectPrompt:ng(),AutocompletePrompt:xR(),AutocompleteMultiselectPrompt:TR(),ConfirmPrompt:SR()};});var FR=z(OR=>{var xr=OR,rU=NR(),Vc=t=>t;function ci(t,e,r={}){return new Promise((i,n)=>{let o=new rU[t](e),s=r.onAbort||Vc,a=r.onSubmit||Vc,u=r.onExit||Vc;o.on("state",e.onState||Vc),o.on("submit",l=>i(a(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>n(s(l)));})}xr.text=t=>ci("TextPrompt",t);xr.password=t=>(t.style="password",xr.text(t));xr.invisible=t=>(t.style="invisible",xr.text(t));xr.number=t=>ci("NumberPrompt",t);xr.date=t=>ci("DatePrompt",t);xr.confirm=t=>ci("ConfirmPrompt",t);xr.list=t=>{let e=t.separator||",";return ci("TextPrompt",t,{onSubmit:r=>r.split(e).map(i=>i.trim())})};xr.toggle=t=>ci("TogglePrompt",t);xr.select=t=>ci("SelectPrompt",t);xr.multiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return ci("MultiselectPrompt",t,{onAbort:e,onSubmit:e})};xr.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);let e=r=>r.filter(i=>i.selected).map(i=>i.value);return ci("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};var iU=(t,e)=>Promise.resolve(e.filter(r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase()));xr.autocomplete=t=>(t.suggest=t.suggest||iU,t.choices=[].concat(t.choices||[]),ci("AutocompletePrompt",t));});var IR=z((use,PR)=>{var hg=FR(),nU=["suggest","format","onState","validate","onRender","type"],LR=()=>{};async function bn(t=[],{onSubmit:e=LR,onCancel:r=LR}={}){let i={},n=bn._override||{};t=[].concat(t);let o,s,a,u,l,h,c=async(p,f,m=!1)=>{if(!(!m&&p.validate&&p.validate(f)!==!0))return p.format?await p.format(f,i):f};for(s of t)if({name:u,type:l}=s,typeof l=="function"&&(l=await l(o,{...i},s),s.type=l),!!l){for(let p in s){if(nU.includes(p))continue;let f=s[p];s[p]=typeof f=="function"?await f(o,{...i},h):f;}if(h=s,typeof s.message!="string")throw new Error("prompt message is required");if({name:u,type:l}=s,hg[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(n[s.name]!==void 0&&(o=await c(s,n[s.name]),o!==void 0)){i[u]=o;continue}try{o=bn._injected?sU(bn._injected,s.initial):await hg[l](s),i[u]=o=await c(s,o,!0),a=await e(s,o,i);}catch(p){a=!await r(s,i);}if(a)return i}return i}function sU(t,e){let r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function oU(t){bn._injected=(bn._injected||[]).concat(t);}function aU(t){bn._override=Object.assign({},t);}PR.exports=Object.assign(bn,{prompt:bn,prompts:hg,inject:oU,override:aU});});var MR=z((lse,kR)=>{function uU(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return !1;if(t[e]>r[e])return !0}return !1}kR.exports=uU("8.6.0")?aS():IR();});var Dg=$t(wg(),1),{program:bU,createCommand:TU,createArgument:CU,createOption:AU,CommanderError:wU,InvalidArgumentError:DU,InvalidOptionArgumentError:Sg,Command:Ru,Argument:SU,Option:Nn,Help:RU}=Dg.default;var Rg=t=>y4.get(t),Ng=t=>{try{let e=new URL(t);return !e.hostname.startsWith("api.")&&!e.hostname.startsWith("api-")?void 0:(e.hostname=e.hostname.replace(/^api[.-]/,""),e.pathname="/",e.toString())}catch(e){return}},Og=(t,e)=>{try{let r=new URL(t);return r.pathname=`/address/${e}`,r.toString()}catch(r){return}},y4=new Map([["avalanche","https://api.snowtrace.io/api"],["avalanche-mainnet","https://api.snowtrace.io/api"],["fuji","https://api-testnet.snowtrace.io/api"],["avalanche-testnet","https://api-testnet.snowtrace.io/api"],["arbitrum","https://api.arbiscan.io/api"],["arbitrum-goerli","https://api-goerli.arbiscan.io/api"],["bsc","https://api.bscscan.com/api"],["bsc-testnet","https://api-testnet.bscscan.com/api"],["ethereum","https://api.etherscan.io/api"],["ethereum-goerli","https://api-goerli.etherscan.io/api"],["goerli","https://api-goerli.etherscan.io/api"],["fantom","https://api.ftmscan.com/api"],["fantom-testnet","https://api-testnet.ftmscan.com/api"],["kava","https://kavascan.com/api"],["kava-mainnet","https://kavascan.com/api"],["kava-testnet","https://testnet.kavascan.com/api"],["polygon","https://api.polygonscan.com/api"],["mumbai","https://api-testnet.polygonscan.com/api"],["optimism","https://api-optimistic.etherscan.io/api"],["optimism-goerli","https://api-goerli-optimistic.etherscan.io/api"],["gnosis","https://api.gnosisscan.io/api"],["zkpolygon","https://api-zkevm.polygonscan.com/api"],["zkpolygon-mainnet","https://api-zkevm.polygonscan.com/api"],["base","https://api.basescan.org/api"],["base-mainnet","https://api.basescan.org/api"],["base-goerli","https://api-goerli.basescan.org/api"],["linea","https://api.lineascan.build/api"],["linea-mainnet","https://api.lineascan.build/api"],["zkconsensys","https://api.lineascan.build/api"],["zkconsensys-mainnet","https://api.lineascan.build/api"],["moonbeam","https://api-moonbeam.moonscan.io/api"],["moonbeam-testnet","https://api-moonbase.moonscan.io/api"]]);var vr=$t(Io()),Gt={default:vr.default.white,error:vr.default.red,success:vr.default.green,palette:[vr.default.magenta,vr.default.cyan,vr.default.yellow,vr.default.blue,vr.default.magentaBright,vr.default.cyanBright,vr.default.blueBright]},Rf=t=>{let e=Math.min(Math.max(0,t.length-2),4),r=t.length-e,i=t.slice(0,e),n=Array.from({length:r}).fill("*").join("");return `${i}${n}`},Nf=(t,e=" ")=>r=>{t.info(""),Object.entries(r).forEach(([i,n])=>{Array.isArray(n)?(t.info(`${i}:`),n.forEach(o=>{t.info(`${e} - ${vr.default.bold(l1(o))}`);})):t.info(`${i}:${e}${vr.default.bold(l1(n))}`);});},l1=t=>{if(t==null)return "-";switch(typeof t){case"boolean":return t?V4:$4;default:return String(t)}},V4=Gt.success`✓`,$4=Gt.error`⚠`;var Of=$t(Io()),Ff=(t,e)=>Object.entries(e!=null?e:{}).reduce((r,[i,n])=>{if(n==null)return r;let o=n.apiUrl||K4(i)||Rg(i);jE__default.default(o,Gt.error`Missing scan API URL for network ${Gt.default(i)}
|
|
437
|
+
|
|
438
|
+
Please provide the API URL:
|
|
439
|
+
|
|
440
|
+
- As an apiUrl config parameter in ${i} config
|
|
441
|
+
- As a SCAN_API_URL_${i} enviornment variable
|
|
442
|
+
- As a SCAN_API_URL_${Ns(i)} enviornment variable
|
|
443
|
+
`);let s=n.apiKey||W4(i);s||t.debug(`Could not find scan API key for network ${Of.default.bold(i)}
|
|
444
|
+
|
|
445
|
+
Please provide the API key:
|
|
446
|
+
|
|
447
|
+
- As an apiKey config parameter in ${i} config
|
|
448
|
+
- As a SCAN_API_KEY_${i} enviornment variable
|
|
449
|
+
- As a SCAN_API_KEY_${Ns(i)} enviornment variable`);let a=n.browserUrl||G4(i)||Ng(o);return a||t.debug(`Could not find scan browser URL key for network ${Of.default.bold(i)}
|
|
450
|
+
|
|
451
|
+
Browser URL is used to display a link to the verified contract
|
|
452
|
+
after successful verification.
|
|
453
|
+
|
|
454
|
+
Please provide the browser URL:
|
|
455
|
+
|
|
456
|
+
- As an browserUrl config parameter in ${i} config
|
|
457
|
+
- As a SCAN_BROWSER_URL_${i} enviornment variable
|
|
458
|
+
- As a SCAN_BROWSER_URL_${Ns(i)} enviornment variable`),{...r,[i]:{apiUrl:o,apiKey:s,browserUrl:a}}},{}),K4=t=>{var e,r;return ((e=process.env[`SCAN_API_URL_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_API_URL_${Ns(t)}`])==null?void 0:r.trim())},G4=t=>{var e,r;return ((e=process.env[`SCAN_BROWSER_URL_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_BROWSER_URL_${Ns(t)}`])==null?void 0:r.trim())},W4=t=>{var e,r;return ((e=process.env[`SCAN_API_KEY_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_API_KEY_${Ns(t)}`])==null?void 0:r.trim())},Ns=t=>t.toUpperCase().replaceAll("-","_");var Lf=(i=>(i[i.None=1]="None",i[i.Unlicense=2]="Unlicense",i[i.MIT=3]="MIT",i[i["GNU-GPLv2"]=4]="GNU-GPLv2",i[i["GNU-GPLv3"]=5]="GNU-GPLv3",i[i["GNU-LGPLv2.1"]=6]="GNU-LGPLv2.1",i[i["GNU-LGPLv3"]=7]="GNU-LGPLv3",i[i["BSD-2-Clause"]=8]="BSD-2-Clause",i[i["BSD-3-Clause"]=9]="BSD-3-Clause",i[i["MPL-2.0"]=10]="MPL-2.0",i[i["OSL-3.0"]=11]="OSL-3.0",i[i["Apache-2.0"]=12]="Apache-2.0",i[i["GNU-AGPLv3"]=13]="GNU-AGPLv3",i[i["BUSL-1.1"]=14]="BUSL-1.1",i))(Lf||{}),Pf=t=>{let e=t.match(/\/\/\s*SPDX-License-Identifier:\s*(.*)\s*/i),r=e==null?void 0:e[1];return r==null?1:(r in Lf||console.warn("Found unknown SPDX license identifier: %s",r),Lf[r])};var Xe;(function(t){t.assertEqual=n=>n;function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let o={};for(let s of n)o[s]=s;return o},t.getValidEnumValues=n=>{let o=t.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of o)s[a]=n[a];return t.objectValues(s)},t.objectValues=n=>t.objectKeys(n).map(function(o){return n[o]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let o=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},t.find=(n,o)=>{for(let s of n)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=i,t.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o;})(Xe||(Xe={}));var kf;(function(t){t.mergeShapes=(e,r)=>({...e,...r});})(kf||(kf={}));var Ee=Xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Hi=t=>{switch(typeof t){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return isNaN(t)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(t)?Ee.array:t===null?Ee.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ee.promise:typeof Map!="undefined"&&t instanceof Map?Ee.map:typeof Set!="undefined"&&t instanceof Set?Ee.set:typeof Date!="undefined"&&t instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ye=Xe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Y4=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Er=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i];},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e;}get errors(){return this.issues}format(e){let r=e||function(o){return o.message},i={_errors:[]},n=o=>{for(let s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)i._errors.push(r(s));else {let a=i,u=0;for(;u<s.path.length;){let l=s.path[u];u===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],u++;}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Xe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return {formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};Er.create=t=>new Er(t);var ko=(t,e)=>{let r;switch(t.code){case ye.invalid_type:t.received===Ee.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ye.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Xe.jsonStringifyReplacer)}`;break;case ye.unrecognized_keys:r=`Unrecognized key(s) in object: ${Xe.joinValues(t.keys,", ")}`;break;case ye.invalid_union:r="Invalid input";break;case ye.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Xe.joinValues(t.options)}`;break;case ye.invalid_enum_value:r=`Invalid enum value. Expected ${Xe.joinValues(t.options)}, received '${t.received}'`;break;case ye.invalid_arguments:r="Invalid function arguments";break;case ye.invalid_return_type:r="Invalid function return type";break;case ye.invalid_date:r="Invalid date";break;case ye.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Xe.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ye.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ye.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ye.custom:r="Invalid input";break;case ye.invalid_intersection_types:r="Intersection results could not be merged";break;case ye.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ye.not_finite:r="Number must be finite";break;default:r=e.defaultError,Xe.assertNever(t);}return {message:r}},f1=ko;function Z4(t){f1=t;}function Mu(){return f1}var Bu=t=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,o=[...r,...n.path||[]],s={...n,path:o},a="",u=i.filter(l=>!!l).slice().reverse();for(let l of u)a=l(s,{data:e,defaultError:a}).message;return {...n,path:o,message:n.message||a}},X4=[];function Te(t,e){let r=Bu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Mu(),ko].filter(i=>!!i)});t.common.issues.push(r);}var Qt=class t{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(e,r){let i=[];for(let n of r){if(n.status==="aborted")return Le;n.status==="dirty"&&e.dirty(),i.push(n.value);}return {status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let n of r){let{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return Le;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value!="undefined"||n.alwaysSet)&&(i[o.value]=s.value);}return {status:e.value,value:i}}},Le=Object.freeze({status:"aborted"}),d1=t=>({status:"dirty",value:t}),ir=t=>({status:"valid",value:t}),Mf=t=>t.status==="aborted",Bf=t=>t.status==="dirty",Mo=t=>t.status==="valid",qu=t=>typeof Promise!="undefined"&&t instanceof Promise,Se;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message;})(Se||(Se={}));var Nr=class{constructor(e,r,i,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=n;}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},h1=(t,e)=>{if(Mo(e))return {success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:!1,get error(){if(this._error)return this._error;let r=new Er(t.common.issues);return this._error=r,this._error}}};function Me(t){if(!t)return {};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,a)=>s.code!=="invalid_type"?{message:a.defaultError}:typeof a.data=="undefined"?{message:i!=null?i:a.defaultError}:{message:r!=null?r:a.defaultError},description:n}}var Be=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this);}get description(){return this._def.description}_getType(e){return Hi(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Hi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return {status:new Qt,ctx:{common:e.parent.common,data:e.data,parsedType:Hi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(qu(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let n={common:{issues:[],async:(i=r==null?void 0:r.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hi(e)},o=this._parseSync({data:e,path:n.path,parent:n});return h1(n,o)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hi(e)},n=this._parse({data:e,path:i.path,parent:i}),o=await(qu(n)?n:Promise.resolve(n));return h1(i,o)}refine(e,r){let i=n=>typeof r=="string"||typeof r=="undefined"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,o)=>{let s=e(n),a=()=>o.addIssue({code:ye.custom,...i(n)});return typeof Promise!="undefined"&&s instanceof Promise?s.then(u=>u?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(e){return new br({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Mr.create(this,this._def)}nullable(){return _i.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mi.create(this,this._def)}promise(){return Vi.create(this,this._def)}or(e){return Mn.create([this,e],this._def)}and(e){return Bn.create(this,e,this._def)}transform(e){return new br({...Me(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Vn({...Me(this._def),innerType:this,defaultValue:r,typeName:Ne.ZodDefault})}brand(){return new Vu({typeName:Ne.ZodBranded,type:this,...Me(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ks({...Me(this._def),innerType:this,catchValue:r,typeName:Ne.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Bo.create(this,e)}readonly(){return Bs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},J4=/^c[^\s-]{8,}$/i,Q4=/^[a-z][a-z0-9]*$/,eN=/^[0-9A-HJKMNP-TV-Z]{26}$/,tN=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,rN=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,iN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",If,nN=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,sN=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,oN=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function aN(t,e){return !!((e==="v4"||!e)&&nN.test(t)||(e==="v6"||!e)&&sN.test(t))}var ji=class t extends Be{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ee.string){let o=this._getOrReturnCtx(e);return Te(o,{code:ye.invalid_type,expected:Ee.string,received:o.parsedType}),Le}let i=new Qt,n;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){let s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(n=this._getOrReturnCtx(e,n),s?Te(n,{code:ye.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Te(n,{code:ye.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty());}else if(o.kind==="email")rN.test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"email",code:ye.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")If||(If=new RegExp(iN,"u")),If.test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"emoji",code:ye.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")tN.test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"uuid",code:ye.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")J4.test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"cuid",code:ye.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")Q4.test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"cuid2",code:ye.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")eN.test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"ulid",code:ye.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(e.data);}catch(s){n=this._getOrReturnCtx(e,n),Te(n,{validation:"url",code:ye.invalid_string,message:o.message}),i.dirty();}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"regex",code:ye.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?oN(o).test(e.data)||(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="ip"?aN(e.data,o.version)||(n=this._getOrReturnCtx(e,n),Te(n,{validation:"ip",code:ye.invalid_string,message:o.message}),i.dirty()):Xe.assertNever(o);return {status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:ye.invalid_string,...Se.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Se.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Se.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Se.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Se.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Se.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Se.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Se.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Se.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,...Se.errToObj(e==null?void 0:e.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Se.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...Se.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Se.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Se.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Se.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Se.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Se.errToObj(r)})}nonempty(e){return this.min(1,Se.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return !!this._def.checks.find(e=>e.kind==="email")}get isURL(){return !!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return !!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return !!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return !!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return !!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return !!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ji.create=t=>{var e;return new ji({checks:[],typeName:Ne.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Me(t)})};function uN(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,o=parseInt(t.toFixed(n).replace(".","")),s=parseInt(e.toFixed(n).replace(".",""));return o%s/Math.pow(10,n)}var On=class t extends Be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ee.number){let o=this._getOrReturnCtx(e);return Te(o,{code:ye.invalid_type,expected:Ee.number,received:o.parsedType}),Le}let i,n=new Qt;for(let o of this._def.checks)o.kind==="int"?Xe.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?uN(e.data,o.value)!==0&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.not_finite,message:o.message}),n.dirty()):Xe.assertNever(o);return {status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Se.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Se.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Se.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Se.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Se.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Se.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Se.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return !!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Xe.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return !0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value);}return Number.isFinite(r)&&Number.isFinite(e)}};On.create=t=>new On({checks:[],typeName:Ne.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Me(t)});var Fn=class t extends Be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Ee.bigint){let o=this._getOrReturnCtx(e);return Te(o,{code:ye.invalid_type,expected:Ee.bigint,received:o.parsedType}),Le}let i,n=new Qt;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ye.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):Xe.assertNever(o);return {status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Se.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Se.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Se.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Se.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Se.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Fn.create=t=>{var e;return new Fn({checks:[],typeName:Ne.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Me(t)})};var Ln=class extends Be{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ee.boolean){let i=this._getOrReturnCtx(e);return Te(i,{code:ye.invalid_type,expected:Ee.boolean,received:i.parsedType}),Le}return ir(e.data)}};Ln.create=t=>new Ln({typeName:Ne.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Me(t)});var Pn=class t extends Be{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ee.date){let o=this._getOrReturnCtx(e);return Te(o,{code:ye.invalid_type,expected:Ee.date,received:o.parsedType}),Le}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return Te(o,{code:ye.invalid_date}),Le}let i=new Qt,n;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),Te(n,{code:ye.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):Xe.assertNever(o);return {status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Se.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Se.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Pn.create=t=>new Pn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ne.ZodDate,...Me(t)});var Fs=class extends Be{_parse(e){if(this._getType(e)!==Ee.symbol){let i=this._getOrReturnCtx(e);return Te(i,{code:ye.invalid_type,expected:Ee.symbol,received:i.parsedType}),Le}return ir(e.data)}};Fs.create=t=>new Fs({typeName:Ne.ZodSymbol,...Me(t)});var In=class extends Be{_parse(e){if(this._getType(e)!==Ee.undefined){let i=this._getOrReturnCtx(e);return Te(i,{code:ye.invalid_type,expected:Ee.undefined,received:i.parsedType}),Le}return ir(e.data)}};In.create=t=>new In({typeName:Ne.ZodUndefined,...Me(t)});var kn=class extends Be{_parse(e){if(this._getType(e)!==Ee.null){let i=this._getOrReturnCtx(e);return Te(i,{code:ye.invalid_type,expected:Ee.null,received:i.parsedType}),Le}return ir(e.data)}};kn.create=t=>new kn({typeName:Ne.ZodNull,...Me(t)});var Ui=class extends Be{constructor(){super(...arguments),this._any=!0;}_parse(e){return ir(e.data)}};Ui.create=t=>new Ui({typeName:Ne.ZodAny,...Me(t)});var pi=class extends Be{constructor(){super(...arguments),this._unknown=!0;}_parse(e){return ir(e.data)}};pi.create=t=>new pi({typeName:Ne.ZodUnknown,...Me(t)});var Br=class extends Be{_parse(e){let r=this._getOrReturnCtx(e);return Te(r,{code:ye.invalid_type,expected:Ee.never,received:r.parsedType}),Le}};Br.create=t=>new Br({typeName:Ne.ZodNever,...Me(t)});var Ls=class extends Be{_parse(e){if(this._getType(e)!==Ee.undefined){let i=this._getOrReturnCtx(e);return Te(i,{code:ye.invalid_type,expected:Ee.void,received:i.parsedType}),Le}return ir(e.data)}};Ls.create=t=>new Ls({typeName:Ne.ZodVoid,...Me(t)});var mi=class t extends Be{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),n=this._def;if(r.parsedType!==Ee.array)return Te(r,{code:ye.invalid_type,expected:Ee.array,received:r.parsedType}),Le;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(Te(r,{code:s?ye.too_big:ye.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(Te(r,{code:ye.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(Te(r,{code:ye.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Nr(r,s,r.path,a)))).then(s=>Qt.mergeArray(i,s));let o=[...r.data].map((s,a)=>n.type._parseSync(new Nr(r,s,r.path,a)));return Qt.mergeArray(i,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Se.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Se.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Se.toString(r)}})}nonempty(e){return this.min(1,e)}};mi.create=(t,e)=>new mi({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...Me(e)});function Os(t){if(t instanceof lr){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=Mr.create(Os(i));}return new lr({...t._def,shape:()=>e})}else return t instanceof mi?new mi({...t._def,type:Os(t.element)}):t instanceof Mr?Mr.create(Os(t.unwrap())):t instanceof _i?_i.create(Os(t.unwrap())):t instanceof Yr?Yr.create(t.items.map(e=>Os(e))):t}var lr=class t extends Be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Xe.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==Ee.object){let l=this._getOrReturnCtx(e);return Te(l,{code:ye.invalid_type,expected:Ee.object,received:l.parsedType}),Le}let{status:i,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Br&&this._def.unknownKeys==="strip"))for(let l in n.data)s.includes(l)||a.push(l);let u=[];for(let l of s){let h=o[l],c=n.data[l];u.push({key:{status:"valid",value:l},value:h._parse(new Nr(n,c,n.path,l)),alwaysSet:l in n.data});}if(this._def.catchall instanceof Br){let l=this._def.unknownKeys;if(l==="passthrough")for(let h of a)u.push({key:{status:"valid",value:h},value:{status:"valid",value:n.data[h]}});else if(l==="strict")a.length>0&&(Te(n,{code:ye.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let l=this._def.catchall;for(let h of a){let c=n.data[h];u.push({key:{status:"valid",value:h},value:l._parse(new Nr(n,c,n.path,h)),alwaysSet:h in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let l=[];for(let h of u){let c=await h.key;l.push({key:c,value:await h.value,alwaysSet:h.alwaysSet});}return l}).then(l=>Qt.mergeObjectSync(i,l)):Qt.mergeObjectSync(i,u)}get shape(){return this._def.shape()}strict(e){return Se.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var n,o,s,a;let u=(s=(o=(n=this._def).errorMap)===null||o===void 0?void 0:o.call(n,r,i).message)!==null&&s!==void 0?s:i.defaultError;return r.code==="unrecognized_keys"?{message:(a=Se.errToObj(e).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ne.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return Xe.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(r[i]=this.shape[i]);}),new t({...this._def,shape:()=>r})}omit(e){let r={};return Xe.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i]);}),new t({...this._def,shape:()=>r})}deepPartial(){return Os(this)}partial(e){let r={};return Xe.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];e&&!e[i]?r[i]=n:r[i]=n.optional();}),new t({...this._def,shape:()=>r})}required(e){let r={};return Xe.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])r[i]=this.shape[i];else {let o=this.shape[i];for(;o instanceof Mr;)o=o._def.innerType;r[i]=o;}}),new t({...this._def,shape:()=>r})}keyof(){return p1(Xe.objectKeys(this.shape))}};lr.create=(t,e)=>new lr({shape:()=>t,unknownKeys:"strip",catchall:Br.create(),typeName:Ne.ZodObject,...Me(e)});lr.strictCreate=(t,e)=>new lr({shape:()=>t,unknownKeys:"strict",catchall:Br.create(),typeName:Ne.ZodObject,...Me(e)});lr.lazycreate=(t,e)=>new lr({shape:t,unknownKeys:"strip",catchall:Br.create(),typeName:Ne.ZodObject,...Me(e)});var Mn=class extends Be{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function n(o){for(let a of o)if(a.result.status==="valid")return a.result;for(let a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(a=>new Er(a.ctx.common.issues));return Te(r,{code:ye.invalid_union,unionErrors:s}),Le}if(r.common.async)return Promise.all(i.map(async o=>{let s={...r,common:{...r.common,issues:[]},parent:null};return {result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let o,s=[];for(let u of i){let l={...r,common:{...r.common,issues:[]},parent:null},h=u._parseSync({data:r.data,path:r.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!o&&(o={result:h,ctx:l}),l.common.issues.length&&s.push(l.common.issues);}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(u=>new Er(u));return Te(r,{code:ye.invalid_union,unionErrors:a}),Le}}get options(){return this._def.options}};Mn.create=(t,e)=>new Mn({options:t,typeName:Ne.ZodUnion,...Me(e)});var ku=t=>t instanceof qn?ku(t.schema):t instanceof br?ku(t.innerType()):t instanceof Hn?[t.value]:t instanceof jn?t.options:t instanceof Un?Object.keys(t.enum):t instanceof Vn?ku(t._def.innerType):t instanceof In?[void 0]:t instanceof kn?[null]:null,Hu=class t extends Be{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.object)return Te(r,{code:ye.invalid_type,expected:Ee.object,received:r.parsedType}),Le;let i=this.discriminator,n=r.data[i],o=this.optionsMap.get(n);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(Te(r,{code:ye.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let n=new Map;for(let o of r){let s=ku(o.shape[e]);if(!s)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);n.set(a,o);}}return new t({typeName:Ne.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...Me(i)})}};function qf(t,e){let r=Hi(t),i=Hi(e);if(t===e)return {valid:!0,data:t};if(r===Ee.object&&i===Ee.object){let n=Xe.objectKeys(e),o=Xe.objectKeys(t).filter(a=>n.indexOf(a)!==-1),s={...t,...e};for(let a of o){let u=qf(t[a],e[a]);if(!u.valid)return {valid:!1};s[a]=u.data;}return {valid:!0,data:s}}else if(r===Ee.array&&i===Ee.array){if(t.length!==e.length)return {valid:!1};let n=[];for(let o=0;o<t.length;o++){let s=t[o],a=e[o],u=qf(s,a);if(!u.valid)return {valid:!1};n.push(u.data);}return {valid:!0,data:n}}else return r===Ee.date&&i===Ee.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Bn=class extends Be{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(o,s)=>{if(Mf(o)||Mf(s))return Le;let a=qf(o.value,s.value);return a.valid?((Bf(o)||Bf(s))&&r.dirty(),{status:r.value,value:a.data}):(Te(i,{code:ye.invalid_intersection_types}),Le)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Bn.create=(t,e,r)=>new Bn({left:t,right:e,typeName:Ne.ZodIntersection,...Me(r)});var Yr=class t extends Be{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.array)return Te(i,{code:ye.invalid_type,expected:Ee.array,received:i.parsedType}),Le;if(i.data.length<this._def.items.length)return Te(i,{code:ye.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&i.data.length>this._def.items.length&&(Te(i,{code:ye.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...i.data].map((s,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new Nr(i,s,i.path,a)):null}).filter(s=>!!s);return i.common.async?Promise.all(o).then(s=>Qt.mergeArray(r,s)):Qt.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Yr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:t,typeName:Ne.ZodTuple,rest:null,...Me(e)})};var ju=class t extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.object)return Te(i,{code:ye.invalid_type,expected:Ee.object,received:i.parsedType}),Le;let n=[],o=this._def.keyType,s=this._def.valueType;for(let a in i.data)n.push({key:o._parse(new Nr(i,a,i.path,a)),value:s._parse(new Nr(i,i.data[a],i.path,a))});return i.common.async?Qt.mergeObjectAsync(r,n):Qt.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof Be?new t({keyType:e,valueType:r,typeName:Ne.ZodRecord,...Me(i)}):new t({keyType:ji.create(),valueType:e,typeName:Ne.ZodRecord,...Me(r)})}},Ps=class extends Be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.map)return Te(i,{code:ye.invalid_type,expected:Ee.map,received:i.parsedType}),Le;let n=this._def.keyType,o=this._def.valueType,s=[...i.data.entries()].map(([a,u],l)=>({key:n._parse(new Nr(i,a,i.path,[l,"key"])),value:o._parse(new Nr(i,u,i.path,[l,"value"]))}));if(i.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of s){let l=await u.key,h=await u.value;if(l.status==="aborted"||h.status==="aborted")return Le;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(l.value,h.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let u of s){let l=u.key,h=u.value;if(l.status==="aborted"||h.status==="aborted")return Le;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(l.value,h.value);}return {status:r.value,value:a}}}};Ps.create=(t,e,r)=>new Ps({valueType:e,keyType:t,typeName:Ne.ZodMap,...Me(r)});var Is=class t extends Be{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.set)return Te(i,{code:ye.invalid_type,expected:Ee.set,received:i.parsedType}),Le;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(Te(i,{code:ye.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(Te(i,{code:ye.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let o=this._def.valueType;function s(u){let l=new Set;for(let h of u){if(h.status==="aborted")return Le;h.status==="dirty"&&r.dirty(),l.add(h.value);}return {status:r.value,value:l}}let a=[...i.data.values()].map((u,l)=>o._parse(new Nr(i,u,i.path,l)));return i.common.async?Promise.all(a).then(u=>s(u)):s(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:Se.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Se.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Is.create=(t,e)=>new Is({valueType:t,minSize:null,maxSize:null,typeName:Ne.ZodSet,...Me(e)});var Uu=class t extends Be{constructor(){super(...arguments),this.validate=this.implement;}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.function)return Te(r,{code:ye.invalid_type,expected:Ee.function,received:r.parsedType}),Le;function i(a,u){return Bu({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Mu(),ko].filter(l=>!!l),issueData:{code:ye.invalid_arguments,argumentsError:u}})}function n(a,u){return Bu({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Mu(),ko].filter(l=>!!l),issueData:{code:ye.invalid_return_type,returnTypeError:u}})}let o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Vi){let a=this;return ir(async function(...u){let l=new Er([]),h=await a._def.args.parseAsync(u,o).catch(f=>{throw l.addIssue(i(u,f)),l}),c=await Reflect.apply(s,this,h);return await a._def.returns._def.type.parseAsync(c,o).catch(f=>{throw l.addIssue(n(c,f)),l})})}else {let a=this;return ir(function(...u){let l=a._def.args.safeParse(u,o);if(!l.success)throw new Er([i(u,l.error)]);let h=Reflect.apply(s,this,l.data),c=a._def.returns.safeParse(h,o);if(!c.success)throw new Er([n(h,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Yr.create(e).rest(pi.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||Yr.create([]).rest(pi.create()),returns:r||pi.create(),typeName:Ne.ZodFunction,...Me(i)})}},qn=class extends Be{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};qn.create=(t,e)=>new qn({getter:t,typeName:Ne.ZodLazy,...Me(e)});var Hn=class extends Be{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Te(r,{received:r.data,code:ye.invalid_literal,expected:this._def.value}),Le}return {status:"valid",value:e.data}}get value(){return this._def.value}};Hn.create=(t,e)=>new Hn({value:t,typeName:Ne.ZodLiteral,...Me(e)});function p1(t,e){return new jn({values:t,typeName:Ne.ZodEnum,...Me(e)})}var jn=class t extends Be{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return Te(r,{expected:Xe.joinValues(i),received:r.parsedType,code:ye.invalid_type}),Le}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return Te(r,{received:r.data,code:ye.invalid_enum_value,options:i}),Le}return ir(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};jn.create=p1;var Un=class extends Be{_parse(e){let r=Xe.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==Ee.string&&i.parsedType!==Ee.number){let n=Xe.objectValues(r);return Te(i,{expected:Xe.joinValues(n),received:i.parsedType,code:ye.invalid_type}),Le}if(r.indexOf(e.data)===-1){let n=Xe.objectValues(r);return Te(i,{received:i.data,code:ye.invalid_enum_value,options:n}),Le}return ir(e.data)}get enum(){return this._def.values}};Un.create=(t,e)=>new Un({values:t,typeName:Ne.ZodNativeEnum,...Me(e)});var Vi=class extends Be{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.promise&&r.common.async===!1)return Te(r,{code:ye.invalid_type,expected:Ee.promise,received:r.parsedType}),Le;let i=r.parsedType===Ee.promise?r.data:Promise.resolve(r.data);return ir(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Vi.create=(t,e)=>new Vi({type:t,typeName:Ne.ZodPromise,...Me(e)});var br=class extends Be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{Te(i,s),s.fatal?r.abort():r.dirty();},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){let s=n.transform(i.data,o);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(s).then(a=>this._def.schema._parseAsync({data:a,path:i.path,parent:i})):this._def.schema._parseSync({data:s,path:i.path,parent:i})}if(n.type==="refinement"){let s=a=>{let u=n.refinement(a,o);if(i.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Le:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?Le:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(i.common.async===!1){let s=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Mo(s))return s;let a=n.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(s=>Mo(s)?Promise.resolve(n.transform(s.value,o)).then(a=>({status:r.value,value:a})):s);Xe.assertNever(n);}};br.create=(t,e,r)=>new br({schema:t,typeName:Ne.ZodEffects,effect:e,...Me(r)});br.createWithPreprocess=(t,e,r)=>new br({schema:e,effect:{type:"preprocess",transform:t},typeName:Ne.ZodEffects,...Me(r)});var Mr=class extends Be{_parse(e){return this._getType(e)===Ee.undefined?ir(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Mr.create=(t,e)=>new Mr({innerType:t,typeName:Ne.ZodOptional,...Me(e)});var _i=class extends Be{_parse(e){return this._getType(e)===Ee.null?ir(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};_i.create=(t,e)=>new _i({innerType:t,typeName:Ne.ZodNullable,...Me(e)});var Vn=class extends Be{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===Ee.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Vn.create=(t,e)=>new Vn({innerType:t,typeName:Ne.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Me(e)});var ks=class extends Be{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return qu(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Er(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Er(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};ks.create=(t,e)=>new ks({innerType:t,typeName:Ne.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Me(e)});var Ms=class extends Be{_parse(e){if(this._getType(e)!==Ee.nan){let i=this._getOrReturnCtx(e);return Te(i,{code:ye.invalid_type,expected:Ee.nan,received:i.parsedType}),Le}return {status:"valid",value:e.data}}};Ms.create=t=>new Ms({typeName:Ne.ZodNaN,...Me(t)});var lN=Symbol("zod_brand"),Vu=class extends Be{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},Bo=class t extends Be{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return (async()=>{let o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?Le:o.status==="dirty"?(r.dirty(),d1(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?Le:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:Ne.ZodPipeline})}},Bs=class extends Be{_parse(e){let r=this._def.innerType._parse(e);return Mo(r)&&(r.value=Object.freeze(r.value)),r}};Bs.create=(t,e)=>new Bs({innerType:t,typeName:Ne.ZodReadonly,...Me(e)});var m1=(t,e={},r)=>t?Ui.create().superRefine((i,n)=>{var o,s;if(!t(i)){let a=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,u=(s=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&s!==void 0?s:!0,l=typeof a=="string"?{message:a}:a;n.addIssue({code:"custom",...l,fatal:u});}}):Ui.create(),hN={object:lr.lazycreate},Ne;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly";})(Ne||(Ne={}));var cN=(t,e={message:`Input not instance of ${t.name}`})=>m1(r=>r instanceof t,e),_1=ji.create,g1=On.create,fN=Ms.create,dN=Fn.create,y1=Ln.create,pN=Pn.create,mN=Fs.create,_N=In.create,gN=kn.create,yN=Ui.create,xN=pi.create,vN=Br.create,EN=Ls.create,bN=mi.create,TN=lr.create,CN=lr.strictCreate,AN=Mn.create,wN=Hu.create,DN=Bn.create,SN=Yr.create,RN=ju.create,NN=Ps.create,ON=Is.create,FN=Uu.create,LN=qn.create,PN=Hn.create,IN=jn.create,kN=Un.create,MN=Vi.create,c1=br.create,BN=Mr.create,qN=_i.create,HN=br.createWithPreprocess,jN=Bo.create,UN=()=>_1().optional(),VN=()=>g1().optional(),$N=()=>y1().optional(),zN={string:t=>ji.create({...t,coerce:!0}),number:t=>On.create({...t,coerce:!0}),boolean:t=>Ln.create({...t,coerce:!0}),bigint:t=>Fn.create({...t,coerce:!0}),date:t=>Pn.create({...t,coerce:!0})},KN=Le,Pe=Object.freeze({__proto__:null,defaultErrorMap:ko,setErrorMap:Z4,getErrorMap:Mu,makeIssue:Bu,EMPTY_PATH:X4,addIssueToContext:Te,ParseStatus:Qt,INVALID:Le,DIRTY:d1,OK:ir,isAborted:Mf,isDirty:Bf,isValid:Mo,isAsync:qu,get util(){return Xe},get objectUtil(){return kf},ZodParsedType:Ee,getParsedType:Hi,ZodType:Be,ZodString:ji,ZodNumber:On,ZodBigInt:Fn,ZodBoolean:Ln,ZodDate:Pn,ZodSymbol:Fs,ZodUndefined:In,ZodNull:kn,ZodAny:Ui,ZodUnknown:pi,ZodNever:Br,ZodVoid:Ls,ZodArray:mi,ZodObject:lr,ZodUnion:Mn,ZodDiscriminatedUnion:Hu,ZodIntersection:Bn,ZodTuple:Yr,ZodRecord:ju,ZodMap:Ps,ZodSet:Is,ZodFunction:Uu,ZodLazy:qn,ZodLiteral:Hn,ZodEnum:jn,ZodNativeEnum:Un,ZodPromise:Vi,ZodEffects:br,ZodTransformer:br,ZodOptional:Mr,ZodNullable:_i,ZodDefault:Vn,ZodCatch:ks,ZodNaN:Ms,BRAND:lN,ZodBranded:Vu,ZodPipeline:Bo,ZodReadonly:Bs,custom:m1,Schema:Be,ZodSchema:Be,late:hN,get ZodFirstPartyTypeKind(){return Ne},coerce:zN,any:yN,array:bN,bigint:dN,boolean:y1,date:pN,discriminatedUnion:wN,effect:c1,enum:IN,function:FN,instanceof:cN,intersection:DN,lazy:LN,literal:PN,map:NN,nan:fN,nativeEnum:kN,never:vN,null:gN,nullable:qN,number:g1,object:TN,oboolean:$N,onumber:VN,optional:BN,ostring:UN,pipeline:jN,preprocess:HN,promise:MN,record:RN,set:ON,strictObject:CN,string:_1,symbol:mN,transformer:c1,tuple:SN,undefined:_N,union:AN,unknown:xN,void:EN,NEVER:KN,ZodIssueCode:ye,quotelessJson:Y4,ZodError:Er});var $u=t=>new Promise(e=>{setTimeout(e,t);}),x1=async(t,e,r)=>{jE__default.default(e>0,`Number of attempts for retry must be larger than 0, got ${e}`);for(let i=0;i<e-1;i++)try{return await t()}catch(n){await(r==null?void 0:r(n,i));}return t()};var v1=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function WN(t){return v1.includes(t)}var YN=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...v1];function ZN(t){return YN.includes(t)}var XN=["null","undefined","string","number","bigint","boolean","symbol"];function JN(t){return XN.includes(t)}function qs(t){return e=>typeof e===t}var{toString:QN}=Object.prototype,qo=t=>{let e=QN.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Y.domElement(t))return "HTMLElement";if(ZN(e))return e},nt=t=>e=>qo(e)===t;function Y(t){if(t===null)return "null";switch(typeof t){case"undefined":return "undefined";case"string":return "string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return "boolean";case"function":return "Function";case"bigint":return "bigint";case"symbol":return "symbol";}if(Y.observable(t))return "Observable";if(Y.array(t))return "Array";if(Y.buffer(t))return "Buffer";let e=qo(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return "Object"}Y.undefined=qs("undefined");Y.string=qs("string");var eO=qs("number");Y.number=t=>eO(t)&&!Y.nan(t);Y.positiveNumber=t=>Y.number(t)&&t>0;Y.negativeNumber=t=>Y.number(t)&&t<0;Y.bigint=qs("bigint");Y.function_=qs("function");Y.null_=t=>t===null;Y.class_=t=>Y.function_(t)&&t.toString().startsWith("class ");Y.boolean=t=>t===!0||t===!1;Y.symbol=qs("symbol");Y.numericString=t=>Y.string(t)&&!Y.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Y.array=(t,e)=>Array.isArray(t)?Y.function_(e)?t.every(r=>e(r)):!0:!1;Y.buffer=t=>{var e,r,i;return (i=(r=(e=t==null?void 0:t.constructor)==null?void 0:e.isBuffer)==null?void 0:r.call(e,t))!=null?i:!1};Y.blob=t=>nt("Blob")(t);Y.nullOrUndefined=t=>Y.null_(t)||Y.undefined(t);Y.object=t=>!Y.null_(t)&&(typeof t=="object"||Y.function_(t));Y.iterable=t=>Y.function_(t==null?void 0:t[Symbol.iterator]);Y.asyncIterable=t=>Y.function_(t==null?void 0:t[Symbol.asyncIterator]);Y.generator=t=>Y.iterable(t)&&Y.function_(t==null?void 0:t.next)&&Y.function_(t==null?void 0:t.throw);Y.asyncGenerator=t=>Y.asyncIterable(t)&&Y.function_(t.next)&&Y.function_(t.throw);Y.nativePromise=t=>nt("Promise")(t);var tO=t=>Y.function_(t==null?void 0:t.then)&&Y.function_(t==null?void 0:t.catch);Y.promise=t=>Y.nativePromise(t)||tO(t);Y.generatorFunction=nt("GeneratorFunction");Y.asyncGeneratorFunction=t=>qo(t)==="AsyncGeneratorFunction";Y.asyncFunction=t=>qo(t)==="AsyncFunction";Y.boundFunction=t=>Y.function_(t)&&!t.hasOwnProperty("prototype");Y.regExp=nt("RegExp");Y.date=nt("Date");Y.error=nt("Error");Y.map=t=>nt("Map")(t);Y.set=t=>nt("Set")(t);Y.weakMap=t=>nt("WeakMap")(t);Y.weakSet=t=>nt("WeakSet")(t);Y.weakRef=t=>nt("WeakRef")(t);Y.int8Array=nt("Int8Array");Y.uint8Array=nt("Uint8Array");Y.uint8ClampedArray=nt("Uint8ClampedArray");Y.int16Array=nt("Int16Array");Y.uint16Array=nt("Uint16Array");Y.int32Array=nt("Int32Array");Y.uint32Array=nt("Uint32Array");Y.float32Array=nt("Float32Array");Y.float64Array=nt("Float64Array");Y.bigInt64Array=nt("BigInt64Array");Y.bigUint64Array=nt("BigUint64Array");Y.arrayBuffer=nt("ArrayBuffer");Y.sharedArrayBuffer=nt("SharedArrayBuffer");Y.dataView=nt("DataView");Y.enumCase=(t,e)=>Object.values(e).includes(t);Y.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;Y.urlInstance=t=>nt("URL")(t);Y.urlString=t=>{if(!Y.string(t))return !1;try{return new URL(t),!0}catch(e){return !1}};Y.truthy=t=>!!t;Y.falsy=t=>!t;Y.nan=t=>Number.isNaN(t);Y.primitive=t=>Y.null_(t)||JN(typeof t);Y.integer=t=>Number.isInteger(t);Y.safeInteger=t=>Number.isSafeInteger(t);Y.plainObject=t=>{if(typeof t!="object"||t===null)return !1;let e=Object.getPrototypeOf(t);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};Y.typedArray=t=>WN(qo(t));var rO=t=>Y.safeInteger(t)&&t>=0;Y.arrayLike=t=>!Y.nullOrUndefined(t)&&!Y.function_(t)&&rO(t.length);Y.tupleLike=(t,e)=>Y.array(e)&&Y.array(t)&&e.length===t.length?e.every((r,i)=>r(t[i])):!1;Y.inRange=(t,e)=>{if(Y.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(Y.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var iO=1,nO=["innerHTML","ownerDocument","style","attributes","nodeValue"];Y.domElement=t=>Y.object(t)&&t.nodeType===iO&&Y.string(t.nodeName)&&!Y.plainObject(t)&&nO.every(e=>e in t);Y.observable=t=>{var e,r;return t?t===((e=t[Symbol.observable])==null?void 0:e.call(t))||t===((r=t["@@observable"])==null?void 0:r.call(t)):!1};Y.nodeStream=t=>Y.object(t)&&Y.function_(t.pipe)&&!Y.observable(t);Y.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var E1=t=>e=>Y.integer(e)&&Math.abs(e%2)===t;Y.evenInteger=E1(0);Y.oddInteger=E1(1);Y.emptyArray=t=>Y.array(t)&&t.length===0;Y.nonEmptyArray=t=>Y.array(t)&&t.length>0;Y.emptyString=t=>Y.string(t)&&t.length===0;var sO=t=>Y.string(t)&&!/\S/.test(t);Y.emptyStringOrWhitespace=t=>Y.emptyString(t)||sO(t);Y.nonEmptyString=t=>Y.string(t)&&t.length>0;Y.nonEmptyStringAndNotWhitespace=t=>Y.string(t)&&!Y.emptyStringOrWhitespace(t);Y.emptyObject=t=>Y.object(t)&&!Y.map(t)&&!Y.set(t)&&Object.keys(t).length===0;Y.nonEmptyObject=t=>Y.object(t)&&!Y.map(t)&&!Y.set(t)&&Object.keys(t).length>0;Y.emptySet=t=>Y.set(t)&&t.size===0;Y.nonEmptySet=t=>Y.set(t)&&t.size>0;Y.emptyMap=t=>Y.map(t)&&t.size===0;Y.nonEmptyMap=t=>Y.map(t)&&t.size>0;Y.propertyKey=t=>Y.any([Y.string,Y.number,Y.symbol],t);Y.formData=t=>nt("FormData")(t);Y.urlSearchParams=t=>nt("URLSearchParams")(t);var b1=(t,e,r)=>{if(!Y.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};Y.any=(t,...e)=>(Y.array(t)?t:[t]).some(i=>b1(Array.prototype.some,i,e));Y.all=(t,...e)=>b1(Array.prototype.every,t,e);var xe=(t,e,r,i={})=>{if(!t){let{multipleValues:n}=i,o=n?`received values of types ${[...new Set(r.map(s=>`\`${Y(s)}\``))].join(", ")}`:`received value of type \`${Y(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${o}.`)}},fe={undefined:t=>xe(Y.undefined(t),"undefined",t),string:t=>xe(Y.string(t),"string",t),number:t=>xe(Y.number(t),"number",t),positiveNumber:t=>xe(Y.positiveNumber(t),"positive number",t),negativeNumber:t=>xe(Y.negativeNumber(t),"negative number",t),bigint:t=>xe(Y.bigint(t),"bigint",t),function_:t=>xe(Y.function_(t),"Function",t),null_:t=>xe(Y.null_(t),"null",t),class_:t=>xe(Y.class_(t),"Class",t),boolean:t=>xe(Y.boolean(t),"boolean",t),symbol:t=>xe(Y.symbol(t),"symbol",t),numericString:t=>xe(Y.numericString(t),"string with a number",t),array:(t,e)=>{xe(Y.array(t),"Array",t),e&&t.forEach(e);},buffer:t=>xe(Y.buffer(t),"Buffer",t),blob:t=>xe(Y.blob(t),"Blob",t),nullOrUndefined:t=>xe(Y.nullOrUndefined(t),"null or undefined",t),object:t=>xe(Y.object(t),"Object",t),iterable:t=>xe(Y.iterable(t),"Iterable",t),asyncIterable:t=>xe(Y.asyncIterable(t),"AsyncIterable",t),generator:t=>xe(Y.generator(t),"Generator",t),asyncGenerator:t=>xe(Y.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>xe(Y.nativePromise(t),"native Promise",t),promise:t=>xe(Y.promise(t),"Promise",t),generatorFunction:t=>xe(Y.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>xe(Y.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>xe(Y.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>xe(Y.boundFunction(t),"Function",t),regExp:t=>xe(Y.regExp(t),"RegExp",t),date:t=>xe(Y.date(t),"Date",t),error:t=>xe(Y.error(t),"Error",t),map:t=>xe(Y.map(t),"Map",t),set:t=>xe(Y.set(t),"Set",t),weakMap:t=>xe(Y.weakMap(t),"WeakMap",t),weakSet:t=>xe(Y.weakSet(t),"WeakSet",t),weakRef:t=>xe(Y.weakRef(t),"WeakRef",t),int8Array:t=>xe(Y.int8Array(t),"Int8Array",t),uint8Array:t=>xe(Y.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>xe(Y.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>xe(Y.int16Array(t),"Int16Array",t),uint16Array:t=>xe(Y.uint16Array(t),"Uint16Array",t),int32Array:t=>xe(Y.int32Array(t),"Int32Array",t),uint32Array:t=>xe(Y.uint32Array(t),"Uint32Array",t),float32Array:t=>xe(Y.float32Array(t),"Float32Array",t),float64Array:t=>xe(Y.float64Array(t),"Float64Array",t),bigInt64Array:t=>xe(Y.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>xe(Y.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>xe(Y.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>xe(Y.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>xe(Y.dataView(t),"DataView",t),enumCase:(t,e)=>xe(Y.enumCase(t,e),"EnumCase",t),urlInstance:t=>xe(Y.urlInstance(t),"URL",t),urlString:t=>xe(Y.urlString(t),"string with a URL",t),truthy:t=>xe(Y.truthy(t),"truthy",t),falsy:t=>xe(Y.falsy(t),"falsy",t),nan:t=>xe(Y.nan(t),"NaN",t),primitive:t=>xe(Y.primitive(t),"primitive",t),integer:t=>xe(Y.integer(t),"integer",t),safeInteger:t=>xe(Y.safeInteger(t),"integer",t),plainObject:t=>xe(Y.plainObject(t),"plain object",t),typedArray:t=>xe(Y.typedArray(t),"TypedArray",t),arrayLike:t=>xe(Y.arrayLike(t),"array-like",t),tupleLike:(t,e)=>xe(Y.tupleLike(t,e),"tuple-like",t),domElement:t=>xe(Y.domElement(t),"HTMLElement",t),observable:t=>xe(Y.observable(t),"Observable",t),nodeStream:t=>xe(Y.nodeStream(t),"Node.js Stream",t),infinite:t=>xe(Y.infinite(t),"infinite number",t),emptyArray:t=>xe(Y.emptyArray(t),"empty array",t),nonEmptyArray:t=>xe(Y.nonEmptyArray(t),"non-empty array",t),emptyString:t=>xe(Y.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>xe(Y.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>xe(Y.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>xe(Y.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>xe(Y.emptyObject(t),"empty object",t),nonEmptyObject:t=>xe(Y.nonEmptyObject(t),"non-empty object",t),emptySet:t=>xe(Y.emptySet(t),"empty set",t),nonEmptySet:t=>xe(Y.nonEmptySet(t),"non-empty set",t),emptyMap:t=>xe(Y.emptyMap(t),"empty map",t),nonEmptyMap:t=>xe(Y.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>xe(Y.propertyKey(t),"PropertyKey",t),formData:t=>xe(Y.formData(t),"FormData",t),urlSearchParams:t=>xe(Y.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>xe(Y.evenInteger(t),"even integer",t),oddInteger:t=>xe(Y.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>xe(Y.directInstanceOf(t,e),"T",t),inRange:(t,e)=>xe(Y.inRange(t,e),"in range",t),any:(t,...e)=>xe(Y.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>xe(Y.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(Y,{class:{value:Y.class_},function:{value:Y.function_},null:{value:Y.null_}});Object.defineProperties(fe,{class:{value:fe.class_},function:{value:fe.function_},null:{value:fe.null_}});var ie=Y;var Hf=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError";}get isCanceled(){return !0}},Hs=class t{static fn(e){return (...r)=>new t((i,n,o)=>{r.push(o),e(...r).then(i,n);})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,i)=>{this._reject=i;let n=a=>{(!this._isCanceled||!s.shouldReject)&&(this._isPending=!1,r(a));},o=a=>{this._isPending=!1,i(a);},s=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a);};Object.defineProperties(s,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a;}}}),e(n,o,s);});}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r();}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new Hf(e));}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Hs.prototype,Promise.prototype);function oO(t){return ie.object(t)&&"_onResponse"in t}var wt=class extends Error{constructor(e,r,i){var n,o;if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(n=r.code)!=null?n:"ERR_GOT_REQUEST_ERROR",this.input=r.input,oO(i)?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i.response}),this.options=i.options):this.options=i,this.timings=(o=this.request)==null?void 0:o.timings,ie.string(r.stack)&&ie.string(this.stack)){let s=this.stack.indexOf(this.message)+this.message.length,a=this.stack.slice(s).split(`
|
|
459
|
+
`).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|
460
|
+
`).reverse();for(;u.length>0&&u[0]===a[0];)a.shift();this.stack=`${this.stack.slice(0,s)}${a.reverse().join(`
|
|
461
|
+
`)}${u.reverse().join(`
|
|
462
|
+
`)}`;}}},zu=class extends wt{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS";}},$i=class extends wt{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE";}},Ku=class extends wt{constructor(e,r){super(e.message,e,r),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code;}},Ho=class extends wt{constructor(e,r){super(e.message,e,r),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code;}},Gu=class extends wt{constructor(e,r,i){super(e.message,e,i),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=e.event,this.timings=r;}},jo=class extends wt{constructor(e,r){super(e.message,e,r),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code;}},Wu=class extends wt{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING";}},Yu=class extends wt{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError";}};var C1=$t(T1(),1);var hO=t=>{if(t.timings)return t.timings;let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=s=>{s.once(LO.errorMonitor,()=>{e.error=Date.now(),e.phases.total=e.error-e.start;});};r(t);let i=()=>{e.abort=Date.now(),e.phases.total=e.abort-e.start;};t.prependOnceListener("abort",i);let n=s=>{if(e.socket=Date.now(),e.phases.wait=e.socket-e.start,util.types.isProxy(s))return;let a=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket;};s.prependOnceListener("lookup",a),(0, C1.default)(s,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(s.removeListener("lookup",a),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup;},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect;}});};t.socket?n(t.socket):t.prependOnceListener("socket",n);let o=()=>{var s;e.upload=Date.now(),e.phases.request=e.upload-((s=e.secureConnect)!=null?s:e.connect);};return t.writableFinished?o():t.prependOnceListener("finish",o),t.prependOnceListener("response",s=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,s.timings=e,r(s),s.prependOnceListener("end",()=>{t.off("abort",i),s.off("aborted",i),!e.phases.total&&(e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start);}),s.prependOnceListener("aborted",i);}),e},A1=hO;var cO="text/plain",fO="us-ascii",$f=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),dO=new Set(["https:","http:","file:"]),pO=t=>{try{let{protocol:e}=new URL(t);return e.endsWith(":")&&!dO.has(e)}catch(e){return !1}},mO=(t,{stripHash:e})=>{var c,p;let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:i,data:n,hash:o}=r.groups,s=i.split(";");o=e?"":o;let a=!1;s[s.length-1]==="base64"&&(s.pop(),a=!0);let u=(p=(c=s.shift())==null?void 0:c.toLowerCase())!=null?p:"",h=[...s.map(f=>{let[m,_=""]=f.split("=").map(x=>x.trim());return m==="charset"&&(_=_.toLowerCase(),_===fO)?"":`${m}${_?`=${_}`:""}`}).filter(Boolean)];return a&&h.push("base64"),(h.length>0||u&&u!==cO)&&h.unshift(u),`data:${h.join(";")},${a?n.trim():n}${o?`#${o}`:""}`};function zf(t,e){if(e={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...e},typeof e.defaultProtocol=="string"&&!e.defaultProtocol.endsWith(":")&&(e.defaultProtocol=`${e.defaultProtocol}:`),t=t.trim(),/^data:/i.test(t))return mO(t,e);if(pO(t))return t;let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let n=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripAuthentication&&(n.username="",n.password=""),e.stripHash?n.hash="":e.stripTextFragment&&(n.hash=n.hash.replace(/#?:~:text.*?$/i,"")),n.pathname){let s=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,a=0,u="";for(;;){let h=s.exec(n.pathname);if(!h)break;let c=h[0],p=h.index,f=n.pathname.slice(a,p);u+=f.replace(/\/{2,}/g,"/"),u+=c,a=p+c.length;}let l=n.pathname.slice(a,n.pathname.length);u+=l.replace(/\/{2,}/g,"/"),n.pathname=u;}if(n.pathname)try{n.pathname=decodeURI(n.pathname);}catch(s){}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let s=n.pathname.split("/"),a=s[s.length-1];$f(a,e.removeDirectoryIndex)&&(s=s.slice(0,-1),n.pathname=s.slice(1).join("/")+"/");}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let s of [...n.searchParams.keys()])$f(s,e.removeQueryParameters)&&n.searchParams.delete(s);if(!Array.isArray(e.keepQueryParameters)&&e.removeQueryParameters===!0&&(n.search=""),Array.isArray(e.keepQueryParameters)&&e.keepQueryParameters.length>0)for(let s of [...n.searchParams.keys()])$f(s,e.keepQueryParameters)||n.searchParams.delete(s);if(e.sortQueryParameters){n.searchParams.sort();try{n.search=decodeURIComponent(n.search);}catch(s){}}e.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,"")),e.removeExplicitPort&&n.port&&(n.port="");let o=t;return t=n.toString(),!e.removeSingleSlash&&n.pathname==="/"&&!o.endsWith("/")&&n.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}var k1=$t(Gf(),1),Qu=$t(R1(),1);function js(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLowerCase(),r]))}var Us=class extends IO.Readable{constructor({statusCode:r,headers:i,body:n,url:o}){if(typeof r!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof i!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if(typeof o!="string")throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null);}});Oo(this,"statusCode");Oo(this,"headers");Oo(this,"body");Oo(this,"url");this.statusCode=r,this.headers=js(i),this.body=n,this.url=o;}};var Vo=$t(P1(),1);var FO=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];function Xf(t,e){if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set([...Object.keys(t),...FO]),i={};for(let n of r)n in e||(i[n]={get(){let o=t[n];return typeof o=="function"?o.bind(t):o},set(o){t[n]=o;},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),t.once("aborted",()=>{e.destroy(),e.emit("aborted");}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close");}):e.emit("close");}),e}var Xu=class extends Error{constructor(e){super(e.message),Object.assign(this,e);}},gi=class extends Error{constructor(e){super(e.message),Object.assign(this,e);}};var Qf=class{constructor(e,r){this.hooks=new Map,this.request=()=>(i,n)=>{var p;let o;if(typeof i=="string")o=Jf(Ju__default.default.parse(i)),i={};else if(i instanceof Ju__default.default.URL)o=Jf(Ju__default.default.parse(i.toString())),i={};else {let[f,...m]=((p=i.path)!=null?p:"").split("?"),_=m.length>0?`?${m.join("?")}`:"";o=Jf({...i,pathname:f,search:_});}i={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...i,...qO(o)},i.headers=Object.fromEntries(MO(i.headers).map(([f,m])=>[f.toLowerCase(),m]));let s=new LO__default.default,a=zf(Ju__default.default.format(o),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),u=`${i.method}:${a}`;i.body&&i.method!==void 0&&["POST","PATCH","PUT"].includes(i.method)&&(i.body instanceof IO__default.default.Readable?i.cache=!1:u+=`:${PO__default.default.createHash("md5").update(i.body).digest("hex")}`);let l=!1,h=!1,c=f=>{h=!0;let m=!1,_=()=>{},x=new Promise(g=>{_=()=>{m||(m=!0,g());};}),v=async g=>{if(l){g.status=g.statusCode;let E=Qu.default.fromObject(l.cachePolicy).revalidatedPolicy(f,g);if(!E.modified){g.resume(),await new Promise(D=>{g.once("end",D);});let w=I1(E.policy.responseHeaders());g=new Us({statusCode:l.statusCode,headers:w,body:l.body,url:l.url}),g.cachePolicy=E.policy,g.fromCache=!0;}}g.fromCache||(g.cachePolicy=new Qu.default(f,g,f),g.fromCache=!1);let b;f.cache&&g.cachePolicy.storable()?(b=BO(g),(async()=>{try{let E=k1.default.buffer(g);await Promise.race([x,new Promise(F=>g.once("end",F)),new Promise(F=>g.once("close",F))]);let w=await E,D={url:g.url,statusCode:g.fromCache?l.statusCode:g.statusCode,body:w,cachePolicy:g.cachePolicy.toObject()},N=f.strictTtl?g.cachePolicy.timeToLive():void 0;if(f.maxTtl&&(N=N?Math.min(N,f.maxTtl):f.maxTtl),this.hooks.size>0)for(let F of this.hooks.keys())D=await this.runHook(F,D,g);await this.cache.set(u,D,N);}catch(E){s.emit("error",new gi(E));}})()):f.cache&&l&&(async()=>{try{await this.cache.delete(u);}catch(E){s.emit("error",new gi(E));}})(),s.emit("response",b!=null?b:g),typeof n=="function"&&n(b!=null?b:g);};try{let g=this.cacheRequest(f,v);g.once("error",_),g.once("abort",_),g.once("destroy",_),s.emit("request",g);}catch(g){s.emit("error",new Xu(g));}};return (async()=>{let f=async _=>{await Promise.resolve();let x=_.cache?await this.cache.get(u):void 0;if(x===void 0&&!_.forceRefresh){c(_);return}let v=Qu.default.fromObject(x.cachePolicy);if(v.satisfiesWithoutRevalidation(_)&&!_.forceRefresh){let g=I1(v.responseHeaders()),b=new Us({statusCode:x.statusCode,headers:g,body:x.body,url:x.url});b.cachePolicy=v,b.fromCache=!0,s.emit("response",b),typeof n=="function"&&n(b);}else v.satisfiesWithoutRevalidation(_)&&Date.now()>=v.timeToLive()&&_.forceRefresh?(await this.cache.delete(u),_.headers=v.revalidationHeaders(_),c(_)):(l=x,_.headers=v.revalidationHeaders(_),c(_));},m=_=>s.emit("error",new gi(_));if(this.cache instanceof Vo.default){let _=this.cache;_.once("error",m),s.on("error",()=>_.removeListener("error",m)),s.on("response",()=>_.removeListener("error",m));}try{await f(i);}catch(_){i.automaticFailover&&!h&&c(i),s.emit("error",new gi(_));}})(),s},this.addHook=(i,n)=>{this.hooks.has(i)||this.hooks.set(i,n);},this.removeHook=i=>this.hooks.delete(i),this.getHook=i=>this.hooks.get(i),this.runHook=async(i,...n)=>{var o;return (o=this.hooks.get(i))==null?void 0:o(...n)},r instanceof Vo.default?this.cache=r:typeof r=="string"?this.cache=new Vo.default({uri:r,namespace:"cacheable-request"}):this.cache=new Vo.default({store:r,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=e;}},MO=Object.entries,BO=t=>{let e=new IO.PassThrough({autoDestroy:!1});return Xf(t,e),t.pipe(e)},qO=t=>{let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e},Jf=t=>({protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}),I1=t=>{let e=[];for(let r of Object.keys(t))e[r.toLowerCase()]=t[r];return e},M1=Qf;var fx=$t(j1(),1);var dx=$t(Gf(),1);var Or=t=>typeof t=="function";var $O=t=>Or(t[Symbol.asyncIterator]);async function*zO(t){let e=t.getReader();for(;;){let{done:r,value:i}=await e.read();if(r)break;yield i;}}var U1=t=>{if($O(t))return t;if(Or(t.getReader))return zO(t);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")};var V1="abcdefghijklmnopqrstuvwxyz0123456789";function $1(){let t=16,e="";for(;t--;)e+=V1[Math.random()*V1.length<<0];return e}var td=t=>String(t).replace(/\r|\n/g,(e,r,i)=>e==="\r"&&i[r+1]!==`
|
|
463
|
+
`||e===`
|
|
464
|
+
`&&i[r-1]!=="\r"?`\r
|
|
465
|
+
`:e);var KO=t=>Object.prototype.toString.call(t).slice(8,-1).toLowerCase();function rd(t){if(KO(t)!=="object")return !1;let e=Object.getPrototypeOf(t);return e==null?!0:(e.constructor&&e.constructor.toString())===Object.toString()}function z1(t,e){if(typeof e=="string"){for(let[r,i]of Object.entries(t))if(e.toLowerCase()===r.toLowerCase())return i}}var K1=t=>new Proxy(t,{get:(e,r)=>z1(e,r),has:(e,r)=>z1(e,r)!==void 0});var Vs=t=>!!(t&&Or(t.constructor)&&t[Symbol.toStringTag]==="FormData"&&Or(t.append)&&Or(t.getAll)&&Or(t.entries)&&Or(t[Symbol.iterator]));var id=t=>String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22");var zi=t=>!!(t&&typeof t=="object"&&Or(t.constructor)&&t[Symbol.toStringTag]==="File"&&Or(t.stream)&&t.name!=null);var $o=function(t,e,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(t,r):n?n.value=r:e.set(t,r),r},Tt=function(t,e,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(t):i?i.value:e.get(t)},zo,Ki,Ko,el,Go,zn,Wo,Yo,tl,nd,G1,GO={enableAdditionalHeaders:!1},rl={writable:!1,configurable:!1},il=class{constructor(e,r,i){if(zo.add(this),Ki.set(this,`\r
|
|
466
|
+
`),Ko.set(this,void 0),el.set(this,void 0),Go.set(this,"-".repeat(2)),zn.set(this,new TextEncoder),Wo.set(this,void 0),Yo.set(this,void 0),tl.set(this,void 0),!Vs(e))throw new TypeError("Expected first argument to be a FormData instance.");let n;if(rd(r)?i=r:n=r,n||(n=$1()),typeof n!="string")throw new TypeError("Expected boundary argument to be a string.");if(i&&!rd(i))throw new TypeError("Expected options argument to be an object.");$o(this,Yo,Array.from(e.entries()),"f"),$o(this,tl,{...GO,...i},"f"),$o(this,Ko,Tt(this,zn,"f").encode(Tt(this,Ki,"f")),"f"),$o(this,el,Tt(this,Ko,"f").byteLength,"f"),this.boundary=`form-data-boundary-${n}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,$o(this,Wo,Tt(this,zn,"f").encode(`${Tt(this,Go,"f")}${this.boundary}${Tt(this,Go,"f")}${Tt(this,Ki,"f").repeat(2)}`),"f");let o={"Content-Type":this.contentType},s=Tt(this,zo,"m",G1).call(this);s&&(this.contentLength=s,o["Content-Length"]=s),this.headers=K1(Object.freeze(o)),Object.defineProperties(this,{boundary:rl,contentType:rl,contentLength:rl,headers:rl});}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[e,r]of Tt(this,Yo,"f")){let i=zi(r)?r:Tt(this,zn,"f").encode(td(r));yield Tt(this,zo,"m",nd).call(this,e,i),yield i,yield Tt(this,Ko,"f");}yield Tt(this,Wo,"f");}async*encode(){for(let e of this.values())zi(e)?yield*U1(e.stream()):yield e;}[(Ki=new WeakMap,Ko=new WeakMap,el=new WeakMap,Go=new WeakMap,zn=new WeakMap,Wo=new WeakMap,Yo=new WeakMap,tl=new WeakMap,zo=new WeakSet,nd=function(r,i){let n="";n+=`${Tt(this,Go,"f")}${this.boundary}${Tt(this,Ki,"f")}`,n+=`Content-Disposition: form-data; name="${id(r)}"`,zi(i)&&(n+=`; filename="${id(i.name)}"${Tt(this,Ki,"f")}`,n+=`Content-Type: ${i.type||"application/octet-stream"}`);let o=zi(i)?i.size:i.byteLength;return Tt(this,tl,"f").enableAdditionalHeaders===!0&&o!=null&&!isNaN(o)&&(n+=`${Tt(this,Ki,"f")}Content-Length: ${zi(i)?i.size:i.byteLength}`),Tt(this,zn,"f").encode(`${n}${Tt(this,Ki,"f").repeat(2)}`)},G1=function(){let r=0;for(let[i,n]of Tt(this,Yo,"f")){let o=zi(n)?n:Tt(this,zn,"f").encode(td(n)),s=zi(o)?o.size:o.byteLength;if(s==null||isNaN(s))return;r+=Tt(this,zo,"m",nd).call(this,i,o).byteLength,r+=s,r+=Tt(this,el,"f");}return String(r+Tt(this,Wo,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};function Zo(t){return ie.nodeStream(t)&&ie.function_(t.getBoundary)}async function sd(t,e){if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(ie.string(t))return buffer.Buffer.byteLength(t);if(ie.buffer(t))return t.length;if(Zo(t))return util.promisify(t.getLength.bind(t))()}function Xo(t,e,r){let i={};for(let n of r){let o=(...s)=>{e.emit(n,...s);};i[n]=o,t.on(n,o);}return ()=>{for(let[n,o]of Object.entries(i))t.off(n,o);}}function od(){let t=[];return {once(e,r,i){e.once(r,i),t.push({origin:e,event:r,fn:i});},unhandleAll(){for(let e of t){let{origin:r,event:i,fn:n}=e;r.removeListener(i,n);}t.length=0;}}}var W1=Symbol("reentry"),XO=()=>{},Jo=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT";}};function ad(t,e,r){if(W1 in t)return XO;t[W1]=!0;let i=[],{once:n,unhandleAll:o}=od(),s=(_,x,v)=>{var E;let g=setTimeout(x,_,_,v);(E=g.unref)==null||E.call(g);let b=()=>{clearTimeout(g);};return i.push(b),b},{host:a,hostname:u}=r,l=(_,x)=>{t.destroy(new Jo(_,x));},h=()=>{for(let _ of i)_();o();};if(t.once("error",_=>{if(h(),t.listenerCount("error")===0)throw _}),typeof e.request!="undefined"){let _=s(e.request,l,"request");n(t,"response",x=>{n(x,"end",_);});}if(typeof e.socket!="undefined"){let{socket:_}=e,x=()=>{l(_,"socket");};t.setTimeout(_,x),i.push(()=>{t.removeListener("timeout",x);});}let c=typeof e.lookup!="undefined",p=typeof e.connect!="undefined",f=typeof e.secureConnect!="undefined",m=typeof e.send!="undefined";return (c||p||f||m)&&n(t,"socket",_=>{var v;let{socketPath:x}=t;if(_.connecting){let g=!!(x!=null?x:ZO__default.default.isIP((v=u!=null?u:a)!=null?v:"")!==0);if(c&&!g&&typeof _.address().address=="undefined"){let b=s(e.lookup,l,"lookup");n(_,"lookup",b);}if(p){let b=()=>s(e.connect,l,"connect");g?n(_,"connect",b()):n(_,"lookup",E=>{E===null&&n(_,"connect",b());});}f&&r.protocol==="https:"&&n(_,"connect",()=>{let b=s(e.secureConnect,l,"secureConnect");n(_,"secureConnect",b);});}if(m){let g=()=>s(e.send,l,"send");_.connecting?n(_,"connect",()=>{n(t,"upload-complete",g());}):n(t,"upload-complete",g());}}),typeof e.response!="undefined"&&n(t,"upload-complete",()=>{let _=s(e.response,l,"response");n(t,"response",_);}),typeof e.read!="undefined"&&n(t,"response",_=>{let x=s(e.read,l,"read");n(_,"end",x);}),h}function ud(t){t=t;let e={protocol:t.protocol,hostname:ie.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return ie.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}var Qo=class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map;}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r);}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};var JO=({attemptCount:t,retryOptions:e,error:r,retryAfter:i,computedValue:n})=>{if(r.name==="RetryError")return 1;if(t>e.limit)return 0;let o=e.methods.includes(r.options.method),s=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!o||!s&&!a)return 0;if(r.response){if(i)return i>n?0:i;if(r.response.statusCode===413)return 0}let u=Math.random()*e.noise;return Math.min(2**(t-1)*1e3,e.backoffLimit)+u},Y1=JO;var{Resolver:Z1}=dns.promises,$s=Symbol("cacheableLookupCreateConnection"),hd=Symbol("cacheableLookupInstance"),X1=Symbol("expires"),nF=typeof dns.ALL=="number",J1=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},sF=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6);},Q1=()=>{let t=!1,e=!1;for(let r of Object.values(iF__default.default.networkInterfaces()))for(let i of r)if(!i.internal&&(i.family==="IPv6"?e=!0:t=!0,t&&e))return {has4:t,has6:e};return {has4:t,has6:e}},oF=t=>Symbol.iterator in t,nl=t=>t.catch(e=>{if(e.code==="ENODATA"||e.code==="ENOTFOUND"||e.code==="ENOENT")return [];throw e}),ey={ttl:!0},aF={all:!0},uF={all:!0,family:4},lF={all:!0,family:6},ea=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:i=3600,errorTtl:n=.15,resolver:o=new Z1,lookup:s=dns.lookup}={}){if(this.maxTtl=r,this.errorTtl=n,this._cache=e,this._resolver=o,this._dnsLookup=s&&util.promisify(s),this.stats={cache:0,query:0},this._resolver instanceof Z1?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=util.promisify(this._resolver.resolve4.bind(this._resolver)),this._resolve6=util.promisify(this._resolver.resolve6.bind(this._resolver))),this._iface=Q1(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=i,i>0){let a=setInterval(()=>{this._hostnamesToFallback.clear();},i*1e3);a.unref&&a.unref(),this._fallbackInterval=a;}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this);}set servers(e){this.clear(),this._resolver.setServers(e);}get servers(){return this._resolver.getServers()}lookup(e,r,i){if(typeof r=="function"?(i=r,r={}):typeof r=="number"&&(r={family:r}),!i)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(n=>{r.all?i(null,n):i(null,n.address,n.family,n.expires,n.ttl,n.source);},i);}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let i=await this.query(e);if(r.family===6){let n=i.filter(o=>o.family===6);r.hints&dns.V4MAPPED&&(nF&&r.hints&dns.ALL||n.length===0)?sF(i):i=n;}else r.family===4&&(i=i.filter(n=>n.family===4));if(r.hints&dns.ADDRCONFIG){let{_iface:n}=this;i=i.filter(o=>o.family===6?n.has6:n.has4);}if(i.length===0){let n=new Error(`cacheableLookup ENOTFOUND ${e}`);throw n.code="ENOTFOUND",n.hostname=e,n}return r.all?i:i[0]}async query(e){let r="cache",i=await this._cache.get(e);if(i&&this.stats.cache++,!i){let n=this._pending[e];if(n)this.stats.cache++,i=await n;else {r="query";let o=this.queryAndCache(e);this._pending[e]=o,this.stats.query++;try{i=await o;}finally{delete this._pending[e];}}}return i=i.map(n=>({...n,source:r})),i}async _resolve(e){let[r,i]=await Promise.all([nl(this._resolve4(e,ey)),nl(this._resolve6(e,ey))]),n=0,o=0,s=0,a=Date.now();for(let u of r)u.family=4,u.expires=a+u.ttl*1e3,n=Math.max(n,u.ttl);for(let u of i)u.family=6,u.expires=a+u.ttl*1e3,o=Math.max(o,u.ttl);return r.length>0?i.length>0?s=Math.min(n,o):s=n:s=o,{entries:[...r,...i],cacheTtl:s}}async _lookup(e){try{let[r,i]=await Promise.all([nl(this._dnsLookup(e,uF)),nl(this._dnsLookup(e,lF))]);return {entries:[...r,...i],cacheTtl:0}}catch(r){return {entries:[],cacheTtl:0}}}async _set(e,r,i){if(this.maxTtl>0&&i>0){i=Math.min(i,this.maxTtl)*1e3,r[X1]=Date.now()+i;try{await this._cache.set(e,r,i);}catch(n){this.lookupAsync=async()=>{let o=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw o.cause=n,o};}oF(this._cache)&&this._tick(i);}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,aF);let r=await this._resolve(e);r.entries.length===0&&this._dnsLookup&&(r=await this._lookup(e),r.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));let i=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,i),r.entries}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let i=1/0,n=Date.now();for(let[o,s]of this._cache){let a=s[X1];n>=a?this._cache.delete(o):a<i&&(i=a);}i!==1/0&&this._tick(i-n);},e),this._removalTimeout.unref&&this._removalTimeout.unref());}install(e){if(J1(e),$s in e)throw new Error("CacheableLookup has been already installed");e[$s]=e.createConnection,e[hd]=this,e.createConnection=(r,i)=>("lookup"in r||(r.lookup=this.lookup),e[$s](r,i));}uninstall(e){if(J1(e),e[$s]){if(e[hd]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[$s],delete e[$s],delete e[hd];}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=Q1(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear();}clear(e){if(e){this._cache.delete(e);return}this._cache.clear();}};var ux=$t(ix(),1);function Pd(t){let e=[],r=t.split(",");for(let i of r){let[n,...o]=i.split(";"),s=n.trim();if(s[0]!=="<"||s[s.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${s}`);let a=s.slice(1,-1),u={};if(o.length===0)throw new Error(`Unexpected end of Link header parameters: ${o.join(";")}`);for(let l of o){let h=l.trim(),c=h.indexOf("=");if(c===-1)throw new Error(`Failed to parse Link header: ${t}`);let p=h.slice(0,c).trim(),f=h.slice(c+1).trim();u[p]=f;}e.push({reference:a,parameters:u});}return e}var[sx,k5]=cx__default.default.versions.node.split(".").map(Number);function M5(t){for(let e in t){let r=t[e];fe.any([ie.string,ie.number,ie.boolean,ie.null_,ie.undefined],r);}}var B5=new Map,cl,q5=()=>cl||(cl=new ea,cl),H5={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(t){return t.request.options.responseType==="json"?t.body:JSON.parse(t.body)},paginate({response:t}){let e=t.headers.link;if(typeof e!="string"||e.trim()==="")return !1;let i=Pd(e).find(n=>n.parameters.rel==="next"||n.parameters.rel==='"next"');return i?{url:new Ju.URL(i.reference,t.url)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!0},j5=t=>{let{hooks:e,retry:r}=t,i={...t,context:{...t.context},cacheOptions:{...t.cacheOptions},https:{...t.https},agent:{...t.agent},headers:{...t.headers},retry:{...r,errorCodes:[...r.errorCodes],methods:[...r.methods],statusCodes:[...r.statusCodes]},timeout:{...t.timeout},hooks:{init:[...e.init],beforeRequest:[...e.beforeRequest],beforeError:[...e.beforeError],beforeRedirect:[...e.beforeRedirect],beforeRetry:[...e.beforeRetry],afterResponse:[...e.afterResponse]},searchParams:t.searchParams?new Ju.URLSearchParams(t.searchParams):void 0,pagination:{...t.pagination}};return i.url!==void 0&&(i.prefixUrl=""),i},U5=t=>{let{hooks:e,retry:r}=t,i={...t};return ie.object(t.context)&&(i.context={...t.context}),ie.object(t.cacheOptions)&&(i.cacheOptions={...t.cacheOptions}),ie.object(t.https)&&(i.https={...t.https}),ie.object(t.cacheOptions)&&(i.cacheOptions={...i.cacheOptions}),ie.object(t.agent)&&(i.agent={...t.agent}),ie.object(t.headers)&&(i.headers={...t.headers}),ie.object(r)&&(i.retry={...r},ie.array(r.errorCodes)&&(i.retry.errorCodes=[...r.errorCodes]),ie.array(r.methods)&&(i.retry.methods=[...r.methods]),ie.array(r.statusCodes)&&(i.retry.statusCodes=[...r.statusCodes])),ie.object(t.timeout)&&(i.timeout={...t.timeout}),ie.object(e)&&(i.hooks={...e},ie.array(e.init)&&(i.hooks.init=[...e.init]),ie.array(e.beforeRequest)&&(i.hooks.beforeRequest=[...e.beforeRequest]),ie.array(e.beforeError)&&(i.hooks.beforeError=[...e.beforeError]),ie.array(e.beforeRedirect)&&(i.hooks.beforeRedirect=[...e.beforeRedirect]),ie.array(e.beforeRetry)&&(i.hooks.beforeRetry=[...e.beforeRetry]),ie.array(e.afterResponse)&&(i.hooks.afterResponse=[...e.afterResponse])),ie.object(t.pagination)&&(i.pagination={...t.pagination}),i},V5=t=>{let e=[t.timeout.socket,t.timeout.connect,t.timeout.lookup,t.timeout.request,t.timeout.secureConnect].filter(r=>typeof r=="number");if(e.length>0)return Math.min(...e)},ox=(t,e,r)=>{var n;let i=(n=t.hooks)==null?void 0:n.init;if(i)for(let o of i)o(e,r);},Fr=class t{constructor(e,r,i){var n,o,s;if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),fe.any([ie.string,ie.urlInstance,ie.object,ie.undefined],e),fe.any([ie.object,ie.undefined],r),fe.any([ie.object,ie.undefined],i),e instanceof t||r instanceof t)throw new TypeError("The defaults must be passed as the third argument");this._internals=j5((o=(n=i==null?void 0:i._internals)!=null?n:i)!=null?o:H5),this._init=[...(s=i==null?void 0:i._init)!=null?s:[]],this._merging=!1,this._unixOptions=void 0;try{if(ie.plainObject(e))try{this.merge(e),this.merge(r);}finally{this.url=e.url;}else try{this.merge(r);}finally{if((r==null?void 0:r.url)!==void 0)if(e===void 0)this.url=r.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else e!==void 0&&(this.url=e);}}catch(a){throw a.options=this,a}}merge(e){if(e){if(e instanceof t){for(let r of e._init)this.merge(r);return}e=U5(e),ox(this,e,this),ox(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let r=!1;for(let i in e)if(!(i==="mutableDefaults"||i==="handlers")&&i!=="url"){if(!(i in this))throw new Error(`Unexpected option: ${i}`);this[i]=e[i],r=!0;}r&&this._init.push(e);}finally{this._merging=!1;}}}get request(){return this._internals.request}set request(e){fe.any([ie.function_,ie.undefined],e),this._internals.request=e;}get agent(){return this._internals.agent}set agent(e){fe.plainObject(e);for(let r in e){if(!(r in this._internals.agent))throw new TypeError(`Unexpected agent option: ${r}`);fe.any([ie.object,ie.undefined],e[r]);}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e};}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e;}get decompress(){return this._internals.decompress}set decompress(e){fe.boolean(e),this._internals.decompress=e;}get timeout(){return this._internals.timeout}set timeout(e){fe.plainObject(e);for(let r in e){if(!(r in this._internals.timeout))throw new Error(`Unexpected timeout option: ${r}`);fe.any([ie.number,ie.undefined],e[r]);}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e};}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(fe.any([ie.string,ie.urlInstance],e),e===""){this._internals.prefixUrl="";return}if(e=e.toString(),e.endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){let{href:r}=this._internals.url;this._internals.url.href=e+r.slice(this._internals.prefixUrl.length);}this._internals.prefixUrl=e;}get body(){return this._internals.body}set body(e){fe.any([ie.string,ie.buffer,ie.nodeStream,ie.generator,ie.asyncGenerator,Vs,ie.undefined],e),ie.nodeStream(e)&&fe.truthy(e.readable),e!==void 0&&(fe.undefined(this._internals.form),fe.undefined(this._internals.json)),this._internals.body=e;}get form(){return this._internals.form}set form(e){fe.any([ie.plainObject,ie.undefined],e),e!==void 0&&(fe.undefined(this._internals.body),fe.undefined(this._internals.json)),this._internals.form=e;}get json(){return this._internals.json}set json(e){e!==void 0&&(fe.undefined(this._internals.body),fe.undefined(this._internals.form)),this._internals.json=e;}get url(){return this._internals.url}set url(e){if(fe.any([ie.string,ie.urlInstance,ie.undefined],e),e===void 0){this._internals.url=void 0;return}if(ie.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");let r=`${this.prefixUrl}${e.toString()}`,i=new Ju.URL(r);if(this._internals.url=i,i.protocol==="unix:"&&(i.href=`http://unix${i.pathname}${i.search}`),i.protocol!=="http:"&&i.protocol!=="https:"){let n=new Error(`Unsupported protocol: ${i.protocol}`);throw n.code="ERR_UNSUPPORTED_PROTOCOL",n}if(this._internals.username&&(i.username=this._internals.username,this._internals.username=""),this._internals.password&&(i.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(i.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),i.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let n=/(?<socketPath>.+?):(?<path>.+)/.exec(`${i.pathname}${i.search}`);if(n!=null&&n.groups){let{socketPath:o,path:s}=n.groups;this._unixOptions={socketPath:o,path:s,host:""};}else this._unixOptions=void 0;return}this._unixOptions=void 0;}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(fe.any([ie.object,ie.undefined],e),e===void 0){this._internals.cookieJar=void 0;return}let{setCookie:r,getCookieString:i}=e;fe.function_(r),fe.function_(i),r.length===4&&i.length===0?(r=util.promisify(r.bind(e)),i=util.promisify(i.bind(e)),this._internals.cookieJar={setCookie:r,getCookieString:i}):this._internals.cookieJar=e;}get signal(){return this._internals.signal}set signal(e){fe.object(e),this._internals.signal=e;}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){fe.boolean(e),this._internals.ignoreInvalidCookies=e;}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new Ju.URLSearchParams),this._internals.searchParams)}set searchParams(e){fe.any([ie.string,ie.object,ie.undefined],e);let r=this._internals.url;if(e===void 0){this._internals.searchParams=void 0,r&&(r.search="");return}let i=this.searchParams,n;if(ie.string(e))n=new Ju.URLSearchParams(e);else if(e instanceof Ju.URLSearchParams)n=e;else {M5(e),n=new Ju.URLSearchParams;for(let o in e){let s=e[o];s===null?n.append(o,""):s===void 0?i.delete(o):n.append(o,s);}}if(this._merging){for(let o of n.keys())i.delete(o);for(let[o,s]of n)i.append(o,s);}else r?r.search=i.toString():this._internals.searchParams=i;}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){fe.any([ie.function_,ie.undefined],e),this._internals.dnsLookup=e;}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){fe.any([ie.object,ie.boolean,ie.undefined],e),e===!0?this._internals.dnsCache=q5():e===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=e;}get context(){return this._internals.context}set context(e){fe.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e};}get hooks(){return this._internals.hooks}set hooks(e){fe.object(e);for(let r in e){if(!(r in this._internals.hooks))throw new Error(`Unexpected hook event: ${r}`);let i=r,n=e[i];if(fe.any([ie.array,ie.undefined],n),n)for(let o of n)fe.function_(o);if(this._merging)n&&this._internals.hooks[i].push(...n);else {if(!n)throw new Error(`Missing hook event: ${r}`);this._internals.hooks[r]=[...n];}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){fe.boolean(e),this._internals.followRedirect=e;}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){fe.number(e),this._internals.maxRedirects=e;}get cache(){return this._internals.cache}set cache(e){fe.any([ie.object,ie.string,ie.boolean,ie.undefined],e),e===!0?this._internals.cache=B5:e===!1?this._internals.cache=void 0:this._internals.cache=e;}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){fe.boolean(e),this._internals.throwHttpErrors=e;}get username(){let e=this._internals.url,r=e?e.username:this._internals.username;return decodeURIComponent(r)}set username(e){fe.string(e);let r=this._internals.url,i=encodeURIComponent(e);r?r.username=i:this._internals.username=i;}get password(){let e=this._internals.url,r=e?e.password:this._internals.password;return decodeURIComponent(r)}set password(e){fe.string(e);let r=this._internals.url,i=encodeURIComponent(e);r?r.password=i:this._internals.password=i;}get http2(){return this._internals.http2}set http2(e){fe.boolean(e),this._internals.http2=e;}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){fe.boolean(e),this._internals.allowGetBody=e;}get headers(){return this._internals.headers}set headers(e){fe.plainObject(e),this._merging?Object.assign(this._internals.headers,js(e)):this._internals.headers=js(e);}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){fe.boolean(e),this._internals.methodRewriting=e;}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(e!==void 0&&e!==4&&e!==6)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e;}get parseJson(){return this._internals.parseJson}set parseJson(e){fe.function_(e),this._internals.parseJson=e;}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){fe.function_(e),this._internals.stringifyJson=e;}get retry(){return this._internals.retry}set retry(e){if(fe.plainObject(e),fe.any([ie.function_,ie.undefined],e.calculateDelay),fe.any([ie.number,ie.undefined],e.maxRetryAfter),fe.any([ie.number,ie.undefined],e.limit),fe.any([ie.array,ie.undefined],e.methods),fe.any([ie.array,ie.undefined],e.statusCodes),fe.any([ie.array,ie.undefined],e.errorCodes),fe.any([ie.number,ie.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(let i in e)if(!(i in this._internals.retry))throw new Error(`Unexpected retry option: ${i}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};let{retry:r}=this._internals;r.methods=[...new Set(r.methods.map(i=>i.toUpperCase()))],r.statusCodes=[...new Set(r.statusCodes)],r.errorCodes=[...new Set(r.errorCodes)];}get localAddress(){return this._internals.localAddress}set localAddress(e){fe.any([ie.string,ie.undefined],e),this._internals.localAddress=e;}get method(){return this._internals.method}set method(e){fe.string(e),this._internals.method=e.toUpperCase();}get createConnection(){return this._internals.createConnection}set createConnection(e){fe.any([ie.function_,ie.undefined],e),this._internals.createConnection=e;}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){fe.plainObject(e),fe.any([ie.boolean,ie.undefined],e.shared),fe.any([ie.number,ie.undefined],e.cacheHeuristic),fe.any([ie.number,ie.undefined],e.immutableMinTimeToLive),fe.any([ie.boolean,ie.undefined],e.ignoreCargoCult);for(let r in e)if(!(r in this._internals.cacheOptions))throw new Error(`Cache option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e};}get https(){return this._internals.https}set https(e){fe.plainObject(e),fe.any([ie.boolean,ie.undefined],e.rejectUnauthorized),fe.any([ie.function_,ie.undefined],e.checkServerIdentity),fe.any([ie.string,ie.object,ie.array,ie.undefined],e.certificateAuthority),fe.any([ie.string,ie.object,ie.array,ie.undefined],e.key),fe.any([ie.string,ie.object,ie.array,ie.undefined],e.certificate),fe.any([ie.string,ie.undefined],e.passphrase),fe.any([ie.string,ie.buffer,ie.array,ie.undefined],e.pfx),fe.any([ie.array,ie.undefined],e.alpnProtocols),fe.any([ie.string,ie.undefined],e.ciphers),fe.any([ie.string,ie.buffer,ie.undefined],e.dhparam),fe.any([ie.string,ie.undefined],e.signatureAlgorithms),fe.any([ie.string,ie.undefined],e.minVersion),fe.any([ie.string,ie.undefined],e.maxVersion),fe.any([ie.boolean,ie.undefined],e.honorCipherOrder),fe.any([ie.number,ie.undefined],e.tlsSessionLifetime),fe.any([ie.string,ie.undefined],e.ecdhCurve),fe.any([ie.string,ie.buffer,ie.array,ie.undefined],e.certificateRevocationLists);for(let r in e)if(!(r in this._internals.https))throw new Error(`HTTPS option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e};}get encoding(){return this._internals.encoding}set encoding(e){if(e===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");fe.any([ie.string,ie.undefined],e),this._internals.encoding=e;}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){fe.boolean(e),this._internals.resolveBodyOnly=e;}get isStream(){return this._internals.isStream}set isStream(e){fe.boolean(e),this._internals.isStream=e;}get responseType(){return this._internals.responseType}set responseType(e){if(e===void 0){this._internals.responseType="text";return}if(e!=="text"&&e!=="buffer"&&e!=="json")throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e;}get pagination(){return this._internals.pagination}set pagination(e){fe.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e;}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){fe.boolean(e),this._internals.setHost=e;}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){fe.any([ie.number,ie.undefined],e),this._internals.maxHeaderSize=e;}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){fe.boolean(e),this._internals.enableUnixSockets=e;}toJSON(){return {...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,r){return util.inspect(this._internals,r)}createNativeRequestOptions(){var s,a,u;let e=this._internals,r=e.url,i;r.protocol==="https:"?i=e.http2?e.agent:e.agent.https:i=e.agent.http;let{https:n}=e,{pfx:o}=n;return ie.array(o)&&ie.plainObject(o[0])&&(o=o.map(l=>({buf:l.buffer,passphrase:l.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:n.alpnProtocols,ca:n.certificateAuthority,cert:n.certificate,key:n.key,passphrase:n.passphrase,pfx:n.pfx,rejectUnauthorized:n.rejectUnauthorized,checkServerIdentity:(s=n.checkServerIdentity)!=null?s:tls.checkServerIdentity,ciphers:n.ciphers,honorCipherOrder:n.honorCipherOrder,minVersion:n.minVersion,maxVersion:n.maxVersion,sigalgs:n.signatureAlgorithms,sessionTimeout:n.tlsSessionLifetime,dhparam:n.dhparam,ecdhCurve:n.ecdhCurve,crl:n.certificateRevocationLists,lookup:(u=e.dnsLookup)!=null?u:(a=e.dnsCache)==null?void 0:a.lookup,family:e.dnsLookupIpVersion,agent:i,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?V5(e):void 0,h2session:e.h2session}}getRequestFunction(){let e=this._internals.url,{request:r}=this._internals;return !r&&e?this.getFallbackRequestFunction():r}getFallbackRequestFunction(){let e=this._internals.url;if(e){if(e.protocol==="https:"){if(this._internals.http2){if(sx<15||sx===15&&k5<10){let r=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw r.code="EUNSUPPORTED",r}return ux.default.auto}return I5__default.default.request}return P5__default.default.request}}freeze(){let e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes);}};var Ws=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304},fl=class extends wt{constructor(e,r){let{options:i}=r.request;super(`${e.message} in "${i.url.toString()}"`,e,r.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE";}},Id=(t,e,r,i)=>{let{rawBody:n}=t;try{if(e==="text")return n.toString(i);if(e==="json")return n.length===0?"":r(n.toString(i));if(e==="buffer")return n}catch(o){throw new fl(o,t)}throw new fl({message:`Unknown body type '${e}'`,name:"Error"},t)};function $5(t){return t.writable&&!t.writableEnded}var lx=$5;function dl(t){return t.protocol==="unix:"||t.hostname==="unix"}var{buffer:Y5}=dx.default,Z5=ie.string(cx__default.default.versions.brotli),X5=new Set(["GET","HEAD"]),Md=new Qo,J5=new Set([300,301,302,303,304,307,308]),Q5=["socket","connect","continue","information","upgrade"],pl=()=>{},Wn=class t extends IO.Duplex{constructor(e,r,i){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=pl,this._triggerRead=!1,this._cancelTimeouts=pl,this._removeListeners=pl,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=pl,this.on("pipe",o=>{o!=null&&o.headers&&Object.assign(this.options.headers,o.headers);}),this.on("newListener",o=>{if(o==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new Fr(e,r,i),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url="";}this.requestUrl=this.options.url;}catch(o){let{options:s}=o;s&&(this.options=s),this.flush=async()=>{this.flush=async()=>{},this.destroy(o);};return}let{body:n}=this.options;if(ie.nodeStream(n)&&n.once("error",o=>{this._flushed?this._beforeError(new Ho(o,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new Ho(o,this));};}),this.options.signal){let o=()=>{this.destroy(new Yu(this));};this.options.signal.aborted?o():(this.options.signal.addEventListener("abort",o),this._removeListeners=()=>{this.options.signal.removeEventListener("abort",o);});}}async flush(){var e;if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){(e=this._request)==null||e.destroy();return}for(let r of this._jobs)r();this._jobs.length=0,this._requestInitialized=!0;}catch(r){this._beforeError(r);}}}_beforeError(e){if(this._stopReading)return;let{response:r,options:i}=this,n=this.retryCount+(e.name==="RetryError"?0:1);this._stopReading=!0,e instanceof wt||(e=new wt(e.message,e,this));let o=e;(async()=>{var s,a,u,l;if(r!=null&&r.readable&&!r.rawBody&&!((a=(s=this._request)==null?void 0:s.socket)!=null&&a.destroyed)&&(r.setEncoding(this.readableEncoding),await this._setRawBody(r)&&(r.body=r.rawBody.toString())),this.listenerCount("retry")!==0){let h;try{let c;r&&"retry-after"in r.headers&&(c=Number(r.headers["retry-after"]),Number.isNaN(c)?(c=Date.parse(r.headers["retry-after"])-Date.now(),c<=0&&(c=1)):c*=1e3);let p=i.retry;h=await p.calculateDelay({attemptCount:n,retryOptions:p,error:o,retryAfter:c,computedValue:Y1({attemptCount:n,retryOptions:p,error:o,retryAfter:c,computedValue:(l=(u=p.maxRetryAfter)!=null?u:i.timeout.request)!=null?l:Number.POSITIVE_INFINITY})});}catch(c){this._error(new wt(c.message,c,this));return}if(h){if(await new Promise(c=>{let p=setTimeout(c,h);this._stopRetry=()=>{clearTimeout(p),c();};}),this.destroyed)return;try{for(let c of this.options.hooks.beforeRetry)await c(o,this.retryCount+1);}catch(c){this._error(new wt(c.message,e,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,e,c=>{let p=new t(i.url,c,i);return p.retryCount=this.retryCount+1,cx__default.default.nextTick(()=>{p.flush();}),p});return}}this._error(o);})();}_read(){this._triggerRead=!0;let{response:e}=this;if(e&&!this._stopReading){e.readableLength&&(this._triggerRead=!1);let r;for(;(r=e.read())!==null;){this._downloadedSize+=r.length;let i=this.downloadProgress;i.percent<1&&this.emit("downloadProgress",i),this.push(r);}}}_write(e,r,i){let n=()=>{this._writeRequest(e,r,i);};this._requestInitialized?n():this._jobs.push(n);}_final(e){let r=()=>{if(!this._request||this._request.destroyed){e();return}this._request.end(i=>{var n;(n=this._request._writableState)!=null&&n.errored||(i||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(i));});};this._requestInitialized?r():this._jobs.push(r);}_destroy(e,r){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body:i}=this.options;ie.nodeStream(i)&&i.destroy();}this._request&&this._request.destroy(),e!==null&&!ie.undefined(e)&&!(e instanceof wt)&&(e=new wt(e.message,e,this)),r(e);}pipe(e,r){return e instanceof P5.ServerResponse&&this._pipedServerResponses.add(e),super.pipe(e,r)}unpipe(e){return e instanceof P5.ServerResponse&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){let{options:e}=this,{headers:r}=e,i=!ie.undefined(e.form),n=!ie.undefined(e.json),o=!ie.undefined(e.body),s=X5.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=s,i||n||o){if(s)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);let a=!ie.string(r["content-type"]);if(o){if(Vs(e.body)){let l=new il(e.body);a&&(r["content-type"]=l.headers["Content-Type"]),"Content-Length"in l.headers&&(r["content-length"]=l.headers["Content-Length"]),e.body=l.encode();}Zo(e.body)&&a&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`);}else if(i){a&&(r["content-type"]="application/x-www-form-urlencoded");let{form:l}=e;e.form=void 0,e.body=new Ju.URLSearchParams(l).toString();}else {a&&(r["content-type"]="application/json");let{json:l}=e;e.json=void 0,e.body=e.stringifyJson(l);}let u=await sd(e.body,e.headers);ie.undefined(r["content-length"])&&ie.undefined(r["transfer-encoding"])&&!s&&!ie.undefined(u)&&(r["content-length"]=String(u));}e.responseType==="json"&&!("accept"in e.headers)&&(e.headers.accept="application/json"),this._bodySize=Number(r["content-length"])||void 0;}async _onResponseBase(e){var a,u;if(this.isAborted)return;let{options:r}=this,{url:i}=r;this._nativeResponse=e,r.decompress&&(e=(0, fx.default)(e));let n=e.statusCode,o=e;o.statusMessage=(a=o.statusMessage)!=null?a:P5__default.default.STATUS_CODES[n],o.url=r.url.toString(),o.requestUrl=this.requestUrl,o.redirectUrls=this.redirectUrls,o.request=this,o.isFromCache=(u=this._nativeResponse.fromCache)!=null?u:!1,o.ip=this.ip,o.retryCount=this.retryCount,o.ok=Ws(o),this._isFromCache=o.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=o,e.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress);}),e.once("error",l=>{this._aborted=!0,e.destroy(),this._beforeError(new jo(l,this));}),e.once("aborted",()=>{this._aborted=!0,this._beforeError(new jo({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this));}),this.emit("downloadProgress",this.downloadProgress);let s=e.headers["set-cookie"];if(ie.object(r.cookieJar)&&s){let l=s.map(async h=>r.cookieJar.setCookie(h,i.toString()));r.ignoreInvalidCookies&&(l=l.map(async h=>{try{await h;}catch(c){}}));try{await Promise.all(l);}catch(h){this._beforeError(h);return}}if(!this.isAborted){if(r.followRedirect&&e.headers.location&&J5.has(n)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=r.maxRedirects){this._beforeError(new zu(this));return}this._request=void 0;let l=new Fr(void 0,void 0,this.options),h=n===303&&l.method!=="GET"&&l.method!=="HEAD",c=n!==307&&n!==308,p=l.methodRewriting&&c;(h||p)&&(l.method="GET",l.body=void 0,l.json=void 0,l.form=void 0,delete l.headers["content-length"]);try{let f=buffer.Buffer.from(e.headers.location,"binary").toString(),m=new Ju.URL(f,i);if(!dl(i)&&dl(m)){this._beforeError(new wt("Cannot redirect to UNIX socket",{},this));return}m.hostname!==i.hostname||m.port!==i.port?("host"in l.headers&&delete l.headers.host,"cookie"in l.headers&&delete l.headers.cookie,"authorization"in l.headers&&delete l.headers.authorization,(l.username||l.password)&&(l.username="",l.password="")):(m.username=l.username,m.password=l.password),this.redirectUrls.push(m),l.prefixUrl="",l.url=m;for(let _ of l.hooks.beforeRedirect)await _(l,o);this.emit("redirect",l,o),this.options=l,await this._makeRequest();}catch(f){this._beforeError(f);return}return}if(r.isStream&&r.throwHttpErrors&&!Ws(o)){this._beforeError(new $i(o));return}if(e.on("readable",()=>{this._triggerRead&&this._read();}),this.on("resume",()=>{e.resume();}),this.on("pause",()=>{e.pause();}),e.once("end",()=>{this.push(null);}),this._noPipe){await this._setRawBody()&&this.emit("response",e);return}this.emit("response",e);for(let l of this._pipedServerResponses)if(!l.headersSent){for(let h in e.headers){let c=r.decompress?h!=="content-encoding":!0,p=e.headers[h];c&&l.setHeader(h,p);}l.statusCode=n;}}}async _setRawBody(e=this){if(e.readableEnded)return !1;try{let r=await Y5(e);if(!this.isAborted)return this.response.rawBody=r,!0}catch(r){}return !1}async _onResponse(e){try{await this._onResponseBase(e);}catch(r){this._beforeError(r);}}_onRequest(e){let{options:r}=this,{timeout:i,url:n}=r;A1(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=ad(e,i,n);let o=r.cache?"cacheableResponse":"response";e.once(o,s=>{this._onResponse(s);}),e.once("error",s=>{this._aborted=!0,e.destroy(),s=s instanceof Jo?new Gu(s,this.timings,this):new wt(s.message,s,this),this._beforeError(s);}),this._unproxyEvents=Xo(e,this,Q5),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e);}async _asyncWrite(e){return new Promise((r,i)=>{super.write(e,n=>{if(n){i(n);return}r();});})}_sendBody(){var i;let{body:e}=this.options,r=this.redirectUrls.length===0?this:(i=this._request)!=null?i:this;ie.nodeStream(e)?e.pipe(r):ie.generator(e)||ie.asyncGenerator(e)?(async()=>{try{for await(let n of e)await this._asyncWrite(n);super.end();}catch(n){this._beforeError(n);}})():ie.undefined(e)?(this._cannotHaveBody||this._noPipe)&&r.end():(this._writeRequest(e,void 0,()=>{}),r.end());}_prepareCache(e){if(!Md.has(e)){let r=new M1((i,n)=>{let o=i._request(i,n);return ie.promise(o)&&(o.once=(s,a)=>{if(s==="error")(async()=>{try{await o;}catch(u){a(u);}})();else if(s==="abort")(async()=>{try{(await o).once("abort",a);}catch(u){}})();else throw new Error(`Unknown HTTP2 promise event: ${s}`);return o}),o},e);Md.set(e,r.request());}}async _createCacheableRequest(e,r){return new Promise((i,n)=>{Object.assign(r,ud(e));let o,s=Md.get(r.cache)(r,async a=>{if(a._readableState.autoDestroy=!1,o){let u=()=>{a.req&&(a.complete=a.req.res.complete);};a.prependOnceListener("end",u),u(),(await o).emit("cacheableResponse",a);}i(a);});s.once("error",n),s.once("request",async a=>{o=a,i(o);});})}async _makeRequest(){let{options:e}=this,{headers:r,username:i,password:n}=e,o=e.cookieJar;for(let l in r)if(ie.undefined(r[l]))delete r[l];else if(ie.null_(r[l]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${l}\` header`);if(e.decompress&&ie.undefined(r["accept-encoding"])&&(r["accept-encoding"]=Z5?"gzip, deflate, br":"gzip, deflate"),i||n){let l=buffer.Buffer.from(`${i}:${n}`).toString("base64");r.authorization=`Basic ${l}`;}if(o){let l=await o.getCookieString(e.url.toString());ie.nonEmptyString(l)&&(r.cookie=l);}e.prefixUrl="";let s;for(let l of e.hooks.beforeRequest){let h=await l(e);if(!ie.undefined(h)){s=()=>h;break}}s||(s=e.getRequestFunction());let a=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=s,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));let u=e.cache?this._createCacheableRequest:s;try{let l=u(a,this._requestOptions);ie.promise(l)&&(l=await l),ie.undefined(l)&&(l=e.getFallbackRequestFunction()(a,this._requestOptions),ie.promise(l)&&(l=await l)),lx(l)?this._onRequest(l):this.writable?(this.once("finish",()=>{this._onResponse(l);}),this._sendBody()):this._onResponse(l);}catch(l){throw l instanceof gi?new Ku(l,this):l}}async _error(e){try{if(!(e instanceof $i&&!this.options.throwHttpErrors))for(let r of this.options.hooks.beforeError)e=await r(e);}catch(r){e=new wt(r.message,r,this);}this.destroy(e);}_writeRequest(e,r,i){!this._request||this._request.destroyed||this._request.write(e,r,n=>{if(!n&&!this._request.destroyed){this._uploadedSize+=buffer.Buffer.byteLength(e,r);let o=this.uploadProgress;o.percent<1&&this.emit("uploadProgress",o);}i(n);});}get ip(){var e;return (e=this.socket)==null?void 0:e.remoteAddress}get isAborted(){return this._aborted}get socket(){var e,r;return (r=(e=this._request)==null?void 0:e.socket)!=null?r:void 0}get downloadProgress(){let e;return this._responseSize?e=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?e=1:e=0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return this._bodySize?e=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?e=1:e=0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){var e;return (e=this._request)==null?void 0:e.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){var e;return (e=this._request)==null?void 0:e.reusedSocket}};var ml=class extends wt{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED";}get isCanceled(){return !0}};var tL=["request","response","redirect","uploadProgress","downloadProgress"];function _l(t){let e,r,i,n=new LO.EventEmitter,o=new Hs((a,u,l)=>{l(()=>{e.destroy();}),l.shouldReject=!1,l(()=>{u(new ml(e));});let h=c=>{var _;l(()=>{});let p=t!=null?t:new Wn(void 0,void 0,i);p.retryCount=c,p._noPipe=!0,e=p,p.once("response",async x=>{var E;let v=((E=x.headers["content-encoding"])!=null?E:"").toLowerCase(),g=v==="gzip"||v==="deflate"||v==="br",{options:b}=p;if(g&&!b.decompress)x.body=x.rawBody;else try{x.body=Id(x,b.responseType,b.parseJson,b.encoding);}catch(w){if(x.body=x.rawBody.toString(),Ws(x)){p._beforeError(w);return}}try{let w=b.hooks.afterResponse;for(let[D,N]of w.entries())if(x=await N(x,async F=>{throw b.merge(F),b.prefixUrl="",F.url&&(b.url=F.url),b.hooks.afterResponse=b.hooks.afterResponse.slice(0,D),new Wu(p)}),!(ie.object(x)&&ie.number(x.statusCode)&&!ie.nullOrUndefined(x.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(w){p._beforeError(w);return}if(r=x,!Ws(x)){p._beforeError(new $i(x));return}p.destroy(),a(p.options.resolveBodyOnly?x.body:x);});let f=x=>{if(o.isCanceled)return;let{options:v}=p;if(x instanceof $i&&!v.throwHttpErrors){let{response:g}=x;p.destroy(),a(p.options.resolveBodyOnly?g.body:g);return}u(x);};p.once("error",f);let m=(_=p.options)==null?void 0:_.body;p.once("retry",(x,v)=>{t=void 0;let g=p.options.body;if(m===g&&ie.nodeStream(g)){v.message="Cannot retry with consumed body stream",f(v);return}i=p.options,h(x);}),Xo(p,n,tL),ie.undefined(t)&&p.flush();};h(0);});o.on=(a,u)=>(n.on(a,u),o),o.off=(a,u)=>(n.off(a,u),o);let s=a=>{let u=(async()=>{await o;let{options:l}=r.request;return Id(r,a,l.parseJson,l.encoding)})();return Object.defineProperties(u,Object.getOwnPropertyDescriptors(o)),u};return o.json=()=>{if(e.options){let{headers:a}=e.options;!e.writableFinished&&!("accept"in a)&&(a.accept="application/json");}return s("json")},o.buffer=()=>s("buffer"),o.text=()=>s("text"),o}var rL=async t=>new Promise(e=>{setTimeout(e,t);}),iL=t=>ie.function_(t),nL=["get","post","put","patch","head","delete"],px=t=>{t={options:new Fr(void 0,void 0,t.options),handlers:[...t.handlers],mutableDefaults:t.mutableDefaults},Object.defineProperty(t,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});let e=(i,n,o=t.options)=>{let s=new Wn(i,n,o),a,u=c=>(s.options=c,s._noPipe=!c.isStream,s.flush(),c.isStream?s:(a||(a=_l(s)),a)),l=0,h=c=>{var m;let f=((m=t.handlers[l++])!=null?m:u)(c,h);if(ie.promise(f)&&!s.options.isStream&&(a||(a=_l(s)),f!==a)){let _=Object.getOwnPropertyDescriptors(a);for(let x in _)x in f&&delete _[x];Object.defineProperties(f,_),f.cancel=a.cancel;}return f};return h(s.options)};e.extend=(...i)=>{let n=new Fr(void 0,void 0,t.options),o=[...t.handlers],s;for(let a of i)iL(a)?(n.merge(a.defaults.options),o.push(...a.defaults.handlers),s=a.defaults.mutableDefaults):(n.merge(a),a.handlers&&o.push(...a.handlers),s=a.mutableDefaults);return px({options:n,handlers:o,mutableDefaults:!!s})};let r=async function*(i,n){let o=new Fr(i,n,t.options);o.resolveBodyOnly=!1;let{pagination:s}=o;fe.function_(s.transform),fe.function_(s.shouldContinue),fe.function_(s.filter),fe.function_(s.paginate),fe.number(s.countLimit),fe.number(s.requestLimit),fe.number(s.backoff);let a=[],{countLimit:u}=s,l=0;for(;l<s.requestLimit;){l!==0&&await rL(s.backoff);let h=await e(void 0,void 0,o),c=await s.transform(h),p=[];fe.array(c);for(let m of c)if(s.filter({item:m,currentItems:p,allItems:a})&&(!s.shouldContinue({item:m,currentItems:p,allItems:a})||(yield m,s.stackAllItems&&a.push(m),p.push(m),--u<=0)))return;let f=s.paginate({response:h,currentItems:p,allItems:a});if(f===!1)return;f===h.request.options?o=h.request.options:(o.merge(f),fe.any([ie.urlInstance,ie.undefined],f.url),f.url!==void 0&&(o.prefixUrl="",o.url=f.url)),l++;}};e.paginate=r,e.paginate.all=async(i,n)=>{let o=[];for await(let s of r(i,n))o.push(s);return o},e.paginate.each=r,e.stream=(i,n)=>e(i,{...n,isStream:!0});for(let i of nL)e[i]=(n,o)=>e(n,{...o,method:i}),e.stream[i]=(n,o)=>e(n,{...o,method:i,isStream:!0});return t.mutableDefaults||(Object.freeze(t.handlers),t.options.freeze()),Object.defineProperty(e,"defaults",{value:t,writable:!1,configurable:!1,enumerable:!0}),e},mx=px;var sL={options:new Fr,handlers:[],mutableDefaults:!1},oL=mx(sL),Bd=oL;var qd=class extends LO__default.default{constructor(r,i){super();this.props=r;this.logger=i;}async verify(){try{this.logger.verbose(`Submitting verification for ${this.props.contractName} on address ${this.props.address} to ${this.props.apiUrl}`);let r=await this.__submit();if(this.logger.verbose(`Received response for ${this.props.contractName} on address ${this.props.address} to ${this.props.apiUrl}`),this.logger.verbose(JSON.stringify(r)),_x(r.result))return {alreadyVerified:!0};if(r.status!==1)throw new Error(`Verification failed with result "${r.result}", status ${r.status} (${r.message})`);let i=r.result;if(i==null)throw new Error(`Missing GUID from the response: ${r}`);return await this.__poll(i)}catch(r){throw new Error(`Verification error: ${r}`)}}async __submit(){let r=cL(this.props);return this.logger.verbose(`Sending verification request to ${this.props.apiUrl}:
|
|
467
|
+
|
|
468
|
+
${JSON.stringify(r)}`),await x1(async()=>{let i=await lL(this.props.apiUrl,r);if(this.logger.verbose(`Received raw response from ${this.props.apiUrl}:
|
|
469
|
+
|
|
470
|
+
${JSON.stringify(i)}`),gx(i.result))throw new Error("API Rate limit has been exceeded");return i},3,async(i,n)=>{this.emit("retry",i,n),await $u(2e3);})}async __poll(r){for(;;){this.emit("poll",r);let i=await hL(this.props.apiUrl,r);if(this.logger.verbose(`Received raw polling response from ${this.props.apiUrl}:
|
|
471
|
+
|
|
472
|
+
${JSON.stringify(i)}`),i.status===1)return {alreadyVerified:!1};if(_x(i.result))return {alreadyVerified:!0};if(uL(i.result)){await $u(1e4);continue}if(gx(i.result)){await $u(1e4);continue}throw new Error(`Verification failed with result "${i.result}", status ${i.status} (${i.message})`)}}},yx=(t,e)=>new qd(t,e),uL=t=>!!(t!=null&&t.match(/Pending/gi)),_x=t=>!!(t!=null&&t.match(/already verified/gi)),gx=t=>!!(t!=null&&t.match(/rate/)),lL=async(t,e)=>{try{let r=await Bd(t,{method:"POST",form:e,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).json();return xx.parse(r)}catch(r){throw new Error(`Failed to submit verification request: ${r}`)}},hL=async(t,e)=>{let r=new URL(t);r.searchParams.set("module","contract"),r.searchParams.set("action","checkverifystatus"),r.searchParams.set("guid",e);try{let i=await Bd(r).json();return xx.parse(i)}catch(i){throw new Error(`Failed to check verification status: ${i}`)}},cL=({apiKey:t,address:e,contractName:r,constructorArguments:i,compilerVersion:n,optimizerRuns:o=0,sourceCode:s,evmVersion:a,licenseType:u})=>{let l={action:"verifysourcecode",module:"contract",codeformat:"solidity-standard-json-input",contractaddress:e,contractname:r,compilerversion:`v${n}`,optimizationUsed:o>0?"1":"0",sourceCode:s};return t!=null&&(l.apikey=t),o!=null&&(l.runs=String(o)),i!=null&&(l.constructorArguements=i),a!=null&&(l.evmversion=a),u!=null&&(l.licenseType=String(u)),l},xx=Pe.object({status:Pe.coerce.number().nullish(),message:Pe.string().nullish(),result:Pe.string().nullish()});var Ma=$t(Io());Pe.object({enabled:Pe.boolean().optional(),runs:Pe.number().optional()});Pe.record(Pe.string(),Pe.object({content:Pe.string()}));var fL=Pe.array(Pe.record(Pe.string(),Pe.any())),dL=Pe.object({language:Pe.string(),compiler:Pe.object({version:Pe.string()}),settings:Pe.object({compilationTarget:Pe.record(Pe.string(),Pe.string()),evmVersion:Pe.string(),optimizer:Pe.object({enabled:Pe.boolean().optional(),runs:Pe.number().optional()})}),sources:Pe.record(Pe.string(),Pe.object({content:Pe.string()}))}),Hd=Pe.object({address:Pe.string(),abi:fL,args:Pe.array(Pe.any()),solcInputHash:Pe.string(),metadata:Pe.string().transform((t,e)=>{try{return JSON.parse(t)}catch(r){return e.addIssue({code:"custom",message:"Invalid JSON"}),Pe.NEVER}}).pipe(dL),bytecode:Pe.string(),deployedBytecode:Pe.string()});var jd=t=>{let{compilationTarget:e,...r}=t.settings,i=Object.entries(t.sources).reduce((n,[o,s])=>({...n,[o]:{content:s.content}}),{});return {language:t.language,settings:r,sources:i}};var Ix=$t(Ex());var bx="logger/5.7.0";var Tx=!1,Cx=!1,gl={debug:1,default:2,info:2,warning:3,error:4,off:5},Ax=gl.default,Vd=null;function pL(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch(r){t.push(e);}}),t.length)throw new Error("missing "+t.join(", "));if("\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken implementation")}catch(t){return t.message}return null}var wx=pL(),$d;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF";})($d||($d={}));var qr;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED";})(qr||(qr={}));var Dx="0123456789abcdef",Ie=class t{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1});}_log(e,r){let i=e.toLowerCase();gl[i]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Ax>gl[i])&&console.log.apply(console,r);}debug(...e){this._log(t.levels.DEBUG,e);}info(...e){this._log(t.levels.INFO,e);}warn(...e){this._log(t.levels.WARNING,e);}makeError(e,r,i){if(Cx)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),i||(i={});let n=[];Object.keys(i).forEach(u=>{let l=i[u];try{if(l instanceof Uint8Array){let h="";for(let c=0;c<l.length;c++)h+=Dx[l[c]>>4],h+=Dx[l[c]&15];n.push(u+"=Uint8Array(0x"+h+")");}else n.push(u+"="+JSON.stringify(l));}catch(h){n.push(u+"="+JSON.stringify(i[u].toString()));}}),n.push(`code=${r}`),n.push(`version=${this.version}`);let o=e,s="";switch(r){case qr.NUMERIC_FAULT:{s="NUMERIC_FAULT";let u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result";break}break}case qr.CALL_EXCEPTION:case qr.INSUFFICIENT_FUNDS:case qr.MISSING_NEW:case qr.NONCE_EXPIRED:case qr.REPLACEMENT_UNDERPRICED:case qr.TRANSACTION_REPLACED:case qr.UNPREDICTABLE_GAS_LIMIT:s=r;break}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let a=new Error(e);return a.reason=o,a.code=r,Object.keys(i).forEach(function(u){a[u]=i[u];}),a}throwError(e,r,i){throw this.makeError(e,r,i)}throwArgumentError(e,r,i){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:i})}assert(e,r,i,n){e||this.throwError(r,i,n);}assertArgument(e,r,i,n){e||this.throwArgumentError(r,i,n);}checkNormalize(e){wx&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:wx});}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}));}checkArgumentCount(e,r,i){i?i=": "+i:i="",e<r&&this.throwError("missing argument"+i,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+i,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r});}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name});}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name});}static globalLogger(){return Vd||(Vd=new t(bx)),Vd}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Tx){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"});}Cx=!!e,Tx=!!r;}static setLogLevel(e){let r=gl[e.toLowerCase()];if(r==null){t.globalLogger().warn("invalid log level - "+e);return}Ax=r;}static from(e){return new t(e)}};Ie.errors=qr;Ie.levels=$d;var Sx="bytes/5.7.0";var yi=new Ie(Sx);function Nx(t){return !!t.toHexString}function aa(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return aa(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Rx(t){return typeof t=="number"&&t==t&&t%1===0}function yl(t){if(t==null)return !1;if(t.constructor===Uint8Array)return !0;if(typeof t=="string"||!Rx(t.length)||t.length<0)return !1;for(let e=0;e<t.length;e++){let r=t[e];if(!Rx(r)||r<0||r>=256)return !1}return !0}function Lt(t,e){if(e||(e={}),typeof t=="number"){yi.checkSafeUint53(t,"invalid arrayify value");let r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),aa(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Nx(t)&&(t=t.toHexString()),hr(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":yi.throwArgumentError("hex data is odd-length","value",t));let i=[];for(let n=0;n<r.length;n+=2)i.push(parseInt(r.substring(n,n+2),16));return aa(new Uint8Array(i))}return yl(t)?aa(new Uint8Array(t)):yi.throwArgumentError("invalid arrayify value","value",t)}function xi(t){let e=t.map(n=>Lt(n)),r=e.reduce((n,o)=>n+o.length,0),i=new Uint8Array(r);return e.reduce((n,o)=>(i.set(o,n),n+o.length),0),aa(i)}function hr(t,e){return !(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}var zd="0123456789abcdef";function Dt(t,e){if(e||(e={}),typeof t=="number"){yi.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=zd[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Nx(t))return t.toHexString();if(hr(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":yi.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(yl(t)){let r="0x";for(let i=0;i<t.length;i++){let n=t[i];r+=zd[(n&240)>>4]+zd[n&15];}return r}return yi.throwArgumentError("invalid hexlify value","value",t)}function Kd(t,e,r){return typeof t!="string"?t=Dt(t):(!hr(t)||t.length%2)&&yi.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Ox(t){let e="0x";return t.forEach(r=>{e+=Dt(r).substring(2);}),e}function xl(t,e){for(typeof t!="string"?t=Dt(t):hr(t)||yi.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&yi.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}var Fx="bignumber/5.7.0";var vl=Ix.default.BN,vi=new Ie(Fx),Gd={},Lx=9007199254740991;var Px=!1,St=class t{constructor(e,r){e!==Gd&&vi.throwError("cannot call constructor directly; use BigNumber.from",Ie.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this);}fromTwos(e){return cr(Ke(this).fromTwos(e))}toTwos(e){return cr(Ke(this).toTwos(e))}abs(){return this._hex[0]==="-"?t.from(this._hex.substring(1)):this}add(e){return cr(Ke(this).add(Ke(e)))}sub(e){return cr(Ke(this).sub(Ke(e)))}div(e){return t.from(e).isZero()&&Lr("division-by-zero","div"),cr(Ke(this).div(Ke(e)))}mul(e){return cr(Ke(this).mul(Ke(e)))}mod(e){let r=Ke(e);return r.isNeg()&&Lr("division-by-zero","mod"),cr(Ke(this).umod(r))}pow(e){let r=Ke(e);return r.isNeg()&&Lr("negative-power","pow"),cr(Ke(this).pow(r))}and(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Lr("unbound-bitwise-result","and"),cr(Ke(this).and(r))}or(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Lr("unbound-bitwise-result","or"),cr(Ke(this).or(r))}xor(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Lr("unbound-bitwise-result","xor"),cr(Ke(this).xor(r))}mask(e){return (this.isNegative()||e<0)&&Lr("negative-width","mask"),cr(Ke(this).maskn(e))}shl(e){return (this.isNegative()||e<0)&&Lr("negative-width","shl"),cr(Ke(this).shln(e))}shr(e){return (this.isNegative()||e<0)&&Lr("negative-width","shr"),cr(Ke(this).shrn(e))}eq(e){return Ke(this).eq(Ke(e))}lt(e){return Ke(this).lt(Ke(e))}lte(e){return Ke(this).lte(Ke(e))}gt(e){return Ke(this).gt(Ke(e))}gte(e){return Ke(this).gte(Ke(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Ke(this).isZero()}toNumber(){try{return Ke(this).toNumber()}catch(e){Lr("overflow","toNumber",this.toString());}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return vi.throwError("this platform does not support BigInt",Ie.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Px||(Px=!0,vi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?vi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Ie.errors.UNEXPECTED_ARGUMENT,{}):vi.throwError("BigNumber.toString does not accept parameters",Ie.errors.UNEXPECTED_ARGUMENT,{})),Ke(this).toString(10)}toHexString(){return this._hex}toJSON(e){return {type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof t)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new t(Gd,ua(e)):e.match(/^-?[0-9]+$/)?new t(Gd,ua(new vl(e))):vi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Lr("underflow","BigNumber.from",e),(e>=Lx||e<=-Lx)&&Lr("overflow","BigNumber.from",e),t.from(String(e));let r=e;if(typeof r=="bigint")return t.from(r.toString());if(yl(r))return t.from(Dt(r));if(r)if(r.toHexString){let i=r.toHexString();if(typeof i=="string")return t.from(i)}else {let i=r._hex;if(i==null&&r.type==="BigNumber"&&(i=r.hex),typeof i=="string"&&(hr(i)||i[0]==="-"&&hr(i.substring(1))))return t.from(i)}return vi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return !!(e&&e._isBigNumber)}};function ua(t){if(typeof t!="string")return ua(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&vi.throwArgumentError("invalid hex","value",t),t=ua(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return "0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function cr(t){return St.from(ua(t))}function Ke(t){let e=St.from(t).toHexString();return e[0]==="-"?new vl("-"+e.substring(3),16):new vl(e.substring(2),16)}function Lr(t,e,r){let i={fault:t,operation:e};return r!=null&&(i.value=r),vi.throwError(t,Ie.errors.NUMERIC_FAULT,i)}function Wd(t){return new vl(t,36).toString(16)}var kx="properties/5.7.0";var Mx=new Ie(kx);function kt(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1});}function la(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor;}return null}var _L={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Bx(t){if(t==null||_L[typeof t])return !0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return !1;let e=Object.keys(t);for(let r=0;r<e.length;r++){let i=null;try{i=t[e[r]];}catch(n){continue}if(!Bx(i))return !1}return !0}return Mx.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function gL(t){if(Bx(t))return t;if(Array.isArray(t))return Object.freeze(t.map(e=>Yd(e)));if(typeof t=="object"){let e={};for(let r in t){let i=t[r];i!==void 0&&kt(e,r,Yd(i));}return e}return Mx.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Yd(t){return gL(t)}var Yn=class{constructor(e){for(let r in e)this[r]=Yd(e[r]);}};var Zr="abi/5.7.0";var Ge=new Ie(Zr),Zn={},qx={calldata:!0,memory:!0,storage:!0},yL={calldata:!0,memory:!0};function El(t,e){if(t==="bytes"||t==="string"){if(qx[e])return !0}else if(t==="address"){if(e==="payable")return !0}else if((t.indexOf("[")>=0||t==="tuple")&&yL[e])return !0;return (qx[e]||e==="payable")&&Ge.throwArgumentError("invalid modifier","name",e),!1}function xL(t,e){let r=t;function i(a){Ge.throwArgumentError(`unexpected character at position ${a}`,"param",t);}t=t.replace(/\s/g," ");function n(a){let u={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(u.indexed=!1),u}let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;a<t.length;a++){let u=t[a];switch(u){case"(":s.state.allowType&&s.type===""?s.type="tuple":s.state.allowParams||i(a),s.state.allowType=!1,s.type=Ys(s.type),s.components=[n(s)],s=s.components[0];break;case")":delete s.state,s.name==="indexed"&&(e||i(a),s.indexed=!0,s.name=""),El(s.type,s.name)&&(s.name=""),s.type=Ys(s.type);let l=s;s=s.parent,s||i(a),delete l.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,s.name==="indexed"&&(e||i(a),s.indexed=!0,s.name=""),El(s.type,s.name)&&(s.name=""),s.type=Ys(s.type);let h=n(s.parent);s.parent.components.push(h),delete s.parent,s=h;break;case" ":s.state.allowType&&s.type!==""&&(s.type=Ys(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&s.name!==""&&(s.name==="indexed"?(e||i(a),s.indexed&&i(a),s.indexed=!0,s.name=""):El(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||i(a),s.type+=u,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||i(a),s.type+=u,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=u,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=u,delete s.state.allowArray):s.state.readArray?s.type+=u:i(a);}}return s.parent&&Ge.throwArgumentError("unexpected eof","param",t),delete o.state,s.name==="indexed"?(e||i(r.length-7),s.indexed&&i(r.length-7),s.indexed=!0,s.name=""):El(s.type,s.name)&&(s.name=""),o.type=Ys(o.type),o}function bl(t,e){for(let r in e)kt(t,r,e[r]);}var Ye=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),vL=new RegExp(/^(.*)\[([0-9]*)\]$/),fr=class t{constructor(e,r){e!==Zn&&Ge.throwError("use fromString",Ie.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),bl(this,r);let i=this.type.match(vL);i?bl(this,{arrayLength:parseInt(i[2]||"-1"),arrayChildren:t.fromObject({type:i[1],components:this.components}),baseType:"array"}):bl(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type}),this._isParamType=!0,Object.freeze(this);}format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json){let i={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.components&&(i.components=this.components.map(n=>JSON.parse(n.format(e)))),JSON.stringify(i)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Ye.sighash&&(r+=this.type),r+="("+this.components.map(i=>i.format(e)).join(e===Ye.full?", ":",")+")"):r+=this.type,e!==Ye.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Ye.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?t.fromString(e,r):t.fromObject(e)}static fromObject(e){return t.isParamType(e)?e:new t(Zn,{name:e.name||null,type:Ys(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(t.fromObject):null})}static fromString(e,r){function i(n){return t.fromObject({name:n.name,type:n.type,indexed:n.indexed,components:n.components})}return i(xL(e,!!r))}static isParamType(e){return !!(e!=null&&e._isParamType)}};function ha(t,e){return bL(t).map(r=>fr.fromString(r,e))}var Xn=class t{constructor(e,r){e!==Zn&&Ge.throwError("use a static from method",Ie.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),bl(this,r),this._isFragment=!0,Object.freeze(this);}static from(e){return t.isFragment(e)?e:typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isFragment(e))return e;switch(e.type){case"function":return Qn.fromObject(e);case"event":return Zs.fromObject(e);case"constructor":return Jn.fromObject(e);case"error":return Tl.fromObject(e);case"fallback":case"receive":return null}return Ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Zs.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Qn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Jn.fromString(e.trim()):e.split(" ")[0]==="error"?Tl.fromString(e.substring(5).trim()):Ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return !!(e&&e._isFragment)}},Zs=class t extends Xn{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",e!==Ye.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isEventFragment(e))return e;e.type!=="event"&&Ge.throwArgumentError("invalid event object","value",e);let r={name:ca(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(fr.fromObject):[],type:"event"};return new t(Zn,r)}static fromString(e){let r=e.match(fa);r||Ge.throwArgumentError("invalid event string","value",e);let i=!1;return r[3].split(" ").forEach(n=>{switch(n.trim()){case"anonymous":i=!0;break;case"":break;default:Ge.warn("unknown modifier: "+n);}}),t.fromObject({name:r[1].trim(),anonymous:i,inputs:ha(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function jx(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ge.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ge.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=St.from(r[1]),r[0]):t}function Ux(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r);}});}function Vx(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Ge.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Ge.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Ge.throwArgumentError("unable to determine stateMutability","value",t),e}var Jn=class t extends Xn{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});e===Ye.sighash&&Ge.throwError("cannot format a constructor for sighash",Ie.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isConstructorFragment(e))return e;e.type!=="constructor"&&Ge.throwArgumentError("invalid constructor object","value",e);let r=Vx(e);r.constant&&Ge.throwArgumentError("constructor cannot be constant","value",e);let i={name:null,type:e.type,inputs:e.inputs?e.inputs.map(fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?St.from(e.gas):null};return new t(Zn,i)}static fromString(e){let r={type:"constructor"};e=jx(e,r);let i=e.match(fa);return (!i||i[1].trim()!=="constructor")&&Ge.throwArgumentError("invalid constructor string","value",e),r.inputs=ha(i[2].trim(),!1),Ux(i[3].trim(),r),t.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},Qn=class t extends Jn{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e))),outputs:this.outputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",e!==Ye.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(i=>i.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isFunctionFragment(e))return e;e.type!=="function"&&Ge.throwArgumentError("invalid function object","value",e);let r=Vx(e),i={type:e.type,name:ca(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(fr.fromObject):[],outputs:e.outputs?e.outputs.map(fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?St.from(e.gas):null};return new t(Zn,i)}static fromString(e){let r={type:"function"};e=jx(e,r);let i=e.split(" returns ");i.length>2&&Ge.throwArgumentError("invalid function string","value",e);let n=i[0].match(fa);if(n||Ge.throwArgumentError("invalid function signature","value",e),r.name=n[1].trim(),r.name&&ca(r.name),r.inputs=ha(n[2],!1),Ux(n[3].trim(),r),i.length>1){let o=i[1].match(fa);(o[1].trim()!=""||o[3].trim()!="")&&Ge.throwArgumentError("unexpected tokens","value",e),r.outputs=ha(o[2],!1);}else r.outputs=[];return t.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function Hx(t){let e=t.format();return (e==="Error(string)"||e==="Panic(uint256)")&&Ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}var Tl=class t extends Xn{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isErrorFragment(e))return e;e.type!=="error"&&Ge.throwArgumentError("invalid error object","value",e);let r={type:e.type,name:ca(e.name),inputs:e.inputs?e.inputs.map(fr.fromObject):[]};return Hx(new t(Zn,r))}static fromString(e){let r={type:"error"},i=e.match(fa);return i||Ge.throwArgumentError("invalid error signature","value",e),r.name=i[1].trim(),r.name&&ca(r.name),r.inputs=ha(i[2],!1),Hx(t.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Ys(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}var EL=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function ca(t){return (!t||!t.match(EL))&&Ge.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}var fa=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function bL(t){t=t.trim();let e=[],r="",i=0;for(let n=0;n<t.length;n++){let o=t[n];o===","&&i===0?(e.push(r),r=""):(r+=o,o==="("?i++:o===")"&&(i--,i===-1&&Ge.throwArgumentError("unbalanced parenthesis","value",t)));}return r&&e.push(r),e}var Zd=new Ie(Zr);var qt=class{constructor(e,r,i,n){this.name=e,this.type=r,this.localName=i,this.dynamic=n;}_throwError(e,r){Zd.throwArgumentError(e,this.localName,r);}},es=class{constructor(e){kt(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e);}get data(){return Ox(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(xi(e._data))}writeBytes(e){let r=Lt(e),i=r.length%this.wordSize;return i&&(r=xi([r,this._padding.slice(i)])),this._writeData(r)}_getValue(e){let r=Lt(St.from(e));return r.length>this.wordSize&&Zd.throwError("value out-of-bounds",Ie.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=xi([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r);}}},Cl=class t{constructor(e,r,i,n){kt(this,"_data",Lt(e)),kt(this,"wordSize",r||32),kt(this,"_coerceFunc",i),kt(this,"allowLoose",n),this._offset=0;}get data(){return Dt(this._data)}get consumed(){return this._offset}static coerce(e,r){let i=e.match("^u?int([0-9]+)$");return i&&parseInt(i[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):t.coerce(e,r)}_peekBytes(e,r,i){let n=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&i&&this._offset+r<=this._data.length?n=r:Zd.throwError("data out-of-bounds",Ie.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new t(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let i=this._peekBytes(0,e,!!r);return this._offset+=i.length,i.slice(0,e)}readValue(){return St.from(this.readBytes(this.wordSize))}};var zx=$t($x());function ts(t){return "0x"+zx.default.keccak_256(Lt(t))}var Kx="address/5.7.0";var da=new Ie(Kx);function Gx(t){hr(t,20)||da.throwArgumentError("invalid address","address",t),t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=e[n].charCodeAt(0);let i=Lt(ts(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(i[n>>1]&15)>=8&&(e[n+1]=e[n+1].toUpperCase());return "0x"+e.join("")}var TL=9007199254740991;function CL(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}var Xd={};for(let t=0;t<10;t++)Xd[String(t)]=String(t);for(let t=0;t<26;t++)Xd[String.fromCharCode(65+t)]=String(10+t);var Wx=Math.floor(CL(TL));function AL(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(i=>Xd[i]).join("");for(;e.length>=Wx;){let i=e.substring(0,Wx);e=parseInt(i,10)%97+e.substring(i.length);}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function pa(t){let e=null;if(typeof t!="string"&&da.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Gx(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&da.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==AL(t)&&da.throwArgumentError("bad icap checksum","address",t),e=Wd(t.substring(4));e.length<40;)e="0"+e;e=Gx("0x"+e);}else da.throwArgumentError("invalid address","address",t);return e}var wl=class extends qt{constructor(e){super("address","address",e,!1);}defaultValue(){return "0x0000000000000000000000000000000000000000"}encode(e,r){try{r=pa(r);}catch(i){this._throwError(i.message,r);}return e.writeValue(r)}decode(e){return pa(xl(e.readValue().toHexString(),20))}};var Dl=class extends qt{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e;}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}};var Xs=new Ie(Zr);function Jd(t,e,r){let i=null;if(Array.isArray(r))i=r;else if(r&&typeof r=="object"){let u={};i=e.map(l=>{let h=l.localName;return h||Xs.throwError("cannot encode object for signature with missing names",Ie.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),u[h]&&Xs.throwError("cannot encode object for signature with duplicate names",Ie.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),u[h]=!0,r[h]});}else Xs.throwArgumentError("invalid tuple value","tuple",r);e.length!==i.length&&Xs.throwArgumentError("types/value length mismatch","tuple",r);let n=new es(t.wordSize),o=new es(t.wordSize),s=[];e.forEach((u,l)=>{let h=i[l];if(u.dynamic){let c=o.length;u.encode(o,h);let p=n.writeUpdatableValue();s.push(f=>{p(f+c);});}else u.encode(n,h);}),s.forEach(u=>{u(n.length);});let a=t.appendWriter(n);return a+=t.appendWriter(o),a}function Qd(t,e){let r=[],i=t.subReader(0);e.forEach(o=>{let s=null;if(o.dynamic){let a=t.readValue(),u=i.subReader(a.toNumber());try{s=o.decode(u);}catch(l){if(l.code===Ie.errors.BUFFER_OVERRUN)throw l;s=l,s.baseType=o.name,s.name=o.localName,s.type=o.type;}}else try{s=o.decode(t);}catch(a){if(a.code===Ie.errors.BUFFER_OVERRUN)throw a;s=a,s.baseType=o.name,s.name=o.localName,s.type=o.type;}s!=null&&r.push(s);});let n=e.reduce((o,s)=>{let a=s.localName;return a&&(o[a]||(o[a]=0),o[a]++),o},{});e.forEach((o,s)=>{let a=o.localName;if(!a||n[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;let u=r[s];u instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw u}}):r[a]=u;});for(let o=0;o<r.length;o++){let s=r[o];s instanceof Error&&Object.defineProperty(r,o,{enumerable:!0,get:()=>{throw s}});}return Object.freeze(r)}var Sl=class extends qt{constructor(e,r,i){let n=e.type+"["+(r>=0?r:"")+"]",o=r===-1||e.dynamic;super("array",n,i,o),this.coder=e,this.length=r;}defaultValue(){let e=this.coder.defaultValue(),r=[];for(let i=0;i<this.length;i++)r.push(e);return r}encode(e,r){Array.isArray(r)||this._throwError("expected array value",r);let i=this.length;i===-1&&(i=r.length,e.writeValue(r.length)),Xs.checkArgumentCount(r.length,i,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let o=0;o<r.length;o++)n.push(this.coder);return Jd(e,n,r)}decode(e){let r=this.length;r===-1&&(r=e.readValue().toNumber(),r*32>e._data.length&&Xs.throwError("insufficient data length",Ie.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let i=[];for(let n=0;n<r;n++)i.push(new Dl(this.coder));return e.coerce(this.name,Qd(e,i))}};var Rl=class extends qt{constructor(e){super("bool","bool",e,!1);}defaultValue(){return !1}encode(e,r){return e.writeValue(r?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}};var ma=class extends qt{constructor(e,r){super(e,e,r,!0);}defaultValue(){return "0x"}encode(e,r){r=Lt(r);let i=e.writeValue(r.length);return i+=e.writeBytes(r),i}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}},Nl=class extends ma{constructor(e){super("bytes",e);}decode(e){return e.coerce(this.name,Dt(super.decode(e)))}};var Ol=class extends qt{constructor(e,r){let i="bytes"+String(e);super(i,i,r,!1),this.size=e;}defaultValue(){return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let i=Lt(r);return i.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(i)}decode(e){return e.coerce(this.name,Dt(e.readBytes(this.size)))}};var Fl=class extends qt{constructor(e){super("null","",e,!1);}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}};var e0=St.from(-1),t0=St.from(0),r0=St.from(1);var i0=St.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Ll=class extends qt{constructor(e,r,i){let n=(r?"int":"uint")+e*8;super(n,n,i,!1),this.size=e,this.signed=r;}defaultValue(){return 0}encode(e,r){let i=St.from(r),n=i0.mask(e.wordSize*8);if(this.signed){let o=n.mask(this.size*8-1);(i.gt(o)||i.lt(o.add(r0).mul(e0)))&&this._throwError("value out-of-bounds",r);}else (i.lt(t0)||i.gt(n.mask(this.size*8)))&&this._throwError("value out-of-bounds",r);return i=i.toTwos(this.size*8).mask(this.size*8),this.signed&&(i=i.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(i)}decode(e){let r=e.readValue().mask(this.size*8);return this.signed&&(r=r.fromTwos(this.size*8)),e.coerce(this.name,r)}};var Yx="strings/5.7.0";var Zx=new Ie(Yx),_a;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD";})(_a||(_a={}));var dr;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation";})(dr||(dr={}));function wL(t,e,r,i,n){return Zx.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function Xx(t,e,r,i,n){if(t===dr.BAD_PREFIX||t===dr.UNEXPECTED_CONTINUE){let o=0;for(let s=e+1;s<r.length&&r[s]>>6===2;s++)o++;return o}return t===dr.OVERRUN?r.length-e-1:0}function DL(t,e,r,i,n){return t===dr.OVERLONG?(i.push(n),0):(i.push(65533),Xx(t,e,r))}var Jx=Object.freeze({error:wL,ignore:Xx,replace:DL});function SL(t,e){e==null&&(e=Jx.error),t=Lt(t);let r=[],i=0;for(;i<t.length;){let n=t[i++];if(!(n>>7)){r.push(n);continue}let o=null,s=null;if((n&224)===192)o=1,s=127;else if((n&240)===224)o=2,s=2047;else if((n&248)===240)o=3,s=65535;else {(n&192)===128?i+=e(dr.UNEXPECTED_CONTINUE,i-1,t,r):i+=e(dr.BAD_PREFIX,i-1,t,r);continue}if(i-1+o>=t.length){i+=e(dr.OVERRUN,i-1,t,r);continue}let a=n&(1<<8-o-1)-1;for(let u=0;u<o;u++){let l=t[i];if((l&192)!=128){i+=e(dr.MISSING_CONTINUE,i,t,r),a=null;break}a=a<<6|l&63,i++;}if(a!==null){if(a>1114111){i+=e(dr.OUT_OF_RANGE,i-1-o,t,r,a);continue}if(a>=55296&&a<=57343){i+=e(dr.UTF16_SURROGATE,i-1-o,t,r,a);continue}if(a<=s){i+=e(dr.OVERLONG,i-1-o,t,r,a);continue}r.push(a);}}return r}function ga(t,e=_a.current){e!=_a.current&&(Zx.checkNormalize(),t=t.normalize(e));let r=[];for(let i=0;i<t.length;i++){let n=t.charCodeAt(i);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(n&63|128);else if((n&64512)==55296){i++;let o=t.charCodeAt(i);if(i>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((n&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128);}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(n&63|128);}return Lt(r)}function RL(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function n0(t,e){return RL(SL(t,e))}var Pl=class extends ma{constructor(e){super("string",e);}defaultValue(){return ""}encode(e,r){return super.encode(e,ga(r))}decode(e){return n0(super.decode(e))}};var rs=class extends qt{constructor(e,r){let i=!1,n=[];e.forEach(s=>{s.dynamic&&(i=!0),n.push(s.type);});let o="tuple("+n.join(",")+")";super("tuple",o,r,i),this.coders=e;}defaultValue(){let e=[];this.coders.forEach(i=>{e.push(i.defaultValue());});let r=this.coders.reduce((i,n)=>{let o=n.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,n)=>{let o=i.localName;!o||r[o]!==1||(o==="length"&&(o="_length"),e[o]==null&&(e[o]=e[n]));}),Object.freeze(e)}encode(e,r){return Jd(e,this.coders,r)}decode(e){return e.coerce(this.name,Qd(e,this.coders))}};var Il=new Ie(Zr),NL=new RegExp(/^bytes([0-9]*)$/),OL=new RegExp(/^(u?int)([0-9]*)$/),s0=class{constructor(e){kt(this,"coerceFunc",e||null);}_getCoder(e){switch(e.baseType){case"address":return new wl(e.name);case"bool":return new Rl(e.name);case"string":return new Pl(e.name);case"bytes":return new Nl(e.name);case"array":return new Sl(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new rs((e.components||[]).map(i=>this._getCoder(i)),e.name);case"":return new Fl(e.name)}let r=e.type.match(OL);if(r){let i=parseInt(r[2]||"256");return (i===0||i>256||i%8!==0)&&Il.throwArgumentError("invalid "+r[1]+" bit length","param",e),new Ll(i/8,r[1]==="int",e.name)}if(r=e.type.match(NL),r){let i=parseInt(r[1]);return (i===0||i>32)&&Il.throwArgumentError("invalid bytes length","param",e),new Ol(i,e.name)}return Il.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Cl(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new es(this._getWordSize())}getDefaultValue(e){let r=e.map(n=>this._getCoder(fr.from(n)));return new rs(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Il.throwError("types/values length mismatch",Ie.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});let i=e.map(s=>this._getCoder(fr.from(s))),n=new rs(i,"_"),o=this._getWriter();return n.encode(o,r),o.data}decode(e,r,i){let n=e.map(s=>this._getCoder(fr.from(s)));return new rs(n,"_").decode(this._getReader(Lt(r),i))}},Qx=new s0;function Js(t){return ts(ga(t))}var Rt=new Ie(Zr);var kl=class extends Yn{},Ml=class extends Yn{},o0=class extends Yn{},ya=class extends Yn{static isIndexed(e){return !!(e&&e._isIndexed)}},FL={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ev(t,e){let r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}var xa=class{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,kt(this,"fragments",r.map(i=>Xn.from(i)).filter(i=>i!=null)),kt(this,"_abiCoder",la(new.target,"getAbiCoder")()),kt(this,"functions",{}),kt(this,"errors",{}),kt(this,"events",{}),kt(this,"structs",{}),this.fragments.forEach(i=>{let n=null;switch(i.type){case"constructor":if(this.deploy){Rt.warn("duplicate definition - constructor");return}kt(this,"deploy",i);return;case"function":n=this.functions;break;case"event":n=this.events;break;case"error":n=this.errors;break;default:return}let o=i.format();if(n[o]){Rt.warn("duplicate definition - "+o);return}n[o]=i;}),this.deploy||kt(this,"deploy",Jn.from({payable:!1,type:"constructor"})),kt(this,"_isInterface",!0);}format(e){e||(e=Ye.full),e===Ye.sighash&&Rt.throwArgumentError("interface does not support formatting sighash","format",e);let r=this.fragments.map(i=>i.format(e));return e===Ye.json?JSON.stringify(r.map(i=>JSON.parse(i))):r}static getAbiCoder(){return Qx}static getAddress(e){return pa(e)}static getSighash(e){return Kd(Js(e.format()),0,4)}static getEventTopic(e){return Js(e.format())}getFunction(e){if(hr(e)){for(let i in this.functions)if(e===this.getSighash(i))return this.functions[i];Rt.throwArgumentError("no matching function","sighash",e);}if(e.indexOf("(")===-1){let i=e.trim(),n=Object.keys(this.functions).filter(o=>o.split("(")[0]===i);return n.length===0?Rt.throwArgumentError("no matching function","name",i):n.length>1&&Rt.throwArgumentError("multiple matching functions","name",i),this.functions[n[0]]}let r=this.functions[Qn.fromString(e).format()];return r||Rt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(hr(e)){let i=e.toLowerCase();for(let n in this.events)if(i===this.getEventTopic(n))return this.events[n];Rt.throwArgumentError("no matching event","topichash",i);}if(e.indexOf("(")===-1){let i=e.trim(),n=Object.keys(this.events).filter(o=>o.split("(")[0]===i);return n.length===0?Rt.throwArgumentError("no matching event","name",i):n.length>1&&Rt.throwArgumentError("multiple matching events","name",i),this.events[n[0]]}let r=this.events[Zs.fromString(e).format()];return r||Rt.throwArgumentError("no matching event","signature",e),r}getError(e){if(hr(e)){let i=la(this.constructor,"getSighash");for(let n in this.errors){let o=this.errors[n];if(e===i(o))return this.errors[n]}Rt.throwArgumentError("no matching error","sighash",e);}if(e.indexOf("(")===-1){let i=e.trim(),n=Object.keys(this.errors).filter(o=>o.split("(")[0]===i);return n.length===0?Rt.throwArgumentError("no matching error","name",i):n.length>1&&Rt.throwArgumentError("multiple matching errors","name",i),this.errors[n[0]]}let r=this.errors[Qn.fromString(e).format()];return r||Rt.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e);}catch(r){try{e=this.getError(e);}catch(i){throw r}}return la(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),la(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));let i=Lt(r);return Dt(i.slice(0,4))!==this.getSighash(e)&&Rt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Dt(i)),this._decodeParams(e.inputs,i.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Dt(xi([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));let i=Lt(r);return Dt(i.slice(0,4))!==this.getSighash(e)&&Rt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Dt(i)),this._decodeParams(e.inputs,i.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Dt(xi([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let i=Lt(r),n=null,o="",s=null,a=null,u=null;switch(i.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,i)}catch(l){}break;case 4:{let l=Dt(i.slice(0,4)),h=FL[l];if(h)s=this._abiCoder.decode(h.inputs,i.slice(4)),a=h.name,u=h.signature,h.reason&&(n=s[0]),a==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:a==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{let c=this.getError(l);s=this._abiCoder.decode(c.inputs,i.slice(4)),a=c.name,u=c.format();}catch(c){}break}}return Rt.throwError("call revert exception"+o,Ie.errors.CALL_EXCEPTION,{method:e.format(),data:Dt(r),errorArgs:s,errorName:a,errorSignature:u,reason:n})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Dt(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Rt.throwError("too many arguments for "+e.format(),Ie.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let i=[];e.anonymous||i.push(this.getEventTopic(e));let n=(o,s)=>o.type==="string"?Js(s):o.type==="bytes"?ts(Dt(s)):(o.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),o.type.match(/^u?int/)&&(s=St.from(s).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[s]),xl(Dt(s),32));for(r.forEach((o,s)=>{let a=e.inputs[s];if(!a.indexed){o!=null&&Rt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,o);return}o==null?i.push(null):a.baseType==="array"||a.baseType==="tuple"?Rt.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,o):Array.isArray(o)?i.push(o.map(u=>n(a,u))):i.push(n(a,o));});i.length&&i[i.length-1]===null;)i.pop();return i}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));let i=[],n=[],o=[];return e.anonymous||i.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Rt.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((s,a)=>{let u=r[a];if(s.indexed)if(s.type==="string")i.push(Js(u));else if(s.type==="bytes")i.push(ts(u));else {if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");i.push(this._abiCoder.encode([s.type],[u]));}else n.push(s),o.push(u);}),{data:this._abiCoder.encode(n,o),topics:i}}decodeEventLog(e,r,i){if(typeof e=="string"&&(e=this.getEvent(e)),i!=null&&!e.anonymous){let p=this.getEventTopic(e);(!hr(i[0],32)||i[0].toLowerCase()!==p)&&Rt.throwError("fragment/topic mismatch",Ie.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:p,value:i[0]}),i=i.slice(1);}let n=[],o=[],s=[];e.inputs.forEach((p,f)=>{p.indexed?p.type==="string"||p.type==="bytes"||p.baseType==="tuple"||p.baseType==="array"?(n.push(fr.fromObject({type:"bytes32",name:p.name})),s.push(!0)):(n.push(p),s.push(!1)):(o.push(p),s.push(!1));});let a=i!=null?this._abiCoder.decode(n,xi(i)):null,u=this._abiCoder.decode(o,r,!0),l=[],h=0,c=0;e.inputs.forEach((p,f)=>{if(p.indexed)if(a==null)l[f]=new ya({_isIndexed:!0,hash:null});else if(s[f])l[f]=new ya({_isIndexed:!0,hash:a[c++]});else try{l[f]=a[c++];}catch(m){l[f]=m;}else try{l[f]=u[h++];}catch(m){l[f]=m;}if(p.name&&l[p.name]==null){let m=l[f];m instanceof Error?Object.defineProperty(l,p.name,{enumerable:!0,get:()=>{throw ev(`property ${JSON.stringify(p.name)}`,m)}}):l[p.name]=m;}});for(let p=0;p<l.length;p++){let f=l[p];f instanceof Error&&Object.defineProperty(l,p,{enumerable:!0,get:()=>{throw ev(`index ${p}`,f)}});}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new Ml({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:St.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return !r||r.anonymous?null:new kl({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){let r=Dt(e),i=this.getError(r.substring(0,10).toLowerCase());return i?new o0({args:this._abiCoder.decode(i.inputs,"0x"+r.substring(10)),errorFragment:i,name:i.name,signature:i.format(),sighash:this.getSighash(i)}):null}static isInterface(e){return !!(e&&e._isInterface)}};var mh=$t(HE()),op=(t,e)=>e==null||e.length===0?void 0:new xa(t).encodeDeploy(e).slice(2),UE=t=>{try{let e=mh.parse(t),r;return mh.visit(e,{FunctionDefinition:n=>{n.isConstructor&&(r=n);}}),jE__default.default(r!=null,"Could not find constructor definition"),[{type:"constructor",inputs:r.parameters.map(({typeName:n},o)=>(jE__default.default(n!=null,`Missing a type definition for constructor parameter at position ${o}`),{type:VE(n)}))}]}catch(e){throw new Error(`Could not get an ABI from contract source: ${e}`)}},VE=t=>{switch(t.type){case"ElementaryTypeName":return t.name;case"ArrayTypeName":return `${VE(t.baseTypeName)}[]`;default:throw new Error(`Only primitive and array types are currently supported when constructing ABI from contract source, got ${t.type}`)}};var ap=t=>{var e;return {deployments:(e=t==null?void 0:t.deployments)!=null?e:J8__default.default.resolve(process.cwd(),"deployments")}},$E=t=>{if(t==null)return ()=>!0;switch(typeof t){case"boolean":return ()=>t;case"string":return e=>e===t;case"function":return t;case"object":if(Array.isArray(t)){let e=new Set(t);return r=>e.has(r)}if(t instanceof RegExp)return e=>t.test(e);throw new TypeError(`Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${t}`);default:throw new TypeError(`Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${t}`)}};var KE=t=>{try{return fs.lstatSync(t).isDirectory()}catch(e){return !1}},GE=t=>{try{return fs.lstatSync(t).isFile()}catch(e){return !1}};var ZE=async(t,e)=>{let r=Ff(e,t.networks),i=ap(t.paths),n=Nf(e),o=JE(e),s=QE(n),a=t.contracts.flatMap(l=>{var te;let{address:h,network:c,contractName:p,deployment:f}=l;e.info(`Collectiong information for contract ${p} on network ${c}`);let m=r[c];if(m==null)return e.info(`No network configured for contract ${p} on network ${c}`),[];let _=`${J8.basename(f,".json")}.json`,x=J8.resolve(i.deployments,c,_);if(!GE(x))return e.error(Gt.error`Deployment file ${x} does not exist or is not a file`),[];let v=me(x),g=Hd.safeParse(v);if(!g.success)return e.error(Gt.error`No network configured for contract ${p} on network ${c}`),[];let b=g.data,E=J8.basename(p,".sol"),w=b.metadata.sources[p];if(w==null)return e.error(Gt.error`Missing source for contract ${p} for network ${c} in ${_}`),[];let D=Pf(w.content),N=UE(w.content),F=op(N,l.constructorArguments),V=jd(b.metadata),X={apiUrl:m.apiUrl,apiKey:m.apiKey,address:h,contractName:`${p}:${E}`,constructorArguments:F,licenseType:D,compilerVersion:b.metadata.compiler.version,sourceCode:JSON.stringify(V),evmVersion:b.metadata.settings.evmVersion,optimizerRuns:(te=b.metadata.settings.optimizer)==null?void 0:te.runs};return n({Contract:p,Network:c,Address:X.address,License:X.licenseType,Arguments:l.constructorArguments?JSON.stringify(l.constructorArguments):void 0,Sources:Object.keys(b.metadata.sources),"Scan URL":X.apiUrl,"Scan API Key":X.apiKey?Rf(X.apiKey):void 0}),[{networkName:c,networkConfig:m,submitProps:X}]});if(a.length===0)return e.warn("No contracts match the verification criteria, exiting"),[];if(t.dryRun)return e.debug("Dry run enabled, exiting"),[];let u=await Promise.all(o(a));return u.forEach(s),u},XE=async(t,e)=>{let r=$E(t.filter),i=Ff(e,t.networks),n=ap(t.paths),o=Nf(e),s=JE(e),a=QE(o);if(!KE(n.deployments))throw new Error(`Path ${n.deployments} is not a directory`);let u=new Set(fs.readdirSync(n.deployments)),l=Object.entries(i);e.debug("Verifying deployments for following networks:"),l.forEach(([p,f])=>{e.debug(` - ${p} (API URL ${f.apiUrl})`);});let h=l.flatMap(([p,f])=>{if(e.info(`Collecting deployments for ${p}...`),!u.has(p))return e.warn(`Could not find deployment for network ${p} in ${n.deployments}`),[];let m=J8.resolve(n.deployments,p);return fs.readdirSync(m).filter(x=>x.endsWith(".json")).flatMap(x=>{e.info(`Inspecting deployment file ${x} on network ${p}`);let v=J8.resolve(m,x),g=me(v),b=Hd.safeParse(g);if(!b.success)throw new Error(`Error parsing deployment file ${x} on network ${p}: ${b.error}`);let E=b.data,w=E.metadata.settings.compilationTarget;return Object.entries(w).flatMap(([D,N])=>{var y;if(!r(N,D,p))return e.debug(`Not verifying ${N} in ${x} on network ${p}`),[];let V=E.metadata.sources[D];if(V==null)return e.error(Gt.error`Could not find source for ${N} (${D})`),[];let X=Pf(V.content),te=op(E.abi,E.args),ae=jd(E.metadata),k={apiUrl:f.apiUrl,apiKey:f.apiKey,address:E.address,contractName:`${D}:${N}`,constructorArguments:te,licenseType:X,compilerVersion:E.metadata.compiler.version,sourceCode:JSON.stringify(ae),evmVersion:E.metadata.settings.evmVersion,optimizerRuns:(y=E.metadata.settings.optimizer)==null?void 0:y.runs};return o({Contract:N,Network:p,Address:E.address,License:k.licenseType,Arguments:JSON.stringify(E.args),Sources:Object.keys(E.metadata.sources),"Scan URL":k.apiUrl,"Scan API Key":k.apiKey?Rf(k.apiKey):void 0}),{submitProps:k,networkName:p,networkConfig:f}})})});if(h.length===0)return e.warn("No contracts match the verification criteria, exiting"),[];if(t.dryRun)return e.debug("Dry run enabled, exiting"),[];let c=await Promise.all(s(h));return c.forEach(a),c},JE=t=>e=>e.map(async(r,i)=>{let{submitProps:n}=r,o=Gt.palette[i%Gt.palette.length],s=`[${i+1}/${e.length}]`,a=Ma.default.bold(n.contractName),u=Ma.default.bold(r.networkName);t.info(o`Verifying contract ${a} for network ${u} ${s}`);try{let l=yx(n,t);l.on("poll",c=>{t.info(o`Polling for verification status of ${a} for network ${u} (GUID ${c}) ${s}`);}),l.on("retry",(c,p)=>{t.verbose(`Received an error: ${c}`),t.info(o`Retrying failed verification attempt of ${a} for network ${u} (attempt ${p+1}) ${s}`);});let h=await l.verify();return {artifact:r,result:h}}catch(l){return t.error(Gt.error`Problem verifying contract ${a} for network ${u} ${s}: ${l} `),{artifact:r,error:l}}}),QE=t=>({artifact:e,response:r,error:i})=>{let n=Ma.default.bold(e.submitProps.contractName),o=Ma.default.bold(e.networkName),s=e.networkConfig.browserUrl?Og(e.networkConfig.browserUrl,e.submitProps.address):void 0;t({Contract:n,Network:o,Result:i==null,"Was verified":r==null?void 0:r.alreadyVerified,"Contract URL":s,Error:i?Gt.error(i):void 0});};var As=$t(oA(),1);$t(aw(),1);var Ro=$t(Io(),1);$t(MR(),1);var BR=(t=>(t.error="error",t.warn="warn",t.info="info",t.http="http",t.verbose="verbose",t.debug="debug",t.silly="silly",t))(BR||{});Pe.nativeEnum(BR);var cU="info";var cg=(t=cU,e=As.format.cli())=>(0, As.createLogger)({level:t,format:e,transports:[new As.transports.Console]});(0, As.format)((t,{label:e})=>({...t,message:`${e?`[${e}] `:""}${t.message}`}));({TRUE:Ro.default.rgb(0,153,0),FALSE:Ro.default.rgb(255,0,0),NOT_APPLICABLE:Ro.default.rgb(255,128,0),DEFAULT_KEY:Ro.default.rgb(255,255,255),DEFAULT_VALUE:Ro.default.rgb(167,125,255)});var qR="1.1.9";var HR=new Nn("-l,--log-level <level>","Log level").choices(["error","warn","info","http","verbose","debug","silly"]).default("info"),jR=new Nn("-d,--deployments <path>","Path to the deployments folder"),UR=new Nn("--dry-run","Do not verify anything, just output the verifications that would be performed"),VR=new Nn("-n,--network <network name>","Network to verify").makeOptionMandatory(),$R=new Nn("-u,--api-url <url>","Scan API URL (fully qualified, with protocol and path)"),zR=new Nn("-k,--api-key <key>","Scan API Key"),dU=new Ru("non-target").description("Verifies a contract that does not have its own deployment file, i.e. has not been a target of a deployment").addOption(HR).addOption(UR).addOption(jR).addOption(VR).addOption($R).addOption(zR).requiredOption("--address <address>","Contract address to verify").requiredOption("--name <contract name>","Fully qualified contract name to verify, e.g. contracts/MyToken.sol").requiredOption("--deployment <deployment file name>","Deployment file name, e.g. MyOtherToken.json").option("--arguments <constructor arguments>",'JSON encoded array of constructor arguments, e.g. [1234, "0x0"]',t=>{try{let e=JSON.parse(t);if(!Array.isArray(e))throw new Error(`Constructor arguments must be an array, got ${e}`);return e}catch(e){throw new Sg(`Malformed constructor arguments specified: ${e}`)}}).action(async t=>{let e=cg(t.logLevel),r={dryRun:t.dryRun,paths:{deployments:t.deployments},networks:{[t.network]:{apiUrl:t.apiUrl,apiKey:t.apiKey}},contracts:[{network:t.network,address:t.address,contractName:t.name,deployment:t.deployment,constructorArguments:t.arguments}]};try{await ZE(r,e);}catch(i){e.error(Gt.error`The verification script exited with an error: ${i}`),process.exit(1);}}),pU=new Ru("target").description("Verifies contracts that have been a part of a deployment, i.e. have their own deployment files").addOption(HR).addOption(UR).addOption(jR).addOption(VR).addOption($R).addOption(zR).option("-c,--contracts <contract names>","Comma-separated list of case-sensitive contract names to verify",t=>t!=null&&t.trim()?t.split(",").map(e=>e.trim()):void 0).action(async t=>{let e=cg(t.logLevel),r={dryRun:t.dryRun,paths:{deployments:t.deployments},networks:{[t.network]:{apiUrl:t.apiUrl,apiKey:t.apiKey}},filter:t.contracts};try{await XE(r,e);}catch(i){e.error(Gt.error`The verification script exited with an error: ${i}`),process.exit(1);}});new Ru("@layerzerolabs/verify-contract").version(qR).description("Verify a set of contracts based on hardhat-deploy outputs").addCommand(dU).addCommand(pU,{isDefault:!0}).parseAsync();
|
|
473
|
+
/*! Bundled license information:
|
|
474
|
+
|
|
475
|
+
js-sha3/src/sha3.js:
|
|
476
|
+
(**
|
|
477
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
478
|
+
*
|
|
479
|
+
* @version 0.8.0
|
|
480
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
481
|
+
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
482
|
+
* @license MIT
|
|
483
|
+
*)
|
|
484
|
+
|
|
485
|
+
@solidity-parser/parser/dist/index.cjs.js:
|
|
486
|
+
(*!
|
|
487
|
+
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
488
|
+
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
489
|
+
*)
|
|
490
|
+
(*! https://mths.be/codepointat v0.2.0 by @mathias *)
|
|
491
|
+
(*! https://mths.be/fromcodepoint v0.2.1 by @mathias *)
|
|
492
|
+
|
|
493
|
+
safe-buffer/index.js:
|
|
494
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
495
|
+
*/
|