"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));

// node_modules/ajv/dist/compile/codegen/code.js
var require_code = __commonJS({
  "node_modules/ajv/dist/compile/codegen/code.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.regexpCode = exports2.getEsmExportName = exports2.getProperty = exports2.safeStringify = exports2.stringify = exports2.strConcat = exports2.addCodeArg = exports2.str = exports2._ = exports2.nil = exports2._Code = exports2.Name = exports2.IDENTIFIER = exports2._CodeOrName = void 0;
    var _CodeOrName = class {
    };
    exports2._CodeOrName = _CodeOrName;
    exports2.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
    var Name = class extends _CodeOrName {
      constructor(s) {
        super();
        if (!exports2.IDENTIFIER.test(s))
          throw new Error("CodeGen: name must be a valid identifier");
        this.str = s;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        return false;
      }
      get names() {
        return { [this.str]: 1 };
      }
    };
    exports2.Name = Name;
    var _Code = class extends _CodeOrName {
      constructor(code) {
        super();
        this._items = typeof code === "string" ? [code] : code;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        if (this._items.length > 1)
          return false;
        const item = this._items[0];
        return item === "" || item === '""';
      }
      get str() {
        var _a3;
        return (_a3 = this._str) !== null && _a3 !== void 0 ? _a3 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
      }
      get names() {
        var _a3;
        return (_a3 = this._names) !== null && _a3 !== void 0 ? _a3 : this._names = this._items.reduce((names, c) => {
          if (c instanceof Name)
            names[c.str] = (names[c.str] || 0) + 1;
          return names;
        }, {});
      }
    };
    exports2._Code = _Code;
    exports2.nil = new _Code("");
    function _(strs, ...args) {
      const code = [strs[0]];
      let i = 0;
      while (i < args.length) {
        addCodeArg(code, args[i]);
        code.push(strs[++i]);
      }
      return new _Code(code);
    }
    exports2._ = _;
    var plus = new _Code("+");
    function str(strs, ...args) {
      const expr = [safeStringify(strs[0])];
      let i = 0;
      while (i < args.length) {
        expr.push(plus);
        addCodeArg(expr, args[i]);
        expr.push(plus, safeStringify(strs[++i]));
      }
      optimize(expr);
      return new _Code(expr);
    }
    exports2.str = str;
    function addCodeArg(code, arg) {
      if (arg instanceof _Code)
        code.push(...arg._items);
      else if (arg instanceof Name)
        code.push(arg);
      else
        code.push(interpolate(arg));
    }
    exports2.addCodeArg = addCodeArg;
    function optimize(expr) {
      let i = 1;
      while (i < expr.length - 1) {
        if (expr[i] === plus) {
          const res = mergeExprItems(expr[i - 1], expr[i + 1]);
          if (res !== void 0) {
            expr.splice(i - 1, 3, res);
            continue;
          }
          expr[i++] = "+";
        }
        i++;
      }
    }
    function mergeExprItems(a, b) {
      if (b === '""')
        return a;
      if (a === '""')
        return b;
      if (typeof a == "string") {
        if (b instanceof Name || a[a.length - 1] !== '"')
          return;
        if (typeof b != "string")
          return `${a.slice(0, -1)}${b}"`;
        if (b[0] === '"')
          return a.slice(0, -1) + b.slice(1);
        return;
      }
      if (typeof b == "string" && b[0] === '"' && !(a instanceof Name))
        return `"${a}${b.slice(1)}`;
      return;
    }
    function strConcat(c12, c22) {
      return c22.emptyStr() ? c12 : c12.emptyStr() ? c22 : str`${c12}${c22}`;
    }
    exports2.strConcat = strConcat;
    function interpolate(x) {
      return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
    }
    function stringify(x) {
      return new _Code(safeStringify(x));
    }
    exports2.stringify = stringify;
    function safeStringify(x) {
      return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
    }
    exports2.safeStringify = safeStringify;
    function getProperty(key) {
      return typeof key == "string" && exports2.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
    }
    exports2.getProperty = getProperty;
    function getEsmExportName(key) {
      if (typeof key == "string" && exports2.IDENTIFIER.test(key)) {
        return new _Code(`${key}`);
      }
      throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
    }
    exports2.getEsmExportName = getEsmExportName;
    function regexpCode(rx) {
      return new _Code(rx.toString());
    }
    exports2.regexpCode = regexpCode;
  }
});

// node_modules/ajv/dist/compile/codegen/scope.js
var require_scope = __commonJS({
  "node_modules/ajv/dist/compile/codegen/scope.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ValueScope = exports2.ValueScopeName = exports2.Scope = exports2.varKinds = exports2.UsedValueState = void 0;
    var code_1 = require_code();
    var ValueError = class extends Error {
      constructor(name) {
        super(`CodeGen: "code" for ${name} not defined`);
        this.value = name.value;
      }
    };
    var UsedValueState;
    (function(UsedValueState2) {
      UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
      UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
    })(UsedValueState || (exports2.UsedValueState = UsedValueState = {}));
    exports2.varKinds = {
      const: new code_1.Name("const"),
      let: new code_1.Name("let"),
      var: new code_1.Name("var")
    };
    var Scope2 = class {
      constructor({ prefixes, parent } = {}) {
        this._names = {};
        this._prefixes = prefixes;
        this._parent = parent;
      }
      toName(nameOrPrefix) {
        return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
      }
      name(prefix) {
        return new code_1.Name(this._newName(prefix));
      }
      _newName(prefix) {
        const ng = this._names[prefix] || this._nameGroup(prefix);
        return `${prefix}${ng.index++}`;
      }
      _nameGroup(prefix) {
        var _a3, _b;
        if (((_b = (_a3 = this._parent) === null || _a3 === void 0 ? void 0 : _a3._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
          throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
        }
        return this._names[prefix] = { prefix, index: 0 };
      }
    };
    exports2.Scope = Scope2;
    var ValueScopeName = class extends code_1.Name {
      constructor(prefix, nameStr) {
        super(nameStr);
        this.prefix = prefix;
      }
      setValue(value, { property, itemIndex }) {
        this.value = value;
        this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
      }
    };
    exports2.ValueScopeName = ValueScopeName;
    var line = (0, code_1._)`\n`;
    var ValueScope = class extends Scope2 {
      constructor(opts) {
        super(opts);
        this._values = {};
        this._scope = opts.scope;
        this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };
      }
      get() {
        return this._scope;
      }
      name(prefix) {
        return new ValueScopeName(prefix, this._newName(prefix));
      }
      value(nameOrPrefix, value) {
        var _a3;
        if (value.ref === void 0)
          throw new Error("CodeGen: ref must be passed in value");
        const name = this.toName(nameOrPrefix);
        const { prefix } = name;
        const valueKey = (_a3 = value.key) !== null && _a3 !== void 0 ? _a3 : value.ref;
        let vs = this._values[prefix];
        if (vs) {
          const _name = vs.get(valueKey);
          if (_name)
            return _name;
        } else {
          vs = this._values[prefix] = /* @__PURE__ */ new Map();
        }
        vs.set(valueKey, name);
        const s = this._scope[prefix] || (this._scope[prefix] = []);
        const itemIndex = s.length;
        s[itemIndex] = value.ref;
        name.setValue(value, { property: prefix, itemIndex });
        return name;
      }
      getValue(prefix, keyOrRef) {
        const vs = this._values[prefix];
        if (!vs)
          return;
        return vs.get(keyOrRef);
      }
      scopeRefs(scopeName, values = this._values) {
        return this._reduceValues(values, (name) => {
          if (name.scopePath === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return (0, code_1._)`${scopeName}${name.scopePath}`;
        });
      }
      scopeCode(values = this._values, usedValues, getCode) {
        return this._reduceValues(values, (name) => {
          if (name.value === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return name.value.code;
        }, usedValues, getCode);
      }
      _reduceValues(values, valueCode, usedValues = {}, getCode) {
        let code = code_1.nil;
        for (const prefix in values) {
          const vs = values[prefix];
          if (!vs)
            continue;
          const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();
          vs.forEach((name) => {
            if (nameSet.has(name))
              return;
            nameSet.set(name, UsedValueState.Started);
            let c = valueCode(name);
            if (c) {
              const def = this.opts.es5 ? exports2.varKinds.var : exports2.varKinds.const;
              code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;
            } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) {
              code = (0, code_1._)`${code}${c}${this.opts._n}`;
            } else {
              throw new ValueError(name);
            }
            nameSet.set(name, UsedValueState.Completed);
          });
        }
        return code;
      }
    };
    exports2.ValueScope = ValueScope;
  }
});

// node_modules/ajv/dist/compile/codegen/index.js
var require_codegen = __commonJS({
  "node_modules/ajv/dist/compile/codegen/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.or = exports2.and = exports2.not = exports2.CodeGen = exports2.operators = exports2.varKinds = exports2.ValueScopeName = exports2.ValueScope = exports2.Scope = exports2.Name = exports2.regexpCode = exports2.stringify = exports2.getProperty = exports2.nil = exports2.strConcat = exports2.str = exports2._ = void 0;
    var code_1 = require_code();
    var scope_1 = require_scope();
    var code_2 = require_code();
    Object.defineProperty(exports2, "_", { enumerable: true, get: function() {
      return code_2._;
    } });
    Object.defineProperty(exports2, "str", { enumerable: true, get: function() {
      return code_2.str;
    } });
    Object.defineProperty(exports2, "strConcat", { enumerable: true, get: function() {
      return code_2.strConcat;
    } });
    Object.defineProperty(exports2, "nil", { enumerable: true, get: function() {
      return code_2.nil;
    } });
    Object.defineProperty(exports2, "getProperty", { enumerable: true, get: function() {
      return code_2.getProperty;
    } });
    Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() {
      return code_2.stringify;
    } });
    Object.defineProperty(exports2, "regexpCode", { enumerable: true, get: function() {
      return code_2.regexpCode;
    } });
    Object.defineProperty(exports2, "Name", { enumerable: true, get: function() {
      return code_2.Name;
    } });
    var scope_2 = require_scope();
    Object.defineProperty(exports2, "Scope", { enumerable: true, get: function() {
      return scope_2.Scope;
    } });
    Object.defineProperty(exports2, "ValueScope", { enumerable: true, get: function() {
      return scope_2.ValueScope;
    } });
    Object.defineProperty(exports2, "ValueScopeName", { enumerable: true, get: function() {
      return scope_2.ValueScopeName;
    } });
    Object.defineProperty(exports2, "varKinds", { enumerable: true, get: function() {
      return scope_2.varKinds;
    } });
    exports2.operators = {
      GT: new code_1._Code(">"),
      GTE: new code_1._Code(">="),
      LT: new code_1._Code("<"),
      LTE: new code_1._Code("<="),
      EQ: new code_1._Code("==="),
      NEQ: new code_1._Code("!=="),
      NOT: new code_1._Code("!"),
      OR: new code_1._Code("||"),
      AND: new code_1._Code("&&"),
      ADD: new code_1._Code("+")
    };
    var Node = class {
      optimizeNodes() {
        return this;
      }
      optimizeNames(_names, _constants) {
        return this;
      }
    };
    var Def = class extends Node {
      constructor(varKind, name, rhs) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.rhs = rhs;
      }
      render({ es5, _n }) {
        const varKind = es5 ? scope_1.varKinds.var : this.varKind;
        const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
        return `${varKind} ${this.name}${rhs};` + _n;
      }
      optimizeNames(names, constants) {
        if (!names[this.name.str])
          return;
        if (this.rhs)
          this.rhs = optimizeExpr(this.rhs, names, constants);
        return this;
      }
      get names() {
        return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
      }
    };
    var Assign = class extends Node {
      constructor(lhs, rhs, sideEffects) {
        super();
        this.lhs = lhs;
        this.rhs = rhs;
        this.sideEffects = sideEffects;
      }
      render({ _n }) {
        return `${this.lhs} = ${this.rhs};` + _n;
      }
      optimizeNames(names, constants) {
        if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
          return;
        this.rhs = optimizeExpr(this.rhs, names, constants);
        return this;
      }
      get names() {
        const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
        return addExprNames(names, this.rhs);
      }
    };
    var AssignOp = class extends Assign {
      constructor(lhs, op, rhs, sideEffects) {
        super(lhs, rhs, sideEffects);
        this.op = op;
      }
      render({ _n }) {
        return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
      }
    };
    var Label = class extends Node {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        return `${this.label}:` + _n;
      }
    };
    var Break = class extends Node {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        const label = this.label ? ` ${this.label}` : "";
        return `break${label};` + _n;
      }
    };
    var Throw = class extends Node {
      constructor(error51) {
        super();
        this.error = error51;
      }
      render({ _n }) {
        return `throw ${this.error};` + _n;
      }
      get names() {
        return this.error.names;
      }
    };
    var AnyCode = class extends Node {
      constructor(code) {
        super();
        this.code = code;
      }
      render({ _n }) {
        return `${this.code};` + _n;
      }
      optimizeNodes() {
        return `${this.code}` ? this : void 0;
      }
      optimizeNames(names, constants) {
        this.code = optimizeExpr(this.code, names, constants);
        return this;
      }
      get names() {
        return this.code instanceof code_1._CodeOrName ? this.code.names : {};
      }
    };
    var ParentNode = class extends Node {
      constructor(nodes = []) {
        super();
        this.nodes = nodes;
      }
      render(opts) {
        return this.nodes.reduce((code, n2) => code + n2.render(opts), "");
      }
      optimizeNodes() {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n2 = nodes[i].optimizeNodes();
          if (Array.isArray(n2))
            nodes.splice(i, 1, ...n2);
          else if (n2)
            nodes[i] = n2;
          else
            nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      optimizeNames(names, constants) {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n2 = nodes[i];
          if (n2.optimizeNames(names, constants))
            continue;
          subtractNames(names, n2.names);
          nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      get names() {
        return this.nodes.reduce((names, n2) => addNames(names, n2.names), {});
      }
    };
    var BlockNode = class extends ParentNode {
      render(opts) {
        return "{" + opts._n + super.render(opts) + "}" + opts._n;
      }
    };
    var Root = class extends ParentNode {
    };
    var Else = class extends BlockNode {
    };
    Else.kind = "else";
    var If = class _If extends BlockNode {
      constructor(condition, nodes) {
        super(nodes);
        this.condition = condition;
      }
      render(opts) {
        let code = `if(${this.condition})` + super.render(opts);
        if (this.else)
          code += "else " + this.else.render(opts);
        return code;
      }
      optimizeNodes() {
        super.optimizeNodes();
        const cond = this.condition;
        if (cond === true)
          return this.nodes;
        let e = this.else;
        if (e) {
          const ns = e.optimizeNodes();
          e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
        }
        if (e) {
          if (cond === false)
            return e instanceof _If ? e : e.nodes;
          if (this.nodes.length)
            return this;
          return new _If(not(cond), e instanceof _If ? [e] : e.nodes);
        }
        if (cond === false || !this.nodes.length)
          return void 0;
        return this;
      }
      optimizeNames(names, constants) {
        var _a3;
        this.else = (_a3 = this.else) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
        if (!(super.optimizeNames(names, constants) || this.else))
          return;
        this.condition = optimizeExpr(this.condition, names, constants);
        return this;
      }
      get names() {
        const names = super.names;
        addExprNames(names, this.condition);
        if (this.else)
          addNames(names, this.else.names);
        return names;
      }
    };
    If.kind = "if";
    var For = class extends BlockNode {
    };
    For.kind = "for";
    var ForLoop = class extends For {
      constructor(iteration) {
        super();
        this.iteration = iteration;
      }
      render(opts) {
        return `for(${this.iteration})` + super.render(opts);
      }
      optimizeNames(names, constants) {
        if (!super.optimizeNames(names, constants))
          return;
        this.iteration = optimizeExpr(this.iteration, names, constants);
        return this;
      }
      get names() {
        return addNames(super.names, this.iteration.names);
      }
    };
    var ForRange = class extends For {
      constructor(varKind, name, from, to) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.from = from;
        this.to = to;
      }
      render(opts) {
        const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
        const { name, from, to } = this;
        return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);
      }
      get names() {
        const names = addExprNames(super.names, this.from);
        return addExprNames(names, this.to);
      }
    };
    var ForIter = class extends For {
      constructor(loop, varKind, name, iterable) {
        super();
        this.loop = loop;
        this.varKind = varKind;
        this.name = name;
        this.iterable = iterable;
      }
      render(opts) {
        return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
      }
      optimizeNames(names, constants) {
        if (!super.optimizeNames(names, constants))
          return;
        this.iterable = optimizeExpr(this.iterable, names, constants);
        return this;
      }
      get names() {
        return addNames(super.names, this.iterable.names);
      }
    };
    var Func = class extends BlockNode {
      constructor(name, args, async) {
        super();
        this.name = name;
        this.args = args;
        this.async = async;
      }
      render(opts) {
        const _async = this.async ? "async " : "";
        return `${_async}function ${this.name}(${this.args})` + super.render(opts);
      }
    };
    Func.kind = "func";
    var Return = class extends ParentNode {
      render(opts) {
        return "return " + super.render(opts);
      }
    };
    Return.kind = "return";
    var Try = class extends BlockNode {
      render(opts) {
        let code = "try" + super.render(opts);
        if (this.catch)
          code += this.catch.render(opts);
        if (this.finally)
          code += this.finally.render(opts);
        return code;
      }
      optimizeNodes() {
        var _a3, _b;
        super.optimizeNodes();
        (_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNodes();
        (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
        return this;
      }
      optimizeNames(names, constants) {
        var _a3, _b;
        super.optimizeNames(names, constants);
        (_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
        (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
        return this;
      }
      get names() {
        const names = super.names;
        if (this.catch)
          addNames(names, this.catch.names);
        if (this.finally)
          addNames(names, this.finally.names);
        return names;
      }
    };
    var Catch = class extends BlockNode {
      constructor(error51) {
        super();
        this.error = error51;
      }
      render(opts) {
        return `catch(${this.error})` + super.render(opts);
      }
    };
    Catch.kind = "catch";
    var Finally = class extends BlockNode {
      render(opts) {
        return "finally" + super.render(opts);
      }
    };
    Finally.kind = "finally";
    var CodeGen = class {
      constructor(extScope, opts = {}) {
        this._values = {};
        this._blockStarts = [];
        this._constants = {};
        this.opts = { ...opts, _n: opts.lines ? "\n" : "" };
        this._extScope = extScope;
        this._scope = new scope_1.Scope({ parent: extScope });
        this._nodes = [new Root()];
      }
      toString() {
        return this._root.render(this.opts);
      }
      // returns unique name in the internal scope
      name(prefix) {
        return this._scope.name(prefix);
      }
      // reserves unique name in the external scope
      scopeName(prefix) {
        return this._extScope.name(prefix);
      }
      // reserves unique name in the external scope and assigns value to it
      scopeValue(prefixOrName, value) {
        const name = this._extScope.value(prefixOrName, value);
        const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set());
        vs.add(name);
        return name;
      }
      getScopeValue(prefix, keyOrRef) {
        return this._extScope.getValue(prefix, keyOrRef);
      }
      // return code that assigns values in the external scope to the names that are used internally
      // (same names that were returned by gen.scopeName or gen.scopeValue)
      scopeRefs(scopeName) {
        return this._extScope.scopeRefs(scopeName, this._values);
      }
      scopeCode() {
        return this._extScope.scopeCode(this._values);
      }
      _def(varKind, nameOrPrefix, rhs, constant) {
        const name = this._scope.toName(nameOrPrefix);
        if (rhs !== void 0 && constant)
          this._constants[name.str] = rhs;
        this._leafNode(new Def(varKind, name, rhs));
        return name;
      }
      // `const` declaration (`var` in es5 mode)
      const(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);
      }
      // `let` declaration with optional assignment (`var` in es5 mode)
      let(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);
      }
      // `var` declaration with optional assignment
      var(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);
      }
      // assignment code
      assign(lhs, rhs, sideEffects) {
        return this._leafNode(new Assign(lhs, rhs, sideEffects));
      }
      // `+=` code
      add(lhs, rhs) {
        return this._leafNode(new AssignOp(lhs, exports2.operators.ADD, rhs));
      }
      // appends passed SafeExpr to code or executes Block
      code(c) {
        if (typeof c == "function")
          c();
        else if (c !== code_1.nil)
          this._leafNode(new AnyCode(c));
        return this;
      }
      // returns code for object literal for the passed argument list of key-value pairs
      object(...keyValues) {
        const code = ["{"];
        for (const [key, value] of keyValues) {
          if (code.length > 1)
            code.push(",");
          code.push(key);
          if (key !== value || this.opts.es5) {
            code.push(":");
            (0, code_1.addCodeArg)(code, value);
          }
        }
        code.push("}");
        return new code_1._Code(code);
      }
      // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
      if(condition, thenBody, elseBody) {
        this._blockNode(new If(condition));
        if (thenBody && elseBody) {
          this.code(thenBody).else().code(elseBody).endIf();
        } else if (thenBody) {
          this.code(thenBody).endIf();
        } else if (elseBody) {
          throw new Error('CodeGen: "else" body without "then" body');
        }
        return this;
      }
      // `else if` clause - invalid without `if` or after `else` clauses
      elseIf(condition) {
        return this._elseNode(new If(condition));
      }
      // `else` clause - only valid after `if` or `else if` clauses
      else() {
        return this._elseNode(new Else());
      }
      // end `if` statement (needed if gen.if was used only with condition)
      endIf() {
        return this._endBlockNode(If, Else);
      }
      _for(node, forBody) {
        this._blockNode(node);
        if (forBody)
          this.code(forBody).endFor();
        return this;
      }
      // a generic `for` clause (or statement if `forBody` is passed)
      for(iteration, forBody) {
        return this._for(new ForLoop(iteration), forBody);
      }
      // `for` statement for a range of values
      forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForRange(varKind, name, from, to), () => forBody(name));
      }
      // `for-of` statement (in es5 mode replace with a normal for loop)
      forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
        const name = this._scope.toName(nameOrPrefix);
        if (this.opts.es5) {
          const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
          return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => {
            this.var(name, (0, code_1._)`${arr}[${i}]`);
            forBody(name);
          });
        }
        return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
      }
      // `for-in` statement.
      // With option `ownProperties` replaced with a `for-of` loop for object keys
      forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
        if (this.opts.ownProperties) {
          return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
        }
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
      }
      // end `for` loop
      endFor() {
        return this._endBlockNode(For);
      }
      // `label` statement
      label(label) {
        return this._leafNode(new Label(label));
      }
      // `break` statement
      break(label) {
        return this._leafNode(new Break(label));
      }
      // `return` statement
      return(value) {
        const node = new Return();
        this._blockNode(node);
        this.code(value);
        if (node.nodes.length !== 1)
          throw new Error('CodeGen: "return" should have one node');
        return this._endBlockNode(Return);
      }
      // `try` statement
      try(tryBody, catchCode, finallyCode) {
        if (!catchCode && !finallyCode)
          throw new Error('CodeGen: "try" without "catch" and "finally"');
        const node = new Try();
        this._blockNode(node);
        this.code(tryBody);
        if (catchCode) {
          const error51 = this.name("e");
          this._currNode = node.catch = new Catch(error51);
          catchCode(error51);
        }
        if (finallyCode) {
          this._currNode = node.finally = new Finally();
          this.code(finallyCode);
        }
        return this._endBlockNode(Catch, Finally);
      }
      // `throw` statement
      throw(error51) {
        return this._leafNode(new Throw(error51));
      }
      // start self-balancing block
      block(body, nodeCount) {
        this._blockStarts.push(this._nodes.length);
        if (body)
          this.code(body).endBlock(nodeCount);
        return this;
      }
      // end the current self-balancing block
      endBlock(nodeCount) {
        const len = this._blockStarts.pop();
        if (len === void 0)
          throw new Error("CodeGen: not in self-balancing block");
        const toClose = this._nodes.length - len;
        if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) {
          throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
        }
        this._nodes.length = len;
        return this;
      }
      // `function` heading (or definition if funcBody is passed)
      func(name, args = code_1.nil, async, funcBody) {
        this._blockNode(new Func(name, args, async));
        if (funcBody)
          this.code(funcBody).endFunc();
        return this;
      }
      // end function definition
      endFunc() {
        return this._endBlockNode(Func);
      }
      optimize(n2 = 1) {
        while (n2-- > 0) {
          this._root.optimizeNodes();
          this._root.optimizeNames(this._root.names, this._constants);
        }
      }
      _leafNode(node) {
        this._currNode.nodes.push(node);
        return this;
      }
      _blockNode(node) {
        this._currNode.nodes.push(node);
        this._nodes.push(node);
      }
      _endBlockNode(N1, N2) {
        const n2 = this._currNode;
        if (n2 instanceof N1 || N2 && n2 instanceof N2) {
          this._nodes.pop();
          return this;
        }
        throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
      }
      _elseNode(node) {
        const n2 = this._currNode;
        if (!(n2 instanceof If)) {
          throw new Error('CodeGen: "else" without "if"');
        }
        this._currNode = n2.else = node;
        return this;
      }
      get _root() {
        return this._nodes[0];
      }
      get _currNode() {
        const ns = this._nodes;
        return ns[ns.length - 1];
      }
      set _currNode(node) {
        const ns = this._nodes;
        ns[ns.length - 1] = node;
      }
    };
    exports2.CodeGen = CodeGen;
    function addNames(names, from) {
      for (const n2 in from)
        names[n2] = (names[n2] || 0) + (from[n2] || 0);
      return names;
    }
    function addExprNames(names, from) {
      return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
    }
    function optimizeExpr(expr, names, constants) {
      if (expr instanceof code_1.Name)
        return replaceName(expr);
      if (!canOptimize(expr))
        return expr;
      return new code_1._Code(expr._items.reduce((items, c) => {
        if (c instanceof code_1.Name)
          c = replaceName(c);
        if (c instanceof code_1._Code)
          items.push(...c._items);
        else
          items.push(c);
        return items;
      }, []));
      function replaceName(n2) {
        const c = constants[n2.str];
        if (c === void 0 || names[n2.str] !== 1)
          return n2;
        delete names[n2.str];
        return c;
      }
      function canOptimize(e) {
        return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);
      }
    }
    function subtractNames(names, from) {
      for (const n2 in from)
        names[n2] = (names[n2] || 0) - (from[n2] || 0);
    }
    function not(x) {
      return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
    }
    exports2.not = not;
    var andCode = mappend(exports2.operators.AND);
    function and(...args) {
      return args.reduce(andCode);
    }
    exports2.and = and;
    var orCode = mappend(exports2.operators.OR);
    function or(...args) {
      return args.reduce(orCode);
    }
    exports2.or = or;
    function mappend(op) {
      return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;
    }
    function par(x) {
      return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;
    }
  }
});

// node_modules/ajv/dist/compile/util.js
var require_util = __commonJS({
  "node_modules/ajv/dist/compile/util.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.checkStrictMode = exports2.getErrorPath = exports2.Type = exports2.useFunc = exports2.setEvaluated = exports2.evaluatedPropsToName = exports2.mergeEvaluated = exports2.eachItem = exports2.unescapeJsonPointer = exports2.escapeJsonPointer = exports2.escapeFragment = exports2.unescapeFragment = exports2.schemaRefOrVal = exports2.schemaHasRulesButRef = exports2.schemaHasRules = exports2.checkUnknownRules = exports2.alwaysValidSchema = exports2.toHash = void 0;
    var codegen_1 = require_codegen();
    var code_1 = require_code();
    function toHash(arr) {
      const hash2 = {};
      for (const item of arr)
        hash2[item] = true;
      return hash2;
    }
    exports2.toHash = toHash;
    function alwaysValidSchema(it, schema) {
      if (typeof schema == "boolean")
        return schema;
      if (Object.keys(schema).length === 0)
        return true;
      checkUnknownRules(it, schema);
      return !schemaHasRules(schema, it.self.RULES.all);
    }
    exports2.alwaysValidSchema = alwaysValidSchema;
    function checkUnknownRules(it, schema = it.schema) {
      const { opts, self } = it;
      if (!opts.strictSchema)
        return;
      if (typeof schema === "boolean")
        return;
      const rules = self.RULES.keywords;
      for (const key in schema) {
        if (!rules[key])
          checkStrictMode(it, `unknown keyword: "${key}"`);
      }
    }
    exports2.checkUnknownRules = checkUnknownRules;
    function schemaHasRules(schema, rules) {
      if (typeof schema == "boolean")
        return !schema;
      for (const key in schema)
        if (rules[key])
          return true;
      return false;
    }
    exports2.schemaHasRules = schemaHasRules;
    function schemaHasRulesButRef(schema, RULES) {
      if (typeof schema == "boolean")
        return !schema;
      for (const key in schema)
        if (key !== "$ref" && RULES.all[key])
          return true;
      return false;
    }
    exports2.schemaHasRulesButRef = schemaHasRulesButRef;
    function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
      if (!$data) {
        if (typeof schema == "number" || typeof schema == "boolean")
          return schema;
        if (typeof schema == "string")
          return (0, codegen_1._)`${schema}`;
      }
      return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
    }
    exports2.schemaRefOrVal = schemaRefOrVal;
    function unescapeFragment(str) {
      return unescapeJsonPointer(decodeURIComponent(str));
    }
    exports2.unescapeFragment = unescapeFragment;
    function escapeFragment(str) {
      return encodeURIComponent(escapeJsonPointer(str));
    }
    exports2.escapeFragment = escapeFragment;
    function escapeJsonPointer(str) {
      if (typeof str == "number")
        return `${str}`;
      return str.replace(/~/g, "~0").replace(/\//g, "~1");
    }
    exports2.escapeJsonPointer = escapeJsonPointer;
    function unescapeJsonPointer(str) {
      return str.replace(/~1/g, "/").replace(/~0/g, "~");
    }
    exports2.unescapeJsonPointer = unescapeJsonPointer;
    function eachItem(xs, f) {
      if (Array.isArray(xs)) {
        for (const x of xs)
          f(x);
      } else {
        f(xs);
      }
    }
    exports2.eachItem = eachItem;
    function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues3, resultToName }) {
      return (gen, from, to, toName) => {
        const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues3(from, to);
        return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
      };
    }
    exports2.mergeEvaluated = {
      props: makeMergeEvaluated({
        mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
          gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));
        }),
        mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
          if (from === true) {
            gen.assign(to, true);
          } else {
            gen.assign(to, (0, codegen_1._)`${to} || {}`);
            setEvaluated(gen, to, from);
          }
        }),
        mergeValues: (from, to) => from === true ? true : { ...from, ...to },
        resultToName: evaluatedPropsToName
      }),
      items: makeMergeEvaluated({
        mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
        mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),
        mergeValues: (from, to) => from === true ? true : Math.max(from, to),
        resultToName: (gen, items) => gen.var("items", items)
      })
    };
    function evaluatedPropsToName(gen, ps) {
      if (ps === true)
        return gen.var("props", true);
      const props = gen.var("props", (0, codegen_1._)`{}`);
      if (ps !== void 0)
        setEvaluated(gen, props, ps);
      return props;
    }
    exports2.evaluatedPropsToName = evaluatedPropsToName;
    function setEvaluated(gen, props, ps) {
      Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
    }
    exports2.setEvaluated = setEvaluated;
    var snippets = {};
    function useFunc(gen, f) {
      return gen.scopeValue("func", {
        ref: f,
        code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))
      });
    }
    exports2.useFunc = useFunc;
    var Type;
    (function(Type2) {
      Type2[Type2["Num"] = 0] = "Num";
      Type2[Type2["Str"] = 1] = "Str";
    })(Type || (exports2.Type = Type = {}));
    function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
      if (dataProp instanceof codegen_1.Name) {
        const isNumber = dataPropType === Type.Num;
        return jsPropertySyntax ? isNumber ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
      }
      return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
    }
    exports2.getErrorPath = getErrorPath;
    function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
      if (!mode)
        return;
      msg = `strict mode: ${msg}`;
      if (mode === true)
        throw new Error(msg);
      it.self.logger.warn(msg);
    }
    exports2.checkStrictMode = checkStrictMode;
  }
});

// node_modules/ajv/dist/compile/names.js
var require_names = __commonJS({
  "node_modules/ajv/dist/compile/names.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var names = {
      // validation function arguments
      data: new codegen_1.Name("data"),
      // data passed to validation function
      // args passed from referencing schema
      valCxt: new codegen_1.Name("valCxt"),
      // validation/data context - should not be used directly, it is destructured to the names below
      instancePath: new codegen_1.Name("instancePath"),
      parentData: new codegen_1.Name("parentData"),
      parentDataProperty: new codegen_1.Name("parentDataProperty"),
      rootData: new codegen_1.Name("rootData"),
      // root data - same as the data passed to the first/top validation function
      dynamicAnchors: new codegen_1.Name("dynamicAnchors"),
      // used to support recursiveRef and dynamicRef
      // function scoped variables
      vErrors: new codegen_1.Name("vErrors"),
      // null or array of validation errors
      errors: new codegen_1.Name("errors"),
      // counter of validation errors
      this: new codegen_1.Name("this"),
      // "globals"
      self: new codegen_1.Name("self"),
      scope: new codegen_1.Name("scope"),
      // JTD serialize/parse name for JSON string and position
      json: new codegen_1.Name("json"),
      jsonPos: new codegen_1.Name("jsonPos"),
      jsonLen: new codegen_1.Name("jsonLen"),
      jsonPart: new codegen_1.Name("jsonPart")
    };
    exports2.default = names;
  }
});

// node_modules/ajv/dist/compile/errors.js
var require_errors = __commonJS({
  "node_modules/ajv/dist/compile/errors.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.extendErrors = exports2.resetErrorsCount = exports2.reportExtraError = exports2.reportError = exports2.keyword$DataError = exports2.keywordError = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var names_1 = require_names();
    exports2.keywordError = {
      message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation`
    };
    exports2.keyword$DataError = {
      message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`
    };
    function reportError(cxt, error51 = exports2.keywordError, errorPaths, overrideAllErrors) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error51, errorPaths);
      if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
        addError(gen, errObj);
      } else {
        returnErrors(it, (0, codegen_1._)`[${errObj}]`);
      }
    }
    exports2.reportError = reportError;
    function reportExtraError(cxt, error51 = exports2.keywordError, errorPaths) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error51, errorPaths);
      addError(gen, errObj);
      if (!(compositeRule || allErrors)) {
        returnErrors(it, names_1.default.vErrors);
      }
    }
    exports2.reportExtraError = reportExtraError;
    function resetErrorsCount(gen, errsCount) {
      gen.assign(names_1.default.errors, errsCount);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
    }
    exports2.resetErrorsCount = resetErrorsCount;
    function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {
      if (errsCount === void 0)
        throw new Error("ajv implementation error");
      const err = gen.name("err");
      gen.forRange("i", errsCount, names_1.default.errors, (i) => {
        gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);
        gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
        gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);
        if (it.opts.verbose) {
          gen.assign((0, codegen_1._)`${err}.schema`, schemaValue);
          gen.assign((0, codegen_1._)`${err}.data`, data);
        }
      });
    }
    exports2.extendErrors = extendErrors;
    function addError(gen, errObj) {
      const err = gen.const("err", errObj);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
      gen.code((0, codegen_1._)`${names_1.default.errors}++`);
    }
    function returnErrors(it, errs) {
      const { gen, validateName, schemaEnv } = it;
      if (schemaEnv.$async) {
        gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, errs);
        gen.return(false);
      }
    }
    var E = {
      keyword: new codegen_1.Name("keyword"),
      schemaPath: new codegen_1.Name("schemaPath"),
      // also used in JTD errors
      params: new codegen_1.Name("params"),
      propertyName: new codegen_1.Name("propertyName"),
      message: new codegen_1.Name("message"),
      schema: new codegen_1.Name("schema"),
      parentSchema: new codegen_1.Name("parentSchema")
    };
    function errorObjectCode(cxt, error51, errorPaths) {
      const { createErrors } = cxt.it;
      if (createErrors === false)
        return (0, codegen_1._)`{}`;
      return errorObject(cxt, error51, errorPaths);
    }
    function errorObject(cxt, error51, errorPaths = {}) {
      const { gen, it } = cxt;
      const keyValues = [
        errorInstancePath(it, errorPaths),
        errorSchemaPath(cxt, errorPaths)
      ];
      extraErrorProps(cxt, error51, keyValues);
      return gen.object(...keyValues);
    }
    function errorInstancePath({ errorPath }, { instancePath }) {
      const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;
      return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
    }
    function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
      let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;
      if (schemaPath) {
        schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
      }
      return [E.schemaPath, schPath];
    }
    function extraErrorProps(cxt, { params, message }, keyValues) {
      const { keyword, data, schemaValue, it } = cxt;
      const { opts, propertyName, topSchemaRef, schemaPath } = it;
      keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
      if (opts.messages) {
        keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
      }
      if (opts.verbose) {
        keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
      }
      if (propertyName)
        keyValues.push([E.propertyName, propertyName]);
    }
  }
});

// node_modules/ajv/dist/compile/validate/boolSchema.js
var require_boolSchema = __commonJS({
  "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.boolOrEmptySchema = exports2.topBoolOrEmptySchema = void 0;
    var errors_1 = require_errors();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var boolError = {
      message: "boolean schema is false"
    };
    function topBoolOrEmptySchema(it) {
      const { gen, schema, validateName } = it;
      if (schema === false) {
        falseSchemaError(it, false);
      } else if (typeof schema == "object" && schema.$async === true) {
        gen.return(names_1.default.data);
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, null);
        gen.return(true);
      }
    }
    exports2.topBoolOrEmptySchema = topBoolOrEmptySchema;
    function boolOrEmptySchema(it, valid) {
      const { gen, schema } = it;
      if (schema === false) {
        gen.var(valid, false);
        falseSchemaError(it);
      } else {
        gen.var(valid, true);
      }
    }
    exports2.boolOrEmptySchema = boolOrEmptySchema;
    function falseSchemaError(it, overrideAllErrors) {
      const { gen, data } = it;
      const cxt = {
        gen,
        keyword: "false schema",
        data,
        schema: false,
        schemaCode: false,
        schemaValue: false,
        params: {},
        it
      };
      (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);
    }
  }
});

// node_modules/ajv/dist/compile/rules.js
var require_rules = __commonJS({
  "node_modules/ajv/dist/compile/rules.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getRules = exports2.isJSONType = void 0;
    var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
    var jsonTypes = new Set(_jsonTypes);
    function isJSONType(x) {
      return typeof x == "string" && jsonTypes.has(x);
    }
    exports2.isJSONType = isJSONType;
    function getRules() {
      const groups = {
        number: { type: "number", rules: [] },
        string: { type: "string", rules: [] },
        array: { type: "array", rules: [] },
        object: { type: "object", rules: [] }
      };
      return {
        types: { ...groups, integer: true, boolean: true, null: true },
        rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],
        post: { rules: [] },
        all: {},
        keywords: {}
      };
    }
    exports2.getRules = getRules;
  }
});

// node_modules/ajv/dist/compile/validate/applicability.js
var require_applicability = __commonJS({
  "node_modules/ajv/dist/compile/validate/applicability.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.shouldUseRule = exports2.shouldUseGroup = exports2.schemaHasRulesForType = void 0;
    function schemaHasRulesForType({ schema, self }, type) {
      const group = self.RULES.types[type];
      return group && group !== true && shouldUseGroup(schema, group);
    }
    exports2.schemaHasRulesForType = schemaHasRulesForType;
    function shouldUseGroup(schema, group) {
      return group.rules.some((rule) => shouldUseRule(schema, rule));
    }
    exports2.shouldUseGroup = shouldUseGroup;
    function shouldUseRule(schema, rule) {
      var _a3;
      return schema[rule.keyword] !== void 0 || ((_a3 = rule.definition.implements) === null || _a3 === void 0 ? void 0 : _a3.some((kwd) => schema[kwd] !== void 0));
    }
    exports2.shouldUseRule = shouldUseRule;
  }
});

// node_modules/ajv/dist/compile/validate/dataType.js
var require_dataType = __commonJS({
  "node_modules/ajv/dist/compile/validate/dataType.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.reportTypeError = exports2.checkDataTypes = exports2.checkDataType = exports2.coerceAndCheckDataType = exports2.getJSONTypes = exports2.getSchemaTypes = exports2.DataType = void 0;
    var rules_1 = require_rules();
    var applicability_1 = require_applicability();
    var errors_1 = require_errors();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var DataType;
    (function(DataType2) {
      DataType2[DataType2["Correct"] = 0] = "Correct";
      DataType2[DataType2["Wrong"] = 1] = "Wrong";
    })(DataType || (exports2.DataType = DataType = {}));
    function getSchemaTypes(schema) {
      const types = getJSONTypes(schema.type);
      const hasNull = types.includes("null");
      if (hasNull) {
        if (schema.nullable === false)
          throw new Error("type: null contradicts nullable: false");
      } else {
        if (!types.length && schema.nullable !== void 0) {
          throw new Error('"nullable" cannot be used without "type"');
        }
        if (schema.nullable === true)
          types.push("null");
      }
      return types;
    }
    exports2.getSchemaTypes = getSchemaTypes;
    function getJSONTypes(ts) {
      const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
      if (types.every(rules_1.isJSONType))
        return types;
      throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
    }
    exports2.getJSONTypes = getJSONTypes;
    function coerceAndCheckDataType(it, types) {
      const { gen, data, opts } = it;
      const coerceTo = coerceToTypes(types, opts.coerceTypes);
      const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));
      if (checkTypes) {
        const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
        gen.if(wrongType, () => {
          if (coerceTo.length)
            coerceData(it, types, coerceTo);
          else
            reportTypeError(it);
        });
      }
      return checkTypes;
    }
    exports2.coerceAndCheckDataType = coerceAndCheckDataType;
    var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
    function coerceToTypes(types, coerceTypes) {
      return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
    }
    function coerceData(it, types, coerceTo) {
      const { gen, data, opts } = it;
      const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`);
      const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
      if (opts.coerceTypes === "array") {
        gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
      }
      gen.if((0, codegen_1._)`${coerced} !== undefined`);
      for (const t of coerceTo) {
        if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") {
          coerceSpecificType(t);
        }
      }
      gen.else();
      reportTypeError(it);
      gen.endIf();
      gen.if((0, codegen_1._)`${coerced} !== undefined`, () => {
        gen.assign(data, coerced);
        assignParentData(it, coerced);
      });
      function coerceSpecificType(t) {
        switch (t) {
          case "string":
            gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`);
            return;
          case "number":
            gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null
              || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`);
            return;
          case "integer":
            gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null
              || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`);
            return;
          case "boolean":
            gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true);
            return;
          case "null":
            gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`);
            gen.assign(coerced, null);
            return;
          case "array":
            gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number"
              || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);
        }
      }
    }
    function assignParentData({ gen, parentData, parentDataProperty }, expr) {
      gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
    }
    function checkDataType(dataType, data, strictNums, correct = DataType.Correct) {
      const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
      let cond;
      switch (dataType) {
        case "null":
          return (0, codegen_1._)`${data} ${EQ} null`;
        case "array":
          cond = (0, codegen_1._)`Array.isArray(${data})`;
          break;
        case "object":
          cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
          break;
        case "integer":
          cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);
          break;
        case "number":
          cond = numCond();
          break;
        default:
          return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`;
      }
      return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);
      function numCond(_cond = codegen_1.nil) {
        return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);
      }
    }
    exports2.checkDataType = checkDataType;
    function checkDataTypes(dataTypes, data, strictNums, correct) {
      if (dataTypes.length === 1) {
        return checkDataType(dataTypes[0], data, strictNums, correct);
      }
      let cond;
      const types = (0, util_1.toHash)(dataTypes);
      if (types.array && types.object) {
        const notObj = (0, codegen_1._)`typeof ${data} != "object"`;
        cond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;
        delete types.null;
        delete types.array;
        delete types.object;
      } else {
        cond = codegen_1.nil;
      }
      if (types.number)
        delete types.integer;
      for (const t in types)
        cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
      return cond;
    }
    exports2.checkDataTypes = checkDataTypes;
    var typeError = {
      message: ({ schema }) => `must be ${schema}`,
      params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
    };
    function reportTypeError(it) {
      const cxt = getTypeErrorContext(it);
      (0, errors_1.reportError)(cxt, typeError);
    }
    exports2.reportTypeError = reportTypeError;
    function getTypeErrorContext(it) {
      const { gen, data, schema } = it;
      const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
      return {
        gen,
        keyword: "type",
        data,
        schema: schema.type,
        schemaCode,
        schemaValue: schemaCode,
        parentSchema: schema,
        params: {},
        it
      };
    }
  }
});

// node_modules/ajv/dist/compile/validate/defaults.js
var require_defaults = __commonJS({
  "node_modules/ajv/dist/compile/validate/defaults.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.assignDefaults = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    function assignDefaults(it, ty) {
      const { properties, items } = it.schema;
      if (ty === "object" && properties) {
        for (const key in properties) {
          assignDefault(it, key, properties[key].default);
        }
      } else if (ty === "array" && Array.isArray(items)) {
        items.forEach((sch, i) => assignDefault(it, i, sch.default));
      }
    }
    exports2.assignDefaults = assignDefaults;
    function assignDefault(it, prop, defaultValue) {
      const { gen, compositeRule, data, opts } = it;
      if (defaultValue === void 0)
        return;
      const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`;
      if (compositeRule) {
        (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);
        return;
      }
      let condition = (0, codegen_1._)`${childData} === undefined`;
      if (opts.useDefaults === "empty") {
        condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`;
      }
      gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
    }
  }
});

// node_modules/ajv/dist/vocabularies/code.js
var require_code2 = __commonJS({
  "node_modules/ajv/dist/vocabularies/code.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.validateUnion = exports2.validateArray = exports2.usePattern = exports2.callValidateCode = exports2.schemaProperties = exports2.allSchemaProperties = exports2.noPropertyInData = exports2.propertyInData = exports2.isOwnProperty = exports2.hasPropFunc = exports2.reportMissingProp = exports2.checkMissingProp = exports2.checkReportMissingProp = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var names_1 = require_names();
    var util_2 = require_util();
    function checkReportMissingProp(cxt, prop) {
      const { gen, data, it } = cxt;
      gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
        cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);
        cxt.error();
      });
    }
    exports2.checkReportMissingProp = checkReportMissingProp;
    function checkMissingProp({ gen, data, it: { opts } }, properties, missing) {
      return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
    }
    exports2.checkMissingProp = checkMissingProp;
    function reportMissingProp(cxt, missing) {
      cxt.setParams({ missingProperty: missing }, true);
      cxt.error();
    }
    exports2.reportMissingProp = reportMissingProp;
    function hasPropFunc(gen) {
      return gen.scopeValue("func", {
        // eslint-disable-next-line @typescript-eslint/unbound-method
        ref: Object.prototype.hasOwnProperty,
        code: (0, codegen_1._)`Object.prototype.hasOwnProperty`
      });
    }
    exports2.hasPropFunc = hasPropFunc;
    function isOwnProperty(gen, data, property) {
      return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;
    }
    exports2.isOwnProperty = isOwnProperty;
    function propertyInData(gen, data, property, ownProperties) {
      const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;
      return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;
    }
    exports2.propertyInData = propertyInData;
    function noPropertyInData(gen, data, property, ownProperties) {
      const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;
      return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;
    }
    exports2.noPropertyInData = noPropertyInData;
    function allSchemaProperties(schemaMap) {
      return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
    }
    exports2.allSchemaProperties = allSchemaProperties;
    function schemaProperties(it, schemaMap) {
      return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
    }
    exports2.schemaProperties = schemaProperties;
    function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
      const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;
      const valCxt = [
        [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],
        [names_1.default.parentData, it.parentData],
        [names_1.default.parentDataProperty, it.parentDataProperty],
        [names_1.default.rootData, names_1.default.rootData]
      ];
      if (it.opts.dynamicRef)
        valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);
      const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
      return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;
    }
    exports2.callValidateCode = callValidateCode;
    var newRegExp = (0, codegen_1._)`new RegExp`;
    function usePattern({ gen, it: { opts } }, pattern) {
      const u = opts.unicodeRegExp ? "u" : "";
      const { regExp } = opts.code;
      const rx = regExp(pattern, u);
      return gen.scopeValue("pattern", {
        key: rx.toString(),
        ref: rx,
        code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`
      });
    }
    exports2.usePattern = usePattern;
    function validateArray(cxt) {
      const { gen, data, keyword, it } = cxt;
      const valid = gen.name("valid");
      if (it.allErrors) {
        const validArr = gen.let("valid", true);
        validateItems(() => gen.assign(validArr, false));
        return validArr;
      }
      gen.var(valid, true);
      validateItems(() => gen.break());
      return valid;
      function validateItems(notValid) {
        const len = gen.const("len", (0, codegen_1._)`${data}.length`);
        gen.forRange("i", 0, len, (i) => {
          cxt.subschema({
            keyword,
            dataProp: i,
            dataPropType: util_1.Type.Num
          }, valid);
          gen.if((0, codegen_1.not)(valid), notValid);
        });
      }
    }
    exports2.validateArray = validateArray;
    function validateUnion(cxt) {
      const { gen, schema, keyword, it } = cxt;
      if (!Array.isArray(schema))
        throw new Error("ajv implementation error");
      const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
      if (alwaysValid && !it.opts.unevaluated)
        return;
      const valid = gen.let("valid", false);
      const schValid = gen.name("_valid");
      gen.block(() => schema.forEach((_sch, i) => {
        const schCxt = cxt.subschema({
          keyword,
          schemaProp: i,
          compositeRule: true
        }, schValid);
        gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);
        const merged = cxt.mergeValidEvaluated(schCxt, schValid);
        if (!merged)
          gen.if((0, codegen_1.not)(valid));
      }));
      cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
    }
    exports2.validateUnion = validateUnion;
  }
});

// node_modules/ajv/dist/compile/validate/keyword.js
var require_keyword = __commonJS({
  "node_modules/ajv/dist/compile/validate/keyword.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.validateKeywordUsage = exports2.validSchemaType = exports2.funcKeywordCode = exports2.macroKeywordCode = void 0;
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var code_1 = require_code2();
    var errors_1 = require_errors();
    function macroKeywordCode(cxt, def) {
      const { gen, keyword, schema, parentSchema, it } = cxt;
      const macroSchema = def.macro.call(it.self, schema, parentSchema, it);
      const schemaRef = useKeyword(gen, keyword, macroSchema);
      if (it.opts.validateSchema !== false)
        it.self.validateSchema(macroSchema, true);
      const valid = gen.name("valid");
      cxt.subschema({
        schema: macroSchema,
        schemaPath: codegen_1.nil,
        errSchemaPath: `${it.errSchemaPath}/${keyword}`,
        topSchemaRef: schemaRef,
        compositeRule: true
      }, valid);
      cxt.pass(valid, () => cxt.error(true));
    }
    exports2.macroKeywordCode = macroKeywordCode;
    function funcKeywordCode(cxt, def) {
      var _a3;
      const { gen, keyword, schema, parentSchema, $data, it } = cxt;
      checkAsyncKeyword(it, def);
      const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
      const validateRef = useKeyword(gen, keyword, validate);
      const valid = gen.let("valid");
      cxt.block$data(valid, validateKeyword);
      cxt.ok((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid);
      function validateKeyword() {
        if (def.errors === false) {
          assignValid();
          if (def.modifying)
            modifyData(cxt);
          reportErrs(() => cxt.error());
        } else {
          const ruleErrs = def.async ? validateAsync() : validateSync();
          if (def.modifying)
            modifyData(cxt);
          reportErrs(() => addErrs(cxt, ruleErrs));
        }
      }
      function validateAsync() {
        const ruleErrs = gen.let("ruleErrs", null);
        gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
        return ruleErrs;
      }
      function validateSync() {
        const validateErrs = (0, codegen_1._)`${validateRef}.errors`;
        gen.assign(validateErrs, null);
        assignValid(codegen_1.nil);
        return validateErrs;
      }
      function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
        const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
        const passSchema = !("compile" in def && !$data || def.schema === false);
        gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
      }
      function reportErrs(errors) {
        var _a4;
        gen.if((0, codegen_1.not)((_a4 = def.valid) !== null && _a4 !== void 0 ? _a4 : valid), errors);
      }
    }
    exports2.funcKeywordCode = funcKeywordCode;
    function modifyData(cxt) {
      const { gen, data, it } = cxt;
      gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
    }
    function addErrs(cxt, errs) {
      const { gen } = cxt;
      gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {
        gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
        (0, errors_1.extendErrors)(cxt);
      }, () => cxt.error());
    }
    function checkAsyncKeyword({ schemaEnv }, def) {
      if (def.async && !schemaEnv.$async)
        throw new Error("async keyword in sync schema");
    }
    function useKeyword(gen, keyword, result) {
      if (result === void 0)
        throw new Error(`keyword "${keyword}" failed to compile`);
      return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
    }
    function validSchemaType(schema, schemaType, allowUndefined = false) {
      return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
    }
    exports2.validSchemaType = validSchemaType;
    function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {
      if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
        throw new Error("ajv implementation error");
      }
      const deps = def.dependencies;
      if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
        throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
      }
      if (def.validateSchema) {
        const valid = def.validateSchema(schema[keyword]);
        if (!valid) {
          const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors);
          if (opts.validateSchema === "log")
            self.logger.error(msg);
          else
            throw new Error(msg);
        }
      }
    }
    exports2.validateKeywordUsage = validateKeywordUsage;
  }
});

// node_modules/ajv/dist/compile/validate/subschema.js
var require_subschema = __commonJS({
  "node_modules/ajv/dist/compile/validate/subschema.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.extendSubschemaMode = exports2.extendSubschemaData = exports2.getSubschema = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
      if (keyword !== void 0 && schema !== void 0) {
        throw new Error('both "keyword" and "schema" passed, only one allowed');
      }
      if (keyword !== void 0) {
        const sch = it.schema[keyword];
        return schemaProp === void 0 ? {
          schema: sch,
          schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
          errSchemaPath: `${it.errSchemaPath}/${keyword}`
        } : {
          schema: sch[schemaProp],
          schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,
          errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`
        };
      }
      if (schema !== void 0) {
        if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {
          throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
        }
        return {
          schema,
          schemaPath,
          topSchemaRef,
          errSchemaPath
        };
      }
      throw new Error('either "keyword" or "schema" must be passed');
    }
    exports2.getSubschema = getSubschema;
    function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
      if (data !== void 0 && dataProp !== void 0) {
        throw new Error('both "data" and "dataProp" passed, only one allowed');
      }
      const { gen } = it;
      if (dataProp !== void 0) {
        const { errorPath, dataPathArr, opts } = it;
        const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
        dataContextProps(nextData);
        subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
        subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`;
        subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];
      }
      if (data !== void 0) {
        const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true);
        dataContextProps(nextData);
        if (propertyName !== void 0)
          subschema.propertyName = propertyName;
      }
      if (dataTypes)
        subschema.dataTypes = dataTypes;
      function dataContextProps(_nextData) {
        subschema.data = _nextData;
        subschema.dataLevel = it.dataLevel + 1;
        subschema.dataTypes = [];
        it.definedProperties = /* @__PURE__ */ new Set();
        subschema.parentData = it.data;
        subschema.dataNames = [...it.dataNames, _nextData];
      }
    }
    exports2.extendSubschemaData = extendSubschemaData;
    function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
      if (compositeRule !== void 0)
        subschema.compositeRule = compositeRule;
      if (createErrors !== void 0)
        subschema.createErrors = createErrors;
      if (allErrors !== void 0)
        subschema.allErrors = allErrors;
      subschema.jtdDiscriminator = jtdDiscriminator;
      subschema.jtdMetadata = jtdMetadata;
    }
    exports2.extendSubschemaMode = extendSubschemaMode;
  }
});

// node_modules/fast-deep-equal/index.js
var require_fast_deep_equal = __commonJS({
  "node_modules/fast-deep-equal/index.js"(exports2, module2) {
    "use strict";
    module2.exports = function equal(a, b) {
      if (a === b) return true;
      if (a && b && typeof a == "object" && typeof b == "object") {
        if (a.constructor !== b.constructor) return false;
        var length, i, keys;
        if (Array.isArray(a)) {
          length = a.length;
          if (length != b.length) return false;
          for (i = length; i-- !== 0; )
            if (!equal(a[i], b[i])) return false;
          return true;
        }
        if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
        if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
        if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
        keys = Object.keys(a);
        length = keys.length;
        if (length !== Object.keys(b).length) return false;
        for (i = length; i-- !== 0; )
          if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
        for (i = length; i-- !== 0; ) {
          var key = keys[i];
          if (!equal(a[key], b[key])) return false;
        }
        return true;
      }
      return a !== a && b !== b;
    };
  }
});

// node_modules/json-schema-traverse/index.js
var require_json_schema_traverse = __commonJS({
  "node_modules/json-schema-traverse/index.js"(exports2, module2) {
    "use strict";
    var traverse = module2.exports = function(schema, opts, cb) {
      if (typeof opts == "function") {
        cb = opts;
        opts = {};
      }
      cb = opts.cb || cb;
      var pre = typeof cb == "function" ? cb : cb.pre || function() {
      };
      var post = cb.post || function() {
      };
      _traverse(opts, pre, post, schema, "", schema);
    };
    traverse.keywords = {
      additionalItems: true,
      items: true,
      contains: true,
      additionalProperties: true,
      propertyNames: true,
      not: true,
      if: true,
      then: true,
      else: true
    };
    traverse.arrayKeywords = {
      items: true,
      allOf: true,
      anyOf: true,
      oneOf: true
    };
    traverse.propsKeywords = {
      $defs: true,
      definitions: true,
      properties: true,
      patternProperties: true,
      dependencies: true
    };
    traverse.skipKeywords = {
      default: true,
      enum: true,
      const: true,
      required: true,
      maximum: true,
      minimum: true,
      exclusiveMaximum: true,
      exclusiveMinimum: true,
      multipleOf: true,
      maxLength: true,
      minLength: true,
      pattern: true,
      format: true,
      maxItems: true,
      minItems: true,
      uniqueItems: true,
      maxProperties: true,
      minProperties: true
    };
    function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
      if (schema && typeof schema == "object" && !Array.isArray(schema)) {
        pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
        for (var key in schema) {
          var sch = schema[key];
          if (Array.isArray(sch)) {
            if (key in traverse.arrayKeywords) {
              for (var i = 0; i < sch.length; i++)
                _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
            }
          } else if (key in traverse.propsKeywords) {
            if (sch && typeof sch == "object") {
              for (var prop in sch)
                _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
            }
          } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
            _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
          }
        }
        post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
      }
    }
    function escapeJsonPtr(str) {
      return str.replace(/~/g, "~0").replace(/\//g, "~1");
    }
  }
});

// node_modules/ajv/dist/compile/resolve.js
var require_resolve = __commonJS({
  "node_modules/ajv/dist/compile/resolve.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getSchemaRefs = exports2.resolveUrl = exports2.normalizeId = exports2._getFullPath = exports2.getFullPath = exports2.inlineRef = void 0;
    var util_1 = require_util();
    var equal = require_fast_deep_equal();
    var traverse = require_json_schema_traverse();
    var SIMPLE_INLINED = /* @__PURE__ */ new Set([
      "type",
      "format",
      "pattern",
      "maxLength",
      "minLength",
      "maxProperties",
      "minProperties",
      "maxItems",
      "minItems",
      "maximum",
      "minimum",
      "uniqueItems",
      "multipleOf",
      "required",
      "enum",
      "const"
    ]);
    function inlineRef(schema, limit = true) {
      if (typeof schema == "boolean")
        return true;
      if (limit === true)
        return !hasRef(schema);
      if (!limit)
        return false;
      return countKeys(schema) <= limit;
    }
    exports2.inlineRef = inlineRef;
    var REF_KEYWORDS = /* @__PURE__ */ new Set([
      "$ref",
      "$recursiveRef",
      "$recursiveAnchor",
      "$dynamicRef",
      "$dynamicAnchor"
    ]);
    function hasRef(schema) {
      for (const key in schema) {
        if (REF_KEYWORDS.has(key))
          return true;
        const sch = schema[key];
        if (Array.isArray(sch) && sch.some(hasRef))
          return true;
        if (typeof sch == "object" && hasRef(sch))
          return true;
      }
      return false;
    }
    function countKeys(schema) {
      let count = 0;
      for (const key in schema) {
        if (key === "$ref")
          return Infinity;
        count++;
        if (SIMPLE_INLINED.has(key))
          continue;
        if (typeof schema[key] == "object") {
          (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
        }
        if (count === Infinity)
          return Infinity;
      }
      return count;
    }
    function getFullPath(resolver, id = "", normalize) {
      if (normalize !== false)
        id = normalizeId(id);
      const p = resolver.parse(id);
      return _getFullPath(resolver, p);
    }
    exports2.getFullPath = getFullPath;
    function _getFullPath(resolver, p) {
      const serialized = resolver.serialize(p);
      return serialized.split("#")[0] + "#";
    }
    exports2._getFullPath = _getFullPath;
    var TRAILING_SLASH_HASH = /#\/?$/;
    function normalizeId(id) {
      return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
    }
    exports2.normalizeId = normalizeId;
    function resolveUrl(resolver, baseId, id) {
      id = normalizeId(id);
      return resolver.resolve(baseId, id);
    }
    exports2.resolveUrl = resolveUrl;
    var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
    function getSchemaRefs(schema, baseId) {
      if (typeof schema == "boolean")
        return {};
      const { schemaId, uriResolver } = this.opts;
      const schId = normalizeId(schema[schemaId] || baseId);
      const baseIds = { "": schId };
      const pathPrefix = getFullPath(uriResolver, schId, false);
      const localRefs = {};
      const schemaRefs = /* @__PURE__ */ new Set();
      traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
        if (parentJsonPtr === void 0)
          return;
        const fullPath = pathPrefix + jsonPtr;
        let innerBaseId = baseIds[parentJsonPtr];
        if (typeof sch[schemaId] == "string")
          innerBaseId = addRef.call(this, sch[schemaId]);
        addAnchor.call(this, sch.$anchor);
        addAnchor.call(this, sch.$dynamicAnchor);
        baseIds[jsonPtr] = innerBaseId;
        function addRef(ref) {
          const _resolve = this.opts.uriResolver.resolve;
          ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);
          if (schemaRefs.has(ref))
            throw ambiguos(ref);
          schemaRefs.add(ref);
          let schOrRef = this.refs[ref];
          if (typeof schOrRef == "string")
            schOrRef = this.refs[schOrRef];
          if (typeof schOrRef == "object") {
            checkAmbiguosRef(sch, schOrRef.schema, ref);
          } else if (ref !== normalizeId(fullPath)) {
            if (ref[0] === "#") {
              checkAmbiguosRef(sch, localRefs[ref], ref);
              localRefs[ref] = sch;
            } else {
              this.refs[ref] = fullPath;
            }
          }
          return ref;
        }
        function addAnchor(anchor) {
          if (typeof anchor == "string") {
            if (!ANCHOR.test(anchor))
              throw new Error(`invalid anchor "${anchor}"`);
            addRef.call(this, `#${anchor}`);
          }
        }
      });
      return localRefs;
      function checkAmbiguosRef(sch1, sch2, ref) {
        if (sch2 !== void 0 && !equal(sch1, sch2))
          throw ambiguos(ref);
      }
      function ambiguos(ref) {
        return new Error(`reference "${ref}" resolves to more than one schema`);
      }
    }
    exports2.getSchemaRefs = getSchemaRefs;
  }
});

// node_modules/ajv/dist/compile/validate/index.js
var require_validate = __commonJS({
  "node_modules/ajv/dist/compile/validate/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.getData = exports2.KeywordCxt = exports2.validateFunctionCode = void 0;
    var boolSchema_1 = require_boolSchema();
    var dataType_1 = require_dataType();
    var applicability_1 = require_applicability();
    var dataType_2 = require_dataType();
    var defaults_1 = require_defaults();
    var keyword_1 = require_keyword();
    var subschema_1 = require_subschema();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var resolve_1 = require_resolve();
    var util_1 = require_util();
    var errors_1 = require_errors();
    function validateFunctionCode(it) {
      if (isSchemaObj(it)) {
        checkKeywords(it);
        if (schemaCxtHasRules(it)) {
          topSchemaObjCode(it);
          return;
        }
      }
      validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
    }
    exports2.validateFunctionCode = validateFunctionCode;
    function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
      if (opts.code.es5) {
        gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
          gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
          destructureValCxtES5(gen, opts);
          gen.code(body);
        });
      } else {
        gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
      }
    }
    function destructureValCxt(opts) {
      return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
    }
    function destructureValCxtES5(gen, opts) {
      gen.if(names_1.default.valCxt, () => {
        gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);
        gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);
        gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);
        gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);
        if (opts.dynamicRef)
          gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);
      }, () => {
        gen.var(names_1.default.instancePath, (0, codegen_1._)`""`);
        gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);
        gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);
        gen.var(names_1.default.rootData, names_1.default.data);
        if (opts.dynamicRef)
          gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);
      });
    }
    function topSchemaObjCode(it) {
      const { schema, opts, gen } = it;
      validateFunction(it, () => {
        if (opts.$comment && schema.$comment)
          commentKeyword(it);
        checkNoDefault(it);
        gen.let(names_1.default.vErrors, null);
        gen.let(names_1.default.errors, 0);
        if (opts.unevaluated)
          resetEvaluated(it);
        typeAndKeywords(it);
        returnResults(it);
      });
      return;
    }
    function resetEvaluated(it) {
      const { gen, validateName } = it;
      it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`);
      gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));
      gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));
    }
    function funcSourceUrl(schema, opts) {
      const schId = typeof schema == "object" && schema[opts.schemaId];
      return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;
    }
    function subschemaCode(it, valid) {
      if (isSchemaObj(it)) {
        checkKeywords(it);
        if (schemaCxtHasRules(it)) {
          subSchemaObjCode(it, valid);
          return;
        }
      }
      (0, boolSchema_1.boolOrEmptySchema)(it, valid);
    }
    function schemaCxtHasRules({ schema, self }) {
      if (typeof schema == "boolean")
        return !schema;
      for (const key in schema)
        if (self.RULES.all[key])
          return true;
      return false;
    }
    function isSchemaObj(it) {
      return typeof it.schema != "boolean";
    }
    function subSchemaObjCode(it, valid) {
      const { schema, gen, opts } = it;
      if (opts.$comment && schema.$comment)
        commentKeyword(it);
      updateContext(it);
      checkAsyncSchema(it);
      const errsCount = gen.const("_errs", names_1.default.errors);
      typeAndKeywords(it, errsCount);
      gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
    }
    function checkKeywords(it) {
      (0, util_1.checkUnknownRules)(it);
      checkRefsAndKeywords(it);
    }
    function typeAndKeywords(it, errsCount) {
      if (it.opts.jtd)
        return schemaKeywords(it, [], false, errsCount);
      const types = (0, dataType_1.getSchemaTypes)(it.schema);
      const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);
      schemaKeywords(it, types, !checkedTypes, errsCount);
    }
    function checkRefsAndKeywords(it) {
      const { schema, errSchemaPath, opts, self } = it;
      if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {
        self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
      }
    }
    function checkNoDefault(it) {
      const { schema, opts } = it;
      if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) {
        (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
      }
    }
    function updateContext(it) {
      const schId = it.schema[it.opts.schemaId];
      if (schId)
        it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);
    }
    function checkAsyncSchema(it) {
      if (it.schema.$async && !it.schemaEnv.$async)
        throw new Error("async schema in sync schema");
    }
    function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
      const msg = schema.$comment;
      if (opts.$comment === true) {
        gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);
      } else if (typeof opts.$comment == "function") {
        const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;
        const rootName = gen.scopeValue("root", { ref: schemaEnv.root });
        gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
      }
    }
    function returnResults(it) {
      const { gen, schemaEnv, validateName, ValidationError, opts } = it;
      if (schemaEnv.$async) {
        gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);
        if (opts.unevaluated)
          assignEvaluated(it);
        gen.return((0, codegen_1._)`${names_1.default.errors} === 0`);
      }
    }
    function assignEvaluated({ gen, evaluated, props, items }) {
      if (props instanceof codegen_1.Name)
        gen.assign((0, codegen_1._)`${evaluated}.props`, props);
      if (items instanceof codegen_1.Name)
        gen.assign((0, codegen_1._)`${evaluated}.items`, items);
    }
    function schemaKeywords(it, types, typeErrors, errsCount) {
      const { gen, schema, data, allErrors, opts, self } = it;
      const { RULES } = self;
      if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
        gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
        return;
      }
      if (!opts.jtd)
        checkStrictTypes(it, types);
      gen.block(() => {
        for (const group of RULES.rules)
          groupKeywords(group);
        groupKeywords(RULES.post);
      });
      function groupKeywords(group) {
        if (!(0, applicability_1.shouldUseGroup)(schema, group))
          return;
        if (group.type) {
          gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));
          iterateKeywords(it, group);
          if (types.length === 1 && types[0] === group.type && typeErrors) {
            gen.else();
            (0, dataType_2.reportTypeError)(it);
          }
          gen.endIf();
        } else {
          iterateKeywords(it, group);
        }
        if (!allErrors)
          gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);
      }
    }
    function iterateKeywords(it, group) {
      const { gen, schema, opts: { useDefaults } } = it;
      if (useDefaults)
        (0, defaults_1.assignDefaults)(it, group.type);
      gen.block(() => {
        for (const rule of group.rules) {
          if ((0, applicability_1.shouldUseRule)(schema, rule)) {
            keywordCode(it, rule.keyword, rule.definition, group.type);
          }
        }
      });
    }
    function checkStrictTypes(it, types) {
      if (it.schemaEnv.meta || !it.opts.strictTypes)
        return;
      checkContextTypes(it, types);
      if (!it.opts.allowUnionTypes)
        checkMultipleTypes(it, types);
      checkKeywordTypes(it, it.dataTypes);
    }
    function checkContextTypes(it, types) {
      if (!types.length)
        return;
      if (!it.dataTypes.length) {
        it.dataTypes = types;
        return;
      }
      types.forEach((t) => {
        if (!includesType(it.dataTypes, t)) {
          strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
        }
      });
      narrowSchemaTypes(it, types);
    }
    function checkMultipleTypes(it, ts) {
      if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
        strictTypesError(it, "use allowUnionTypes to allow union type keyword");
      }
    }
    function checkKeywordTypes(it, ts) {
      const rules = it.self.RULES.all;
      for (const keyword in rules) {
        const rule = rules[keyword];
        if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
          const { type } = rule.definition;
          if (type.length && !type.some((t) => hasApplicableType(ts, t))) {
            strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
          }
        }
      }
    }
    function hasApplicableType(schTs, kwdT) {
      return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer");
    }
    function includesType(ts, t) {
      return ts.includes(t) || t === "integer" && ts.includes("number");
    }
    function narrowSchemaTypes(it, withTypes) {
      const ts = [];
      for (const t of it.dataTypes) {
        if (includesType(withTypes, t))
          ts.push(t);
        else if (withTypes.includes("integer") && t === "number")
          ts.push("integer");
      }
      it.dataTypes = ts;
    }
    function strictTypesError(it, msg) {
      const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
      msg += ` at "${schemaPath}" (strictTypes)`;
      (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);
    }
    var KeywordCxt = class {
      constructor(it, def, keyword) {
        (0, keyword_1.validateKeywordUsage)(it, def, keyword);
        this.gen = it.gen;
        this.allErrors = it.allErrors;
        this.keyword = keyword;
        this.data = it.data;
        this.schema = it.schema[keyword];
        this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;
        this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);
        this.schemaType = def.schemaType;
        this.parentSchema = it.schema;
        this.params = {};
        this.it = it;
        this.def = def;
        if (this.$data) {
          this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
        } else {
          this.schemaCode = this.schemaValue;
          if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {
            throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);
          }
        }
        if ("code" in def ? def.trackErrors : def.errors !== false) {
          this.errsCount = it.gen.const("_errs", names_1.default.errors);
        }
      }
      result(condition, successAction, failAction) {
        this.failResult((0, codegen_1.not)(condition), successAction, failAction);
      }
      failResult(condition, successAction, failAction) {
        this.gen.if(condition);
        if (failAction)
          failAction();
        else
          this.error();
        if (successAction) {
          this.gen.else();
          successAction();
          if (this.allErrors)
            this.gen.endIf();
        } else {
          if (this.allErrors)
            this.gen.endIf();
          else
            this.gen.else();
        }
      }
      pass(condition, failAction) {
        this.failResult((0, codegen_1.not)(condition), void 0, failAction);
      }
      fail(condition) {
        if (condition === void 0) {
          this.error();
          if (!this.allErrors)
            this.gen.if(false);
          return;
        }
        this.gen.if(condition);
        this.error();
        if (this.allErrors)
          this.gen.endIf();
        else
          this.gen.else();
      }
      fail$data(condition) {
        if (!this.$data)
          return this.fail(condition);
        const { schemaCode } = this;
        this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);
      }
      error(append, errorParams, errorPaths) {
        if (errorParams) {
          this.setParams(errorParams);
          this._error(append, errorPaths);
          this.setParams({});
          return;
        }
        this._error(append, errorPaths);
      }
      _error(append, errorPaths) {
        ;
        (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);
      }
      $dataError() {
        (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);
      }
      reset() {
        if (this.errsCount === void 0)
          throw new Error('add "trackErrors" to keyword definition');
        (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);
      }
      ok(cond) {
        if (!this.allErrors)
          this.gen.if(cond);
      }
      setParams(obj, assign) {
        if (assign)
          Object.assign(this.params, obj);
        else
          this.params = obj;
      }
      block$data(valid, codeBlock, $dataValid = codegen_1.nil) {
        this.gen.block(() => {
          this.check$data(valid, $dataValid);
          codeBlock();
        });
      }
      check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {
        if (!this.$data)
          return;
        const { gen, schemaCode, schemaType, def } = this;
        gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));
        if (valid !== codegen_1.nil)
          gen.assign(valid, true);
        if (schemaType.length || def.validateSchema) {
          gen.elseIf(this.invalid$data());
          this.$dataError();
          if (valid !== codegen_1.nil)
            gen.assign(valid, false);
        }
        gen.else();
      }
      invalid$data() {
        const { gen, schemaCode, schemaType, def, it } = this;
        return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());
        function wrong$DataType() {
          if (schemaType.length) {
            if (!(schemaCode instanceof codegen_1.Name))
              throw new Error("ajv implementation error");
            const st = Array.isArray(schemaType) ? schemaType : [schemaType];
            return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;
          }
          return codegen_1.nil;
        }
        function invalid$DataSchema() {
          if (def.validateSchema) {
            const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema });
            return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;
          }
          return codegen_1.nil;
        }
      }
      subschema(appl, valid) {
        const subschema = (0, subschema_1.getSubschema)(this.it, appl);
        (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);
        (0, subschema_1.extendSubschemaMode)(subschema, appl);
        const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 };
        subschemaCode(nextContext, valid);
        return nextContext;
      }
      mergeEvaluated(schemaCxt, toName) {
        const { it, gen } = this;
        if (!it.opts.unevaluated)
          return;
        if (it.props !== true && schemaCxt.props !== void 0) {
          it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
        }
        if (it.items !== true && schemaCxt.items !== void 0) {
          it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
        }
      }
      mergeValidEvaluated(schemaCxt, valid) {
        const { it, gen } = this;
        if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
          gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));
          return true;
        }
      }
    };
    exports2.KeywordCxt = KeywordCxt;
    function keywordCode(it, keyword, def, ruleType) {
      const cxt = new KeywordCxt(it, def, keyword);
      if ("code" in def) {
        def.code(cxt, ruleType);
      } else if (cxt.$data && def.validate) {
        (0, keyword_1.funcKeywordCode)(cxt, def);
      } else if ("macro" in def) {
        (0, keyword_1.macroKeywordCode)(cxt, def);
      } else if (def.compile || def.validate) {
        (0, keyword_1.funcKeywordCode)(cxt, def);
      }
    }
    var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
    var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
    function getData($data, { dataLevel, dataNames, dataPathArr }) {
      let jsonPointer;
      let data;
      if ($data === "")
        return names_1.default.rootData;
      if ($data[0] === "/") {
        if (!JSON_POINTER.test($data))
          throw new Error(`Invalid JSON-pointer: ${$data}`);
        jsonPointer = $data;
        data = names_1.default.rootData;
      } else {
        const matches = RELATIVE_JSON_POINTER.exec($data);
        if (!matches)
          throw new Error(`Invalid JSON-pointer: ${$data}`);
        const up = +matches[1];
        jsonPointer = matches[2];
        if (jsonPointer === "#") {
          if (up >= dataLevel)
            throw new Error(errorMsg("property/index", up));
          return dataPathArr[dataLevel - up];
        }
        if (up > dataLevel)
          throw new Error(errorMsg("data", up));
        data = dataNames[dataLevel - up];
        if (!jsonPointer)
          return data;
      }
      let expr = data;
      const segments = jsonPointer.split("/");
      for (const segment of segments) {
        if (segment) {
          data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
          expr = (0, codegen_1._)`${expr} && ${data}`;
        }
      }
      return expr;
      function errorMsg(pointerType, up) {
        return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
      }
    }
    exports2.getData = getData;
  }
});

// node_modules/ajv/dist/runtime/validation_error.js
var require_validation_error = __commonJS({
  "node_modules/ajv/dist/runtime/validation_error.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var ValidationError = class extends Error {
      constructor(errors) {
        super("validation failed");
        this.errors = errors;
        this.ajv = this.validation = true;
      }
    };
    exports2.default = ValidationError;
  }
});

// node_modules/ajv/dist/compile/ref_error.js
var require_ref_error = __commonJS({
  "node_modules/ajv/dist/compile/ref_error.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var resolve_1 = require_resolve();
    var MissingRefError = class extends Error {
      constructor(resolver, baseId, ref, msg) {
        super(msg || `can't resolve reference ${ref} from id ${baseId}`);
        this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);
        this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
      }
    };
    exports2.default = MissingRefError;
  }
});

// node_modules/ajv/dist/compile/index.js
var require_compile = __commonJS({
  "node_modules/ajv/dist/compile/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.resolveSchema = exports2.getCompilingSchema = exports2.resolveRef = exports2.compileSchema = exports2.SchemaEnv = void 0;
    var codegen_1 = require_codegen();
    var validation_error_1 = require_validation_error();
    var names_1 = require_names();
    var resolve_1 = require_resolve();
    var util_1 = require_util();
    var validate_1 = require_validate();
    var SchemaEnv = class {
      constructor(env) {
        var _a3;
        this.refs = {};
        this.dynamicAnchors = {};
        let schema;
        if (typeof env.schema == "object")
          schema = env.schema;
        this.schema = env.schema;
        this.schemaId = env.schemaId;
        this.root = env.root || this;
        this.baseId = (_a3 = env.baseId) !== null && _a3 !== void 0 ? _a3 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
        this.schemaPath = env.schemaPath;
        this.localRefs = env.localRefs;
        this.meta = env.meta;
        this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
        this.refs = {};
      }
    };
    exports2.SchemaEnv = SchemaEnv;
    function compileSchema(sch) {
      const _sch = getCompilingSchema.call(this, sch);
      if (_sch)
        return _sch;
      const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);
      const { es5, lines } = this.opts.code;
      const { ownProperties } = this.opts;
      const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
      let _ValidationError;
      if (sch.$async) {
        _ValidationError = gen.scopeValue("Error", {
          ref: validation_error_1.default,
          code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
        });
      }
      const validateName = gen.scopeName("validate");
      sch.validateName = validateName;
      const schemaCxt = {
        gen,
        allErrors: this.opts.allErrors,
        data: names_1.default.data,
        parentData: names_1.default.parentData,
        parentDataProperty: names_1.default.parentDataProperty,
        dataNames: [names_1.default.data],
        dataPathArr: [codegen_1.nil],
        // TODO can its length be used as dataLevel if nil is removed?
        dataLevel: 0,
        dataTypes: [],
        definedProperties: /* @__PURE__ */ new Set(),
        topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }),
        validateName,
        ValidationError: _ValidationError,
        schema: sch.schema,
        schemaEnv: sch,
        rootId,
        baseId: sch.baseId || rootId,
        schemaPath: codegen_1.nil,
        errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
        errorPath: (0, codegen_1._)`""`,
        opts: this.opts,
        self: this
      };
      let sourceCode;
      try {
        this._compilations.add(sch);
        (0, validate_1.validateFunctionCode)(schemaCxt);
        gen.optimize(this.opts.code.optimize);
        const validateCode = gen.toString();
        sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
        if (this.opts.code.process)
          sourceCode = this.opts.code.process(sourceCode, sch);
        const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
        const validate = makeValidate(this, this.scope.get());
        this.scope.value(validateName, { ref: validate });
        validate.errors = null;
        validate.schema = sch.schema;
        validate.schemaEnv = sch;
        if (sch.$async)
          validate.$async = true;
        if (this.opts.code.source === true) {
          validate.source = { validateName, validateCode, scopeValues: gen._values };
        }
        if (this.opts.unevaluated) {
          const { props, items } = schemaCxt;
          validate.evaluated = {
            props: props instanceof codegen_1.Name ? void 0 : props,
            items: items instanceof codegen_1.Name ? void 0 : items,
            dynamicProps: props instanceof codegen_1.Name,
            dynamicItems: items instanceof codegen_1.Name
          };
          if (validate.source)
            validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
        }
        sch.validate = validate;
        return sch;
      } catch (e) {
        delete sch.validate;
        delete sch.validateName;
        if (sourceCode)
          this.logger.error("Error compiling schema, function code:", sourceCode);
        throw e;
      } finally {
        this._compilations.delete(sch);
      }
    }
    exports2.compileSchema = compileSchema;
    function resolveRef2(root, baseId, ref) {
      var _a3;
      ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
      const schOrFunc = root.refs[ref];
      if (schOrFunc)
        return schOrFunc;
      let _sch = resolve.call(this, root, ref);
      if (_sch === void 0) {
        const schema = (_a3 = root.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
        const { schemaId } = this.opts;
        if (schema)
          _sch = new SchemaEnv({ schema, schemaId, root, baseId });
      }
      if (_sch === void 0)
        return;
      return root.refs[ref] = inlineOrCompile.call(this, _sch);
    }
    exports2.resolveRef = resolveRef2;
    function inlineOrCompile(sch) {
      if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
        return sch.schema;
      return sch.validate ? sch : compileSchema.call(this, sch);
    }
    function getCompilingSchema(schEnv) {
      for (const sch of this._compilations) {
        if (sameSchemaEnv(sch, schEnv))
          return sch;
      }
    }
    exports2.getCompilingSchema = getCompilingSchema;
    function sameSchemaEnv(s1, s2) {
      return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
    }
    function resolve(root, ref) {
      let sch;
      while (typeof (sch = this.refs[ref]) == "string")
        ref = sch;
      return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
    }
    function resolveSchema(root, ref) {
      const p = this.opts.uriResolver.parse(ref);
      const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
      let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);
      if (Object.keys(root.schema).length > 0 && refPath === baseId) {
        return getJsonPointer.call(this, p, root);
      }
      const id = (0, resolve_1.normalizeId)(refPath);
      const schOrRef = this.refs[id] || this.schemas[id];
      if (typeof schOrRef == "string") {
        const sch = resolveSchema.call(this, root, schOrRef);
        if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
          return;
        return getJsonPointer.call(this, p, sch);
      }
      if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
        return;
      if (!schOrRef.validate)
        compileSchema.call(this, schOrRef);
      if (id === (0, resolve_1.normalizeId)(ref)) {
        const { schema } = schOrRef;
        const { schemaId } = this.opts;
        const schId = schema[schemaId];
        if (schId)
          baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
        return new SchemaEnv({ schema, schemaId, root, baseId });
      }
      return getJsonPointer.call(this, p, schOrRef);
    }
    exports2.resolveSchema = resolveSchema;
    var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
      "properties",
      "patternProperties",
      "enum",
      "dependencies",
      "definitions"
    ]);
    function getJsonPointer(parsedRef, { baseId, schema, root }) {
      var _a3;
      if (((_a3 = parsedRef.fragment) === null || _a3 === void 0 ? void 0 : _a3[0]) !== "/")
        return;
      for (const part of parsedRef.fragment.slice(1).split("/")) {
        if (typeof schema === "boolean")
          return;
        const partSchema = schema[(0, util_1.unescapeFragment)(part)];
        if (partSchema === void 0)
          return;
        schema = partSchema;
        const schId = typeof schema === "object" && schema[this.opts.schemaId];
        if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
          baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
        }
      }
      let env;
      if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
        const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
        env = resolveSchema.call(this, root, $ref);
      }
      const { schemaId } = this.opts;
      env = env || new SchemaEnv({ schema, schemaId, root, baseId });
      if (env.schema !== env.root.schema)
        return env;
      return void 0;
    }
  }
});

// node_modules/ajv/dist/refs/data.json
var require_data = __commonJS({
  "node_modules/ajv/dist/refs/data.json"(exports2, module2) {
    module2.exports = {
      $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
      description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
      type: "object",
      required: ["$data"],
      properties: {
        $data: {
          type: "string",
          anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }]
        }
      },
      additionalProperties: false
    };
  }
});

// node_modules/fast-uri/lib/utils.js
var require_utils = __commonJS({
  "node_modules/fast-uri/lib/utils.js"(exports2, module2) {
    "use strict";
    var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
    var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
    var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
    var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
    var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
    function stringArrayToHexStripped(input) {
      let acc = "";
      let code = 0;
      let i = 0;
      for (i = 0; i < input.length; i++) {
        code = input[i].charCodeAt(0);
        if (code === 48) {
          continue;
        }
        if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
          return "";
        }
        acc += input[i];
        break;
      }
      for (i += 1; i < input.length; i++) {
        code = input[i].charCodeAt(0);
        if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
          return "";
        }
        acc += input[i];
      }
      return acc;
    }
    var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
    function consumeIsZone(buffer) {
      buffer.length = 0;
      return true;
    }
    function consumeHextets(buffer, address, output) {
      if (buffer.length) {
        const hex3 = stringArrayToHexStripped(buffer);
        if (hex3 !== "") {
          address.push(hex3);
        } else {
          output.error = true;
          return false;
        }
        buffer.length = 0;
      }
      return true;
    }
    function getIPV6(input) {
      let tokenCount = 0;
      const output = { error: false, address: "", zone: "" };
      const address = [];
      const buffer = [];
      let endipv6Encountered = false;
      let endIpv6 = false;
      let consume = consumeHextets;
      for (let i = 0; i < input.length; i++) {
        const cursor = input[i];
        if (cursor === "[" || cursor === "]") {
          continue;
        }
        if (cursor === ":") {
          if (endipv6Encountered === true) {
            endIpv6 = true;
          }
          if (!consume(buffer, address, output)) {
            break;
          }
          if (++tokenCount > 7) {
            output.error = true;
            break;
          }
          if (i > 0 && input[i - 1] === ":") {
            endipv6Encountered = true;
          }
          address.push(":");
          continue;
        } else if (cursor === "%") {
          if (!consume(buffer, address, output)) {
            break;
          }
          consume = consumeIsZone;
        } else {
          buffer.push(cursor);
          continue;
        }
      }
      if (buffer.length) {
        if (consume === consumeIsZone) {
          output.zone = buffer.join("");
        } else if (endIpv6) {
          address.push(buffer.join(""));
        } else {
          address.push(stringArrayToHexStripped(buffer));
        }
      }
      output.address = address.join("");
      return output;
    }
    function normalizeIPv6(host) {
      if (findToken(host, ":") < 2) {
        return { host, isIPV6: false };
      }
      const ipv63 = getIPV6(host);
      if (!ipv63.error) {
        let newHost = ipv63.address;
        let escapedHost = ipv63.address;
        if (ipv63.zone) {
          newHost += "%" + ipv63.zone;
          escapedHost += "%25" + ipv63.zone;
        }
        return { host: newHost, isIPV6: true, escapedHost };
      } else {
        return { host, isIPV6: false };
      }
    }
    function findToken(str, token) {
      let ind = 0;
      for (let i = 0; i < str.length; i++) {
        if (str[i] === token) ind++;
      }
      return ind;
    }
    function removeDotSegments(path) {
      let input = path;
      const output = [];
      let nextSlash = -1;
      let len = 0;
      while (len = input.length) {
        if (len === 1) {
          if (input === ".") {
            break;
          } else if (input === "/") {
            output.push("/");
            break;
          } else {
            output.push(input);
            break;
          }
        } else if (len === 2) {
          if (input[0] === ".") {
            if (input[1] === ".") {
              break;
            } else if (input[1] === "/") {
              input = input.slice(2);
              continue;
            }
          } else if (input[0] === "/") {
            if (input[1] === "." || input[1] === "/") {
              output.push("/");
              break;
            }
          }
        } else if (len === 3) {
          if (input === "/..") {
            if (output.length !== 0) {
              output.pop();
            }
            output.push("/");
            break;
          }
        }
        if (input[0] === ".") {
          if (input[1] === ".") {
            if (input[2] === "/") {
              input = input.slice(3);
              continue;
            }
          } else if (input[1] === "/") {
            input = input.slice(2);
            continue;
          }
        } else if (input[0] === "/") {
          if (input[1] === ".") {
            if (input[2] === "/") {
              input = input.slice(2);
              continue;
            } else if (input[2] === ".") {
              if (input[3] === "/") {
                input = input.slice(3);
                if (output.length !== 0) {
                  output.pop();
                }
                continue;
              }
            }
          }
        }
        if ((nextSlash = input.indexOf("/", 1)) === -1) {
          output.push(input);
          break;
        } else {
          output.push(input.slice(0, nextSlash));
          input = input.slice(nextSlash);
        }
      }
      return output.join("");
    }
    var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
    var HOST_DELIM_RE = /[@/?#:]/g;
    var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
    function reescapeHostDelimiters(host, isIP) {
      const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
      re.lastIndex = 0;
      return host.replace(re, (ch) => HOST_DELIMS[ch]);
    }
    function normalizePercentEncoding(input, decodeUnreserved = false) {
      if (input.indexOf("%") === -1) {
        return input;
      }
      let output = "";
      for (let i = 0; i < input.length; i++) {
        if (input[i] === "%" && i + 2 < input.length) {
          const hex3 = input.slice(i + 1, i + 3);
          if (isHexPair(hex3)) {
            const normalizedHex = hex3.toUpperCase();
            const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
            if (decodeUnreserved && isUnreserved(decoded)) {
              output += decoded;
            } else {
              output += "%" + normalizedHex;
            }
            i += 2;
            continue;
          }
        }
        output += input[i];
      }
      return output;
    }
    function normalizePathEncoding(input) {
      let output = "";
      for (let i = 0; i < input.length; i++) {
        if (input[i] === "%" && i + 2 < input.length) {
          const hex3 = input.slice(i + 1, i + 3);
          if (isHexPair(hex3)) {
            const normalizedHex = hex3.toUpperCase();
            const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
            if (decoded !== "." && isUnreserved(decoded)) {
              output += decoded;
            } else {
              output += "%" + normalizedHex;
            }
            i += 2;
            continue;
          }
        }
        if (isPathCharacter(input[i])) {
          output += input[i];
        } else {
          output += escape(input[i]);
        }
      }
      return output;
    }
    function escapePreservingEscapes(input) {
      let output = "";
      for (let i = 0; i < input.length; i++) {
        if (input[i] === "%" && i + 2 < input.length) {
          const hex3 = input.slice(i + 1, i + 3);
          if (isHexPair(hex3)) {
            output += "%" + hex3.toUpperCase();
            i += 2;
            continue;
          }
        }
        output += escape(input[i]);
      }
      return output;
    }
    function recomposeAuthority(component) {
      const uriTokens = [];
      if (component.userinfo !== void 0) {
        uriTokens.push(component.userinfo);
        uriTokens.push("@");
      }
      if (component.host !== void 0) {
        let host = unescape(component.host);
        if (!isIPv4(host)) {
          const ipV6res = normalizeIPv6(host);
          if (ipV6res.isIPV6 === true) {
            host = `[${ipV6res.escapedHost}]`;
          } else {
            host = reescapeHostDelimiters(host, false);
          }
        }
        uriTokens.push(host);
      }
      if (typeof component.port === "number" || typeof component.port === "string") {
        uriTokens.push(":");
        uriTokens.push(String(component.port));
      }
      return uriTokens.length ? uriTokens.join("") : void 0;
    }
    module2.exports = {
      nonSimpleDomain,
      recomposeAuthority,
      reescapeHostDelimiters,
      normalizePercentEncoding,
      normalizePathEncoding,
      escapePreservingEscapes,
      removeDotSegments,
      isIPv4,
      isUUID,
      normalizeIPv6,
      stringArrayToHexStripped
    };
  }
});

// node_modules/fast-uri/lib/schemes.js
var require_schemes = __commonJS({
  "node_modules/fast-uri/lib/schemes.js"(exports2, module2) {
    "use strict";
    var { isUUID } = require_utils();
    var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
    var supportedSchemeNames = (
      /** @type {const} */
      [
        "http",
        "https",
        "ws",
        "wss",
        "urn",
        "urn:uuid"
      ]
    );
    function isValidSchemeName(name) {
      return supportedSchemeNames.indexOf(
        /** @type {*} */
        name
      ) !== -1;
    }
    function wsIsSecure(wsComponent) {
      if (wsComponent.secure === true) {
        return true;
      } else if (wsComponent.secure === false) {
        return false;
      } else if (wsComponent.scheme) {
        return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S");
      } else {
        return false;
      }
    }
    function httpParse(component) {
      if (!component.host) {
        component.error = component.error || "HTTP URIs must have a host.";
      }
      return component;
    }
    function httpSerialize(component) {
      const secure = String(component.scheme).toLowerCase() === "https";
      if (component.port === (secure ? 443 : 80) || component.port === "") {
        component.port = void 0;
      }
      if (!component.path) {
        component.path = "/";
      }
      return component;
    }
    function wsParse(wsComponent) {
      wsComponent.secure = wsIsSecure(wsComponent);
      wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : "");
      wsComponent.path = void 0;
      wsComponent.query = void 0;
      return wsComponent;
    }
    function wsSerialize(wsComponent) {
      if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") {
        wsComponent.port = void 0;
      }
      if (typeof wsComponent.secure === "boolean") {
        wsComponent.scheme = wsComponent.secure ? "wss" : "ws";
        wsComponent.secure = void 0;
      }
      if (wsComponent.resourceName) {
        const [path, query] = wsComponent.resourceName.split("?");
        wsComponent.path = path && path !== "/" ? path : void 0;
        wsComponent.query = query;
        wsComponent.resourceName = void 0;
      }
      wsComponent.fragment = void 0;
      return wsComponent;
    }
    function urnParse(urnComponent, options) {
      if (!urnComponent.path) {
        urnComponent.error = "URN can not be parsed";
        return urnComponent;
      }
      const matches = urnComponent.path.match(URN_REG);
      if (matches) {
        const scheme = options.scheme || urnComponent.scheme || "urn";
        urnComponent.nid = matches[1].toLowerCase();
        urnComponent.nss = matches[2];
        const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`;
        const schemeHandler = getSchemeHandler(urnScheme);
        urnComponent.path = void 0;
        if (schemeHandler) {
          urnComponent = schemeHandler.parse(urnComponent, options);
        }
      } else {
        urnComponent.error = urnComponent.error || "URN can not be parsed.";
      }
      return urnComponent;
    }
    function urnSerialize(urnComponent, options) {
      if (urnComponent.nid === void 0) {
        throw new Error("URN without nid cannot be serialized");
      }
      const scheme = options.scheme || urnComponent.scheme || "urn";
      const nid = urnComponent.nid.toLowerCase();
      const urnScheme = `${scheme}:${options.nid || nid}`;
      const schemeHandler = getSchemeHandler(urnScheme);
      if (schemeHandler) {
        urnComponent = schemeHandler.serialize(urnComponent, options);
      }
      const uriComponent = urnComponent;
      const nss = urnComponent.nss;
      uriComponent.path = `${nid || options.nid}:${nss}`;
      options.skipEscape = true;
      return uriComponent;
    }
    function urnuuidParse(urnComponent, options) {
      const uuidComponent = urnComponent;
      uuidComponent.uuid = uuidComponent.nss;
      uuidComponent.nss = void 0;
      if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {
        uuidComponent.error = uuidComponent.error || "UUID is not valid.";
      }
      return uuidComponent;
    }
    function urnuuidSerialize(uuidComponent) {
      const urnComponent = uuidComponent;
      urnComponent.nss = (uuidComponent.uuid || "").toLowerCase();
      return urnComponent;
    }
    var http = (
      /** @type {SchemeHandler} */
      {
        scheme: "http",
        domainHost: true,
        parse: httpParse,
        serialize: httpSerialize
      }
    );
    var https = (
      /** @type {SchemeHandler} */
      {
        scheme: "https",
        domainHost: http.domainHost,
        parse: httpParse,
        serialize: httpSerialize
      }
    );
    var ws = (
      /** @type {SchemeHandler} */
      {
        scheme: "ws",
        domainHost: true,
        parse: wsParse,
        serialize: wsSerialize
      }
    );
    var wss = (
      /** @type {SchemeHandler} */
      {
        scheme: "wss",
        domainHost: ws.domainHost,
        parse: ws.parse,
        serialize: ws.serialize
      }
    );
    var urn = (
      /** @type {SchemeHandler} */
      {
        scheme: "urn",
        parse: urnParse,
        serialize: urnSerialize,
        skipNormalize: true
      }
    );
    var urnuuid = (
      /** @type {SchemeHandler} */
      {
        scheme: "urn:uuid",
        parse: urnuuidParse,
        serialize: urnuuidSerialize,
        skipNormalize: true
      }
    );
    var SCHEMES = (
      /** @type {Record<SchemeName, SchemeHandler>} */
      {
        http,
        https,
        ws,
        wss,
        urn,
        "urn:uuid": urnuuid
      }
    );
    Object.setPrototypeOf(SCHEMES, null);
    function getSchemeHandler(scheme) {
      return scheme && (SCHEMES[
        /** @type {SchemeName} */
        scheme
      ] || SCHEMES[
        /** @type {SchemeName} */
        scheme.toLowerCase()
      ]) || void 0;
    }
    module2.exports = {
      wsIsSecure,
      SCHEMES,
      isValidSchemeName,
      getSchemeHandler
    };
  }
});

// node_modules/fast-uri/index.js
var require_fast_uri = __commonJS({
  "node_modules/fast-uri/index.js"(exports2, module2) {
    "use strict";
    var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
    var { SCHEMES, getSchemeHandler } = require_schemes();
    function normalize(uri, options) {
      if (typeof uri === "string") {
        uri = /** @type {T} */
        normalizeString(uri, options);
      } else if (typeof uri === "object") {
        uri = /** @type {T} */
        parse3(serialize(uri, options), options);
      }
      return uri;
    }
    function resolve(baseURI, relativeURI, options) {
      const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
      const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
      schemelessOptions.skipEscape = true;
      return serialize(resolved, schemelessOptions);
    }
    function resolveComponent(base, relative, options, skipNormalization) {
      const target = {};
      if (!skipNormalization) {
        base = parse3(serialize(base, options), options);
        relative = parse3(serialize(relative, options), options);
      }
      options = options || {};
      if (!options.tolerant && relative.scheme) {
        target.scheme = relative.scheme;
        target.userinfo = relative.userinfo;
        target.host = relative.host;
        target.port = relative.port;
        target.path = removeDotSegments(relative.path || "");
        target.query = relative.query;
      } else {
        if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
          target.userinfo = relative.userinfo;
          target.host = relative.host;
          target.port = relative.port;
          target.path = removeDotSegments(relative.path || "");
          target.query = relative.query;
        } else {
          if (!relative.path) {
            target.path = base.path;
            if (relative.query !== void 0) {
              target.query = relative.query;
            } else {
              target.query = base.query;
            }
          } else {
            if (relative.path[0] === "/") {
              target.path = removeDotSegments(relative.path);
            } else {
              if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
                target.path = "/" + relative.path;
              } else if (!base.path) {
                target.path = relative.path;
              } else {
                target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
              }
              target.path = removeDotSegments(target.path);
            }
            target.query = relative.query;
          }
          target.userinfo = base.userinfo;
          target.host = base.host;
          target.port = base.port;
        }
        target.scheme = base.scheme;
      }
      target.fragment = relative.fragment;
      return target;
    }
    function equal(uriA, uriB, options) {
      const normalizedA = normalizeComparableURI(uriA, options);
      const normalizedB = normalizeComparableURI(uriB, options);
      return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
    }
    function serialize(cmpts, opts) {
      const component = {
        host: cmpts.host,
        scheme: cmpts.scheme,
        userinfo: cmpts.userinfo,
        port: cmpts.port,
        path: cmpts.path,
        query: cmpts.query,
        nid: cmpts.nid,
        nss: cmpts.nss,
        uuid: cmpts.uuid,
        fragment: cmpts.fragment,
        reference: cmpts.reference,
        resourceName: cmpts.resourceName,
        secure: cmpts.secure,
        error: ""
      };
      const options = Object.assign({}, opts);
      const uriTokens = [];
      const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
      if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
      if (component.path !== void 0) {
        if (!options.skipEscape) {
          component.path = escapePreservingEscapes(component.path);
          if (component.scheme !== void 0) {
            component.path = component.path.split("%3A").join(":");
          }
        } else {
          component.path = normalizePercentEncoding(component.path);
        }
      }
      if (options.reference !== "suffix" && component.scheme) {
        uriTokens.push(component.scheme, ":");
      }
      const authority = recomposeAuthority(component);
      if (authority !== void 0) {
        if (options.reference !== "suffix") {
          uriTokens.push("//");
        }
        uriTokens.push(authority);
        if (component.path && component.path[0] !== "/") {
          uriTokens.push("/");
        }
      }
      if (component.path !== void 0) {
        let s = component.path;
        if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
          s = removeDotSegments(s);
        }
        if (authority === void 0 && s[0] === "/" && s[1] === "/") {
          s = "/%2F" + s.slice(2);
        }
        uriTokens.push(s);
      }
      if (component.query !== void 0) {
        uriTokens.push("?", component.query);
      }
      if (component.fragment !== void 0) {
        uriTokens.push("#", component.fragment);
      }
      return uriTokens.join("");
    }
    var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
    function getParseError(parsed, matches) {
      if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
        return 'URI path must start with "/" when authority is present.';
      }
      if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
        return "URI port is malformed.";
      }
      return void 0;
    }
    function parseWithStatus(uri, opts) {
      const options = Object.assign({}, opts);
      const parsed = {
        scheme: void 0,
        userinfo: void 0,
        host: "",
        port: void 0,
        path: "",
        query: void 0,
        fragment: void 0
      };
      let malformedAuthorityOrPort = false;
      let isIP = false;
      if (options.reference === "suffix") {
        if (options.scheme) {
          uri = options.scheme + ":" + uri;
        } else {
          uri = "//" + uri;
        }
      }
      const matches = uri.match(URI_PARSE);
      if (matches) {
        parsed.scheme = matches[1];
        parsed.userinfo = matches[3];
        parsed.host = matches[4];
        parsed.port = parseInt(matches[5], 10);
        parsed.path = matches[6] || "";
        parsed.query = matches[7];
        parsed.fragment = matches[8];
        if (isNaN(parsed.port)) {
          parsed.port = matches[5];
        }
        const parseError = getParseError(parsed, matches);
        if (parseError !== void 0) {
          parsed.error = parsed.error || parseError;
          malformedAuthorityOrPort = true;
        }
        if (parsed.host) {
          const ipv4result = isIPv4(parsed.host);
          if (ipv4result === false) {
            const ipv6result = normalizeIPv6(parsed.host);
            parsed.host = ipv6result.host.toLowerCase();
            isIP = ipv6result.isIPV6;
          } else {
            isIP = true;
          }
        }
        if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) {
          parsed.reference = "same-document";
        } else if (parsed.scheme === void 0) {
          parsed.reference = "relative";
        } else if (parsed.fragment === void 0) {
          parsed.reference = "absolute";
        } else {
          parsed.reference = "uri";
        }
        if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
          parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
        }
        const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
        if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
          if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
            try {
              parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
            } catch (e) {
              parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
            }
          }
        }
        if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
          if (uri.indexOf("%") !== -1) {
            if (parsed.scheme !== void 0) {
              parsed.scheme = unescape(parsed.scheme);
            }
            if (parsed.host !== void 0) {
              parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
            }
          }
          if (parsed.path) {
            parsed.path = normalizePathEncoding(parsed.path);
          }
          if (parsed.fragment) {
            try {
              parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
            } catch {
              parsed.error = parsed.error || "URI malformed";
            }
          }
        }
        if (schemeHandler && schemeHandler.parse) {
          schemeHandler.parse(parsed, options);
        }
      } else {
        parsed.error = parsed.error || "URI can not be parsed.";
      }
      return { parsed, malformedAuthorityOrPort };
    }
    function parse3(uri, opts) {
      return parseWithStatus(uri, opts).parsed;
    }
    function normalizeString(uri, opts) {
      return normalizeStringWithStatus(uri, opts).normalized;
    }
    function normalizeStringWithStatus(uri, opts) {
      const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
      return {
        normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
        malformedAuthorityOrPort
      };
    }
    function normalizeComparableURI(uri, opts) {
      if (typeof uri === "string") {
        const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
        return malformedAuthorityOrPort ? void 0 : normalized;
      }
      if (typeof uri === "object") {
        return serialize(uri, opts);
      }
    }
    var fastUri = {
      SCHEMES,
      normalize,
      resolve,
      resolveComponent,
      equal,
      serialize,
      parse: parse3
    };
    module2.exports = fastUri;
    module2.exports.default = fastUri;
    module2.exports.fastUri = fastUri;
  }
});

// node_modules/ajv/dist/runtime/uri.js
var require_uri = __commonJS({
  "node_modules/ajv/dist/runtime/uri.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var uri = require_fast_uri();
    uri.code = 'require("ajv/dist/runtime/uri").default';
    exports2.default = uri;
  }
});

// node_modules/ajv/dist/core.js
var require_core = __commonJS({
  "node_modules/ajv/dist/core.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0;
    var validate_1 = require_validate();
    Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = require_codegen();
    Object.defineProperty(exports2, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports2, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports2, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports2, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    var validation_error_1 = require_validation_error();
    var ref_error_1 = require_ref_error();
    var rules_1 = require_rules();
    var compile_1 = require_compile();
    var codegen_2 = require_codegen();
    var resolve_1 = require_resolve();
    var dataType_1 = require_dataType();
    var util_1 = require_util();
    var $dataRefSchema = require_data();
    var uri_1 = require_uri();
    var defaultRegExp = (str, flags) => new RegExp(str, flags);
    defaultRegExp.code = "new RegExp";
    var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
    var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
      "validate",
      "serialize",
      "parse",
      "wrapper",
      "root",
      "schema",
      "keyword",
      "pattern",
      "formats",
      "validate$data",
      "func",
      "obj",
      "Error"
    ]);
    var removedOptions = {
      errorDataPath: "",
      format: "`validateFormats: false` can be used instead.",
      nullable: '"nullable" keyword is supported by default.',
      jsonPointers: "Deprecated jsPropertySyntax can be used instead.",
      extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.",
      missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.",
      processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`",
      sourceCode: "Use option `code: {source: true}`",
      strictDefaults: "It is default now, see option `strict`.",
      strictKeywords: "It is default now, see option `strict`.",
      uniqueItems: '"uniqueItems" keyword is always validated.',
      unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",
      cache: "Map is used as cache, schema object as key.",
      serialize: "Map is used as cache, schema object as key.",
      ajvErrors: "It is default now."
    };
    var deprecatedOptions = {
      ignoreKeywordsWithRef: "",
      jsPropertySyntax: "",
      unicode: '"minLength"/"maxLength" account for unicode characters by default.'
    };
    var MAX_EXPRESSION = 200;
    function requiredOptions(o) {
      var _a3, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
      const s = o.strict;
      const _optz = (_a3 = o.code) === null || _a3 === void 0 ? void 0 : _a3.optimize;
      const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
      const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
      const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
      return {
        strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,
        strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,
        strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log",
        strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log",
        strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,
        code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },
        loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,
        loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,
        meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,
        messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,
        inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,
        schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id",
        addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,
        validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,
        validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,
        unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,
        int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,
        uriResolver
      };
    }
    var Ajv2 = class {
      constructor(opts = {}) {
        this.schemas = {};
        this.refs = {};
        this.formats = /* @__PURE__ */ Object.create(null);
        this._compilations = /* @__PURE__ */ new Set();
        this._loading = {};
        this._cache = /* @__PURE__ */ new Map();
        opts = this.opts = { ...opts, ...requiredOptions(opts) };
        const { es5, lines } = this.opts.code;
        this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });
        this.logger = getLogger(opts.logger);
        const formatOpt = opts.validateFormats;
        opts.validateFormats = false;
        this.RULES = (0, rules_1.getRules)();
        checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED");
        checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn");
        this._metaOpts = getMetaSchemaOptions.call(this);
        if (opts.formats)
          addInitialFormats.call(this);
        this._addVocabularies();
        this._addDefaultMetaSchema();
        if (opts.keywords)
          addInitialKeywords.call(this, opts.keywords);
        if (typeof opts.meta == "object")
          this.addMetaSchema(opts.meta);
        addInitialSchemas.call(this);
        opts.validateFormats = formatOpt;
      }
      _addVocabularies() {
        this.addKeyword("$async");
      }
      _addDefaultMetaSchema() {
        const { $data, meta: meta3, schemaId } = this.opts;
        let _dataRefSchema = $dataRefSchema;
        if (schemaId === "id") {
          _dataRefSchema = { ...$dataRefSchema };
          _dataRefSchema.id = _dataRefSchema.$id;
          delete _dataRefSchema.$id;
        }
        if (meta3 && $data)
          this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);
      }
      defaultMeta() {
        const { meta: meta3, schemaId } = this.opts;
        return this.opts.defaultMeta = typeof meta3 == "object" ? meta3[schemaId] || meta3 : void 0;
      }
      validate(schemaKeyRef, data) {
        let v;
        if (typeof schemaKeyRef == "string") {
          v = this.getSchema(schemaKeyRef);
          if (!v)
            throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
        } else {
          v = this.compile(schemaKeyRef);
        }
        const valid = v(data);
        if (!("$async" in v))
          this.errors = v.errors;
        return valid;
      }
      compile(schema, _meta) {
        const sch = this._addSchema(schema, _meta);
        return sch.validate || this._compileSchemaEnv(sch);
      }
      compileAsync(schema, meta3) {
        if (typeof this.opts.loadSchema != "function") {
          throw new Error("options.loadSchema should be a function");
        }
        const { loadSchema } = this.opts;
        return runCompileAsync.call(this, schema, meta3);
        async function runCompileAsync(_schema, _meta) {
          await loadMetaSchema.call(this, _schema.$schema);
          const sch = this._addSchema(_schema, _meta);
          return sch.validate || _compileAsync.call(this, sch);
        }
        async function loadMetaSchema($ref) {
          if ($ref && !this.getSchema($ref)) {
            await runCompileAsync.call(this, { $ref }, true);
          }
        }
        async function _compileAsync(sch) {
          try {
            return this._compileSchemaEnv(sch);
          } catch (e) {
            if (!(e instanceof ref_error_1.default))
              throw e;
            checkLoaded.call(this, e);
            await loadMissingSchema.call(this, e.missingSchema);
            return _compileAsync.call(this, sch);
          }
        }
        function checkLoaded({ missingSchema: ref, missingRef }) {
          if (this.refs[ref]) {
            throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);
          }
        }
        async function loadMissingSchema(ref) {
          const _schema = await _loadSchema.call(this, ref);
          if (!this.refs[ref])
            await loadMetaSchema.call(this, _schema.$schema);
          if (!this.refs[ref])
            this.addSchema(_schema, ref, meta3);
        }
        async function _loadSchema(ref) {
          const p = this._loading[ref];
          if (p)
            return p;
          try {
            return await (this._loading[ref] = loadSchema(ref));
          } finally {
            delete this._loading[ref];
          }
        }
      }
      // Adds schema to the instance
      addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
        if (Array.isArray(schema)) {
          for (const sch of schema)
            this.addSchema(sch, void 0, _meta, _validateSchema);
          return this;
        }
        let id;
        if (typeof schema === "object") {
          const { schemaId } = this.opts;
          id = schema[schemaId];
          if (id !== void 0 && typeof id != "string") {
            throw new Error(`schema ${schemaId} must be string`);
          }
        }
        key = (0, resolve_1.normalizeId)(key || id);
        this._checkUnique(key);
        this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
        return this;
      }
      // Add schema that will be used to validate other schemas
      // options in META_IGNORE_OPTIONS are alway set to false
      addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {
        this.addSchema(schema, key, true, _validateSchema);
        return this;
      }
      //  Validate schema against its meta-schema
      validateSchema(schema, throwOrLogError) {
        if (typeof schema == "boolean")
          return true;
        let $schema;
        $schema = schema.$schema;
        if ($schema !== void 0 && typeof $schema != "string") {
          throw new Error("$schema must be a string");
        }
        $schema = $schema || this.opts.defaultMeta || this.defaultMeta();
        if (!$schema) {
          this.logger.warn("meta-schema not available");
          this.errors = null;
          return true;
        }
        const valid = this.validate($schema, schema);
        if (!valid && throwOrLogError) {
          const message = "schema is invalid: " + this.errorsText();
          if (this.opts.validateSchema === "log")
            this.logger.error(message);
          else
            throw new Error(message);
        }
        return valid;
      }
      // Get compiled schema by `key` or `ref`.
      // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
      getSchema(keyRef) {
        let sch;
        while (typeof (sch = getSchEnv.call(this, keyRef)) == "string")
          keyRef = sch;
        if (sch === void 0) {
          const { schemaId } = this.opts;
          const root = new compile_1.SchemaEnv({ schema: {}, schemaId });
          sch = compile_1.resolveSchema.call(this, root, keyRef);
          if (!sch)
            return;
          this.refs[keyRef] = sch;
        }
        return sch.validate || this._compileSchemaEnv(sch);
      }
      // Remove cached schema(s).
      // If no parameter is passed all schemas but meta-schemas are removed.
      // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
      // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
      removeSchema(schemaKeyRef) {
        if (schemaKeyRef instanceof RegExp) {
          this._removeAllSchemas(this.schemas, schemaKeyRef);
          this._removeAllSchemas(this.refs, schemaKeyRef);
          return this;
        }
        switch (typeof schemaKeyRef) {
          case "undefined":
            this._removeAllSchemas(this.schemas);
            this._removeAllSchemas(this.refs);
            this._cache.clear();
            return this;
          case "string": {
            const sch = getSchEnv.call(this, schemaKeyRef);
            if (typeof sch == "object")
              this._cache.delete(sch.schema);
            delete this.schemas[schemaKeyRef];
            delete this.refs[schemaKeyRef];
            return this;
          }
          case "object": {
            const cacheKey = schemaKeyRef;
            this._cache.delete(cacheKey);
            let id = schemaKeyRef[this.opts.schemaId];
            if (id) {
              id = (0, resolve_1.normalizeId)(id);
              delete this.schemas[id];
              delete this.refs[id];
            }
            return this;
          }
          default:
            throw new Error("ajv.removeSchema: invalid parameter");
        }
      }
      // add "vocabulary" - a collection of keywords
      addVocabulary(definitions) {
        for (const def of definitions)
          this.addKeyword(def);
        return this;
      }
      addKeyword(kwdOrDef, def) {
        let keyword;
        if (typeof kwdOrDef == "string") {
          keyword = kwdOrDef;
          if (typeof def == "object") {
            this.logger.warn("these parameters are deprecated, see docs for addKeyword");
            def.keyword = keyword;
          }
        } else if (typeof kwdOrDef == "object" && def === void 0) {
          def = kwdOrDef;
          keyword = def.keyword;
          if (Array.isArray(keyword) && !keyword.length) {
            throw new Error("addKeywords: keyword must be string or non-empty array");
          }
        } else {
          throw new Error("invalid addKeywords parameters");
        }
        checkKeyword.call(this, keyword, def);
        if (!def) {
          (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));
          return this;
        }
        keywordMetaschema.call(this, def);
        const definition = {
          ...def,
          type: (0, dataType_1.getJSONTypes)(def.type),
          schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)
        };
        (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));
        return this;
      }
      getKeyword(keyword) {
        const rule = this.RULES.all[keyword];
        return typeof rule == "object" ? rule.definition : !!rule;
      }
      // Remove keyword
      removeKeyword(keyword) {
        const { RULES } = this;
        delete RULES.keywords[keyword];
        delete RULES.all[keyword];
        for (const group of RULES.rules) {
          const i = group.rules.findIndex((rule) => rule.keyword === keyword);
          if (i >= 0)
            group.rules.splice(i, 1);
        }
        return this;
      }
      // Add format
      addFormat(name, format) {
        if (typeof format == "string")
          format = new RegExp(format);
        this.formats[name] = format;
        return this;
      }
      errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
        if (!errors || errors.length === 0)
          return "No errors";
        return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
      }
      $dataMetaSchema(metaSchema, keywordsJsonPointers) {
        const rules = this.RULES.all;
        metaSchema = JSON.parse(JSON.stringify(metaSchema));
        for (const jsonPointer of keywordsJsonPointers) {
          const segments = jsonPointer.split("/").slice(1);
          let keywords = metaSchema;
          for (const seg of segments)
            keywords = keywords[seg];
          for (const key in rules) {
            const rule = rules[key];
            if (typeof rule != "object")
              continue;
            const { $data } = rule.definition;
            const schema = keywords[key];
            if ($data && schema)
              keywords[key] = schemaOrData(schema);
          }
        }
        return metaSchema;
      }
      _removeAllSchemas(schemas, regex) {
        for (const keyRef in schemas) {
          const sch = schemas[keyRef];
          if (!regex || regex.test(keyRef)) {
            if (typeof sch == "string") {
              delete schemas[keyRef];
            } else if (sch && !sch.meta) {
              this._cache.delete(sch.schema);
              delete schemas[keyRef];
            }
          }
        }
      }
      _addSchema(schema, meta3, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
        let id;
        const { schemaId } = this.opts;
        if (typeof schema == "object") {
          id = schema[schemaId];
        } else {
          if (this.opts.jtd)
            throw new Error("schema must be object");
          else if (typeof schema != "boolean")
            throw new Error("schema must be object or boolean");
        }
        let sch = this._cache.get(schema);
        if (sch !== void 0)
          return sch;
        baseId = (0, resolve_1.normalizeId)(id || baseId);
        const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
        sch = new compile_1.SchemaEnv({ schema, schemaId, meta: meta3, baseId, localRefs });
        this._cache.set(sch.schema, sch);
        if (addSchema && !baseId.startsWith("#")) {
          if (baseId)
            this._checkUnique(baseId);
          this.refs[baseId] = sch;
        }
        if (validateSchema)
          this.validateSchema(schema, true);
        return sch;
      }
      _checkUnique(id) {
        if (this.schemas[id] || this.refs[id]) {
          throw new Error(`schema with key or id "${id}" already exists`);
        }
      }
      _compileSchemaEnv(sch) {
        if (sch.meta)
          this._compileMetaSchema(sch);
        else
          compile_1.compileSchema.call(this, sch);
        if (!sch.validate)
          throw new Error("ajv implementation error");
        return sch.validate;
      }
      _compileMetaSchema(sch) {
        const currentOpts = this.opts;
        this.opts = this._metaOpts;
        try {
          compile_1.compileSchema.call(this, sch);
        } finally {
          this.opts = currentOpts;
        }
      }
    };
    Ajv2.ValidationError = validation_error_1.default;
    Ajv2.MissingRefError = ref_error_1.default;
    exports2.default = Ajv2;
    function checkOptions(checkOpts, options, msg, log = "error") {
      for (const key in checkOpts) {
        const opt = key;
        if (opt in options)
          this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);
      }
    }
    function getSchEnv(keyRef) {
      keyRef = (0, resolve_1.normalizeId)(keyRef);
      return this.schemas[keyRef] || this.refs[keyRef];
    }
    function addInitialSchemas() {
      const optsSchemas = this.opts.schemas;
      if (!optsSchemas)
        return;
      if (Array.isArray(optsSchemas))
        this.addSchema(optsSchemas);
      else
        for (const key in optsSchemas)
          this.addSchema(optsSchemas[key], key);
    }
    function addInitialFormats() {
      for (const name in this.opts.formats) {
        const format = this.opts.formats[name];
        if (format)
          this.addFormat(name, format);
      }
    }
    function addInitialKeywords(defs) {
      if (Array.isArray(defs)) {
        this.addVocabulary(defs);
        return;
      }
      this.logger.warn("keywords option as map is deprecated, pass array");
      for (const keyword in defs) {
        const def = defs[keyword];
        if (!def.keyword)
          def.keyword = keyword;
        this.addKeyword(def);
      }
    }
    function getMetaSchemaOptions() {
      const metaOpts = { ...this.opts };
      for (const opt of META_IGNORE_OPTIONS)
        delete metaOpts[opt];
      return metaOpts;
    }
    var noLogs = { log() {
    }, warn() {
    }, error() {
    } };
    function getLogger(logger) {
      if (logger === false)
        return noLogs;
      if (logger === void 0)
        return console;
      if (logger.log && logger.warn && logger.error)
        return logger;
      throw new Error("logger must implement log, warn and error methods");
    }
    var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
    function checkKeyword(keyword, def) {
      const { RULES } = this;
      (0, util_1.eachItem)(keyword, (kwd) => {
        if (RULES.keywords[kwd])
          throw new Error(`Keyword ${kwd} is already defined`);
        if (!KEYWORD_NAME.test(kwd))
          throw new Error(`Keyword ${kwd} has invalid name`);
      });
      if (!def)
        return;
      if (def.$data && !("code" in def || "validate" in def)) {
        throw new Error('$data keyword must have "code" or "validate" function');
      }
    }
    function addRule(keyword, definition, dataType) {
      var _a3;
      const post = definition === null || definition === void 0 ? void 0 : definition.post;
      if (dataType && post)
        throw new Error('keyword with "post" flag cannot have "type"');
      const { RULES } = this;
      let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);
      if (!ruleGroup) {
        ruleGroup = { type: dataType, rules: [] };
        RULES.rules.push(ruleGroup);
      }
      RULES.keywords[keyword] = true;
      if (!definition)
        return;
      const rule = {
        keyword,
        definition: {
          ...definition,
          type: (0, dataType_1.getJSONTypes)(definition.type),
          schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)
        }
      };
      if (definition.before)
        addBeforeRule.call(this, ruleGroup, rule, definition.before);
      else
        ruleGroup.rules.push(rule);
      RULES.all[keyword] = rule;
      (_a3 = definition.implements) === null || _a3 === void 0 ? void 0 : _a3.forEach((kwd) => this.addKeyword(kwd));
    }
    function addBeforeRule(ruleGroup, rule, before) {
      const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
      if (i >= 0) {
        ruleGroup.rules.splice(i, 0, rule);
      } else {
        ruleGroup.rules.push(rule);
        this.logger.warn(`rule ${before} is not defined`);
      }
    }
    function keywordMetaschema(def) {
      let { metaSchema } = def;
      if (metaSchema === void 0)
        return;
      if (def.$data && this.opts.$data)
        metaSchema = schemaOrData(metaSchema);
      def.validateSchema = this.compile(metaSchema, true);
    }
    var $dataRef = {
      $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
    };
    function schemaOrData(schema) {
      return { anyOf: [schema, $dataRef] };
    }
  }
});

// node_modules/ajv/dist/vocabularies/core/id.js
var require_id = __commonJS({
  "node_modules/ajv/dist/vocabularies/core/id.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var def = {
      keyword: "id",
      code() {
        throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/core/ref.js
var require_ref = __commonJS({
  "node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.callRef = exports2.getValidate = void 0;
    var ref_error_1 = require_ref_error();
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var compile_1 = require_compile();
    var util_1 = require_util();
    var def = {
      keyword: "$ref",
      schemaType: "string",
      code(cxt) {
        const { gen, schema: $ref, it } = cxt;
        const { baseId, schemaEnv: env, validateName, opts, self } = it;
        const { root } = env;
        if (($ref === "#" || $ref === "#/") && baseId === root.baseId)
          return callRootRef();
        const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);
        if (schOrEnv === void 0)
          throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
        if (schOrEnv instanceof compile_1.SchemaEnv)
          return callValidate(schOrEnv);
        return inlineRefSchema(schOrEnv);
        function callRootRef() {
          if (env === root)
            return callRef(cxt, validateName, env, env.$async);
          const rootName = gen.scopeValue("root", { ref: root });
          return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);
        }
        function callValidate(sch) {
          const v = getValidate(cxt, sch);
          callRef(cxt, v, sch, sch.$async);
        }
        function inlineRefSchema(sch) {
          const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
          const valid = gen.name("valid");
          const schCxt = cxt.subschema({
            schema: sch,
            dataTypes: [],
            schemaPath: codegen_1.nil,
            topSchemaRef: schName,
            errSchemaPath: $ref
          }, valid);
          cxt.mergeEvaluated(schCxt);
          cxt.ok(valid);
        }
      }
    };
    function getValidate(cxt, sch) {
      const { gen } = cxt;
      return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
    }
    exports2.getValidate = getValidate;
    function callRef(cxt, v, sch, $async) {
      const { gen, it } = cxt;
      const { allErrors, schemaEnv: env, opts } = it;
      const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
      if ($async)
        callAsyncRef();
      else
        callSyncRef();
      function callAsyncRef() {
        if (!env.$async)
          throw new Error("async schema referenced by sync schema");
        const valid = gen.let("valid");
        gen.try(() => {
          gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
          addEvaluatedFrom(v);
          if (!allErrors)
            gen.assign(valid, true);
        }, (e) => {
          gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
          addErrorsFrom(e);
          if (!allErrors)
            gen.assign(valid, false);
        });
        cxt.ok(valid);
      }
      function callSyncRef() {
        cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
      }
      function addErrorsFrom(source) {
        const errs = (0, codegen_1._)`${source}.errors`;
        gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
        gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
      }
      function addEvaluatedFrom(source) {
        var _a3;
        if (!it.opts.unevaluated)
          return;
        const schEvaluated = (_a3 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a3 === void 0 ? void 0 : _a3.evaluated;
        if (it.props !== true) {
          if (schEvaluated && !schEvaluated.dynamicProps) {
            if (schEvaluated.props !== void 0) {
              it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
            }
          } else {
            const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
            it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
          }
        }
        if (it.items !== true) {
          if (schEvaluated && !schEvaluated.dynamicItems) {
            if (schEvaluated.items !== void 0) {
              it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
            }
          } else {
            const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
            it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
          }
        }
      }
    }
    exports2.callRef = callRef;
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/core/index.js
var require_core2 = __commonJS({
  "node_modules/ajv/dist/vocabularies/core/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var id_1 = require_id();
    var ref_1 = require_ref();
    var core = [
      "$schema",
      "$id",
      "$defs",
      "$vocabulary",
      { keyword: "$comment" },
      "definitions",
      id_1.default,
      ref_1.default
    ];
    exports2.default = core;
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitNumber.js
var require_limitNumber = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var ops = codegen_1.operators;
    var KWDs = {
      maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
      minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
      exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
      exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
    };
    var error51 = {
      message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
      params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
    };
    var def = {
      keyword: Object.keys(KWDs),
      type: "number",
      schemaType: "number",
      $data: true,
      error: error51,
      code(cxt) {
        const { keyword, data, schemaCode } = cxt;
        cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/multipleOf.js
var require_multipleOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error51 = {
      message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
      params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
    };
    var def = {
      keyword: "multipleOf",
      type: "number",
      schemaType: "number",
      $data: true,
      error: error51,
      code(cxt) {
        const { gen, data, schemaCode, it } = cxt;
        const prec = it.opts.multipleOfPrecision;
        const res = gen.let("res");
        const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
        cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/runtime/ucs2length.js
var require_ucs2length = __commonJS({
  "node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    function ucs2length(str) {
      const len = str.length;
      let length = 0;
      let pos = 0;
      let value;
      while (pos < len) {
        length++;
        value = str.charCodeAt(pos++);
        if (value >= 55296 && value <= 56319 && pos < len) {
          value = str.charCodeAt(pos);
          if ((value & 64512) === 56320)
            pos++;
        }
      }
      return length;
    }
    exports2.default = ucs2length;
    ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitLength.js
var require_limitLength = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var ucs2length_1 = require_ucs2length();
    var error51 = {
      message({ keyword, schemaCode }) {
        const comp = keyword === "maxLength" ? "more" : "fewer";
        return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
      },
      params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
    };
    var def = {
      keyword: ["maxLength", "minLength"],
      type: "string",
      schemaType: "number",
      $data: true,
      error: error51,
      code(cxt) {
        const { keyword, data, schemaCode, it } = cxt;
        const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
        const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
        cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/pattern.js
var require_pattern = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var code_1 = require_code2();
    var util_1 = require_util();
    var codegen_1 = require_codegen();
    var error51 = {
      message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
      params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
    };
    var def = {
      keyword: "pattern",
      type: "string",
      schemaType: "string",
      $data: true,
      error: error51,
      code(cxt) {
        const { gen, data, $data, schema, schemaCode, it } = cxt;
        const u = it.opts.unicodeRegExp ? "u" : "";
        if ($data) {
          const { regExp } = it.opts.code;
          const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
          const valid = gen.let("valid");
          gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
          cxt.fail$data((0, codegen_1._)`!${valid}`);
        } else {
          const regExp = (0, code_1.usePattern)(cxt, schema);
          cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitProperties.js
var require_limitProperties = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error51 = {
      message({ keyword, schemaCode }) {
        const comp = keyword === "maxProperties" ? "more" : "fewer";
        return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
      },
      params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
    };
    var def = {
      keyword: ["maxProperties", "minProperties"],
      type: "object",
      schemaType: "number",
      $data: true,
      error: error51,
      code(cxt) {
        const { keyword, data, schemaCode } = cxt;
        const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
        cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/required.js
var require_required = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error51 = {
      message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
      params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
    };
    var def = {
      keyword: "required",
      type: "object",
      schemaType: "array",
      $data: true,
      error: error51,
      code(cxt) {
        const { gen, schema, schemaCode, data, $data, it } = cxt;
        const { opts } = it;
        if (!$data && schema.length === 0)
          return;
        const useLoop = schema.length >= opts.loopRequired;
        if (it.allErrors)
          allErrorsMode();
        else
          exitOnErrorMode();
        if (opts.strictRequired) {
          const props = cxt.parentSchema.properties;
          const { definedProperties } = cxt.it;
          for (const requiredKey of schema) {
            if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
              const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
              const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
              (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
            }
          }
        }
        function allErrorsMode() {
          if (useLoop || $data) {
            cxt.block$data(codegen_1.nil, loopAllRequired);
          } else {
            for (const prop of schema) {
              (0, code_1.checkReportMissingProp)(cxt, prop);
            }
          }
        }
        function exitOnErrorMode() {
          const missing = gen.let("missing");
          if (useLoop || $data) {
            const valid = gen.let("valid", true);
            cxt.block$data(valid, () => loopUntilMissing(missing, valid));
            cxt.ok(valid);
          } else {
            gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
            (0, code_1.reportMissingProp)(cxt, missing);
            gen.else();
          }
        }
        function loopAllRequired() {
          gen.forOf("prop", schemaCode, (prop) => {
            cxt.setParams({ missingProperty: prop });
            gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());
          });
        }
        function loopUntilMissing(missing, valid) {
          cxt.setParams({ missingProperty: missing });
          gen.forOf(missing, schemaCode, () => {
            gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));
            gen.if((0, codegen_1.not)(valid), () => {
              cxt.error();
              gen.break();
            });
          }, codegen_1.nil);
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/limitItems.js
var require_limitItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error51 = {
      message({ keyword, schemaCode }) {
        const comp = keyword === "maxItems" ? "more" : "fewer";
        return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
      },
      params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
    };
    var def = {
      keyword: ["maxItems", "minItems"],
      type: "array",
      schemaType: "number",
      $data: true,
      error: error51,
      code(cxt) {
        const { keyword, data, schemaCode } = cxt;
        const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
        cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/runtime/equal.js
var require_equal = __commonJS({
  "node_modules/ajv/dist/runtime/equal.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var equal = require_fast_deep_equal();
    equal.code = 'require("ajv/dist/runtime/equal").default';
    exports2.default = equal;
  }
});

// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
var require_uniqueItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var dataType_1 = require_dataType();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var equal_1 = require_equal();
    var error51 = {
      message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
      params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
    };
    var def = {
      keyword: "uniqueItems",
      type: "array",
      schemaType: "boolean",
      $data: true,
      error: error51,
      code(cxt) {
        const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
        if (!$data && !schema)
          return;
        const valid = gen.let("valid");
        const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
        cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);
        cxt.ok(valid);
        function validateUniqueItems() {
          const i = gen.let("i", (0, codegen_1._)`${data}.length`);
          const j = gen.let("j");
          cxt.setParams({ i, j });
          gen.assign(valid, true);
          gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
        }
        function canOptimize() {
          return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
        }
        function loopN(i, j) {
          const item = gen.name("item");
          const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
          const indices = gen.const("indices", (0, codegen_1._)`{}`);
          gen.for((0, codegen_1._)`;${i}--;`, () => {
            gen.let(item, (0, codegen_1._)`${data}[${i}]`);
            gen.if(wrongType, (0, codegen_1._)`continue`);
            if (itemTypes.length > 1)
              gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`);
            gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => {
              gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
              cxt.error();
              gen.assign(valid, false).break();
            }).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
          });
        }
        function loopN2(i, j) {
          const eql = (0, util_1.useFunc)(gen, equal_1.default);
          const outer = gen.name("outer");
          gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {
            cxt.error();
            gen.assign(valid, false).break(outer);
          })));
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/const.js
var require_const = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var equal_1 = require_equal();
    var error51 = {
      message: "must be equal to constant",
      params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
    };
    var def = {
      keyword: "const",
      $data: true,
      error: error51,
      code(cxt) {
        const { gen, data, $data, schemaCode, schema } = cxt;
        if ($data || schema && typeof schema == "object") {
          cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
        } else {
          cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/enum.js
var require_enum = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var equal_1 = require_equal();
    var error51 = {
      message: "must be equal to one of the allowed values",
      params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
    };
    var def = {
      keyword: "enum",
      schemaType: "array",
      $data: true,
      error: error51,
      code(cxt) {
        const { gen, data, $data, schema, schemaCode, it } = cxt;
        if (!$data && schema.length === 0)
          throw new Error("enum must have non-empty array");
        const useLoop = schema.length >= it.opts.loopEnum;
        let eql;
        const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
        let valid;
        if (useLoop || $data) {
          valid = gen.let("valid");
          cxt.block$data(valid, loopEnum);
        } else {
          if (!Array.isArray(schema))
            throw new Error("ajv implementation error");
          const vSchema = gen.const("vSchema", schemaCode);
          valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
        }
        cxt.pass(valid);
        function loopEnum() {
          gen.assign(valid, false);
          gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
        }
        function equalCode(vSchema, i) {
          const sch = schema[i];
          return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/validation/index.js
var require_validation = __commonJS({
  "node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var limitNumber_1 = require_limitNumber();
    var multipleOf_1 = require_multipleOf();
    var limitLength_1 = require_limitLength();
    var pattern_1 = require_pattern();
    var limitProperties_1 = require_limitProperties();
    var required_1 = require_required();
    var limitItems_1 = require_limitItems();
    var uniqueItems_1 = require_uniqueItems();
    var const_1 = require_const();
    var enum_1 = require_enum();
    var validation = [
      // number
      limitNumber_1.default,
      multipleOf_1.default,
      // string
      limitLength_1.default,
      pattern_1.default,
      // object
      limitProperties_1.default,
      required_1.default,
      // array
      limitItems_1.default,
      uniqueItems_1.default,
      // any
      { keyword: "type", schemaType: ["string", "array"] },
      { keyword: "nullable", schemaType: "boolean" },
      const_1.default,
      enum_1.default
    ];
    exports2.default = validation;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
var require_additionalItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.validateAdditionalItems = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error51 = {
      message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
      params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
    };
    var def = {
      keyword: "additionalItems",
      type: "array",
      schemaType: ["boolean", "object"],
      before: "uniqueItems",
      error: error51,
      code(cxt) {
        const { parentSchema, it } = cxt;
        const { items } = parentSchema;
        if (!Array.isArray(items)) {
          (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas');
          return;
        }
        validateAdditionalItems(cxt, items);
      }
    };
    function validateAdditionalItems(cxt, items) {
      const { gen, schema, data, keyword, it } = cxt;
      it.items = true;
      const len = gen.const("len", (0, codegen_1._)`${data}.length`);
      if (schema === false) {
        cxt.setParams({ len: items.length });
        cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);
      } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
        const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`);
        gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
        cxt.ok(valid);
      }
      function validateItems(valid) {
        gen.forRange("i", items.length, len, (i) => {
          cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);
          if (!it.allErrors)
            gen.if((0, codegen_1.not)(valid), () => gen.break());
        });
      }
    }
    exports2.validateAdditionalItems = validateAdditionalItems;
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/items.js
var require_items = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.validateTuple = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var code_1 = require_code2();
    var def = {
      keyword: "items",
      type: "array",
      schemaType: ["object", "array", "boolean"],
      before: "uniqueItems",
      code(cxt) {
        const { schema, it } = cxt;
        if (Array.isArray(schema))
          return validateTuple(cxt, "additionalItems", schema);
        it.items = true;
        if ((0, util_1.alwaysValidSchema)(it, schema))
          return;
        cxt.ok((0, code_1.validateArray)(cxt));
      }
    };
    function validateTuple(cxt, extraItems, schArr = cxt.schema) {
      const { gen, parentSchema, data, keyword, it } = cxt;
      checkStrictTuple(parentSchema);
      if (it.opts.unevaluated && schArr.length && it.items !== true) {
        it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
      }
      const valid = gen.name("valid");
      const len = gen.const("len", (0, codegen_1._)`${data}.length`);
      schArr.forEach((sch, i) => {
        if ((0, util_1.alwaysValidSchema)(it, sch))
          return;
        gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({
          keyword,
          schemaProp: i,
          dataProp: i
        }, valid));
        cxt.ok(valid);
      });
      function checkStrictTuple(sch) {
        const { opts, errSchemaPath } = it;
        const l = schArr.length;
        const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);
        if (opts.strictTuples && !fullTuple) {
          const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
          (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
        }
      }
    }
    exports2.validateTuple = validateTuple;
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
var require_prefixItems = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var items_1 = require_items();
    var def = {
      keyword: "prefixItems",
      type: "array",
      schemaType: ["array"],
      before: "uniqueItems",
      code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/items2020.js
var require_items2020 = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var code_1 = require_code2();
    var additionalItems_1 = require_additionalItems();
    var error51 = {
      message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
      params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
    };
    var def = {
      keyword: "items",
      type: "array",
      schemaType: ["object", "boolean"],
      before: "uniqueItems",
      error: error51,
      code(cxt) {
        const { schema, parentSchema, it } = cxt;
        const { prefixItems } = parentSchema;
        it.items = true;
        if ((0, util_1.alwaysValidSchema)(it, schema))
          return;
        if (prefixItems)
          (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);
        else
          cxt.ok((0, code_1.validateArray)(cxt));
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/contains.js
var require_contains = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error51 = {
      message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
      params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
    };
    var def = {
      keyword: "contains",
      type: "array",
      schemaType: ["object", "boolean"],
      before: "uniqueItems",
      trackErrors: true,
      error: error51,
      code(cxt) {
        const { gen, schema, parentSchema, data, it } = cxt;
        let min;
        let max;
        const { minContains, maxContains } = parentSchema;
        if (it.opts.next) {
          min = minContains === void 0 ? 1 : minContains;
          max = maxContains;
        } else {
          min = 1;
        }
        const len = gen.const("len", (0, codegen_1._)`${data}.length`);
        cxt.setParams({ min, max });
        if (max === void 0 && min === 0) {
          (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
          return;
        }
        if (max !== void 0 && min > max) {
          (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
          cxt.fail();
          return;
        }
        if ((0, util_1.alwaysValidSchema)(it, schema)) {
          let cond = (0, codegen_1._)`${len} >= ${min}`;
          if (max !== void 0)
            cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
          cxt.pass(cond);
          return;
        }
        it.items = true;
        const valid = gen.name("valid");
        if (max === void 0 && min === 1) {
          validateItems(valid, () => gen.if(valid, () => gen.break()));
        } else if (min === 0) {
          gen.let(valid, true);
          if (max !== void 0)
            gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);
        } else {
          gen.let(valid, false);
          validateItemsWithCount();
        }
        cxt.result(valid, () => cxt.reset());
        function validateItemsWithCount() {
          const schValid = gen.name("_valid");
          const count = gen.let("count", 0);
          validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
        }
        function validateItems(_valid, block) {
          gen.forRange("i", 0, len, (i) => {
            cxt.subschema({
              keyword: "contains",
              dataProp: i,
              dataPropType: util_1.Type.Num,
              compositeRule: true
            }, _valid);
            block();
          });
        }
        function checkLimits(count) {
          gen.code((0, codegen_1._)`${count}++`);
          if (max === void 0) {
            gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
          } else {
            gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
            if (min === 1)
              gen.assign(valid, true);
            else
              gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
          }
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/dependencies.js
var require_dependencies = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.validateSchemaDeps = exports2.validatePropertyDeps = exports2.error = void 0;
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var code_1 = require_code2();
    exports2.error = {
      message: ({ params: { property, depsCount, deps } }) => {
        const property_ies = depsCount === 1 ? "property" : "properties";
        return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;
      },
      params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},
    missingProperty: ${missingProperty},
    depsCount: ${depsCount},
    deps: ${deps}}`
      // TODO change to reference
    };
    var def = {
      keyword: "dependencies",
      type: "object",
      schemaType: "object",
      error: exports2.error,
      code(cxt) {
        const [propDeps, schDeps] = splitDependencies(cxt);
        validatePropertyDeps(cxt, propDeps);
        validateSchemaDeps(cxt, schDeps);
      }
    };
    function splitDependencies({ schema }) {
      const propertyDeps = {};
      const schemaDeps = {};
      for (const key in schema) {
        if (key === "__proto__")
          continue;
        const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;
        deps[key] = schema[key];
      }
      return [propertyDeps, schemaDeps];
    }
    function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
      const { gen, data, it } = cxt;
      if (Object.keys(propertyDeps).length === 0)
        return;
      const missing = gen.let("missing");
      for (const prop in propertyDeps) {
        const deps = propertyDeps[prop];
        if (deps.length === 0)
          continue;
        const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);
        cxt.setParams({
          property: prop,
          depsCount: deps.length,
          deps: deps.join(", ")
        });
        if (it.allErrors) {
          gen.if(hasProperty, () => {
            for (const depProp of deps) {
              (0, code_1.checkReportMissingProp)(cxt, depProp);
            }
          });
        } else {
          gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);
          (0, code_1.reportMissingProp)(cxt, missing);
          gen.else();
        }
      }
    }
    exports2.validatePropertyDeps = validatePropertyDeps;
    function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
      const { gen, data, keyword, it } = cxt;
      const valid = gen.name("valid");
      for (const prop in schemaDeps) {
        if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))
          continue;
        gen.if(
          (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties),
          () => {
            const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);
            cxt.mergeValidEvaluated(schCxt, valid);
          },
          () => gen.var(valid, true)
          // TODO var
        );
        cxt.ok(valid);
      }
    }
    exports2.validateSchemaDeps = validateSchemaDeps;
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
var require_propertyNames = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error51 = {
      message: "property name must be valid",
      params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
    };
    var def = {
      keyword: "propertyNames",
      type: "object",
      schemaType: ["object", "boolean"],
      error: error51,
      code(cxt) {
        const { gen, schema, data, it } = cxt;
        if ((0, util_1.alwaysValidSchema)(it, schema))
          return;
        const valid = gen.name("valid");
        gen.forIn("key", data, (key) => {
          cxt.setParams({ propertyName: key });
          cxt.subschema({
            keyword: "propertyNames",
            data: key,
            dataTypes: ["string"],
            propertyName: key,
            compositeRule: true
          }, valid);
          gen.if((0, codegen_1.not)(valid), () => {
            cxt.error(true);
            if (!it.allErrors)
              gen.break();
          });
        });
        cxt.ok(valid);
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
var require_additionalProperties = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var names_1 = require_names();
    var util_1 = require_util();
    var error51 = {
      message: "must NOT have additional properties",
      params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
    };
    var def = {
      keyword: "additionalProperties",
      type: ["object"],
      schemaType: ["boolean", "object"],
      allowUndefined: true,
      trackErrors: true,
      error: error51,
      code(cxt) {
        const { gen, schema, parentSchema, data, errsCount, it } = cxt;
        if (!errsCount)
          throw new Error("ajv implementation error");
        const { allErrors, opts } = it;
        it.props = true;
        if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema))
          return;
        const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
        const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
        checkAdditionalProperties();
        cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
        function checkAdditionalProperties() {
          gen.forIn("key", data, (key) => {
            if (!props.length && !patProps.length)
              additionalPropertyCode(key);
            else
              gen.if(isAdditional(key), () => additionalPropertyCode(key));
          });
        }
        function isAdditional(key) {
          let definedProp;
          if (props.length > 8) {
            const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
            definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
          } else if (props.length) {
            definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
          } else {
            definedProp = codegen_1.nil;
          }
          if (patProps.length) {
            definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
          }
          return (0, codegen_1.not)(definedProp);
        }
        function deleteAdditional(key) {
          gen.code((0, codegen_1._)`delete ${data}[${key}]`);
        }
        function additionalPropertyCode(key) {
          if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
            deleteAdditional(key);
            return;
          }
          if (schema === false) {
            cxt.setParams({ additionalProperty: key });
            cxt.error();
            if (!allErrors)
              gen.break();
            return;
          }
          if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
            const valid = gen.name("valid");
            if (opts.removeAdditional === "failing") {
              applyAdditionalSchema(key, valid, false);
              gen.if((0, codegen_1.not)(valid), () => {
                cxt.reset();
                deleteAdditional(key);
              });
            } else {
              applyAdditionalSchema(key, valid);
              if (!allErrors)
                gen.if((0, codegen_1.not)(valid), () => gen.break());
            }
          }
        }
        function applyAdditionalSchema(key, valid, errors) {
          const subschema = {
            keyword: "additionalProperties",
            dataProp: key,
            dataPropType: util_1.Type.Str
          };
          if (errors === false) {
            Object.assign(subschema, {
              compositeRule: true,
              createErrors: false,
              allErrors: false
            });
          }
          cxt.subschema(subschema, valid);
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/properties.js
var require_properties = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var validate_1 = require_validate();
    var code_1 = require_code2();
    var util_1 = require_util();
    var additionalProperties_1 = require_additionalProperties();
    var def = {
      keyword: "properties",
      type: "object",
      schemaType: "object",
      code(cxt) {
        const { gen, schema, parentSchema, data, it } = cxt;
        if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
          additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
        }
        const allProps = (0, code_1.allSchemaProperties)(schema);
        for (const prop of allProps) {
          it.definedProperties.add(prop);
        }
        if (it.opts.unevaluated && allProps.length && it.props !== true) {
          it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
        }
        const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
        if (properties.length === 0)
          return;
        const valid = gen.name("valid");
        for (const prop of properties) {
          if (hasDefault(prop)) {
            applyPropertySchema(prop);
          } else {
            gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));
            applyPropertySchema(prop);
            if (!it.allErrors)
              gen.else().var(valid, true);
            gen.endIf();
          }
          cxt.it.definedProperties.add(prop);
          cxt.ok(valid);
        }
        function hasDefault(prop) {
          return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
        }
        function applyPropertySchema(prop) {
          cxt.subschema({
            keyword: "properties",
            schemaProp: prop,
            dataProp: prop
          }, valid);
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
var require_patternProperties = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var code_1 = require_code2();
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var util_2 = require_util();
    var def = {
      keyword: "patternProperties",
      type: "object",
      schemaType: "object",
      code(cxt) {
        const { gen, schema, data, parentSchema, it } = cxt;
        const { opts } = it;
        const patterns = (0, code_1.allSchemaProperties)(schema);
        const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
        if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
          return;
        }
        const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
        const valid = gen.name("valid");
        if (it.props !== true && !(it.props instanceof codegen_1.Name)) {
          it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
        }
        const { props } = it;
        validatePatternProperties();
        function validatePatternProperties() {
          for (const pat of patterns) {
            if (checkProperties)
              checkMatchingProperties(pat);
            if (it.allErrors) {
              validateProperties(pat);
            } else {
              gen.var(valid, true);
              validateProperties(pat);
              gen.if(valid);
            }
          }
        }
        function checkMatchingProperties(pat) {
          for (const prop in checkProperties) {
            if (new RegExp(pat).test(prop)) {
              (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
            }
          }
        }
        function validateProperties(pat) {
          gen.forIn("key", data, (key) => {
            gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
              const alwaysValid = alwaysValidPatterns.includes(pat);
              if (!alwaysValid) {
                cxt.subschema({
                  keyword: "patternProperties",
                  schemaProp: pat,
                  dataProp: key,
                  dataPropType: util_2.Type.Str
                }, valid);
              }
              if (it.opts.unevaluated && props !== true) {
                gen.assign((0, codegen_1._)`${props}[${key}]`, true);
              } else if (!alwaysValid && !it.allErrors) {
                gen.if((0, codegen_1.not)(valid), () => gen.break());
              }
            });
          });
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/not.js
var require_not = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var util_1 = require_util();
    var def = {
      keyword: "not",
      schemaType: ["object", "boolean"],
      trackErrors: true,
      code(cxt) {
        const { gen, schema, it } = cxt;
        if ((0, util_1.alwaysValidSchema)(it, schema)) {
          cxt.fail();
          return;
        }
        const valid = gen.name("valid");
        cxt.subschema({
          keyword: "not",
          compositeRule: true,
          createErrors: false,
          allErrors: false
        }, valid);
        cxt.failResult(valid, () => cxt.reset(), () => cxt.error());
      },
      error: { message: "must NOT be valid" }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/anyOf.js
var require_anyOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var code_1 = require_code2();
    var def = {
      keyword: "anyOf",
      schemaType: "array",
      trackErrors: true,
      code: code_1.validateUnion,
      error: { message: "must match a schema in anyOf" }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/oneOf.js
var require_oneOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error51 = {
      message: "must match exactly one schema in oneOf",
      params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
    };
    var def = {
      keyword: "oneOf",
      schemaType: "array",
      trackErrors: true,
      error: error51,
      code(cxt) {
        const { gen, schema, parentSchema, it } = cxt;
        if (!Array.isArray(schema))
          throw new Error("ajv implementation error");
        if (it.opts.discriminator && parentSchema.discriminator)
          return;
        const schArr = schema;
        const valid = gen.let("valid", false);
        const passing = gen.let("passing", null);
        const schValid = gen.name("_valid");
        cxt.setParams({ passing });
        gen.block(validateOneOf);
        cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
        function validateOneOf() {
          schArr.forEach((sch, i) => {
            let schCxt;
            if ((0, util_1.alwaysValidSchema)(it, sch)) {
              gen.var(schValid, true);
            } else {
              schCxt = cxt.subschema({
                keyword: "oneOf",
                schemaProp: i,
                compositeRule: true
              }, schValid);
            }
            if (i > 0) {
              gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
            }
            gen.if(schValid, () => {
              gen.assign(valid, true);
              gen.assign(passing, i);
              if (schCxt)
                cxt.mergeEvaluated(schCxt, codegen_1.Name);
            });
          });
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/allOf.js
var require_allOf = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var util_1 = require_util();
    var def = {
      keyword: "allOf",
      schemaType: "array",
      code(cxt) {
        const { gen, schema, it } = cxt;
        if (!Array.isArray(schema))
          throw new Error("ajv implementation error");
        const valid = gen.name("valid");
        schema.forEach((sch, i) => {
          if ((0, util_1.alwaysValidSchema)(it, sch))
            return;
          const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid);
          cxt.ok(valid);
          cxt.mergeEvaluated(schCxt);
        });
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/if.js
var require_if = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var util_1 = require_util();
    var error51 = {
      message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
      params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
    };
    var def = {
      keyword: "if",
      schemaType: ["object", "boolean"],
      trackErrors: true,
      error: error51,
      code(cxt) {
        const { gen, parentSchema, it } = cxt;
        if (parentSchema.then === void 0 && parentSchema.else === void 0) {
          (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored');
        }
        const hasThen = hasSchema(it, "then");
        const hasElse = hasSchema(it, "else");
        if (!hasThen && !hasElse)
          return;
        const valid = gen.let("valid", true);
        const schValid = gen.name("_valid");
        validateIf();
        cxt.reset();
        if (hasThen && hasElse) {
          const ifClause = gen.let("ifClause");
          cxt.setParams({ ifClause });
          gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause));
        } else if (hasThen) {
          gen.if(schValid, validateClause("then"));
        } else {
          gen.if((0, codegen_1.not)(schValid), validateClause("else"));
        }
        cxt.pass(valid, () => cxt.error(true));
        function validateIf() {
          const schCxt = cxt.subschema({
            keyword: "if",
            compositeRule: true,
            createErrors: false,
            allErrors: false
          }, schValid);
          cxt.mergeEvaluated(schCxt);
        }
        function validateClause(keyword, ifClause) {
          return () => {
            const schCxt = cxt.subschema({ keyword }, schValid);
            gen.assign(valid, schValid);
            cxt.mergeValidEvaluated(schCxt, valid);
            if (ifClause)
              gen.assign(ifClause, (0, codegen_1._)`${keyword}`);
            else
              cxt.setParams({ ifClause: keyword });
          };
        }
      }
    };
    function hasSchema(it, keyword) {
      const schema = it.schema[keyword];
      return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
    }
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/thenElse.js
var require_thenElse = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var util_1 = require_util();
    var def = {
      keyword: ["then", "else"],
      schemaType: ["object", "boolean"],
      code({ keyword, parentSchema, it }) {
        if (parentSchema.if === void 0)
          (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`);
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/applicator/index.js
var require_applicator = __commonJS({
  "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var additionalItems_1 = require_additionalItems();
    var prefixItems_1 = require_prefixItems();
    var items_1 = require_items();
    var items2020_1 = require_items2020();
    var contains_1 = require_contains();
    var dependencies_1 = require_dependencies();
    var propertyNames_1 = require_propertyNames();
    var additionalProperties_1 = require_additionalProperties();
    var properties_1 = require_properties();
    var patternProperties_1 = require_patternProperties();
    var not_1 = require_not();
    var anyOf_1 = require_anyOf();
    var oneOf_1 = require_oneOf();
    var allOf_1 = require_allOf();
    var if_1 = require_if();
    var thenElse_1 = require_thenElse();
    function getApplicator(draft2020 = false) {
      const applicator = [
        // any
        not_1.default,
        anyOf_1.default,
        oneOf_1.default,
        allOf_1.default,
        if_1.default,
        thenElse_1.default,
        // object
        propertyNames_1.default,
        additionalProperties_1.default,
        dependencies_1.default,
        properties_1.default,
        patternProperties_1.default
      ];
      if (draft2020)
        applicator.push(prefixItems_1.default, items2020_1.default);
      else
        applicator.push(additionalItems_1.default, items_1.default);
      applicator.push(contains_1.default);
      return applicator;
    }
    exports2.default = getApplicator;
  }
});

// node_modules/ajv/dist/vocabularies/format/format.js
var require_format = __commonJS({
  "node_modules/ajv/dist/vocabularies/format/format.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var error51 = {
      message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
      params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
    };
    var def = {
      keyword: "format",
      type: ["number", "string"],
      schemaType: "string",
      $data: true,
      error: error51,
      code(cxt, ruleType) {
        const { gen, data, $data, schema, schemaCode, it } = cxt;
        const { opts, errSchemaPath, schemaEnv, self } = it;
        if (!opts.validateFormats)
          return;
        if ($data)
          validate$DataFormat();
        else
          validateFormat();
        function validate$DataFormat() {
          const fmts = gen.scopeValue("formats", {
            ref: self.formats,
            code: opts.code.formats
          });
          const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
          const fType = gen.let("fType");
          const format = gen.let("format");
          gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef));
          cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
          function unknownFmt() {
            if (opts.strictSchema === false)
              return codegen_1.nil;
            return (0, codegen_1._)`${schemaCode} && !${format}`;
          }
          function invalidFmt() {
            const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
            const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
            return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
          }
        }
        function validateFormat() {
          const formatDef = self.formats[schema];
          if (!formatDef) {
            unknownFormat();
            return;
          }
          if (formatDef === true)
            return;
          const [fmtType, format, fmtRef] = getFormat(formatDef);
          if (fmtType === ruleType)
            cxt.pass(validCondition());
          function unknownFormat() {
            if (opts.strictSchema === false) {
              self.logger.warn(unknownMsg());
              return;
            }
            throw new Error(unknownMsg());
            function unknownMsg() {
              return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
            }
          }
          function getFormat(fmtDef) {
            const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
            const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
            if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
              return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
            }
            return ["string", fmtDef, fmt];
          }
          function validCondition() {
            if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
              if (!schemaEnv.$async)
                throw new Error("async format in sync schema");
              return (0, codegen_1._)`await ${fmtRef}(${data})`;
            }
            return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
          }
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/vocabularies/format/index.js
var require_format2 = __commonJS({
  "node_modules/ajv/dist/vocabularies/format/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var format_1 = require_format();
    var format = [format_1.default];
    exports2.default = format;
  }
});

// node_modules/ajv/dist/vocabularies/metadata.js
var require_metadata = __commonJS({
  "node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.contentVocabulary = exports2.metadataVocabulary = void 0;
    exports2.metadataVocabulary = [
      "title",
      "description",
      "default",
      "deprecated",
      "readOnly",
      "writeOnly",
      "examples"
    ];
    exports2.contentVocabulary = [
      "contentMediaType",
      "contentEncoding",
      "contentSchema"
    ];
  }
});

// node_modules/ajv/dist/vocabularies/draft7.js
var require_draft7 = __commonJS({
  "node_modules/ajv/dist/vocabularies/draft7.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var core_1 = require_core2();
    var validation_1 = require_validation();
    var applicator_1 = require_applicator();
    var format_1 = require_format2();
    var metadata_1 = require_metadata();
    var draft7Vocabularies = [
      core_1.default,
      validation_1.default,
      (0, applicator_1.default)(),
      format_1.default,
      metadata_1.metadataVocabulary,
      metadata_1.contentVocabulary
    ];
    exports2.default = draft7Vocabularies;
  }
});

// node_modules/ajv/dist/vocabularies/discriminator/types.js
var require_types = __commonJS({
  "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.DiscrError = void 0;
    var DiscrError;
    (function(DiscrError2) {
      DiscrError2["Tag"] = "tag";
      DiscrError2["Mapping"] = "mapping";
    })(DiscrError || (exports2.DiscrError = DiscrError = {}));
  }
});

// node_modules/ajv/dist/vocabularies/discriminator/index.js
var require_discriminator = __commonJS({
  "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var codegen_1 = require_codegen();
    var types_1 = require_types();
    var compile_1 = require_compile();
    var ref_error_1 = require_ref_error();
    var util_1 = require_util();
    var error51 = {
      message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
      params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
    };
    var def = {
      keyword: "discriminator",
      type: "object",
      schemaType: "object",
      error: error51,
      code(cxt) {
        const { gen, data, schema, parentSchema, it } = cxt;
        const { oneOf } = parentSchema;
        if (!it.opts.discriminator) {
          throw new Error("discriminator: requires discriminator option");
        }
        const tagName = schema.propertyName;
        if (typeof tagName != "string")
          throw new Error("discriminator: requires propertyName");
        if (schema.mapping)
          throw new Error("discriminator: mapping is not supported");
        if (!oneOf)
          throw new Error("discriminator: requires oneOf keyword");
        const valid = gen.let("valid", false);
        const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);
        gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));
        cxt.ok(valid);
        function validateMapping() {
          const mapping = getMapping();
          gen.if(false);
          for (const tagValue in mapping) {
            gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);
            gen.assign(valid, applyTagSchema(mapping[tagValue]));
          }
          gen.else();
          cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });
          gen.endIf();
        }
        function applyTagSchema(schemaProp) {
          const _valid = gen.name("valid");
          const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
          cxt.mergeEvaluated(schCxt, codegen_1.Name);
          return _valid;
        }
        function getMapping() {
          var _a3;
          const oneOfMapping = {};
          const topRequired = hasRequired(parentSchema);
          let tagRequired = true;
          for (let i = 0; i < oneOf.length; i++) {
            let sch = oneOf[i];
            if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
              const ref = sch.$ref;
              sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
              if (sch instanceof compile_1.SchemaEnv)
                sch = sch.schema;
              if (sch === void 0)
                throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
            }
            const propSch = (_a3 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a3 === void 0 ? void 0 : _a3[tagName];
            if (typeof propSch != "object") {
              throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
            }
            tagRequired = tagRequired && (topRequired || hasRequired(sch));
            addMappings(propSch, i);
          }
          if (!tagRequired)
            throw new Error(`discriminator: "${tagName}" must be required`);
          return oneOfMapping;
          function hasRequired({ required: required2 }) {
            return Array.isArray(required2) && required2.includes(tagName);
          }
          function addMappings(sch, i) {
            if (sch.const) {
              addMapping(sch.const, i);
            } else if (sch.enum) {
              for (const tagValue of sch.enum) {
                addMapping(tagValue, i);
              }
            } else {
              throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
            }
          }
          function addMapping(tagValue, i) {
            if (typeof tagValue != "string" || tagValue in oneOfMapping) {
              throw new Error(`discriminator: "${tagName}" values must be unique strings`);
            }
            oneOfMapping[tagValue] = i;
          }
        }
      }
    };
    exports2.default = def;
  }
});

// node_modules/ajv/dist/refs/json-schema-draft-07.json
var require_json_schema_draft_07 = __commonJS({
  "node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports2, module2) {
    module2.exports = {
      $schema: "http://json-schema.org/draft-07/schema#",
      $id: "http://json-schema.org/draft-07/schema#",
      title: "Core schema meta-schema",
      definitions: {
        schemaArray: {
          type: "array",
          minItems: 1,
          items: { $ref: "#" }
        },
        nonNegativeInteger: {
          type: "integer",
          minimum: 0
        },
        nonNegativeIntegerDefault0: {
          allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }]
        },
        simpleTypes: {
          enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
        },
        stringArray: {
          type: "array",
          items: { type: "string" },
          uniqueItems: true,
          default: []
        }
      },
      type: ["object", "boolean"],
      properties: {
        $id: {
          type: "string",
          format: "uri-reference"
        },
        $schema: {
          type: "string",
          format: "uri"
        },
        $ref: {
          type: "string",
          format: "uri-reference"
        },
        $comment: {
          type: "string"
        },
        title: {
          type: "string"
        },
        description: {
          type: "string"
        },
        default: true,
        readOnly: {
          type: "boolean",
          default: false
        },
        examples: {
          type: "array",
          items: true
        },
        multipleOf: {
          type: "number",
          exclusiveMinimum: 0
        },
        maximum: {
          type: "number"
        },
        exclusiveMaximum: {
          type: "number"
        },
        minimum: {
          type: "number"
        },
        exclusiveMinimum: {
          type: "number"
        },
        maxLength: { $ref: "#/definitions/nonNegativeInteger" },
        minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
        pattern: {
          type: "string",
          format: "regex"
        },
        additionalItems: { $ref: "#" },
        items: {
          anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }],
          default: true
        },
        maxItems: { $ref: "#/definitions/nonNegativeInteger" },
        minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
        uniqueItems: {
          type: "boolean",
          default: false
        },
        contains: { $ref: "#" },
        maxProperties: { $ref: "#/definitions/nonNegativeInteger" },
        minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
        required: { $ref: "#/definitions/stringArray" },
        additionalProperties: { $ref: "#" },
        definitions: {
          type: "object",
          additionalProperties: { $ref: "#" },
          default: {}
        },
        properties: {
          type: "object",
          additionalProperties: { $ref: "#" },
          default: {}
        },
        patternProperties: {
          type: "object",
          additionalProperties: { $ref: "#" },
          propertyNames: { format: "regex" },
          default: {}
        },
        dependencies: {
          type: "object",
          additionalProperties: {
            anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }]
          }
        },
        propertyNames: { $ref: "#" },
        const: true,
        enum: {
          type: "array",
          items: true,
          minItems: 1,
          uniqueItems: true
        },
        type: {
          anyOf: [
            { $ref: "#/definitions/simpleTypes" },
            {
              type: "array",
              items: { $ref: "#/definitions/simpleTypes" },
              minItems: 1,
              uniqueItems: true
            }
          ]
        },
        format: { type: "string" },
        contentMediaType: { type: "string" },
        contentEncoding: { type: "string" },
        if: { $ref: "#" },
        then: { $ref: "#" },
        else: { $ref: "#" },
        allOf: { $ref: "#/definitions/schemaArray" },
        anyOf: { $ref: "#/definitions/schemaArray" },
        oneOf: { $ref: "#/definitions/schemaArray" },
        not: { $ref: "#" }
      },
      default: true
    };
  }
});

// node_modules/ajv/dist/ajv.js
var require_ajv = __commonJS({
  "node_modules/ajv/dist/ajv.js"(exports2, module2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.MissingRefError = exports2.ValidationError = exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = exports2.Ajv = void 0;
    var core_1 = require_core();
    var draft7_1 = require_draft7();
    var discriminator_1 = require_discriminator();
    var draft7MetaSchema = require_json_schema_draft_07();
    var META_SUPPORT_DATA = ["/properties"];
    var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
    var Ajv2 = class extends core_1.default {
      _addVocabularies() {
        super._addVocabularies();
        draft7_1.default.forEach((v) => this.addVocabulary(v));
        if (this.opts.discriminator)
          this.addKeyword(discriminator_1.default);
      }
      _addDefaultMetaSchema() {
        super._addDefaultMetaSchema();
        if (!this.opts.meta)
          return;
        const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;
        this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
        this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
      }
      defaultMeta() {
        return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
      }
    };
    exports2.Ajv = Ajv2;
    module2.exports = exports2 = Ajv2;
    module2.exports.Ajv = Ajv2;
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.default = Ajv2;
    var validate_1 = require_validate();
    Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = require_codegen();
    Object.defineProperty(exports2, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports2, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports2, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports2, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    var validation_error_1 = require_validation_error();
    Object.defineProperty(exports2, "ValidationError", { enumerable: true, get: function() {
      return validation_error_1.default;
    } });
    var ref_error_1 = require_ref_error();
    Object.defineProperty(exports2, "MissingRefError", { enumerable: true, get: function() {
      return ref_error_1.default;
    } });
  }
});

// node_modules/ajv-formats/dist/formats.js
var require_formats = __commonJS({
  "node_modules/ajv-formats/dist/formats.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.formatNames = exports2.fastFormats = exports2.fullFormats = void 0;
    function fmtDef(validate, compare) {
      return { validate, compare };
    }
    exports2.fullFormats = {
      // date: http://tools.ietf.org/html/rfc3339#section-5.6
      date: fmtDef(date5, compareDate),
      // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
      time: fmtDef(getTime(true), compareTime),
      "date-time": fmtDef(getDateTime(true), compareDateTime),
      "iso-time": fmtDef(getTime(), compareIsoTime),
      "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
      // duration: https://tools.ietf.org/html/rfc3339#appendix-A
      duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
      uri,
      "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
      // uri-template: https://tools.ietf.org/html/rfc6570
      "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
      // For the source: https://gist.github.com/dperini/729294
      // For test cases: https://mathiasbynens.be/demo/url-regex
      url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
      email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
      hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
      // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
      ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
      ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
      regex,
      // uuid: http://tools.ietf.org/html/rfc4122
      uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
      // JSON-pointer: https://tools.ietf.org/html/rfc6901
      // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
      "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
      "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
      // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
      "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
      // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
      // byte: https://github.com/miguelmota/is-base64
      byte,
      // signed 32 bit integer
      int32: { type: "number", validate: validateInt32 },
      // signed 64 bit integer
      int64: { type: "number", validate: validateInt64 },
      // C-type float
      float: { type: "number", validate: validateNumber },
      // C-type double
      double: { type: "number", validate: validateNumber },
      // hint to the UI to hide input strings
      password: true,
      // unchecked string payload
      binary: true
    };
    exports2.fastFormats = {
      ...exports2.fullFormats,
      date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
      time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
      "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
      "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
      "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
      // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
      uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
      "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
      // email (sources from jsen validator):
      // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
      // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
      email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
    };
    exports2.formatNames = Object.keys(exports2.fullFormats);
    function isLeapYear(year) {
      return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
    }
    var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
    var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    function date5(str) {
      const matches = DATE.exec(str);
      if (!matches)
        return false;
      const year = +matches[1];
      const month = +matches[2];
      const day = +matches[3];
      return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
    }
    function compareDate(d1, d2) {
      if (!(d1 && d2))
        return void 0;
      if (d1 > d2)
        return 1;
      if (d1 < d2)
        return -1;
      return 0;
    }
    var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
    function getTime(strictTimeZone) {
      return function time3(str) {
        const matches = TIME.exec(str);
        if (!matches)
          return false;
        const hr = +matches[1];
        const min = +matches[2];
        const sec = +matches[3];
        const tz = matches[4];
        const tzSign = matches[5] === "-" ? -1 : 1;
        const tzH = +(matches[6] || 0);
        const tzM = +(matches[7] || 0);
        if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
          return false;
        if (hr <= 23 && min <= 59 && sec < 60)
          return true;
        const utcMin = min - tzM * tzSign;
        const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
        return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
      };
    }
    function compareTime(s1, s2) {
      if (!(s1 && s2))
        return void 0;
      const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
      const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
      if (!(t1 && t2))
        return void 0;
      return t1 - t2;
    }
    function compareIsoTime(t1, t2) {
      if (!(t1 && t2))
        return void 0;
      const a1 = TIME.exec(t1);
      const a2 = TIME.exec(t2);
      if (!(a1 && a2))
        return void 0;
      t1 = a1[1] + a1[2] + a1[3];
      t2 = a2[1] + a2[2] + a2[3];
      if (t1 > t2)
        return 1;
      if (t1 < t2)
        return -1;
      return 0;
    }
    var DATE_TIME_SEPARATOR = /t|\s/i;
    function getDateTime(strictTimeZone) {
      const time3 = getTime(strictTimeZone);
      return function date_time(str) {
        const dateTime = str.split(DATE_TIME_SEPARATOR);
        return dateTime.length === 2 && date5(dateTime[0]) && time3(dateTime[1]);
      };
    }
    function compareDateTime(dt1, dt2) {
      if (!(dt1 && dt2))
        return void 0;
      const d1 = new Date(dt1).valueOf();
      const d2 = new Date(dt2).valueOf();
      if (!(d1 && d2))
        return void 0;
      return d1 - d2;
    }
    function compareIsoDateTime(dt1, dt2) {
      if (!(dt1 && dt2))
        return void 0;
      const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
      const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
      const res = compareDate(d1, d2);
      if (res === void 0)
        return void 0;
      return res || compareTime(t1, t2);
    }
    var NOT_URI_FRAGMENT = /\/|:/;
    var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
    function uri(str) {
      return NOT_URI_FRAGMENT.test(str) && URI.test(str);
    }
    var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
    function byte(str) {
      BYTE.lastIndex = 0;
      return BYTE.test(str);
    }
    var MIN_INT32 = -(2 ** 31);
    var MAX_INT32 = 2 ** 31 - 1;
    function validateInt32(value) {
      return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
    }
    function validateInt64(value) {
      return Number.isInteger(value);
    }
    function validateNumber() {
      return true;
    }
    var Z_ANCHOR = /[^\\]\\Z/;
    function regex(str) {
      if (Z_ANCHOR.test(str))
        return false;
      try {
        new RegExp(str);
        return true;
      } catch (e) {
        return false;
      }
    }
  }
});

// node_modules/ajv-formats/dist/limit.js
var require_limit = __commonJS({
  "node_modules/ajv-formats/dist/limit.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.formatLimitDefinition = void 0;
    var ajv_1 = require_ajv();
    var codegen_1 = require_codegen();
    var ops = codegen_1.operators;
    var KWDs = {
      formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
      formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
      formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
      formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
    };
    var error51 = {
      message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
      params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
    };
    exports2.formatLimitDefinition = {
      keyword: Object.keys(KWDs),
      type: "string",
      schemaType: "string",
      $data: true,
      error: error51,
      code(cxt) {
        const { gen, data, schemaCode, keyword, it } = cxt;
        const { opts, self } = it;
        if (!opts.validateFormats)
          return;
        const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, "format");
        if (fCxt.$data)
          validate$DataFormat();
        else
          validateFormat();
        function validate$DataFormat() {
          const fmts = gen.scopeValue("formats", {
            ref: self.formats,
            code: opts.code.formats
          });
          const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);
          cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
        }
        function validateFormat() {
          const format = fCxt.schema;
          const fmtDef = self.formats[format];
          if (!fmtDef || fmtDef === true)
            return;
          if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
            throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
          }
          const fmt = gen.scopeValue("formats", {
            key: format,
            ref: fmtDef,
            code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0
          });
          cxt.fail$data(compareCode(fmt));
        }
        function compareCode(fmt) {
          return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
        }
      },
      dependencies: ["format"]
    };
    var formatLimitPlugin = (ajv) => {
      ajv.addKeyword(exports2.formatLimitDefinition);
      return ajv;
    };
    exports2.default = formatLimitPlugin;
  }
});

// node_modules/ajv-formats/dist/index.js
var require_dist = __commonJS({
  "node_modules/ajv-formats/dist/index.js"(exports2, module2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var formats_1 = require_formats();
    var limit_1 = require_limit();
    var codegen_1 = require_codegen();
    var fullName = new codegen_1.Name("fullFormats");
    var fastName = new codegen_1.Name("fastFormats");
    var formatsPlugin = (ajv, opts = { keywords: true }) => {
      if (Array.isArray(opts)) {
        addFormats(ajv, opts, formats_1.fullFormats, fullName);
        return ajv;
      }
      const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
      const list = opts.formats || formats_1.formatNames;
      addFormats(ajv, list, formats, exportName);
      if (opts.keywords)
        (0, limit_1.default)(ajv);
      return ajv;
    };
    formatsPlugin.get = (name, mode = "full") => {
      const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
      const f = formats[name];
      if (!f)
        throw new Error(`Unknown format "${name}"`);
      return f;
    };
    function addFormats(ajv, list, fs, exportName) {
      var _a3;
      var _b;
      (_a3 = (_b = ajv.opts.code).formats) !== null && _a3 !== void 0 ? _a3 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
      for (const f of list)
        ajv.addFormat(f, fs[f]);
    }
    module2.exports = exports2 = formatsPlugin;
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.default = formatsPlugin;
  }
});

// server/node_modules/vscode-languageserver/lib/common/utils/is.js
var require_is = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/utils/is.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.thenable = exports2.typedArray = exports2.stringArray = exports2.array = exports2.func = exports2.error = exports2.number = exports2.string = exports2.boolean = void 0;
    function boolean4(value) {
      return value === true || value === false;
    }
    exports2.boolean = boolean4;
    function string4(value) {
      return typeof value === "string" || value instanceof String;
    }
    exports2.string = string4;
    function number4(value) {
      return typeof value === "number" || value instanceof Number;
    }
    exports2.number = number4;
    function error51(value) {
      return value instanceof Error;
    }
    exports2.error = error51;
    function func(value) {
      return typeof value === "function";
    }
    exports2.func = func;
    function array2(value) {
      return Array.isArray(value);
    }
    exports2.array = array2;
    function stringArray(value) {
      return array2(value) && value.every((elem) => string4(elem));
    }
    exports2.stringArray = stringArray;
    function typedArray(value, check2) {
      return Array.isArray(value) && value.every(check2);
    }
    exports2.typedArray = typedArray;
    function thenable(value) {
      return value && func(value.then);
    }
    exports2.thenable = thenable;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/is.js
var require_is2 = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/is.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.stringArray = exports2.array = exports2.func = exports2.error = exports2.number = exports2.string = exports2.boolean = void 0;
    function boolean4(value) {
      return value === true || value === false;
    }
    exports2.boolean = boolean4;
    function string4(value) {
      return typeof value === "string" || value instanceof String;
    }
    exports2.string = string4;
    function number4(value) {
      return typeof value === "number" || value instanceof Number;
    }
    exports2.number = number4;
    function error51(value) {
      return value instanceof Error;
    }
    exports2.error = error51;
    function func(value) {
      return typeof value === "function";
    }
    exports2.func = func;
    function array2(value) {
      return Array.isArray(value);
    }
    exports2.array = array2;
    function stringArray(value) {
      return array2(value) && value.every((elem) => string4(elem));
    }
    exports2.stringArray = stringArray;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/messages.js
var require_messages = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/messages.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.Message = exports2.NotificationType9 = exports2.NotificationType8 = exports2.NotificationType7 = exports2.NotificationType6 = exports2.NotificationType5 = exports2.NotificationType4 = exports2.NotificationType3 = exports2.NotificationType2 = exports2.NotificationType1 = exports2.NotificationType0 = exports2.NotificationType = exports2.RequestType9 = exports2.RequestType8 = exports2.RequestType7 = exports2.RequestType6 = exports2.RequestType5 = exports2.RequestType4 = exports2.RequestType3 = exports2.RequestType2 = exports2.RequestType1 = exports2.RequestType = exports2.RequestType0 = exports2.AbstractMessageSignature = exports2.ParameterStructures = exports2.ResponseError = exports2.ErrorCodes = void 0;
    var is = require_is2();
    var ErrorCodes;
    (function(ErrorCodes2) {
      ErrorCodes2.ParseError = -32700;
      ErrorCodes2.InvalidRequest = -32600;
      ErrorCodes2.MethodNotFound = -32601;
      ErrorCodes2.InvalidParams = -32602;
      ErrorCodes2.InternalError = -32603;
      ErrorCodes2.jsonrpcReservedErrorRangeStart = -32099;
      ErrorCodes2.serverErrorStart = -32099;
      ErrorCodes2.MessageWriteError = -32099;
      ErrorCodes2.MessageReadError = -32098;
      ErrorCodes2.PendingResponseRejected = -32097;
      ErrorCodes2.ConnectionInactive = -32096;
      ErrorCodes2.ServerNotInitialized = -32002;
      ErrorCodes2.UnknownErrorCode = -32001;
      ErrorCodes2.jsonrpcReservedErrorRangeEnd = -32e3;
      ErrorCodes2.serverErrorEnd = -32e3;
    })(ErrorCodes || (exports2.ErrorCodes = ErrorCodes = {}));
    var ResponseError = class _ResponseError extends Error {
      constructor(code, message, data) {
        super(message);
        this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
        this.data = data;
        Object.setPrototypeOf(this, _ResponseError.prototype);
      }
      toJson() {
        const result = {
          code: this.code,
          message: this.message
        };
        if (this.data !== void 0) {
          result.data = this.data;
        }
        return result;
      }
    };
    exports2.ResponseError = ResponseError;
    var ParameterStructures = class _ParameterStructures {
      constructor(kind) {
        this.kind = kind;
      }
      static is(value) {
        return value === _ParameterStructures.auto || value === _ParameterStructures.byName || value === _ParameterStructures.byPosition;
      }
      toString() {
        return this.kind;
      }
    };
    exports2.ParameterStructures = ParameterStructures;
    ParameterStructures.auto = new ParameterStructures("auto");
    ParameterStructures.byPosition = new ParameterStructures("byPosition");
    ParameterStructures.byName = new ParameterStructures("byName");
    var AbstractMessageSignature = class {
      constructor(method, numberOfParams) {
        this.method = method;
        this.numberOfParams = numberOfParams;
      }
      get parameterStructures() {
        return ParameterStructures.auto;
      }
    };
    exports2.AbstractMessageSignature = AbstractMessageSignature;
    var RequestType0 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 0);
      }
    };
    exports2.RequestType0 = RequestType0;
    var RequestType = class extends AbstractMessageSignature {
      constructor(method, _parameterStructures = ParameterStructures.auto) {
        super(method, 1);
        this._parameterStructures = _parameterStructures;
      }
      get parameterStructures() {
        return this._parameterStructures;
      }
    };
    exports2.RequestType = RequestType;
    var RequestType1 = class extends AbstractMessageSignature {
      constructor(method, _parameterStructures = ParameterStructures.auto) {
        super(method, 1);
        this._parameterStructures = _parameterStructures;
      }
      get parameterStructures() {
        return this._parameterStructures;
      }
    };
    exports2.RequestType1 = RequestType1;
    var RequestType2 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 2);
      }
    };
    exports2.RequestType2 = RequestType2;
    var RequestType3 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 3);
      }
    };
    exports2.RequestType3 = RequestType3;
    var RequestType4 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 4);
      }
    };
    exports2.RequestType4 = RequestType4;
    var RequestType5 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 5);
      }
    };
    exports2.RequestType5 = RequestType5;
    var RequestType6 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 6);
      }
    };
    exports2.RequestType6 = RequestType6;
    var RequestType7 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 7);
      }
    };
    exports2.RequestType7 = RequestType7;
    var RequestType8 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 8);
      }
    };
    exports2.RequestType8 = RequestType8;
    var RequestType9 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 9);
      }
    };
    exports2.RequestType9 = RequestType9;
    var NotificationType = class extends AbstractMessageSignature {
      constructor(method, _parameterStructures = ParameterStructures.auto) {
        super(method, 1);
        this._parameterStructures = _parameterStructures;
      }
      get parameterStructures() {
        return this._parameterStructures;
      }
    };
    exports2.NotificationType = NotificationType;
    var NotificationType0 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 0);
      }
    };
    exports2.NotificationType0 = NotificationType0;
    var NotificationType1 = class extends AbstractMessageSignature {
      constructor(method, _parameterStructures = ParameterStructures.auto) {
        super(method, 1);
        this._parameterStructures = _parameterStructures;
      }
      get parameterStructures() {
        return this._parameterStructures;
      }
    };
    exports2.NotificationType1 = NotificationType1;
    var NotificationType2 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 2);
      }
    };
    exports2.NotificationType2 = NotificationType2;
    var NotificationType3 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 3);
      }
    };
    exports2.NotificationType3 = NotificationType3;
    var NotificationType4 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 4);
      }
    };
    exports2.NotificationType4 = NotificationType4;
    var NotificationType5 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 5);
      }
    };
    exports2.NotificationType5 = NotificationType5;
    var NotificationType6 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 6);
      }
    };
    exports2.NotificationType6 = NotificationType6;
    var NotificationType7 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 7);
      }
    };
    exports2.NotificationType7 = NotificationType7;
    var NotificationType8 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 8);
      }
    };
    exports2.NotificationType8 = NotificationType8;
    var NotificationType9 = class extends AbstractMessageSignature {
      constructor(method) {
        super(method, 9);
      }
    };
    exports2.NotificationType9 = NotificationType9;
    var Message;
    (function(Message2) {
      function isRequest(message) {
        const candidate = message;
        return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
      }
      Message2.isRequest = isRequest;
      function isNotification(message) {
        const candidate = message;
        return candidate && is.string(candidate.method) && message.id === void 0;
      }
      Message2.isNotification = isNotification;
      function isResponse(message) {
        const candidate = message;
        return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
      }
      Message2.isResponse = isResponse;
    })(Message || (exports2.Message = Message = {}));
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/linkedMap.js
var require_linkedMap = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(exports2) {
    "use strict";
    var _a3;
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.LRUCache = exports2.LinkedMap = exports2.Touch = void 0;
    var Touch;
    (function(Touch2) {
      Touch2.None = 0;
      Touch2.First = 1;
      Touch2.AsOld = Touch2.First;
      Touch2.Last = 2;
      Touch2.AsNew = Touch2.Last;
    })(Touch || (exports2.Touch = Touch = {}));
    var LinkedMap = class {
      constructor() {
        this[_a3] = "LinkedMap";
        this._map = /* @__PURE__ */ new Map();
        this._head = void 0;
        this._tail = void 0;
        this._size = 0;
        this._state = 0;
      }
      clear() {
        this._map.clear();
        this._head = void 0;
        this._tail = void 0;
        this._size = 0;
        this._state++;
      }
      isEmpty() {
        return !this._head && !this._tail;
      }
      get size() {
        return this._size;
      }
      get first() {
        return this._head?.value;
      }
      get last() {
        return this._tail?.value;
      }
      has(key) {
        return this._map.has(key);
      }
      get(key, touch = Touch.None) {
        const item = this._map.get(key);
        if (!item) {
          return void 0;
        }
        if (touch !== Touch.None) {
          this.touch(item, touch);
        }
        return item.value;
      }
      set(key, value, touch = Touch.None) {
        let item = this._map.get(key);
        if (item) {
          item.value = value;
          if (touch !== Touch.None) {
            this.touch(item, touch);
          }
        } else {
          item = { key, value, next: void 0, previous: void 0 };
          switch (touch) {
            case Touch.None:
              this.addItemLast(item);
              break;
            case Touch.First:
              this.addItemFirst(item);
              break;
            case Touch.Last:
              this.addItemLast(item);
              break;
            default:
              this.addItemLast(item);
              break;
          }
          this._map.set(key, item);
          this._size++;
        }
        return this;
      }
      delete(key) {
        return !!this.remove(key);
      }
      remove(key) {
        const item = this._map.get(key);
        if (!item) {
          return void 0;
        }
        this._map.delete(key);
        this.removeItem(item);
        this._size--;
        return item.value;
      }
      shift() {
        if (!this._head && !this._tail) {
          return void 0;
        }
        if (!this._head || !this._tail) {
          throw new Error("Invalid list");
        }
        const item = this._head;
        this._map.delete(item.key);
        this.removeItem(item);
        this._size--;
        return item.value;
      }
      forEach(callbackfn, thisArg) {
        const state = this._state;
        let current = this._head;
        while (current) {
          if (thisArg) {
            callbackfn.bind(thisArg)(current.value, current.key, this);
          } else {
            callbackfn(current.value, current.key, this);
          }
          if (this._state !== state) {
            throw new Error(`LinkedMap got modified during iteration.`);
          }
          current = current.next;
        }
      }
      keys() {
        const state = this._state;
        let current = this._head;
        const iterator = {
          [Symbol.iterator]: () => {
            return iterator;
          },
          next: () => {
            if (this._state !== state) {
              throw new Error(`LinkedMap got modified during iteration.`);
            }
            if (current) {
              const result = { value: current.key, done: false };
              current = current.next;
              return result;
            } else {
              return { value: void 0, done: true };
            }
          }
        };
        return iterator;
      }
      values() {
        const state = this._state;
        let current = this._head;
        const iterator = {
          [Symbol.iterator]: () => {
            return iterator;
          },
          next: () => {
            if (this._state !== state) {
              throw new Error(`LinkedMap got modified during iteration.`);
            }
            if (current) {
              const result = { value: current.value, done: false };
              current = current.next;
              return result;
            } else {
              return { value: void 0, done: true };
            }
          }
        };
        return iterator;
      }
      entries() {
        const state = this._state;
        let current = this._head;
        const iterator = {
          [Symbol.iterator]: () => {
            return iterator;
          },
          next: () => {
            if (this._state !== state) {
              throw new Error(`LinkedMap got modified during iteration.`);
            }
            if (current) {
              const result = { value: [current.key, current.value], done: false };
              current = current.next;
              return result;
            } else {
              return { value: void 0, done: true };
            }
          }
        };
        return iterator;
      }
      [(_a3 = Symbol.toStringTag, Symbol.iterator)]() {
        return this.entries();
      }
      trimOld(newSize) {
        if (newSize >= this.size) {
          return;
        }
        if (newSize === 0) {
          this.clear();
          return;
        }
        let current = this._head;
        let currentSize = this.size;
        while (current && currentSize > newSize) {
          this._map.delete(current.key);
          current = current.next;
          currentSize--;
        }
        this._head = current;
        this._size = currentSize;
        if (current) {
          current.previous = void 0;
        }
        this._state++;
      }
      addItemFirst(item) {
        if (!this._head && !this._tail) {
          this._tail = item;
        } else if (!this._head) {
          throw new Error("Invalid list");
        } else {
          item.next = this._head;
          this._head.previous = item;
        }
        this._head = item;
        this._state++;
      }
      addItemLast(item) {
        if (!this._head && !this._tail) {
          this._head = item;
        } else if (!this._tail) {
          throw new Error("Invalid list");
        } else {
          item.previous = this._tail;
          this._tail.next = item;
        }
        this._tail = item;
        this._state++;
      }
      removeItem(item) {
        if (item === this._head && item === this._tail) {
          this._head = void 0;
          this._tail = void 0;
        } else if (item === this._head) {
          if (!item.next) {
            throw new Error("Invalid list");
          }
          item.next.previous = void 0;
          this._head = item.next;
        } else if (item === this._tail) {
          if (!item.previous) {
            throw new Error("Invalid list");
          }
          item.previous.next = void 0;
          this._tail = item.previous;
        } else {
          const next = item.next;
          const previous = item.previous;
          if (!next || !previous) {
            throw new Error("Invalid list");
          }
          next.previous = previous;
          previous.next = next;
        }
        item.next = void 0;
        item.previous = void 0;
        this._state++;
      }
      touch(item, touch) {
        if (!this._head || !this._tail) {
          throw new Error("Invalid list");
        }
        if (touch !== Touch.First && touch !== Touch.Last) {
          return;
        }
        if (touch === Touch.First) {
          if (item === this._head) {
            return;
          }
          const next = item.next;
          const previous = item.previous;
          if (item === this._tail) {
            previous.next = void 0;
            this._tail = previous;
          } else {
            next.previous = previous;
            previous.next = next;
          }
          item.previous = void 0;
          item.next = this._head;
          this._head.previous = item;
          this._head = item;
          this._state++;
        } else if (touch === Touch.Last) {
          if (item === this._tail) {
            return;
          }
          const next = item.next;
          const previous = item.previous;
          if (item === this._head) {
            next.previous = void 0;
            this._head = next;
          } else {
            next.previous = previous;
            previous.next = next;
          }
          item.next = void 0;
          item.previous = this._tail;
          this._tail.next = item;
          this._tail = item;
          this._state++;
        }
      }
      toJSON() {
        const data = [];
        this.forEach((value, key) => {
          data.push([key, value]);
        });
        return data;
      }
      fromJSON(data) {
        this.clear();
        for (const [key, value] of data) {
          this.set(key, value);
        }
      }
    };
    exports2.LinkedMap = LinkedMap;
    var LRUCache = class extends LinkedMap {
      constructor(limit, ratio = 1) {
        super();
        this._limit = limit;
        this._ratio = Math.min(Math.max(0, ratio), 1);
      }
      get limit() {
        return this._limit;
      }
      set limit(limit) {
        this._limit = limit;
        this.checkTrim();
      }
      get ratio() {
        return this._ratio;
      }
      set ratio(ratio) {
        this._ratio = Math.min(Math.max(0, ratio), 1);
        this.checkTrim();
      }
      get(key, touch = Touch.AsNew) {
        return super.get(key, touch);
      }
      peek(key) {
        return super.get(key, Touch.None);
      }
      set(key, value) {
        super.set(key, value, Touch.Last);
        this.checkTrim();
        return this;
      }
      checkTrim() {
        if (this.size > this._limit) {
          this.trimOld(Math.round(this._limit * this._ratio));
        }
      }
    };
    exports2.LRUCache = LRUCache;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/disposable.js
var require_disposable = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/disposable.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.Disposable = void 0;
    var Disposable;
    (function(Disposable2) {
      function create(func) {
        return {
          dispose: func
        };
      }
      Disposable2.create = create;
    })(Disposable || (exports2.Disposable = Disposable = {}));
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/ral.js
var require_ral = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/ral.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var _ral;
    function RAL() {
      if (_ral === void 0) {
        throw new Error(`No runtime abstraction layer installed`);
      }
      return _ral;
    }
    (function(RAL2) {
      function install(ral) {
        if (ral === void 0) {
          throw new Error(`No runtime abstraction layer provided`);
        }
        _ral = ral;
      }
      RAL2.install = install;
    })(RAL || (RAL = {}));
    exports2.default = RAL;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/events.js
var require_events = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/events.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.Emitter = exports2.Event = void 0;
    var ral_1 = require_ral();
    var Event;
    (function(Event2) {
      const _disposable = { dispose() {
      } };
      Event2.None = function() {
        return _disposable;
      };
    })(Event || (exports2.Event = Event = {}));
    var CallbackList = class {
      add(callback, context = null, bucket) {
        if (!this._callbacks) {
          this._callbacks = [];
          this._contexts = [];
        }
        this._callbacks.push(callback);
        this._contexts.push(context);
        if (Array.isArray(bucket)) {
          bucket.push({ dispose: () => this.remove(callback, context) });
        }
      }
      remove(callback, context = null) {
        if (!this._callbacks) {
          return;
        }
        let foundCallbackWithDifferentContext = false;
        for (let i = 0, len = this._callbacks.length; i < len; i++) {
          if (this._callbacks[i] === callback) {
            if (this._contexts[i] === context) {
              this._callbacks.splice(i, 1);
              this._contexts.splice(i, 1);
              return;
            } else {
              foundCallbackWithDifferentContext = true;
            }
          }
        }
        if (foundCallbackWithDifferentContext) {
          throw new Error("When adding a listener with a context, you should remove it with the same context");
        }
      }
      invoke(...args) {
        if (!this._callbacks) {
          return [];
        }
        const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
        for (let i = 0, len = callbacks.length; i < len; i++) {
          try {
            ret.push(callbacks[i].apply(contexts[i], args));
          } catch (e) {
            (0, ral_1.default)().console.error(e);
          }
        }
        return ret;
      }
      isEmpty() {
        return !this._callbacks || this._callbacks.length === 0;
      }
      dispose() {
        this._callbacks = void 0;
        this._contexts = void 0;
      }
    };
    var Emitter = class _Emitter {
      constructor(_options) {
        this._options = _options;
      }
      /**
       * For the public to allow to subscribe
       * to events from this Emitter
       */
      get event() {
        if (!this._event) {
          this._event = (listener, thisArgs, disposables) => {
            if (!this._callbacks) {
              this._callbacks = new CallbackList();
            }
            if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
              this._options.onFirstListenerAdd(this);
            }
            this._callbacks.add(listener, thisArgs);
            const result = {
              dispose: () => {
                if (!this._callbacks) {
                  return;
                }
                this._callbacks.remove(listener, thisArgs);
                result.dispose = _Emitter._noop;
                if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
                  this._options.onLastListenerRemove(this);
                }
              }
            };
            if (Array.isArray(disposables)) {
              disposables.push(result);
            }
            return result;
          };
        }
        return this._event;
      }
      /**
       * To be kept private to fire an event to
       * subscribers
       */
      fire(event) {
        if (this._callbacks) {
          this._callbacks.invoke.call(this._callbacks, event);
        }
      }
      dispose() {
        if (this._callbacks) {
          this._callbacks.dispose();
          this._callbacks = void 0;
        }
      }
    };
    exports2.Emitter = Emitter;
    Emitter._noop = function() {
    };
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/cancellation.js
var require_cancellation = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.CancellationTokenSource = exports2.CancellationToken = void 0;
    var ral_1 = require_ral();
    var Is = require_is2();
    var events_1 = require_events();
    var CancellationToken;
    (function(CancellationToken2) {
      CancellationToken2.None = Object.freeze({
        isCancellationRequested: false,
        onCancellationRequested: events_1.Event.None
      });
      CancellationToken2.Cancelled = Object.freeze({
        isCancellationRequested: true,
        onCancellationRequested: events_1.Event.None
      });
      function is(value) {
        const candidate = value;
        return candidate && (candidate === CancellationToken2.None || candidate === CancellationToken2.Cancelled || Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested);
      }
      CancellationToken2.is = is;
    })(CancellationToken || (exports2.CancellationToken = CancellationToken = {}));
    var shortcutEvent = Object.freeze(function(callback, context) {
      const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);
      return { dispose() {
        handle.dispose();
      } };
    });
    var MutableToken = class {
      constructor() {
        this._isCancelled = false;
      }
      cancel() {
        if (!this._isCancelled) {
          this._isCancelled = true;
          if (this._emitter) {
            this._emitter.fire(void 0);
            this.dispose();
          }
        }
      }
      get isCancellationRequested() {
        return this._isCancelled;
      }
      get onCancellationRequested() {
        if (this._isCancelled) {
          return shortcutEvent;
        }
        if (!this._emitter) {
          this._emitter = new events_1.Emitter();
        }
        return this._emitter.event;
      }
      dispose() {
        if (this._emitter) {
          this._emitter.dispose();
          this._emitter = void 0;
        }
      }
    };
    var CancellationTokenSource = class {
      get token() {
        if (!this._token) {
          this._token = new MutableToken();
        }
        return this._token;
      }
      cancel() {
        if (!this._token) {
          this._token = CancellationToken.Cancelled;
        } else {
          this._token.cancel();
        }
      }
      dispose() {
        if (!this._token) {
          this._token = CancellationToken.None;
        } else if (this._token instanceof MutableToken) {
          this._token.dispose();
        }
      }
    };
    exports2.CancellationTokenSource = CancellationTokenSource;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js
var require_sharedArrayCancellation = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.SharedArrayReceiverStrategy = exports2.SharedArraySenderStrategy = void 0;
    var cancellation_1 = require_cancellation();
    var CancellationState;
    (function(CancellationState2) {
      CancellationState2.Continue = 0;
      CancellationState2.Cancelled = 1;
    })(CancellationState || (CancellationState = {}));
    var SharedArraySenderStrategy = class {
      constructor() {
        this.buffers = /* @__PURE__ */ new Map();
      }
      enableCancellation(request) {
        if (request.id === null) {
          return;
        }
        const buffer = new SharedArrayBuffer(4);
        const data = new Int32Array(buffer, 0, 1);
        data[0] = CancellationState.Continue;
        this.buffers.set(request.id, buffer);
        request.$cancellationData = buffer;
      }
      async sendCancellation(_conn, id) {
        const buffer = this.buffers.get(id);
        if (buffer === void 0) {
          return;
        }
        const data = new Int32Array(buffer, 0, 1);
        Atomics.store(data, 0, CancellationState.Cancelled);
      }
      cleanup(id) {
        this.buffers.delete(id);
      }
      dispose() {
        this.buffers.clear();
      }
    };
    exports2.SharedArraySenderStrategy = SharedArraySenderStrategy;
    var SharedArrayBufferCancellationToken = class {
      constructor(buffer) {
        this.data = new Int32Array(buffer, 0, 1);
      }
      get isCancellationRequested() {
        return Atomics.load(this.data, 0) === CancellationState.Cancelled;
      }
      get onCancellationRequested() {
        throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`);
      }
    };
    var SharedArrayBufferCancellationTokenSource = class {
      constructor(buffer) {
        this.token = new SharedArrayBufferCancellationToken(buffer);
      }
      cancel() {
      }
      dispose() {
      }
    };
    var SharedArrayReceiverStrategy = class {
      constructor() {
        this.kind = "request";
      }
      createCancellationTokenSource(request) {
        const buffer = request.$cancellationData;
        if (buffer === void 0) {
          return new cancellation_1.CancellationTokenSource();
        }
        return new SharedArrayBufferCancellationTokenSource(buffer);
      }
    };
    exports2.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/semaphore.js
var require_semaphore = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.Semaphore = void 0;
    var ral_1 = require_ral();
    var Semaphore = class {
      constructor(capacity = 1) {
        if (capacity <= 0) {
          throw new Error("Capacity must be greater than 0");
        }
        this._capacity = capacity;
        this._active = 0;
        this._waiting = [];
      }
      lock(thunk) {
        return new Promise((resolve, reject) => {
          this._waiting.push({ thunk, resolve, reject });
          this.runNext();
        });
      }
      get active() {
        return this._active;
      }
      runNext() {
        if (this._waiting.length === 0 || this._active === this._capacity) {
          return;
        }
        (0, ral_1.default)().timer.setImmediate(() => this.doRunNext());
      }
      doRunNext() {
        if (this._waiting.length === 0 || this._active === this._capacity) {
          return;
        }
        const next = this._waiting.shift();
        this._active++;
        if (this._active > this._capacity) {
          throw new Error(`To many thunks active`);
        }
        try {
          const result = next.thunk();
          if (result instanceof Promise) {
            result.then((value) => {
              this._active--;
              next.resolve(value);
              this.runNext();
            }, (err) => {
              this._active--;
              next.reject(err);
              this.runNext();
            });
          } else {
            this._active--;
            next.resolve(result);
            this.runNext();
          }
        } catch (err) {
          this._active--;
          next.reject(err);
          this.runNext();
        }
      }
    };
    exports2.Semaphore = Semaphore;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/messageReader.js
var require_messageReader = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ReadableStreamMessageReader = exports2.AbstractMessageReader = exports2.MessageReader = void 0;
    var ral_1 = require_ral();
    var Is = require_is2();
    var events_1 = require_events();
    var semaphore_1 = require_semaphore();
    var MessageReader;
    (function(MessageReader2) {
      function is(value) {
        let candidate = value;
        return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
      }
      MessageReader2.is = is;
    })(MessageReader || (exports2.MessageReader = MessageReader = {}));
    var AbstractMessageReader = class {
      constructor() {
        this.errorEmitter = new events_1.Emitter();
        this.closeEmitter = new events_1.Emitter();
        this.partialMessageEmitter = new events_1.Emitter();
      }
      dispose() {
        this.errorEmitter.dispose();
        this.closeEmitter.dispose();
      }
      get onError() {
        return this.errorEmitter.event;
      }
      fireError(error51) {
        this.errorEmitter.fire(this.asError(error51));
      }
      get onClose() {
        return this.closeEmitter.event;
      }
      fireClose() {
        this.closeEmitter.fire(void 0);
      }
      get onPartialMessage() {
        return this.partialMessageEmitter.event;
      }
      firePartialMessage(info) {
        this.partialMessageEmitter.fire(info);
      }
      asError(error51) {
        if (error51 instanceof Error) {
          return error51;
        } else {
          return new Error(`Reader received error. Reason: ${Is.string(error51.message) ? error51.message : "unknown"}`);
        }
      }
    };
    exports2.AbstractMessageReader = AbstractMessageReader;
    var ResolvedMessageReaderOptions;
    (function(ResolvedMessageReaderOptions2) {
      function fromOptions(options) {
        let charset;
        let result;
        let contentDecoder;
        const contentDecoders = /* @__PURE__ */ new Map();
        let contentTypeDecoder;
        const contentTypeDecoders = /* @__PURE__ */ new Map();
        if (options === void 0 || typeof options === "string") {
          charset = options ?? "utf-8";
        } else {
          charset = options.charset ?? "utf-8";
          if (options.contentDecoder !== void 0) {
            contentDecoder = options.contentDecoder;
            contentDecoders.set(contentDecoder.name, contentDecoder);
          }
          if (options.contentDecoders !== void 0) {
            for (const decoder of options.contentDecoders) {
              contentDecoders.set(decoder.name, decoder);
            }
          }
          if (options.contentTypeDecoder !== void 0) {
            contentTypeDecoder = options.contentTypeDecoder;
            contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
          }
          if (options.contentTypeDecoders !== void 0) {
            for (const decoder of options.contentTypeDecoders) {
              contentTypeDecoders.set(decoder.name, decoder);
            }
          }
        }
        if (contentTypeDecoder === void 0) {
          contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder;
          contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
        }
        return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
      }
      ResolvedMessageReaderOptions2.fromOptions = fromOptions;
    })(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
    var ReadableStreamMessageReader = class extends AbstractMessageReader {
      constructor(readable, options) {
        super();
        this.readable = readable;
        this.options = ResolvedMessageReaderOptions.fromOptions(options);
        this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset);
        this._partialMessageTimeout = 1e4;
        this.nextMessageLength = -1;
        this.messageToken = 0;
        this.readSemaphore = new semaphore_1.Semaphore(1);
      }
      set partialMessageTimeout(timeout) {
        this._partialMessageTimeout = timeout;
      }
      get partialMessageTimeout() {
        return this._partialMessageTimeout;
      }
      listen(callback) {
        this.nextMessageLength = -1;
        this.messageToken = 0;
        this.partialMessageTimer = void 0;
        this.callback = callback;
        const result = this.readable.onData((data) => {
          this.onData(data);
        });
        this.readable.onError((error51) => this.fireError(error51));
        this.readable.onClose(() => this.fireClose());
        return result;
      }
      onData(data) {
        try {
          this.buffer.append(data);
          while (true) {
            if (this.nextMessageLength === -1) {
              const headers = this.buffer.tryReadHeaders(true);
              if (!headers) {
                return;
              }
              const contentLength = headers.get("content-length");
              if (!contentLength) {
                this.fireError(new Error(`Header must provide a Content-Length property.
${JSON.stringify(Object.fromEntries(headers))}`));
                return;
              }
              const length = parseInt(contentLength);
              if (isNaN(length)) {
                this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`));
                return;
              }
              this.nextMessageLength = length;
            }
            const body = this.buffer.tryReadBody(this.nextMessageLength);
            if (body === void 0) {
              this.setPartialMessageTimer();
              return;
            }
            this.clearPartialMessageTimer();
            this.nextMessageLength = -1;
            this.readSemaphore.lock(async () => {
              const bytes = this.options.contentDecoder !== void 0 ? await this.options.contentDecoder.decode(body) : body;
              const message = await this.options.contentTypeDecoder.decode(bytes, this.options);
              this.callback(message);
            }).catch((error51) => {
              this.fireError(error51);
            });
          }
        } catch (error51) {
          this.fireError(error51);
        }
      }
      clearPartialMessageTimer() {
        if (this.partialMessageTimer) {
          this.partialMessageTimer.dispose();
          this.partialMessageTimer = void 0;
        }
      }
      setPartialMessageTimer() {
        this.clearPartialMessageTimer();
        if (this._partialMessageTimeout <= 0) {
          return;
        }
        this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => {
          this.partialMessageTimer = void 0;
          if (token === this.messageToken) {
            this.firePartialMessage({ messageToken: token, waitingTime: timeout });
            this.setPartialMessageTimer();
          }
        }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
      }
    };
    exports2.ReadableStreamMessageReader = ReadableStreamMessageReader;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/messageWriter.js
var require_messageWriter = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.WriteableStreamMessageWriter = exports2.AbstractMessageWriter = exports2.MessageWriter = void 0;
    var ral_1 = require_ral();
    var Is = require_is2();
    var semaphore_1 = require_semaphore();
    var events_1 = require_events();
    var ContentLength = "Content-Length: ";
    var CRLF = "\r\n";
    var MessageWriter;
    (function(MessageWriter2) {
      function is(value) {
        let candidate = value;
        return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && Is.func(candidate.onError) && Is.func(candidate.write);
      }
      MessageWriter2.is = is;
    })(MessageWriter || (exports2.MessageWriter = MessageWriter = {}));
    var AbstractMessageWriter = class {
      constructor() {
        this.errorEmitter = new events_1.Emitter();
        this.closeEmitter = new events_1.Emitter();
      }
      dispose() {
        this.errorEmitter.dispose();
        this.closeEmitter.dispose();
      }
      get onError() {
        return this.errorEmitter.event;
      }
      fireError(error51, message, count) {
        this.errorEmitter.fire([this.asError(error51), message, count]);
      }
      get onClose() {
        return this.closeEmitter.event;
      }
      fireClose() {
        this.closeEmitter.fire(void 0);
      }
      asError(error51) {
        if (error51 instanceof Error) {
          return error51;
        } else {
          return new Error(`Writer received error. Reason: ${Is.string(error51.message) ? error51.message : "unknown"}`);
        }
      }
    };
    exports2.AbstractMessageWriter = AbstractMessageWriter;
    var ResolvedMessageWriterOptions;
    (function(ResolvedMessageWriterOptions2) {
      function fromOptions(options) {
        if (options === void 0 || typeof options === "string") {
          return { charset: options ?? "utf-8", contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder };
        } else {
          return { charset: options.charset ?? "utf-8", contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder };
        }
      }
      ResolvedMessageWriterOptions2.fromOptions = fromOptions;
    })(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
    var WriteableStreamMessageWriter = class extends AbstractMessageWriter {
      constructor(writable, options) {
        super();
        this.writable = writable;
        this.options = ResolvedMessageWriterOptions.fromOptions(options);
        this.errorCount = 0;
        this.writeSemaphore = new semaphore_1.Semaphore(1);
        this.writable.onError((error51) => this.fireError(error51));
        this.writable.onClose(() => this.fireClose());
      }
      async write(msg) {
        return this.writeSemaphore.lock(async () => {
          const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
            if (this.options.contentEncoder !== void 0) {
              return this.options.contentEncoder.encode(buffer);
            } else {
              return buffer;
            }
          });
          return payload.then((buffer) => {
            const headers = [];
            headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
            headers.push(CRLF);
            return this.doWrite(msg, headers, buffer);
          }, (error51) => {
            this.fireError(error51);
            throw error51;
          });
        });
      }
      async doWrite(msg, headers, data) {
        try {
          await this.writable.write(headers.join(""), "ascii");
          return this.writable.write(data);
        } catch (error51) {
          this.handleError(error51, msg);
          return Promise.reject(error51);
        }
      }
      handleError(error51, msg) {
        this.errorCount++;
        this.fireError(error51, msg, this.errorCount);
      }
      end() {
        this.writable.end();
      }
    };
    exports2.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js
var require_messageBuffer = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.AbstractMessageBuffer = void 0;
    var CR = 13;
    var LF = 10;
    var CRLF = "\r\n";
    var AbstractMessageBuffer = class {
      constructor(encoding = "utf-8") {
        this._encoding = encoding;
        this._chunks = [];
        this._totalLength = 0;
      }
      get encoding() {
        return this._encoding;
      }
      append(chunk) {
        const toAppend = typeof chunk === "string" ? this.fromString(chunk, this._encoding) : chunk;
        this._chunks.push(toAppend);
        this._totalLength += toAppend.byteLength;
      }
      tryReadHeaders(lowerCaseKeys = false) {
        if (this._chunks.length === 0) {
          return void 0;
        }
        let state = 0;
        let chunkIndex = 0;
        let offset = 0;
        let chunkBytesRead = 0;
        row: while (chunkIndex < this._chunks.length) {
          const chunk = this._chunks[chunkIndex];
          offset = 0;
          column: while (offset < chunk.length) {
            const value = chunk[offset];
            switch (value) {
              case CR:
                switch (state) {
                  case 0:
                    state = 1;
                    break;
                  case 2:
                    state = 3;
                    break;
                  default:
                    state = 0;
                }
                break;
              case LF:
                switch (state) {
                  case 1:
                    state = 2;
                    break;
                  case 3:
                    state = 4;
                    offset++;
                    break row;
                  default:
                    state = 0;
                }
                break;
              default:
                state = 0;
            }
            offset++;
          }
          chunkBytesRead += chunk.byteLength;
          chunkIndex++;
        }
        if (state !== 4) {
          return void 0;
        }
        const buffer = this._read(chunkBytesRead + offset);
        const result = /* @__PURE__ */ new Map();
        const headers = this.toString(buffer, "ascii").split(CRLF);
        if (headers.length < 2) {
          return result;
        }
        for (let i = 0; i < headers.length - 2; i++) {
          const header = headers[i];
          const index2 = header.indexOf(":");
          if (index2 === -1) {
            throw new Error(`Message header must separate key and value using ':'
${header}`);
          }
          const key = header.substr(0, index2);
          const value = header.substr(index2 + 1).trim();
          result.set(lowerCaseKeys ? key.toLowerCase() : key, value);
        }
        return result;
      }
      tryReadBody(length) {
        if (this._totalLength < length) {
          return void 0;
        }
        return this._read(length);
      }
      get numberOfBytes() {
        return this._totalLength;
      }
      _read(byteCount) {
        if (byteCount === 0) {
          return this.emptyBuffer();
        }
        if (byteCount > this._totalLength) {
          throw new Error(`Cannot read so many bytes!`);
        }
        if (this._chunks[0].byteLength === byteCount) {
          const chunk = this._chunks[0];
          this._chunks.shift();
          this._totalLength -= byteCount;
          return this.asNative(chunk);
        }
        if (this._chunks[0].byteLength > byteCount) {
          const chunk = this._chunks[0];
          const result2 = this.asNative(chunk, byteCount);
          this._chunks[0] = chunk.slice(byteCount);
          this._totalLength -= byteCount;
          return result2;
        }
        const result = this.allocNative(byteCount);
        let resultOffset = 0;
        let chunkIndex = 0;
        while (byteCount > 0) {
          const chunk = this._chunks[chunkIndex];
          if (chunk.byteLength > byteCount) {
            const chunkPart = chunk.slice(0, byteCount);
            result.set(chunkPart, resultOffset);
            resultOffset += byteCount;
            this._chunks[chunkIndex] = chunk.slice(byteCount);
            this._totalLength -= byteCount;
            byteCount -= byteCount;
          } else {
            result.set(chunk, resultOffset);
            resultOffset += chunk.byteLength;
            this._chunks.shift();
            this._totalLength -= chunk.byteLength;
            byteCount -= chunk.byteLength;
          }
        }
        return result;
      }
    };
    exports2.AbstractMessageBuffer = AbstractMessageBuffer;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/connection.js
var require_connection = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/connection.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createMessageConnection = exports2.ConnectionOptions = exports2.MessageStrategy = exports2.CancellationStrategy = exports2.CancellationSenderStrategy = exports2.CancellationReceiverStrategy = exports2.RequestCancellationReceiverStrategy = exports2.IdCancellationReceiverStrategy = exports2.ConnectionStrategy = exports2.ConnectionError = exports2.ConnectionErrors = exports2.LogTraceNotification = exports2.SetTraceNotification = exports2.TraceFormat = exports2.TraceValues = exports2.Trace = exports2.NullLogger = exports2.ProgressType = exports2.ProgressToken = void 0;
    var ral_1 = require_ral();
    var Is = require_is2();
    var messages_1 = require_messages();
    var linkedMap_1 = require_linkedMap();
    var events_1 = require_events();
    var cancellation_1 = require_cancellation();
    var CancelNotification;
    (function(CancelNotification2) {
      CancelNotification2.type = new messages_1.NotificationType("$/cancelRequest");
    })(CancelNotification || (CancelNotification = {}));
    var ProgressToken;
    (function(ProgressToken2) {
      function is(value) {
        return typeof value === "string" || typeof value === "number";
      }
      ProgressToken2.is = is;
    })(ProgressToken || (exports2.ProgressToken = ProgressToken = {}));
    var ProgressNotification;
    (function(ProgressNotification2) {
      ProgressNotification2.type = new messages_1.NotificationType("$/progress");
    })(ProgressNotification || (ProgressNotification = {}));
    var ProgressType = class {
      constructor() {
      }
    };
    exports2.ProgressType = ProgressType;
    var StarRequestHandler;
    (function(StarRequestHandler2) {
      function is(value) {
        return Is.func(value);
      }
      StarRequestHandler2.is = is;
    })(StarRequestHandler || (StarRequestHandler = {}));
    exports2.NullLogger = Object.freeze({
      error: () => {
      },
      warn: () => {
      },
      info: () => {
      },
      log: () => {
      }
    });
    var Trace;
    (function(Trace2) {
      Trace2[Trace2["Off"] = 0] = "Off";
      Trace2[Trace2["Messages"] = 1] = "Messages";
      Trace2[Trace2["Compact"] = 2] = "Compact";
      Trace2[Trace2["Verbose"] = 3] = "Verbose";
    })(Trace || (exports2.Trace = Trace = {}));
    var TraceValues;
    (function(TraceValues2) {
      TraceValues2.Off = "off";
      TraceValues2.Messages = "messages";
      TraceValues2.Compact = "compact";
      TraceValues2.Verbose = "verbose";
    })(TraceValues || (exports2.TraceValues = TraceValues = {}));
    (function(Trace2) {
      function fromString(value) {
        if (!Is.string(value)) {
          return Trace2.Off;
        }
        value = value.toLowerCase();
        switch (value) {
          case "off":
            return Trace2.Off;
          case "messages":
            return Trace2.Messages;
          case "compact":
            return Trace2.Compact;
          case "verbose":
            return Trace2.Verbose;
          default:
            return Trace2.Off;
        }
      }
      Trace2.fromString = fromString;
      function toString(value) {
        switch (value) {
          case Trace2.Off:
            return "off";
          case Trace2.Messages:
            return "messages";
          case Trace2.Compact:
            return "compact";
          case Trace2.Verbose:
            return "verbose";
          default:
            return "off";
        }
      }
      Trace2.toString = toString;
    })(Trace || (exports2.Trace = Trace = {}));
    var TraceFormat;
    (function(TraceFormat2) {
      TraceFormat2["Text"] = "text";
      TraceFormat2["JSON"] = "json";
    })(TraceFormat || (exports2.TraceFormat = TraceFormat = {}));
    (function(TraceFormat2) {
      function fromString(value) {
        if (!Is.string(value)) {
          return TraceFormat2.Text;
        }
        value = value.toLowerCase();
        if (value === "json") {
          return TraceFormat2.JSON;
        } else {
          return TraceFormat2.Text;
        }
      }
      TraceFormat2.fromString = fromString;
    })(TraceFormat || (exports2.TraceFormat = TraceFormat = {}));
    var SetTraceNotification;
    (function(SetTraceNotification2) {
      SetTraceNotification2.type = new messages_1.NotificationType("$/setTrace");
    })(SetTraceNotification || (exports2.SetTraceNotification = SetTraceNotification = {}));
    var LogTraceNotification;
    (function(LogTraceNotification2) {
      LogTraceNotification2.type = new messages_1.NotificationType("$/logTrace");
    })(LogTraceNotification || (exports2.LogTraceNotification = LogTraceNotification = {}));
    var ConnectionErrors;
    (function(ConnectionErrors2) {
      ConnectionErrors2[ConnectionErrors2["Closed"] = 1] = "Closed";
      ConnectionErrors2[ConnectionErrors2["Disposed"] = 2] = "Disposed";
      ConnectionErrors2[ConnectionErrors2["AlreadyListening"] = 3] = "AlreadyListening";
    })(ConnectionErrors || (exports2.ConnectionErrors = ConnectionErrors = {}));
    var ConnectionError = class _ConnectionError extends Error {
      constructor(code, message) {
        super(message);
        this.code = code;
        Object.setPrototypeOf(this, _ConnectionError.prototype);
      }
    };
    exports2.ConnectionError = ConnectionError;
    var ConnectionStrategy;
    (function(ConnectionStrategy2) {
      function is(value) {
        const candidate = value;
        return candidate && Is.func(candidate.cancelUndispatched);
      }
      ConnectionStrategy2.is = is;
    })(ConnectionStrategy || (exports2.ConnectionStrategy = ConnectionStrategy = {}));
    var IdCancellationReceiverStrategy;
    (function(IdCancellationReceiverStrategy2) {
      function is(value) {
        const candidate = value;
        return candidate && (candidate.kind === void 0 || candidate.kind === "id") && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === void 0 || Is.func(candidate.dispose));
      }
      IdCancellationReceiverStrategy2.is = is;
    })(IdCancellationReceiverStrategy || (exports2.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {}));
    var RequestCancellationReceiverStrategy;
    (function(RequestCancellationReceiverStrategy2) {
      function is(value) {
        const candidate = value;
        return candidate && candidate.kind === "request" && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === void 0 || Is.func(candidate.dispose));
      }
      RequestCancellationReceiverStrategy2.is = is;
    })(RequestCancellationReceiverStrategy || (exports2.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {}));
    var CancellationReceiverStrategy;
    (function(CancellationReceiverStrategy2) {
      CancellationReceiverStrategy2.Message = Object.freeze({
        createCancellationTokenSource(_) {
          return new cancellation_1.CancellationTokenSource();
        }
      });
      function is(value) {
        return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value);
      }
      CancellationReceiverStrategy2.is = is;
    })(CancellationReceiverStrategy || (exports2.CancellationReceiverStrategy = CancellationReceiverStrategy = {}));
    var CancellationSenderStrategy;
    (function(CancellationSenderStrategy2) {
      CancellationSenderStrategy2.Message = Object.freeze({
        sendCancellation(conn, id) {
          return conn.sendNotification(CancelNotification.type, { id });
        },
        cleanup(_) {
        }
      });
      function is(value) {
        const candidate = value;
        return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
      }
      CancellationSenderStrategy2.is = is;
    })(CancellationSenderStrategy || (exports2.CancellationSenderStrategy = CancellationSenderStrategy = {}));
    var CancellationStrategy;
    (function(CancellationStrategy2) {
      CancellationStrategy2.Message = Object.freeze({
        receiver: CancellationReceiverStrategy.Message,
        sender: CancellationSenderStrategy.Message
      });
      function is(value) {
        const candidate = value;
        return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
      }
      CancellationStrategy2.is = is;
    })(CancellationStrategy || (exports2.CancellationStrategy = CancellationStrategy = {}));
    var MessageStrategy;
    (function(MessageStrategy2) {
      function is(value) {
        const candidate = value;
        return candidate && Is.func(candidate.handleMessage);
      }
      MessageStrategy2.is = is;
    })(MessageStrategy || (exports2.MessageStrategy = MessageStrategy = {}));
    var ConnectionOptions;
    (function(ConnectionOptions2) {
      function is(value) {
        const candidate = value;
        return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy));
      }
      ConnectionOptions2.is = is;
    })(ConnectionOptions || (exports2.ConnectionOptions = ConnectionOptions = {}));
    var ConnectionState;
    (function(ConnectionState2) {
      ConnectionState2[ConnectionState2["New"] = 1] = "New";
      ConnectionState2[ConnectionState2["Listening"] = 2] = "Listening";
      ConnectionState2[ConnectionState2["Closed"] = 3] = "Closed";
      ConnectionState2[ConnectionState2["Disposed"] = 4] = "Disposed";
    })(ConnectionState || (ConnectionState = {}));
    function createMessageConnection(messageReader, messageWriter, _logger, options) {
      const logger = _logger !== void 0 ? _logger : exports2.NullLogger;
      let sequenceNumber = 0;
      let notificationSequenceNumber = 0;
      let unknownResponseSequenceNumber = 0;
      const version2 = "2.0";
      let starRequestHandler = void 0;
      const requestHandlers = /* @__PURE__ */ new Map();
      let starNotificationHandler = void 0;
      const notificationHandlers = /* @__PURE__ */ new Map();
      const progressHandlers = /* @__PURE__ */ new Map();
      let timer;
      let messageQueue = new linkedMap_1.LinkedMap();
      let responsePromises = /* @__PURE__ */ new Map();
      let knownCanceledRequests = /* @__PURE__ */ new Set();
      let requestTokens = /* @__PURE__ */ new Map();
      let trace = Trace.Off;
      let traceFormat = TraceFormat.Text;
      let tracer;
      let state = ConnectionState.New;
      const errorEmitter = new events_1.Emitter();
      const closeEmitter = new events_1.Emitter();
      const unhandledNotificationEmitter = new events_1.Emitter();
      const unhandledProgressEmitter = new events_1.Emitter();
      const disposeEmitter = new events_1.Emitter();
      const cancellationStrategy = options && options.cancellationStrategy ? options.cancellationStrategy : CancellationStrategy.Message;
      function createRequestQueueKey(id) {
        if (id === null) {
          throw new Error(`Can't send requests with id null since the response can't be correlated.`);
        }
        return "req-" + id.toString();
      }
      function createResponseQueueKey(id) {
        if (id === null) {
          return "res-unknown-" + (++unknownResponseSequenceNumber).toString();
        } else {
          return "res-" + id.toString();
        }
      }
      function createNotificationQueueKey() {
        return "not-" + (++notificationSequenceNumber).toString();
      }
      function addMessageToQueue(queue, message) {
        if (messages_1.Message.isRequest(message)) {
          queue.set(createRequestQueueKey(message.id), message);
        } else if (messages_1.Message.isResponse(message)) {
          queue.set(createResponseQueueKey(message.id), message);
        } else {
          queue.set(createNotificationQueueKey(), message);
        }
      }
      function cancelUndispatched(_message) {
        return void 0;
      }
      function isListening() {
        return state === ConnectionState.Listening;
      }
      function isClosed() {
        return state === ConnectionState.Closed;
      }
      function isDisposed() {
        return state === ConnectionState.Disposed;
      }
      function closeHandler() {
        if (state === ConnectionState.New || state === ConnectionState.Listening) {
          state = ConnectionState.Closed;
          closeEmitter.fire(void 0);
        }
      }
      function readErrorHandler(error51) {
        errorEmitter.fire([error51, void 0, void 0]);
      }
      function writeErrorHandler(data) {
        errorEmitter.fire(data);
      }
      messageReader.onClose(closeHandler);
      messageReader.onError(readErrorHandler);
      messageWriter.onClose(closeHandler);
      messageWriter.onError(writeErrorHandler);
      function triggerMessageQueue() {
        if (timer || messageQueue.size === 0) {
          return;
        }
        timer = (0, ral_1.default)().timer.setImmediate(() => {
          timer = void 0;
          processMessageQueue();
        });
      }
      function handleMessage(message) {
        if (messages_1.Message.isRequest(message)) {
          handleRequest(message);
        } else if (messages_1.Message.isNotification(message)) {
          handleNotification(message);
        } else if (messages_1.Message.isResponse(message)) {
          handleResponse(message);
        } else {
          handleInvalidMessage(message);
        }
      }
      function processMessageQueue() {
        if (messageQueue.size === 0) {
          return;
        }
        const message = messageQueue.shift();
        try {
          const messageStrategy = options?.messageStrategy;
          if (MessageStrategy.is(messageStrategy)) {
            messageStrategy.handleMessage(message, handleMessage);
          } else {
            handleMessage(message);
          }
        } finally {
          triggerMessageQueue();
        }
      }
      const callback = (message) => {
        try {
          if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) {
            const cancelId = message.params.id;
            const key = createRequestQueueKey(cancelId);
            const toCancel = messageQueue.get(key);
            if (messages_1.Message.isRequest(toCancel)) {
              const strategy = options?.connectionStrategy;
              const response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
              if (response && (response.error !== void 0 || response.result !== void 0)) {
                messageQueue.delete(key);
                requestTokens.delete(cancelId);
                response.id = toCancel.id;
                traceSendingResponse(response, message.method, Date.now());
                messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`));
                return;
              }
            }
            const cancellationToken = requestTokens.get(cancelId);
            if (cancellationToken !== void 0) {
              cancellationToken.cancel();
              traceReceivedNotification(message);
              return;
            } else {
              knownCanceledRequests.add(cancelId);
            }
          }
          addMessageToQueue(messageQueue, message);
        } finally {
          triggerMessageQueue();
        }
      };
      function handleRequest(requestMessage) {
        if (isDisposed()) {
          return;
        }
        function reply(resultOrError, method, startTime2) {
          const message = {
            jsonrpc: version2,
            id: requestMessage.id
          };
          if (resultOrError instanceof messages_1.ResponseError) {
            message.error = resultOrError.toJson();
          } else {
            message.result = resultOrError === void 0 ? null : resultOrError;
          }
          traceSendingResponse(message, method, startTime2);
          messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
        }
        function replyError(error51, method, startTime2) {
          const message = {
            jsonrpc: version2,
            id: requestMessage.id,
            error: error51.toJson()
          };
          traceSendingResponse(message, method, startTime2);
          messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
        }
        function replySuccess(result, method, startTime2) {
          if (result === void 0) {
            result = null;
          }
          const message = {
            jsonrpc: version2,
            id: requestMessage.id,
            result
          };
          traceSendingResponse(message, method, startTime2);
          messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));
        }
        traceReceivedRequest(requestMessage);
        const element = requestHandlers.get(requestMessage.method);
        let type;
        let requestHandler;
        if (element) {
          type = element.type;
          requestHandler = element.handler;
        }
        const startTime = Date.now();
        if (requestHandler || starRequestHandler) {
          const tokenKey = requestMessage.id ?? String(Date.now());
          const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage);
          if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) {
            cancellationSource.cancel();
          }
          if (requestMessage.id !== null) {
            requestTokens.set(tokenKey, cancellationSource);
          }
          try {
            let handlerResult;
            if (requestHandler) {
              if (requestMessage.params === void 0) {
                if (type !== void 0 && type.numberOfParams !== 0) {
                  replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime);
                  return;
                }
                handlerResult = requestHandler(cancellationSource.token);
              } else if (Array.isArray(requestMessage.params)) {
                if (type !== void 0 && type.parameterStructures === messages_1.ParameterStructures.byName) {
                  replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime);
                  return;
                }
                handlerResult = requestHandler(...requestMessage.params, cancellationSource.token);
              } else {
                if (type !== void 0 && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
                  replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime);
                  return;
                }
                handlerResult = requestHandler(requestMessage.params, cancellationSource.token);
              }
            } else if (starRequestHandler) {
              handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
            }
            const promise2 = handlerResult;
            if (!handlerResult) {
              requestTokens.delete(tokenKey);
              replySuccess(handlerResult, requestMessage.method, startTime);
            } else if (promise2.then) {
              promise2.then((resultOrError) => {
                requestTokens.delete(tokenKey);
                reply(resultOrError, requestMessage.method, startTime);
              }, (error51) => {
                requestTokens.delete(tokenKey);
                if (error51 instanceof messages_1.ResponseError) {
                  replyError(error51, requestMessage.method, startTime);
                } else if (error51 && Is.string(error51.message)) {
                  replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error51.message}`), requestMessage.method, startTime);
                } else {
                  replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
                }
              });
            } else {
              requestTokens.delete(tokenKey);
              reply(handlerResult, requestMessage.method, startTime);
            }
          } catch (error51) {
            requestTokens.delete(tokenKey);
            if (error51 instanceof messages_1.ResponseError) {
              reply(error51, requestMessage.method, startTime);
            } else if (error51 && Is.string(error51.message)) {
              replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error51.message}`), requestMessage.method, startTime);
            } else {
              replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
            }
          }
        } else {
          replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
        }
      }
      function handleResponse(responseMessage) {
        if (isDisposed()) {
          return;
        }
        if (responseMessage.id === null) {
          if (responseMessage.error) {
            logger.error(`Received response message without id: Error is: 
${JSON.stringify(responseMessage.error, void 0, 4)}`);
          } else {
            logger.error(`Received response message without id. No further error information provided.`);
          }
        } else {
          const key = responseMessage.id;
          const responsePromise = responsePromises.get(key);
          traceReceivedResponse(responseMessage, responsePromise);
          if (responsePromise !== void 0) {
            responsePromises.delete(key);
            try {
              if (responseMessage.error) {
                const error51 = responseMessage.error;
                responsePromise.reject(new messages_1.ResponseError(error51.code, error51.message, error51.data));
              } else if (responseMessage.result !== void 0) {
                responsePromise.resolve(responseMessage.result);
              } else {
                throw new Error("Should never happen.");
              }
            } catch (error51) {
              if (error51.message) {
                logger.error(`Response handler '${responsePromise.method}' failed with message: ${error51.message}`);
              } else {
                logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
              }
            }
          }
        }
      }
      function handleNotification(message) {
        if (isDisposed()) {
          return;
        }
        let type = void 0;
        let notificationHandler;
        if (message.method === CancelNotification.type.method) {
          const cancelId = message.params.id;
          knownCanceledRequests.delete(cancelId);
          traceReceivedNotification(message);
          return;
        } else {
          const element = notificationHandlers.get(message.method);
          if (element) {
            notificationHandler = element.handler;
            type = element.type;
          }
        }
        if (notificationHandler || starNotificationHandler) {
          try {
            traceReceivedNotification(message);
            if (notificationHandler) {
              if (message.params === void 0) {
                if (type !== void 0) {
                  if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) {
                    logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`);
                  }
                }
                notificationHandler();
              } else if (Array.isArray(message.params)) {
                const params = message.params;
                if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) {
                  notificationHandler({ token: params[0], value: params[1] });
                } else {
                  if (type !== void 0) {
                    if (type.parameterStructures === messages_1.ParameterStructures.byName) {
                      logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`);
                    }
                    if (type.numberOfParams !== message.params.length) {
                      logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`);
                    }
                  }
                  notificationHandler(...params);
                }
              } else {
                if (type !== void 0 && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
                  logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`);
                }
                notificationHandler(message.params);
              }
            } else if (starNotificationHandler) {
              starNotificationHandler(message.method, message.params);
            }
          } catch (error51) {
            if (error51.message) {
              logger.error(`Notification handler '${message.method}' failed with message: ${error51.message}`);
            } else {
              logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
            }
          }
        } else {
          unhandledNotificationEmitter.fire(message);
        }
      }
      function handleInvalidMessage(message) {
        if (!message) {
          logger.error("Received empty message.");
          return;
        }
        logger.error(`Received message which is neither a response nor a notification message:
${JSON.stringify(message, null, 4)}`);
        const responseMessage = message;
        if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
          const key = responseMessage.id;
          const responseHandler = responsePromises.get(key);
          if (responseHandler) {
            responseHandler.reject(new Error("The received response has neither a result nor an error property."));
          }
        }
      }
      function stringifyTrace(params) {
        if (params === void 0 || params === null) {
          return void 0;
        }
        switch (trace) {
          case Trace.Verbose:
            return JSON.stringify(params, null, 4);
          case Trace.Compact:
            return JSON.stringify(params);
          default:
            return void 0;
        }
      }
      function traceSendingRequest(message) {
        if (trace === Trace.Off || !tracer) {
          return;
        }
        if (traceFormat === TraceFormat.Text) {
          let data = void 0;
          if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {
            data = `Params: ${stringifyTrace(message.params)}

`;
          }
          tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
        } else {
          logLSPMessage("send-request", message);
        }
      }
      function traceSendingNotification(message) {
        if (trace === Trace.Off || !tracer) {
          return;
        }
        if (traceFormat === TraceFormat.Text) {
          let data = void 0;
          if (trace === Trace.Verbose || trace === Trace.Compact) {
            if (message.params) {
              data = `Params: ${stringifyTrace(message.params)}

`;
            } else {
              data = "No parameters provided.\n\n";
            }
          }
          tracer.log(`Sending notification '${message.method}'.`, data);
        } else {
          logLSPMessage("send-notification", message);
        }
      }
      function traceSendingResponse(message, method, startTime) {
        if (trace === Trace.Off || !tracer) {
          return;
        }
        if (traceFormat === TraceFormat.Text) {
          let data = void 0;
          if (trace === Trace.Verbose || trace === Trace.Compact) {
            if (message.error && message.error.data) {
              data = `Error data: ${stringifyTrace(message.error.data)}

`;
            } else {
              if (message.result) {
                data = `Result: ${stringifyTrace(message.result)}

`;
              } else if (message.error === void 0) {
                data = "No result returned.\n\n";
              }
            }
          }
          tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
        } else {
          logLSPMessage("send-response", message);
        }
      }
      function traceReceivedRequest(message) {
        if (trace === Trace.Off || !tracer) {
          return;
        }
        if (traceFormat === TraceFormat.Text) {
          let data = void 0;
          if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {
            data = `Params: ${stringifyTrace(message.params)}

`;
          }
          tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
        } else {
          logLSPMessage("receive-request", message);
        }
      }
      function traceReceivedNotification(message) {
        if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
          return;
        }
        if (traceFormat === TraceFormat.Text) {
          let data = void 0;
          if (trace === Trace.Verbose || trace === Trace.Compact) {
            if (message.params) {
              data = `Params: ${stringifyTrace(message.params)}

`;
            } else {
              data = "No parameters provided.\n\n";
            }
          }
          tracer.log(`Received notification '${message.method}'.`, data);
        } else {
          logLSPMessage("receive-notification", message);
        }
      }
      function traceReceivedResponse(message, responsePromise) {
        if (trace === Trace.Off || !tracer) {
          return;
        }
        if (traceFormat === TraceFormat.Text) {
          let data = void 0;
          if (trace === Trace.Verbose || trace === Trace.Compact) {
            if (message.error && message.error.data) {
              data = `Error data: ${stringifyTrace(message.error.data)}

`;
            } else {
              if (message.result) {
                data = `Result: ${stringifyTrace(message.result)}

`;
              } else if (message.error === void 0) {
                data = "No result returned.\n\n";
              }
            }
          }
          if (responsePromise) {
            const error51 = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : "";
            tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error51}`, data);
          } else {
            tracer.log(`Received response ${message.id} without active response promise.`, data);
          }
        } else {
          logLSPMessage("receive-response", message);
        }
      }
      function logLSPMessage(type, message) {
        if (!tracer || trace === Trace.Off) {
          return;
        }
        const lspMessage = {
          isLSPMessage: true,
          type,
          message,
          timestamp: Date.now()
        };
        tracer.log(lspMessage);
      }
      function throwIfClosedOrDisposed() {
        if (isClosed()) {
          throw new ConnectionError(ConnectionErrors.Closed, "Connection is closed.");
        }
        if (isDisposed()) {
          throw new ConnectionError(ConnectionErrors.Disposed, "Connection is disposed.");
        }
      }
      function throwIfListening() {
        if (isListening()) {
          throw new ConnectionError(ConnectionErrors.AlreadyListening, "Connection is already listening");
        }
      }
      function throwIfNotListening() {
        if (!isListening()) {
          throw new Error("Call listen() first.");
        }
      }
      function undefinedToNull(param) {
        if (param === void 0) {
          return null;
        } else {
          return param;
        }
      }
      function nullToUndefined(param) {
        if (param === null) {
          return void 0;
        } else {
          return param;
        }
      }
      function isNamedParam(param) {
        return param !== void 0 && param !== null && !Array.isArray(param) && typeof param === "object";
      }
      function computeSingleParam(parameterStructures, param) {
        switch (parameterStructures) {
          case messages_1.ParameterStructures.auto:
            if (isNamedParam(param)) {
              return nullToUndefined(param);
            } else {
              return [undefinedToNull(param)];
            }
          case messages_1.ParameterStructures.byName:
            if (!isNamedParam(param)) {
              throw new Error(`Received parameters by name but param is not an object literal.`);
            }
            return nullToUndefined(param);
          case messages_1.ParameterStructures.byPosition:
            return [undefinedToNull(param)];
          default:
            throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`);
        }
      }
      function computeMessageParams(type, params) {
        let result;
        const numberOfParams = type.numberOfParams;
        switch (numberOfParams) {
          case 0:
            result = void 0;
            break;
          case 1:
            result = computeSingleParam(type.parameterStructures, params[0]);
            break;
          default:
            result = [];
            for (let i = 0; i < params.length && i < numberOfParams; i++) {
              result.push(undefinedToNull(params[i]));
            }
            if (params.length < numberOfParams) {
              for (let i = params.length; i < numberOfParams; i++) {
                result.push(null);
              }
            }
            break;
        }
        return result;
      }
      const connection = {
        sendNotification: (type, ...args) => {
          throwIfClosedOrDisposed();
          let method;
          let messageParams;
          if (Is.string(type)) {
            method = type;
            const first = args[0];
            let paramStart = 0;
            let parameterStructures = messages_1.ParameterStructures.auto;
            if (messages_1.ParameterStructures.is(first)) {
              paramStart = 1;
              parameterStructures = first;
            }
            let paramEnd = args.length;
            const numberOfParams = paramEnd - paramStart;
            switch (numberOfParams) {
              case 0:
                messageParams = void 0;
                break;
              case 1:
                messageParams = computeSingleParam(parameterStructures, args[paramStart]);
                break;
              default:
                if (parameterStructures === messages_1.ParameterStructures.byName) {
                  throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`);
                }
                messageParams = args.slice(paramStart, paramEnd).map((value) => undefinedToNull(value));
                break;
            }
          } else {
            const params = args;
            method = type.method;
            messageParams = computeMessageParams(type, params);
          }
          const notificationMessage = {
            jsonrpc: version2,
            method,
            params: messageParams
          };
          traceSendingNotification(notificationMessage);
          return messageWriter.write(notificationMessage).catch((error51) => {
            logger.error(`Sending notification failed.`);
            throw error51;
          });
        },
        onNotification: (type, handler) => {
          throwIfClosedOrDisposed();
          let method;
          if (Is.func(type)) {
            starNotificationHandler = type;
          } else if (handler) {
            if (Is.string(type)) {
              method = type;
              notificationHandlers.set(type, { type: void 0, handler });
            } else {
              method = type.method;
              notificationHandlers.set(type.method, { type, handler });
            }
          }
          return {
            dispose: () => {
              if (method !== void 0) {
                notificationHandlers.delete(method);
              } else {
                starNotificationHandler = void 0;
              }
            }
          };
        },
        onProgress: (_type, token, handler) => {
          if (progressHandlers.has(token)) {
            throw new Error(`Progress handler for token ${token} already registered`);
          }
          progressHandlers.set(token, handler);
          return {
            dispose: () => {
              progressHandlers.delete(token);
            }
          };
        },
        sendProgress: (_type, token, value) => {
          return connection.sendNotification(ProgressNotification.type, { token, value });
        },
        onUnhandledProgress: unhandledProgressEmitter.event,
        sendRequest: (type, ...args) => {
          throwIfClosedOrDisposed();
          throwIfNotListening();
          let method;
          let messageParams;
          let token = void 0;
          if (Is.string(type)) {
            method = type;
            const first = args[0];
            const last = args[args.length - 1];
            let paramStart = 0;
            let parameterStructures = messages_1.ParameterStructures.auto;
            if (messages_1.ParameterStructures.is(first)) {
              paramStart = 1;
              parameterStructures = first;
            }
            let paramEnd = args.length;
            if (cancellation_1.CancellationToken.is(last)) {
              paramEnd = paramEnd - 1;
              token = last;
            }
            const numberOfParams = paramEnd - paramStart;
            switch (numberOfParams) {
              case 0:
                messageParams = void 0;
                break;
              case 1:
                messageParams = computeSingleParam(parameterStructures, args[paramStart]);
                break;
              default:
                if (parameterStructures === messages_1.ParameterStructures.byName) {
                  throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`);
                }
                messageParams = args.slice(paramStart, paramEnd).map((value) => undefinedToNull(value));
                break;
            }
          } else {
            const params = args;
            method = type.method;
            messageParams = computeMessageParams(type, params);
            const numberOfParams = type.numberOfParams;
            token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : void 0;
          }
          const id = sequenceNumber++;
          let disposable;
          if (token) {
            disposable = token.onCancellationRequested(() => {
              const p = cancellationStrategy.sender.sendCancellation(connection, id);
              if (p === void 0) {
                logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`);
                return Promise.resolve();
              } else {
                return p.catch(() => {
                  logger.log(`Sending cancellation messages for id ${id} failed`);
                });
              }
            });
          }
          const requestMessage = {
            jsonrpc: version2,
            id,
            method,
            params: messageParams
          };
          traceSendingRequest(requestMessage);
          if (typeof cancellationStrategy.sender.enableCancellation === "function") {
            cancellationStrategy.sender.enableCancellation(requestMessage);
          }
          return new Promise(async (resolve, reject) => {
            const resolveWithCleanup = (r) => {
              resolve(r);
              cancellationStrategy.sender.cleanup(id);
              disposable?.dispose();
            };
            const rejectWithCleanup = (r) => {
              reject(r);
              cancellationStrategy.sender.cleanup(id);
              disposable?.dispose();
            };
            const responsePromise = { method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
            try {
              await messageWriter.write(requestMessage);
              responsePromises.set(id, responsePromise);
            } catch (error51) {
              logger.error(`Sending request failed.`);
              responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error51.message ? error51.message : "Unknown reason"));
              throw error51;
            }
          });
        },
        onRequest: (type, handler) => {
          throwIfClosedOrDisposed();
          let method = null;
          if (StarRequestHandler.is(type)) {
            method = void 0;
            starRequestHandler = type;
          } else if (Is.string(type)) {
            method = null;
            if (handler !== void 0) {
              method = type;
              requestHandlers.set(type, { handler, type: void 0 });
            }
          } else {
            if (handler !== void 0) {
              method = type.method;
              requestHandlers.set(type.method, { type, handler });
            }
          }
          return {
            dispose: () => {
              if (method === null) {
                return;
              }
              if (method !== void 0) {
                requestHandlers.delete(method);
              } else {
                starRequestHandler = void 0;
              }
            }
          };
        },
        hasPendingResponse: () => {
          return responsePromises.size > 0;
        },
        trace: async (_value, _tracer, sendNotificationOrTraceOptions) => {
          let _sendNotification = false;
          let _traceFormat = TraceFormat.Text;
          if (sendNotificationOrTraceOptions !== void 0) {
            if (Is.boolean(sendNotificationOrTraceOptions)) {
              _sendNotification = sendNotificationOrTraceOptions;
            } else {
              _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
              _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
            }
          }
          trace = _value;
          traceFormat = _traceFormat;
          if (trace === Trace.Off) {
            tracer = void 0;
          } else {
            tracer = _tracer;
          }
          if (_sendNotification && !isClosed() && !isDisposed()) {
            await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
          }
        },
        onError: errorEmitter.event,
        onClose: closeEmitter.event,
        onUnhandledNotification: unhandledNotificationEmitter.event,
        onDispose: disposeEmitter.event,
        end: () => {
          messageWriter.end();
        },
        dispose: () => {
          if (isDisposed()) {
            return;
          }
          state = ConnectionState.Disposed;
          disposeEmitter.fire(void 0);
          const error51 = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, "Pending response rejected since connection got disposed");
          for (const promise2 of responsePromises.values()) {
            promise2.reject(error51);
          }
          responsePromises = /* @__PURE__ */ new Map();
          requestTokens = /* @__PURE__ */ new Map();
          knownCanceledRequests = /* @__PURE__ */ new Set();
          messageQueue = new linkedMap_1.LinkedMap();
          if (Is.func(messageWriter.dispose)) {
            messageWriter.dispose();
          }
          if (Is.func(messageReader.dispose)) {
            messageReader.dispose();
          }
        },
        listen: () => {
          throwIfClosedOrDisposed();
          throwIfListening();
          state = ConnectionState.Listening;
          messageReader.listen(callback);
        },
        inspect: () => {
          (0, ral_1.default)().console.log("inspect");
        }
      };
      connection.onNotification(LogTraceNotification.type, (params) => {
        if (trace === Trace.Off || !tracer) {
          return;
        }
        const verbose = trace === Trace.Verbose || trace === Trace.Compact;
        tracer.log(params.message, verbose ? params.verbose : void 0);
      });
      connection.onNotification(ProgressNotification.type, (params) => {
        const handler = progressHandlers.get(params.token);
        if (handler) {
          handler(params.value);
        } else {
          unhandledProgressEmitter.fire(params);
        }
      });
      return connection;
    }
    exports2.createMessageConnection = createMessageConnection;
  }
});

// server/node_modules/vscode-jsonrpc/lib/common/api.js
var require_api = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/common/api.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ProgressType = exports2.ProgressToken = exports2.createMessageConnection = exports2.NullLogger = exports2.ConnectionOptions = exports2.ConnectionStrategy = exports2.AbstractMessageBuffer = exports2.WriteableStreamMessageWriter = exports2.AbstractMessageWriter = exports2.MessageWriter = exports2.ReadableStreamMessageReader = exports2.AbstractMessageReader = exports2.MessageReader = exports2.SharedArrayReceiverStrategy = exports2.SharedArraySenderStrategy = exports2.CancellationToken = exports2.CancellationTokenSource = exports2.Emitter = exports2.Event = exports2.Disposable = exports2.LRUCache = exports2.Touch = exports2.LinkedMap = exports2.ParameterStructures = exports2.NotificationType9 = exports2.NotificationType8 = exports2.NotificationType7 = exports2.NotificationType6 = exports2.NotificationType5 = exports2.NotificationType4 = exports2.NotificationType3 = exports2.NotificationType2 = exports2.NotificationType1 = exports2.NotificationType0 = exports2.NotificationType = exports2.ErrorCodes = exports2.ResponseError = exports2.RequestType9 = exports2.RequestType8 = exports2.RequestType7 = exports2.RequestType6 = exports2.RequestType5 = exports2.RequestType4 = exports2.RequestType3 = exports2.RequestType2 = exports2.RequestType1 = exports2.RequestType0 = exports2.RequestType = exports2.Message = exports2.RAL = void 0;
    exports2.MessageStrategy = exports2.CancellationStrategy = exports2.CancellationSenderStrategy = exports2.CancellationReceiverStrategy = exports2.ConnectionError = exports2.ConnectionErrors = exports2.LogTraceNotification = exports2.SetTraceNotification = exports2.TraceFormat = exports2.TraceValues = exports2.Trace = void 0;
    var messages_1 = require_messages();
    Object.defineProperty(exports2, "Message", { enumerable: true, get: function() {
      return messages_1.Message;
    } });
    Object.defineProperty(exports2, "RequestType", { enumerable: true, get: function() {
      return messages_1.RequestType;
    } });
    Object.defineProperty(exports2, "RequestType0", { enumerable: true, get: function() {
      return messages_1.RequestType0;
    } });
    Object.defineProperty(exports2, "RequestType1", { enumerable: true, get: function() {
      return messages_1.RequestType1;
    } });
    Object.defineProperty(exports2, "RequestType2", { enumerable: true, get: function() {
      return messages_1.RequestType2;
    } });
    Object.defineProperty(exports2, "RequestType3", { enumerable: true, get: function() {
      return messages_1.RequestType3;
    } });
    Object.defineProperty(exports2, "RequestType4", { enumerable: true, get: function() {
      return messages_1.RequestType4;
    } });
    Object.defineProperty(exports2, "RequestType5", { enumerable: true, get: function() {
      return messages_1.RequestType5;
    } });
    Object.defineProperty(exports2, "RequestType6", { enumerable: true, get: function() {
      return messages_1.RequestType6;
    } });
    Object.defineProperty(exports2, "RequestType7", { enumerable: true, get: function() {
      return messages_1.RequestType7;
    } });
    Object.defineProperty(exports2, "RequestType8", { enumerable: true, get: function() {
      return messages_1.RequestType8;
    } });
    Object.defineProperty(exports2, "RequestType9", { enumerable: true, get: function() {
      return messages_1.RequestType9;
    } });
    Object.defineProperty(exports2, "ResponseError", { enumerable: true, get: function() {
      return messages_1.ResponseError;
    } });
    Object.defineProperty(exports2, "ErrorCodes", { enumerable: true, get: function() {
      return messages_1.ErrorCodes;
    } });
    Object.defineProperty(exports2, "NotificationType", { enumerable: true, get: function() {
      return messages_1.NotificationType;
    } });
    Object.defineProperty(exports2, "NotificationType0", { enumerable: true, get: function() {
      return messages_1.NotificationType0;
    } });
    Object.defineProperty(exports2, "NotificationType1", { enumerable: true, get: function() {
      return messages_1.NotificationType1;
    } });
    Object.defineProperty(exports2, "NotificationType2", { enumerable: true, get: function() {
      return messages_1.NotificationType2;
    } });
    Object.defineProperty(exports2, "NotificationType3", { enumerable: true, get: function() {
      return messages_1.NotificationType3;
    } });
    Object.defineProperty(exports2, "NotificationType4", { enumerable: true, get: function() {
      return messages_1.NotificationType4;
    } });
    Object.defineProperty(exports2, "NotificationType5", { enumerable: true, get: function() {
      return messages_1.NotificationType5;
    } });
    Object.defineProperty(exports2, "NotificationType6", { enumerable: true, get: function() {
      return messages_1.NotificationType6;
    } });
    Object.defineProperty(exports2, "NotificationType7", { enumerable: true, get: function() {
      return messages_1.NotificationType7;
    } });
    Object.defineProperty(exports2, "NotificationType8", { enumerable: true, get: function() {
      return messages_1.NotificationType8;
    } });
    Object.defineProperty(exports2, "NotificationType9", { enumerable: true, get: function() {
      return messages_1.NotificationType9;
    } });
    Object.defineProperty(exports2, "ParameterStructures", { enumerable: true, get: function() {
      return messages_1.ParameterStructures;
    } });
    var linkedMap_1 = require_linkedMap();
    Object.defineProperty(exports2, "LinkedMap", { enumerable: true, get: function() {
      return linkedMap_1.LinkedMap;
    } });
    Object.defineProperty(exports2, "LRUCache", { enumerable: true, get: function() {
      return linkedMap_1.LRUCache;
    } });
    Object.defineProperty(exports2, "Touch", { enumerable: true, get: function() {
      return linkedMap_1.Touch;
    } });
    var disposable_1 = require_disposable();
    Object.defineProperty(exports2, "Disposable", { enumerable: true, get: function() {
      return disposable_1.Disposable;
    } });
    var events_1 = require_events();
    Object.defineProperty(exports2, "Event", { enumerable: true, get: function() {
      return events_1.Event;
    } });
    Object.defineProperty(exports2, "Emitter", { enumerable: true, get: function() {
      return events_1.Emitter;
    } });
    var cancellation_1 = require_cancellation();
    Object.defineProperty(exports2, "CancellationTokenSource", { enumerable: true, get: function() {
      return cancellation_1.CancellationTokenSource;
    } });
    Object.defineProperty(exports2, "CancellationToken", { enumerable: true, get: function() {
      return cancellation_1.CancellationToken;
    } });
    var sharedArrayCancellation_1 = require_sharedArrayCancellation();
    Object.defineProperty(exports2, "SharedArraySenderStrategy", { enumerable: true, get: function() {
      return sharedArrayCancellation_1.SharedArraySenderStrategy;
    } });
    Object.defineProperty(exports2, "SharedArrayReceiverStrategy", { enumerable: true, get: function() {
      return sharedArrayCancellation_1.SharedArrayReceiverStrategy;
    } });
    var messageReader_1 = require_messageReader();
    Object.defineProperty(exports2, "MessageReader", { enumerable: true, get: function() {
      return messageReader_1.MessageReader;
    } });
    Object.defineProperty(exports2, "AbstractMessageReader", { enumerable: true, get: function() {
      return messageReader_1.AbstractMessageReader;
    } });
    Object.defineProperty(exports2, "ReadableStreamMessageReader", { enumerable: true, get: function() {
      return messageReader_1.ReadableStreamMessageReader;
    } });
    var messageWriter_1 = require_messageWriter();
    Object.defineProperty(exports2, "MessageWriter", { enumerable: true, get: function() {
      return messageWriter_1.MessageWriter;
    } });
    Object.defineProperty(exports2, "AbstractMessageWriter", { enumerable: true, get: function() {
      return messageWriter_1.AbstractMessageWriter;
    } });
    Object.defineProperty(exports2, "WriteableStreamMessageWriter", { enumerable: true, get: function() {
      return messageWriter_1.WriteableStreamMessageWriter;
    } });
    var messageBuffer_1 = require_messageBuffer();
    Object.defineProperty(exports2, "AbstractMessageBuffer", { enumerable: true, get: function() {
      return messageBuffer_1.AbstractMessageBuffer;
    } });
    var connection_1 = require_connection();
    Object.defineProperty(exports2, "ConnectionStrategy", { enumerable: true, get: function() {
      return connection_1.ConnectionStrategy;
    } });
    Object.defineProperty(exports2, "ConnectionOptions", { enumerable: true, get: function() {
      return connection_1.ConnectionOptions;
    } });
    Object.defineProperty(exports2, "NullLogger", { enumerable: true, get: function() {
      return connection_1.NullLogger;
    } });
    Object.defineProperty(exports2, "createMessageConnection", { enumerable: true, get: function() {
      return connection_1.createMessageConnection;
    } });
    Object.defineProperty(exports2, "ProgressToken", { enumerable: true, get: function() {
      return connection_1.ProgressToken;
    } });
    Object.defineProperty(exports2, "ProgressType", { enumerable: true, get: function() {
      return connection_1.ProgressType;
    } });
    Object.defineProperty(exports2, "Trace", { enumerable: true, get: function() {
      return connection_1.Trace;
    } });
    Object.defineProperty(exports2, "TraceValues", { enumerable: true, get: function() {
      return connection_1.TraceValues;
    } });
    Object.defineProperty(exports2, "TraceFormat", { enumerable: true, get: function() {
      return connection_1.TraceFormat;
    } });
    Object.defineProperty(exports2, "SetTraceNotification", { enumerable: true, get: function() {
      return connection_1.SetTraceNotification;
    } });
    Object.defineProperty(exports2, "LogTraceNotification", { enumerable: true, get: function() {
      return connection_1.LogTraceNotification;
    } });
    Object.defineProperty(exports2, "ConnectionErrors", { enumerable: true, get: function() {
      return connection_1.ConnectionErrors;
    } });
    Object.defineProperty(exports2, "ConnectionError", { enumerable: true, get: function() {
      return connection_1.ConnectionError;
    } });
    Object.defineProperty(exports2, "CancellationReceiverStrategy", { enumerable: true, get: function() {
      return connection_1.CancellationReceiverStrategy;
    } });
    Object.defineProperty(exports2, "CancellationSenderStrategy", { enumerable: true, get: function() {
      return connection_1.CancellationSenderStrategy;
    } });
    Object.defineProperty(exports2, "CancellationStrategy", { enumerable: true, get: function() {
      return connection_1.CancellationStrategy;
    } });
    Object.defineProperty(exports2, "MessageStrategy", { enumerable: true, get: function() {
      return connection_1.MessageStrategy;
    } });
    var ral_1 = require_ral();
    exports2.RAL = ral_1.default;
  }
});

// server/node_modules/vscode-jsonrpc/lib/node/ril.js
var require_ril = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/node/ril.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    var util_1 = require("util");
    var api_1 = require_api();
    var MessageBuffer = class _MessageBuffer extends api_1.AbstractMessageBuffer {
      constructor(encoding = "utf-8") {
        super(encoding);
      }
      emptyBuffer() {
        return _MessageBuffer.emptyBuffer;
      }
      fromString(value, encoding) {
        return Buffer.from(value, encoding);
      }
      toString(value, encoding) {
        if (value instanceof Buffer) {
          return value.toString(encoding);
        } else {
          return new util_1.TextDecoder(encoding).decode(value);
        }
      }
      asNative(buffer, length) {
        if (length === void 0) {
          return buffer instanceof Buffer ? buffer : Buffer.from(buffer);
        } else {
          return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length);
        }
      }
      allocNative(length) {
        return Buffer.allocUnsafe(length);
      }
    };
    MessageBuffer.emptyBuffer = Buffer.allocUnsafe(0);
    var ReadableStreamWrapper = class {
      constructor(stream) {
        this.stream = stream;
      }
      onClose(listener) {
        this.stream.on("close", listener);
        return api_1.Disposable.create(() => this.stream.off("close", listener));
      }
      onError(listener) {
        this.stream.on("error", listener);
        return api_1.Disposable.create(() => this.stream.off("error", listener));
      }
      onEnd(listener) {
        this.stream.on("end", listener);
        return api_1.Disposable.create(() => this.stream.off("end", listener));
      }
      onData(listener) {
        this.stream.on("data", listener);
        return api_1.Disposable.create(() => this.stream.off("data", listener));
      }
    };
    var WritableStreamWrapper = class {
      constructor(stream) {
        this.stream = stream;
      }
      onClose(listener) {
        this.stream.on("close", listener);
        return api_1.Disposable.create(() => this.stream.off("close", listener));
      }
      onError(listener) {
        this.stream.on("error", listener);
        return api_1.Disposable.create(() => this.stream.off("error", listener));
      }
      onEnd(listener) {
        this.stream.on("end", listener);
        return api_1.Disposable.create(() => this.stream.off("end", listener));
      }
      write(data, encoding) {
        return new Promise((resolve, reject) => {
          const callback = (error51) => {
            if (error51 === void 0 || error51 === null) {
              resolve();
            } else {
              reject(error51);
            }
          };
          if (typeof data === "string") {
            this.stream.write(data, encoding, callback);
          } else {
            this.stream.write(data, callback);
          }
        });
      }
      end() {
        this.stream.end();
      }
    };
    var _ril = Object.freeze({
      messageBuffer: Object.freeze({
        create: (encoding) => new MessageBuffer(encoding)
      }),
      applicationJson: Object.freeze({
        encoder: Object.freeze({
          name: "application/json",
          encode: (msg, options) => {
            try {
              return Promise.resolve(Buffer.from(JSON.stringify(msg, void 0, 0), options.charset));
            } catch (err) {
              return Promise.reject(err);
            }
          }
        }),
        decoder: Object.freeze({
          name: "application/json",
          decode: (buffer, options) => {
            try {
              if (buffer instanceof Buffer) {
                return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
              } else {
                return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));
              }
            } catch (err) {
              return Promise.reject(err);
            }
          }
        })
      }),
      stream: Object.freeze({
        asReadableStream: (stream) => new ReadableStreamWrapper(stream),
        asWritableStream: (stream) => new WritableStreamWrapper(stream)
      }),
      console,
      timer: Object.freeze({
        setTimeout(callback, ms, ...args) {
          const handle = setTimeout(callback, ms, ...args);
          return { dispose: () => clearTimeout(handle) };
        },
        setImmediate(callback, ...args) {
          const handle = setImmediate(callback, ...args);
          return { dispose: () => clearImmediate(handle) };
        },
        setInterval(callback, ms, ...args) {
          const handle = setInterval(callback, ms, ...args);
          return { dispose: () => clearInterval(handle) };
        }
      })
    });
    function RIL() {
      return _ril;
    }
    (function(RIL2) {
      function install() {
        api_1.RAL.install(_ril);
      }
      RIL2.install = install;
    })(RIL || (RIL = {}));
    exports2.default = RIL;
  }
});

// server/node_modules/vscode-jsonrpc/lib/node/main.js
var require_main = __commonJS({
  "server/node_modules/vscode-jsonrpc/lib/node/main.js"(exports2) {
    "use strict";
    var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m2, k);
      if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m2[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    }) : (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m2[k];
    }));
    var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
      for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
    };
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createMessageConnection = exports2.createServerSocketTransport = exports2.createClientSocketTransport = exports2.createServerPipeTransport = exports2.createClientPipeTransport = exports2.generateRandomPipeName = exports2.StreamMessageWriter = exports2.StreamMessageReader = exports2.SocketMessageWriter = exports2.SocketMessageReader = exports2.PortMessageWriter = exports2.PortMessageReader = exports2.IPCMessageWriter = exports2.IPCMessageReader = void 0;
    var ril_1 = require_ril();
    ril_1.default.install();
    var path = require("path");
    var os = require("os");
    var crypto_1 = require("crypto");
    var net_1 = require("net");
    var api_1 = require_api();
    __exportStar(require_api(), exports2);
    var IPCMessageReader = class extends api_1.AbstractMessageReader {
      constructor(process4) {
        super();
        this.process = process4;
        let eventEmitter = this.process;
        eventEmitter.on("error", (error51) => this.fireError(error51));
        eventEmitter.on("close", () => this.fireClose());
      }
      listen(callback) {
        this.process.on("message", callback);
        return api_1.Disposable.create(() => this.process.off("message", callback));
      }
    };
    exports2.IPCMessageReader = IPCMessageReader;
    var IPCMessageWriter = class extends api_1.AbstractMessageWriter {
      constructor(process4) {
        super();
        this.process = process4;
        this.errorCount = 0;
        const eventEmitter = this.process;
        eventEmitter.on("error", (error51) => this.fireError(error51));
        eventEmitter.on("close", () => this.fireClose);
      }
      write(msg) {
        try {
          if (typeof this.process.send === "function") {
            this.process.send(msg, void 0, void 0, (error51) => {
              if (error51) {
                this.errorCount++;
                this.handleError(error51, msg);
              } else {
                this.errorCount = 0;
              }
            });
          }
          return Promise.resolve();
        } catch (error51) {
          this.handleError(error51, msg);
          return Promise.reject(error51);
        }
      }
      handleError(error51, msg) {
        this.errorCount++;
        this.fireError(error51, msg, this.errorCount);
      }
      end() {
      }
    };
    exports2.IPCMessageWriter = IPCMessageWriter;
    var PortMessageReader = class extends api_1.AbstractMessageReader {
      constructor(port) {
        super();
        this.onData = new api_1.Emitter();
        port.on("close", () => this.fireClose);
        port.on("error", (error51) => this.fireError(error51));
        port.on("message", (message) => {
          this.onData.fire(message);
        });
      }
      listen(callback) {
        return this.onData.event(callback);
      }
    };
    exports2.PortMessageReader = PortMessageReader;
    var PortMessageWriter = class extends api_1.AbstractMessageWriter {
      constructor(port) {
        super();
        this.port = port;
        this.errorCount = 0;
        port.on("close", () => this.fireClose());
        port.on("error", (error51) => this.fireError(error51));
      }
      write(msg) {
        try {
          this.port.postMessage(msg);
          return Promise.resolve();
        } catch (error51) {
          this.handleError(error51, msg);
          return Promise.reject(error51);
        }
      }
      handleError(error51, msg) {
        this.errorCount++;
        this.fireError(error51, msg, this.errorCount);
      }
      end() {
      }
    };
    exports2.PortMessageWriter = PortMessageWriter;
    var SocketMessageReader = class extends api_1.ReadableStreamMessageReader {
      constructor(socket, encoding = "utf-8") {
        super((0, ril_1.default)().stream.asReadableStream(socket), encoding);
      }
    };
    exports2.SocketMessageReader = SocketMessageReader;
    var SocketMessageWriter = class extends api_1.WriteableStreamMessageWriter {
      constructor(socket, options) {
        super((0, ril_1.default)().stream.asWritableStream(socket), options);
        this.socket = socket;
      }
      dispose() {
        super.dispose();
        this.socket.destroy();
      }
    };
    exports2.SocketMessageWriter = SocketMessageWriter;
    var StreamMessageReader = class extends api_1.ReadableStreamMessageReader {
      constructor(readable, encoding) {
        super((0, ril_1.default)().stream.asReadableStream(readable), encoding);
      }
    };
    exports2.StreamMessageReader = StreamMessageReader;
    var StreamMessageWriter = class extends api_1.WriteableStreamMessageWriter {
      constructor(writable, options) {
        super((0, ril_1.default)().stream.asWritableStream(writable), options);
      }
    };
    exports2.StreamMessageWriter = StreamMessageWriter;
    var XDG_RUNTIME_DIR = process.env["XDG_RUNTIME_DIR"];
    var safeIpcPathLengths = /* @__PURE__ */ new Map([
      ["linux", 107],
      ["darwin", 103]
    ]);
    function generateRandomPipeName() {
      const randomSuffix = (0, crypto_1.randomBytes)(21).toString("hex");
      if (process.platform === "win32") {
        return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
      }
      let result;
      if (XDG_RUNTIME_DIR) {
        result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`);
      } else {
        result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
      }
      const limit = safeIpcPathLengths.get(process.platform);
      if (limit !== void 0 && result.length > limit) {
        (0, ril_1.default)().console.warn(`WARNING: IPC handle "${result}" is longer than ${limit} characters.`);
      }
      return result;
    }
    exports2.generateRandomPipeName = generateRandomPipeName;
    function createClientPipeTransport(pipeName, encoding = "utf-8") {
      let connectResolve;
      const connected = new Promise((resolve, _reject) => {
        connectResolve = resolve;
      });
      return new Promise((resolve, reject) => {
        let server2 = (0, net_1.createServer)((socket) => {
          server2.close();
          connectResolve([
            new SocketMessageReader(socket, encoding),
            new SocketMessageWriter(socket, encoding)
          ]);
        });
        server2.on("error", reject);
        server2.listen(pipeName, () => {
          server2.removeListener("error", reject);
          resolve({
            onConnected: () => {
              return connected;
            }
          });
        });
      });
    }
    exports2.createClientPipeTransport = createClientPipeTransport;
    function createServerPipeTransport(pipeName, encoding = "utf-8") {
      const socket = (0, net_1.createConnection)(pipeName);
      return [
        new SocketMessageReader(socket, encoding),
        new SocketMessageWriter(socket, encoding)
      ];
    }
    exports2.createServerPipeTransport = createServerPipeTransport;
    function createClientSocketTransport(port, encoding = "utf-8") {
      let connectResolve;
      const connected = new Promise((resolve, _reject) => {
        connectResolve = resolve;
      });
      return new Promise((resolve, reject) => {
        const server2 = (0, net_1.createServer)((socket) => {
          server2.close();
          connectResolve([
            new SocketMessageReader(socket, encoding),
            new SocketMessageWriter(socket, encoding)
          ]);
        });
        server2.on("error", reject);
        server2.listen(port, "127.0.0.1", () => {
          server2.removeListener("error", reject);
          resolve({
            onConnected: () => {
              return connected;
            }
          });
        });
      });
    }
    exports2.createClientSocketTransport = createClientSocketTransport;
    function createServerSocketTransport(port, encoding = "utf-8") {
      const socket = (0, net_1.createConnection)(port, "127.0.0.1");
      return [
        new SocketMessageReader(socket, encoding),
        new SocketMessageWriter(socket, encoding)
      ];
    }
    exports2.createServerSocketTransport = createServerSocketTransport;
    function isReadableStream(value) {
      const candidate = value;
      return candidate.read !== void 0 && candidate.addListener !== void 0;
    }
    function isWritableStream(value) {
      const candidate = value;
      return candidate.write !== void 0 && candidate.addListener !== void 0;
    }
    function createMessageConnection(input, output, logger, options) {
      if (!logger) {
        logger = api_1.NullLogger;
      }
      const reader = isReadableStream(input) ? new StreamMessageReader(input) : input;
      const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output;
      if (api_1.ConnectionStrategy.is(options)) {
        options = { connectionStrategy: options };
      }
      return (0, api_1.createMessageConnection)(reader, writer, logger, options);
    }
    exports2.createMessageConnection = createMessageConnection;
  }
});

// server/node_modules/vscode-jsonrpc/node.js
var require_node = __commonJS({
  "server/node_modules/vscode-jsonrpc/node.js"(exports2, module2) {
    "use strict";
    module2.exports = require_main();
  }
});

// server/node_modules/vscode-languageserver-types/lib/umd/main.js
var require_main2 = __commonJS({
  "server/node_modules/vscode-languageserver-types/lib/umd/main.js"(exports2, module2) {
    (function(factory) {
      if (typeof module2 === "object" && typeof module2.exports === "object") {
        var v = factory(require, exports2);
        if (v !== void 0) module2.exports = v;
      } else if (typeof define === "function" && define.amd) {
        define(["require", "exports"], factory);
      }
    })(function(require2, exports3) {
      "use strict";
      Object.defineProperty(exports3, "__esModule", { value: true });
      exports3.TextDocument = exports3.EOL = exports3.WorkspaceFolder = exports3.InlineCompletionContext = exports3.SelectedCompletionInfo = exports3.InlineCompletionTriggerKind = exports3.InlineCompletionList = exports3.InlineCompletionItem = exports3.StringValue = exports3.InlayHint = exports3.InlayHintLabelPart = exports3.InlayHintKind = exports3.InlineValueContext = exports3.InlineValueEvaluatableExpression = exports3.InlineValueVariableLookup = exports3.InlineValueText = exports3.SemanticTokens = exports3.SemanticTokenModifiers = exports3.SemanticTokenTypes = exports3.SelectionRange = exports3.DocumentLink = exports3.FormattingOptions = exports3.CodeLens = exports3.CodeAction = exports3.CodeActionContext = exports3.CodeActionTriggerKind = exports3.CodeActionKind = exports3.DocumentSymbol = exports3.WorkspaceSymbol = exports3.SymbolInformation = exports3.SymbolTag = exports3.SymbolKind = exports3.DocumentHighlight = exports3.DocumentHighlightKind = exports3.SignatureInformation = exports3.ParameterInformation = exports3.Hover = exports3.MarkedString = exports3.CompletionList = exports3.CompletionItem = exports3.CompletionItemLabelDetails = exports3.InsertTextMode = exports3.InsertReplaceEdit = exports3.CompletionItemTag = exports3.InsertTextFormat = exports3.CompletionItemKind = exports3.MarkupContent = exports3.MarkupKind = exports3.TextDocumentItem = exports3.OptionalVersionedTextDocumentIdentifier = exports3.VersionedTextDocumentIdentifier = exports3.TextDocumentIdentifier = exports3.WorkspaceChange = exports3.WorkspaceEdit = exports3.DeleteFile = exports3.RenameFile = exports3.CreateFile = exports3.TextDocumentEdit = exports3.AnnotatedTextEdit = exports3.ChangeAnnotationIdentifier = exports3.ChangeAnnotation = exports3.TextEdit = exports3.Command = exports3.Diagnostic = exports3.CodeDescription = exports3.DiagnosticTag = exports3.DiagnosticSeverity = exports3.DiagnosticRelatedInformation = exports3.FoldingRange = exports3.FoldingRangeKind = exports3.ColorPresentation = exports3.ColorInformation = exports3.Color = exports3.LocationLink = exports3.Location = exports3.Range = exports3.Position = exports3.uinteger = exports3.integer = exports3.URI = exports3.DocumentUri = void 0;
      var DocumentUri;
      (function(DocumentUri2) {
        function is(value) {
          return typeof value === "string";
        }
        DocumentUri2.is = is;
      })(DocumentUri || (exports3.DocumentUri = DocumentUri = {}));
      var URI;
      (function(URI2) {
        function is(value) {
          return typeof value === "string";
        }
        URI2.is = is;
      })(URI || (exports3.URI = URI = {}));
      var integer2;
      (function(integer3) {
        integer3.MIN_VALUE = -2147483648;
        integer3.MAX_VALUE = 2147483647;
        function is(value) {
          return typeof value === "number" && integer3.MIN_VALUE <= value && value <= integer3.MAX_VALUE;
        }
        integer3.is = is;
      })(integer2 || (exports3.integer = integer2 = {}));
      var uinteger;
      (function(uinteger2) {
        uinteger2.MIN_VALUE = 0;
        uinteger2.MAX_VALUE = 2147483647;
        function is(value) {
          return typeof value === "number" && uinteger2.MIN_VALUE <= value && value <= uinteger2.MAX_VALUE;
        }
        uinteger2.is = is;
      })(uinteger || (exports3.uinteger = uinteger = {}));
      var Position;
      (function(Position2) {
        function create(line, character) {
          if (line === Number.MAX_VALUE) {
            line = uinteger.MAX_VALUE;
          }
          if (character === Number.MAX_VALUE) {
            character = uinteger.MAX_VALUE;
          }
          return { line, character };
        }
        Position2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
        }
        Position2.is = is;
      })(Position || (exports3.Position = Position = {}));
      var Range;
      (function(Range2) {
        function create(one, two, three, four) {
          if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
            return { start: Position.create(one, two), end: Position.create(three, four) };
          } else if (Position.is(one) && Position.is(two)) {
            return { start: one, end: two };
          } else {
            throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]"));
          }
        }
        Range2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
        }
        Range2.is = is;
      })(Range || (exports3.Range = Range = {}));
      var Location;
      (function(Location2) {
        function create(uri, range) {
          return { uri, range };
        }
        Location2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
        }
        Location2.is = is;
      })(Location || (exports3.Location = Location = {}));
      var LocationLink;
      (function(LocationLink2) {
        function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
          return { targetUri, targetRange, targetSelectionRange, originSelectionRange };
        }
        LocationLink2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) && Range.is(candidate.targetSelectionRange) && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
        }
        LocationLink2.is = is;
      })(LocationLink || (exports3.LocationLink = LocationLink = {}));
      var Color;
      (function(Color2) {
        function create(red, green, blue, alpha) {
          return {
            red,
            green,
            blue,
            alpha
          };
        }
        Color2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1);
        }
        Color2.is = is;
      })(Color || (exports3.Color = Color = {}));
      var ColorInformation;
      (function(ColorInformation2) {
        function create(range, color) {
          return {
            range,
            color
          };
        }
        ColorInformation2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
        }
        ColorInformation2.is = is;
      })(ColorInformation || (exports3.ColorInformation = ColorInformation = {}));
      var ColorPresentation;
      (function(ColorPresentation2) {
        function create(label, textEdit, additionalTextEdits) {
          return {
            label,
            textEdit,
            additionalTextEdits
          };
        }
        ColorPresentation2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
        }
        ColorPresentation2.is = is;
      })(ColorPresentation || (exports3.ColorPresentation = ColorPresentation = {}));
      var FoldingRangeKind;
      (function(FoldingRangeKind2) {
        FoldingRangeKind2.Comment = "comment";
        FoldingRangeKind2.Imports = "imports";
        FoldingRangeKind2.Region = "region";
      })(FoldingRangeKind || (exports3.FoldingRangeKind = FoldingRangeKind = {}));
      var FoldingRange;
      (function(FoldingRange2) {
        function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
          var result = {
            startLine,
            endLine
          };
          if (Is.defined(startCharacter)) {
            result.startCharacter = startCharacter;
          }
          if (Is.defined(endCharacter)) {
            result.endCharacter = endCharacter;
          }
          if (Is.defined(kind)) {
            result.kind = kind;
          }
          if (Is.defined(collapsedText)) {
            result.collapsedText = collapsedText;
          }
          return result;
        }
        FoldingRange2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
        }
        FoldingRange2.is = is;
      })(FoldingRange || (exports3.FoldingRange = FoldingRange = {}));
      var DiagnosticRelatedInformation;
      (function(DiagnosticRelatedInformation2) {
        function create(location, message) {
          return {
            location,
            message
          };
        }
        DiagnosticRelatedInformation2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
        }
        DiagnosticRelatedInformation2.is = is;
      })(DiagnosticRelatedInformation || (exports3.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {}));
      var DiagnosticSeverity2;
      (function(DiagnosticSeverity3) {
        DiagnosticSeverity3.Error = 1;
        DiagnosticSeverity3.Warning = 2;
        DiagnosticSeverity3.Information = 3;
        DiagnosticSeverity3.Hint = 4;
      })(DiagnosticSeverity2 || (exports3.DiagnosticSeverity = DiagnosticSeverity2 = {}));
      var DiagnosticTag;
      (function(DiagnosticTag2) {
        DiagnosticTag2.Unnecessary = 1;
        DiagnosticTag2.Deprecated = 2;
      })(DiagnosticTag || (exports3.DiagnosticTag = DiagnosticTag = {}));
      var CodeDescription;
      (function(CodeDescription2) {
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Is.string(candidate.href);
        }
        CodeDescription2.is = is;
      })(CodeDescription || (exports3.CodeDescription = CodeDescription = {}));
      var Diagnostic2;
      (function(Diagnostic3) {
        function create(range, message, severity, code, source, relatedInformation) {
          var result = { range, message };
          if (Is.defined(severity)) {
            result.severity = severity;
          }
          if (Is.defined(code)) {
            result.code = code;
          }
          if (Is.defined(source)) {
            result.source = source;
          }
          if (Is.defined(relatedInformation)) {
            result.relatedInformation = relatedInformation;
          }
          return result;
        }
        Diagnostic3.create = create;
        function is(value) {
          var _a3;
          var candidate = value;
          return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a3 = candidate.codeDescription) === null || _a3 === void 0 ? void 0 : _a3.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
        }
        Diagnostic3.is = is;
      })(Diagnostic2 || (exports3.Diagnostic = Diagnostic2 = {}));
      var Command;
      (function(Command2) {
        function create(title, command) {
          var args = [];
          for (var _i = 2; _i < arguments.length; _i++) {
            args[_i - 2] = arguments[_i];
          }
          var result = { title, command };
          if (Is.defined(args) && args.length > 0) {
            result.arguments = args;
          }
          return result;
        }
        Command2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
        }
        Command2.is = is;
      })(Command || (exports3.Command = Command = {}));
      var TextEdit;
      (function(TextEdit2) {
        function replace(range, newText) {
          return { range, newText };
        }
        TextEdit2.replace = replace;
        function insert(position, newText) {
          return { range: { start: position, end: position }, newText };
        }
        TextEdit2.insert = insert;
        function del(range) {
          return { range, newText: "" };
        }
        TextEdit2.del = del;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range.is(candidate.range);
        }
        TextEdit2.is = is;
      })(TextEdit || (exports3.TextEdit = TextEdit = {}));
      var ChangeAnnotation;
      (function(ChangeAnnotation2) {
        function create(label, needsConfirmation, description) {
          var result = { label };
          if (needsConfirmation !== void 0) {
            result.needsConfirmation = needsConfirmation;
          }
          if (description !== void 0) {
            result.description = description;
          }
          return result;
        }
        ChangeAnnotation2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === void 0) && (Is.string(candidate.description) || candidate.description === void 0);
        }
        ChangeAnnotation2.is = is;
      })(ChangeAnnotation || (exports3.ChangeAnnotation = ChangeAnnotation = {}));
      var ChangeAnnotationIdentifier;
      (function(ChangeAnnotationIdentifier2) {
        function is(value) {
          var candidate = value;
          return Is.string(candidate);
        }
        ChangeAnnotationIdentifier2.is = is;
      })(ChangeAnnotationIdentifier || (exports3.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {}));
      var AnnotatedTextEdit;
      (function(AnnotatedTextEdit2) {
        function replace(range, newText, annotation) {
          return { range, newText, annotationId: annotation };
        }
        AnnotatedTextEdit2.replace = replace;
        function insert(position, newText, annotation) {
          return { range: { start: position, end: position }, newText, annotationId: annotation };
        }
        AnnotatedTextEdit2.insert = insert;
        function del(range, annotation) {
          return { range, newText: "", annotationId: annotation };
        }
        AnnotatedTextEdit2.del = del;
        function is(value) {
          var candidate = value;
          return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
        }
        AnnotatedTextEdit2.is = is;
      })(AnnotatedTextEdit || (exports3.AnnotatedTextEdit = AnnotatedTextEdit = {}));
      var TextDocumentEdit;
      (function(TextDocumentEdit2) {
        function create(textDocument, edits) {
          return { textDocument, edits };
        }
        TextDocumentEdit2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits);
        }
        TextDocumentEdit2.is = is;
      })(TextDocumentEdit || (exports3.TextDocumentEdit = TextDocumentEdit = {}));
      var CreateFile;
      (function(CreateFile2) {
        function create(uri, options, annotation) {
          var result = {
            kind: "create",
            uri
          };
          if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
            result.options = options;
          }
          if (annotation !== void 0) {
            result.annotationId = annotation;
          }
          return result;
        }
        CreateFile2.create = create;
        function is(value) {
          var candidate = value;
          return candidate && candidate.kind === "create" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId));
        }
        CreateFile2.is = is;
      })(CreateFile || (exports3.CreateFile = CreateFile = {}));
      var RenameFile;
      (function(RenameFile2) {
        function create(oldUri, newUri, options, annotation) {
          var result = {
            kind: "rename",
            oldUri,
            newUri
          };
          if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
            result.options = options;
          }
          if (annotation !== void 0) {
            result.annotationId = annotation;
          }
          return result;
        }
        RenameFile2.create = create;
        function is(value) {
          var candidate = value;
          return candidate && candidate.kind === "rename" && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId));
        }
        RenameFile2.is = is;
      })(RenameFile || (exports3.RenameFile = RenameFile = {}));
      var DeleteFile;
      (function(DeleteFile2) {
        function create(uri, options, annotation) {
          var result = {
            kind: "delete",
            uri
          };
          if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
            result.options = options;
          }
          if (annotation !== void 0) {
            result.annotationId = annotation;
          }
          return result;
        }
        DeleteFile2.create = create;
        function is(value) {
          var candidate = value;
          return candidate && candidate.kind === "delete" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId));
        }
        DeleteFile2.is = is;
      })(DeleteFile || (exports3.DeleteFile = DeleteFile = {}));
      var WorkspaceEdit;
      (function(WorkspaceEdit2) {
        function is(value) {
          var candidate = value;
          return candidate && (candidate.changes !== void 0 || candidate.documentChanges !== void 0) && (candidate.documentChanges === void 0 || candidate.documentChanges.every(function(change) {
            if (Is.string(change.kind)) {
              return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
            } else {
              return TextDocumentEdit.is(change);
            }
          }));
        }
        WorkspaceEdit2.is = is;
      })(WorkspaceEdit || (exports3.WorkspaceEdit = WorkspaceEdit = {}));
      var TextEditChangeImpl = (
        /** @class */
        (function() {
          function TextEditChangeImpl2(edits, changeAnnotations) {
            this.edits = edits;
            this.changeAnnotations = changeAnnotations;
          }
          TextEditChangeImpl2.prototype.insert = function(position, newText, annotation) {
            var edit;
            var id;
            if (annotation === void 0) {
              edit = TextEdit.insert(position, newText);
            } else if (ChangeAnnotationIdentifier.is(annotation)) {
              id = annotation;
              edit = AnnotatedTextEdit.insert(position, newText, annotation);
            } else {
              this.assertChangeAnnotations(this.changeAnnotations);
              id = this.changeAnnotations.manage(annotation);
              edit = AnnotatedTextEdit.insert(position, newText, id);
            }
            this.edits.push(edit);
            if (id !== void 0) {
              return id;
            }
          };
          TextEditChangeImpl2.prototype.replace = function(range, newText, annotation) {
            var edit;
            var id;
            if (annotation === void 0) {
              edit = TextEdit.replace(range, newText);
            } else if (ChangeAnnotationIdentifier.is(annotation)) {
              id = annotation;
              edit = AnnotatedTextEdit.replace(range, newText, annotation);
            } else {
              this.assertChangeAnnotations(this.changeAnnotations);
              id = this.changeAnnotations.manage(annotation);
              edit = AnnotatedTextEdit.replace(range, newText, id);
            }
            this.edits.push(edit);
            if (id !== void 0) {
              return id;
            }
          };
          TextEditChangeImpl2.prototype.delete = function(range, annotation) {
            var edit;
            var id;
            if (annotation === void 0) {
              edit = TextEdit.del(range);
            } else if (ChangeAnnotationIdentifier.is(annotation)) {
              id = annotation;
              edit = AnnotatedTextEdit.del(range, annotation);
            } else {
              this.assertChangeAnnotations(this.changeAnnotations);
              id = this.changeAnnotations.manage(annotation);
              edit = AnnotatedTextEdit.del(range, id);
            }
            this.edits.push(edit);
            if (id !== void 0) {
              return id;
            }
          };
          TextEditChangeImpl2.prototype.add = function(edit) {
            this.edits.push(edit);
          };
          TextEditChangeImpl2.prototype.all = function() {
            return this.edits;
          };
          TextEditChangeImpl2.prototype.clear = function() {
            this.edits.splice(0, this.edits.length);
          };
          TextEditChangeImpl2.prototype.assertChangeAnnotations = function(value) {
            if (value === void 0) {
              throw new Error("Text edit change is not configured to manage change annotations.");
            }
          };
          return TextEditChangeImpl2;
        })()
      );
      var ChangeAnnotations = (
        /** @class */
        (function() {
          function ChangeAnnotations2(annotations) {
            this._annotations = annotations === void 0 ? /* @__PURE__ */ Object.create(null) : annotations;
            this._counter = 0;
            this._size = 0;
          }
          ChangeAnnotations2.prototype.all = function() {
            return this._annotations;
          };
          Object.defineProperty(ChangeAnnotations2.prototype, "size", {
            get: function() {
              return this._size;
            },
            enumerable: false,
            configurable: true
          });
          ChangeAnnotations2.prototype.manage = function(idOrAnnotation, annotation) {
            var id;
            if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
              id = idOrAnnotation;
            } else {
              id = this.nextId();
              annotation = idOrAnnotation;
            }
            if (this._annotations[id] !== void 0) {
              throw new Error("Id ".concat(id, " is already in use."));
            }
            if (annotation === void 0) {
              throw new Error("No annotation provided for id ".concat(id));
            }
            this._annotations[id] = annotation;
            this._size++;
            return id;
          };
          ChangeAnnotations2.prototype.nextId = function() {
            this._counter++;
            return this._counter.toString();
          };
          return ChangeAnnotations2;
        })()
      );
      var WorkspaceChange = (
        /** @class */
        (function() {
          function WorkspaceChange2(workspaceEdit) {
            var _this = this;
            this._textEditChanges = /* @__PURE__ */ Object.create(null);
            if (workspaceEdit !== void 0) {
              this._workspaceEdit = workspaceEdit;
              if (workspaceEdit.documentChanges) {
                this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
                workspaceEdit.changeAnnotations = this._changeAnnotations.all();
                workspaceEdit.documentChanges.forEach(function(change) {
                  if (TextDocumentEdit.is(change)) {
                    var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
                    _this._textEditChanges[change.textDocument.uri] = textEditChange;
                  }
                });
              } else if (workspaceEdit.changes) {
                Object.keys(workspaceEdit.changes).forEach(function(key) {
                  var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
                  _this._textEditChanges[key] = textEditChange;
                });
              }
            } else {
              this._workspaceEdit = {};
            }
          }
          Object.defineProperty(WorkspaceChange2.prototype, "edit", {
            /**
             * Returns the underlying {@link WorkspaceEdit} literal
             * use to be returned from a workspace edit operation like rename.
             */
            get: function() {
              this.initDocumentChanges();
              if (this._changeAnnotations !== void 0) {
                if (this._changeAnnotations.size === 0) {
                  this._workspaceEdit.changeAnnotations = void 0;
                } else {
                  this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
                }
              }
              return this._workspaceEdit;
            },
            enumerable: false,
            configurable: true
          });
          WorkspaceChange2.prototype.getTextEditChange = function(key) {
            if (OptionalVersionedTextDocumentIdentifier.is(key)) {
              this.initDocumentChanges();
              if (this._workspaceEdit.documentChanges === void 0) {
                throw new Error("Workspace edit is not configured for document changes.");
              }
              var textDocument = { uri: key.uri, version: key.version };
              var result = this._textEditChanges[textDocument.uri];
              if (!result) {
                var edits = [];
                var textDocumentEdit = {
                  textDocument,
                  edits
                };
                this._workspaceEdit.documentChanges.push(textDocumentEdit);
                result = new TextEditChangeImpl(edits, this._changeAnnotations);
                this._textEditChanges[textDocument.uri] = result;
              }
              return result;
            } else {
              this.initChanges();
              if (this._workspaceEdit.changes === void 0) {
                throw new Error("Workspace edit is not configured for normal text edit changes.");
              }
              var result = this._textEditChanges[key];
              if (!result) {
                var edits = [];
                this._workspaceEdit.changes[key] = edits;
                result = new TextEditChangeImpl(edits);
                this._textEditChanges[key] = result;
              }
              return result;
            }
          };
          WorkspaceChange2.prototype.initDocumentChanges = function() {
            if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) {
              this._changeAnnotations = new ChangeAnnotations();
              this._workspaceEdit.documentChanges = [];
              this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
            }
          };
          WorkspaceChange2.prototype.initChanges = function() {
            if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) {
              this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null);
            }
          };
          WorkspaceChange2.prototype.createFile = function(uri, optionsOrAnnotation, options) {
            this.initDocumentChanges();
            if (this._workspaceEdit.documentChanges === void 0) {
              throw new Error("Workspace edit is not configured for document changes.");
            }
            var annotation;
            if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
              annotation = optionsOrAnnotation;
            } else {
              options = optionsOrAnnotation;
            }
            var operation;
            var id;
            if (annotation === void 0) {
              operation = CreateFile.create(uri, options);
            } else {
              id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
              operation = CreateFile.create(uri, options, id);
            }
            this._workspaceEdit.documentChanges.push(operation);
            if (id !== void 0) {
              return id;
            }
          };
          WorkspaceChange2.prototype.renameFile = function(oldUri, newUri, optionsOrAnnotation, options) {
            this.initDocumentChanges();
            if (this._workspaceEdit.documentChanges === void 0) {
              throw new Error("Workspace edit is not configured for document changes.");
            }
            var annotation;
            if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
              annotation = optionsOrAnnotation;
            } else {
              options = optionsOrAnnotation;
            }
            var operation;
            var id;
            if (annotation === void 0) {
              operation = RenameFile.create(oldUri, newUri, options);
            } else {
              id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
              operation = RenameFile.create(oldUri, newUri, options, id);
            }
            this._workspaceEdit.documentChanges.push(operation);
            if (id !== void 0) {
              return id;
            }
          };
          WorkspaceChange2.prototype.deleteFile = function(uri, optionsOrAnnotation, options) {
            this.initDocumentChanges();
            if (this._workspaceEdit.documentChanges === void 0) {
              throw new Error("Workspace edit is not configured for document changes.");
            }
            var annotation;
            if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
              annotation = optionsOrAnnotation;
            } else {
              options = optionsOrAnnotation;
            }
            var operation;
            var id;
            if (annotation === void 0) {
              operation = DeleteFile.create(uri, options);
            } else {
              id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
              operation = DeleteFile.create(uri, options, id);
            }
            this._workspaceEdit.documentChanges.push(operation);
            if (id !== void 0) {
              return id;
            }
          };
          return WorkspaceChange2;
        })()
      );
      exports3.WorkspaceChange = WorkspaceChange;
      var TextDocumentIdentifier;
      (function(TextDocumentIdentifier2) {
        function create(uri) {
          return { uri };
        }
        TextDocumentIdentifier2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.string(candidate.uri);
        }
        TextDocumentIdentifier2.is = is;
      })(TextDocumentIdentifier || (exports3.TextDocumentIdentifier = TextDocumentIdentifier = {}));
      var VersionedTextDocumentIdentifier;
      (function(VersionedTextDocumentIdentifier2) {
        function create(uri, version2) {
          return { uri, version: version2 };
        }
        VersionedTextDocumentIdentifier2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
        }
        VersionedTextDocumentIdentifier2.is = is;
      })(VersionedTextDocumentIdentifier || (exports3.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {}));
      var OptionalVersionedTextDocumentIdentifier;
      (function(OptionalVersionedTextDocumentIdentifier2) {
        function create(uri, version2) {
          return { uri, version: version2 };
        }
        OptionalVersionedTextDocumentIdentifier2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
        }
        OptionalVersionedTextDocumentIdentifier2.is = is;
      })(OptionalVersionedTextDocumentIdentifier || (exports3.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {}));
      var TextDocumentItem;
      (function(TextDocumentItem2) {
        function create(uri, languageId, version2, text) {
          return { uri, languageId, version: version2, text };
        }
        TextDocumentItem2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
        }
        TextDocumentItem2.is = is;
      })(TextDocumentItem || (exports3.TextDocumentItem = TextDocumentItem = {}));
      var MarkupKind;
      (function(MarkupKind2) {
        MarkupKind2.PlainText = "plaintext";
        MarkupKind2.Markdown = "markdown";
        function is(value) {
          var candidate = value;
          return candidate === MarkupKind2.PlainText || candidate === MarkupKind2.Markdown;
        }
        MarkupKind2.is = is;
      })(MarkupKind || (exports3.MarkupKind = MarkupKind = {}));
      var MarkupContent;
      (function(MarkupContent2) {
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
        }
        MarkupContent2.is = is;
      })(MarkupContent || (exports3.MarkupContent = MarkupContent = {}));
      var CompletionItemKind;
      (function(CompletionItemKind2) {
        CompletionItemKind2.Text = 1;
        CompletionItemKind2.Method = 2;
        CompletionItemKind2.Function = 3;
        CompletionItemKind2.Constructor = 4;
        CompletionItemKind2.Field = 5;
        CompletionItemKind2.Variable = 6;
        CompletionItemKind2.Class = 7;
        CompletionItemKind2.Interface = 8;
        CompletionItemKind2.Module = 9;
        CompletionItemKind2.Property = 10;
        CompletionItemKind2.Unit = 11;
        CompletionItemKind2.Value = 12;
        CompletionItemKind2.Enum = 13;
        CompletionItemKind2.Keyword = 14;
        CompletionItemKind2.Snippet = 15;
        CompletionItemKind2.Color = 16;
        CompletionItemKind2.File = 17;
        CompletionItemKind2.Reference = 18;
        CompletionItemKind2.Folder = 19;
        CompletionItemKind2.EnumMember = 20;
        CompletionItemKind2.Constant = 21;
        CompletionItemKind2.Struct = 22;
        CompletionItemKind2.Event = 23;
        CompletionItemKind2.Operator = 24;
        CompletionItemKind2.TypeParameter = 25;
      })(CompletionItemKind || (exports3.CompletionItemKind = CompletionItemKind = {}));
      var InsertTextFormat;
      (function(InsertTextFormat2) {
        InsertTextFormat2.PlainText = 1;
        InsertTextFormat2.Snippet = 2;
      })(InsertTextFormat || (exports3.InsertTextFormat = InsertTextFormat = {}));
      var CompletionItemTag;
      (function(CompletionItemTag2) {
        CompletionItemTag2.Deprecated = 1;
      })(CompletionItemTag || (exports3.CompletionItemTag = CompletionItemTag = {}));
      var InsertReplaceEdit;
      (function(InsertReplaceEdit2) {
        function create(newText, insert, replace) {
          return { newText, insert, replace };
        }
        InsertReplaceEdit2.create = create;
        function is(value) {
          var candidate = value;
          return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
        }
        InsertReplaceEdit2.is = is;
      })(InsertReplaceEdit || (exports3.InsertReplaceEdit = InsertReplaceEdit = {}));
      var InsertTextMode;
      (function(InsertTextMode2) {
        InsertTextMode2.asIs = 1;
        InsertTextMode2.adjustIndentation = 2;
      })(InsertTextMode || (exports3.InsertTextMode = InsertTextMode = {}));
      var CompletionItemLabelDetails;
      (function(CompletionItemLabelDetails2) {
        function is(value) {
          var candidate = value;
          return candidate && (Is.string(candidate.detail) || candidate.detail === void 0) && (Is.string(candidate.description) || candidate.description === void 0);
        }
        CompletionItemLabelDetails2.is = is;
      })(CompletionItemLabelDetails || (exports3.CompletionItemLabelDetails = CompletionItemLabelDetails = {}));
      var CompletionItem;
      (function(CompletionItem2) {
        function create(label) {
          return { label };
        }
        CompletionItem2.create = create;
      })(CompletionItem || (exports3.CompletionItem = CompletionItem = {}));
      var CompletionList;
      (function(CompletionList2) {
        function create(items, isIncomplete) {
          return { items: items ? items : [], isIncomplete: !!isIncomplete };
        }
        CompletionList2.create = create;
      })(CompletionList || (exports3.CompletionList = CompletionList = {}));
      var MarkedString;
      (function(MarkedString2) {
        function fromPlainText(plainText) {
          return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
        }
        MarkedString2.fromPlainText = fromPlainText;
        function is(value) {
          var candidate = value;
          return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value);
        }
        MarkedString2.is = is;
      })(MarkedString || (exports3.MarkedString = MarkedString = {}));
      var Hover;
      (function(Hover2) {
        function is(value) {
          var candidate = value;
          return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
        }
        Hover2.is = is;
      })(Hover || (exports3.Hover = Hover = {}));
      var ParameterInformation;
      (function(ParameterInformation2) {
        function create(label, documentation) {
          return documentation ? { label, documentation } : { label };
        }
        ParameterInformation2.create = create;
      })(ParameterInformation || (exports3.ParameterInformation = ParameterInformation = {}));
      var SignatureInformation;
      (function(SignatureInformation2) {
        function create(label, documentation) {
          var parameters = [];
          for (var _i = 2; _i < arguments.length; _i++) {
            parameters[_i - 2] = arguments[_i];
          }
          var result = { label };
          if (Is.defined(documentation)) {
            result.documentation = documentation;
          }
          if (Is.defined(parameters)) {
            result.parameters = parameters;
          } else {
            result.parameters = [];
          }
          return result;
        }
        SignatureInformation2.create = create;
      })(SignatureInformation || (exports3.SignatureInformation = SignatureInformation = {}));
      var DocumentHighlightKind;
      (function(DocumentHighlightKind2) {
        DocumentHighlightKind2.Text = 1;
        DocumentHighlightKind2.Read = 2;
        DocumentHighlightKind2.Write = 3;
      })(DocumentHighlightKind || (exports3.DocumentHighlightKind = DocumentHighlightKind = {}));
      var DocumentHighlight;
      (function(DocumentHighlight2) {
        function create(range, kind) {
          var result = { range };
          if (Is.number(kind)) {
            result.kind = kind;
          }
          return result;
        }
        DocumentHighlight2.create = create;
      })(DocumentHighlight || (exports3.DocumentHighlight = DocumentHighlight = {}));
      var SymbolKind;
      (function(SymbolKind2) {
        SymbolKind2.File = 1;
        SymbolKind2.Module = 2;
        SymbolKind2.Namespace = 3;
        SymbolKind2.Package = 4;
        SymbolKind2.Class = 5;
        SymbolKind2.Method = 6;
        SymbolKind2.Property = 7;
        SymbolKind2.Field = 8;
        SymbolKind2.Constructor = 9;
        SymbolKind2.Enum = 10;
        SymbolKind2.Interface = 11;
        SymbolKind2.Function = 12;
        SymbolKind2.Variable = 13;
        SymbolKind2.Constant = 14;
        SymbolKind2.String = 15;
        SymbolKind2.Number = 16;
        SymbolKind2.Boolean = 17;
        SymbolKind2.Array = 18;
        SymbolKind2.Object = 19;
        SymbolKind2.Key = 20;
        SymbolKind2.Null = 21;
        SymbolKind2.EnumMember = 22;
        SymbolKind2.Struct = 23;
        SymbolKind2.Event = 24;
        SymbolKind2.Operator = 25;
        SymbolKind2.TypeParameter = 26;
      })(SymbolKind || (exports3.SymbolKind = SymbolKind = {}));
      var SymbolTag;
      (function(SymbolTag2) {
        SymbolTag2.Deprecated = 1;
      })(SymbolTag || (exports3.SymbolTag = SymbolTag = {}));
      var SymbolInformation;
      (function(SymbolInformation2) {
        function create(name, kind, range, uri, containerName) {
          var result = {
            name,
            kind,
            location: { uri, range }
          };
          if (containerName) {
            result.containerName = containerName;
          }
          return result;
        }
        SymbolInformation2.create = create;
      })(SymbolInformation || (exports3.SymbolInformation = SymbolInformation = {}));
      var WorkspaceSymbol;
      (function(WorkspaceSymbol2) {
        function create(name, kind, uri, range) {
          return range !== void 0 ? { name, kind, location: { uri, range } } : { name, kind, location: { uri } };
        }
        WorkspaceSymbol2.create = create;
      })(WorkspaceSymbol || (exports3.WorkspaceSymbol = WorkspaceSymbol = {}));
      var DocumentSymbol;
      (function(DocumentSymbol2) {
        function create(name, detail, kind, range, selectionRange, children) {
          var result = {
            name,
            detail,
            kind,
            range,
            selectionRange
          };
          if (children !== void 0) {
            result.children = children;
          }
          return result;
        }
        DocumentSymbol2.create = create;
        function is(value) {
          var candidate = value;
          return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === void 0 || Is.string(candidate.detail)) && (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) && (candidate.children === void 0 || Array.isArray(candidate.children)) && (candidate.tags === void 0 || Array.isArray(candidate.tags));
        }
        DocumentSymbol2.is = is;
      })(DocumentSymbol || (exports3.DocumentSymbol = DocumentSymbol = {}));
      var CodeActionKind;
      (function(CodeActionKind2) {
        CodeActionKind2.Empty = "";
        CodeActionKind2.QuickFix = "quickfix";
        CodeActionKind2.Refactor = "refactor";
        CodeActionKind2.RefactorExtract = "refactor.extract";
        CodeActionKind2.RefactorInline = "refactor.inline";
        CodeActionKind2.RefactorRewrite = "refactor.rewrite";
        CodeActionKind2.Source = "source";
        CodeActionKind2.SourceOrganizeImports = "source.organizeImports";
        CodeActionKind2.SourceFixAll = "source.fixAll";
      })(CodeActionKind || (exports3.CodeActionKind = CodeActionKind = {}));
      var CodeActionTriggerKind;
      (function(CodeActionTriggerKind2) {
        CodeActionTriggerKind2.Invoked = 1;
        CodeActionTriggerKind2.Automatic = 2;
      })(CodeActionTriggerKind || (exports3.CodeActionTriggerKind = CodeActionTriggerKind = {}));
      var CodeActionContext;
      (function(CodeActionContext2) {
        function create(diagnostics, only, triggerKind) {
          var result = { diagnostics };
          if (only !== void 0 && only !== null) {
            result.only = only;
          }
          if (triggerKind !== void 0 && triggerKind !== null) {
            result.triggerKind = triggerKind;
          }
          return result;
        }
        CodeActionContext2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic2.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string)) && (candidate.triggerKind === void 0 || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
        }
        CodeActionContext2.is = is;
      })(CodeActionContext || (exports3.CodeActionContext = CodeActionContext = {}));
      var CodeAction;
      (function(CodeAction2) {
        function create(title, kindOrCommandOrEdit, kind) {
          var result = { title };
          var checkKind = true;
          if (typeof kindOrCommandOrEdit === "string") {
            checkKind = false;
            result.kind = kindOrCommandOrEdit;
          } else if (Command.is(kindOrCommandOrEdit)) {
            result.command = kindOrCommandOrEdit;
          } else {
            result.edit = kindOrCommandOrEdit;
          }
          if (checkKind && kind !== void 0) {
            result.kind = kind;
          }
          return result;
        }
        CodeAction2.create = create;
        function is(value) {
          var candidate = value;
          return candidate && Is.string(candidate.title) && (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic2.is)) && (candidate.kind === void 0 || Is.string(candidate.kind)) && (candidate.edit !== void 0 || candidate.command !== void 0) && (candidate.command === void 0 || Command.is(candidate.command)) && (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) && (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
        }
        CodeAction2.is = is;
      })(CodeAction || (exports3.CodeAction = CodeAction = {}));
      var CodeLens;
      (function(CodeLens2) {
        function create(range, data) {
          var result = { range };
          if (Is.defined(data)) {
            result.data = data;
          }
          return result;
        }
        CodeLens2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
        }
        CodeLens2.is = is;
      })(CodeLens || (exports3.CodeLens = CodeLens = {}));
      var FormattingOptions;
      (function(FormattingOptions2) {
        function create(tabSize, insertSpaces) {
          return { tabSize, insertSpaces };
        }
        FormattingOptions2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
        }
        FormattingOptions2.is = is;
      })(FormattingOptions || (exports3.FormattingOptions = FormattingOptions = {}));
      var DocumentLink;
      (function(DocumentLink2) {
        function create(range, target, data) {
          return { range, target, data };
        }
        DocumentLink2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
        }
        DocumentLink2.is = is;
      })(DocumentLink || (exports3.DocumentLink = DocumentLink = {}));
      var SelectionRange;
      (function(SelectionRange2) {
        function create(range, parent) {
          return { range, parent };
        }
        SelectionRange2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === void 0 || SelectionRange2.is(candidate.parent));
        }
        SelectionRange2.is = is;
      })(SelectionRange || (exports3.SelectionRange = SelectionRange = {}));
      var SemanticTokenTypes;
      (function(SemanticTokenTypes2) {
        SemanticTokenTypes2["namespace"] = "namespace";
        SemanticTokenTypes2["type"] = "type";
        SemanticTokenTypes2["class"] = "class";
        SemanticTokenTypes2["enum"] = "enum";
        SemanticTokenTypes2["interface"] = "interface";
        SemanticTokenTypes2["struct"] = "struct";
        SemanticTokenTypes2["typeParameter"] = "typeParameter";
        SemanticTokenTypes2["parameter"] = "parameter";
        SemanticTokenTypes2["variable"] = "variable";
        SemanticTokenTypes2["property"] = "property";
        SemanticTokenTypes2["enumMember"] = "enumMember";
        SemanticTokenTypes2["event"] = "event";
        SemanticTokenTypes2["function"] = "function";
        SemanticTokenTypes2["method"] = "method";
        SemanticTokenTypes2["macro"] = "macro";
        SemanticTokenTypes2["keyword"] = "keyword";
        SemanticTokenTypes2["modifier"] = "modifier";
        SemanticTokenTypes2["comment"] = "comment";
        SemanticTokenTypes2["string"] = "string";
        SemanticTokenTypes2["number"] = "number";
        SemanticTokenTypes2["regexp"] = "regexp";
        SemanticTokenTypes2["operator"] = "operator";
        SemanticTokenTypes2["decorator"] = "decorator";
      })(SemanticTokenTypes || (exports3.SemanticTokenTypes = SemanticTokenTypes = {}));
      var SemanticTokenModifiers;
      (function(SemanticTokenModifiers2) {
        SemanticTokenModifiers2["declaration"] = "declaration";
        SemanticTokenModifiers2["definition"] = "definition";
        SemanticTokenModifiers2["readonly"] = "readonly";
        SemanticTokenModifiers2["static"] = "static";
        SemanticTokenModifiers2["deprecated"] = "deprecated";
        SemanticTokenModifiers2["abstract"] = "abstract";
        SemanticTokenModifiers2["async"] = "async";
        SemanticTokenModifiers2["modification"] = "modification";
        SemanticTokenModifiers2["documentation"] = "documentation";
        SemanticTokenModifiers2["defaultLibrary"] = "defaultLibrary";
      })(SemanticTokenModifiers || (exports3.SemanticTokenModifiers = SemanticTokenModifiers = {}));
      var SemanticTokens;
      (function(SemanticTokens2) {
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && (candidate.resultId === void 0 || typeof candidate.resultId === "string") && Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === "number");
        }
        SemanticTokens2.is = is;
      })(SemanticTokens || (exports3.SemanticTokens = SemanticTokens = {}));
      var InlineValueText;
      (function(InlineValueText2) {
        function create(range, text) {
          return { range, text };
        }
        InlineValueText2.create = create;
        function is(value) {
          var candidate = value;
          return candidate !== void 0 && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
        }
        InlineValueText2.is = is;
      })(InlineValueText || (exports3.InlineValueText = InlineValueText = {}));
      var InlineValueVariableLookup;
      (function(InlineValueVariableLookup2) {
        function create(range, variableName, caseSensitiveLookup) {
          return { range, variableName, caseSensitiveLookup };
        }
        InlineValueVariableLookup2.create = create;
        function is(value) {
          var candidate = value;
          return candidate !== void 0 && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) && (Is.string(candidate.variableName) || candidate.variableName === void 0);
        }
        InlineValueVariableLookup2.is = is;
      })(InlineValueVariableLookup || (exports3.InlineValueVariableLookup = InlineValueVariableLookup = {}));
      var InlineValueEvaluatableExpression;
      (function(InlineValueEvaluatableExpression2) {
        function create(range, expression) {
          return { range, expression };
        }
        InlineValueEvaluatableExpression2.create = create;
        function is(value) {
          var candidate = value;
          return candidate !== void 0 && candidate !== null && Range.is(candidate.range) && (Is.string(candidate.expression) || candidate.expression === void 0);
        }
        InlineValueEvaluatableExpression2.is = is;
      })(InlineValueEvaluatableExpression || (exports3.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {}));
      var InlineValueContext;
      (function(InlineValueContext2) {
        function create(frameId, stoppedLocation) {
          return { frameId, stoppedLocation };
        }
        InlineValueContext2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Range.is(value.stoppedLocation);
        }
        InlineValueContext2.is = is;
      })(InlineValueContext || (exports3.InlineValueContext = InlineValueContext = {}));
      var InlayHintKind;
      (function(InlayHintKind2) {
        InlayHintKind2.Type = 1;
        InlayHintKind2.Parameter = 2;
        function is(value) {
          return value === 1 || value === 2;
        }
        InlayHintKind2.is = is;
      })(InlayHintKind || (exports3.InlayHintKind = InlayHintKind = {}));
      var InlayHintLabelPart;
      (function(InlayHintLabelPart2) {
        function create(value) {
          return { value };
        }
        InlayHintLabelPart2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && (candidate.tooltip === void 0 || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.location === void 0 || Location.is(candidate.location)) && (candidate.command === void 0 || Command.is(candidate.command));
        }
        InlayHintLabelPart2.is = is;
      })(InlayHintLabelPart || (exports3.InlayHintLabelPart = InlayHintLabelPart = {}));
      var InlayHint;
      (function(InlayHint2) {
        function create(position, label, kind) {
          var result = { position, label };
          if (kind !== void 0) {
            result.kind = kind;
          }
          return result;
        }
        InlayHint2.create = create;
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && Position.is(candidate.position) && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) && (candidate.kind === void 0 || InlayHintKind.is(candidate.kind)) && candidate.textEdits === void 0 || Is.typedArray(candidate.textEdits, TextEdit.is) && (candidate.tooltip === void 0 || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.paddingLeft === void 0 || Is.boolean(candidate.paddingLeft)) && (candidate.paddingRight === void 0 || Is.boolean(candidate.paddingRight));
        }
        InlayHint2.is = is;
      })(InlayHint || (exports3.InlayHint = InlayHint = {}));
      var StringValue;
      (function(StringValue2) {
        function createSnippet(value) {
          return { kind: "snippet", value };
        }
        StringValue2.createSnippet = createSnippet;
      })(StringValue || (exports3.StringValue = StringValue = {}));
      var InlineCompletionItem;
      (function(InlineCompletionItem2) {
        function create(insertText, filterText, range, command) {
          return { insertText, filterText, range, command };
        }
        InlineCompletionItem2.create = create;
      })(InlineCompletionItem || (exports3.InlineCompletionItem = InlineCompletionItem = {}));
      var InlineCompletionList;
      (function(InlineCompletionList2) {
        function create(items) {
          return { items };
        }
        InlineCompletionList2.create = create;
      })(InlineCompletionList || (exports3.InlineCompletionList = InlineCompletionList = {}));
      var InlineCompletionTriggerKind;
      (function(InlineCompletionTriggerKind2) {
        InlineCompletionTriggerKind2.Invoked = 0;
        InlineCompletionTriggerKind2.Automatic = 1;
      })(InlineCompletionTriggerKind || (exports3.InlineCompletionTriggerKind = InlineCompletionTriggerKind = {}));
      var SelectedCompletionInfo;
      (function(SelectedCompletionInfo2) {
        function create(range, text) {
          return { range, text };
        }
        SelectedCompletionInfo2.create = create;
      })(SelectedCompletionInfo || (exports3.SelectedCompletionInfo = SelectedCompletionInfo = {}));
      var InlineCompletionContext;
      (function(InlineCompletionContext2) {
        function create(triggerKind, selectedCompletionInfo) {
          return { triggerKind, selectedCompletionInfo };
        }
        InlineCompletionContext2.create = create;
      })(InlineCompletionContext || (exports3.InlineCompletionContext = InlineCompletionContext = {}));
      var WorkspaceFolder;
      (function(WorkspaceFolder2) {
        function is(value) {
          var candidate = value;
          return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
        }
        WorkspaceFolder2.is = is;
      })(WorkspaceFolder || (exports3.WorkspaceFolder = WorkspaceFolder = {}));
      exports3.EOL = ["\n", "\r\n", "\r"];
      var TextDocument;
      (function(TextDocument2) {
        function create(uri, languageId, version2, content) {
          return new FullTextDocument(uri, languageId, version2, content);
        }
        TextDocument2.create = create;
        function is(value) {
          var candidate = value;
          return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
        }
        TextDocument2.is = is;
        function applyEdits(document, edits) {
          var text = document.getText();
          var sortedEdits = mergeSort(edits, function(a, b) {
            var diff = a.range.start.line - b.range.start.line;
            if (diff === 0) {
              return a.range.start.character - b.range.start.character;
            }
            return diff;
          });
          var lastModifiedOffset = text.length;
          for (var i = sortedEdits.length - 1; i >= 0; i--) {
            var e = sortedEdits[i];
            var startOffset = document.offsetAt(e.range.start);
            var endOffset = document.offsetAt(e.range.end);
            if (endOffset <= lastModifiedOffset) {
              text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
            } else {
              throw new Error("Overlapping edit");
            }
            lastModifiedOffset = startOffset;
          }
          return text;
        }
        TextDocument2.applyEdits = applyEdits;
        function mergeSort(data, compare) {
          if (data.length <= 1) {
            return data;
          }
          var p = data.length / 2 | 0;
          var left = data.slice(0, p);
          var right = data.slice(p);
          mergeSort(left, compare);
          mergeSort(right, compare);
          var leftIdx = 0;
          var rightIdx = 0;
          var i = 0;
          while (leftIdx < left.length && rightIdx < right.length) {
            var ret = compare(left[leftIdx], right[rightIdx]);
            if (ret <= 0) {
              data[i++] = left[leftIdx++];
            } else {
              data[i++] = right[rightIdx++];
            }
          }
          while (leftIdx < left.length) {
            data[i++] = left[leftIdx++];
          }
          while (rightIdx < right.length) {
            data[i++] = right[rightIdx++];
          }
          return data;
        }
      })(TextDocument || (exports3.TextDocument = TextDocument = {}));
      var FullTextDocument = (
        /** @class */
        (function() {
          function FullTextDocument2(uri, languageId, version2, content) {
            this._uri = uri;
            this._languageId = languageId;
            this._version = version2;
            this._content = content;
            this._lineOffsets = void 0;
          }
          Object.defineProperty(FullTextDocument2.prototype, "uri", {
            get: function() {
              return this._uri;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(FullTextDocument2.prototype, "languageId", {
            get: function() {
              return this._languageId;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(FullTextDocument2.prototype, "version", {
            get: function() {
              return this._version;
            },
            enumerable: false,
            configurable: true
          });
          FullTextDocument2.prototype.getText = function(range) {
            if (range) {
              var start = this.offsetAt(range.start);
              var end = this.offsetAt(range.end);
              return this._content.substring(start, end);
            }
            return this._content;
          };
          FullTextDocument2.prototype.update = function(event, version2) {
            this._content = event.text;
            this._version = version2;
            this._lineOffsets = void 0;
          };
          FullTextDocument2.prototype.getLineOffsets = function() {
            if (this._lineOffsets === void 0) {
              var lineOffsets = [];
              var text = this._content;
              var isLineStart = true;
              for (var i = 0; i < text.length; i++) {
                if (isLineStart) {
                  lineOffsets.push(i);
                  isLineStart = false;
                }
                var ch = text.charAt(i);
                isLineStart = ch === "\r" || ch === "\n";
                if (ch === "\r" && i + 1 < text.length && text.charAt(i + 1) === "\n") {
                  i++;
                }
              }
              if (isLineStart && text.length > 0) {
                lineOffsets.push(text.length);
              }
              this._lineOffsets = lineOffsets;
            }
            return this._lineOffsets;
          };
          FullTextDocument2.prototype.positionAt = function(offset) {
            offset = Math.max(Math.min(offset, this._content.length), 0);
            var lineOffsets = this.getLineOffsets();
            var low = 0, high = lineOffsets.length;
            if (high === 0) {
              return Position.create(0, offset);
            }
            while (low < high) {
              var mid = Math.floor((low + high) / 2);
              if (lineOffsets[mid] > offset) {
                high = mid;
              } else {
                low = mid + 1;
              }
            }
            var line = low - 1;
            return Position.create(line, offset - lineOffsets[line]);
          };
          FullTextDocument2.prototype.offsetAt = function(position) {
            var lineOffsets = this.getLineOffsets();
            if (position.line >= lineOffsets.length) {
              return this._content.length;
            } else if (position.line < 0) {
              return 0;
            }
            var lineOffset = lineOffsets[position.line];
            var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length;
            return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
          };
          Object.defineProperty(FullTextDocument2.prototype, "lineCount", {
            get: function() {
              return this.getLineOffsets().length;
            },
            enumerable: false,
            configurable: true
          });
          return FullTextDocument2;
        })()
      );
      var Is;
      (function(Is2) {
        var toString = Object.prototype.toString;
        function defined(value) {
          return typeof value !== "undefined";
        }
        Is2.defined = defined;
        function undefined2(value) {
          return typeof value === "undefined";
        }
        Is2.undefined = undefined2;
        function boolean4(value) {
          return value === true || value === false;
        }
        Is2.boolean = boolean4;
        function string4(value) {
          return toString.call(value) === "[object String]";
        }
        Is2.string = string4;
        function number4(value) {
          return toString.call(value) === "[object Number]";
        }
        Is2.number = number4;
        function numberRange(value, min, max) {
          return toString.call(value) === "[object Number]" && min <= value && value <= max;
        }
        Is2.numberRange = numberRange;
        function integer3(value) {
          return toString.call(value) === "[object Number]" && -2147483648 <= value && value <= 2147483647;
        }
        Is2.integer = integer3;
        function uinteger2(value) {
          return toString.call(value) === "[object Number]" && 0 <= value && value <= 2147483647;
        }
        Is2.uinteger = uinteger2;
        function func(value) {
          return toString.call(value) === "[object Function]";
        }
        Is2.func = func;
        function objectLiteral(value) {
          return value !== null && typeof value === "object";
        }
        Is2.objectLiteral = objectLiteral;
        function typedArray(value, check2) {
          return Array.isArray(value) && value.every(check2);
        }
        Is2.typedArray = typedArray;
      })(Is || (Is = {}));
    });
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/messages.js
var require_messages2 = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ProtocolNotificationType = exports2.ProtocolNotificationType0 = exports2.ProtocolRequestType = exports2.ProtocolRequestType0 = exports2.RegistrationType = exports2.MessageDirection = void 0;
    var vscode_jsonrpc_1 = require_main();
    var MessageDirection;
    (function(MessageDirection2) {
      MessageDirection2["clientToServer"] = "clientToServer";
      MessageDirection2["serverToClient"] = "serverToClient";
      MessageDirection2["both"] = "both";
    })(MessageDirection || (exports2.MessageDirection = MessageDirection = {}));
    var RegistrationType = class {
      constructor(method) {
        this.method = method;
      }
    };
    exports2.RegistrationType = RegistrationType;
    var ProtocolRequestType0 = class extends vscode_jsonrpc_1.RequestType0 {
      constructor(method) {
        super(method);
      }
    };
    exports2.ProtocolRequestType0 = ProtocolRequestType0;
    var ProtocolRequestType = class extends vscode_jsonrpc_1.RequestType {
      constructor(method) {
        super(method, vscode_jsonrpc_1.ParameterStructures.byName);
      }
    };
    exports2.ProtocolRequestType = ProtocolRequestType;
    var ProtocolNotificationType0 = class extends vscode_jsonrpc_1.NotificationType0 {
      constructor(method) {
        super(method);
      }
    };
    exports2.ProtocolNotificationType0 = ProtocolNotificationType0;
    var ProtocolNotificationType = class extends vscode_jsonrpc_1.NotificationType {
      constructor(method) {
        super(method, vscode_jsonrpc_1.ParameterStructures.byName);
      }
    };
    exports2.ProtocolNotificationType = ProtocolNotificationType;
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js
var require_is3 = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.objectLiteral = exports2.typedArray = exports2.stringArray = exports2.array = exports2.func = exports2.error = exports2.number = exports2.string = exports2.boolean = void 0;
    function boolean4(value) {
      return value === true || value === false;
    }
    exports2.boolean = boolean4;
    function string4(value) {
      return typeof value === "string" || value instanceof String;
    }
    exports2.string = string4;
    function number4(value) {
      return typeof value === "number" || value instanceof Number;
    }
    exports2.number = number4;
    function error51(value) {
      return value instanceof Error;
    }
    exports2.error = error51;
    function func(value) {
      return typeof value === "function";
    }
    exports2.func = func;
    function array2(value) {
      return Array.isArray(value);
    }
    exports2.array = array2;
    function stringArray(value) {
      return array2(value) && value.every((elem) => string4(elem));
    }
    exports2.stringArray = stringArray;
    function typedArray(value, check2) {
      return Array.isArray(value) && value.every(check2);
    }
    exports2.typedArray = typedArray;
    function objectLiteral(value) {
      return value !== null && typeof value === "object";
    }
    exports2.objectLiteral = objectLiteral;
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js
var require_protocol_implementation = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ImplementationRequest = void 0;
    var messages_1 = require_messages2();
    var ImplementationRequest;
    (function(ImplementationRequest2) {
      ImplementationRequest2.method = "textDocument/implementation";
      ImplementationRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      ImplementationRequest2.type = new messages_1.ProtocolRequestType(ImplementationRequest2.method);
    })(ImplementationRequest || (exports2.ImplementationRequest = ImplementationRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js
var require_protocol_typeDefinition = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.TypeDefinitionRequest = void 0;
    var messages_1 = require_messages2();
    var TypeDefinitionRequest;
    (function(TypeDefinitionRequest2) {
      TypeDefinitionRequest2.method = "textDocument/typeDefinition";
      TypeDefinitionRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      TypeDefinitionRequest2.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest2.method);
    })(TypeDefinitionRequest || (exports2.TypeDefinitionRequest = TypeDefinitionRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js
var require_protocol_workspaceFolder = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.DidChangeWorkspaceFoldersNotification = exports2.WorkspaceFoldersRequest = void 0;
    var messages_1 = require_messages2();
    var WorkspaceFoldersRequest;
    (function(WorkspaceFoldersRequest2) {
      WorkspaceFoldersRequest2.method = "workspace/workspaceFolders";
      WorkspaceFoldersRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      WorkspaceFoldersRequest2.type = new messages_1.ProtocolRequestType0(WorkspaceFoldersRequest2.method);
    })(WorkspaceFoldersRequest || (exports2.WorkspaceFoldersRequest = WorkspaceFoldersRequest = {}));
    var DidChangeWorkspaceFoldersNotification;
    (function(DidChangeWorkspaceFoldersNotification2) {
      DidChangeWorkspaceFoldersNotification2.method = "workspace/didChangeWorkspaceFolders";
      DidChangeWorkspaceFoldersNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidChangeWorkspaceFoldersNotification2.type = new messages_1.ProtocolNotificationType(DidChangeWorkspaceFoldersNotification2.method);
    })(DidChangeWorkspaceFoldersNotification || (exports2.DidChangeWorkspaceFoldersNotification = DidChangeWorkspaceFoldersNotification = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js
var require_protocol_configuration = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ConfigurationRequest = void 0;
    var messages_1 = require_messages2();
    var ConfigurationRequest;
    (function(ConfigurationRequest2) {
      ConfigurationRequest2.method = "workspace/configuration";
      ConfigurationRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      ConfigurationRequest2.type = new messages_1.ProtocolRequestType(ConfigurationRequest2.method);
    })(ConfigurationRequest || (exports2.ConfigurationRequest = ConfigurationRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js
var require_protocol_colorProvider = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ColorPresentationRequest = exports2.DocumentColorRequest = void 0;
    var messages_1 = require_messages2();
    var DocumentColorRequest;
    (function(DocumentColorRequest2) {
      DocumentColorRequest2.method = "textDocument/documentColor";
      DocumentColorRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentColorRequest2.type = new messages_1.ProtocolRequestType(DocumentColorRequest2.method);
    })(DocumentColorRequest || (exports2.DocumentColorRequest = DocumentColorRequest = {}));
    var ColorPresentationRequest;
    (function(ColorPresentationRequest2) {
      ColorPresentationRequest2.method = "textDocument/colorPresentation";
      ColorPresentationRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      ColorPresentationRequest2.type = new messages_1.ProtocolRequestType(ColorPresentationRequest2.method);
    })(ColorPresentationRequest || (exports2.ColorPresentationRequest = ColorPresentationRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js
var require_protocol_foldingRange = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.FoldingRangeRefreshRequest = exports2.FoldingRangeRequest = void 0;
    var messages_1 = require_messages2();
    var FoldingRangeRequest;
    (function(FoldingRangeRequest2) {
      FoldingRangeRequest2.method = "textDocument/foldingRange";
      FoldingRangeRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      FoldingRangeRequest2.type = new messages_1.ProtocolRequestType(FoldingRangeRequest2.method);
    })(FoldingRangeRequest || (exports2.FoldingRangeRequest = FoldingRangeRequest = {}));
    var FoldingRangeRefreshRequest;
    (function(FoldingRangeRefreshRequest2) {
      FoldingRangeRefreshRequest2.method = `workspace/foldingRange/refresh`;
      FoldingRangeRefreshRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      FoldingRangeRefreshRequest2.type = new messages_1.ProtocolRequestType0(FoldingRangeRefreshRequest2.method);
    })(FoldingRangeRefreshRequest || (exports2.FoldingRangeRefreshRequest = FoldingRangeRefreshRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js
var require_protocol_declaration = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.DeclarationRequest = void 0;
    var messages_1 = require_messages2();
    var DeclarationRequest;
    (function(DeclarationRequest2) {
      DeclarationRequest2.method = "textDocument/declaration";
      DeclarationRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DeclarationRequest2.type = new messages_1.ProtocolRequestType(DeclarationRequest2.method);
    })(DeclarationRequest || (exports2.DeclarationRequest = DeclarationRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js
var require_protocol_selectionRange = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.SelectionRangeRequest = void 0;
    var messages_1 = require_messages2();
    var SelectionRangeRequest;
    (function(SelectionRangeRequest2) {
      SelectionRangeRequest2.method = "textDocument/selectionRange";
      SelectionRangeRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      SelectionRangeRequest2.type = new messages_1.ProtocolRequestType(SelectionRangeRequest2.method);
    })(SelectionRangeRequest || (exports2.SelectionRangeRequest = SelectionRangeRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js
var require_protocol_progress = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.WorkDoneProgressCancelNotification = exports2.WorkDoneProgressCreateRequest = exports2.WorkDoneProgress = void 0;
    var vscode_jsonrpc_1 = require_main();
    var messages_1 = require_messages2();
    var WorkDoneProgress;
    (function(WorkDoneProgress2) {
      WorkDoneProgress2.type = new vscode_jsonrpc_1.ProgressType();
      function is(value) {
        return value === WorkDoneProgress2.type;
      }
      WorkDoneProgress2.is = is;
    })(WorkDoneProgress || (exports2.WorkDoneProgress = WorkDoneProgress = {}));
    var WorkDoneProgressCreateRequest;
    (function(WorkDoneProgressCreateRequest2) {
      WorkDoneProgressCreateRequest2.method = "window/workDoneProgress/create";
      WorkDoneProgressCreateRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      WorkDoneProgressCreateRequest2.type = new messages_1.ProtocolRequestType(WorkDoneProgressCreateRequest2.method);
    })(WorkDoneProgressCreateRequest || (exports2.WorkDoneProgressCreateRequest = WorkDoneProgressCreateRequest = {}));
    var WorkDoneProgressCancelNotification;
    (function(WorkDoneProgressCancelNotification2) {
      WorkDoneProgressCancelNotification2.method = "window/workDoneProgress/cancel";
      WorkDoneProgressCancelNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      WorkDoneProgressCancelNotification2.type = new messages_1.ProtocolNotificationType(WorkDoneProgressCancelNotification2.method);
    })(WorkDoneProgressCancelNotification || (exports2.WorkDoneProgressCancelNotification = WorkDoneProgressCancelNotification = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js
var require_protocol_callHierarchy = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.CallHierarchyOutgoingCallsRequest = exports2.CallHierarchyIncomingCallsRequest = exports2.CallHierarchyPrepareRequest = void 0;
    var messages_1 = require_messages2();
    var CallHierarchyPrepareRequest;
    (function(CallHierarchyPrepareRequest2) {
      CallHierarchyPrepareRequest2.method = "textDocument/prepareCallHierarchy";
      CallHierarchyPrepareRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CallHierarchyPrepareRequest2.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest2.method);
    })(CallHierarchyPrepareRequest || (exports2.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {}));
    var CallHierarchyIncomingCallsRequest;
    (function(CallHierarchyIncomingCallsRequest2) {
      CallHierarchyIncomingCallsRequest2.method = "callHierarchy/incomingCalls";
      CallHierarchyIncomingCallsRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CallHierarchyIncomingCallsRequest2.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest2.method);
    })(CallHierarchyIncomingCallsRequest || (exports2.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {}));
    var CallHierarchyOutgoingCallsRequest;
    (function(CallHierarchyOutgoingCallsRequest2) {
      CallHierarchyOutgoingCallsRequest2.method = "callHierarchy/outgoingCalls";
      CallHierarchyOutgoingCallsRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CallHierarchyOutgoingCallsRequest2.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest2.method);
    })(CallHierarchyOutgoingCallsRequest || (exports2.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js
var require_protocol_semanticTokens = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.SemanticTokensRefreshRequest = exports2.SemanticTokensRangeRequest = exports2.SemanticTokensDeltaRequest = exports2.SemanticTokensRequest = exports2.SemanticTokensRegistrationType = exports2.TokenFormat = void 0;
    var messages_1 = require_messages2();
    var TokenFormat;
    (function(TokenFormat2) {
      TokenFormat2.Relative = "relative";
    })(TokenFormat || (exports2.TokenFormat = TokenFormat = {}));
    var SemanticTokensRegistrationType;
    (function(SemanticTokensRegistrationType2) {
      SemanticTokensRegistrationType2.method = "textDocument/semanticTokens";
      SemanticTokensRegistrationType2.type = new messages_1.RegistrationType(SemanticTokensRegistrationType2.method);
    })(SemanticTokensRegistrationType || (exports2.SemanticTokensRegistrationType = SemanticTokensRegistrationType = {}));
    var SemanticTokensRequest;
    (function(SemanticTokensRequest2) {
      SemanticTokensRequest2.method = "textDocument/semanticTokens/full";
      SemanticTokensRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      SemanticTokensRequest2.type = new messages_1.ProtocolRequestType(SemanticTokensRequest2.method);
      SemanticTokensRequest2.registrationMethod = SemanticTokensRegistrationType.method;
    })(SemanticTokensRequest || (exports2.SemanticTokensRequest = SemanticTokensRequest = {}));
    var SemanticTokensDeltaRequest;
    (function(SemanticTokensDeltaRequest2) {
      SemanticTokensDeltaRequest2.method = "textDocument/semanticTokens/full/delta";
      SemanticTokensDeltaRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      SemanticTokensDeltaRequest2.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest2.method);
      SemanticTokensDeltaRequest2.registrationMethod = SemanticTokensRegistrationType.method;
    })(SemanticTokensDeltaRequest || (exports2.SemanticTokensDeltaRequest = SemanticTokensDeltaRequest = {}));
    var SemanticTokensRangeRequest;
    (function(SemanticTokensRangeRequest2) {
      SemanticTokensRangeRequest2.method = "textDocument/semanticTokens/range";
      SemanticTokensRangeRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      SemanticTokensRangeRequest2.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest2.method);
      SemanticTokensRangeRequest2.registrationMethod = SemanticTokensRegistrationType.method;
    })(SemanticTokensRangeRequest || (exports2.SemanticTokensRangeRequest = SemanticTokensRangeRequest = {}));
    var SemanticTokensRefreshRequest;
    (function(SemanticTokensRefreshRequest2) {
      SemanticTokensRefreshRequest2.method = `workspace/semanticTokens/refresh`;
      SemanticTokensRefreshRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      SemanticTokensRefreshRequest2.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest2.method);
    })(SemanticTokensRefreshRequest || (exports2.SemanticTokensRefreshRequest = SemanticTokensRefreshRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js
var require_protocol_showDocument = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ShowDocumentRequest = void 0;
    var messages_1 = require_messages2();
    var ShowDocumentRequest;
    (function(ShowDocumentRequest2) {
      ShowDocumentRequest2.method = "window/showDocument";
      ShowDocumentRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      ShowDocumentRequest2.type = new messages_1.ProtocolRequestType(ShowDocumentRequest2.method);
    })(ShowDocumentRequest || (exports2.ShowDocumentRequest = ShowDocumentRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js
var require_protocol_linkedEditingRange = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.LinkedEditingRangeRequest = void 0;
    var messages_1 = require_messages2();
    var LinkedEditingRangeRequest;
    (function(LinkedEditingRangeRequest2) {
      LinkedEditingRangeRequest2.method = "textDocument/linkedEditingRange";
      LinkedEditingRangeRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      LinkedEditingRangeRequest2.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest2.method);
    })(LinkedEditingRangeRequest || (exports2.LinkedEditingRangeRequest = LinkedEditingRangeRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js
var require_protocol_fileOperations = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.WillDeleteFilesRequest = exports2.DidDeleteFilesNotification = exports2.DidRenameFilesNotification = exports2.WillRenameFilesRequest = exports2.DidCreateFilesNotification = exports2.WillCreateFilesRequest = exports2.FileOperationPatternKind = void 0;
    var messages_1 = require_messages2();
    var FileOperationPatternKind;
    (function(FileOperationPatternKind2) {
      FileOperationPatternKind2.file = "file";
      FileOperationPatternKind2.folder = "folder";
    })(FileOperationPatternKind || (exports2.FileOperationPatternKind = FileOperationPatternKind = {}));
    var WillCreateFilesRequest;
    (function(WillCreateFilesRequest2) {
      WillCreateFilesRequest2.method = "workspace/willCreateFiles";
      WillCreateFilesRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      WillCreateFilesRequest2.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest2.method);
    })(WillCreateFilesRequest || (exports2.WillCreateFilesRequest = WillCreateFilesRequest = {}));
    var DidCreateFilesNotification;
    (function(DidCreateFilesNotification2) {
      DidCreateFilesNotification2.method = "workspace/didCreateFiles";
      DidCreateFilesNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidCreateFilesNotification2.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification2.method);
    })(DidCreateFilesNotification || (exports2.DidCreateFilesNotification = DidCreateFilesNotification = {}));
    var WillRenameFilesRequest;
    (function(WillRenameFilesRequest2) {
      WillRenameFilesRequest2.method = "workspace/willRenameFiles";
      WillRenameFilesRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      WillRenameFilesRequest2.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest2.method);
    })(WillRenameFilesRequest || (exports2.WillRenameFilesRequest = WillRenameFilesRequest = {}));
    var DidRenameFilesNotification;
    (function(DidRenameFilesNotification2) {
      DidRenameFilesNotification2.method = "workspace/didRenameFiles";
      DidRenameFilesNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidRenameFilesNotification2.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification2.method);
    })(DidRenameFilesNotification || (exports2.DidRenameFilesNotification = DidRenameFilesNotification = {}));
    var DidDeleteFilesNotification;
    (function(DidDeleteFilesNotification2) {
      DidDeleteFilesNotification2.method = "workspace/didDeleteFiles";
      DidDeleteFilesNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidDeleteFilesNotification2.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification2.method);
    })(DidDeleteFilesNotification || (exports2.DidDeleteFilesNotification = DidDeleteFilesNotification = {}));
    var WillDeleteFilesRequest;
    (function(WillDeleteFilesRequest2) {
      WillDeleteFilesRequest2.method = "workspace/willDeleteFiles";
      WillDeleteFilesRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      WillDeleteFilesRequest2.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest2.method);
    })(WillDeleteFilesRequest || (exports2.WillDeleteFilesRequest = WillDeleteFilesRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js
var require_protocol_moniker = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.MonikerRequest = exports2.MonikerKind = exports2.UniquenessLevel = void 0;
    var messages_1 = require_messages2();
    var UniquenessLevel;
    (function(UniquenessLevel2) {
      UniquenessLevel2.document = "document";
      UniquenessLevel2.project = "project";
      UniquenessLevel2.group = "group";
      UniquenessLevel2.scheme = "scheme";
      UniquenessLevel2.global = "global";
    })(UniquenessLevel || (exports2.UniquenessLevel = UniquenessLevel = {}));
    var MonikerKind;
    (function(MonikerKind2) {
      MonikerKind2.$import = "import";
      MonikerKind2.$export = "export";
      MonikerKind2.local = "local";
    })(MonikerKind || (exports2.MonikerKind = MonikerKind = {}));
    var MonikerRequest;
    (function(MonikerRequest2) {
      MonikerRequest2.method = "textDocument/moniker";
      MonikerRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      MonikerRequest2.type = new messages_1.ProtocolRequestType(MonikerRequest2.method);
    })(MonikerRequest || (exports2.MonikerRequest = MonikerRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js
var require_protocol_typeHierarchy = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.TypeHierarchySubtypesRequest = exports2.TypeHierarchySupertypesRequest = exports2.TypeHierarchyPrepareRequest = void 0;
    var messages_1 = require_messages2();
    var TypeHierarchyPrepareRequest;
    (function(TypeHierarchyPrepareRequest2) {
      TypeHierarchyPrepareRequest2.method = "textDocument/prepareTypeHierarchy";
      TypeHierarchyPrepareRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      TypeHierarchyPrepareRequest2.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest2.method);
    })(TypeHierarchyPrepareRequest || (exports2.TypeHierarchyPrepareRequest = TypeHierarchyPrepareRequest = {}));
    var TypeHierarchySupertypesRequest;
    (function(TypeHierarchySupertypesRequest2) {
      TypeHierarchySupertypesRequest2.method = "typeHierarchy/supertypes";
      TypeHierarchySupertypesRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      TypeHierarchySupertypesRequest2.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest2.method);
    })(TypeHierarchySupertypesRequest || (exports2.TypeHierarchySupertypesRequest = TypeHierarchySupertypesRequest = {}));
    var TypeHierarchySubtypesRequest;
    (function(TypeHierarchySubtypesRequest2) {
      TypeHierarchySubtypesRequest2.method = "typeHierarchy/subtypes";
      TypeHierarchySubtypesRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      TypeHierarchySubtypesRequest2.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest2.method);
    })(TypeHierarchySubtypesRequest || (exports2.TypeHierarchySubtypesRequest = TypeHierarchySubtypesRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js
var require_protocol_inlineValue = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.InlineValueRefreshRequest = exports2.InlineValueRequest = void 0;
    var messages_1 = require_messages2();
    var InlineValueRequest;
    (function(InlineValueRequest2) {
      InlineValueRequest2.method = "textDocument/inlineValue";
      InlineValueRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      InlineValueRequest2.type = new messages_1.ProtocolRequestType(InlineValueRequest2.method);
    })(InlineValueRequest || (exports2.InlineValueRequest = InlineValueRequest = {}));
    var InlineValueRefreshRequest;
    (function(InlineValueRefreshRequest2) {
      InlineValueRefreshRequest2.method = `workspace/inlineValue/refresh`;
      InlineValueRefreshRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      InlineValueRefreshRequest2.type = new messages_1.ProtocolRequestType0(InlineValueRefreshRequest2.method);
    })(InlineValueRefreshRequest || (exports2.InlineValueRefreshRequest = InlineValueRefreshRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js
var require_protocol_inlayHint = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.InlayHintRefreshRequest = exports2.InlayHintResolveRequest = exports2.InlayHintRequest = void 0;
    var messages_1 = require_messages2();
    var InlayHintRequest;
    (function(InlayHintRequest2) {
      InlayHintRequest2.method = "textDocument/inlayHint";
      InlayHintRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      InlayHintRequest2.type = new messages_1.ProtocolRequestType(InlayHintRequest2.method);
    })(InlayHintRequest || (exports2.InlayHintRequest = InlayHintRequest = {}));
    var InlayHintResolveRequest;
    (function(InlayHintResolveRequest2) {
      InlayHintResolveRequest2.method = "inlayHint/resolve";
      InlayHintResolveRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      InlayHintResolveRequest2.type = new messages_1.ProtocolRequestType(InlayHintResolveRequest2.method);
    })(InlayHintResolveRequest || (exports2.InlayHintResolveRequest = InlayHintResolveRequest = {}));
    var InlayHintRefreshRequest;
    (function(InlayHintRefreshRequest2) {
      InlayHintRefreshRequest2.method = `workspace/inlayHint/refresh`;
      InlayHintRefreshRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      InlayHintRefreshRequest2.type = new messages_1.ProtocolRequestType0(InlayHintRefreshRequest2.method);
    })(InlayHintRefreshRequest || (exports2.InlayHintRefreshRequest = InlayHintRefreshRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js
var require_protocol_diagnostic = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.DiagnosticRefreshRequest = exports2.WorkspaceDiagnosticRequest = exports2.DocumentDiagnosticRequest = exports2.DocumentDiagnosticReportKind = exports2.DiagnosticServerCancellationData = void 0;
    var vscode_jsonrpc_1 = require_main();
    var Is = require_is3();
    var messages_1 = require_messages2();
    var DiagnosticServerCancellationData;
    (function(DiagnosticServerCancellationData2) {
      function is(value) {
        const candidate = value;
        return candidate && Is.boolean(candidate.retriggerRequest);
      }
      DiagnosticServerCancellationData2.is = is;
    })(DiagnosticServerCancellationData || (exports2.DiagnosticServerCancellationData = DiagnosticServerCancellationData = {}));
    var DocumentDiagnosticReportKind;
    (function(DocumentDiagnosticReportKind2) {
      DocumentDiagnosticReportKind2.Full = "full";
      DocumentDiagnosticReportKind2.Unchanged = "unchanged";
    })(DocumentDiagnosticReportKind || (exports2.DocumentDiagnosticReportKind = DocumentDiagnosticReportKind = {}));
    var DocumentDiagnosticRequest;
    (function(DocumentDiagnosticRequest2) {
      DocumentDiagnosticRequest2.method = "textDocument/diagnostic";
      DocumentDiagnosticRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentDiagnosticRequest2.type = new messages_1.ProtocolRequestType(DocumentDiagnosticRequest2.method);
      DocumentDiagnosticRequest2.partialResult = new vscode_jsonrpc_1.ProgressType();
    })(DocumentDiagnosticRequest || (exports2.DocumentDiagnosticRequest = DocumentDiagnosticRequest = {}));
    var WorkspaceDiagnosticRequest;
    (function(WorkspaceDiagnosticRequest2) {
      WorkspaceDiagnosticRequest2.method = "workspace/diagnostic";
      WorkspaceDiagnosticRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      WorkspaceDiagnosticRequest2.type = new messages_1.ProtocolRequestType(WorkspaceDiagnosticRequest2.method);
      WorkspaceDiagnosticRequest2.partialResult = new vscode_jsonrpc_1.ProgressType();
    })(WorkspaceDiagnosticRequest || (exports2.WorkspaceDiagnosticRequest = WorkspaceDiagnosticRequest = {}));
    var DiagnosticRefreshRequest;
    (function(DiagnosticRefreshRequest2) {
      DiagnosticRefreshRequest2.method = `workspace/diagnostic/refresh`;
      DiagnosticRefreshRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      DiagnosticRefreshRequest2.type = new messages_1.ProtocolRequestType0(DiagnosticRefreshRequest2.method);
    })(DiagnosticRefreshRequest || (exports2.DiagnosticRefreshRequest = DiagnosticRefreshRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js
var require_protocol_notebook = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.DidCloseNotebookDocumentNotification = exports2.DidSaveNotebookDocumentNotification = exports2.DidChangeNotebookDocumentNotification = exports2.NotebookCellArrayChange = exports2.DidOpenNotebookDocumentNotification = exports2.NotebookDocumentSyncRegistrationType = exports2.NotebookDocument = exports2.NotebookCell = exports2.ExecutionSummary = exports2.NotebookCellKind = void 0;
    var vscode_languageserver_types_1 = require_main2();
    var Is = require_is3();
    var messages_1 = require_messages2();
    var NotebookCellKind;
    (function(NotebookCellKind2) {
      NotebookCellKind2.Markup = 1;
      NotebookCellKind2.Code = 2;
      function is(value) {
        return value === 1 || value === 2;
      }
      NotebookCellKind2.is = is;
    })(NotebookCellKind || (exports2.NotebookCellKind = NotebookCellKind = {}));
    var ExecutionSummary;
    (function(ExecutionSummary2) {
      function create(executionOrder, success2) {
        const result = { executionOrder };
        if (success2 === true || success2 === false) {
          result.success = success2;
        }
        return result;
      }
      ExecutionSummary2.create = create;
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.executionOrder) && (candidate.success === void 0 || Is.boolean(candidate.success));
      }
      ExecutionSummary2.is = is;
      function equals(one, other) {
        if (one === other) {
          return true;
        }
        if (one === null || one === void 0 || other === null || other === void 0) {
          return false;
        }
        return one.executionOrder === other.executionOrder && one.success === other.success;
      }
      ExecutionSummary2.equals = equals;
    })(ExecutionSummary || (exports2.ExecutionSummary = ExecutionSummary = {}));
    var NotebookCell;
    (function(NotebookCell2) {
      function create(kind, document) {
        return { kind, document };
      }
      NotebookCell2.create = create;
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document) && (candidate.metadata === void 0 || Is.objectLiteral(candidate.metadata));
      }
      NotebookCell2.is = is;
      function diff(one, two) {
        const result = /* @__PURE__ */ new Set();
        if (one.document !== two.document) {
          result.add("document");
        }
        if (one.kind !== two.kind) {
          result.add("kind");
        }
        if (one.executionSummary !== two.executionSummary) {
          result.add("executionSummary");
        }
        if ((one.metadata !== void 0 || two.metadata !== void 0) && !equalsMetadata(one.metadata, two.metadata)) {
          result.add("metadata");
        }
        if ((one.executionSummary !== void 0 || two.executionSummary !== void 0) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) {
          result.add("executionSummary");
        }
        return result;
      }
      NotebookCell2.diff = diff;
      function equalsMetadata(one, other) {
        if (one === other) {
          return true;
        }
        if (one === null || one === void 0 || other === null || other === void 0) {
          return false;
        }
        if (typeof one !== typeof other) {
          return false;
        }
        if (typeof one !== "object") {
          return false;
        }
        const oneArray = Array.isArray(one);
        const otherArray = Array.isArray(other);
        if (oneArray !== otherArray) {
          return false;
        }
        if (oneArray && otherArray) {
          if (one.length !== other.length) {
            return false;
          }
          for (let i = 0; i < one.length; i++) {
            if (!equalsMetadata(one[i], other[i])) {
              return false;
            }
          }
        }
        if (Is.objectLiteral(one) && Is.objectLiteral(other)) {
          const oneKeys = Object.keys(one);
          const otherKeys = Object.keys(other);
          if (oneKeys.length !== otherKeys.length) {
            return false;
          }
          oneKeys.sort();
          otherKeys.sort();
          if (!equalsMetadata(oneKeys, otherKeys)) {
            return false;
          }
          for (let i = 0; i < oneKeys.length; i++) {
            const prop = oneKeys[i];
            if (!equalsMetadata(one[prop], other[prop])) {
              return false;
            }
          }
        }
        return true;
      }
    })(NotebookCell || (exports2.NotebookCell = NotebookCell = {}));
    var NotebookDocument;
    (function(NotebookDocument2) {
      function create(uri, notebookType, version2, cells) {
        return { uri, notebookType, version: version2, cells };
      }
      NotebookDocument2.create = create;
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is);
      }
      NotebookDocument2.is = is;
    })(NotebookDocument || (exports2.NotebookDocument = NotebookDocument = {}));
    var NotebookDocumentSyncRegistrationType;
    (function(NotebookDocumentSyncRegistrationType2) {
      NotebookDocumentSyncRegistrationType2.method = "notebookDocument/sync";
      NotebookDocumentSyncRegistrationType2.messageDirection = messages_1.MessageDirection.clientToServer;
      NotebookDocumentSyncRegistrationType2.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType2.method);
    })(NotebookDocumentSyncRegistrationType || (exports2.NotebookDocumentSyncRegistrationType = NotebookDocumentSyncRegistrationType = {}));
    var DidOpenNotebookDocumentNotification;
    (function(DidOpenNotebookDocumentNotification2) {
      DidOpenNotebookDocumentNotification2.method = "notebookDocument/didOpen";
      DidOpenNotebookDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidOpenNotebookDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification2.method);
      DidOpenNotebookDocumentNotification2.registrationMethod = NotebookDocumentSyncRegistrationType.method;
    })(DidOpenNotebookDocumentNotification || (exports2.DidOpenNotebookDocumentNotification = DidOpenNotebookDocumentNotification = {}));
    var NotebookCellArrayChange;
    (function(NotebookCellArrayChange2) {
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === void 0 || Is.typedArray(candidate.cells, NotebookCell.is));
      }
      NotebookCellArrayChange2.is = is;
      function create(start, deleteCount, cells) {
        const result = { start, deleteCount };
        if (cells !== void 0) {
          result.cells = cells;
        }
        return result;
      }
      NotebookCellArrayChange2.create = create;
    })(NotebookCellArrayChange || (exports2.NotebookCellArrayChange = NotebookCellArrayChange = {}));
    var DidChangeNotebookDocumentNotification;
    (function(DidChangeNotebookDocumentNotification2) {
      DidChangeNotebookDocumentNotification2.method = "notebookDocument/didChange";
      DidChangeNotebookDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidChangeNotebookDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification2.method);
      DidChangeNotebookDocumentNotification2.registrationMethod = NotebookDocumentSyncRegistrationType.method;
    })(DidChangeNotebookDocumentNotification || (exports2.DidChangeNotebookDocumentNotification = DidChangeNotebookDocumentNotification = {}));
    var DidSaveNotebookDocumentNotification;
    (function(DidSaveNotebookDocumentNotification2) {
      DidSaveNotebookDocumentNotification2.method = "notebookDocument/didSave";
      DidSaveNotebookDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidSaveNotebookDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification2.method);
      DidSaveNotebookDocumentNotification2.registrationMethod = NotebookDocumentSyncRegistrationType.method;
    })(DidSaveNotebookDocumentNotification || (exports2.DidSaveNotebookDocumentNotification = DidSaveNotebookDocumentNotification = {}));
    var DidCloseNotebookDocumentNotification;
    (function(DidCloseNotebookDocumentNotification2) {
      DidCloseNotebookDocumentNotification2.method = "notebookDocument/didClose";
      DidCloseNotebookDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidCloseNotebookDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification2.method);
      DidCloseNotebookDocumentNotification2.registrationMethod = NotebookDocumentSyncRegistrationType.method;
    })(DidCloseNotebookDocumentNotification || (exports2.DidCloseNotebookDocumentNotification = DidCloseNotebookDocumentNotification = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js
var require_protocol_inlineCompletion = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.InlineCompletionRequest = void 0;
    var messages_1 = require_messages2();
    var InlineCompletionRequest;
    (function(InlineCompletionRequest2) {
      InlineCompletionRequest2.method = "textDocument/inlineCompletion";
      InlineCompletionRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      InlineCompletionRequest2.type = new messages_1.ProtocolRequestType(InlineCompletionRequest2.method);
    })(InlineCompletionRequest || (exports2.InlineCompletionRequest = InlineCompletionRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/protocol.js
var require_protocol = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.WorkspaceSymbolRequest = exports2.CodeActionResolveRequest = exports2.CodeActionRequest = exports2.DocumentSymbolRequest = exports2.DocumentHighlightRequest = exports2.ReferencesRequest = exports2.DefinitionRequest = exports2.SignatureHelpRequest = exports2.SignatureHelpTriggerKind = exports2.HoverRequest = exports2.CompletionResolveRequest = exports2.CompletionRequest = exports2.CompletionTriggerKind = exports2.PublishDiagnosticsNotification = exports2.WatchKind = exports2.RelativePattern = exports2.FileChangeType = exports2.DidChangeWatchedFilesNotification = exports2.WillSaveTextDocumentWaitUntilRequest = exports2.WillSaveTextDocumentNotification = exports2.TextDocumentSaveReason = exports2.DidSaveTextDocumentNotification = exports2.DidCloseTextDocumentNotification = exports2.DidChangeTextDocumentNotification = exports2.TextDocumentContentChangeEvent = exports2.DidOpenTextDocumentNotification = exports2.TextDocumentSyncKind = exports2.TelemetryEventNotification = exports2.LogMessageNotification = exports2.ShowMessageRequest = exports2.ShowMessageNotification = exports2.MessageType = exports2.DidChangeConfigurationNotification = exports2.ExitNotification = exports2.ShutdownRequest = exports2.InitializedNotification = exports2.InitializeErrorCodes = exports2.InitializeRequest = exports2.WorkDoneProgressOptions = exports2.TextDocumentRegistrationOptions = exports2.StaticRegistrationOptions = exports2.PositionEncodingKind = exports2.FailureHandlingKind = exports2.ResourceOperationKind = exports2.UnregistrationRequest = exports2.RegistrationRequest = exports2.DocumentSelector = exports2.NotebookCellTextDocumentFilter = exports2.NotebookDocumentFilter = exports2.TextDocumentFilter = void 0;
    exports2.MonikerRequest = exports2.MonikerKind = exports2.UniquenessLevel = exports2.WillDeleteFilesRequest = exports2.DidDeleteFilesNotification = exports2.WillRenameFilesRequest = exports2.DidRenameFilesNotification = exports2.WillCreateFilesRequest = exports2.DidCreateFilesNotification = exports2.FileOperationPatternKind = exports2.LinkedEditingRangeRequest = exports2.ShowDocumentRequest = exports2.SemanticTokensRegistrationType = exports2.SemanticTokensRefreshRequest = exports2.SemanticTokensRangeRequest = exports2.SemanticTokensDeltaRequest = exports2.SemanticTokensRequest = exports2.TokenFormat = exports2.CallHierarchyPrepareRequest = exports2.CallHierarchyOutgoingCallsRequest = exports2.CallHierarchyIncomingCallsRequest = exports2.WorkDoneProgressCancelNotification = exports2.WorkDoneProgressCreateRequest = exports2.WorkDoneProgress = exports2.SelectionRangeRequest = exports2.DeclarationRequest = exports2.FoldingRangeRefreshRequest = exports2.FoldingRangeRequest = exports2.ColorPresentationRequest = exports2.DocumentColorRequest = exports2.ConfigurationRequest = exports2.DidChangeWorkspaceFoldersNotification = exports2.WorkspaceFoldersRequest = exports2.TypeDefinitionRequest = exports2.ImplementationRequest = exports2.ApplyWorkspaceEditRequest = exports2.ExecuteCommandRequest = exports2.PrepareRenameRequest = exports2.RenameRequest = exports2.PrepareSupportDefaultBehavior = exports2.DocumentOnTypeFormattingRequest = exports2.DocumentRangesFormattingRequest = exports2.DocumentRangeFormattingRequest = exports2.DocumentFormattingRequest = exports2.DocumentLinkResolveRequest = exports2.DocumentLinkRequest = exports2.CodeLensRefreshRequest = exports2.CodeLensResolveRequest = exports2.CodeLensRequest = exports2.WorkspaceSymbolResolveRequest = void 0;
    exports2.InlineCompletionRequest = exports2.DidCloseNotebookDocumentNotification = exports2.DidSaveNotebookDocumentNotification = exports2.DidChangeNotebookDocumentNotification = exports2.NotebookCellArrayChange = exports2.DidOpenNotebookDocumentNotification = exports2.NotebookDocumentSyncRegistrationType = exports2.NotebookDocument = exports2.NotebookCell = exports2.ExecutionSummary = exports2.NotebookCellKind = exports2.DiagnosticRefreshRequest = exports2.WorkspaceDiagnosticRequest = exports2.DocumentDiagnosticRequest = exports2.DocumentDiagnosticReportKind = exports2.DiagnosticServerCancellationData = exports2.InlayHintRefreshRequest = exports2.InlayHintResolveRequest = exports2.InlayHintRequest = exports2.InlineValueRefreshRequest = exports2.InlineValueRequest = exports2.TypeHierarchySupertypesRequest = exports2.TypeHierarchySubtypesRequest = exports2.TypeHierarchyPrepareRequest = void 0;
    var messages_1 = require_messages2();
    var vscode_languageserver_types_1 = require_main2();
    var Is = require_is3();
    var protocol_implementation_1 = require_protocol_implementation();
    Object.defineProperty(exports2, "ImplementationRequest", { enumerable: true, get: function() {
      return protocol_implementation_1.ImplementationRequest;
    } });
    var protocol_typeDefinition_1 = require_protocol_typeDefinition();
    Object.defineProperty(exports2, "TypeDefinitionRequest", { enumerable: true, get: function() {
      return protocol_typeDefinition_1.TypeDefinitionRequest;
    } });
    var protocol_workspaceFolder_1 = require_protocol_workspaceFolder();
    Object.defineProperty(exports2, "WorkspaceFoldersRequest", { enumerable: true, get: function() {
      return protocol_workspaceFolder_1.WorkspaceFoldersRequest;
    } });
    Object.defineProperty(exports2, "DidChangeWorkspaceFoldersNotification", { enumerable: true, get: function() {
      return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification;
    } });
    var protocol_configuration_1 = require_protocol_configuration();
    Object.defineProperty(exports2, "ConfigurationRequest", { enumerable: true, get: function() {
      return protocol_configuration_1.ConfigurationRequest;
    } });
    var protocol_colorProvider_1 = require_protocol_colorProvider();
    Object.defineProperty(exports2, "DocumentColorRequest", { enumerable: true, get: function() {
      return protocol_colorProvider_1.DocumentColorRequest;
    } });
    Object.defineProperty(exports2, "ColorPresentationRequest", { enumerable: true, get: function() {
      return protocol_colorProvider_1.ColorPresentationRequest;
    } });
    var protocol_foldingRange_1 = require_protocol_foldingRange();
    Object.defineProperty(exports2, "FoldingRangeRequest", { enumerable: true, get: function() {
      return protocol_foldingRange_1.FoldingRangeRequest;
    } });
    Object.defineProperty(exports2, "FoldingRangeRefreshRequest", { enumerable: true, get: function() {
      return protocol_foldingRange_1.FoldingRangeRefreshRequest;
    } });
    var protocol_declaration_1 = require_protocol_declaration();
    Object.defineProperty(exports2, "DeclarationRequest", { enumerable: true, get: function() {
      return protocol_declaration_1.DeclarationRequest;
    } });
    var protocol_selectionRange_1 = require_protocol_selectionRange();
    Object.defineProperty(exports2, "SelectionRangeRequest", { enumerable: true, get: function() {
      return protocol_selectionRange_1.SelectionRangeRequest;
    } });
    var protocol_progress_1 = require_protocol_progress();
    Object.defineProperty(exports2, "WorkDoneProgress", { enumerable: true, get: function() {
      return protocol_progress_1.WorkDoneProgress;
    } });
    Object.defineProperty(exports2, "WorkDoneProgressCreateRequest", { enumerable: true, get: function() {
      return protocol_progress_1.WorkDoneProgressCreateRequest;
    } });
    Object.defineProperty(exports2, "WorkDoneProgressCancelNotification", { enumerable: true, get: function() {
      return protocol_progress_1.WorkDoneProgressCancelNotification;
    } });
    var protocol_callHierarchy_1 = require_protocol_callHierarchy();
    Object.defineProperty(exports2, "CallHierarchyIncomingCallsRequest", { enumerable: true, get: function() {
      return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest;
    } });
    Object.defineProperty(exports2, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function() {
      return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest;
    } });
    Object.defineProperty(exports2, "CallHierarchyPrepareRequest", { enumerable: true, get: function() {
      return protocol_callHierarchy_1.CallHierarchyPrepareRequest;
    } });
    var protocol_semanticTokens_1 = require_protocol_semanticTokens();
    Object.defineProperty(exports2, "TokenFormat", { enumerable: true, get: function() {
      return protocol_semanticTokens_1.TokenFormat;
    } });
    Object.defineProperty(exports2, "SemanticTokensRequest", { enumerable: true, get: function() {
      return protocol_semanticTokens_1.SemanticTokensRequest;
    } });
    Object.defineProperty(exports2, "SemanticTokensDeltaRequest", { enumerable: true, get: function() {
      return protocol_semanticTokens_1.SemanticTokensDeltaRequest;
    } });
    Object.defineProperty(exports2, "SemanticTokensRangeRequest", { enumerable: true, get: function() {
      return protocol_semanticTokens_1.SemanticTokensRangeRequest;
    } });
    Object.defineProperty(exports2, "SemanticTokensRefreshRequest", { enumerable: true, get: function() {
      return protocol_semanticTokens_1.SemanticTokensRefreshRequest;
    } });
    Object.defineProperty(exports2, "SemanticTokensRegistrationType", { enumerable: true, get: function() {
      return protocol_semanticTokens_1.SemanticTokensRegistrationType;
    } });
    var protocol_showDocument_1 = require_protocol_showDocument();
    Object.defineProperty(exports2, "ShowDocumentRequest", { enumerable: true, get: function() {
      return protocol_showDocument_1.ShowDocumentRequest;
    } });
    var protocol_linkedEditingRange_1 = require_protocol_linkedEditingRange();
    Object.defineProperty(exports2, "LinkedEditingRangeRequest", { enumerable: true, get: function() {
      return protocol_linkedEditingRange_1.LinkedEditingRangeRequest;
    } });
    var protocol_fileOperations_1 = require_protocol_fileOperations();
    Object.defineProperty(exports2, "FileOperationPatternKind", { enumerable: true, get: function() {
      return protocol_fileOperations_1.FileOperationPatternKind;
    } });
    Object.defineProperty(exports2, "DidCreateFilesNotification", { enumerable: true, get: function() {
      return protocol_fileOperations_1.DidCreateFilesNotification;
    } });
    Object.defineProperty(exports2, "WillCreateFilesRequest", { enumerable: true, get: function() {
      return protocol_fileOperations_1.WillCreateFilesRequest;
    } });
    Object.defineProperty(exports2, "DidRenameFilesNotification", { enumerable: true, get: function() {
      return protocol_fileOperations_1.DidRenameFilesNotification;
    } });
    Object.defineProperty(exports2, "WillRenameFilesRequest", { enumerable: true, get: function() {
      return protocol_fileOperations_1.WillRenameFilesRequest;
    } });
    Object.defineProperty(exports2, "DidDeleteFilesNotification", { enumerable: true, get: function() {
      return protocol_fileOperations_1.DidDeleteFilesNotification;
    } });
    Object.defineProperty(exports2, "WillDeleteFilesRequest", { enumerable: true, get: function() {
      return protocol_fileOperations_1.WillDeleteFilesRequest;
    } });
    var protocol_moniker_1 = require_protocol_moniker();
    Object.defineProperty(exports2, "UniquenessLevel", { enumerable: true, get: function() {
      return protocol_moniker_1.UniquenessLevel;
    } });
    Object.defineProperty(exports2, "MonikerKind", { enumerable: true, get: function() {
      return protocol_moniker_1.MonikerKind;
    } });
    Object.defineProperty(exports2, "MonikerRequest", { enumerable: true, get: function() {
      return protocol_moniker_1.MonikerRequest;
    } });
    var protocol_typeHierarchy_1 = require_protocol_typeHierarchy();
    Object.defineProperty(exports2, "TypeHierarchyPrepareRequest", { enumerable: true, get: function() {
      return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest;
    } });
    Object.defineProperty(exports2, "TypeHierarchySubtypesRequest", { enumerable: true, get: function() {
      return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest;
    } });
    Object.defineProperty(exports2, "TypeHierarchySupertypesRequest", { enumerable: true, get: function() {
      return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest;
    } });
    var protocol_inlineValue_1 = require_protocol_inlineValue();
    Object.defineProperty(exports2, "InlineValueRequest", { enumerable: true, get: function() {
      return protocol_inlineValue_1.InlineValueRequest;
    } });
    Object.defineProperty(exports2, "InlineValueRefreshRequest", { enumerable: true, get: function() {
      return protocol_inlineValue_1.InlineValueRefreshRequest;
    } });
    var protocol_inlayHint_1 = require_protocol_inlayHint();
    Object.defineProperty(exports2, "InlayHintRequest", { enumerable: true, get: function() {
      return protocol_inlayHint_1.InlayHintRequest;
    } });
    Object.defineProperty(exports2, "InlayHintResolveRequest", { enumerable: true, get: function() {
      return protocol_inlayHint_1.InlayHintResolveRequest;
    } });
    Object.defineProperty(exports2, "InlayHintRefreshRequest", { enumerable: true, get: function() {
      return protocol_inlayHint_1.InlayHintRefreshRequest;
    } });
    var protocol_diagnostic_1 = require_protocol_diagnostic();
    Object.defineProperty(exports2, "DiagnosticServerCancellationData", { enumerable: true, get: function() {
      return protocol_diagnostic_1.DiagnosticServerCancellationData;
    } });
    Object.defineProperty(exports2, "DocumentDiagnosticReportKind", { enumerable: true, get: function() {
      return protocol_diagnostic_1.DocumentDiagnosticReportKind;
    } });
    Object.defineProperty(exports2, "DocumentDiagnosticRequest", { enumerable: true, get: function() {
      return protocol_diagnostic_1.DocumentDiagnosticRequest;
    } });
    Object.defineProperty(exports2, "WorkspaceDiagnosticRequest", { enumerable: true, get: function() {
      return protocol_diagnostic_1.WorkspaceDiagnosticRequest;
    } });
    Object.defineProperty(exports2, "DiagnosticRefreshRequest", { enumerable: true, get: function() {
      return protocol_diagnostic_1.DiagnosticRefreshRequest;
    } });
    var protocol_notebook_1 = require_protocol_notebook();
    Object.defineProperty(exports2, "NotebookCellKind", { enumerable: true, get: function() {
      return protocol_notebook_1.NotebookCellKind;
    } });
    Object.defineProperty(exports2, "ExecutionSummary", { enumerable: true, get: function() {
      return protocol_notebook_1.ExecutionSummary;
    } });
    Object.defineProperty(exports2, "NotebookCell", { enumerable: true, get: function() {
      return protocol_notebook_1.NotebookCell;
    } });
    Object.defineProperty(exports2, "NotebookDocument", { enumerable: true, get: function() {
      return protocol_notebook_1.NotebookDocument;
    } });
    Object.defineProperty(exports2, "NotebookDocumentSyncRegistrationType", { enumerable: true, get: function() {
      return protocol_notebook_1.NotebookDocumentSyncRegistrationType;
    } });
    Object.defineProperty(exports2, "DidOpenNotebookDocumentNotification", { enumerable: true, get: function() {
      return protocol_notebook_1.DidOpenNotebookDocumentNotification;
    } });
    Object.defineProperty(exports2, "NotebookCellArrayChange", { enumerable: true, get: function() {
      return protocol_notebook_1.NotebookCellArrayChange;
    } });
    Object.defineProperty(exports2, "DidChangeNotebookDocumentNotification", { enumerable: true, get: function() {
      return protocol_notebook_1.DidChangeNotebookDocumentNotification;
    } });
    Object.defineProperty(exports2, "DidSaveNotebookDocumentNotification", { enumerable: true, get: function() {
      return protocol_notebook_1.DidSaveNotebookDocumentNotification;
    } });
    Object.defineProperty(exports2, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function() {
      return protocol_notebook_1.DidCloseNotebookDocumentNotification;
    } });
    var protocol_inlineCompletion_1 = require_protocol_inlineCompletion();
    Object.defineProperty(exports2, "InlineCompletionRequest", { enumerable: true, get: function() {
      return protocol_inlineCompletion_1.InlineCompletionRequest;
    } });
    var TextDocumentFilter;
    (function(TextDocumentFilter2) {
      function is(value) {
        const candidate = value;
        return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
      }
      TextDocumentFilter2.is = is;
    })(TextDocumentFilter || (exports2.TextDocumentFilter = TextDocumentFilter = {}));
    var NotebookDocumentFilter;
    (function(NotebookDocumentFilter2) {
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
      }
      NotebookDocumentFilter2.is = is;
    })(NotebookDocumentFilter || (exports2.NotebookDocumentFilter = NotebookDocumentFilter = {}));
    var NotebookCellTextDocumentFilter;
    (function(NotebookCellTextDocumentFilter2) {
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook)) && (candidate.language === void 0 || Is.string(candidate.language));
      }
      NotebookCellTextDocumentFilter2.is = is;
    })(NotebookCellTextDocumentFilter || (exports2.NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter = {}));
    var DocumentSelector;
    (function(DocumentSelector2) {
      function is(value) {
        if (!Array.isArray(value)) {
          return false;
        }
        for (let elem of value) {
          if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
            return false;
          }
        }
        return true;
      }
      DocumentSelector2.is = is;
    })(DocumentSelector || (exports2.DocumentSelector = DocumentSelector = {}));
    var RegistrationRequest;
    (function(RegistrationRequest2) {
      RegistrationRequest2.method = "client/registerCapability";
      RegistrationRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      RegistrationRequest2.type = new messages_1.ProtocolRequestType(RegistrationRequest2.method);
    })(RegistrationRequest || (exports2.RegistrationRequest = RegistrationRequest = {}));
    var UnregistrationRequest;
    (function(UnregistrationRequest2) {
      UnregistrationRequest2.method = "client/unregisterCapability";
      UnregistrationRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      UnregistrationRequest2.type = new messages_1.ProtocolRequestType(UnregistrationRequest2.method);
    })(UnregistrationRequest || (exports2.UnregistrationRequest = UnregistrationRequest = {}));
    var ResourceOperationKind;
    (function(ResourceOperationKind2) {
      ResourceOperationKind2.Create = "create";
      ResourceOperationKind2.Rename = "rename";
      ResourceOperationKind2.Delete = "delete";
    })(ResourceOperationKind || (exports2.ResourceOperationKind = ResourceOperationKind = {}));
    var FailureHandlingKind;
    (function(FailureHandlingKind2) {
      FailureHandlingKind2.Abort = "abort";
      FailureHandlingKind2.Transactional = "transactional";
      FailureHandlingKind2.TextOnlyTransactional = "textOnlyTransactional";
      FailureHandlingKind2.Undo = "undo";
    })(FailureHandlingKind || (exports2.FailureHandlingKind = FailureHandlingKind = {}));
    var PositionEncodingKind;
    (function(PositionEncodingKind2) {
      PositionEncodingKind2.UTF8 = "utf-8";
      PositionEncodingKind2.UTF16 = "utf-16";
      PositionEncodingKind2.UTF32 = "utf-32";
    })(PositionEncodingKind || (exports2.PositionEncodingKind = PositionEncodingKind = {}));
    var StaticRegistrationOptions;
    (function(StaticRegistrationOptions2) {
      function hasId(value) {
        const candidate = value;
        return candidate && Is.string(candidate.id) && candidate.id.length > 0;
      }
      StaticRegistrationOptions2.hasId = hasId;
    })(StaticRegistrationOptions || (exports2.StaticRegistrationOptions = StaticRegistrationOptions = {}));
    var TextDocumentRegistrationOptions;
    (function(TextDocumentRegistrationOptions2) {
      function is(value) {
        const candidate = value;
        return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
      }
      TextDocumentRegistrationOptions2.is = is;
    })(TextDocumentRegistrationOptions || (exports2.TextDocumentRegistrationOptions = TextDocumentRegistrationOptions = {}));
    var WorkDoneProgressOptions;
    (function(WorkDoneProgressOptions2) {
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && (candidate.workDoneProgress === void 0 || Is.boolean(candidate.workDoneProgress));
      }
      WorkDoneProgressOptions2.is = is;
      function hasWorkDoneProgress(value) {
        const candidate = value;
        return candidate && Is.boolean(candidate.workDoneProgress);
      }
      WorkDoneProgressOptions2.hasWorkDoneProgress = hasWorkDoneProgress;
    })(WorkDoneProgressOptions || (exports2.WorkDoneProgressOptions = WorkDoneProgressOptions = {}));
    var InitializeRequest;
    (function(InitializeRequest2) {
      InitializeRequest2.method = "initialize";
      InitializeRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      InitializeRequest2.type = new messages_1.ProtocolRequestType(InitializeRequest2.method);
    })(InitializeRequest || (exports2.InitializeRequest = InitializeRequest = {}));
    var InitializeErrorCodes;
    (function(InitializeErrorCodes2) {
      InitializeErrorCodes2.unknownProtocolVersion = 1;
    })(InitializeErrorCodes || (exports2.InitializeErrorCodes = InitializeErrorCodes = {}));
    var InitializedNotification;
    (function(InitializedNotification2) {
      InitializedNotification2.method = "initialized";
      InitializedNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      InitializedNotification2.type = new messages_1.ProtocolNotificationType(InitializedNotification2.method);
    })(InitializedNotification || (exports2.InitializedNotification = InitializedNotification = {}));
    var ShutdownRequest;
    (function(ShutdownRequest2) {
      ShutdownRequest2.method = "shutdown";
      ShutdownRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      ShutdownRequest2.type = new messages_1.ProtocolRequestType0(ShutdownRequest2.method);
    })(ShutdownRequest || (exports2.ShutdownRequest = ShutdownRequest = {}));
    var ExitNotification;
    (function(ExitNotification2) {
      ExitNotification2.method = "exit";
      ExitNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      ExitNotification2.type = new messages_1.ProtocolNotificationType0(ExitNotification2.method);
    })(ExitNotification || (exports2.ExitNotification = ExitNotification = {}));
    var DidChangeConfigurationNotification;
    (function(DidChangeConfigurationNotification2) {
      DidChangeConfigurationNotification2.method = "workspace/didChangeConfiguration";
      DidChangeConfigurationNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidChangeConfigurationNotification2.type = new messages_1.ProtocolNotificationType(DidChangeConfigurationNotification2.method);
    })(DidChangeConfigurationNotification || (exports2.DidChangeConfigurationNotification = DidChangeConfigurationNotification = {}));
    var MessageType;
    (function(MessageType2) {
      MessageType2.Error = 1;
      MessageType2.Warning = 2;
      MessageType2.Info = 3;
      MessageType2.Log = 4;
      MessageType2.Debug = 5;
    })(MessageType || (exports2.MessageType = MessageType = {}));
    var ShowMessageNotification;
    (function(ShowMessageNotification2) {
      ShowMessageNotification2.method = "window/showMessage";
      ShowMessageNotification2.messageDirection = messages_1.MessageDirection.serverToClient;
      ShowMessageNotification2.type = new messages_1.ProtocolNotificationType(ShowMessageNotification2.method);
    })(ShowMessageNotification || (exports2.ShowMessageNotification = ShowMessageNotification = {}));
    var ShowMessageRequest;
    (function(ShowMessageRequest2) {
      ShowMessageRequest2.method = "window/showMessageRequest";
      ShowMessageRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      ShowMessageRequest2.type = new messages_1.ProtocolRequestType(ShowMessageRequest2.method);
    })(ShowMessageRequest || (exports2.ShowMessageRequest = ShowMessageRequest = {}));
    var LogMessageNotification;
    (function(LogMessageNotification2) {
      LogMessageNotification2.method = "window/logMessage";
      LogMessageNotification2.messageDirection = messages_1.MessageDirection.serverToClient;
      LogMessageNotification2.type = new messages_1.ProtocolNotificationType(LogMessageNotification2.method);
    })(LogMessageNotification || (exports2.LogMessageNotification = LogMessageNotification = {}));
    var TelemetryEventNotification;
    (function(TelemetryEventNotification2) {
      TelemetryEventNotification2.method = "telemetry/event";
      TelemetryEventNotification2.messageDirection = messages_1.MessageDirection.serverToClient;
      TelemetryEventNotification2.type = new messages_1.ProtocolNotificationType(TelemetryEventNotification2.method);
    })(TelemetryEventNotification || (exports2.TelemetryEventNotification = TelemetryEventNotification = {}));
    var TextDocumentSyncKind;
    (function(TextDocumentSyncKind2) {
      TextDocumentSyncKind2.None = 0;
      TextDocumentSyncKind2.Full = 1;
      TextDocumentSyncKind2.Incremental = 2;
    })(TextDocumentSyncKind || (exports2.TextDocumentSyncKind = TextDocumentSyncKind = {}));
    var DidOpenTextDocumentNotification;
    (function(DidOpenTextDocumentNotification2) {
      DidOpenTextDocumentNotification2.method = "textDocument/didOpen";
      DidOpenTextDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidOpenTextDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification2.method);
    })(DidOpenTextDocumentNotification || (exports2.DidOpenTextDocumentNotification = DidOpenTextDocumentNotification = {}));
    var TextDocumentContentChangeEvent;
    (function(TextDocumentContentChangeEvent2) {
      function isIncremental(event) {
        let candidate = event;
        return candidate !== void 0 && candidate !== null && typeof candidate.text === "string" && candidate.range !== void 0 && (candidate.rangeLength === void 0 || typeof candidate.rangeLength === "number");
      }
      TextDocumentContentChangeEvent2.isIncremental = isIncremental;
      function isFull(event) {
        let candidate = event;
        return candidate !== void 0 && candidate !== null && typeof candidate.text === "string" && candidate.range === void 0 && candidate.rangeLength === void 0;
      }
      TextDocumentContentChangeEvent2.isFull = isFull;
    })(TextDocumentContentChangeEvent || (exports2.TextDocumentContentChangeEvent = TextDocumentContentChangeEvent = {}));
    var DidChangeTextDocumentNotification;
    (function(DidChangeTextDocumentNotification2) {
      DidChangeTextDocumentNotification2.method = "textDocument/didChange";
      DidChangeTextDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidChangeTextDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification2.method);
    })(DidChangeTextDocumentNotification || (exports2.DidChangeTextDocumentNotification = DidChangeTextDocumentNotification = {}));
    var DidCloseTextDocumentNotification;
    (function(DidCloseTextDocumentNotification2) {
      DidCloseTextDocumentNotification2.method = "textDocument/didClose";
      DidCloseTextDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidCloseTextDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification2.method);
    })(DidCloseTextDocumentNotification || (exports2.DidCloseTextDocumentNotification = DidCloseTextDocumentNotification = {}));
    var DidSaveTextDocumentNotification;
    (function(DidSaveTextDocumentNotification2) {
      DidSaveTextDocumentNotification2.method = "textDocument/didSave";
      DidSaveTextDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidSaveTextDocumentNotification2.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification2.method);
    })(DidSaveTextDocumentNotification || (exports2.DidSaveTextDocumentNotification = DidSaveTextDocumentNotification = {}));
    var TextDocumentSaveReason;
    (function(TextDocumentSaveReason2) {
      TextDocumentSaveReason2.Manual = 1;
      TextDocumentSaveReason2.AfterDelay = 2;
      TextDocumentSaveReason2.FocusOut = 3;
    })(TextDocumentSaveReason || (exports2.TextDocumentSaveReason = TextDocumentSaveReason = {}));
    var WillSaveTextDocumentNotification;
    (function(WillSaveTextDocumentNotification2) {
      WillSaveTextDocumentNotification2.method = "textDocument/willSave";
      WillSaveTextDocumentNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      WillSaveTextDocumentNotification2.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification2.method);
    })(WillSaveTextDocumentNotification || (exports2.WillSaveTextDocumentNotification = WillSaveTextDocumentNotification = {}));
    var WillSaveTextDocumentWaitUntilRequest;
    (function(WillSaveTextDocumentWaitUntilRequest2) {
      WillSaveTextDocumentWaitUntilRequest2.method = "textDocument/willSaveWaitUntil";
      WillSaveTextDocumentWaitUntilRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      WillSaveTextDocumentWaitUntilRequest2.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest2.method);
    })(WillSaveTextDocumentWaitUntilRequest || (exports2.WillSaveTextDocumentWaitUntilRequest = WillSaveTextDocumentWaitUntilRequest = {}));
    var DidChangeWatchedFilesNotification;
    (function(DidChangeWatchedFilesNotification2) {
      DidChangeWatchedFilesNotification2.method = "workspace/didChangeWatchedFiles";
      DidChangeWatchedFilesNotification2.messageDirection = messages_1.MessageDirection.clientToServer;
      DidChangeWatchedFilesNotification2.type = new messages_1.ProtocolNotificationType(DidChangeWatchedFilesNotification2.method);
    })(DidChangeWatchedFilesNotification || (exports2.DidChangeWatchedFilesNotification = DidChangeWatchedFilesNotification = {}));
    var FileChangeType;
    (function(FileChangeType2) {
      FileChangeType2.Created = 1;
      FileChangeType2.Changed = 2;
      FileChangeType2.Deleted = 3;
    })(FileChangeType || (exports2.FileChangeType = FileChangeType = {}));
    var RelativePattern;
    (function(RelativePattern2) {
      function is(value) {
        const candidate = value;
        return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern);
      }
      RelativePattern2.is = is;
    })(RelativePattern || (exports2.RelativePattern = RelativePattern = {}));
    var WatchKind;
    (function(WatchKind2) {
      WatchKind2.Create = 1;
      WatchKind2.Change = 2;
      WatchKind2.Delete = 4;
    })(WatchKind || (exports2.WatchKind = WatchKind = {}));
    var PublishDiagnosticsNotification;
    (function(PublishDiagnosticsNotification2) {
      PublishDiagnosticsNotification2.method = "textDocument/publishDiagnostics";
      PublishDiagnosticsNotification2.messageDirection = messages_1.MessageDirection.serverToClient;
      PublishDiagnosticsNotification2.type = new messages_1.ProtocolNotificationType(PublishDiagnosticsNotification2.method);
    })(PublishDiagnosticsNotification || (exports2.PublishDiagnosticsNotification = PublishDiagnosticsNotification = {}));
    var CompletionTriggerKind;
    (function(CompletionTriggerKind2) {
      CompletionTriggerKind2.Invoked = 1;
      CompletionTriggerKind2.TriggerCharacter = 2;
      CompletionTriggerKind2.TriggerForIncompleteCompletions = 3;
    })(CompletionTriggerKind || (exports2.CompletionTriggerKind = CompletionTriggerKind = {}));
    var CompletionRequest;
    (function(CompletionRequest2) {
      CompletionRequest2.method = "textDocument/completion";
      CompletionRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CompletionRequest2.type = new messages_1.ProtocolRequestType(CompletionRequest2.method);
    })(CompletionRequest || (exports2.CompletionRequest = CompletionRequest = {}));
    var CompletionResolveRequest;
    (function(CompletionResolveRequest2) {
      CompletionResolveRequest2.method = "completionItem/resolve";
      CompletionResolveRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CompletionResolveRequest2.type = new messages_1.ProtocolRequestType(CompletionResolveRequest2.method);
    })(CompletionResolveRequest || (exports2.CompletionResolveRequest = CompletionResolveRequest = {}));
    var HoverRequest;
    (function(HoverRequest2) {
      HoverRequest2.method = "textDocument/hover";
      HoverRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      HoverRequest2.type = new messages_1.ProtocolRequestType(HoverRequest2.method);
    })(HoverRequest || (exports2.HoverRequest = HoverRequest = {}));
    var SignatureHelpTriggerKind;
    (function(SignatureHelpTriggerKind2) {
      SignatureHelpTriggerKind2.Invoked = 1;
      SignatureHelpTriggerKind2.TriggerCharacter = 2;
      SignatureHelpTriggerKind2.ContentChange = 3;
    })(SignatureHelpTriggerKind || (exports2.SignatureHelpTriggerKind = SignatureHelpTriggerKind = {}));
    var SignatureHelpRequest;
    (function(SignatureHelpRequest2) {
      SignatureHelpRequest2.method = "textDocument/signatureHelp";
      SignatureHelpRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      SignatureHelpRequest2.type = new messages_1.ProtocolRequestType(SignatureHelpRequest2.method);
    })(SignatureHelpRequest || (exports2.SignatureHelpRequest = SignatureHelpRequest = {}));
    var DefinitionRequest;
    (function(DefinitionRequest2) {
      DefinitionRequest2.method = "textDocument/definition";
      DefinitionRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DefinitionRequest2.type = new messages_1.ProtocolRequestType(DefinitionRequest2.method);
    })(DefinitionRequest || (exports2.DefinitionRequest = DefinitionRequest = {}));
    var ReferencesRequest;
    (function(ReferencesRequest2) {
      ReferencesRequest2.method = "textDocument/references";
      ReferencesRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      ReferencesRequest2.type = new messages_1.ProtocolRequestType(ReferencesRequest2.method);
    })(ReferencesRequest || (exports2.ReferencesRequest = ReferencesRequest = {}));
    var DocumentHighlightRequest;
    (function(DocumentHighlightRequest2) {
      DocumentHighlightRequest2.method = "textDocument/documentHighlight";
      DocumentHighlightRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentHighlightRequest2.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest2.method);
    })(DocumentHighlightRequest || (exports2.DocumentHighlightRequest = DocumentHighlightRequest = {}));
    var DocumentSymbolRequest;
    (function(DocumentSymbolRequest2) {
      DocumentSymbolRequest2.method = "textDocument/documentSymbol";
      DocumentSymbolRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentSymbolRequest2.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest2.method);
    })(DocumentSymbolRequest || (exports2.DocumentSymbolRequest = DocumentSymbolRequest = {}));
    var CodeActionRequest;
    (function(CodeActionRequest2) {
      CodeActionRequest2.method = "textDocument/codeAction";
      CodeActionRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CodeActionRequest2.type = new messages_1.ProtocolRequestType(CodeActionRequest2.method);
    })(CodeActionRequest || (exports2.CodeActionRequest = CodeActionRequest = {}));
    var CodeActionResolveRequest;
    (function(CodeActionResolveRequest2) {
      CodeActionResolveRequest2.method = "codeAction/resolve";
      CodeActionResolveRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CodeActionResolveRequest2.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest2.method);
    })(CodeActionResolveRequest || (exports2.CodeActionResolveRequest = CodeActionResolveRequest = {}));
    var WorkspaceSymbolRequest;
    (function(WorkspaceSymbolRequest2) {
      WorkspaceSymbolRequest2.method = "workspace/symbol";
      WorkspaceSymbolRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      WorkspaceSymbolRequest2.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest2.method);
    })(WorkspaceSymbolRequest || (exports2.WorkspaceSymbolRequest = WorkspaceSymbolRequest = {}));
    var WorkspaceSymbolResolveRequest;
    (function(WorkspaceSymbolResolveRequest2) {
      WorkspaceSymbolResolveRequest2.method = "workspaceSymbol/resolve";
      WorkspaceSymbolResolveRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      WorkspaceSymbolResolveRequest2.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest2.method);
    })(WorkspaceSymbolResolveRequest || (exports2.WorkspaceSymbolResolveRequest = WorkspaceSymbolResolveRequest = {}));
    var CodeLensRequest;
    (function(CodeLensRequest2) {
      CodeLensRequest2.method = "textDocument/codeLens";
      CodeLensRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CodeLensRequest2.type = new messages_1.ProtocolRequestType(CodeLensRequest2.method);
    })(CodeLensRequest || (exports2.CodeLensRequest = CodeLensRequest = {}));
    var CodeLensResolveRequest;
    (function(CodeLensResolveRequest2) {
      CodeLensResolveRequest2.method = "codeLens/resolve";
      CodeLensResolveRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      CodeLensResolveRequest2.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest2.method);
    })(CodeLensResolveRequest || (exports2.CodeLensResolveRequest = CodeLensResolveRequest = {}));
    var CodeLensRefreshRequest;
    (function(CodeLensRefreshRequest2) {
      CodeLensRefreshRequest2.method = `workspace/codeLens/refresh`;
      CodeLensRefreshRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      CodeLensRefreshRequest2.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest2.method);
    })(CodeLensRefreshRequest || (exports2.CodeLensRefreshRequest = CodeLensRefreshRequest = {}));
    var DocumentLinkRequest;
    (function(DocumentLinkRequest2) {
      DocumentLinkRequest2.method = "textDocument/documentLink";
      DocumentLinkRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentLinkRequest2.type = new messages_1.ProtocolRequestType(DocumentLinkRequest2.method);
    })(DocumentLinkRequest || (exports2.DocumentLinkRequest = DocumentLinkRequest = {}));
    var DocumentLinkResolveRequest;
    (function(DocumentLinkResolveRequest2) {
      DocumentLinkResolveRequest2.method = "documentLink/resolve";
      DocumentLinkResolveRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentLinkResolveRequest2.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest2.method);
    })(DocumentLinkResolveRequest || (exports2.DocumentLinkResolveRequest = DocumentLinkResolveRequest = {}));
    var DocumentFormattingRequest;
    (function(DocumentFormattingRequest2) {
      DocumentFormattingRequest2.method = "textDocument/formatting";
      DocumentFormattingRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentFormattingRequest2.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest2.method);
    })(DocumentFormattingRequest || (exports2.DocumentFormattingRequest = DocumentFormattingRequest = {}));
    var DocumentRangeFormattingRequest;
    (function(DocumentRangeFormattingRequest2) {
      DocumentRangeFormattingRequest2.method = "textDocument/rangeFormatting";
      DocumentRangeFormattingRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentRangeFormattingRequest2.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest2.method);
    })(DocumentRangeFormattingRequest || (exports2.DocumentRangeFormattingRequest = DocumentRangeFormattingRequest = {}));
    var DocumentRangesFormattingRequest;
    (function(DocumentRangesFormattingRequest2) {
      DocumentRangesFormattingRequest2.method = "textDocument/rangesFormatting";
      DocumentRangesFormattingRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentRangesFormattingRequest2.type = new messages_1.ProtocolRequestType(DocumentRangesFormattingRequest2.method);
    })(DocumentRangesFormattingRequest || (exports2.DocumentRangesFormattingRequest = DocumentRangesFormattingRequest = {}));
    var DocumentOnTypeFormattingRequest;
    (function(DocumentOnTypeFormattingRequest2) {
      DocumentOnTypeFormattingRequest2.method = "textDocument/onTypeFormatting";
      DocumentOnTypeFormattingRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      DocumentOnTypeFormattingRequest2.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest2.method);
    })(DocumentOnTypeFormattingRequest || (exports2.DocumentOnTypeFormattingRequest = DocumentOnTypeFormattingRequest = {}));
    var PrepareSupportDefaultBehavior;
    (function(PrepareSupportDefaultBehavior2) {
      PrepareSupportDefaultBehavior2.Identifier = 1;
    })(PrepareSupportDefaultBehavior || (exports2.PrepareSupportDefaultBehavior = PrepareSupportDefaultBehavior = {}));
    var RenameRequest;
    (function(RenameRequest2) {
      RenameRequest2.method = "textDocument/rename";
      RenameRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      RenameRequest2.type = new messages_1.ProtocolRequestType(RenameRequest2.method);
    })(RenameRequest || (exports2.RenameRequest = RenameRequest = {}));
    var PrepareRenameRequest;
    (function(PrepareRenameRequest2) {
      PrepareRenameRequest2.method = "textDocument/prepareRename";
      PrepareRenameRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      PrepareRenameRequest2.type = new messages_1.ProtocolRequestType(PrepareRenameRequest2.method);
    })(PrepareRenameRequest || (exports2.PrepareRenameRequest = PrepareRenameRequest = {}));
    var ExecuteCommandRequest;
    (function(ExecuteCommandRequest2) {
      ExecuteCommandRequest2.method = "workspace/executeCommand";
      ExecuteCommandRequest2.messageDirection = messages_1.MessageDirection.clientToServer;
      ExecuteCommandRequest2.type = new messages_1.ProtocolRequestType(ExecuteCommandRequest2.method);
    })(ExecuteCommandRequest || (exports2.ExecuteCommandRequest = ExecuteCommandRequest = {}));
    var ApplyWorkspaceEditRequest;
    (function(ApplyWorkspaceEditRequest2) {
      ApplyWorkspaceEditRequest2.method = "workspace/applyEdit";
      ApplyWorkspaceEditRequest2.messageDirection = messages_1.MessageDirection.serverToClient;
      ApplyWorkspaceEditRequest2.type = new messages_1.ProtocolRequestType("workspace/applyEdit");
    })(ApplyWorkspaceEditRequest || (exports2.ApplyWorkspaceEditRequest = ApplyWorkspaceEditRequest = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/connection.js
var require_connection2 = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createProtocolConnection = void 0;
    var vscode_jsonrpc_1 = require_main();
    function createProtocolConnection(input, output, logger, options) {
      if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
        options = { connectionStrategy: options };
      }
      return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options);
    }
    exports2.createProtocolConnection = createProtocolConnection;
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/common/api.js
var require_api2 = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/common/api.js"(exports2) {
    "use strict";
    var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m2, k);
      if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m2[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    }) : (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m2[k];
    }));
    var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
      for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
    };
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.LSPErrorCodes = exports2.createProtocolConnection = void 0;
    __exportStar(require_main(), exports2);
    __exportStar(require_main2(), exports2);
    __exportStar(require_messages2(), exports2);
    __exportStar(require_protocol(), exports2);
    var connection_1 = require_connection2();
    Object.defineProperty(exports2, "createProtocolConnection", { enumerable: true, get: function() {
      return connection_1.createProtocolConnection;
    } });
    var LSPErrorCodes;
    (function(LSPErrorCodes2) {
      LSPErrorCodes2.lspReservedErrorRangeStart = -32899;
      LSPErrorCodes2.RequestFailed = -32803;
      LSPErrorCodes2.ServerCancelled = -32802;
      LSPErrorCodes2.ContentModified = -32801;
      LSPErrorCodes2.RequestCancelled = -32800;
      LSPErrorCodes2.lspReservedErrorRangeEnd = -32800;
    })(LSPErrorCodes || (exports2.LSPErrorCodes = LSPErrorCodes = {}));
  }
});

// server/node_modules/vscode-languageserver-protocol/lib/node/main.js
var require_main3 = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/lib/node/main.js"(exports2) {
    "use strict";
    var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m2, k);
      if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m2[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    }) : (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m2[k];
    }));
    var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
      for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
    };
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createProtocolConnection = void 0;
    var node_1 = require_node();
    __exportStar(require_node(), exports2);
    __exportStar(require_api2(), exports2);
    function createProtocolConnection(input, output, logger, options) {
      return (0, node_1.createMessageConnection)(input, output, logger, options);
    }
    exports2.createProtocolConnection = createProtocolConnection;
  }
});

// server/node_modules/vscode-languageserver/lib/common/utils/uuid.js
var require_uuid = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/utils/uuid.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.generateUuid = exports2.parse = exports2.isUUID = exports2.v4 = exports2.empty = void 0;
    var ValueUUID = class {
      constructor(_value) {
        this._value = _value;
      }
      asHex() {
        return this._value;
      }
      equals(other) {
        return this.asHex() === other.asHex();
      }
    };
    var V4UUID = class _V4UUID extends ValueUUID {
      static _oneOf(array2) {
        return array2[Math.floor(array2.length * Math.random())];
      }
      static _randomHex() {
        return _V4UUID._oneOf(_V4UUID._chars);
      }
      constructor() {
        super([
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          "-",
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          "-",
          "4",
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          "-",
          _V4UUID._oneOf(_V4UUID._timeHighBits),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          "-",
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex(),
          _V4UUID._randomHex()
        ].join(""));
      }
    };
    V4UUID._chars = ["0", "1", "2", "3", "4", "5", "6", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
    V4UUID._timeHighBits = ["8", "9", "a", "b"];
    exports2.empty = new ValueUUID("00000000-0000-0000-0000-000000000000");
    function v4() {
      return new V4UUID();
    }
    exports2.v4 = v4;
    var _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
    function isUUID(value) {
      return _UUIDPattern.test(value);
    }
    exports2.isUUID = isUUID;
    function parse3(value) {
      if (!isUUID(value)) {
        throw new Error("invalid uuid");
      }
      return new ValueUUID(value);
    }
    exports2.parse = parse3;
    function generateUuid() {
      return v4().asHex();
    }
    exports2.generateUuid = generateUuid;
  }
});

// server/node_modules/vscode-languageserver/lib/common/progress.js
var require_progress = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/progress.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.attachPartialResult = exports2.ProgressFeature = exports2.attachWorkDone = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var uuid_1 = require_uuid();
    var WorkDoneProgressReporterImpl = class _WorkDoneProgressReporterImpl {
      constructor(_connection, _token) {
        this._connection = _connection;
        this._token = _token;
        _WorkDoneProgressReporterImpl.Instances.set(this._token, this);
      }
      begin(title, percentage, message, cancellable) {
        let param = {
          kind: "begin",
          title,
          percentage,
          message,
          cancellable
        };
        this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
      }
      report(arg0, arg1) {
        let param = {
          kind: "report"
        };
        if (typeof arg0 === "number") {
          param.percentage = arg0;
          if (arg1 !== void 0) {
            param.message = arg1;
          }
        } else {
          param.message = arg0;
        }
        this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
      }
      done() {
        _WorkDoneProgressReporterImpl.Instances.delete(this._token);
        this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: "end" });
      }
    };
    WorkDoneProgressReporterImpl.Instances = /* @__PURE__ */ new Map();
    var WorkDoneProgressServerReporterImpl = class extends WorkDoneProgressReporterImpl {
      constructor(connection, token) {
        super(connection, token);
        this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
      }
      get token() {
        return this._source.token;
      }
      done() {
        this._source.dispose();
        super.done();
      }
      cancel() {
        this._source.cancel();
      }
    };
    var NullProgressReporter = class {
      constructor() {
      }
      begin() {
      }
      report() {
      }
      done() {
      }
    };
    var NullProgressServerReporter = class extends NullProgressReporter {
      constructor() {
        super();
        this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
      }
      get token() {
        return this._source.token;
      }
      done() {
        this._source.dispose();
      }
      cancel() {
        this._source.cancel();
      }
    };
    function attachWorkDone(connection, params) {
      if (params === void 0 || params.workDoneToken === void 0) {
        return new NullProgressReporter();
      }
      const token = params.workDoneToken;
      delete params.workDoneToken;
      return new WorkDoneProgressReporterImpl(connection, token);
    }
    exports2.attachWorkDone = attachWorkDone;
    var ProgressFeature = (Base) => {
      return class extends Base {
        constructor() {
          super();
          this._progressSupported = false;
        }
        initialize(capabilities) {
          super.initialize(capabilities);
          if (capabilities?.window?.workDoneProgress === true) {
            this._progressSupported = true;
            this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
              let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);
              if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) {
                progress.cancel();
              }
            });
          }
        }
        attachWorkDoneProgress(token) {
          if (token === void 0) {
            return new NullProgressReporter();
          } else {
            return new WorkDoneProgressReporterImpl(this.connection, token);
          }
        }
        createWorkDoneProgress() {
          if (this._progressSupported) {
            const token = (0, uuid_1.generateUuid)();
            return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
              const result = new WorkDoneProgressServerReporterImpl(this.connection, token);
              return result;
            });
          } else {
            return Promise.resolve(new NullProgressServerReporter());
          }
        }
      };
    };
    exports2.ProgressFeature = ProgressFeature;
    var ResultProgress;
    (function(ResultProgress2) {
      ResultProgress2.type = new vscode_languageserver_protocol_1.ProgressType();
    })(ResultProgress || (ResultProgress = {}));
    var ResultProgressReporterImpl = class {
      constructor(_connection, _token) {
        this._connection = _connection;
        this._token = _token;
      }
      report(data) {
        this._connection.sendProgress(ResultProgress.type, this._token, data);
      }
    };
    function attachPartialResult(connection, params) {
      if (params === void 0 || params.partialResultToken === void 0) {
        return void 0;
      }
      const token = params.partialResultToken;
      delete params.partialResultToken;
      return new ResultProgressReporterImpl(connection, token);
    }
    exports2.attachPartialResult = attachPartialResult;
  }
});

// server/node_modules/vscode-languageserver/lib/common/configuration.js
var require_configuration = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/configuration.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ConfigurationFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var Is = require_is();
    var ConfigurationFeature = (Base) => {
      return class extends Base {
        getConfiguration(arg) {
          if (!arg) {
            return this._getConfiguration({});
          } else if (Is.string(arg)) {
            return this._getConfiguration({ section: arg });
          } else {
            return this._getConfiguration(arg);
          }
        }
        _getConfiguration(arg) {
          let params = {
            items: Array.isArray(arg) ? arg : [arg]
          };
          return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
            if (Array.isArray(result)) {
              return Array.isArray(arg) ? result : result[0];
            } else {
              return Array.isArray(arg) ? [] : null;
            }
          });
        }
      };
    };
    exports2.ConfigurationFeature = ConfigurationFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/workspaceFolder.js
var require_workspaceFolder = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/workspaceFolder.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.WorkspaceFoldersFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var WorkspaceFoldersFeature = (Base) => {
      return class extends Base {
        constructor() {
          super();
          this._notificationIsAutoRegistered = false;
        }
        initialize(capabilities) {
          super.initialize(capabilities);
          let workspaceCapabilities = capabilities.workspace;
          if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
            this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
            this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
              this._onDidChangeWorkspaceFolders.fire(params.event);
            });
          }
        }
        fillServerCapabilities(capabilities) {
          super.fillServerCapabilities(capabilities);
          const changeNotifications = capabilities.workspace?.workspaceFolders?.changeNotifications;
          this._notificationIsAutoRegistered = changeNotifications === true || typeof changeNotifications === "string";
        }
        getWorkspaceFolders() {
          return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
        }
        get onDidChangeWorkspaceFolders() {
          if (!this._onDidChangeWorkspaceFolders) {
            throw new Error("Client doesn't support sending workspace folder change events.");
          }
          if (!this._notificationIsAutoRegistered && !this._unregistration) {
            this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
          }
          return this._onDidChangeWorkspaceFolders.event;
        }
      };
    };
    exports2.WorkspaceFoldersFeature = WorkspaceFoldersFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/callHierarchy.js
var require_callHierarchy = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/callHierarchy.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.CallHierarchyFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var CallHierarchyFeature = (Base) => {
      return class extends Base {
        get callHierarchy() {
          return {
            onPrepare: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), void 0);
              });
            },
            onIncomingCalls: (handler) => {
              const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            },
            onOutgoingCalls: (handler) => {
              const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            }
          };
        }
      };
    };
    exports2.CallHierarchyFeature = CallHierarchyFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/semanticTokens.js
var require_semanticTokens = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/semanticTokens.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.SemanticTokensBuilder = exports2.SemanticTokensDiff = exports2.SemanticTokensFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var SemanticTokensFeature = (Base) => {
      return class extends Base {
        get semanticTokens() {
          return {
            refresh: () => {
              return this.connection.sendRequest(vscode_languageserver_protocol_1.SemanticTokensRefreshRequest.type);
            },
            on: (handler) => {
              const type = vscode_languageserver_protocol_1.SemanticTokensRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            },
            onDelta: (handler) => {
              const type = vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            },
            onRange: (handler) => {
              const type = vscode_languageserver_protocol_1.SemanticTokensRangeRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            }
          };
        }
      };
    };
    exports2.SemanticTokensFeature = SemanticTokensFeature;
    var SemanticTokensDiff = class {
      constructor(originalSequence, modifiedSequence) {
        this.originalSequence = originalSequence;
        this.modifiedSequence = modifiedSequence;
      }
      computeDiff() {
        const originalLength = this.originalSequence.length;
        const modifiedLength = this.modifiedSequence.length;
        let startIndex = 0;
        while (startIndex < modifiedLength && startIndex < originalLength && this.originalSequence[startIndex] === this.modifiedSequence[startIndex]) {
          startIndex++;
        }
        if (startIndex < modifiedLength && startIndex < originalLength) {
          let originalEndIndex = originalLength - 1;
          let modifiedEndIndex = modifiedLength - 1;
          while (originalEndIndex >= startIndex && modifiedEndIndex >= startIndex && this.originalSequence[originalEndIndex] === this.modifiedSequence[modifiedEndIndex]) {
            originalEndIndex--;
            modifiedEndIndex--;
          }
          if (originalEndIndex < startIndex || modifiedEndIndex < startIndex) {
            originalEndIndex++;
            modifiedEndIndex++;
          }
          const deleteCount = originalEndIndex - startIndex + 1;
          const newData = this.modifiedSequence.slice(startIndex, modifiedEndIndex + 1);
          if (newData.length === 1 && newData[0] === this.originalSequence[originalEndIndex]) {
            return [
              { start: startIndex, deleteCount: deleteCount - 1 }
            ];
          } else {
            return [
              { start: startIndex, deleteCount, data: newData }
            ];
          }
        } else if (startIndex < modifiedLength) {
          return [
            { start: startIndex, deleteCount: 0, data: this.modifiedSequence.slice(startIndex) }
          ];
        } else if (startIndex < originalLength) {
          return [
            { start: startIndex, deleteCount: originalLength - startIndex }
          ];
        } else {
          return [];
        }
      }
    };
    exports2.SemanticTokensDiff = SemanticTokensDiff;
    var SemanticTokensBuilder = class {
      constructor() {
        this._prevData = void 0;
        this.initialize();
      }
      initialize() {
        this._id = Date.now();
        this._prevLine = 0;
        this._prevChar = 0;
        this._data = [];
        this._dataLen = 0;
      }
      push(line, char, length, tokenType, tokenModifiers) {
        let pushLine = line;
        let pushChar = char;
        if (this._dataLen > 0) {
          pushLine -= this._prevLine;
          if (pushLine === 0) {
            pushChar -= this._prevChar;
          }
        }
        this._data[this._dataLen++] = pushLine;
        this._data[this._dataLen++] = pushChar;
        this._data[this._dataLen++] = length;
        this._data[this._dataLen++] = tokenType;
        this._data[this._dataLen++] = tokenModifiers;
        this._prevLine = line;
        this._prevChar = char;
      }
      get id() {
        return this._id.toString();
      }
      previousResult(id) {
        if (this.id === id) {
          this._prevData = this._data;
        }
        this.initialize();
      }
      build() {
        this._prevData = void 0;
        return {
          resultId: this.id,
          data: this._data
        };
      }
      canBuildEdits() {
        return this._prevData !== void 0;
      }
      buildEdits() {
        if (this._prevData !== void 0) {
          return {
            resultId: this.id,
            edits: new SemanticTokensDiff(this._prevData, this._data).computeDiff()
          };
        } else {
          return this.build();
        }
      }
    };
    exports2.SemanticTokensBuilder = SemanticTokensBuilder;
  }
});

// server/node_modules/vscode-languageserver/lib/common/showDocument.js
var require_showDocument = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/showDocument.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ShowDocumentFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var ShowDocumentFeature = (Base) => {
      return class extends Base {
        showDocument(params) {
          return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowDocumentRequest.type, params);
        }
      };
    };
    exports2.ShowDocumentFeature = ShowDocumentFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/fileOperations.js
var require_fileOperations = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/fileOperations.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.FileOperationsFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var FileOperationsFeature = (Base) => {
      return class extends Base {
        onDidCreateFiles(handler) {
          return this.connection.onNotification(vscode_languageserver_protocol_1.DidCreateFilesNotification.type, (params) => {
            handler(params);
          });
        }
        onDidRenameFiles(handler) {
          return this.connection.onNotification(vscode_languageserver_protocol_1.DidRenameFilesNotification.type, (params) => {
            handler(params);
          });
        }
        onDidDeleteFiles(handler) {
          return this.connection.onNotification(vscode_languageserver_protocol_1.DidDeleteFilesNotification.type, (params) => {
            handler(params);
          });
        }
        onWillCreateFiles(handler) {
          return this.connection.onRequest(vscode_languageserver_protocol_1.WillCreateFilesRequest.type, (params, cancel) => {
            return handler(params, cancel);
          });
        }
        onWillRenameFiles(handler) {
          return this.connection.onRequest(vscode_languageserver_protocol_1.WillRenameFilesRequest.type, (params, cancel) => {
            return handler(params, cancel);
          });
        }
        onWillDeleteFiles(handler) {
          return this.connection.onRequest(vscode_languageserver_protocol_1.WillDeleteFilesRequest.type, (params, cancel) => {
            return handler(params, cancel);
          });
        }
      };
    };
    exports2.FileOperationsFeature = FileOperationsFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js
var require_linkedEditingRange = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.LinkedEditingRangeFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var LinkedEditingRangeFeature = (Base) => {
      return class extends Base {
        onLinkedEditingRange(handler) {
          return this.connection.onRequest(vscode_languageserver_protocol_1.LinkedEditingRangeRequest.type, (params, cancel) => {
            return handler(params, cancel, this.attachWorkDoneProgress(params), void 0);
          });
        }
      };
    };
    exports2.LinkedEditingRangeFeature = LinkedEditingRangeFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/typeHierarchy.js
var require_typeHierarchy = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/typeHierarchy.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.TypeHierarchyFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var TypeHierarchyFeature = (Base) => {
      return class extends Base {
        get typeHierarchy() {
          return {
            onPrepare: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.TypeHierarchyPrepareRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), void 0);
              });
            },
            onSupertypes: (handler) => {
              const type = vscode_languageserver_protocol_1.TypeHierarchySupertypesRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            },
            onSubtypes: (handler) => {
              const type = vscode_languageserver_protocol_1.TypeHierarchySubtypesRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            }
          };
        }
      };
    };
    exports2.TypeHierarchyFeature = TypeHierarchyFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/inlineValue.js
var require_inlineValue = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/inlineValue.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.InlineValueFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var InlineValueFeature = (Base) => {
      return class extends Base {
        get inlineValue() {
          return {
            refresh: () => {
              return this.connection.sendRequest(vscode_languageserver_protocol_1.InlineValueRefreshRequest.type);
            },
            on: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.InlineValueRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params));
              });
            }
          };
        }
      };
    };
    exports2.InlineValueFeature = InlineValueFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/foldingRange.js
var require_foldingRange = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/foldingRange.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.FoldingRangeFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var FoldingRangeFeature = (Base) => {
      return class extends Base {
        get foldingRange() {
          return {
            refresh: () => {
              return this.connection.sendRequest(vscode_languageserver_protocol_1.FoldingRangeRefreshRequest.type);
            },
            on: (handler) => {
              const type = vscode_languageserver_protocol_1.FoldingRangeRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            }
          };
        }
      };
    };
    exports2.FoldingRangeFeature = FoldingRangeFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/inlayHint.js
var require_inlayHint = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/inlayHint.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.InlayHintFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var InlayHintFeature = (Base) => {
      return class extends Base {
        get inlayHint() {
          return {
            refresh: () => {
              return this.connection.sendRequest(vscode_languageserver_protocol_1.InlayHintRefreshRequest.type);
            },
            on: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params));
              });
            },
            resolve: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintResolveRequest.type, (params, cancel) => {
                return handler(params, cancel);
              });
            }
          };
        }
      };
    };
    exports2.InlayHintFeature = InlayHintFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/diagnostic.js
var require_diagnostic = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/diagnostic.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.DiagnosticFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var DiagnosticFeature = (Base) => {
      return class extends Base {
        get diagnostics() {
          return {
            refresh: () => {
              return this.connection.sendRequest(vscode_languageserver_protocol_1.DiagnosticRefreshRequest.type);
            },
            on: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.partialResult, params));
              });
            },
            onWorkspace: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.partialResult, params));
              });
            }
          };
        }
      };
    };
    exports2.DiagnosticFeature = DiagnosticFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/textDocuments.js
var require_textDocuments = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/textDocuments.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.TextDocuments = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var TextDocuments = class {
      /**
       * Create a new text document manager.
       */
      constructor(configuration) {
        this._configuration = configuration;
        this._syncedDocuments = /* @__PURE__ */ new Map();
        this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
        this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
        this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
        this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
        this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
      }
      /**
       * An event that fires when a text document managed by this manager
       * has been opened.
       */
      get onDidOpen() {
        return this._onDidOpen.event;
      }
      /**
       * An event that fires when a text document managed by this manager
       * has been opened or the content changes.
       */
      get onDidChangeContent() {
        return this._onDidChangeContent.event;
      }
      /**
       * An event that fires when a text document managed by this manager
       * will be saved.
       */
      get onWillSave() {
        return this._onWillSave.event;
      }
      /**
       * Sets a handler that will be called if a participant wants to provide
       * edits during a text document save.
       */
      onWillSaveWaitUntil(handler) {
        this._willSaveWaitUntil = handler;
      }
      /**
       * An event that fires when a text document managed by this manager
       * has been saved.
       */
      get onDidSave() {
        return this._onDidSave.event;
      }
      /**
       * An event that fires when a text document managed by this manager
       * has been closed.
       */
      get onDidClose() {
        return this._onDidClose.event;
      }
      /**
       * Returns the document for the given URI. Returns undefined if
       * the document is not managed by this instance.
       *
       * @param uri The text document's URI to retrieve.
       * @return the text document or `undefined`.
       */
      get(uri) {
        return this._syncedDocuments.get(uri);
      }
      /**
       * Returns all text documents managed by this instance.
       *
       * @return all text documents.
       */
      all() {
        return Array.from(this._syncedDocuments.values());
      }
      /**
       * Returns the URIs of all text documents managed by this instance.
       *
       * @return the URI's of all text documents.
       */
      keys() {
        return Array.from(this._syncedDocuments.keys());
      }
      /**
       * Listens for `low level` notification on the given connection to
       * update the text documents managed by this instance.
       *
       * Please note that the connection only provides handlers not an event model. Therefore
       * listening on a connection will overwrite the following handlers on a connection:
       * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
       * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
       *
       * Use the corresponding events on the TextDocuments instance instead.
       *
       * @param connection The connection to listen on.
       */
      listen(connection) {
        connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental;
        const disposables = [];
        disposables.push(connection.onDidOpenTextDocument((event) => {
          const td = event.textDocument;
          const document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
          this._syncedDocuments.set(td.uri, document);
          const toFire = Object.freeze({ document });
          this._onDidOpen.fire(toFire);
          this._onDidChangeContent.fire(toFire);
        }));
        disposables.push(connection.onDidChangeTextDocument((event) => {
          const td = event.textDocument;
          const changes = event.contentChanges;
          if (changes.length === 0) {
            return;
          }
          const { version: version2 } = td;
          if (version2 === null || version2 === void 0) {
            throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
          }
          let syncedDocument = this._syncedDocuments.get(td.uri);
          if (syncedDocument !== void 0) {
            syncedDocument = this._configuration.update(syncedDocument, changes, version2);
            this._syncedDocuments.set(td.uri, syncedDocument);
            this._onDidChangeContent.fire(Object.freeze({ document: syncedDocument }));
          }
        }));
        disposables.push(connection.onDidCloseTextDocument((event) => {
          let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
          if (syncedDocument !== void 0) {
            this._syncedDocuments.delete(event.textDocument.uri);
            this._onDidClose.fire(Object.freeze({ document: syncedDocument }));
          }
        }));
        disposables.push(connection.onWillSaveTextDocument((event) => {
          let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
          if (syncedDocument !== void 0) {
            this._onWillSave.fire(Object.freeze({ document: syncedDocument, reason: event.reason }));
          }
        }));
        disposables.push(connection.onWillSaveTextDocumentWaitUntil((event, token) => {
          let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
          if (syncedDocument !== void 0 && this._willSaveWaitUntil) {
            return this._willSaveWaitUntil(Object.freeze({ document: syncedDocument, reason: event.reason }), token);
          } else {
            return [];
          }
        }));
        disposables.push(connection.onDidSaveTextDocument((event) => {
          let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);
          if (syncedDocument !== void 0) {
            this._onDidSave.fire(Object.freeze({ document: syncedDocument }));
          }
        }));
        return vscode_languageserver_protocol_1.Disposable.create(() => {
          disposables.forEach((disposable) => disposable.dispose());
        });
      }
    };
    exports2.TextDocuments = TextDocuments;
  }
});

// server/node_modules/vscode-languageserver/lib/common/notebook.js
var require_notebook = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/notebook.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.NotebookDocuments = exports2.NotebookSyncFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var textDocuments_1 = require_textDocuments();
    var NotebookSyncFeature = (Base) => {
      return class extends Base {
        get synchronization() {
          return {
            onDidOpenNotebookDocument: (handler) => {
              return this.connection.onNotification(vscode_languageserver_protocol_1.DidOpenNotebookDocumentNotification.type, (params) => {
                handler(params);
              });
            },
            onDidChangeNotebookDocument: (handler) => {
              return this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeNotebookDocumentNotification.type, (params) => {
                handler(params);
              });
            },
            onDidSaveNotebookDocument: (handler) => {
              return this.connection.onNotification(vscode_languageserver_protocol_1.DidSaveNotebookDocumentNotification.type, (params) => {
                handler(params);
              });
            },
            onDidCloseNotebookDocument: (handler) => {
              return this.connection.onNotification(vscode_languageserver_protocol_1.DidCloseNotebookDocumentNotification.type, (params) => {
                handler(params);
              });
            }
          };
        }
      };
    };
    exports2.NotebookSyncFeature = NotebookSyncFeature;
    var CellTextDocumentConnection = class _CellTextDocumentConnection {
      onDidOpenTextDocument(handler) {
        this.openHandler = handler;
        return vscode_languageserver_protocol_1.Disposable.create(() => {
          this.openHandler = void 0;
        });
      }
      openTextDocument(params) {
        this.openHandler && this.openHandler(params);
      }
      onDidChangeTextDocument(handler) {
        this.changeHandler = handler;
        return vscode_languageserver_protocol_1.Disposable.create(() => {
          this.changeHandler = handler;
        });
      }
      changeTextDocument(params) {
        this.changeHandler && this.changeHandler(params);
      }
      onDidCloseTextDocument(handler) {
        this.closeHandler = handler;
        return vscode_languageserver_protocol_1.Disposable.create(() => {
          this.closeHandler = void 0;
        });
      }
      closeTextDocument(params) {
        this.closeHandler && this.closeHandler(params);
      }
      onWillSaveTextDocument() {
        return _CellTextDocumentConnection.NULL_DISPOSE;
      }
      onWillSaveTextDocumentWaitUntil() {
        return _CellTextDocumentConnection.NULL_DISPOSE;
      }
      onDidSaveTextDocument() {
        return _CellTextDocumentConnection.NULL_DISPOSE;
      }
    };
    CellTextDocumentConnection.NULL_DISPOSE = Object.freeze({ dispose: () => {
    } });
    var NotebookDocuments = class {
      constructor(configurationOrTextDocuments) {
        if (configurationOrTextDocuments instanceof textDocuments_1.TextDocuments) {
          this._cellTextDocuments = configurationOrTextDocuments;
        } else {
          this._cellTextDocuments = new textDocuments_1.TextDocuments(configurationOrTextDocuments);
        }
        this.notebookDocuments = /* @__PURE__ */ new Map();
        this.notebookCellMap = /* @__PURE__ */ new Map();
        this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
        this._onDidChange = new vscode_languageserver_protocol_1.Emitter();
        this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
        this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
      }
      get cellTextDocuments() {
        return this._cellTextDocuments;
      }
      getCellTextDocument(cell) {
        return this._cellTextDocuments.get(cell.document);
      }
      getNotebookDocument(uri) {
        return this.notebookDocuments.get(uri);
      }
      getNotebookCell(uri) {
        const value = this.notebookCellMap.get(uri);
        return value && value[0];
      }
      findNotebookDocumentForCell(cell) {
        const key = typeof cell === "string" ? cell : cell.document;
        const value = this.notebookCellMap.get(key);
        return value && value[1];
      }
      get onDidOpen() {
        return this._onDidOpen.event;
      }
      get onDidSave() {
        return this._onDidSave.event;
      }
      get onDidChange() {
        return this._onDidChange.event;
      }
      get onDidClose() {
        return this._onDidClose.event;
      }
      /**
       * Listens for `low level` notification on the given connection to
       * update the notebook documents managed by this instance.
       *
       * Please note that the connection only provides handlers not an event model. Therefore
       * listening on a connection will overwrite the following handlers on a connection:
       * `onDidOpenNotebookDocument`, `onDidChangeNotebookDocument`, `onDidSaveNotebookDocument`,
       *  and `onDidCloseNotebookDocument`.
       *
       * @param connection The connection to listen on.
       */
      listen(connection) {
        const cellTextDocumentConnection = new CellTextDocumentConnection();
        const disposables = [];
        disposables.push(this.cellTextDocuments.listen(cellTextDocumentConnection));
        disposables.push(connection.notebooks.synchronization.onDidOpenNotebookDocument((params) => {
          this.notebookDocuments.set(params.notebookDocument.uri, params.notebookDocument);
          for (const cellTextDocument of params.cellTextDocuments) {
            cellTextDocumentConnection.openTextDocument({ textDocument: cellTextDocument });
          }
          this.updateCellMap(params.notebookDocument);
          this._onDidOpen.fire(params.notebookDocument);
        }));
        disposables.push(connection.notebooks.synchronization.onDidChangeNotebookDocument((params) => {
          const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);
          if (notebookDocument === void 0) {
            return;
          }
          notebookDocument.version = params.notebookDocument.version;
          const oldMetadata = notebookDocument.metadata;
          let metadataChanged = false;
          const change = params.change;
          if (change.metadata !== void 0) {
            metadataChanged = true;
            notebookDocument.metadata = change.metadata;
          }
          const opened = [];
          const closed = [];
          const data = [];
          const text = [];
          if (change.cells !== void 0) {
            const changedCells = change.cells;
            if (changedCells.structure !== void 0) {
              const array2 = changedCells.structure.array;
              notebookDocument.cells.splice(array2.start, array2.deleteCount, ...array2.cells !== void 0 ? array2.cells : []);
              if (changedCells.structure.didOpen !== void 0) {
                for (const open of changedCells.structure.didOpen) {
                  cellTextDocumentConnection.openTextDocument({ textDocument: open });
                  opened.push(open.uri);
                }
              }
              if (changedCells.structure.didClose) {
                for (const close of changedCells.structure.didClose) {
                  cellTextDocumentConnection.closeTextDocument({ textDocument: close });
                  closed.push(close.uri);
                }
              }
            }
            if (changedCells.data !== void 0) {
              const cellUpdates = new Map(changedCells.data.map((cell) => [cell.document, cell]));
              for (let i = 0; i <= notebookDocument.cells.length; i++) {
                const change2 = cellUpdates.get(notebookDocument.cells[i].document);
                if (change2 !== void 0) {
                  const old = notebookDocument.cells.splice(i, 1, change2);
                  data.push({ old: old[0], new: change2 });
                  cellUpdates.delete(change2.document);
                  if (cellUpdates.size === 0) {
                    break;
                  }
                }
              }
            }
            if (changedCells.textContent !== void 0) {
              for (const cellTextDocument of changedCells.textContent) {
                cellTextDocumentConnection.changeTextDocument({ textDocument: cellTextDocument.document, contentChanges: cellTextDocument.changes });
                text.push(cellTextDocument.document.uri);
              }
            }
          }
          this.updateCellMap(notebookDocument);
          const changeEvent = { notebookDocument };
          if (metadataChanged) {
            changeEvent.metadata = { old: oldMetadata, new: notebookDocument.metadata };
          }
          const added = [];
          for (const open of opened) {
            added.push(this.getNotebookCell(open));
          }
          const removed = [];
          for (const close of closed) {
            removed.push(this.getNotebookCell(close));
          }
          const textContent = [];
          for (const change2 of text) {
            textContent.push(this.getNotebookCell(change2));
          }
          if (added.length > 0 || removed.length > 0 || data.length > 0 || textContent.length > 0) {
            changeEvent.cells = { added, removed, changed: { data, textContent } };
          }
          if (changeEvent.metadata !== void 0 || changeEvent.cells !== void 0) {
            this._onDidChange.fire(changeEvent);
          }
        }));
        disposables.push(connection.notebooks.synchronization.onDidSaveNotebookDocument((params) => {
          const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);
          if (notebookDocument === void 0) {
            return;
          }
          this._onDidSave.fire(notebookDocument);
        }));
        disposables.push(connection.notebooks.synchronization.onDidCloseNotebookDocument((params) => {
          const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);
          if (notebookDocument === void 0) {
            return;
          }
          this._onDidClose.fire(notebookDocument);
          for (const cellTextDocument of params.cellTextDocuments) {
            cellTextDocumentConnection.closeTextDocument({ textDocument: cellTextDocument });
          }
          this.notebookDocuments.delete(params.notebookDocument.uri);
          for (const cell of notebookDocument.cells) {
            this.notebookCellMap.delete(cell.document);
          }
        }));
        return vscode_languageserver_protocol_1.Disposable.create(() => {
          disposables.forEach((disposable) => disposable.dispose());
        });
      }
      updateCellMap(notebookDocument) {
        for (const cell of notebookDocument.cells) {
          this.notebookCellMap.set(cell.document, [cell, notebookDocument]);
        }
      }
    };
    exports2.NotebookDocuments = NotebookDocuments;
  }
});

// server/node_modules/vscode-languageserver/lib/common/moniker.js
var require_moniker = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/moniker.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.MonikerFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var MonikerFeature = (Base) => {
      return class extends Base {
        get moniker() {
          return {
            on: (handler) => {
              const type = vscode_languageserver_protocol_1.MonikerRequest.type;
              return this.connection.onRequest(type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
              });
            }
          };
        }
      };
    };
    exports2.MonikerFeature = MonikerFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/server.js
var require_server = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/server.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createConnection = exports2.combineFeatures = exports2.combineNotebooksFeatures = exports2.combineLanguagesFeatures = exports2.combineWorkspaceFeatures = exports2.combineWindowFeatures = exports2.combineClientFeatures = exports2.combineTracerFeatures = exports2.combineTelemetryFeatures = exports2.combineConsoleFeatures = exports2._NotebooksImpl = exports2._LanguagesImpl = exports2.BulkUnregistration = exports2.BulkRegistration = exports2.ErrorMessageTracker = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var Is = require_is();
    var UUID = require_uuid();
    var progress_1 = require_progress();
    var configuration_1 = require_configuration();
    var workspaceFolder_1 = require_workspaceFolder();
    var callHierarchy_1 = require_callHierarchy();
    var semanticTokens_1 = require_semanticTokens();
    var showDocument_1 = require_showDocument();
    var fileOperations_1 = require_fileOperations();
    var linkedEditingRange_1 = require_linkedEditingRange();
    var typeHierarchy_1 = require_typeHierarchy();
    var inlineValue_1 = require_inlineValue();
    var foldingRange_1 = require_foldingRange();
    var inlayHint_1 = require_inlayHint();
    var diagnostic_1 = require_diagnostic();
    var notebook_1 = require_notebook();
    var moniker_1 = require_moniker();
    function null2Undefined(value) {
      if (value === null) {
        return void 0;
      }
      return value;
    }
    var ErrorMessageTracker = class {
      constructor() {
        this._messages = /* @__PURE__ */ Object.create(null);
      }
      /**
       * Add a message to the tracker.
       *
       * @param message The message to add.
       */
      add(message) {
        let count = this._messages[message];
        if (!count) {
          count = 0;
        }
        count++;
        this._messages[message] = count;
      }
      /**
       * Send all tracked messages to the connection's window.
       *
       * @param connection The connection established between client and server.
       */
      sendErrors(connection) {
        Object.keys(this._messages).forEach((message) => {
          connection.window.showErrorMessage(message);
        });
      }
    };
    exports2.ErrorMessageTracker = ErrorMessageTracker;
    var RemoteConsoleImpl = class {
      constructor() {
      }
      rawAttach(connection) {
        this._rawConnection = connection;
      }
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      fillServerCapabilities(_capabilities) {
      }
      initialize(_capabilities) {
      }
      error(message) {
        this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
      }
      warn(message) {
        this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
      }
      info(message) {
        this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
      }
      log(message) {
        this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
      }
      debug(message) {
        this.send(vscode_languageserver_protocol_1.MessageType.Debug, message);
      }
      send(type, message) {
        if (this._rawConnection) {
          this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message }).catch(() => {
            (0, vscode_languageserver_protocol_1.RAL)().console.error(`Sending log message failed`);
          });
        }
      }
    };
    var _RemoteWindowImpl = class {
      constructor() {
      }
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      initialize(_capabilities) {
      }
      fillServerCapabilities(_capabilities) {
      }
      showErrorMessage(message, ...actions) {
        let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
        return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
      }
      showWarningMessage(message, ...actions) {
        let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
        return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
      }
      showInformationMessage(message, ...actions) {
        let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
        return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
      }
    };
    var RemoteWindowImpl = (0, showDocument_1.ShowDocumentFeature)((0, progress_1.ProgressFeature)(_RemoteWindowImpl));
    var BulkRegistration;
    (function(BulkRegistration2) {
      function create() {
        return new BulkRegistrationImpl();
      }
      BulkRegistration2.create = create;
    })(BulkRegistration || (exports2.BulkRegistration = BulkRegistration = {}));
    var BulkRegistrationImpl = class {
      constructor() {
        this._registrations = [];
        this._registered = /* @__PURE__ */ new Set();
      }
      add(type, registerOptions) {
        const method = Is.string(type) ? type : type.method;
        if (this._registered.has(method)) {
          throw new Error(`${method} is already added to this registration`);
        }
        const id = UUID.generateUuid();
        this._registrations.push({
          id,
          method,
          registerOptions: registerOptions || {}
        });
        this._registered.add(method);
      }
      asRegistrationParams() {
        return {
          registrations: this._registrations
        };
      }
    };
    var BulkUnregistration;
    (function(BulkUnregistration2) {
      function create() {
        return new BulkUnregistrationImpl(void 0, []);
      }
      BulkUnregistration2.create = create;
    })(BulkUnregistration || (exports2.BulkUnregistration = BulkUnregistration = {}));
    var BulkUnregistrationImpl = class {
      constructor(_connection, unregistrations) {
        this._connection = _connection;
        this._unregistrations = /* @__PURE__ */ new Map();
        unregistrations.forEach((unregistration) => {
          this._unregistrations.set(unregistration.method, unregistration);
        });
      }
      get isAttached() {
        return !!this._connection;
      }
      attach(connection) {
        this._connection = connection;
      }
      add(unregistration) {
        this._unregistrations.set(unregistration.method, unregistration);
      }
      dispose() {
        let unregistrations = [];
        for (let unregistration of this._unregistrations.values()) {
          unregistrations.push(unregistration);
        }
        let params = {
          unregisterations: unregistrations
        };
        this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).catch(() => {
          this._connection.console.info(`Bulk unregistration failed.`);
        });
      }
      disposeSingle(arg) {
        const method = Is.string(arg) ? arg : arg.method;
        const unregistration = this._unregistrations.get(method);
        if (!unregistration) {
          return false;
        }
        let params = {
          unregisterations: [unregistration]
        };
        this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
          this._unregistrations.delete(method);
        }, (_error) => {
          this._connection.console.info(`Un-registering request handler for ${unregistration.id} failed.`);
        });
        return true;
      }
    };
    var RemoteClientImpl = class {
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      initialize(_capabilities) {
      }
      fillServerCapabilities(_capabilities) {
      }
      register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
        if (typeOrRegistrations instanceof BulkRegistrationImpl) {
          return this.registerMany(typeOrRegistrations);
        } else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
          return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
        } else {
          return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
        }
      }
      registerSingle1(unregistration, type, registerOptions) {
        const method = Is.string(type) ? type : type.method;
        const id = UUID.generateUuid();
        let params = {
          registrations: [{ id, method, registerOptions: registerOptions || {} }]
        };
        if (!unregistration.isAttached) {
          unregistration.attach(this.connection);
        }
        return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
          unregistration.add({ id, method });
          return unregistration;
        }, (_error) => {
          this.connection.console.info(`Registering request handler for ${method} failed.`);
          return Promise.reject(_error);
        });
      }
      registerSingle2(type, registerOptions) {
        const method = Is.string(type) ? type : type.method;
        const id = UUID.generateUuid();
        let params = {
          registrations: [{ id, method, registerOptions: registerOptions || {} }]
        };
        return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
          return vscode_languageserver_protocol_1.Disposable.create(() => {
            this.unregisterSingle(id, method).catch(() => {
              this.connection.console.info(`Un-registering capability with id ${id} failed.`);
            });
          });
        }, (_error) => {
          this.connection.console.info(`Registering request handler for ${method} failed.`);
          return Promise.reject(_error);
        });
      }
      unregisterSingle(id, method) {
        let params = {
          unregisterations: [{ id, method }]
        };
        return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).catch(() => {
          this.connection.console.info(`Un-registering request handler for ${id} failed.`);
        });
      }
      registerMany(registrations) {
        let params = registrations.asRegistrationParams();
        return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
          return new BulkUnregistrationImpl(this._connection, params.registrations.map((registration) => {
            return { id: registration.id, method: registration.method };
          }));
        }, (_error) => {
          this.connection.console.info(`Bulk registration failed.`);
          return Promise.reject(_error);
        });
      }
    };
    var _RemoteWorkspaceImpl = class {
      constructor() {
      }
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      initialize(_capabilities) {
      }
      fillServerCapabilities(_capabilities) {
      }
      applyEdit(paramOrEdit) {
        function isApplyWorkspaceEditParams(value) {
          return value && !!value.edit;
        }
        let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
        return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
      }
    };
    var RemoteWorkspaceImpl = (0, fileOperations_1.FileOperationsFeature)((0, workspaceFolder_1.WorkspaceFoldersFeature)((0, configuration_1.ConfigurationFeature)(_RemoteWorkspaceImpl)));
    var TracerImpl = class {
      constructor() {
        this._trace = vscode_languageserver_protocol_1.Trace.Off;
      }
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      initialize(_capabilities) {
      }
      fillServerCapabilities(_capabilities) {
      }
      set trace(value) {
        this._trace = value;
      }
      log(message, verbose) {
        if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
          return;
        }
        this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
          message,
          verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : void 0
        }).catch(() => {
        });
      }
    };
    var TelemetryImpl = class {
      constructor() {
      }
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      initialize(_capabilities) {
      }
      fillServerCapabilities(_capabilities) {
      }
      logEvent(data) {
        this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data).catch(() => {
          this.connection.console.log(`Sending TelemetryEventNotification failed`);
        });
      }
    };
    var _LanguagesImpl = class {
      constructor() {
      }
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      initialize(_capabilities) {
      }
      fillServerCapabilities(_capabilities) {
      }
      attachWorkDoneProgress(params) {
        return (0, progress_1.attachWorkDone)(this.connection, params);
      }
      attachPartialResultProgress(_type, params) {
        return (0, progress_1.attachPartialResult)(this.connection, params);
      }
    };
    exports2._LanguagesImpl = _LanguagesImpl;
    var LanguagesImpl = (0, foldingRange_1.FoldingRangeFeature)((0, moniker_1.MonikerFeature)((0, diagnostic_1.DiagnosticFeature)((0, inlayHint_1.InlayHintFeature)((0, inlineValue_1.InlineValueFeature)((0, typeHierarchy_1.TypeHierarchyFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl)))))))));
    var _NotebooksImpl = class {
      constructor() {
      }
      attach(connection) {
        this._connection = connection;
      }
      get connection() {
        if (!this._connection) {
          throw new Error("Remote is not attached to a connection yet.");
        }
        return this._connection;
      }
      initialize(_capabilities) {
      }
      fillServerCapabilities(_capabilities) {
      }
      attachWorkDoneProgress(params) {
        return (0, progress_1.attachWorkDone)(this.connection, params);
      }
      attachPartialResultProgress(_type, params) {
        return (0, progress_1.attachPartialResult)(this.connection, params);
      }
    };
    exports2._NotebooksImpl = _NotebooksImpl;
    var NotebooksImpl = (0, notebook_1.NotebookSyncFeature)(_NotebooksImpl);
    function combineConsoleFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineConsoleFeatures = combineConsoleFeatures;
    function combineTelemetryFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineTelemetryFeatures = combineTelemetryFeatures;
    function combineTracerFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineTracerFeatures = combineTracerFeatures;
    function combineClientFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineClientFeatures = combineClientFeatures;
    function combineWindowFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineWindowFeatures = combineWindowFeatures;
    function combineWorkspaceFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineWorkspaceFeatures = combineWorkspaceFeatures;
    function combineLanguagesFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineLanguagesFeatures = combineLanguagesFeatures;
    function combineNotebooksFeatures(one, two) {
      return function(Base) {
        return two(one(Base));
      };
    }
    exports2.combineNotebooksFeatures = combineNotebooksFeatures;
    function combineFeatures(one, two) {
      function combine(one2, two2, func) {
        if (one2 && two2) {
          return func(one2, two2);
        } else if (one2) {
          return one2;
        } else {
          return two2;
        }
      }
      let result = {
        __brand: "features",
        console: combine(one.console, two.console, combineConsoleFeatures),
        tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
        telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
        client: combine(one.client, two.client, combineClientFeatures),
        window: combine(one.window, two.window, combineWindowFeatures),
        workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures),
        languages: combine(one.languages, two.languages, combineLanguagesFeatures),
        notebooks: combine(one.notebooks, two.notebooks, combineNotebooksFeatures)
      };
      return result;
    }
    exports2.combineFeatures = combineFeatures;
    function createConnection(connectionFactory, watchDog, factories) {
      const logger = factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl();
      const connection = connectionFactory(logger);
      logger.rawAttach(connection);
      const tracer = factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl();
      const telemetry = factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl();
      const client = factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl();
      const remoteWindow = factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl();
      const workspace = factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl();
      const languages = factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl();
      const notebooks = factories && factories.notebooks ? new (factories.notebooks(NotebooksImpl))() : new NotebooksImpl();
      const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages, notebooks];
      function asPromise(value) {
        if (value instanceof Promise) {
          return value;
        } else if (Is.thenable(value)) {
          return new Promise((resolve, reject) => {
            value.then((resolved) => resolve(resolved), (error51) => reject(error51));
          });
        } else {
          return Promise.resolve(value);
        }
      }
      let shutdownHandler = void 0;
      let initializeHandler = void 0;
      let exitHandler = void 0;
      let protocolConnection = {
        listen: () => connection.listen(),
        sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
        onRequest: (type, handler) => connection.onRequest(type, handler),
        sendNotification: (type, param) => {
          const method = Is.string(type) ? type : type.method;
          return connection.sendNotification(method, param);
        },
        onNotification: (type, handler) => connection.onNotification(type, handler),
        onProgress: connection.onProgress,
        sendProgress: connection.sendProgress,
        onInitialize: (handler) => {
          initializeHandler = handler;
          return {
            dispose: () => {
              initializeHandler = void 0;
            }
          };
        },
        onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
        onShutdown: (handler) => {
          shutdownHandler = handler;
          return {
            dispose: () => {
              shutdownHandler = void 0;
            }
          };
        },
        onExit: (handler) => {
          exitHandler = handler;
          return {
            dispose: () => {
              exitHandler = void 0;
            }
          };
        },
        get console() {
          return logger;
        },
        get telemetry() {
          return telemetry;
        },
        get tracer() {
          return tracer;
        },
        get client() {
          return client;
        },
        get window() {
          return remoteWindow;
        },
        get workspace() {
          return workspace;
        },
        get languages() {
          return languages;
        },
        get notebooks() {
          return notebooks;
        },
        onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
        onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
        __textDocumentSync: void 0,
        onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
        onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
        onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
        onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
        onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
        onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
        sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
        onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), void 0);
        }),
        onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
        onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), void 0);
        }),
        onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onWorkspaceSymbolResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolResolveRequest.type, handler),
        onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onCodeActionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionResolveRequest.type, (params, cancel) => {
          return handler(params, cancel);
        }),
        onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
          return handler(params, cancel);
        }),
        onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), void 0);
        }),
        onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), void 0);
        }),
        onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
          return handler(params, cancel);
        }),
        onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), void 0);
        }),
        onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
          return handler(params, cancel);
        }),
        onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
          return handler(params, cancel);
        }),
        onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));
        }),
        onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
          return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), void 0);
        }),
        dispose: () => connection.dispose()
      };
      for (let remote of allRemotes) {
        remote.attach(protocolConnection);
      }
      connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
        watchDog.initialize(params);
        if (Is.string(params.trace)) {
          tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
        }
        for (let remote of allRemotes) {
          remote.initialize(params.capabilities);
        }
        if (initializeHandler) {
          let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, (0, progress_1.attachWorkDone)(connection, params), void 0);
          return asPromise(result).then((value) => {
            if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
              return value;
            }
            let result2 = value;
            if (!result2) {
              result2 = { capabilities: {} };
            }
            let capabilities = result2.capabilities;
            if (!capabilities) {
              capabilities = {};
              result2.capabilities = capabilities;
            }
            if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {
              capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
            } else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
              capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
            }
            for (let remote of allRemotes) {
              remote.fillServerCapabilities(capabilities);
            }
            return result2;
          });
        } else {
          let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
          for (let remote of allRemotes) {
            remote.fillServerCapabilities(result.capabilities);
          }
          return result;
        }
      });
      connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
        watchDog.shutdownReceived = true;
        if (shutdownHandler) {
          return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
        } else {
          return void 0;
        }
      });
      connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
        try {
          if (exitHandler) {
            exitHandler();
          }
        } finally {
          if (watchDog.shutdownReceived) {
            watchDog.exit(0);
          } else {
            watchDog.exit(1);
          }
        }
      });
      connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
        tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
      });
      return protocolConnection;
    }
    exports2.createConnection = createConnection;
  }
});

// server/node_modules/vscode-languageserver/lib/node/files.js
var require_files = __commonJS({
  "server/node_modules/vscode-languageserver/lib/node/files.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.resolveModulePath = exports2.FileSystem = exports2.resolveGlobalYarnPath = exports2.resolveGlobalNodePath = exports2.resolve = exports2.uriToFilePath = void 0;
    var url2 = require("url");
    var path = require("path");
    var fs = require("fs");
    var child_process_1 = require("child_process");
    function uriToFilePath(uri) {
      let parsed = url2.parse(uri);
      if (parsed.protocol !== "file:" || !parsed.path) {
        return void 0;
      }
      let segments = parsed.path.split("/");
      for (var i = 0, len = segments.length; i < len; i++) {
        segments[i] = decodeURIComponent(segments[i]);
      }
      if (process.platform === "win32" && segments.length > 1) {
        let first = segments[0];
        let second = segments[1];
        if (first.length === 0 && second.length > 1 && second[1] === ":") {
          segments.shift();
        }
      }
      return path.normalize(segments.join("/"));
    }
    exports2.uriToFilePath = uriToFilePath;
    function isWindows() {
      return process.platform === "win32";
    }
    function resolve(moduleName, nodePath, cwd, tracer) {
      const nodePathKey = "NODE_PATH";
      const app = [
        "var p = process;",
        "p.on('message',function(m){",
        "if(m.c==='e'){",
        "p.exit(0);",
        "}",
        "else if(m.c==='rs'){",
        "try{",
        "var r=require.resolve(m.a);",
        "p.send({c:'r',s:true,r:r});",
        "}",
        "catch(err){",
        "p.send({c:'r',s:false});",
        "}",
        "}",
        "});"
      ].join("");
      return new Promise((resolve2, reject) => {
        let env = process.env;
        let newEnv = /* @__PURE__ */ Object.create(null);
        Object.keys(env).forEach((key) => newEnv[key] = env[key]);
        if (nodePath && fs.existsSync(nodePath)) {
          if (newEnv[nodePathKey]) {
            newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
          } else {
            newEnv[nodePathKey] = nodePath;
          }
          if (tracer) {
            tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
          }
        }
        newEnv["ELECTRON_RUN_AS_NODE"] = "1";
        try {
          let cp = (0, child_process_1.fork)("", [], {
            cwd,
            env: newEnv,
            execArgv: ["-e", app]
          });
          if (cp.pid === void 0) {
            reject(new Error(`Starting process to resolve node module  ${moduleName} failed`));
            return;
          }
          cp.on("error", (error51) => {
            reject(error51);
          });
          cp.on("message", (message2) => {
            if (message2.c === "r") {
              cp.send({ c: "e" });
              if (message2.s) {
                resolve2(message2.r);
              } else {
                reject(new Error(`Failed to resolve module: ${moduleName}`));
              }
            }
          });
          let message = {
            c: "rs",
            a: moduleName
          };
          cp.send(message);
        } catch (error51) {
          reject(error51);
        }
      });
    }
    exports2.resolve = resolve;
    function resolveGlobalNodePath(tracer) {
      let npmCommand = "npm";
      const env = /* @__PURE__ */ Object.create(null);
      Object.keys(process.env).forEach((key) => env[key] = process.env[key]);
      env["NO_UPDATE_NOTIFIER"] = "true";
      const options = {
        encoding: "utf8",
        env
      };
      if (isWindows()) {
        npmCommand = "npm.cmd";
        options.shell = true;
      }
      let handler = () => {
      };
      try {
        process.on("SIGPIPE", handler);
        let stdout = (0, child_process_1.spawnSync)(npmCommand, ["config", "get", "prefix"], options).stdout;
        if (!stdout) {
          if (tracer) {
            tracer(`'npm config get prefix' didn't return a value.`);
          }
          return void 0;
        }
        let prefix = stdout.trim();
        if (tracer) {
          tracer(`'npm config get prefix' value is: ${prefix}`);
        }
        if (prefix.length > 0) {
          if (isWindows()) {
            return path.join(prefix, "node_modules");
          } else {
            return path.join(prefix, "lib", "node_modules");
          }
        }
        return void 0;
      } catch (err) {
        return void 0;
      } finally {
        process.removeListener("SIGPIPE", handler);
      }
    }
    exports2.resolveGlobalNodePath = resolveGlobalNodePath;
    function resolveGlobalYarnPath(tracer) {
      let yarnCommand = "yarn";
      let options = {
        encoding: "utf8"
      };
      if (isWindows()) {
        yarnCommand = "yarn.cmd";
        options.shell = true;
      }
      let handler = () => {
      };
      try {
        process.on("SIGPIPE", handler);
        let results = (0, child_process_1.spawnSync)(yarnCommand, ["global", "dir", "--json"], options);
        let stdout = results.stdout;
        if (!stdout) {
          if (tracer) {
            tracer(`'yarn global dir' didn't return a value.`);
            if (results.stderr) {
              tracer(results.stderr);
            }
          }
          return void 0;
        }
        let lines = stdout.trim().split(/\r?\n/);
        for (let line of lines) {
          try {
            let yarn = JSON.parse(line);
            if (yarn.type === "log") {
              return path.join(yarn.data, "node_modules");
            }
          } catch (e) {
          }
        }
        return void 0;
      } catch (err) {
        return void 0;
      } finally {
        process.removeListener("SIGPIPE", handler);
      }
    }
    exports2.resolveGlobalYarnPath = resolveGlobalYarnPath;
    var FileSystem;
    (function(FileSystem2) {
      let _isCaseSensitive = void 0;
      function isCaseSensitive() {
        if (_isCaseSensitive !== void 0) {
          return _isCaseSensitive;
        }
        if (process.platform === "win32") {
          _isCaseSensitive = false;
        } else {
          _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
        }
        return _isCaseSensitive;
      }
      FileSystem2.isCaseSensitive = isCaseSensitive;
      function isParent(parent, child) {
        if (isCaseSensitive()) {
          return path.normalize(child).indexOf(path.normalize(parent)) === 0;
        } else {
          return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
        }
      }
      FileSystem2.isParent = isParent;
    })(FileSystem || (exports2.FileSystem = FileSystem = {}));
    function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
      if (nodePath) {
        if (!path.isAbsolute(nodePath)) {
          nodePath = path.join(workspaceRoot, nodePath);
        }
        return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
          if (FileSystem.isParent(nodePath, value)) {
            return value;
          } else {
            return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
          }
        }).then(void 0, (_error) => {
          return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
        });
      } else {
        return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
      }
    }
    exports2.resolveModulePath = resolveModulePath;
  }
});

// server/node_modules/vscode-languageserver-protocol/node.js
var require_node2 = __commonJS({
  "server/node_modules/vscode-languageserver-protocol/node.js"(exports2, module2) {
    "use strict";
    module2.exports = require_main3();
  }
});

// server/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.js
var require_inlineCompletion_proposed = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.js"(exports2) {
    "use strict";
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.InlineCompletionFeature = void 0;
    var vscode_languageserver_protocol_1 = require_main3();
    var InlineCompletionFeature = (Base) => {
      return class extends Base {
        get inlineCompletion() {
          return {
            on: (handler) => {
              return this.connection.onRequest(vscode_languageserver_protocol_1.InlineCompletionRequest.type, (params, cancel) => {
                return handler(params, cancel, this.attachWorkDoneProgress(params));
              });
            }
          };
        }
      };
    };
    exports2.InlineCompletionFeature = InlineCompletionFeature;
  }
});

// server/node_modules/vscode-languageserver/lib/common/api.js
var require_api3 = __commonJS({
  "server/node_modules/vscode-languageserver/lib/common/api.js"(exports2) {
    "use strict";
    var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m2, k);
      if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m2[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    }) : (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m2[k];
    }));
    var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
      for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
    };
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.ProposedFeatures = exports2.NotebookDocuments = exports2.TextDocuments = exports2.SemanticTokensBuilder = void 0;
    var semanticTokens_1 = require_semanticTokens();
    Object.defineProperty(exports2, "SemanticTokensBuilder", { enumerable: true, get: function() {
      return semanticTokens_1.SemanticTokensBuilder;
    } });
    var ic = require_inlineCompletion_proposed();
    __exportStar(require_main3(), exports2);
    var textDocuments_1 = require_textDocuments();
    Object.defineProperty(exports2, "TextDocuments", { enumerable: true, get: function() {
      return textDocuments_1.TextDocuments;
    } });
    var notebook_1 = require_notebook();
    Object.defineProperty(exports2, "NotebookDocuments", { enumerable: true, get: function() {
      return notebook_1.NotebookDocuments;
    } });
    __exportStar(require_server(), exports2);
    var ProposedFeatures;
    (function(ProposedFeatures2) {
      ProposedFeatures2.all = {
        __brand: "features",
        languages: ic.InlineCompletionFeature
      };
    })(ProposedFeatures || (exports2.ProposedFeatures = ProposedFeatures = {}));
  }
});

// server/node_modules/vscode-languageserver/lib/node/main.js
var require_main4 = __commonJS({
  "server/node_modules/vscode-languageserver/lib/node/main.js"(exports2) {
    "use strict";
    var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m2, k);
      if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m2[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    }) : (function(o, m2, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m2[k];
    }));
    var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
      for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
    };
    Object.defineProperty(exports2, "__esModule", { value: true });
    exports2.createConnection = exports2.Files = void 0;
    var node_util_1 = require("node:util");
    var Is = require_is();
    var server_1 = require_server();
    var fm = require_files();
    var node_1 = require_node2();
    __exportStar(require_node2(), exports2);
    __exportStar(require_api3(), exports2);
    var Files;
    (function(Files2) {
      Files2.uriToFilePath = fm.uriToFilePath;
      Files2.resolveGlobalNodePath = fm.resolveGlobalNodePath;
      Files2.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
      Files2.resolve = fm.resolve;
      Files2.resolveModulePath = fm.resolveModulePath;
    })(Files || (exports2.Files = Files = {}));
    var _protocolConnection;
    function endProtocolConnection() {
      if (_protocolConnection === void 0) {
        return;
      }
      try {
        _protocolConnection.end();
      } catch (_err) {
      }
    }
    var _shutdownReceived = false;
    var exitTimer = void 0;
    function setupExitTimer() {
      const argName = "--clientProcessId";
      function runTimer(value) {
        try {
          let processId = parseInt(value);
          if (!isNaN(processId)) {
            exitTimer = setInterval(() => {
              try {
                process.kill(processId, 0);
              } catch (ex) {
                endProtocolConnection();
                process.exit(_shutdownReceived ? 0 : 1);
              }
            }, 3e3);
          }
        } catch (e) {
        }
      }
      for (let i = 2; i < process.argv.length; i++) {
        let arg = process.argv[i];
        if (arg === argName && i + 1 < process.argv.length) {
          runTimer(process.argv[i + 1]);
          return;
        } else {
          let args = arg.split("=");
          if (args[0] === argName) {
            runTimer(args[1]);
          }
        }
      }
    }
    setupExitTimer();
    var watchDog = {
      initialize: (params) => {
        const processId = params.processId;
        if (Is.number(processId) && exitTimer === void 0) {
          setInterval(() => {
            try {
              process.kill(processId, 0);
            } catch (ex) {
              process.exit(_shutdownReceived ? 0 : 1);
            }
          }, 3e3);
        }
      },
      get shutdownReceived() {
        return _shutdownReceived;
      },
      set shutdownReceived(value) {
        _shutdownReceived = value;
      },
      exit: (code) => {
        endProtocolConnection();
        process.exit(code);
      }
    };
    function createConnection(arg1, arg2, arg3, arg4) {
      let factories;
      let input;
      let output;
      let options;
      if (arg1 !== void 0 && arg1.__brand === "features") {
        factories = arg1;
        arg1 = arg2;
        arg2 = arg3;
        arg3 = arg4;
      }
      if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {
        options = arg1;
      } else {
        input = arg1;
        output = arg2;
        options = arg3;
      }
      return _createConnection(input, output, options, factories);
    }
    exports2.createConnection = createConnection;
    function _createConnection(input, output, options, factories) {
      let stdio = false;
      if (!input && !output && process.argv.length > 2) {
        let port = void 0;
        let pipeName = void 0;
        let argv = process.argv.slice(2);
        for (let i = 0; i < argv.length; i++) {
          let arg = argv[i];
          if (arg === "--node-ipc") {
            input = new node_1.IPCMessageReader(process);
            output = new node_1.IPCMessageWriter(process);
            break;
          } else if (arg === "--stdio") {
            stdio = true;
            input = process.stdin;
            output = process.stdout;
            break;
          } else if (arg === "--socket") {
            port = parseInt(argv[i + 1]);
            break;
          } else if (arg === "--pipe") {
            pipeName = argv[i + 1];
            break;
          } else {
            var args = arg.split("=");
            if (args[0] === "--socket") {
              port = parseInt(args[1]);
              break;
            } else if (args[0] === "--pipe") {
              pipeName = args[1];
              break;
            }
          }
        }
        if (port) {
          let transport = (0, node_1.createServerSocketTransport)(port);
          input = transport[0];
          output = transport[1];
        } else if (pipeName) {
          let transport = (0, node_1.createServerPipeTransport)(pipeName);
          input = transport[0];
          output = transport[1];
        }
      }
      var commandLineMessage = "Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";
      if (!input) {
        throw new Error("Connection input stream is not set. " + commandLineMessage);
      }
      if (!output) {
        throw new Error("Connection output stream is not set. " + commandLineMessage);
      }
      if (Is.func(input.read) && Is.func(input.on)) {
        let inputStream = input;
        inputStream.on("end", () => {
          endProtocolConnection();
          process.exit(_shutdownReceived ? 0 : 1);
        });
        inputStream.on("close", () => {
          endProtocolConnection();
          process.exit(_shutdownReceived ? 0 : 1);
        });
      }
      const connectionFactory = (logger) => {
        const result = (0, node_1.createProtocolConnection)(input, output, logger, options);
        if (stdio) {
          patchConsole(logger);
        }
        return result;
      };
      return (0, server_1.createConnection)(connectionFactory, watchDog, factories);
    }
    function patchConsole(logger) {
      function serialize(args) {
        return args.map((arg) => typeof arg === "string" ? arg : (0, node_util_1.inspect)(arg)).join(" ");
      }
      const counters = /* @__PURE__ */ new Map();
      console.assert = function assert2(assertion, ...args) {
        if (assertion) {
          return;
        }
        if (args.length === 0) {
          logger.error("Assertion failed");
        } else {
          const [message, ...rest] = args;
          logger.error(`Assertion failed: ${message} ${serialize(rest)}`);
        }
      };
      console.count = function count(label = "default") {
        const message = String(label);
        let counter = counters.get(message) ?? 0;
        counter += 1;
        counters.set(message, counter);
        logger.log(`${message}: ${message}`);
      };
      console.countReset = function countReset(label) {
        if (label === void 0) {
          counters.clear();
        } else {
          counters.delete(String(label));
        }
      };
      console.debug = function debug(...args) {
        logger.log(serialize(args));
      };
      console.dir = function dir(arg, options) {
        logger.log((0, node_util_1.inspect)(arg, options));
      };
      console.log = function log(...args) {
        logger.log(serialize(args));
      };
      console.error = function error51(...args) {
        logger.error(serialize(args));
      };
      console.trace = function trace(...args) {
        const stack = new Error().stack.replace(/(.+\n){2}/, "");
        let message = "Trace";
        if (args.length !== 0) {
          message += `: ${serialize(args)}`;
        }
        logger.log(`${message}
${stack}`);
      };
      console.warn = function warn(...args) {
        logger.warn(serialize(args));
      };
    }
  }
});

// server/node_modules/vscode-languageserver/node.js
var require_node3 = __commonJS({
  "server/node_modules/vscode-languageserver/node.js"(exports2, module2) {
    "use strict";
    module2.exports = require_main4();
  }
});

// node_modules/zod/v3/helpers/util.js
var util;
(function(util2) {
  util2.assertEqual = (_) => {
  };
  function assertIs2(_arg) {
  }
  util2.assertIs = assertIs2;
  function assertNever2(_x) {
    throw new Error();
  }
  util2.assertNever = assertNever2;
  util2.arrayToEnum = (items) => {
    const obj = {};
    for (const item of items) {
      obj[item] = item;
    }
    return obj;
  };
  util2.getValidEnumValues = (obj) => {
    const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
    const filtered = {};
    for (const k of validKeys) {
      filtered[k] = obj[k];
    }
    return util2.objectValues(filtered);
  };
  util2.objectValues = (obj) => {
    return util2.objectKeys(obj).map(function(e) {
      return obj[e];
    });
  };
  util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object3) => {
    const keys = [];
    for (const key in object3) {
      if (Object.prototype.hasOwnProperty.call(object3, key)) {
        keys.push(key);
      }
    }
    return keys;
  };
  util2.find = (arr, checker) => {
    for (const item of arr) {
      if (checker(item))
        return item;
    }
    return void 0;
  };
  util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
  function joinValues2(array2, separator = " | ") {
    return array2.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
  }
  util2.joinValues = joinValues2;
  util2.jsonStringifyReplacer = (_, value) => {
    if (typeof value === "bigint") {
      return value.toString();
    }
    return value;
  };
})(util || (util = {}));
var objectUtil;
(function(objectUtil2) {
  objectUtil2.mergeShapes = (first, second) => {
    return {
      ...first,
      ...second
      // second overwrites first
    };
  };
})(objectUtil || (objectUtil = {}));
var ZodParsedType = util.arrayToEnum([
  "string",
  "nan",
  "number",
  "integer",
  "float",
  "boolean",
  "date",
  "bigint",
  "symbol",
  "function",
  "undefined",
  "null",
  "array",
  "object",
  "unknown",
  "promise",
  "void",
  "never",
  "map",
  "set"
]);
var getParsedType = (data) => {
  const t = typeof data;
  switch (t) {
    case "undefined":
      return ZodParsedType.undefined;
    case "string":
      return ZodParsedType.string;
    case "number":
      return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
    case "boolean":
      return ZodParsedType.boolean;
    case "function":
      return ZodParsedType.function;
    case "bigint":
      return ZodParsedType.bigint;
    case "symbol":
      return ZodParsedType.symbol;
    case "object":
      if (Array.isArray(data)) {
        return ZodParsedType.array;
      }
      if (data === null) {
        return ZodParsedType.null;
      }
      if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
        return ZodParsedType.promise;
      }
      if (typeof Map !== "undefined" && data instanceof Map) {
        return ZodParsedType.map;
      }
      if (typeof Set !== "undefined" && data instanceof Set) {
        return ZodParsedType.set;
      }
      if (typeof Date !== "undefined" && data instanceof Date) {
        return ZodParsedType.date;
      }
      return ZodParsedType.object;
    default:
      return ZodParsedType.unknown;
  }
};

// node_modules/zod/v3/ZodError.js
var ZodIssueCode = util.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"
]);
var ZodError = class _ZodError extends Error {
  get errors() {
    return this.issues;
  }
  constructor(issues) {
    super();
    this.issues = [];
    this.addIssue = (sub) => {
      this.issues = [...this.issues, sub];
    };
    this.addIssues = (subs = []) => {
      this.issues = [...this.issues, ...subs];
    };
    const actualProto = new.target.prototype;
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(this, actualProto);
    } else {
      this.__proto__ = actualProto;
    }
    this.name = "ZodError";
    this.issues = issues;
  }
  format(_mapper) {
    const mapper = _mapper || function(issue2) {
      return issue2.message;
    };
    const fieldErrors = { _errors: [] };
    const processError = (error51) => {
      for (const issue2 of error51.issues) {
        if (issue2.code === "invalid_union") {
          issue2.unionErrors.map(processError);
        } else if (issue2.code === "invalid_return_type") {
          processError(issue2.returnTypeError);
        } else if (issue2.code === "invalid_arguments") {
          processError(issue2.argumentsError);
        } else if (issue2.path.length === 0) {
          fieldErrors._errors.push(mapper(issue2));
        } else {
          let curr = fieldErrors;
          let i = 0;
          while (i < issue2.path.length) {
            const el = issue2.path[i];
            const terminal = i === issue2.path.length - 1;
            if (!terminal) {
              curr[el] = curr[el] || { _errors: [] };
            } else {
              curr[el] = curr[el] || { _errors: [] };
              curr[el]._errors.push(mapper(issue2));
            }
            curr = curr[el];
            i++;
          }
        }
      }
    };
    processError(this);
    return fieldErrors;
  }
  static assert(value) {
    if (!(value instanceof _ZodError)) {
      throw new Error(`Not a ZodError: ${value}`);
    }
  }
  toString() {
    return this.message;
  }
  get message() {
    return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
  }
  get isEmpty() {
    return this.issues.length === 0;
  }
  flatten(mapper = (issue2) => issue2.message) {
    const fieldErrors = /* @__PURE__ */ Object.create(null);
    const formErrors = [];
    for (const sub of this.issues) {
      if (sub.path.length > 0) {
        const firstEl = sub.path[0];
        fieldErrors[firstEl] = fieldErrors[firstEl] || [];
        fieldErrors[firstEl].push(mapper(sub));
      } else {
        formErrors.push(mapper(sub));
      }
    }
    return { formErrors, fieldErrors };
  }
  get formErrors() {
    return this.flatten();
  }
};
ZodError.create = (issues) => {
  const error51 = new ZodError(issues);
  return error51;
};

// node_modules/zod/v3/locales/en.js
var errorMap = (issue2, _ctx) => {
  let message;
  switch (issue2.code) {
    case ZodIssueCode.invalid_type:
      if (issue2.received === ZodParsedType.undefined) {
        message = "Required";
      } else {
        message = `Expected ${issue2.expected}, received ${issue2.received}`;
      }
      break;
    case ZodIssueCode.invalid_literal:
      message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util.jsonStringifyReplacer)}`;
      break;
    case ZodIssueCode.unrecognized_keys:
      message = `Unrecognized key(s) in object: ${util.joinValues(issue2.keys, ", ")}`;
      break;
    case ZodIssueCode.invalid_union:
      message = `Invalid input`;
      break;
    case ZodIssueCode.invalid_union_discriminator:
      message = `Invalid discriminator value. Expected ${util.joinValues(issue2.options)}`;
      break;
    case ZodIssueCode.invalid_enum_value:
      message = `Invalid enum value. Expected ${util.joinValues(issue2.options)}, received '${issue2.received}'`;
      break;
    case ZodIssueCode.invalid_arguments:
      message = `Invalid function arguments`;
      break;
    case ZodIssueCode.invalid_return_type:
      message = `Invalid function return type`;
      break;
    case ZodIssueCode.invalid_date:
      message = `Invalid date`;
      break;
    case ZodIssueCode.invalid_string:
      if (typeof issue2.validation === "object") {
        if ("includes" in issue2.validation) {
          message = `Invalid input: must include "${issue2.validation.includes}"`;
          if (typeof issue2.validation.position === "number") {
            message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`;
          }
        } else if ("startsWith" in issue2.validation) {
          message = `Invalid input: must start with "${issue2.validation.startsWith}"`;
        } else if ("endsWith" in issue2.validation) {
          message = `Invalid input: must end with "${issue2.validation.endsWith}"`;
        } else {
          util.assertNever(issue2.validation);
        }
      } else if (issue2.validation !== "regex") {
        message = `Invalid ${issue2.validation}`;
      } else {
        message = "Invalid";
      }
      break;
    case ZodIssueCode.too_small:
      if (issue2.type === "array")
        message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`;
      else if (issue2.type === "string")
        message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`;
      else if (issue2.type === "number")
        message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
      else if (issue2.type === "bigint")
        message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
      else if (issue2.type === "date")
        message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`;
      else
        message = "Invalid input";
      break;
    case ZodIssueCode.too_big:
      if (issue2.type === "array")
        message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`;
      else if (issue2.type === "string")
        message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`;
      else if (issue2.type === "number")
        message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
      else if (issue2.type === "bigint")
        message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
      else if (issue2.type === "date")
        message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`;
      else
        message = "Invalid input";
      break;
    case ZodIssueCode.custom:
      message = `Invalid input`;
      break;
    case ZodIssueCode.invalid_intersection_types:
      message = `Intersection results could not be merged`;
      break;
    case ZodIssueCode.not_multiple_of:
      message = `Number must be a multiple of ${issue2.multipleOf}`;
      break;
    case ZodIssueCode.not_finite:
      message = "Number must be finite";
      break;
    default:
      message = _ctx.defaultError;
      util.assertNever(issue2);
  }
  return { message };
};
var en_default = errorMap;

// node_modules/zod/v3/errors.js
var overrideErrorMap = en_default;
function getErrorMap() {
  return overrideErrorMap;
}

// node_modules/zod/v3/helpers/parseUtil.js
var makeIssue = (params) => {
  const { data, path, errorMaps, issueData } = params;
  const fullPath = [...path, ...issueData.path || []];
  const fullIssue = {
    ...issueData,
    path: fullPath
  };
  if (issueData.message !== void 0) {
    return {
      ...issueData,
      path: fullPath,
      message: issueData.message
    };
  }
  let errorMessage = "";
  const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
  for (const map2 of maps) {
    errorMessage = map2(fullIssue, { data, defaultError: errorMessage }).message;
  }
  return {
    ...issueData,
    path: fullPath,
    message: errorMessage
  };
};
function addIssueToContext(ctx2, issueData) {
  const overrideMap = getErrorMap();
  const issue2 = makeIssue({
    issueData,
    data: ctx2.data,
    path: ctx2.path,
    errorMaps: [
      ctx2.common.contextualErrorMap,
      // contextual error map is first priority
      ctx2.schemaErrorMap,
      // then schema-bound map if available
      overrideMap,
      // then global override map
      overrideMap === en_default ? void 0 : en_default
      // then global default map
    ].filter((x) => !!x)
  });
  ctx2.common.issues.push(issue2);
}
var ParseStatus = class _ParseStatus {
  constructor() {
    this.value = "valid";
  }
  dirty() {
    if (this.value === "valid")
      this.value = "dirty";
  }
  abort() {
    if (this.value !== "aborted")
      this.value = "aborted";
  }
  static mergeArray(status, results) {
    const arrayValue = [];
    for (const s of results) {
      if (s.status === "aborted")
        return INVALID;
      if (s.status === "dirty")
        status.dirty();
      arrayValue.push(s.value);
    }
    return { status: status.value, value: arrayValue };
  }
  static async mergeObjectAsync(status, pairs) {
    const syncPairs = [];
    for (const pair of pairs) {
      const key = await pair.key;
      const value = await pair.value;
      syncPairs.push({
        key,
        value
      });
    }
    return _ParseStatus.mergeObjectSync(status, syncPairs);
  }
  static mergeObjectSync(status, pairs) {
    const finalObject = {};
    for (const pair of pairs) {
      const { key, value } = pair;
      if (key.status === "aborted")
        return INVALID;
      if (value.status === "aborted")
        return INVALID;
      if (key.status === "dirty")
        status.dirty();
      if (value.status === "dirty")
        status.dirty();
      if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
        finalObject[key.value] = value.value;
      }
    }
    return { status: status.value, value: finalObject };
  }
};
var INVALID = Object.freeze({
  status: "aborted"
});
var DIRTY = (value) => ({ status: "dirty", value });
var OK = (value) => ({ status: "valid", value });
var isAborted = (x) => x.status === "aborted";
var isDirty = (x) => x.status === "dirty";
var isValid = (x) => x.status === "valid";
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;

// node_modules/zod/v3/helpers/errorUtil.js
var errorUtil;
(function(errorUtil2) {
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
  errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
})(errorUtil || (errorUtil = {}));

// node_modules/zod/v3/types.js
var ParseInputLazyPath = class {
  constructor(parent, value, path, key) {
    this._cachedPath = [];
    this.parent = parent;
    this.data = value;
    this._path = path;
    this._key = key;
  }
  get path() {
    if (!this._cachedPath.length) {
      if (Array.isArray(this._key)) {
        this._cachedPath.push(...this._path, ...this._key);
      } else {
        this._cachedPath.push(...this._path, this._key);
      }
    }
    return this._cachedPath;
  }
};
var handleResult = (ctx2, result) => {
  if (isValid(result)) {
    return { success: true, data: result.value };
  } else {
    if (!ctx2.common.issues.length) {
      throw new Error("Validation failed but no issues detected.");
    }
    return {
      success: false,
      get error() {
        if (this._error)
          return this._error;
        const error51 = new ZodError(ctx2.common.issues);
        this._error = error51;
        return this._error;
      }
    };
  }
};
function processCreateParams(params) {
  if (!params)
    return {};
  const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;
  if (errorMap2 && (invalid_type_error || required_error)) {
    throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
  }
  if (errorMap2)
    return { errorMap: errorMap2, description };
  const customMap = (iss, ctx2) => {
    const { message } = params;
    if (iss.code === "invalid_enum_value") {
      return { message: message ?? ctx2.defaultError };
    }
    if (typeof ctx2.data === "undefined") {
      return { message: message ?? required_error ?? ctx2.defaultError };
    }
    if (iss.code !== "invalid_type")
      return { message: ctx2.defaultError };
    return { message: message ?? invalid_type_error ?? ctx2.defaultError };
  };
  return { errorMap: customMap, description };
}
var ZodType = class {
  get description() {
    return this._def.description;
  }
  _getType(input) {
    return getParsedType(input.data);
  }
  _getOrReturnCtx(input, ctx2) {
    return ctx2 || {
      common: input.parent.common,
      data: input.data,
      parsedType: getParsedType(input.data),
      schemaErrorMap: this._def.errorMap,
      path: input.path,
      parent: input.parent
    };
  }
  _processInputParams(input) {
    return {
      status: new ParseStatus(),
      ctx: {
        common: input.parent.common,
        data: input.data,
        parsedType: getParsedType(input.data),
        schemaErrorMap: this._def.errorMap,
        path: input.path,
        parent: input.parent
      }
    };
  }
  _parseSync(input) {
    const result = this._parse(input);
    if (isAsync(result)) {
      throw new Error("Synchronous parse encountered promise.");
    }
    return result;
  }
  _parseAsync(input) {
    const result = this._parse(input);
    return Promise.resolve(result);
  }
  parse(data, params) {
    const result = this.safeParse(data, params);
    if (result.success)
      return result.data;
    throw result.error;
  }
  safeParse(data, params) {
    const ctx2 = {
      common: {
        issues: [],
        async: params?.async ?? false,
        contextualErrorMap: params?.errorMap
      },
      path: params?.path || [],
      schemaErrorMap: this._def.errorMap,
      parent: null,
      data,
      parsedType: getParsedType(data)
    };
    const result = this._parseSync({ data, path: ctx2.path, parent: ctx2 });
    return handleResult(ctx2, result);
  }
  "~validate"(data) {
    const ctx2 = {
      common: {
        issues: [],
        async: !!this["~standard"].async
      },
      path: [],
      schemaErrorMap: this._def.errorMap,
      parent: null,
      data,
      parsedType: getParsedType(data)
    };
    if (!this["~standard"].async) {
      try {
        const result = this._parseSync({ data, path: [], parent: ctx2 });
        return isValid(result) ? {
          value: result.value
        } : {
          issues: ctx2.common.issues
        };
      } catch (err) {
        if (err?.message?.toLowerCase()?.includes("encountered")) {
          this["~standard"].async = true;
        }
        ctx2.common = {
          issues: [],
          async: true
        };
      }
    }
    return this._parseAsync({ data, path: [], parent: ctx2 }).then((result) => isValid(result) ? {
      value: result.value
    } : {
      issues: ctx2.common.issues
    });
  }
  async parseAsync(data, params) {
    const result = await this.safeParseAsync(data, params);
    if (result.success)
      return result.data;
    throw result.error;
  }
  async safeParseAsync(data, params) {
    const ctx2 = {
      common: {
        issues: [],
        contextualErrorMap: params?.errorMap,
        async: true
      },
      path: params?.path || [],
      schemaErrorMap: this._def.errorMap,
      parent: null,
      data,
      parsedType: getParsedType(data)
    };
    const maybeAsyncResult = this._parse({ data, path: ctx2.path, parent: ctx2 });
    const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
    return handleResult(ctx2, result);
  }
  refine(check2, message) {
    const getIssueProperties = (val) => {
      if (typeof message === "string" || typeof message === "undefined") {
        return { message };
      } else if (typeof message === "function") {
        return message(val);
      } else {
        return message;
      }
    };
    return this._refinement((val, ctx2) => {
      const result = check2(val);
      const setError = () => ctx2.addIssue({
        code: ZodIssueCode.custom,
        ...getIssueProperties(val)
      });
      if (typeof Promise !== "undefined" && result instanceof Promise) {
        return result.then((data) => {
          if (!data) {
            setError();
            return false;
          } else {
            return true;
          }
        });
      }
      if (!result) {
        setError();
        return false;
      } else {
        return true;
      }
    });
  }
  refinement(check2, refinementData) {
    return this._refinement((val, ctx2) => {
      if (!check2(val)) {
        ctx2.addIssue(typeof refinementData === "function" ? refinementData(val, ctx2) : refinementData);
        return false;
      } else {
        return true;
      }
    });
  }
  _refinement(refinement) {
    return new ZodEffects({
      schema: this,
      typeName: ZodFirstPartyTypeKind.ZodEffects,
      effect: { type: "refinement", refinement }
    });
  }
  superRefine(refinement) {
    return this._refinement(refinement);
  }
  constructor(def) {
    this.spa = this.safeParseAsync;
    this._def = def;
    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);
    this["~standard"] = {
      version: 1,
      vendor: "zod",
      validate: (data) => this["~validate"](data)
    };
  }
  optional() {
    return ZodOptional.create(this, this._def);
  }
  nullable() {
    return ZodNullable.create(this, this._def);
  }
  nullish() {
    return this.nullable().optional();
  }
  array() {
    return ZodArray.create(this);
  }
  promise() {
    return ZodPromise.create(this, this._def);
  }
  or(option) {
    return ZodUnion.create([this, option], this._def);
  }
  and(incoming) {
    return ZodIntersection.create(this, incoming, this._def);
  }
  transform(transform2) {
    return new ZodEffects({
      ...processCreateParams(this._def),
      schema: this,
      typeName: ZodFirstPartyTypeKind.ZodEffects,
      effect: { type: "transform", transform: transform2 }
    });
  }
  default(def) {
    const defaultValueFunc = typeof def === "function" ? def : () => def;
    return new ZodDefault({
      ...processCreateParams(this._def),
      innerType: this,
      defaultValue: defaultValueFunc,
      typeName: ZodFirstPartyTypeKind.ZodDefault
    });
  }
  brand() {
    return new ZodBranded({
      typeName: ZodFirstPartyTypeKind.ZodBranded,
      type: this,
      ...processCreateParams(this._def)
    });
  }
  catch(def) {
    const catchValueFunc = typeof def === "function" ? def : () => def;
    return new ZodCatch({
      ...processCreateParams(this._def),
      innerType: this,
      catchValue: catchValueFunc,
      typeName: ZodFirstPartyTypeKind.ZodCatch
    });
  }
  describe(description) {
    const This = this.constructor;
    return new This({
      ...this._def,
      description
    });
  }
  pipe(target) {
    return ZodPipeline.create(this, target);
  }
  readonly() {
    return ZodReadonly.create(this);
  }
  isOptional() {
    return this.safeParse(void 0).success;
  }
  isNullable() {
    return this.safeParse(null).success;
  }
};
var cuidRegex = /^c[^\s-]{8,}$/i;
var cuid2Regex = /^[0-9a-z]+$/;
var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
var uuidRegex = /^[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;
var nanoidRegex = /^[a-z0-9_-]{21}$/i;
var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
var emojiRegex;
var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
var dateRegex = new RegExp(`^${dateRegexSource}$`);
function timeRegexSource(args) {
  let secondsRegexSource = `[0-5]\\d`;
  if (args.precision) {
    secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
  } else if (args.precision == null) {
    secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
  }
  const secondsQuantifier = args.precision ? "+" : "?";
  return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
}
function timeRegex(args) {
  return new RegExp(`^${timeRegexSource(args)}$`);
}
function datetimeRegex(args) {
  let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
  const opts = [];
  opts.push(args.local ? `Z?` : `Z`);
  if (args.offset)
    opts.push(`([+-]\\d{2}:?\\d{2})`);
  regex = `${regex}(${opts.join("|")})`;
  return new RegExp(`^${regex}$`);
}
function isValidIP(ip, version2) {
  if ((version2 === "v4" || !version2) && ipv4Regex.test(ip)) {
    return true;
  }
  if ((version2 === "v6" || !version2) && ipv6Regex.test(ip)) {
    return true;
  }
  return false;
}
function isValidJWT(jwt2, alg) {
  if (!jwtRegex.test(jwt2))
    return false;
  try {
    const [header] = jwt2.split(".");
    if (!header)
      return false;
    const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
    const decoded = JSON.parse(atob(base643));
    if (typeof decoded !== "object" || decoded === null)
      return false;
    if ("typ" in decoded && decoded?.typ !== "JWT")
      return false;
    if (!decoded.alg)
      return false;
    if (alg && decoded.alg !== alg)
      return false;
    return true;
  } catch {
    return false;
  }
}
function isValidCidr(ip, version2) {
  if ((version2 === "v4" || !version2) && ipv4CidrRegex.test(ip)) {
    return true;
  }
  if ((version2 === "v6" || !version2) && ipv6CidrRegex.test(ip)) {
    return true;
  }
  return false;
}
var ZodString = class _ZodString2 extends ZodType {
  _parse(input) {
    if (this._def.coerce) {
      input.data = String(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.string) {
      const ctx3 = this._getOrReturnCtx(input);
      addIssueToContext(ctx3, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.string,
        received: ctx3.parsedType
      });
      return INVALID;
    }
    const status = new ParseStatus();
    let ctx2 = void 0;
    for (const check2 of this._def.checks) {
      if (check2.kind === "min") {
        if (input.data.length < check2.value) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_small,
            minimum: check2.value,
            type: "string",
            inclusive: true,
            exact: false,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "max") {
        if (input.data.length > check2.value) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_big,
            maximum: check2.value,
            type: "string",
            inclusive: true,
            exact: false,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "length") {
        const tooBig = input.data.length > check2.value;
        const tooSmall = input.data.length < check2.value;
        if (tooBig || tooSmall) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          if (tooBig) {
            addIssueToContext(ctx2, {
              code: ZodIssueCode.too_big,
              maximum: check2.value,
              type: "string",
              inclusive: true,
              exact: true,
              message: check2.message
            });
          } else if (tooSmall) {
            addIssueToContext(ctx2, {
              code: ZodIssueCode.too_small,
              minimum: check2.value,
              type: "string",
              inclusive: true,
              exact: true,
              message: check2.message
            });
          }
          status.dirty();
        }
      } else if (check2.kind === "email") {
        if (!emailRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "email",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "emoji") {
        if (!emojiRegex) {
          emojiRegex = new RegExp(_emojiRegex, "u");
        }
        if (!emojiRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "emoji",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "uuid") {
        if (!uuidRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "uuid",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "nanoid") {
        if (!nanoidRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "nanoid",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "cuid") {
        if (!cuidRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "cuid",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "cuid2") {
        if (!cuid2Regex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "cuid2",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "ulid") {
        if (!ulidRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "ulid",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "url") {
        try {
          new URL(input.data);
        } catch {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "url",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "regex") {
        check2.regex.lastIndex = 0;
        const testResult = check2.regex.test(input.data);
        if (!testResult) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "regex",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "trim") {
        input.data = input.data.trim();
      } else if (check2.kind === "includes") {
        if (!input.data.includes(check2.value, check2.position)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_string,
            validation: { includes: check2.value, position: check2.position },
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "toLowerCase") {
        input.data = input.data.toLowerCase();
      } else if (check2.kind === "toUpperCase") {
        input.data = input.data.toUpperCase();
      } else if (check2.kind === "startsWith") {
        if (!input.data.startsWith(check2.value)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_string,
            validation: { startsWith: check2.value },
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "endsWith") {
        if (!input.data.endsWith(check2.value)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_string,
            validation: { endsWith: check2.value },
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "datetime") {
        const regex = datetimeRegex(check2);
        if (!regex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_string,
            validation: "datetime",
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "date") {
        const regex = dateRegex;
        if (!regex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_string,
            validation: "date",
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "time") {
        const regex = timeRegex(check2);
        if (!regex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_string,
            validation: "time",
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "duration") {
        if (!durationRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "duration",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "ip") {
        if (!isValidIP(input.data, check2.version)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "ip",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "jwt") {
        if (!isValidJWT(input.data, check2.alg)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "jwt",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "cidr") {
        if (!isValidCidr(input.data, check2.version)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "cidr",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "base64") {
        if (!base64Regex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "base64",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "base64url") {
        if (!base64urlRegex.test(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            validation: "base64url",
            code: ZodIssueCode.invalid_string,
            message: check2.message
          });
          status.dirty();
        }
      } else {
        util.assertNever(check2);
      }
    }
    return { status: status.value, value: input.data };
  }
  _regex(regex, validation, message) {
    return this.refinement((data) => regex.test(data), {
      validation,
      code: ZodIssueCode.invalid_string,
      ...errorUtil.errToObj(message)
    });
  }
  _addCheck(check2) {
    return new _ZodString2({
      ...this._def,
      checks: [...this._def.checks, check2]
    });
  }
  email(message) {
    return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) });
  }
  url(message) {
    return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) });
  }
  emoji(message) {
    return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) });
  }
  uuid(message) {
    return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
  }
  nanoid(message) {
    return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) });
  }
  cuid(message) {
    return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
  }
  cuid2(message) {
    return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
  }
  ulid(message) {
    return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
  }
  base64(message) {
    return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
  }
  base64url(message) {
    return this._addCheck({
      kind: "base64url",
      ...errorUtil.errToObj(message)
    });
  }
  jwt(options) {
    return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
  }
  ip(options) {
    return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
  }
  cidr(options) {
    return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
  }
  datetime(options) {
    if (typeof options === "string") {
      return this._addCheck({
        kind: "datetime",
        precision: null,
        offset: false,
        local: false,
        message: options
      });
    }
    return this._addCheck({
      kind: "datetime",
      precision: typeof options?.precision === "undefined" ? null : options?.precision,
      offset: options?.offset ?? false,
      local: options?.local ?? false,
      ...errorUtil.errToObj(options?.message)
    });
  }
  date(message) {
    return this._addCheck({ kind: "date", message });
  }
  time(options) {
    if (typeof options === "string") {
      return this._addCheck({
        kind: "time",
        precision: null,
        message: options
      });
    }
    return this._addCheck({
      kind: "time",
      precision: typeof options?.precision === "undefined" ? null : options?.precision,
      ...errorUtil.errToObj(options?.message)
    });
  }
  duration(message) {
    return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
  }
  regex(regex, message) {
    return this._addCheck({
      kind: "regex",
      regex,
      ...errorUtil.errToObj(message)
    });
  }
  includes(value, options) {
    return this._addCheck({
      kind: "includes",
      value,
      position: options?.position,
      ...errorUtil.errToObj(options?.message)
    });
  }
  startsWith(value, message) {
    return this._addCheck({
      kind: "startsWith",
      value,
      ...errorUtil.errToObj(message)
    });
  }
  endsWith(value, message) {
    return this._addCheck({
      kind: "endsWith",
      value,
      ...errorUtil.errToObj(message)
    });
  }
  min(minLength, message) {
    return this._addCheck({
      kind: "min",
      value: minLength,
      ...errorUtil.errToObj(message)
    });
  }
  max(maxLength, message) {
    return this._addCheck({
      kind: "max",
      value: maxLength,
      ...errorUtil.errToObj(message)
    });
  }
  length(len, message) {
    return this._addCheck({
      kind: "length",
      value: len,
      ...errorUtil.errToObj(message)
    });
  }
  /**
   * Equivalent to `.min(1)`
   */
  nonempty(message) {
    return this.min(1, errorUtil.errToObj(message));
  }
  trim() {
    return new _ZodString2({
      ...this._def,
      checks: [...this._def.checks, { kind: "trim" }]
    });
  }
  toLowerCase() {
    return new _ZodString2({
      ...this._def,
      checks: [...this._def.checks, { kind: "toLowerCase" }]
    });
  }
  toUpperCase() {
    return new _ZodString2({
      ...this._def,
      checks: [...this._def.checks, { kind: "toUpperCase" }]
    });
  }
  get isDatetime() {
    return !!this._def.checks.find((ch) => ch.kind === "datetime");
  }
  get isDate() {
    return !!this._def.checks.find((ch) => ch.kind === "date");
  }
  get isTime() {
    return !!this._def.checks.find((ch) => ch.kind === "time");
  }
  get isDuration() {
    return !!this._def.checks.find((ch) => ch.kind === "duration");
  }
  get isEmail() {
    return !!this._def.checks.find((ch) => ch.kind === "email");
  }
  get isURL() {
    return !!this._def.checks.find((ch) => ch.kind === "url");
  }
  get isEmoji() {
    return !!this._def.checks.find((ch) => ch.kind === "emoji");
  }
  get isUUID() {
    return !!this._def.checks.find((ch) => ch.kind === "uuid");
  }
  get isNANOID() {
    return !!this._def.checks.find((ch) => ch.kind === "nanoid");
  }
  get isCUID() {
    return !!this._def.checks.find((ch) => ch.kind === "cuid");
  }
  get isCUID2() {
    return !!this._def.checks.find((ch) => ch.kind === "cuid2");
  }
  get isULID() {
    return !!this._def.checks.find((ch) => ch.kind === "ulid");
  }
  get isIP() {
    return !!this._def.checks.find((ch) => ch.kind === "ip");
  }
  get isCIDR() {
    return !!this._def.checks.find((ch) => ch.kind === "cidr");
  }
  get isBase64() {
    return !!this._def.checks.find((ch) => ch.kind === "base64");
  }
  get isBase64url() {
    return !!this._def.checks.find((ch) => ch.kind === "base64url");
  }
  get minLength() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min;
  }
  get maxLength() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max;
  }
};
ZodString.create = (params) => {
  return new ZodString({
    checks: [],
    typeName: ZodFirstPartyTypeKind.ZodString,
    coerce: params?.coerce ?? false,
    ...processCreateParams(params)
  });
};
function floatSafeRemainder(val, step) {
  const valDecCount = (val.toString().split(".")[1] || "").length;
  const stepDecCount = (step.toString().split(".")[1] || "").length;
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
  const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
  const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
  return valInt % stepInt / 10 ** decCount;
}
var ZodNumber = class _ZodNumber extends ZodType {
  constructor() {
    super(...arguments);
    this.min = this.gte;
    this.max = this.lte;
    this.step = this.multipleOf;
  }
  _parse(input) {
    if (this._def.coerce) {
      input.data = Number(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.number) {
      const ctx3 = this._getOrReturnCtx(input);
      addIssueToContext(ctx3, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.number,
        received: ctx3.parsedType
      });
      return INVALID;
    }
    let ctx2 = void 0;
    const status = new ParseStatus();
    for (const check2 of this._def.checks) {
      if (check2.kind === "int") {
        if (!util.isInteger(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_type,
            expected: "integer",
            received: "float",
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "min") {
        const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
        if (tooSmall) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_small,
            minimum: check2.value,
            type: "number",
            inclusive: check2.inclusive,
            exact: false,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "max") {
        const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
        if (tooBig) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_big,
            maximum: check2.value,
            type: "number",
            inclusive: check2.inclusive,
            exact: false,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "multipleOf") {
        if (floatSafeRemainder(input.data, check2.value) !== 0) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.not_multiple_of,
            multipleOf: check2.value,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "finite") {
        if (!Number.isFinite(input.data)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.not_finite,
            message: check2.message
          });
          status.dirty();
        }
      } else {
        util.assertNever(check2);
      }
    }
    return { status: status.value, value: input.data };
  }
  gte(value, message) {
    return this.setLimit("min", value, true, errorUtil.toString(message));
  }
  gt(value, message) {
    return this.setLimit("min", value, false, errorUtil.toString(message));
  }
  lte(value, message) {
    return this.setLimit("max", value, true, errorUtil.toString(message));
  }
  lt(value, message) {
    return this.setLimit("max", value, false, errorUtil.toString(message));
  }
  setLimit(kind, value, inclusive, message) {
    return new _ZodNumber({
      ...this._def,
      checks: [
        ...this._def.checks,
        {
          kind,
          value,
          inclusive,
          message: errorUtil.toString(message)
        }
      ]
    });
  }
  _addCheck(check2) {
    return new _ZodNumber({
      ...this._def,
      checks: [...this._def.checks, check2]
    });
  }
  int(message) {
    return this._addCheck({
      kind: "int",
      message: errorUtil.toString(message)
    });
  }
  positive(message) {
    return this._addCheck({
      kind: "min",
      value: 0,
      inclusive: false,
      message: errorUtil.toString(message)
    });
  }
  negative(message) {
    return this._addCheck({
      kind: "max",
      value: 0,
      inclusive: false,
      message: errorUtil.toString(message)
    });
  }
  nonpositive(message) {
    return this._addCheck({
      kind: "max",
      value: 0,
      inclusive: true,
      message: errorUtil.toString(message)
    });
  }
  nonnegative(message) {
    return this._addCheck({
      kind: "min",
      value: 0,
      inclusive: true,
      message: errorUtil.toString(message)
    });
  }
  multipleOf(value, message) {
    return this._addCheck({
      kind: "multipleOf",
      value,
      message: errorUtil.toString(message)
    });
  }
  finite(message) {
    return this._addCheck({
      kind: "finite",
      message: errorUtil.toString(message)
    });
  }
  safe(message) {
    return this._addCheck({
      kind: "min",
      inclusive: true,
      value: Number.MIN_SAFE_INTEGER,
      message: errorUtil.toString(message)
    })._addCheck({
      kind: "max",
      inclusive: true,
      value: Number.MAX_SAFE_INTEGER,
      message: errorUtil.toString(message)
    });
  }
  get minValue() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min;
  }
  get maxValue() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max;
  }
  get isInt() {
    return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
  }
  get isFinite() {
    let max = null;
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
        return true;
      } else if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      } else if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return Number.isFinite(min) && Number.isFinite(max);
  }
};
ZodNumber.create = (params) => {
  return new ZodNumber({
    checks: [],
    typeName: ZodFirstPartyTypeKind.ZodNumber,
    coerce: params?.coerce || false,
    ...processCreateParams(params)
  });
};
var ZodBigInt = class _ZodBigInt extends ZodType {
  constructor() {
    super(...arguments);
    this.min = this.gte;
    this.max = this.lte;
  }
  _parse(input) {
    if (this._def.coerce) {
      try {
        input.data = BigInt(input.data);
      } catch {
        return this._getInvalidInput(input);
      }
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.bigint) {
      return this._getInvalidInput(input);
    }
    let ctx2 = void 0;
    const status = new ParseStatus();
    for (const check2 of this._def.checks) {
      if (check2.kind === "min") {
        const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
        if (tooSmall) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_small,
            type: "bigint",
            minimum: check2.value,
            inclusive: check2.inclusive,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "max") {
        const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
        if (tooBig) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_big,
            type: "bigint",
            maximum: check2.value,
            inclusive: check2.inclusive,
            message: check2.message
          });
          status.dirty();
        }
      } else if (check2.kind === "multipleOf") {
        if (input.data % check2.value !== BigInt(0)) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.not_multiple_of,
            multipleOf: check2.value,
            message: check2.message
          });
          status.dirty();
        }
      } else {
        util.assertNever(check2);
      }
    }
    return { status: status.value, value: input.data };
  }
  _getInvalidInput(input) {
    const ctx2 = this._getOrReturnCtx(input);
    addIssueToContext(ctx2, {
      code: ZodIssueCode.invalid_type,
      expected: ZodParsedType.bigint,
      received: ctx2.parsedType
    });
    return INVALID;
  }
  gte(value, message) {
    return this.setLimit("min", value, true, errorUtil.toString(message));
  }
  gt(value, message) {
    return this.setLimit("min", value, false, errorUtil.toString(message));
  }
  lte(value, message) {
    return this.setLimit("max", value, true, errorUtil.toString(message));
  }
  lt(value, message) {
    return this.setLimit("max", value, false, errorUtil.toString(message));
  }
  setLimit(kind, value, inclusive, message) {
    return new _ZodBigInt({
      ...this._def,
      checks: [
        ...this._def.checks,
        {
          kind,
          value,
          inclusive,
          message: errorUtil.toString(message)
        }
      ]
    });
  }
  _addCheck(check2) {
    return new _ZodBigInt({
      ...this._def,
      checks: [...this._def.checks, check2]
    });
  }
  positive(message) {
    return this._addCheck({
      kind: "min",
      value: BigInt(0),
      inclusive: false,
      message: errorUtil.toString(message)
    });
  }
  negative(message) {
    return this._addCheck({
      kind: "max",
      value: BigInt(0),
      inclusive: false,
      message: errorUtil.toString(message)
    });
  }
  nonpositive(message) {
    return this._addCheck({
      kind: "max",
      value: BigInt(0),
      inclusive: true,
      message: errorUtil.toString(message)
    });
  }
  nonnegative(message) {
    return this._addCheck({
      kind: "min",
      value: BigInt(0),
      inclusive: true,
      message: errorUtil.toString(message)
    });
  }
  multipleOf(value, message) {
    return this._addCheck({
      kind: "multipleOf",
      value,
      message: errorUtil.toString(message)
    });
  }
  get minValue() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min;
  }
  get maxValue() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max;
  }
};
ZodBigInt.create = (params) => {
  return new ZodBigInt({
    checks: [],
    typeName: ZodFirstPartyTypeKind.ZodBigInt,
    coerce: params?.coerce ?? false,
    ...processCreateParams(params)
  });
};
var ZodBoolean = class extends ZodType {
  _parse(input) {
    if (this._def.coerce) {
      input.data = Boolean(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.boolean) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.boolean,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
};
ZodBoolean.create = (params) => {
  return new ZodBoolean({
    typeName: ZodFirstPartyTypeKind.ZodBoolean,
    coerce: params?.coerce || false,
    ...processCreateParams(params)
  });
};
var ZodDate = class _ZodDate extends ZodType {
  _parse(input) {
    if (this._def.coerce) {
      input.data = new Date(input.data);
    }
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.date) {
      const ctx3 = this._getOrReturnCtx(input);
      addIssueToContext(ctx3, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.date,
        received: ctx3.parsedType
      });
      return INVALID;
    }
    if (Number.isNaN(input.data.getTime())) {
      const ctx3 = this._getOrReturnCtx(input);
      addIssueToContext(ctx3, {
        code: ZodIssueCode.invalid_date
      });
      return INVALID;
    }
    const status = new ParseStatus();
    let ctx2 = void 0;
    for (const check2 of this._def.checks) {
      if (check2.kind === "min") {
        if (input.data.getTime() < check2.value) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_small,
            message: check2.message,
            inclusive: true,
            exact: false,
            minimum: check2.value,
            type: "date"
          });
          status.dirty();
        }
      } else if (check2.kind === "max") {
        if (input.data.getTime() > check2.value) {
          ctx2 = this._getOrReturnCtx(input, ctx2);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.too_big,
            message: check2.message,
            inclusive: true,
            exact: false,
            maximum: check2.value,
            type: "date"
          });
          status.dirty();
        }
      } else {
        util.assertNever(check2);
      }
    }
    return {
      status: status.value,
      value: new Date(input.data.getTime())
    };
  }
  _addCheck(check2) {
    return new _ZodDate({
      ...this._def,
      checks: [...this._def.checks, check2]
    });
  }
  min(minDate, message) {
    return this._addCheck({
      kind: "min",
      value: minDate.getTime(),
      message: errorUtil.toString(message)
    });
  }
  max(maxDate, message) {
    return this._addCheck({
      kind: "max",
      value: maxDate.getTime(),
      message: errorUtil.toString(message)
    });
  }
  get minDate() {
    let min = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "min") {
        if (min === null || ch.value > min)
          min = ch.value;
      }
    }
    return min != null ? new Date(min) : null;
  }
  get maxDate() {
    let max = null;
    for (const ch of this._def.checks) {
      if (ch.kind === "max") {
        if (max === null || ch.value < max)
          max = ch.value;
      }
    }
    return max != null ? new Date(max) : null;
  }
};
ZodDate.create = (params) => {
  return new ZodDate({
    checks: [],
    coerce: params?.coerce || false,
    typeName: ZodFirstPartyTypeKind.ZodDate,
    ...processCreateParams(params)
  });
};
var ZodSymbol = class extends ZodType {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.symbol) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.symbol,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
};
ZodSymbol.create = (params) => {
  return new ZodSymbol({
    typeName: ZodFirstPartyTypeKind.ZodSymbol,
    ...processCreateParams(params)
  });
};
var ZodUndefined = class extends ZodType {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.undefined) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.undefined,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
};
ZodUndefined.create = (params) => {
  return new ZodUndefined({
    typeName: ZodFirstPartyTypeKind.ZodUndefined,
    ...processCreateParams(params)
  });
};
var ZodNull = class extends ZodType {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.null) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.null,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
};
ZodNull.create = (params) => {
  return new ZodNull({
    typeName: ZodFirstPartyTypeKind.ZodNull,
    ...processCreateParams(params)
  });
};
var ZodAny = class extends ZodType {
  constructor() {
    super(...arguments);
    this._any = true;
  }
  _parse(input) {
    return OK(input.data);
  }
};
ZodAny.create = (params) => {
  return new ZodAny({
    typeName: ZodFirstPartyTypeKind.ZodAny,
    ...processCreateParams(params)
  });
};
var ZodUnknown = class extends ZodType {
  constructor() {
    super(...arguments);
    this._unknown = true;
  }
  _parse(input) {
    return OK(input.data);
  }
};
ZodUnknown.create = (params) => {
  return new ZodUnknown({
    typeName: ZodFirstPartyTypeKind.ZodUnknown,
    ...processCreateParams(params)
  });
};
var ZodNever = class extends ZodType {
  _parse(input) {
    const ctx2 = this._getOrReturnCtx(input);
    addIssueToContext(ctx2, {
      code: ZodIssueCode.invalid_type,
      expected: ZodParsedType.never,
      received: ctx2.parsedType
    });
    return INVALID;
  }
};
ZodNever.create = (params) => {
  return new ZodNever({
    typeName: ZodFirstPartyTypeKind.ZodNever,
    ...processCreateParams(params)
  });
};
var ZodVoid = class extends ZodType {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.undefined) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.void,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    return OK(input.data);
  }
};
ZodVoid.create = (params) => {
  return new ZodVoid({
    typeName: ZodFirstPartyTypeKind.ZodVoid,
    ...processCreateParams(params)
  });
};
var ZodArray = class _ZodArray extends ZodType {
  _parse(input) {
    const { ctx: ctx2, status } = this._processInputParams(input);
    const def = this._def;
    if (ctx2.parsedType !== ZodParsedType.array) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.array,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    if (def.exactLength !== null) {
      const tooBig = ctx2.data.length > def.exactLength.value;
      const tooSmall = ctx2.data.length < def.exactLength.value;
      if (tooBig || tooSmall) {
        addIssueToContext(ctx2, {
          code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,
          minimum: tooSmall ? def.exactLength.value : void 0,
          maximum: tooBig ? def.exactLength.value : void 0,
          type: "array",
          inclusive: true,
          exact: true,
          message: def.exactLength.message
        });
        status.dirty();
      }
    }
    if (def.minLength !== null) {
      if (ctx2.data.length < def.minLength.value) {
        addIssueToContext(ctx2, {
          code: ZodIssueCode.too_small,
          minimum: def.minLength.value,
          type: "array",
          inclusive: true,
          exact: false,
          message: def.minLength.message
        });
        status.dirty();
      }
    }
    if (def.maxLength !== null) {
      if (ctx2.data.length > def.maxLength.value) {
        addIssueToContext(ctx2, {
          code: ZodIssueCode.too_big,
          maximum: def.maxLength.value,
          type: "array",
          inclusive: true,
          exact: false,
          message: def.maxLength.message
        });
        status.dirty();
      }
    }
    if (ctx2.common.async) {
      return Promise.all([...ctx2.data].map((item, i) => {
        return def.type._parseAsync(new ParseInputLazyPath(ctx2, item, ctx2.path, i));
      })).then((result2) => {
        return ParseStatus.mergeArray(status, result2);
      });
    }
    const result = [...ctx2.data].map((item, i) => {
      return def.type._parseSync(new ParseInputLazyPath(ctx2, item, ctx2.path, i));
    });
    return ParseStatus.mergeArray(status, result);
  }
  get element() {
    return this._def.type;
  }
  min(minLength, message) {
    return new _ZodArray({
      ...this._def,
      minLength: { value: minLength, message: errorUtil.toString(message) }
    });
  }
  max(maxLength, message) {
    return new _ZodArray({
      ...this._def,
      maxLength: { value: maxLength, message: errorUtil.toString(message) }
    });
  }
  length(len, message) {
    return new _ZodArray({
      ...this._def,
      exactLength: { value: len, message: errorUtil.toString(message) }
    });
  }
  nonempty(message) {
    return this.min(1, message);
  }
};
ZodArray.create = (schema, params) => {
  return new ZodArray({
    type: schema,
    minLength: null,
    maxLength: null,
    exactLength: null,
    typeName: ZodFirstPartyTypeKind.ZodArray,
    ...processCreateParams(params)
  });
};
function deepPartialify(schema) {
  if (schema instanceof ZodObject) {
    const newShape = {};
    for (const key in schema.shape) {
      const fieldSchema = schema.shape[key];
      newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
    }
    return new ZodObject({
      ...schema._def,
      shape: () => newShape
    });
  } else if (schema instanceof ZodArray) {
    return new ZodArray({
      ...schema._def,
      type: deepPartialify(schema.element)
    });
  } else if (schema instanceof ZodOptional) {
    return ZodOptional.create(deepPartialify(schema.unwrap()));
  } else if (schema instanceof ZodNullable) {
    return ZodNullable.create(deepPartialify(schema.unwrap()));
  } else if (schema instanceof ZodTuple) {
    return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));
  } else {
    return schema;
  }
}
var ZodObject = class _ZodObject extends ZodType {
  constructor() {
    super(...arguments);
    this._cached = null;
    this.nonstrict = this.passthrough;
    this.augment = this.extend;
  }
  _getCached() {
    if (this._cached !== null)
      return this._cached;
    const shape = this._def.shape();
    const keys = util.objectKeys(shape);
    this._cached = { shape, keys };
    return this._cached;
  }
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.object) {
      const ctx3 = this._getOrReturnCtx(input);
      addIssueToContext(ctx3, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.object,
        received: ctx3.parsedType
      });
      return INVALID;
    }
    const { status, ctx: ctx2 } = this._processInputParams(input);
    const { shape, keys: shapeKeys } = this._getCached();
    const extraKeys = [];
    if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) {
      for (const key in ctx2.data) {
        if (!shapeKeys.includes(key)) {
          extraKeys.push(key);
        }
      }
    }
    const pairs = [];
    for (const key of shapeKeys) {
      const keyValidator = shape[key];
      const value = ctx2.data[key];
      pairs.push({
        key: { status: "valid", value: key },
        value: keyValidator._parse(new ParseInputLazyPath(ctx2, value, ctx2.path, key)),
        alwaysSet: key in ctx2.data
      });
    }
    if (this._def.catchall instanceof ZodNever) {
      const unknownKeys = this._def.unknownKeys;
      if (unknownKeys === "passthrough") {
        for (const key of extraKeys) {
          pairs.push({
            key: { status: "valid", value: key },
            value: { status: "valid", value: ctx2.data[key] }
          });
        }
      } else if (unknownKeys === "strict") {
        if (extraKeys.length > 0) {
          addIssueToContext(ctx2, {
            code: ZodIssueCode.unrecognized_keys,
            keys: extraKeys
          });
          status.dirty();
        }
      } else if (unknownKeys === "strip") {
      } else {
        throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
      }
    } else {
      const catchall = this._def.catchall;
      for (const key of extraKeys) {
        const value = ctx2.data[key];
        pairs.push({
          key: { status: "valid", value: key },
          value: catchall._parse(
            new ParseInputLazyPath(ctx2, value, ctx2.path, key)
            //, ctx.child(key), value, getParsedType(value)
          ),
          alwaysSet: key in ctx2.data
        });
      }
    }
    if (ctx2.common.async) {
      return Promise.resolve().then(async () => {
        const syncPairs = [];
        for (const pair of pairs) {
          const key = await pair.key;
          const value = await pair.value;
          syncPairs.push({
            key,
            value,
            alwaysSet: pair.alwaysSet
          });
        }
        return syncPairs;
      }).then((syncPairs) => {
        return ParseStatus.mergeObjectSync(status, syncPairs);
      });
    } else {
      return ParseStatus.mergeObjectSync(status, pairs);
    }
  }
  get shape() {
    return this._def.shape();
  }
  strict(message) {
    errorUtil.errToObj;
    return new _ZodObject({
      ...this._def,
      unknownKeys: "strict",
      ...message !== void 0 ? {
        errorMap: (issue2, ctx2) => {
          const defaultError = this._def.errorMap?.(issue2, ctx2).message ?? ctx2.defaultError;
          if (issue2.code === "unrecognized_keys")
            return {
              message: errorUtil.errToObj(message).message ?? defaultError
            };
          return {
            message: defaultError
          };
        }
      } : {}
    });
  }
  strip() {
    return new _ZodObject({
      ...this._def,
      unknownKeys: "strip"
    });
  }
  passthrough() {
    return new _ZodObject({
      ...this._def,
      unknownKeys: "passthrough"
    });
  }
  // const AugmentFactory =
  //   <Def extends ZodObjectDef>(def: Def) =>
  //   <Augmentation extends ZodRawShape>(
  //     augmentation: Augmentation
  //   ): ZodObject<
  //     extendShape<ReturnType<Def["shape"]>, Augmentation>,
  //     Def["unknownKeys"],
  //     Def["catchall"]
  //   > => {
  //     return new ZodObject({
  //       ...def,
  //       shape: () => ({
  //         ...def.shape(),
  //         ...augmentation,
  //       }),
  //     }) as any;
  //   };
  extend(augmentation) {
    return new _ZodObject({
      ...this._def,
      shape: () => ({
        ...this._def.shape(),
        ...augmentation
      })
    });
  }
  /**
   * Prior to zod@1.0.12 there was a bug in the
   * inferred type of merged objects. Please
   * upgrade if you are experiencing issues.
   */
  merge(merging) {
    const merged = new _ZodObject({
      unknownKeys: merging._def.unknownKeys,
      catchall: merging._def.catchall,
      shape: () => ({
        ...this._def.shape(),
        ...merging._def.shape()
      }),
      typeName: ZodFirstPartyTypeKind.ZodObject
    });
    return merged;
  }
  // merge<
  //   Incoming extends AnyZodObject,
  //   Augmentation extends Incoming["shape"],
  //   NewOutput extends {
  //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
  //       ? Augmentation[k]["_output"]
  //       : k extends keyof Output
  //       ? Output[k]
  //       : never;
  //   },
  //   NewInput extends {
  //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
  //       ? Augmentation[k]["_input"]
  //       : k extends keyof Input
  //       ? Input[k]
  //       : never;
  //   }
  // >(
  //   merging: Incoming
  // ): ZodObject<
  //   extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
  //   Incoming["_def"]["unknownKeys"],
  //   Incoming["_def"]["catchall"],
  //   NewOutput,
  //   NewInput
  // > {
  //   const merged: any = new ZodObject({
  //     unknownKeys: merging._def.unknownKeys,
  //     catchall: merging._def.catchall,
  //     shape: () =>
  //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
  //     typeName: ZodFirstPartyTypeKind.ZodObject,
  //   }) as any;
  //   return merged;
  // }
  setKey(key, schema) {
    return this.augment({ [key]: schema });
  }
  // merge<Incoming extends AnyZodObject>(
  //   merging: Incoming
  // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
  // ZodObject<
  //   extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
  //   Incoming["_def"]["unknownKeys"],
  //   Incoming["_def"]["catchall"]
  // > {
  //   // const mergedShape = objectUtil.mergeShapes(
  //   //   this._def.shape(),
  //   //   merging._def.shape()
  //   // );
  //   const merged: any = new ZodObject({
  //     unknownKeys: merging._def.unknownKeys,
  //     catchall: merging._def.catchall,
  //     shape: () =>
  //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
  //     typeName: ZodFirstPartyTypeKind.ZodObject,
  //   }) as any;
  //   return merged;
  // }
  catchall(index2) {
    return new _ZodObject({
      ...this._def,
      catchall: index2
    });
  }
  pick(mask) {
    const shape = {};
    for (const key of util.objectKeys(mask)) {
      if (mask[key] && this.shape[key]) {
        shape[key] = this.shape[key];
      }
    }
    return new _ZodObject({
      ...this._def,
      shape: () => shape
    });
  }
  omit(mask) {
    const shape = {};
    for (const key of util.objectKeys(this.shape)) {
      if (!mask[key]) {
        shape[key] = this.shape[key];
      }
    }
    return new _ZodObject({
      ...this._def,
      shape: () => shape
    });
  }
  /**
   * @deprecated
   */
  deepPartial() {
    return deepPartialify(this);
  }
  partial(mask) {
    const newShape = {};
    for (const key of util.objectKeys(this.shape)) {
      const fieldSchema = this.shape[key];
      if (mask && !mask[key]) {
        newShape[key] = fieldSchema;
      } else {
        newShape[key] = fieldSchema.optional();
      }
    }
    return new _ZodObject({
      ...this._def,
      shape: () => newShape
    });
  }
  required(mask) {
    const newShape = {};
    for (const key of util.objectKeys(this.shape)) {
      if (mask && !mask[key]) {
        newShape[key] = this.shape[key];
      } else {
        const fieldSchema = this.shape[key];
        let newField = fieldSchema;
        while (newField instanceof ZodOptional) {
          newField = newField._def.innerType;
        }
        newShape[key] = newField;
      }
    }
    return new _ZodObject({
      ...this._def,
      shape: () => newShape
    });
  }
  keyof() {
    return createZodEnum(util.objectKeys(this.shape));
  }
};
ZodObject.create = (shape, params) => {
  return new ZodObject({
    shape: () => shape,
    unknownKeys: "strip",
    catchall: ZodNever.create(),
    typeName: ZodFirstPartyTypeKind.ZodObject,
    ...processCreateParams(params)
  });
};
ZodObject.strictCreate = (shape, params) => {
  return new ZodObject({
    shape: () => shape,
    unknownKeys: "strict",
    catchall: ZodNever.create(),
    typeName: ZodFirstPartyTypeKind.ZodObject,
    ...processCreateParams(params)
  });
};
ZodObject.lazycreate = (shape, params) => {
  return new ZodObject({
    shape,
    unknownKeys: "strip",
    catchall: ZodNever.create(),
    typeName: ZodFirstPartyTypeKind.ZodObject,
    ...processCreateParams(params)
  });
};
var ZodUnion = class extends ZodType {
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    const options = this._def.options;
    function handleResults(results) {
      for (const result of results) {
        if (result.result.status === "valid") {
          return result.result;
        }
      }
      for (const result of results) {
        if (result.result.status === "dirty") {
          ctx2.common.issues.push(...result.ctx.common.issues);
          return result.result;
        }
      }
      const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_union,
        unionErrors
      });
      return INVALID;
    }
    if (ctx2.common.async) {
      return Promise.all(options.map(async (option) => {
        const childCtx = {
          ...ctx2,
          common: {
            ...ctx2.common,
            issues: []
          },
          parent: null
        };
        return {
          result: await option._parseAsync({
            data: ctx2.data,
            path: ctx2.path,
            parent: childCtx
          }),
          ctx: childCtx
        };
      })).then(handleResults);
    } else {
      let dirty = void 0;
      const issues = [];
      for (const option of options) {
        const childCtx = {
          ...ctx2,
          common: {
            ...ctx2.common,
            issues: []
          },
          parent: null
        };
        const result = option._parseSync({
          data: ctx2.data,
          path: ctx2.path,
          parent: childCtx
        });
        if (result.status === "valid") {
          return result;
        } else if (result.status === "dirty" && !dirty) {
          dirty = { result, ctx: childCtx };
        }
        if (childCtx.common.issues.length) {
          issues.push(childCtx.common.issues);
        }
      }
      if (dirty) {
        ctx2.common.issues.push(...dirty.ctx.common.issues);
        return dirty.result;
      }
      const unionErrors = issues.map((issues2) => new ZodError(issues2));
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_union,
        unionErrors
      });
      return INVALID;
    }
  }
  get options() {
    return this._def.options;
  }
};
ZodUnion.create = (types, params) => {
  return new ZodUnion({
    options: types,
    typeName: ZodFirstPartyTypeKind.ZodUnion,
    ...processCreateParams(params)
  });
};
var getDiscriminator = (type) => {
  if (type instanceof ZodLazy) {
    return getDiscriminator(type.schema);
  } else if (type instanceof ZodEffects) {
    return getDiscriminator(type.innerType());
  } else if (type instanceof ZodLiteral) {
    return [type.value];
  } else if (type instanceof ZodEnum) {
    return type.options;
  } else if (type instanceof ZodNativeEnum) {
    return util.objectValues(type.enum);
  } else if (type instanceof ZodDefault) {
    return getDiscriminator(type._def.innerType);
  } else if (type instanceof ZodUndefined) {
    return [void 0];
  } else if (type instanceof ZodNull) {
    return [null];
  } else if (type instanceof ZodOptional) {
    return [void 0, ...getDiscriminator(type.unwrap())];
  } else if (type instanceof ZodNullable) {
    return [null, ...getDiscriminator(type.unwrap())];
  } else if (type instanceof ZodBranded) {
    return getDiscriminator(type.unwrap());
  } else if (type instanceof ZodReadonly) {
    return getDiscriminator(type.unwrap());
  } else if (type instanceof ZodCatch) {
    return getDiscriminator(type._def.innerType);
  } else {
    return [];
  }
};
var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.parsedType !== ZodParsedType.object) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.object,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    const discriminator = this.discriminator;
    const discriminatorValue = ctx2.data[discriminator];
    const option = this.optionsMap.get(discriminatorValue);
    if (!option) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_union_discriminator,
        options: Array.from(this.optionsMap.keys()),
        path: [discriminator]
      });
      return INVALID;
    }
    if (ctx2.common.async) {
      return option._parseAsync({
        data: ctx2.data,
        path: ctx2.path,
        parent: ctx2
      });
    } else {
      return option._parseSync({
        data: ctx2.data,
        path: ctx2.path,
        parent: ctx2
      });
    }
  }
  get discriminator() {
    return this._def.discriminator;
  }
  get options() {
    return this._def.options;
  }
  get optionsMap() {
    return this._def.optionsMap;
  }
  /**
   * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
   * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
   * have a different value for each object in the union.
   * @param discriminator the name of the discriminator property
   * @param types an array of object schemas
   * @param params
   */
  static create(discriminator, options, params) {
    const optionsMap = /* @__PURE__ */ new Map();
    for (const type of options) {
      const discriminatorValues = getDiscriminator(type.shape[discriminator]);
      if (!discriminatorValues.length) {
        throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
      }
      for (const value of discriminatorValues) {
        if (optionsMap.has(value)) {
          throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
        }
        optionsMap.set(value, type);
      }
    }
    return new _ZodDiscriminatedUnion({
      typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
      discriminator,
      options,
      optionsMap,
      ...processCreateParams(params)
    });
  }
};
function mergeValues(a, b) {
  const aType = getParsedType(a);
  const bType = getParsedType(b);
  if (a === b) {
    return { valid: true, data: a };
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
    const bKeys = util.objectKeys(b);
    const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
    const newObj = { ...a, ...b };
    for (const key of sharedKeys) {
      const sharedValue = mergeValues(a[key], b[key]);
      if (!sharedValue.valid) {
        return { valid: false };
      }
      newObj[key] = sharedValue.data;
    }
    return { valid: true, data: newObj };
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
    if (a.length !== b.length) {
      return { valid: false };
    }
    const newArray = [];
    for (let index2 = 0; index2 < a.length; index2++) {
      const itemA = a[index2];
      const itemB = b[index2];
      const sharedValue = mergeValues(itemA, itemB);
      if (!sharedValue.valid) {
        return { valid: false };
      }
      newArray.push(sharedValue.data);
    }
    return { valid: true, data: newArray };
  } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
    return { valid: true, data: a };
  } else {
    return { valid: false };
  }
}
var ZodIntersection = class extends ZodType {
  _parse(input) {
    const { status, ctx: ctx2 } = this._processInputParams(input);
    const handleParsed = (parsedLeft, parsedRight) => {
      if (isAborted(parsedLeft) || isAborted(parsedRight)) {
        return INVALID;
      }
      const merged = mergeValues(parsedLeft.value, parsedRight.value);
      if (!merged.valid) {
        addIssueToContext(ctx2, {
          code: ZodIssueCode.invalid_intersection_types
        });
        return INVALID;
      }
      if (isDirty(parsedLeft) || isDirty(parsedRight)) {
        status.dirty();
      }
      return { status: status.value, value: merged.data };
    };
    if (ctx2.common.async) {
      return Promise.all([
        this._def.left._parseAsync({
          data: ctx2.data,
          path: ctx2.path,
          parent: ctx2
        }),
        this._def.right._parseAsync({
          data: ctx2.data,
          path: ctx2.path,
          parent: ctx2
        })
      ]).then(([left, right]) => handleParsed(left, right));
    } else {
      return handleParsed(this._def.left._parseSync({
        data: ctx2.data,
        path: ctx2.path,
        parent: ctx2
      }), this._def.right._parseSync({
        data: ctx2.data,
        path: ctx2.path,
        parent: ctx2
      }));
    }
  }
};
ZodIntersection.create = (left, right, params) => {
  return new ZodIntersection({
    left,
    right,
    typeName: ZodFirstPartyTypeKind.ZodIntersection,
    ...processCreateParams(params)
  });
};
var ZodTuple = class _ZodTuple extends ZodType {
  _parse(input) {
    const { status, ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.parsedType !== ZodParsedType.array) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.array,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    if (ctx2.data.length < this._def.items.length) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.too_small,
        minimum: this._def.items.length,
        inclusive: true,
        exact: false,
        type: "array"
      });
      return INVALID;
    }
    const rest = this._def.rest;
    if (!rest && ctx2.data.length > this._def.items.length) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.too_big,
        maximum: this._def.items.length,
        inclusive: true,
        exact: false,
        type: "array"
      });
      status.dirty();
    }
    const items = [...ctx2.data].map((item, itemIndex) => {
      const schema = this._def.items[itemIndex] || this._def.rest;
      if (!schema)
        return null;
      return schema._parse(new ParseInputLazyPath(ctx2, item, ctx2.path, itemIndex));
    }).filter((x) => !!x);
    if (ctx2.common.async) {
      return Promise.all(items).then((results) => {
        return ParseStatus.mergeArray(status, results);
      });
    } else {
      return ParseStatus.mergeArray(status, items);
    }
  }
  get items() {
    return this._def.items;
  }
  rest(rest) {
    return new _ZodTuple({
      ...this._def,
      rest
    });
  }
};
ZodTuple.create = (schemas, params) => {
  if (!Array.isArray(schemas)) {
    throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
  }
  return new ZodTuple({
    items: schemas,
    typeName: ZodFirstPartyTypeKind.ZodTuple,
    rest: null,
    ...processCreateParams(params)
  });
};
var ZodRecord = class _ZodRecord extends ZodType {
  get keySchema() {
    return this._def.keyType;
  }
  get valueSchema() {
    return this._def.valueType;
  }
  _parse(input) {
    const { status, ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.parsedType !== ZodParsedType.object) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.object,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    const pairs = [];
    const keyType = this._def.keyType;
    const valueType = this._def.valueType;
    for (const key in ctx2.data) {
      pairs.push({
        key: keyType._parse(new ParseInputLazyPath(ctx2, key, ctx2.path, key)),
        value: valueType._parse(new ParseInputLazyPath(ctx2, ctx2.data[key], ctx2.path, key)),
        alwaysSet: key in ctx2.data
      });
    }
    if (ctx2.common.async) {
      return ParseStatus.mergeObjectAsync(status, pairs);
    } else {
      return ParseStatus.mergeObjectSync(status, pairs);
    }
  }
  get element() {
    return this._def.valueType;
  }
  static create(first, second, third) {
    if (second instanceof ZodType) {
      return new _ZodRecord({
        keyType: first,
        valueType: second,
        typeName: ZodFirstPartyTypeKind.ZodRecord,
        ...processCreateParams(third)
      });
    }
    return new _ZodRecord({
      keyType: ZodString.create(),
      valueType: first,
      typeName: ZodFirstPartyTypeKind.ZodRecord,
      ...processCreateParams(second)
    });
  }
};
var ZodMap = class extends ZodType {
  get keySchema() {
    return this._def.keyType;
  }
  get valueSchema() {
    return this._def.valueType;
  }
  _parse(input) {
    const { status, ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.parsedType !== ZodParsedType.map) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.map,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    const keyType = this._def.keyType;
    const valueType = this._def.valueType;
    const pairs = [...ctx2.data.entries()].map(([key, value], index2) => {
      return {
        key: keyType._parse(new ParseInputLazyPath(ctx2, key, ctx2.path, [index2, "key"])),
        value: valueType._parse(new ParseInputLazyPath(ctx2, value, ctx2.path, [index2, "value"]))
      };
    });
    if (ctx2.common.async) {
      const finalMap = /* @__PURE__ */ new Map();
      return Promise.resolve().then(async () => {
        for (const pair of pairs) {
          const key = await pair.key;
          const value = await pair.value;
          if (key.status === "aborted" || value.status === "aborted") {
            return INVALID;
          }
          if (key.status === "dirty" || value.status === "dirty") {
            status.dirty();
          }
          finalMap.set(key.value, value.value);
        }
        return { status: status.value, value: finalMap };
      });
    } else {
      const finalMap = /* @__PURE__ */ new Map();
      for (const pair of pairs) {
        const key = pair.key;
        const value = pair.value;
        if (key.status === "aborted" || value.status === "aborted") {
          return INVALID;
        }
        if (key.status === "dirty" || value.status === "dirty") {
          status.dirty();
        }
        finalMap.set(key.value, value.value);
      }
      return { status: status.value, value: finalMap };
    }
  }
};
ZodMap.create = (keyType, valueType, params) => {
  return new ZodMap({
    valueType,
    keyType,
    typeName: ZodFirstPartyTypeKind.ZodMap,
    ...processCreateParams(params)
  });
};
var ZodSet = class _ZodSet extends ZodType {
  _parse(input) {
    const { status, ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.parsedType !== ZodParsedType.set) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.set,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    const def = this._def;
    if (def.minSize !== null) {
      if (ctx2.data.size < def.minSize.value) {
        addIssueToContext(ctx2, {
          code: ZodIssueCode.too_small,
          minimum: def.minSize.value,
          type: "set",
          inclusive: true,
          exact: false,
          message: def.minSize.message
        });
        status.dirty();
      }
    }
    if (def.maxSize !== null) {
      if (ctx2.data.size > def.maxSize.value) {
        addIssueToContext(ctx2, {
          code: ZodIssueCode.too_big,
          maximum: def.maxSize.value,
          type: "set",
          inclusive: true,
          exact: false,
          message: def.maxSize.message
        });
        status.dirty();
      }
    }
    const valueType = this._def.valueType;
    function finalizeSet(elements2) {
      const parsedSet = /* @__PURE__ */ new Set();
      for (const element of elements2) {
        if (element.status === "aborted")
          return INVALID;
        if (element.status === "dirty")
          status.dirty();
        parsedSet.add(element.value);
      }
      return { status: status.value, value: parsedSet };
    }
    const elements = [...ctx2.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx2, item, ctx2.path, i)));
    if (ctx2.common.async) {
      return Promise.all(elements).then((elements2) => finalizeSet(elements2));
    } else {
      return finalizeSet(elements);
    }
  }
  min(minSize, message) {
    return new _ZodSet({
      ...this._def,
      minSize: { value: minSize, message: errorUtil.toString(message) }
    });
  }
  max(maxSize, message) {
    return new _ZodSet({
      ...this._def,
      maxSize: { value: maxSize, message: errorUtil.toString(message) }
    });
  }
  size(size, message) {
    return this.min(size, message).max(size, message);
  }
  nonempty(message) {
    return this.min(1, message);
  }
};
ZodSet.create = (valueType, params) => {
  return new ZodSet({
    valueType,
    minSize: null,
    maxSize: null,
    typeName: ZodFirstPartyTypeKind.ZodSet,
    ...processCreateParams(params)
  });
};
var ZodFunction = class _ZodFunction extends ZodType {
  constructor() {
    super(...arguments);
    this.validate = this.implement;
  }
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.parsedType !== ZodParsedType.function) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.function,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    function makeArgsIssue(args, error51) {
      return makeIssue({
        data: args,
        path: ctx2.path,
        errorMaps: [ctx2.common.contextualErrorMap, ctx2.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
        issueData: {
          code: ZodIssueCode.invalid_arguments,
          argumentsError: error51
        }
      });
    }
    function makeReturnsIssue(returns, error51) {
      return makeIssue({
        data: returns,
        path: ctx2.path,
        errorMaps: [ctx2.common.contextualErrorMap, ctx2.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
        issueData: {
          code: ZodIssueCode.invalid_return_type,
          returnTypeError: error51
        }
      });
    }
    const params = { errorMap: ctx2.common.contextualErrorMap };
    const fn = ctx2.data;
    if (this._def.returns instanceof ZodPromise) {
      const me = this;
      return OK(async function(...args) {
        const error51 = new ZodError([]);
        const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
          error51.addIssue(makeArgsIssue(args, e));
          throw error51;
        });
        const result = await Reflect.apply(fn, this, parsedArgs);
        const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
          error51.addIssue(makeReturnsIssue(result, e));
          throw error51;
        });
        return parsedReturns;
      });
    } else {
      const me = this;
      return OK(function(...args) {
        const parsedArgs = me._def.args.safeParse(args, params);
        if (!parsedArgs.success) {
          throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
        }
        const result = Reflect.apply(fn, this, parsedArgs.data);
        const parsedReturns = me._def.returns.safeParse(result, params);
        if (!parsedReturns.success) {
          throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
        }
        return parsedReturns.data;
      });
    }
  }
  parameters() {
    return this._def.args;
  }
  returnType() {
    return this._def.returns;
  }
  args(...items) {
    return new _ZodFunction({
      ...this._def,
      args: ZodTuple.create(items).rest(ZodUnknown.create())
    });
  }
  returns(returnType) {
    return new _ZodFunction({
      ...this._def,
      returns: returnType
    });
  }
  implement(func) {
    const validatedFunc = this.parse(func);
    return validatedFunc;
  }
  strictImplement(func) {
    const validatedFunc = this.parse(func);
    return validatedFunc;
  }
  static create(args, returns, params) {
    return new _ZodFunction({
      args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),
      returns: returns || ZodUnknown.create(),
      typeName: ZodFirstPartyTypeKind.ZodFunction,
      ...processCreateParams(params)
    });
  }
};
var ZodLazy = class extends ZodType {
  get schema() {
    return this._def.getter();
  }
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    const lazySchema = this._def.getter();
    return lazySchema._parse({ data: ctx2.data, path: ctx2.path, parent: ctx2 });
  }
};
ZodLazy.create = (getter, params) => {
  return new ZodLazy({
    getter,
    typeName: ZodFirstPartyTypeKind.ZodLazy,
    ...processCreateParams(params)
  });
};
var ZodLiteral = class extends ZodType {
  _parse(input) {
    if (input.data !== this._def.value) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        received: ctx2.data,
        code: ZodIssueCode.invalid_literal,
        expected: this._def.value
      });
      return INVALID;
    }
    return { status: "valid", value: input.data };
  }
  get value() {
    return this._def.value;
  }
};
ZodLiteral.create = (value, params) => {
  return new ZodLiteral({
    value,
    typeName: ZodFirstPartyTypeKind.ZodLiteral,
    ...processCreateParams(params)
  });
};
function createZodEnum(values, params) {
  return new ZodEnum({
    values,
    typeName: ZodFirstPartyTypeKind.ZodEnum,
    ...processCreateParams(params)
  });
}
var ZodEnum = class _ZodEnum extends ZodType {
  _parse(input) {
    if (typeof input.data !== "string") {
      const ctx2 = this._getOrReturnCtx(input);
      const expectedValues = this._def.values;
      addIssueToContext(ctx2, {
        expected: util.joinValues(expectedValues),
        received: ctx2.parsedType,
        code: ZodIssueCode.invalid_type
      });
      return INVALID;
    }
    if (!this._cache) {
      this._cache = new Set(this._def.values);
    }
    if (!this._cache.has(input.data)) {
      const ctx2 = this._getOrReturnCtx(input);
      const expectedValues = this._def.values;
      addIssueToContext(ctx2, {
        received: ctx2.data,
        code: ZodIssueCode.invalid_enum_value,
        options: expectedValues
      });
      return INVALID;
    }
    return OK(input.data);
  }
  get options() {
    return this._def.values;
  }
  get enum() {
    const enumValues = {};
    for (const val of this._def.values) {
      enumValues[val] = val;
    }
    return enumValues;
  }
  get Values() {
    const enumValues = {};
    for (const val of this._def.values) {
      enumValues[val] = val;
    }
    return enumValues;
  }
  get Enum() {
    const enumValues = {};
    for (const val of this._def.values) {
      enumValues[val] = val;
    }
    return enumValues;
  }
  extract(values, newDef = this._def) {
    return _ZodEnum.create(values, {
      ...this._def,
      ...newDef
    });
  }
  exclude(values, newDef = this._def) {
    return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
      ...this._def,
      ...newDef
    });
  }
};
ZodEnum.create = createZodEnum;
var ZodNativeEnum = class extends ZodType {
  _parse(input) {
    const nativeEnumValues = util.getValidEnumValues(this._def.values);
    const ctx2 = this._getOrReturnCtx(input);
    if (ctx2.parsedType !== ZodParsedType.string && ctx2.parsedType !== ZodParsedType.number) {
      const expectedValues = util.objectValues(nativeEnumValues);
      addIssueToContext(ctx2, {
        expected: util.joinValues(expectedValues),
        received: ctx2.parsedType,
        code: ZodIssueCode.invalid_type
      });
      return INVALID;
    }
    if (!this._cache) {
      this._cache = new Set(util.getValidEnumValues(this._def.values));
    }
    if (!this._cache.has(input.data)) {
      const expectedValues = util.objectValues(nativeEnumValues);
      addIssueToContext(ctx2, {
        received: ctx2.data,
        code: ZodIssueCode.invalid_enum_value,
        options: expectedValues
      });
      return INVALID;
    }
    return OK(input.data);
  }
  get enum() {
    return this._def.values;
  }
};
ZodNativeEnum.create = (values, params) => {
  return new ZodNativeEnum({
    values,
    typeName: ZodFirstPartyTypeKind.ZodNativeEnum,
    ...processCreateParams(params)
  });
};
var ZodPromise = class extends ZodType {
  unwrap() {
    return this._def.type;
  }
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.parsedType !== ZodParsedType.promise && ctx2.common.async === false) {
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.promise,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    const promisified = ctx2.parsedType === ZodParsedType.promise ? ctx2.data : Promise.resolve(ctx2.data);
    return OK(promisified.then((data) => {
      return this._def.type.parseAsync(data, {
        path: ctx2.path,
        errorMap: ctx2.common.contextualErrorMap
      });
    }));
  }
};
ZodPromise.create = (schema, params) => {
  return new ZodPromise({
    type: schema,
    typeName: ZodFirstPartyTypeKind.ZodPromise,
    ...processCreateParams(params)
  });
};
var ZodEffects = class extends ZodType {
  innerType() {
    return this._def.schema;
  }
  sourceType() {
    return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
  }
  _parse(input) {
    const { status, ctx: ctx2 } = this._processInputParams(input);
    const effect = this._def.effect || null;
    const checkCtx = {
      addIssue: (arg) => {
        addIssueToContext(ctx2, arg);
        if (arg.fatal) {
          status.abort();
        } else {
          status.dirty();
        }
      },
      get path() {
        return ctx2.path;
      }
    };
    checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
    if (effect.type === "preprocess") {
      const processed = effect.transform(ctx2.data, checkCtx);
      if (ctx2.common.async) {
        return Promise.resolve(processed).then(async (processed2) => {
          if (status.value === "aborted")
            return INVALID;
          const result = await this._def.schema._parseAsync({
            data: processed2,
            path: ctx2.path,
            parent: ctx2
          });
          if (result.status === "aborted")
            return INVALID;
          if (result.status === "dirty")
            return DIRTY(result.value);
          if (status.value === "dirty")
            return DIRTY(result.value);
          return result;
        });
      } else {
        if (status.value === "aborted")
          return INVALID;
        const result = this._def.schema._parseSync({
          data: processed,
          path: ctx2.path,
          parent: ctx2
        });
        if (result.status === "aborted")
          return INVALID;
        if (result.status === "dirty")
          return DIRTY(result.value);
        if (status.value === "dirty")
          return DIRTY(result.value);
        return result;
      }
    }
    if (effect.type === "refinement") {
      const executeRefinement = (acc) => {
        const result = effect.refinement(acc, checkCtx);
        if (ctx2.common.async) {
          return Promise.resolve(result);
        }
        if (result instanceof Promise) {
          throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
        }
        return acc;
      };
      if (ctx2.common.async === false) {
        const inner = this._def.schema._parseSync({
          data: ctx2.data,
          path: ctx2.path,
          parent: ctx2
        });
        if (inner.status === "aborted")
          return INVALID;
        if (inner.status === "dirty")
          status.dirty();
        executeRefinement(inner.value);
        return { status: status.value, value: inner.value };
      } else {
        return this._def.schema._parseAsync({ data: ctx2.data, path: ctx2.path, parent: ctx2 }).then((inner) => {
          if (inner.status === "aborted")
            return INVALID;
          if (inner.status === "dirty")
            status.dirty();
          return executeRefinement(inner.value).then(() => {
            return { status: status.value, value: inner.value };
          });
        });
      }
    }
    if (effect.type === "transform") {
      if (ctx2.common.async === false) {
        const base = this._def.schema._parseSync({
          data: ctx2.data,
          path: ctx2.path,
          parent: ctx2
        });
        if (!isValid(base))
          return INVALID;
        const result = effect.transform(base.value, checkCtx);
        if (result instanceof Promise) {
          throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
        }
        return { status: status.value, value: result };
      } else {
        return this._def.schema._parseAsync({ data: ctx2.data, path: ctx2.path, parent: ctx2 }).then((base) => {
          if (!isValid(base))
            return INVALID;
          return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
            status: status.value,
            value: result
          }));
        });
      }
    }
    util.assertNever(effect);
  }
};
ZodEffects.create = (schema, effect, params) => {
  return new ZodEffects({
    schema,
    typeName: ZodFirstPartyTypeKind.ZodEffects,
    effect,
    ...processCreateParams(params)
  });
};
ZodEffects.createWithPreprocess = (preprocess2, schema, params) => {
  return new ZodEffects({
    schema,
    effect: { type: "preprocess", transform: preprocess2 },
    typeName: ZodFirstPartyTypeKind.ZodEffects,
    ...processCreateParams(params)
  });
};
var ZodOptional = class extends ZodType {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 === ZodParsedType.undefined) {
      return OK(void 0);
    }
    return this._def.innerType._parse(input);
  }
  unwrap() {
    return this._def.innerType;
  }
};
ZodOptional.create = (type, params) => {
  return new ZodOptional({
    innerType: type,
    typeName: ZodFirstPartyTypeKind.ZodOptional,
    ...processCreateParams(params)
  });
};
var ZodNullable = class extends ZodType {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 === ZodParsedType.null) {
      return OK(null);
    }
    return this._def.innerType._parse(input);
  }
  unwrap() {
    return this._def.innerType;
  }
};
ZodNullable.create = (type, params) => {
  return new ZodNullable({
    innerType: type,
    typeName: ZodFirstPartyTypeKind.ZodNullable,
    ...processCreateParams(params)
  });
};
var ZodDefault = class extends ZodType {
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    let data = ctx2.data;
    if (ctx2.parsedType === ZodParsedType.undefined) {
      data = this._def.defaultValue();
    }
    return this._def.innerType._parse({
      data,
      path: ctx2.path,
      parent: ctx2
    });
  }
  removeDefault() {
    return this._def.innerType;
  }
};
ZodDefault.create = (type, params) => {
  return new ZodDefault({
    innerType: type,
    typeName: ZodFirstPartyTypeKind.ZodDefault,
    defaultValue: typeof params.default === "function" ? params.default : () => params.default,
    ...processCreateParams(params)
  });
};
var ZodCatch = class extends ZodType {
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    const newCtx = {
      ...ctx2,
      common: {
        ...ctx2.common,
        issues: []
      }
    };
    const result = this._def.innerType._parse({
      data: newCtx.data,
      path: newCtx.path,
      parent: {
        ...newCtx
      }
    });
    if (isAsync(result)) {
      return result.then((result2) => {
        return {
          status: "valid",
          value: result2.status === "valid" ? result2.value : this._def.catchValue({
            get error() {
              return new ZodError(newCtx.common.issues);
            },
            input: newCtx.data
          })
        };
      });
    } else {
      return {
        status: "valid",
        value: result.status === "valid" ? result.value : this._def.catchValue({
          get error() {
            return new ZodError(newCtx.common.issues);
          },
          input: newCtx.data
        })
      };
    }
  }
  removeCatch() {
    return this._def.innerType;
  }
};
ZodCatch.create = (type, params) => {
  return new ZodCatch({
    innerType: type,
    typeName: ZodFirstPartyTypeKind.ZodCatch,
    catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
    ...processCreateParams(params)
  });
};
var ZodNaN = class extends ZodType {
  _parse(input) {
    const parsedType2 = this._getType(input);
    if (parsedType2 !== ZodParsedType.nan) {
      const ctx2 = this._getOrReturnCtx(input);
      addIssueToContext(ctx2, {
        code: ZodIssueCode.invalid_type,
        expected: ZodParsedType.nan,
        received: ctx2.parsedType
      });
      return INVALID;
    }
    return { status: "valid", value: input.data };
  }
};
ZodNaN.create = (params) => {
  return new ZodNaN({
    typeName: ZodFirstPartyTypeKind.ZodNaN,
    ...processCreateParams(params)
  });
};
var ZodBranded = class extends ZodType {
  _parse(input) {
    const { ctx: ctx2 } = this._processInputParams(input);
    const data = ctx2.data;
    return this._def.type._parse({
      data,
      path: ctx2.path,
      parent: ctx2
    });
  }
  unwrap() {
    return this._def.type;
  }
};
var ZodPipeline = class _ZodPipeline extends ZodType {
  _parse(input) {
    const { status, ctx: ctx2 } = this._processInputParams(input);
    if (ctx2.common.async) {
      const handleAsync = async () => {
        const inResult = await this._def.in._parseAsync({
          data: ctx2.data,
          path: ctx2.path,
          parent: ctx2
        });
        if (inResult.status === "aborted")
          return INVALID;
        if (inResult.status === "dirty") {
          status.dirty();
          return DIRTY(inResult.value);
        } else {
          return this._def.out._parseAsync({
            data: inResult.value,
            path: ctx2.path,
            parent: ctx2
          });
        }
      };
      return handleAsync();
    } else {
      const inResult = this._def.in._parseSync({
        data: ctx2.data,
        path: ctx2.path,
        parent: ctx2
      });
      if (inResult.status === "aborted")
        return INVALID;
      if (inResult.status === "dirty") {
        status.dirty();
        return {
          status: "dirty",
          value: inResult.value
        };
      } else {
        return this._def.out._parseSync({
          data: inResult.value,
          path: ctx2.path,
          parent: ctx2
        });
      }
    }
  }
  static create(a, b) {
    return new _ZodPipeline({
      in: a,
      out: b,
      typeName: ZodFirstPartyTypeKind.ZodPipeline
    });
  }
};
var ZodReadonly = class extends ZodType {
  _parse(input) {
    const result = this._def.innerType._parse(input);
    const freeze = (data) => {
      if (isValid(data)) {
        data.value = Object.freeze(data.value);
      }
      return data;
    };
    return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
  }
  unwrap() {
    return this._def.innerType;
  }
};
ZodReadonly.create = (type, params) => {
  return new ZodReadonly({
    innerType: type,
    typeName: ZodFirstPartyTypeKind.ZodReadonly,
    ...processCreateParams(params)
  });
};
var late = {
  object: ZodObject.lazycreate
};
var ZodFirstPartyTypeKind;
(function(ZodFirstPartyTypeKind3) {
  ZodFirstPartyTypeKind3["ZodString"] = "ZodString";
  ZodFirstPartyTypeKind3["ZodNumber"] = "ZodNumber";
  ZodFirstPartyTypeKind3["ZodNaN"] = "ZodNaN";
  ZodFirstPartyTypeKind3["ZodBigInt"] = "ZodBigInt";
  ZodFirstPartyTypeKind3["ZodBoolean"] = "ZodBoolean";
  ZodFirstPartyTypeKind3["ZodDate"] = "ZodDate";
  ZodFirstPartyTypeKind3["ZodSymbol"] = "ZodSymbol";
  ZodFirstPartyTypeKind3["ZodUndefined"] = "ZodUndefined";
  ZodFirstPartyTypeKind3["ZodNull"] = "ZodNull";
  ZodFirstPartyTypeKind3["ZodAny"] = "ZodAny";
  ZodFirstPartyTypeKind3["ZodUnknown"] = "ZodUnknown";
  ZodFirstPartyTypeKind3["ZodNever"] = "ZodNever";
  ZodFirstPartyTypeKind3["ZodVoid"] = "ZodVoid";
  ZodFirstPartyTypeKind3["ZodArray"] = "ZodArray";
  ZodFirstPartyTypeKind3["ZodObject"] = "ZodObject";
  ZodFirstPartyTypeKind3["ZodUnion"] = "ZodUnion";
  ZodFirstPartyTypeKind3["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
  ZodFirstPartyTypeKind3["ZodIntersection"] = "ZodIntersection";
  ZodFirstPartyTypeKind3["ZodTuple"] = "ZodTuple";
  ZodFirstPartyTypeKind3["ZodRecord"] = "ZodRecord";
  ZodFirstPartyTypeKind3["ZodMap"] = "ZodMap";
  ZodFirstPartyTypeKind3["ZodSet"] = "ZodSet";
  ZodFirstPartyTypeKind3["ZodFunction"] = "ZodFunction";
  ZodFirstPartyTypeKind3["ZodLazy"] = "ZodLazy";
  ZodFirstPartyTypeKind3["ZodLiteral"] = "ZodLiteral";
  ZodFirstPartyTypeKind3["ZodEnum"] = "ZodEnum";
  ZodFirstPartyTypeKind3["ZodEffects"] = "ZodEffects";
  ZodFirstPartyTypeKind3["ZodNativeEnum"] = "ZodNativeEnum";
  ZodFirstPartyTypeKind3["ZodOptional"] = "ZodOptional";
  ZodFirstPartyTypeKind3["ZodNullable"] = "ZodNullable";
  ZodFirstPartyTypeKind3["ZodDefault"] = "ZodDefault";
  ZodFirstPartyTypeKind3["ZodCatch"] = "ZodCatch";
  ZodFirstPartyTypeKind3["ZodPromise"] = "ZodPromise";
  ZodFirstPartyTypeKind3["ZodBranded"] = "ZodBranded";
  ZodFirstPartyTypeKind3["ZodPipeline"] = "ZodPipeline";
  ZodFirstPartyTypeKind3["ZodReadonly"] = "ZodReadonly";
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
var stringType = ZodString.create;
var numberType = ZodNumber.create;
var nanType = ZodNaN.create;
var bigIntType = ZodBigInt.create;
var booleanType = ZodBoolean.create;
var dateType = ZodDate.create;
var symbolType = ZodSymbol.create;
var undefinedType = ZodUndefined.create;
var nullType = ZodNull.create;
var anyType = ZodAny.create;
var unknownType = ZodUnknown.create;
var neverType = ZodNever.create;
var voidType = ZodVoid.create;
var arrayType = ZodArray.create;
var objectType = ZodObject.create;
var strictObjectType = ZodObject.strictCreate;
var unionType = ZodUnion.create;
var discriminatedUnionType = ZodDiscriminatedUnion.create;
var intersectionType = ZodIntersection.create;
var tupleType = ZodTuple.create;
var recordType = ZodRecord.create;
var mapType = ZodMap.create;
var setType = ZodSet.create;
var functionType = ZodFunction.create;
var lazyType = ZodLazy.create;
var literalType = ZodLiteral.create;
var enumType = ZodEnum.create;
var nativeEnumType = ZodNativeEnum.create;
var promiseType = ZodPromise.create;
var effectsType = ZodEffects.create;
var optionalType = ZodOptional.create;
var nullableType = ZodNullable.create;
var preprocessType = ZodEffects.createWithPreprocess;
var pipelineType = ZodPipeline.create;

// node_modules/zod/v4/core/index.js
var core_exports2 = {};
__export(core_exports2, {
  $ZodAny: () => $ZodAny,
  $ZodArray: () => $ZodArray,
  $ZodAsyncError: () => $ZodAsyncError,
  $ZodBase64: () => $ZodBase64,
  $ZodBase64URL: () => $ZodBase64URL,
  $ZodBigInt: () => $ZodBigInt,
  $ZodBigIntFormat: () => $ZodBigIntFormat,
  $ZodBoolean: () => $ZodBoolean,
  $ZodCIDRv4: () => $ZodCIDRv4,
  $ZodCIDRv6: () => $ZodCIDRv6,
  $ZodCUID: () => $ZodCUID,
  $ZodCUID2: () => $ZodCUID2,
  $ZodCatch: () => $ZodCatch,
  $ZodCheck: () => $ZodCheck,
  $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
  $ZodCheckEndsWith: () => $ZodCheckEndsWith,
  $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
  $ZodCheckIncludes: () => $ZodCheckIncludes,
  $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
  $ZodCheckLessThan: () => $ZodCheckLessThan,
  $ZodCheckLowerCase: () => $ZodCheckLowerCase,
  $ZodCheckMaxLength: () => $ZodCheckMaxLength,
  $ZodCheckMaxSize: () => $ZodCheckMaxSize,
  $ZodCheckMimeType: () => $ZodCheckMimeType,
  $ZodCheckMinLength: () => $ZodCheckMinLength,
  $ZodCheckMinSize: () => $ZodCheckMinSize,
  $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
  $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
  $ZodCheckOverwrite: () => $ZodCheckOverwrite,
  $ZodCheckProperty: () => $ZodCheckProperty,
  $ZodCheckRegex: () => $ZodCheckRegex,
  $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
  $ZodCheckStartsWith: () => $ZodCheckStartsWith,
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
  $ZodCodec: () => $ZodCodec,
  $ZodCustom: () => $ZodCustom,
  $ZodCustomStringFormat: () => $ZodCustomStringFormat,
  $ZodDate: () => $ZodDate,
  $ZodDefault: () => $ZodDefault,
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
  $ZodE164: () => $ZodE164,
  $ZodEmail: () => $ZodEmail,
  $ZodEmoji: () => $ZodEmoji,
  $ZodEncodeError: () => $ZodEncodeError,
  $ZodEnum: () => $ZodEnum,
  $ZodError: () => $ZodError,
  $ZodExactOptional: () => $ZodExactOptional,
  $ZodFile: () => $ZodFile,
  $ZodFunction: () => $ZodFunction,
  $ZodGUID: () => $ZodGUID,
  $ZodIPv4: () => $ZodIPv4,
  $ZodIPv6: () => $ZodIPv6,
  $ZodISODate: () => $ZodISODate,
  $ZodISODateTime: () => $ZodISODateTime,
  $ZodISODuration: () => $ZodISODuration,
  $ZodISOTime: () => $ZodISOTime,
  $ZodIntersection: () => $ZodIntersection,
  $ZodJWT: () => $ZodJWT,
  $ZodKSUID: () => $ZodKSUID,
  $ZodLazy: () => $ZodLazy,
  $ZodLiteral: () => $ZodLiteral,
  $ZodMAC: () => $ZodMAC,
  $ZodMap: () => $ZodMap,
  $ZodNaN: () => $ZodNaN,
  $ZodNanoID: () => $ZodNanoID,
  $ZodNever: () => $ZodNever,
  $ZodNonOptional: () => $ZodNonOptional,
  $ZodNull: () => $ZodNull,
  $ZodNullable: () => $ZodNullable,
  $ZodNumber: () => $ZodNumber,
  $ZodNumberFormat: () => $ZodNumberFormat,
  $ZodObject: () => $ZodObject,
  $ZodObjectJIT: () => $ZodObjectJIT,
  $ZodOptional: () => $ZodOptional,
  $ZodPipe: () => $ZodPipe,
  $ZodPrefault: () => $ZodPrefault,
  $ZodPreprocess: () => $ZodPreprocess,
  $ZodPromise: () => $ZodPromise,
  $ZodReadonly: () => $ZodReadonly,
  $ZodRealError: () => $ZodRealError,
  $ZodRecord: () => $ZodRecord,
  $ZodRegistry: () => $ZodRegistry,
  $ZodSet: () => $ZodSet,
  $ZodString: () => $ZodString,
  $ZodStringFormat: () => $ZodStringFormat,
  $ZodSuccess: () => $ZodSuccess,
  $ZodSymbol: () => $ZodSymbol,
  $ZodTemplateLiteral: () => $ZodTemplateLiteral,
  $ZodTransform: () => $ZodTransform,
  $ZodTuple: () => $ZodTuple,
  $ZodType: () => $ZodType,
  $ZodULID: () => $ZodULID,
  $ZodURL: () => $ZodURL,
  $ZodUUID: () => $ZodUUID,
  $ZodUndefined: () => $ZodUndefined,
  $ZodUnion: () => $ZodUnion,
  $ZodUnknown: () => $ZodUnknown,
  $ZodVoid: () => $ZodVoid,
  $ZodXID: () => $ZodXID,
  $ZodXor: () => $ZodXor,
  $brand: () => $brand,
  $constructor: () => $constructor,
  $input: () => $input,
  $output: () => $output,
  Doc: () => Doc,
  JSONSchema: () => json_schema_exports,
  JSONSchemaGenerator: () => JSONSchemaGenerator,
  NEVER: () => NEVER,
  TimePrecision: () => TimePrecision,
  _any: () => _any,
  _array: () => _array,
  _base64: () => _base64,
  _base64url: () => _base64url,
  _bigint: () => _bigint,
  _boolean: () => _boolean,
  _catch: () => _catch,
  _check: () => _check,
  _cidrv4: () => _cidrv4,
  _cidrv6: () => _cidrv6,
  _coercedBigint: () => _coercedBigint,
  _coercedBoolean: () => _coercedBoolean,
  _coercedDate: () => _coercedDate,
  _coercedNumber: () => _coercedNumber,
  _coercedString: () => _coercedString,
  _cuid: () => _cuid,
  _cuid2: () => _cuid2,
  _custom: () => _custom,
  _date: () => _date,
  _decode: () => _decode,
  _decodeAsync: () => _decodeAsync,
  _default: () => _default,
  _discriminatedUnion: () => _discriminatedUnion,
  _e164: () => _e164,
  _email: () => _email,
  _emoji: () => _emoji2,
  _encode: () => _encode,
  _encodeAsync: () => _encodeAsync,
  _endsWith: () => _endsWith,
  _enum: () => _enum,
  _file: () => _file,
  _float32: () => _float32,
  _float64: () => _float64,
  _gt: () => _gt,
  _gte: () => _gte,
  _guid: () => _guid,
  _includes: () => _includes,
  _int: () => _int,
  _int32: () => _int32,
  _int64: () => _int64,
  _intersection: () => _intersection,
  _ipv4: () => _ipv4,
  _ipv6: () => _ipv6,
  _isoDate: () => _isoDate,
  _isoDateTime: () => _isoDateTime,
  _isoDuration: () => _isoDuration,
  _isoTime: () => _isoTime,
  _jwt: () => _jwt,
  _ksuid: () => _ksuid,
  _lazy: () => _lazy,
  _length: () => _length,
  _literal: () => _literal,
  _lowercase: () => _lowercase,
  _lt: () => _lt,
  _lte: () => _lte,
  _mac: () => _mac,
  _map: () => _map,
  _max: () => _lte,
  _maxLength: () => _maxLength,
  _maxSize: () => _maxSize,
  _mime: () => _mime,
  _min: () => _gte,
  _minLength: () => _minLength,
  _minSize: () => _minSize,
  _multipleOf: () => _multipleOf,
  _nan: () => _nan,
  _nanoid: () => _nanoid,
  _nativeEnum: () => _nativeEnum,
  _negative: () => _negative,
  _never: () => _never,
  _nonnegative: () => _nonnegative,
  _nonoptional: () => _nonoptional,
  _nonpositive: () => _nonpositive,
  _normalize: () => _normalize,
  _null: () => _null2,
  _nullable: () => _nullable,
  _number: () => _number,
  _optional: () => _optional,
  _overwrite: () => _overwrite,
  _parse: () => _parse,
  _parseAsync: () => _parseAsync,
  _pipe: () => _pipe,
  _positive: () => _positive,
  _promise: () => _promise,
  _property: () => _property,
  _readonly: () => _readonly,
  _record: () => _record,
  _refine: () => _refine,
  _regex: () => _regex,
  _safeDecode: () => _safeDecode,
  _safeDecodeAsync: () => _safeDecodeAsync,
  _safeEncode: () => _safeEncode,
  _safeEncodeAsync: () => _safeEncodeAsync,
  _safeParse: () => _safeParse,
  _safeParseAsync: () => _safeParseAsync,
  _set: () => _set,
  _size: () => _size,
  _slugify: () => _slugify,
  _startsWith: () => _startsWith,
  _string: () => _string,
  _stringFormat: () => _stringFormat,
  _stringbool: () => _stringbool,
  _success: () => _success,
  _superRefine: () => _superRefine,
  _symbol: () => _symbol,
  _templateLiteral: () => _templateLiteral,
  _toLowerCase: () => _toLowerCase,
  _toUpperCase: () => _toUpperCase,
  _transform: () => _transform,
  _trim: () => _trim,
  _tuple: () => _tuple,
  _uint32: () => _uint32,
  _uint64: () => _uint64,
  _ulid: () => _ulid,
  _undefined: () => _undefined2,
  _union: () => _union,
  _unknown: () => _unknown,
  _uppercase: () => _uppercase,
  _url: () => _url,
  _uuid: () => _uuid,
  _uuidv4: () => _uuidv4,
  _uuidv6: () => _uuidv6,
  _uuidv7: () => _uuidv7,
  _void: () => _void,
  _xid: () => _xid,
  _xor: () => _xor,
  clone: () => clone,
  config: () => config,
  createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
  createToJSONSchemaMethod: () => createToJSONSchemaMethod,
  decode: () => decode,
  decodeAsync: () => decodeAsync,
  describe: () => describe,
  encode: () => encode,
  encodeAsync: () => encodeAsync,
  extractDefs: () => extractDefs,
  finalize: () => finalize,
  flattenError: () => flattenError,
  formatError: () => formatError,
  globalConfig: () => globalConfig,
  globalRegistry: () => globalRegistry,
  initializeContext: () => initializeContext,
  isValidBase64: () => isValidBase64,
  isValidBase64URL: () => isValidBase64URL,
  isValidJWT: () => isValidJWT2,
  locales: () => locales_exports,
  meta: () => meta,
  parse: () => parse,
  parseAsync: () => parseAsync,
  prettifyError: () => prettifyError,
  process: () => process2,
  regexes: () => regexes_exports,
  registry: () => registry,
  safeDecode: () => safeDecode,
  safeDecodeAsync: () => safeDecodeAsync,
  safeEncode: () => safeEncode,
  safeEncodeAsync: () => safeEncodeAsync,
  safeParse: () => safeParse,
  safeParseAsync: () => safeParseAsync,
  toDotPath: () => toDotPath,
  toJSONSchema: () => toJSONSchema,
  treeifyError: () => treeifyError,
  util: () => util_exports,
  version: () => version
});

// node_modules/zod/v4/core/core.js
var _a;
var NEVER = /* @__PURE__ */ Object.freeze({
  status: "aborted"
});
// @__NO_SIDE_EFFECTS__
function $constructor(name, initializer3, params) {
  function init(inst, def) {
    if (!inst._zod) {
      Object.defineProperty(inst, "_zod", {
        value: {
          def,
          constr: _,
          traits: /* @__PURE__ */ new Set()
        },
        enumerable: false
      });
    }
    if (inst._zod.traits.has(name)) {
      return;
    }
    inst._zod.traits.add(name);
    initializer3(inst, def);
    const proto = _.prototype;
    const keys = Object.keys(proto);
    for (let i = 0; i < keys.length; i++) {
      const k = keys[i];
      if (!(k in inst)) {
        inst[k] = proto[k].bind(inst);
      }
    }
  }
  const Parent = params?.Parent ?? Object;
  class Definition extends Parent {
  }
  Object.defineProperty(Definition, "name", { value: name });
  function _(def) {
    var _a3;
    const inst = params?.Parent ? new Definition() : this;
    init(inst, def);
    (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
    for (const fn of inst._zod.deferred) {
      fn();
    }
    return inst;
  }
  Object.defineProperty(_, "init", { value: init });
  Object.defineProperty(_, Symbol.hasInstance, {
    value: (inst) => {
      if (params?.Parent && inst instanceof params.Parent)
        return true;
      return inst?._zod?.traits?.has(name);
    }
  });
  Object.defineProperty(_, "name", { value: name });
  return _;
}
var $brand = /* @__PURE__ */ Symbol("zod_brand");
var $ZodAsyncError = class extends Error {
  constructor() {
    super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
  }
};
var $ZodEncodeError = class extends Error {
  constructor(name) {
    super(`Encountered unidirectional transform during encode: ${name}`);
    this.name = "ZodEncodeError";
  }
};
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
var globalConfig = globalThis.__zod_globalConfig;
function config(newConfig) {
  if (newConfig)
    Object.assign(globalConfig, newConfig);
  return globalConfig;
}

// node_modules/zod/v4/core/util.js
var util_exports = {};
__export(util_exports, {
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
  Class: () => Class,
  NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
  aborted: () => aborted,
  allowsEval: () => allowsEval,
  assert: () => assert,
  assertEqual: () => assertEqual,
  assertIs: () => assertIs,
  assertNever: () => assertNever,
  assertNotEqual: () => assertNotEqual,
  assignProp: () => assignProp,
  base64ToUint8Array: () => base64ToUint8Array,
  base64urlToUint8Array: () => base64urlToUint8Array,
  cached: () => cached,
  captureStackTrace: () => captureStackTrace,
  cleanEnum: () => cleanEnum,
  cleanRegex: () => cleanRegex,
  clone: () => clone,
  cloneDef: () => cloneDef,
  createTransparentProxy: () => createTransparentProxy,
  defineLazy: () => defineLazy,
  esc: () => esc,
  escapeRegex: () => escapeRegex,
  explicitlyAborted: () => explicitlyAborted,
  extend: () => extend,
  finalizeIssue: () => finalizeIssue,
  floatSafeRemainder: () => floatSafeRemainder2,
  getElementAtPath: () => getElementAtPath,
  getEnumValues: () => getEnumValues,
  getLengthableOrigin: () => getLengthableOrigin,
  getParsedType: () => getParsedType2,
  getSizableOrigin: () => getSizableOrigin,
  hexToUint8Array: () => hexToUint8Array,
  isObject: () => isObject,
  isPlainObject: () => isPlainObject,
  issue: () => issue,
  joinValues: () => joinValues,
  jsonStringifyReplacer: () => jsonStringifyReplacer,
  merge: () => merge,
  mergeDefs: () => mergeDefs,
  normalizeParams: () => normalizeParams,
  nullish: () => nullish,
  numKeys: () => numKeys,
  objectClone: () => objectClone,
  omit: () => omit,
  optionalKeys: () => optionalKeys,
  parsedType: () => parsedType,
  partial: () => partial,
  pick: () => pick,
  prefixIssues: () => prefixIssues,
  primitiveTypes: () => primitiveTypes,
  promiseAllObject: () => promiseAllObject,
  propertyKeyTypes: () => propertyKeyTypes,
  randomString: () => randomString,
  required: () => required,
  safeExtend: () => safeExtend,
  shallowClone: () => shallowClone,
  slugify: () => slugify,
  stringifyPrimitive: () => stringifyPrimitive,
  uint8ArrayToBase64: () => uint8ArrayToBase64,
  uint8ArrayToBase64url: () => uint8ArrayToBase64url,
  uint8ArrayToHex: () => uint8ArrayToHex,
  unwrapMessage: () => unwrapMessage
});
function assertEqual(val) {
  return val;
}
function assertNotEqual(val) {
  return val;
}
function assertIs(_arg) {
}
function assertNever(_x) {
  throw new Error("Unexpected value in exhaustive check");
}
function assert(_) {
}
function getEnumValues(entries) {
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
  const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
  return values;
}
function joinValues(array2, separator = "|") {
  return array2.map((val) => stringifyPrimitive(val)).join(separator);
}
function jsonStringifyReplacer(_, value) {
  if (typeof value === "bigint")
    return value.toString();
  return value;
}
function cached(getter) {
  const set2 = false;
  return {
    get value() {
      if (!set2) {
        const value = getter();
        Object.defineProperty(this, "value", { value });
        return value;
      }
      throw new Error("cached value already set");
    }
  };
}
function nullish(input) {
  return input === null || input === void 0;
}
function cleanRegex(source) {
  const start = source.startsWith("^") ? 1 : 0;
  const end = source.endsWith("$") ? source.length - 1 : source.length;
  return source.slice(start, end);
}
function floatSafeRemainder2(val, step) {
  const ratio = val / step;
  const roundedRatio = Math.round(ratio);
  const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
  if (Math.abs(ratio - roundedRatio) < tolerance)
    return 0;
  return ratio - roundedRatio;
}
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
function defineLazy(object3, key, getter) {
  let value = void 0;
  Object.defineProperty(object3, key, {
    get() {
      if (value === EVALUATING) {
        return void 0;
      }
      if (value === void 0) {
        value = EVALUATING;
        value = getter();
      }
      return value;
    },
    set(v) {
      Object.defineProperty(object3, key, {
        value: v
        // configurable: true,
      });
    },
    configurable: true
  });
}
function objectClone(obj) {
  return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
}
function assignProp(target, prop, value) {
  Object.defineProperty(target, prop, {
    value,
    writable: true,
    enumerable: true,
    configurable: true
  });
}
function mergeDefs(...defs) {
  const mergedDescriptors = {};
  for (const def of defs) {
    const descriptors = Object.getOwnPropertyDescriptors(def);
    Object.assign(mergedDescriptors, descriptors);
  }
  return Object.defineProperties({}, mergedDescriptors);
}
function cloneDef(schema) {
  return mergeDefs(schema._zod.def);
}
function getElementAtPath(obj, path) {
  if (!path)
    return obj;
  return path.reduce((acc, key) => acc?.[key], obj);
}
function promiseAllObject(promisesObj) {
  const keys = Object.keys(promisesObj);
  const promises = keys.map((key) => promisesObj[key]);
  return Promise.all(promises).then((results) => {
    const resolvedObj = {};
    for (let i = 0; i < keys.length; i++) {
      resolvedObj[keys[i]] = results[i];
    }
    return resolvedObj;
  });
}
function randomString(length = 10) {
  const chars = "abcdefghijklmnopqrstuvwxyz";
  let str = "";
  for (let i = 0; i < length; i++) {
    str += chars[Math.floor(Math.random() * chars.length)];
  }
  return str;
}
function esc(str) {
  return JSON.stringify(str);
}
function slugify(input) {
  return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
}
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
};
function isObject(data) {
  return typeof data === "object" && data !== null && !Array.isArray(data);
}
var allowsEval = /* @__PURE__ */ cached(() => {
  if (globalConfig.jitless) {
    return false;
  }
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
    return false;
  }
  try {
    const F = Function;
    new F("");
    return true;
  } catch (_) {
    return false;
  }
});
function isPlainObject(o) {
  if (isObject(o) === false)
    return false;
  const ctor = o.constructor;
  if (ctor === void 0)
    return true;
  if (typeof ctor !== "function")
    return true;
  const prot = ctor.prototype;
  if (isObject(prot) === false)
    return false;
  if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
    return false;
  }
  return true;
}
function shallowClone(o) {
  if (isPlainObject(o))
    return { ...o };
  if (Array.isArray(o))
    return [...o];
  if (o instanceof Map)
    return new Map(o);
  if (o instanceof Set)
    return new Set(o);
  return o;
}
function numKeys(data) {
  let keyCount = 0;
  for (const key in data) {
    if (Object.prototype.hasOwnProperty.call(data, key)) {
      keyCount++;
    }
  }
  return keyCount;
}
var getParsedType2 = (data) => {
  const t = typeof data;
  switch (t) {
    case "undefined":
      return "undefined";
    case "string":
      return "string";
    case "number":
      return Number.isNaN(data) ? "nan" : "number";
    case "boolean":
      return "boolean";
    case "function":
      return "function";
    case "bigint":
      return "bigint";
    case "symbol":
      return "symbol";
    case "object":
      if (Array.isArray(data)) {
        return "array";
      }
      if (data === null) {
        return "null";
      }
      if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
        return "promise";
      }
      if (typeof Map !== "undefined" && data instanceof Map) {
        return "map";
      }
      if (typeof Set !== "undefined" && data instanceof Set) {
        return "set";
      }
      if (typeof Date !== "undefined" && data instanceof Date) {
        return "date";
      }
      if (typeof File !== "undefined" && data instanceof File) {
        return "file";
      }
      return "object";
    default:
      throw new Error(`Unknown data type: ${t}`);
  }
};
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
var primitiveTypes = /* @__PURE__ */ new Set([
  "string",
  "number",
  "bigint",
  "boolean",
  "symbol",
  "undefined"
]);
function escapeRegex(str) {
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function clone(inst, def, params) {
  const cl = new inst._zod.constr(def ?? inst._zod.def);
  if (!def || params?.parent)
    cl._zod.parent = inst;
  return cl;
}
function normalizeParams(_params) {
  const params = _params;
  if (!params)
    return {};
  if (typeof params === "string")
    return { error: () => params };
  if (params?.message !== void 0) {
    if (params?.error !== void 0)
      throw new Error("Cannot specify both `message` and `error` params");
    params.error = params.message;
  }
  delete params.message;
  if (typeof params.error === "string")
    return { ...params, error: () => params.error };
  return params;
}
function createTransparentProxy(getter) {
  let target;
  return new Proxy({}, {
    get(_, prop, receiver) {
      target ?? (target = getter());
      return Reflect.get(target, prop, receiver);
    },
    set(_, prop, value, receiver) {
      target ?? (target = getter());
      return Reflect.set(target, prop, value, receiver);
    },
    has(_, prop) {
      target ?? (target = getter());
      return Reflect.has(target, prop);
    },
    deleteProperty(_, prop) {
      target ?? (target = getter());
      return Reflect.deleteProperty(target, prop);
    },
    ownKeys(_) {
      target ?? (target = getter());
      return Reflect.ownKeys(target);
    },
    getOwnPropertyDescriptor(_, prop) {
      target ?? (target = getter());
      return Reflect.getOwnPropertyDescriptor(target, prop);
    },
    defineProperty(_, prop, descriptor) {
      target ?? (target = getter());
      return Reflect.defineProperty(target, prop, descriptor);
    }
  });
}
function stringifyPrimitive(value) {
  if (typeof value === "bigint")
    return value.toString() + "n";
  if (typeof value === "string")
    return `"${value}"`;
  return `${value}`;
}
function optionalKeys(shape) {
  return Object.keys(shape).filter((k) => {
    return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
  });
}
var NUMBER_FORMAT_RANGES = {
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
  int32: [-2147483648, 2147483647],
  uint32: [0, 4294967295],
  float32: [-34028234663852886e22, 34028234663852886e22],
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
};
var BIGINT_FORMAT_RANGES = {
  int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
  uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
};
function pick(schema, mask) {
  const currDef = schema._zod.def;
  const checks = currDef.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    throw new Error(".pick() cannot be used on object schemas containing refinements");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const newShape = {};
      for (const key in mask) {
        if (!(key in currDef.shape)) {
          throw new Error(`Unrecognized key: "${key}"`);
        }
        if (!mask[key])
          continue;
        newShape[key] = currDef.shape[key];
      }
      assignProp(this, "shape", newShape);
      return newShape;
    },
    checks: []
  });
  return clone(schema, def);
}
function omit(schema, mask) {
  const currDef = schema._zod.def;
  const checks = currDef.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    throw new Error(".omit() cannot be used on object schemas containing refinements");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const newShape = { ...schema._zod.def.shape };
      for (const key in mask) {
        if (!(key in currDef.shape)) {
          throw new Error(`Unrecognized key: "${key}"`);
        }
        if (!mask[key])
          continue;
        delete newShape[key];
      }
      assignProp(this, "shape", newShape);
      return newShape;
    },
    checks: []
  });
  return clone(schema, def);
}
function extend(schema, shape) {
  if (!isPlainObject(shape)) {
    throw new Error("Invalid input to extend: expected a plain object");
  }
  const checks = schema._zod.def.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    const existingShape = schema._zod.def.shape;
    for (const key in shape) {
      if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) {
        throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
      }
    }
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const _shape = { ...schema._zod.def.shape, ...shape };
      assignProp(this, "shape", _shape);
      return _shape;
    }
  });
  return clone(schema, def);
}
function safeExtend(schema, shape) {
  if (!isPlainObject(shape)) {
    throw new Error("Invalid input to safeExtend: expected a plain object");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const _shape = { ...schema._zod.def.shape, ...shape };
      assignProp(this, "shape", _shape);
      return _shape;
    }
  });
  return clone(schema, def);
}
function merge(a, b) {
  if (a._zod.def.checks?.length) {
    throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
  }
  const def = mergeDefs(a._zod.def, {
    get shape() {
      const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
      assignProp(this, "shape", _shape);
      return _shape;
    },
    get catchall() {
      return b._zod.def.catchall;
    },
    checks: b._zod.def.checks ?? []
  });
  return clone(a, def);
}
function partial(Class2, schema, mask) {
  const currDef = schema._zod.def;
  const checks = currDef.checks;
  const hasChecks = checks && checks.length > 0;
  if (hasChecks) {
    throw new Error(".partial() cannot be used on object schemas containing refinements");
  }
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const oldShape = schema._zod.def.shape;
      const shape = { ...oldShape };
      if (mask) {
        for (const key in mask) {
          if (!(key in oldShape)) {
            throw new Error(`Unrecognized key: "${key}"`);
          }
          if (!mask[key])
            continue;
          shape[key] = Class2 ? new Class2({
            type: "optional",
            innerType: oldShape[key]
          }) : oldShape[key];
        }
      } else {
        for (const key in oldShape) {
          shape[key] = Class2 ? new Class2({
            type: "optional",
            innerType: oldShape[key]
          }) : oldShape[key];
        }
      }
      assignProp(this, "shape", shape);
      return shape;
    },
    checks: []
  });
  return clone(schema, def);
}
function required(Class2, schema, mask) {
  const def = mergeDefs(schema._zod.def, {
    get shape() {
      const oldShape = schema._zod.def.shape;
      const shape = { ...oldShape };
      if (mask) {
        for (const key in mask) {
          if (!(key in shape)) {
            throw new Error(`Unrecognized key: "${key}"`);
          }
          if (!mask[key])
            continue;
          shape[key] = new Class2({
            type: "nonoptional",
            innerType: oldShape[key]
          });
        }
      } else {
        for (const key in oldShape) {
          shape[key] = new Class2({
            type: "nonoptional",
            innerType: oldShape[key]
          });
        }
      }
      assignProp(this, "shape", shape);
      return shape;
    }
  });
  return clone(schema, def);
}
function aborted(x, startIndex = 0) {
  if (x.aborted === true)
    return true;
  for (let i = startIndex; i < x.issues.length; i++) {
    if (x.issues[i]?.continue !== true) {
      return true;
    }
  }
  return false;
}
function explicitlyAborted(x, startIndex = 0) {
  if (x.aborted === true)
    return true;
  for (let i = startIndex; i < x.issues.length; i++) {
    if (x.issues[i]?.continue === false) {
      return true;
    }
  }
  return false;
}
function prefixIssues(path, issues) {
  return issues.map((iss) => {
    var _a3;
    (_a3 = iss).path ?? (_a3.path = []);
    iss.path.unshift(path);
    return iss;
  });
}
function unwrapMessage(message) {
  return typeof message === "string" ? message : message?.message;
}
function finalizeIssue(iss, ctx2, config2) {
  const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx2?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
  const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
  rest.path ?? (rest.path = []);
  rest.message = message;
  if (ctx2?.reportInput) {
    rest.input = _input;
  }
  return rest;
}
function getSizableOrigin(input) {
  if (input instanceof Set)
    return "set";
  if (input instanceof Map)
    return "map";
  if (input instanceof File)
    return "file";
  return "unknown";
}
function getLengthableOrigin(input) {
  if (Array.isArray(input))
    return "array";
  if (typeof input === "string")
    return "string";
  return "unknown";
}
function parsedType(data) {
  const t = typeof data;
  switch (t) {
    case "number": {
      return Number.isNaN(data) ? "nan" : "number";
    }
    case "object": {
      if (data === null) {
        return "null";
      }
      if (Array.isArray(data)) {
        return "array";
      }
      const obj = data;
      if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) {
        return obj.constructor.name;
      }
    }
  }
  return t;
}
function issue(...args) {
  const [iss, input, inst] = args;
  if (typeof iss === "string") {
    return {
      message: iss,
      code: "custom",
      input,
      inst
    };
  }
  return { ...iss };
}
function cleanEnum(obj) {
  return Object.entries(obj).filter(([k, _]) => {
    return Number.isNaN(Number.parseInt(k, 10));
  }).map((el) => el[1]);
}
function base64ToUint8Array(base643) {
  const binaryString = atob(base643);
  const bytes = new Uint8Array(binaryString.length);
  for (let i = 0; i < binaryString.length; i++) {
    bytes[i] = binaryString.charCodeAt(i);
  }
  return bytes;
}
function uint8ArrayToBase64(bytes) {
  let binaryString = "";
  for (let i = 0; i < bytes.length; i++) {
    binaryString += String.fromCharCode(bytes[i]);
  }
  return btoa(binaryString);
}
function base64urlToUint8Array(base64url3) {
  const base643 = base64url3.replace(/-/g, "+").replace(/_/g, "/");
  const padding = "=".repeat((4 - base643.length % 4) % 4);
  return base64ToUint8Array(base643 + padding);
}
function uint8ArrayToBase64url(bytes) {
  return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
}
function hexToUint8Array(hex3) {
  const cleanHex = hex3.replace(/^0x/, "");
  if (cleanHex.length % 2 !== 0) {
    throw new Error("Invalid hex string length");
  }
  const bytes = new Uint8Array(cleanHex.length / 2);
  for (let i = 0; i < cleanHex.length; i += 2) {
    bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);
  }
  return bytes;
}
function uint8ArrayToHex(bytes) {
  return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
}
var Class = class {
  constructor(..._args) {
  }
};

// node_modules/zod/v4/core/errors.js
var initializer = (inst, def) => {
  inst.name = "$ZodError";
  Object.defineProperty(inst, "_zod", {
    value: inst._zod,
    enumerable: false
  });
  Object.defineProperty(inst, "issues", {
    value: def,
    enumerable: false
  });
  inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
  Object.defineProperty(inst, "toString", {
    value: () => inst.message,
    enumerable: false
  });
};
var $ZodError = $constructor("$ZodError", initializer);
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
function flattenError(error51, mapper = (issue2) => issue2.message) {
  const fieldErrors = {};
  const formErrors = [];
  for (const sub of error51.issues) {
    if (sub.path.length > 0) {
      fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
      fieldErrors[sub.path[0]].push(mapper(sub));
    } else {
      formErrors.push(mapper(sub));
    }
  }
  return { formErrors, fieldErrors };
}
function formatError(error51, mapper = (issue2) => issue2.message) {
  const fieldErrors = { _errors: [] };
  const processError = (error52, path = []) => {
    for (const issue2 of error52.issues) {
      if (issue2.code === "invalid_union" && issue2.errors.length) {
        issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
      } else if (issue2.code === "invalid_key") {
        processError({ issues: issue2.issues }, [...path, ...issue2.path]);
      } else if (issue2.code === "invalid_element") {
        processError({ issues: issue2.issues }, [...path, ...issue2.path]);
      } else {
        const fullpath = [...path, ...issue2.path];
        if (fullpath.length === 0) {
          fieldErrors._errors.push(mapper(issue2));
        } else {
          let curr = fieldErrors;
          let i = 0;
          while (i < fullpath.length) {
            const el = fullpath[i];
            const terminal = i === fullpath.length - 1;
            if (!terminal) {
              curr[el] = curr[el] || { _errors: [] };
            } else {
              curr[el] = curr[el] || { _errors: [] };
              curr[el]._errors.push(mapper(issue2));
            }
            curr = curr[el];
            i++;
          }
        }
      }
    }
  };
  processError(error51);
  return fieldErrors;
}
function treeifyError(error51, mapper = (issue2) => issue2.message) {
  const result = { errors: [] };
  const processError = (error52, path = []) => {
    var _a3, _b;
    for (const issue2 of error52.issues) {
      if (issue2.code === "invalid_union" && issue2.errors.length) {
        issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
      } else if (issue2.code === "invalid_key") {
        processError({ issues: issue2.issues }, [...path, ...issue2.path]);
      } else if (issue2.code === "invalid_element") {
        processError({ issues: issue2.issues }, [...path, ...issue2.path]);
      } else {
        const fullpath = [...path, ...issue2.path];
        if (fullpath.length === 0) {
          result.errors.push(mapper(issue2));
          continue;
        }
        let curr = result;
        let i = 0;
        while (i < fullpath.length) {
          const el = fullpath[i];
          const terminal = i === fullpath.length - 1;
          if (typeof el === "string") {
            curr.properties ?? (curr.properties = {});
            (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
            curr = curr.properties[el];
          } else {
            curr.items ?? (curr.items = []);
            (_b = curr.items)[el] ?? (_b[el] = { errors: [] });
            curr = curr.items[el];
          }
          if (terminal) {
            curr.errors.push(mapper(issue2));
          }
          i++;
        }
      }
    }
  };
  processError(error51);
  return result;
}
function toDotPath(_path) {
  const segs = [];
  const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
  for (const seg of path) {
    if (typeof seg === "number")
      segs.push(`[${seg}]`);
    else if (typeof seg === "symbol")
      segs.push(`[${JSON.stringify(String(seg))}]`);
    else if (/[^\w$]/.test(seg))
      segs.push(`[${JSON.stringify(seg)}]`);
    else {
      if (segs.length)
        segs.push(".");
      segs.push(seg);
    }
  }
  return segs.join("");
}
function prettifyError(error51) {
  const lines = [];
  const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
  for (const issue2 of issues) {
    lines.push(`\u2716 ${issue2.message}`);
    if (issue2.path?.length)
      lines.push(`  \u2192 at ${toDotPath(issue2.path)}`);
  }
  return lines.join("\n");
}

// node_modules/zod/v4/core/parse.js
var _parse = (_Err) => (schema, value, _ctx, _params) => {
  const ctx2 = _ctx ? { ..._ctx, async: false } : { async: false };
  const result = schema._zod.run({ value, issues: [] }, ctx2);
  if (result instanceof Promise) {
    throw new $ZodAsyncError();
  }
  if (result.issues.length) {
    const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx2, config())));
    captureStackTrace(e, _params?.callee);
    throw e;
  }
  return result.value;
};
var parse = /* @__PURE__ */ _parse($ZodRealError);
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
  const ctx2 = _ctx ? { ..._ctx, async: true } : { async: true };
  let result = schema._zod.run({ value, issues: [] }, ctx2);
  if (result instanceof Promise)
    result = await result;
  if (result.issues.length) {
    const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx2, config())));
    captureStackTrace(e, params?.callee);
    throw e;
  }
  return result.value;
};
var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
var _safeParse = (_Err) => (schema, value, _ctx) => {
  const ctx2 = _ctx ? { ..._ctx, async: false } : { async: false };
  const result = schema._zod.run({ value, issues: [] }, ctx2);
  if (result instanceof Promise) {
    throw new $ZodAsyncError();
  }
  return result.issues.length ? {
    success: false,
    error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx2, config())))
  } : { success: true, data: result.value };
};
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
  const ctx2 = _ctx ? { ..._ctx, async: true } : { async: true };
  let result = schema._zod.run({ value, issues: [] }, ctx2);
  if (result instanceof Promise)
    result = await result;
  return result.issues.length ? {
    success: false,
    error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx2, config())))
  } : { success: true, data: result.value };
};
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
var _encode = (_Err) => (schema, value, _ctx) => {
  const ctx2 = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
  return _parse(_Err)(schema, value, ctx2);
};
var encode = /* @__PURE__ */ _encode($ZodRealError);
var _decode = (_Err) => (schema, value, _ctx) => {
  return _parse(_Err)(schema, value, _ctx);
};
var decode = /* @__PURE__ */ _decode($ZodRealError);
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
  const ctx2 = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
  return _parseAsync(_Err)(schema, value, ctx2);
};
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
  return _parseAsync(_Err)(schema, value, _ctx);
};
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
var _safeEncode = (_Err) => (schema, value, _ctx) => {
  const ctx2 = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
  return _safeParse(_Err)(schema, value, ctx2);
};
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
var _safeDecode = (_Err) => (schema, value, _ctx) => {
  return _safeParse(_Err)(schema, value, _ctx);
};
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
  const ctx2 = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
  return _safeParseAsync(_Err)(schema, value, ctx2);
};
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
  return _safeParseAsync(_Err)(schema, value, _ctx);
};
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);

// node_modules/zod/v4/core/regexes.js
var regexes_exports = {};
__export(regexes_exports, {
  base64: () => base64,
  base64url: () => base64url,
  bigint: () => bigint,
  boolean: () => boolean,
  browserEmail: () => browserEmail,
  cidrv4: () => cidrv4,
  cidrv6: () => cidrv6,
  cuid: () => cuid,
  cuid2: () => cuid2,
  date: () => date,
  datetime: () => datetime,
  domain: () => domain,
  duration: () => duration,
  e164: () => e164,
  email: () => email,
  emoji: () => emoji,
  extendedDuration: () => extendedDuration,
  guid: () => guid,
  hex: () => hex,
  hostname: () => hostname,
  html5Email: () => html5Email,
  httpProtocol: () => httpProtocol,
  idnEmail: () => idnEmail,
  integer: () => integer,
  ipv4: () => ipv4,
  ipv6: () => ipv6,
  ksuid: () => ksuid,
  lowercase: () => lowercase,
  mac: () => mac,
  md5_base64: () => md5_base64,
  md5_base64url: () => md5_base64url,
  md5_hex: () => md5_hex,
  nanoid: () => nanoid,
  null: () => _null,
  number: () => number,
  rfc5322Email: () => rfc5322Email,
  sha1_base64: () => sha1_base64,
  sha1_base64url: () => sha1_base64url,
  sha1_hex: () => sha1_hex,
  sha256_base64: () => sha256_base64,
  sha256_base64url: () => sha256_base64url,
  sha256_hex: () => sha256_hex,
  sha384_base64: () => sha384_base64,
  sha384_base64url: () => sha384_base64url,
  sha384_hex: () => sha384_hex,
  sha512_base64: () => sha512_base64,
  sha512_base64url: () => sha512_base64url,
  sha512_hex: () => sha512_hex,
  string: () => string,
  time: () => time,
  ulid: () => ulid,
  undefined: () => _undefined,
  unicodeEmail: () => unicodeEmail,
  uppercase: () => uppercase,
  uuid: () => uuid,
  uuid4: () => uuid4,
  uuid6: () => uuid6,
  uuid7: () => uuid7,
  xid: () => xid
});
var cuid = /^[cC][0-9a-z]{6,}$/;
var cuid2 = /^[0-9a-z]+$/;
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
var xid = /^[0-9a-vA-V]{20}$/;
var ksuid = /^[A-Za-z0-9]{27}$/;
var nanoid = /^[a-zA-Z0-9_-]{21}$/;
var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
var uuid = (version2) => {
  if (!version2)
    return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
  return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
};
var uuid4 = /* @__PURE__ */ uuid(4);
var uuid6 = /* @__PURE__ */ uuid(6);
var uuid7 = /* @__PURE__ */ uuid(7);
var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
var idnEmail = unicodeEmail;
var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
function emoji() {
  return new RegExp(_emoji, "u");
}
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
var mac = (delimiter) => {
  const escapedDelim = escapeRegex(delimiter ?? ":");
  return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
};
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
var base64url = /^[A-Za-z0-9_-]*$/;
var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
var httpProtocol = /^https?$/;
var e164 = /^\+[1-9]\d{6,14}$/;
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
function timeSource(args) {
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
  const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
  return regex;
}
function time(args) {
  return new RegExp(`^${timeSource(args)}$`);
}
function datetime(args) {
  const time3 = timeSource({ precision: args.precision });
  const opts = ["Z"];
  if (args.local)
    opts.push("");
  if (args.offset)
    opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
  const timeRegex2 = `${time3}(?:${opts.join("|")})`;
  return new RegExp(`^${dateSource}T(?:${timeRegex2})$`);
}
var string = (params) => {
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
  return new RegExp(`^${regex}$`);
};
var bigint = /^-?\d+n?$/;
var integer = /^-?\d+$/;
var number = /^-?\d+(?:\.\d+)?$/;
var boolean = /^(?:true|false)$/i;
var _null = /^null$/i;
var _undefined = /^undefined$/i;
var lowercase = /^[^A-Z]*$/;
var uppercase = /^[^a-z]*$/;
var hex = /^[0-9a-fA-F]*$/;
function fixedBase64(bodyLength, padding) {
  return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);
}
function fixedBase64url(length) {
  return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
}
var md5_hex = /^[0-9a-fA-F]{32}$/;
var md5_base64 = /* @__PURE__ */ fixedBase64(22, "==");
var md5_base64url = /* @__PURE__ */ fixedBase64url(22);
var sha1_hex = /^[0-9a-fA-F]{40}$/;
var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "=");
var sha1_base64url = /* @__PURE__ */ fixedBase64url(27);
var sha256_hex = /^[0-9a-fA-F]{64}$/;
var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "=");
var sha256_base64url = /* @__PURE__ */ fixedBase64url(43);
var sha384_hex = /^[0-9a-fA-F]{96}$/;
var sha384_base64 = /* @__PURE__ */ fixedBase64(64, "");
var sha384_base64url = /* @__PURE__ */ fixedBase64url(64);
var sha512_hex = /^[0-9a-fA-F]{128}$/;
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);

// node_modules/zod/v4/core/checks.js
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
  var _a3;
  inst._zod ?? (inst._zod = {});
  inst._zod.def = def;
  (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
});
var numericOriginMap = {
  number: "number",
  bigint: "bigint",
  object: "date"
};
var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
  $ZodCheck.init(inst, def);
  const origin = numericOriginMap[typeof def.value];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
    if (def.value < curr) {
      if (def.inclusive)
        bag.maximum = def.value;
      else
        bag.exclusiveMaximum = def.value;
    }
  });
  inst._zod.check = (payload) => {
    if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
      return;
    }
    payload.issues.push({
      origin,
      code: "too_big",
      maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
      input: payload.value,
      inclusive: def.inclusive,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
  $ZodCheck.init(inst, def);
  const origin = numericOriginMap[typeof def.value];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
    if (def.value > curr) {
      if (def.inclusive)
        bag.minimum = def.value;
      else
        bag.exclusiveMinimum = def.value;
    }
  });
  inst._zod.check = (payload) => {
    if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
      return;
    }
    payload.issues.push({
      origin,
      code: "too_small",
      minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
      input: payload.value,
      inclusive: def.inclusive,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
  $ZodCheck.init(inst, def);
  inst._zod.onattach.push((inst2) => {
    var _a3;
    (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
  });
  inst._zod.check = (payload) => {
    if (typeof payload.value !== typeof def.value)
      throw new Error("Cannot mix number and bigint in multiple_of check.");
    const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder2(payload.value, def.value) === 0;
    if (isMultiple)
      return;
    payload.issues.push({
      origin: typeof payload.value,
      code: "not_multiple_of",
      divisor: def.value,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
  $ZodCheck.init(inst, def);
  def.format = def.format || "float64";
  const isInt = def.format?.includes("int");
  const origin = isInt ? "int" : "number";
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.format = def.format;
    bag.minimum = minimum;
    bag.maximum = maximum;
    if (isInt)
      bag.pattern = integer;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    if (isInt) {
      if (!Number.isInteger(input)) {
        payload.issues.push({
          expected: origin,
          format: def.format,
          code: "invalid_type",
          continue: false,
          input,
          inst
        });
        return;
      }
      if (!Number.isSafeInteger(input)) {
        if (input > 0) {
          payload.issues.push({
            input,
            code: "too_big",
            maximum: Number.MAX_SAFE_INTEGER,
            note: "Integers must be within the safe integer range.",
            inst,
            origin,
            inclusive: true,
            continue: !def.abort
          });
        } else {
          payload.issues.push({
            input,
            code: "too_small",
            minimum: Number.MIN_SAFE_INTEGER,
            note: "Integers must be within the safe integer range.",
            inst,
            origin,
            inclusive: true,
            continue: !def.abort
          });
        }
        return;
      }
    }
    if (input < minimum) {
      payload.issues.push({
        origin: "number",
        input,
        code: "too_small",
        minimum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
    if (input > maximum) {
      payload.issues.push({
        origin: "number",
        input,
        code: "too_big",
        maximum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
  $ZodCheck.init(inst, def);
  const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.format = def.format;
    bag.minimum = minimum;
    bag.maximum = maximum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    if (input < minimum) {
      payload.issues.push({
        origin: "bigint",
        input,
        code: "too_small",
        minimum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
    if (input > maximum) {
      payload.issues.push({
        origin: "bigint",
        input,
        code: "too_big",
        maximum,
        inclusive: true,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
  var _a3;
  $ZodCheck.init(inst, def);
  (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.size !== void 0;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
    if (def.maximum < curr)
      inst2._zod.bag.maximum = def.maximum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const size = input.size;
    if (size <= def.maximum)
      return;
    payload.issues.push({
      origin: getSizableOrigin(input),
      code: "too_big",
      maximum: def.maximum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
  var _a3;
  $ZodCheck.init(inst, def);
  (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.size !== void 0;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
    if (def.minimum > curr)
      inst2._zod.bag.minimum = def.minimum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const size = input.size;
    if (size >= def.minimum)
      return;
    payload.issues.push({
      origin: getSizableOrigin(input),
      code: "too_small",
      minimum: def.minimum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
  var _a3;
  $ZodCheck.init(inst, def);
  (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.size !== void 0;
  });
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.minimum = def.size;
    bag.maximum = def.size;
    bag.size = def.size;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const size = input.size;
    if (size === def.size)
      return;
    const tooBig = size > def.size;
    payload.issues.push({
      origin: getSizableOrigin(input),
      ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
      inclusive: true,
      exact: true,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
  var _a3;
  $ZodCheck.init(inst, def);
  (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.length !== void 0;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
    if (def.maximum < curr)
      inst2._zod.bag.maximum = def.maximum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const length = input.length;
    if (length <= def.maximum)
      return;
    const origin = getLengthableOrigin(input);
    payload.issues.push({
      origin,
      code: "too_big",
      maximum: def.maximum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
  var _a3;
  $ZodCheck.init(inst, def);
  (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.length !== void 0;
  });
  inst._zod.onattach.push((inst2) => {
    const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
    if (def.minimum > curr)
      inst2._zod.bag.minimum = def.minimum;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const length = input.length;
    if (length >= def.minimum)
      return;
    const origin = getLengthableOrigin(input);
    payload.issues.push({
      origin,
      code: "too_small",
      minimum: def.minimum,
      inclusive: true,
      input,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
  var _a3;
  $ZodCheck.init(inst, def);
  (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
    const val = payload.value;
    return !nullish(val) && val.length !== void 0;
  });
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.minimum = def.length;
    bag.maximum = def.length;
    bag.length = def.length;
  });
  inst._zod.check = (payload) => {
    const input = payload.value;
    const length = input.length;
    if (length === def.length)
      return;
    const origin = getLengthableOrigin(input);
    const tooBig = length > def.length;
    payload.issues.push({
      origin,
      ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
      inclusive: true,
      exact: true,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
  var _a3, _b;
  $ZodCheck.init(inst, def);
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.format = def.format;
    if (def.pattern) {
      bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
      bag.patterns.add(def.pattern);
    }
  });
  if (def.pattern)
    (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
      def.pattern.lastIndex = 0;
      if (def.pattern.test(payload.value))
        return;
      payload.issues.push({
        origin: "string",
        code: "invalid_format",
        format: def.format,
        input: payload.value,
        ...def.pattern ? { pattern: def.pattern.toString() } : {},
        inst,
        continue: !def.abort
      });
    });
  else
    (_b = inst._zod).check ?? (_b.check = () => {
    });
});
var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
  $ZodCheckStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    def.pattern.lastIndex = 0;
    if (def.pattern.test(payload.value))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "regex",
      input: payload.value,
      pattern: def.pattern.toString(),
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
  def.pattern ?? (def.pattern = lowercase);
  $ZodCheckStringFormat.init(inst, def);
});
var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
  def.pattern ?? (def.pattern = uppercase);
  $ZodCheckStringFormat.init(inst, def);
});
var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
  $ZodCheck.init(inst, def);
  const escapedRegex = escapeRegex(def.includes);
  const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
  def.pattern = pattern;
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
    bag.patterns.add(pattern);
  });
  inst._zod.check = (payload) => {
    if (payload.value.includes(def.includes, def.position))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "includes",
      includes: def.includes,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
  $ZodCheck.init(inst, def);
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
  def.pattern ?? (def.pattern = pattern);
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
    bag.patterns.add(pattern);
  });
  inst._zod.check = (payload) => {
    if (payload.value.startsWith(def.prefix))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "starts_with",
      prefix: def.prefix,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
  $ZodCheck.init(inst, def);
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
  def.pattern ?? (def.pattern = pattern);
  inst._zod.onattach.push((inst2) => {
    const bag = inst2._zod.bag;
    bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
    bag.patterns.add(pattern);
  });
  inst._zod.check = (payload) => {
    if (payload.value.endsWith(def.suffix))
      return;
    payload.issues.push({
      origin: "string",
      code: "invalid_format",
      format: "ends_with",
      suffix: def.suffix,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
function handleCheckPropertyResult(result, payload, property) {
  if (result.issues.length) {
    payload.issues.push(...prefixIssues(property, result.issues));
  }
}
var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => {
  $ZodCheck.init(inst, def);
  inst._zod.check = (payload) => {
    const result = def.schema._zod.run({
      value: payload.value[def.property],
      issues: []
    }, {});
    if (result instanceof Promise) {
      return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property));
    }
    handleCheckPropertyResult(result, payload, def.property);
    return;
  };
});
var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
  $ZodCheck.init(inst, def);
  const mimeSet = new Set(def.mime);
  inst._zod.onattach.push((inst2) => {
    inst2._zod.bag.mime = def.mime;
  });
  inst._zod.check = (payload) => {
    if (mimeSet.has(payload.value.type))
      return;
    payload.issues.push({
      code: "invalid_value",
      values: def.mime,
      input: payload.value.type,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
  $ZodCheck.init(inst, def);
  inst._zod.check = (payload) => {
    payload.value = def.tx(payload.value);
  };
});

// node_modules/zod/v4/core/doc.js
var Doc = class {
  constructor(args = []) {
    this.content = [];
    this.indent = 0;
    if (this)
      this.args = args;
  }
  indented(fn) {
    this.indent += 1;
    fn(this);
    this.indent -= 1;
  }
  write(arg) {
    if (typeof arg === "function") {
      arg(this, { execution: "sync" });
      arg(this, { execution: "async" });
      return;
    }
    const content = arg;
    const lines = content.split("\n").filter((x) => x);
    const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
    const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
    for (const line of dedented) {
      this.content.push(line);
    }
  }
  compile() {
    const F = Function;
    const args = this?.args;
    const content = this?.content ?? [``];
    const lines = [...content.map((x) => `  ${x}`)];
    return new F(...args, lines.join("\n"));
  }
};

// node_modules/zod/v4/core/versions.js
var version = {
  major: 4,
  minor: 4,
  patch: 3
};

// node_modules/zod/v4/core/schemas.js
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
  var _a3;
  inst ?? (inst = {});
  inst._zod.def = def;
  inst._zod.bag = inst._zod.bag || {};
  inst._zod.version = version;
  const checks = [...inst._zod.def.checks ?? []];
  if (inst._zod.traits.has("$ZodCheck")) {
    checks.unshift(inst);
  }
  for (const ch of checks) {
    for (const fn of ch._zod.onattach) {
      fn(inst);
    }
  }
  if (checks.length === 0) {
    (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
    inst._zod.deferred?.push(() => {
      inst._zod.run = inst._zod.parse;
    });
  } else {
    const runChecks = (payload, checks2, ctx2) => {
      let isAborted2 = aborted(payload);
      let asyncResult;
      for (const ch of checks2) {
        if (ch._zod.def.when) {
          if (explicitlyAborted(payload))
            continue;
          const shouldRun = ch._zod.def.when(payload);
          if (!shouldRun)
            continue;
        } else if (isAborted2) {
          continue;
        }
        const currLen = payload.issues.length;
        const _ = ch._zod.check(payload);
        if (_ instanceof Promise && ctx2?.async === false) {
          throw new $ZodAsyncError();
        }
        if (asyncResult || _ instanceof Promise) {
          asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
            await _;
            const nextLen = payload.issues.length;
            if (nextLen === currLen)
              return;
            if (!isAborted2)
              isAborted2 = aborted(payload, currLen);
          });
        } else {
          const nextLen = payload.issues.length;
          if (nextLen === currLen)
            continue;
          if (!isAborted2)
            isAborted2 = aborted(payload, currLen);
        }
      }
      if (asyncResult) {
        return asyncResult.then(() => {
          return payload;
        });
      }
      return payload;
    };
    const handleCanaryResult = (canary, payload, ctx2) => {
      if (aborted(canary)) {
        canary.aborted = true;
        return canary;
      }
      const checkResult = runChecks(payload, checks, ctx2);
      if (checkResult instanceof Promise) {
        if (ctx2.async === false)
          throw new $ZodAsyncError();
        return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx2));
      }
      return inst._zod.parse(checkResult, ctx2);
    };
    inst._zod.run = (payload, ctx2) => {
      if (ctx2.skipChecks) {
        return inst._zod.parse(payload, ctx2);
      }
      if (ctx2.direction === "backward") {
        const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx2, skipChecks: true });
        if (canary instanceof Promise) {
          return canary.then((canary2) => {
            return handleCanaryResult(canary2, payload, ctx2);
          });
        }
        return handleCanaryResult(canary, payload, ctx2);
      }
      const result = inst._zod.parse(payload, ctx2);
      if (result instanceof Promise) {
        if (ctx2.async === false)
          throw new $ZodAsyncError();
        return result.then((result2) => runChecks(result2, checks, ctx2));
      }
      return runChecks(result, checks, ctx2);
    };
  }
  defineLazy(inst, "~standard", () => ({
    validate: (value) => {
      try {
        const r = safeParse(inst, value);
        return r.success ? { value: r.data } : { issues: r.error?.issues };
      } catch (_) {
        return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
      }
    },
    vendor: "zod",
    version: 1
  }));
});
var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
  inst._zod.parse = (payload, _) => {
    if (def.coerce)
      try {
        payload.value = String(payload.value);
      } catch (_2) {
      }
    if (typeof payload.value === "string")
      return payload;
    payload.issues.push({
      expected: "string",
      code: "invalid_type",
      input: payload.value,
      inst
    });
    return payload;
  };
});
var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
  $ZodCheckStringFormat.init(inst, def);
  $ZodString.init(inst, def);
});
var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
  def.pattern ?? (def.pattern = guid);
  $ZodStringFormat.init(inst, def);
});
var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
  if (def.version) {
    const versionMap = {
      v1: 1,
      v2: 2,
      v3: 3,
      v4: 4,
      v5: 5,
      v6: 6,
      v7: 7,
      v8: 8
    };
    const v = versionMap[def.version];
    if (v === void 0)
      throw new Error(`Invalid UUID version: "${def.version}"`);
    def.pattern ?? (def.pattern = uuid(v));
  } else
    def.pattern ?? (def.pattern = uuid());
  $ZodStringFormat.init(inst, def);
});
var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
  def.pattern ?? (def.pattern = email);
  $ZodStringFormat.init(inst, def);
});
var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    try {
      const trimmed = payload.value.trim();
      if (!def.normalize && def.protocol?.source === httpProtocol.source) {
        if (!/^https?:\/\//i.test(trimmed)) {
          payload.issues.push({
            code: "invalid_format",
            format: "url",
            note: "Invalid URL format",
            input: payload.value,
            inst,
            continue: !def.abort
          });
          return;
        }
      }
      const url2 = new URL(trimmed);
      if (def.hostname) {
        def.hostname.lastIndex = 0;
        if (!def.hostname.test(url2.hostname)) {
          payload.issues.push({
            code: "invalid_format",
            format: "url",
            note: "Invalid hostname",
            pattern: def.hostname.source,
            input: payload.value,
            inst,
            continue: !def.abort
          });
        }
      }
      if (def.protocol) {
        def.protocol.lastIndex = 0;
        if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) {
          payload.issues.push({
            code: "invalid_format",
            format: "url",
            note: "Invalid protocol",
            pattern: def.protocol.source,
            input: payload.value,
            inst,
            continue: !def.abort
          });
        }
      }
      if (def.normalize) {
        payload.value = url2.href;
      } else {
        payload.value = trimmed;
      }
      return;
    } catch (_) {
      payload.issues.push({
        code: "invalid_format",
        format: "url",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
  def.pattern ?? (def.pattern = emoji());
  $ZodStringFormat.init(inst, def);
});
var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
  def.pattern ?? (def.pattern = nanoid);
  $ZodStringFormat.init(inst, def);
});
var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
  def.pattern ?? (def.pattern = cuid);
  $ZodStringFormat.init(inst, def);
});
var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
  def.pattern ?? (def.pattern = cuid2);
  $ZodStringFormat.init(inst, def);
});
var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
  def.pattern ?? (def.pattern = ulid);
  $ZodStringFormat.init(inst, def);
});
var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
  def.pattern ?? (def.pattern = xid);
  $ZodStringFormat.init(inst, def);
});
var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
  def.pattern ?? (def.pattern = ksuid);
  $ZodStringFormat.init(inst, def);
});
var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
  def.pattern ?? (def.pattern = datetime(def));
  $ZodStringFormat.init(inst, def);
});
var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
  def.pattern ?? (def.pattern = date);
  $ZodStringFormat.init(inst, def);
});
var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
  def.pattern ?? (def.pattern = time(def));
  $ZodStringFormat.init(inst, def);
});
var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
  def.pattern ?? (def.pattern = duration);
  $ZodStringFormat.init(inst, def);
});
var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
  def.pattern ?? (def.pattern = ipv4);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.format = `ipv4`;
});
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
  def.pattern ?? (def.pattern = ipv6);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.format = `ipv6`;
  inst._zod.check = (payload) => {
    try {
      new URL(`http://[${payload.value}]`);
    } catch {
      payload.issues.push({
        code: "invalid_format",
        format: "ipv6",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    }
  };
});
var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => {
  def.pattern ?? (def.pattern = mac(def.delimiter));
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.format = `mac`;
});
var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
  def.pattern ?? (def.pattern = cidrv4);
  $ZodStringFormat.init(inst, def);
});
var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
  def.pattern ?? (def.pattern = cidrv6);
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    const parts = payload.value.split("/");
    try {
      if (parts.length !== 2)
        throw new Error();
      const [address, prefix] = parts;
      if (!prefix)
        throw new Error();
      const prefixNum = Number(prefix);
      if (`${prefixNum}` !== prefix)
        throw new Error();
      if (prefixNum < 0 || prefixNum > 128)
        throw new Error();
      new URL(`http://[${address}]`);
    } catch {
      payload.issues.push({
        code: "invalid_format",
        format: "cidrv6",
        input: payload.value,
        inst,
        continue: !def.abort
      });
    }
  };
});
function isValidBase64(data) {
  if (data === "")
    return true;
  if (/\s/.test(data))
    return false;
  if (data.length % 4 !== 0)
    return false;
  try {
    atob(data);
    return true;
  } catch {
    return false;
  }
}
var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
  def.pattern ?? (def.pattern = base64);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.contentEncoding = "base64";
  inst._zod.check = (payload) => {
    if (isValidBase64(payload.value))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: "base64",
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
function isValidBase64URL(data) {
  if (!base64url.test(data))
    return false;
  const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
  const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
  return isValidBase64(padded);
}
var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
  def.pattern ?? (def.pattern = base64url);
  $ZodStringFormat.init(inst, def);
  inst._zod.bag.contentEncoding = "base64url";
  inst._zod.check = (payload) => {
    if (isValidBase64URL(payload.value))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: "base64url",
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
  def.pattern ?? (def.pattern = e164);
  $ZodStringFormat.init(inst, def);
});
function isValidJWT2(token, algorithm = null) {
  try {
    const tokensParts = token.split(".");
    if (tokensParts.length !== 3)
      return false;
    const [header] = tokensParts;
    if (!header)
      return false;
    const parsedHeader = JSON.parse(atob(header));
    if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
      return false;
    if (!parsedHeader.alg)
      return false;
    if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
      return false;
    return true;
  } catch {
    return false;
  }
}
var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    if (isValidJWT2(payload.value, def.alg))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: "jwt",
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  inst._zod.check = (payload) => {
    if (def.fn(payload.value))
      return;
    payload.issues.push({
      code: "invalid_format",
      format: def.format,
      input: payload.value,
      inst,
      continue: !def.abort
    });
  };
});
var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = inst._zod.bag.pattern ?? number;
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce)
      try {
        payload.value = Number(payload.value);
      } catch (_) {
      }
    const input = payload.value;
    if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
      return payload;
    }
    const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
    payload.issues.push({
      expected: "number",
      code: "invalid_type",
      input,
      inst,
      ...received ? { received } : {}
    });
    return payload;
  };
});
var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
  $ZodCheckNumberFormat.init(inst, def);
  $ZodNumber.init(inst, def);
});
var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = boolean;
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce)
      try {
        payload.value = Boolean(payload.value);
      } catch (_) {
      }
    const input = payload.value;
    if (typeof input === "boolean")
      return payload;
    payload.issues.push({
      expected: "boolean",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = bigint;
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce)
      try {
        payload.value = BigInt(payload.value);
      } catch (_) {
      }
    if (typeof payload.value === "bigint")
      return payload;
    payload.issues.push({
      expected: "bigint",
      code: "invalid_type",
      input: payload.value,
      inst
    });
    return payload;
  };
});
var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => {
  $ZodCheckBigIntFormat.init(inst, def);
  $ZodBigInt.init(inst, def);
});
var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (typeof input === "symbol")
      return payload;
    payload.issues.push({
      expected: "symbol",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = _undefined;
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (typeof input === "undefined")
      return payload;
    payload.issues.push({
      expected: "undefined",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.pattern = _null;
  inst._zod.values = /* @__PURE__ */ new Set([null]);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (input === null)
      return payload;
    payload.issues.push({
      expected: "null",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload) => payload;
});
var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload) => payload;
});
var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    payload.issues.push({
      expected: "never",
      code: "invalid_type",
      input: payload.value,
      inst
    });
    return payload;
  };
});
var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (typeof input === "undefined")
      return payload;
    payload.issues.push({
      expected: "void",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    if (def.coerce) {
      try {
        payload.value = new Date(payload.value);
      } catch (_err) {
      }
    }
    const input = payload.value;
    const isDate = input instanceof Date;
    const isValidDate = isDate && !Number.isNaN(input.getTime());
    if (isValidDate)
      return payload;
    payload.issues.push({
      expected: "date",
      code: "invalid_type",
      input,
      ...isDate ? { received: "Invalid Date" } : {},
      inst
    });
    return payload;
  };
});
function handleArrayResult(result, final, index2) {
  if (result.issues.length) {
    final.issues.push(...prefixIssues(index2, result.issues));
  }
  final.value[index2] = result.value;
}
var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx2) => {
    const input = payload.value;
    if (!Array.isArray(input)) {
      payload.issues.push({
        expected: "array",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    payload.value = Array(input.length);
    const proms = [];
    for (let i = 0; i < input.length; i++) {
      const item = input[i];
      const result = def.element._zod.run({
        value: item,
        issues: []
      }, ctx2);
      if (result instanceof Promise) {
        proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
      } else {
        handleArrayResult(result, payload, i);
      }
    }
    if (proms.length) {
      return Promise.all(proms).then(() => payload);
    }
    return payload;
  };
});
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
  const isPresent = key in input;
  if (result.issues.length) {
    if (isOptionalIn && isOptionalOut && !isPresent) {
      return;
    }
    final.issues.push(...prefixIssues(key, result.issues));
  }
  if (!isPresent && !isOptionalIn) {
    if (!result.issues.length) {
      final.issues.push({
        code: "invalid_type",
        expected: "nonoptional",
        input: void 0,
        path: [key]
      });
    }
    return;
  }
  if (result.value === void 0) {
    if (isPresent) {
      final.value[key] = void 0;
    }
  } else {
    final.value[key] = result.value;
  }
}
function normalizeDef(def) {
  const keys = Object.keys(def.shape);
  for (const k of keys) {
    if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
      throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
    }
  }
  const okeys = optionalKeys(def.shape);
  return {
    ...def,
    keys,
    keySet: new Set(keys),
    numKeys: keys.length,
    optionalKeys: new Set(okeys)
  };
}
function handleCatchall(proms, input, payload, ctx2, def, inst) {
  const unrecognized = [];
  const keySet = def.keySet;
  const _catchall = def.catchall._zod;
  const t = _catchall.def.type;
  const isOptionalIn = _catchall.optin === "optional";
  const isOptionalOut = _catchall.optout === "optional";
  for (const key in input) {
    if (key === "__proto__")
      continue;
    if (keySet.has(key))
      continue;
    if (t === "never") {
      unrecognized.push(key);
      continue;
    }
    const r = _catchall.run({ value: input[key], issues: [] }, ctx2);
    if (r instanceof Promise) {
      proms.push(r.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalIn, isOptionalOut)));
    } else {
      handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
    }
  }
  if (unrecognized.length) {
    payload.issues.push({
      code: "unrecognized_keys",
      keys: unrecognized,
      input,
      inst
    });
  }
  if (!proms.length)
    return payload;
  return Promise.all(proms).then(() => {
    return payload;
  });
}
var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
  $ZodType.init(inst, def);
  const desc = Object.getOwnPropertyDescriptor(def, "shape");
  if (!desc?.get) {
    const sh = def.shape;
    Object.defineProperty(def, "shape", {
      get: () => {
        const newSh = { ...sh };
        Object.defineProperty(def, "shape", {
          value: newSh
        });
        return newSh;
      }
    });
  }
  const _normalized = cached(() => normalizeDef(def));
  defineLazy(inst._zod, "propValues", () => {
    const shape = def.shape;
    const propValues = {};
    for (const key in shape) {
      const field = shape[key]._zod;
      if (field.values) {
        propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
        for (const v of field.values)
          propValues[key].add(v);
      }
    }
    return propValues;
  });
  const isObject2 = isObject;
  const catchall = def.catchall;
  let value;
  inst._zod.parse = (payload, ctx2) => {
    value ?? (value = _normalized.value);
    const input = payload.value;
    if (!isObject2(input)) {
      payload.issues.push({
        expected: "object",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    payload.value = {};
    const proms = [];
    const shape = value.shape;
    for (const key of value.keys) {
      const el = shape[key];
      const isOptionalIn = el._zod.optin === "optional";
      const isOptionalOut = el._zod.optout === "optional";
      const r = el._zod.run({ value: input[key], issues: [] }, ctx2);
      if (r instanceof Promise) {
        proms.push(r.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalIn, isOptionalOut)));
      } else {
        handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
      }
    }
    if (!catchall) {
      return proms.length ? Promise.all(proms).then(() => payload) : payload;
    }
    return handleCatchall(proms, input, payload, ctx2, _normalized.value, inst);
  };
});
var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
  $ZodObject.init(inst, def);
  const superParse = inst._zod.parse;
  const _normalized = cached(() => normalizeDef(def));
  const generateFastpass = (shape) => {
    const doc = new Doc(["shape", "payload", "ctx"]);
    const normalized = _normalized.value;
    const parseStr = (key) => {
      const k = esc(key);
      return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
    };
    doc.write(`const input = payload.value;`);
    const ids = /* @__PURE__ */ Object.create(null);
    let counter = 0;
    for (const key of normalized.keys) {
      ids[key] = `key_${counter++}`;
    }
    doc.write(`const newResult = {};`);
    for (const key of normalized.keys) {
      const id = ids[key];
      const k = esc(key);
      const schema = shape[key];
      const isOptionalIn = schema?._zod?.optin === "optional";
      const isOptionalOut = schema?._zod?.optout === "optional";
      doc.write(`const ${id} = ${parseStr(key)};`);
      if (isOptionalIn && isOptionalOut) {
        doc.write(`
        if (${id}.issues.length) {
          if (${k} in input) {
            payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
              ...iss,
              path: iss.path ? [${k}, ...iss.path] : [${k}]
            })));
          }
        }
        
        if (${id}.value === undefined) {
          if (${k} in input) {
            newResult[${k}] = undefined;
          }
        } else {
          newResult[${k}] = ${id}.value;
        }
        
      `);
      } else if (!isOptionalIn) {
        doc.write(`
        const ${id}_present = ${k} in input;
        if (${id}.issues.length) {
          payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${k}, ...iss.path] : [${k}]
          })));
        }
        if (!${id}_present && !${id}.issues.length) {
          payload.issues.push({
            code: "invalid_type",
            expected: "nonoptional",
            input: undefined,
            path: [${k}]
          });
        }

        if (${id}_present) {
          if (${id}.value === undefined) {
            newResult[${k}] = undefined;
          } else {
            newResult[${k}] = ${id}.value;
          }
        }

      `);
      } else {
        doc.write(`
        if (${id}.issues.length) {
          payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${k}, ...iss.path] : [${k}]
          })));
        }
        
        if (${id}.value === undefined) {
          if (${k} in input) {
            newResult[${k}] = undefined;
          }
        } else {
          newResult[${k}] = ${id}.value;
        }
        
      `);
      }
    }
    doc.write(`payload.value = newResult;`);
    doc.write(`return payload;`);
    const fn = doc.compile();
    return (payload, ctx2) => fn(shape, payload, ctx2);
  };
  let fastpass;
  const isObject2 = isObject;
  const jit = !globalConfig.jitless;
  const allowsEval2 = allowsEval;
  const fastEnabled = jit && allowsEval2.value;
  const catchall = def.catchall;
  let value;
  inst._zod.parse = (payload, ctx2) => {
    value ?? (value = _normalized.value);
    const input = payload.value;
    if (!isObject2(input)) {
      payload.issues.push({
        expected: "object",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    if (jit && fastEnabled && ctx2?.async === false && ctx2.jitless !== true) {
      if (!fastpass)
        fastpass = generateFastpass(def.shape);
      payload = fastpass(payload, ctx2);
      if (!catchall)
        return payload;
      return handleCatchall([], input, payload, ctx2, value, inst);
    }
    return superParse(payload, ctx2);
  };
});
function handleUnionResults(results, final, inst, ctx2) {
  for (const result of results) {
    if (result.issues.length === 0) {
      final.value = result.value;
      return final;
    }
  }
  const nonaborted = results.filter((r) => !aborted(r));
  if (nonaborted.length === 1) {
    final.value = nonaborted[0].value;
    return nonaborted[0];
  }
  final.issues.push({
    code: "invalid_union",
    input: final.value,
    inst,
    errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx2, config())))
  });
  return final;
}
var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
  defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
  defineLazy(inst._zod, "values", () => {
    if (def.options.every((o) => o._zod.values)) {
      return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
    }
    return void 0;
  });
  defineLazy(inst._zod, "pattern", () => {
    if (def.options.every((o) => o._zod.pattern)) {
      const patterns = def.options.map((o) => o._zod.pattern);
      return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
    }
    return void 0;
  });
  const first = def.options.length === 1 ? def.options[0]._zod.run : null;
  inst._zod.parse = (payload, ctx2) => {
    if (first) {
      return first(payload, ctx2);
    }
    let async = false;
    const results = [];
    for (const option of def.options) {
      const result = option._zod.run({
        value: payload.value,
        issues: []
      }, ctx2);
      if (result instanceof Promise) {
        results.push(result);
        async = true;
      } else {
        if (result.issues.length === 0)
          return result;
        results.push(result);
      }
    }
    if (!async)
      return handleUnionResults(results, payload, inst, ctx2);
    return Promise.all(results).then((results2) => {
      return handleUnionResults(results2, payload, inst, ctx2);
    });
  };
});
function handleExclusiveUnionResults(results, final, inst, ctx2) {
  const successes = results.filter((r) => r.issues.length === 0);
  if (successes.length === 1) {
    final.value = successes[0].value;
    return final;
  }
  if (successes.length === 0) {
    final.issues.push({
      code: "invalid_union",
      input: final.value,
      inst,
      errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx2, config())))
    });
  } else {
    final.issues.push({
      code: "invalid_union",
      input: final.value,
      inst,
      errors: [],
      inclusive: false
    });
  }
  return final;
}
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
  $ZodUnion.init(inst, def);
  def.inclusive = false;
  const first = def.options.length === 1 ? def.options[0]._zod.run : null;
  inst._zod.parse = (payload, ctx2) => {
    if (first) {
      return first(payload, ctx2);
    }
    let async = false;
    const results = [];
    for (const option of def.options) {
      const result = option._zod.run({
        value: payload.value,
        issues: []
      }, ctx2);
      if (result instanceof Promise) {
        results.push(result);
        async = true;
      } else {
        results.push(result);
      }
    }
    if (!async)
      return handleExclusiveUnionResults(results, payload, inst, ctx2);
    return Promise.all(results).then((results2) => {
      return handleExclusiveUnionResults(results2, payload, inst, ctx2);
    });
  };
});
var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
  def.inclusive = false;
  $ZodUnion.init(inst, def);
  const _super = inst._zod.parse;
  defineLazy(inst._zod, "propValues", () => {
    const propValues = {};
    for (const option of def.options) {
      const pv = option._zod.propValues;
      if (!pv || Object.keys(pv).length === 0)
        throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
      for (const [k, v] of Object.entries(pv)) {
        if (!propValues[k])
          propValues[k] = /* @__PURE__ */ new Set();
        for (const val of v) {
          propValues[k].add(val);
        }
      }
    }
    return propValues;
  });
  const disc = cached(() => {
    const opts = def.options;
    const map2 = /* @__PURE__ */ new Map();
    for (const o of opts) {
      const values = o._zod.propValues?.[def.discriminator];
      if (!values || values.size === 0)
        throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
      for (const v of values) {
        if (map2.has(v)) {
          throw new Error(`Duplicate discriminator value "${String(v)}"`);
        }
        map2.set(v, o);
      }
    }
    return map2;
  });
  inst._zod.parse = (payload, ctx2) => {
    const input = payload.value;
    if (!isObject(input)) {
      payload.issues.push({
        code: "invalid_type",
        expected: "object",
        input,
        inst
      });
      return payload;
    }
    const opt = disc.value.get(input?.[def.discriminator]);
    if (opt) {
      return opt._zod.run(payload, ctx2);
    }
    if (def.unionFallback || ctx2.direction === "backward") {
      return _super(payload, ctx2);
    }
    payload.issues.push({
      code: "invalid_union",
      errors: [],
      note: "No matching discriminator",
      discriminator: def.discriminator,
      options: Array.from(disc.value.keys()),
      input,
      path: [def.discriminator],
      inst
    });
    return payload;
  };
});
var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx2) => {
    const input = payload.value;
    const left = def.left._zod.run({ value: input, issues: [] }, ctx2);
    const right = def.right._zod.run({ value: input, issues: [] }, ctx2);
    const async = left instanceof Promise || right instanceof Promise;
    if (async) {
      return Promise.all([left, right]).then(([left2, right2]) => {
        return handleIntersectionResults(payload, left2, right2);
      });
    }
    return handleIntersectionResults(payload, left, right);
  };
});
function mergeValues2(a, b) {
  if (a === b) {
    return { valid: true, data: a };
  }
  if (a instanceof Date && b instanceof Date && +a === +b) {
    return { valid: true, data: a };
  }
  if (isPlainObject(a) && isPlainObject(b)) {
    const bKeys = Object.keys(b);
    const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
    const newObj = { ...a, ...b };
    for (const key of sharedKeys) {
      const sharedValue = mergeValues2(a[key], b[key]);
      if (!sharedValue.valid) {
        return {
          valid: false,
          mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
        };
      }
      newObj[key] = sharedValue.data;
    }
    return { valid: true, data: newObj };
  }
  if (Array.isArray(a) && Array.isArray(b)) {
    if (a.length !== b.length) {
      return { valid: false, mergeErrorPath: [] };
    }
    const newArray = [];
    for (let index2 = 0; index2 < a.length; index2++) {
      const itemA = a[index2];
      const itemB = b[index2];
      const sharedValue = mergeValues2(itemA, itemB);
      if (!sharedValue.valid) {
        return {
          valid: false,
          mergeErrorPath: [index2, ...sharedValue.mergeErrorPath]
        };
      }
      newArray.push(sharedValue.data);
    }
    return { valid: true, data: newArray };
  }
  return { valid: false, mergeErrorPath: [] };
}
function handleIntersectionResults(result, left, right) {
  const unrecKeys = /* @__PURE__ */ new Map();
  let unrecIssue;
  for (const iss of left.issues) {
    if (iss.code === "unrecognized_keys") {
      unrecIssue ?? (unrecIssue = iss);
      for (const k of iss.keys) {
        if (!unrecKeys.has(k))
          unrecKeys.set(k, {});
        unrecKeys.get(k).l = true;
      }
    } else {
      result.issues.push(iss);
    }
  }
  for (const iss of right.issues) {
    if (iss.code === "unrecognized_keys") {
      for (const k of iss.keys) {
        if (!unrecKeys.has(k))
          unrecKeys.set(k, {});
        unrecKeys.get(k).r = true;
      }
    } else {
      result.issues.push(iss);
    }
  }
  const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
  if (bothKeys.length && unrecIssue) {
    result.issues.push({ ...unrecIssue, keys: bothKeys });
  }
  if (aborted(result))
    return result;
  const merged = mergeValues2(left.value, right.value);
  if (!merged.valid) {
    throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
  }
  result.value = merged.data;
  return result;
}
var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
  $ZodType.init(inst, def);
  const items = def.items;
  inst._zod.parse = (payload, ctx2) => {
    const input = payload.value;
    if (!Array.isArray(input)) {
      payload.issues.push({
        input,
        inst,
        expected: "tuple",
        code: "invalid_type"
      });
      return payload;
    }
    payload.value = [];
    const proms = [];
    const optinStart = getTupleOptStart(items, "optin");
    const optoutStart = getTupleOptStart(items, "optout");
    if (!def.rest) {
      if (input.length < optinStart) {
        payload.issues.push({
          code: "too_small",
          minimum: optinStart,
          inclusive: true,
          input,
          inst,
          origin: "array"
        });
        return payload;
      }
      if (input.length > items.length) {
        payload.issues.push({
          code: "too_big",
          maximum: items.length,
          inclusive: true,
          input,
          inst,
          origin: "array"
        });
      }
    }
    const itemResults = new Array(items.length);
    for (let i = 0; i < items.length; i++) {
      const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx2);
      if (r instanceof Promise) {
        proms.push(r.then((rr) => {
          itemResults[i] = rr;
        }));
      } else {
        itemResults[i] = r;
      }
    }
    if (def.rest) {
      let i = items.length - 1;
      const rest = input.slice(items.length);
      for (const el of rest) {
        i++;
        const result = def.rest._zod.run({ value: el, issues: [] }, ctx2);
        if (result instanceof Promise) {
          proms.push(result.then((r) => handleTupleResult(r, payload, i)));
        } else {
          handleTupleResult(result, payload, i);
        }
      }
    }
    if (proms.length) {
      return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
    }
    return handleTupleResults(itemResults, payload, items, input, optoutStart);
  };
});
function getTupleOptStart(items, key) {
  for (let i = items.length - 1; i >= 0; i--) {
    if (items[i]._zod[key] !== "optional")
      return i + 1;
  }
  return 0;
}
function handleTupleResult(result, final, index2) {
  if (result.issues.length) {
    final.issues.push(...prefixIssues(index2, result.issues));
  }
  final.value[index2] = result.value;
}
function handleTupleResults(itemResults, final, items, input, optoutStart) {
  for (let i = 0; i < items.length; i++) {
    const r = itemResults[i];
    const isPresent = i < input.length;
    if (r.issues.length) {
      if (!isPresent && i >= optoutStart) {
        final.value.length = i;
        break;
      }
      final.issues.push(...prefixIssues(i, r.issues));
    }
    final.value[i] = r.value;
  }
  for (let i = final.value.length - 1; i >= input.length; i--) {
    if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
      final.value.length = i;
    } else {
      break;
    }
  }
  return final;
}
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx2) => {
    const input = payload.value;
    if (!isPlainObject(input)) {
      payload.issues.push({
        expected: "record",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    const proms = [];
    const values = def.keyType._zod.values;
    if (values) {
      payload.value = {};
      const recordKeys = /* @__PURE__ */ new Set();
      for (const key of values) {
        if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
          recordKeys.add(typeof key === "number" ? key.toString() : key);
          const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx2);
          if (keyResult instanceof Promise) {
            throw new Error("Async schemas not supported in object keys currently");
          }
          if (keyResult.issues.length) {
            payload.issues.push({
              code: "invalid_key",
              origin: "record",
              issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx2, config())),
              input: key,
              path: [key],
              inst
            });
            continue;
          }
          const outKey = keyResult.value;
          const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx2);
          if (result instanceof Promise) {
            proms.push(result.then((result2) => {
              if (result2.issues.length) {
                payload.issues.push(...prefixIssues(key, result2.issues));
              }
              payload.value[outKey] = result2.value;
            }));
          } else {
            if (result.issues.length) {
              payload.issues.push(...prefixIssues(key, result.issues));
            }
            payload.value[outKey] = result.value;
          }
        }
      }
      let unrecognized;
      for (const key in input) {
        if (!recordKeys.has(key)) {
          unrecognized = unrecognized ?? [];
          unrecognized.push(key);
        }
      }
      if (unrecognized && unrecognized.length > 0) {
        payload.issues.push({
          code: "unrecognized_keys",
          input,
          inst,
          keys: unrecognized
        });
      }
    } else {
      payload.value = {};
      for (const key of Reflect.ownKeys(input)) {
        if (key === "__proto__")
          continue;
        if (!Object.prototype.propertyIsEnumerable.call(input, key))
          continue;
        let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx2);
        if (keyResult instanceof Promise) {
          throw new Error("Async schemas not supported in object keys currently");
        }
        const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length;
        if (checkNumericKey) {
          const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx2);
          if (retryResult instanceof Promise) {
            throw new Error("Async schemas not supported in object keys currently");
          }
          if (retryResult.issues.length === 0) {
            keyResult = retryResult;
          }
        }
        if (keyResult.issues.length) {
          if (def.mode === "loose") {
            payload.value[key] = input[key];
          } else {
            payload.issues.push({
              code: "invalid_key",
              origin: "record",
              issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx2, config())),
              input: key,
              path: [key],
              inst
            });
          }
          continue;
        }
        const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx2);
        if (result instanceof Promise) {
          proms.push(result.then((result2) => {
            if (result2.issues.length) {
              payload.issues.push(...prefixIssues(key, result2.issues));
            }
            payload.value[keyResult.value] = result2.value;
          }));
        } else {
          if (result.issues.length) {
            payload.issues.push(...prefixIssues(key, result.issues));
          }
          payload.value[keyResult.value] = result.value;
        }
      }
    }
    if (proms.length) {
      return Promise.all(proms).then(() => payload);
    }
    return payload;
  };
});
var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx2) => {
    const input = payload.value;
    if (!(input instanceof Map)) {
      payload.issues.push({
        expected: "map",
        code: "invalid_type",
        input,
        inst
      });
      return payload;
    }
    const proms = [];
    payload.value = /* @__PURE__ */ new Map();
    for (const [key, value] of input) {
      const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx2);
      const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx2);
      if (keyResult instanceof Promise || valueResult instanceof Promise) {
        proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
          handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx2);
        }));
      } else {
        handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx2);
      }
    }
    if (proms.length)
      return Promise.all(proms).then(() => payload);
    return payload;
  };
});
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx2) {
  if (keyResult.issues.length) {
    if (propertyKeyTypes.has(typeof key)) {
      final.issues.push(...prefixIssues(key, keyResult.issues));
    } else {
      final.issues.push({
        code: "invalid_key",
        origin: "map",
        input,
        inst,
        issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx2, config()))
      });
    }
  }
  if (valueResult.issues.length) {
    if (propertyKeyTypes.has(typeof key)) {
      final.issues.push(...prefixIssues(key, valueResult.issues));
    } else {
      final.issues.push({
        origin: "map",
        code: "invalid_element",
        input,
        inst,
        key,
        issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx2, config()))
      });
    }
  }
  final.value.set(keyResult.value, valueResult.value);
}
var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx2) => {
    const input = payload.value;
    if (!(input instanceof Set)) {
      payload.issues.push({
        input,
        inst,
        expected: "set",
        code: "invalid_type"
      });
      return payload;
    }
    const proms = [];
    payload.value = /* @__PURE__ */ new Set();
    for (const item of input) {
      const result = def.valueType._zod.run({ value: item, issues: [] }, ctx2);
      if (result instanceof Promise) {
        proms.push(result.then((result2) => handleSetResult(result2, payload)));
      } else
        handleSetResult(result, payload);
    }
    if (proms.length)
      return Promise.all(proms).then(() => payload);
    return payload;
  };
});
function handleSetResult(result, final) {
  if (result.issues.length) {
    final.issues.push(...result.issues);
  }
  final.value.add(result.value);
}
var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
  $ZodType.init(inst, def);
  const values = getEnumValues(def.entries);
  const valuesSet = new Set(values);
  inst._zod.values = valuesSet;
  inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (valuesSet.has(input)) {
      return payload;
    }
    payload.issues.push({
      code: "invalid_value",
      values,
      input,
      inst
    });
    return payload;
  };
});
var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
  $ZodType.init(inst, def);
  if (def.values.length === 0) {
    throw new Error("Cannot create literal schema with no valid values");
  }
  const values = new Set(def.values);
  inst._zod.values = values;
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (values.has(input)) {
      return payload;
    }
    payload.issues.push({
      code: "invalid_value",
      values: def.values,
      input,
      inst
    });
    return payload;
  };
});
var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    const input = payload.value;
    if (input instanceof File)
      return payload;
    payload.issues.push({
      expected: "file",
      code: "invalid_type",
      input,
      inst
    });
    return payload;
  };
});
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  inst._zod.parse = (payload, ctx2) => {
    if (ctx2.direction === "backward") {
      throw new $ZodEncodeError(inst.constructor.name);
    }
    const _out = def.transform(payload.value, payload);
    if (ctx2.async) {
      const output = _out instanceof Promise ? _out : Promise.resolve(_out);
      return output.then((output2) => {
        payload.value = output2;
        payload.fallback = true;
        return payload;
      });
    }
    if (_out instanceof Promise) {
      throw new $ZodAsyncError();
    }
    payload.value = _out;
    payload.fallback = true;
    return payload;
  };
});
function handleOptionalResult(result, input) {
  if (input === void 0 && (result.issues.length || result.fallback)) {
    return { issues: [], value: void 0 };
  }
  return result;
}
var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  inst._zod.optout = "optional";
  defineLazy(inst._zod, "values", () => {
    return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
  });
  defineLazy(inst._zod, "pattern", () => {
    const pattern = def.innerType._zod.pattern;
    return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
  });
  inst._zod.parse = (payload, ctx2) => {
    if (def.innerType._zod.optin === "optional") {
      const input = payload.value;
      const result = def.innerType._zod.run(payload, ctx2);
      if (result instanceof Promise)
        return result.then((r) => handleOptionalResult(r, input));
      return handleOptionalResult(result, input);
    }
    if (payload.value === void 0) {
      return payload;
    }
    return def.innerType._zod.run(payload, ctx2);
  };
});
var $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
  $ZodOptional.init(inst, def);
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
  inst._zod.parse = (payload, ctx2) => {
    return def.innerType._zod.run(payload, ctx2);
  };
});
var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
  defineLazy(inst._zod, "pattern", () => {
    const pattern = def.innerType._zod.pattern;
    return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
  });
  defineLazy(inst._zod, "values", () => {
    return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
  });
  inst._zod.parse = (payload, ctx2) => {
    if (payload.value === null)
      return payload;
    return def.innerType._zod.run(payload, ctx2);
  };
});
var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  inst._zod.parse = (payload, ctx2) => {
    if (ctx2.direction === "backward") {
      return def.innerType._zod.run(payload, ctx2);
    }
    if (payload.value === void 0) {
      payload.value = def.defaultValue;
      return payload;
    }
    const result = def.innerType._zod.run(payload, ctx2);
    if (result instanceof Promise) {
      return result.then((result2) => handleDefaultResult(result2, def));
    }
    return handleDefaultResult(result, def);
  };
});
function handleDefaultResult(payload, def) {
  if (payload.value === void 0) {
    payload.value = def.defaultValue;
  }
  return payload;
}
var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  inst._zod.parse = (payload, ctx2) => {
    if (ctx2.direction === "backward") {
      return def.innerType._zod.run(payload, ctx2);
    }
    if (payload.value === void 0) {
      payload.value = def.defaultValue;
    }
    return def.innerType._zod.run(payload, ctx2);
  };
});
var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "values", () => {
    const v = def.innerType._zod.values;
    return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
  });
  inst._zod.parse = (payload, ctx2) => {
    const result = def.innerType._zod.run(payload, ctx2);
    if (result instanceof Promise) {
      return result.then((result2) => handleNonOptionalResult(result2, inst));
    }
    return handleNonOptionalResult(result, inst);
  };
});
function handleNonOptionalResult(payload, inst) {
  if (!payload.issues.length && payload.value === void 0) {
    payload.issues.push({
      code: "invalid_type",
      expected: "nonoptional",
      input: payload.value,
      inst
    });
  }
  return payload;
}
var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx2) => {
    if (ctx2.direction === "backward") {
      throw new $ZodEncodeError("ZodSuccess");
    }
    const result = def.innerType._zod.run(payload, ctx2);
    if (result instanceof Promise) {
      return result.then((result2) => {
        payload.value = result2.issues.length === 0;
        return payload;
      });
    }
    payload.value = result.issues.length === 0;
    return payload;
  };
});
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.optin = "optional";
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  inst._zod.parse = (payload, ctx2) => {
    if (ctx2.direction === "backward") {
      return def.innerType._zod.run(payload, ctx2);
    }
    const result = def.innerType._zod.run(payload, ctx2);
    if (result instanceof Promise) {
      return result.then((result2) => {
        payload.value = result2.value;
        if (result2.issues.length) {
          payload.value = def.catchValue({
            ...payload,
            error: {
              issues: result2.issues.map((iss) => finalizeIssue(iss, ctx2, config()))
            },
            input: payload.value
          });
          payload.issues = [];
          payload.fallback = true;
        }
        return payload;
      });
    }
    payload.value = result.value;
    if (result.issues.length) {
      payload.value = def.catchValue({
        ...payload,
        error: {
          issues: result.issues.map((iss) => finalizeIssue(iss, ctx2, config()))
        },
        input: payload.value
      });
      payload.issues = [];
      payload.fallback = true;
    }
    return payload;
  };
});
var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _ctx) => {
    if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
      payload.issues.push({
        input: payload.value,
        inst,
        expected: "nan",
        code: "invalid_type"
      });
      return payload;
    }
    return payload;
  };
});
var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "values", () => def.in._zod.values);
  defineLazy(inst._zod, "optin", () => def.in._zod.optin);
  defineLazy(inst._zod, "optout", () => def.out._zod.optout);
  defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
  inst._zod.parse = (payload, ctx2) => {
    if (ctx2.direction === "backward") {
      const right = def.out._zod.run(payload, ctx2);
      if (right instanceof Promise) {
        return right.then((right2) => handlePipeResult(right2, def.in, ctx2));
      }
      return handlePipeResult(right, def.in, ctx2);
    }
    const left = def.in._zod.run(payload, ctx2);
    if (left instanceof Promise) {
      return left.then((left2) => handlePipeResult(left2, def.out, ctx2));
    }
    return handlePipeResult(left, def.out, ctx2);
  };
});
function handlePipeResult(left, next, ctx2) {
  if (left.issues.length) {
    left.aborted = true;
    return left;
  }
  return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx2);
}
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "values", () => def.in._zod.values);
  defineLazy(inst._zod, "optin", () => def.in._zod.optin);
  defineLazy(inst._zod, "optout", () => def.out._zod.optout);
  defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
  inst._zod.parse = (payload, ctx2) => {
    const direction = ctx2.direction || "forward";
    if (direction === "forward") {
      const left = def.in._zod.run(payload, ctx2);
      if (left instanceof Promise) {
        return left.then((left2) => handleCodecAResult(left2, def, ctx2));
      }
      return handleCodecAResult(left, def, ctx2);
    } else {
      const right = def.out._zod.run(payload, ctx2);
      if (right instanceof Promise) {
        return right.then((right2) => handleCodecAResult(right2, def, ctx2));
      }
      return handleCodecAResult(right, def, ctx2);
    }
  };
});
function handleCodecAResult(result, def, ctx2) {
  if (result.issues.length) {
    result.aborted = true;
    return result;
  }
  const direction = ctx2.direction || "forward";
  if (direction === "forward") {
    const transformed = def.transform(result.value, result);
    if (transformed instanceof Promise) {
      return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx2));
    }
    return handleCodecTxResult(result, transformed, def.out, ctx2);
  } else {
    const transformed = def.reverseTransform(result.value, result);
    if (transformed instanceof Promise) {
      return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx2));
    }
    return handleCodecTxResult(result, transformed, def.in, ctx2);
  }
}
function handleCodecTxResult(left, value, nextSchema, ctx2) {
  if (left.issues.length) {
    left.aborted = true;
    return left;
  }
  return nextSchema._zod.run({ value, issues: left.issues }, ctx2);
}
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
  $ZodPipe.init(inst, def);
});
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
  defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
  defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
  inst._zod.parse = (payload, ctx2) => {
    if (ctx2.direction === "backward") {
      return def.innerType._zod.run(payload, ctx2);
    }
    const result = def.innerType._zod.run(payload, ctx2);
    if (result instanceof Promise) {
      return result.then(handleReadonlyResult);
    }
    return handleReadonlyResult(result);
  };
});
function handleReadonlyResult(payload) {
  payload.value = Object.freeze(payload.value);
  return payload;
}
var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => {
  $ZodType.init(inst, def);
  const regexParts = [];
  for (const part of def.parts) {
    if (typeof part === "object" && part !== null) {
      if (!part._zod.pattern) {
        throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
      }
      const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
      if (!source)
        throw new Error(`Invalid template literal part: ${part._zod.traits}`);
      const start = source.startsWith("^") ? 1 : 0;
      const end = source.endsWith("$") ? source.length - 1 : source.length;
      regexParts.push(source.slice(start, end));
    } else if (part === null || primitiveTypes.has(typeof part)) {
      regexParts.push(escapeRegex(`${part}`));
    } else {
      throw new Error(`Invalid template literal part: ${part}`);
    }
  }
  inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
  inst._zod.parse = (payload, _ctx) => {
    if (typeof payload.value !== "string") {
      payload.issues.push({
        input: payload.value,
        inst,
        expected: "string",
        code: "invalid_type"
      });
      return payload;
    }
    inst._zod.pattern.lastIndex = 0;
    if (!inst._zod.pattern.test(payload.value)) {
      payload.issues.push({
        input: payload.value,
        inst,
        code: "invalid_format",
        format: def.format ?? "template_literal",
        pattern: inst._zod.pattern.source
      });
      return payload;
    }
    return payload;
  };
});
var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
  $ZodType.init(inst, def);
  inst._def = def;
  inst._zod.def = def;
  inst.implement = (func) => {
    if (typeof func !== "function") {
      throw new Error("implement() must be called with a function");
    }
    return function(...args) {
      const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
      const result = Reflect.apply(func, this, parsedArgs);
      if (inst._def.output) {
        return parse(inst._def.output, result);
      }
      return result;
    };
  };
  inst.implementAsync = (func) => {
    if (typeof func !== "function") {
      throw new Error("implementAsync() must be called with a function");
    }
    return async function(...args) {
      const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
      const result = await Reflect.apply(func, this, parsedArgs);
      if (inst._def.output) {
        return await parseAsync(inst._def.output, result);
      }
      return result;
    };
  };
  inst._zod.parse = (payload, _ctx) => {
    if (typeof payload.value !== "function") {
      payload.issues.push({
        code: "invalid_type",
        expected: "function",
        input: payload.value,
        inst
      });
      return payload;
    }
    const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
    if (hasPromiseOutput) {
      payload.value = inst.implementAsync(payload.value);
    } else {
      payload.value = inst.implement(payload.value);
    }
    return payload;
  };
  inst.input = (...args) => {
    const F = inst.constructor;
    if (Array.isArray(args[0])) {
      return new F({
        type: "function",
        input: new $ZodTuple({
          type: "tuple",
          items: args[0],
          rest: args[1]
        }),
        output: inst._def.output
      });
    }
    return new F({
      type: "function",
      input: args[0],
      output: inst._def.output
    });
  };
  inst.output = (output) => {
    const F = inst.constructor;
    return new F({
      type: "function",
      input: inst._def.input,
      output
    });
  };
  return inst;
});
var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, ctx2) => {
    return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx2));
  };
});
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
  $ZodType.init(inst, def);
  defineLazy(inst._zod, "innerType", () => {
    const d = def;
    if (!d._cachedInner)
      d._cachedInner = def.getter();
    return d._cachedInner;
  });
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
  defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
  inst._zod.parse = (payload, ctx2) => {
    const inner = inst._zod.innerType;
    return inner._zod.run(payload, ctx2);
  };
});
var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
  $ZodCheck.init(inst, def);
  $ZodType.init(inst, def);
  inst._zod.parse = (payload, _) => {
    return payload;
  };
  inst._zod.check = (payload) => {
    const input = payload.value;
    const r = def.fn(input);
    if (r instanceof Promise) {
      return r.then((r3) => handleRefineResult(r3, payload, input, inst));
    }
    handleRefineResult(r, payload, input, inst);
    return;
  };
});
function handleRefineResult(result, payload, input, inst) {
  if (!result) {
    const _iss = {
      code: "custom",
      input,
      inst,
      // incorporates params.error into issue reporting
      path: [...inst._zod.def.path ?? []],
      // incorporates params.error into issue reporting
      continue: !inst._zod.def.abort
      // params: inst._zod.def.params,
    };
    if (inst._zod.def.params)
      _iss.params = inst._zod.def.params;
    payload.issues.push(issue(_iss));
  }
}

// node_modules/zod/v4/locales/index.js
var locales_exports = {};
__export(locales_exports, {
  ar: () => ar_default,
  az: () => az_default,
  be: () => be_default,
  bg: () => bg_default,
  ca: () => ca_default,
  cs: () => cs_default,
  da: () => da_default,
  de: () => de_default,
  el: () => el_default,
  en: () => en_default2,
  eo: () => eo_default,
  es: () => es_default,
  fa: () => fa_default,
  fi: () => fi_default,
  fr: () => fr_default,
  frCA: () => fr_CA_default,
  he: () => he_default,
  hr: () => hr_default,
  hu: () => hu_default,
  hy: () => hy_default,
  id: () => id_default,
  is: () => is_default,
  it: () => it_default,
  ja: () => ja_default,
  ka: () => ka_default,
  kh: () => kh_default,
  km: () => km_default,
  ko: () => ko_default,
  lt: () => lt_default,
  mk: () => mk_default,
  ms: () => ms_default,
  nl: () => nl_default,
  no: () => no_default,
  ota: () => ota_default,
  pl: () => pl_default,
  ps: () => ps_default,
  pt: () => pt_default,
  ro: () => ro_default,
  ru: () => ru_default,
  sl: () => sl_default,
  sv: () => sv_default,
  ta: () => ta_default,
  th: () => th_default,
  tr: () => tr_default,
  ua: () => ua_default,
  uk: () => uk_default,
  ur: () => ur_default,
  uz: () => uz_default,
  vi: () => vi_default,
  yo: () => yo_default,
  zhCN: () => zh_CN_default,
  zhTW: () => zh_TW_default
});

// node_modules/zod/v4/locales/ar.js
var error = () => {
  const Sizable = {
    string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
    file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
    array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
    set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0645\u062F\u062E\u0644",
    email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
    url: "\u0631\u0627\u0628\u0637",
    emoji: "\u0625\u064A\u0645\u0648\u062C\u064A",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
    date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
    time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
    duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",
    ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4",
    ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6",
    cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",
    cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",
    base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",
    base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",
    json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
    e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
    jwt: "JWT",
    template_literal: "\u0645\u062F\u062E\u0644"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;
        }
        return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`;
        return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`;
        return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`;
        if (_issue.format === "ends_with")
          return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`;
      }
      case "not_multiple_of":
        return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`;
      case "invalid_key":
        return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`;
      case "invalid_union":
        return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";
      case "invalid_element":
        return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`;
      default:
        return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";
    }
  };
};
function ar_default() {
  return {
    localeError: error()
  };
}

// node_modules/zod/v4/locales/az.js
var error2 = () => {
  const Sizable = {
    string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
    file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
    array: { unit: "element", verb: "olmal\u0131d\u0131r" },
    set: { unit: "element", verb: "olmal\u0131d\u0131r" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "email address",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datetime",
    date: "ISO date",
    time: "ISO time",
    duration: "ISO duration",
    ipv4: "IPv4 address",
    ipv6: "IPv6 address",
    cidrv4: "IPv4 range",
    cidrv6: "IPv6 range",
    base64: "base64-encoded string",
    base64url: "base64url-encoded string",
    json_string: "JSON string",
    e164: "E.164 number",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue2.expected}, daxil olan ${received}`;
        }
        return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`;
        return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`;
        return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`;
        if (_issue.format === "ends_with")
          return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`;
        if (_issue.format === "includes")
          return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`;
        if (_issue.format === "regex")
          return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;
        return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;
      case "unrecognized_keys":
        return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;
      case "invalid_union":
        return "Yanl\u0131\u015F d\u0259y\u0259r";
      case "invalid_element":
        return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;
      default:
        return `Yanl\u0131\u015F d\u0259y\u0259r`;
    }
  };
};
function az_default() {
  return {
    localeError: error2()
  };
}

// node_modules/zod/v4/locales/be.js
function getBelarusianPlural(count, one, few, many) {
  const absCount = Math.abs(count);
  const lastDigit = absCount % 10;
  const lastTwoDigits = absCount % 100;
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
    return many;
  }
  if (lastDigit === 1) {
    return one;
  }
  if (lastDigit >= 2 && lastDigit <= 4) {
    return few;
  }
  return many;
}
var error3 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "\u0441\u0456\u043C\u0432\u0430\u043B",
        few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B",
        many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"
      },
      verb: "\u043C\u0435\u0446\u044C"
    },
    array: {
      unit: {
        one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
        few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",
        many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"
      },
      verb: "\u043C\u0435\u0446\u044C"
    },
    set: {
      unit: {
        one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
        few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",
        many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"
      },
      verb: "\u043C\u0435\u0446\u044C"
    },
    file: {
      unit: {
        one: "\u0431\u0430\u0439\u0442",
        few: "\u0431\u0430\u0439\u0442\u044B",
        many: "\u0431\u0430\u0439\u0442\u0430\u045E"
      },
      verb: "\u043C\u0435\u0446\u044C"
    }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0443\u0432\u043E\u0434",
    email: "email \u0430\u0434\u0440\u0430\u0441",
    url: "URL",
    emoji: "\u044D\u043C\u043E\u0434\u0437\u0456",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",
    date: "ISO \u0434\u0430\u0442\u0430",
    time: "ISO \u0447\u0430\u0441",
    duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",
    ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441",
    ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441",
    cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",
    cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",
    base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",
    base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",
    json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
    e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
    jwt: "JWT",
    template_literal: "\u0443\u0432\u043E\u0434"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u043B\u0456\u043A",
    array: "\u043C\u0430\u0441\u0456\u045E"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;
        }
        return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`;
        return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const maxValue = Number(issue2.maximum);
          const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`;
        }
        return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const minValue = Number(issue2.minimum);
          const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`;
        }
        return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;
        return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`;
      case "invalid_union":
        return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";
      case "invalid_element":
        return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`;
      default:
        return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`;
    }
  };
};
function be_default() {
  return {
    localeError: error3()
  };
}

// node_modules/zod/v4/locales/bg.js
var error4 = () => {
  const Sizable = {
    string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
    file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
    array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
    set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0432\u0445\u043E\u0434",
    email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",
    url: "URL",
    emoji: "\u0435\u043C\u043E\u0434\u0436\u0438",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u0432\u0440\u0435\u043C\u0435",
    date: "ISO \u0434\u0430\u0442\u0430",
    time: "ISO \u0432\u0440\u0435\u043C\u0435",
    duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",
    ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441",
    ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441",
    cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
    cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
    base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",
    base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",
    json_string: "JSON \u043D\u0438\u0437",
    e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
    jwt: "JWT",
    template_literal: "\u0432\u0445\u043E\u0434"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0447\u0438\u0441\u043B\u043E",
    array: "\u043C\u0430\u0441\u0438\u0432"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;
        }
        return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`;
        return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`;
        return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`;
        let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";
        if (_issue.format === "emoji")
          invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";
        if (_issue.format === "datetime")
          invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";
        if (_issue.format === "date")
          invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";
        if (_issue.format === "time")
          invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";
        if (_issue.format === "duration")
          invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";
        return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`;
      case "invalid_union":
        return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";
      case "invalid_element":
        return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`;
      default:
        return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`;
    }
  };
};
function bg_default() {
  return {
    localeError: error4()
  };
}

// node_modules/zod/v4/locales/ca.js
var error5 = () => {
  const Sizable = {
    string: { unit: "car\xE0cters", verb: "contenir" },
    file: { unit: "bytes", verb: "contenir" },
    array: { unit: "elements", verb: "contenir" },
    set: { unit: "elements", verb: "contenir" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entrada",
    email: "adre\xE7a electr\xF2nica",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data i hora ISO",
    date: "data ISO",
    time: "hora ISO",
    duration: "durada ISO",
    ipv4: "adre\xE7a IPv4",
    ipv6: "adre\xE7a IPv6",
    cidrv4: "rang IPv4",
    cidrv6: "rang IPv6",
    base64: "cadena codificada en base64",
    base64url: "cadena codificada en base64url",
    json_string: "cadena JSON",
    e164: "n\xFAmero E.164",
    jwt: "JWT",
    template_literal: "entrada"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Tipus inv\xE0lid: s'esperava instanceof ${issue2.expected}, s'ha rebut ${received}`;
        }
        return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`;
        return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`;
        return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`;
        return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Clau inv\xE0lida a ${issue2.origin}`;
      case "invalid_union":
        return "Entrada inv\xE0lida";
      // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general
      case "invalid_element":
        return `Element inv\xE0lid a ${issue2.origin}`;
      default:
        return `Entrada inv\xE0lida`;
    }
  };
};
function ca_default() {
  return {
    localeError: error5()
  };
}

// node_modules/zod/v4/locales/cs.js
var error6 = () => {
  const Sizable = {
    string: { unit: "znak\u016F", verb: "m\xEDt" },
    file: { unit: "bajt\u016F", verb: "m\xEDt" },
    array: { unit: "prvk\u016F", verb: "m\xEDt" },
    set: { unit: "prvk\u016F", verb: "m\xEDt" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "regul\xE1rn\xED v\xFDraz",
    email: "e-mailov\xE1 adresa",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "datum a \u010Das ve form\xE1tu ISO",
    date: "datum ve form\xE1tu ISO",
    time: "\u010Das ve form\xE1tu ISO",
    duration: "doba trv\xE1n\xED ISO",
    ipv4: "IPv4 adresa",
    ipv6: "IPv6 adresa",
    cidrv4: "rozsah IPv4",
    cidrv6: "rozsah IPv6",
    base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",
    base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",
    json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
    e164: "\u010D\xEDslo E.164",
    jwt: "JWT",
    template_literal: "vstup"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u010D\xEDslo",
    string: "\u0159et\u011Bzec",
    function: "funkce",
    array: "pole"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue2.expected}, obdr\u017Eeno ${received}`;
        }
        return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`;
        return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`;
        }
        return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`;
        }
        return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`;
        return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`;
      case "invalid_union":
        return "Neplatn\xFD vstup";
      case "invalid_element":
        return `Neplatn\xE1 hodnota v ${issue2.origin}`;
      default:
        return `Neplatn\xFD vstup`;
    }
  };
};
function cs_default() {
  return {
    localeError: error6()
  };
}

// node_modules/zod/v4/locales/da.js
var error7 = () => {
  const Sizable = {
    string: { unit: "tegn", verb: "havde" },
    file: { unit: "bytes", verb: "havde" },
    array: { unit: "elementer", verb: "indeholdt" },
    set: { unit: "elementer", verb: "indeholdt" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "e-mailadresse",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO dato- og klokkesl\xE6t",
    date: "ISO-dato",
    time: "ISO-klokkesl\xE6t",
    duration: "ISO-varighed",
    ipv4: "IPv4-omr\xE5de",
    ipv6: "IPv6-omr\xE5de",
    cidrv4: "IPv4-spektrum",
    cidrv6: "IPv6-spektrum",
    base64: "base64-kodet streng",
    base64url: "base64url-kodet streng",
    json_string: "JSON-streng",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    string: "streng",
    number: "tal",
    boolean: "boolean",
    array: "liste",
    object: "objekt",
    set: "s\xE6t",
    file: "fil"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ugyldigt input: forventede instanceof ${issue2.expected}, fik ${received}`;
        }
        return `Ugyldigt input: forventede ${expected}, fik ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`;
        return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing)
          return `For stor: forventede ${origin ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
        return `For stor: forventede ${origin ?? "value"} havde ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing) {
          return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `For lille: forventede ${origin} havde ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ugyldig streng: skal starte med "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Ugyldig streng: skal ende med "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ugyldig streng: skal indeholde "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`;
        return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ugyldig n\xF8gle i ${issue2.origin}`;
      case "invalid_union":
        return "Ugyldigt input: matcher ingen af de tilladte typer";
      case "invalid_element":
        return `Ugyldig v\xE6rdi i ${issue2.origin}`;
      default:
        return `Ugyldigt input`;
    }
  };
};
function da_default() {
  return {
    localeError: error7()
  };
}

// node_modules/zod/v4/locales/de.js
var error8 = () => {
  const Sizable = {
    string: { unit: "Zeichen", verb: "zu haben" },
    file: { unit: "Bytes", verb: "zu haben" },
    array: { unit: "Elemente", verb: "zu haben" },
    set: { unit: "Elemente", verb: "zu haben" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "Eingabe",
    email: "E-Mail-Adresse",
    url: "URL",
    emoji: "Emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-Datum und -Uhrzeit",
    date: "ISO-Datum",
    time: "ISO-Uhrzeit",
    duration: "ISO-Dauer",
    ipv4: "IPv4-Adresse",
    ipv6: "IPv6-Adresse",
    cidrv4: "IPv4-Bereich",
    cidrv6: "IPv6-Bereich",
    base64: "Base64-codierter String",
    base64url: "Base64-URL-codierter String",
    json_string: "JSON-String",
    e164: "E.164-Nummer",
    jwt: "JWT",
    template_literal: "Eingabe"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "Zahl",
    array: "Array"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ung\xFCltige Eingabe: erwartet instanceof ${issue2.expected}, erhalten ${received}`;
        }
        return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`;
        return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`;
        return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`;
        }
        return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`;
        if (_issue.format === "ends_with")
          return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`;
        if (_issue.format === "includes")
          return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`;
        if (_issue.format === "regex")
          return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`;
        return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`;
      case "invalid_union":
        return "Ung\xFCltige Eingabe";
      case "invalid_element":
        return `Ung\xFCltiger Wert in ${issue2.origin}`;
      default:
        return `Ung\xFCltige Eingabe`;
    }
  };
};
function de_default() {
  return {
    localeError: error8()
  };
}

// node_modules/zod/v4/locales/el.js
var error9 = () => {
  const Sizable = {
    string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
    file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
    array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
    set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
    map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
    email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
    date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
    time: "ISO \u03CE\u03C1\u03B1",
    duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
    ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
    ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
    mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
    cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
    cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
    base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
    base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
    json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
    e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
    jwt: "JWT",
    template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
        }
        return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
        return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
        return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
        return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
      case "invalid_union":
        return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
      case "invalid_element":
        return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
      default:
        return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
    }
  };
};
function el_default() {
  return {
    localeError: error9()
  };
}

// node_modules/zod/v4/locales/en.js
var error10 = () => {
  const Sizable = {
    string: { unit: "characters", verb: "to have" },
    file: { unit: "bytes", verb: "to have" },
    array: { unit: "items", verb: "to have" },
    set: { unit: "items", verb: "to have" },
    map: { unit: "entries", verb: "to have" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "email address",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datetime",
    date: "ISO date",
    time: "ISO time",
    duration: "ISO duration",
    ipv4: "IPv4 address",
    ipv6: "IPv6 address",
    mac: "MAC address",
    cidrv4: "IPv4 range",
    cidrv6: "IPv6 range",
    base64: "base64-encoded string",
    base64url: "base64url-encoded string",
    json_string: "JSON string",
    e164: "E.164 number",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    // Compatibility: "nan" -> "NaN" for display
    nan: "NaN"
    // All other type names omitted - they fall back to raw values via ?? operator
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        return `Invalid input: expected ${expected}, received ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
        return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`;
        return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Invalid string: must start with "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Invalid string: must end with "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Invalid string: must include "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Invalid string: must match pattern ${_issue.pattern}`;
        return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Invalid number: must be a multiple of ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Invalid key in ${issue2.origin}`;
      case "invalid_union":
        if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
          const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
          return `Invalid discriminator value. Expected ${opts}`;
        }
        return "Invalid input";
      case "invalid_element":
        return `Invalid value in ${issue2.origin}`;
      default:
        return `Invalid input`;
    }
  };
};
function en_default2() {
  return {
    localeError: error10()
  };
}

// node_modules/zod/v4/locales/eo.js
var error11 = () => {
  const Sizable = {
    string: { unit: "karaktrojn", verb: "havi" },
    file: { unit: "bajtojn", verb: "havi" },
    array: { unit: "elementojn", verb: "havi" },
    set: { unit: "elementojn", verb: "havi" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "enigo",
    email: "retadreso",
    url: "URL",
    emoji: "emo\u011Dio",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-datotempo",
    date: "ISO-dato",
    time: "ISO-tempo",
    duration: "ISO-da\u016Dro",
    ipv4: "IPv4-adreso",
    ipv6: "IPv6-adreso",
    cidrv4: "IPv4-rango",
    cidrv6: "IPv6-rango",
    base64: "64-ume kodita karaktraro",
    base64url: "URL-64-ume kodita karaktraro",
    json_string: "JSON-karaktraro",
    e164: "E.164-nombro",
    jwt: "JWT",
    template_literal: "enigo"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "nombro",
    array: "tabelo",
    null: "senvalora"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Nevalida enigo: atendi\u011Dis instanceof ${issue2.expected}, ricevi\u011Dis ${received}`;
        }
        return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`;
        return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
        return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
        return `Nevalida ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Nevalida \u015Dlosilo en ${issue2.origin}`;
      case "invalid_union":
        return "Nevalida enigo";
      case "invalid_element":
        return `Nevalida valoro en ${issue2.origin}`;
      default:
        return `Nevalida enigo`;
    }
  };
};
function eo_default() {
  return {
    localeError: error11()
  };
}

// node_modules/zod/v4/locales/es.js
var error12 = () => {
  const Sizable = {
    string: { unit: "caracteres", verb: "tener" },
    file: { unit: "bytes", verb: "tener" },
    array: { unit: "elementos", verb: "tener" },
    set: { unit: "elementos", verb: "tener" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entrada",
    email: "direcci\xF3n de correo electr\xF3nico",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "fecha y hora ISO",
    date: "fecha ISO",
    time: "hora ISO",
    duration: "duraci\xF3n ISO",
    ipv4: "direcci\xF3n IPv4",
    ipv6: "direcci\xF3n IPv6",
    cidrv4: "rango IPv4",
    cidrv6: "rango IPv6",
    base64: "cadena codificada en base64",
    base64url: "URL codificada en base64",
    json_string: "cadena JSON",
    e164: "n\xFAmero E.164",
    jwt: "JWT",
    template_literal: "entrada"
  };
  const TypeDictionary = {
    nan: "NaN",
    string: "texto",
    number: "n\xFAmero",
    boolean: "booleano",
    array: "arreglo",
    object: "objeto",
    set: "conjunto",
    file: "archivo",
    date: "fecha",
    bigint: "n\xFAmero grande",
    symbol: "s\xEDmbolo",
    undefined: "indefinido",
    null: "nulo",
    function: "funci\xF3n",
    map: "mapa",
    record: "registro",
    tuple: "tupla",
    enum: "enumeraci\xF3n",
    union: "uni\xF3n",
    literal: "literal",
    promise: "promesa",
    void: "vac\xEDo",
    never: "nunca",
    unknown: "desconocido",
    any: "cualquiera"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Entrada inv\xE1lida: se esperaba instanceof ${issue2.expected}, recibido ${received}`;
        }
        return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`;
        return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing)
          return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
        return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing) {
          return `Demasiado peque\xF1o: se esperaba que ${origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Demasiado peque\xF1o: se esperaba que ${origin} fuera ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`;
        return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Llave inv\xE1lida en ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
      case "invalid_union":
        return "Entrada inv\xE1lida";
      case "invalid_element":
        return `Valor inv\xE1lido en ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
      default:
        return `Entrada inv\xE1lida`;
    }
  };
};
function es_default() {
  return {
    localeError: error12()
  };
}

// node_modules/zod/v4/locales/fa.js
var error13 = () => {
  const Sizable = {
    string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
    file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
    array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
    set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0648\u0631\u0648\u062F\u06CC",
    email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",
    url: "URL",
    emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",
    date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",
    time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",
    duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",
    ipv4: "IPv4 \u0622\u062F\u0631\u0633",
    ipv6: "IPv6 \u0622\u062F\u0631\u0633",
    cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647",
    cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647",
    base64: "base64-encoded \u0631\u0634\u062A\u0647",
    base64url: "base64url-encoded \u0631\u0634\u062A\u0647",
    json_string: "JSON \u0631\u0634\u062A\u0647",
    e164: "E.164 \u0639\u062F\u062F",
    jwt: "JWT",
    template_literal: "\u0648\u0631\u0648\u062F\u06CC"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0639\u062F\u062F",
    array: "\u0622\u0631\u0627\u06CC\u0647"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;
        }
        return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;
      }
      case "invalid_value":
        if (issue2.values.length === 1) {
          return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;
        }
        return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`;
        }
        return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`;
        }
        return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;
        }
        if (_issue.format === "ends_with") {
          return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;
        }
        if (_issue.format === "includes") {
          return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`;
        }
        if (_issue.format === "regex") {
          return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;
        }
        return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;
      }
      case "not_multiple_of":
        return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`;
      case "unrecognized_keys":
        return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`;
      case "invalid_union":
        return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;
      case "invalid_element":
        return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`;
      default:
        return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;
    }
  };
};
function fa_default() {
  return {
    localeError: error13()
  };
}

// node_modules/zod/v4/locales/fi.js
var error14 = () => {
  const Sizable = {
    string: { unit: "merkki\xE4", subject: "merkkijonon" },
    file: { unit: "tavua", subject: "tiedoston" },
    array: { unit: "alkiota", subject: "listan" },
    set: { unit: "alkiota", subject: "joukon" },
    number: { unit: "", subject: "luvun" },
    bigint: { unit: "", subject: "suuren kokonaisluvun" },
    int: { unit: "", subject: "kokonaisluvun" },
    date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "s\xE4\xE4nn\xF6llinen lauseke",
    email: "s\xE4hk\xF6postiosoite",
    url: "URL-osoite",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-aikaleima",
    date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",
    time: "ISO-aika",
    duration: "ISO-kesto",
    ipv4: "IPv4-osoite",
    ipv6: "IPv6-osoite",
    cidrv4: "IPv4-alue",
    cidrv6: "IPv6-alue",
    base64: "base64-koodattu merkkijono",
    base64url: "base64url-koodattu merkkijono",
    json_string: "JSON-merkkijono",
    e164: "E.164-luku",
    jwt: "JWT",
    template_literal: "templaattimerkkijono"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Virheellinen tyyppi: odotettiin instanceof ${issue2.expected}, oli ${received}`;
        }
        return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`;
        return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim();
        }
        return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim();
        }
        return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`;
        if (_issue.format === "regex") {
          return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`;
        }
        return `Virheellinen ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return "Virheellinen avain tietueessa";
      case "invalid_union":
        return "Virheellinen unioni";
      case "invalid_element":
        return "Virheellinen arvo joukossa";
      default:
        return `Virheellinen sy\xF6te`;
    }
  };
};
function fi_default() {
  return {
    localeError: error14()
  };
}

// node_modules/zod/v4/locales/fr.js
var error15 = () => {
  const Sizable = {
    string: { unit: "caract\xE8res", verb: "avoir" },
    file: { unit: "octets", verb: "avoir" },
    array: { unit: "\xE9l\xE9ments", verb: "avoir" },
    set: { unit: "\xE9l\xE9ments", verb: "avoir" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entr\xE9e",
    email: "adresse e-mail",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "date et heure ISO",
    date: "date ISO",
    time: "heure ISO",
    duration: "dur\xE9e ISO",
    ipv4: "adresse IPv4",
    ipv6: "adresse IPv6",
    cidrv4: "plage IPv4",
    cidrv6: "plage IPv6",
    base64: "cha\xEEne encod\xE9e en base64",
    base64url: "cha\xEEne encod\xE9e en base64url",
    json_string: "cha\xEEne JSON",
    e164: "num\xE9ro E.164",
    jwt: "JWT",
    template_literal: "entr\xE9e"
  };
  const TypeDictionary = {
    string: "cha\xEEne",
    number: "nombre",
    int: "entier",
    boolean: "bool\xE9en",
    bigint: "grand entier",
    symbol: "symbole",
    undefined: "ind\xE9fini",
    null: "null",
    never: "jamais",
    void: "vide",
    date: "date",
    array: "tableau",
    object: "objet",
    tuple: "tuple",
    record: "enregistrement",
    map: "carte",
    set: "ensemble",
    file: "fichier",
    nonoptional: "non-optionnel",
    nan: "NaN",
    function: "fonction"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Entr\xE9e invalide : instanceof ${issue2.expected} attendu, ${received} re\xE7u`;
        }
        return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`;
        return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
        return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`;
      }
      case "not_multiple_of":
        return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Cl\xE9 invalide dans ${issue2.origin}`;
      case "invalid_union":
        return "Entr\xE9e invalide";
      case "invalid_element":
        return `Valeur invalide dans ${issue2.origin}`;
      default:
        return `Entr\xE9e invalide`;
    }
  };
};
function fr_default() {
  return {
    localeError: error15()
  };
}

// node_modules/zod/v4/locales/fr-CA.js
var error16 = () => {
  const Sizable = {
    string: { unit: "caract\xE8res", verb: "avoir" },
    file: { unit: "octets", verb: "avoir" },
    array: { unit: "\xE9l\xE9ments", verb: "avoir" },
    set: { unit: "\xE9l\xE9ments", verb: "avoir" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "entr\xE9e",
    email: "adresse courriel",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "date-heure ISO",
    date: "date ISO",
    time: "heure ISO",
    duration: "dur\xE9e ISO",
    ipv4: "adresse IPv4",
    ipv6: "adresse IPv6",
    cidrv4: "plage IPv4",
    cidrv6: "plage IPv6",
    base64: "cha\xEEne encod\xE9e en base64",
    base64url: "cha\xEEne encod\xE9e en base64url",
    json_string: "cha\xEEne JSON",
    e164: "num\xE9ro E.164",
    jwt: "JWT",
    template_literal: "entr\xE9e"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Entr\xE9e invalide : attendu instanceof ${issue2.expected}, re\xE7u ${received}`;
        }
        return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`;
        return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "\u2264" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
        return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "\u2265" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`;
      }
      case "not_multiple_of":
        return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Cl\xE9 invalide dans ${issue2.origin}`;
      case "invalid_union":
        return "Entr\xE9e invalide";
      case "invalid_element":
        return `Valeur invalide dans ${issue2.origin}`;
      default:
        return `Entr\xE9e invalide`;
    }
  };
};
function fr_CA_default() {
  return {
    localeError: error16()
  };
}

// node_modules/zod/v4/locales/he.js
var error17 = () => {
  const TypeNames = {
    string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
    number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
    boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" },
    bigint: { label: "BigInt", gender: "m" },
    date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" },
    array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" },
    object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" },
    null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" },
    undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" },
    symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" },
    function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" },
    map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" },
    set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" },
    file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" },
    promise: { label: "Promise", gender: "m" },
    NaN: { label: "NaN", gender: "m" },
    unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" },
    value: { label: "\u05E2\u05E8\u05DA", gender: "m" }
  };
  const Sizable = {
    string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" },
    file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
    array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
    set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" },
    number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
    // no unit
  };
  const typeEntry = (t) => t ? TypeNames[t] : void 0;
  const typeLabel = (t) => {
    const e = typeEntry(t);
    if (e)
      return e.label;
    return t ?? TypeNames.unknown.label;
  };
  const withDefinite = (t) => `\u05D4${typeLabel(t)}`;
  const verbFor = (t) => {
    const e = typeEntry(t);
    const gender = e?.gender ?? "m";
    return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
  };
  const getSizing = (origin) => {
    if (!origin)
      return null;
    return Sizable[origin] ?? null;
  };
  const FormatDictionary = {
    regex: { label: "\u05E7\u05DC\u05D8", gender: "m" },
    email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" },
    url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" },
    emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" },
    uuid: { label: "UUID", gender: "m" },
    nanoid: { label: "nanoid", gender: "m" },
    guid: { label: "GUID", gender: "m" },
    cuid: { label: "cuid", gender: "m" },
    cuid2: { label: "cuid2", gender: "m" },
    ulid: { label: "ULID", gender: "m" },
    xid: { label: "XID", gender: "m" },
    ksuid: { label: "KSUID", gender: "m" },
    datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" },
    date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" },
    time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" },
    duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" },
    ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" },
    ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" },
    cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" },
    cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" },
    base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" },
    base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" },
    json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
    e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
    jwt: { label: "JWT", gender: "m" },
    ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
    includes: { label: "\u05E7\u05DC\u05D8", gender: "m" },
    lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" },
    starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
    uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expectedKey = issue2.expected;
        const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey);
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;
        }
        return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;
      }
      case "invalid_value": {
        if (issue2.values.length === 1) {
          return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`;
        }
        const stringified = issue2.values.map((v) => stringifyPrimitive(v));
        if (issue2.values.length === 2) {
          return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;
        }
        const lastValue = stringified[stringified.length - 1];
        const restValues = stringified.slice(0, -1).join(", ");
        return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`;
      }
      case "too_big": {
        const sizing = getSizing(issue2.origin);
        const subject = withDefinite(issue2.origin ?? "value");
        if (issue2.origin === "string") {
          return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();
        }
        if (issue2.origin === "number") {
          const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`;
          return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;
        }
        if (issue2.origin === "array" || issue2.origin === "set") {
          const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
          const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`;
          return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
        }
        const adj = issue2.inclusive ? "<=" : "<";
        const be = verbFor(issue2.origin ?? "value");
        if (sizing?.unit) {
          return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
        }
        return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const sizing = getSizing(issue2.origin);
        const subject = withDefinite(issue2.origin ?? "value");
        if (issue2.origin === "string") {
          return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();
        }
        if (issue2.origin === "number") {
          const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`;
          return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;
        }
        if (issue2.origin === "array" || issue2.origin === "set") {
          const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
          if (issue2.minimum === 1 && issue2.inclusive) {
            const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3";
            return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;
          }
          const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`;
          return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();
        }
        const adj = issue2.inclusive ? ">=" : ">";
        const be = verbFor(issue2.origin ?? "value");
        if (sizing?.unit) {
          return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;
        const nounEntry = FormatDictionary[_issue.format];
        const noun = nounEntry?.label ?? _issue.format;
        const gender = nounEntry?.gender ?? "m";
        const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF";
        return `${noun} \u05DC\u05D0 ${adjective}`;
      }
      case "not_multiple_of":
        return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key": {
        return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`;
      }
      case "invalid_union":
        return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";
      case "invalid_element": {
        const place = withDefinite(issue2.origin ?? "array");
        return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`;
      }
      default:
        return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`;
    }
  };
};
function he_default() {
  return {
    localeError: error17()
  };
}

// node_modules/zod/v4/locales/hr.js
var error18 = () => {
  const Sizable = {
    string: { unit: "znakova", verb: "imati" },
    file: { unit: "bajtova", verb: "imati" },
    array: { unit: "stavki", verb: "imati" },
    set: { unit: "stavki", verb: "imati" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "unos",
    email: "email adresa",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datum i vrijeme",
    date: "ISO datum",
    time: "ISO vrijeme",
    duration: "ISO trajanje",
    ipv4: "IPv4 adresa",
    ipv6: "IPv6 adresa",
    cidrv4: "IPv4 raspon",
    cidrv6: "IPv6 raspon",
    base64: "base64 kodirani tekst",
    base64url: "base64url kodirani tekst",
    json_string: "JSON tekst",
    e164: "E.164 broj",
    jwt: "JWT",
    template_literal: "unos"
  };
  const TypeDictionary = {
    nan: "NaN",
    string: "tekst",
    number: "broj",
    boolean: "boolean",
    array: "niz",
    object: "objekt",
    set: "skup",
    file: "datoteka",
    date: "datum",
    bigint: "bigint",
    symbol: "simbol",
    undefined: "undefined",
    null: "null",
    function: "funkcija",
    map: "mapa"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
        }
        return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
        return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing)
          return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
        return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        if (sizing) {
          return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
        return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
      case "invalid_union":
        return "Neispravan unos";
      case "invalid_element":
        return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
      default:
        return `Neispravan unos`;
    }
  };
};
function hr_default() {
  return {
    localeError: error18()
  };
}

// node_modules/zod/v4/locales/hu.js
var error19 = () => {
  const Sizable = {
    string: { unit: "karakter", verb: "legyen" },
    file: { unit: "byte", verb: "legyen" },
    array: { unit: "elem", verb: "legyen" },
    set: { unit: "elem", verb: "legyen" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "bemenet",
    email: "email c\xEDm",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO id\u0151b\xE9lyeg",
    date: "ISO d\xE1tum",
    time: "ISO id\u0151",
    duration: "ISO id\u0151intervallum",
    ipv4: "IPv4 c\xEDm",
    ipv6: "IPv6 c\xEDm",
    cidrv4: "IPv4 tartom\xE1ny",
    cidrv6: "IPv6 tartom\xE1ny",
    base64: "base64-k\xF3dolt string",
    base64url: "base64url-k\xF3dolt string",
    json_string: "JSON string",
    e164: "E.164 sz\xE1m",
    jwt: "JWT",
    template_literal: "bemenet"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "sz\xE1m",
    array: "t\xF6mb"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
        }
        return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
        return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
        return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`;
        if (_issue.format === "ends_with")
          return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`;
        if (_issue.format === "includes")
          return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`;
        if (_issue.format === "regex")
          return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`;
        return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;
      case "unrecognized_keys":
        return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`;
      case "invalid_union":
        return "\xC9rv\xE9nytelen bemenet";
      case "invalid_element":
        return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`;
      default:
        return `\xC9rv\xE9nytelen bemenet`;
    }
  };
};
function hu_default() {
  return {
    localeError: error19()
  };
}

// node_modules/zod/v4/locales/hy.js
function getArmenianPlural(count, one, many) {
  return Math.abs(count) === 1 ? one : many;
}
function withDefiniteArticle(word) {
  if (!word)
    return "";
  const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"];
  const lastChar = word[word.length - 1];
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
}
var error20 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "\u0576\u0577\u0561\u0576",
        many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580"
      },
      verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
    },
    file: {
      unit: {
        one: "\u0562\u0561\u0575\u0569",
        many: "\u0562\u0561\u0575\u0569\u0565\u0580"
      },
      verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
    },
    array: {
      unit: {
        one: "\u057F\u0561\u0580\u0580",
        many: "\u057F\u0561\u0580\u0580\u0565\u0580"
      },
      verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
    },
    set: {
      unit: {
        one: "\u057F\u0561\u0580\u0580",
        many: "\u057F\u0561\u0580\u0580\u0565\u0580"
      },
      verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
    }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0574\u0578\u0582\u057F\u0584",
    email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",
    url: "URL",
    emoji: "\u0567\u0574\u0578\u057B\u056B",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",
    date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",
    time: "ISO \u056A\u0561\u0574",
    duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",
    ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565",
    ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565",
    cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",
    cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",
    base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",
    base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",
    json_string: "JSON \u057F\u0578\u0572",
    e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
    jwt: "JWT",
    template_literal: "\u0574\u0578\u0582\u057F\u0584"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0569\u056B\u057E",
    array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue2.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;
        }
        return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue2.values[1])}`;
        return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const maxValue = Number(issue2.maximum);
          const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many);
          return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.maximum.toString()} ${unit}`;
        }
        return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const minValue = Number(issue2.minimum);
          const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many);
          return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.minimum.toString()} ${unit}`;
        }
        return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056C\u056B\u0576\u056B ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`;
        if (_issue.format === "ends_with")
          return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`;
        if (_issue.format === "includes")
          return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;
        return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue2.divisor}-\u056B`;
      case "unrecognized_keys":
        return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue2.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`;
      case "invalid_union":
        return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";
      case "invalid_element":
        return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`;
      default:
        return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`;
    }
  };
};
function hy_default() {
  return {
    localeError: error20()
  };
}

// node_modules/zod/v4/locales/id.js
var error21 = () => {
  const Sizable = {
    string: { unit: "karakter", verb: "memiliki" },
    file: { unit: "byte", verb: "memiliki" },
    array: { unit: "item", verb: "memiliki" },
    set: { unit: "item", verb: "memiliki" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "alamat email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "tanggal dan waktu format ISO",
    date: "tanggal format ISO",
    time: "jam format ISO",
    duration: "durasi format ISO",
    ipv4: "alamat IPv4",
    ipv6: "alamat IPv6",
    cidrv4: "rentang alamat IPv4",
    cidrv6: "rentang alamat IPv6",
    base64: "string dengan enkode base64",
    base64url: "string dengan enkode base64url",
    json_string: "string JSON",
    e164: "angka E.164",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Input tidak valid: diharapkan instanceof ${issue2.expected}, diterima ${received}`;
        }
        return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`;
        return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`;
        return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `String tidak valid: harus menyertakan "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `String tidak valid: harus sesuai pola ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} tidak valid`;
      }
      case "not_multiple_of":
        return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Kunci tidak valid di ${issue2.origin}`;
      case "invalid_union":
        return "Input tidak valid";
      case "invalid_element":
        return `Nilai tidak valid di ${issue2.origin}`;
      default:
        return `Input tidak valid`;
    }
  };
};
function id_default() {
  return {
    localeError: error21()
  };
}

// node_modules/zod/v4/locales/is.js
var error22 = () => {
  const Sizable = {
    string: { unit: "stafi", verb: "a\xF0 hafa" },
    file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
    array: { unit: "hluti", verb: "a\xF0 hafa" },
    set: { unit: "hluti", verb: "a\xF0 hafa" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "gildi",
    email: "netfang",
    url: "vefsl\xF3\xF0",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO dagsetning og t\xEDmi",
    date: "ISO dagsetning",
    time: "ISO t\xEDmi",
    duration: "ISO t\xEDmalengd",
    ipv4: "IPv4 address",
    ipv6: "IPv6 address",
    cidrv4: "IPv4 range",
    cidrv6: "IPv6 range",
    base64: "base64-encoded strengur",
    base64url: "base64url-encoded strengur",
    json_string: "JSON strengur",
    e164: "E.164 t\xF6lugildi",
    jwt: "JWT",
    template_literal: "gildi"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "n\xFAmer",
    array: "fylki"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue2.expected}`;
        }
        return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`;
        return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`;
        return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`;
        return `Rangt ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Rangur lykill \xED ${issue2.origin}`;
      case "invalid_union":
        return "Rangt gildi";
      case "invalid_element":
        return `Rangt gildi \xED ${issue2.origin}`;
      default:
        return `Rangt gildi`;
    }
  };
};
function is_default() {
  return {
    localeError: error22()
  };
}

// node_modules/zod/v4/locales/it.js
var error23 = () => {
  const Sizable = {
    string: { unit: "caratteri", verb: "avere" },
    file: { unit: "byte", verb: "avere" },
    array: { unit: "elementi", verb: "avere" },
    set: { unit: "elementi", verb: "avere" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "indirizzo email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data e ora ISO",
    date: "data ISO",
    time: "ora ISO",
    duration: "durata ISO",
    ipv4: "indirizzo IPv4",
    ipv6: "indirizzo IPv6",
    cidrv4: "intervallo IPv4",
    cidrv6: "intervallo IPv6",
    base64: "stringa codificata in base64",
    base64url: "URL codificata in base64",
    json_string: "stringa JSON",
    e164: "numero E.164",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "numero",
    array: "vettore"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Input non valido: atteso instanceof ${issue2.expected}, ricevuto ${received}`;
        }
        return `Input non valido: atteso ${expected}, ricevuto ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`;
        return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`;
        return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Stringa non valida: deve iniziare con "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Stringa non valida: deve terminare con "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Stringa non valida: deve includere "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
        return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Chiave non valida in ${issue2.origin}`;
      case "invalid_union":
        return "Input non valido";
      case "invalid_element":
        return `Valore non valido in ${issue2.origin}`;
      default:
        return `Input non valido`;
    }
  };
};
function it_default() {
  return {
    localeError: error23()
  };
}

// node_modules/zod/v4/locales/ja.js
var error24 = () => {
  const Sizable = {
    string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
    file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
    array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" },
    set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u5165\u529B\u5024",
    email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",
    url: "URL",
    emoji: "\u7D75\u6587\u5B57",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO\u65E5\u6642",
    date: "ISO\u65E5\u4ED8",
    time: "ISO\u6642\u523B",
    duration: "ISO\u671F\u9593",
    ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9",
    ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9",
    cidrv4: "IPv4\u7BC4\u56F2",
    cidrv6: "IPv6\u7BC4\u56F2",
    base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",
    base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",
    json_string: "JSON\u6587\u5B57\u5217",
    e164: "E.164\u756A\u53F7",
    jwt: "JWT",
    template_literal: "\u5165\u529B\u5024"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u6570\u5024",
    array: "\u914D\u5217"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;
        }
        return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;
        return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
      case "too_big": {
        const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        if (_issue.format === "ends_with")
          return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        if (_issue.format === "includes")
          return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        if (_issue.format === "regex")
          return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
        return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;
      case "unrecognized_keys":
        return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`;
      case "invalid_key":
        return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;
      case "invalid_union":
        return "\u7121\u52B9\u306A\u5165\u529B";
      case "invalid_element":
        return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;
      default:
        return `\u7121\u52B9\u306A\u5165\u529B`;
    }
  };
};
function ja_default() {
  return {
    localeError: error24()
  };
}

// node_modules/zod/v4/locales/ka.js
var error25 = () => {
  const Sizable = {
    string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
    file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
    array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
    set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",
    email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
    url: "URL",
    emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",
    date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",
    time: "\u10D3\u10E0\u10DD",
    duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",
    ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
    ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
    cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
    cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
    base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
    base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
    json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
    e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
    jwt: "JWT",
    template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
    string: "\u10D5\u10D4\u10DA\u10D8",
    boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
    function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
    array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;
        }
        return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`;
        return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
        return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
        }
        if (_issue.format === "ends_with")
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
        if (_issue.format === "includes")
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
        if (_issue.format === "regex")
          return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
        return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;
      case "unrecognized_keys":
        return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`;
      case "invalid_union":
        return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";
      case "invalid_element":
        return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`;
      default:
        return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`;
    }
  };
};
function ka_default() {
  return {
    localeError: error25()
  };
}

// node_modules/zod/v4/locales/km.js
var error26 = () => {
  const Sizable = {
    string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
    file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
    array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
    set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",
    email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",
    url: "URL",
    emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",
    date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",
    time: "\u1798\u17C9\u17C4\u1784 ISO",
    duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",
    ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",
    ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",
    cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",
    cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",
    base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",
    base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",
    json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
    e164: "\u179B\u17C1\u1781 E.164",
    jwt: "JWT",
    template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u179B\u17C1\u1781",
    array: "\u17A2\u17B6\u179A\u17C1 (Array)",
    null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;
        }
        return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`;
        return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`;
        return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`;
        return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`;
      case "invalid_union":
        return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;
      case "invalid_element":
        return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`;
      default:
        return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;
    }
  };
};
function km_default() {
  return {
    localeError: error26()
  };
}

// node_modules/zod/v4/locales/kh.js
function kh_default() {
  return km_default();
}

// node_modules/zod/v4/locales/ko.js
var error27 = () => {
  const Sizable = {
    string: { unit: "\uBB38\uC790", verb: "to have" },
    file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
    array: { unit: "\uAC1C", verb: "to have" },
    set: { unit: "\uAC1C", verb: "to have" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\uC785\uB825",
    email: "\uC774\uBA54\uC77C \uC8FC\uC18C",
    url: "URL",
    emoji: "\uC774\uBAA8\uC9C0",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04",
    date: "ISO \uB0A0\uC9DC",
    time: "ISO \uC2DC\uAC04",
    duration: "ISO \uAE30\uAC04",
    ipv4: "IPv4 \uC8FC\uC18C",
    ipv6: "IPv6 \uC8FC\uC18C",
    cidrv4: "IPv4 \uBC94\uC704",
    cidrv6: "IPv6 \uBC94\uC704",
    base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",
    base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",
    json_string: "JSON \uBB38\uC790\uC5F4",
    e164: "E.164 \uBC88\uD638",
    jwt: "JWT",
    template_literal: "\uC785\uB825"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;
        }
        return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;
        return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;
      case "too_big": {
        const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC";
        const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4";
        const sizing = getSizing(issue2.origin);
        const unit = sizing?.unit ?? "\uC694\uC18C";
        if (sizing)
          return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`;
        return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC";
        const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4";
        const sizing = getSizing(issue2.origin);
        const unit = sizing?.unit ?? "\uC694\uC18C";
        if (sizing) {
          return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`;
        }
        return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;
        }
        if (_issue.format === "ends_with")
          return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;
        if (_issue.format === "includes")
          return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;
        if (_issue.format === "regex")
          return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;
        return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;
      case "unrecognized_keys":
        return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`;
      case "invalid_union":
        return `\uC798\uBABB\uB41C \uC785\uB825`;
      case "invalid_element":
        return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`;
      default:
        return `\uC798\uBABB\uB41C \uC785\uB825`;
    }
  };
};
function ko_default() {
  return {
    localeError: error27()
  };
}

// node_modules/zod/v4/locales/lt.js
var capitalizeFirstCharacter = (text) => {
  return text.charAt(0).toUpperCase() + text.slice(1);
};
function getUnitTypeFromNumber(number4) {
  const abs = Math.abs(number4);
  const last = abs % 10;
  const last2 = abs % 100;
  if (last2 >= 11 && last2 <= 19 || last === 0)
    return "many";
  if (last === 1)
    return "one";
  return "few";
}
var error28 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "simbolis",
        few: "simboliai",
        many: "simboli\u0173"
      },
      verb: {
        smaller: {
          inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip",
          notInclusive: "turi b\u016Bti trumpesn\u0117 kaip"
        },
        bigger: {
          inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip",
          notInclusive: "turi b\u016Bti ilgesn\u0117 kaip"
        }
      }
    },
    file: {
      unit: {
        one: "baitas",
        few: "baitai",
        many: "bait\u0173"
      },
      verb: {
        smaller: {
          inclusive: "turi b\u016Bti ne didesnis kaip",
          notInclusive: "turi b\u016Bti ma\u017Eesnis kaip"
        },
        bigger: {
          inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip",
          notInclusive: "turi b\u016Bti didesnis kaip"
        }
      }
    },
    array: {
      unit: {
        one: "element\u0105",
        few: "elementus",
        many: "element\u0173"
      },
      verb: {
        smaller: {
          inclusive: "turi tur\u0117ti ne daugiau kaip",
          notInclusive: "turi tur\u0117ti ma\u017Eiau kaip"
        },
        bigger: {
          inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip",
          notInclusive: "turi tur\u0117ti daugiau kaip"
        }
      }
    },
    set: {
      unit: {
        one: "element\u0105",
        few: "elementus",
        many: "element\u0173"
      },
      verb: {
        smaller: {
          inclusive: "turi tur\u0117ti ne daugiau kaip",
          notInclusive: "turi tur\u0117ti ma\u017Eiau kaip"
        },
        bigger: {
          inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip",
          notInclusive: "turi tur\u0117ti daugiau kaip"
        }
      }
    }
  };
  function getSizing(origin, unitType, inclusive, targetShouldBe) {
    const result = Sizable[origin] ?? null;
    if (result === null)
      return result;
    return {
      unit: result.unit[unitType],
      verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"]
    };
  }
  const FormatDictionary = {
    regex: "\u012Fvestis",
    email: "el. pa\u0161to adresas",
    url: "URL",
    emoji: "jaustukas",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO data ir laikas",
    date: "ISO data",
    time: "ISO laikas",
    duration: "ISO trukm\u0117",
    ipv4: "IPv4 adresas",
    ipv6: "IPv6 adresas",
    cidrv4: "IPv4 tinklo prefiksas (CIDR)",
    cidrv6: "IPv6 tinklo prefiksas (CIDR)",
    base64: "base64 u\u017Ekoduota eilut\u0117",
    base64url: "base64url u\u017Ekoduota eilut\u0117",
    json_string: "JSON eilut\u0117",
    e164: "E.164 numeris",
    jwt: "JWT",
    template_literal: "\u012Fvestis"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "skai\u010Dius",
    bigint: "sveikasis skai\u010Dius",
    string: "eilut\u0117",
    boolean: "login\u0117 reik\u0161m\u0117",
    undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117",
    function: "funkcija",
    symbol: "simbolis",
    array: "masyvas",
    object: "objektas",
    null: "nulin\u0117 reik\u0161m\u0117"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue2.expected}`;
        }
        return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`;
        return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`;
      case "too_big": {
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller");
        if (sizing?.verb)
          return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`;
        const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip";
        return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`;
      }
      case "too_small": {
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger");
        if (sizing?.verb)
          return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`;
        const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip";
        return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Eilut\u0117 privalo atitikti ${_issue.pattern}`;
        return `Neteisingas ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`;
      case "unrecognized_keys":
        return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return "Rastas klaidingas raktas";
      case "invalid_union":
        return "Klaidinga \u012Fvestis";
      case "invalid_element": {
        const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
        return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`;
      }
      default:
        return "Klaidinga \u012Fvestis";
    }
  };
};
function lt_default() {
  return {
    localeError: error28()
  };
}

// node_modules/zod/v4/locales/mk.js
var error29 = () => {
  const Sizable = {
    string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
    file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
    array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
    set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0432\u043D\u0435\u0441",
    email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",
    url: "URL",
    emoji: "\u0435\u043C\u043E\u045F\u0438",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",
    date: "ISO \u0434\u0430\u0442\u0443\u043C",
    time: "ISO \u0432\u0440\u0435\u043C\u0435",
    duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",
    ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",
    ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",
    cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433",
    cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433",
    base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",
    base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",
    json_string: "JSON \u043D\u0438\u0437\u0430",
    e164: "E.164 \u0431\u0440\u043E\u0458",
    jwt: "JWT",
    template_literal: "\u0432\u043D\u0435\u0441"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0431\u0440\u043E\u0458",
    array: "\u043D\u0438\u0437\u0430"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;
        }
        return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
        return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`;
        return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`;
        return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`;
      case "invalid_union":
        return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";
      case "invalid_element":
        return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`;
      default:
        return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`;
    }
  };
};
function mk_default() {
  return {
    localeError: error29()
  };
}

// node_modules/zod/v4/locales/ms.js
var error30 = () => {
  const Sizable = {
    string: { unit: "aksara", verb: "mempunyai" },
    file: { unit: "bait", verb: "mempunyai" },
    array: { unit: "elemen", verb: "mempunyai" },
    set: { unit: "elemen", verb: "mempunyai" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "alamat e-mel",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "tarikh masa ISO",
    date: "tarikh ISO",
    time: "masa ISO",
    duration: "tempoh ISO",
    ipv4: "alamat IPv4",
    ipv6: "alamat IPv6",
    cidrv4: "julat IPv4",
    cidrv6: "julat IPv6",
    base64: "string dikodkan base64",
    base64url: "string dikodkan base64url",
    json_string: "string JSON",
    e164: "nombor E.164",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "nombor"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Input tidak sah: dijangka instanceof ${issue2.expected}, diterima ${received}`;
        }
        return `Input tidak sah: dijangka ${expected}, diterima ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`;
        return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`;
        return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `String tidak sah: mesti mengandungi "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} tidak sah`;
      }
      case "not_multiple_of":
        return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Kunci tidak sah dalam ${issue2.origin}`;
      case "invalid_union":
        return "Input tidak sah";
      case "invalid_element":
        return `Nilai tidak sah dalam ${issue2.origin}`;
      default:
        return `Input tidak sah`;
    }
  };
};
function ms_default() {
  return {
    localeError: error30()
  };
}

// node_modules/zod/v4/locales/nl.js
var error31 = () => {
  const Sizable = {
    string: { unit: "tekens", verb: "heeft" },
    file: { unit: "bytes", verb: "heeft" },
    array: { unit: "elementen", verb: "heeft" },
    set: { unit: "elementen", verb: "heeft" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "invoer",
    email: "emailadres",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datum en tijd",
    date: "ISO datum",
    time: "ISO tijd",
    duration: "ISO duur",
    ipv4: "IPv4-adres",
    ipv6: "IPv6-adres",
    cidrv4: "IPv4-bereik",
    cidrv6: "IPv6-bereik",
    base64: "base64-gecodeerde tekst",
    base64url: "base64 URL-gecodeerde tekst",
    json_string: "JSON string",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "invoer"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "getal"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ongeldige invoer: verwacht instanceof ${issue2.expected}, ontving ${received}`;
        }
        return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`;
        return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        const longName = issue2.origin === "date" ? "laat" : issue2.origin === "string" ? "lang" : "groot";
        if (sizing)
          return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`;
        return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        const shortName = issue2.origin === "date" ? "vroeg" : issue2.origin === "string" ? "kort" : "klein";
        if (sizing) {
          return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
        }
        return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`;
        }
        if (_issue.format === "ends_with")
          return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`;
        if (_issue.format === "includes")
          return `Ongeldige tekst: moet "${_issue.includes}" bevatten`;
        if (_issue.format === "regex")
          return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;
        return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`;
      case "unrecognized_keys":
        return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ongeldige key in ${issue2.origin}`;
      case "invalid_union":
        return "Ongeldige invoer";
      case "invalid_element":
        return `Ongeldige waarde in ${issue2.origin}`;
      default:
        return `Ongeldige invoer`;
    }
  };
};
function nl_default() {
  return {
    localeError: error31()
  };
}

// node_modules/zod/v4/locales/no.js
var error32 = () => {
  const Sizable = {
    string: { unit: "tegn", verb: "\xE5 ha" },
    file: { unit: "bytes", verb: "\xE5 ha" },
    array: { unit: "elementer", verb: "\xE5 inneholde" },
    set: { unit: "elementer", verb: "\xE5 inneholde" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "input",
    email: "e-postadresse",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO dato- og klokkeslett",
    date: "ISO-dato",
    time: "ISO-klokkeslett",
    duration: "ISO-varighet",
    ipv4: "IPv4-omr\xE5de",
    ipv6: "IPv6-omr\xE5de",
    cidrv4: "IPv4-spekter",
    cidrv6: "IPv6-spekter",
    base64: "base64-enkodet streng",
    base64url: "base64url-enkodet streng",
    json_string: "JSON-streng",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "tall",
    array: "liste"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ugyldig input: forventet instanceof ${issue2.expected}, fikk ${received}`;
        }
        return `Ugyldig input: forventet ${expected}, fikk ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`;
        return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
        return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`;
        return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ugyldig n\xF8kkel i ${issue2.origin}`;
      case "invalid_union":
        return "Ugyldig input";
      case "invalid_element":
        return `Ugyldig verdi i ${issue2.origin}`;
      default:
        return `Ugyldig input`;
    }
  };
};
function no_default() {
  return {
    localeError: error32()
  };
}

// node_modules/zod/v4/locales/ota.js
var error33 = () => {
  const Sizable = {
    string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
    file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
    array: { unit: "unsur", verb: "olmal\u0131d\u0131r" },
    set: { unit: "unsur", verb: "olmal\u0131d\u0131r" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "giren",
    email: "epostag\xE2h",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO heng\xE2m\u0131",
    date: "ISO tarihi",
    time: "ISO zaman\u0131",
    duration: "ISO m\xFCddeti",
    ipv4: "IPv4 ni\u015F\xE2n\u0131",
    ipv6: "IPv6 ni\u015F\xE2n\u0131",
    cidrv4: "IPv4 menzili",
    cidrv6: "IPv6 menzili",
    base64: "base64-\u015Fifreli metin",
    base64url: "base64url-\u015Fifreli metin",
    json_string: "JSON metin",
    e164: "E.164 say\u0131s\u0131",
    jwt: "JWT",
    template_literal: "giren"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "numara",
    array: "saf",
    null: "gayb"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `F\xE2sit giren: umulan instanceof ${issue2.expected}, al\u0131nan ${received}`;
        }
        return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`;
        return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`;
        return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`;
        }
        return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`;
        if (_issue.format === "ends_with")
          return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`;
        if (_issue.format === "includes")
          return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`;
        if (_issue.format === "regex")
          return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`;
        return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`;
      case "unrecognized_keys":
        return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`;
      case "invalid_union":
        return "Giren tan\u0131namad\u0131.";
      case "invalid_element":
        return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;
      default:
        return `K\u0131ymet tan\u0131namad\u0131.`;
    }
  };
};
function ota_default() {
  return {
    localeError: error33()
  };
}

// node_modules/zod/v4/locales/ps.js
var error34 = () => {
  const Sizable = {
    string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
    file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
    array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
    set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0648\u0631\u0648\u062F\u064A",
    email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",
    url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644",
    emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",
    date: "\u0646\u06D0\u067C\u0647",
    time: "\u0648\u062E\u062A",
    duration: "\u0645\u0648\u062F\u0647",
    ipv4: "\u062F IPv4 \u067E\u062A\u0647",
    ipv6: "\u062F IPv6 \u067E\u062A\u0647",
    cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647",
    cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647",
    base64: "base64-encoded \u0645\u062A\u0646",
    base64url: "base64url-encoded \u0645\u062A\u0646",
    json_string: "JSON \u0645\u062A\u0646",
    e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
    jwt: "JWT",
    template_literal: "\u0648\u0631\u0648\u062F\u064A"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0639\u062F\u062F",
    array: "\u0627\u0631\u06D0"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;
        }
        return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;
      }
      case "invalid_value":
        if (issue2.values.length === 1) {
          return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`;
        }
        return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`;
        }
        return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`;
        }
        return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;
        }
        if (_issue.format === "ends_with") {
          return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;
        }
        if (_issue.format === "includes") {
          return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`;
        }
        if (_issue.format === "regex") {
          return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;
        }
        return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`;
      }
      case "not_multiple_of":
        return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;
      case "unrecognized_keys":
        return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`;
      case "invalid_union":
        return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;
      case "invalid_element":
        return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`;
      default:
        return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;
    }
  };
};
function ps_default() {
  return {
    localeError: error34()
  };
}

// node_modules/zod/v4/locales/pl.js
var error35 = () => {
  const Sizable = {
    string: { unit: "znak\xF3w", verb: "mie\u0107" },
    file: { unit: "bajt\xF3w", verb: "mie\u0107" },
    array: { unit: "element\xF3w", verb: "mie\u0107" },
    set: { unit: "element\xF3w", verb: "mie\u0107" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "wyra\u017Cenie",
    email: "adres email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data i godzina w formacie ISO",
    date: "data w formacie ISO",
    time: "godzina w formacie ISO",
    duration: "czas trwania ISO",
    ipv4: "adres IPv4",
    ipv6: "adres IPv6",
    cidrv4: "zakres IPv4",
    cidrv6: "zakres IPv6",
    base64: "ci\u0105g znak\xF3w zakodowany w formacie base64",
    base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url",
    json_string: "ci\u0105g znak\xF3w w formacie JSON",
    e164: "liczba E.164",
    jwt: "JWT",
    template_literal: "wej\u015Bcie"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "liczba",
    array: "tablica"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue2.expected}, otrzymano ${received}`;
        }
        return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`;
        return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`;
        }
        return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`;
        }
        return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`;
        return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Nieprawid\u0142owy klucz w ${issue2.origin}`;
      case "invalid_union":
        return "Nieprawid\u0142owe dane wej\u015Bciowe";
      case "invalid_element":
        return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`;
      default:
        return `Nieprawid\u0142owe dane wej\u015Bciowe`;
    }
  };
};
function pl_default() {
  return {
    localeError: error35()
  };
}

// node_modules/zod/v4/locales/pt.js
var error36 = () => {
  const Sizable = {
    string: { unit: "caracteres", verb: "ter" },
    file: { unit: "bytes", verb: "ter" },
    array: { unit: "itens", verb: "ter" },
    set: { unit: "itens", verb: "ter" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "padr\xE3o",
    email: "endere\xE7o de e-mail",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "data e hora ISO",
    date: "data ISO",
    time: "hora ISO",
    duration: "dura\xE7\xE3o ISO",
    ipv4: "endere\xE7o IPv4",
    ipv6: "endere\xE7o IPv6",
    cidrv4: "faixa de IPv4",
    cidrv6: "faixa de IPv6",
    base64: "texto codificado em base64",
    base64url: "URL codificada em base64",
    json_string: "texto JSON",
    e164: "n\xFAmero E.164",
    jwt: "JWT",
    template_literal: "entrada"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "n\xFAmero",
    null: "nulo"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
        }
        return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`;
        return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
        return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`;
      }
      case "not_multiple_of":
        return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Chave inv\xE1lida em ${issue2.origin}`;
      case "invalid_union":
        return "Entrada inv\xE1lida";
      case "invalid_element":
        return `Valor inv\xE1lido em ${issue2.origin}`;
      default:
        return `Campo inv\xE1lido`;
    }
  };
};
function pt_default() {
  return {
    localeError: error36()
  };
}

// node_modules/zod/v4/locales/ro.js
var error37 = () => {
  const Sizable = {
    string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
    file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
    array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
    set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
    map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "intrare",
    email: "adres\u0103 de email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "dat\u0103 \u0219i or\u0103 ISO",
    date: "dat\u0103 ISO",
    time: "or\u0103 ISO",
    duration: "durat\u0103 ISO",
    ipv4: "adres\u0103 IPv4",
    ipv6: "adres\u0103 IPv6",
    mac: "adres\u0103 MAC",
    cidrv4: "interval IPv4",
    cidrv6: "interval IPv6",
    base64: "\u0219ir codat base64",
    base64url: "\u0219ir codat base64url",
    json_string: "\u0219ir JSON",
    e164: "num\u0103r E.164",
    jwt: "JWT",
    template_literal: "intrare"
  };
  const TypeDictionary = {
    nan: "NaN",
    string: "\u0219ir",
    number: "num\u0103r",
    boolean: "boolean",
    function: "func\u021Bie",
    array: "matrice",
    object: "obiect",
    undefined: "nedefinit",
    symbol: "simbol",
    bigint: "num\u0103r mare",
    void: "void",
    never: "never",
    map: "hart\u0103",
    set: "set"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
        return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
        return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
        return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
      case "invalid_union":
        return "Intrare invalid\u0103";
      case "invalid_element":
        return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
      default:
        return `Intrare invalid\u0103`;
    }
  };
};
function ro_default() {
  return {
    localeError: error37()
  };
}

// node_modules/zod/v4/locales/ru.js
function getRussianPlural(count, one, few, many) {
  const absCount = Math.abs(count);
  const lastDigit = absCount % 10;
  const lastTwoDigits = absCount % 100;
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
    return many;
  }
  if (lastDigit === 1) {
    return one;
  }
  if (lastDigit >= 2 && lastDigit <= 4) {
    return few;
  }
  return many;
}
var error38 = () => {
  const Sizable = {
    string: {
      unit: {
        one: "\u0441\u0438\u043C\u0432\u043E\u043B",
        few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430",
        many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"
      },
      verb: "\u0438\u043C\u0435\u0442\u044C"
    },
    file: {
      unit: {
        one: "\u0431\u0430\u0439\u0442",
        few: "\u0431\u0430\u0439\u0442\u0430",
        many: "\u0431\u0430\u0439\u0442"
      },
      verb: "\u0438\u043C\u0435\u0442\u044C"
    },
    array: {
      unit: {
        one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
        few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",
        many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"
      },
      verb: "\u0438\u043C\u0435\u0442\u044C"
    },
    set: {
      unit: {
        one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442",
        few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",
        many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"
      },
      verb: "\u0438\u043C\u0435\u0442\u044C"
    }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0432\u0432\u043E\u0434",
    email: "email \u0430\u0434\u0440\u0435\u0441",
    url: "URL",
    emoji: "\u044D\u043C\u043E\u0434\u0437\u0438",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",
    date: "ISO \u0434\u0430\u0442\u0430",
    time: "ISO \u0432\u0440\u0435\u043C\u044F",
    duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",
    ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441",
    ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441",
    cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
    cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",
    base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",
    base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",
    json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
    e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
    jwt: "JWT",
    template_literal: "\u0432\u0432\u043E\u0434"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0447\u0438\u0441\u043B\u043E",
    array: "\u043C\u0430\u0441\u0441\u0438\u0432"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;
        }
        return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`;
        return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const maxValue = Number(issue2.maximum);
          const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`;
        }
        return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          const minValue = Number(issue2.minimum);
          const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
          return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`;
        }
        return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;
        return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`;
      case "invalid_union":
        return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";
      case "invalid_element":
        return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`;
      default:
        return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`;
    }
  };
};
function ru_default() {
  return {
    localeError: error38()
  };
}

// node_modules/zod/v4/locales/sl.js
var error39 = () => {
  const Sizable = {
    string: { unit: "znakov", verb: "imeti" },
    file: { unit: "bajtov", verb: "imeti" },
    array: { unit: "elementov", verb: "imeti" },
    set: { unit: "elementov", verb: "imeti" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "vnos",
    email: "e-po\u0161tni naslov",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO datum in \u010Das",
    date: "ISO datum",
    time: "ISO \u010Das",
    duration: "ISO trajanje",
    ipv4: "IPv4 naslov",
    ipv6: "IPv6 naslov",
    cidrv4: "obseg IPv4",
    cidrv6: "obseg IPv6",
    base64: "base64 kodiran niz",
    base64url: "base64url kodiran niz",
    json_string: "JSON niz",
    e164: "E.164 \u0161tevilka",
    jwt: "JWT",
    template_literal: "vnos"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0161tevilo",
    array: "tabela"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue2.expected}, prejeto ${received}`;
        }
        return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`;
        return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`;
        return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Neveljaven niz: mora vsebovati "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;
        return `Neveljaven ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Neveljaven klju\u010D v ${issue2.origin}`;
      case "invalid_union":
        return "Neveljaven vnos";
      case "invalid_element":
        return `Neveljavna vrednost v ${issue2.origin}`;
      default:
        return "Neveljaven vnos";
    }
  };
};
function sl_default() {
  return {
    localeError: error39()
  };
}

// node_modules/zod/v4/locales/sv.js
var error40 = () => {
  const Sizable = {
    string: { unit: "tecken", verb: "att ha" },
    file: { unit: "bytes", verb: "att ha" },
    array: { unit: "objekt", verb: "att inneh\xE5lla" },
    set: { unit: "objekt", verb: "att inneh\xE5lla" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "regulj\xE4rt uttryck",
    email: "e-postadress",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO-datum och tid",
    date: "ISO-datum",
    time: "ISO-tid",
    duration: "ISO-varaktighet",
    ipv4: "IPv4-intervall",
    ipv6: "IPv6-intervall",
    cidrv4: "IPv4-spektrum",
    cidrv6: "IPv6-spektrum",
    base64: "base64-kodad str\xE4ng",
    base64url: "base64url-kodad str\xE4ng",
    json_string: "JSON-str\xE4ng",
    e164: "E.164-nummer",
    jwt: "JWT",
    template_literal: "mall-literal"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "antal",
    array: "lista"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue2.expected}, fick ${received}`;
        }
        return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`;
        return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`;
        }
        return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`;
        return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`;
      case "unrecognized_keys":
        return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`;
      case "invalid_union":
        return "Ogiltig input";
      case "invalid_element":
        return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`;
      default:
        return `Ogiltig input`;
    }
  };
};
function sv_default() {
  return {
    localeError: error40()
  };
}

// node_modules/zod/v4/locales/ta.js
var error41 = () => {
  const Sizable = {
    string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
    file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
    array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
    set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",
    email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",
    date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF",
    time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",
    duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",
    ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",
    ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",
    cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",
    cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",
    base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",
    base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",
    json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
    e164: "E.164 \u0B8E\u0BA3\u0BCD",
    jwt: "JWT",
    template_literal: "input"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0B8E\u0BA3\u0BCD",
    array: "\u0B85\u0BA3\u0BBF",
    null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;
        }
        return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`;
        return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        }
        return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        }
        return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        if (_issue.format === "ends_with")
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        if (_issue.format === "includes")
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        if (_issue.format === "regex")
          return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
        return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;
      case "unrecognized_keys":
        return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;
      case "invalid_union":
        return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";
      case "invalid_element":
        return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;
      default:
        return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`;
    }
  };
};
function ta_default() {
  return {
    localeError: error41()
  };
}

// node_modules/zod/v4/locales/th.js
var error42 = () => {
  const Sizable = {
    string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
    file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
    array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
    set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",
    email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",
    url: "URL",
    emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
    date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",
    time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
    duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
    ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",
    ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",
    cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",
    cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",
    base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",
    base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",
    json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
    e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
    jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
    template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",
    array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",
    null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
        }
        return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`;
        return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;
        return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`;
        }
        if (_issue.format === "ends_with")
          return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;
        if (_issue.format === "regex")
          return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`;
        return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;
      case "unrecognized_keys":
        return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`;
      case "invalid_union":
        return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";
      case "invalid_element":
        return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`;
      default:
        return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`;
    }
  };
};
function th_default() {
  return {
    localeError: error42()
  };
}

// node_modules/zod/v4/locales/tr.js
var error43 = () => {
  const Sizable = {
    string: { unit: "karakter", verb: "olmal\u0131" },
    file: { unit: "bayt", verb: "olmal\u0131" },
    array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" },
    set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "girdi",
    email: "e-posta adresi",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO tarih ve saat",
    date: "ISO tarih",
    time: "ISO saat",
    duration: "ISO s\xFCre",
    ipv4: "IPv4 adresi",
    ipv6: "IPv6 adresi",
    cidrv4: "IPv4 aral\u0131\u011F\u0131",
    cidrv6: "IPv6 aral\u0131\u011F\u0131",
    base64: "base64 ile \u015Fifrelenmi\u015F metin",
    base64url: "base64url ile \u015Fifrelenmi\u015F metin",
    json_string: "JSON dizesi",
    e164: "E.164 say\u0131s\u0131",
    jwt: "JWT",
    template_literal: "\u015Eablon dizesi"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue2.expected}, al\u0131nan ${received}`;
        }
        return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`;
        return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`;
        return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`;
        if (_issue.format === "ends_with")
          return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`;
        if (_issue.format === "includes")
          return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`;
        if (_issue.format === "regex")
          return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`;
        return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`;
      case "unrecognized_keys":
        return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`;
      case "invalid_union":
        return "Ge\xE7ersiz de\u011Fer";
      case "invalid_element":
        return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;
      default:
        return `Ge\xE7ersiz de\u011Fer`;
    }
  };
};
function tr_default() {
  return {
    localeError: error43()
  };
}

// node_modules/zod/v4/locales/uk.js
var error44 = () => {
  const Sizable = {
    string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
    file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
    array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
    set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",
    email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",
    url: "URL",
    emoji: "\u0435\u043C\u043E\u0434\u0437\u0456",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",
    date: "\u0434\u0430\u0442\u0430 ISO",
    time: "\u0447\u0430\u0441 ISO",
    duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",
    ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",
    ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",
    cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",
    cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",
    base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",
    base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",
    json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
    e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
    jwt: "JWT",
    template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0447\u0438\u0441\u043B\u043E",
    array: "\u043C\u0430\u0441\u0438\u0432"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;
        }
        return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`;
        return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`;
        return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;
        return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`;
      case "unrecognized_keys":
        return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`;
      case "invalid_union":
        return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";
      case "invalid_element":
        return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`;
      default:
        return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`;
    }
  };
};
function uk_default() {
  return {
    localeError: error44()
  };
}

// node_modules/zod/v4/locales/ua.js
function ua_default() {
  return uk_default();
}

// node_modules/zod/v4/locales/ur.js
var error45 = () => {
  const Sizable = {
    string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
    file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
    array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" },
    set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0627\u0646 \u067E\u0679",
    email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",
    url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",
    emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC",
    uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
    uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",
    uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",
    nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",
    guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
    cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
    cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",
    ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",
    xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",
    ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",
    datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",
    date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",
    time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",
    duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",
    ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",
    ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",
    cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",
    cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",
    base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",
    base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",
    json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
    e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
    jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
    template_literal: "\u0627\u0646 \u067E\u0679"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u0646\u0645\u0628\u0631",
    array: "\u0622\u0631\u06D2",
    null: "\u0646\u0644"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;
        }
        return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
        return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;
        return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;
        }
        return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
        }
        if (_issue.format === "ends_with")
          return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
        if (_issue.format === "includes")
          return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
        if (_issue.format === "regex")
          return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
        return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;
      case "unrecognized_keys":
        return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`;
      case "invalid_key":
        return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;
      case "invalid_union":
        return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";
      case "invalid_element":
        return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;
      default:
        return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`;
    }
  };
};
function ur_default() {
  return {
    localeError: error45()
  };
}

// node_modules/zod/v4/locales/uz.js
var error46 = () => {
  const Sizable = {
    string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
    file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
    array: { unit: "element", verb: "bo\u2018lishi kerak" },
    set: { unit: "element", verb: "bo\u2018lishi kerak" },
    map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "kirish",
    email: "elektron pochta manzili",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO sana va vaqti",
    date: "ISO sana",
    time: "ISO vaqt",
    duration: "ISO davomiylik",
    ipv4: "IPv4 manzil",
    ipv6: "IPv6 manzil",
    mac: "MAC manzil",
    cidrv4: "IPv4 diapazon",
    cidrv6: "IPv6 diapazon",
    base64: "base64 kodlangan satr",
    base64url: "base64url kodlangan satr",
    json_string: "JSON satr",
    e164: "E.164 raqam",
    jwt: "JWT",
    template_literal: "kirish"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "raqam",
    array: "massiv"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue2.expected}, qabul qilingan ${received}`;
        }
        return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue2.values[0])}`;
        return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`;
        return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
        }
        return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`;
        if (_issue.format === "ends_with")
          return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`;
        if (_issue.format === "includes")
          return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`;
        if (_issue.format === "regex")
          return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`;
        return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `Noto\u2018g\u2018ri raqam: ${issue2.divisor} ning karralisi bo\u2018lishi kerak`;
      case "unrecognized_keys":
        return `Noma\u2019lum kalit${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} dagi kalit noto\u2018g\u2018ri`;
      case "invalid_union":
        return "Noto\u2018g\u2018ri kirish";
      case "invalid_element":
        return `${issue2.origin} da noto\u2018g\u2018ri qiymat`;
      default:
        return `Noto\u2018g\u2018ri kirish`;
    }
  };
};
function uz_default() {
  return {
    localeError: error46()
  };
}

// node_modules/zod/v4/locales/vi.js
var error47 = () => {
  const Sizable = {
    string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
    file: { unit: "byte", verb: "c\xF3" },
    array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" },
    set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u0111\u1EA7u v\xE0o",
    email: "\u0111\u1ECBa ch\u1EC9 email",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ng\xE0y gi\u1EDD ISO",
    date: "ng\xE0y ISO",
    time: "gi\u1EDD ISO",
    duration: "kho\u1EA3ng th\u1EDDi gian ISO",
    ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4",
    ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6",
    cidrv4: "d\u1EA3i IPv4",
    cidrv6: "d\u1EA3i IPv6",
    base64: "chu\u1ED7i m\xE3 h\xF3a base64",
    base64url: "chu\u1ED7i m\xE3 h\xF3a base64url",
    json_string: "chu\u1ED7i JSON",
    e164: "s\u1ED1 E.164",
    jwt: "JWT",
    template_literal: "\u0111\u1EA7u v\xE0o"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "s\u1ED1",
    array: "m\u1EA3ng"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;
        }
        return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`;
        return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`;
        return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`;
        return `${FormatDictionary[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`;
      }
      case "not_multiple_of":
        return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`;
      case "unrecognized_keys":
        return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`;
      case "invalid_union":
        return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";
      case "invalid_element":
        return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`;
      default:
        return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`;
    }
  };
};
function vi_default() {
  return {
    localeError: error47()
  };
}

// node_modules/zod/v4/locales/zh-CN.js
var error48 = () => {
  const Sizable = {
    string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
    file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
    array: { unit: "\u9879", verb: "\u5305\u542B" },
    set: { unit: "\u9879", verb: "\u5305\u542B" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u8F93\u5165",
    email: "\u7535\u5B50\u90AE\u4EF6",
    url: "URL",
    emoji: "\u8868\u60C5\u7B26\u53F7",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO\u65E5\u671F\u65F6\u95F4",
    date: "ISO\u65E5\u671F",
    time: "ISO\u65F6\u95F4",
    duration: "ISO\u65F6\u957F",
    ipv4: "IPv4\u5730\u5740",
    ipv6: "IPv6\u5730\u5740",
    cidrv4: "IPv4\u7F51\u6BB5",
    cidrv6: "IPv6\u7F51\u6BB5",
    base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32",
    base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32",
    json_string: "JSON\u5B57\u7B26\u4E32",
    e164: "E.164\u53F7\u7801",
    jwt: "JWT",
    template_literal: "\u8F93\u5165"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "\u6570\u5B57",
    array: "\u6570\u7EC4",
    null: "\u7A7A\u503C(null)"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;
        }
        return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`;
        return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`;
        return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`;
        if (_issue.format === "ends_with")
          return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`;
        if (_issue.format === "includes")
          return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`;
        return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`;
      case "unrecognized_keys":
        return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;
      case "invalid_union":
        return "\u65E0\u6548\u8F93\u5165";
      case "invalid_element":
        return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;
      default:
        return `\u65E0\u6548\u8F93\u5165`;
    }
  };
};
function zh_CN_default() {
  return {
    localeError: error48()
  };
}

// node_modules/zod/v4/locales/zh-TW.js
var error49 = () => {
  const Sizable = {
    string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
    file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
    array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" },
    set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u8F38\u5165",
    email: "\u90F5\u4EF6\u5730\u5740",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "ISO \u65E5\u671F\u6642\u9593",
    date: "ISO \u65E5\u671F",
    time: "ISO \u6642\u9593",
    duration: "ISO \u671F\u9593",
    ipv4: "IPv4 \u4F4D\u5740",
    ipv6: "IPv6 \u4F4D\u5740",
    cidrv4: "IPv4 \u7BC4\u570D",
    cidrv6: "IPv6 \u7BC4\u570D",
    base64: "base64 \u7DE8\u78BC\u5B57\u4E32",
    base64url: "base64url \u7DE8\u78BC\u5B57\u4E32",
    json_string: "JSON \u5B57\u4E32",
    e164: "E.164 \u6578\u503C",
    jwt: "JWT",
    template_literal: "\u8F38\u5165"
  };
  const TypeDictionary = {
    nan: "NaN"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${received}`;
        }
        return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`;
        return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`;
        return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing) {
          return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
        }
        return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with") {
          return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`;
        }
        if (_issue.format === "ends_with")
          return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`;
        if (_issue.format === "includes")
          return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`;
        return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`;
      case "unrecognized_keys":
        return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`;
      case "invalid_key":
        return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;
      case "invalid_union":
        return "\u7121\u6548\u7684\u8F38\u5165\u503C";
      case "invalid_element":
        return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;
      default:
        return `\u7121\u6548\u7684\u8F38\u5165\u503C`;
    }
  };
};
function zh_TW_default() {
  return {
    localeError: error49()
  };
}

// node_modules/zod/v4/locales/yo.js
var error50 = () => {
  const Sizable = {
    string: { unit: "\xE0mi", verb: "n\xED" },
    file: { unit: "bytes", verb: "n\xED" },
    array: { unit: "nkan", verb: "n\xED" },
    set: { unit: "nkan", verb: "n\xED" }
  };
  function getSizing(origin) {
    return Sizable[origin] ?? null;
  }
  const FormatDictionary = {
    regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",
    email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",
    url: "URL",
    emoji: "emoji",
    uuid: "UUID",
    uuidv4: "UUIDv4",
    uuidv6: "UUIDv6",
    nanoid: "nanoid",
    guid: "GUID",
    cuid: "cuid",
    cuid2: "cuid2",
    ulid: "ULID",
    xid: "XID",
    ksuid: "KSUID",
    datetime: "\xE0k\xF3k\xF2 ISO",
    date: "\u1ECDj\u1ECD\u0301 ISO",
    time: "\xE0k\xF3k\xF2 ISO",
    duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",
    ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",
    ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",
    cidrv4: "\xE0gb\xE8gb\xE8 IPv4",
    cidrv6: "\xE0gb\xE8gb\xE8 IPv6",
    base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",
    base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url",
    json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
    e164: "n\u1ECD\u0301mb\xE0 E.164",
    jwt: "JWT",
    template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
  };
  const TypeDictionary = {
    nan: "NaN",
    number: "n\u1ECD\u0301mb\xE0",
    array: "akop\u1ECD"
  };
  return (issue2) => {
    switch (issue2.code) {
      case "invalid_type": {
        const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
        const receivedType = parsedType(issue2.input);
        const received = TypeDictionary[receivedType] ?? receivedType;
        if (/^[A-Z]/.test(issue2.expected)) {
          return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`;
        }
        return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`;
      }
      case "invalid_value":
        if (issue2.values.length === 1)
          return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`;
        return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`;
      case "too_big": {
        const adj = issue2.inclusive ? "<=" : "<";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`;
        return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`;
      }
      case "too_small": {
        const adj = issue2.inclusive ? ">=" : ">";
        const sizing = getSizing(issue2.origin);
        if (sizing)
          return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`;
        return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`;
      }
      case "invalid_format": {
        const _issue = issue2;
        if (_issue.format === "starts_with")
          return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`;
        if (_issue.format === "ends_with")
          return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`;
        if (_issue.format === "includes")
          return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`;
        if (_issue.format === "regex")
          return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`;
        return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue2.format}`;
      }
      case "not_multiple_of":
        return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`;
      case "unrecognized_keys":
        return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`;
      case "invalid_key":
        return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`;
      case "invalid_union":
        return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";
      case "invalid_element":
        return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`;
      default:
        return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";
    }
  };
};
function yo_default() {
  return {
    localeError: error50()
  };
}

// node_modules/zod/v4/core/registries.js
var _a2;
var $output = /* @__PURE__ */ Symbol("ZodOutput");
var $input = /* @__PURE__ */ Symbol("ZodInput");
var $ZodRegistry = class {
  constructor() {
    this._map = /* @__PURE__ */ new WeakMap();
    this._idmap = /* @__PURE__ */ new Map();
  }
  add(schema, ..._meta) {
    const meta3 = _meta[0];
    this._map.set(schema, meta3);
    if (meta3 && typeof meta3 === "object" && "id" in meta3) {
      this._idmap.set(meta3.id, schema);
    }
    return this;
  }
  clear() {
    this._map = /* @__PURE__ */ new WeakMap();
    this._idmap = /* @__PURE__ */ new Map();
    return this;
  }
  remove(schema) {
    const meta3 = this._map.get(schema);
    if (meta3 && typeof meta3 === "object" && "id" in meta3) {
      this._idmap.delete(meta3.id);
    }
    this._map.delete(schema);
    return this;
  }
  get(schema) {
    const p = schema._zod.parent;
    if (p) {
      const pm = { ...this.get(p) ?? {} };
      delete pm.id;
      const f = { ...pm, ...this._map.get(schema) };
      return Object.keys(f).length ? f : void 0;
    }
    return this._map.get(schema);
  }
  has(schema) {
    return this._map.has(schema);
  }
};
function registry() {
  return new $ZodRegistry();
}
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
var globalRegistry = globalThis.__zod_globalRegistry;

// node_modules/zod/v4/core/api.js
// @__NO_SIDE_EFFECTS__
function _string(Class2, params) {
  return new Class2({
    type: "string",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _coercedString(Class2, params) {
  return new Class2({
    type: "string",
    coerce: true,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _email(Class2, params) {
  return new Class2({
    type: "string",
    format: "email",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _guid(Class2, params) {
  return new Class2({
    type: "string",
    format: "guid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _uuid(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _uuidv4(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v4",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _uuidv6(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v6",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _uuidv7(Class2, params) {
  return new Class2({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v7",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _url(Class2, params) {
  return new Class2({
    type: "string",
    format: "url",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _emoji2(Class2, params) {
  return new Class2({
    type: "string",
    format: "emoji",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _nanoid(Class2, params) {
  return new Class2({
    type: "string",
    format: "nanoid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _cuid(Class2, params) {
  return new Class2({
    type: "string",
    format: "cuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _cuid2(Class2, params) {
  return new Class2({
    type: "string",
    format: "cuid2",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _ulid(Class2, params) {
  return new Class2({
    type: "string",
    format: "ulid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _xid(Class2, params) {
  return new Class2({
    type: "string",
    format: "xid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _ksuid(Class2, params) {
  return new Class2({
    type: "string",
    format: "ksuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _ipv4(Class2, params) {
  return new Class2({
    type: "string",
    format: "ipv4",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _ipv6(Class2, params) {
  return new Class2({
    type: "string",
    format: "ipv6",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _mac(Class2, params) {
  return new Class2({
    type: "string",
    format: "mac",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _cidrv4(Class2, params) {
  return new Class2({
    type: "string",
    format: "cidrv4",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _cidrv6(Class2, params) {
  return new Class2({
    type: "string",
    format: "cidrv6",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _base64(Class2, params) {
  return new Class2({
    type: "string",
    format: "base64",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _base64url(Class2, params) {
  return new Class2({
    type: "string",
    format: "base64url",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _e164(Class2, params) {
  return new Class2({
    type: "string",
    format: "e164",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _jwt(Class2, params) {
  return new Class2({
    type: "string",
    format: "jwt",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
var TimePrecision = {
  Any: null,
  Minute: -1,
  Second: 0,
  Millisecond: 3,
  Microsecond: 6
};
// @__NO_SIDE_EFFECTS__
function _isoDateTime(Class2, params) {
  return new Class2({
    type: "string",
    format: "datetime",
    check: "string_format",
    offset: false,
    local: false,
    precision: null,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _isoDate(Class2, params) {
  return new Class2({
    type: "string",
    format: "date",
    check: "string_format",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _isoTime(Class2, params) {
  return new Class2({
    type: "string",
    format: "time",
    check: "string_format",
    precision: null,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _isoDuration(Class2, params) {
  return new Class2({
    type: "string",
    format: "duration",
    check: "string_format",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _number(Class2, params) {
  return new Class2({
    type: "number",
    checks: [],
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _coercedNumber(Class2, params) {
  return new Class2({
    type: "number",
    coerce: true,
    checks: [],
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _int(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "safeint",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _float32(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "float32",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _float64(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "float64",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _int32(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "int32",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _uint32(Class2, params) {
  return new Class2({
    type: "number",
    check: "number_format",
    abort: false,
    format: "uint32",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _boolean(Class2, params) {
  return new Class2({
    type: "boolean",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _coercedBoolean(Class2, params) {
  return new Class2({
    type: "boolean",
    coerce: true,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _bigint(Class2, params) {
  return new Class2({
    type: "bigint",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _coercedBigint(Class2, params) {
  return new Class2({
    type: "bigint",
    coerce: true,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _int64(Class2, params) {
  return new Class2({
    type: "bigint",
    check: "bigint_format",
    abort: false,
    format: "int64",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _uint64(Class2, params) {
  return new Class2({
    type: "bigint",
    check: "bigint_format",
    abort: false,
    format: "uint64",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _symbol(Class2, params) {
  return new Class2({
    type: "symbol",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _undefined2(Class2, params) {
  return new Class2({
    type: "undefined",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _null2(Class2, params) {
  return new Class2({
    type: "null",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _any(Class2) {
  return new Class2({
    type: "any"
  });
}
// @__NO_SIDE_EFFECTS__
function _unknown(Class2) {
  return new Class2({
    type: "unknown"
  });
}
// @__NO_SIDE_EFFECTS__
function _never(Class2, params) {
  return new Class2({
    type: "never",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _void(Class2, params) {
  return new Class2({
    type: "void",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _date(Class2, params) {
  return new Class2({
    type: "date",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _coercedDate(Class2, params) {
  return new Class2({
    type: "date",
    coerce: true,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _nan(Class2, params) {
  return new Class2({
    type: "nan",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _lt(value, params) {
  return new $ZodCheckLessThan({
    check: "less_than",
    ...normalizeParams(params),
    value,
    inclusive: false
  });
}
// @__NO_SIDE_EFFECTS__
function _lte(value, params) {
  return new $ZodCheckLessThan({
    check: "less_than",
    ...normalizeParams(params),
    value,
    inclusive: true
  });
}
// @__NO_SIDE_EFFECTS__
function _gt(value, params) {
  return new $ZodCheckGreaterThan({
    check: "greater_than",
    ...normalizeParams(params),
    value,
    inclusive: false
  });
}
// @__NO_SIDE_EFFECTS__
function _gte(value, params) {
  return new $ZodCheckGreaterThan({
    check: "greater_than",
    ...normalizeParams(params),
    value,
    inclusive: true
  });
}
// @__NO_SIDE_EFFECTS__
function _positive(params) {
  return /* @__PURE__ */ _gt(0, params);
}
// @__NO_SIDE_EFFECTS__
function _negative(params) {
  return /* @__PURE__ */ _lt(0, params);
}
// @__NO_SIDE_EFFECTS__
function _nonpositive(params) {
  return /* @__PURE__ */ _lte(0, params);
}
// @__NO_SIDE_EFFECTS__
function _nonnegative(params) {
  return /* @__PURE__ */ _gte(0, params);
}
// @__NO_SIDE_EFFECTS__
function _multipleOf(value, params) {
  return new $ZodCheckMultipleOf({
    check: "multiple_of",
    ...normalizeParams(params),
    value
  });
}
// @__NO_SIDE_EFFECTS__
function _maxSize(maximum, params) {
  return new $ZodCheckMaxSize({
    check: "max_size",
    ...normalizeParams(params),
    maximum
  });
}
// @__NO_SIDE_EFFECTS__
function _minSize(minimum, params) {
  return new $ZodCheckMinSize({
    check: "min_size",
    ...normalizeParams(params),
    minimum
  });
}
// @__NO_SIDE_EFFECTS__
function _size(size, params) {
  return new $ZodCheckSizeEquals({
    check: "size_equals",
    ...normalizeParams(params),
    size
  });
}
// @__NO_SIDE_EFFECTS__
function _maxLength(maximum, params) {
  const ch = new $ZodCheckMaxLength({
    check: "max_length",
    ...normalizeParams(params),
    maximum
  });
  return ch;
}
// @__NO_SIDE_EFFECTS__
function _minLength(minimum, params) {
  return new $ZodCheckMinLength({
    check: "min_length",
    ...normalizeParams(params),
    minimum
  });
}
// @__NO_SIDE_EFFECTS__
function _length(length, params) {
  return new $ZodCheckLengthEquals({
    check: "length_equals",
    ...normalizeParams(params),
    length
  });
}
// @__NO_SIDE_EFFECTS__
function _regex(pattern, params) {
  return new $ZodCheckRegex({
    check: "string_format",
    format: "regex",
    ...normalizeParams(params),
    pattern
  });
}
// @__NO_SIDE_EFFECTS__
function _lowercase(params) {
  return new $ZodCheckLowerCase({
    check: "string_format",
    format: "lowercase",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _uppercase(params) {
  return new $ZodCheckUpperCase({
    check: "string_format",
    format: "uppercase",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _includes(includes, params) {
  return new $ZodCheckIncludes({
    check: "string_format",
    format: "includes",
    ...normalizeParams(params),
    includes
  });
}
// @__NO_SIDE_EFFECTS__
function _startsWith(prefix, params) {
  return new $ZodCheckStartsWith({
    check: "string_format",
    format: "starts_with",
    ...normalizeParams(params),
    prefix
  });
}
// @__NO_SIDE_EFFECTS__
function _endsWith(suffix, params) {
  return new $ZodCheckEndsWith({
    check: "string_format",
    format: "ends_with",
    ...normalizeParams(params),
    suffix
  });
}
// @__NO_SIDE_EFFECTS__
function _property(property, schema, params) {
  return new $ZodCheckProperty({
    check: "property",
    property,
    schema,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _mime(types, params) {
  return new $ZodCheckMimeType({
    check: "mime_type",
    mime: types,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _overwrite(tx) {
  return new $ZodCheckOverwrite({
    check: "overwrite",
    tx
  });
}
// @__NO_SIDE_EFFECTS__
function _normalize(form) {
  return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
}
// @__NO_SIDE_EFFECTS__
function _trim() {
  return /* @__PURE__ */ _overwrite((input) => input.trim());
}
// @__NO_SIDE_EFFECTS__
function _toLowerCase() {
  return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
}
// @__NO_SIDE_EFFECTS__
function _toUpperCase() {
  return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
}
// @__NO_SIDE_EFFECTS__
function _slugify() {
  return /* @__PURE__ */ _overwrite((input) => slugify(input));
}
// @__NO_SIDE_EFFECTS__
function _array(Class2, element, params) {
  return new Class2({
    type: "array",
    element,
    // get element() {
    //   return element;
    // },
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _union(Class2, options, params) {
  return new Class2({
    type: "union",
    options,
    ...normalizeParams(params)
  });
}
function _xor(Class2, options, params) {
  return new Class2({
    type: "union",
    options,
    inclusive: false,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _discriminatedUnion(Class2, discriminator, options, params) {
  return new Class2({
    type: "union",
    options,
    discriminator,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _intersection(Class2, left, right) {
  return new Class2({
    type: "intersection",
    left,
    right
  });
}
// @__NO_SIDE_EFFECTS__
function _tuple(Class2, items, _paramsOrRest, _params) {
  const hasRest = _paramsOrRest instanceof $ZodType;
  const params = hasRest ? _params : _paramsOrRest;
  const rest = hasRest ? _paramsOrRest : null;
  return new Class2({
    type: "tuple",
    items,
    rest,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _record(Class2, keyType, valueType, params) {
  return new Class2({
    type: "record",
    keyType,
    valueType,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _map(Class2, keyType, valueType, params) {
  return new Class2({
    type: "map",
    keyType,
    valueType,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _set(Class2, valueType, params) {
  return new Class2({
    type: "set",
    valueType,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _enum(Class2, values, params) {
  const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
  return new Class2({
    type: "enum",
    entries,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _nativeEnum(Class2, entries, params) {
  return new Class2({
    type: "enum",
    entries,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _literal(Class2, value, params) {
  return new Class2({
    type: "literal",
    values: Array.isArray(value) ? value : [value],
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _file(Class2, params) {
  return new Class2({
    type: "file",
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _transform(Class2, fn) {
  return new Class2({
    type: "transform",
    transform: fn
  });
}
// @__NO_SIDE_EFFECTS__
function _optional(Class2, innerType) {
  return new Class2({
    type: "optional",
    innerType
  });
}
// @__NO_SIDE_EFFECTS__
function _nullable(Class2, innerType) {
  return new Class2({
    type: "nullable",
    innerType
  });
}
// @__NO_SIDE_EFFECTS__
function _default(Class2, innerType, defaultValue) {
  return new Class2({
    type: "default",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
    }
  });
}
// @__NO_SIDE_EFFECTS__
function _nonoptional(Class2, innerType, params) {
  return new Class2({
    type: "nonoptional",
    innerType,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _success(Class2, innerType) {
  return new Class2({
    type: "success",
    innerType
  });
}
// @__NO_SIDE_EFFECTS__
function _catch(Class2, innerType, catchValue) {
  return new Class2({
    type: "catch",
    innerType,
    catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
  });
}
// @__NO_SIDE_EFFECTS__
function _pipe(Class2, in_, out) {
  return new Class2({
    type: "pipe",
    in: in_,
    out
  });
}
// @__NO_SIDE_EFFECTS__
function _readonly(Class2, innerType) {
  return new Class2({
    type: "readonly",
    innerType
  });
}
// @__NO_SIDE_EFFECTS__
function _templateLiteral(Class2, parts, params) {
  return new Class2({
    type: "template_literal",
    parts,
    ...normalizeParams(params)
  });
}
// @__NO_SIDE_EFFECTS__
function _lazy(Class2, getter) {
  return new Class2({
    type: "lazy",
    getter
  });
}
// @__NO_SIDE_EFFECTS__
function _promise(Class2, innerType) {
  return new Class2({
    type: "promise",
    innerType
  });
}
// @__NO_SIDE_EFFECTS__
function _custom(Class2, fn, _params) {
  const norm = normalizeParams(_params);
  norm.abort ?? (norm.abort = true);
  const schema = new Class2({
    type: "custom",
    check: "custom",
    fn,
    ...norm
  });
  return schema;
}
// @__NO_SIDE_EFFECTS__
function _refine(Class2, fn, _params) {
  const schema = new Class2({
    type: "custom",
    check: "custom",
    fn,
    ...normalizeParams(_params)
  });
  return schema;
}
// @__NO_SIDE_EFFECTS__
function _superRefine(fn, params) {
  const ch = /* @__PURE__ */ _check((payload) => {
    payload.addIssue = (issue2) => {
      if (typeof issue2 === "string") {
        payload.issues.push(issue(issue2, payload.value, ch._zod.def));
      } else {
        const _issue = issue2;
        if (_issue.fatal)
          _issue.continue = false;
        _issue.code ?? (_issue.code = "custom");
        _issue.input ?? (_issue.input = payload.value);
        _issue.inst ?? (_issue.inst = ch);
        _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
        payload.issues.push(issue(_issue));
      }
    };
    return fn(payload.value, payload);
  }, params);
  return ch;
}
// @__NO_SIDE_EFFECTS__
function _check(fn, params) {
  const ch = new $ZodCheck({
    check: "custom",
    ...normalizeParams(params)
  });
  ch._zod.check = fn;
  return ch;
}
// @__NO_SIDE_EFFECTS__
function describe(description) {
  const ch = new $ZodCheck({ check: "describe" });
  ch._zod.onattach = [
    (inst) => {
      const existing = globalRegistry.get(inst) ?? {};
      globalRegistry.add(inst, { ...existing, description });
    }
  ];
  ch._zod.check = () => {
  };
  return ch;
}
// @__NO_SIDE_EFFECTS__
function meta(metadata) {
  const ch = new $ZodCheck({ check: "meta" });
  ch._zod.onattach = [
    (inst) => {
      const existing = globalRegistry.get(inst) ?? {};
      globalRegistry.add(inst, { ...existing, ...metadata });
    }
  ];
  ch._zod.check = () => {
  };
  return ch;
}
// @__NO_SIDE_EFFECTS__
function _stringbool(Classes, _params) {
  const params = normalizeParams(_params);
  let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
  let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
  if (params.case !== "sensitive") {
    truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
    falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
  }
  const truthySet = new Set(truthyArray);
  const falsySet = new Set(falsyArray);
  const _Codec = Classes.Codec ?? $ZodCodec;
  const _Boolean = Classes.Boolean ?? $ZodBoolean;
  const _String = Classes.String ?? $ZodString;
  const stringSchema = new _String({ type: "string", error: params.error });
  const booleanSchema = new _Boolean({ type: "boolean", error: params.error });
  const codec2 = new _Codec({
    type: "pipe",
    in: stringSchema,
    out: booleanSchema,
    transform: ((input, payload) => {
      let data = input;
      if (params.case !== "sensitive")
        data = data.toLowerCase();
      if (truthySet.has(data)) {
        return true;
      } else if (falsySet.has(data)) {
        return false;
      } else {
        payload.issues.push({
          code: "invalid_value",
          expected: "stringbool",
          values: [...truthySet, ...falsySet],
          input: payload.value,
          inst: codec2,
          continue: false
        });
        return {};
      }
    }),
    reverseTransform: ((input, _payload) => {
      if (input === true) {
        return truthyArray[0] || "true";
      } else {
        return falsyArray[0] || "false";
      }
    }),
    error: params.error
  });
  return codec2;
}
// @__NO_SIDE_EFFECTS__
function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
  const params = normalizeParams(_params);
  const def = {
    ...normalizeParams(_params),
    check: "string_format",
    type: "string",
    format,
    fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
    ...params
  };
  if (fnOrRegex instanceof RegExp) {
    def.pattern = fnOrRegex;
  }
  const inst = new Class2(def);
  return inst;
}

// node_modules/zod/v4/core/to-json-schema.js
function initializeContext(params) {
  let target = params?.target ?? "draft-2020-12";
  if (target === "draft-4")
    target = "draft-04";
  if (target === "draft-7")
    target = "draft-07";
  return {
    processors: params.processors ?? {},
    metadataRegistry: params?.metadata ?? globalRegistry,
    target,
    unrepresentable: params?.unrepresentable ?? "throw",
    override: params?.override ?? (() => {
    }),
    io: params?.io ?? "output",
    counter: 0,
    seen: /* @__PURE__ */ new Map(),
    cycles: params?.cycles ?? "ref",
    reused: params?.reused ?? "inline",
    external: params?.external ?? void 0
  };
}
function process2(schema, ctx2, _params = { path: [], schemaPath: [] }) {
  var _a3;
  const def = schema._zod.def;
  const seen = ctx2.seen.get(schema);
  if (seen) {
    seen.count++;
    const isCycle = _params.schemaPath.includes(schema);
    if (isCycle) {
      seen.cycle = _params.path;
    }
    return seen.schema;
  }
  const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
  ctx2.seen.set(schema, result);
  const overrideSchema = schema._zod.toJSONSchema?.();
  if (overrideSchema) {
    result.schema = overrideSchema;
  } else {
    const params = {
      ..._params,
      schemaPath: [..._params.schemaPath, schema],
      path: _params.path
    };
    if (schema._zod.processJSONSchema) {
      schema._zod.processJSONSchema(ctx2, result.schema, params);
    } else {
      const _json = result.schema;
      const processor = ctx2.processors[def.type];
      if (!processor) {
        throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
      }
      processor(schema, ctx2, _json, params);
    }
    const parent = schema._zod.parent;
    if (parent) {
      if (!result.ref)
        result.ref = parent;
      process2(parent, ctx2, params);
      ctx2.seen.get(parent).isParent = true;
    }
  }
  const meta3 = ctx2.metadataRegistry.get(schema);
  if (meta3)
    Object.assign(result.schema, meta3);
  if (ctx2.io === "input" && isTransforming(schema)) {
    delete result.schema.examples;
    delete result.schema.default;
  }
  if (ctx2.io === "input" && "_prefault" in result.schema)
    (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
  delete result.schema._prefault;
  const _result = ctx2.seen.get(schema);
  return _result.schema;
}
function extractDefs(ctx2, schema) {
  const root = ctx2.seen.get(schema);
  if (!root)
    throw new Error("Unprocessed schema. This is a bug in Zod.");
  const idToSchema = /* @__PURE__ */ new Map();
  for (const entry of ctx2.seen.entries()) {
    const id = ctx2.metadataRegistry.get(entry[0])?.id;
    if (id) {
      const existing = idToSchema.get(id);
      if (existing && existing !== entry[0]) {
        throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
      }
      idToSchema.set(id, entry[0]);
    }
  }
  const makeURI = (entry) => {
    const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
    if (ctx2.external) {
      const externalId = ctx2.external.registry.get(entry[0])?.id;
      const uriGenerator = ctx2.external.uri ?? ((id2) => id2);
      if (externalId) {
        return { ref: uriGenerator(externalId) };
      }
      const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx2.counter++}`;
      entry[1].defId = id;
      return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
    }
    if (entry[1] === root) {
      return { ref: "#" };
    }
    const uriPrefix = `#`;
    const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
    const defId = entry[1].schema.id ?? `__schema${ctx2.counter++}`;
    return { defId, ref: defUriPrefix + defId };
  };
  const extractToDef = (entry) => {
    if (entry[1].schema.$ref) {
      return;
    }
    const seen = entry[1];
    const { ref, defId } = makeURI(entry);
    seen.def = { ...seen.schema };
    if (defId)
      seen.defId = defId;
    const schema2 = seen.schema;
    for (const key in schema2) {
      delete schema2[key];
    }
    schema2.$ref = ref;
  };
  if (ctx2.cycles === "throw") {
    for (const entry of ctx2.seen.entries()) {
      const seen = entry[1];
      if (seen.cycle) {
        throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
      }
    }
  }
  for (const entry of ctx2.seen.entries()) {
    const seen = entry[1];
    if (schema === entry[0]) {
      extractToDef(entry);
      continue;
    }
    if (ctx2.external) {
      const ext = ctx2.external.registry.get(entry[0])?.id;
      if (schema !== entry[0] && ext) {
        extractToDef(entry);
        continue;
      }
    }
    const id = ctx2.metadataRegistry.get(entry[0])?.id;
    if (id) {
      extractToDef(entry);
      continue;
    }
    if (seen.cycle) {
      extractToDef(entry);
      continue;
    }
    if (seen.count > 1) {
      if (ctx2.reused === "ref") {
        extractToDef(entry);
        continue;
      }
    }
  }
}
function finalize(ctx2, schema) {
  const root = ctx2.seen.get(schema);
  if (!root)
    throw new Error("Unprocessed schema. This is a bug in Zod.");
  const flattenRef = (zodSchema) => {
    const seen = ctx2.seen.get(zodSchema);
    if (seen.ref === null)
      return;
    const schema2 = seen.def ?? seen.schema;
    const _cached = { ...schema2 };
    const ref = seen.ref;
    seen.ref = null;
    if (ref) {
      flattenRef(ref);
      const refSeen = ctx2.seen.get(ref);
      const refSchema = refSeen.schema;
      if (refSchema.$ref && (ctx2.target === "draft-07" || ctx2.target === "draft-04" || ctx2.target === "openapi-3.0")) {
        schema2.allOf = schema2.allOf ?? [];
        schema2.allOf.push(refSchema);
      } else {
        Object.assign(schema2, refSchema);
      }
      Object.assign(schema2, _cached);
      const isParentRef = zodSchema._zod.parent === ref;
      if (isParentRef) {
        for (const key in schema2) {
          if (key === "$ref" || key === "allOf")
            continue;
          if (!(key in _cached)) {
            delete schema2[key];
          }
        }
      }
      if (refSchema.$ref && refSeen.def) {
        for (const key in schema2) {
          if (key === "$ref" || key === "allOf")
            continue;
          if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) {
            delete schema2[key];
          }
        }
      }
    }
    const parent = zodSchema._zod.parent;
    if (parent && parent !== ref) {
      flattenRef(parent);
      const parentSeen = ctx2.seen.get(parent);
      if (parentSeen?.schema.$ref) {
        schema2.$ref = parentSeen.schema.$ref;
        if (parentSeen.def) {
          for (const key in schema2) {
            if (key === "$ref" || key === "allOf")
              continue;
            if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) {
              delete schema2[key];
            }
          }
        }
      }
    }
    ctx2.override({
      zodSchema,
      jsonSchema: schema2,
      path: seen.path ?? []
    });
  };
  for (const entry of [...ctx2.seen.entries()].reverse()) {
    flattenRef(entry[0]);
  }
  const result = {};
  if (ctx2.target === "draft-2020-12") {
    result.$schema = "https://json-schema.org/draft/2020-12/schema";
  } else if (ctx2.target === "draft-07") {
    result.$schema = "http://json-schema.org/draft-07/schema#";
  } else if (ctx2.target === "draft-04") {
    result.$schema = "http://json-schema.org/draft-04/schema#";
  } else if (ctx2.target === "openapi-3.0") {
  } else {
  }
  if (ctx2.external?.uri) {
    const id = ctx2.external.registry.get(schema)?.id;
    if (!id)
      throw new Error("Schema is missing an `id` property");
    result.$id = ctx2.external.uri(id);
  }
  Object.assign(result, root.def ?? root.schema);
  const rootMetaId = ctx2.metadataRegistry.get(schema)?.id;
  if (rootMetaId !== void 0 && result.id === rootMetaId)
    delete result.id;
  const defs = ctx2.external?.defs ?? {};
  for (const entry of ctx2.seen.entries()) {
    const seen = entry[1];
    if (seen.def && seen.defId) {
      if (seen.def.id === seen.defId)
        delete seen.def.id;
      defs[seen.defId] = seen.def;
    }
  }
  if (ctx2.external) {
  } else {
    if (Object.keys(defs).length > 0) {
      if (ctx2.target === "draft-2020-12") {
        result.$defs = defs;
      } else {
        result.definitions = defs;
      }
    }
  }
  try {
    const finalized = JSON.parse(JSON.stringify(result));
    Object.defineProperty(finalized, "~standard", {
      value: {
        ...schema["~standard"],
        jsonSchema: {
          input: createStandardJSONSchemaMethod(schema, "input", ctx2.processors),
          output: createStandardJSONSchemaMethod(schema, "output", ctx2.processors)
        }
      },
      enumerable: false,
      writable: false
    });
    return finalized;
  } catch (_err) {
    throw new Error("Error converting schema to JSON.");
  }
}
function isTransforming(_schema, _ctx) {
  const ctx2 = _ctx ?? { seen: /* @__PURE__ */ new Set() };
  if (ctx2.seen.has(_schema))
    return false;
  ctx2.seen.add(_schema);
  const def = _schema._zod.def;
  if (def.type === "transform")
    return true;
  if (def.type === "array")
    return isTransforming(def.element, ctx2);
  if (def.type === "set")
    return isTransforming(def.valueType, ctx2);
  if (def.type === "lazy")
    return isTransforming(def.getter(), ctx2);
  if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
    return isTransforming(def.innerType, ctx2);
  }
  if (def.type === "intersection") {
    return isTransforming(def.left, ctx2) || isTransforming(def.right, ctx2);
  }
  if (def.type === "record" || def.type === "map") {
    return isTransforming(def.keyType, ctx2) || isTransforming(def.valueType, ctx2);
  }
  if (def.type === "pipe") {
    if (_schema._zod.traits.has("$ZodCodec"))
      return true;
    return isTransforming(def.in, ctx2) || isTransforming(def.out, ctx2);
  }
  if (def.type === "object") {
    for (const key in def.shape) {
      if (isTransforming(def.shape[key], ctx2))
        return true;
    }
    return false;
  }
  if (def.type === "union") {
    for (const option of def.options) {
      if (isTransforming(option, ctx2))
        return true;
    }
    return false;
  }
  if (def.type === "tuple") {
    for (const item of def.items) {
      if (isTransforming(item, ctx2))
        return true;
    }
    if (def.rest && isTransforming(def.rest, ctx2))
      return true;
    return false;
  }
  return false;
}
var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
  const ctx2 = initializeContext({ ...params, processors });
  process2(schema, ctx2);
  extractDefs(ctx2, schema);
  return finalize(ctx2, schema);
};
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
  const { libraryOptions, target } = params ?? {};
  const ctx2 = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
  process2(schema, ctx2);
  extractDefs(ctx2, schema);
  return finalize(ctx2, schema);
};

// node_modules/zod/v4/core/json-schema-processors.js
var formatMap = {
  guid: "uuid",
  url: "uri",
  datetime: "date-time",
  json_string: "json-string",
  regex: ""
  // do not set
};
var stringProcessor = (schema, ctx2, _json, _params) => {
  const json2 = _json;
  json2.type = "string";
  const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
  if (typeof minimum === "number")
    json2.minLength = minimum;
  if (typeof maximum === "number")
    json2.maxLength = maximum;
  if (format) {
    json2.format = formatMap[format] ?? format;
    if (json2.format === "")
      delete json2.format;
    if (format === "time") {
      delete json2.format;
    }
  }
  if (contentEncoding)
    json2.contentEncoding = contentEncoding;
  if (patterns && patterns.size > 0) {
    const regexes = [...patterns];
    if (regexes.length === 1)
      json2.pattern = regexes[0].source;
    else if (regexes.length > 1) {
      json2.allOf = [
        ...regexes.map((regex) => ({
          ...ctx2.target === "draft-07" || ctx2.target === "draft-04" || ctx2.target === "openapi-3.0" ? { type: "string" } : {},
          pattern: regex.source
        }))
      ];
    }
  }
};
var numberProcessor = (schema, ctx2, _json, _params) => {
  const json2 = _json;
  const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
  if (typeof format === "string" && format.includes("int"))
    json2.type = "integer";
  else
    json2.type = "number";
  const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
  const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
  const legacy = ctx2.target === "draft-04" || ctx2.target === "openapi-3.0";
  if (exMin) {
    if (legacy) {
      json2.minimum = exclusiveMinimum;
      json2.exclusiveMinimum = true;
    } else {
      json2.exclusiveMinimum = exclusiveMinimum;
    }
  } else if (typeof minimum === "number") {
    json2.minimum = minimum;
  }
  if (exMax) {
    if (legacy) {
      json2.maximum = exclusiveMaximum;
      json2.exclusiveMaximum = true;
    } else {
      json2.exclusiveMaximum = exclusiveMaximum;
    }
  } else if (typeof maximum === "number") {
    json2.maximum = maximum;
  }
  if (typeof multipleOf === "number")
    json2.multipleOf = multipleOf;
};
var booleanProcessor = (_schema, _ctx, json2, _params) => {
  json2.type = "boolean";
};
var bigintProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("BigInt cannot be represented in JSON Schema");
  }
};
var symbolProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Symbols cannot be represented in JSON Schema");
  }
};
var nullProcessor = (_schema, ctx2, json2, _params) => {
  if (ctx2.target === "openapi-3.0") {
    json2.type = "string";
    json2.nullable = true;
    json2.enum = [null];
  } else {
    json2.type = "null";
  }
};
var undefinedProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Undefined cannot be represented in JSON Schema");
  }
};
var voidProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Void cannot be represented in JSON Schema");
  }
};
var neverProcessor = (_schema, _ctx, json2, _params) => {
  json2.not = {};
};
var anyProcessor = (_schema, _ctx, _json, _params) => {
};
var unknownProcessor = (_schema, _ctx, _json, _params) => {
};
var dateProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Date cannot be represented in JSON Schema");
  }
};
var enumProcessor = (schema, _ctx, json2, _params) => {
  const def = schema._zod.def;
  const values = getEnumValues(def.entries);
  if (values.every((v) => typeof v === "number"))
    json2.type = "number";
  if (values.every((v) => typeof v === "string"))
    json2.type = "string";
  json2.enum = values;
};
var literalProcessor = (schema, ctx2, json2, _params) => {
  const def = schema._zod.def;
  const vals = [];
  for (const val of def.values) {
    if (val === void 0) {
      if (ctx2.unrepresentable === "throw") {
        throw new Error("Literal `undefined` cannot be represented in JSON Schema");
      } else {
      }
    } else if (typeof val === "bigint") {
      if (ctx2.unrepresentable === "throw") {
        throw new Error("BigInt literals cannot be represented in JSON Schema");
      } else {
        vals.push(Number(val));
      }
    } else {
      vals.push(val);
    }
  }
  if (vals.length === 0) {
  } else if (vals.length === 1) {
    const val = vals[0];
    json2.type = val === null ? "null" : typeof val;
    if (ctx2.target === "draft-04" || ctx2.target === "openapi-3.0") {
      json2.enum = [val];
    } else {
      json2.const = val;
    }
  } else {
    if (vals.every((v) => typeof v === "number"))
      json2.type = "number";
    if (vals.every((v) => typeof v === "string"))
      json2.type = "string";
    if (vals.every((v) => typeof v === "boolean"))
      json2.type = "boolean";
    if (vals.every((v) => v === null))
      json2.type = "null";
    json2.enum = vals;
  }
};
var nanProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("NaN cannot be represented in JSON Schema");
  }
};
var templateLiteralProcessor = (schema, _ctx, json2, _params) => {
  const _json = json2;
  const pattern = schema._zod.pattern;
  if (!pattern)
    throw new Error("Pattern not found in template literal");
  _json.type = "string";
  _json.pattern = pattern.source;
};
var fileProcessor = (schema, _ctx, json2, _params) => {
  const _json = json2;
  const file2 = {
    type: "string",
    format: "binary",
    contentEncoding: "binary"
  };
  const { minimum, maximum, mime } = schema._zod.bag;
  if (minimum !== void 0)
    file2.minLength = minimum;
  if (maximum !== void 0)
    file2.maxLength = maximum;
  if (mime) {
    if (mime.length === 1) {
      file2.contentMediaType = mime[0];
      Object.assign(_json, file2);
    } else {
      Object.assign(_json, file2);
      _json.anyOf = mime.map((m2) => ({ contentMediaType: m2 }));
    }
  } else {
    Object.assign(_json, file2);
  }
};
var successProcessor = (_schema, _ctx, json2, _params) => {
  json2.type = "boolean";
};
var customProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Custom types cannot be represented in JSON Schema");
  }
};
var functionProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Function types cannot be represented in JSON Schema");
  }
};
var transformProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Transforms cannot be represented in JSON Schema");
  }
};
var mapProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Map cannot be represented in JSON Schema");
  }
};
var setProcessor = (_schema, ctx2, _json, _params) => {
  if (ctx2.unrepresentable === "throw") {
    throw new Error("Set cannot be represented in JSON Schema");
  }
};
var arrayProcessor = (schema, ctx2, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  const { minimum, maximum } = schema._zod.bag;
  if (typeof minimum === "number")
    json2.minItems = minimum;
  if (typeof maximum === "number")
    json2.maxItems = maximum;
  json2.type = "array";
  json2.items = process2(def.element, ctx2, {
    ...params,
    path: [...params.path, "items"]
  });
};
var objectProcessor = (schema, ctx2, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  json2.type = "object";
  json2.properties = {};
  const shape = def.shape;
  for (const key in shape) {
    json2.properties[key] = process2(shape[key], ctx2, {
      ...params,
      path: [...params.path, "properties", key]
    });
  }
  const allKeys = new Set(Object.keys(shape));
  const requiredKeys = new Set([...allKeys].filter((key) => {
    const v = def.shape[key]._zod;
    if (ctx2.io === "input") {
      return v.optin === void 0;
    } else {
      return v.optout === void 0;
    }
  }));
  if (requiredKeys.size > 0) {
    json2.required = Array.from(requiredKeys);
  }
  if (def.catchall?._zod.def.type === "never") {
    json2.additionalProperties = false;
  } else if (!def.catchall) {
    if (ctx2.io === "output")
      json2.additionalProperties = false;
  } else if (def.catchall) {
    json2.additionalProperties = process2(def.catchall, ctx2, {
      ...params,
      path: [...params.path, "additionalProperties"]
    });
  }
};
var unionProcessor = (schema, ctx2, json2, params) => {
  const def = schema._zod.def;
  const isExclusive = def.inclusive === false;
  const options = def.options.map((x, i) => process2(x, ctx2, {
    ...params,
    path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
  }));
  if (isExclusive) {
    json2.oneOf = options;
  } else {
    json2.anyOf = options;
  }
};
var intersectionProcessor = (schema, ctx2, json2, params) => {
  const def = schema._zod.def;
  const a = process2(def.left, ctx2, {
    ...params,
    path: [...params.path, "allOf", 0]
  });
  const b = process2(def.right, ctx2, {
    ...params,
    path: [...params.path, "allOf", 1]
  });
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
  const allOf = [
    ...isSimpleIntersection(a) ? a.allOf : [a],
    ...isSimpleIntersection(b) ? b.allOf : [b]
  ];
  json2.allOf = allOf;
};
var tupleProcessor = (schema, ctx2, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  json2.type = "array";
  const prefixPath = ctx2.target === "draft-2020-12" ? "prefixItems" : "items";
  const restPath = ctx2.target === "draft-2020-12" ? "items" : ctx2.target === "openapi-3.0" ? "items" : "additionalItems";
  const prefixItems = def.items.map((x, i) => process2(x, ctx2, {
    ...params,
    path: [...params.path, prefixPath, i]
  }));
  const rest = def.rest ? process2(def.rest, ctx2, {
    ...params,
    path: [...params.path, restPath, ...ctx2.target === "openapi-3.0" ? [def.items.length] : []]
  }) : null;
  if (ctx2.target === "draft-2020-12") {
    json2.prefixItems = prefixItems;
    if (rest) {
      json2.items = rest;
    }
  } else if (ctx2.target === "openapi-3.0") {
    json2.items = {
      anyOf: prefixItems
    };
    if (rest) {
      json2.items.anyOf.push(rest);
    }
    json2.minItems = prefixItems.length;
    if (!rest) {
      json2.maxItems = prefixItems.length;
    }
  } else {
    json2.items = prefixItems;
    if (rest) {
      json2.additionalItems = rest;
    }
  }
  const { minimum, maximum } = schema._zod.bag;
  if (typeof minimum === "number")
    json2.minItems = minimum;
  if (typeof maximum === "number")
    json2.maxItems = maximum;
};
var recordProcessor = (schema, ctx2, _json, params) => {
  const json2 = _json;
  const def = schema._zod.def;
  json2.type = "object";
  const keyType = def.keyType;
  const keyBag = keyType._zod.bag;
  const patterns = keyBag?.patterns;
  if (def.mode === "loose" && patterns && patterns.size > 0) {
    const valueSchema = process2(def.valueType, ctx2, {
      ...params,
      path: [...params.path, "patternProperties", "*"]
    });
    json2.patternProperties = {};
    for (const pattern of patterns) {
      json2.patternProperties[pattern.source] = valueSchema;
    }
  } else {
    if (ctx2.target === "draft-07" || ctx2.target === "draft-2020-12") {
      json2.propertyNames = process2(def.keyType, ctx2, {
        ...params,
        path: [...params.path, "propertyNames"]
      });
    }
    json2.additionalProperties = process2(def.valueType, ctx2, {
      ...params,
      path: [...params.path, "additionalProperties"]
    });
  }
  const keyValues = keyType._zod.values;
  if (keyValues) {
    const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number");
    if (validKeyValues.length > 0) {
      json2.required = validKeyValues;
    }
  }
};
var nullableProcessor = (schema, ctx2, json2, params) => {
  const def = schema._zod.def;
  const inner = process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  if (ctx2.target === "openapi-3.0") {
    seen.ref = def.innerType;
    json2.nullable = true;
  } else {
    json2.anyOf = [inner, { type: "null" }];
  }
};
var nonoptionalProcessor = (schema, ctx2, _json, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = def.innerType;
};
var defaultProcessor = (schema, ctx2, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = def.innerType;
  json2.default = JSON.parse(JSON.stringify(def.defaultValue));
};
var prefaultProcessor = (schema, ctx2, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = def.innerType;
  if (ctx2.io === "input")
    json2._prefault = JSON.parse(JSON.stringify(def.defaultValue));
};
var catchProcessor = (schema, ctx2, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = def.innerType;
  let catchValue;
  try {
    catchValue = def.catchValue(void 0);
  } catch {
    throw new Error("Dynamic catch values are not supported in JSON Schema");
  }
  json2.default = catchValue;
};
var pipeProcessor = (schema, ctx2, _json, params) => {
  const def = schema._zod.def;
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
  const innerType = ctx2.io === "input" ? inIsTransform ? def.out : def.in : def.out;
  process2(innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = innerType;
};
var readonlyProcessor = (schema, ctx2, json2, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = def.innerType;
  json2.readOnly = true;
};
var promiseProcessor = (schema, ctx2, _json, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = def.innerType;
};
var optionalProcessor = (schema, ctx2, _json, params) => {
  const def = schema._zod.def;
  process2(def.innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = def.innerType;
};
var lazyProcessor = (schema, ctx2, _json, params) => {
  const innerType = schema._zod.innerType;
  process2(innerType, ctx2, params);
  const seen = ctx2.seen.get(schema);
  seen.ref = innerType;
};
var allProcessors = {
  string: stringProcessor,
  number: numberProcessor,
  boolean: booleanProcessor,
  bigint: bigintProcessor,
  symbol: symbolProcessor,
  null: nullProcessor,
  undefined: undefinedProcessor,
  void: voidProcessor,
  never: neverProcessor,
  any: anyProcessor,
  unknown: unknownProcessor,
  date: dateProcessor,
  enum: enumProcessor,
  literal: literalProcessor,
  nan: nanProcessor,
  template_literal: templateLiteralProcessor,
  file: fileProcessor,
  success: successProcessor,
  custom: customProcessor,
  function: functionProcessor,
  transform: transformProcessor,
  map: mapProcessor,
  set: setProcessor,
  array: arrayProcessor,
  object: objectProcessor,
  union: unionProcessor,
  intersection: intersectionProcessor,
  tuple: tupleProcessor,
  record: recordProcessor,
  nullable: nullableProcessor,
  nonoptional: nonoptionalProcessor,
  default: defaultProcessor,
  prefault: prefaultProcessor,
  catch: catchProcessor,
  pipe: pipeProcessor,
  readonly: readonlyProcessor,
  promise: promiseProcessor,
  optional: optionalProcessor,
  lazy: lazyProcessor
};
function toJSONSchema(input, params) {
  if ("_idmap" in input) {
    const registry2 = input;
    const ctx3 = initializeContext({ ...params, processors: allProcessors });
    const defs = {};
    for (const entry of registry2._idmap.entries()) {
      const [_, schema] = entry;
      process2(schema, ctx3);
    }
    const schemas = {};
    const external = {
      registry: registry2,
      uri: params?.uri,
      defs
    };
    ctx3.external = external;
    for (const entry of registry2._idmap.entries()) {
      const [key, schema] = entry;
      extractDefs(ctx3, schema);
      schemas[key] = finalize(ctx3, schema);
    }
    if (Object.keys(defs).length > 0) {
      const defsSegment = ctx3.target === "draft-2020-12" ? "$defs" : "definitions";
      schemas.__shared = {
        [defsSegment]: defs
      };
    }
    return { schemas };
  }
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
  process2(input, ctx2);
  extractDefs(ctx2, input);
  return finalize(ctx2, input);
}

// node_modules/zod/v4/core/json-schema-generator.js
var JSONSchemaGenerator = class {
  /** @deprecated Access via ctx instead */
  get metadataRegistry() {
    return this.ctx.metadataRegistry;
  }
  /** @deprecated Access via ctx instead */
  get target() {
    return this.ctx.target;
  }
  /** @deprecated Access via ctx instead */
  get unrepresentable() {
    return this.ctx.unrepresentable;
  }
  /** @deprecated Access via ctx instead */
  get override() {
    return this.ctx.override;
  }
  /** @deprecated Access via ctx instead */
  get io() {
    return this.ctx.io;
  }
  /** @deprecated Access via ctx instead */
  get counter() {
    return this.ctx.counter;
  }
  set counter(value) {
    this.ctx.counter = value;
  }
  /** @deprecated Access via ctx instead */
  get seen() {
    return this.ctx.seen;
  }
  constructor(params) {
    let normalizedTarget = params?.target ?? "draft-2020-12";
    if (normalizedTarget === "draft-4")
      normalizedTarget = "draft-04";
    if (normalizedTarget === "draft-7")
      normalizedTarget = "draft-07";
    this.ctx = initializeContext({
      processors: allProcessors,
      target: normalizedTarget,
      ...params?.metadata && { metadata: params.metadata },
      ...params?.unrepresentable && { unrepresentable: params.unrepresentable },
      ...params?.override && { override: params.override },
      ...params?.io && { io: params.io }
    });
  }
  /**
   * Process a schema to prepare it for JSON Schema generation.
   * This must be called before emit().
   */
  process(schema, _params = { path: [], schemaPath: [] }) {
    return process2(schema, this.ctx, _params);
  }
  /**
   * Emit the final JSON Schema after processing.
   * Must call process() first.
   */
  emit(schema, _params) {
    if (_params) {
      if (_params.cycles)
        this.ctx.cycles = _params.cycles;
      if (_params.reused)
        this.ctx.reused = _params.reused;
      if (_params.external)
        this.ctx.external = _params.external;
    }
    extractDefs(this.ctx, schema);
    const result = finalize(this.ctx, schema);
    const { "~standard": _, ...plainResult } = result;
    return plainResult;
  }
};

// node_modules/zod/v4/core/json-schema.js
var json_schema_exports = {};

// node_modules/zod/v4/mini/schemas.js
var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
  if (!inst._zod)
    throw new Error("Uninitialized schema in ZodMiniType.");
  $ZodType.init(inst, def);
  inst.def = def;
  inst.type = def.type;
  inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
  inst.safeParse = (data, params) => safeParse(inst, data, params);
  inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
  inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
  inst.check = (...checks) => {
    return inst.clone({
      ...def,
      checks: [
        ...def.checks ?? [],
        ...checks.map((ch) => typeof ch === "function" ? {
          _zod: { check: ch, def: { check: "custom" }, onattach: [] }
        } : ch)
      ]
    }, { parent: true });
  };
  inst.with = inst.check;
  inst.clone = (_def, params) => clone(inst, _def, params);
  inst.brand = () => inst;
  inst.register = ((reg, meta3) => {
    reg.add(inst, meta3);
    return inst;
  });
  inst.apply = (fn) => fn(inst);
});
var ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
  $ZodObject.init(inst, def);
  ZodMiniType.init(inst, def);
  defineLazy(inst, "shape", () => def.shape);
});
// @__NO_SIDE_EFFECTS__
function object(shape, params) {
  const def = {
    type: "object",
    shape: shape ?? {},
    ...normalizeParams(params)
  };
  return new ZodMiniObject(def);
}

// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
function isZ4Schema(s) {
  const schema = s;
  return !!schema._zod;
}
function objectFromShape(shape) {
  const values = Object.values(shape);
  if (values.length === 0)
    return object({});
  const allV4 = values.every(isZ4Schema);
  const allV3 = values.every((s) => !isZ4Schema(s));
  if (allV4)
    return object(shape);
  if (allV3)
    return objectType(shape);
  throw new Error("Mixed Zod versions detected in object shape.");
}
function safeParse2(schema, data) {
  if (isZ4Schema(schema)) {
    const result2 = safeParse(schema, data);
    return result2;
  }
  const v3Schema = schema;
  const result = v3Schema.safeParse(data);
  return result;
}
async function safeParseAsync2(schema, data) {
  if (isZ4Schema(schema)) {
    const result2 = await safeParseAsync(schema, data);
    return result2;
  }
  const v3Schema = schema;
  const result = await v3Schema.safeParseAsync(data);
  return result;
}
function getObjectShape(schema) {
  if (!schema)
    return void 0;
  let rawShape;
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    rawShape = v4Schema._zod?.def?.shape;
  } else {
    const v3Schema = schema;
    rawShape = v3Schema.shape;
  }
  if (!rawShape)
    return void 0;
  if (typeof rawShape === "function") {
    try {
      return rawShape();
    } catch {
      return void 0;
    }
  }
  return rawShape;
}
function normalizeObjectSchema(schema) {
  if (!schema)
    return void 0;
  if (typeof schema === "object") {
    const asV3 = schema;
    const asV4 = schema;
    if (!asV3._def && !asV4._zod) {
      const values = Object.values(schema);
      if (values.length > 0 && values.every((v) => typeof v === "object" && v !== null && (v._def !== void 0 || v._zod !== void 0 || typeof v.parse === "function"))) {
        return objectFromShape(schema);
      }
    }
  }
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    const def = v4Schema._zod?.def;
    if (def && (def.type === "object" || def.shape !== void 0)) {
      return schema;
    }
  } else {
    const v3Schema = schema;
    if (v3Schema.shape !== void 0) {
      return schema;
    }
  }
  return void 0;
}
function getParseErrorMessage(error51) {
  if (error51 && typeof error51 === "object") {
    if ("message" in error51 && typeof error51.message === "string") {
      return error51.message;
    }
    if ("issues" in error51 && Array.isArray(error51.issues) && error51.issues.length > 0) {
      const firstIssue = error51.issues[0];
      if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
        return String(firstIssue.message);
      }
    }
    try {
      return JSON.stringify(error51);
    } catch {
      return String(error51);
    }
  }
  return String(error51);
}
function getSchemaDescription(schema) {
  return schema.description;
}
function isSchemaOptional(schema) {
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    return v4Schema._zod?.def?.type === "optional";
  }
  const v3Schema = schema;
  if (typeof schema.isOptional === "function") {
    return schema.isOptional();
  }
  return v3Schema._def?.typeName === "ZodOptional";
}
function getLiteralValue(schema) {
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    const def2 = v4Schema._zod?.def;
    if (def2) {
      if (def2.value !== void 0)
        return def2.value;
      if (Array.isArray(def2.values) && def2.values.length > 0) {
        return def2.values[0];
      }
    }
  }
  const v3Schema = schema;
  const def = v3Schema._def;
  if (def) {
    if (def.value !== void 0)
      return def.value;
    if (Array.isArray(def.values) && def.values.length > 0) {
      return def.values[0];
    }
  }
  const directValue = schema.value;
  if (directValue !== void 0)
    return directValue;
  return void 0;
}

// node_modules/zod/v4/classic/external.js
var external_exports = {};
__export(external_exports, {
  $brand: () => $brand,
  $input: () => $input,
  $output: () => $output,
  NEVER: () => NEVER,
  TimePrecision: () => TimePrecision,
  ZodAny: () => ZodAny2,
  ZodArray: () => ZodArray2,
  ZodBase64: () => ZodBase64,
  ZodBase64URL: () => ZodBase64URL,
  ZodBigInt: () => ZodBigInt2,
  ZodBigIntFormat: () => ZodBigIntFormat,
  ZodBoolean: () => ZodBoolean2,
  ZodCIDRv4: () => ZodCIDRv4,
  ZodCIDRv6: () => ZodCIDRv6,
  ZodCUID: () => ZodCUID,
  ZodCUID2: () => ZodCUID2,
  ZodCatch: () => ZodCatch2,
  ZodCodec: () => ZodCodec,
  ZodCustom: () => ZodCustom,
  ZodCustomStringFormat: () => ZodCustomStringFormat,
  ZodDate: () => ZodDate2,
  ZodDefault: () => ZodDefault2,
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2,
  ZodE164: () => ZodE164,
  ZodEmail: () => ZodEmail,
  ZodEmoji: () => ZodEmoji,
  ZodEnum: () => ZodEnum2,
  ZodError: () => ZodError2,
  ZodExactOptional: () => ZodExactOptional,
  ZodFile: () => ZodFile,
  ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2,
  ZodFunction: () => ZodFunction2,
  ZodGUID: () => ZodGUID,
  ZodIPv4: () => ZodIPv4,
  ZodIPv6: () => ZodIPv6,
  ZodISODate: () => ZodISODate,
  ZodISODateTime: () => ZodISODateTime,
  ZodISODuration: () => ZodISODuration,
  ZodISOTime: () => ZodISOTime,
  ZodIntersection: () => ZodIntersection2,
  ZodIssueCode: () => ZodIssueCode2,
  ZodJWT: () => ZodJWT,
  ZodKSUID: () => ZodKSUID,
  ZodLazy: () => ZodLazy2,
  ZodLiteral: () => ZodLiteral2,
  ZodMAC: () => ZodMAC,
  ZodMap: () => ZodMap2,
  ZodNaN: () => ZodNaN2,
  ZodNanoID: () => ZodNanoID,
  ZodNever: () => ZodNever2,
  ZodNonOptional: () => ZodNonOptional,
  ZodNull: () => ZodNull2,
  ZodNullable: () => ZodNullable2,
  ZodNumber: () => ZodNumber2,
  ZodNumberFormat: () => ZodNumberFormat,
  ZodObject: () => ZodObject2,
  ZodOptional: () => ZodOptional2,
  ZodPipe: () => ZodPipe,
  ZodPrefault: () => ZodPrefault,
  ZodPreprocess: () => ZodPreprocess,
  ZodPromise: () => ZodPromise2,
  ZodReadonly: () => ZodReadonly2,
  ZodRealError: () => ZodRealError,
  ZodRecord: () => ZodRecord2,
  ZodSet: () => ZodSet2,
  ZodString: () => ZodString2,
  ZodStringFormat: () => ZodStringFormat,
  ZodSuccess: () => ZodSuccess,
  ZodSymbol: () => ZodSymbol2,
  ZodTemplateLiteral: () => ZodTemplateLiteral,
  ZodTransform: () => ZodTransform,
  ZodTuple: () => ZodTuple2,
  ZodType: () => ZodType2,
  ZodULID: () => ZodULID,
  ZodURL: () => ZodURL,
  ZodUUID: () => ZodUUID,
  ZodUndefined: () => ZodUndefined2,
  ZodUnion: () => ZodUnion2,
  ZodUnknown: () => ZodUnknown2,
  ZodVoid: () => ZodVoid2,
  ZodXID: () => ZodXID,
  ZodXor: () => ZodXor,
  _ZodString: () => _ZodString,
  _default: () => _default2,
  _function: () => _function,
  any: () => any,
  array: () => array,
  base64: () => base642,
  base64url: () => base64url2,
  bigint: () => bigint2,
  boolean: () => boolean2,
  catch: () => _catch2,
  check: () => check,
  cidrv4: () => cidrv42,
  cidrv6: () => cidrv62,
  clone: () => clone,
  codec: () => codec,
  coerce: () => coerce_exports2,
  config: () => config,
  core: () => core_exports2,
  cuid: () => cuid3,
  cuid2: () => cuid22,
  custom: () => custom,
  date: () => date3,
  decode: () => decode2,
  decodeAsync: () => decodeAsync2,
  describe: () => describe2,
  discriminatedUnion: () => discriminatedUnion,
  e164: () => e1642,
  email: () => email2,
  emoji: () => emoji2,
  encode: () => encode2,
  encodeAsync: () => encodeAsync2,
  endsWith: () => _endsWith,
  enum: () => _enum2,
  exactOptional: () => exactOptional,
  file: () => file,
  flattenError: () => flattenError,
  float32: () => float32,
  float64: () => float64,
  formatError: () => formatError,
  fromJSONSchema: () => fromJSONSchema,
  function: () => _function,
  getErrorMap: () => getErrorMap2,
  globalRegistry: () => globalRegistry,
  gt: () => _gt,
  gte: () => _gte,
  guid: () => guid2,
  hash: () => hash,
  hex: () => hex2,
  hostname: () => hostname2,
  httpUrl: () => httpUrl,
  includes: () => _includes,
  instanceof: () => _instanceof,
  int: () => int,
  int32: () => int32,
  int64: () => int64,
  intersection: () => intersection,
  invertCodec: () => invertCodec,
  ipv4: () => ipv42,
  ipv6: () => ipv62,
  iso: () => iso_exports2,
  json: () => json,
  jwt: () => jwt,
  keyof: () => keyof,
  ksuid: () => ksuid2,
  lazy: () => lazy,
  length: () => _length,
  literal: () => literal,
  locales: () => locales_exports,
  looseObject: () => looseObject,
  looseRecord: () => looseRecord,
  lowercase: () => _lowercase,
  lt: () => _lt,
  lte: () => _lte,
  mac: () => mac2,
  map: () => map,
  maxLength: () => _maxLength,
  maxSize: () => _maxSize,
  meta: () => meta2,
  mime: () => _mime,
  minLength: () => _minLength,
  minSize: () => _minSize,
  multipleOf: () => _multipleOf,
  nan: () => nan,
  nanoid: () => nanoid2,
  nativeEnum: () => nativeEnum,
  negative: () => _negative,
  never: () => never,
  nonnegative: () => _nonnegative,
  nonoptional: () => nonoptional,
  nonpositive: () => _nonpositive,
  normalize: () => _normalize,
  null: () => _null3,
  nullable: () => nullable,
  nullish: () => nullish2,
  number: () => number2,
  object: () => object2,
  optional: () => optional,
  overwrite: () => _overwrite,
  parse: () => parse2,
  parseAsync: () => parseAsync2,
  partialRecord: () => partialRecord,
  pipe: () => pipe,
  positive: () => _positive,
  prefault: () => prefault,
  preprocess: () => preprocess,
  prettifyError: () => prettifyError,
  promise: () => promise,
  property: () => _property,
  readonly: () => readonly,
  record: () => record,
  refine: () => refine,
  regex: () => _regex,
  regexes: () => regexes_exports,
  registry: () => registry,
  safeDecode: () => safeDecode2,
  safeDecodeAsync: () => safeDecodeAsync2,
  safeEncode: () => safeEncode2,
  safeEncodeAsync: () => safeEncodeAsync2,
  safeParse: () => safeParse3,
  safeParseAsync: () => safeParseAsync3,
  set: () => set,
  setErrorMap: () => setErrorMap,
  size: () => _size,
  slugify: () => _slugify,
  startsWith: () => _startsWith,
  strictObject: () => strictObject,
  string: () => string2,
  stringFormat: () => stringFormat,
  stringbool: () => stringbool,
  success: () => success,
  superRefine: () => superRefine,
  symbol: () => symbol,
  templateLiteral: () => templateLiteral,
  toJSONSchema: () => toJSONSchema,
  toLowerCase: () => _toLowerCase,
  toUpperCase: () => _toUpperCase,
  transform: () => transform,
  treeifyError: () => treeifyError,
  trim: () => _trim,
  tuple: () => tuple,
  uint32: () => uint32,
  uint64: () => uint64,
  ulid: () => ulid2,
  undefined: () => _undefined3,
  union: () => union,
  unknown: () => unknown,
  uppercase: () => _uppercase,
  url: () => url,
  util: () => util_exports,
  uuid: () => uuid2,
  uuidv4: () => uuidv4,
  uuidv6: () => uuidv6,
  uuidv7: () => uuidv7,
  void: () => _void2,
  xid: () => xid2,
  xor: () => xor
});

// node_modules/zod/v4/classic/schemas.js
var schemas_exports2 = {};
__export(schemas_exports2, {
  ZodAny: () => ZodAny2,
  ZodArray: () => ZodArray2,
  ZodBase64: () => ZodBase64,
  ZodBase64URL: () => ZodBase64URL,
  ZodBigInt: () => ZodBigInt2,
  ZodBigIntFormat: () => ZodBigIntFormat,
  ZodBoolean: () => ZodBoolean2,
  ZodCIDRv4: () => ZodCIDRv4,
  ZodCIDRv6: () => ZodCIDRv6,
  ZodCUID: () => ZodCUID,
  ZodCUID2: () => ZodCUID2,
  ZodCatch: () => ZodCatch2,
  ZodCodec: () => ZodCodec,
  ZodCustom: () => ZodCustom,
  ZodCustomStringFormat: () => ZodCustomStringFormat,
  ZodDate: () => ZodDate2,
  ZodDefault: () => ZodDefault2,
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2,
  ZodE164: () => ZodE164,
  ZodEmail: () => ZodEmail,
  ZodEmoji: () => ZodEmoji,
  ZodEnum: () => ZodEnum2,
  ZodExactOptional: () => ZodExactOptional,
  ZodFile: () => ZodFile,
  ZodFunction: () => ZodFunction2,
  ZodGUID: () => ZodGUID,
  ZodIPv4: () => ZodIPv4,
  ZodIPv6: () => ZodIPv6,
  ZodIntersection: () => ZodIntersection2,
  ZodJWT: () => ZodJWT,
  ZodKSUID: () => ZodKSUID,
  ZodLazy: () => ZodLazy2,
  ZodLiteral: () => ZodLiteral2,
  ZodMAC: () => ZodMAC,
  ZodMap: () => ZodMap2,
  ZodNaN: () => ZodNaN2,
  ZodNanoID: () => ZodNanoID,
  ZodNever: () => ZodNever2,
  ZodNonOptional: () => ZodNonOptional,
  ZodNull: () => ZodNull2,
  ZodNullable: () => ZodNullable2,
  ZodNumber: () => ZodNumber2,
  ZodNumberFormat: () => ZodNumberFormat,
  ZodObject: () => ZodObject2,
  ZodOptional: () => ZodOptional2,
  ZodPipe: () => ZodPipe,
  ZodPrefault: () => ZodPrefault,
  ZodPreprocess: () => ZodPreprocess,
  ZodPromise: () => ZodPromise2,
  ZodReadonly: () => ZodReadonly2,
  ZodRecord: () => ZodRecord2,
  ZodSet: () => ZodSet2,
  ZodString: () => ZodString2,
  ZodStringFormat: () => ZodStringFormat,
  ZodSuccess: () => ZodSuccess,
  ZodSymbol: () => ZodSymbol2,
  ZodTemplateLiteral: () => ZodTemplateLiteral,
  ZodTransform: () => ZodTransform,
  ZodTuple: () => ZodTuple2,
  ZodType: () => ZodType2,
  ZodULID: () => ZodULID,
  ZodURL: () => ZodURL,
  ZodUUID: () => ZodUUID,
  ZodUndefined: () => ZodUndefined2,
  ZodUnion: () => ZodUnion2,
  ZodUnknown: () => ZodUnknown2,
  ZodVoid: () => ZodVoid2,
  ZodXID: () => ZodXID,
  ZodXor: () => ZodXor,
  _ZodString: () => _ZodString,
  _default: () => _default2,
  _function: () => _function,
  any: () => any,
  array: () => array,
  base64: () => base642,
  base64url: () => base64url2,
  bigint: () => bigint2,
  boolean: () => boolean2,
  catch: () => _catch2,
  check: () => check,
  cidrv4: () => cidrv42,
  cidrv6: () => cidrv62,
  codec: () => codec,
  cuid: () => cuid3,
  cuid2: () => cuid22,
  custom: () => custom,
  date: () => date3,
  describe: () => describe2,
  discriminatedUnion: () => discriminatedUnion,
  e164: () => e1642,
  email: () => email2,
  emoji: () => emoji2,
  enum: () => _enum2,
  exactOptional: () => exactOptional,
  file: () => file,
  float32: () => float32,
  float64: () => float64,
  function: () => _function,
  guid: () => guid2,
  hash: () => hash,
  hex: () => hex2,
  hostname: () => hostname2,
  httpUrl: () => httpUrl,
  instanceof: () => _instanceof,
  int: () => int,
  int32: () => int32,
  int64: () => int64,
  intersection: () => intersection,
  invertCodec: () => invertCodec,
  ipv4: () => ipv42,
  ipv6: () => ipv62,
  json: () => json,
  jwt: () => jwt,
  keyof: () => keyof,
  ksuid: () => ksuid2,
  lazy: () => lazy,
  literal: () => literal,
  looseObject: () => looseObject,
  looseRecord: () => looseRecord,
  mac: () => mac2,
  map: () => map,
  meta: () => meta2,
  nan: () => nan,
  nanoid: () => nanoid2,
  nativeEnum: () => nativeEnum,
  never: () => never,
  nonoptional: () => nonoptional,
  null: () => _null3,
  nullable: () => nullable,
  nullish: () => nullish2,
  number: () => number2,
  object: () => object2,
  optional: () => optional,
  partialRecord: () => partialRecord,
  pipe: () => pipe,
  prefault: () => prefault,
  preprocess: () => preprocess,
  promise: () => promise,
  readonly: () => readonly,
  record: () => record,
  refine: () => refine,
  set: () => set,
  strictObject: () => strictObject,
  string: () => string2,
  stringFormat: () => stringFormat,
  stringbool: () => stringbool,
  success: () => success,
  superRefine: () => superRefine,
  symbol: () => symbol,
  templateLiteral: () => templateLiteral,
  transform: () => transform,
  tuple: () => tuple,
  uint32: () => uint32,
  uint64: () => uint64,
  ulid: () => ulid2,
  undefined: () => _undefined3,
  union: () => union,
  unknown: () => unknown,
  url: () => url,
  uuid: () => uuid2,
  uuidv4: () => uuidv4,
  uuidv6: () => uuidv6,
  uuidv7: () => uuidv7,
  void: () => _void2,
  xid: () => xid2,
  xor: () => xor
});

// node_modules/zod/v4/classic/checks.js
var checks_exports2 = {};
__export(checks_exports2, {
  endsWith: () => _endsWith,
  gt: () => _gt,
  gte: () => _gte,
  includes: () => _includes,
  length: () => _length,
  lowercase: () => _lowercase,
  lt: () => _lt,
  lte: () => _lte,
  maxLength: () => _maxLength,
  maxSize: () => _maxSize,
  mime: () => _mime,
  minLength: () => _minLength,
  minSize: () => _minSize,
  multipleOf: () => _multipleOf,
  negative: () => _negative,
  nonnegative: () => _nonnegative,
  nonpositive: () => _nonpositive,
  normalize: () => _normalize,
  overwrite: () => _overwrite,
  positive: () => _positive,
  property: () => _property,
  regex: () => _regex,
  size: () => _size,
  slugify: () => _slugify,
  startsWith: () => _startsWith,
  toLowerCase: () => _toLowerCase,
  toUpperCase: () => _toUpperCase,
  trim: () => _trim,
  uppercase: () => _uppercase
});

// node_modules/zod/v4/classic/iso.js
var iso_exports2 = {};
__export(iso_exports2, {
  ZodISODate: () => ZodISODate,
  ZodISODateTime: () => ZodISODateTime,
  ZodISODuration: () => ZodISODuration,
  ZodISOTime: () => ZodISOTime,
  date: () => date2,
  datetime: () => datetime2,
  duration: () => duration2,
  time: () => time2
});
var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
  $ZodISODateTime.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function datetime2(params) {
  return _isoDateTime(ZodISODateTime, params);
}
var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
  $ZodISODate.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function date2(params) {
  return _isoDate(ZodISODate, params);
}
var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
  $ZodISOTime.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function time2(params) {
  return _isoTime(ZodISOTime, params);
}
var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
  $ZodISODuration.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function duration2(params) {
  return _isoDuration(ZodISODuration, params);
}

// node_modules/zod/v4/classic/errors.js
var initializer2 = (inst, issues) => {
  $ZodError.init(inst, issues);
  inst.name = "ZodError";
  Object.defineProperties(inst, {
    format: {
      value: (mapper) => formatError(inst, mapper)
      // enumerable: false,
    },
    flatten: {
      value: (mapper) => flattenError(inst, mapper)
      // enumerable: false,
    },
    addIssue: {
      value: (issue2) => {
        inst.issues.push(issue2);
        inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
      }
      // enumerable: false,
    },
    addIssues: {
      value: (issues2) => {
        inst.issues.push(...issues2);
        inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
      }
      // enumerable: false,
    },
    isEmpty: {
      get() {
        return inst.issues.length === 0;
      }
      // enumerable: false,
    }
  });
};
var ZodError2 = /* @__PURE__ */ $constructor("ZodError", initializer2);
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
  Parent: Error
});

// node_modules/zod/v4/classic/parse.js
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
var safeParse3 = /* @__PURE__ */ _safeParse(ZodRealError);
var safeParseAsync3 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
var encode2 = /* @__PURE__ */ _encode(ZodRealError);
var decode2 = /* @__PURE__ */ _decode(ZodRealError);
var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError);
var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError);
var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError);
var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);

// node_modules/zod/v4/classic/schemas.js
var _installedGroups = /* @__PURE__ */ new WeakMap();
function _installLazyMethods(inst, group, methods) {
  const proto = Object.getPrototypeOf(inst);
  let installed = _installedGroups.get(proto);
  if (!installed) {
    installed = /* @__PURE__ */ new Set();
    _installedGroups.set(proto, installed);
  }
  if (installed.has(group))
    return;
  installed.add(group);
  for (const key in methods) {
    const fn = methods[key];
    Object.defineProperty(proto, key, {
      configurable: true,
      enumerable: false,
      get() {
        const bound = fn.bind(this);
        Object.defineProperty(this, key, {
          configurable: true,
          writable: true,
          enumerable: true,
          value: bound
        });
        return bound;
      },
      set(v) {
        Object.defineProperty(this, key, {
          configurable: true,
          writable: true,
          enumerable: true,
          value: v
        });
      }
    });
  }
}
var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
  $ZodType.init(inst, def);
  Object.assign(inst["~standard"], {
    jsonSchema: {
      input: createStandardJSONSchemaMethod(inst, "input"),
      output: createStandardJSONSchemaMethod(inst, "output")
    }
  });
  inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
  inst.def = def;
  inst.type = def.type;
  Object.defineProperty(inst, "_def", { value: def });
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
  inst.safeParse = (data, params) => safeParse3(inst, data, params);
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
  inst.safeParseAsync = async (data, params) => safeParseAsync3(inst, data, params);
  inst.spa = inst.safeParseAsync;
  inst.encode = (data, params) => encode2(inst, data, params);
  inst.decode = (data, params) => decode2(inst, data, params);
  inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params);
  inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params);
  inst.safeEncode = (data, params) => safeEncode2(inst, data, params);
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
  _installLazyMethods(inst, "ZodType", {
    check(...chks) {
      const def2 = this.def;
      return this.clone(util_exports.mergeDefs(def2, {
        checks: [
          ...def2.checks ?? [],
          ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
        ]
      }), { parent: true });
    },
    with(...chks) {
      return this.check(...chks);
    },
    clone(def2, params) {
      return clone(this, def2, params);
    },
    brand() {
      return this;
    },
    register(reg, meta3) {
      reg.add(this, meta3);
      return this;
    },
    refine(check2, params) {
      return this.check(refine(check2, params));
    },
    superRefine(refinement, params) {
      return this.check(superRefine(refinement, params));
    },
    overwrite(fn) {
      return this.check(_overwrite(fn));
    },
    optional() {
      return optional(this);
    },
    exactOptional() {
      return exactOptional(this);
    },
    nullable() {
      return nullable(this);
    },
    nullish() {
      return optional(nullable(this));
    },
    nonoptional(params) {
      return nonoptional(this, params);
    },
    array() {
      return array(this);
    },
    or(arg) {
      return union([this, arg]);
    },
    and(arg) {
      return intersection(this, arg);
    },
    transform(tx) {
      return pipe(this, transform(tx));
    },
    default(d) {
      return _default2(this, d);
    },
    prefault(d) {
      return prefault(this, d);
    },
    catch(params) {
      return _catch2(this, params);
    },
    pipe(target) {
      return pipe(this, target);
    },
    readonly() {
      return readonly(this);
    },
    describe(description) {
      const cl = this.clone();
      globalRegistry.add(cl, { description });
      return cl;
    },
    meta(...args) {
      if (args.length === 0)
        return globalRegistry.get(this);
      const cl = this.clone();
      globalRegistry.add(cl, args[0]);
      return cl;
    },
    isOptional() {
      return this.safeParse(void 0).success;
    },
    isNullable() {
      return this.safeParse(null).success;
    },
    apply(fn) {
      return fn(this);
    }
  });
  Object.defineProperty(inst, "description", {
    get() {
      return globalRegistry.get(inst)?.description;
    },
    configurable: true
  });
  return inst;
});
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
  $ZodString.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => stringProcessor(inst, ctx2, json2, params);
  const bag = inst._zod.bag;
  inst.format = bag.format ?? null;
  inst.minLength = bag.minimum ?? null;
  inst.maxLength = bag.maximum ?? null;
  _installLazyMethods(inst, "_ZodString", {
    regex(...args) {
      return this.check(_regex(...args));
    },
    includes(...args) {
      return this.check(_includes(...args));
    },
    startsWith(...args) {
      return this.check(_startsWith(...args));
    },
    endsWith(...args) {
      return this.check(_endsWith(...args));
    },
    min(...args) {
      return this.check(_minLength(...args));
    },
    max(...args) {
      return this.check(_maxLength(...args));
    },
    length(...args) {
      return this.check(_length(...args));
    },
    nonempty(...args) {
      return this.check(_minLength(1, ...args));
    },
    lowercase(params) {
      return this.check(_lowercase(params));
    },
    uppercase(params) {
      return this.check(_uppercase(params));
    },
    trim() {
      return this.check(_trim());
    },
    normalize(...args) {
      return this.check(_normalize(...args));
    },
    toLowerCase() {
      return this.check(_toLowerCase());
    },
    toUpperCase() {
      return this.check(_toUpperCase());
    },
    slugify() {
      return this.check(_slugify());
    }
  });
});
var ZodString2 = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
  $ZodString.init(inst, def);
  _ZodString.init(inst, def);
  inst.email = (params) => inst.check(_email(ZodEmail, params));
  inst.url = (params) => inst.check(_url(ZodURL, params));
  inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
  inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params));
  inst.guid = (params) => inst.check(_guid(ZodGUID, params));
  inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
  inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
  inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
  inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
  inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
  inst.guid = (params) => inst.check(_guid(ZodGUID, params));
  inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
  inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
  inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
  inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
  inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
  inst.xid = (params) => inst.check(_xid(ZodXID, params));
  inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
  inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
  inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
  inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
  inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
  inst.e164 = (params) => inst.check(_e164(ZodE164, params));
  inst.datetime = (params) => inst.check(datetime2(params));
  inst.date = (params) => inst.check(date2(params));
  inst.time = (params) => inst.check(time2(params));
  inst.duration = (params) => inst.check(duration2(params));
});
function string2(params) {
  return _string(ZodString2, params);
}
var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
  $ZodStringFormat.init(inst, def);
  _ZodString.init(inst, def);
});
var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
  $ZodEmail.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function email2(params) {
  return _email(ZodEmail, params);
}
var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
  $ZodGUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function guid2(params) {
  return _guid(ZodGUID, params);
}
var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
  $ZodUUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function uuid2(params) {
  return _uuid(ZodUUID, params);
}
function uuidv4(params) {
  return _uuidv4(ZodUUID, params);
}
function uuidv6(params) {
  return _uuidv6(ZodUUID, params);
}
function uuidv7(params) {
  return _uuidv7(ZodUUID, params);
}
var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
  $ZodURL.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function url(params) {
  return _url(ZodURL, params);
}
function httpUrl(params) {
  return _url(ZodURL, {
    protocol: regexes_exports.httpProtocol,
    hostname: regexes_exports.domain,
    ...util_exports.normalizeParams(params)
  });
}
var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
  $ZodEmoji.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function emoji2(params) {
  return _emoji2(ZodEmoji, params);
}
var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
  $ZodNanoID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function nanoid2(params) {
  return _nanoid(ZodNanoID, params);
}
var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
  $ZodCUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cuid3(params) {
  return _cuid(ZodCUID, params);
}
var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
  $ZodCUID2.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cuid22(params) {
  return _cuid2(ZodCUID2, params);
}
var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
  $ZodULID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ulid2(params) {
  return _ulid(ZodULID, params);
}
var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
  $ZodXID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function xid2(params) {
  return _xid(ZodXID, params);
}
var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
  $ZodKSUID.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ksuid2(params) {
  return _ksuid(ZodKSUID, params);
}
var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
  $ZodIPv4.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ipv42(params) {
  return _ipv4(ZodIPv4, params);
}
var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => {
  $ZodMAC.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function mac2(params) {
  return _mac(ZodMAC, params);
}
var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
  $ZodIPv6.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function ipv62(params) {
  return _ipv6(ZodIPv6, params);
}
var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
  $ZodCIDRv4.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cidrv42(params) {
  return _cidrv4(ZodCIDRv4, params);
}
var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
  $ZodCIDRv6.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function cidrv62(params) {
  return _cidrv6(ZodCIDRv6, params);
}
var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
  $ZodBase64.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function base642(params) {
  return _base64(ZodBase64, params);
}
var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
  $ZodBase64URL.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function base64url2(params) {
  return _base64url(ZodBase64URL, params);
}
var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
  $ZodE164.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function e1642(params) {
  return _e164(ZodE164, params);
}
var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
  $ZodJWT.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function jwt(params) {
  return _jwt(ZodJWT, params);
}
var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
  $ZodCustomStringFormat.init(inst, def);
  ZodStringFormat.init(inst, def);
});
function stringFormat(format, fnOrRegex, _params = {}) {
  return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
}
function hostname2(_params) {
  return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params);
}
function hex2(_params) {
  return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params);
}
function hash(alg, params) {
  const enc = params?.enc ?? "hex";
  const format = `${alg}_${enc}`;
  const regex = regexes_exports[format];
  if (!regex)
    throw new Error(`Unrecognized hash format: ${format}`);
  return _stringFormat(ZodCustomStringFormat, format, regex, params);
}
var ZodNumber2 = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
  $ZodNumber.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => numberProcessor(inst, ctx2, json2, params);
  _installLazyMethods(inst, "ZodNumber", {
    gt(value, params) {
      return this.check(_gt(value, params));
    },
    gte(value, params) {
      return this.check(_gte(value, params));
    },
    min(value, params) {
      return this.check(_gte(value, params));
    },
    lt(value, params) {
      return this.check(_lt(value, params));
    },
    lte(value, params) {
      return this.check(_lte(value, params));
    },
    max(value, params) {
      return this.check(_lte(value, params));
    },
    int(params) {
      return this.check(int(params));
    },
    safe(params) {
      return this.check(int(params));
    },
    positive(params) {
      return this.check(_gt(0, params));
    },
    nonnegative(params) {
      return this.check(_gte(0, params));
    },
    negative(params) {
      return this.check(_lt(0, params));
    },
    nonpositive(params) {
      return this.check(_lte(0, params));
    },
    multipleOf(value, params) {
      return this.check(_multipleOf(value, params));
    },
    step(value, params) {
      return this.check(_multipleOf(value, params));
    },
    finite() {
      return this;
    }
  });
  const bag = inst._zod.bag;
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
  inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
  inst.isFinite = true;
  inst.format = bag.format ?? null;
});
function number2(params) {
  return _number(ZodNumber2, params);
}
var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
  $ZodNumberFormat.init(inst, def);
  ZodNumber2.init(inst, def);
});
function int(params) {
  return _int(ZodNumberFormat, params);
}
function float32(params) {
  return _float32(ZodNumberFormat, params);
}
function float64(params) {
  return _float64(ZodNumberFormat, params);
}
function int32(params) {
  return _int32(ZodNumberFormat, params);
}
function uint32(params) {
  return _uint32(ZodNumberFormat, params);
}
var ZodBoolean2 = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
  $ZodBoolean.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => booleanProcessor(inst, ctx2, json2, params);
});
function boolean2(params) {
  return _boolean(ZodBoolean2, params);
}
var ZodBigInt2 = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
  $ZodBigInt.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => bigintProcessor(inst, ctx2, json2, params);
  inst.gte = (value, params) => inst.check(_gte(value, params));
  inst.min = (value, params) => inst.check(_gte(value, params));
  inst.gt = (value, params) => inst.check(_gt(value, params));
  inst.gte = (value, params) => inst.check(_gte(value, params));
  inst.min = (value, params) => inst.check(_gte(value, params));
  inst.lt = (value, params) => inst.check(_lt(value, params));
  inst.lte = (value, params) => inst.check(_lte(value, params));
  inst.max = (value, params) => inst.check(_lte(value, params));
  inst.positive = (params) => inst.check(_gt(BigInt(0), params));
  inst.negative = (params) => inst.check(_lt(BigInt(0), params));
  inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params));
  inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params));
  inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
  const bag = inst._zod.bag;
  inst.minValue = bag.minimum ?? null;
  inst.maxValue = bag.maximum ?? null;
  inst.format = bag.format ?? null;
});
function bigint2(params) {
  return _bigint(ZodBigInt2, params);
}
var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => {
  $ZodBigIntFormat.init(inst, def);
  ZodBigInt2.init(inst, def);
});
function int64(params) {
  return _int64(ZodBigIntFormat, params);
}
function uint64(params) {
  return _uint64(ZodBigIntFormat, params);
}
var ZodSymbol2 = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
  $ZodSymbol.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => symbolProcessor(inst, ctx2, json2, params);
});
function symbol(params) {
  return _symbol(ZodSymbol2, params);
}
var ZodUndefined2 = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
  $ZodUndefined.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => undefinedProcessor(inst, ctx2, json2, params);
});
function _undefined3(params) {
  return _undefined2(ZodUndefined2, params);
}
var ZodNull2 = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
  $ZodNull.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => nullProcessor(inst, ctx2, json2, params);
});
function _null3(params) {
  return _null2(ZodNull2, params);
}
var ZodAny2 = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
  $ZodAny.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => anyProcessor(inst, ctx2, json2, params);
});
function any() {
  return _any(ZodAny2);
}
var ZodUnknown2 = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
  $ZodUnknown.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => unknownProcessor(inst, ctx2, json2, params);
});
function unknown() {
  return _unknown(ZodUnknown2);
}
var ZodNever2 = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
  $ZodNever.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => neverProcessor(inst, ctx2, json2, params);
});
function never(params) {
  return _never(ZodNever2, params);
}
var ZodVoid2 = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
  $ZodVoid.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => voidProcessor(inst, ctx2, json2, params);
});
function _void2(params) {
  return _void(ZodVoid2, params);
}
var ZodDate2 = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
  $ZodDate.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => dateProcessor(inst, ctx2, json2, params);
  inst.min = (value, params) => inst.check(_gte(value, params));
  inst.max = (value, params) => inst.check(_lte(value, params));
  const c = inst._zod.bag;
  inst.minDate = c.minimum ? new Date(c.minimum) : null;
  inst.maxDate = c.maximum ? new Date(c.maximum) : null;
});
function date3(params) {
  return _date(ZodDate2, params);
}
var ZodArray2 = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
  $ZodArray.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => arrayProcessor(inst, ctx2, json2, params);
  inst.element = def.element;
  _installLazyMethods(inst, "ZodArray", {
    min(n2, params) {
      return this.check(_minLength(n2, params));
    },
    nonempty(params) {
      return this.check(_minLength(1, params));
    },
    max(n2, params) {
      return this.check(_maxLength(n2, params));
    },
    length(n2, params) {
      return this.check(_length(n2, params));
    },
    unwrap() {
      return this.element;
    }
  });
});
function array(element, params) {
  return _array(ZodArray2, element, params);
}
function keyof(schema) {
  const shape = schema._zod.def.shape;
  return _enum2(Object.keys(shape));
}
var ZodObject2 = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
  $ZodObjectJIT.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => objectProcessor(inst, ctx2, json2, params);
  util_exports.defineLazy(inst, "shape", () => {
    return def.shape;
  });
  _installLazyMethods(inst, "ZodObject", {
    keyof() {
      return _enum2(Object.keys(this._zod.def.shape));
    },
    catchall(catchall) {
      return this.clone({ ...this._zod.def, catchall });
    },
    passthrough() {
      return this.clone({ ...this._zod.def, catchall: unknown() });
    },
    loose() {
      return this.clone({ ...this._zod.def, catchall: unknown() });
    },
    strict() {
      return this.clone({ ...this._zod.def, catchall: never() });
    },
    strip() {
      return this.clone({ ...this._zod.def, catchall: void 0 });
    },
    extend(incoming) {
      return util_exports.extend(this, incoming);
    },
    safeExtend(incoming) {
      return util_exports.safeExtend(this, incoming);
    },
    merge(other) {
      return util_exports.merge(this, other);
    },
    pick(mask) {
      return util_exports.pick(this, mask);
    },
    omit(mask) {
      return util_exports.omit(this, mask);
    },
    partial(...args) {
      return util_exports.partial(ZodOptional2, this, args[0]);
    },
    required(...args) {
      return util_exports.required(ZodNonOptional, this, args[0]);
    }
  });
});
function object2(shape, params) {
  const def = {
    type: "object",
    shape: shape ?? {},
    ...util_exports.normalizeParams(params)
  };
  return new ZodObject2(def);
}
function strictObject(shape, params) {
  return new ZodObject2({
    type: "object",
    shape,
    catchall: never(),
    ...util_exports.normalizeParams(params)
  });
}
function looseObject(shape, params) {
  return new ZodObject2({
    type: "object",
    shape,
    catchall: unknown(),
    ...util_exports.normalizeParams(params)
  });
}
var ZodUnion2 = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
  $ZodUnion.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => unionProcessor(inst, ctx2, json2, params);
  inst.options = def.options;
});
function union(options, params) {
  return new ZodUnion2({
    type: "union",
    options,
    ...util_exports.normalizeParams(params)
  });
}
var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
  ZodUnion2.init(inst, def);
  $ZodXor.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => unionProcessor(inst, ctx2, json2, params);
  inst.options = def.options;
});
function xor(options, params) {
  return new ZodXor({
    type: "union",
    options,
    inclusive: false,
    ...util_exports.normalizeParams(params)
  });
}
var ZodDiscriminatedUnion2 = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
  ZodUnion2.init(inst, def);
  $ZodDiscriminatedUnion.init(inst, def);
});
function discriminatedUnion(discriminator, options, params) {
  return new ZodDiscriminatedUnion2({
    type: "union",
    options,
    discriminator,
    ...util_exports.normalizeParams(params)
  });
}
var ZodIntersection2 = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
  $ZodIntersection.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => intersectionProcessor(inst, ctx2, json2, params);
});
function intersection(left, right) {
  return new ZodIntersection2({
    type: "intersection",
    left,
    right
  });
}
var ZodTuple2 = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
  $ZodTuple.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => tupleProcessor(inst, ctx2, json2, params);
  inst.rest = (rest) => inst.clone({
    ...inst._zod.def,
    rest
  });
});
function tuple(items, _paramsOrRest, _params) {
  const hasRest = _paramsOrRest instanceof $ZodType;
  const params = hasRest ? _params : _paramsOrRest;
  const rest = hasRest ? _paramsOrRest : null;
  return new ZodTuple2({
    type: "tuple",
    items,
    rest,
    ...util_exports.normalizeParams(params)
  });
}
var ZodRecord2 = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
  $ZodRecord.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => recordProcessor(inst, ctx2, json2, params);
  inst.keyType = def.keyType;
  inst.valueType = def.valueType;
});
function record(keyType, valueType, params) {
  if (!valueType || !valueType._zod) {
    return new ZodRecord2({
      type: "record",
      keyType: string2(),
      valueType: keyType,
      ...util_exports.normalizeParams(valueType)
    });
  }
  return new ZodRecord2({
    type: "record",
    keyType,
    valueType,
    ...util_exports.normalizeParams(params)
  });
}
function partialRecord(keyType, valueType, params) {
  const k = clone(keyType);
  k._zod.values = void 0;
  return new ZodRecord2({
    type: "record",
    keyType: k,
    valueType,
    ...util_exports.normalizeParams(params)
  });
}
function looseRecord(keyType, valueType, params) {
  return new ZodRecord2({
    type: "record",
    keyType,
    valueType,
    mode: "loose",
    ...util_exports.normalizeParams(params)
  });
}
var ZodMap2 = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
  $ZodMap.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => mapProcessor(inst, ctx2, json2, params);
  inst.keyType = def.keyType;
  inst.valueType = def.valueType;
  inst.min = (...args) => inst.check(_minSize(...args));
  inst.nonempty = (params) => inst.check(_minSize(1, params));
  inst.max = (...args) => inst.check(_maxSize(...args));
  inst.size = (...args) => inst.check(_size(...args));
});
function map(keyType, valueType, params) {
  return new ZodMap2({
    type: "map",
    keyType,
    valueType,
    ...util_exports.normalizeParams(params)
  });
}
var ZodSet2 = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
  $ZodSet.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => setProcessor(inst, ctx2, json2, params);
  inst.min = (...args) => inst.check(_minSize(...args));
  inst.nonempty = (params) => inst.check(_minSize(1, params));
  inst.max = (...args) => inst.check(_maxSize(...args));
  inst.size = (...args) => inst.check(_size(...args));
});
function set(valueType, params) {
  return new ZodSet2({
    type: "set",
    valueType,
    ...util_exports.normalizeParams(params)
  });
}
var ZodEnum2 = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
  $ZodEnum.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => enumProcessor(inst, ctx2, json2, params);
  inst.enum = def.entries;
  inst.options = Object.values(def.entries);
  const keys = new Set(Object.keys(def.entries));
  inst.extract = (values, params) => {
    const newEntries = {};
    for (const value of values) {
      if (keys.has(value)) {
        newEntries[value] = def.entries[value];
      } else
        throw new Error(`Key ${value} not found in enum`);
    }
    return new ZodEnum2({
      ...def,
      checks: [],
      ...util_exports.normalizeParams(params),
      entries: newEntries
    });
  };
  inst.exclude = (values, params) => {
    const newEntries = { ...def.entries };
    for (const value of values) {
      if (keys.has(value)) {
        delete newEntries[value];
      } else
        throw new Error(`Key ${value} not found in enum`);
    }
    return new ZodEnum2({
      ...def,
      checks: [],
      ...util_exports.normalizeParams(params),
      entries: newEntries
    });
  };
});
function _enum2(values, params) {
  const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
  return new ZodEnum2({
    type: "enum",
    entries,
    ...util_exports.normalizeParams(params)
  });
}
function nativeEnum(entries, params) {
  return new ZodEnum2({
    type: "enum",
    entries,
    ...util_exports.normalizeParams(params)
  });
}
var ZodLiteral2 = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
  $ZodLiteral.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => literalProcessor(inst, ctx2, json2, params);
  inst.values = new Set(def.values);
  Object.defineProperty(inst, "value", {
    get() {
      if (def.values.length > 1) {
        throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
      }
      return def.values[0];
    }
  });
});
function literal(value, params) {
  return new ZodLiteral2({
    type: "literal",
    values: Array.isArray(value) ? value : [value],
    ...util_exports.normalizeParams(params)
  });
}
var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
  $ZodFile.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => fileProcessor(inst, ctx2, json2, params);
  inst.min = (size, params) => inst.check(_minSize(size, params));
  inst.max = (size, params) => inst.check(_maxSize(size, params));
  inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
});
function file(params) {
  return _file(ZodFile, params);
}
var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
  $ZodTransform.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => transformProcessor(inst, ctx2, json2, params);
  inst._zod.parse = (payload, _ctx) => {
    if (_ctx.direction === "backward") {
      throw new $ZodEncodeError(inst.constructor.name);
    }
    payload.addIssue = (issue2) => {
      if (typeof issue2 === "string") {
        payload.issues.push(util_exports.issue(issue2, payload.value, def));
      } else {
        const _issue = issue2;
        if (_issue.fatal)
          _issue.continue = false;
        _issue.code ?? (_issue.code = "custom");
        _issue.input ?? (_issue.input = payload.value);
        _issue.inst ?? (_issue.inst = inst);
        payload.issues.push(util_exports.issue(_issue));
      }
    };
    const output = def.transform(payload.value, payload);
    if (output instanceof Promise) {
      return output.then((output2) => {
        payload.value = output2;
        payload.fallback = true;
        return payload;
      });
    }
    payload.value = output;
    payload.fallback = true;
    return payload;
  };
});
function transform(fn) {
  return new ZodTransform({
    type: "transform",
    transform: fn
  });
}
var ZodOptional2 = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
  $ZodOptional.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => optionalProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function optional(innerType) {
  return new ZodOptional2({
    type: "optional",
    innerType
  });
}
var ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
  $ZodExactOptional.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => optionalProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function exactOptional(innerType) {
  return new ZodExactOptional({
    type: "optional",
    innerType
  });
}
var ZodNullable2 = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
  $ZodNullable.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => nullableProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function nullable(innerType) {
  return new ZodNullable2({
    type: "nullable",
    innerType
  });
}
function nullish2(innerType) {
  return optional(nullable(innerType));
}
var ZodDefault2 = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
  $ZodDefault.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => defaultProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
  inst.removeDefault = inst.unwrap;
});
function _default2(innerType, defaultValue) {
  return new ZodDefault2({
    type: "default",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue);
    }
  });
}
var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
  $ZodPrefault.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => prefaultProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function prefault(innerType, defaultValue) {
  return new ZodPrefault({
    type: "prefault",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue);
    }
  });
}
var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
  $ZodNonOptional.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => nonoptionalProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function nonoptional(innerType, params) {
  return new ZodNonOptional({
    type: "nonoptional",
    innerType,
    ...util_exports.normalizeParams(params)
  });
}
var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
  $ZodSuccess.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => successProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function success(innerType) {
  return new ZodSuccess({
    type: "success",
    innerType
  });
}
var ZodCatch2 = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
  $ZodCatch.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => catchProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
  inst.removeCatch = inst.unwrap;
});
function _catch2(innerType, catchValue) {
  return new ZodCatch2({
    type: "catch",
    innerType,
    catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
  });
}
var ZodNaN2 = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
  $ZodNaN.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => nanProcessor(inst, ctx2, json2, params);
});
function nan(params) {
  return _nan(ZodNaN2, params);
}
var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
  $ZodPipe.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => pipeProcessor(inst, ctx2, json2, params);
  inst.in = def.in;
  inst.out = def.out;
});
function pipe(in_, out) {
  return new ZodPipe({
    type: "pipe",
    in: in_,
    out
    // ...util.normalizeParams(params),
  });
}
var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => {
  ZodPipe.init(inst, def);
  $ZodCodec.init(inst, def);
});
function codec(in_, out, params) {
  return new ZodCodec({
    type: "pipe",
    in: in_,
    out,
    transform: params.decode,
    reverseTransform: params.encode
  });
}
function invertCodec(codec2) {
  const def = codec2._zod.def;
  return new ZodCodec({
    type: "pipe",
    in: def.out,
    out: def.in,
    transform: def.reverseTransform,
    reverseTransform: def.transform
  });
}
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
  ZodPipe.init(inst, def);
  $ZodPreprocess.init(inst, def);
});
var ZodReadonly2 = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
  $ZodReadonly.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => readonlyProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function readonly(innerType) {
  return new ZodReadonly2({
    type: "readonly",
    innerType
  });
}
var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => {
  $ZodTemplateLiteral.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => templateLiteralProcessor(inst, ctx2, json2, params);
});
function templateLiteral(parts, params) {
  return new ZodTemplateLiteral({
    type: "template_literal",
    parts,
    ...util_exports.normalizeParams(params)
  });
}
var ZodLazy2 = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
  $ZodLazy.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => lazyProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.getter();
});
function lazy(getter) {
  return new ZodLazy2({
    type: "lazy",
    getter
  });
}
var ZodPromise2 = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
  $ZodPromise.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => promiseProcessor(inst, ctx2, json2, params);
  inst.unwrap = () => inst._zod.def.innerType;
});
function promise(innerType) {
  return new ZodPromise2({
    type: "promise",
    innerType
  });
}
var ZodFunction2 = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
  $ZodFunction.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => functionProcessor(inst, ctx2, json2, params);
});
function _function(params) {
  return new ZodFunction2({
    type: "function",
    input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()),
    output: params?.output ?? unknown()
  });
}
var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
  $ZodCustom.init(inst, def);
  ZodType2.init(inst, def);
  inst._zod.processJSONSchema = (ctx2, json2, params) => customProcessor(inst, ctx2, json2, params);
});
function check(fn) {
  const ch = new $ZodCheck({
    check: "custom"
    // ...util.normalizeParams(params),
  });
  ch._zod.check = fn;
  return ch;
}
function custom(fn, _params) {
  return _custom(ZodCustom, fn ?? (() => true), _params);
}
function refine(fn, _params = {}) {
  return _refine(ZodCustom, fn, _params);
}
function superRefine(fn, params) {
  return _superRefine(fn, params);
}
var describe2 = describe;
var meta2 = meta;
function _instanceof(cls, params = {}) {
  const inst = new ZodCustom({
    type: "custom",
    check: "custom",
    fn: (data) => data instanceof cls,
    abort: true,
    ...util_exports.normalizeParams(params)
  });
  inst._zod.bag.Class = cls;
  inst._zod.check = (payload) => {
    if (!(payload.value instanceof cls)) {
      payload.issues.push({
        code: "invalid_type",
        expected: cls.name,
        input: payload.value,
        inst,
        path: [...inst._zod.def.path ?? []]
      });
    }
  };
  return inst;
}
var stringbool = (...args) => _stringbool({
  Codec: ZodCodec,
  Boolean: ZodBoolean2,
  String: ZodString2
}, ...args);
function json(params) {
  const jsonSchema = lazy(() => {
    return union([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]);
  });
  return jsonSchema;
}
function preprocess(fn, schema) {
  return new ZodPreprocess({
    type: "pipe",
    in: transform(fn),
    out: schema
  });
}

// node_modules/zod/v4/classic/compat.js
var ZodIssueCode2 = {
  invalid_type: "invalid_type",
  too_big: "too_big",
  too_small: "too_small",
  invalid_format: "invalid_format",
  not_multiple_of: "not_multiple_of",
  unrecognized_keys: "unrecognized_keys",
  invalid_union: "invalid_union",
  invalid_key: "invalid_key",
  invalid_element: "invalid_element",
  invalid_value: "invalid_value",
  custom: "custom"
};
function setErrorMap(map2) {
  config({
    customError: map2
  });
}
function getErrorMap2() {
  return config().customError;
}
var ZodFirstPartyTypeKind2;
/* @__PURE__ */ (function(ZodFirstPartyTypeKind3) {
})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));

// node_modules/zod/v4/classic/from-json-schema.js
var z = {
  ...schemas_exports2,
  ...checks_exports2,
  iso: iso_exports2
};
var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
  // Schema identification
  "$schema",
  "$ref",
  "$defs",
  "definitions",
  // Core schema keywords
  "$id",
  "id",
  "$comment",
  "$anchor",
  "$vocabulary",
  "$dynamicRef",
  "$dynamicAnchor",
  // Type
  "type",
  "enum",
  "const",
  // Composition
  "anyOf",
  "oneOf",
  "allOf",
  "not",
  // Object
  "properties",
  "required",
  "additionalProperties",
  "patternProperties",
  "propertyNames",
  "minProperties",
  "maxProperties",
  // Array
  "items",
  "prefixItems",
  "additionalItems",
  "minItems",
  "maxItems",
  "uniqueItems",
  "contains",
  "minContains",
  "maxContains",
  // String
  "minLength",
  "maxLength",
  "pattern",
  "format",
  // Number
  "minimum",
  "maximum",
  "exclusiveMinimum",
  "exclusiveMaximum",
  "multipleOf",
  // Already handled metadata
  "description",
  "default",
  // Content
  "contentEncoding",
  "contentMediaType",
  "contentSchema",
  // Unsupported (error-throwing)
  "unevaluatedItems",
  "unevaluatedProperties",
  "if",
  "then",
  "else",
  "dependentSchemas",
  "dependentRequired",
  // OpenAPI
  "nullable",
  "readOnly"
]);
function detectVersion(schema, defaultTarget) {
  const $schema = schema.$schema;
  if ($schema === "https://json-schema.org/draft/2020-12/schema") {
    return "draft-2020-12";
  }
  if ($schema === "http://json-schema.org/draft-07/schema#") {
    return "draft-7";
  }
  if ($schema === "http://json-schema.org/draft-04/schema#") {
    return "draft-4";
  }
  return defaultTarget ?? "draft-2020-12";
}
function resolveRef(ref, ctx2) {
  if (!ref.startsWith("#")) {
    throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
  }
  const path = ref.slice(1).split("/").filter(Boolean);
  if (path.length === 0) {
    return ctx2.rootSchema;
  }
  const defsKey = ctx2.version === "draft-2020-12" ? "$defs" : "definitions";
  if (path[0] === defsKey) {
    const key = path[1];
    if (!key || !ctx2.defs[key]) {
      throw new Error(`Reference not found: ${ref}`);
    }
    return ctx2.defs[key];
  }
  throw new Error(`Reference not found: ${ref}`);
}
function convertBaseSchema(schema, ctx2) {
  if (schema.not !== void 0) {
    if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
      return z.never();
    }
    throw new Error("not is not supported in Zod (except { not: {} } for never)");
  }
  if (schema.unevaluatedItems !== void 0) {
    throw new Error("unevaluatedItems is not supported");
  }
  if (schema.unevaluatedProperties !== void 0) {
    throw new Error("unevaluatedProperties is not supported");
  }
  if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) {
    throw new Error("Conditional schemas (if/then/else) are not supported");
  }
  if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) {
    throw new Error("dependentSchemas and dependentRequired are not supported");
  }
  if (schema.$ref) {
    const refPath = schema.$ref;
    if (ctx2.refs.has(refPath)) {
      return ctx2.refs.get(refPath);
    }
    if (ctx2.processing.has(refPath)) {
      return z.lazy(() => {
        if (!ctx2.refs.has(refPath)) {
          throw new Error(`Circular reference not resolved: ${refPath}`);
        }
        return ctx2.refs.get(refPath);
      });
    }
    ctx2.processing.add(refPath);
    const resolved = resolveRef(refPath, ctx2);
    const zodSchema2 = convertSchema(resolved, ctx2);
    ctx2.refs.set(refPath, zodSchema2);
    ctx2.processing.delete(refPath);
    return zodSchema2;
  }
  if (schema.enum !== void 0) {
    const enumValues = schema.enum;
    if (ctx2.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
      return z.null();
    }
    if (enumValues.length === 0) {
      return z.never();
    }
    if (enumValues.length === 1) {
      return z.literal(enumValues[0]);
    }
    if (enumValues.every((v) => typeof v === "string")) {
      return z.enum(enumValues);
    }
    const literalSchemas = enumValues.map((v) => z.literal(v));
    if (literalSchemas.length < 2) {
      return literalSchemas[0];
    }
    return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
  }
  if (schema.const !== void 0) {
    return z.literal(schema.const);
  }
  const type = schema.type;
  if (Array.isArray(type)) {
    const typeSchemas = type.map((t) => {
      const typeSchema = { ...schema, type: t };
      return convertBaseSchema(typeSchema, ctx2);
    });
    if (typeSchemas.length === 0) {
      return z.never();
    }
    if (typeSchemas.length === 1) {
      return typeSchemas[0];
    }
    return z.union(typeSchemas);
  }
  if (!type) {
    return z.any();
  }
  let zodSchema;
  switch (type) {
    case "string": {
      let stringSchema = z.string();
      if (schema.format) {
        const format = schema.format;
        if (format === "email") {
          stringSchema = stringSchema.check(z.email());
        } else if (format === "uri" || format === "uri-reference") {
          stringSchema = stringSchema.check(z.url());
        } else if (format === "uuid" || format === "guid") {
          stringSchema = stringSchema.check(z.uuid());
        } else if (format === "date-time") {
          stringSchema = stringSchema.check(z.iso.datetime());
        } else if (format === "date") {
          stringSchema = stringSchema.check(z.iso.date());
        } else if (format === "time") {
          stringSchema = stringSchema.check(z.iso.time());
        } else if (format === "duration") {
          stringSchema = stringSchema.check(z.iso.duration());
        } else if (format === "ipv4") {
          stringSchema = stringSchema.check(z.ipv4());
        } else if (format === "ipv6") {
          stringSchema = stringSchema.check(z.ipv6());
        } else if (format === "mac") {
          stringSchema = stringSchema.check(z.mac());
        } else if (format === "cidr") {
          stringSchema = stringSchema.check(z.cidrv4());
        } else if (format === "cidr-v6") {
          stringSchema = stringSchema.check(z.cidrv6());
        } else if (format === "base64") {
          stringSchema = stringSchema.check(z.base64());
        } else if (format === "base64url") {
          stringSchema = stringSchema.check(z.base64url());
        } else if (format === "e164") {
          stringSchema = stringSchema.check(z.e164());
        } else if (format === "jwt") {
          stringSchema = stringSchema.check(z.jwt());
        } else if (format === "emoji") {
          stringSchema = stringSchema.check(z.emoji());
        } else if (format === "nanoid") {
          stringSchema = stringSchema.check(z.nanoid());
        } else if (format === "cuid") {
          stringSchema = stringSchema.check(z.cuid());
        } else if (format === "cuid2") {
          stringSchema = stringSchema.check(z.cuid2());
        } else if (format === "ulid") {
          stringSchema = stringSchema.check(z.ulid());
        } else if (format === "xid") {
          stringSchema = stringSchema.check(z.xid());
        } else if (format === "ksuid") {
          stringSchema = stringSchema.check(z.ksuid());
        }
      }
      if (typeof schema.minLength === "number") {
        stringSchema = stringSchema.min(schema.minLength);
      }
      if (typeof schema.maxLength === "number") {
        stringSchema = stringSchema.max(schema.maxLength);
      }
      if (schema.pattern) {
        stringSchema = stringSchema.regex(new RegExp(schema.pattern));
      }
      zodSchema = stringSchema;
      break;
    }
    case "number":
    case "integer": {
      let numberSchema = type === "integer" ? z.number().int() : z.number();
      if (typeof schema.minimum === "number") {
        numberSchema = numberSchema.min(schema.minimum);
      }
      if (typeof schema.maximum === "number") {
        numberSchema = numberSchema.max(schema.maximum);
      }
      if (typeof schema.exclusiveMinimum === "number") {
        numberSchema = numberSchema.gt(schema.exclusiveMinimum);
      } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") {
        numberSchema = numberSchema.gt(schema.minimum);
      }
      if (typeof schema.exclusiveMaximum === "number") {
        numberSchema = numberSchema.lt(schema.exclusiveMaximum);
      } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") {
        numberSchema = numberSchema.lt(schema.maximum);
      }
      if (typeof schema.multipleOf === "number") {
        numberSchema = numberSchema.multipleOf(schema.multipleOf);
      }
      zodSchema = numberSchema;
      break;
    }
    case "boolean": {
      zodSchema = z.boolean();
      break;
    }
    case "null": {
      zodSchema = z.null();
      break;
    }
    case "object": {
      const shape = {};
      const properties = schema.properties || {};
      const requiredSet = new Set(schema.required || []);
      for (const [key, propSchema] of Object.entries(properties)) {
        const propZodSchema = convertSchema(propSchema, ctx2);
        shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();
      }
      if (schema.propertyNames) {
        const keySchema = convertSchema(schema.propertyNames, ctx2);
        const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx2) : z.any();
        if (Object.keys(shape).length === 0) {
          zodSchema = z.record(keySchema, valueSchema);
          break;
        }
        const objectSchema2 = z.object(shape).passthrough();
        const recordSchema = z.looseRecord(keySchema, valueSchema);
        zodSchema = z.intersection(objectSchema2, recordSchema);
        break;
      }
      if (schema.patternProperties) {
        const patternProps = schema.patternProperties;
        const patternKeys = Object.keys(patternProps);
        const looseRecords = [];
        for (const pattern of patternKeys) {
          const patternValue = convertSchema(patternProps[pattern], ctx2);
          const keySchema = z.string().regex(new RegExp(pattern));
          looseRecords.push(z.looseRecord(keySchema, patternValue));
        }
        const schemasToIntersect = [];
        if (Object.keys(shape).length > 0) {
          schemasToIntersect.push(z.object(shape).passthrough());
        }
        schemasToIntersect.push(...looseRecords);
        if (schemasToIntersect.length === 0) {
          zodSchema = z.object({}).passthrough();
        } else if (schemasToIntersect.length === 1) {
          zodSchema = schemasToIntersect[0];
        } else {
          let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
          for (let i = 2; i < schemasToIntersect.length; i++) {
            result = z.intersection(result, schemasToIntersect[i]);
          }
          zodSchema = result;
        }
        break;
      }
      const objectSchema = z.object(shape);
      if (schema.additionalProperties === false) {
        zodSchema = objectSchema.strict();
      } else if (typeof schema.additionalProperties === "object") {
        zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx2));
      } else {
        zodSchema = objectSchema.passthrough();
      }
      break;
    }
    case "array": {
      const prefixItems = schema.prefixItems;
      const items = schema.items;
      if (prefixItems && Array.isArray(prefixItems)) {
        const tupleItems = prefixItems.map((item) => convertSchema(item, ctx2));
        const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx2) : void 0;
        if (rest) {
          zodSchema = z.tuple(tupleItems).rest(rest);
        } else {
          zodSchema = z.tuple(tupleItems);
        }
        if (typeof schema.minItems === "number") {
          zodSchema = zodSchema.check(z.minLength(schema.minItems));
        }
        if (typeof schema.maxItems === "number") {
          zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
        }
      } else if (Array.isArray(items)) {
        const tupleItems = items.map((item) => convertSchema(item, ctx2));
        const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx2) : void 0;
        if (rest) {
          zodSchema = z.tuple(tupleItems).rest(rest);
        } else {
          zodSchema = z.tuple(tupleItems);
        }
        if (typeof schema.minItems === "number") {
          zodSchema = zodSchema.check(z.minLength(schema.minItems));
        }
        if (typeof schema.maxItems === "number") {
          zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
        }
      } else if (items !== void 0) {
        const element = convertSchema(items, ctx2);
        let arraySchema = z.array(element);
        if (typeof schema.minItems === "number") {
          arraySchema = arraySchema.min(schema.minItems);
        }
        if (typeof schema.maxItems === "number") {
          arraySchema = arraySchema.max(schema.maxItems);
        }
        zodSchema = arraySchema;
      } else {
        zodSchema = z.array(z.any());
      }
      break;
    }
    default:
      throw new Error(`Unsupported type: ${type}`);
  }
  return zodSchema;
}
function convertSchema(schema, ctx2) {
  if (typeof schema === "boolean") {
    return schema ? z.any() : z.never();
  }
  let baseSchema = convertBaseSchema(schema, ctx2);
  const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
  if (schema.anyOf && Array.isArray(schema.anyOf)) {
    const options = schema.anyOf.map((s) => convertSchema(s, ctx2));
    const anyOfUnion = z.union(options);
    baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;
  }
  if (schema.oneOf && Array.isArray(schema.oneOf)) {
    const options = schema.oneOf.map((s) => convertSchema(s, ctx2));
    const oneOfUnion = z.xor(options);
    baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;
  }
  if (schema.allOf && Array.isArray(schema.allOf)) {
    if (schema.allOf.length === 0) {
      baseSchema = hasExplicitType ? baseSchema : z.any();
    } else {
      let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx2);
      const startIdx = hasExplicitType ? 0 : 1;
      for (let i = startIdx; i < schema.allOf.length; i++) {
        result = z.intersection(result, convertSchema(schema.allOf[i], ctx2));
      }
      baseSchema = result;
    }
  }
  if (schema.nullable === true && ctx2.version === "openapi-3.0") {
    baseSchema = z.nullable(baseSchema);
  }
  if (schema.readOnly === true) {
    baseSchema = z.readonly(baseSchema);
  }
  if (schema.default !== void 0) {
    baseSchema = baseSchema.default(schema.default);
  }
  const extraMeta = {};
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
  for (const key of coreMetadataKeys) {
    if (key in schema) {
      extraMeta[key] = schema[key];
    }
  }
  const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"];
  for (const key of contentMetadataKeys) {
    if (key in schema) {
      extraMeta[key] = schema[key];
    }
  }
  for (const key of Object.keys(schema)) {
    if (!RECOGNIZED_KEYS.has(key)) {
      extraMeta[key] = schema[key];
    }
  }
  if (Object.keys(extraMeta).length > 0) {
    ctx2.registry.add(baseSchema, extraMeta);
  }
  if (schema.description) {
    baseSchema = baseSchema.describe(schema.description);
  }
  return baseSchema;
}
function fromJSONSchema(schema, params) {
  if (typeof schema === "boolean") {
    return schema ? z.any() : z.never();
  }
  let normalized;
  try {
    normalized = JSON.parse(JSON.stringify(schema));
  } catch {
    throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
  }
  const version2 = detectVersion(normalized, params?.defaultTarget);
  const defs = normalized.$defs || normalized.definitions || {};
  const ctx2 = {
    version: version2,
    defs,
    refs: /* @__PURE__ */ new Map(),
    processing: /* @__PURE__ */ new Set(),
    rootSchema: normalized,
    registry: params?.registry ?? globalRegistry
  };
  return convertSchema(normalized, ctx2);
}

// node_modules/zod/v4/classic/coerce.js
var coerce_exports2 = {};
__export(coerce_exports2, {
  bigint: () => bigint3,
  boolean: () => boolean3,
  date: () => date4,
  number: () => number3,
  string: () => string3
});
function string3(params) {
  return _coercedString(ZodString2, params);
}
function number3(params) {
  return _coercedNumber(ZodNumber2, params);
}
function boolean3(params) {
  return _coercedBoolean(ZodBoolean2, params);
}
function bigint3(params) {
  return _coercedBigint(ZodBigInt2, params);
}
function date4(params) {
  return _coercedDate(ZodDate2, params);
}

// node_modules/zod/v4/classic/external.js
config(en_default2());

// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
var LATEST_PROTOCOL_VERSION = "2025-11-25";
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
var JSONRPC_VERSION = "2.0";
var AssertObjectSchema = custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
var ProgressTokenSchema = union([string2(), number2().int()]);
var CursorSchema = string2();
var TaskCreationParamsSchema = looseObject({
  /**
   * Requested duration in milliseconds to retain task from creation.
   */
  ttl: number2().optional(),
  /**
   * Time in milliseconds to wait between task status requests.
   */
  pollInterval: number2().optional()
});
var TaskMetadataSchema = object2({
  ttl: number2().optional()
});
var RelatedTaskMetadataSchema = object2({
  taskId: string2()
});
var RequestMetaSchema = looseObject({
  /**
   * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
   */
  progressToken: ProgressTokenSchema.optional(),
  /**
   * If specified, this request is related to the provided task.
   */
  [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
});
var BaseRequestParamsSchema = object2({
  /**
   * See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
   */
  _meta: RequestMetaSchema.optional()
});
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
  /**
   * If specified, the caller is requesting task-augmented execution for this request.
   * The request will return a CreateTaskResult immediately, and the actual result can be
   * retrieved later via tasks/result.
   *
   * Task augmentation is subject to capability negotiation - receivers MUST declare support
   * for task augmentation of specific request types in their capabilities.
   */
  task: TaskMetadataSchema.optional()
});
var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
var RequestSchema = object2({
  method: string2(),
  params: BaseRequestParamsSchema.loose().optional()
});
var NotificationsParamsSchema = object2({
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: RequestMetaSchema.optional()
});
var NotificationSchema = object2({
  method: string2(),
  params: NotificationsParamsSchema.loose().optional()
});
var ResultSchema = looseObject({
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: RequestMetaSchema.optional()
});
var RequestIdSchema = union([string2(), number2().int()]);
var JSONRPCRequestSchema = object2({
  jsonrpc: literal(JSONRPC_VERSION),
  id: RequestIdSchema,
  ...RequestSchema.shape
}).strict();
var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
var JSONRPCNotificationSchema = object2({
  jsonrpc: literal(JSONRPC_VERSION),
  ...NotificationSchema.shape
}).strict();
var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
var JSONRPCResultResponseSchema = object2({
  jsonrpc: literal(JSONRPC_VERSION),
  id: RequestIdSchema,
  result: ResultSchema
}).strict();
var isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success;
var ErrorCode;
(function(ErrorCode2) {
  ErrorCode2[ErrorCode2["ConnectionClosed"] = -32e3] = "ConnectionClosed";
  ErrorCode2[ErrorCode2["RequestTimeout"] = -32001] = "RequestTimeout";
  ErrorCode2[ErrorCode2["ParseError"] = -32700] = "ParseError";
  ErrorCode2[ErrorCode2["InvalidRequest"] = -32600] = "InvalidRequest";
  ErrorCode2[ErrorCode2["MethodNotFound"] = -32601] = "MethodNotFound";
  ErrorCode2[ErrorCode2["InvalidParams"] = -32602] = "InvalidParams";
  ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
  ErrorCode2[ErrorCode2["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
})(ErrorCode || (ErrorCode = {}));
var JSONRPCErrorResponseSchema = object2({
  jsonrpc: literal(JSONRPC_VERSION),
  id: RequestIdSchema.optional(),
  error: object2({
    /**
     * The error type that occurred.
     */
    code: number2().int(),
    /**
     * A short description of the error. The message SHOULD be limited to a concise single sentence.
     */
    message: string2(),
    /**
     * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
     */
    data: unknown().optional()
  })
}).strict();
var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
var JSONRPCMessageSchema = union([
  JSONRPCRequestSchema,
  JSONRPCNotificationSchema,
  JSONRPCResultResponseSchema,
  JSONRPCErrorResponseSchema
]);
var JSONRPCResponseSchema = union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
var EmptyResultSchema = ResultSchema.strict();
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
  /**
   * The ID of the request to cancel.
   *
   * This MUST correspond to the ID of a request previously issued in the same direction.
   */
  requestId: RequestIdSchema.optional(),
  /**
   * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
   */
  reason: string2().optional()
});
var CancelledNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/cancelled"),
  params: CancelledNotificationParamsSchema
});
var IconSchema = object2({
  /**
   * URL or data URI for the icon.
   */
  src: string2(),
  /**
   * Optional MIME type for the icon.
   */
  mimeType: string2().optional(),
  /**
   * Optional array of strings that specify sizes at which the icon can be used.
   * Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
   *
   * If not provided, the client should assume that the icon can be used at any size.
   */
  sizes: array(string2()).optional(),
  /**
   * Optional specifier for the theme this icon is designed for. `light` indicates
   * the icon is designed to be used with a light background, and `dark` indicates
   * the icon is designed to be used with a dark background.
   *
   * If not provided, the client should assume the icon can be used with any theme.
   */
  theme: _enum2(["light", "dark"]).optional()
});
var IconsSchema = object2({
  /**
   * Optional set of sized icons that the client can display in a user interface.
   *
   * Clients that support rendering icons MUST support at least the following MIME types:
   * - `image/png` - PNG images (safe, universal compatibility)
   * - `image/jpeg` (and `image/jpg`) - JPEG images (safe, universal compatibility)
   *
   * Clients that support rendering icons SHOULD also support:
   * - `image/svg+xml` - SVG images (scalable but requires security precautions)
   * - `image/webp` - WebP images (modern, efficient format)
   */
  icons: array(IconSchema).optional()
});
var BaseMetadataSchema = object2({
  /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
  name: string2(),
  /**
   * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
   * even by those unfamiliar with domain-specific terminology.
   *
   * If not provided, the name should be used for display (except for Tool,
   * where `annotations.title` should be given precedence over using `name`,
   * if present).
   */
  title: string2().optional()
});
var ImplementationSchema = BaseMetadataSchema.extend({
  ...BaseMetadataSchema.shape,
  ...IconsSchema.shape,
  version: string2(),
  /**
   * An optional URL of the website for this implementation.
   */
  websiteUrl: string2().optional(),
  /**
   * An optional human-readable description of what this implementation does.
   *
   * This can be used by clients or servers to provide context about their purpose
   * and capabilities. For example, a server might describe the types of resources
   * or tools it provides, while a client might describe its intended use case.
   */
  description: string2().optional()
});
var FormElicitationCapabilitySchema = intersection(object2({
  applyDefaults: boolean2().optional()
}), record(string2(), unknown()));
var ElicitationCapabilitySchema = preprocess((value) => {
  if (value && typeof value === "object" && !Array.isArray(value)) {
    if (Object.keys(value).length === 0) {
      return { form: {} };
    }
  }
  return value;
}, intersection(object2({
  form: FormElicitationCapabilitySchema.optional(),
  url: AssertObjectSchema.optional()
}), record(string2(), unknown()).optional()));
var ClientTasksCapabilitySchema = looseObject({
  /**
   * Present if the client supports listing tasks.
   */
  list: AssertObjectSchema.optional(),
  /**
   * Present if the client supports cancelling tasks.
   */
  cancel: AssertObjectSchema.optional(),
  /**
   * Capabilities for task creation on specific request types.
   */
  requests: looseObject({
    /**
     * Task support for sampling requests.
     */
    sampling: looseObject({
      createMessage: AssertObjectSchema.optional()
    }).optional(),
    /**
     * Task support for elicitation requests.
     */
    elicitation: looseObject({
      create: AssertObjectSchema.optional()
    }).optional()
  }).optional()
});
var ServerTasksCapabilitySchema = looseObject({
  /**
   * Present if the server supports listing tasks.
   */
  list: AssertObjectSchema.optional(),
  /**
   * Present if the server supports cancelling tasks.
   */
  cancel: AssertObjectSchema.optional(),
  /**
   * Capabilities for task creation on specific request types.
   */
  requests: looseObject({
    /**
     * Task support for tool requests.
     */
    tools: looseObject({
      call: AssertObjectSchema.optional()
    }).optional()
  }).optional()
});
var ClientCapabilitiesSchema = object2({
  /**
   * Experimental, non-standard capabilities that the client supports.
   */
  experimental: record(string2(), AssertObjectSchema).optional(),
  /**
   * Present if the client supports sampling from an LLM.
   */
  sampling: object2({
    /**
     * Present if the client supports context inclusion via includeContext parameter.
     * If not declared, servers SHOULD only use `includeContext: "none"` (or omit it).
     */
    context: AssertObjectSchema.optional(),
    /**
     * Present if the client supports tool use via tools and toolChoice parameters.
     */
    tools: AssertObjectSchema.optional()
  }).optional(),
  /**
   * Present if the client supports eliciting user input.
   */
  elicitation: ElicitationCapabilitySchema.optional(),
  /**
   * Present if the client supports listing roots.
   */
  roots: object2({
    /**
     * Whether the client supports issuing notifications for changes to the roots list.
     */
    listChanged: boolean2().optional()
  }).optional(),
  /**
   * Present if the client supports task creation.
   */
  tasks: ClientTasksCapabilitySchema.optional(),
  /**
   * Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
   */
  extensions: record(string2(), AssertObjectSchema).optional()
});
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
  /**
   * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
   */
  protocolVersion: string2(),
  capabilities: ClientCapabilitiesSchema,
  clientInfo: ImplementationSchema
});
var InitializeRequestSchema = RequestSchema.extend({
  method: literal("initialize"),
  params: InitializeRequestParamsSchema
});
var ServerCapabilitiesSchema = object2({
  /**
   * Experimental, non-standard capabilities that the server supports.
   */
  experimental: record(string2(), AssertObjectSchema).optional(),
  /**
   * Present if the server supports sending log messages to the client.
   */
  logging: AssertObjectSchema.optional(),
  /**
   * Present if the server supports sending completions to the client.
   */
  completions: AssertObjectSchema.optional(),
  /**
   * Present if the server offers any prompt templates.
   */
  prompts: object2({
    /**
     * Whether this server supports issuing notifications for changes to the prompt list.
     */
    listChanged: boolean2().optional()
  }).optional(),
  /**
   * Present if the server offers any resources to read.
   */
  resources: object2({
    /**
     * Whether this server supports clients subscribing to resource updates.
     */
    subscribe: boolean2().optional(),
    /**
     * Whether this server supports issuing notifications for changes to the resource list.
     */
    listChanged: boolean2().optional()
  }).optional(),
  /**
   * Present if the server offers any tools to call.
   */
  tools: object2({
    /**
     * Whether this server supports issuing notifications for changes to the tool list.
     */
    listChanged: boolean2().optional()
  }).optional(),
  /**
   * Present if the server supports task creation.
   */
  tasks: ServerTasksCapabilitySchema.optional(),
  /**
   * Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
   */
  extensions: record(string2(), AssertObjectSchema).optional()
});
var InitializeResultSchema = ResultSchema.extend({
  /**
   * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
   */
  protocolVersion: string2(),
  capabilities: ServerCapabilitiesSchema,
  serverInfo: ImplementationSchema,
  /**
   * Instructions describing how to use the server and its features.
   *
   * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
   */
  instructions: string2().optional()
});
var InitializedNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/initialized"),
  params: NotificationsParamsSchema.optional()
});
var PingRequestSchema = RequestSchema.extend({
  method: literal("ping"),
  params: BaseRequestParamsSchema.optional()
});
var ProgressSchema = object2({
  /**
   * The progress thus far. This should increase every time progress is made, even if the total is unknown.
   */
  progress: number2(),
  /**
   * Total number of items to process (or total progress required), if known.
   */
  total: optional(number2()),
  /**
   * An optional message describing the current progress.
   */
  message: optional(string2())
});
var ProgressNotificationParamsSchema = object2({
  ...NotificationsParamsSchema.shape,
  ...ProgressSchema.shape,
  /**
   * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
   */
  progressToken: ProgressTokenSchema
});
var ProgressNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/progress"),
  params: ProgressNotificationParamsSchema
});
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
  /**
   * An opaque token representing the current pagination position.
   * If provided, the server should return results starting after this cursor.
   */
  cursor: CursorSchema.optional()
});
var PaginatedRequestSchema = RequestSchema.extend({
  params: PaginatedRequestParamsSchema.optional()
});
var PaginatedResultSchema = ResultSchema.extend({
  /**
   * An opaque token representing the pagination position after the last returned result.
   * If present, there may be more results available.
   */
  nextCursor: CursorSchema.optional()
});
var TaskStatusSchema = _enum2(["working", "input_required", "completed", "failed", "cancelled"]);
var TaskSchema = object2({
  taskId: string2(),
  status: TaskStatusSchema,
  /**
   * Time in milliseconds to keep task results available after completion.
   * If null, the task has unlimited lifetime until manually cleaned up.
   */
  ttl: union([number2(), _null3()]),
  /**
   * ISO 8601 timestamp when the task was created.
   */
  createdAt: string2(),
  /**
   * ISO 8601 timestamp when the task was last updated.
   */
  lastUpdatedAt: string2(),
  pollInterval: optional(number2()),
  /**
   * Optional diagnostic message for failed tasks or other status information.
   */
  statusMessage: optional(string2())
});
var CreateTaskResultSchema = ResultSchema.extend({
  task: TaskSchema
});
var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);
var TaskStatusNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/tasks/status"),
  params: TaskStatusNotificationParamsSchema
});
var GetTaskRequestSchema = RequestSchema.extend({
  method: literal("tasks/get"),
  params: BaseRequestParamsSchema.extend({
    taskId: string2()
  })
});
var GetTaskResultSchema = ResultSchema.merge(TaskSchema);
var GetTaskPayloadRequestSchema = RequestSchema.extend({
  method: literal("tasks/result"),
  params: BaseRequestParamsSchema.extend({
    taskId: string2()
  })
});
var GetTaskPayloadResultSchema = ResultSchema.loose();
var ListTasksRequestSchema = PaginatedRequestSchema.extend({
  method: literal("tasks/list")
});
var ListTasksResultSchema = PaginatedResultSchema.extend({
  tasks: array(TaskSchema)
});
var CancelTaskRequestSchema = RequestSchema.extend({
  method: literal("tasks/cancel"),
  params: BaseRequestParamsSchema.extend({
    taskId: string2()
  })
});
var CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
var ResourceContentsSchema = object2({
  /**
   * The URI of this resource.
   */
  uri: string2(),
  /**
   * The MIME type of this resource, if known.
   */
  mimeType: optional(string2()),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var TextResourceContentsSchema = ResourceContentsSchema.extend({
  /**
   * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
   */
  text: string2()
});
var Base64Schema = string2().refine((val) => {
  try {
    atob(val);
    return true;
  } catch {
    return false;
  }
}, { message: "Invalid Base64 string" });
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
  /**
   * A base64-encoded string representing the binary data of the item.
   */
  blob: Base64Schema
});
var RoleSchema = _enum2(["user", "assistant"]);
var AnnotationsSchema = object2({
  /**
   * Intended audience(s) for the resource.
   */
  audience: array(RoleSchema).optional(),
  /**
   * Importance hint for the resource, from 0 (least) to 1 (most).
   */
  priority: number2().min(0).max(1).optional(),
  /**
   * ISO 8601 timestamp for the most recent modification.
   */
  lastModified: iso_exports2.datetime({ offset: true }).optional()
});
var ResourceSchema = object2({
  ...BaseMetadataSchema.shape,
  ...IconsSchema.shape,
  /**
   * The URI of this resource.
   */
  uri: string2(),
  /**
   * A description of what this resource represents.
   *
   * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
   */
  description: optional(string2()),
  /**
   * The MIME type of this resource, if known.
   */
  mimeType: optional(string2()),
  /**
   * The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
   *
   * This can be used by Hosts to display file sizes and estimate context window usage.
   */
  size: optional(number2()),
  /**
   * Optional annotations for the client.
   */
  annotations: AnnotationsSchema.optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: optional(looseObject({}))
});
var ResourceTemplateSchema = object2({
  ...BaseMetadataSchema.shape,
  ...IconsSchema.shape,
  /**
   * A URI template (according to RFC 6570) that can be used to construct resource URIs.
   */
  uriTemplate: string2(),
  /**
   * A description of what this template is for.
   *
   * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
   */
  description: optional(string2()),
  /**
   * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
   */
  mimeType: optional(string2()),
  /**
   * Optional annotations for the client.
   */
  annotations: AnnotationsSchema.optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: optional(looseObject({}))
});
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
  method: literal("resources/list")
});
var ListResourcesResultSchema = PaginatedResultSchema.extend({
  resources: array(ResourceSchema)
});
var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
  method: literal("resources/templates/list")
});
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
  resourceTemplates: array(ResourceTemplateSchema)
});
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
  /**
   * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
   *
   * @format uri
   */
  uri: string2()
});
var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
var ReadResourceRequestSchema = RequestSchema.extend({
  method: literal("resources/read"),
  params: ReadResourceRequestParamsSchema
});
var ReadResourceResultSchema = ResultSchema.extend({
  contents: array(union([TextResourceContentsSchema, BlobResourceContentsSchema]))
});
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/resources/list_changed"),
  params: NotificationsParamsSchema.optional()
});
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
var SubscribeRequestSchema = RequestSchema.extend({
  method: literal("resources/subscribe"),
  params: SubscribeRequestParamsSchema
});
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
var UnsubscribeRequestSchema = RequestSchema.extend({
  method: literal("resources/unsubscribe"),
  params: UnsubscribeRequestParamsSchema
});
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
  /**
   * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
   */
  uri: string2()
});
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/resources/updated"),
  params: ResourceUpdatedNotificationParamsSchema
});
var PromptArgumentSchema = object2({
  /**
   * The name of the argument.
   */
  name: string2(),
  /**
   * A human-readable description of the argument.
   */
  description: optional(string2()),
  /**
   * Whether this argument must be provided.
   */
  required: optional(boolean2())
});
var PromptSchema = object2({
  ...BaseMetadataSchema.shape,
  ...IconsSchema.shape,
  /**
   * An optional description of what this prompt provides
   */
  description: optional(string2()),
  /**
   * A list of arguments to use for templating the prompt.
   */
  arguments: optional(array(PromptArgumentSchema)),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: optional(looseObject({}))
});
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
  method: literal("prompts/list")
});
var ListPromptsResultSchema = PaginatedResultSchema.extend({
  prompts: array(PromptSchema)
});
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
  /**
   * The name of the prompt or prompt template.
   */
  name: string2(),
  /**
   * Arguments to use for templating the prompt.
   */
  arguments: record(string2(), string2()).optional()
});
var GetPromptRequestSchema = RequestSchema.extend({
  method: literal("prompts/get"),
  params: GetPromptRequestParamsSchema
});
var TextContentSchema = object2({
  type: literal("text"),
  /**
   * The text content of the message.
   */
  text: string2(),
  /**
   * Optional annotations for the client.
   */
  annotations: AnnotationsSchema.optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var ImageContentSchema = object2({
  type: literal("image"),
  /**
   * The base64-encoded image data.
   */
  data: Base64Schema,
  /**
   * The MIME type of the image. Different providers may support different image types.
   */
  mimeType: string2(),
  /**
   * Optional annotations for the client.
   */
  annotations: AnnotationsSchema.optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var AudioContentSchema = object2({
  type: literal("audio"),
  /**
   * The base64-encoded audio data.
   */
  data: Base64Schema,
  /**
   * The MIME type of the audio. Different providers may support different audio types.
   */
  mimeType: string2(),
  /**
   * Optional annotations for the client.
   */
  annotations: AnnotationsSchema.optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var ToolUseContentSchema = object2({
  type: literal("tool_use"),
  /**
   * The name of the tool to invoke.
   * Must match a tool name from the request's tools array.
   */
  name: string2(),
  /**
   * Unique identifier for this tool call.
   * Used to correlate with ToolResultContent in subsequent messages.
   */
  id: string2(),
  /**
   * Arguments to pass to the tool.
   * Must conform to the tool's inputSchema.
   */
  input: record(string2(), unknown()),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var EmbeddedResourceSchema = object2({
  type: literal("resource"),
  resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]),
  /**
   * Optional annotations for the client.
   */
  annotations: AnnotationsSchema.optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var ResourceLinkSchema = ResourceSchema.extend({
  type: literal("resource_link")
});
var ContentBlockSchema = union([
  TextContentSchema,
  ImageContentSchema,
  AudioContentSchema,
  ResourceLinkSchema,
  EmbeddedResourceSchema
]);
var PromptMessageSchema = object2({
  role: RoleSchema,
  content: ContentBlockSchema
});
var GetPromptResultSchema = ResultSchema.extend({
  /**
   * An optional description for the prompt.
   */
  description: string2().optional(),
  messages: array(PromptMessageSchema)
});
var PromptListChangedNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/prompts/list_changed"),
  params: NotificationsParamsSchema.optional()
});
var ToolAnnotationsSchema = object2({
  /**
   * A human-readable title for the tool.
   */
  title: string2().optional(),
  /**
   * If true, the tool does not modify its environment.
   *
   * Default: false
   */
  readOnlyHint: boolean2().optional(),
  /**
   * If true, the tool may perform destructive updates to its environment.
   * If false, the tool performs only additive updates.
   *
   * (This property is meaningful only when `readOnlyHint == false`)
   *
   * Default: true
   */
  destructiveHint: boolean2().optional(),
  /**
   * If true, calling the tool repeatedly with the same arguments
   * will have no additional effect on the its environment.
   *
   * (This property is meaningful only when `readOnlyHint == false`)
   *
   * Default: false
   */
  idempotentHint: boolean2().optional(),
  /**
   * If true, this tool may interact with an "open world" of external
   * entities. If false, the tool's domain of interaction is closed.
   * For example, the world of a web search tool is open, whereas that
   * of a memory tool is not.
   *
   * Default: true
   */
  openWorldHint: boolean2().optional()
});
var ToolExecutionSchema = object2({
  /**
   * Indicates the tool's preference for task-augmented execution.
   * - "required": Clients MUST invoke the tool as a task
   * - "optional": Clients MAY invoke the tool as a task or normal request
   * - "forbidden": Clients MUST NOT attempt to invoke the tool as a task
   *
   * If not present, defaults to "forbidden".
   */
  taskSupport: _enum2(["required", "optional", "forbidden"]).optional()
});
var ToolSchema = object2({
  ...BaseMetadataSchema.shape,
  ...IconsSchema.shape,
  /**
   * A human-readable description of the tool.
   */
  description: string2().optional(),
  /**
   * A JSON Schema 2020-12 object defining the expected parameters for the tool.
   * Must have type: 'object' at the root level per MCP spec.
   */
  inputSchema: object2({
    type: literal("object"),
    properties: record(string2(), AssertObjectSchema).optional(),
    required: array(string2()).optional()
  }).catchall(unknown()),
  /**
   * An optional JSON Schema 2020-12 object defining the structure of the tool's output
   * returned in the structuredContent field of a CallToolResult.
   * Must have type: 'object' at the root level per MCP spec.
   */
  outputSchema: object2({
    type: literal("object"),
    properties: record(string2(), AssertObjectSchema).optional(),
    required: array(string2()).optional()
  }).catchall(unknown()).optional(),
  /**
   * Optional additional tool information.
   */
  annotations: ToolAnnotationsSchema.optional(),
  /**
   * Execution-related properties for this tool.
   */
  execution: ToolExecutionSchema.optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
  method: literal("tools/list")
});
var ListToolsResultSchema = PaginatedResultSchema.extend({
  tools: array(ToolSchema)
});
var CallToolResultSchema = ResultSchema.extend({
  /**
   * A list of content objects that represent the result of the tool call.
   *
   * If the Tool does not define an outputSchema, this field MUST be present in the result.
   * For backwards compatibility, this field is always present, but it may be empty.
   */
  content: array(ContentBlockSchema).default([]),
  /**
   * An object containing structured tool output.
   *
   * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
   */
  structuredContent: record(string2(), unknown()).optional(),
  /**
   * Whether the tool call ended in an error.
   *
   * If not set, this is assumed to be false (the call was successful).
   *
   * Any errors that originate from the tool SHOULD be reported inside the result
   * object, with `isError` set to true, _not_ as an MCP protocol-level error
   * response. Otherwise, the LLM would not be able to see that an error occurred
   * and self-correct.
   *
   * However, any errors in _finding_ the tool, an error indicating that the
   * server does not support tool calls, or any other exceptional conditions,
   * should be reported as an MCP error response.
   */
  isError: boolean2().optional()
});
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
  toolResult: unknown()
}));
var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
  /**
   * The name of the tool to call.
   */
  name: string2(),
  /**
   * Arguments to pass to the tool.
   */
  arguments: record(string2(), unknown()).optional()
});
var CallToolRequestSchema = RequestSchema.extend({
  method: literal("tools/call"),
  params: CallToolRequestParamsSchema
});
var ToolListChangedNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/tools/list_changed"),
  params: NotificationsParamsSchema.optional()
});
var ListChangedOptionsBaseSchema = object2({
  /**
   * If true, the list will be refreshed automatically when a list changed notification is received.
   * The callback will be called with the updated list.
   *
   * If false, the callback will be called with null items, allowing manual refresh.
   *
   * @default true
   */
  autoRefresh: boolean2().default(true),
  /**
   * Debounce time in milliseconds for list changed notification processing.
   *
   * Multiple notifications received within this timeframe will only trigger one refresh.
   * Set to 0 to disable debouncing.
   *
   * @default 300
   */
  debounceMs: number2().int().nonnegative().default(300)
});
var LoggingLevelSchema = _enum2(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
  /**
   * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
   */
  level: LoggingLevelSchema
});
var SetLevelRequestSchema = RequestSchema.extend({
  method: literal("logging/setLevel"),
  params: SetLevelRequestParamsSchema
});
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
  /**
   * The severity of this log message.
   */
  level: LoggingLevelSchema,
  /**
   * An optional name of the logger issuing this message.
   */
  logger: string2().optional(),
  /**
   * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
   */
  data: unknown()
});
var LoggingMessageNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/message"),
  params: LoggingMessageNotificationParamsSchema
});
var ModelHintSchema = object2({
  /**
   * A hint for a model name.
   */
  name: string2().optional()
});
var ModelPreferencesSchema = object2({
  /**
   * Optional hints to use for model selection.
   */
  hints: array(ModelHintSchema).optional(),
  /**
   * How much to prioritize cost when selecting a model.
   */
  costPriority: number2().min(0).max(1).optional(),
  /**
   * How much to prioritize sampling speed (latency) when selecting a model.
   */
  speedPriority: number2().min(0).max(1).optional(),
  /**
   * How much to prioritize intelligence and capabilities when selecting a model.
   */
  intelligencePriority: number2().min(0).max(1).optional()
});
var ToolChoiceSchema = object2({
  /**
   * Controls when tools are used:
   * - "auto": Model decides whether to use tools (default)
   * - "required": Model MUST use at least one tool before completing
   * - "none": Model MUST NOT use any tools
   */
  mode: _enum2(["auto", "required", "none"]).optional()
});
var ToolResultContentSchema = object2({
  type: literal("tool_result"),
  toolUseId: string2().describe("The unique identifier for the corresponding tool call."),
  content: array(ContentBlockSchema).default([]),
  structuredContent: object2({}).loose().optional(),
  isError: boolean2().optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var SamplingContentSchema = discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
var SamplingMessageContentBlockSchema = discriminatedUnion("type", [
  TextContentSchema,
  ImageContentSchema,
  AudioContentSchema,
  ToolUseContentSchema,
  ToolResultContentSchema
]);
var SamplingMessageSchema = object2({
  role: RoleSchema,
  content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
  messages: array(SamplingMessageSchema),
  /**
   * The server's preferences for which model to select. The client MAY modify or omit this request.
   */
  modelPreferences: ModelPreferencesSchema.optional(),
  /**
   * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
   */
  systemPrompt: string2().optional(),
  /**
   * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
   * The client MAY ignore this request.
   *
   * Default is "none". Values "thisServer" and "allServers" are soft-deprecated. Servers SHOULD only use these values if the client
   * declares ClientCapabilities.sampling.context. These values may be removed in future spec releases.
   */
  includeContext: _enum2(["none", "thisServer", "allServers"]).optional(),
  temperature: number2().optional(),
  /**
   * The requested maximum number of tokens to sample (to prevent runaway completions).
   *
   * The client MAY choose to sample fewer tokens than the requested maximum.
   */
  maxTokens: number2().int(),
  stopSequences: array(string2()).optional(),
  /**
   * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
   */
  metadata: AssertObjectSchema.optional(),
  /**
   * Tools that the model may use during generation.
   * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
   */
  tools: array(ToolSchema).optional(),
  /**
   * Controls how the model uses tools.
   * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
   * Default is `{ mode: "auto" }`.
   */
  toolChoice: ToolChoiceSchema.optional()
});
var CreateMessageRequestSchema = RequestSchema.extend({
  method: literal("sampling/createMessage"),
  params: CreateMessageRequestParamsSchema
});
var CreateMessageResultSchema = ResultSchema.extend({
  /**
   * The name of the model that generated the message.
   */
  model: string2(),
  /**
   * The reason why sampling stopped, if known.
   *
   * Standard values:
   * - "endTurn": Natural end of the assistant's turn
   * - "stopSequence": A stop sequence was encountered
   * - "maxTokens": Maximum token limit was reached
   *
   * This field is an open string to allow for provider-specific stop reasons.
   */
  stopReason: optional(_enum2(["endTurn", "stopSequence", "maxTokens"]).or(string2())),
  role: RoleSchema,
  /**
   * Response content. Single content block (text, image, or audio).
   */
  content: SamplingContentSchema
});
var CreateMessageResultWithToolsSchema = ResultSchema.extend({
  /**
   * The name of the model that generated the message.
   */
  model: string2(),
  /**
   * The reason why sampling stopped, if known.
   *
   * Standard values:
   * - "endTurn": Natural end of the assistant's turn
   * - "stopSequence": A stop sequence was encountered
   * - "maxTokens": Maximum token limit was reached
   * - "toolUse": The model wants to use one or more tools
   *
   * This field is an open string to allow for provider-specific stop reasons.
   */
  stopReason: optional(_enum2(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(string2())),
  role: RoleSchema,
  /**
   * Response content. May be a single block or array. May include ToolUseContent if stopReason is "toolUse".
   */
  content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)])
});
var BooleanSchemaSchema = object2({
  type: literal("boolean"),
  title: string2().optional(),
  description: string2().optional(),
  default: boolean2().optional()
});
var StringSchemaSchema = object2({
  type: literal("string"),
  title: string2().optional(),
  description: string2().optional(),
  minLength: number2().optional(),
  maxLength: number2().optional(),
  format: _enum2(["email", "uri", "date", "date-time"]).optional(),
  default: string2().optional()
});
var NumberSchemaSchema = object2({
  type: _enum2(["number", "integer"]),
  title: string2().optional(),
  description: string2().optional(),
  minimum: number2().optional(),
  maximum: number2().optional(),
  default: number2().optional()
});
var UntitledSingleSelectEnumSchemaSchema = object2({
  type: literal("string"),
  title: string2().optional(),
  description: string2().optional(),
  enum: array(string2()),
  default: string2().optional()
});
var TitledSingleSelectEnumSchemaSchema = object2({
  type: literal("string"),
  title: string2().optional(),
  description: string2().optional(),
  oneOf: array(object2({
    const: string2(),
    title: string2()
  })),
  default: string2().optional()
});
var LegacyTitledEnumSchemaSchema = object2({
  type: literal("string"),
  title: string2().optional(),
  description: string2().optional(),
  enum: array(string2()),
  enumNames: array(string2()).optional(),
  default: string2().optional()
});
var SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
var UntitledMultiSelectEnumSchemaSchema = object2({
  type: literal("array"),
  title: string2().optional(),
  description: string2().optional(),
  minItems: number2().optional(),
  maxItems: number2().optional(),
  items: object2({
    type: literal("string"),
    enum: array(string2())
  }),
  default: array(string2()).optional()
});
var TitledMultiSelectEnumSchemaSchema = object2({
  type: literal("array"),
  title: string2().optional(),
  description: string2().optional(),
  minItems: number2().optional(),
  maxItems: number2().optional(),
  items: object2({
    anyOf: array(object2({
      const: string2(),
      title: string2()
    }))
  }),
  default: array(string2()).optional()
});
var MultiSelectEnumSchemaSchema = union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
var EnumSchemaSchema = union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
var PrimitiveSchemaDefinitionSchema = union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
  /**
   * The elicitation mode.
   *
   * Optional for backward compatibility. Clients MUST treat missing mode as "form".
   */
  mode: literal("form").optional(),
  /**
   * The message to present to the user describing what information is being requested.
   */
  message: string2(),
  /**
   * A restricted subset of JSON Schema.
   * Only top-level properties are allowed, without nesting.
   */
  requestedSchema: object2({
    type: literal("object"),
    properties: record(string2(), PrimitiveSchemaDefinitionSchema),
    required: array(string2()).optional()
  })
});
var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
  /**
   * The elicitation mode.
   */
  mode: literal("url"),
  /**
   * The message to present to the user explaining why the interaction is needed.
   */
  message: string2(),
  /**
   * The ID of the elicitation, which must be unique within the context of the server.
   * The client MUST treat this ID as an opaque value.
   */
  elicitationId: string2(),
  /**
   * The URL that the user should navigate to.
   */
  url: string2().url()
});
var ElicitRequestParamsSchema = union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
var ElicitRequestSchema = RequestSchema.extend({
  method: literal("elicitation/create"),
  params: ElicitRequestParamsSchema
});
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
  /**
   * The ID of the elicitation that completed.
   */
  elicitationId: string2()
});
var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/elicitation/complete"),
  params: ElicitationCompleteNotificationParamsSchema
});
var ElicitResultSchema = ResultSchema.extend({
  /**
   * The user action in response to the elicitation.
   * - "accept": User submitted the form/confirmed the action
   * - "decline": User explicitly decline the action
   * - "cancel": User dismissed without making an explicit choice
   */
  action: _enum2(["accept", "decline", "cancel"]),
  /**
   * The submitted form data, only present when action is "accept".
   * Contains values matching the requested schema.
   * Per MCP spec, content is "typically omitted" for decline/cancel actions.
   * We normalize null to undefined for leniency while maintaining type compatibility.
   */
  content: preprocess((val) => val === null ? void 0 : val, record(string2(), union([string2(), number2(), boolean2(), array(string2())])).optional())
});
var ResourceTemplateReferenceSchema = object2({
  type: literal("ref/resource"),
  /**
   * The URI or URI template of the resource.
   */
  uri: string2()
});
var PromptReferenceSchema = object2({
  type: literal("ref/prompt"),
  /**
   * The name of the prompt or prompt template
   */
  name: string2()
});
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
  ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
  /**
   * The argument's information
   */
  argument: object2({
    /**
     * The name of the argument
     */
    name: string2(),
    /**
     * The value of the argument to use for completion matching.
     */
    value: string2()
  }),
  context: object2({
    /**
     * Previously-resolved variables in a URI template or prompt.
     */
    arguments: record(string2(), string2()).optional()
  }).optional()
});
var CompleteRequestSchema = RequestSchema.extend({
  method: literal("completion/complete"),
  params: CompleteRequestParamsSchema
});
function assertCompleteRequestPrompt(request) {
  if (request.params.ref.type !== "ref/prompt") {
    throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);
  }
  void request;
}
function assertCompleteRequestResourceTemplate(request) {
  if (request.params.ref.type !== "ref/resource") {
    throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);
  }
  void request;
}
var CompleteResultSchema = ResultSchema.extend({
  completion: looseObject({
    /**
     * An array of completion values. Must not exceed 100 items.
     */
    values: array(string2()).max(100),
    /**
     * The total number of completion options available. This can exceed the number of values actually sent in the response.
     */
    total: optional(number2().int()),
    /**
     * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
     */
    hasMore: optional(boolean2())
  })
});
var RootSchema = object2({
  /**
   * The URI identifying the root. This *must* start with file:// for now.
   */
  uri: string2().startsWith("file://"),
  /**
   * An optional name for the root.
   */
  name: string2().optional(),
  /**
   * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
   * for notes on _meta usage.
   */
  _meta: record(string2(), unknown()).optional()
});
var ListRootsRequestSchema = RequestSchema.extend({
  method: literal("roots/list"),
  params: BaseRequestParamsSchema.optional()
});
var ListRootsResultSchema = ResultSchema.extend({
  roots: array(RootSchema)
});
var RootsListChangedNotificationSchema = NotificationSchema.extend({
  method: literal("notifications/roots/list_changed"),
  params: NotificationsParamsSchema.optional()
});
var ClientRequestSchema = union([
  PingRequestSchema,
  InitializeRequestSchema,
  CompleteRequestSchema,
  SetLevelRequestSchema,
  GetPromptRequestSchema,
  ListPromptsRequestSchema,
  ListResourcesRequestSchema,
  ListResourceTemplatesRequestSchema,
  ReadResourceRequestSchema,
  SubscribeRequestSchema,
  UnsubscribeRequestSchema,
  CallToolRequestSchema,
  ListToolsRequestSchema,
  GetTaskRequestSchema,
  GetTaskPayloadRequestSchema,
  ListTasksRequestSchema,
  CancelTaskRequestSchema
]);
var ClientNotificationSchema = union([
  CancelledNotificationSchema,
  ProgressNotificationSchema,
  InitializedNotificationSchema,
  RootsListChangedNotificationSchema,
  TaskStatusNotificationSchema
]);
var ClientResultSchema = union([
  EmptyResultSchema,
  CreateMessageResultSchema,
  CreateMessageResultWithToolsSchema,
  ElicitResultSchema,
  ListRootsResultSchema,
  GetTaskResultSchema,
  ListTasksResultSchema,
  CreateTaskResultSchema
]);
var ServerRequestSchema = union([
  PingRequestSchema,
  CreateMessageRequestSchema,
  ElicitRequestSchema,
  ListRootsRequestSchema,
  GetTaskRequestSchema,
  GetTaskPayloadRequestSchema,
  ListTasksRequestSchema,
  CancelTaskRequestSchema
]);
var ServerNotificationSchema = union([
  CancelledNotificationSchema,
  ProgressNotificationSchema,
  LoggingMessageNotificationSchema,
  ResourceUpdatedNotificationSchema,
  ResourceListChangedNotificationSchema,
  ToolListChangedNotificationSchema,
  PromptListChangedNotificationSchema,
  TaskStatusNotificationSchema,
  ElicitationCompleteNotificationSchema
]);
var ServerResultSchema = union([
  EmptyResultSchema,
  InitializeResultSchema,
  CompleteResultSchema,
  GetPromptResultSchema,
  ListPromptsResultSchema,
  ListResourcesResultSchema,
  ListResourceTemplatesResultSchema,
  ReadResourceResultSchema,
  CallToolResultSchema,
  ListToolsResultSchema,
  GetTaskResultSchema,
  ListTasksResultSchema,
  CreateTaskResultSchema
]);
var McpError = class _McpError extends Error {
  constructor(code, message, data) {
    super(`MCP error ${code}: ${message}`);
    this.code = code;
    this.data = data;
    this.name = "McpError";
  }
  /**
   * Factory method to create the appropriate error type based on the error code and data
   */
  static fromError(code, message, data) {
    if (code === ErrorCode.UrlElicitationRequired && data) {
      const errorData = data;
      if (errorData.elicitations) {
        return new UrlElicitationRequiredError(errorData.elicitations, message);
      }
    }
    return new _McpError(code, message, data);
  }
};
var UrlElicitationRequiredError = class extends McpError {
  constructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? "s" : ""} required`) {
    super(ErrorCode.UrlElicitationRequired, message, {
      elicitations
    });
  }
  get elicitations() {
    return this.data?.elicitations ?? [];
  }
};

// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
function isTerminal(status) {
  return status === "completed" || status === "failed" || status === "cancelled";
}

// node_modules/zod-to-json-schema/dist/esm/Options.js
var ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use");
var defaultOptions = {
  name: void 0,
  $refStrategy: "root",
  basePath: ["#"],
  effectStrategy: "input",
  pipeStrategy: "all",
  dateStrategy: "format:date-time",
  mapStrategy: "entries",
  removeAdditionalStrategy: "passthrough",
  allowedAdditionalProperties: true,
  rejectedAdditionalProperties: false,
  definitionPath: "definitions",
  target: "jsonSchema7",
  strictUnions: false,
  definitions: {},
  errorMessages: false,
  markdownDescription: false,
  patternStrategy: "escape",
  applyRegexFlags: false,
  emailStrategy: "format:email",
  base64Strategy: "contentEncoding:base64",
  nameStrategy: "ref",
  openAiAnyTypeName: "OpenAiAnyType"
};
var getDefaultOptions = (options) => typeof options === "string" ? {
  ...defaultOptions,
  name: options
} : {
  ...defaultOptions,
  ...options
};

// node_modules/zod-to-json-schema/dist/esm/Refs.js
var getRefs = (options) => {
  const _options = getDefaultOptions(options);
  const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
  return {
    ..._options,
    flags: { hasReferencedOpenAiAnyType: false },
    currentPath,
    propertyPath: void 0,
    seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
      def._def,
      {
        def: def._def,
        path: [..._options.basePath, _options.definitionPath, name],
        // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
        jsonSchema: void 0
      }
    ]))
  };
};

// node_modules/zod-to-json-schema/dist/esm/errorMessages.js
function addErrorMessage(res, key, errorMessage, refs) {
  if (!refs?.errorMessages)
    return;
  if (errorMessage) {
    res.errorMessage = {
      ...res.errorMessage,
      [key]: errorMessage
    };
  }
}
function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
  res[key] = value;
  addErrorMessage(res, key, errorMessage, refs);
}

// node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
var getRelativePath = (pathA, pathB) => {
  let i = 0;
  for (; i < pathA.length && i < pathB.length; i++) {
    if (pathA[i] !== pathB[i])
      break;
  }
  return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
};

// node_modules/zod-to-json-schema/dist/esm/parsers/any.js
function parseAnyDef(refs) {
  if (refs.target !== "openAi") {
    return {};
  }
  const anyDefinitionPath = [
    ...refs.basePath,
    refs.definitionPath,
    refs.openAiAnyTypeName
  ];
  refs.flags.hasReferencedOpenAiAnyType = true;
  return {
    $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/")
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/array.js
function parseArrayDef(def, refs) {
  const res = {
    type: "array"
  };
  if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) {
    res.items = parseDef(def.type._def, {
      ...refs,
      currentPath: [...refs.currentPath, "items"]
    });
  }
  if (def.minLength) {
    setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs);
  }
  if (def.maxLength) {
    setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
  }
  if (def.exactLength) {
    setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
    setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
  }
  return res;
}

// node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
function parseBigintDef(def, refs) {
  const res = {
    type: "integer",
    format: "int64"
  };
  if (!def.checks)
    return res;
  for (const check2 of def.checks) {
    switch (check2.kind) {
      case "min":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMinimum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMinimum = true;
          }
          setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
        }
        break;
      case "max":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMaximum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMaximum = true;
          }
          setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
        }
        break;
      case "multipleOf":
        setResponseValueAndErrors(res, "multipleOf", check2.value, check2.message, refs);
        break;
    }
  }
  return res;
}

// node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
function parseBooleanDef() {
  return {
    type: "boolean"
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
function parseBrandedDef(_def, refs) {
  return parseDef(_def.type._def, refs);
}

// node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
var parseCatchDef = (def, refs) => {
  return parseDef(def.innerType._def, refs);
};

// node_modules/zod-to-json-schema/dist/esm/parsers/date.js
function parseDateDef(def, refs, overrideDateStrategy) {
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
  if (Array.isArray(strategy)) {
    return {
      anyOf: strategy.map((item, i) => parseDateDef(def, refs, item))
    };
  }
  switch (strategy) {
    case "string":
    case "format:date-time":
      return {
        type: "string",
        format: "date-time"
      };
    case "format:date":
      return {
        type: "string",
        format: "date"
      };
    case "integer":
      return integerDateParser(def, refs);
  }
}
var integerDateParser = (def, refs) => {
  const res = {
    type: "integer",
    format: "unix-time"
  };
  if (refs.target === "openApi3") {
    return res;
  }
  for (const check2 of def.checks) {
    switch (check2.kind) {
      case "min":
        setResponseValueAndErrors(
          res,
          "minimum",
          check2.value,
          // This is in milliseconds
          check2.message,
          refs
        );
        break;
      case "max":
        setResponseValueAndErrors(
          res,
          "maximum",
          check2.value,
          // This is in milliseconds
          check2.message,
          refs
        );
        break;
    }
  }
  return res;
};

// node_modules/zod-to-json-schema/dist/esm/parsers/default.js
function parseDefaultDef(_def, refs) {
  return {
    ...parseDef(_def.innerType._def, refs),
    default: _def.defaultValue()
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
function parseEffectsDef(_def, refs) {
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
}

// node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
function parseEnumDef(def) {
  return {
    type: "string",
    enum: Array.from(def.values)
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
var isJsonSchema7AllOfType = (type) => {
  if ("type" in type && type.type === "string")
    return false;
  return "allOf" in type;
};
function parseIntersectionDef(def, refs) {
  const allOf = [
    parseDef(def.left._def, {
      ...refs,
      currentPath: [...refs.currentPath, "allOf", "0"]
    }),
    parseDef(def.right._def, {
      ...refs,
      currentPath: [...refs.currentPath, "allOf", "1"]
    })
  ].filter((x) => !!x);
  let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0;
  const mergedAllOf = [];
  allOf.forEach((schema) => {
    if (isJsonSchema7AllOfType(schema)) {
      mergedAllOf.push(...schema.allOf);
      if (schema.unevaluatedProperties === void 0) {
        unevaluatedProperties = void 0;
      }
    } else {
      let nestedSchema = schema;
      if ("additionalProperties" in schema && schema.additionalProperties === false) {
        const { additionalProperties, ...rest } = schema;
        nestedSchema = rest;
      } else {
        unevaluatedProperties = void 0;
      }
      mergedAllOf.push(nestedSchema);
    }
  });
  return mergedAllOf.length ? {
    allOf: mergedAllOf,
    ...unevaluatedProperties
  } : void 0;
}

// node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
function parseLiteralDef(def, refs) {
  const parsedType2 = typeof def.value;
  if (parsedType2 !== "bigint" && parsedType2 !== "number" && parsedType2 !== "boolean" && parsedType2 !== "string") {
    return {
      type: Array.isArray(def.value) ? "array" : "object"
    };
  }
  if (refs.target === "openApi3") {
    return {
      type: parsedType2 === "bigint" ? "integer" : parsedType2,
      enum: [def.value]
    };
  }
  return {
    type: parsedType2 === "bigint" ? "integer" : parsedType2,
    const: def.value
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/string.js
var emojiRegex2 = void 0;
var zodPatterns = {
  /**
   * `c` was changed to `[cC]` to replicate /i flag
   */
  cuid: /^[cC][^\s-]{8,}$/,
  cuid2: /^[0-9a-z]+$/,
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
  /**
   * `a-z` was added to replicate /i flag
   */
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
  /**
   * Constructed a valid Unicode RegExp
   *
   * Lazily instantiate since this type of regex isn't supported
   * in all envs (e.g. React Native).
   *
   * See:
   * https://github.com/colinhacks/zod/issues/2433
   * Fix in Zod:
   * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
   */
  emoji: () => {
    if (emojiRegex2 === void 0) {
      emojiRegex2 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u");
    }
    return emojiRegex2;
  },
  /**
   * Unused
   */
  uuid: /^[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}$/,
  /**
   * Unused
   */
  ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
  ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
  /**
   * Unused
   */
  ipv6: /^(([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})))$/,
  ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
  base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
  base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
};
function parseStringDef(def, refs) {
  const res = {
    type: "string"
  };
  if (def.checks) {
    for (const check2 of def.checks) {
      switch (check2.kind) {
        case "min":
          setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check2.value) : check2.value, check2.message, refs);
          break;
        case "max":
          setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check2.value) : check2.value, check2.message, refs);
          break;
        case "email":
          switch (refs.emailStrategy) {
            case "format:email":
              addFormat(res, "email", check2.message, refs);
              break;
            case "format:idn-email":
              addFormat(res, "idn-email", check2.message, refs);
              break;
            case "pattern:zod":
              addPattern(res, zodPatterns.email, check2.message, refs);
              break;
          }
          break;
        case "url":
          addFormat(res, "uri", check2.message, refs);
          break;
        case "uuid":
          addFormat(res, "uuid", check2.message, refs);
          break;
        case "regex":
          addPattern(res, check2.regex, check2.message, refs);
          break;
        case "cuid":
          addPattern(res, zodPatterns.cuid, check2.message, refs);
          break;
        case "cuid2":
          addPattern(res, zodPatterns.cuid2, check2.message, refs);
          break;
        case "startsWith":
          addPattern(res, RegExp(`^${escapeLiteralCheckValue(check2.value, refs)}`), check2.message, refs);
          break;
        case "endsWith":
          addPattern(res, RegExp(`${escapeLiteralCheckValue(check2.value, refs)}$`), check2.message, refs);
          break;
        case "datetime":
          addFormat(res, "date-time", check2.message, refs);
          break;
        case "date":
          addFormat(res, "date", check2.message, refs);
          break;
        case "time":
          addFormat(res, "time", check2.message, refs);
          break;
        case "duration":
          addFormat(res, "duration", check2.message, refs);
          break;
        case "length":
          setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check2.value) : check2.value, check2.message, refs);
          setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check2.value) : check2.value, check2.message, refs);
          break;
        case "includes": {
          addPattern(res, RegExp(escapeLiteralCheckValue(check2.value, refs)), check2.message, refs);
          break;
        }
        case "ip": {
          if (check2.version !== "v6") {
            addFormat(res, "ipv4", check2.message, refs);
          }
          if (check2.version !== "v4") {
            addFormat(res, "ipv6", check2.message, refs);
          }
          break;
        }
        case "base64url":
          addPattern(res, zodPatterns.base64url, check2.message, refs);
          break;
        case "jwt":
          addPattern(res, zodPatterns.jwt, check2.message, refs);
          break;
        case "cidr": {
          if (check2.version !== "v6") {
            addPattern(res, zodPatterns.ipv4Cidr, check2.message, refs);
          }
          if (check2.version !== "v4") {
            addPattern(res, zodPatterns.ipv6Cidr, check2.message, refs);
          }
          break;
        }
        case "emoji":
          addPattern(res, zodPatterns.emoji(), check2.message, refs);
          break;
        case "ulid": {
          addPattern(res, zodPatterns.ulid, check2.message, refs);
          break;
        }
        case "base64": {
          switch (refs.base64Strategy) {
            case "format:binary": {
              addFormat(res, "binary", check2.message, refs);
              break;
            }
            case "contentEncoding:base64": {
              setResponseValueAndErrors(res, "contentEncoding", "base64", check2.message, refs);
              break;
            }
            case "pattern:zod": {
              addPattern(res, zodPatterns.base64, check2.message, refs);
              break;
            }
          }
          break;
        }
        case "nanoid": {
          addPattern(res, zodPatterns.nanoid, check2.message, refs);
        }
        case "toLowerCase":
        case "toUpperCase":
        case "trim":
          break;
        default:
          /* @__PURE__ */ ((_) => {
          })(check2);
      }
    }
  }
  return res;
}
function escapeLiteralCheckValue(literal2, refs) {
  return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal2) : literal2;
}
var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
function escapeNonAlphaNumeric(source) {
  let result = "";
  for (let i = 0; i < source.length; i++) {
    if (!ALPHA_NUMERIC.has(source[i])) {
      result += "\\";
    }
    result += source[i];
  }
  return result;
}
function addFormat(schema, value, message, refs) {
  if (schema.format || schema.anyOf?.some((x) => x.format)) {
    if (!schema.anyOf) {
      schema.anyOf = [];
    }
    if (schema.format) {
      schema.anyOf.push({
        format: schema.format,
        ...schema.errorMessage && refs.errorMessages && {
          errorMessage: { format: schema.errorMessage.format }
        }
      });
      delete schema.format;
      if (schema.errorMessage) {
        delete schema.errorMessage.format;
        if (Object.keys(schema.errorMessage).length === 0) {
          delete schema.errorMessage;
        }
      }
    }
    schema.anyOf.push({
      format: value,
      ...message && refs.errorMessages && { errorMessage: { format: message } }
    });
  } else {
    setResponseValueAndErrors(schema, "format", value, message, refs);
  }
}
function addPattern(schema, regex, message, refs) {
  if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
    if (!schema.allOf) {
      schema.allOf = [];
    }
    if (schema.pattern) {
      schema.allOf.push({
        pattern: schema.pattern,
        ...schema.errorMessage && refs.errorMessages && {
          errorMessage: { pattern: schema.errorMessage.pattern }
        }
      });
      delete schema.pattern;
      if (schema.errorMessage) {
        delete schema.errorMessage.pattern;
        if (Object.keys(schema.errorMessage).length === 0) {
          delete schema.errorMessage;
        }
      }
    }
    schema.allOf.push({
      pattern: stringifyRegExpWithFlags(regex, refs),
      ...message && refs.errorMessages && { errorMessage: { pattern: message } }
    });
  } else {
    setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs);
  }
}
function stringifyRegExpWithFlags(regex, refs) {
  if (!refs.applyRegexFlags || !regex.flags) {
    return regex.source;
  }
  const flags = {
    i: regex.flags.includes("i"),
    m: regex.flags.includes("m"),
    s: regex.flags.includes("s")
    // `.` matches newlines
  };
  const source = flags.i ? regex.source.toLowerCase() : regex.source;
  let pattern = "";
  let isEscaped = false;
  let inCharGroup = false;
  let inCharRange = false;
  for (let i = 0; i < source.length; i++) {
    if (isEscaped) {
      pattern += source[i];
      isEscaped = false;
      continue;
    }
    if (flags.i) {
      if (inCharGroup) {
        if (source[i].match(/[a-z]/)) {
          if (inCharRange) {
            pattern += source[i];
            pattern += `${source[i - 2]}-${source[i]}`.toUpperCase();
            inCharRange = false;
          } else if (source[i + 1] === "-" && source[i + 2]?.match(/[a-z]/)) {
            pattern += source[i];
            inCharRange = true;
          } else {
            pattern += `${source[i]}${source[i].toUpperCase()}`;
          }
          continue;
        }
      } else if (source[i].match(/[a-z]/)) {
        pattern += `[${source[i]}${source[i].toUpperCase()}]`;
        continue;
      }
    }
    if (flags.m) {
      if (source[i] === "^") {
        pattern += `(^|(?<=[\r
]))`;
        continue;
      } else if (source[i] === "$") {
        pattern += `($|(?=[\r
]))`;
        continue;
      }
    }
    if (flags.s && source[i] === ".") {
      pattern += inCharGroup ? `${source[i]}\r
` : `[${source[i]}\r
]`;
      continue;
    }
    pattern += source[i];
    if (source[i] === "\\") {
      isEscaped = true;
    } else if (inCharGroup && source[i] === "]") {
      inCharGroup = false;
    } else if (!inCharGroup && source[i] === "[") {
      inCharGroup = true;
    }
  }
  try {
    new RegExp(pattern);
  } catch {
    console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`);
    return regex.source;
  }
  return pattern;
}

// node_modules/zod-to-json-schema/dist/esm/parsers/record.js
function parseRecordDef(def, refs) {
  if (refs.target === "openAi") {
    console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
  }
  if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) {
    return {
      type: "object",
      required: def.keyType._def.values,
      properties: def.keyType._def.values.reduce((acc, key) => ({
        ...acc,
        [key]: parseDef(def.valueType._def, {
          ...refs,
          currentPath: [...refs.currentPath, "properties", key]
        }) ?? parseAnyDef(refs)
      }), {}),
      additionalProperties: refs.rejectedAdditionalProperties
    };
  }
  const schema = {
    type: "object",
    additionalProperties: parseDef(def.valueType._def, {
      ...refs,
      currentPath: [...refs.currentPath, "additionalProperties"]
    }) ?? refs.allowedAdditionalProperties
  };
  if (refs.target === "openApi3") {
    return schema;
  }
  if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
    const { type, ...keyType } = parseStringDef(def.keyType._def, refs);
    return {
      ...schema,
      propertyNames: keyType
    };
  } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) {
    return {
      ...schema,
      propertyNames: {
        enum: def.keyType._def.values
      }
    };
  } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) {
    const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs);
    return {
      ...schema,
      propertyNames: keyType
    };
  }
  return schema;
}

// node_modules/zod-to-json-schema/dist/esm/parsers/map.js
function parseMapDef(def, refs) {
  if (refs.mapStrategy === "record") {
    return parseRecordDef(def, refs);
  }
  const keys = parseDef(def.keyType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "items", "items", "0"]
  }) || parseAnyDef(refs);
  const values = parseDef(def.valueType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "items", "items", "1"]
  }) || parseAnyDef(refs);
  return {
    type: "array",
    maxItems: 125,
    items: {
      type: "array",
      items: [keys, values],
      minItems: 2,
      maxItems: 2
    }
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
function parseNativeEnumDef(def) {
  const object3 = def.values;
  const actualKeys = Object.keys(def.values).filter((key) => {
    return typeof object3[object3[key]] !== "number";
  });
  const actualValues = actualKeys.map((key) => object3[key]);
  const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));
  return {
    type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"],
    enum: actualValues
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/never.js
function parseNeverDef(refs) {
  return refs.target === "openAi" ? void 0 : {
    not: parseAnyDef({
      ...refs,
      currentPath: [...refs.currentPath, "not"]
    })
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/null.js
function parseNullDef(refs) {
  return refs.target === "openApi3" ? {
    enum: ["null"],
    nullable: true
  } : {
    type: "null"
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/union.js
var primitiveMappings = {
  ZodString: "string",
  ZodNumber: "number",
  ZodBigInt: "integer",
  ZodBoolean: "boolean",
  ZodNull: "null"
};
function parseUnionDef(def, refs) {
  if (refs.target === "openApi3")
    return asAnyOf(def, refs);
  const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
  if (options.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) {
    const types = options.reduce((types2, x) => {
      const type = primitiveMappings[x._def.typeName];
      return type && !types2.includes(type) ? [...types2, type] : types2;
    }, []);
    return {
      type: types.length > 1 ? types : types[0]
    };
  } else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
    const types = options.reduce((acc, x) => {
      const type = typeof x._def.value;
      switch (type) {
        case "string":
        case "number":
        case "boolean":
          return [...acc, type];
        case "bigint":
          return [...acc, "integer"];
        case "object":
          if (x._def.value === null)
            return [...acc, "null"];
        case "symbol":
        case "undefined":
        case "function":
        default:
          return acc;
      }
    }, []);
    if (types.length === options.length) {
      const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);
      return {
        type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
        enum: options.reduce((acc, x) => {
          return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
        }, [])
      };
    }
  } else if (options.every((x) => x._def.typeName === "ZodEnum")) {
    return {
      type: "string",
      enum: options.reduce((acc, x) => [
        ...acc,
        ...x._def.values.filter((x2) => !acc.includes(x2))
      ], [])
    };
  }
  return asAnyOf(def, refs);
}
var asAnyOf = (def, refs) => {
  const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, {
    ...refs,
    currentPath: [...refs.currentPath, "anyOf", `${i}`]
  })).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
  return anyOf.length ? { anyOf } : void 0;
};

// node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
function parseNullableDef(def, refs) {
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
    if (refs.target === "openApi3") {
      return {
        type: primitiveMappings[def.innerType._def.typeName],
        nullable: true
      };
    }
    return {
      type: [
        primitiveMappings[def.innerType._def.typeName],
        "null"
      ]
    };
  }
  if (refs.target === "openApi3") {
    const base2 = parseDef(def.innerType._def, {
      ...refs,
      currentPath: [...refs.currentPath]
    });
    if (base2 && "$ref" in base2)
      return { allOf: [base2], nullable: true };
    return base2 && { ...base2, nullable: true };
  }
  const base = parseDef(def.innerType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "anyOf", "0"]
  });
  return base && { anyOf: [base, { type: "null" }] };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/number.js
function parseNumberDef(def, refs) {
  const res = {
    type: "number"
  };
  if (!def.checks)
    return res;
  for (const check2 of def.checks) {
    switch (check2.kind) {
      case "int":
        res.type = "integer";
        addErrorMessage(res, "type", check2.message, refs);
        break;
      case "min":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMinimum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMinimum = true;
          }
          setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
        }
        break;
      case "max":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMaximum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMaximum = true;
          }
          setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
        }
        break;
      case "multipleOf":
        setResponseValueAndErrors(res, "multipleOf", check2.value, check2.message, refs);
        break;
    }
  }
  return res;
}

// node_modules/zod-to-json-schema/dist/esm/parsers/object.js
function parseObjectDef(def, refs) {
  const forceOptionalIntoNullable = refs.target === "openAi";
  const result = {
    type: "object",
    properties: {}
  };
  const required2 = [];
  const shape = def.shape();
  for (const propName in shape) {
    let propDef = shape[propName];
    if (propDef === void 0 || propDef._def === void 0) {
      continue;
    }
    let propOptional = safeIsOptional(propDef);
    if (propOptional && forceOptionalIntoNullable) {
      if (propDef._def.typeName === "ZodOptional") {
        propDef = propDef._def.innerType;
      }
      if (!propDef.isNullable()) {
        propDef = propDef.nullable();
      }
      propOptional = false;
    }
    const parsedDef = parseDef(propDef._def, {
      ...refs,
      currentPath: [...refs.currentPath, "properties", propName],
      propertyPath: [...refs.currentPath, "properties", propName]
    });
    if (parsedDef === void 0) {
      continue;
    }
    result.properties[propName] = parsedDef;
    if (!propOptional) {
      required2.push(propName);
    }
  }
  if (required2.length) {
    result.required = required2;
  }
  const additionalProperties = decideAdditionalProperties(def, refs);
  if (additionalProperties !== void 0) {
    result.additionalProperties = additionalProperties;
  }
  return result;
}
function decideAdditionalProperties(def, refs) {
  if (def.catchall._def.typeName !== "ZodNever") {
    return parseDef(def.catchall._def, {
      ...refs,
      currentPath: [...refs.currentPath, "additionalProperties"]
    });
  }
  switch (def.unknownKeys) {
    case "passthrough":
      return refs.allowedAdditionalProperties;
    case "strict":
      return refs.rejectedAdditionalProperties;
    case "strip":
      return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;
  }
}
function safeIsOptional(schema) {
  try {
    return schema.isOptional();
  } catch {
    return true;
  }
}

// node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
var parseOptionalDef = (def, refs) => {
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
    return parseDef(def.innerType._def, refs);
  }
  const innerSchema = parseDef(def.innerType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "anyOf", "1"]
  });
  return innerSchema ? {
    anyOf: [
      {
        not: parseAnyDef(refs)
      },
      innerSchema
    ]
  } : parseAnyDef(refs);
};

// node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
var parsePipelineDef = (def, refs) => {
  if (refs.pipeStrategy === "input") {
    return parseDef(def.in._def, refs);
  } else if (refs.pipeStrategy === "output") {
    return parseDef(def.out._def, refs);
  }
  const a = parseDef(def.in._def, {
    ...refs,
    currentPath: [...refs.currentPath, "allOf", "0"]
  });
  const b = parseDef(def.out._def, {
    ...refs,
    currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"]
  });
  return {
    allOf: [a, b].filter((x) => x !== void 0)
  };
};

// node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
function parsePromiseDef(def, refs) {
  return parseDef(def.type._def, refs);
}

// node_modules/zod-to-json-schema/dist/esm/parsers/set.js
function parseSetDef(def, refs) {
  const items = parseDef(def.valueType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "items"]
  });
  const schema = {
    type: "array",
    uniqueItems: true,
    items
  };
  if (def.minSize) {
    setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs);
  }
  if (def.maxSize) {
    setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
  }
  return schema;
}

// node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
function parseTupleDef(def, refs) {
  if (def.rest) {
    return {
      type: "array",
      minItems: def.items.length,
      items: def.items.map((x, i) => parseDef(x._def, {
        ...refs,
        currentPath: [...refs.currentPath, "items", `${i}`]
      })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),
      additionalItems: parseDef(def.rest._def, {
        ...refs,
        currentPath: [...refs.currentPath, "additionalItems"]
      })
    };
  } else {
    return {
      type: "array",
      minItems: def.items.length,
      maxItems: def.items.length,
      items: def.items.map((x, i) => parseDef(x._def, {
        ...refs,
        currentPath: [...refs.currentPath, "items", `${i}`]
      })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
    };
  }
}

// node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
function parseUndefinedDef(refs) {
  return {
    not: parseAnyDef(refs)
  };
}

// node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
function parseUnknownDef(refs) {
  return parseAnyDef(refs);
}

// node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
var parseReadonlyDef = (def, refs) => {
  return parseDef(def.innerType._def, refs);
};

// node_modules/zod-to-json-schema/dist/esm/selectParser.js
var selectParser = (def, typeName, refs) => {
  switch (typeName) {
    case ZodFirstPartyTypeKind.ZodString:
      return parseStringDef(def, refs);
    case ZodFirstPartyTypeKind.ZodNumber:
      return parseNumberDef(def, refs);
    case ZodFirstPartyTypeKind.ZodObject:
      return parseObjectDef(def, refs);
    case ZodFirstPartyTypeKind.ZodBigInt:
      return parseBigintDef(def, refs);
    case ZodFirstPartyTypeKind.ZodBoolean:
      return parseBooleanDef();
    case ZodFirstPartyTypeKind.ZodDate:
      return parseDateDef(def, refs);
    case ZodFirstPartyTypeKind.ZodUndefined:
      return parseUndefinedDef(refs);
    case ZodFirstPartyTypeKind.ZodNull:
      return parseNullDef(refs);
    case ZodFirstPartyTypeKind.ZodArray:
      return parseArrayDef(def, refs);
    case ZodFirstPartyTypeKind.ZodUnion:
    case ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
      return parseUnionDef(def, refs);
    case ZodFirstPartyTypeKind.ZodIntersection:
      return parseIntersectionDef(def, refs);
    case ZodFirstPartyTypeKind.ZodTuple:
      return parseTupleDef(def, refs);
    case ZodFirstPartyTypeKind.ZodRecord:
      return parseRecordDef(def, refs);
    case ZodFirstPartyTypeKind.ZodLiteral:
      return parseLiteralDef(def, refs);
    case ZodFirstPartyTypeKind.ZodEnum:
      return parseEnumDef(def);
    case ZodFirstPartyTypeKind.ZodNativeEnum:
      return parseNativeEnumDef(def);
    case ZodFirstPartyTypeKind.ZodNullable:
      return parseNullableDef(def, refs);
    case ZodFirstPartyTypeKind.ZodOptional:
      return parseOptionalDef(def, refs);
    case ZodFirstPartyTypeKind.ZodMap:
      return parseMapDef(def, refs);
    case ZodFirstPartyTypeKind.ZodSet:
      return parseSetDef(def, refs);
    case ZodFirstPartyTypeKind.ZodLazy:
      return () => def.getter()._def;
    case ZodFirstPartyTypeKind.ZodPromise:
      return parsePromiseDef(def, refs);
    case ZodFirstPartyTypeKind.ZodNaN:
    case ZodFirstPartyTypeKind.ZodNever:
      return parseNeverDef(refs);
    case ZodFirstPartyTypeKind.ZodEffects:
      return parseEffectsDef(def, refs);
    case ZodFirstPartyTypeKind.ZodAny:
      return parseAnyDef(refs);
    case ZodFirstPartyTypeKind.ZodUnknown:
      return parseUnknownDef(refs);
    case ZodFirstPartyTypeKind.ZodDefault:
      return parseDefaultDef(def, refs);
    case ZodFirstPartyTypeKind.ZodBranded:
      return parseBrandedDef(def, refs);
    case ZodFirstPartyTypeKind.ZodReadonly:
      return parseReadonlyDef(def, refs);
    case ZodFirstPartyTypeKind.ZodCatch:
      return parseCatchDef(def, refs);
    case ZodFirstPartyTypeKind.ZodPipeline:
      return parsePipelineDef(def, refs);
    case ZodFirstPartyTypeKind.ZodFunction:
    case ZodFirstPartyTypeKind.ZodVoid:
    case ZodFirstPartyTypeKind.ZodSymbol:
      return void 0;
    default:
      return /* @__PURE__ */ ((_) => void 0)(typeName);
  }
};

// node_modules/zod-to-json-schema/dist/esm/parseDef.js
function parseDef(def, refs, forceResolution = false) {
  const seenItem = refs.seen.get(def);
  if (refs.override) {
    const overrideResult = refs.override?.(def, refs, seenItem, forceResolution);
    if (overrideResult !== ignoreOverride) {
      return overrideResult;
    }
  }
  if (seenItem && !forceResolution) {
    const seenSchema = get$ref(seenItem, refs);
    if (seenSchema !== void 0) {
      return seenSchema;
    }
  }
  const newItem = { def, path: refs.currentPath, jsonSchema: void 0 };
  refs.seen.set(def, newItem);
  const jsonSchemaOrGetter = selectParser(def, def.typeName, refs);
  const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;
  if (jsonSchema) {
    addMeta(def, refs, jsonSchema);
  }
  if (refs.postProcess) {
    const postProcessResult = refs.postProcess(jsonSchema, def, refs);
    newItem.jsonSchema = jsonSchema;
    return postProcessResult;
  }
  newItem.jsonSchema = jsonSchema;
  return jsonSchema;
}
var get$ref = (item, refs) => {
  switch (refs.$refStrategy) {
    case "root":
      return { $ref: item.path.join("/") };
    case "relative":
      return { $ref: getRelativePath(refs.currentPath, item.path) };
    case "none":
    case "seen": {
      if (item.path.length < refs.currentPath.length && item.path.every((value, index2) => refs.currentPath[index2] === value)) {
        console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
        return parseAnyDef(refs);
      }
      return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0;
    }
  }
};
var addMeta = (def, refs, jsonSchema) => {
  if (def.description) {
    jsonSchema.description = def.description;
    if (refs.markdownDescription) {
      jsonSchema.markdownDescription = def.description;
    }
  }
  return jsonSchema;
};

// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
var zodToJsonSchema = (schema, options) => {
  const refs = getRefs(options);
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
    ...acc,
    [name2]: parseDef(schema2._def, {
      ...refs,
      currentPath: [...refs.basePath, refs.definitionPath, name2]
    }, true) ?? parseAnyDef(refs)
  }), {}) : void 0;
  const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name;
  const main2 = parseDef(schema._def, name === void 0 ? refs : {
    ...refs,
    currentPath: [...refs.basePath, refs.definitionPath, name]
  }, false) ?? parseAnyDef(refs);
  const title = typeof options === "object" && options.name !== void 0 && options.nameStrategy === "title" ? options.name : void 0;
  if (title !== void 0) {
    main2.title = title;
  }
  if (refs.flags.hasReferencedOpenAiAnyType) {
    if (!definitions) {
      definitions = {};
    }
    if (!definitions[refs.openAiAnyTypeName]) {
      definitions[refs.openAiAnyTypeName] = {
        // Skipping "object" as no properties can be defined and additionalProperties must be "false"
        type: ["string", "number", "integer", "boolean", "array", "null"],
        items: {
          $ref: refs.$refStrategy === "relative" ? "1" : [
            ...refs.basePath,
            refs.definitionPath,
            refs.openAiAnyTypeName
          ].join("/")
        }
      };
    }
  }
  const combined = name === void 0 ? definitions ? {
    ...main2,
    [refs.definitionPath]: definitions
  } : main2 : {
    $ref: [
      ...refs.$refStrategy === "relative" ? [] : refs.basePath,
      refs.definitionPath,
      name
    ].join("/"),
    [refs.definitionPath]: {
      ...definitions,
      [name]: main2
    }
  };
  if (refs.target === "jsonSchema7") {
    combined.$schema = "http://json-schema.org/draft-07/schema#";
  } else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") {
    combined.$schema = "https://json-schema.org/draft/2019-09/schema#";
  }
  if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) {
    console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
  }
  return combined;
};

// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
function mapMiniTarget(t) {
  if (!t)
    return "draft-7";
  if (t === "jsonSchema7" || t === "draft-7")
    return "draft-7";
  if (t === "jsonSchema2019-09" || t === "draft-2020-12")
    return "draft-2020-12";
  return "draft-7";
}
function toJsonSchemaCompat(schema, opts) {
  if (isZ4Schema(schema)) {
    return toJSONSchema(schema, {
      target: mapMiniTarget(opts?.target),
      io: opts?.pipeStrategy ?? "input"
    });
  }
  return zodToJsonSchema(schema, {
    strictUnions: opts?.strictUnions ?? true,
    pipeStrategy: opts?.pipeStrategy ?? "input"
  });
}
function getMethodLiteral(schema) {
  const shape = getObjectShape(schema);
  const methodSchema = shape?.method;
  if (!methodSchema) {
    throw new Error("Schema is missing a method literal");
  }
  const value = getLiteralValue(methodSchema);
  if (typeof value !== "string") {
    throw new Error("Schema method literal must be a string");
  }
  return value;
}
function parseWithCompat(schema, data) {
  const result = safeParse2(schema, data);
  if (!result.success) {
    throw result.error;
  }
  return result.data;
}

// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
var Protocol = class {
  constructor(_options) {
    this._options = _options;
    this._requestMessageId = 0;
    this._requestHandlers = /* @__PURE__ */ new Map();
    this._requestHandlerAbortControllers = /* @__PURE__ */ new Map();
    this._notificationHandlers = /* @__PURE__ */ new Map();
    this._responseHandlers = /* @__PURE__ */ new Map();
    this._progressHandlers = /* @__PURE__ */ new Map();
    this._timeoutInfo = /* @__PURE__ */ new Map();
    this._pendingDebouncedNotifications = /* @__PURE__ */ new Set();
    this._taskProgressTokens = /* @__PURE__ */ new Map();
    this._requestResolvers = /* @__PURE__ */ new Map();
    this.setNotificationHandler(CancelledNotificationSchema, (notification) => {
      this._oncancel(notification);
    });
    this.setNotificationHandler(ProgressNotificationSchema, (notification) => {
      this._onprogress(notification);
    });
    this.setRequestHandler(
      PingRequestSchema,
      // Automatic pong by default.
      (_request) => ({})
    );
    this._taskStore = _options?.taskStore;
    this._taskMessageQueue = _options?.taskMessageQueue;
    if (this._taskStore) {
      this.setRequestHandler(GetTaskRequestSchema, async (request, extra) => {
        const task = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
        if (!task) {
          throw new McpError(ErrorCode.InvalidParams, "Failed to retrieve task: Task not found");
        }
        return {
          ...task
        };
      });
      this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => {
        const handleTaskResult = async () => {
          const taskId = request.params.taskId;
          if (this._taskMessageQueue) {
            let queuedMessage;
            while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
              if (queuedMessage.type === "response" || queuedMessage.type === "error") {
                const message = queuedMessage.message;
                const requestId = message.id;
                const resolver = this._requestResolvers.get(requestId);
                if (resolver) {
                  this._requestResolvers.delete(requestId);
                  if (queuedMessage.type === "response") {
                    resolver(message);
                  } else {
                    const errorMessage = message;
                    const error51 = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data);
                    resolver(error51);
                  }
                } else {
                  const messageType = queuedMessage.type === "response" ? "Response" : "Error";
                  this._onerror(new Error(`${messageType} handler missing for request ${requestId}`));
                }
                continue;
              }
              await this._transport?.send(queuedMessage.message, { relatedRequestId: extra.requestId });
            }
          }
          const task = await this._taskStore.getTask(taskId, extra.sessionId);
          if (!task) {
            throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
          }
          if (!isTerminal(task.status)) {
            await this._waitForTaskUpdate(taskId, extra.signal);
            return await handleTaskResult();
          }
          if (isTerminal(task.status)) {
            const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
            this._clearTaskQueue(taskId);
            return {
              ...result,
              _meta: {
                ...result._meta,
                [RELATED_TASK_META_KEY]: {
                  taskId
                }
              }
            };
          }
          return await handleTaskResult();
        };
        return await handleTaskResult();
      });
      this.setRequestHandler(ListTasksRequestSchema, async (request, extra) => {
        try {
          const { tasks, nextCursor } = await this._taskStore.listTasks(request.params?.cursor, extra.sessionId);
          return {
            tasks,
            nextCursor,
            _meta: {}
          };
        } catch (error51) {
          throw new McpError(ErrorCode.InvalidParams, `Failed to list tasks: ${error51 instanceof Error ? error51.message : String(error51)}`);
        }
      });
      this.setRequestHandler(CancelTaskRequestSchema, async (request, extra) => {
        try {
          const task = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
          if (!task) {
            throw new McpError(ErrorCode.InvalidParams, `Task not found: ${request.params.taskId}`);
          }
          if (isTerminal(task.status)) {
            throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
          }
          await this._taskStore.updateTaskStatus(request.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
          this._clearTaskQueue(request.params.taskId);
          const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
          if (!cancelledTask) {
            throw new McpError(ErrorCode.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`);
          }
          return {
            _meta: {},
            ...cancelledTask
          };
        } catch (error51) {
          if (error51 instanceof McpError) {
            throw error51;
          }
          throw new McpError(ErrorCode.InvalidRequest, `Failed to cancel task: ${error51 instanceof Error ? error51.message : String(error51)}`);
        }
      });
    }
  }
  async _oncancel(notification) {
    if (!notification.params.requestId) {
      return;
    }
    const controller = this._requestHandlerAbortControllers.get(notification.params.requestId);
    controller?.abort(notification.params.reason);
  }
  _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {
    this._timeoutInfo.set(messageId, {
      timeoutId: setTimeout(onTimeout, timeout),
      startTime: Date.now(),
      timeout,
      maxTotalTimeout,
      resetTimeoutOnProgress,
      onTimeout
    });
  }
  _resetTimeout(messageId) {
    const info = this._timeoutInfo.get(messageId);
    if (!info)
      return false;
    const totalElapsed = Date.now() - info.startTime;
    if (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {
      this._timeoutInfo.delete(messageId);
      throw McpError.fromError(ErrorCode.RequestTimeout, "Maximum total timeout exceeded", {
        maxTotalTimeout: info.maxTotalTimeout,
        totalElapsed
      });
    }
    clearTimeout(info.timeoutId);
    info.timeoutId = setTimeout(info.onTimeout, info.timeout);
    return true;
  }
  _cleanupTimeout(messageId) {
    const info = this._timeoutInfo.get(messageId);
    if (info) {
      clearTimeout(info.timeoutId);
      this._timeoutInfo.delete(messageId);
    }
  }
  /**
   * Attaches to the given transport, starts it, and starts listening for messages.
   *
   * The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
   */
  async connect(transport) {
    if (this._transport) {
      throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
    }
    this._transport = transport;
    const _onclose = this.transport?.onclose;
    this._transport.onclose = () => {
      _onclose?.();
      this._onclose();
    };
    const _onerror = this.transport?.onerror;
    this._transport.onerror = (error51) => {
      _onerror?.(error51);
      this._onerror(error51);
    };
    const _onmessage = this._transport?.onmessage;
    this._transport.onmessage = (message, extra) => {
      _onmessage?.(message, extra);
      if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
        this._onresponse(message);
      } else if (isJSONRPCRequest(message)) {
        this._onrequest(message, extra);
      } else if (isJSONRPCNotification(message)) {
        this._onnotification(message);
      } else {
        this._onerror(new Error(`Unknown message type: ${JSON.stringify(message)}`));
      }
    };
    await this._transport.start();
  }
  _onclose() {
    const responseHandlers = this._responseHandlers;
    this._responseHandlers = /* @__PURE__ */ new Map();
    this._progressHandlers.clear();
    this._taskProgressTokens.clear();
    this._pendingDebouncedNotifications.clear();
    for (const info of this._timeoutInfo.values()) {
      clearTimeout(info.timeoutId);
    }
    this._timeoutInfo.clear();
    for (const controller of this._requestHandlerAbortControllers.values()) {
      controller.abort();
    }
    this._requestHandlerAbortControllers.clear();
    const error51 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
    this._transport = void 0;
    this.onclose?.();
    for (const handler of responseHandlers.values()) {
      handler(error51);
    }
  }
  _onerror(error51) {
    this.onerror?.(error51);
  }
  _onnotification(notification) {
    const handler = this._notificationHandlers.get(notification.method) ?? this.fallbackNotificationHandler;
    if (handler === void 0) {
      return;
    }
    Promise.resolve().then(() => handler(notification)).catch((error51) => this._onerror(new Error(`Uncaught error in notification handler: ${error51}`)));
  }
  _onrequest(request, extra) {
    const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
    const capturedTransport = this._transport;
    const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
    if (handler === void 0) {
      const errorResponse = {
        jsonrpc: "2.0",
        id: request.id,
        error: {
          code: ErrorCode.MethodNotFound,
          message: "Method not found"
        }
      };
      if (relatedTaskId && this._taskMessageQueue) {
        this._enqueueTaskMessage(relatedTaskId, {
          type: "error",
          message: errorResponse,
          timestamp: Date.now()
        }, capturedTransport?.sessionId).catch((error51) => this._onerror(new Error(`Failed to enqueue error response: ${error51}`)));
      } else {
        capturedTransport?.send(errorResponse).catch((error51) => this._onerror(new Error(`Failed to send an error response: ${error51}`)));
      }
      return;
    }
    const abortController = new AbortController();
    this._requestHandlerAbortControllers.set(request.id, abortController);
    const taskCreationParams = isTaskAugmentedRequestParams(request.params) ? request.params.task : void 0;
    const taskStore = this._taskStore ? this.requestTaskStore(request, capturedTransport?.sessionId) : void 0;
    const fullExtra = {
      signal: abortController.signal,
      sessionId: capturedTransport?.sessionId,
      _meta: request.params?._meta,
      sendNotification: async (notification) => {
        if (abortController.signal.aborted)
          return;
        const notificationOptions = { relatedRequestId: request.id };
        if (relatedTaskId) {
          notificationOptions.relatedTask = { taskId: relatedTaskId };
        }
        await this.notification(notification, notificationOptions);
      },
      sendRequest: async (r, resultSchema, options) => {
        if (abortController.signal.aborted) {
          throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
        }
        const requestOptions = { ...options, relatedRequestId: request.id };
        if (relatedTaskId && !requestOptions.relatedTask) {
          requestOptions.relatedTask = { taskId: relatedTaskId };
        }
        const effectiveTaskId = requestOptions.relatedTask?.taskId ?? relatedTaskId;
        if (effectiveTaskId && taskStore) {
          await taskStore.updateTaskStatus(effectiveTaskId, "input_required");
        }
        return await this.request(r, resultSchema, requestOptions);
      },
      authInfo: extra?.authInfo,
      requestId: request.id,
      requestInfo: extra?.requestInfo,
      taskId: relatedTaskId,
      taskStore,
      taskRequestedTtl: taskCreationParams?.ttl,
      closeSSEStream: extra?.closeSSEStream,
      closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
    };
    Promise.resolve().then(() => {
      if (taskCreationParams) {
        this.assertTaskHandlerCapability(request.method);
      }
    }).then(() => handler(request, fullExtra)).then(async (result) => {
      if (abortController.signal.aborted) {
        return;
      }
      const response = {
        result,
        jsonrpc: "2.0",
        id: request.id
      };
      if (relatedTaskId && this._taskMessageQueue) {
        await this._enqueueTaskMessage(relatedTaskId, {
          type: "response",
          message: response,
          timestamp: Date.now()
        }, capturedTransport?.sessionId);
      } else {
        await capturedTransport?.send(response);
      }
    }, async (error51) => {
      if (abortController.signal.aborted) {
        return;
      }
      const errorResponse = {
        jsonrpc: "2.0",
        id: request.id,
        error: {
          code: Number.isSafeInteger(error51["code"]) ? error51["code"] : ErrorCode.InternalError,
          message: error51.message ?? "Internal error",
          ...error51["data"] !== void 0 && { data: error51["data"] }
        }
      };
      if (relatedTaskId && this._taskMessageQueue) {
        await this._enqueueTaskMessage(relatedTaskId, {
          type: "error",
          message: errorResponse,
          timestamp: Date.now()
        }, capturedTransport?.sessionId);
      } else {
        await capturedTransport?.send(errorResponse);
      }
    }).catch((error51) => this._onerror(new Error(`Failed to send response: ${error51}`))).finally(() => {
      if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
        this._requestHandlerAbortControllers.delete(request.id);
      }
    });
  }
  _onprogress(notification) {
    const { progressToken, ...params } = notification.params;
    const messageId = Number(progressToken);
    const handler = this._progressHandlers.get(messageId);
    if (!handler) {
      this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));
      return;
    }
    const responseHandler = this._responseHandlers.get(messageId);
    const timeoutInfo = this._timeoutInfo.get(messageId);
    if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {
      try {
        this._resetTimeout(messageId);
      } catch (error51) {
        this._responseHandlers.delete(messageId);
        this._progressHandlers.delete(messageId);
        this._cleanupTimeout(messageId);
        responseHandler(error51);
        return;
      }
    }
    handler(params);
  }
  _onresponse(response) {
    const messageId = Number(response.id);
    const resolver = this._requestResolvers.get(messageId);
    if (resolver) {
      this._requestResolvers.delete(messageId);
      if (isJSONRPCResultResponse(response)) {
        resolver(response);
      } else {
        const error51 = new McpError(response.error.code, response.error.message, response.error.data);
        resolver(error51);
      }
      return;
    }
    const handler = this._responseHandlers.get(messageId);
    if (handler === void 0) {
      this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`));
      return;
    }
    this._responseHandlers.delete(messageId);
    this._cleanupTimeout(messageId);
    let isTaskResponse = false;
    if (isJSONRPCResultResponse(response) && response.result && typeof response.result === "object") {
      const result = response.result;
      if (result.task && typeof result.task === "object") {
        const task = result.task;
        if (typeof task.taskId === "string") {
          isTaskResponse = true;
          this._taskProgressTokens.set(task.taskId, messageId);
        }
      }
    }
    if (!isTaskResponse) {
      this._progressHandlers.delete(messageId);
    }
    if (isJSONRPCResultResponse(response)) {
      handler(response);
    } else {
      const error51 = McpError.fromError(response.error.code, response.error.message, response.error.data);
      handler(error51);
    }
  }
  get transport() {
    return this._transport;
  }
  /**
   * Closes the connection.
   */
  async close() {
    await this._transport?.close();
  }
  /**
   * Sends a request and returns an AsyncGenerator that yields response messages.
   * The generator is guaranteed to end with either a 'result' or 'error' message.
   *
   * @example
   * ```typescript
   * const stream = protocol.requestStream(request, resultSchema, options);
   * for await (const message of stream) {
   *   switch (message.type) {
   *     case 'taskCreated':
   *       console.log('Task created:', message.task.taskId);
   *       break;
   *     case 'taskStatus':
   *       console.log('Task status:', message.task.status);
   *       break;
   *     case 'result':
   *       console.log('Final result:', message.result);
   *       break;
   *     case 'error':
   *       console.error('Error:', message.error);
   *       break;
   *   }
   * }
   * ```
   *
   * @experimental Use `client.experimental.tasks.requestStream()` to access this method.
   */
  async *requestStream(request, resultSchema, options) {
    const { task } = options ?? {};
    if (!task) {
      try {
        const result = await this.request(request, resultSchema, options);
        yield { type: "result", result };
      } catch (error51) {
        yield {
          type: "error",
          error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
        };
      }
      return;
    }
    let taskId;
    try {
      const createResult = await this.request(request, CreateTaskResultSchema, options);
      if (createResult.task) {
        taskId = createResult.task.taskId;
        yield { type: "taskCreated", task: createResult.task };
      } else {
        throw new McpError(ErrorCode.InternalError, "Task creation did not return a task");
      }
      while (true) {
        const task2 = await this.getTask({ taskId }, options);
        yield { type: "taskStatus", task: task2 };
        if (isTerminal(task2.status)) {
          if (task2.status === "completed") {
            const result = await this.getTaskResult({ taskId }, resultSchema, options);
            yield { type: "result", result };
          } else if (task2.status === "failed") {
            yield {
              type: "error",
              error: new McpError(ErrorCode.InternalError, `Task ${taskId} failed`)
            };
          } else if (task2.status === "cancelled") {
            yield {
              type: "error",
              error: new McpError(ErrorCode.InternalError, `Task ${taskId} was cancelled`)
            };
          }
          return;
        }
        if (task2.status === "input_required") {
          const result = await this.getTaskResult({ taskId }, resultSchema, options);
          yield { type: "result", result };
          return;
        }
        const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
        await new Promise((resolve) => setTimeout(resolve, pollInterval));
        options?.signal?.throwIfAborted();
      }
    } catch (error51) {
      yield {
        type: "error",
        error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
      };
    }
  }
  /**
   * Sends a request and waits for a response.
   *
   * Do not use this method to emit notifications! Use notification() instead.
   */
  request(request, resultSchema, options) {
    const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
    return new Promise((resolve, reject) => {
      const earlyReject = (error51) => {
        reject(error51);
      };
      if (!this._transport) {
        earlyReject(new Error("Not connected"));
        return;
      }
      if (this._options?.enforceStrictCapabilities === true) {
        try {
          this.assertCapabilityForMethod(request.method);
          if (task) {
            this.assertTaskCapability(request.method);
          }
        } catch (e) {
          earlyReject(e);
          return;
        }
      }
      options?.signal?.throwIfAborted();
      const messageId = this._requestMessageId++;
      const jsonrpcRequest = {
        ...request,
        jsonrpc: "2.0",
        id: messageId
      };
      if (options?.onprogress) {
        this._progressHandlers.set(messageId, options.onprogress);
        jsonrpcRequest.params = {
          ...request.params,
          _meta: {
            ...request.params?._meta || {},
            progressToken: messageId
          }
        };
      }
      if (task) {
        jsonrpcRequest.params = {
          ...jsonrpcRequest.params,
          task
        };
      }
      if (relatedTask) {
        jsonrpcRequest.params = {
          ...jsonrpcRequest.params,
          _meta: {
            ...jsonrpcRequest.params?._meta || {},
            [RELATED_TASK_META_KEY]: relatedTask
          }
        };
      }
      const cancel = (reason) => {
        this._responseHandlers.delete(messageId);
        this._progressHandlers.delete(messageId);
        this._cleanupTimeout(messageId);
        this._transport?.send({
          jsonrpc: "2.0",
          method: "notifications/cancelled",
          params: {
            requestId: messageId,
            reason: String(reason)
          }
        }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error52) => this._onerror(new Error(`Failed to send cancellation: ${error52}`)));
        const error51 = reason instanceof McpError ? reason : new McpError(ErrorCode.RequestTimeout, String(reason));
        reject(error51);
      };
      this._responseHandlers.set(messageId, (response) => {
        if (options?.signal?.aborted) {
          return;
        }
        if (response instanceof Error) {
          return reject(response);
        }
        try {
          const parseResult = safeParse2(resultSchema, response.result);
          if (!parseResult.success) {
            reject(parseResult.error);
          } else {
            resolve(parseResult.data);
          }
        } catch (error51) {
          reject(error51);
        }
      });
      options?.signal?.addEventListener("abort", () => {
        cancel(options?.signal?.reason);
      });
      const timeout = options?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC;
      const timeoutHandler = () => cancel(McpError.fromError(ErrorCode.RequestTimeout, "Request timed out", { timeout }));
      this._setupTimeout(messageId, timeout, options?.maxTotalTimeout, timeoutHandler, options?.resetTimeoutOnProgress ?? false);
      const relatedTaskId = relatedTask?.taskId;
      if (relatedTaskId) {
        const responseResolver = (response) => {
          const handler = this._responseHandlers.get(messageId);
          if (handler) {
            handler(response);
          } else {
            this._onerror(new Error(`Response handler missing for side-channeled request ${messageId}`));
          }
        };
        this._requestResolvers.set(messageId, responseResolver);
        this._enqueueTaskMessage(relatedTaskId, {
          type: "request",
          message: jsonrpcRequest,
          timestamp: Date.now()
        }).catch((error51) => {
          this._cleanupTimeout(messageId);
          reject(error51);
        });
      } else {
        this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error51) => {
          this._cleanupTimeout(messageId);
          reject(error51);
        });
      }
    });
  }
  /**
   * Gets the current status of a task.
   *
   * @experimental Use `client.experimental.tasks.getTask()` to access this method.
   */
  async getTask(params, options) {
    return this.request({ method: "tasks/get", params }, GetTaskResultSchema, options);
  }
  /**
   * Retrieves the result of a completed task.
   *
   * @experimental Use `client.experimental.tasks.getTaskResult()` to access this method.
   */
  async getTaskResult(params, resultSchema, options) {
    return this.request({ method: "tasks/result", params }, resultSchema, options);
  }
  /**
   * Lists tasks, optionally starting from a pagination cursor.
   *
   * @experimental Use `client.experimental.tasks.listTasks()` to access this method.
   */
  async listTasks(params, options) {
    return this.request({ method: "tasks/list", params }, ListTasksResultSchema, options);
  }
  /**
   * Cancels a specific task.
   *
   * @experimental Use `client.experimental.tasks.cancelTask()` to access this method.
   */
  async cancelTask(params, options) {
    return this.request({ method: "tasks/cancel", params }, CancelTaskResultSchema, options);
  }
  /**
   * Emits a notification, which is a one-way message that does not expect a response.
   */
  async notification(notification, options) {
    if (!this._transport) {
      throw new Error("Not connected");
    }
    this.assertNotificationCapability(notification.method);
    const relatedTaskId = options?.relatedTask?.taskId;
    if (relatedTaskId) {
      const jsonrpcNotification2 = {
        ...notification,
        jsonrpc: "2.0",
        params: {
          ...notification.params,
          _meta: {
            ...notification.params?._meta || {},
            [RELATED_TASK_META_KEY]: options.relatedTask
          }
        }
      };
      await this._enqueueTaskMessage(relatedTaskId, {
        type: "notification",
        message: jsonrpcNotification2,
        timestamp: Date.now()
      });
      return;
    }
    const debouncedMethods = this._options?.debouncedNotificationMethods ?? [];
    const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !options?.relatedRequestId && !options?.relatedTask;
    if (canDebounce) {
      if (this._pendingDebouncedNotifications.has(notification.method)) {
        return;
      }
      this._pendingDebouncedNotifications.add(notification.method);
      Promise.resolve().then(() => {
        this._pendingDebouncedNotifications.delete(notification.method);
        if (!this._transport) {
          return;
        }
        let jsonrpcNotification2 = {
          ...notification,
          jsonrpc: "2.0"
        };
        if (options?.relatedTask) {
          jsonrpcNotification2 = {
            ...jsonrpcNotification2,
            params: {
              ...jsonrpcNotification2.params,
              _meta: {
                ...jsonrpcNotification2.params?._meta || {},
                [RELATED_TASK_META_KEY]: options.relatedTask
              }
            }
          };
        }
        this._transport?.send(jsonrpcNotification2, options).catch((error51) => this._onerror(error51));
      });
      return;
    }
    let jsonrpcNotification = {
      ...notification,
      jsonrpc: "2.0"
    };
    if (options?.relatedTask) {
      jsonrpcNotification = {
        ...jsonrpcNotification,
        params: {
          ...jsonrpcNotification.params,
          _meta: {
            ...jsonrpcNotification.params?._meta || {},
            [RELATED_TASK_META_KEY]: options.relatedTask
          }
        }
      };
    }
    await this._transport.send(jsonrpcNotification, options);
  }
  /**
   * Registers a handler to invoke when this protocol object receives a request with the given method.
   *
   * Note that this will replace any previous request handler for the same method.
   */
  setRequestHandler(requestSchema, handler) {
    const method = getMethodLiteral(requestSchema);
    this.assertRequestHandlerCapability(method);
    this._requestHandlers.set(method, (request, extra) => {
      const parsed = parseWithCompat(requestSchema, request);
      return Promise.resolve(handler(parsed, extra));
    });
  }
  /**
   * Removes the request handler for the given method.
   */
  removeRequestHandler(method) {
    this._requestHandlers.delete(method);
  }
  /**
   * Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
   */
  assertCanSetRequestHandler(method) {
    if (this._requestHandlers.has(method)) {
      throw new Error(`A request handler for ${method} already exists, which would be overridden`);
    }
  }
  /**
   * Registers a handler to invoke when this protocol object receives a notification with the given method.
   *
   * Note that this will replace any previous notification handler for the same method.
   */
  setNotificationHandler(notificationSchema, handler) {
    const method = getMethodLiteral(notificationSchema);
    this._notificationHandlers.set(method, (notification) => {
      const parsed = parseWithCompat(notificationSchema, notification);
      return Promise.resolve(handler(parsed));
    });
  }
  /**
   * Removes the notification handler for the given method.
   */
  removeNotificationHandler(method) {
    this._notificationHandlers.delete(method);
  }
  /**
   * Cleans up the progress handler associated with a task.
   * This should be called when a task reaches a terminal status.
   */
  _cleanupTaskProgressHandler(taskId) {
    const progressToken = this._taskProgressTokens.get(taskId);
    if (progressToken !== void 0) {
      this._progressHandlers.delete(progressToken);
      this._taskProgressTokens.delete(taskId);
    }
  }
  /**
   * Enqueues a task-related message for side-channel delivery via tasks/result.
   * @param taskId The task ID to associate the message with
   * @param message The message to enqueue
   * @param sessionId Optional session ID for binding the operation to a specific session
   * @throws Error if taskStore is not configured or if enqueue fails (e.g., queue overflow)
   *
   * Note: If enqueue fails, it's the TaskMessageQueue implementation's responsibility to handle
   * the error appropriately (e.g., by failing the task, logging, etc.). The Protocol layer
   * simply propagates the error.
   */
  async _enqueueTaskMessage(taskId, message, sessionId) {
    if (!this._taskStore || !this._taskMessageQueue) {
      throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
    }
    const maxQueueSize = this._options?.maxTaskQueueSize;
    await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
  }
  /**
   * Clears the message queue for a task and rejects any pending request resolvers.
   * @param taskId The task ID whose queue should be cleared
   * @param sessionId Optional session ID for binding the operation to a specific session
   */
  async _clearTaskQueue(taskId, sessionId) {
    if (this._taskMessageQueue) {
      const messages = await this._taskMessageQueue.dequeueAll(taskId, sessionId);
      for (const message of messages) {
        if (message.type === "request" && isJSONRPCRequest(message.message)) {
          const requestId = message.message.id;
          const resolver = this._requestResolvers.get(requestId);
          if (resolver) {
            resolver(new McpError(ErrorCode.InternalError, "Task cancelled or completed"));
            this._requestResolvers.delete(requestId);
          } else {
            this._onerror(new Error(`Resolver missing for request ${requestId} during task ${taskId} cleanup`));
          }
        }
      }
    }
  }
  /**
   * Waits for a task update (new messages or status change) with abort signal support.
   * Uses polling to check for updates at the task's configured poll interval.
   * @param taskId The task ID to wait for
   * @param signal Abort signal to cancel the wait
   * @returns Promise that resolves when an update occurs or rejects if aborted
   */
  async _waitForTaskUpdate(taskId, signal) {
    let interval = this._options?.defaultTaskPollInterval ?? 1e3;
    try {
      const task = await this._taskStore?.getTask(taskId);
      if (task?.pollInterval) {
        interval = task.pollInterval;
      }
    } catch {
    }
    return new Promise((resolve, reject) => {
      if (signal.aborted) {
        reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
        return;
      }
      const timeoutId = setTimeout(resolve, interval);
      signal.addEventListener("abort", () => {
        clearTimeout(timeoutId);
        reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
      }, { once: true });
    });
  }
  requestTaskStore(request, sessionId) {
    const taskStore = this._taskStore;
    if (!taskStore) {
      throw new Error("No task store configured");
    }
    return {
      createTask: async (taskParams) => {
        if (!request) {
          throw new Error("No request provided");
        }
        return await taskStore.createTask(taskParams, request.id, {
          method: request.method,
          params: request.params
        }, sessionId);
      },
      getTask: async (taskId) => {
        const task = await taskStore.getTask(taskId, sessionId);
        if (!task) {
          throw new McpError(ErrorCode.InvalidParams, "Failed to retrieve task: Task not found");
        }
        return task;
      },
      storeTaskResult: async (taskId, status, result) => {
        await taskStore.storeTaskResult(taskId, status, result, sessionId);
        const task = await taskStore.getTask(taskId, sessionId);
        if (task) {
          const notification = TaskStatusNotificationSchema.parse({
            method: "notifications/tasks/status",
            params: task
          });
          await this.notification(notification);
          if (isTerminal(task.status)) {
            this._cleanupTaskProgressHandler(taskId);
          }
        }
      },
      getTaskResult: (taskId) => {
        return taskStore.getTaskResult(taskId, sessionId);
      },
      updateTaskStatus: async (taskId, status, statusMessage) => {
        const task = await taskStore.getTask(taskId, sessionId);
        if (!task) {
          throw new McpError(ErrorCode.InvalidParams, `Task "${taskId}" not found - it may have been cleaned up`);
        }
        if (isTerminal(task.status)) {
          throw new McpError(ErrorCode.InvalidParams, `Cannot update task "${taskId}" from terminal status "${task.status}" to "${status}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);
        }
        await taskStore.updateTaskStatus(taskId, status, statusMessage, sessionId);
        const updatedTask = await taskStore.getTask(taskId, sessionId);
        if (updatedTask) {
          const notification = TaskStatusNotificationSchema.parse({
            method: "notifications/tasks/status",
            params: updatedTask
          });
          await this.notification(notification);
          if (isTerminal(updatedTask.status)) {
            this._cleanupTaskProgressHandler(taskId);
          }
        }
      },
      listTasks: (cursor) => {
        return taskStore.listTasks(cursor, sessionId);
      }
    };
  }
};
function isPlainObject2(value) {
  return value !== null && typeof value === "object" && !Array.isArray(value);
}
function mergeCapabilities(base, additional) {
  const result = { ...base };
  for (const key in additional) {
    const k = key;
    const addValue = additional[k];
    if (addValue === void 0)
      continue;
    const baseValue = result[k];
    if (isPlainObject2(baseValue) && isPlainObject2(addValue)) {
      result[k] = { ...baseValue, ...addValue };
    } else {
      result[k] = addValue;
    }
  }
  return result;
}

// node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
var import_ajv = __toESM(require_ajv(), 1);
var import_ajv_formats = __toESM(require_dist(), 1);
function createDefaultAjvInstance() {
  const ajv = new import_ajv.default({
    strict: false,
    validateFormats: true,
    validateSchema: false,
    allErrors: true
  });
  const addFormats = import_ajv_formats.default;
  addFormats(ajv);
  return ajv;
}
var AjvJsonSchemaValidator = class {
  /**
   * Create an AJV validator
   *
   * @param ajv - Optional pre-configured AJV instance. If not provided, a default instance will be created.
   *
   * @example
   * ```typescript
   * // Use default configuration (recommended for most cases)
   * import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv';
   * const validator = new AjvJsonSchemaValidator();
   *
   * // Or provide custom AJV instance for advanced configuration
   * import { Ajv } from 'ajv';
   * import addFormats from 'ajv-formats';
   *
   * const ajv = new Ajv({ validateFormats: true });
   * addFormats(ajv);
   * const validator = new AjvJsonSchemaValidator(ajv);
   * ```
   */
  constructor(ajv) {
    this._ajv = ajv ?? createDefaultAjvInstance();
  }
  /**
   * Create a validator for the given JSON Schema
   *
   * The validator is compiled once and can be reused multiple times.
   * If the schema has an $id, it will be cached by AJV automatically.
   *
   * @param schema - Standard JSON Schema object
   * @returns A validator function that validates input data
   */
  getValidator(schema) {
    const ajvValidator = "$id" in schema && typeof schema.$id === "string" ? this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema) : this._ajv.compile(schema);
    return (input) => {
      const valid = ajvValidator(input);
      if (valid) {
        return {
          valid: true,
          data: input,
          errorMessage: void 0
        };
      } else {
        return {
          valid: false,
          data: void 0,
          errorMessage: this._ajv.errorsText(ajvValidator.errors)
        };
      }
    };
  }
};

// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
var ExperimentalServerTasks = class {
  constructor(_server) {
    this._server = _server;
  }
  /**
   * Sends a request and returns an AsyncGenerator that yields response messages.
   * The generator is guaranteed to end with either a 'result' or 'error' message.
   *
   * This method provides streaming access to request processing, allowing you to
   * observe intermediate task status updates for task-augmented requests.
   *
   * @param request - The request to send
   * @param resultSchema - Zod schema for validating the result
   * @param options - Optional request options (timeout, signal, task creation params, etc.)
   * @returns AsyncGenerator that yields ResponseMessage objects
   *
   * @experimental
   */
  requestStream(request, resultSchema, options) {
    return this._server.requestStream(request, resultSchema, options);
  }
  /**
   * Sends a sampling request and returns an AsyncGenerator that yields response messages.
   * The generator is guaranteed to end with either a 'result' or 'error' message.
   *
   * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
   * before the final result.
   *
   * @example
   * ```typescript
   * const stream = server.experimental.tasks.createMessageStream({
   *     messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
   *     maxTokens: 100
   * }, {
   *     onprogress: (progress) => {
   *         // Handle streaming tokens via progress notifications
   *         console.log('Progress:', progress.message);
   *     }
   * });
   *
   * for await (const message of stream) {
   *     switch (message.type) {
   *         case 'taskCreated':
   *             console.log('Task created:', message.task.taskId);
   *             break;
   *         case 'taskStatus':
   *             console.log('Task status:', message.task.status);
   *             break;
   *         case 'result':
   *             console.log('Final result:', message.result);
   *             break;
   *         case 'error':
   *             console.error('Error:', message.error);
   *             break;
   *     }
   * }
   * ```
   *
   * @param params - The sampling request parameters
   * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
   * @returns AsyncGenerator that yields ResponseMessage objects
   *
   * @experimental
   */
  createMessageStream(params, options) {
    const clientCapabilities = this._server.getClientCapabilities();
    if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
      throw new Error("Client does not support sampling tools capability.");
    }
    if (params.messages.length > 0) {
      const lastMessage = params.messages[params.messages.length - 1];
      const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
      const hasToolResults = lastContent.some((c) => c.type === "tool_result");
      const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
      const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
      const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
      if (hasToolResults) {
        if (lastContent.some((c) => c.type !== "tool_result")) {
          throw new Error("The last message must contain only tool_result content if any is present");
        }
        if (!hasPreviousToolUse) {
          throw new Error("tool_result blocks are not matching any tool_use from the previous message");
        }
      }
      if (hasPreviousToolUse) {
        const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
        const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
        if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) {
          throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
        }
      }
    }
    return this.requestStream({
      method: "sampling/createMessage",
      params
    }, CreateMessageResultSchema, options);
  }
  /**
   * Sends an elicitation request and returns an AsyncGenerator that yields response messages.
   * The generator is guaranteed to end with either a 'result' or 'error' message.
   *
   * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
   * and 'taskStatus' messages before the final result.
   *
   * @example
   * ```typescript
   * const stream = server.experimental.tasks.elicitInputStream({
   *     mode: 'url',
   *     message: 'Please authenticate',
   *     elicitationId: 'auth-123',
   *     url: 'https://example.com/auth'
   * }, {
   *     task: { ttl: 300000 } // Task-augmented for long-running auth flow
   * });
   *
   * for await (const message of stream) {
   *     switch (message.type) {
   *         case 'taskCreated':
   *             console.log('Task created:', message.task.taskId);
   *             break;
   *         case 'taskStatus':
   *             console.log('Task status:', message.task.status);
   *             break;
   *         case 'result':
   *             console.log('User action:', message.result.action);
   *             break;
   *         case 'error':
   *             console.error('Error:', message.error);
   *             break;
   *     }
   * }
   * ```
   *
   * @param params - The elicitation request parameters
   * @param options - Optional request options (timeout, signal, task creation params, etc.)
   * @returns AsyncGenerator that yields ResponseMessage objects
   *
   * @experimental
   */
  elicitInputStream(params, options) {
    const clientCapabilities = this._server.getClientCapabilities();
    const mode = params.mode ?? "form";
    switch (mode) {
      case "url": {
        if (!clientCapabilities?.elicitation?.url) {
          throw new Error("Client does not support url elicitation.");
        }
        break;
      }
      case "form": {
        if (!clientCapabilities?.elicitation?.form) {
          throw new Error("Client does not support form elicitation.");
        }
        break;
      }
    }
    const normalizedParams = mode === "form" && params.mode === void 0 ? { ...params, mode: "form" } : params;
    return this.requestStream({
      method: "elicitation/create",
      params: normalizedParams
    }, ElicitResultSchema, options);
  }
  /**
   * Gets the current status of a task.
   *
   * @param taskId - The task identifier
   * @param options - Optional request options
   * @returns The task status
   *
   * @experimental
   */
  async getTask(taskId, options) {
    return this._server.getTask({ taskId }, options);
  }
  /**
   * Retrieves the result of a completed task.
   *
   * @param taskId - The task identifier
   * @param resultSchema - Zod schema for validating the result
   * @param options - Optional request options
   * @returns The task result
   *
   * @experimental
   */
  async getTaskResult(taskId, resultSchema, options) {
    return this._server.getTaskResult({ taskId }, resultSchema, options);
  }
  /**
   * Lists tasks with optional pagination.
   *
   * @param cursor - Optional pagination cursor
   * @param options - Optional request options
   * @returns List of tasks with optional next cursor
   *
   * @experimental
   */
  async listTasks(cursor, options) {
    return this._server.listTasks(cursor ? { cursor } : void 0, options);
  }
  /**
   * Cancels a running task.
   *
   * @param taskId - The task identifier
   * @param options - Optional request options
   *
   * @experimental
   */
  async cancelTask(taskId, options) {
    return this._server.cancelTask({ taskId }, options);
  }
};

// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
function assertToolsCallTaskCapability(requests, method, entityName) {
  if (!requests) {
    throw new Error(`${entityName} does not support task creation (required for ${method})`);
  }
  switch (method) {
    case "tools/call":
      if (!requests.tools?.call) {
        throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
      }
      break;
    default:
      break;
  }
}
function assertClientRequestTaskCapability(requests, method, entityName) {
  if (!requests) {
    throw new Error(`${entityName} does not support task creation (required for ${method})`);
  }
  switch (method) {
    case "sampling/createMessage":
      if (!requests.sampling?.createMessage) {
        throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
      }
      break;
    case "elicitation/create":
      if (!requests.elicitation?.create) {
        throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
      }
      break;
    default:
      break;
  }
}

// node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
var Server = class extends Protocol {
  /**
   * Initializes this server with the given name and version information.
   */
  constructor(_serverInfo, options) {
    super(options);
    this._serverInfo = _serverInfo;
    this._loggingLevels = /* @__PURE__ */ new Map();
    this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index2) => [level, index2]));
    this.isMessageIgnored = (level, sessionId) => {
      const currentLevel = this._loggingLevels.get(sessionId);
      return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;
    };
    this._capabilities = options?.capabilities ?? {};
    this._instructions = options?.instructions;
    this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();
    this.setRequestHandler(InitializeRequestSchema, (request) => this._oninitialize(request));
    this.setNotificationHandler(InitializedNotificationSchema, () => this.oninitialized?.());
    if (this._capabilities.logging) {
      this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => {
        const transportSessionId = extra.sessionId || extra.requestInfo?.headers["mcp-session-id"] || void 0;
        const { level } = request.params;
        const parseResult = LoggingLevelSchema.safeParse(level);
        if (parseResult.success) {
          this._loggingLevels.set(transportSessionId, parseResult.data);
        }
        return {};
      });
    }
  }
  /**
   * Access experimental features.
   *
   * WARNING: These APIs are experimental and may change without notice.
   *
   * @experimental
   */
  get experimental() {
    if (!this._experimental) {
      this._experimental = {
        tasks: new ExperimentalServerTasks(this)
      };
    }
    return this._experimental;
  }
  /**
   * Registers new capabilities. This can only be called before connecting to a transport.
   *
   * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
   */
  registerCapabilities(capabilities) {
    if (this.transport) {
      throw new Error("Cannot register capabilities after connecting to transport");
    }
    this._capabilities = mergeCapabilities(this._capabilities, capabilities);
  }
  /**
   * Override request handler registration to enforce server-side validation for tools/call.
   */
  setRequestHandler(requestSchema, handler) {
    const shape = getObjectShape(requestSchema);
    const methodSchema = shape?.method;
    if (!methodSchema) {
      throw new Error("Schema is missing a method literal");
    }
    let methodValue;
    if (isZ4Schema(methodSchema)) {
      const v4Schema = methodSchema;
      const v4Def = v4Schema._zod?.def;
      methodValue = v4Def?.value ?? v4Schema.value;
    } else {
      const v3Schema = methodSchema;
      const legacyDef = v3Schema._def;
      methodValue = legacyDef?.value ?? v3Schema.value;
    }
    if (typeof methodValue !== "string") {
      throw new Error("Schema method literal must be a string");
    }
    const method = methodValue;
    if (method === "tools/call") {
      const wrappedHandler = async (request, extra) => {
        const validatedRequest = safeParse2(CallToolRequestSchema, request);
        if (!validatedRequest.success) {
          const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
          throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call request: ${errorMessage}`);
        }
        const { params } = validatedRequest.data;
        const result = await Promise.resolve(handler(request, extra));
        if (params.task) {
          const taskValidationResult = safeParse2(CreateTaskResultSchema, result);
          if (!taskValidationResult.success) {
            const errorMessage = taskValidationResult.error instanceof Error ? taskValidationResult.error.message : String(taskValidationResult.error);
            throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);
          }
          return taskValidationResult.data;
        }
        const validationResult = safeParse2(CallToolResultSchema, result);
        if (!validationResult.success) {
          const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
          throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call result: ${errorMessage}`);
        }
        return validationResult.data;
      };
      return super.setRequestHandler(requestSchema, wrappedHandler);
    }
    return super.setRequestHandler(requestSchema, handler);
  }
  assertCapabilityForMethod(method) {
    switch (method) {
      case "sampling/createMessage":
        if (!this._clientCapabilities?.sampling) {
          throw new Error(`Client does not support sampling (required for ${method})`);
        }
        break;
      case "elicitation/create":
        if (!this._clientCapabilities?.elicitation) {
          throw new Error(`Client does not support elicitation (required for ${method})`);
        }
        break;
      case "roots/list":
        if (!this._clientCapabilities?.roots) {
          throw new Error(`Client does not support listing roots (required for ${method})`);
        }
        break;
      case "ping":
        break;
    }
  }
  assertNotificationCapability(method) {
    switch (method) {
      case "notifications/message":
        if (!this._capabilities.logging) {
          throw new Error(`Server does not support logging (required for ${method})`);
        }
        break;
      case "notifications/resources/updated":
      case "notifications/resources/list_changed":
        if (!this._capabilities.resources) {
          throw new Error(`Server does not support notifying about resources (required for ${method})`);
        }
        break;
      case "notifications/tools/list_changed":
        if (!this._capabilities.tools) {
          throw new Error(`Server does not support notifying of tool list changes (required for ${method})`);
        }
        break;
      case "notifications/prompts/list_changed":
        if (!this._capabilities.prompts) {
          throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
        }
        break;
      case "notifications/elicitation/complete":
        if (!this._clientCapabilities?.elicitation?.url) {
          throw new Error(`Client does not support URL elicitation (required for ${method})`);
        }
        break;
      case "notifications/cancelled":
        break;
      case "notifications/progress":
        break;
    }
  }
  assertRequestHandlerCapability(method) {
    if (!this._capabilities) {
      return;
    }
    switch (method) {
      case "completion/complete":
        if (!this._capabilities.completions) {
          throw new Error(`Server does not support completions (required for ${method})`);
        }
        break;
      case "logging/setLevel":
        if (!this._capabilities.logging) {
          throw new Error(`Server does not support logging (required for ${method})`);
        }
        break;
      case "prompts/get":
      case "prompts/list":
        if (!this._capabilities.prompts) {
          throw new Error(`Server does not support prompts (required for ${method})`);
        }
        break;
      case "resources/list":
      case "resources/templates/list":
      case "resources/read":
        if (!this._capabilities.resources) {
          throw new Error(`Server does not support resources (required for ${method})`);
        }
        break;
      case "tools/call":
      case "tools/list":
        if (!this._capabilities.tools) {
          throw new Error(`Server does not support tools (required for ${method})`);
        }
        break;
      case "tasks/get":
      case "tasks/list":
      case "tasks/result":
      case "tasks/cancel":
        if (!this._capabilities.tasks) {
          throw new Error(`Server does not support tasks capability (required for ${method})`);
        }
        break;
      case "ping":
      case "initialize":
        break;
    }
  }
  assertTaskCapability(method) {
    assertClientRequestTaskCapability(this._clientCapabilities?.tasks?.requests, method, "Client");
  }
  assertTaskHandlerCapability(method) {
    if (!this._capabilities) {
      return;
    }
    assertToolsCallTaskCapability(this._capabilities.tasks?.requests, method, "Server");
  }
  async _oninitialize(request) {
    const requestedVersion = request.params.protocolVersion;
    this._clientCapabilities = request.params.capabilities;
    this._clientVersion = request.params.clientInfo;
    const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion) ? requestedVersion : LATEST_PROTOCOL_VERSION;
    return {
      protocolVersion,
      capabilities: this.getCapabilities(),
      serverInfo: this._serverInfo,
      ...this._instructions && { instructions: this._instructions }
    };
  }
  /**
   * After initialization has completed, this will be populated with the client's reported capabilities.
   */
  getClientCapabilities() {
    return this._clientCapabilities;
  }
  /**
   * After initialization has completed, this will be populated with information about the client's name and version.
   */
  getClientVersion() {
    return this._clientVersion;
  }
  getCapabilities() {
    return this._capabilities;
  }
  async ping() {
    return this.request({ method: "ping" }, EmptyResultSchema);
  }
  // Implementation
  async createMessage(params, options) {
    if (params.tools || params.toolChoice) {
      if (!this._clientCapabilities?.sampling?.tools) {
        throw new Error("Client does not support sampling tools capability.");
      }
    }
    if (params.messages.length > 0) {
      const lastMessage = params.messages[params.messages.length - 1];
      const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
      const hasToolResults = lastContent.some((c) => c.type === "tool_result");
      const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
      const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
      const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
      if (hasToolResults) {
        if (lastContent.some((c) => c.type !== "tool_result")) {
          throw new Error("The last message must contain only tool_result content if any is present");
        }
        if (!hasPreviousToolUse) {
          throw new Error("tool_result blocks are not matching any tool_use from the previous message");
        }
      }
      if (hasPreviousToolUse) {
        const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
        const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
        if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) {
          throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
        }
      }
    }
    if (params.tools) {
      return this.request({ method: "sampling/createMessage", params }, CreateMessageResultWithToolsSchema, options);
    }
    return this.request({ method: "sampling/createMessage", params }, CreateMessageResultSchema, options);
  }
  /**
   * Creates an elicitation request for the given parameters.
   * For backwards compatibility, `mode` may be omitted for form requests and will default to `'form'`.
   * @param params The parameters for the elicitation request.
   * @param options Optional request options.
   * @returns The result of the elicitation request.
   */
  async elicitInput(params, options) {
    const mode = params.mode ?? "form";
    switch (mode) {
      case "url": {
        if (!this._clientCapabilities?.elicitation?.url) {
          throw new Error("Client does not support url elicitation.");
        }
        const urlParams = params;
        return this.request({ method: "elicitation/create", params: urlParams }, ElicitResultSchema, options);
      }
      case "form": {
        if (!this._clientCapabilities?.elicitation?.form) {
          throw new Error("Client does not support form elicitation.");
        }
        const formParams = params.mode === "form" ? params : { ...params, mode: "form" };
        const result = await this.request({ method: "elicitation/create", params: formParams }, ElicitResultSchema, options);
        if (result.action === "accept" && result.content && formParams.requestedSchema) {
          try {
            const validator = this._jsonSchemaValidator.getValidator(formParams.requestedSchema);
            const validationResult = validator(result.content);
            if (!validationResult.valid) {
              throw new McpError(ErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);
            }
          } catch (error51) {
            if (error51 instanceof McpError) {
              throw error51;
            }
            throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error51 instanceof Error ? error51.message : String(error51)}`);
          }
        }
        return result;
      }
    }
  }
  /**
   * Creates a reusable callback that, when invoked, will send a `notifications/elicitation/complete`
   * notification for the specified elicitation ID.
   *
   * @param elicitationId The ID of the elicitation to mark as complete.
   * @param options Optional notification options. Useful when the completion notification should be related to a prior request.
   * @returns A function that emits the completion notification when awaited.
   */
  createElicitationCompletionNotifier(elicitationId, options) {
    if (!this._clientCapabilities?.elicitation?.url) {
      throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");
    }
    return () => this.notification({
      method: "notifications/elicitation/complete",
      params: {
        elicitationId
      }
    }, options);
  }
  async listRoots(params, options) {
    return this.request({ method: "roots/list", params }, ListRootsResultSchema, options);
  }
  /**
   * Sends a logging message to the client, if connected.
   * Note: You only need to send the parameters object, not the entire JSON RPC message
   * @see LoggingMessageNotification
   * @param params
   * @param sessionId optional for stateless and backward compatibility
   */
  async sendLoggingMessage(params, sessionId) {
    if (this._capabilities.logging) {
      if (!this.isMessageIgnored(params.level, sessionId)) {
        return this.notification({ method: "notifications/message", params });
      }
    }
  }
  async sendResourceUpdated(params) {
    return this.notification({
      method: "notifications/resources/updated",
      params
    });
  }
  async sendResourceListChanged() {
    return this.notification({
      method: "notifications/resources/list_changed"
    });
  }
  async sendToolListChanged() {
    return this.notification({ method: "notifications/tools/list_changed" });
  }
  async sendPromptListChanged() {
    return this.notification({ method: "notifications/prompts/list_changed" });
  }
};

// node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
function isCompletable(schema) {
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
}
function getCompleter(schema) {
  const meta3 = schema[COMPLETABLE_SYMBOL];
  return meta3?.complete;
}
var McpZodTypeKind;
(function(McpZodTypeKind2) {
  McpZodTypeKind2["Completable"] = "McpCompletable";
})(McpZodTypeKind || (McpZodTypeKind = {}));

// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
function validateToolName(name) {
  const warnings = [];
  if (name.length === 0) {
    return {
      isValid: false,
      warnings: ["Tool name cannot be empty"]
    };
  }
  if (name.length > 128) {
    return {
      isValid: false,
      warnings: [`Tool name exceeds maximum length of 128 characters (current: ${name.length})`]
    };
  }
  if (name.includes(" ")) {
    warnings.push("Tool name contains spaces, which may cause parsing issues");
  }
  if (name.includes(",")) {
    warnings.push("Tool name contains commas, which may cause parsing issues");
  }
  if (name.startsWith("-") || name.endsWith("-")) {
    warnings.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");
  }
  if (name.startsWith(".") || name.endsWith(".")) {
    warnings.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");
  }
  if (!TOOL_NAME_REGEX.test(name)) {
    const invalidChars = name.split("").filter((char) => !/[A-Za-z0-9._-]/.test(char)).filter((char, index2, arr) => arr.indexOf(char) === index2);
    warnings.push(`Tool name contains invalid characters: ${invalidChars.map((c) => `"${c}"`).join(", ")}`, "Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)");
    return {
      isValid: false,
      warnings
    };
  }
  return {
    isValid: true,
    warnings
  };
}
function issueToolNameWarning(name, warnings) {
  if (warnings.length > 0) {
    console.warn(`Tool name validation warning for "${name}":`);
    for (const warning of warnings) {
      console.warn(`  - ${warning}`);
    }
    console.warn("Tool registration will proceed, but this may cause compatibility issues.");
    console.warn("Consider updating the tool name to conform to the MCP tool naming standard.");
    console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.");
  }
}
function validateAndWarnToolName(name) {
  const result = validateToolName(name);
  issueToolNameWarning(name, result.warnings);
  return result.isValid;
}

// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
var ExperimentalMcpServerTasks = class {
  constructor(_mcpServer) {
    this._mcpServer = _mcpServer;
  }
  registerToolTask(name, config2, handler) {
    const execution = { taskSupport: "required", ...config2.execution };
    if (execution.taskSupport === "forbidden") {
      throw new Error(`Cannot register task-based tool '${name}' with taskSupport 'forbidden'. Use registerTool() instead.`);
    }
    const mcpServerInternal = this._mcpServer;
    return mcpServerInternal._createRegisteredTool(name, config2.title, config2.description, config2.inputSchema, config2.outputSchema, config2.annotations, execution, config2._meta, handler);
  }
};

// node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
var McpServer = class {
  constructor(serverInfo, options) {
    this._registeredResources = {};
    this._registeredResourceTemplates = {};
    this._registeredTools = {};
    this._registeredPrompts = {};
    this._toolHandlersInitialized = false;
    this._completionHandlerInitialized = false;
    this._resourceHandlersInitialized = false;
    this._promptHandlersInitialized = false;
    this.server = new Server(serverInfo, options);
  }
  /**
   * Access experimental features.
   *
   * WARNING: These APIs are experimental and may change without notice.
   *
   * @experimental
   */
  get experimental() {
    if (!this._experimental) {
      this._experimental = {
        tasks: new ExperimentalMcpServerTasks(this)
      };
    }
    return this._experimental;
  }
  /**
   * Attaches to the given transport, starts it, and starts listening for messages.
   *
   * The `server` object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
   */
  async connect(transport) {
    return await this.server.connect(transport);
  }
  /**
   * Closes the connection.
   */
  async close() {
    await this.server.close();
  }
  setToolRequestHandlers() {
    if (this._toolHandlersInitialized) {
      return;
    }
    this.server.assertCanSetRequestHandler(getMethodValue(ListToolsRequestSchema));
    this.server.assertCanSetRequestHandler(getMethodValue(CallToolRequestSchema));
    this.server.registerCapabilities({
      tools: {
        listChanged: true
      }
    });
    this.server.setRequestHandler(ListToolsRequestSchema, () => ({
      tools: Object.entries(this._registeredTools).filter(([, tool]) => tool.enabled).map(([name, tool]) => {
        const toolDefinition = {
          name,
          title: tool.title,
          description: tool.description,
          inputSchema: (() => {
            const obj = normalizeObjectSchema(tool.inputSchema);
            return obj ? toJsonSchemaCompat(obj, {
              strictUnions: true,
              pipeStrategy: "input"
            }) : EMPTY_OBJECT_JSON_SCHEMA;
          })(),
          annotations: tool.annotations,
          execution: tool.execution,
          _meta: tool._meta
        };
        if (tool.outputSchema) {
          const obj = normalizeObjectSchema(tool.outputSchema);
          if (obj) {
            toolDefinition.outputSchema = toJsonSchemaCompat(obj, {
              strictUnions: true,
              pipeStrategy: "output"
            });
          }
        }
        return toolDefinition;
      })
    }));
    this.server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
      try {
        const tool = this._registeredTools[request.params.name];
        if (!tool) {
          throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} not found`);
        }
        if (!tool.enabled) {
          throw new McpError(ErrorCode.InvalidParams, `Tool ${request.params.name} disabled`);
        }
        const isTaskRequest = !!request.params.task;
        const taskSupport = tool.execution?.taskSupport;
        const isTaskHandler = "createTask" in tool.handler;
        if ((taskSupport === "required" || taskSupport === "optional") && !isTaskHandler) {
          throw new McpError(ErrorCode.InternalError, `Tool ${request.params.name} has taskSupport '${taskSupport}' but was not registered with registerToolTask`);
        }
        if (taskSupport === "required" && !isTaskRequest) {
          throw new McpError(ErrorCode.MethodNotFound, `Tool ${request.params.name} requires task augmentation (taskSupport: 'required')`);
        }
        if (taskSupport === "optional" && !isTaskRequest && isTaskHandler) {
          return await this.handleAutomaticTaskPolling(tool, request, extra);
        }
        const args = await this.validateToolInput(tool, request.params.arguments, request.params.name);
        const result = await this.executeToolHandler(tool, args, extra);
        if (isTaskRequest) {
          return result;
        }
        await this.validateToolOutput(tool, result, request.params.name);
        return result;
      } catch (error51) {
        if (error51 instanceof McpError) {
          if (error51.code === ErrorCode.UrlElicitationRequired) {
            throw error51;
          }
        }
        return this.createToolError(error51 instanceof Error ? error51.message : String(error51));
      }
    });
    this._toolHandlersInitialized = true;
  }
  /**
   * Creates a tool error result.
   *
   * @param errorMessage - The error message.
   * @returns The tool error result.
   */
  createToolError(errorMessage) {
    return {
      content: [
        {
          type: "text",
          text: errorMessage
        }
      ],
      isError: true
    };
  }
  /**
   * Validates tool input arguments against the tool's input schema.
   */
  async validateToolInput(tool, args, toolName) {
    if (!tool.inputSchema) {
      return void 0;
    }
    const inputObj = normalizeObjectSchema(tool.inputSchema);
    const schemaToParse = inputObj ?? tool.inputSchema;
    const parseResult = await safeParseAsync2(schemaToParse, args);
    if (!parseResult.success) {
      const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
      const errorMessage = getParseErrorMessage(error51);
      throw new McpError(ErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${errorMessage}`);
    }
    return parseResult.data;
  }
  /**
   * Validates tool output against the tool's output schema.
   */
  async validateToolOutput(tool, result, toolName) {
    if (!tool.outputSchema) {
      return;
    }
    if (!("content" in result)) {
      return;
    }
    if (result.isError) {
      return;
    }
    if (!result.structuredContent) {
      throw new McpError(ErrorCode.InvalidParams, `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`);
    }
    const outputObj = normalizeObjectSchema(tool.outputSchema);
    const parseResult = await safeParseAsync2(outputObj, result.structuredContent);
    if (!parseResult.success) {
      const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
      const errorMessage = getParseErrorMessage(error51);
      throw new McpError(ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`);
    }
  }
  /**
   * Executes a tool handler (either regular or task-based).
   */
  async executeToolHandler(tool, args, extra) {
    const handler = tool.handler;
    const isTaskHandler = "createTask" in handler;
    if (isTaskHandler) {
      if (!extra.taskStore) {
        throw new Error("No task store provided.");
      }
      const taskExtra = { ...extra, taskStore: extra.taskStore };
      if (tool.inputSchema) {
        const typedHandler = handler;
        return await Promise.resolve(typedHandler.createTask(args, taskExtra));
      } else {
        const typedHandler = handler;
        return await Promise.resolve(typedHandler.createTask(taskExtra));
      }
    }
    if (tool.inputSchema) {
      const typedHandler = handler;
      return await Promise.resolve(typedHandler(args, extra));
    } else {
      const typedHandler = handler;
      return await Promise.resolve(typedHandler(extra));
    }
  }
  /**
   * Handles automatic task polling for tools with taskSupport 'optional'.
   */
  async handleAutomaticTaskPolling(tool, request, extra) {
    if (!extra.taskStore) {
      throw new Error("No task store provided for task-capable tool.");
    }
    const args = await this.validateToolInput(tool, request.params.arguments, request.params.name);
    const handler = tool.handler;
    const taskExtra = { ...extra, taskStore: extra.taskStore };
    const createTaskResult = args ? await Promise.resolve(handler.createTask(args, taskExtra)) : (
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      await Promise.resolve(handler.createTask(taskExtra))
    );
    const taskId = createTaskResult.task.taskId;
    let task = createTaskResult.task;
    const pollInterval = task.pollInterval ?? 5e3;
    while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
      await new Promise((resolve) => setTimeout(resolve, pollInterval));
      const updatedTask = await extra.taskStore.getTask(taskId);
      if (!updatedTask) {
        throw new McpError(ErrorCode.InternalError, `Task ${taskId} not found during polling`);
      }
      task = updatedTask;
    }
    return await extra.taskStore.getTaskResult(taskId);
  }
  setCompletionRequestHandler() {
    if (this._completionHandlerInitialized) {
      return;
    }
    this.server.assertCanSetRequestHandler(getMethodValue(CompleteRequestSchema));
    this.server.registerCapabilities({
      completions: {}
    });
    this.server.setRequestHandler(CompleteRequestSchema, async (request) => {
      switch (request.params.ref.type) {
        case "ref/prompt":
          assertCompleteRequestPrompt(request);
          return this.handlePromptCompletion(request, request.params.ref);
        case "ref/resource":
          assertCompleteRequestResourceTemplate(request);
          return this.handleResourceCompletion(request, request.params.ref);
        default:
          throw new McpError(ErrorCode.InvalidParams, `Invalid completion reference: ${request.params.ref}`);
      }
    });
    this._completionHandlerInitialized = true;
  }
  async handlePromptCompletion(request, ref) {
    const prompt = this._registeredPrompts[ref.name];
    if (!prompt) {
      throw new McpError(ErrorCode.InvalidParams, `Prompt ${ref.name} not found`);
    }
    if (!prompt.enabled) {
      throw new McpError(ErrorCode.InvalidParams, `Prompt ${ref.name} disabled`);
    }
    if (!prompt.argsSchema) {
      return EMPTY_COMPLETION_RESULT;
    }
    const promptShape = getObjectShape(prompt.argsSchema);
    const field = promptShape?.[request.params.argument.name];
    if (!isCompletable(field)) {
      return EMPTY_COMPLETION_RESULT;
    }
    const completer = getCompleter(field);
    if (!completer) {
      return EMPTY_COMPLETION_RESULT;
    }
    const suggestions = await completer(request.params.argument.value, request.params.context);
    return createCompletionResult(suggestions);
  }
  async handleResourceCompletion(request, ref) {
    const template = Object.values(this._registeredResourceTemplates).find((t) => t.resourceTemplate.uriTemplate.toString() === ref.uri);
    if (!template) {
      if (this._registeredResources[ref.uri]) {
        return EMPTY_COMPLETION_RESULT;
      }
      throw new McpError(ErrorCode.InvalidParams, `Resource template ${request.params.ref.uri} not found`);
    }
    const completer = template.resourceTemplate.completeCallback(request.params.argument.name);
    if (!completer) {
      return EMPTY_COMPLETION_RESULT;
    }
    const suggestions = await completer(request.params.argument.value, request.params.context);
    return createCompletionResult(suggestions);
  }
  setResourceRequestHandlers() {
    if (this._resourceHandlersInitialized) {
      return;
    }
    this.server.assertCanSetRequestHandler(getMethodValue(ListResourcesRequestSchema));
    this.server.assertCanSetRequestHandler(getMethodValue(ListResourceTemplatesRequestSchema));
    this.server.assertCanSetRequestHandler(getMethodValue(ReadResourceRequestSchema));
    this.server.registerCapabilities({
      resources: {
        listChanged: true
      }
    });
    this.server.setRequestHandler(ListResourcesRequestSchema, async (request, extra) => {
      const resources = Object.entries(this._registeredResources).filter(([_, resource]) => resource.enabled).map(([uri, resource]) => ({
        uri,
        name: resource.name,
        ...resource.metadata
      }));
      const templateResources = [];
      for (const template of Object.values(this._registeredResourceTemplates)) {
        if (!template.resourceTemplate.listCallback) {
          continue;
        }
        const result = await template.resourceTemplate.listCallback(extra);
        for (const resource of result.resources) {
          templateResources.push({
            ...template.metadata,
            // the defined resource metadata should override the template metadata if present
            ...resource
          });
        }
      }
      return { resources: [...resources, ...templateResources] };
    });
    this.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => {
      const resourceTemplates = Object.entries(this._registeredResourceTemplates).map(([name, template]) => ({
        name,
        uriTemplate: template.resourceTemplate.uriTemplate.toString(),
        ...template.metadata
      }));
      return { resourceTemplates };
    });
    this.server.setRequestHandler(ReadResourceRequestSchema, async (request, extra) => {
      const uri = new URL(request.params.uri);
      const resource = this._registeredResources[uri.toString()];
      if (resource) {
        if (!resource.enabled) {
          throw new McpError(ErrorCode.InvalidParams, `Resource ${uri} disabled`);
        }
        return resource.readCallback(uri, extra);
      }
      for (const template of Object.values(this._registeredResourceTemplates)) {
        const variables = template.resourceTemplate.uriTemplate.match(uri.toString());
        if (variables) {
          return template.readCallback(uri, variables, extra);
        }
      }
      throw new McpError(ErrorCode.InvalidParams, `Resource ${uri} not found`);
    });
    this._resourceHandlersInitialized = true;
  }
  setPromptRequestHandlers() {
    if (this._promptHandlersInitialized) {
      return;
    }
    this.server.assertCanSetRequestHandler(getMethodValue(ListPromptsRequestSchema));
    this.server.assertCanSetRequestHandler(getMethodValue(GetPromptRequestSchema));
    this.server.registerCapabilities({
      prompts: {
        listChanged: true
      }
    });
    this.server.setRequestHandler(ListPromptsRequestSchema, () => ({
      prompts: Object.entries(this._registeredPrompts).filter(([, prompt]) => prompt.enabled).map(([name, prompt]) => {
        return {
          name,
          title: prompt.title,
          description: prompt.description,
          arguments: prompt.argsSchema ? promptArgumentsFromSchema(prompt.argsSchema) : void 0
        };
      })
    }));
    this.server.setRequestHandler(GetPromptRequestSchema, async (request, extra) => {
      const prompt = this._registeredPrompts[request.params.name];
      if (!prompt) {
        throw new McpError(ErrorCode.InvalidParams, `Prompt ${request.params.name} not found`);
      }
      if (!prompt.enabled) {
        throw new McpError(ErrorCode.InvalidParams, `Prompt ${request.params.name} disabled`);
      }
      if (prompt.argsSchema) {
        const argsObj = normalizeObjectSchema(prompt.argsSchema);
        const parseResult = await safeParseAsync2(argsObj, request.params.arguments);
        if (!parseResult.success) {
          const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
          const errorMessage = getParseErrorMessage(error51);
          throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for prompt ${request.params.name}: ${errorMessage}`);
        }
        const args = parseResult.data;
        const cb = prompt.callback;
        return await Promise.resolve(cb(args, extra));
      } else {
        const cb = prompt.callback;
        return await Promise.resolve(cb(extra));
      }
    });
    this._promptHandlersInitialized = true;
  }
  resource(name, uriOrTemplate, ...rest) {
    let metadata;
    if (typeof rest[0] === "object") {
      metadata = rest.shift();
    }
    const readCallback = rest[0];
    if (typeof uriOrTemplate === "string") {
      if (this._registeredResources[uriOrTemplate]) {
        throw new Error(`Resource ${uriOrTemplate} is already registered`);
      }
      const registeredResource = this._createRegisteredResource(name, void 0, uriOrTemplate, metadata, readCallback);
      this.setResourceRequestHandlers();
      this.sendResourceListChanged();
      return registeredResource;
    } else {
      if (this._registeredResourceTemplates[name]) {
        throw new Error(`Resource template ${name} is already registered`);
      }
      const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, void 0, uriOrTemplate, metadata, readCallback);
      this.setResourceRequestHandlers();
      this.sendResourceListChanged();
      return registeredResourceTemplate;
    }
  }
  registerResource(name, uriOrTemplate, config2, readCallback) {
    if (typeof uriOrTemplate === "string") {
      if (this._registeredResources[uriOrTemplate]) {
        throw new Error(`Resource ${uriOrTemplate} is already registered`);
      }
      const registeredResource = this._createRegisteredResource(name, config2.title, uriOrTemplate, config2, readCallback);
      this.setResourceRequestHandlers();
      this.sendResourceListChanged();
      return registeredResource;
    } else {
      if (this._registeredResourceTemplates[name]) {
        throw new Error(`Resource template ${name} is already registered`);
      }
      const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, config2.title, uriOrTemplate, config2, readCallback);
      this.setResourceRequestHandlers();
      this.sendResourceListChanged();
      return registeredResourceTemplate;
    }
  }
  _createRegisteredResource(name, title, uri, metadata, readCallback) {
    const registeredResource = {
      name,
      title,
      metadata,
      readCallback,
      enabled: true,
      disable: () => registeredResource.update({ enabled: false }),
      enable: () => registeredResource.update({ enabled: true }),
      remove: () => registeredResource.update({ uri: null }),
      update: (updates) => {
        if (typeof updates.uri !== "undefined" && updates.uri !== uri) {
          delete this._registeredResources[uri];
          if (updates.uri)
            this._registeredResources[updates.uri] = registeredResource;
        }
        if (typeof updates.name !== "undefined")
          registeredResource.name = updates.name;
        if (typeof updates.title !== "undefined")
          registeredResource.title = updates.title;
        if (typeof updates.metadata !== "undefined")
          registeredResource.metadata = updates.metadata;
        if (typeof updates.callback !== "undefined")
          registeredResource.readCallback = updates.callback;
        if (typeof updates.enabled !== "undefined")
          registeredResource.enabled = updates.enabled;
        this.sendResourceListChanged();
      }
    };
    this._registeredResources[uri] = registeredResource;
    return registeredResource;
  }
  _createRegisteredResourceTemplate(name, title, template, metadata, readCallback) {
    const registeredResourceTemplate = {
      resourceTemplate: template,
      title,
      metadata,
      readCallback,
      enabled: true,
      disable: () => registeredResourceTemplate.update({ enabled: false }),
      enable: () => registeredResourceTemplate.update({ enabled: true }),
      remove: () => registeredResourceTemplate.update({ name: null }),
      update: (updates) => {
        if (typeof updates.name !== "undefined" && updates.name !== name) {
          delete this._registeredResourceTemplates[name];
          if (updates.name)
            this._registeredResourceTemplates[updates.name] = registeredResourceTemplate;
        }
        if (typeof updates.title !== "undefined")
          registeredResourceTemplate.title = updates.title;
        if (typeof updates.template !== "undefined")
          registeredResourceTemplate.resourceTemplate = updates.template;
        if (typeof updates.metadata !== "undefined")
          registeredResourceTemplate.metadata = updates.metadata;
        if (typeof updates.callback !== "undefined")
          registeredResourceTemplate.readCallback = updates.callback;
        if (typeof updates.enabled !== "undefined")
          registeredResourceTemplate.enabled = updates.enabled;
        this.sendResourceListChanged();
      }
    };
    this._registeredResourceTemplates[name] = registeredResourceTemplate;
    const variableNames = template.uriTemplate.variableNames;
    const hasCompleter = Array.isArray(variableNames) && variableNames.some((v) => !!template.completeCallback(v));
    if (hasCompleter) {
      this.setCompletionRequestHandler();
    }
    return registeredResourceTemplate;
  }
  _createRegisteredPrompt(name, title, description, argsSchema, callback) {
    const registeredPrompt = {
      title,
      description,
      argsSchema: argsSchema === void 0 ? void 0 : objectFromShape(argsSchema),
      callback,
      enabled: true,
      disable: () => registeredPrompt.update({ enabled: false }),
      enable: () => registeredPrompt.update({ enabled: true }),
      remove: () => registeredPrompt.update({ name: null }),
      update: (updates) => {
        if (typeof updates.name !== "undefined" && updates.name !== name) {
          delete this._registeredPrompts[name];
          if (updates.name)
            this._registeredPrompts[updates.name] = registeredPrompt;
        }
        if (typeof updates.title !== "undefined")
          registeredPrompt.title = updates.title;
        if (typeof updates.description !== "undefined")
          registeredPrompt.description = updates.description;
        if (typeof updates.argsSchema !== "undefined")
          registeredPrompt.argsSchema = objectFromShape(updates.argsSchema);
        if (typeof updates.callback !== "undefined")
          registeredPrompt.callback = updates.callback;
        if (typeof updates.enabled !== "undefined")
          registeredPrompt.enabled = updates.enabled;
        this.sendPromptListChanged();
      }
    };
    this._registeredPrompts[name] = registeredPrompt;
    if (argsSchema) {
      const hasCompletable = Object.values(argsSchema).some((field) => {
        const inner = field instanceof ZodOptional2 ? field._def?.innerType : field;
        return isCompletable(inner);
      });
      if (hasCompletable) {
        this.setCompletionRequestHandler();
      }
    }
    return registeredPrompt;
  }
  _createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, execution, _meta, handler) {
    validateAndWarnToolName(name);
    const registeredTool = {
      title,
      description,
      inputSchema: getZodSchemaObject(inputSchema),
      outputSchema: getZodSchemaObject(outputSchema),
      annotations,
      execution,
      _meta,
      handler,
      enabled: true,
      disable: () => registeredTool.update({ enabled: false }),
      enable: () => registeredTool.update({ enabled: true }),
      remove: () => registeredTool.update({ name: null }),
      update: (updates) => {
        if (typeof updates.name !== "undefined" && updates.name !== name) {
          if (typeof updates.name === "string") {
            validateAndWarnToolName(updates.name);
          }
          delete this._registeredTools[name];
          if (updates.name)
            this._registeredTools[updates.name] = registeredTool;
        }
        if (typeof updates.title !== "undefined")
          registeredTool.title = updates.title;
        if (typeof updates.description !== "undefined")
          registeredTool.description = updates.description;
        if (typeof updates.paramsSchema !== "undefined")
          registeredTool.inputSchema = objectFromShape(updates.paramsSchema);
        if (typeof updates.outputSchema !== "undefined")
          registeredTool.outputSchema = objectFromShape(updates.outputSchema);
        if (typeof updates.callback !== "undefined")
          registeredTool.handler = updates.callback;
        if (typeof updates.annotations !== "undefined")
          registeredTool.annotations = updates.annotations;
        if (typeof updates._meta !== "undefined")
          registeredTool._meta = updates._meta;
        if (typeof updates.enabled !== "undefined")
          registeredTool.enabled = updates.enabled;
        this.sendToolListChanged();
      }
    };
    this._registeredTools[name] = registeredTool;
    this.setToolRequestHandlers();
    this.sendToolListChanged();
    return registeredTool;
  }
  /**
   * tool() implementation. Parses arguments passed to overrides defined above.
   */
  tool(name, ...rest) {
    if (this._registeredTools[name]) {
      throw new Error(`Tool ${name} is already registered`);
    }
    let description;
    let inputSchema;
    let outputSchema;
    let annotations;
    if (typeof rest[0] === "string") {
      description = rest.shift();
    }
    if (rest.length > 1) {
      const firstArg = rest[0];
      if (isZodRawShapeCompat(firstArg)) {
        inputSchema = rest.shift();
        if (rest.length > 1 && typeof rest[0] === "object" && rest[0] !== null && !isZodRawShapeCompat(rest[0])) {
          annotations = rest.shift();
        }
      } else if (typeof firstArg === "object" && firstArg !== null) {
        if (Object.values(firstArg).some((v) => typeof v === "object" && v !== null)) {
          throw new Error(`Tool ${name} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);
        }
        annotations = rest.shift();
      }
    }
    const callback = rest[0];
    return this._createRegisteredTool(name, void 0, description, inputSchema, outputSchema, annotations, { taskSupport: "forbidden" }, void 0, callback);
  }
  /**
   * Registers a tool with a config object and callback.
   */
  registerTool(name, config2, cb) {
    if (this._registeredTools[name]) {
      throw new Error(`Tool ${name} is already registered`);
    }
    const { title, description, inputSchema, outputSchema, annotations, _meta } = config2;
    return this._createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, { taskSupport: "forbidden" }, _meta, cb);
  }
  prompt(name, ...rest) {
    if (this._registeredPrompts[name]) {
      throw new Error(`Prompt ${name} is already registered`);
    }
    let description;
    if (typeof rest[0] === "string") {
      description = rest.shift();
    }
    let argsSchema;
    if (rest.length > 1) {
      argsSchema = rest.shift();
    }
    const cb = rest[0];
    const registeredPrompt = this._createRegisteredPrompt(name, void 0, description, argsSchema, cb);
    this.setPromptRequestHandlers();
    this.sendPromptListChanged();
    return registeredPrompt;
  }
  /**
   * Registers a prompt with a config object and callback.
   */
  registerPrompt(name, config2, cb) {
    if (this._registeredPrompts[name]) {
      throw new Error(`Prompt ${name} is already registered`);
    }
    const { title, description, argsSchema } = config2;
    const registeredPrompt = this._createRegisteredPrompt(name, title, description, argsSchema, cb);
    this.setPromptRequestHandlers();
    this.sendPromptListChanged();
    return registeredPrompt;
  }
  /**
   * Checks if the server is connected to a transport.
   * @returns True if the server is connected
   */
  isConnected() {
    return this.server.transport !== void 0;
  }
  /**
   * Sends a logging message to the client, if connected.
   * Note: You only need to send the parameters object, not the entire JSON RPC message
   * @see LoggingMessageNotification
   * @param params
   * @param sessionId optional for stateless and backward compatibility
   */
  async sendLoggingMessage(params, sessionId) {
    return this.server.sendLoggingMessage(params, sessionId);
  }
  /**
   * Sends a resource list changed event to the client, if connected.
   */
  sendResourceListChanged() {
    if (this.isConnected()) {
      this.server.sendResourceListChanged();
    }
  }
  /**
   * Sends a tool list changed event to the client, if connected.
   */
  sendToolListChanged() {
    if (this.isConnected()) {
      this.server.sendToolListChanged();
    }
  }
  /**
   * Sends a prompt list changed event to the client, if connected.
   */
  sendPromptListChanged() {
    if (this.isConnected()) {
      this.server.sendPromptListChanged();
    }
  }
};
var EMPTY_OBJECT_JSON_SCHEMA = {
  type: "object",
  properties: {}
};
function isZodTypeLike(value) {
  return value !== null && typeof value === "object" && "parse" in value && typeof value.parse === "function" && "safeParse" in value && typeof value.safeParse === "function";
}
function isZodSchemaInstance(obj) {
  return "_def" in obj || "_zod" in obj || isZodTypeLike(obj);
}
function isZodRawShapeCompat(obj) {
  if (typeof obj !== "object" || obj === null) {
    return false;
  }
  if (isZodSchemaInstance(obj)) {
    return false;
  }
  if (Object.keys(obj).length === 0) {
    return true;
  }
  return Object.values(obj).some(isZodTypeLike);
}
function getZodSchemaObject(schema) {
  if (!schema) {
    return void 0;
  }
  if (isZodRawShapeCompat(schema)) {
    return objectFromShape(schema);
  }
  if (!isZodSchemaInstance(schema)) {
    throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");
  }
  return schema;
}
function promptArgumentsFromSchema(schema) {
  const shape = getObjectShape(schema);
  if (!shape)
    return [];
  return Object.entries(shape).map(([name, field]) => {
    const description = getSchemaDescription(field);
    const isOptional = isSchemaOptional(field);
    return {
      name,
      description,
      required: !isOptional
    };
  });
}
function getMethodValue(schema) {
  const shape = getObjectShape(schema);
  const methodSchema = shape?.method;
  if (!methodSchema) {
    throw new Error("Schema is missing a method literal");
  }
  const value = getLiteralValue(methodSchema);
  if (typeof value === "string") {
    return value;
  }
  throw new Error("Schema method literal must be a string");
}
function createCompletionResult(suggestions) {
  return {
    completion: {
      values: suggestions.slice(0, 100),
      total: suggestions.length,
      hasMore: suggestions.length > 100
    }
  };
}
var EMPTY_COMPLETION_RESULT = {
  completion: {
    values: [],
    hasMore: false
  }
};

// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
var import_node_process = __toESM(require("node:process"), 1);

// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
var ReadBuffer = class {
  append(chunk) {
    this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
  }
  readMessage() {
    if (!this._buffer) {
      return null;
    }
    const index2 = this._buffer.indexOf("\n");
    if (index2 === -1) {
      return null;
    }
    const line = this._buffer.toString("utf8", 0, index2).replace(/\r$/, "");
    this._buffer = this._buffer.subarray(index2 + 1);
    return deserializeMessage(line);
  }
  clear() {
    this._buffer = void 0;
  }
};
function deserializeMessage(line) {
  return JSONRPCMessageSchema.parse(JSON.parse(line));
}
function serializeMessage(message) {
  return JSON.stringify(message) + "\n";
}

// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
var StdioServerTransport = class {
  constructor(_stdin = import_node_process.default.stdin, _stdout = import_node_process.default.stdout) {
    this._stdin = _stdin;
    this._stdout = _stdout;
    this._readBuffer = new ReadBuffer();
    this._started = false;
    this._ondata = (chunk) => {
      this._readBuffer.append(chunk);
      this.processReadBuffer();
    };
    this._onerror = (error51) => {
      this.onerror?.(error51);
    };
  }
  /**
   * Starts listening for messages on stdin.
   */
  async start() {
    if (this._started) {
      throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");
    }
    this._started = true;
    this._stdin.on("data", this._ondata);
    this._stdin.on("error", this._onerror);
  }
  processReadBuffer() {
    while (true) {
      try {
        const message = this._readBuffer.readMessage();
        if (message === null) {
          break;
        }
        this.onmessage?.(message);
      } catch (error51) {
        this.onerror?.(error51);
      }
    }
  }
  async close() {
    this._stdin.off("data", this._ondata);
    this._stdin.off("error", this._onerror);
    const remainingDataListeners = this._stdin.listenerCount("data");
    if (remainingDataListeners === 0) {
      this._stdin.pause();
    }
    this._readBuffer.clear();
    this.onclose?.();
  }
  send(message) {
    return new Promise((resolve) => {
      const json2 = serializeMessage(message);
      if (this._stdout.write(json2)) {
        resolve();
      } else {
        this._stdout.once("drain", resolve);
      }
    });
  }
};

// server/src/symbols/sysmlElements.ts
var SysMLElementKind = /* @__PURE__ */ ((SysMLElementKind2) => {
  SysMLElementKind2["Package"] = "package";
  SysMLElementKind2["PartDef"] = "part def";
  SysMLElementKind2["PartUsage"] = "part";
  SysMLElementKind2["AttributeDef"] = "attribute def";
  SysMLElementKind2["AttributeUsage"] = "attribute";
  SysMLElementKind2["PortDef"] = "port def";
  SysMLElementKind2["PortUsage"] = "port";
  SysMLElementKind2["ConnectionDef"] = "connection def";
  SysMLElementKind2["ConnectionUsage"] = "connection";
  SysMLElementKind2["InterfaceDef"] = "interface def";
  SysMLElementKind2["InterfaceUsage"] = "interface";
  SysMLElementKind2["ActionDef"] = "action def";
  SysMLElementKind2["ActionUsage"] = "action";
  SysMLElementKind2["PerformActionUsage"] = "perform action";
  SysMLElementKind2["StateDef"] = "state def";
  SysMLElementKind2["StateUsage"] = "state";
  SysMLElementKind2["ExhibitStateUsage"] = "exhibit state";
  SysMLElementKind2["TransitionUsage"] = "transition";
  SysMLElementKind2["RequirementDef"] = "requirement def";
  SysMLElementKind2["RequirementUsage"] = "requirement";
  SysMLElementKind2["ConstraintDef"] = "constraint def";
  SysMLElementKind2["ConstraintUsage"] = "constraint";
  SysMLElementKind2["ItemDef"] = "item def";
  SysMLElementKind2["ItemUsage"] = "item";
  SysMLElementKind2["AllocationDef"] = "allocation def";
  SysMLElementKind2["AllocationUsage"] = "allocation";
  SysMLElementKind2["UseCaseDef"] = "use case def";
  SysMLElementKind2["UseCaseUsage"] = "use case";
  SysMLElementKind2["IncludeUseCaseUsage"] = "include use case";
  SysMLElementKind2["ActorUsage"] = "actor";
  SysMLElementKind2["SubjectUsage"] = "subject";
  SysMLElementKind2["StakeholderUsage"] = "stakeholder";
  SysMLElementKind2["EnumDef"] = "enum def";
  SysMLElementKind2["EnumUsage"] = "enum";
  SysMLElementKind2["CalcDef"] = "calc def";
  SysMLElementKind2["CalcUsage"] = "calc";
  SysMLElementKind2["ViewDef"] = "view def";
  SysMLElementKind2["ViewUsage"] = "view";
  SysMLElementKind2["ViewpointDef"] = "viewpoint def";
  SysMLElementKind2["ViewpointUsage"] = "viewpoint";
  SysMLElementKind2["OccurrenceDef"] = "occurrence def";
  SysMLElementKind2["OccurrenceUsage"] = "occurrence";
  SysMLElementKind2["RefUsage"] = "ref";
  SysMLElementKind2["MetadataDef"] = "metadata def";
  SysMLElementKind2["RenderingDef"] = "rendering def";
  SysMLElementKind2["AnalysisCaseDef"] = "analysis case def";
  SysMLElementKind2["AnalysisCaseUsage"] = "analysis case";
  SysMLElementKind2["VerificationCaseDef"] = "verification case def";
  SysMLElementKind2["VerificationCaseUsage"] = "verification case";
  SysMLElementKind2["Comment"] = "comment";
  SysMLElementKind2["Doc"] = "doc";
  SysMLElementKind2["Alias"] = "alias";
  SysMLElementKind2["Import"] = "import";
  SysMLElementKind2["Unknown"] = "unknown";
  return SysMLElementKind2;
})(SysMLElementKind || {});
function isDefinition(kind) {
  return kind.endsWith(" def");
}
function isUsage(kind) {
  return !isDefinition(kind) && kind !== "package" /* Package */ && kind !== "import" /* Import */ && kind !== "comment" /* Comment */ && kind !== "doc" /* Doc */ && kind !== "alias" /* Alias */ && kind !== "unknown" /* Unknown */;
}

// server/src/analysis/complexityAnalyzer.ts
var WEIGHTS = {
  /** Raw element count contribution (log-scaled) — slightly higher so
   *  large, feature-rich documents score proportionally higher. */
  size: 0.25,
  /** Max nesting depth */
  depth: 0.2,
  /** Coupling / type references per definition */
  coupling: 0.25,
  /** Inverse documentation coverage (less docs = more complex) */
  docDebt: 0.1,
  /** Average fan-out (children per def) */
  fanOut: 0.2
};
function analyseComplexity(symbols) {
  if (symbols.length === 0) {
    return emptyReport();
  }
  const defs = symbols.filter((s) => isDefinition(s.kind));
  const usages = symbols.filter((s) => isUsage(s.kind));
  const packages = symbols.filter((s) => s.kind === "package" /* Package */);
  const depthMap = computeDepths(symbols);
  const maxDepth = Math.max(...Array.from(depthMap.values()), 0);
  const byQualifiedName = new Map(symbols.map((s) => [s.qualifiedName, s]));
  const childCounts = /* @__PURE__ */ new Map();
  for (const d of defs) {
    childCounts.set(d.qualifiedName, 0);
  }
  for (const s of symbols) {
    if (s.parentQualifiedName && childCounts.has(s.parentQualifiedName)) {
      childCounts.set(s.parentQualifiedName, (childCounts.get(s.parentQualifiedName) ?? 0) + 1);
    }
  }
  const avgChildrenPerDef = defs.length > 0 ? round(Array.from(childCounts.values()).reduce((a, b) => a + b, 0) / defs.length) : 0;
  const defNames = new Set(defs.map((d) => d.name));
  let couplingCount = 0;
  const typeRefsPerDef = /* @__PURE__ */ new Map();
  for (const d of defs) {
    typeRefsPerDef.set(d.qualifiedName, 0);
  }
  const advanced = computeAdvancedSignals(symbols, defs, byQualifiedName);
  for (const s of usages) {
    for (const tn of s.typeNames) {
      if (defNames.has(tn)) {
        couplingCount++;
        if (s.parentQualifiedName && typeRefsPerDef.has(s.parentQualifiedName)) {
          typeRefsPerDef.set(
            s.parentQualifiedName,
            (typeRefsPerDef.get(s.parentQualifiedName) ?? 0) + 1
          );
        }
      }
    }
  }
  const referencedTypes = new Set(
    usages.flatMap((s) => s.typeNames)
  );
  const unusedDefinitions = defs.filter(
    (d) => d.kind !== "enum def" /* EnumDef */ && !referencedTypes.has(d.name)
  ).length;
  const documentedDefs = defs.filter((d) => d.documentation).length;
  const documentationCoverage = defs.length > 0 ? round(documentedDefs / defs.length * 100) : 100;
  const hotspots = defs.map((d) => {
    const cc = childCounts.get(d.qualifiedName) ?? 0;
    const dp = depthMap.get(d.qualifiedName) ?? 0;
    const tr = typeRefsPerDef.get(d.qualifiedName) ?? 0;
    const hasDoc = !!d.documentation;
    const behaviorSignal = advanced.behaviorByDef.get(d.qualifiedName) ?? 0;
    const score = computeDefScore(cc, dp, tr, hasDoc, behaviorSignal);
    return {
      qualifiedName: d.qualifiedName,
      kind: d.kind,
      childCount: cc,
      depth: dp,
      typeRefs: tr,
      hasDoc,
      score
    };
  }).sort((a, b) => b.score - a.score);
  const enrichedDepth = Math.max(maxDepth, advanced.maxCalcChainDepth + 1);
  const enrichedCoupling = couplingCount + advanced.specializationLinks + Math.round(advanced.performUsages * 0.5) + Math.round(advanced.transitionUsages * 0.5) + Math.round(advanced.stdLibTypeRefs * 0.6);
  const enrichedFanOut = avgChildrenPerDef + advanced.actionComplexityBonus;
  const complexityIndex = computeIndex(
    symbols.length,
    enrichedDepth,
    enrichedCoupling,
    defs.length,
    enrichedFanOut,
    documentationCoverage
  );
  return {
    totalElements: symbols.length,
    definitions: defs.length,
    usages: usages.length,
    packages: packages.length,
    maxDepth,
    avgChildrenPerDef,
    couplingCount,
    unusedDefinitions,
    documentationCoverage,
    complexityIndex,
    rating: indexToRating(complexityIndex),
    hotspots
  };
}
function computeAdvancedSignals(symbols, defs, byQualifiedName) {
  const defNames = new Set(defs.map((d) => d.name));
  const behaviorByDef = /* @__PURE__ */ new Map();
  for (const d of defs) {
    behaviorByDef.set(d.qualifiedName, 0);
  }
  let specializationLinks = 0;
  let performUsages = 0;
  let transitionUsages = 0;
  let stdLibTypeRefs = 0;
  let maxCalcChainDepth = 0;
  let actionComplexityBonus = 0;
  const addBehavior = (qualifiedName, amount) => {
    if (!qualifiedName || !behaviorByDef.has(qualifiedName)) return;
    behaviorByDef.set(qualifiedName, (behaviorByDef.get(qualifiedName) ?? 0) + amount);
  };
  for (const d of defs) {
    specializationLinks += d.typeNames.length;
    addBehavior(d.qualifiedName, Math.min(3, d.typeNames.length));
  }
  for (const s of symbols) {
    switch (s.kind) {
      case "perform action" /* PerformActionUsage */:
        performUsages++;
        addBehavior(s.parentQualifiedName, 2);
        break;
      case "calc" /* CalcUsage */:
        addBehavior(s.parentQualifiedName, 2);
        break;
      case "calc def" /* CalcDef */:
        addBehavior(s.parentQualifiedName, 1);
        break;
      case "transition" /* TransitionUsage */:
        transitionUsages++;
        addBehavior(s.parentQualifiedName, 2);
        break;
      case "exhibit state" /* ExhibitStateUsage */:
        addBehavior(s.parentQualifiedName, 1);
        break;
      default:
        break;
    }
    if (s.kind === "action def" /* ActionDef */) {
      const localBehavior = symbols.filter((c) => c.parentQualifiedName === s.qualifiedName).reduce((score, c) => {
        if (c.kind === "perform action" /* PerformActionUsage */) return score + 2;
        if (c.kind === "calc" /* CalcUsage */ || c.kind === "calc def" /* CalcDef */) return score + 2;
        if (c.kind === "action" /* ActionUsage */) return score + 1;
        return score;
      }, 0);
      actionComplexityBonus += Math.min(4, localBehavior / 4);
      addBehavior(s.qualifiedName, Math.min(4, localBehavior));
    }
    if (s.kind === "calc" /* CalcUsage */ || s.kind === "calc def" /* CalcDef */) {
      const chainDepth = calcChainDepth(s, byQualifiedName);
      if (chainDepth > maxCalcChainDepth) {
        maxCalcChainDepth = chainDepth;
      }
      addBehavior(s.parentQualifiedName, Math.min(3, chainDepth));
    }
    for (const typeName of s.typeNames) {
      if (defNames.has(typeName)) continue;
      if (looksLikeStdLibType(typeName)) {
        stdLibTypeRefs++;
        addBehavior(s.parentQualifiedName, 1);
      }
    }
  }
  return {
    specializationLinks,
    performUsages,
    transitionUsages,
    stdLibTypeRefs,
    maxCalcChainDepth,
    actionComplexityBonus,
    behaviorByDef
  };
}
function calcChainDepth(symbol2, byQualifiedName) {
  let depth = 1;
  let cursor = symbol2.parentQualifiedName ? byQualifiedName.get(symbol2.parentQualifiedName) : void 0;
  while (cursor && (cursor.kind === "calc" /* CalcUsage */ || cursor.kind === "calc def" /* CalcDef */)) {
    depth++;
    cursor = cursor.parentQualifiedName ? byQualifiedName.get(cursor.parentQualifiedName) : void 0;
  }
  return depth;
}
function looksLikeStdLibType(typeName) {
  if (!typeName) return false;
  if (typeName.includes("::")) return true;
  const commonStdLibTypes = /* @__PURE__ */ new Set([
    "String",
    "Boolean",
    "Integer",
    "Natural",
    "Real",
    "Complex",
    "Number",
    "Map",
    "OrderedMap",
    "Set",
    "Sequence",
    "Bag",
    "Vector",
    "KeyValuePair",
    "Duration",
    "Time",
    "DateTime",
    "Mass",
    "Length",
    "Speed",
    "Acceleration"
  ]);
  return commonStdLibTypes.has(typeName);
}
function emptyReport() {
  return {
    totalElements: 0,
    definitions: 0,
    usages: 0,
    packages: 0,
    maxDepth: 0,
    avgChildrenPerDef: 0,
    couplingCount: 0,
    unusedDefinitions: 0,
    documentationCoverage: 100,
    complexityIndex: 0,
    rating: "trivial",
    hotspots: []
  };
}
function computeDepths(symbols) {
  const result = /* @__PURE__ */ new Map();
  const byQN = new Map(symbols.map((s) => [s.qualifiedName, s]));
  function depth(qn) {
    if (result.has(qn)) return result.get(qn);
    const sym = byQN.get(qn);
    if (!sym || !sym.parentQualifiedName) {
      result.set(qn, 0);
      return 0;
    }
    const d = depth(sym.parentQualifiedName) + 1;
    result.set(qn, d);
    return d;
  }
  for (const s of symbols) {
    depth(s.qualifiedName);
  }
  return result;
}
function computeIndex(elementCount, maxDepth, coupling, defCount, avgFanOut, docCoverage) {
  const sizeN = clamp(Math.log2(Math.max(elementCount, 1)) / 10);
  const depthN = clamp(maxDepth / 8);
  const couplingN = defCount > 0 ? clamp(coupling / defCount / 5) : 0;
  const fanOutN = clamp(avgFanOut / 15);
  const docDebtN = clamp(1 - docCoverage / 100);
  const raw = WEIGHTS.size * sizeN + WEIGHTS.depth * depthN + WEIGHTS.coupling * couplingN + WEIGHTS.fanOut * fanOutN + WEIGHTS.docDebt * docDebtN;
  return Math.round(raw * 100);
}
function computeDefScore(childCount, depth, typeRefs, hasDoc, behaviorSignal = 0) {
  const cc = clamp(childCount / 15) * 30;
  const dp = clamp(depth / 6) * 20;
  const tr = clamp(typeRefs / 5) * 25;
  const dc = hasDoc ? 0 : 15;
  const bs = clamp(behaviorSignal / 8) * 10;
  return Math.round(Math.min(100, cc + dp + tr + dc + bs));
}
function indexToRating(index2) {
  if (index2 <= 10) return "trivial";
  if (index2 <= 25) return "simple";
  if (index2 <= 50) return "moderate";
  if (index2 <= 75) return "complex";
  return "very complex";
}
function clamp(value) {
  return Math.max(0, Math.min(1, value));
}
function round(value) {
  return Math.round(value * 100) / 100;
}

// server/src/mcp/mermaidGenerator.ts
function safeId(name) {
  let result = "";
  for (let i = 0; i < name.length; i++) {
    const c = name.charCodeAt(i);
    if (c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 48 && c <= 57 || c === 95) {
      result += name[i];
    } else {
      result += "_";
    }
  }
  let start = 0;
  while (start < result.length && result[start] === "_") start++;
  let end = result.length;
  while (end > start && result[end - 1] === "_") end--;
  return result.substring(start, end) || "node";
}
function escapeLabel(text) {
  let result = "";
  for (let i = 0; i < text.length; i++) {
    const ch = text[i];
    if (ch === '"') {
      result += "#quot;";
    } else if (ch !== "<" && ch !== ">") {
      result += ch;
    }
  }
  return result;
}
function buildChildrenIndex(allSymbols) {
  const index2 = /* @__PURE__ */ new Map();
  const seen = /* @__PURE__ */ new Set();
  for (const s of allSymbols) {
    if (seen.has(s.qualifiedName)) continue;
    seen.add(s.qualifiedName);
    if (s.parentQualifiedName) {
      const list = index2.get(s.parentQualifiedName) ?? [];
      list.push(s);
      index2.set(s.parentQualifiedName, list);
    }
  }
  return index2;
}
var STYLE_PALETTE = {
  Package: { fill: "#e8f4f8", stroke: "#2196F3", color: "#1565C0" },
  PartDef: { fill: "#e8f5e9", stroke: "#4CAF50", color: "#2E7D32" },
  PortDef: { fill: "#fff3e0", stroke: "#FF9800", color: "#E65100" },
  Part: { fill: "#f1f8e9", stroke: "#8BC34A", color: "#33691E" },
  Port: { fill: "#fff8e1", stroke: "#FFC107", color: "#F57F17" },
  AttributeDef: { fill: "#fce4ec", stroke: "#E91E63", color: "#880E4F" },
  InterfaceDef: { fill: "#ede7f6", stroke: "#673AB7", color: "#311B92" },
  InterfaceUsage: { fill: "#f3e5f5", stroke: "#9C27B0", color: "#4A148C" },
  ConnectionDef: { fill: "#e0f2f1", stroke: "#009688", color: "#004D40" },
  ConnectionUsage: { fill: "#e0f7fa", stroke: "#00BCD4", color: "#006064" },
  ActionDef: { fill: "#e8eaf6", stroke: "#3F51B5", color: "#1A237E" },
  ActionUsage: { fill: "#e3f2fd", stroke: "#2196F3", color: "#0D47A1" },
  PerformActionUsage: { fill: "#e3f2fd", stroke: "#2196F3", color: "#0D47A1" },
  StateDef: { fill: "#f3e5f5", stroke: "#9C27B0", color: "#4A148C" },
  StateUsage: { fill: "#fce4ec", stroke: "#E91E63", color: "#880E4F" },
  ExhibitStateUsage: { fill: "#fce4ec", stroke: "#E91E63", color: "#880E4F" },
  ItemDef: { fill: "#efebe9", stroke: "#795548", color: "#3E2723" },
  ItemUsage: { fill: "#efebe9", stroke: "#795548", color: "#3E2723" },
  EnumerationDef: { fill: "#eceff1", stroke: "#607D8B", color: "#263238" },
  RequirementDef: { fill: "#fff9c4", stroke: "#F9A825", color: "#F57F17" },
  RequirementUsage: { fill: "#fffde7", stroke: "#FBC02D", color: "#F57F17" },
  UseCaseDef: { fill: "#e1f5fe", stroke: "#0288D1", color: "#01579B" },
  UseCaseUsage: { fill: "#e1f5fe", stroke: "#0288D1", color: "#01579B" },
  IncludeUseCaseUsage: { fill: "#e1f5fe", stroke: "#0288D1", color: "#01579B" },
  ActorUsage: { fill: "#fbe9e7", stroke: "#FF5722", color: "#BF360C" },
  SubjectUsage: { fill: "#e8eaf6", stroke: "#3F51B5", color: "#1A237E" },
  StakeholderUsage: { fill: "#f3e5f5", stroke: "#9C27B0", color: "#4A148C" },
  OccurrenceDef: { fill: "#e0f7fa", stroke: "#00ACC1", color: "#006064" },
  OccurrenceUsage: { fill: "#e0f7fa", stroke: "#00ACC1", color: "#006064" }
};
var DEFAULT_STYLE = { fill: "#f5f5f5", stroke: "#9E9E9E", color: "#212121" };
function emitStyleDirectives(lines, nodeStyles, format) {
  if (format === "style") {
    for (const [nodeId, kindLabel] of nodeStyles) {
      const p = STYLE_PALETTE[kindLabel] ?? DEFAULT_STYLE;
      lines.push(
        `    style ${nodeId} fill:${p.fill},stroke:${p.stroke},stroke-width:2px,color:${p.color}`
      );
    }
    return;
  }
  const usedClasses = /* @__PURE__ */ new Map();
  for (const kindLabel of nodeStyles.values()) {
    if (!usedClasses.has(kindLabel)) {
      usedClasses.set(kindLabel, STYLE_PALETTE[kindLabel] ?? DEFAULT_STYLE);
    }
  }
  for (const [kindLabel, palette] of usedClasses) {
    const cls = kindLabel + "Style";
    lines.push(
      `    classDef ${cls} fill:${palette.fill},stroke:${palette.stroke},stroke-width:2px,color:${palette.color}`
    );
  }
  if (format === "cssClass") {
    for (const [nodeId, kindLabel] of nodeStyles) {
      lines.push(`    cssClass "${nodeId}" ${kindLabel}Style`);
    }
  } else {
    const grouped = /* @__PURE__ */ new Map();
    for (const [nodeId, kindLabel] of nodeStyles) {
      const cls = kindLabel + "Style";
      const arr = grouped.get(cls) ?? [];
      arr.push(nodeId);
      grouped.set(cls, arr);
    }
    for (const [cls, ids] of grouped) {
      lines.push(`    class ${ids.join(",")} ${cls}`);
    }
  }
}
function inferDiagramType(symbols) {
  const kinds = /* @__PURE__ */ new Map();
  for (const s of symbols) {
    kinds.set(s.kind, (kinds.get(s.kind) ?? 0) + 1);
  }
  const actionCount = (kinds.get("action def" /* ActionDef */) ?? 0) + (kinds.get("action" /* ActionUsage */) ?? 0) + (kinds.get("perform action" /* PerformActionUsage */) ?? 0);
  const stateCount = (kinds.get("state def" /* StateDef */) ?? 0) + (kinds.get("state" /* StateUsage */) ?? 0) + (kinds.get("transition" /* TransitionUsage */) ?? 0) + (kinds.get("exhibit state" /* ExhibitStateUsage */) ?? 0);
  const structuralCount = (kinds.get("part def" /* PartDef */) ?? 0) + (kinds.get("part" /* PartUsage */) ?? 0) + (kinds.get("port def" /* PortDef */) ?? 0) + (kinds.get("port" /* PortUsage */) ?? 0) + (kinds.get("interface def" /* InterfaceDef */) ?? 0) + (kinds.get("interface" /* InterfaceUsage */) ?? 0) + (kinds.get("connection def" /* ConnectionDef */) ?? 0) + (kinds.get("connection" /* ConnectionUsage */) ?? 0);
  const useCaseCount = (kinds.get("use case def" /* UseCaseDef */) ?? 0) + (kinds.get("use case" /* UseCaseUsage */) ?? 0) + (kinds.get("include use case" /* IncludeUseCaseUsage */) ?? 0) + (kinds.get("actor" /* ActorUsage */) ?? 0) + (kinds.get("subject" /* SubjectUsage */) ?? 0) + (kinds.get("stakeholder" /* StakeholderUsage */) ?? 0);
  const sequenceCount = (kinds.get("occurrence def" /* OccurrenceDef */) ?? 0) + (kinds.get("occurrence" /* OccurrenceUsage */) ?? 0);
  const partDefCount = kinds.get("part def" /* PartDef */) ?? 0;
  const actionDefCount = kinds.get("action def" /* ActionDef */) ?? 0;
  const connectionCount = (kinds.get("connection" /* ConnectionUsage */) ?? 0) + (kinds.get("interface" /* InterfaceUsage */) ?? 0);
  const total = symbols.length;
  if (total === 0) return "general";
  if (useCaseCount > 0 && useCaseCount / total > 0.3) return "usecase";
  if (partDefCount >= 3 && actionDefCount > 0 && actionCount > 0 && connectionCount === 0) {
    return "sequence";
  }
  if (sequenceCount > 0 && sequenceCount / total > 0.3) return "sequence";
  if (actionCount > 0 && actionCount / total > 0.4) return "activity";
  if (stateCount > 0 && stateCount / total > 0.4) return "state";
  if (structuralCount > 0 && (kinds.get("connection" /* ConnectionUsage */) ?? 0) > 0 && (kinds.get("interface" /* InterfaceUsage */) ?? 0) + (kinds.get("connection" /* ConnectionUsage */) ?? 0) > 2) {
    return "interconnection";
  }
  return "general";
}
function buildDisplayIds(symbols) {
  const nameCount = /* @__PURE__ */ new Map();
  for (const s of symbols) {
    nameCount.set(s.name, (nameCount.get(s.name) ?? 0) + 1);
  }
  const ids = /* @__PURE__ */ new Map();
  for (const s of symbols) {
    let displayId;
    if (nameCount.get(s.name) > 1 && s.parentQualifiedName) {
      const parentName = s.parentQualifiedName.split("::").pop() ?? s.parentQualifiedName;
      displayId = safeId(`${parentName}_${s.name}`);
    } else {
      displayId = safeId(s.name);
    }
    ids.set(s.qualifiedName, displayId);
  }
  return ids;
}
function generateGeneralView(symbols, symbolTable) {
  const lines = [
    '%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#e8f5e9", "lineColor": "#546E7A"}}}%%',
    "classDiagram"
  ];
  const rendered = /* @__PURE__ */ new Set();
  const nodeStyles = /* @__PURE__ */ new Map();
  let elementCount = 0;
  const childrenOf = buildChildrenIndex([...symbolTable.values()]);
  const meaningful = symbols.filter(
    (s) => s.kind !== "comment" /* Comment */ && s.kind !== "doc" /* Doc */ && s.kind !== "import" /* Import */ && s.kind !== "alias" /* Alias */ && s.kind !== "unknown" /* Unknown */ && s.kind !== "attribute" /* AttributeUsage */ && s.kind !== "attribute def" /* AttributeDef */ && s.kind !== "port" /* PortUsage */
  );
  const displayIds = buildDisplayIds(meaningful);
  for (const sym of meaningful) {
    const id = displayIds.get(sym.qualifiedName) ?? safeId(sym.qualifiedName);
    if (rendered.has(id)) continue;
    rendered.add(id);
    elementCount++;
    const childSymbols = (childrenOf.get(sym.qualifiedName) ?? []).filter(
      (c) => c.kind === "attribute" /* AttributeUsage */ || c.kind === "port" /* PortUsage */ || c.kind === "part" /* PartUsage */
    );
    const kindLabel = sym.kind.split(/\s+/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join("");
    nodeStyles.set(id, kindLabel);
    if (childSymbols.length > 0) {
      lines.push(`    class ${id} {`);
      lines.push(`        <<${kindLabel}>>`);
      for (const child of childSymbols) {
        const typeStr = child.typeNames.length > 0 ? ` : ${child.typeNames[0]}` : "";
        const mult = child.multiplicity ? `[${child.multiplicity}]` : "";
        lines.push(`        +${escapeLabel(child.name)}${typeStr}${mult}`);
      }
      lines.push("    }");
    } else {
      lines.push(`    class ${id}`);
      lines.push(`    <<${kindLabel}>> ${id}`);
    }
  }
  for (const sym of meaningful) {
    const id = displayIds.get(sym.qualifiedName) ?? safeId(sym.qualifiedName);
    for (const typeName of sym.typeNames) {
      const target = symbolTable.get(typeName) ?? [...symbolTable.values()].find((s) => s.name === typeName);
      if (target) {
        const targetId = displayIds.get(target.qualifiedName) ?? safeId(target.qualifiedName);
        if (rendered.has(targetId)) {
          lines.push(`    ${targetId} <|-- ${id} : specializes`);
        }
      }
    }
    if (sym.parentQualifiedName) {
      const parentId = displayIds.get(sym.parentQualifiedName) ?? safeId(sym.parentQualifiedName);
      if (rendered.has(parentId) && rendered.has(id) && (isDefinition(sym.kind) || sym.kind === "part" /* PartUsage */)) {
        lines.push(`    ${parentId} *-- ${id} : contains`);
      }
    }
  }
  emitStyleDirectives(lines, nodeStyles, "cssClass");
  return {
    diagram: lines.join("\n"),
    diagramType: "general",
    description: `General View showing ${elementCount} elements with specialisation and containment relationships`,
    elementCount
  };
}
function generateActivityView(symbols, symbolTable) {
  const lines = [
    '%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#e3f2fd", "lineColor": "#546E7A"}}}%%',
    "flowchart TD"
  ];
  const nodeStyles = /* @__PURE__ */ new Map();
  let elementCount = 0;
  const actionDefs = symbols.filter(
    (s) => s.kind === "action def" /* ActionDef */
  );
  const actions = symbols.filter(
    (s) => s.kind === "action" /* ActionUsage */ || s.kind === "perform action" /* PerformActionUsage */
  );
  const childrenOf = buildChildrenIndex([...symbolTable.values()]);
  for (const def of actionDefs) {
    const defId = safeId(def.qualifiedName);
    lines.push(`    subgraph ${defId}["${escapeLabel(def.name)}"]`);
    elementCount++;
    const childActions = (childrenOf.get(def.qualifiedName) ?? []).filter(
      (c) => c.kind === "action" /* ActionUsage */ || c.kind === "perform action" /* PerformActionUsage */
    );
    let prevId;
    for (const action of childActions) {
      const actionId = safeId(action.qualifiedName);
      const label = escapeLabel(action.name);
      lines.push(`        ${actionId}["\u25B6 ${label}"]`);
      nodeStyles.set(actionId, "ActionUsage");
      elementCount++;
      if (prevId) {
        lines.push(`        ${prevId} --> ${actionId}`);
      }
      prevId = actionId;
    }
    lines.push("    end");
  }
  for (const action of actions) {
    if (action.parentQualifiedName && actionDefs.some((d) => d.qualifiedName === action.parentQualifiedName)) {
      continue;
    }
    const actionId = safeId(action.qualifiedName);
    const label = escapeLabel(action.name);
    const typeStr = action.typeNames.length > 0 ? `\\n: ${action.typeNames[0]}` : "";
    lines.push(`    ${actionId}["\u25B6 ${label}${typeStr}"]`);
    nodeStyles.set(actionId, "ActionUsage");
    elementCount++;
  }
  if (elementCount === 0) {
    return generateGeneralView(symbols, symbolTable);
  }
  emitStyleDirectives(lines, nodeStyles, "style");
  return {
    diagram: lines.join("\n"),
    diagramType: "activity",
    description: `Activity View showing ${elementCount} actions and their sequential flow`,
    elementCount
  };
}
function generateStateView(symbols, symbolTable) {
  const lines = [
    '%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#f3e5f5", "lineColor": "#546E7A"}}}%%',
    "stateDiagram-v2"
  ];
  const nodeStyles = /* @__PURE__ */ new Map();
  let elementCount = 0;
  const stateDefs = symbols.filter((s) => s.kind === "state def" /* StateDef */);
  const states = symbols.filter(
    (s) => s.kind === "state" /* StateUsage */ || s.kind === "exhibit state" /* ExhibitStateUsage */
  );
  const transitions = symbols.filter((s) => s.kind === "transition" /* TransitionUsage */);
  const childrenOf = buildChildrenIndex([...symbolTable.values()]);
  for (const def of stateDefs) {
    const defId = safeId(def.qualifiedName);
    lines.push(`    state "${escapeLabel(def.name)}" as ${defId} {`);
    nodeStyles.set(defId, "StateDef");
    elementCount++;
    const childStates = (childrenOf.get(def.qualifiedName) ?? []).filter((c) => c.kind === "state" /* StateUsage */ || c.kind === "exhibit state" /* ExhibitStateUsage */);
    for (const child of childStates) {
      const childId = safeId(child.qualifiedName);
      lines.push(`        ${childId} : ${escapeLabel(child.name)}`);
      nodeStyles.set(childId, "StateUsage");
      elementCount++;
    }
    lines.push("    }");
  }
  for (const state of states) {
    if (state.parentQualifiedName && stateDefs.some((d) => d.qualifiedName === state.parentQualifiedName)) {
      continue;
    }
    const stateId = safeId(state.qualifiedName);
    lines.push(`    ${stateId} : ${escapeLabel(state.name)}`);
    nodeStyles.set(stateId, "StateUsage");
    elementCount++;
  }
  for (const trans of transitions) {
    if (trans.typeNames.length >= 2) {
      const srcId = safeId(trans.typeNames[0]);
      const tgtId = safeId(trans.typeNames[1]);
      lines.push(`    ${srcId} --> ${tgtId}`);
    }
  }
  if (elementCount === 0) {
    return generateGeneralView(symbols, symbolTable);
  }
  emitStyleDirectives(lines, nodeStyles, "class");
  return {
    diagram: lines.join("\n"),
    diagramType: "state",
    description: `State View showing ${elementCount} states and transitions`,
    elementCount
  };
}
function generateInterconnectionView(symbols, symbolTable) {
  const lines = [
    '%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#f1f8e9", "lineColor": "#546E7A"}}}%%',
    "flowchart LR"
  ];
  const nodeStyles = /* @__PURE__ */ new Map();
  let elementCount = 0;
  const parts = symbols.filter(
    (s) => s.kind === "part def" /* PartDef */ || s.kind === "part" /* PartUsage */
  );
  const connections = symbols.filter(
    (s) => s.kind === "connection" /* ConnectionUsage */ || s.kind === "interface" /* InterfaceUsage */
  );
  const childrenOf = buildChildrenIndex([...symbolTable.values()]);
  for (const part of parts) {
    const id = safeId(part.qualifiedName);
    const label = escapeLabel(part.name);
    const typeStr = part.typeNames.length > 0 ? `\\n: ${part.typeNames[0]}` : "";
    const ports = (childrenOf.get(part.qualifiedName) ?? []).filter((c) => c.kind === "port" /* PortUsage */);
    if (ports.length > 0) {
      lines.push(`    subgraph ${id}["\u25A0 ${label}${typeStr}"]`);
      for (const port of ports) {
        const portId = safeId(port.qualifiedName);
        const portLabel = escapeLabel(port.name);
        const portType = port.typeNames.length > 0 ? ` : ${port.typeNames[0]}` : "";
        lines.push(`        ${portId}(("${portLabel}${portType}"))`);
        nodeStyles.set(portId, "Port");
        elementCount++;
      }
      lines.push("    end");
    } else {
      lines.push(`    ${id}["\u25A0 ${label}${typeStr}"]`);
    }
    nodeStyles.set(id, isDefinition(part.kind) ? "PartDef" : "Part");
    elementCount++;
  }
  for (const conn of connections) {
    if (conn.typeNames.length >= 2) {
      const srcId = safeId(conn.typeNames[0]);
      const tgtId = safeId(conn.typeNames[1]);
      const label = conn.name ? ` |${escapeLabel(conn.name)}|` : "";
      lines.push(`    ${srcId} <-->${label} ${tgtId}`);
    }
  }
  if (elementCount === 0) {
    return generateGeneralView(symbols, symbolTable);
  }
  emitStyleDirectives(lines, nodeStyles, "style");
  return {
    diagram: lines.join("\n"),
    diagramType: "interconnection",
    description: `Interconnection View showing ${elementCount} parts, ports, and connections`,
    elementCount
  };
}
function generateSequenceView(symbols, symbolTable) {
  const lines = [
    '%%{init: {"theme": "base", "themeVariables": {"actorBkg": "#e0f7fa", "actorTextColor": "#006064", "signalColor": "#546E7A", "labelBoxBkgColor": "#e8f5e9"}}}%%',
    "sequenceDiagram"
  ];
  let elementCount = 0;
  const partUsages = symbols.filter(
    (s) => s.kind === "part" /* PartUsage */ || s.kind === "occurrence" /* OccurrenceUsage */ || s.kind === "actor" /* ActorUsage */
  );
  const partDefs = symbols.filter(
    (s) => s.kind === "part def" /* PartDef */ || s.kind === "occurrence def" /* OccurrenceDef */
  );
  const participants = partUsages.length >= 2 ? partUsages : partDefs.length >= 2 ? partDefs : [...partUsages, ...partDefs];
  const messages = symbols.filter(
    (s) => s.kind === "action" /* ActionUsage */ || s.kind === "perform action" /* PerformActionUsage */
  );
  for (const p of participants) {
    const label = escapeLabel(p.name);
    if (p.kind === "actor" /* ActorUsage */) {
      lines.push(`    actor ${safeId(p.name)} as ${label}`);
    } else {
      lines.push(`    participant ${safeId(p.name)} as ${label}`);
    }
    elementCount++;
  }
  if (messages.length > 0 && participants.length >= 2) {
    const pIds = participants.map((p) => safeId(p.name));
    const n2 = pIds.length;
    for (let i = 0; i < messages.length; i++) {
      const msg = messages[i];
      const label = escapeLabel(msg.name);
      let srcIdx;
      let tgtIdx;
      if (msg.typeNames.length >= 2) {
        srcIdx = pIds.indexOf(safeId(msg.typeNames[0]));
        tgtIdx = pIds.indexOf(safeId(msg.typeNames[1]));
        if (srcIdx < 0) srcIdx = 0;
        if (tgtIdx < 0) tgtIdx = Math.min(1, n2 - 1);
      } else {
        const forwardSteps = n2 - 1;
        if (i < forwardSteps) {
          srcIdx = i;
          tgtIdx = i + 1;
        } else {
          const returnStep = i - forwardSteps;
          srcIdx = Math.max(0, n2 - 1 - returnStep);
          tgtIdx = Math.max(0, n2 - 2 - returnStep);
        }
      }
      lines.push(`    ${pIds[srcIdx]}->>+${pIds[tgtIdx]}: ${label}`);
      lines.push(`    ${pIds[tgtIdx]}-->>-${pIds[srcIdx]}: done`);
      elementCount++;
    }
  } else if (messages.length > 0) {
    for (const msg of messages) {
      lines.push(`    Note over ${participants.length > 0 ? safeId(participants[0].name) : "System"}: ${escapeLabel(msg.name)}`);
      elementCount++;
    }
  }
  if (elementCount === 0) {
    return generateGeneralView(symbols, symbolTable);
  }
  return {
    diagram: lines.join("\n"),
    diagramType: "sequence",
    description: `Sequence View showing ${participants.length} participants and ${messages.length} interactions`,
    elementCount
  };
}
function generateUseCaseView(symbols, symbolTable) {
  const lines = [
    '%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#e1f5fe", "lineColor": "#546E7A"}}}%%',
    "flowchart LR"
  ];
  const nodeStyles = /* @__PURE__ */ new Map();
  let elementCount = 0;
  const actors = symbols.filter((s) => s.kind === "actor" /* ActorUsage */);
  const subjects = symbols.filter((s) => s.kind === "subject" /* SubjectUsage */);
  const stakeholders = symbols.filter((s) => s.kind === "stakeholder" /* StakeholderUsage */);
  const allUseCaseDefs = symbols.filter((s) => s.kind === "use case def" /* UseCaseDef */);
  const allUseCaseUsages = symbols.filter((s) => s.kind === "use case" /* UseCaseUsage */);
  const includes = symbols.filter((s) => s.kind === "include use case" /* IncludeUseCaseUsage */);
  const untypedUsages = allUseCaseUsages.filter(
    (u) => !u.typeNames.some((t) => {
      const resolved = symbolTable.get(t) ?? [...symbolTable.values()].find((s) => s.name === t);
      return resolved && resolved.kind === "use case def" /* UseCaseDef */;
    })
  );
  const canonicalUseCases = [...allUseCaseDefs, ...untypedUsages];
  const uniqueActorNames = /* @__PURE__ */ new Map();
  for (const a of actors) {
    if (!uniqueActorNames.has(a.name)) uniqueActorNames.set(a.name, a);
  }
  lines.push("    %% Actors");
  for (const [name] of uniqueActorNames) {
    const id = `actor_${safeId(name)}`;
    lines.push(`    ${id}{{"\u{1F9D1} ${escapeLabel(name)}"}}`);
    nodeStyles.set(id, "ActorUsage");
    elementCount++;
  }
  const packages = symbols.filter((s) => s.kind === "package" /* Package */);
  const renderedUCs = /* @__PURE__ */ new Set();
  for (const pkg of packages) {
    const pkgId = safeId(pkg.qualifiedName);
    const childUCs = canonicalUseCases.filter(
      (uc) => uc.parentQualifiedName === pkg.qualifiedName || uc.parentQualifiedName?.startsWith(pkg.qualifiedName + "::")
    );
    if (childUCs.length > 0) {
      lines.push(`    subgraph ${pkgId}["\u{1F4E6} ${escapeLabel(pkg.name)}"]`);
      nodeStyles.set(pkgId, "Package");
      for (const uc of childUCs) {
        const ucId = safeId(uc.qualifiedName);
        lines.push(`        ${ucId}(["${escapeLabel(uc.name)}"])`);
        nodeStyles.set(ucId, "UseCaseDef");
        renderedUCs.add(uc.qualifiedName);
        elementCount++;
      }
      lines.push("    end");
      elementCount++;
    }
  }
  for (const uc of canonicalUseCases) {
    if (renderedUCs.has(uc.qualifiedName)) continue;
    const ucId = safeId(uc.qualifiedName);
    lines.push(`    ${ucId}(["${escapeLabel(uc.name)}"])`);
    nodeStyles.set(ucId, "UseCaseDef");
    renderedUCs.add(uc.qualifiedName);
    elementCount++;
  }
  const emittedEdges = /* @__PURE__ */ new Set();
  lines.push("    %% Associations");
  for (const actor of actors) {
    const actorId = `actor_${safeId(actor.name)}`;
    const parentSym = actor.parentQualifiedName ? symbolTable.get(actor.parentQualifiedName) : void 0;
    if (parentSym && parentSym.kind === "use case def" /* UseCaseDef */) {
      const ucId = safeId(parentSym.qualifiedName);
      const edgeKey = `${actorId}-->${ucId}`;
      if (!emittedEdges.has(edgeKey)) {
        lines.push(`    ${actorId} --> ${ucId}`);
        emittedEdges.add(edgeKey);
      }
      continue;
    }
    const siblings = canonicalUseCases.filter(
      (uc) => uc.parentQualifiedName === actor.parentQualifiedName
    );
    for (const uc of siblings) {
      const ucId = safeId(uc.qualifiedName);
      const edgeKey = `${actorId}-->${ucId}`;
      if (!emittedEdges.has(edgeKey)) {
        lines.push(`    ${actorId} --> ${ucId}`);
        emittedEdges.add(edgeKey);
      }
    }
  }
  for (const inc of includes) {
    if (inc.typeNames.length === 0) continue;
    const targetName = inc.typeNames[0];
    const target = symbolTable.get(targetName) ?? [...symbolTable.values()].find((s) => s.name === targetName);
    if (!target) continue;
    const srcQName = inc.parentQualifiedName;
    const src = srcQName ? symbolTable.get(srcQName) : void 0;
    if (src && (src.kind === "use case def" /* UseCaseDef */ || src.kind === "use case" /* UseCaseUsage */)) {
      lines.push(`    ${safeId(src.qualifiedName)} -.->|"\xABinclude\xBB"| ${safeId(target.qualifiedName)}`);
    }
  }
  for (const subj of subjects) {
    const subjId = safeId(subj.qualifiedName);
    lines.push(`    ${subjId}["\u{1F4CB} ${escapeLabel(subj.name)}"]`);
    nodeStyles.set(subjId, "SubjectUsage");
    elementCount++;
  }
  for (const sh of stakeholders) {
    const shId = safeId(sh.qualifiedName);
    lines.push(`    ${shId}{{"\u{1F464} ${escapeLabel(sh.name)}"}}`);
    nodeStyles.set(shId, "StakeholderUsage");
    elementCount++;
    const parentSym = sh.parentQualifiedName ? symbolTable.get(sh.parentQualifiedName) : void 0;
    if (parentSym && (parentSym.kind === "requirement def" /* RequirementDef */ || parentSym.kind === "requirement" /* RequirementUsage */)) {
      const reqId = safeId(parentSym.qualifiedName);
      lines.push(`    ${shId} -.->|"\xABstakeholder\xBB"| ${reqId}`);
    }
  }
  if (elementCount === 0) {
    return generateGeneralView(symbols, symbolTable);
  }
  emitStyleDirectives(lines, nodeStyles, "style");
  return {
    diagram: lines.join("\n"),
    diagramType: "usecase",
    description: `Use Case View showing ${actors.length} actors and ${canonicalUseCases.length} use cases`,
    elementCount
  };
}
function generateMermaidDiagram(symbols, allSymbols, diagramType) {
  const symbolTable = /* @__PURE__ */ new Map();
  for (const s of allSymbols) {
    symbolTable.set(s.qualifiedName, s);
    if (!symbolTable.has(s.name)) {
      symbolTable.set(s.name, s);
    }
  }
  const type = diagramType ?? inferDiagramType(symbols);
  switch (type) {
    case "activity":
      return generateActivityView(symbols, symbolTable);
    case "state":
      return generateStateView(symbols, symbolTable);
    case "sequence":
      return generateSequenceView(symbols, symbolTable);
    case "usecase":
      return generateUseCaseView(symbols, symbolTable);
    case "interconnection":
      return generateInterconnectionView(symbols, symbolTable);
    case "general":
    default:
      return generateGeneralView(symbols, symbolTable);
  }
}
function diffSymbols(originalSymbols, modifiedSymbols) {
  const origMap = new Map(originalSymbols.map((s) => [s.qualifiedName, s]));
  const modMap = new Map(modifiedSymbols.map((s) => [s.qualifiedName, s]));
  const added = [];
  const changed = [];
  const unchanged = [];
  const removed = [];
  for (const [qn, sym] of modMap) {
    const orig = origMap.get(qn);
    if (!orig) {
      added.push(sym);
    } else if (orig.kind !== sym.kind || orig.typeNames.join(",") !== sym.typeNames.join(",") || orig.children.length !== sym.children.length || orig.multiplicity !== sym.multiplicity || orig.documentation !== sym.documentation) {
      changed.push(sym);
    } else {
      unchanged.push(sym);
    }
  }
  for (const [qn] of origMap) {
    if (!modMap.has(qn)) {
      removed.push(qn);
    }
  }
  return { added, changed, removed, unchanged };
}

// server/node_modules/antlr4ng/dist/index.mjs
var __defProp2 = Object.defineProperty;
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
var IntStream;
((IntStream2) => {
  IntStream2.EOF = -1;
  IntStream2.UNKNOWN_SOURCE_NAME = "<unknown>";
})(IntStream || (IntStream = {}));
var Token;
((Token22) => {
  Token22.INVALID_TYPE = 0;
  Token22.EPSILON = -2;
  Token22.MIN_USER_TOKEN_TYPE = 1;
  Token22.EOF = IntStream.EOF;
  Token22.DEFAULT_CHANNEL = 0;
  Token22.HIDDEN_CHANNEL = 1;
  Token22.MIN_USER_CHANNEL_VALUE = 2;
})(Token || (Token = {}));
var isToken = /* @__PURE__ */ __name((candidate) => {
  const token = candidate;
  return token.tokenSource !== void 0 && token.channel !== void 0;
}, "isToken");
var BitSet = class {
  static {
    __name(this, "BitSet");
  }
  data;
  /**
   * Creates a new bit set. All bits are initially `false`.
   *
   * @param data Optional initial data.
   */
  constructor(data) {
    if (data) {
      this.data = new Uint32Array(data.map((value) => {
        return value >>> 0;
      }));
    } else {
      this.data = new Uint32Array(1);
    }
  }
  /**
   * @returns an iterator over all set bits.
   */
  [Symbol.iterator]() {
    const length = this.data.length;
    let currentIndex = 0;
    let currentWord = this.data[currentIndex];
    const words = this.data;
    return {
      [Symbol.iterator]() {
        return this;
      },
      next: /* @__PURE__ */ __name(() => {
        while (currentIndex < length) {
          if (currentWord !== 0) {
            const t = currentWord & -currentWord;
            const value = (currentIndex << 5) + this.bitCount(t - 1);
            currentWord ^= t;
            return { done: false, value };
          } else {
            currentIndex++;
            if (currentIndex < length) {
              currentWord = words[currentIndex];
            }
          }
        }
        return { done: true, value: void 0 };
      }, "next")
    };
  }
  /**
   * Sets a single bit or all of the bits in this `BitSet` to `false`.
   *
   * @param index the index of the bit to be cleared, or undefined to clear all bits.
   */
  clear(index2) {
    if (index2 === void 0) {
      this.data = new Uint32Array();
    } else {
      this.resize(index2);
      this.data[index2 >>> 5] &= ~(1 << index2);
    }
  }
  /**
   * Performs a logical **OR** of this bit set with the bit set argument. This bit set is modified so that a bit in it
   * has the value `true` if and only if it either already had the value `true` or the corresponding bit in the bit
   * set argument has the value `true`.
   *
   * @param set the bit set to be ORed with.
   */
  or(set2) {
    const minCount = Math.min(this.data.length, set2.data.length);
    for (let k = 0; k < minCount; ++k) {
      this.data[k] |= set2.data[k];
    }
    if (this.data.length < set2.data.length) {
      this.resize((set2.data.length << 5) - 1);
      const c = set2.data.length;
      for (let k = minCount; k < c; ++k) {
        this.data[k] = set2.data[k];
      }
    }
  }
  /**
   * Returns the value of the bit with the specified index. The value is `true` if the bit with the index `bitIndex`
   * is currently set in this `BitSet`; otherwise, the result is `false`.
   *
   * @param index the bit index
   *
   * @returns the value of the bit with the specified index.
   */
  get(index2) {
    if (index2 < 0) {
      throw new RangeError("index cannot be negative");
    }
    const slot = index2 >>> 5;
    if (slot >= this.data.length) {
      return false;
    }
    return (this.data[slot] & 1 << index2 % 32) !== 0;
  }
  /**
   * @returns the number of set bits.
   */
  get length() {
    let result = 0;
    const c = this.data.length;
    const w = this.data;
    for (let i = 0; i < c; i++) {
      result += this.bitCount(w[i]);
    }
    return result;
  }
  /**
   * @returns an array with indices of set bits.
   */
  values() {
    const result = new Array(this.length);
    let pos = 0;
    const length = this.data.length;
    for (let k = 0; k < length; ++k) {
      let w = this.data[k];
      while (w !== 0) {
        const t = w & -w;
        result[pos++] = (k << 5) + this.bitCount(t - 1);
        w ^= t;
      }
    }
    return result;
  }
  /**
   * @returns the index of the first bit that is set to `true` that occurs on or after the specified starting index.
   * If no such bit exists then undefined is returned.
   *
   * @param fromIndex the index to start checking from (inclusive)
   */
  nextSetBit(fromIndex) {
    if (fromIndex < 0) {
      throw new RangeError("index cannot be negative");
    }
    for (const index2 of this) {
      if (index2 >= fromIndex) {
        return index2;
      }
    }
    return void 0;
  }
  /**
   * Sets the bit at the specified index to `true`.
   *
   * @param index a bit index
   */
  set(index2) {
    if (index2 < 0) {
      throw new RangeError("index cannot be negative");
    }
    this.resize(index2);
    this.data[index2 >>> 5] |= 1 << index2 % 32;
  }
  /**
   * @returns a string representation of this bit set.
   */
  toString() {
    return "{" + this.values().join(", ") + "}";
  }
  resize(index2) {
    const count = index2 + 32 >>> 5;
    if (count <= this.data.length) {
      return;
    }
    const data = new Uint32Array(count);
    data.set(this.data);
    data.fill(0, this.data.length);
    this.data = data;
  }
  bitCount(v) {
    v = v - (v >> 1 & 1431655765);
    v = (v & 858993459) + (v >> 2 & 858993459);
    v = v + (v >> 4) & 252645135;
    v = v + (v >> 8);
    v = v + (v >> 16);
    return v & 63;
  }
};
var c1 = 3432918353;
var c2 = 461845907;
var r1 = 15;
var r2 = 13;
var m = 5;
var n = 3864292196;
var MurmurHash = class _MurmurHash {
  static {
    __name(this, "MurmurHash");
  }
  static defaultSeed = 701;
  constructor() {
  }
  /**
   * Initialize the hash using the specified {@code seed}.
   *
   * @param seed the seed
   *
   * @returns the intermediate hash value
   */
  static initialize(seed = _MurmurHash.defaultSeed) {
    return seed;
  }
  static updateFromComparable(hash2, value) {
    return this.update(hash2, value?.hashCode() ?? 0);
  }
  /**
   * Update the intermediate hash value for the next input {@code value}.
   *
   * @param hash The intermediate hash value.
   * @param value the value to add to the current hash.
   *
   * @returns the updated intermediate hash value
   */
  static update(hash2, value) {
    value = Math.imul(value, c1);
    value = value << r1 | value >>> 32 - r1;
    value = Math.imul(value, c2);
    hash2 = hash2 ^ value;
    hash2 = hash2 << r2 | hash2 >>> 32 - r2;
    hash2 = Math.imul(hash2, m) + n;
    return hash2;
  }
  /**
   * Apply the final computation steps to the intermediate value {@code hash}
   * to form the final result of the MurmurHash 3 hash function.
   *
   * @param hash The intermediate hash value.
   * @param entryCount The number of values added to the hash.
   *
   * @returns the final hash result
   */
  static finish(hash2, entryCount) {
    hash2 ^= entryCount * 4;
    hash2 ^= hash2 >>> 16;
    hash2 = Math.imul(hash2, 2246822507);
    hash2 ^= hash2 >>> 13;
    hash2 = Math.imul(hash2, 3266489909);
    hash2 ^= hash2 >>> 16;
    return hash2;
  }
  /**
   * An all-in-one convenience method to compute a hash for a single value.
   *
   * @param value The value to hash.
   * @param seed The seed for the hash value.
   *
   * @returns The computed hash.
   */
  static hashCode(value, seed) {
    return _MurmurHash.finish(_MurmurHash.update(seed ?? _MurmurHash.defaultSeed, value), 1);
  }
};
var ObjectEqualityComparator = class _ObjectEqualityComparator {
  static {
    __name(this, "ObjectEqualityComparator");
  }
  static instance = new _ObjectEqualityComparator();
  hashCode(obj) {
    if (obj == null) {
      return 0;
    }
    return obj.hashCode();
  }
  equals(a, b) {
    if (a == null) {
      return b == null;
    }
    return a.equals(b);
  }
};
var DefaultEqualityComparator = class _DefaultEqualityComparator {
  static {
    __name(this, "DefaultEqualityComparator");
  }
  static instance = new _DefaultEqualityComparator();
  hashCode(obj) {
    if (obj == null) {
      return 0;
    }
    return ObjectEqualityComparator.instance.hashCode(obj);
  }
  equals(a, b) {
    if (a == null) {
      return b == null;
    }
    if (typeof a === "string" || typeof a === "number") {
      return a === b;
    }
    return ObjectEqualityComparator.instance.equals(a, b);
  }
};
var HashSet = class _HashSet {
  static {
    __name(this, "HashSet");
  }
  static defaultLoadFactor = 0.75;
  static initialCapacity = 16;
  // must be power of 2
  comparator;
  buckets;
  threshold;
  /** How many elements in set */
  itemCount = 0;
  constructor(comparatorOrSet, initialCapacity = _HashSet.initialCapacity) {
    if (comparatorOrSet instanceof _HashSet) {
      this.comparator = comparatorOrSet.comparator;
      this.buckets = comparatorOrSet.buckets.slice(0);
      for (let i = 0; i < this.buckets.length; i++) {
        const bucket = this.buckets[i];
        if (bucket) {
          this.buckets[i] = bucket.slice(0);
        }
      }
      this.itemCount = comparatorOrSet.itemCount;
      this.threshold = comparatorOrSet.threshold;
    } else {
      this.comparator = comparatorOrSet ?? DefaultEqualityComparator.instance;
      this.buckets = this.createBuckets(initialCapacity);
      this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
    }
  }
  /**
   * Add `o` to set if not there; return existing value if already
   * there. This method performs the same operation as {@link #add} aside from
   * the return value.
   *
   * @param o the object to add to the set.
   *
   * @returns An existing element that equals to `o` if already in set, otherwise `o`.
   */
  getOrAdd(o) {
    if (this.itemCount > this.threshold) {
      this.expand();
    }
    const b = this.getBucket(o);
    let bucket = this.buckets[b];
    if (!bucket) {
      bucket = [o];
      this.buckets[b] = bucket;
      ++this.itemCount;
      return o;
    }
    for (const existing of bucket) {
      if (this.comparator.equals(existing, o)) {
        return existing;
      }
    }
    bucket.push(o);
    ++this.itemCount;
    return o;
  }
  get(o) {
    if (o == null) {
      return o;
    }
    const b = this.getBucket(o);
    const bucket = this.buckets[b];
    if (!bucket) {
      return void 0;
    }
    for (const e of bucket) {
      if (this.comparator.equals(e, o)) {
        return e;
      }
    }
    return void 0;
  }
  /**
   * Removes the specified element from this set if it is present.
   *
   * @param o object to be removed from this set, if present.
   *
   * @returns `true` if the set contained the specified element.
   */
  remove(o) {
    if (o == null) {
      return false;
    }
    const b = this.getBucket(o);
    const bucket = this.buckets[b];
    if (!bucket) {
      return false;
    }
    for (let i = 0; i < bucket.length; i++) {
      const existing = bucket[i];
      if (this.comparator.equals(existing, o)) {
        bucket.splice(i, 1);
        --this.itemCount;
        return true;
      }
    }
    return false;
  }
  hashCode() {
    let hash2 = MurmurHash.initialize();
    for (const bucket of this.buckets) {
      if (bucket == null) {
        continue;
      }
      for (const o of bucket) {
        if (o == null) {
          break;
        }
        hash2 = MurmurHash.update(hash2, this.comparator.hashCode(o));
      }
    }
    hash2 = MurmurHash.finish(hash2, this.size);
    return hash2;
  }
  equals(o) {
    if (o === this) {
      return true;
    }
    if (!(o instanceof _HashSet)) {
      return false;
    }
    if (o.size !== this.size) {
      return false;
    }
    return this.containsAll(o);
  }
  add(t) {
    const existing = this.getOrAdd(t);
    return existing === t;
  }
  contains(o) {
    return this.containsFast(o);
  }
  containsFast(obj) {
    if (obj == null) {
      return false;
    }
    return this.get(obj) !== void 0;
  }
  *[Symbol.iterator]() {
    yield* this.toArray();
  }
  toArray() {
    const a = new Array(this.size);
    let i = 0;
    for (const bucket of this.buckets) {
      if (bucket == null) {
        continue;
      }
      for (const o of bucket) {
        if (o == null) {
          break;
        }
        a[i++] = o;
      }
    }
    return a;
  }
  containsAll(collection) {
    if (collection instanceof _HashSet) {
      for (const bucket of collection.buckets) {
        if (bucket == null) {
          continue;
        }
        for (const o of bucket) {
          if (o == null) {
            break;
          }
          if (!this.containsFast(o)) {
            return false;
          }
        }
      }
    } else {
      for (const o of collection) {
        if (!this.containsFast(o)) {
          return false;
        }
      }
    }
    return true;
  }
  addAll(c) {
    let changed = false;
    for (const o of c) {
      const existing = this.getOrAdd(o);
      if (existing !== o) {
        changed = true;
      }
    }
    return changed;
  }
  clear() {
    this.buckets = this.createBuckets(_HashSet.initialCapacity);
    this.itemCount = 0;
    this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
  }
  toString() {
    if (this.size === 0) {
      return "{}";
    }
    let buf = "{";
    let first = true;
    for (const bucket of this.buckets) {
      if (bucket == null) {
        continue;
      }
      for (const o of bucket) {
        if (o == null) {
          break;
        }
        if (first) {
          first = false;
        } else {
          buf += ", ";
        }
        buf += o.toString();
      }
    }
    buf += "}";
    return buf;
  }
  toTableString() {
    let buf = "";
    for (const bucket of this.buckets) {
      if (bucket == null) {
        buf += "null\n";
        continue;
      }
      buf += "[";
      let first = true;
      for (const o of bucket) {
        if (first) {
          first = false;
        } else {
          buf += " ";
        }
        if (o == null) {
          buf += "_";
        } else {
          buf += o.toString();
        }
      }
      buf += "]\n";
    }
    return buf;
  }
  getBucket(o) {
    const hash2 = this.comparator.hashCode(o);
    const b = hash2 & this.buckets.length - 1;
    return b;
  }
  expand() {
    const old = this.buckets;
    const newCapacity = this.buckets.length * 2;
    const newTable = this.createBuckets(newCapacity);
    this.buckets = newTable;
    this.threshold = Math.floor(newCapacity * _HashSet.defaultLoadFactor);
    for (const bucket of old) {
      if (!bucket) {
        continue;
      }
      for (const o of bucket) {
        const b = this.getBucket(o);
        let newBucket = this.buckets[b];
        if (!newBucket) {
          newBucket = [];
          this.buckets[b] = newBucket;
        }
        newBucket.push(o);
      }
    }
  }
  get size() {
    return this.itemCount;
  }
  get isEmpty() {
    return this.itemCount === 0;
  }
  /**
   * Return an array of `T[]` with length `capacity`.
   *
   * @param capacity the length of the array to return
   * @returns the newly constructed array
   */
  createBuckets(capacity) {
    return new Array(capacity);
  }
};
var Interval = class _Interval {
  static {
    __name(this, "Interval");
  }
  static INVALID_INTERVAL = new _Interval(-1, -2);
  static INTERVAL_POOL_MAX_VALUE = 1e3;
  static cache = [];
  start;
  stop;
  cachedHashCode;
  constructor(start, stop) {
    this.start = start;
    this.stop = stop;
    this.cachedHashCode = Math.imul(651 + start, 31) + stop;
  }
  /**
   * Creates a new interval from the given values.
   *
   * Interval objects are used readonly so share all with the
   * same single value a==b up to some max size. Use an array as a perfect hash.
   * Return shared object for 0..INTERVAL_POOL_MAX_VALUE or a new
   * Interval object with a..a in it.  On Java.g4, 218623 IntervalSets
   * have a..a (set with 1 element).
   *
   * @param a The start of the interval.
   * @param b The end of the interval (inclusive).
   *
   * @returns A cached or new interval.
   */
  static of(a, b) {
    if (a !== b || a < 0 || a > _Interval.INTERVAL_POOL_MAX_VALUE) {
      return new _Interval(a, b);
    }
    if (!_Interval.cache[a]) {
      _Interval.cache[a] = new _Interval(a, a);
    }
    return _Interval.cache[a];
  }
  equals(o) {
    return this.start === o.start && this.stop === o.stop;
  }
  hashCode() {
    return this.cachedHashCode;
  }
  /** Does this start completely before other? Disjoint */
  startsBeforeDisjoint(other) {
    return this.start < other.start && this.stop < other.start;
  }
  /** Does this start at or before other? Nondisjoint */
  startsBeforeNonDisjoint(other) {
    return this.start <= other.start && this.stop >= other.start;
  }
  /** Does this.start start after other.stop? May or may not be disjoint */
  startsAfter(other) {
    return this.start > other.start;
  }
  /** Does this start completely after other? Disjoint */
  startsAfterDisjoint(other) {
    return this.start > other.stop;
  }
  /** Does this start after other? NonDisjoint */
  startsAfterNonDisjoint(other) {
    return this.start > other.start && this.start <= other.stop;
  }
  /** Are both ranges disjoint? I.e., no overlap? */
  disjoint(other) {
    return this.startsBeforeDisjoint(other) || this.startsAfterDisjoint(other);
  }
  /** Are two intervals adjacent such as 0..41 and 42..42? */
  adjacent(other) {
    return this.start === other.stop + 1 || this.stop === other.start - 1;
  }
  properlyContains(other) {
    return other.start >= this.start && other.stop <= this.stop;
  }
  /** Return the interval computed from combining this and other */
  union(other) {
    return _Interval.of(Math.min(this.start, other.start), Math.max(this.stop, other.stop));
  }
  /** Return the interval in common between this and o */
  intersection(other) {
    return _Interval.of(Math.max(this.start, other.start), Math.min(this.stop, other.stop));
  }
  /**
   * Return the interval with elements from this not in other;
   *  other must not be totally enclosed (properly contained)
   *  within this, which would result in two disjoint intervals
   *  instead of the single one returned by this method.
   */
  differenceNotProperlyContained(other) {
    let diff = null;
    if (other.startsBeforeNonDisjoint(this)) {
      diff = _Interval.of(Math.max(this.start, other.stop + 1), this.stop);
    } else if (other.startsAfterNonDisjoint(this)) {
      diff = _Interval.of(this.start, other.start - 1);
    }
    return diff;
  }
  toString() {
    return `${this.start}..${this.stop}`;
  }
  get length() {
    if (this.stop < this.start) {
      return 0;
    }
    return this.stop - this.start + 1;
  }
};
var Vocabulary = class _Vocabulary {
  static {
    __name(this, "Vocabulary");
  }
  static EMPTY_NAMES = [];
  /**
   * Gets an empty {@link Vocabulary} instance.
   *
   *
   * No literal or symbol names are assigned to token types, so
   * {@link #getDisplayName(int)} returns the numeric value for all tokens
   * except {@link Token#EOF}.
   */
  static EMPTY_VOCABULARY = new _Vocabulary(_Vocabulary.EMPTY_NAMES, _Vocabulary.EMPTY_NAMES, _Vocabulary.EMPTY_NAMES);
  maxTokenType;
  literalNames;
  symbolicNames;
  displayNames;
  /**
   * Constructs a new instance of {@link Vocabulary} from the specified
   * literal, symbolic, and display token names.
   *
   * @param literalNames The literal names assigned to tokens, or `null`
   * if no literal names are assigned.
   * @param symbolicNames The symbolic names assigned to tokens, or
   * `null` if no symbolic names are assigned.
   * @param displayNames The display names assigned to tokens, or `null`
   * to use the values in `literalNames` and `symbolicNames` as
   * the source of display names, as described in
   * {@link #getDisplayName(int)}.
   */
  constructor(literalNames, symbolicNames, displayNames) {
    this.literalNames = literalNames ?? _Vocabulary.EMPTY_NAMES;
    this.symbolicNames = symbolicNames ?? _Vocabulary.EMPTY_NAMES;
    this.displayNames = displayNames ?? _Vocabulary.EMPTY_NAMES;
    this.maxTokenType = Math.max(this.displayNames.length, Math.max(
      this.literalNames.length,
      this.symbolicNames.length
    )) - 1;
  }
  /**
   * Returns a {@link Vocabulary} instance from the specified set of token
   * names. This method acts as a compatibility layer for the single
   * `tokenNames` array generated by previous releases of ANTLR.
   *
   * The resulting vocabulary instance returns `null` for
   * {@link getLiteralName getLiteralName(int)} and {@link getSymbolicName getSymbolicName(int)}, and the
   * value from `tokenNames` for the display names.
   *
   * @param tokenNames The token names, or `null` if no token names are
   * available.
   * @returns A {@link Vocabulary} instance which uses `tokenNames` for
   * the display names of tokens.
   */
  static fromTokenNames(tokenNames) {
    if (tokenNames == null || tokenNames.length === 0) {
      return _Vocabulary.EMPTY_VOCABULARY;
    }
    const literalNames = [...tokenNames];
    const symbolicNames = [...tokenNames];
    for (let i = 0; i < tokenNames.length; i++) {
      const tokenName = tokenNames[i];
      if (tokenName == null) {
        continue;
      }
      if (tokenName.length > 0) {
        const firstChar = tokenName.codePointAt(0);
        if (firstChar === 39) {
          symbolicNames[i] = null;
          continue;
        } else if (firstChar >= 65 && firstChar <= 90) {
          literalNames[i] = null;
          continue;
        }
      }
      literalNames[i] = null;
      symbolicNames[i] = null;
    }
    return new _Vocabulary(literalNames, symbolicNames, tokenNames);
  }
  getMaxTokenType() {
    return this.maxTokenType;
  }
  getLiteralName(tokenType) {
    if (tokenType >= 0 && tokenType < this.literalNames.length) {
      return this.literalNames[tokenType];
    }
    return null;
  }
  getSymbolicName(tokenType) {
    if (tokenType >= 0 && tokenType < this.symbolicNames.length) {
      return this.symbolicNames[tokenType];
    }
    if (tokenType === Token.EOF) {
      return "EOF";
    }
    return null;
  }
  getDisplayName(tokenType) {
    if (tokenType >= 0 && tokenType < this.displayNames.length) {
      const displayName = this.displayNames[tokenType];
      if (displayName != null) {
        return displayName;
      }
    }
    const literalName = this.getLiteralName(tokenType);
    if (literalName != null) {
      return literalName;
    }
    const symbolicName = this.getSymbolicName(tokenType);
    if (symbolicName != null) {
      return symbolicName;
    }
    return `${tokenType}`;
  }
  getLiteralNames() {
    return this.literalNames;
  }
  getSymbolicNames() {
    return this.symbolicNames;
  }
  getDisplayNames() {
    return this.displayNames;
  }
};
var IntervalSet = class _IntervalSet {
  static {
    __name(this, "IntervalSet");
  }
  /** The list of sorted, disjoint intervals. */
  intervals = [];
  cachedHashCode;
  constructor(set2) {
    if (set2) {
      if (Array.isArray(set2)) {
        for (const el of set2) {
          this.addOne(el);
        }
      } else {
        this.addSet(set2);
      }
    }
  }
  /** Create a set with all ints within range [a..b] (inclusive) */
  static of(a, b) {
    const s = new _IntervalSet();
    s.addRange(a, b);
    return s;
  }
  /** Combine all sets in the array and return the union of them */
  static or(sets) {
    const result = new _IntervalSet();
    for (const set2 of sets) {
      result.addSet(set2);
    }
    return result;
  }
  [Symbol.iterator]() {
    return this.intervals[Symbol.iterator]();
  }
  get(index2) {
    return this.intervals[index2];
  }
  /**
   * Returns the minimum value contained in the set if not isNil().
   *
   * @returns the minimum value contained in the set.
   */
  get minElement() {
    if (this.intervals.length === 0) {
      return Token.INVALID_TYPE;
    }
    return this.intervals[0].start;
  }
  /**
   * Returns the maximum value contained in the set if not isNil().
   *
   * @returns the maximum value contained in the set.
   */
  get maxElement() {
    if (this.intervals.length === 0) {
      return Token.INVALID_TYPE;
    }
    return this.intervals[this.intervals.length - 1].stop;
  }
  clear() {
    this.cachedHashCode = void 0;
    this.intervals = [];
  }
  /**
   * Add a single element to the set.  An isolated element is stored
   *  as a range el..el.
   */
  addOne(v) {
    this.addInterval(new Interval(v, v));
  }
  /**
   * Add interval; i.e., add all integers from a to b to set.
   *  If b < a, do nothing.
   *  Keep list in sorted order (by left range value).
   *  If overlap, combine ranges. For example,
   *  If this is {1..5, 10..20}, adding 6..7 yields
   *  {1..5, 6..7, 10..20}. Adding 4..8 yields {1..8, 10..20}.
   */
  addRange(l, h) {
    this.addInterval(new Interval(l, h));
  }
  addInterval(addition) {
    this.cachedHashCode = void 0;
    if (this.intervals.length === 0) {
      this.intervals.push(addition);
    } else {
      for (let pos = 0; pos < this.intervals.length; pos++) {
        const existing = this.intervals[pos];
        if (addition.equals(existing)) {
          return;
        }
        if (addition.adjacent(existing) || !addition.disjoint(existing)) {
          const bigger = addition.union(existing);
          this.intervals[pos] = bigger;
          for (let sub = pos + 1; sub < this.intervals.length; ) {
            const next = this.intervals[sub];
            if (!bigger.adjacent(next) && bigger.disjoint(next)) {
              break;
            }
            this.intervals.splice(sub, 1);
            this.intervals[pos] = bigger.union(next);
          }
          return;
        }
        if (addition.startsBeforeDisjoint(existing)) {
          this.intervals.splice(pos, 0, addition);
          return;
        }
      }
      this.intervals.push(addition);
    }
  }
  addSet(other) {
    other.intervals.forEach((toAdd) => {
      return this.addInterval(toAdd);
    }, this);
    return this;
  }
  complementWithVocabulary(vocabulary) {
    const result = new _IntervalSet();
    if (!vocabulary) {
      return result;
    }
    if (vocabulary.length === 0) {
      return result;
    }
    result.addSet(vocabulary);
    return result.subtract(this);
  }
  complement(minElement, maxElement) {
    const result = new _IntervalSet();
    result.addInterval(new Interval(minElement, maxElement));
    return result.subtract(this);
  }
  /** combine all sets in the array returned the or'd value */
  or(sets) {
    const result = new _IntervalSet();
    result.addSet(this);
    sets.forEach((set2) => {
      return result.addSet(set2);
    });
    return result;
  }
  and(other) {
    if (other.length === 0) {
      return new _IntervalSet();
    }
    const myIntervals = this.intervals;
    const theirIntervals = other.intervals;
    let intersection2;
    const mySize = myIntervals.length;
    const theirSize = theirIntervals.length;
    let i = 0;
    let j = 0;
    while (i < mySize && j < theirSize) {
      const mine = myIntervals[i];
      const theirs = theirIntervals[j];
      if (mine.startsBeforeDisjoint(theirs)) {
        i++;
      } else if (theirs.startsBeforeDisjoint(mine)) {
        j++;
      } else if (mine.properlyContains(theirs)) {
        if (!intersection2) {
          intersection2 = new _IntervalSet();
        }
        intersection2.addInterval(mine.intersection(theirs));
        j++;
      } else if (theirs.properlyContains(mine)) {
        if (!intersection2) {
          intersection2 = new _IntervalSet();
        }
        intersection2.addInterval(mine.intersection(theirs));
        i++;
      } else if (!mine.disjoint(theirs)) {
        if (!intersection2) {
          intersection2 = new _IntervalSet();
        }
        intersection2.addInterval(mine.intersection(theirs));
        if (mine.startsAfterNonDisjoint(theirs)) {
          j++;
        } else if (theirs.startsAfterNonDisjoint(mine)) {
          i++;
        }
      }
    }
    if (!intersection2) {
      return new _IntervalSet();
    }
    return intersection2;
  }
  /**
   * Compute the set difference between two interval sets. The specific
   * operation is `left - right`. If either of the input sets is
   * `null`, it is treated as though it was an empty set.
   */
  subtract(other) {
    if (this.length === 0) {
      return new _IntervalSet();
    }
    const result = new _IntervalSet(this);
    if (other.length === 0) {
      return result;
    }
    let resultI = 0;
    let rightI = 0;
    while (resultI < result.intervals.length && rightI < other.intervals.length) {
      const resultInterval = result.intervals[resultI];
      const rightInterval = other.intervals[rightI];
      if (rightInterval.stop < resultInterval.start) {
        rightI++;
        continue;
      }
      if (rightInterval.start > resultInterval.stop) {
        resultI++;
        continue;
      }
      let beforeCurrent;
      let afterCurrent;
      if (rightInterval.start > resultInterval.start) {
        beforeCurrent = new Interval(resultInterval.start, rightInterval.start - 1);
      }
      if (rightInterval.stop < resultInterval.stop) {
        afterCurrent = new Interval(rightInterval.stop + 1, resultInterval.stop);
      }
      if (beforeCurrent) {
        if (afterCurrent) {
          result.intervals[resultI] = beforeCurrent;
          result.intervals.splice(resultI + 1, 0, afterCurrent);
          resultI++;
          rightI++;
        } else {
          result.intervals[resultI] = beforeCurrent;
          resultI++;
        }
      } else {
        if (afterCurrent) {
          result.intervals[resultI] = afterCurrent;
          rightI++;
        } else {
          result.intervals.splice(resultI, 1);
        }
      }
    }
    return result;
  }
  contains(el) {
    const n2 = this.intervals.length;
    let l = 0;
    let r = n2 - 1;
    while (l <= r) {
      const m2 = Math.floor((l + r) / 2);
      const interval = this.intervals[m2];
      if (interval.stop < el) {
        l = m2 + 1;
      } else if (interval.start > el) {
        r = m2 - 1;
      } else {
        return true;
      }
    }
    return false;
  }
  removeRange(toRemove) {
    this.cachedHashCode = void 0;
    if (toRemove.start === toRemove.stop) {
      this.removeOne(toRemove.start);
    } else if (this.intervals !== null) {
      let pos = 0;
      for (const existing of this.intervals) {
        if (toRemove.stop <= existing.start) {
          return;
        } else if (toRemove.start > existing.start && toRemove.stop < existing.stop) {
          this.intervals[pos] = new Interval(existing.start, toRemove.start);
          const x = new Interval(toRemove.stop, existing.stop);
          this.intervals.splice(pos, 0, x);
          return;
        } else if (toRemove.start <= existing.start && toRemove.stop >= existing.stop) {
          this.intervals.splice(pos, 1);
          pos = pos - 1;
        } else if (toRemove.start < existing.stop) {
          this.intervals[pos] = new Interval(existing.start, toRemove.start);
        } else if (toRemove.stop < existing.stop) {
          this.intervals[pos] = new Interval(toRemove.stop, existing.stop);
        }
        pos += 1;
      }
    }
  }
  removeOne(value) {
    this.cachedHashCode = void 0;
    for (let i = 0; i < this.intervals.length; i++) {
      const existing = this.intervals[i];
      if (value < existing.start) {
        return;
      } else if (value === existing.start && value === existing.stop) {
        this.intervals.splice(i, 1);
        return;
      } else if (value === existing.start) {
        this.intervals[i] = new Interval(existing.start + 1, existing.stop);
        return;
      } else if (value === existing.stop) {
        this.intervals[i] = new Interval(existing.start, existing.stop - 1);
        return;
      } else if (value < existing.stop) {
        const replace = new Interval(existing.start, value - 1);
        this.intervals[i] = new Interval(value + 1, existing.stop);
        this.intervals.splice(i, 0, replace);
        return;
      }
    }
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      for (const interval of this.intervals) {
        hash2 = MurmurHash.update(hash2, interval.start);
        hash2 = MurmurHash.update(hash2, interval.stop);
      }
      this.cachedHashCode = MurmurHash.finish(hash2, this.intervals.length * 2);
    }
    return this.cachedHashCode;
  }
  /**
   * Are two IntervalSets equal? Because all intervals are sorted and disjoint, equals is a simple linear walk over
   * both lists to make sure they are the same. Interval.equals() is used by the List.equals() method to check
   * the ranges.
   */
  equals(other) {
    if (this === other) {
      return true;
    }
    if (this.intervals.length !== other.intervals.length) {
      return false;
    }
    for (let i = 0; i < this.intervals.length; i++) {
      if (!this.intervals[i].equals(other.intervals[i])) {
        return false;
      }
    }
    return true;
  }
  toString(elementsAreChar) {
    if (this.intervals.length === 0) {
      return "{}";
    }
    let result = "";
    if (this.length > 1) {
      result += "{";
    }
    for (let i = 0; i < this.intervals.length; ++i) {
      const interval = this.intervals[i];
      const start = interval.start;
      const stop = interval.stop;
      if (start === stop) {
        if (start === Token.EOF) {
          result += "<EOF>";
        } else if (elementsAreChar) {
          result += "'" + String.fromCodePoint(start) + "'";
        } else {
          result += start;
        }
      } else {
        if (elementsAreChar) {
          result += "'" + String.fromCodePoint(start) + "'..'" + String.fromCodePoint(stop) + "'";
        } else {
          result += start + ".." + stop;
        }
      }
      if (i < this.intervals.length - 1) {
        result += ", ";
      }
    }
    if (this.length > 1) {
      result += "}";
    }
    return result;
  }
  toStringWithVocabulary(vocabulary) {
    if (this.intervals.length === 0) {
      return "{}";
    }
    let result = "";
    if (this.length > 1) {
      result += "{";
    }
    for (let i = 0; i < this.intervals.length; ++i) {
      const interval = this.intervals[i];
      const start = interval.start;
      const stop = interval.stop;
      if (start === stop) {
        if (start === Token.EOF) {
          result += "<EOF>";
        } else {
          result += this.elementName(vocabulary, start);
        }
      } else {
        for (let i2 = start; i2 <= stop; ++i2) {
          if (i2 > start) {
            result += ", ";
          }
          result += this.elementName(vocabulary, i2);
        }
      }
      if (i < this.intervals.length - 1) {
        result += ", ";
      }
    }
    if (this.length > 1) {
      result += "}";
    }
    return result;
  }
  toStringWithRuleNames(ruleNames) {
    if (this.intervals.length === 0) {
      return "{}";
    }
    let result = "";
    if (this.length > 1) {
      result += "{";
    }
    const vocabulary = Vocabulary.fromTokenNames(ruleNames);
    for (let i = 0; i < this.intervals.length; ++i) {
      const interval = this.intervals[i];
      const start = interval.start;
      const stop = interval.stop;
      if (start === stop) {
        if (start === Token.EOF) {
          result += "<EOF>";
        } else {
          result += this.elementName(vocabulary, start);
        }
      } else {
        for (let i2 = start; i2 <= stop; ++i2) {
          if (i2 > start) {
            result += ", ";
          }
          result += this.elementName(vocabulary, i2);
        }
      }
      if (i < this.intervals.length - 1) {
        result += ", ";
      }
    }
    if (this.length > 1) {
      result += "}";
    }
    return result;
  }
  toArray() {
    const data = [];
    for (const interval of this.intervals) {
      for (let j = interval.start; j <= interval.stop; j++) {
        data.push(j);
      }
    }
    return data;
  }
  /** @returns the number of elements in this set. */
  get length() {
    let result = 0;
    for (const interval of this.intervals) {
      result += interval.length;
    }
    return result;
  }
  elementName(vocabulary, token) {
    if (token === Token.EOF) {
      return "<EOF>";
    }
    if (token === Token.EPSILON) {
      return "<EPSILON>";
    }
    return vocabulary.getDisplayName(token);
  }
};
var valueToString = /* @__PURE__ */ __name((v) => {
  return v === null ? "null" : v;
}, "valueToString");
var arrayToString = /* @__PURE__ */ __name((value) => {
  return Array.isArray(value) ? "[" + value.map(valueToString).join(", ") + "]" : "null";
}, "arrayToString");
var equalArrays = /* @__PURE__ */ __name((a, b) => {
  if (a === b) {
    return true;
  }
  if (a.length !== b.length) {
    return false;
  }
  for (let i = 0; i < a.length; i++) {
    const left = a[i];
    const right = b[i];
    if (left === right) {
      continue;
    }
    if (!left || !left.equals(right)) {
      return false;
    }
  }
  return true;
}, "equalArrays");
var equalNumberArrays = /* @__PURE__ */ __name((a, b) => {
  if (a === b) {
    return true;
  }
  if (a.length !== b.length) {
    return false;
  }
  for (let i = 0; i < a.length; i++) {
    if (a[i] !== b[i]) {
      return false;
    }
  }
  return true;
}, "equalNumberArrays");
var escapeWhitespace = /* @__PURE__ */ __name((s, escapeSpaces = false) => {
  s = s.replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r");
  if (escapeSpaces) {
    s = s.replace(/ /g, "\xB7");
  }
  return s;
}, "escapeWhitespace");
var SemanticContext = class _SemanticContext {
  static {
    __name(this, "SemanticContext");
  }
  cachedHashCode;
  static andContext(a, b) {
    if (a === null || a === _SemanticContext.NONE) {
      return b;
    }
    if (b === null || b === _SemanticContext.NONE) {
      return a;
    }
    const result = new AND(a, b);
    if (result.operands.length === 1) {
      return result.operands[0];
    }
    return result;
  }
  static orContext(a, b) {
    if (a === null) {
      return b;
    }
    if (b === null) {
      return a;
    }
    if (a === _SemanticContext.NONE || b === _SemanticContext.NONE) {
      return _SemanticContext.NONE;
    }
    const result = new OR(a, b);
    if (result.operands.length === 1) {
      return result.operands[0];
    } else {
      return result;
    }
  }
  static filterPrecedencePredicates(set2) {
    const result = [];
    for (const context of set2) {
      if (context instanceof _SemanticContext.PrecedencePredicate) {
        result.push(context);
      }
    }
    return result;
  }
  /**
   * Evaluate the precedence predicates for the context and reduce the result.
   *
   * @param _parser The parser instance.
   * @param _parserCallStack The current parser context object.
   * @returns The simplified semantic context after precedence predicates are
   * evaluated, which will be one of the following values.
   * - {@link NONE}: if the predicate simplifies to `true` after
   * precedence predicates are evaluated.
   * - `null`: if the predicate simplifies to `false` after
   * precedence predicates are evaluated.
   * - `this`: if the semantic context is not changed as a result of
   * precedence predicate evaluation.
   * - A non-`null` {@link SemanticContext}: the new simplified
   * semantic context after precedence predicates are evaluated.
   */
  evalPrecedence(_parser, _parserCallStack) {
    return this;
  }
};
var AND = class _AND extends SemanticContext {
  static {
    __name(this, "AND");
  }
  operands;
  /**
   * A semantic context which is true whenever none of the contained contexts
   * is false
   */
  constructor(a, b) {
    super();
    const operands = new HashSet();
    if (a instanceof _AND) {
      a.operands.forEach((o) => {
        operands.add(o);
      });
    } else {
      operands.add(a);
    }
    if (b instanceof _AND) {
      b.operands.forEach((o) => {
        operands.add(o);
      });
    } else {
      operands.add(b);
    }
    const precedencePredicates = SemanticContext.filterPrecedencePredicates(operands);
    if (precedencePredicates.length > 0) {
      let reduced = null;
      precedencePredicates.forEach((p) => {
        if (reduced === null || p.precedence < reduced.precedence) {
          reduced = p;
        }
      });
      if (reduced) {
        operands.add(reduced);
      }
    }
    this.operands = operands.toArray();
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _AND)) {
      return false;
    }
    return equalArrays(this.operands, other.operands);
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      for (const operand of this.operands) {
        hash2 = MurmurHash.updateFromComparable(hash2, operand);
      }
      hash2 = MurmurHash.update(hash2, 3813686060);
      this.cachedHashCode = MurmurHash.finish(hash2, this.operands.length + 1);
    }
    return this.cachedHashCode;
  }
  /**
   * {@inheritDoc}
   *
   *
   * The evaluation of predicates by this context is short-circuiting, but
   * unordered.
   */
  evaluate(parser, parserCallStack) {
    for (const operand of this.operands) {
      if (!operand.evaluate(parser, parserCallStack)) {
        return false;
      }
    }
    return true;
  }
  evalPrecedence(parser, parserCallStack) {
    let differs = false;
    const operands = [];
    for (const context of this.operands) {
      const evaluated = context.evalPrecedence(parser, parserCallStack);
      differs ||= evaluated !== context;
      if (evaluated === null) {
        return null;
      } else if (evaluated !== SemanticContext.NONE) {
        operands.push(evaluated);
      }
    }
    if (!differs) {
      return this;
    }
    if (operands.length === 0) {
      return SemanticContext.NONE;
    }
    let result = null;
    operands.forEach((o) => {
      result = result === null ? o : SemanticContext.andContext(result, o);
    });
    return result;
  }
  toString() {
    const s = this.operands.map((o) => {
      return o.toString();
    });
    return (s.length > 3 ? s.slice(3) : s).join("&&");
  }
};
var OR = class _OR extends SemanticContext {
  static {
    __name(this, "OR");
  }
  operands;
  /**
   * A semantic context which is true whenever at least one of the contained
   * contexts is true
   */
  constructor(a, b) {
    super();
    const operands = new HashSet();
    if (a instanceof _OR) {
      a.operands.forEach((o) => {
        operands.add(o);
      });
    } else {
      operands.add(a);
    }
    if (b instanceof _OR) {
      b.operands.forEach((o) => {
        operands.add(o);
      });
    } else {
      operands.add(b);
    }
    const precedencePredicates = SemanticContext.filterPrecedencePredicates(operands);
    if (precedencePredicates.length > 0) {
      const s = precedencePredicates.sort((a2, b2) => {
        return a2.compareTo(b2);
      });
      const reduced = s[s.length - 1];
      operands.add(reduced);
    }
    this.operands = operands.toArray();
  }
  equals(other) {
    if (this === other) {
      return true;
    } else if (!(other instanceof _OR)) {
      return false;
    } else {
      return equalArrays(this.operands, other.operands);
    }
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      for (const operand of this.operands) {
        hash2 = MurmurHash.updateFromComparable(hash2, operand);
      }
      hash2 = MurmurHash.update(hash2, 3383313031);
      this.cachedHashCode = MurmurHash.finish(hash2, this.operands.length + 1);
    }
    return this.cachedHashCode;
  }
  /**
   * The evaluation of predicates by this context is short-circuiting, but unordered.
   */
  evaluate(parser, parserCallStack) {
    for (const operand of this.operands) {
      if (operand.evaluate(parser, parserCallStack)) {
        return true;
      }
    }
    return false;
  }
  evalPrecedence(parser, parserCallStack) {
    let differs = false;
    const operands = [];
    for (const context of this.operands) {
      const evaluated = context.evalPrecedence(parser, parserCallStack);
      differs ||= evaluated !== context;
      if (evaluated === SemanticContext.NONE) {
        return SemanticContext.NONE;
      } else if (evaluated !== null) {
        operands.push(evaluated);
      }
    }
    if (!differs) {
      return this;
    }
    if (operands.length === 0) {
      return null;
    }
    let result = null;
    operands.forEach((o) => {
      result = result === null ? o : SemanticContext.orContext(result, o);
    });
    return result;
  }
  toString() {
    const s = this.operands.map((o) => {
      return o.toString();
    });
    return (s.length > 3 ? s.slice(3) : s).join("||");
  }
};
((SemanticContext2) => {
  class Predicate extends SemanticContext2 {
    static {
      __name(this, "Predicate");
    }
    ruleIndex;
    predIndex;
    isCtxDependent;
    // e.g., $i ref in pred
    constructor(ruleIndex, predIndex, isCtxDependent) {
      super();
      this.ruleIndex = ruleIndex ?? -1;
      this.predIndex = predIndex ?? -1;
      this.isCtxDependent = isCtxDependent ?? false;
    }
    evaluate(parser, outerContext) {
      const localctx = this.isCtxDependent ? outerContext : null;
      return parser.sempred(localctx, this.ruleIndex, this.predIndex);
    }
    hashCode() {
      if (this.cachedHashCode === void 0) {
        let hashCode = MurmurHash.initialize();
        hashCode = MurmurHash.update(hashCode, this.ruleIndex);
        hashCode = MurmurHash.update(hashCode, this.predIndex);
        hashCode = MurmurHash.update(hashCode, this.isCtxDependent ? 1 : 0);
        hashCode = MurmurHash.finish(hashCode, 3);
        this.cachedHashCode = hashCode;
      }
      return this.cachedHashCode;
    }
    equals(other) {
      if (this === other) {
        return true;
      }
      return this.ruleIndex === other.ruleIndex && this.predIndex === other.predIndex && this.isCtxDependent === other.isCtxDependent;
    }
    toString() {
      return "{" + this.ruleIndex + ":" + this.predIndex + "}?";
    }
  }
  SemanticContext2.Predicate = Predicate;
  class PrecedencePredicate extends SemanticContext2 {
    static {
      __name(this, "PrecedencePredicate");
    }
    precedence;
    constructor(precedence) {
      super();
      this.precedence = precedence ?? 0;
    }
    evaluate(parser, outerContext) {
      return parser.precpred(outerContext, this.precedence);
    }
    evalPrecedence(parser, outerContext) {
      if (parser.precpred(outerContext ?? null, this.precedence)) {
        return SemanticContext2.NONE;
      }
      return null;
    }
    compareTo(other) {
      return this.precedence - other.precedence;
    }
    hashCode() {
      return 31 + this.precedence;
    }
    equals(other) {
      if (this === other) {
        return true;
      }
      return this.precedence === other.precedence;
    }
    toString() {
      return "{" + this.precedence + ">=prec}?";
    }
  }
  SemanticContext2.PrecedencePredicate = PrecedencePredicate;
  SemanticContext2.NONE = new Predicate();
})(SemanticContext || (SemanticContext = {}));
var ATNConfig = class _ATNConfig {
  static {
    __name(this, "ATNConfig");
  }
  /** The ATN state associated with this configuration */
  state;
  /** What alt (or lexer rule) is predicted by this configuration */
  alt;
  /**
   * We cannot execute predicates dependent upon local context unless
   * we know for sure we are in the correct context. Because there is
   * no way to do this efficiently, we simply cannot evaluate
   * dependent predicates unless we are in the rule that initially
   * invokes the ATN simulator.
   *
   * closure() tracks the depth of how far we dip into the outer context:
   * depth > 0.
   */
  reachesIntoOuterContext = false;
  // Not used in hash code.
  precedenceFilterSuppressed = false;
  // Not used in hash code.
  get semanticContext() {
    return this.#semanticContext;
  }
  cachedHashCode;
  // Shared with LexerATNConfig.
  /**
   * The syntactic context is a graph-structured stack node whose
   * path(s) to the root is the rule invocation(s)
   * chain used to arrive at the state.  The semantic context is
   * the tree of semantic predicates encountered before reaching
   * an ATN state
   */
  #context = null;
  #semanticContext;
  /** Never create config classes directly. Use the factory methods below. */
  constructor(c, state, context, semanticContext) {
    this.state = state;
    this.alt = c.alt;
    this.context = context;
    this.#semanticContext = semanticContext ?? SemanticContext.NONE;
    this.reachesIntoOuterContext = c.reachesIntoOuterContext;
    if (c.precedenceFilterSuppressed !== void 0) {
      this.precedenceFilterSuppressed = c.precedenceFilterSuppressed;
    }
  }
  static duplicate(old, semanticContext) {
    return new _ATNConfig(old, old.state, old.context, semanticContext ?? old.semanticContext);
  }
  static createWithContext(state, alt, context, semanticContext) {
    return new _ATNConfig({ alt }, state, context, semanticContext);
  }
  static createWithConfig(state, config2, context) {
    return new _ATNConfig(config2, state, context ?? config2.context, config2.semanticContext);
  }
  static createWithSemanticContext(state, c, semanticContext) {
    return new _ATNConfig(c, state ?? c.state, c.context, semanticContext);
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hashCode = MurmurHash.initialize(7);
      hashCode = MurmurHash.update(hashCode, this.state.stateNumber);
      hashCode = MurmurHash.update(hashCode, this.alt);
      hashCode = MurmurHash.updateFromComparable(hashCode, this.#context);
      hashCode = MurmurHash.updateFromComparable(hashCode, this.semanticContext);
      hashCode = MurmurHash.finish(hashCode, 4);
      this.cachedHashCode = hashCode;
    }
    return this.cachedHashCode;
  }
  /**
   * The stack of invoking states leading to the rule/states associated
   * with this config.  We track only those contexts pushed during
   * execution of the ATN simulator.
   */
  get context() {
    return this.#context;
  }
  set context(context) {
    this.#context = context;
    this.cachedHashCode = void 0;
  }
  /**
   * An ATN configuration is equal to another if both have
   * the same state, they predict the same alternative, and
   * syntactic/semantic contexts are the same.
   */
  equals(other) {
    if (this === other) {
      return true;
    }
    return this.state.stateNumber === other.state.stateNumber && this.alt === other.alt && (this.context === null ? other.context === null : this.context.equals(other.context)) && this.semanticContext.equals(other.semanticContext) && this.precedenceFilterSuppressed === other.precedenceFilterSuppressed;
  }
  toString(_recog, showAlt = true) {
    let alt = "";
    if (showAlt) {
      alt = "," + this.alt;
    }
    return "(" + this.state + alt + (this.context !== null ? ",[" + this.context.toString() + "]" : "") + (this.semanticContext !== SemanticContext.NONE ? "," + this.semanticContext.toString() : "") + (this.reachesIntoOuterContext ? ",up=" + this.reachesIntoOuterContext : "") + ")";
  }
};
var ATNState = class _ATNState {
  static {
    __name(this, "ATNState");
  }
  static INVALID_STATE_NUMBER = -1;
  static INVALID_TYPE = 0;
  static BASIC = 1;
  static RULE_START = 2;
  static BLOCK_START = 3;
  static PLUS_BLOCK_START = 4;
  static STAR_BLOCK_START = 5;
  static TOKEN_START = 6;
  static RULE_STOP = 7;
  static BLOCK_END = 8;
  static STAR_LOOP_BACK = 9;
  static STAR_LOOP_ENTRY = 10;
  static PLUS_LOOP_BACK = 11;
  static LOOP_END = 12;
  static stateType = _ATNState.INVALID_STATE_NUMBER;
  stateNumber = 0;
  ruleIndex = 0;
  // at runtime, we don't have Rule objects
  epsilonOnlyTransitions = false;
  /** Used to cache lookahead during parsing, not used during construction */
  nextTokenWithinRule;
  /** Track the transitions emanating from this ATN state. */
  transitions = [];
  hashCode() {
    return this.stateNumber;
  }
  equals(other) {
    return this.stateNumber === other.stateNumber;
  }
  toString() {
    return `${this.stateNumber}`;
  }
  addTransitionAtIndex(index2, transition) {
    if (this.transitions.length === 0) {
      this.epsilonOnlyTransitions = transition.isEpsilon;
    } else if (this.epsilonOnlyTransitions !== transition.isEpsilon) {
      this.epsilonOnlyTransitions = false;
    }
    this.transitions.splice(index2, 0, transition);
  }
  addTransition(transition) {
    if (this.transitions.length === 0) {
      this.epsilonOnlyTransitions = transition.isEpsilon;
    } else if (this.epsilonOnlyTransitions !== transition.isEpsilon) {
      this.epsilonOnlyTransitions = false;
    }
    this.transitions.push(transition);
  }
  setTransition(i, e) {
    this.transitions.splice(i, 1, e);
  }
  removeTransition(index2) {
    const t = this.transitions.splice(index2, 1);
    return t[0];
  }
};
var PredictionContext = class _PredictionContext {
  static {
    __name(this, "PredictionContext");
  }
  /**
   * Represents `$` in an array in full context mode, when `$`
   * doesn't mean wildcard: `$ + x = [$,x]`. Here,
   * `$` = {@link EMPTY_RETURN_STATE}.
   */
  static EMPTY_RETURN_STATE = 2147483647;
  static traceATNSimulator = false;
  cachedHashCode;
  constructor(cachedHashCode) {
    this.cachedHashCode = cachedHashCode;
  }
  static calculateEmptyHashCode() {
    let hash2 = MurmurHash.initialize(31);
    hash2 = MurmurHash.finish(hash2, 0);
    return hash2;
  }
  static calculateHashCodeSingle(parent, returnState) {
    let hash2 = MurmurHash.initialize(31);
    hash2 = MurmurHash.updateFromComparable(hash2, parent);
    hash2 = MurmurHash.update(hash2, returnState);
    hash2 = MurmurHash.finish(hash2, 2);
    return hash2;
  }
  static calculateHashCodeList(parents, returnStates) {
    let hash2 = MurmurHash.initialize(31);
    for (const parent of parents) {
      hash2 = MurmurHash.updateFromComparable(hash2, parent);
    }
    for (const returnState of returnStates) {
      hash2 = MurmurHash.update(hash2, returnState);
    }
    hash2 = MurmurHash.finish(hash2, 2 * parents.length);
    return hash2;
  }
  isEmpty() {
    return false;
  }
  hasEmptyPath() {
    return this.getReturnState(this.length - 1) === _PredictionContext.EMPTY_RETURN_STATE;
  }
  hashCode() {
    return this.cachedHashCode;
  }
  toString(_recog) {
    return "";
  }
};
var SingletonPredictionContext = class _SingletonPredictionContext extends PredictionContext {
  static {
    __name(this, "SingletonPredictionContext");
  }
  parent;
  returnState;
  constructor(parent, returnState) {
    super(
      parent ? PredictionContext.calculateHashCodeSingle(parent, returnState) : PredictionContext.calculateEmptyHashCode()
    );
    this.parent = parent ?? null;
    this.returnState = returnState;
  }
  getParent(_index) {
    return this.parent;
  }
  getReturnState(_index) {
    return this.returnState;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _SingletonPredictionContext)) {
      return false;
    }
    if (this.hashCode() !== other.hashCode()) {
      return false;
    }
    if (this.returnState !== other.returnState) {
      return false;
    }
    if (this.parent == null) {
      return other.parent == null;
    }
    return this.parent.equals(other.parent);
  }
  toString() {
    const up = this.parent === null ? "" : this.parent.toString();
    if (up.length === 0) {
      if (this.returnState === PredictionContext.EMPTY_RETURN_STATE) {
        return "$";
      }
      return "" + this.returnState;
    } else {
      return "" + this.returnState + " " + up;
    }
  }
  get length() {
    return 1;
  }
};
var EmptyPredictionContext = class _EmptyPredictionContext extends SingletonPredictionContext {
  static {
    __name(this, "EmptyPredictionContext");
  }
  /**
   * Represents `$` in local context prediction, which means wildcard.
   * `*+x = *`.
   */
  static instance = new _EmptyPredictionContext();
  constructor() {
    super(void 0, PredictionContext.EMPTY_RETURN_STATE);
  }
  isEmpty() {
    return true;
  }
  getParent() {
    return null;
  }
  getReturnState() {
    return this.returnState;
  }
  equals(other) {
    return this === other;
  }
  toString() {
    return "$";
  }
};
var Transition = class {
  static {
    __name(this, "Transition");
  }
  static INVALID = 0;
  static EPSILON = 1;
  static RANGE = 2;
  static RULE = 3;
  static PREDICATE = 4;
  // e.g., {isType(input.LT(1))}
  static ATOM = 5;
  static ACTION = 6;
  static SET = 7;
  // ~(A|B) or ~atom, wildcard, which convert to next
  static NOT_SET = 8;
  static WILDCARD = 9;
  static PRECEDENCE = 10;
  /** The target of this transition. */
  target;
  constructor(target) {
    this.target = target;
  }
  /**
   * Determines if the transition is an "epsilon" transition.
   *
   * The default implementation returns `false`.
   *
   * @returns `true` if traversing this transition in the ATN does not
   * consume an input symbol; otherwise, `false` if traversing this
   * transition consumes (matches) an input symbol.
   */
  get isEpsilon() {
    return false;
  }
  get label() {
    return null;
  }
  toString() {
    return "";
  }
};
var SetTransition = class extends Transition {
  static {
    __name(this, "SetTransition");
  }
  set;
  constructor(target, set2) {
    super(target);
    if (set2) {
      this.set = set2;
    } else {
      this.set = IntervalSet.of(Token.INVALID_TYPE, Token.INVALID_TYPE);
    }
  }
  get transitionType() {
    return Transition.SET;
  }
  get label() {
    return this.set;
  }
  matches(symbol2, _minVocabSymbol, _maxVocabSymbol) {
    return this.set.contains(symbol2);
  }
  toString() {
    return this.set.toString();
  }
};
var NotSetTransition = class extends SetTransition {
  static {
    __name(this, "NotSetTransition");
  }
  get transitionType() {
    return Transition.NOT_SET;
  }
  matches(symbol2, minVocabSymbol, maxVocabSymbol) {
    return symbol2 >= minVocabSymbol && symbol2 <= maxVocabSymbol && !super.matches(symbol2, minVocabSymbol, maxVocabSymbol);
  }
  toString() {
    return "~" + super.toString();
  }
};
var MapKeyEqualityComparator = class {
  static {
    __name(this, "MapKeyEqualityComparator");
  }
  keyComparator;
  constructor(keyComparator) {
    this.keyComparator = keyComparator;
  }
  hashCode(obj) {
    return this.keyComparator.hashCode(obj.key);
  }
  equals(a, b) {
    return this.keyComparator.equals(a.key, b.key);
  }
};
var HashMap = class _HashMap {
  static {
    __name(this, "HashMap");
  }
  backingStore;
  constructor(keyComparer) {
    if (keyComparer instanceof _HashMap) {
      this.backingStore = new HashSet(keyComparer.backingStore);
    } else {
      keyComparer = keyComparer ?? DefaultEqualityComparator.instance;
      this.backingStore = new HashSet(new MapKeyEqualityComparator(keyComparer));
    }
  }
  clear() {
    this.backingStore.clear();
  }
  containsKey(key) {
    return this.backingStore.contains({ key });
  }
  get(key) {
    const bucket = this.backingStore.get({ key });
    if (!bucket) {
      return void 0;
    }
    return bucket.value;
  }
  get isEmpty() {
    return this.backingStore.isEmpty;
  }
  /**
   * Sets the value for a key in the map. If the key is not present in the map, it is added.
   * If the key is present, the value is updated and the old value is returned.
   *
   * @param key The key to set.
   * @param value The value to set.
   *
   * @returns The old value for the key, if present.
   */
  set(key, value) {
    const element = this.backingStore.get({ key, value });
    let result;
    if (!element) {
      this.backingStore.add({ key, value });
    } else {
      result = element.value;
      element.value = value;
    }
    return result;
  }
  /**
   * Sets the value for a key in the map if the key is not already present. Otherwise the value is not changed and
   * the old value is returned.
   *
   * @param key The key to set.
   * @param value The value to set.
   *
   * @returns The current value for the key, if present.
   */
  setIfAbsent(key, value) {
    const element = this.backingStore.get({ key, value });
    let result;
    if (!element) {
      this.backingStore.add({ key, value });
    } else {
      result = element.value;
    }
    return result;
  }
  keys() {
    return this.backingStore.toArray().map((bucket) => {
      return bucket.key;
    });
  }
  values() {
    return this.backingStore.toArray().map((bucket) => {
      return bucket.value;
    });
  }
  get size() {
    return this.backingStore.size;
  }
  hashCode() {
    return this.backingStore.hashCode();
  }
  equals(o) {
    return this.backingStore.equals(o.backingStore);
  }
};
var TerminalNode = class {
  static {
    __name(this, "TerminalNode");
  }
  parent = null;
  symbol;
  constructor(symbol2) {
    this.symbol = symbol2;
  }
  getChild(_i) {
    return null;
  }
  getSymbol() {
    return this.symbol;
  }
  getPayload() {
    return this.symbol;
  }
  getSourceInterval() {
    if (this.symbol === null) {
      return Interval.INVALID_INTERVAL;
    }
    const tokenIndex = this.symbol.tokenIndex;
    return new Interval(tokenIndex, tokenIndex);
  }
  getChildCount() {
    return 0;
  }
  accept(visitor) {
    return visitor.visitTerminal(this);
  }
  getText() {
    return this.symbol?.text ?? "";
  }
  toString() {
    if (this.symbol?.type === Token.EOF) {
      return "<EOF>";
    } else {
      return this.symbol?.text ?? "";
    }
  }
  toStringTree() {
    return this.toString();
  }
};
var ErrorNode = class extends TerminalNode {
  static {
    __name(this, "ErrorNode");
  }
  accept(visitor) {
    return visitor.visitErrorNode(this);
  }
};
var CommonToken = class _CommonToken {
  static {
    __name(this, "CommonToken");
  }
  /**
   * An empty tuple which is used as the default value of
   * {@link source} for tokens that do not have a source.
   */
  // eslint-disable-next-line @typescript-eslint/naming-convention
  static EMPTY_SOURCE = [null, null];
  /**
   * These properties share a field to reduce the memory footprint of
   * {@link CommonToken}. Tokens created by a {@link CommonTokenFactory} from
   * the same source and input stream share a reference to the same
   * {@link Pair} containing these values.
   */
  source;
  tokenIndex;
  start;
  stop;
  /**
   * This is the backing field for {@link #getType} and {@link #setType}.
   */
  type;
  /**
   * The (one-based) line number on which the 1st character of this token was.
   */
  line;
  /**
   * The zero-based index of the first character position in its line.
   */
  column;
  /**
   * The token's channel.
   */
  channel;
  /**
   * This is the backing field for {@link getText} when the token text is
   * explicitly set in the constructor or via {@link setText}.
   */
  #text;
  constructor(details) {
    this.type = details.type;
    this.source = details.source;
    this.tokenIndex = details.tokenIndex ?? -1;
    this.line = details.line ?? 0;
    this.column = details.column ?? -1;
    this.channel = details.channel ?? Token.DEFAULT_CHANNEL;
    this.start = details.start ?? 0;
    this.stop = details.stop ?? 0;
    this.#text = details.text;
    if (details.line === void 0 && details.source[0] !== null) {
      this.line = details.source[0].line;
    }
    if (details.column === void 0 && details.source[0] !== null) {
      this.column = details.source[0].column;
    }
  }
  /**
   * Constructs a new {@link CommonToken} as a copy of another {@link Token}.
   *
   * If `token` is also a {@link CommonToken} instance, the newly
   * constructed token will share a reference to the {@link #text} field and
   * the {@link Pair} stored in {@link source}. Otherwise, {@link text} will
   * be assigned the result of calling {@link getText}, and {@link source}
   * will be constructed from the result of {@link Token.getTokenSource} and
   * {@link Token#getInputStream}.
   *
   * @param token The token to copy.
   */
  static fromToken(token) {
    const source = [token.tokenSource, token.inputStream];
    return new _CommonToken({
      type: token.type,
      line: token.line,
      tokenIndex: token.tokenIndex,
      column: token.column,
      channel: token.channel,
      start: token.start,
      stop: token.stop,
      text: token.text,
      source
    });
  }
  /**
   * Constructs a new {@link CommonToken} with the specified token type and text.
   *
   * @param type The token type.
   * @param text The text of the token.
   */
  static fromType(type, text) {
    return new _CommonToken({ type, text, source: _CommonToken.EMPTY_SOURCE });
  }
  static fromSource(source, type, channel, start, stop) {
    return new _CommonToken({ type, channel, start, stop, source });
  }
  get tokenSource() {
    return this.source[0];
  }
  get inputStream() {
    return this.source[1];
  }
  set inputStream(input) {
    this.source[1] = input;
  }
  /**
   * Constructs a new {@link CommonToken} as a copy of another {@link Token}.
   *
   * If `oldToken` is also a {@link CommonToken} instance, the newly
   * constructed token will share a reference to the {@link text} field and
   * the {@link Pair} stored in {@link source}. Otherwise, {@link text} will
   * be assigned the result of calling {@link getText}, and {@link source}
   * will be constructed from the result of {@link Token.getTokenSource} and
   * {@link Token.getInputStream}.
   */
  clone() {
    const t = new _CommonToken({
      source: this.source,
      type: this.type,
      channel: this.channel,
      start: this.start,
      stop: this.stop,
      tokenIndex: this.tokenIndex,
      line: this.line,
      column: this.column,
      text: this.#text
    });
    return t;
  }
  toString(recognizer) {
    let channelStr = "";
    if (this.channel > 0) {
      channelStr = ",channel=" + this.channel;
    }
    let text = this.text;
    if (text) {
      text = text.replace(/\n/g, "\\n");
      text = text.replace(/\r/g, "\\r");
      text = text.replace(/\t/g, "\\t");
    } else {
      text = "<no text>";
    }
    let typeString = String(this.type);
    if (recognizer) {
      typeString = recognizer.vocabulary.getDisplayName(this.type) ?? "<unknown>";
    }
    return "[@" + this.tokenIndex + "," + this.start + ":" + this.stop + "='" + text + "',<" + typeString + ">" + channelStr + "," + this.line + ":" + this.column + "]";
  }
  get text() {
    if (this.#text !== void 0) {
      return this.#text;
    }
    const input = this.inputStream;
    if (!input) {
      return void 0;
    }
    const n2 = input.size;
    if (this.start < n2 && this.stop < n2) {
      return input.getTextFromRange(this.start, this.stop);
    }
    return "<EOF>";
  }
  set text(text) {
    this.#text = text;
  }
  // WritableToken implementation
  setText(text) {
    this.#text = text;
  }
  setType(ttype) {
    this.type = ttype;
  }
  setLine(line) {
    this.line = line;
  }
  setCharPositionInLine(pos) {
    this.column = pos;
  }
  setChannel(channel) {
    this.channel = channel;
  }
  setTokenIndex(index2) {
    this.tokenIndex = index2;
  }
};
var Trees = class _Trees {
  static {
    __name(this, "Trees");
  }
  /**
   * Print out a whole tree in LISP form. {@link getNodeText} is used on the
   * node payloads to get the text for the nodes.  Detect
   * parse trees and extract data appropriately.
   */
  static toStringTree(tree, ruleNames, recog) {
    ruleNames = ruleNames ?? null;
    if (recog) {
      ruleNames = recog.ruleNames;
    }
    let s = _Trees.getNodeText(tree, ruleNames);
    s = escapeWhitespace(s, false);
    const c = tree.getChildCount();
    if (c === 0) {
      return s;
    }
    let res = "(" + s + " ";
    if (c > 0) {
      s = _Trees.toStringTree(tree.getChild(0), ruleNames);
      res = res.concat(s);
    }
    for (let i = 1; i < c; i++) {
      s = _Trees.toStringTree(tree.getChild(i), ruleNames);
      res = res.concat(" " + s);
    }
    res = res.concat(")");
    return res;
  }
  static getNodeText(t, ruleNames, recog) {
    ruleNames = ruleNames ?? null;
    if (recog) {
      ruleNames = recog.ruleNames;
    }
    if (ruleNames !== null) {
      if (t instanceof ParserRuleContext) {
        const context = t.ruleContext;
        const altNumber = context.getAltNumber();
        if (altNumber !== 0) {
          return ruleNames[t.ruleIndex] + ":" + altNumber;
        }
        return ruleNames[t.ruleIndex];
      } else if (t instanceof ErrorNode) {
        return t.toString();
      } else if (t instanceof TerminalNode) {
        return t.symbol.text;
      }
    }
    const payload = t.getPayload();
    if (isToken(payload)) {
      return payload.text;
    }
    return String(t.getPayload());
  }
  /**
   * Return ordered list of all children of this node
   */
  static getChildren(t) {
    const list = [];
    for (let i = 0; i < t.getChildCount(); i++) {
      list.push(t.getChild(i));
    }
    return list;
  }
  /**
   * Return a list of all ancestors of this node.  The first node of
   * list is the root and the last is the parent of this node.
   */
  static getAncestors(t) {
    if (t.parent === null) {
      return [];
    }
    let ancestors = [];
    let p = t.parent;
    while (p !== null) {
      ancestors = [p].concat(ancestors);
      p = p.parent;
    }
    return ancestors;
  }
  /**
   * Return true if t is u's parent or a node on path to root from u.
   */
  static isAncestorOf(t, u) {
    if (t === null || u === null || t.parent === null) {
      return false;
    }
    let p = u.parent;
    while (p !== null) {
      if (t === p) {
        return true;
      }
      p = p.parent;
    }
    return false;
  }
  static findAllTokenNodes(t, ttype) {
    return _Trees.findAllNodes(t, ttype, true);
  }
  static findAllRuleNodes(t, ruleIndex) {
    return _Trees.findAllNodes(t, ruleIndex, false);
  }
  static findAllNodes(t, index2, findTokens) {
    const nodes = [];
    _Trees.doFindAllNodes(t, index2, findTokens, nodes);
    return nodes;
  }
  static descendants(t) {
    let nodes = [t];
    for (let i = 0; i < t.getChildCount(); i++) {
      nodes = nodes.concat(_Trees.descendants(t.getChild(i)));
    }
    return nodes;
  }
  /**
   * Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex
   * inclusively using post order traversal. Recursive depth-first-search.
   */
  static getRootOfSubtreeEnclosingRegion(t, startTokenIndex, stopTokenIndex) {
    const n2 = t.getChildCount();
    for (let i = 0; i < n2; i++) {
      const child = t.getChild(i);
      const r = this.getRootOfSubtreeEnclosingRegion(child, startTokenIndex, stopTokenIndex);
      if (r !== null) {
        return r;
      }
    }
    if (t instanceof ParserRuleContext) {
      if (startTokenIndex >= t.start.tokenIndex && // is range fully contained in t?
      (t.stop === null || stopTokenIndex <= t.stop.tokenIndex)) {
        return t;
      }
    }
    return null;
  }
  /**
   * Replace any subtree siblings of root that are completely to left
   * or right of lookahead range with a CommonToken(Token.INVALID_TYPE,"...")
   * node. The source interval for t is not altered to suit smaller range!
   *
   * WARNING: destructive to t.
   */
  static stripChildrenOutOfRange(t, root, startIndex, stopIndex) {
    if (t === null) {
      return;
    }
    for (let i = 0; i < t.getChildCount(); i++) {
      const child = t.getChild(i);
      const range = child.getSourceInterval();
      if (t instanceof ParserRuleContext && (range.stop < startIndex || range.start > stopIndex)) {
        if (this.isAncestorOf(child, root)) {
          const abbrev = CommonToken.fromType(Token.INVALID_TYPE, "...");
          t.children[i] = new TerminalNode(abbrev);
        }
      }
    }
  }
  static doFindAllNodes(t, index2, findTokens, nodes) {
    if (findTokens && t instanceof TerminalNode) {
      if (t.symbol?.type === index2) {
        nodes.push(t);
      }
    } else if (!findTokens && t instanceof ParserRuleContext) {
      if (t.ruleIndex === index2) {
        nodes.push(t);
      }
    }
    for (let i = 0; i < t.getChildCount(); i++) {
      _Trees.doFindAllNodes(t.getChild(i), index2, findTokens, nodes);
    }
  }
};
var ParserRuleContext = class _ParserRuleContext {
  static {
    __name(this, "ParserRuleContext");
  }
  static empty = new _ParserRuleContext(null);
  start = null;
  stop = null;
  children = [];
  /**
   * What state invoked the rule associated with this context?
   *  The "return address" is the followState of invokingState
   *  If parent is null, this should be -1 this context object represents
   *  the start rule.
   */
  invokingState;
  parent;
  /**
   * A rule context is a record of a single rule invocation. It knows
   * which context invoked it, if any. If there is no parent context, then
   * naturally the invoking state is not valid.  The parent link
   * provides a chain upwards from the current rule invocation to the root
   * of the invocation tree, forming a stack. We actually carry no
   * information about the rule associated with this context (except
   * when parsing). We keep only the state number of the invoking state from
   * the ATN submachine that invoked this. Contrast this with the s
   * pointer inside ParserRuleContext that tracks the current state
   * being "executed" for the current rule.
   *
   * The parent contexts are useful for computing lookahead sets and
   * getting error information.
   *
   * These objects are used during parsing and prediction.
   * For the special case of parsers, we use the subclass
   * ParserRuleContext.
   */
  constructor(parent, invokingStateNumber = -1) {
    this.parent = parent;
    this.invokingState = invokingStateNumber;
  }
  /** Copy a context */
  copyFrom(ctx2) {
    this.parent = ctx2.parent;
    this.invokingState = ctx2.invokingState;
    this.children.slice(0, this.children.length);
    this.start = ctx2.start;
    this.stop = ctx2.stop;
    if (ctx2.children) {
      ctx2.children.forEach((child) => {
        if (child instanceof ErrorNode) {
          this.children.push(child);
          child.parent = this;
        }
      });
    }
  }
  // Double dispatch methods for listeners
  enterRule(_listener) {
  }
  exitRule(_listener) {
  }
  addChild(child) {
    this.children.push(child);
    return child;
  }
  /**
   * Used by enterOuterAlt to toss out a RuleContext previously added as
   * we entered a rule. If we have label, we will need to remove
   * generic ruleContext object.
   */
  removeLastChild() {
    this.children.pop();
  }
  addTokenNode(token) {
    const node = new TerminalNode(token);
    this.children.push(node);
    node.parent = this;
    return node;
  }
  addErrorNode(errorNode) {
    errorNode.parent = this;
    this.children.push(errorNode);
    return errorNode;
  }
  getChild(i, type) {
    if (i < 0 || i >= this.children.length) {
      return null;
    }
    if (!type) {
      return this.children[i];
    }
    for (const child of this.children) {
      if (child instanceof type) {
        if (i === 0) {
          return child;
        } else {
          i -= 1;
        }
      }
    }
    return null;
  }
  getToken(ttype, i) {
    if (i < 0 || i >= this.children.length) {
      return null;
    }
    for (const child of this.children) {
      if ("symbol" in child) {
        if (child.symbol?.type === ttype) {
          if (i === 0) {
            return child;
          } else {
            i -= 1;
          }
        }
      }
    }
    return null;
  }
  getTokens(ttype) {
    const tokens = [];
    for (const child of this.children) {
      if ("symbol" in child) {
        if (child.symbol?.type === ttype) {
          tokens.push(child);
        }
      }
    }
    return tokens;
  }
  // XXX: base the child type selection on the rule index, not the class.
  getRuleContext(index2, ctxType) {
    return this.getChild(index2, ctxType);
  }
  // XXX: base the child type selection on the rule index, not the class.
  getRuleContexts(ctxType) {
    const contexts = [];
    for (const child of this.children) {
      if (child instanceof ctxType) {
        contexts.push(child);
      }
    }
    return contexts;
  }
  getChildCount() {
    return this.children.length;
  }
  getSourceInterval() {
    if (this.start === null) {
      return Interval.INVALID_INTERVAL;
    }
    if (this.stop === null || this.stop.tokenIndex < this.start.tokenIndex) {
      return new Interval(this.start.tokenIndex, this.start.tokenIndex - 1);
    }
    return new Interval(this.start.tokenIndex, this.stop.tokenIndex);
  }
  depth() {
    let n2 = 0;
    let p = this;
    while (p !== null) {
      p = p.parent;
      n2 += 1;
    }
    return n2;
  }
  /**
   * A context is empty if there is no invoking state; meaning nobody call
   * current context.
   */
  isEmpty() {
    return this.invokingState === -1;
  }
  get ruleContext() {
    return this;
  }
  get ruleIndex() {
    return -1;
  }
  getPayload() {
    return this;
  }
  getText() {
    if (this.children.length === 0) {
      return "";
    }
    return this.children.map((child) => {
      return child.getText();
    }).join("");
  }
  /**
   * For rule associated with this parse tree internal node, return
   * the outer alternative number used to match the input. Default
   * implementation does not compute nor store this alt num. Create
   * a subclass of ParserRuleContext with backing field and set
   * option contextSuperClass.
   * to set it.
   */
  getAltNumber() {
    return ATN.INVALID_ALT_NUMBER;
  }
  /**
   * Set the outer alternative number for this context node. Default
   * implementation does nothing to avoid backing field overhead for
   * trees that don't need it.  Create
   * a subclass of ParserRuleContext with backing field and set
   * option contextSuperClass.
   */
  setAltNumber(_altNumber) {
  }
  accept(visitor) {
    return visitor.visitChildren(this);
  }
  toStringTree(...args) {
    if (args.length < 2) {
      return Trees.toStringTree(this, null, args[0]);
    }
    return Trees.toStringTree(this, args[0], args[1]);
  }
  toString(ruleNames, stop) {
    ruleNames = ruleNames ?? null;
    stop = stop ?? null;
    let p = this;
    let s = "[";
    while (p !== null && p !== stop) {
      if (ruleNames === null) {
        if (!p.isEmpty()) {
          s += p.invokingState;
        }
      } else {
        const ri = p.ruleIndex;
        const ruleName = ri >= 0 && ri < ruleNames.length ? ruleNames[ri] : "" + ri;
        s += ruleName;
      }
      if (p.parent !== null && (ruleNames !== null || !p.parent.isEmpty())) {
        s += " ";
      }
      p = p.parent;
    }
    s += "]";
    return s;
  }
};
var ArrayPredictionContext = class _ArrayPredictionContext extends PredictionContext {
  static {
    __name(this, "ArrayPredictionContext");
  }
  parents = [];
  returnStates = [];
  constructor(parents, returnStates) {
    super(PredictionContext.calculateHashCodeList(parents, returnStates));
    this.parents = parents;
    this.returnStates = returnStates;
    return this;
  }
  isEmpty() {
    return this.returnStates[0] === PredictionContext.EMPTY_RETURN_STATE;
  }
  get length() {
    return this.returnStates.length;
  }
  getParent(index2) {
    return this.parents[index2];
  }
  getReturnState(index2) {
    return this.returnStates[index2];
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _ArrayPredictionContext) || this.hashCode() !== other.hashCode()) {
      return false;
    }
    return equalNumberArrays(this.returnStates, other.returnStates) && equalArrays(this.parents, other.parents);
  }
  toString() {
    if (this.isEmpty()) {
      return "[]";
    }
    const entries = [];
    for (let i = 0; i < this.returnStates.length; i++) {
      if (this.returnStates[i] === PredictionContext.EMPTY_RETURN_STATE) {
        entries.push("$");
        continue;
      }
      entries.push(this.returnStates[i].toString());
      if (this.parents[i]) {
        entries.push(this.parents[i].toString());
      } else {
        entries.push("null");
      }
    }
    return `[${entries.join(", ")}]`;
  }
};
var createSingletonPredictionContext = /* @__PURE__ */ __name((parent, returnState) => {
  if (returnState === PredictionContext.EMPTY_RETURN_STATE && parent === null) {
    return EmptyPredictionContext.instance;
  } else {
    return new SingletonPredictionContext(parent, returnState);
  }
}, "createSingletonPredictionContext");
var predictionContextFromRuleContext = /* @__PURE__ */ __name((atn, outerContext) => {
  if (!outerContext) {
    outerContext = ParserRuleContext.empty;
  }
  if (!outerContext.parent || outerContext === ParserRuleContext.empty) {
    return EmptyPredictionContext.instance;
  }
  const parent = predictionContextFromRuleContext(atn, outerContext.parent);
  const state = atn.states[outerContext.invokingState];
  const transition = state.transitions[0];
  return createSingletonPredictionContext(parent, transition.followState.stateNumber);
}, "predictionContextFromRuleContext");
var getCachedPredictionContext = /* @__PURE__ */ __name((context, contextCache, visited) => {
  if (context.isEmpty()) {
    return context;
  }
  let existing = visited.get(context);
  if (existing) {
    return existing;
  }
  existing = contextCache.get(context);
  if (existing) {
    visited.set(context, existing);
    return existing;
  }
  let changed = false;
  let parents = [];
  for (let i = 0; i < parents.length; i++) {
    const parent = getCachedPredictionContext(context.getParent(i), contextCache, visited);
    if (changed || parent !== context.getParent(i)) {
      if (!changed) {
        parents = [];
        for (let j = 0; j < context.length; j++) {
          parents[j] = context.getParent(j);
        }
        changed = true;
      }
      parents[i] = parent;
    }
  }
  if (!changed) {
    contextCache.add(context);
    visited.set(context, context);
    return context;
  }
  let updated;
  if (parents.length === 0) {
    updated = EmptyPredictionContext.instance;
  } else if (parents.length === 1) {
    updated = createSingletonPredictionContext(parents[0] ?? void 0, context.getReturnState(0));
  } else {
    updated = new ArrayPredictionContext(parents, context.returnStates);
  }
  contextCache.add(updated);
  visited.set(updated, updated);
  visited.set(context, updated);
  return updated;
}, "getCachedPredictionContext");
var merge2 = /* @__PURE__ */ __name((a, b, rootIsWildcard, mergeCache) => {
  if (a === b || a.equals(b)) {
    return a;
  }
  if (a instanceof SingletonPredictionContext && b instanceof SingletonPredictionContext) {
    return mergeSingletons(a, b, rootIsWildcard, mergeCache);
  }
  if (rootIsWildcard) {
    if (a instanceof EmptyPredictionContext) {
      return a;
    }
    if (b instanceof EmptyPredictionContext) {
      return b;
    }
  }
  if (a instanceof SingletonPredictionContext) {
    a = new ArrayPredictionContext([a.parent], [a.returnState]);
  }
  if (b instanceof SingletonPredictionContext) {
    b = new ArrayPredictionContext([b.parent], [b.returnState]);
  }
  return mergeArrays(a, b, rootIsWildcard, mergeCache);
}, "merge");
var mergeArrays = /* @__PURE__ */ __name((a, b, rootIsWildcard, mergeCache) => {
  if (mergeCache) {
    let previous = mergeCache.get(a, b);
    if (previous) {
      return previous;
    }
    previous = mergeCache.get(b, a);
    if (previous) {
      return previous;
    }
  }
  let i = 0;
  let j = 0;
  let k = 0;
  let mergedReturnStates = new Array(a.returnStates.length + b.returnStates.length).fill(0);
  let mergedParents = new Array(a.returnStates.length + b.returnStates.length).fill(null);
  while (i < a.returnStates.length && j < b.returnStates.length) {
    const aParent = a.parents[i];
    const bParent = b.parents[j];
    if (a.returnStates[i] === b.returnStates[j]) {
      const payload = a.returnStates[i];
      const bothDollars = payload === PredictionContext.EMPTY_RETURN_STATE && aParent === null && bParent === null;
      const axAx = aParent !== null && bParent !== null && aParent === bParent;
      if (bothDollars || axAx) {
        mergedParents[k] = aParent;
        mergedReturnStates[k] = payload;
      } else {
        mergedParents[k] = merge2(aParent, bParent, rootIsWildcard, mergeCache);
        mergedReturnStates[k] = payload;
      }
      i += 1;
      j += 1;
    } else if (a.returnStates[i] < b.returnStates[j]) {
      mergedParents[k] = aParent;
      mergedReturnStates[k] = a.returnStates[i];
      i += 1;
    } else {
      mergedParents[k] = bParent;
      mergedReturnStates[k] = b.returnStates[j];
      j += 1;
    }
    k += 1;
  }
  if (i < a.returnStates.length) {
    for (let p = i; p < a.returnStates.length; p++) {
      mergedParents[k] = a.parents[p];
      mergedReturnStates[k] = a.returnStates[p];
      k += 1;
    }
  } else {
    for (let p = j; p < b.returnStates.length; p++) {
      mergedParents[k] = b.parents[p];
      mergedReturnStates[k] = b.returnStates[p];
      k += 1;
    }
  }
  if (k < mergedParents.length) {
    if (k === 1) {
      const aNew = createSingletonPredictionContext(mergedParents[0] ?? void 0, mergedReturnStates[0]);
      if (mergeCache !== null) {
        mergeCache.set(a, b, aNew);
      }
      return aNew;
    }
    mergedParents = mergedParents.slice(0, k);
    mergedReturnStates = mergedReturnStates.slice(0, k);
  }
  const merged = new ArrayPredictionContext(mergedParents, mergedReturnStates);
  if (merged.equals(a)) {
    if (mergeCache !== null) {
      mergeCache.set(a, b, a);
    }
    if (PredictionContext.traceATNSimulator) {
      console.log("mergeArrays a=" + a + ",b=" + b + " -> a");
    }
    return a;
  }
  if (merged.equals(b)) {
    if (mergeCache !== null) {
      mergeCache.set(a, b, b);
    }
    return b;
  }
  combineCommonParents(mergedParents);
  if (mergeCache !== null) {
    mergeCache.set(a, b, merged);
  }
  if (PredictionContext.traceATNSimulator) {
    console.log("mergeArrays a=" + a + ",b=" + b + " -> " + merged);
  }
  return merged;
}, "mergeArrays");
var combineCommonParents = /* @__PURE__ */ __name((parents) => {
  const uniqueParents = new HashMap(ObjectEqualityComparator.instance);
  for (const parent of parents) {
    if (parent) {
      if (!uniqueParents.containsKey(parent)) {
        uniqueParents.set(parent, parent);
      }
    }
  }
  for (let q = 0; q < parents.length; q++) {
    if (parents[q]) {
      parents[q] = uniqueParents.get(parents[q]) ?? null;
    }
  }
}, "combineCommonParents");
var mergeSingletons = /* @__PURE__ */ __name((a, b, rootIsWildcard, mergeCache) => {
  if (mergeCache !== null) {
    let previous = mergeCache.get(a, b);
    if (previous !== null) {
      return previous;
    }
    previous = mergeCache.get(b, a);
    if (previous !== null) {
      return previous;
    }
  }
  const rootMerge = mergeRoot(a, b, rootIsWildcard);
  if (rootMerge !== null) {
    if (mergeCache !== null) {
      mergeCache.set(a, b, rootMerge);
    }
    return rootMerge;
  }
  if (a.returnState === b.returnState) {
    const parent = merge2(a.parent, b.parent, rootIsWildcard, mergeCache);
    if (parent === a.parent) {
      return a;
    }
    if (parent === b.parent) {
      return b;
    }
    const spc = createSingletonPredictionContext(parent, a.returnState);
    if (mergeCache !== null) {
      mergeCache.set(a, b, spc);
    }
    return spc;
  } else {
    let singleParent = null;
    if (a === b || a.parent !== null && a.parent.equals(b.parent)) {
      singleParent = a.parent;
    }
    if (singleParent !== null) {
      const payloads2 = [a.returnState, b.returnState];
      if (a.returnState > b.returnState) {
        payloads2[0] = b.returnState;
        payloads2[1] = a.returnState;
      }
      const parents2 = [singleParent, singleParent];
      const apc = new ArrayPredictionContext(parents2, payloads2);
      if (mergeCache !== null) {
        mergeCache.set(a, b, apc);
      }
      return apc;
    }
    const payloads = [a.returnState, b.returnState];
    let parents = [a.parent, b.parent];
    if (a.returnState > b.returnState) {
      payloads[0] = b.returnState;
      payloads[1] = a.returnState;
      parents = [b.parent, a.parent];
    }
    const aNew = new ArrayPredictionContext(parents, payloads);
    if (mergeCache !== null) {
      mergeCache.set(a, b, aNew);
    }
    return aNew;
  }
}, "mergeSingletons");
var mergeRoot = /* @__PURE__ */ __name((a, b, rootIsWildcard) => {
  if (rootIsWildcard) {
    if (a === EmptyPredictionContext.instance || b === EmptyPredictionContext.instance) {
      return EmptyPredictionContext.instance;
    }
  } else {
    if (a === EmptyPredictionContext.instance && b === EmptyPredictionContext.instance) {
      return EmptyPredictionContext.instance;
    }
    if (a === EmptyPredictionContext.instance) {
      const payloads = [
        b.returnState,
        PredictionContext.EMPTY_RETURN_STATE
      ];
      const parents = [b.parent, null];
      return new ArrayPredictionContext(parents, payloads);
    }
    if (b === EmptyPredictionContext.instance) {
      const payloads = [a.returnState, PredictionContext.EMPTY_RETURN_STATE];
      const parents = [a.parent, null];
      return new ArrayPredictionContext(parents, payloads);
    }
  }
  return null;
}, "mergeRoot");
var LL1Analyzer = class _LL1Analyzer {
  constructor(atn) {
    this.atn = atn;
  }
  static {
    __name(this, "LL1Analyzer");
  }
  /**
   * Special value added to the lookahead sets to indicate that we hit
   * a predicate during analysis if `seeThruPreds==false`.
   */
  static hitPredicate = Token.INVALID_TYPE;
  /**
   * Calculates the SLL(1) expected lookahead set for each outgoing transition
   * of an {@link ATNState}. The returned array has one element for each
   * outgoing transition in `s`. If the closure from transition
   * _i_ leads to a semantic predicate before matching a symbol, the
   * element at index *i* of the result will be `undefined`.
   *
   * @param s the ATN state
   * @returns the expected symbols for each outgoing transition of `s`.
   */
  getDecisionLookahead(s) {
    const count = s.transitions.length;
    const look = new Array(count);
    for (let alt = 0; alt < count; alt++) {
      const set2 = new IntervalSet();
      const lookBusy = new HashSet();
      this.doLook(
        s.transitions[alt].target,
        void 0,
        EmptyPredictionContext.instance,
        set2,
        lookBusy,
        new BitSet(),
        false,
        false
      );
      if (set2.length > 0 && !set2.contains(_LL1Analyzer.hitPredicate)) {
        look[alt] = set2;
      }
    }
    return look;
  }
  /**
   * Compute set of tokens that can follow `s` in the ATN in the
   * specified `ctx`.
   *
   * If `ctx` is `null` and the end of the rule containing
   * `s` is reached, {@link Token//EPSILON} is added to the result set.
   * If `ctx` is not `null` and the end of the outermost rule is
   * reached, {@link Token//EOF} is added to the result set.
   *
   * @param s the ATN state
   * @param stopState the ATN state to stop at. This can be a
   * {@link BlockEndState} to detect epsilon paths through a closure.
   * @param ctx the complete parser context, or `null` if the context
   * should be ignored
   *
   * @returns The set of tokens that can follow `s` in the ATN in the
   * specified `ctx`.
   */
  look(s, stopState, ctx2) {
    const r = new IntervalSet();
    const lookContext = ctx2 ? predictionContextFromRuleContext(this.atn, ctx2) : null;
    this.doLook(s, stopState, lookContext, r, new HashSet(), new BitSet(), true, true);
    return r;
  }
  /**
   * Compute set of tokens that can follow `s` in the ATN in the
   * specified `ctx`.
   *
   * If `ctx` is `null` and `stopState` or the end of the
   * rule containing `s` is reached, {@link Token//EPSILON} is added to
   * the result set. If `ctx` is not `null` and `addEOF` is
   * `true` and `stopState` or the end of the outermost rule is
   * reached, {@link Token//EOF} is added to the result set.
   *
   * @param s the ATN state.
   * @param stopState the ATN state to stop at. This can be a
   * {@link BlockEndState} to detect epsilon paths through a closure.
   * @param ctx The outer context, or `null` if the outer context should
   * not be used.
   * @param look The result lookahead set.
   * @param lookBusy A set used for preventing epsilon closures in the ATN
   * from causing a stack overflow. Outside code should pass
   * `new CustomizedSet<ATNConfig>` for this argument.
   * @param calledRuleStack A set used for preventing left recursion in the
   * ATN from causing a stack overflow. Outside code should pass
   * `new BitSet()` for this argument.
   * @param seeThruPreds `true` to true semantic predicates as
   * implicitly `true` and "see through them", otherwise `false`
   * to treat semantic predicates as opaque and add {@link hitPredicate} to the
   * result if one is encountered.
   * @param addEOF Add {@link Token//EOF} to the result if the end of the
   * outermost context is reached. This parameter has no effect if `ctx`
   * is `null`.
   */
  doLook(s, stopState, ctx2, look, lookBusy, calledRuleStack, seeThruPreds, addEOF) {
    const c = ATNConfig.createWithContext(s, 0, ctx2);
    if (lookBusy.get(c)) {
      return;
    }
    lookBusy.add(c);
    if (s === stopState) {
      if (!ctx2) {
        look.addOne(Token.EPSILON);
        return;
      } else if (ctx2.isEmpty() && addEOF) {
        look.addOne(Token.EOF);
        return;
      }
    }
    if (s.constructor.stateType === ATNState.RULE_STOP) {
      if (!ctx2) {
        look.addOne(Token.EPSILON);
        return;
      } else if (ctx2.isEmpty() && addEOF) {
        look.addOne(Token.EOF);
        return;
      }
      if (ctx2 !== EmptyPredictionContext.instance) {
        const removed = calledRuleStack.get(s.ruleIndex);
        try {
          calledRuleStack.clear(s.ruleIndex);
          for (let i = 0; i < ctx2.length; i++) {
            const returnState = this.atn.states[ctx2.getReturnState(i)];
            this.doLook(
              returnState,
              stopState,
              ctx2.getParent(i),
              look,
              lookBusy,
              calledRuleStack,
              seeThruPreds,
              addEOF
            );
          }
        } finally {
          if (removed) {
            calledRuleStack.set(s.ruleIndex);
          }
        }
        return;
      }
    }
    for (const t of s.transitions) {
      switch (t.transitionType) {
        case Transition.RULE: {
          if (calledRuleStack.get(t.target.ruleIndex)) {
            continue;
          }
          const newContext = createSingletonPredictionContext(
            ctx2 ?? void 0,
            t.followState.stateNumber
          );
          try {
            calledRuleStack.set(t.target.ruleIndex);
            this.doLook(
              t.target,
              stopState,
              newContext,
              look,
              lookBusy,
              calledRuleStack,
              seeThruPreds,
              addEOF
            );
          } finally {
            calledRuleStack.clear(t.target.ruleIndex);
          }
          break;
        }
        case Transition.PREDICATE:
        case Transition.PRECEDENCE: {
          if (seeThruPreds) {
            this.doLook(t.target, stopState, ctx2, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);
          } else {
            look.addOne(_LL1Analyzer.hitPredicate);
          }
          break;
        }
        case Transition.WILDCARD: {
          look.addRange(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType);
          break;
        }
        default: {
          if (t.isEpsilon) {
            this.doLook(t.target, stopState, ctx2, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);
          } else {
            let set2 = t.label;
            if (set2) {
              if (t instanceof NotSetTransition) {
                set2 = set2.complement(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType);
              }
              look.addSet(set2);
            }
          }
          break;
        }
      }
    }
  }
};
var ATN = class {
  static {
    __name(this, "ATN");
  }
  static INVALID_ALT_NUMBER = 0;
  /** Represents the type of recognizer an ATN applies to */
  static LEXER = 0;
  static PARSER = 1;
  /**
   * Used for runtime deserialization of ATNs from strings
   * The type of the ATN.
   */
  grammarType;
  /** The maximum value for any symbol recognized by a transition in the ATN. */
  maxTokenType;
  states = [];
  /**
   * Each subrule/rule is a decision point and we must track them so we
   * can go back later and build DFA predictors for them.  This includes
   * all the rules, subrules, optional blocks, ()+, ()* etc...
   */
  decisionToState = [];
  /** Maps from rule index to starting state number. */
  ruleToStartState = [];
  // Initialized by the ATN deserializer.
  /** Maps from rule index to stop state number. */
  ruleToStopState = [];
  // Initialized by the ATN deserializer.
  modeNameToStartState = /* @__PURE__ */ new Map();
  /**
   * For lexer ATNs, this maps the rule index to the resulting token type.
   * For parser ATNs, this maps the rule index to the generated bypass token
   * type if the {@link ATNDeserializationOptions//isGenerateRuleBypassTransitions}
   * deserialization option was specified; otherwise, this is `null`
   */
  ruleToTokenType = [];
  // Initialized by the ATN deserializer.
  /**
   * For lexer ATNs, this is an array of {@link LexerAction} objects which may
   * be referenced by action transitions in the ATN
   */
  lexerActions = [];
  modeToStartState = [];
  analyzer;
  constructor(grammarType, maxTokenType) {
    this.grammarType = grammarType;
    this.maxTokenType = maxTokenType;
    this.analyzer = new LL1Analyzer(this);
  }
  /**
   * Compute the set of valid tokens that can occur starting in state `s`.
   * If `ctx` is null, the set of tokens will not include what can follow
   * the rule surrounding `s`. In other words, the set will be
   * restricted to tokens reachable staying within `s`'s rule.
   */
  nextTokens(atnState, ctx2) {
    if (!ctx2 && atnState.nextTokenWithinRule) {
      return atnState.nextTokenWithinRule;
    }
    const next = this.analyzer.look(atnState, void 0, ctx2);
    if (!ctx2) {
      atnState.nextTokenWithinRule = next;
    }
    return next;
  }
  addState(state) {
    if (state) {
      state.stateNumber = this.states.length;
    }
    this.states.push(state);
  }
  removeState(state) {
    this.states[state.stateNumber] = null;
  }
  defineDecisionState(s) {
    this.decisionToState.push(s);
    s.decision = this.decisionToState.length - 1;
    return s.decision;
  }
  getDecisionState(decision) {
    if (this.decisionToState.length === 0) {
      return null;
    } else {
      return this.decisionToState[decision];
    }
  }
  getNumberOfDecisions() {
    return this.decisionToState.length;
  }
  /**
   * Computes the set of input symbols which could follow ATN state number
   * `stateNumber` in the specified full `context`. This method
   * considers the complete parser context, but does not evaluate semantic
   * predicates (i.e. all predicates encountered during the calculation are
   * assumed true). If a path in the ATN exists from the starting state to the
   * {@link RuleStopState} of the outermost context without matching any
   * symbols, {@link Token//EOF} is added to the returned set.
   *
   * If `context` is `null`, it is treated as
   * {@link ParserRuleContext//EMPTY}.
   *
   * @param stateNumber the ATN state number
   * @param context the full parse context
   *
   * @returns {IntervalSet} The set of potentially valid input symbols which could follow the
   * specified state in the specified context.
   *
   * @throws IllegalArgumentException if the ATN does not contain a state with
   * number `stateNumber`
   */
  getExpectedTokens(stateNumber, context) {
    if (stateNumber < 0 || stateNumber >= this.states.length) {
      throw new Error("Invalid state number.");
    }
    const s = this.states[stateNumber];
    let following = this.nextTokens(s);
    if (!following.contains(Token.EPSILON)) {
      return following;
    }
    let ctx2 = context;
    const expected = new IntervalSet();
    expected.addSet(following);
    expected.removeOne(Token.EPSILON);
    while (ctx2 !== null && ctx2.invokingState >= 0 && following.contains(Token.EPSILON)) {
      const invokingState = this.states[ctx2.invokingState];
      const rt = invokingState.transitions[0];
      following = this.nextTokens(rt.followState);
      expected.addSet(following);
      expected.removeOne(Token.EPSILON);
      ctx2 = ctx2.parent;
    }
    if (following.contains(Token.EPSILON)) {
      expected.addOne(Token.EOF);
    }
    return expected;
  }
};
var KeyTypeEqualityComparer = class _KeyTypeEqualityComparer {
  static {
    __name(this, "KeyTypeEqualityComparer");
  }
  static instance = new _KeyTypeEqualityComparer();
  hashCode(config2) {
    let hashCode = 7;
    hashCode = 31 * hashCode + config2.state.stateNumber;
    hashCode = 31 * hashCode + config2.alt;
    hashCode = 31 * hashCode + config2.semanticContext.hashCode();
    return hashCode;
  }
  equals(a, b) {
    if (a === b) {
      return true;
    }
    return a.state.stateNumber === b.state.stateNumber && a.alt === b.alt && a.semanticContext.equals(b.semanticContext);
  }
};
var ATNConfigSet = class {
  static {
    __name(this, "ATNConfigSet");
  }
  /**
   * The reason that we need this is because we don't want the hash map to use
   * the standard hash code and equals. We need all configurations with the
   * same
   * `(s,i,_,semctx)` to be equal. Unfortunately, this key effectively
   * doubles
   * the number of objects associated with ATNConfigs. The other solution is
   * to
   * use a hash table that lets us specify the equals/hashCode operation.
   * All configs but hashed by (s, i, _, pi) not including context. Wiped out
   * when we go readonly as this set becomes a DFA state
   */
  configLookup = new HashSet(KeyTypeEqualityComparer.instance);
  // Track the elements as they are added to the set; supports get(i).
  configs = [];
  uniqueAlt = 0;
  /**
   * Used in parser and lexer. In lexer, it indicates we hit a pred
   * while computing a closure operation. Don't make a DFA state from this
   */
  hasSemanticContext = false;
  dipsIntoOuterContext = false;
  /**
   * Indicates that this configuration set is part of a full context
   * LL prediction. It will be used to determine how to merge $. With SLL
   * it's a wildcard whereas it is not for LL context merge
   */
  fullCtx = false;
  /**
   * Indicates that the set of configurations is read-only. Do not
   * allow any code to manipulate the set; DFA states will point at
   * the sets and they must not change. This does not protect the other
   * fields; in particular, conflictingAlts is set after
   * we've made this readonly
   */
  readOnly = false;
  conflictingAlts = null;
  /**
   * Tracks the first config that has a rule stop state. Avoids frequent linear search for that, when adding
   * a DFA state in the lexer ATN simulator.
   */
  firstStopState;
  #cachedHashCode = -1;
  constructor(fullCtxOrOldSet) {
    if (fullCtxOrOldSet !== void 0) {
      if (typeof fullCtxOrOldSet === "boolean") {
        this.fullCtx = fullCtxOrOldSet ?? true;
      } else {
        const old = fullCtxOrOldSet;
        this.addAll(old.configs);
        this.uniqueAlt = old.uniqueAlt;
        this.conflictingAlts = old.conflictingAlts;
        this.hasSemanticContext = old.hasSemanticContext;
        this.dipsIntoOuterContext = old.dipsIntoOuterContext;
      }
    }
  }
  [Symbol.iterator]() {
    return this.configs[Symbol.iterator]();
  }
  /**
   * Adding a new config means merging contexts with existing configs for
   * `(s, i, pi, _)`, where `s` is the {@link ATNConfig.state}, `i` is the {@link ATNConfig.alt}, and
   * `pi` is the {@link ATNConfig.semanticContext}. We use `(s,i,pi)` as key.
   *
   * This method updates {@link dipsIntoOuterContext} and
   * {@link hasSemanticContext} when necessary.
   */
  add(config2, mergeCache = null) {
    if (this.readOnly) {
      throw new Error("This set is readonly");
    }
    if (!this.firstStopState && config2.state.constructor.stateType === ATNState.RULE_STOP) {
      this.firstStopState = config2;
    }
    this.hasSemanticContext ||= config2.semanticContext !== SemanticContext.NONE;
    this.dipsIntoOuterContext ||= config2.reachesIntoOuterContext;
    const existing = this.configLookup.getOrAdd(config2);
    if (existing === config2) {
      this.#cachedHashCode = -1;
      this.configs.push(config2);
      return;
    }
    const rootIsWildcard = !this.fullCtx;
    const merged = merge2(existing.context, config2.context, rootIsWildcard, mergeCache);
    existing.reachesIntoOuterContext ||= config2.reachesIntoOuterContext;
    existing.precedenceFilterSuppressed ||= config2.precedenceFilterSuppressed;
    existing.context = merged;
  }
  /** Return a List holding list of configs */
  get elements() {
    return this.configs;
  }
  /**
   * Gets the complete set of represented alternatives for the configuration set.
   *
   * @returns the set of represented alternatives in this configuration set
   */
  getAlts() {
    const alts = new BitSet();
    for (const config2 of this.configs) {
      alts.set(config2.alt);
    }
    return alts;
  }
  getPredicates() {
    const preds = [];
    for (const config2 of this.configs) {
      if (config2.semanticContext !== SemanticContext.NONE) {
        preds.push(config2.semanticContext);
      }
    }
    return preds;
  }
  getStates() {
    const states = new HashSet();
    for (const config2 of this.configs) {
      states.add(config2.state);
    }
    return states;
  }
  optimizeConfigs(interpreter) {
    if (this.readOnly) {
      throw new Error("This set is readonly");
    }
    if (this.configLookup.size === 0) {
      return;
    }
    for (const config2 of this.configs) {
      config2.context = interpreter.getCachedContext(config2.context);
    }
  }
  addAll(coll) {
    for (const config2 of coll) {
      this.add(config2);
    }
    return false;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (this.fullCtx === other.fullCtx && this.uniqueAlt === other.uniqueAlt && this.conflictingAlts === other.conflictingAlts && this.hasSemanticContext === other.hasSemanticContext && this.dipsIntoOuterContext === other.dipsIntoOuterContext && equalArrays(this.configs, other.configs)) {
      return true;
    }
    return false;
  }
  hashCode() {
    if (this.#cachedHashCode === -1) {
      this.#cachedHashCode = this.computeHashCode();
    }
    return this.#cachedHashCode;
  }
  get length() {
    return this.configs.length;
  }
  isEmpty() {
    return this.configs.length === 0;
  }
  contains(item) {
    if (this.configLookup === null) {
      throw new Error("This method is not implemented for readonly sets.");
    }
    return this.configLookup.contains(item);
  }
  containsFast(item) {
    if (this.configLookup === null) {
      throw new Error("This method is not implemented for readonly sets.");
    }
    return this.configLookup.contains(item);
  }
  clear() {
    if (this.readOnly) {
      throw new Error("This set is readonly");
    }
    this.configs = [];
    this.#cachedHashCode = -1;
    this.configLookup = new HashSet(KeyTypeEqualityComparer.instance);
  }
  setReadonly(readOnly) {
    this.readOnly = readOnly;
    if (readOnly) {
      this.configLookup = null;
    }
  }
  toString() {
    return arrayToString(this.configs) + (this.hasSemanticContext ? ",hasSemanticContext=" + this.hasSemanticContext : "") + (this.uniqueAlt !== ATN.INVALID_ALT_NUMBER ? ",uniqueAlt=" + this.uniqueAlt : "") + (this.conflictingAlts !== null ? ",conflictingAlts=" + this.conflictingAlts : "") + (this.dipsIntoOuterContext ? ",dipsIntoOuterContext" : "");
  }
  computeHashCode() {
    let hash2 = MurmurHash.initialize();
    this.configs.forEach((config2) => {
      hash2 = MurmurHash.update(hash2, config2.hashCode());
    });
    hash2 = MurmurHash.finish(hash2, this.configs.length);
    return hash2;
  }
};
var BasicState = class extends ATNState {
  static {
    __name(this, "BasicState");
  }
  static stateType = ATNState.BASIC;
};
var DecisionState = class extends ATNState {
  static {
    __name(this, "DecisionState");
  }
  decision = -1;
  nonGreedy = false;
};
var BlockStartState = class extends DecisionState {
  static {
    __name(this, "BlockStartState");
  }
  endState;
};
var BlockEndState = class extends ATNState {
  static {
    __name(this, "BlockEndState");
  }
  static stateType = ATNState.BLOCK_END;
  startState;
};
var LoopEndState = class extends ATNState {
  static {
    __name(this, "LoopEndState");
  }
  static stateType = ATNState.LOOP_END;
  loopBackState;
};
var RuleStartState = class extends ATNState {
  static {
    __name(this, "RuleStartState");
  }
  static stateType = ATNState.RULE_START;
  stopState;
  isLeftRecursiveRule = false;
};
var RuleStopState = class extends ATNState {
  static {
    __name(this, "RuleStopState");
  }
  static stateType = ATNState.RULE_STOP;
};
var TokensStartState = class extends DecisionState {
  static {
    __name(this, "TokensStartState");
  }
  static stateType = ATNState.TOKEN_START;
};
var PlusLoopbackState = class extends DecisionState {
  static {
    __name(this, "PlusLoopbackState");
  }
  static stateType = ATNState.PLUS_LOOP_BACK;
};
var StarLoopbackState = class extends ATNState {
  static {
    __name(this, "StarLoopbackState");
  }
  static stateType = ATNState.STAR_LOOP_BACK;
};
var StarLoopEntryState = class extends DecisionState {
  static {
    __name(this, "StarLoopEntryState");
  }
  static stateType = ATNState.STAR_LOOP_ENTRY;
  // This is always set during ATN deserialization
  loopBackState;
  /**
   * Indicates whether this state can benefit from a precedence DFA during SLL
   * decision making.
   *
   * This is a computed property that is calculated during ATN deserialization
   * and stored for use in {@link ParserATNSimulator} and
   * {@link ParserInterpreter}.
   *
   * @see `DFA.isPrecedenceDfa`
   */
  precedenceRuleDecision = false;
};
var PlusBlockStartState = class extends BlockStartState {
  static {
    __name(this, "PlusBlockStartState");
  }
  static stateType = ATNState.PLUS_BLOCK_START;
  loopBackState;
};
var StarBlockStartState = class extends BlockStartState {
  static {
    __name(this, "StarBlockStartState");
  }
  static stateType = ATNState.STAR_BLOCK_START;
};
var BasicBlockStartState = class extends BlockStartState {
  static {
    __name(this, "BasicBlockStartState");
  }
  static stateType = ATNState.BLOCK_START;
};
var AtomTransition = class extends Transition {
  static {
    __name(this, "AtomTransition");
  }
  /** The token type or character value; or, signifies special label. */
  labelValue;
  #label;
  constructor(target, label) {
    super(target);
    this.labelValue = label;
    this.#label = IntervalSet.of(label, label);
  }
  get label() {
    return this.#label;
  }
  get transitionType() {
    return Transition.ATOM;
  }
  matches(symbol2) {
    return this.labelValue === symbol2;
  }
  toString() {
    return this.labelValue.toString();
  }
};
var RuleTransition = class extends Transition {
  static {
    __name(this, "RuleTransition");
  }
  ruleIndex;
  precedence;
  followState;
  constructor(ruleStart, ruleIndex, precedence, followState) {
    super(ruleStart);
    this.ruleIndex = ruleIndex;
    this.precedence = precedence;
    this.followState = followState;
  }
  get isEpsilon() {
    return true;
  }
  get transitionType() {
    return Transition.RULE;
  }
  matches(_symbol2, _minVocabSymbol, _maxVocabSymbol) {
    return false;
  }
};
var RangeTransition = class extends Transition {
  static {
    __name(this, "RangeTransition");
  }
  start;
  stop;
  #label = new IntervalSet();
  constructor(target, start, stop) {
    super(target);
    this.start = start;
    this.stop = stop;
    this.#label.addRange(start, stop);
  }
  get label() {
    return this.#label;
  }
  get transitionType() {
    return Transition.RANGE;
  }
  matches(symbol2, _minVocabSymbol, _maxVocabSymbol) {
    return symbol2 >= this.start && symbol2 <= this.stop;
  }
  toString() {
    return "'" + String.fromCharCode(this.start) + "'..'" + String.fromCharCode(this.stop) + "'";
  }
};
var ActionTransition = class extends Transition {
  static {
    __name(this, "ActionTransition");
  }
  ruleIndex;
  actionIndex;
  isCtxDependent;
  constructor(target, ruleIndex, actionIndex, isCtxDependent) {
    super(target);
    this.ruleIndex = ruleIndex;
    this.actionIndex = actionIndex ?? -1;
    this.isCtxDependent = isCtxDependent ?? false;
  }
  get isEpsilon() {
    return true;
  }
  get transitionType() {
    return Transition.ACTION;
  }
  matches(_symbol2, _minVocabSymbol, _maxVocabSymbol) {
    return false;
  }
  toString() {
    return "action_" + this.ruleIndex + ":" + this.actionIndex;
  }
};
var EpsilonTransition = class extends Transition {
  static {
    __name(this, "EpsilonTransition");
  }
  #outermostPrecedenceReturn;
  constructor(target, outermostPrecedenceReturn = -1) {
    super(target);
    this.#outermostPrecedenceReturn = outermostPrecedenceReturn;
  }
  /**
   * @returns the rule index of a precedence rule for which this transition is
   * returning from, where the precedence value is 0; otherwise, -1.
   *
   * @see ATNConfig.isPrecedenceFilterSuppressed()
   * @see ParserATNSimulator.applyPrecedenceFilter(ATNConfigSet)
   * @since 4.4.1
   */
  get outermostPrecedenceReturn() {
    return this.#outermostPrecedenceReturn;
  }
  get isEpsilon() {
    return true;
  }
  get transitionType() {
    return Transition.EPSILON;
  }
  matches() {
    return false;
  }
  toString() {
    return "epsilon";
  }
};
var WildcardTransition = class extends Transition {
  static {
    __name(this, "WildcardTransition");
  }
  get transitionType() {
    return Transition.WILDCARD;
  }
  matches(symbol2, minVocabSymbol, maxVocabSymbol) {
    return symbol2 >= minVocabSymbol && symbol2 <= maxVocabSymbol;
  }
  toString() {
    return ".";
  }
};
var AbstractPredicateTransition = class extends Transition {
  static {
    __name(this, "AbstractPredicateTransition");
  }
  constructor(target) {
    super(target);
  }
};
var PredicateTransition = class extends AbstractPredicateTransition {
  static {
    __name(this, "PredicateTransition");
  }
  ruleIndex;
  predIndex;
  isCtxDependent;
  // e.g., $i ref in pred
  constructor(target, ruleIndex, predIndex, isCtxDependent) {
    super(target);
    this.ruleIndex = ruleIndex;
    this.predIndex = predIndex;
    this.isCtxDependent = isCtxDependent;
  }
  get isEpsilon() {
    return true;
  }
  matches(_symbol2, _minVocabSymbol, _maxVocabSymbol) {
    return false;
  }
  get transitionType() {
    return Transition.PREDICATE;
  }
  getPredicate() {
    return new SemanticContext.Predicate(this.ruleIndex, this.predIndex, this.isCtxDependent);
  }
  toString() {
    return "pred_" + this.ruleIndex + ":" + this.predIndex;
  }
};
var PrecedencePredicateTransition = class extends AbstractPredicateTransition {
  static {
    __name(this, "PrecedencePredicateTransition");
  }
  precedence;
  constructor(target, precedence) {
    super(target);
    this.precedence = precedence;
  }
  get isEpsilon() {
    return true;
  }
  matches(_symbol2, _minVocabSymbol, _maxVocabSymbol) {
    return false;
  }
  getPredicate() {
    return new SemanticContext.PrecedencePredicate(this.precedence);
  }
  get transitionType() {
    return Transition.PRECEDENCE;
  }
  toString() {
    return this.precedence + " >= _p";
  }
};
var LexerActionType = {
  /** The type of a {@link LexerChannelAction} action. */
  CHANNEL: 0,
  /** The type of a {@link LexerCustomAction} action */
  CUSTOM: 1,
  /** The type of a {@link LexerModeAction} action. */
  MODE: 2,
  /** The type of a {@link LexerMoreAction} action. */
  MORE: 3,
  /** The type of a {@link LexerPopModeAction} action. */
  POP_MODE: 4,
  /** The type of a {@link LexerPushModeAction} action. */
  PUSH_MODE: 5,
  /** The type of a {@link LexerSkipAction} action. */
  SKIP: 6,
  /** The type of a {@link LexerTypeAction} action. */
  TYPE: 7
};
var LexerSkipAction = class _LexerSkipAction {
  static {
    __name(this, "LexerSkipAction");
  }
  /** Provides a singleton instance of this parameter-less lexer action. */
  static instance = new _LexerSkipAction();
  actionType;
  isPositionDependent = false;
  constructor() {
    this.actionType = LexerActionType.SKIP;
  }
  equals(obj) {
    return obj === this;
  }
  hashCode() {
    return LexerActionType.SKIP;
  }
  execute(lexer) {
    lexer.skip();
  }
  toString() {
    return "skip";
  }
};
var LexerChannelAction = class _LexerChannelAction {
  static {
    __name(this, "LexerChannelAction");
  }
  channel;
  actionType;
  isPositionDependent = false;
  cachedHashCode;
  constructor(channel) {
    this.actionType = LexerActionType.CHANNEL;
    this.channel = channel;
  }
  /**
   * This action is implemented by calling {@link Lexer.setChannel} with the
   * value provided by {@link getChannel}.
   */
  execute(lexer) {
    lexer.channel = this.channel;
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      hash2 = MurmurHash.update(hash2, this.actionType);
      hash2 = MurmurHash.update(hash2, this.channel);
      this.cachedHashCode = MurmurHash.finish(hash2, 2);
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _LexerChannelAction)) {
      return false;
    }
    return this.channel === other.channel;
  }
  toString() {
    return "channel(" + this.channel + ")";
  }
};
var LexerCustomAction = class _LexerCustomAction {
  static {
    __name(this, "LexerCustomAction");
  }
  ruleIndex;
  actionIndex;
  actionType;
  isPositionDependent = true;
  cachedHashCode;
  /**
   * Constructs a custom lexer action with the specified rule and action indexes.
   *
   * @param ruleIndex The rule index to use for calls to {@link Recognizer.action}.
   * @param actionIndex The action index to use for calls to {@link Recognizer.action}.
   */
  constructor(ruleIndex, actionIndex) {
    this.actionType = LexerActionType.CUSTOM;
    this.ruleIndex = ruleIndex;
    this.actionIndex = actionIndex;
  }
  /**
   * Custom actions are implemented by calling {@link Lexer.action} with the
   * appropriate rule and action indexes.
   */
  execute(lexer) {
    lexer.action(null, this.ruleIndex, this.actionIndex);
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      hash2 = MurmurHash.update(hash2, this.actionType);
      hash2 = MurmurHash.update(hash2, this.ruleIndex);
      hash2 = MurmurHash.update(hash2, this.actionIndex);
      this.cachedHashCode = MurmurHash.finish(hash2, 3);
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _LexerCustomAction)) {
      return false;
    }
    return this.ruleIndex === other.ruleIndex && this.actionIndex === other.actionIndex;
  }
};
var LexerMoreAction = class _LexerMoreAction {
  static {
    __name(this, "LexerMoreAction");
  }
  static instance = new _LexerMoreAction();
  actionType;
  isPositionDependent = false;
  constructor() {
    this.actionType = LexerActionType.MORE;
  }
  equals(obj) {
    return obj === this;
  }
  hashCode() {
    return LexerActionType.MORE;
  }
  /**
   * This action is implemented by calling {@link Lexer.popMode}.
   */
  execute(lexer) {
    lexer.more();
  }
  toString() {
    return "more";
  }
};
var LexerTypeAction = class _LexerTypeAction {
  static {
    __name(this, "LexerTypeAction");
  }
  type;
  actionType;
  isPositionDependent = false;
  cachedHashCode;
  constructor(type) {
    this.actionType = LexerActionType.TYPE;
    this.type = type;
  }
  execute(lexer) {
    lexer.type = this.type;
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      hash2 = MurmurHash.update(hash2, this.actionType);
      hash2 = MurmurHash.update(hash2, this.type);
      this.cachedHashCode = MurmurHash.finish(hash2, 2);
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _LexerTypeAction)) {
      return false;
    }
    return this.type === other.type;
  }
  toString() {
    return "type(" + this.type + ")";
  }
};
var LexerPushModeAction = class _LexerPushModeAction {
  static {
    __name(this, "LexerPushModeAction");
  }
  mode;
  actionType;
  isPositionDependent = false;
  cachedHashCode;
  constructor(mode) {
    this.actionType = LexerActionType.PUSH_MODE;
    this.mode = mode;
  }
  /**
   * This action is implemented by calling {@link Lexer.pushMode} with the
   * value provided by {@link getMode}.
   */
  execute(lexer) {
    lexer.pushMode(this.mode);
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      hash2 = MurmurHash.update(hash2, this.actionType);
      hash2 = MurmurHash.update(hash2, this.mode);
      this.cachedHashCode = MurmurHash.finish(hash2, 2);
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _LexerPushModeAction)) {
      return false;
    }
    return this.mode === other.mode;
  }
  toString() {
    return "pushMode(" + this.mode + ")";
  }
};
var LexerPopModeAction = class _LexerPopModeAction {
  static {
    __name(this, "LexerPopModeAction");
  }
  static instance = new _LexerPopModeAction();
  actionType;
  isPositionDependent = false;
  constructor() {
    this.actionType = LexerActionType.POP_MODE;
  }
  equals(obj) {
    return obj === this;
  }
  hashCode() {
    return LexerActionType.POP_MODE;
  }
  /**
   * This action is implemented by calling {@link Lexer//popMode}.
   */
  execute(lexer) {
    lexer.popMode();
  }
  toString() {
    return "popMode";
  }
};
var LexerModeAction = class _LexerModeAction {
  static {
    __name(this, "LexerModeAction");
  }
  mode;
  actionType;
  isPositionDependent = false;
  cachedHashCode;
  constructor(mode) {
    this.actionType = LexerActionType.MODE;
    this.mode = mode;
  }
  /**
   * This action is implemented by calling {@link Lexer.mode} with the
   * value provided by {@link getMode}.
   */
  execute(lexer) {
    lexer.mode = this.mode;
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      hash2 = MurmurHash.update(hash2, this.actionType);
      hash2 = MurmurHash.update(hash2, this.mode);
      this.cachedHashCode = MurmurHash.finish(hash2, 2);
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _LexerModeAction)) {
      return false;
    }
    return this.mode === other.mode;
  }
  toString() {
    return "mode(" + this.mode + ")";
  }
};
var ATNDeserializer = class _ATNDeserializer {
  static {
    __name(this, "ATNDeserializer");
  }
  static SERIALIZED_VERSION = 4;
  static stateTypeMapper = /* @__PURE__ */ new Map([
    [ATNState.INVALID_TYPE, void 0],
    [ATNState.BASIC, BasicState],
    [ATNState.RULE_START, RuleStartState],
    [ATNState.BLOCK_START, BasicBlockStartState],
    [ATNState.PLUS_BLOCK_START, PlusBlockStartState],
    [ATNState.STAR_BLOCK_START, StarBlockStartState],
    [ATNState.TOKEN_START, TokensStartState],
    [ATNState.RULE_STOP, RuleStopState],
    [ATNState.BLOCK_END, BlockEndState],
    [ATNState.STAR_LOOP_BACK, StarLoopbackState],
    [ATNState.STAR_LOOP_ENTRY, StarLoopEntryState],
    [ATNState.PLUS_LOOP_BACK, PlusLoopbackState],
    [ATNState.LOOP_END, LoopEndState]
  ]);
  static lexerActionFactoryMapper = /* @__PURE__ */ new Map([
    [LexerActionType.CHANNEL, (data1) => {
      return new LexerChannelAction(data1);
    }],
    [LexerActionType.CUSTOM, (data1, data2) => {
      return new LexerCustomAction(data1, data2);
    }],
    [LexerActionType.MODE, (data1) => {
      return new LexerModeAction(data1);
    }],
    [LexerActionType.MORE, () => {
      return LexerMoreAction.instance;
    }],
    [LexerActionType.POP_MODE, () => {
      return LexerPopModeAction.instance;
    }],
    [LexerActionType.PUSH_MODE, (data1) => {
      return new LexerPushModeAction(data1);
    }],
    [LexerActionType.SKIP, () => {
      return LexerSkipAction.instance;
    }],
    [LexerActionType.TYPE, (data1) => {
      return new LexerTypeAction(data1);
    }]
  ]);
  data = [];
  pos = 0;
  deserializationOptions;
  actionFactories;
  constructor(options) {
    if (!options) {
      options = { readOnly: false, verifyATN: true, generateRuleBypassTransitions: false };
    }
    this.deserializationOptions = options;
  }
  deserialize(data) {
    this.data = data;
    this.checkVersion();
    const atn = this.readATN();
    this.readStates(atn);
    this.readRules(atn);
    this.readModes(atn);
    const sets = [];
    this.readSets(atn, sets);
    this.readEdges(atn, sets);
    this.readDecisions(atn);
    this.readLexerActions(atn);
    this.markPrecedenceDecisions(atn);
    this.verifyATN(atn);
    if (this.deserializationOptions.generateRuleBypassTransitions && atn.grammarType === ATN.PARSER) {
      this.generateRuleBypassTransitions(atn);
      this.verifyATN(atn);
    }
    return atn;
  }
  checkVersion() {
    const version2 = this.data[this.pos++];
    if (version2 !== _ATNDeserializer.SERIALIZED_VERSION) {
      throw new Error("Could not deserialize ATN with version " + version2 + " (expected " + _ATNDeserializer.SERIALIZED_VERSION + ").");
    }
  }
  readATN() {
    const grammarType = this.data[this.pos++];
    const maxTokenType = this.data[this.pos++];
    return new ATN(grammarType, maxTokenType);
  }
  readStates(atn) {
    let j;
    let stateNumber;
    const loopBackStateNumbers = [];
    const endStateNumbers = [];
    const stateCount = this.data[this.pos++];
    for (let i = 0; i < stateCount; i++) {
      const stateType = this.data[this.pos++];
      if (stateType === ATNState.INVALID_TYPE) {
        atn.addState(null);
        continue;
      }
      const ruleIndex = this.data[this.pos++];
      const s = this.stateFactory(stateType, ruleIndex);
      if (stateType === ATNState.LOOP_END) {
        const loopBackStateNumber = this.data[this.pos++];
        loopBackStateNumbers.push([s, loopBackStateNumber]);
      } else if (s instanceof BlockStartState) {
        const endStateNumber = this.data[this.pos++];
        endStateNumbers.push([s, endStateNumber]);
      }
      atn.addState(s);
    }
    for (j = 0; j < loopBackStateNumbers.length; j++) {
      const pair = loopBackStateNumbers[j];
      pair[0].loopBackState = atn.states[pair[1]] ?? void 0;
    }
    for (j = 0; j < endStateNumbers.length; j++) {
      const pair = endStateNumbers[j];
      pair[0].endState = atn.states[pair[1]];
    }
    const numNonGreedyStates = this.data[this.pos++];
    for (j = 0; j < numNonGreedyStates; j++) {
      stateNumber = this.data[this.pos++];
      atn.states[stateNumber].nonGreedy = true;
    }
    const numPrecedenceStates = this.data[this.pos++];
    for (j = 0; j < numPrecedenceStates; j++) {
      stateNumber = this.data[this.pos++];
      atn.states[stateNumber].isLeftRecursiveRule = true;
    }
  }
  readRules(atn) {
    let i;
    const ruleCount = this.data[this.pos++];
    if (atn.grammarType === ATN.LEXER) {
      atn.ruleToTokenType = new Array(ruleCount);
      atn.ruleToTokenType.fill(0);
    }
    atn.ruleToStartState = new Array(ruleCount);
    atn.ruleToStartState.fill(null);
    for (i = 0; i < ruleCount; i++) {
      const s = this.data[this.pos++];
      atn.ruleToStartState[i] = atn.states[s];
      if (atn.grammarType === ATN.LEXER) {
        const tokenType = this.data[this.pos++];
        atn.ruleToTokenType[i] = tokenType;
      }
    }
    atn.ruleToStopState = new Array(ruleCount);
    atn.ruleToStopState.fill(null);
    for (i = 0; i < atn.states.length; i++) {
      const state = atn.states[i];
      if (!(state instanceof RuleStopState)) {
        continue;
      }
      atn.ruleToStopState[state.ruleIndex] = state;
      atn.ruleToStartState[state.ruleIndex].stopState = state;
    }
  }
  readModes(atn) {
    const modeCount = this.data[this.pos++];
    for (let i = 0; i < modeCount; i++) {
      const s = this.data[this.pos++];
      atn.modeToStartState.push(atn.states[s]);
    }
  }
  readSets(atn, sets) {
    const m2 = this.data[this.pos++];
    for (let i = 0; i < m2; i++) {
      const intervalSet = new IntervalSet();
      sets.push(intervalSet);
      const n2 = this.data[this.pos++];
      const containsEof = this.data[this.pos++];
      if (containsEof !== 0) {
        intervalSet.addOne(-1);
      }
      for (let j = 0; j < n2; j++) {
        const i1 = this.data[this.pos++];
        const i2 = this.data[this.pos++];
        intervalSet.addRange(i1, i2);
      }
    }
  }
  readEdges(atn, sets) {
    let i;
    let j;
    let state;
    let trans;
    let target;
    const edgeCount = this.data[this.pos++];
    for (i = 0; i < edgeCount; i++) {
      const src = this.data[this.pos++];
      const trg = this.data[this.pos++];
      const ttype = this.data[this.pos++];
      const arg1 = this.data[this.pos++];
      const arg2 = this.data[this.pos++];
      const arg3 = this.data[this.pos++];
      trans = this.edgeFactory(atn, ttype, trg, arg1, arg2, arg3, sets);
      const srcState = atn.states[src];
      srcState.addTransition(trans);
    }
    for (i = 0; i < atn.states.length; i++) {
      state = atn.states[i];
      for (j = 0; j < state.transitions.length; j++) {
        const t = state.transitions[j];
        if (!(t instanceof RuleTransition)) {
          continue;
        }
        let outermostPrecedenceReturn = -1;
        if (atn.ruleToStartState[t.target.ruleIndex].isLeftRecursiveRule) {
          if (t.precedence === 0) {
            outermostPrecedenceReturn = t.target.ruleIndex;
          }
        }
        trans = new EpsilonTransition(t.followState, outermostPrecedenceReturn);
        atn.ruleToStopState[t.target.ruleIndex].addTransition(trans);
      }
    }
    for (i = 0; i < atn.states.length; i++) {
      state = atn.states[i];
      if (state instanceof BlockStartState) {
        if (!state.endState) {
          throw new Error("IllegalState");
        }
        if (state.endState.startState) {
          throw new Error("IllegalState");
        }
        state.endState.startState = state;
      }
      if (state instanceof PlusLoopbackState) {
        for (j = 0; j < state.transitions.length; j++) {
          target = state.transitions[j].target;
          if (target instanceof PlusBlockStartState) {
            target.loopBackState = state;
          }
        }
      } else if (state instanceof StarLoopbackState) {
        for (j = 0; j < state.transitions.length; j++) {
          target = state.transitions[j].target;
          if (target instanceof StarLoopEntryState) {
            target.loopBackState = state;
          }
        }
      }
    }
  }
  readDecisions(atn) {
    const decisionCount = this.data[this.pos++];
    for (let i = 0; i < decisionCount; i++) {
      const s = this.data[this.pos++];
      const decState = atn.states[s];
      atn.decisionToState.push(decState);
      decState.decision = i;
    }
  }
  readLexerActions(atn) {
    if (atn.grammarType === ATN.LEXER) {
      const count = this.data[this.pos++];
      atn.lexerActions = [];
      for (let i = 0; i < count; i++) {
        const actionType = this.data[this.pos++];
        const data1 = this.data[this.pos++];
        const data2 = this.data[this.pos++];
        atn.lexerActions.push(this.lexerActionFactory(actionType, data1, data2));
      }
    }
  }
  generateRuleBypassTransitions(atn) {
    let i;
    const count = atn.ruleToStartState.length;
    for (i = 0; i < count; i++) {
      atn.ruleToTokenType[i] = atn.maxTokenType + i + 1;
    }
    for (i = 0; i < count; i++) {
      this.generateRuleBypassTransition(atn, i);
    }
  }
  generateRuleBypassTransition(atn, idx) {
    let i;
    let state;
    const bypassStart = new BasicBlockStartState();
    bypassStart.ruleIndex = idx;
    atn.addState(bypassStart);
    const bypassStop = new BlockEndState();
    bypassStop.ruleIndex = idx;
    atn.addState(bypassStop);
    bypassStart.endState = bypassStop;
    atn.defineDecisionState(bypassStart);
    bypassStop.startState = bypassStart;
    let excludeTransition = null;
    let endState = null;
    if (atn.ruleToStartState[idx].isLeftRecursiveRule) {
      endState = null;
      for (i = 0; i < atn.states.length; i++) {
        state = atn.states[i];
        if (this.stateIsEndStateFor(state, idx)) {
          endState = state;
          excludeTransition = state.loopBackState.transitions[0];
          break;
        }
      }
      if (excludeTransition === null) {
        throw new Error("Couldn't identify final state of the precedence rule prefix section.");
      }
    } else {
      endState = atn.ruleToStopState[idx];
    }
    for (i = 0; i < atn.states.length; i++) {
      state = atn.states[i];
      for (const transition of state.transitions) {
        if (transition === excludeTransition) {
          continue;
        }
        if (transition.target === endState) {
          transition.target = bypassStop;
        }
      }
    }
    const ruleToStartState = atn.ruleToStartState[idx];
    while (ruleToStartState.transitions.length > 0) {
      const transition = ruleToStartState.removeTransition(ruleToStartState.transitions.length - 1);
      bypassStart.addTransition(transition);
    }
    atn.ruleToStartState[idx].addTransition(new EpsilonTransition(bypassStart));
    if (endState) {
      bypassStop.addTransition(new EpsilonTransition(endState));
    }
    const matchState = new BasicState();
    atn.addState(matchState);
    matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[idx]));
    bypassStart.addTransition(new EpsilonTransition(matchState));
  }
  stateIsEndStateFor(state, idx) {
    if (state.ruleIndex !== idx) {
      return null;
    }
    if (!(state instanceof StarLoopEntryState)) {
      return null;
    }
    const maybeLoopEndState = state.transitions[state.transitions.length - 1].target;
    if (!(maybeLoopEndState instanceof LoopEndState)) {
      return null;
    }
    if (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.transitions[0].target instanceof RuleStopState) {
      return state;
    } else {
      return null;
    }
  }
  /**
   * Analyze the {@link StarLoopEntryState} states in the specified ATN to set
   * the {@link StarLoopEntryState} field to the correct value.
   *
   * @param atn The ATN.
   */
  markPrecedenceDecisions(atn) {
    for (const state of atn.states) {
      if (!(state instanceof StarLoopEntryState)) {
        continue;
      }
      if (atn.ruleToStartState[state.ruleIndex].isLeftRecursiveRule) {
        const maybeLoopEndState = state.transitions[state.transitions.length - 1].target;
        if (maybeLoopEndState instanceof LoopEndState) {
          if (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.transitions[0].target instanceof RuleStopState) {
            state.precedenceRuleDecision = true;
          }
        }
      }
    }
  }
  verifyATN(atn) {
    if (!this.deserializationOptions.verifyATN) {
      return;
    }
    for (const state of atn.states) {
      if (state === null) {
        continue;
      }
      this.checkCondition(state.epsilonOnlyTransitions || state.transitions.length <= 1);
      if (state instanceof PlusBlockStartState) {
        this.checkCondition(state.loopBackState !== null);
      } else if (state instanceof StarLoopEntryState) {
        this.checkCondition(state.loopBackState !== null);
        this.checkCondition(state.transitions.length === 2);
        if (state.transitions[0].target instanceof StarBlockStartState) {
          this.checkCondition(state.transitions[1].target instanceof LoopEndState);
          this.checkCondition(!state.nonGreedy);
        } else if (state.transitions[0].target instanceof LoopEndState) {
          this.checkCondition(state.transitions[1].target instanceof StarBlockStartState);
          this.checkCondition(state.nonGreedy);
        } else {
          throw new Error("IllegalState");
        }
      } else if (state instanceof StarLoopbackState) {
        this.checkCondition(state.transitions.length === 1);
        this.checkCondition(state.transitions[0].target instanceof StarLoopEntryState);
      } else if (state instanceof LoopEndState) {
        this.checkCondition(state.loopBackState !== null);
      } else if (state instanceof RuleStartState) {
        this.checkCondition(state.stopState !== null);
      } else if (state instanceof BlockStartState) {
        this.checkCondition(state.endState !== null);
      } else if (state instanceof BlockEndState) {
        this.checkCondition(state.startState !== null);
      } else if (state instanceof DecisionState) {
        this.checkCondition(state.transitions.length <= 1 || state.decision >= 0);
      } else {
        this.checkCondition(state.transitions.length <= 1 || state instanceof RuleStopState);
      }
    }
  }
  checkCondition(condition, message) {
    if (!condition) {
      if (message === void 0 || message === null) {
        message = "IllegalState";
      }
      throw message;
    }
  }
  edgeFactory(atn, type, trg, arg1, arg2, arg3, sets) {
    const target = atn.states[trg];
    switch (type) {
      case Transition.EPSILON:
        return new EpsilonTransition(target);
      case Transition.RANGE:
        return arg3 !== 0 ? new RangeTransition(target, Token.EOF, arg2) : new RangeTransition(target, arg1, arg2);
      case Transition.RULE:
        return new RuleTransition(atn.states[arg1], arg2, arg3, target);
      case Transition.PREDICATE:
        return new PredicateTransition(target, arg1, arg2, arg3 !== 0);
      case Transition.PRECEDENCE:
        return new PrecedencePredicateTransition(target, arg1);
      case Transition.ATOM:
        return arg3 !== 0 ? new AtomTransition(target, Token.EOF) : new AtomTransition(target, arg1);
      case Transition.ACTION:
        return new ActionTransition(target, arg1, arg2, arg3 !== 0);
      case Transition.SET:
        return new SetTransition(target, sets[arg1]);
      case Transition.NOT_SET:
        return new NotSetTransition(target, sets[arg1]);
      case Transition.WILDCARD:
        return new WildcardTransition(target);
      default:
        throw new Error("The specified transition type: " + type + " is not valid.");
    }
  }
  stateFactory(type, ruleIndex) {
    const ctor = _ATNDeserializer.stateTypeMapper.get(type);
    if (!ctor) {
      throw new Error("The specified state type " + type + " is not valid.");
    }
    const s = new ctor();
    s.ruleIndex = ruleIndex;
    return s;
  }
  lexerActionFactory(type, data1, data2) {
    const factory = _ATNDeserializer.lexerActionFactoryMapper.get(type);
    if (!factory) {
      throw new Error("The specified lexer action type " + type + " is not valid.");
    }
    return factory(data1, data2);
  }
};
var OrderedHashMap = class _OrderedHashMap extends HashMap {
  static {
    __name(this, "OrderedHashMap");
  }
  #keys = [];
  clear() {
    super.clear();
    this.#keys = [];
  }
  get(key) {
    return super.get(key);
  }
  set(key, value) {
    const result = super.set(key, value);
    if (result === void 0) {
      this.#keys.push(key);
    }
    return result;
  }
  setIfAbsent(key, value) {
    const result = super.setIfAbsent(key, value);
    if (result === void 0) {
      this.#keys.push(key);
    }
    return result;
  }
  /**
   * @returns an iterable of the values in the map, in the order they were inserted.
   */
  values() {
    return {
      [Symbol.iterator]: () => {
        let index2 = 0;
        return {
          next: /* @__PURE__ */ __name(() => {
            if (index2 < this.#keys.length) {
              return {
                done: false,
                value: super.get(this.#keys[index2++])
              };
            }
            return {
              done: true,
              value: void 0
            };
          }, "next")
        };
      }
    };
  }
  /**
   * @returns an iterable of the keys in the map, in the order they were inserted.
   */
  keys() {
    return this.#keys[Symbol.iterator]();
  }
  equals(o) {
    if (!(o instanceof _OrderedHashMap)) {
      return false;
    }
    return super.equals(o);
  }
};
var ATNSerializer = class _ATNSerializer {
  static {
    __name(this, "ATNSerializer");
  }
  atn;
  data = [];
  // Note that we use a LinkedHashMap as a set to maintain insertion order while deduplicating entries with the
  // same key.
  sets = new OrderedHashMap(ObjectEqualityComparator.instance);
  nonGreedyStates = [];
  precedenceStates = [];
  constructor(atn) {
    this.atn = atn;
  }
  static getSerialized(atn) {
    return new _ATNSerializer(atn).serialize();
  }
  static serializeSets(data, sets) {
    data.push(sets.length);
    for (const set2 of sets) {
      const containsEof = set2.contains(Token.EOF);
      const intervals = [...set2];
      if (containsEof && intervals[0].stop === Token.EOF) {
        data.push(intervals.length - 1);
      } else {
        data.push(intervals.length);
      }
      data.push(containsEof ? 1 : 0);
      for (const interval of intervals) {
        if (interval.start === Token.EOF) {
          if (interval.stop === Token.EOF) {
            continue;
          } else {
            data.push(0);
          }
        } else {
          data.push(interval.start);
        }
        data.push(interval.stop);
      }
    }
  }
  /**
   * Serialize state descriptors, edge descriptors, and decision -> state map
   *  into list of ints.  Likely out of date, but keeping as it could be helpful:
   *
   *      SERIALIZED_VERSION
   *      UUID (2 longs)
   * 		grammar-type, (ANTLRParser.LEXER, ...)
   *  	max token type,
   *  	num states,
   *  	state-0-type ruleIndex, state-1-type ruleIndex, ... state-i-type ruleIndex optional-arg ...
   *  	num rules,
   *  	rule-1-start-state rule-1-args, rule-2-start-state  rule-2-args, ...
   *  	(args are token type,actionIndex in lexer else 0,0)
   *      num modes,
   *      mode-0-start-state, mode-1-start-state, ... (parser has 0 modes)
   *      num unicode-bmp-sets
   *      bmp-set-0-interval-count intervals, bmp-set-1-interval-count intervals, ...
   *      num unicode-smp-sets
   *      smp-set-0-interval-count intervals, smp-set-1-interval-count intervals, ...
   *	num total edges,
   *      src, trg, edge-type, edge arg1, optional edge arg2 (present always), ...
   *      num decisions,
   *      decision-0-start-state, decision-1-start-state, ...
   *
   *  Convenient to pack into unsigned shorts to make as Java string.
   */
  serialize() {
    this.addPreamble();
    const edgeCount = this.addEdges();
    this.addNonGreedyStates();
    this.addPrecedenceStates();
    this.addRuleStatesAndLexerTokenTypes();
    this.addModeStartStates();
    const setIndices = this.addSets();
    this.addEdges(edgeCount, setIndices);
    this.addDecisionStartStates();
    this.addLexerActions();
    return this.data;
  }
  addPreamble() {
    this.data.push(ATNDeserializer.SERIALIZED_VERSION);
    this.data.push(this.atn.grammarType);
    this.data.push(this.atn.maxTokenType);
  }
  addLexerActions() {
    if (this.atn.grammarType === ATN.LEXER) {
      this.data.push(this.atn.lexerActions.length);
      for (const action of this.atn.lexerActions) {
        this.data.push(action.actionType);
        switch (action.actionType) {
          case LexerActionType.CHANNEL: {
            const channel = action.channel;
            this.data.push(channel);
            this.data.push(0);
            break;
          }
          case LexerActionType.CUSTOM: {
            const ruleIndex = action.ruleIndex;
            const actionIndex = action.actionIndex;
            this.data.push(ruleIndex);
            this.data.push(actionIndex);
            break;
          }
          case LexerActionType.MODE: {
            const mode = action.mode;
            this.data.push(mode);
            this.data.push(0);
            break;
          }
          case LexerActionType.MORE: {
            this.data.push(0);
            this.data.push(0);
            break;
          }
          case LexerActionType.POP_MODE: {
            this.data.push(0);
            this.data.push(0);
            break;
          }
          case LexerActionType.PUSH_MODE: {
            const mode = action.mode;
            this.data.push(mode);
            this.data.push(0);
            break;
          }
          case LexerActionType.SKIP: {
            this.data.push(0);
            this.data.push(0);
            break;
          }
          case LexerActionType.TYPE: {
            const type = action.type;
            this.data.push(type);
            this.data.push(0);
            break;
          }
          default: {
            throw new Error(`The specified lexer action type ${action.actionType} is not valid.`);
          }
        }
      }
    }
  }
  addDecisionStartStates() {
    this.data.push(this.atn.decisionToState.length);
    for (const decStartState of this.atn.decisionToState) {
      this.data.push(decStartState.stateNumber);
    }
  }
  addEdges(...args) {
    switch (args.length) {
      case 0: {
        let edgeCount = 0;
        this.data.push(this.atn.states.length);
        for (const s of this.atn.states) {
          if (s === null) {
            this.data.push(ATNState.INVALID_TYPE);
            continue;
          }
          const stateType = s.constructor.stateType;
          if (s instanceof DecisionState && s.nonGreedy) {
            this.nonGreedyStates.push(s.stateNumber);
          }
          if (s instanceof RuleStartState && s.isLeftRecursiveRule) {
            this.precedenceStates.push(s.stateNumber);
          }
          this.data.push(stateType);
          this.data.push(s.ruleIndex);
          if (s.constructor.stateType === ATNState.LOOP_END) {
            this.data.push(s.loopBackState.stateNumber);
          } else {
            if (s instanceof BlockStartState) {
              this.data.push(s.endState.stateNumber);
            }
          }
          if (s.constructor.stateType !== ATNState.RULE_STOP) {
            edgeCount += s.transitions.length;
          }
          for (const t of s.transitions) {
            const edgeType = t.transitionType;
            if (edgeType === Transition.SET || edgeType === Transition.NOT_SET) {
              const st = t;
              this.sets.set(st.set, true);
            }
          }
        }
        return edgeCount;
      }
      case 2: {
        const [edgeCount, setIndices] = args;
        this.data.push(edgeCount);
        for (const s of this.atn.states) {
          if (s === null) {
            continue;
          }
          if (s.constructor.stateType === ATNState.RULE_STOP) {
            continue;
          }
          for (const t of s.transitions) {
            if (this.atn.states[t.target.stateNumber] === null) {
              throw new Error("Cannot serialize a transition to a removed state.");
            }
            const src = s.stateNumber;
            let trg = t.target.stateNumber;
            const edgeType = t.transitionType;
            let arg1 = 0;
            let arg2 = 0;
            let arg3 = 0;
            switch (edgeType) {
              case Transition.RULE: {
                trg = t.followState.stateNumber;
                arg1 = t.target.stateNumber;
                arg2 = t.ruleIndex;
                arg3 = t.precedence;
                break;
              }
              case Transition.PRECEDENCE: {
                const ppt = t;
                arg1 = ppt.precedence;
                break;
              }
              case Transition.PREDICATE: {
                const pt = t;
                arg1 = pt.ruleIndex;
                arg2 = pt.predIndex;
                arg3 = pt.isCtxDependent ? 1 : 0;
                break;
              }
              case Transition.RANGE: {
                arg1 = t.start;
                arg2 = t.stop;
                if (arg1 === Token.EOF) {
                  arg1 = 0;
                  arg3 = 1;
                }
                break;
              }
              case Transition.ATOM: {
                arg1 = t.labelValue;
                if (arg1 === Token.EOF) {
                  arg1 = 0;
                  arg3 = 1;
                }
                break;
              }
              case Transition.ACTION: {
                const at = t;
                arg1 = at.ruleIndex;
                arg2 = at.actionIndex;
                arg3 = at.isCtxDependent ? 1 : 0;
                break;
              }
              case Transition.SET: {
                arg1 = setIndices.get(t.set);
                break;
              }
              case Transition.NOT_SET: {
                arg1 = setIndices.get(t.set);
                break;
              }
              case Transition.WILDCARD: {
                break;
              }
              default:
            }
            this.data.push(src);
            this.data.push(trg);
            this.data.push(edgeType);
            this.data.push(arg1);
            this.data.push(arg2);
            this.data.push(arg3);
          }
        }
        break;
      }
      default: {
        throw new Error("Invalid number of arguments");
      }
    }
  }
  addSets() {
    _ATNSerializer.serializeSets(this.data, [...this.sets.keys()]);
    const setIndices = new HashMap();
    let setIndex = 0;
    for (const s of this.sets.keys()) {
      setIndices.set(s, setIndex++);
    }
    return setIndices;
  }
  addModeStartStates() {
    const modeCount = this.atn.modeToStartState.length;
    this.data.push(modeCount);
    if (modeCount > 0) {
      for (const modeStartState of this.atn.modeToStartState) {
        this.data.push(modeStartState.stateNumber);
      }
    }
  }
  addRuleStatesAndLexerTokenTypes() {
    const ruleCount = this.atn.ruleToStartState.length;
    this.data.push(ruleCount);
    for (let r = 0; r < ruleCount; r++) {
      const ruleStartState = this.atn.ruleToStartState[r];
      this.data.push(ruleStartState.stateNumber);
      if (this.atn.grammarType === ATN.LEXER) {
        this.data.push(this.atn.ruleToTokenType[r]);
      }
    }
  }
  addPrecedenceStates() {
    this.data.push(this.precedenceStates.length);
    for (const state of this.precedenceStates) {
      this.data.push(state);
    }
  }
  addNonGreedyStates() {
    this.data.push(this.nonGreedyStates.length);
    for (const state of this.nonGreedyStates) {
      this.data.push(state);
    }
  }
};
var DFAState = class _DFAState {
  static {
    __name(this, "DFAState");
  }
  stateNumber = -1;
  configs;
  /**
   * `edges[symbol]` points to target of symbol. Shift up by 1 so (-1) {@link Token.EOF} maps to `edges[0]`.
   */
  edges = [];
  isAcceptState = false;
  /**
   * If accept state, what ttype do we match or alt do we predict? This is set to {@link ATN.INVALID_ALT_NUMBER}
   * when {@link predicates} `!= null` or {@link requiresFullContext}.
   */
  prediction = -1;
  lexerActionExecutor = null;
  /**
   * Indicates that this state was created during SLL prediction that discovered a conflict between the configurations
   * in the state. Future {@link ParserATNSimulator.execATN} invocations immediately jumped doing
   * full context prediction if this field is true.
   */
  requiresFullContext = false;
  /**
   * During SLL parsing, this is a list of predicates associated with the ATN configurations of the DFA state.
   * When we have predicates, {@link requiresFullContext} is `false` since full context prediction evaluates
   * predicates on-the-fly. If this is not null, then {@link prediction} is `ATN.INVALID_ALT_NUMBER`.
   *
   * We only use these for non-{@link #requiresFullContext} but conflicting states. That
   * means we know from the context (it's $ or we don't dip into outer
   * context) that it's an ambiguity not a conflict.
   *
   * This list is computed by {@link ParserATNSimulator#predicateDFAState}.
   */
  predicates = null;
  constructor(configs) {
    if (configs) {
      this.configs = configs;
    }
  }
  static fromState(stateNumber) {
    const result = new _DFAState();
    result.stateNumber = stateNumber;
    return result;
  }
  static fromConfigs(configs) {
    return new _DFAState(configs);
  }
  static hashCode(state) {
    return state.configs.hashCode();
  }
  /**
   * Two {@link DFAState} instances are equal if their ATN configuration sets
   * are the same. This method is used to see if a state already exists.
   *
   * Because the number of alternatives and number of ATN configurations are
   * finite, there is a finite number of DFA states that can be processed.
   * This is necessary to show that the algorithm terminates.
   *
   * Cannot test the DFA state numbers here because in
   * {@link ParserATNSimulator#addDFAState} we need to know if any other state
   * exists that has this exact set of ATN configurations. The
   * {@link #stateNumber} is irrelevant.
   *
   * @param a The first {@link DFAState}.
   * @param b The second {@link DFAState}.
   *
   * @returns `true` if the two states are equal, otherwise `false`.
   */
  static equals(a, b) {
    return a.configs.equals(b.configs);
  }
  /**
   * @returns the set of all alts mentioned by all ATN configurations in this DFA state.
   */
  getAltSet() {
    const alts = /* @__PURE__ */ new Set();
    for (const config2 of this.configs) {
      alts.add(config2.alt);
    }
    if (alts.size === 0) {
      return null;
    }
    return alts;
  }
  toString() {
    let buf = "";
    buf += this.stateNumber;
    buf += ":";
    buf += this.configs ? this.configs.toString() : "";
    if (this.isAcceptState) {
      buf += "=>";
      if (this.predicates) {
        buf += arrayToString(this.predicates);
      } else {
        buf += this.prediction;
      }
    }
    return buf.toString();
  }
};
var ATNSimulator = class {
  static {
    __name(this, "ATNSimulator");
  }
  /** Must distinguish between missing edge and edge we know leads nowhere */
  static ERROR = DFAState.fromState(2147483647);
  atn;
  /**
   * The context cache maps all PredictionContext objects that are ==
   * to a single cached copy. This cache is shared across all contexts
   * in all ATNConfigs in all DFA states.  We rebuild each ATNConfigSet
   * to use only cached nodes/graphs in addDFAState(). We don't want to
   * fill this during closure() since there are lots of contexts that
   * pop up but are not used ever again. It also greatly slows down closure().
   *
   * This cache makes a huge difference in memory and a little bit in speed.
   * For the Java grammar on java.*, it dropped the memory requirements
   * at the end from 25M to 16M. We don't store any of the full context
   * graphs in the DFA because they are limited to local context only,
   * but apparently there's a lot of repetition there as well. We optimize
   * the config contexts before storing the config set in the DFA states
   * by literally rebuilding them with cached subgraphs only.
   *
   * I tried a cache for use during closure operations, that was
   * whacked after each adaptivePredict(). It cost a little bit
   * more time I think and doesn't save on the overall footprint
   * so it's not worth the complexity.
   */
  sharedContextCache;
  constructor(atn, sharedContextCache) {
    this.atn = atn;
    this.sharedContextCache = sharedContextCache;
    return this;
  }
  getCachedContext(context) {
    if (!this.sharedContextCache) {
      return context;
    }
    const visited = new HashMap(ObjectEqualityComparator.instance);
    return getCachedPredictionContext(context, this.sharedContextCache, visited);
  }
};
var CodePointTransitions = class _CodePointTransitions {
  static {
    __name(this, "CodePointTransitions");
  }
  /** @returns new {@link AtomTransition}     */
  static createWithCodePoint(target, codePoint) {
    return _CodePointTransitions.createWithCodePointRange(target, codePoint, codePoint);
  }
  /** @returns new {@link AtomTransition} if range represents one atom else {@link SetTransition}. */
  static createWithCodePointRange(target, codePointFrom, codePointTo) {
    return codePointFrom === codePointTo ? new AtomTransition(target, codePointFrom) : new RangeTransition(target, codePointFrom, codePointTo);
  }
};
var DecisionInfo = class {
  static {
    __name(this, "DecisionInfo");
  }
  /**
   * The decision number, which is an index into {@link ATN.decisionToState}.
   */
  decision = 0;
  /**
   * The total number of times {@link ParserATNSimulator.adaptivePredict} was
   * invoked for this decision.
   */
  invocations = 0;
  /**
   * The total time spent in {@link ParserATNSimulator.adaptivePredict} for
   * this decision, in nanoseconds.
   *
   * The value of this field contains the sum of differential results obtained
   * by {@link process.hrtime()}, and is not adjusted to compensate for JIT
   * and/or garbage collection overhead. For best accuracy, use a modern Node.js
   * version that provides precise results from {@link process.hrtime()}, and
   * perform profiling in a separate process which is warmed up by parsing the
   * input prior to profiling.
   */
  timeInPrediction = 0;
  /**
   * The sum of the lookahead required for SLL prediction for this decision.
   * Note that SLL prediction is used before LL prediction for performance
   * reasons even when {@link PredictionMode.LL} or
   * {@link PredictionMode.LL_EXACT_AMBIG_DETECTION} is used.
   */
  sllTotalLook = 0;
  /**
   * Gets the minimum lookahead required for any single SLL prediction to
   * complete for this decision, by reaching a unique prediction, reaching an
   * SLL conflict state, or encountering a syntax error.
   */
  sllMinLook = 0;
  /**
   * Gets the maximum lookahead required for any single SLL prediction to
   * complete for this decision, by reaching a unique prediction, reaching an
   * SLL conflict state, or encountering a syntax error.
   */
  sllMaxLook = 0;
  /**
   * Gets the {@link LookaheadEventInfo} associated with the event where the
   * {@link sllMaxLook} value was set.
   */
  sllMaxLookEvent;
  /**
   * The sum of the lookahead required for LL prediction for this decision.
   * Note that LL prediction is only used when SLL prediction reaches a
   * conflict state.
   */
  llTotalLook = 0;
  /**
   * Gets the minimum lookahead required for any single LL prediction to
   * complete for this decision. An LL prediction completes when the algorithm
   * reaches a unique prediction, a conflict state (for
   * {@link PredictionMode.LL}, an ambiguity state (for
   * {@link PredictionMode.LL_EXACT_AMBIG_DETECTION}, or a syntax error.
   */
  llMinLook = 0;
  /**
   * Gets the maximum lookahead required for any single LL prediction to
   * complete for this decision. An LL prediction completes when the algorithm
   * reaches a unique prediction, a conflict state (for
   * {@link PredictionMode.LL}, an ambiguity state (for
   * {@link PredictionMode.LL_EXACT_AMBIG_DETECTION}, or a syntax error.
   */
  llMaxLook = 0;
  /**
   * Gets the {@link LookaheadEventInfo} associated with the event where the
   * {@link llMaxLook} value was set.
   */
  llMaxLookEvent;
  /**
   * A collection of {@link ContextSensitivityInfo} instances describing the
   * context sensitivities encountered during LL prediction for this decision.
   */
  contextSensitivities;
  /**
   * A collection of {@link DecisionEventInfo} instances describing the parse errors
   * identified during calls to {@link ParserATNSimulator.adaptivePredict} for
   * this decision.
   */
  errors;
  /**
   * A collection of {@link AmbiguityInfo} instances describing the
   * ambiguities encountered during LL prediction for this decision.
   */
  ambiguities;
  /**
   * A collection of {@link PredicateEvalInfo} instances describing the
   * results of evaluating individual predicates during prediction for this
   * decision.
   */
  predicateEvals;
  /**
   * The total number of ATN transitions required during SLL prediction for
   * this decision. An ATN transition is determined by the number of times the
   * DFA does not contain an edge that is required for prediction, resulting
   * in on-the-fly computation of that edge.
  /**
   * If DFA caching of SLL transitions is employed by the implementation, ATN
   * computation may cache the computed edge for efficient lookup during
   * future parsing of this decision. Otherwise, the SLL parsing algorithm
   * will use ATN transitions exclusively.
   *
   * @see sllDFATransitions
   * @see ParserATNSimulator.computeTargetState
   * @see LexerATNSimulator.computeTargetState
   */
  sllATNTransitions = 0;
  /**
   * The total number of DFA transitions required during SLL prediction for
   * this decision.
   *
   * If the ATN simulator implementation does not use DFA caching for SLL
   * transitions, this value will be 0.
   *
   * @see ParserATNSimulator.getExistingTargetState
   * @see LexerATNSimulator.getExistingTargetState
   */
  sllDFATransitions = 0;
  /**
   * Gets the total number of times SLL prediction completed in a conflict
   * state, resulting in fallback to LL prediction.
   *
   * Note that this value is not related to whether or not
   * {@link PredictionMode.SLL} may be used successfully with a particular
   * grammar. If the ambiguity resolution algorithm applied to the SLL
   * conflicts for this decision produce the same result as LL prediction for
   * this decision, {@link PredictionMode.SLL} would produce the same overall
   * parsing result as {@link PredictionMode.LL}.
   */
  llFallback = 0;
  /**
   * The total number of ATN transitions required during LL prediction for
   * this decision. An ATN transition is determined by the number of times the
   * DFA does not contain an edge that is required for prediction, resulting
   * in on-the-fly computation of that edge.
   *
   * If DFA caching of LL transitions is employed by the implementation, ATN
   * computation may cache the computed edge for efficient lookup during
   * future parsing of this decision. Otherwise, the LL parsing algorithm will
   * use ATN transitions exclusively.
   *
   * @see llDFATransitions
   * @see ParserATNSimulator.computeTargetState
   * @see LexerATNSimulator.computeTargetState
   */
  llATNTransitions = 0;
  /**
   * The total number of DFA transitions required during LL prediction for
   * this decision.
   *
   * If the ATN simulator implementation does not use DFA caching for LL
   * transitions, this value will be 0.
   *
   * @see ParserATNSimulator.getExistingTargetState
   * @see LexerATNSimulator.getExistingTargetState
   */
  llDFATransitions = 0;
  /**
   * Constructs a new instance of the {@link DecisionInfo} class to contain
   * statistics for a particular decision.
   *
   * @param decision The decision number
   */
  constructor(decision) {
    this.decision = decision;
    this.contextSensitivities = [];
    this.errors = [];
    this.ambiguities = [];
    this.predicateEvals = [];
  }
  toString() {
    return "{decision=" + this.decision + ", contextSensitivities=" + this.contextSensitivities.length + ", errors=" + this.errors.length + ", ambiguities=" + this.ambiguities.length + ", sllLookahead=" + this.sllTotalLook + ", sllATNTransitions=" + this.sllATNTransitions + ", sllDFATransitions=" + this.sllDFATransitions + ", llFallback=" + this.llFallback + ", llLookahead=" + this.llTotalLook + ", llATNTransitions=" + this.llATNTransitions + "}";
  }
};
var LexerATNConfig = class _LexerATNConfig extends ATNConfig {
  static {
    __name(this, "LexerATNConfig");
  }
  /**
   * This is the backing field for {@link #getLexerActionExecutor}.
   */
  lexerActionExecutor;
  passedThroughNonGreedyDecision;
  constructor(config2, state, context, lexerActionExecutor) {
    super(config2, state, context ?? config2.context, context ? SemanticContext.NONE : config2.semanticContext);
    this.lexerActionExecutor = context ? lexerActionExecutor : config2.lexerActionExecutor ?? null;
    this.passedThroughNonGreedyDecision = _LexerATNConfig.checkNonGreedyDecision(config2, this.state);
    return this;
  }
  static createWithExecutor(config2, state, lexerActionExecutor) {
    return new _LexerATNConfig(config2, state, config2.context, lexerActionExecutor);
  }
  static createWithConfig(state, config2, context) {
    return new _LexerATNConfig(config2, state, context ?? null, config2.lexerActionExecutor);
  }
  static createWithContext(state, alt, context) {
    return new _LexerATNConfig({ alt }, state, context, null);
  }
  static checkNonGreedyDecision(source, target) {
    return source.passedThroughNonGreedyDecision || "nonGreedy" in target && target.nonGreedy;
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hashCode = MurmurHash.initialize(7);
      hashCode = MurmurHash.update(hashCode, this.state.stateNumber);
      hashCode = MurmurHash.update(hashCode, this.alt);
      hashCode = MurmurHash.updateFromComparable(hashCode, this.context);
      hashCode = MurmurHash.updateFromComparable(hashCode, this.semanticContext);
      hashCode = MurmurHash.update(hashCode, this.passedThroughNonGreedyDecision ? 1 : 0);
      hashCode = MurmurHash.updateFromComparable(hashCode, this.lexerActionExecutor);
      hashCode = MurmurHash.finish(hashCode, 6);
      this.cachedHashCode = hashCode;
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    return this.passedThroughNonGreedyDecision === other.passedThroughNonGreedyDecision && (this.lexerActionExecutor && other.lexerActionExecutor ? this.lexerActionExecutor.equals(other.lexerActionExecutor) : !other.lexerActionExecutor) && super.equals(other);
  }
};
var BaseErrorListener = class {
  static {
    __name(this, "BaseErrorListener");
  }
  syntaxError(recognizer, offendingSymbol, line, column, msg, e) {
  }
  reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) {
  }
  reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {
  }
  reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) {
  }
};
var ConsoleErrorListener = class _ConsoleErrorListener extends BaseErrorListener {
  static {
    __name(this, "ConsoleErrorListener");
  }
  /**
   * Provides a default instance of {@link ConsoleErrorListener}.
   */
  static instance = new _ConsoleErrorListener();
  syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, _e) {
    console.error("line " + line + ":" + charPositionInLine + " " + msg);
  }
};
var ProxyErrorListener = class extends BaseErrorListener {
  constructor(delegates) {
    super();
    this.delegates = delegates;
    return this;
  }
  static {
    __name(this, "ProxyErrorListener");
  }
  syntaxError(recognizer, offendingSymbol, line, column, msg, e) {
    this.delegates.forEach((d) => {
      d.syntaxError(recognizer, offendingSymbol, line, column, msg, e);
    });
  }
  reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) {
    this.delegates.forEach((d) => {
      d.reportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs);
    });
  }
  reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) {
    this.delegates.forEach((d) => {
      d.reportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs);
    });
  }
  reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) {
    this.delegates.forEach((d) => {
      d.reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs);
    });
  }
};
var Recognizer = class _Recognizer {
  static {
    __name(this, "Recognizer");
  }
  static EOF = -1;
  static tokenTypeMapCache = /* @__PURE__ */ new Map();
  static ruleIndexMapCache = /* @__PURE__ */ new Map();
  interpreter;
  listeners = [ConsoleErrorListener.instance];
  stateNumber = -1;
  checkVersion(toolVersion) {
    const runtimeVersion = "4.13.1";
    if (runtimeVersion !== toolVersion) {
      console.error("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion);
    }
  }
  addErrorListener(listener) {
    this.listeners.push(listener);
  }
  removeErrorListeners() {
    this.listeners = [];
  }
  removeErrorListener(listener) {
    for (let i = 0; i < this.listeners.length; i++) {
      if (this.listeners[i] === listener) {
        this.listeners.splice(i, 1);
        return;
      }
    }
  }
  getErrorListeners() {
    return this.listeners;
  }
  getTokenTypeMap() {
    const vocabulary = this.vocabulary;
    let result = _Recognizer.tokenTypeMapCache.get(vocabulary);
    if (!result) {
      result = /* @__PURE__ */ new Map();
      for (let i = 0; i <= this.atn.maxTokenType; i++) {
        const literalName = vocabulary.getLiteralName(i);
        if (literalName) {
          result.set(literalName, i);
        }
        const symbolicName = vocabulary.getSymbolicName(i);
        if (symbolicName) {
          result.set(symbolicName, i);
        }
      }
      result.set("EOF", Token.EOF);
      _Recognizer.tokenTypeMapCache.set(vocabulary, result);
    }
    return result;
  }
  /**
   * Get a map from rule names to rule indexes.
   * Used for XPath and tree pattern compilation.
   */
  getRuleIndexMap() {
    const ruleNames = this.ruleNames;
    let result = _Recognizer.ruleIndexMapCache.get(ruleNames);
    if (!result) {
      result = /* @__PURE__ */ new Map();
      ruleNames.forEach((ruleName, idx) => {
        return result.set(ruleName, idx);
      });
      _Recognizer.ruleIndexMapCache.set(ruleNames, result);
    }
    return result;
  }
  getTokenType(tokenName) {
    const ttype = this.getTokenTypeMap().get(tokenName);
    if (ttype) {
      return ttype;
    }
    return Token.INVALID_TYPE;
  }
  /** What is the error header, normally line/character position information? */
  getErrorHeader(e) {
    const line = e.offendingToken?.line;
    const column = e.offendingToken?.column;
    return "line " + line + ":" + column;
  }
  get errorListenerDispatch() {
    return new ProxyErrorListener(this.listeners);
  }
  /**
   * subclass needs to override these if there are semantic predicates or actions
   * that the ATN interp needs to execute
   */
  sempred(_localctx, _ruleIndex, _actionIndex) {
    return true;
  }
  // TODO: make localCtx an optional parameter, not optional null.
  precpred(_localctx, _precedence) {
    return true;
  }
  action(_localctx, _ruleIndex, _actionIndex) {
  }
  get atn() {
    return this.interpreter.atn;
  }
  get state() {
    return this.stateNumber;
  }
  set state(state) {
    this.stateNumber = state;
  }
  getParseInfo() {
    return void 0;
  }
};
var CommonTokenFactory = class _CommonTokenFactory {
  static {
    __name(this, "CommonTokenFactory");
  }
  /**
   * The default {@link CommonTokenFactory} instance.
   *
   *
   * This token factory does not explicitly copy token text when constructing
   * tokens.
   */
  static DEFAULT = new _CommonTokenFactory();
  /**
   * Indicates whether {@link CommonToken.setText} should be called after
   * constructing tokens to explicitly set the text. This is useful for cases
   * where the input stream might not be able to provide arbitrary substrings
   * of text from the input after the lexer creates a token (e.g. the
   * implementation of {@link CharStream.getText} in
   * {@link UnbufferedCharStream} throws an
   * {@link UnsupportedOperationException}). Explicitly setting the token text
   * allows {@link Token.getText} to be called at any time regardless of the
   * input stream implementation.
   *
   *
   * The default value is `false` to avoid the performance and memory
   * overhead of copying text for every token unless explicitly requested.
   */
  copyText = false;
  constructor(copyText) {
    this.copyText = copyText ?? false;
  }
  create(source, type, text, channel, start, stop, line, column) {
    const t = CommonToken.fromSource(source, type, channel, start, stop);
    t.line = line;
    t.column = column;
    if (text) {
      t.text = text;
    } else if (this.copyText && source[1] !== null) {
      t.text = source[1].getTextFromRange(start, stop);
    }
    return t;
  }
};
var RecognitionException = class _RecognitionException extends Error {
  static {
    __name(this, "RecognitionException");
  }
  ctx;
  /**
   * The current {@link Token} when an error occurred. Since not all streams
   * support accessing symbols by index, we have to track the {@link Token}
   * instance itself
   */
  offendingToken = null;
  /**
   * Get the ATN state number the parser was in at the time the error
   * occurred. For {@link NoViableAltException} and
   * {@link LexerNoViableAltException} exceptions, this is the
   * {@link DecisionState} number. For others, it is the state whose outgoing
   * edge we couldn't match.
   */
  offendingState = -1;
  recognizer;
  input;
  constructor(params) {
    super(params.message);
    if (Error.captureStackTrace) {
      Error.captureStackTrace(this, _RecognitionException);
    }
    this.message = params.message;
    this.recognizer = params.recognizer;
    this.input = params.input;
    this.ctx = params.ctx;
    if (this.recognizer !== null) {
      this.offendingState = this.recognizer.state;
    }
  }
  /**
   * Gets the set of input symbols which could potentially follow the
   * previously matched symbol at the time this exception was thrown.
   *
   * If the set of expected tokens is not known and could not be computed,
   * this method returns `null`.
   *
   * @returns The set of token types that could potentially follow the current
   * state in the ATN, or `null` if the information is not available.
   */
  getExpectedTokens() {
    if (this.recognizer !== null && this.ctx !== null) {
      return this.recognizer.atn.getExpectedTokens(this.offendingState, this.ctx);
    } else {
      return null;
    }
  }
  // If the state number is not known, this method returns -1.
  toString() {
    return this.message;
  }
};
var LexerNoViableAltException = class extends RecognitionException {
  static {
    __name(this, "LexerNoViableAltException");
  }
  startIndex;
  deadEndConfigs;
  constructor(lexer, input, startIndex, deadEndConfigs) {
    super({ message: "", recognizer: lexer, input, ctx: null });
    this.startIndex = startIndex;
    this.deadEndConfigs = deadEndConfigs;
  }
  toString() {
    let symbol2 = "";
    if (this.input && this.startIndex >= 0 && this.startIndex < this.input.size) {
      symbol2 = this.input.getTextFromRange(this.startIndex, this.startIndex);
    }
    return `LexerNoViableAltException(${symbol2})`;
  }
};
var Lexer = class _Lexer extends Recognizer {
  static {
    __name(this, "Lexer");
  }
  static DEFAULT_MODE = 0;
  static MORE = -2;
  static SKIP = -3;
  static DEFAULT_TOKEN_CHANNEL = Token.DEFAULT_CHANNEL;
  static HIDDEN = Token.HIDDEN_CHANNEL;
  options = {
    minDFAEdge: 0,
    maxDFAEdge: 256,
    minCodePoint: 0,
    maxCodePoint: 1114111
  };
  /**
   * What character index in the stream did the current token start at?
   *  Needed, for example, to get the text for current token.  Set at
   *  the start of nextToken.
   */
  tokenStartCharIndex = -1;
  /** The channel number for the current token */
  channel = 0;
  /** The token type for the current token */
  type = 0;
  mode = _Lexer.DEFAULT_MODE;
  /** The start column of the current token (the one that was last read by `nextToken`). */
  currentTokenColumn = 0;
  /**
   * The line on which the first character of the current token (the one that was last read by `nextToken`) resides.
   */
  currentTokenStartLine = 0;
  input;
  /**
   * The goal of all lexer rules/methods is to create a token object.
   *  This is an instance variable as multiple rules may collaborate to
   *  create a single token.  nextToken will return this object after
   *  matching lexer rule(s).  If you subclass to allow multiple token
   *  emissions, then set this to the last token to be matched or
   *  something non-null so that the auto token emit mechanism will not
   *  emit another token.
   */
  token = null;
  /**
   * Once we see EOF on char stream, next token will be EOF.
   * If you have DONE : EOF ; then you see DONE EOF.
   */
  hitEOF = false;
  factory;
  #modeStack = [];
  /**
   * The text to be used for the next token. If this is not null, then the text
   * for the next token is fixed and is not subject to change in the normal
   * workflow of the lexer.
   */
  #text;
  constructor(input, options) {
    super();
    this.options = { ...this.options, ...options };
    this.input = input;
    this.factory = CommonTokenFactory.DEFAULT;
  }
  reset(seekBack = true) {
    if (seekBack) {
      this.input.seek(0);
    }
    this.token = null;
    this.type = Token.INVALID_TYPE;
    this.channel = Token.DEFAULT_CHANNEL;
    this.tokenStartCharIndex = -1;
    this.currentTokenColumn = -1;
    this.currentTokenStartLine = -1;
    this.#text = void 0;
    this.hitEOF = false;
    this.mode = _Lexer.DEFAULT_MODE;
    this.#modeStack = [];
    this.interpreter.reset();
  }
  /** @returns a token from this source; i.e., match a token on the char stream. */
  nextToken() {
    if (this.input === null) {
      throw new Error("nextToken requires a non-null input stream.");
    }
    const tokenStartMarker = this.input.mark();
    try {
      while (true) {
        if (this.hitEOF) {
          this.emitEOF();
          return this.token;
        }
        this.token = null;
        this.channel = Token.DEFAULT_CHANNEL;
        this.tokenStartCharIndex = this.input.index;
        this.currentTokenColumn = this.interpreter.column;
        this.currentTokenStartLine = this.interpreter.line;
        this.#text = void 0;
        let continueOuter = false;
        while (true) {
          this.type = Token.INVALID_TYPE;
          let ttype = _Lexer.SKIP;
          try {
            ttype = this.interpreter.match(this.input, this.mode);
          } catch (e) {
            if (e instanceof LexerNoViableAltException) {
              this.notifyListeners(e);
              this.recover(e);
            } else {
              throw e;
            }
          }
          if (this.input.LA(1) === Token.EOF) {
            this.hitEOF = true;
          }
          if (this.type === Token.INVALID_TYPE) {
            this.type = ttype;
          }
          if (this.type === _Lexer.SKIP) {
            continueOuter = true;
            break;
          }
          if (this.type !== _Lexer.MORE) {
            break;
          }
        }
        if (continueOuter) {
          continue;
        }
        if (this.token === null) {
          this.emit();
        }
        return this.token;
      }
    } finally {
      this.input.release(tokenStartMarker);
    }
  }
  /**
   * Instruct the lexer to skip creating a token for current lexer rule
   * and look for another token. nextToken() knows to keep looking when
   * a lexer rule finishes with token set to SKIP_TOKEN. Recall that
   * if token==null at end of any token rule, it creates one for you
   * and emits it.
   */
  skip() {
    this.type = _Lexer.SKIP;
  }
  more() {
    this.type = _Lexer.MORE;
  }
  pushMode(m2) {
    if (LexerATNSimulator.debug) {
      console.log("pushMode " + m2);
    }
    this.#modeStack.push(this.mode);
    this.mode = m2;
  }
  popMode() {
    if (this.#modeStack.length === 0) {
      throw new Error("Empty Stack");
    }
    if (LexerATNSimulator.debug) {
      console.log("popMode back to " + this.#modeStack.slice(0, -1));
    }
    this.mode = this.#modeStack.pop();
    return this.mode;
  }
  get modeStack() {
    return this.#modeStack;
  }
  /**
   * By default does not support multiple emits per nextToken invocation
   * for efficiency reasons. Subclass and override this method, nextToken,
   * and getToken (to push tokens into a list and pull from that list
   * rather than a single variable as this implementation does).
   */
  emitToken(token) {
    this.token = token;
  }
  /**
   * The standard method called to automatically emit a token at the
   * outermost lexical rule. The token object should point into the
   * char buffer start..stop. If there is a text override in 'text',
   * use that to set the token's text. Override this method to emit
   * custom Token objects or provide a new factory.
   */
  emit() {
    const t = this.factory.create(
      [this, this.input],
      this.type,
      this.#text,
      this.channel,
      this.tokenStartCharIndex,
      this.getCharIndex() - 1,
      this.currentTokenStartLine,
      this.currentTokenColumn
    );
    this.emitToken(t);
    return t;
  }
  emitEOF() {
    const eof = this.factory.create(
      [this, this.input],
      Token.EOF,
      void 0,
      Token.DEFAULT_CHANNEL,
      this.input.index,
      this.input.index - 1,
      this.line,
      this.column
    );
    this.emitToken(eof);
    return eof;
  }
  /** What is the index of the current character of lookahead? */
  getCharIndex() {
    return this.input.index;
  }
  /**
   * Return a list of all Token objects in input char stream.
   * Forces load of all tokens. Does not include EOF token.
   */
  getAllTokens() {
    const tokens = [];
    let t = this.nextToken();
    while (t.type !== Token.EOF) {
      tokens.push(t);
      t = this.nextToken();
    }
    return tokens;
  }
  notifyListeners(e) {
    const start = this.tokenStartCharIndex;
    const stop = this.input.index;
    const text = this.input.getTextFromRange(start, stop);
    const msg = "token recognition error at: '" + this.getErrorDisplay(text) + "'";
    this.errorListenerDispatch.syntaxError(this, null, this.currentTokenStartLine, this.currentTokenColumn, msg, e);
  }
  getErrorDisplay(s) {
    return s;
  }
  getErrorDisplayForChar(c) {
    if (c.charCodeAt(0) === Token.EOF) {
      return "<EOF>";
    }
    if (c === "\n") {
      return "\\n";
    }
    if (c === "	") {
      return "\\t";
    }
    if (c === "\r") {
      return "\\r";
    }
    return c;
  }
  getCharErrorDisplay(c) {
    return "'" + this.getErrorDisplayForChar(c) + "'";
  }
  /**
   * Lexers can normally match any char in it's vocabulary after matching
   * a token, so do the easy thing and just kill a character and hope
   * it all works out. You can instead use the rule invocation stack
   * to do sophisticated error recovery if you are in a fragment rule.
   */
  recover(re) {
    if (this.input.LA(1) !== Token.EOF) {
      if (re instanceof LexerNoViableAltException) {
        this.interpreter.consume(this.input);
      } else {
        this.input.consume();
      }
    }
  }
  get inputStream() {
    return this.input;
  }
  set inputStream(input) {
    this.reset(false);
    this.input = input;
  }
  set tokenFactory(factory) {
    this.factory = factory;
  }
  get tokenFactory() {
    return this.factory;
  }
  get sourceName() {
    return this.input.getSourceName();
  }
  get line() {
    return this.interpreter.line;
  }
  set line(line) {
    this.interpreter.line = line;
  }
  get column() {
    return this.interpreter.column;
  }
  set column(column) {
    this.interpreter.column = column;
  }
  get text() {
    if (this.#text) {
      return this.#text;
    } else {
      return this.interpreter.getText(this.input);
    }
  }
  set text(text) {
    this.#text = text;
  }
};
var DFASerializer = class {
  static {
    __name(this, "DFASerializer");
  }
  dfa;
  vocabulary;
  constructor(dfa, vocabulary) {
    this.dfa = dfa;
    this.vocabulary = vocabulary;
  }
  toString() {
    if (!this.dfa.s0) {
      return "";
    }
    let buf = "";
    const states = this.dfa.getStates();
    for (const s of states) {
      let n2 = 0;
      n2 = s.edges.length;
      for (let i = 0; i < n2; i++) {
        const t = s.edges[i];
        if (t && t.stateNumber !== 2147483647) {
          buf += this.getStateString(s);
          const label = this.getEdgeLabel(i);
          buf += "-";
          buf += label;
          buf += "->";
          buf += this.getStateString(t);
          buf += "\n";
        }
      }
    }
    return buf;
  }
  getEdgeLabel(i) {
    const name = this.vocabulary.getDisplayName(i - 1);
    return `${name}`;
  }
  getStateString(s) {
    const n2 = s.stateNumber;
    const baseStateStr = (s.isAcceptState ? ":" : "") + "s" + n2 + (s.requiresFullContext ? "^" : "");
    if (s.isAcceptState) {
      if (s.predicates !== null) {
        return `${baseStateStr}=>${s.predicates.toString()}`;
      }
      return `${baseStateStr}=>${s.prediction}`;
    } else {
      return `${baseStateStr}`;
    }
  }
};
var LexerDFASerializer = class extends DFASerializer {
  static {
    __name(this, "LexerDFASerializer");
  }
  constructor(dfa) {
    super(dfa, Vocabulary.EMPTY_VOCABULARY);
  }
  getEdgeLabel = /* @__PURE__ */ __name((i) => {
    return "'" + String.fromCharCode(i) + "'";
  }, "getEdgeLabel");
};
var DFA = class {
  static {
    __name(this, "DFA");
  }
  s0;
  decision;
  /** From which ATN state did we create this DFA? */
  atnStartState;
  /**
   * Gets whether this DFA is a precedence DFA. Precedence DFAs use a special
   * start state {@link #s0} which is not stored in {@link #states}. The
   * {@link DFAState#edges} array for this start state contains outgoing edges
   * supplying individual start states corresponding to specific precedence
   * values.
   *
   * @returns `true` if this is a precedence DFA; otherwise, `false`.
   */
  isPrecedenceDfa;
  /**
   * A mapping from an ATNConfigSet hash to a DFAState.
   * Used to quick look up the DFA state for a particular configuration set.
   */
  states = /* @__PURE__ */ new Map();
  constructor(atnStartState, decision) {
    this.atnStartState = atnStartState;
    this.decision = decision ?? 0;
    let precedenceDfa = false;
    if (atnStartState instanceof StarLoopEntryState) {
      if (atnStartState.precedenceRuleDecision) {
        precedenceDfa = true;
        this.s0 = DFAState.fromState(-1);
      }
    }
    this.isPrecedenceDfa = precedenceDfa;
  }
  [Symbol.iterator] = () => {
    return this.states.values()[Symbol.iterator]();
  };
  /**
   * Get the start state for a specific precedence value.
   *
   * @param precedence The current precedence.
    @returns The start state corresponding to the specified precedence, or
   * `null` if no start state exists for the specified precedence.
   *
   * @throws IllegalStateException if this is not a precedence DFA.
   * @see #isPrecedenceDfa
   */
  getPrecedenceStartState = /* @__PURE__ */ __name((precedence) => {
    if (!this.isPrecedenceDfa) {
      throw new Error(`Only precedence DFAs may contain a precedence start state.`);
    }
    if (!this.s0 || !this.s0.edges || precedence < 0 || precedence >= this.s0.edges.length) {
      return void 0;
    }
    return this.s0.edges[precedence];
  }, "getPrecedenceStartState");
  /**
   * Set the start state for a specific precedence value.
   *
   * @param precedence The current precedence.
   * @param startState The start state corresponding to the specified precedence.
   */
  setPrecedenceStartState = /* @__PURE__ */ __name((precedence, startState) => {
    if (!this.isPrecedenceDfa) {
      throw new Error(`Only precedence DFAs may contain a precedence start state.`);
    }
    if (precedence < 0 || !this.s0) {
      return;
    }
    this.s0.edges[precedence] = startState;
  }, "setPrecedenceStartState");
  /**
   * @returns a list of all states in this DFA, ordered by state number.
   */
  getStates() {
    const result = [...this.states.values()];
    result.sort((o1, o2) => {
      return o1.stateNumber - o2.stateNumber;
    });
    return result;
  }
  getState(state) {
    return this.states.get(state.configs.hashCode()) ?? null;
  }
  getStateForConfigs(configs) {
    return this.states.get(configs.hashCode()) ?? null;
  }
  addState(state) {
    const hash2 = state.configs.hashCode();
    if (this.states.has(hash2)) {
      return;
    }
    this.states.set(hash2, state);
    state.stateNumber = this.states.size - 1;
  }
  toString(vocabulary) {
    if (!vocabulary) {
      return this.toString(Vocabulary.EMPTY_VOCABULARY);
    }
    if (!this.s0) {
      return "";
    }
    const serializer = new DFASerializer(this, vocabulary);
    return serializer.toString() ?? "";
  }
  toLexerString() {
    if (!this.s0) {
      return "";
    }
    const serializer = new LexerDFASerializer(this);
    return serializer.toString() ?? "";
  }
  get length() {
    return this.states.size;
  }
};
var LexerIndexedCustomAction = class _LexerIndexedCustomAction {
  static {
    __name(this, "LexerIndexedCustomAction");
  }
  offset;
  action;
  actionType;
  isPositionDependent = true;
  cachedHashCode;
  constructor(offset, action) {
    this.actionType = action.actionType;
    this.offset = offset;
    this.action = action;
  }
  /**
   * This method calls {@link execute} on the result of {@link getAction}
   * using the provided `lexer`.
   */
  execute(lexer) {
    this.action.execute(lexer);
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hash2 = MurmurHash.initialize();
      hash2 = MurmurHash.update(hash2, this.offset);
      hash2 = MurmurHash.updateFromComparable(hash2, this.action);
      this.cachedHashCode = MurmurHash.finish(hash2, 2);
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (!(other instanceof _LexerIndexedCustomAction)) {
      return false;
    }
    return this.offset === other.offset && this.action === other.action;
  }
};
var LexerActionExecutor = class _LexerActionExecutor {
  static {
    __name(this, "LexerActionExecutor");
  }
  lexerActions;
  actionType;
  isPositionDependent = false;
  cachedHashCode;
  /**
   * Represents an executor for a sequence of lexer actions which traversed during
   * the matching operation of a lexer rule (token).
   *
   * The executor tracks position information for position-dependent lexer actions
   * efficiently, ensuring that actions appearing only at the end of the rule do
   * not cause bloating of the {@link DFA} created for the lexer.
   */
  constructor(lexerActions) {
    this.actionType = -1;
    this.lexerActions = lexerActions ?? [];
    return this;
  }
  /**
   * Creates a {@link LexerActionExecutor} which executes the actions for
   * the input `lexerActionExecutor` followed by a specified
   * `lexerAction`.
   *
   * @param lexerActionExecutor The executor for actions already traversed by
   * the lexer while matching a token within a particular
   * {@link LexerATNConfig}. If this is `null`, the method behaves as
   * though it were an empty executor.
   * @param lexerAction The lexer action to execute after the actions
   * specified in `lexerActionExecutor`.
   *
   * @returns {LexerActionExecutor} A {@link LexerActionExecutor} for executing the combine actions
   * of `lexerActionExecutor` and `lexerAction`.
   */
  static append(lexerActionExecutor, lexerAction) {
    if (lexerActionExecutor === null) {
      return new _LexerActionExecutor([lexerAction]);
    }
    const lexerActions = lexerActionExecutor.lexerActions.concat([lexerAction]);
    return new _LexerActionExecutor(lexerActions);
  }
  /**
   * Creates a {@link LexerActionExecutor} which encodes the current offset
   * for position-dependent lexer actions.
   *
   * Normally, when the executor encounters lexer actions where
   * {@link LexerAction//isPositionDependent} returns `true`, it calls
   * {@link IntStream.seek} on the input {@link CharStream} to set the input
   * position to the *end* of the current token. This behavior provides
   * for efficient DFA representation of lexer actions which appear at the end
   * of a lexer rule, even when the lexer rule matches a variable number of
   * characters.
   *
   * Prior to traversing a match transition in the ATN, the current offset
   * from the token start index is assigned to all position-dependent lexer
   * actions which have not already been assigned a fixed offset. By storing
   * the offsets relative to the token start index, the DFA representation of
   * lexer actions which appear in the middle of tokens remains efficient due
   * to sharing among tokens of the same length, regardless of their absolute
   * position in the input stream.
   *
   * If the current executor already has offsets assigned to all
   * position-dependent lexer actions, the method returns `this`.
   *
   * @param offset The current offset to assign to all position-dependent
   * lexer actions which do not already have offsets assigned.
   *
   * @returns {LexerActionExecutor} A {@link LexerActionExecutor} which stores input stream offsets
   * for all position-dependent lexer actions.
   */
  fixOffsetBeforeMatch(offset) {
    let updatedLexerActions = null;
    for (let i = 0; i < this.lexerActions.length; i++) {
      if (this.lexerActions[i].isPositionDependent && !(this.lexerActions[i] instanceof LexerIndexedCustomAction)) {
        if (updatedLexerActions === null) {
          updatedLexerActions = this.lexerActions.concat([]);
        }
        updatedLexerActions[i] = new LexerIndexedCustomAction(
          offset,
          this.lexerActions[i]
        );
      }
    }
    if (updatedLexerActions === null) {
      return this;
    } else {
      return new _LexerActionExecutor(updatedLexerActions);
    }
  }
  /**
   * Execute the actions encapsulated by this executor within the context of a
   * particular {@link Lexer}.
   *
   * This method calls {@link IntStream.seek} to set the position of the
   * `input` {@link CharStream} prior to calling
   * {@link LexerAction.execute} on a position-dependent action. Before the
   * method returns, the input position will be restored to the same position
   * it was in when the method was invoked.
   *
   * @param lexer The lexer instance.
   * @param input The input stream which is the source for the current token.
   * When this method is called, the current {@link IntStream.index} for
   * `input` should be the start of the following token, i.e. 1
   * character past the end of the current token.
   * @param startIndex The token start index. This value may be passed to
   * {@link IntStream.seek} to set the `input` position to the beginning
   * of the token.
   */
  execute(lexer, input, startIndex) {
    if (input === void 0 || startIndex === void 0) {
      return;
    }
    let requiresSeek = false;
    const stopIndex = input.index;
    try {
      for (const lexerAction of this.lexerActions) {
        let action = lexerAction;
        if (lexerAction instanceof LexerIndexedCustomAction) {
          const offset = lexerAction.offset;
          input.seek(startIndex + offset);
          action = lexerAction.action;
          requiresSeek = startIndex + offset !== stopIndex;
        } else if (lexerAction.isPositionDependent) {
          input.seek(stopIndex);
          requiresSeek = false;
        }
        action.execute(lexer);
      }
    } finally {
      if (requiresSeek) {
        input.seek(stopIndex);
      }
    }
  }
  hashCode() {
    if (this.cachedHashCode === void 0) {
      let hashCode = MurmurHash.initialize(7);
      for (const lexerAction of this.lexerActions) {
        hashCode = MurmurHash.update(hashCode, lexerAction.hashCode());
      }
      this.cachedHashCode = MurmurHash.finish(hashCode, this.lexerActions.length);
    }
    return this.cachedHashCode;
  }
  equals(other) {
    if (this === other) {
      return true;
    }
    if (this.cachedHashCode !== other.cachedHashCode) {
      return false;
    }
    if (this.lexerActions.length !== other.lexerActions.length) {
      return false;
    }
    return this.lexerActions.every((action, index2) => {
      return action.equals(other.lexerActions[index2]);
    });
  }
};
var OrderedHashSet = class _OrderedHashSet extends HashSet {
  static {
    __name(this, "OrderedHashSet");
  }
  elements = [];
  getOrAdd(o) {
    const oldSize = this.size;
    const result = super.getOrAdd(o);
    if (this.size > oldSize) {
      this.elements.push(o);
    }
    return result;
  }
  equals(o) {
    if (!(o instanceof _OrderedHashSet)) {
      return false;
    }
    return super.equals(o);
  }
  clear() {
    super.clear();
    this.elements = [];
  }
  *[Symbol.iterator]() {
    yield* this.elements;
  }
  toArray() {
    return this.elements.slice(0);
  }
};
var OrderedATNConfigSet = class extends ATNConfigSet {
  static {
    __name(this, "OrderedATNConfigSet");
  }
  constructor() {
    super();
    this.configLookup = new OrderedHashSet();
  }
};
var LexerATNSimulator = class _LexerATNSimulator extends ATNSimulator {
  static {
    __name(this, "LexerATNSimulator");
  }
  static debug = false;
  decisionToDFA;
  recognizer = null;
  /**
   * The current token's starting index into the character stream.
   *  Shared across DFA to ATN simulation in case the ATN fails and the
   *  DFA did not have a previous accept state. In this case, we use the
   *  ATN-generated exception object.
   */
  startIndex = -1;
  /** line number 1..n within the input */
  line = 1;
  /** The index of the character relative to the beginning of the line 0..n-1 */
  column = 0;
  mode = Lexer.DEFAULT_MODE;
  /** Used during DFA/ATN exec to record the most recent accept configuration info */
  prevAccept;
  options;
  /** Lookup table for lexer ATN config creation. */
  lexerATNConfigFactory;
  /**
   * When we hit an accept state in either the DFA or the ATN, we
   * have to notify the character stream to start buffering characters
   * via {@link IntStream//mark} and record the current state. The current sim state
   * includes the current index into the input, the current line,
   * and current character position in that line. Note that the Lexer is
   * tracking the starting line and characterization of the token. These
   * variables track the "state" of the simulator when it hits an accept state.
   *
   * We track these variables separately for the DFA and ATN simulation
   * because the DFA simulation often has to fail over to the ATN
   * simulation. If the ATN simulation fails, we need the DFA to fall
   * back to its previously accepted state, if any. If the ATN succeeds,
   * then the ATN does the accept and the DFA simulator that invoked it
   * can simply return the predicted token type.
   */
  constructor(recog, atn, decisionToDFA, sharedContextCache) {
    super(atn, sharedContextCache);
    this.decisionToDFA = decisionToDFA;
    this.recognizer = recog;
    if (recog) {
      this.options = recog.options;
    } else {
      this.options = {
        minDFAEdge: 0,
        maxDFAEdge: 256,
        minCodePoint: 0,
        maxCodePoint: 1114111
      };
    }
  }
  match(input, mode) {
    this.mode = mode;
    const mark = input.mark();
    try {
      this.startIndex = input.index;
      this.prevAccept = void 0;
      const dfa = this.decisionToDFA[mode];
      if (!dfa.s0) {
        return this.matchATN(input);
      }
      return this.execATN(input, dfa.s0);
    } finally {
      input.release(mark);
    }
  }
  reset() {
    this.prevAccept = void 0;
    this.startIndex = -1;
    this.line = 1;
    this.column = 0;
    this.mode = Lexer.DEFAULT_MODE;
  }
  clearDFA() {
    for (let d = 0; d < this.decisionToDFA.length; d++) {
      this.decisionToDFA[d] = new DFA(this.atn.getDecisionState(d), d);
    }
  }
  getDFA(mode) {
    return this.decisionToDFA[mode];
  }
  /** @returns the text matched so far for the current token. */
  getText(input) {
    return input.getTextFromRange(this.startIndex, input.index - 1);
  }
  consume(input) {
    const curChar = input.LA(1);
    if (curChar === "\n".charCodeAt(0)) {
      this.line += 1;
      this.column = 0;
    } else {
      this.column += 1;
    }
    input.consume();
  }
  getTokenName(tt) {
    if (tt === Token.EOF) {
      return "EOF";
    } else {
      return "'" + String.fromCharCode(tt) + "'";
    }
  }
  matchATN(input) {
    const startState = this.atn.modeToStartState[this.mode];
    if (_LexerATNSimulator.debug) {
      console.log("matchATN mode " + this.mode + " start: " + startState);
    }
    const oldMode = this.mode;
    const s0Closure = this.computeStartState(input, startState);
    const suppressEdge = s0Closure.hasSemanticContext;
    s0Closure.hasSemanticContext = false;
    const next = this.addDFAState(s0Closure);
    if (!suppressEdge) {
      this.decisionToDFA[this.mode].s0 = next;
    }
    const predict = this.execATN(input, next);
    if (_LexerATNSimulator.debug) {
      console.log("DFA after matchATN: " + this.decisionToDFA[oldMode].toLexerString());
    }
    return predict;
  }
  execATN(input, state) {
    if (_LexerATNSimulator.debug) {
      console.log("start state closure=" + state.configs);
    }
    if (state.isAcceptState) {
      this.captureSimState(input, state);
    }
    let t = input.LA(1);
    while (true) {
      if (_LexerATNSimulator.debug) {
        console.log("execATN loop starting closure: " + state.configs);
      }
      let target = this.getExistingTargetState(state, t);
      if (!target) {
        target = this.computeTargetState(input, state, t);
      }
      if (target === ATNSimulator.ERROR) {
        break;
      }
      if (t !== Token.EOF) {
        this.consume(input);
      }
      if (target.isAcceptState) {
        this.captureSimState(input, target);
        if (t === Token.EOF) {
          break;
        }
      }
      t = input.LA(1);
      state = target;
    }
    return this.failOrAccept(input, state.configs, t);
  }
  /**
   * Get an existing target state for an edge in the DFA. If the target state
   * for the edge has not yet been computed or is otherwise not available,
   * this method returns `null`.
   *
   * @param s The current DFA state.
   * @param t The next input symbol.
   *
   * @returns The existing target DFA state for the given input symbol
   * `t`, or `null` if the target state for this edge is not already cached
   */
  getExistingTargetState(s, t) {
    if (t >= this.options.minDFAEdge && t <= this.options.maxDFAEdge) {
      const target = s.edges[t - this.options.minDFAEdge];
      if (_LexerATNSimulator.debug && target) {
        console.log("reuse state " + s.stateNumber + " edge to " + target.stateNumber);
      }
      return target;
    }
    return void 0;
  }
  /**
   * Compute a target state for an edge in the DFA, and attempt to add the computed state and corresponding
   * edge to the DFA.
   *
   * @param input The input stream
   * @param s The current DFA state
   * @param t The next input symbol
   *
   * @returns The computed target DFA state for the given input symbol `t`.
   *          If `t` does not lead to a valid DFA state, this method returns `ERROR`.
   */
  computeTargetState(input, s, t) {
    const reach = new OrderedATNConfigSet();
    this.getReachableConfigSet(input, s.configs, reach, t);
    if (reach.length === 0) {
      if (!reach.hasSemanticContext) {
        this.addDFAEdge(s, t, ATNSimulator.ERROR);
      }
      return ATNSimulator.ERROR;
    }
    return this.addDFAEdge(s, t, null, reach);
  }
  failOrAccept(input, reach, t) {
    if (this.prevAccept?.dfaState) {
      const { dfaState, index: index2, line, column } = this.prevAccept;
      this.accept(input, dfaState.lexerActionExecutor, this.startIndex, index2, line, column);
      return dfaState.prediction;
    }
    if (t === Token.EOF && input.index === this.startIndex) {
      return Token.EOF;
    }
    throw new LexerNoViableAltException(this.recognizer, input, this.startIndex, reach);
  }
  /**
   * Given a starting configuration set, figure out all ATN configurations we can reach upon input `t`.
   * Parameter `reach` is a return parameter.
   */
  getReachableConfigSet(input, closure, reach, t) {
    let skipAlt = ATN.INVALID_ALT_NUMBER;
    for (const cfg of closure) {
      const currentAltReachedAcceptState = cfg.alt === skipAlt;
      if (currentAltReachedAcceptState && cfg.passedThroughNonGreedyDecision) {
        continue;
      }
      if (_LexerATNSimulator.debug) {
        console.log("testing %s at %s\n", this.getTokenName(t), cfg.toString(this.recognizer, true));
      }
      for (const trans of cfg.state.transitions) {
        const target = this.getReachableTarget(trans, t);
        if (target) {
          let lexerActionExecutor = cfg.lexerActionExecutor;
          if (lexerActionExecutor) {
            lexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.index - this.startIndex);
          }
          const treatEofAsEpsilon = t === Token.EOF;
          const config2 = LexerATNConfig.createWithExecutor(
            cfg,
            target,
            lexerActionExecutor
          );
          if (this.closure(input, config2, reach, currentAltReachedAcceptState, true, treatEofAsEpsilon)) {
            skipAlt = cfg.alt;
          }
        }
      }
    }
  }
  accept(input, lexerActionExecutor, startIndex, index2, line, charPos) {
    if (_LexerATNSimulator.debug) {
      console.log("ACTION %s\n", lexerActionExecutor);
    }
    input.seek(index2);
    this.line = line;
    this.column = charPos;
    if (lexerActionExecutor && this.recognizer) {
      lexerActionExecutor.execute(this.recognizer, input, startIndex);
    }
  }
  getReachableTarget(trans, t) {
    if (trans.matches(t, this.options.minCodePoint, this.options.maxCodePoint)) {
      return trans.target;
    } else {
      return void 0;
    }
  }
  computeStartState(input, p) {
    const initialContext = EmptyPredictionContext.instance;
    const configs = new OrderedATNConfigSet();
    for (let i = 0; i < p.transitions.length; i++) {
      const target = p.transitions[i].target;
      const cfg = LexerATNConfig.createWithContext(target, i + 1, initialContext);
      this.closure(input, cfg, configs, false, false, false);
    }
    return configs;
  }
  /**
   * Since the alternatives within any lexer decision are ordered by
   * preference, this method stops pursuing the closure as soon as an accept
   * state is reached. After the first accept state is reached by depth-first
   * search from `config`, all other (potentially reachable) states for
   * this rule would have a lower priority.
   *
   * @returns {boolean} `true` if an accept state is reached, otherwise `false`.
   */
  closure(input, config2, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon) {
    let cfg = null;
    if (_LexerATNSimulator.debug) {
      console.log("closure(" + config2.toString(this.recognizer, true) + ")");
    }
    if (config2.state.constructor.stateType === ATNState.RULE_STOP) {
      if (_LexerATNSimulator.debug) {
        if (this.recognizer !== null) {
          console.log(
            "closure at %s rule stop %s\n",
            this.recognizer.ruleNames[config2.state.ruleIndex],
            config2
          );
        } else {
          console.log("closure at rule stop %s\n", config2);
        }
      }
      if (!config2.context || config2.context.hasEmptyPath()) {
        if (!config2.context || config2.context.isEmpty()) {
          configs.add(config2);
          return true;
        } else {
          configs.add(LexerATNConfig.createWithConfig(config2.state, config2, EmptyPredictionContext.instance));
          currentAltReachedAcceptState = true;
        }
      }
      if (config2.context && !config2.context.isEmpty()) {
        for (let i = 0; i < config2.context.length; i++) {
          if (config2.context.getReturnState(i) !== PredictionContext.EMPTY_RETURN_STATE) {
            const newContext = config2.context.getParent(i);
            const returnState = this.atn.states[config2.context.getReturnState(i)];
            cfg = LexerATNConfig.createWithConfig(returnState, config2, newContext);
            currentAltReachedAcceptState = this.closure(
              input,
              cfg,
              configs,
              currentAltReachedAcceptState,
              speculative,
              treatEofAsEpsilon
            );
          }
        }
      }
      return currentAltReachedAcceptState;
    }
    if (!config2.state.epsilonOnlyTransitions) {
      if (!currentAltReachedAcceptState || !config2.passedThroughNonGreedyDecision) {
        configs.add(config2);
      }
    }
    for (const trans of config2.state.transitions) {
      cfg = this.getEpsilonTarget(input, config2, trans, configs, speculative, treatEofAsEpsilon);
      if (cfg) {
        currentAltReachedAcceptState = this.closure(
          input,
          cfg,
          configs,
          currentAltReachedAcceptState,
          speculative,
          treatEofAsEpsilon
        );
      }
    }
    return currentAltReachedAcceptState;
  }
  // side-effect: can alter configs.hasSemanticContext
  getEpsilonTarget(input, config2, trans, configs, speculative, treatEofAsEpsilon) {
    if (!this.lexerATNConfigFactory) {
      this.setupATNFactoryLookup();
    }
    const factory = this.lexerATNConfigFactory[trans.transitionType];
    if (!factory) {
      return null;
    }
    return factory(input, config2, trans, configs, speculative, treatEofAsEpsilon);
  }
  /**
   * Fills the lookup table for creating lexer ATN configs. This helps to avoid frequent checks of the transition
   * type, which determines the configuration of the created config.
   */
  setupATNFactoryLookup() {
    this.lexerATNConfigFactory = [];
    this.lexerATNConfigFactory[Transition.RULE] = (input, config2, trans) => {
      const newContext = createSingletonPredictionContext(
        config2.context ?? void 0,
        trans.followState.stateNumber
      );
      return LexerATNConfig.createWithConfig(trans.target, config2, newContext);
    };
    this.lexerATNConfigFactory[Transition.PRECEDENCE] = () => {
      throw new Error("Precedence predicates are not supported in lexers.");
    };
    this.lexerATNConfigFactory[Transition.PREDICATE] = (input, config2, trans, configs, speculative) => {
      const pt = trans;
      if (_LexerATNSimulator.debug) {
        console.log("EVAL rule " + pt.ruleIndex + ":" + pt.predIndex);
      }
      configs.hasSemanticContext = true;
      if (this.evaluatePredicate(input, pt.ruleIndex, pt.predIndex, speculative)) {
        return LexerATNConfig.createWithConfig(trans.target, config2);
      }
      return null;
    };
    this.lexerATNConfigFactory[Transition.ACTION] = (input, config2, trans) => {
      if (config2.context === null || config2.context.hasEmptyPath()) {
        const lexerActionExecutor = LexerActionExecutor.append(
          config2.lexerActionExecutor,
          this.atn.lexerActions[trans.actionIndex]
        );
        return LexerATNConfig.createWithExecutor(config2, trans.target, lexerActionExecutor);
      } else {
        return LexerATNConfig.createWithConfig(trans.target, config2);
      }
    };
    this.lexerATNConfigFactory[Transition.EPSILON] = (input, config2, trans) => {
      return LexerATNConfig.createWithConfig(trans.target, config2);
    };
    const simple = /* @__PURE__ */ __name((input, config2, trans, configs, speculative, treatEofAsEpsilon) => {
      if (treatEofAsEpsilon) {
        if (trans.matches(Token.EOF, this.options.minCodePoint, this.options.maxCodePoint)) {
          return LexerATNConfig.createWithConfig(trans.target, config2);
        }
      }
      return null;
    }, "simple");
    this.lexerATNConfigFactory[Transition.ATOM] = simple;
    this.lexerATNConfigFactory[Transition.RANGE] = simple;
    this.lexerATNConfigFactory[Transition.SET] = simple;
  }
  /**
   * Evaluate a predicate specified in the lexer.
   *
   * If `speculative` is `true`, this method was called before
   * {@link consume} for the matched character. This method should call
   * {@link consume} before evaluating the predicate to ensure position
   * sensitive values, including {@link Lexer//getText}, {@link Lexer//getLine},
   * and {@link Lexer}, properly reflect the current
   * lexer state. This method should restore `input` and the simulator
   * to the original state before returning (i.e. undo the actions made by the
   * call to {@link consume}.
   *
   * @param input The input stream.
   * @param ruleIndex The rule containing the predicate.
   * @param predIndex The index of the predicate within the rule.
   * @param speculative `true` if the current index in `input` is
   * one character before the predicate's location.
   *
   * @returns `true` if the specified predicate evaluates to
   * `true`.
   */
  evaluatePredicate(input, ruleIndex, predIndex, speculative) {
    if (!this.recognizer) {
      return true;
    }
    if (!speculative) {
      return this.recognizer.sempred(null, ruleIndex, predIndex);
    }
    const savedColumn = this.column;
    const savedLine = this.line;
    const index2 = input.index;
    const marker = input.mark();
    try {
      this.consume(input);
      return this.recognizer.sempred(null, ruleIndex, predIndex);
    } finally {
      this.column = savedColumn;
      this.line = savedLine;
      input.seek(index2);
      input.release(marker);
    }
  }
  captureSimState(input, dfaState) {
    this.prevAccept = {
      index: input.index,
      line: this.line,
      column: this.column,
      dfaState
    };
  }
  addDFAEdge(from, tk, to, configs) {
    if (!to && configs) {
      const suppressEdge = configs.hasSemanticContext;
      configs.hasSemanticContext = false;
      to = this.addDFAState(configs);
      if (suppressEdge) {
        return to;
      }
    }
    if (tk < this.options.minDFAEdge || tk > this.options.maxDFAEdge) {
      return to;
    }
    if (_LexerATNSimulator.debug) {
      console.log("EDGE " + from + " -> " + to + " upon " + tk);
    }
    from.edges[tk - this.options.minDFAEdge] = to;
    return to;
  }
  /**
   * Add a new DFA state if there isn't one with this set of configurations already. This method also detects
   * the first configuration containing an ATN rule stop state. Later, when traversing the DFA, we will know
   * which rule to accept.
   */
  addDFAState(configs) {
    const dfa = this.decisionToDFA[this.mode];
    const existing = dfa.getStateForConfigs(configs);
    if (existing) {
      return existing;
    }
    const proposed = DFAState.fromConfigs(configs);
    const firstConfigWithRuleStopState = configs.firstStopState;
    if (firstConfigWithRuleStopState) {
      proposed.isAcceptState = true;
      proposed.lexerActionExecutor = firstConfigWithRuleStopState.lexerActionExecutor;
      proposed.prediction = this.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex];
    }
    configs.setReadonly(true);
    dfa.addState(proposed);
    return proposed;
  }
};
var ParseInfo = class {
  static {
    __name(this, "ParseInfo");
  }
  atnSimulator;
  constructor(atnSimulator) {
    this.atnSimulator = atnSimulator;
  }
  /**
   * Gets an array of {@link DecisionInfo} instances containing the profiling
   * information gathered for each decision in the ATN.
   *
   * @returns An array of {@link DecisionInfo} instances, indexed by decision
   * number.
   */
  getDecisionInfo() {
    return this.atnSimulator.getDecisionInfo();
  }
  /**
   * Gets the decision numbers for decisions that required one or more
   * full-context predictions during parsing. These are decisions for which
   * {@link DecisionInfo#llFallback} is non-zero.
   *
   * @returns A list of decision numbers which required one or more
   * full-context predictions during parsing.
   */
  getLLDecisions() {
    const decisions = this.atnSimulator.getDecisionInfo();
    const result = new Array();
    for (let i = 0; i < decisions.length; i++) {
      const fallBack = decisions[i].llFallback;
      if (fallBack > 0) {
        result.push(i);
      }
    }
    return result;
  }
  /**
   * Gets the total time spent during prediction across all decisions made
   * during parsing. This value is the sum of
   * {@link DecisionInfo#timeInPrediction} for all decisions.
   */
  getTotalTimeInPrediction() {
    const decisions = this.atnSimulator.getDecisionInfo();
    let t = 0;
    for (const decision of decisions) {
      t += decision.timeInPrediction;
    }
    return t;
  }
  /**
   * Gets the total number of SLL lookahead operations across all decisions
   * made during parsing. This value is the sum of
   * {@link DecisionInfo#sllTotalLook} for all decisions.
   */
  getTotalSLLLookaheadOps() {
    const decisions = this.atnSimulator.getDecisionInfo();
    let k = 0;
    for (const decision of decisions) {
      k += decision.sllTotalLook;
    }
    return k;
  }
  /**
   * Gets the total number of LL lookahead operations across all decisions
   * made during parsing. This value is the sum of
   * {@link DecisionInfo#llTotalLook} for all decisions.
   */
  getTotalLLLookaheadOps() {
    const decisions = this.atnSimulator.getDecisionInfo();
    let k = 0;
    for (const decision of decisions) {
      k += decision.llTotalLook;
    }
    return k;
  }
  /**
   * Gets the total number of ATN lookahead operations for SLL prediction
   * across all decisions made during parsing.
   */
  getTotalSLLATNLookaheadOps() {
    const decisions = this.atnSimulator.getDecisionInfo();
    let k = 0;
    for (const decision of decisions) {
      k += decision.sllATNTransitions;
    }
    return k;
  }
  /**
   * Gets the total number of ATN lookahead operations for LL prediction
   * across all decisions made during parsing.
   */
  getTotalLLATNLookaheadOps() {
    const decisions = this.atnSimulator.getDecisionInfo();
    let k = 0;
    for (const decision of decisions) {
      k += decision.llATNTransitions;
    }
    return k;
  }
  /**
   * Gets the total number of ATN lookahead operations for SLL and LL
   * prediction across all decisions made during parsing.
   *
   *
   * This value is the sum of {@link #getTotalSLLATNLookaheadOps} and
   * {@link #getTotalLLATNLookaheadOps}.
   */
  getTotalATNLookaheadOps() {
    const decisions = this.atnSimulator.getDecisionInfo();
    let k = 0;
    for (const decision of decisions) {
      k += decision.sllATNTransitions;
      k += decision.llATNTransitions;
    }
    return k;
  }
  getDFASize(decision) {
    if (decision === void 0) {
      let n2 = 0;
      const decisionToDFA = this.atnSimulator.decisionToDFA;
      for (let i = 0; i < decisionToDFA.length; i++) {
        n2 += this.getDFASize(i);
      }
      return n2;
    } else {
      const decisionToDFA = this.atnSimulator.decisionToDFA[decision];
      return decisionToDFA.length;
    }
  }
};
var NoViableAltException = class extends RecognitionException {
  static {
    __name(this, "NoViableAltException");
  }
  /** Which configurations did we try at input.index() that couldn't match input.LT(1)? */
  deadEndConfigs = null;
  /**
   * The token object at the start index; the input stream might
   * 	not be buffering tokens so get a reference to it. (At the
   *  time the error occurred, of course the stream needs to keep a
   *  buffer all of the tokens but later we might not have access to those.)
   */
  startToken;
  constructor(recognizer, input = null, startToken = null, offendingToken = null, deadEndConfigs = null, ctx2 = null) {
    ctx2 = ctx2 ?? recognizer.context;
    offendingToken = offendingToken ?? recognizer.getCurrentToken();
    startToken = startToken ?? recognizer.getCurrentToken();
    input = input ?? recognizer.inputStream;
    super({ message: "", recognizer, input, ctx: ctx2 });
    this.deadEndConfigs = deadEndConfigs;
    this.startToken = startToken;
    this.offendingToken = offendingToken;
  }
};
var DoubleDict = class {
  static {
    __name(this, "DoubleDict");
  }
  cacheMap;
  constructor() {
    this.cacheMap = new HashMap();
  }
  get(a, b) {
    const d = this.cacheMap.get(a) ?? null;
    return d === null ? null : d.get(b) ?? null;
  }
  set(a, b, o) {
    let d = this.cacheMap.get(a);
    if (!d) {
      d = new HashMap();
      this.cacheMap.set(a, d);
    }
    d.set(b, o);
  }
};
var SubsetEqualityComparer = class _SubsetEqualityComparer {
  static {
    __name(this, "SubsetEqualityComparer");
  }
  static instance = new _SubsetEqualityComparer();
  hashCode(config2) {
    let hashCode = MurmurHash.initialize(7);
    hashCode = MurmurHash.update(hashCode, config2.state.stateNumber);
    hashCode = MurmurHash.updateFromComparable(hashCode, config2.context);
    hashCode = MurmurHash.finish(hashCode, 2);
    return hashCode;
  }
  equals(a, b) {
    return a.state.stateNumber === b.state.stateNumber && (a.context?.equals(b.context) ?? true);
  }
};
var PredictionMode = class _PredictionMode {
  static {
    __name(this, "PredictionMode");
  }
  /**
   * The SLL(*) prediction mode. This prediction mode ignores the current
   * parser context when making predictions. This is the fastest prediction
   * mode, and provides correct results for many grammars. This prediction
   * mode is more powerful than the prediction mode provided by ANTLR 3, but
   * may result in syntax errors for grammar and input combinations which are
   * not SLL.
   *
   *
   * When using this prediction mode, the parser will either return a correct
   * parse tree (i.e. the same parse tree that would be returned with the
   * {@link LL} prediction mode), or it will report a syntax error. If a
   * syntax error is encountered when using the {@link SLL} prediction mode,
   * it may be due to either an actual syntax error in the input or indicate
   * that the particular combination of grammar and input requires the more
   * powerful {@link LL} prediction abilities to complete successfully.
   *
   *
   * This prediction mode does not provide any guarantees for prediction
   * behavior for syntactically-incorrect inputs.
   */
  static SLL = 0;
  /**
   * The LL(*) prediction mode. This prediction mode allows the current parser
   * context to be used for resolving SLL conflicts that occur during
   * prediction. This is the fastest prediction mode that guarantees correct
   * parse results for all combinations of grammars with syntactically correct
   * inputs.
   *
   *
   * When using this prediction mode, the parser will make correct decisions
   * for all syntactically-correct grammar and input combinations. However, in
   * cases where the grammar is truly ambiguous this prediction mode might not
   * report a precise answer for *exactly which* alternatives are
   * ambiguous.
   *
   *
   * This prediction mode does not provide any guarantees for prediction
   * behavior for syntactically-incorrect inputs.
   */
  static LL = 1;
  /**
   *
   * The LL(*) prediction mode with exact ambiguity detection. In addition to
   * the correctness guarantees provided by the {@link LL} prediction mode,
   * this prediction mode instructs the prediction algorithm to determine the
   * complete and exact set of ambiguous alternatives for every ambiguous
   * decision encountered while parsing.
   *
   *
   * This prediction mode may be used for diagnosing ambiguities during
   * grammar development. Due to the performance overhead of calculating sets
   * of ambiguous alternatives, this prediction mode should be avoided when
   * the exact results are not necessary.
   *
   *
   * This prediction mode does not provide any guarantees for prediction
   * behavior for syntactically-incorrect inputs.
   */
  static LL_EXACT_AMBIG_DETECTION = 2;
  /**
   *
   *Computes the SLL prediction termination condition.
   *
   *
   *This method computes the SLL prediction termination condition for both of
   *the following cases.
   *
   * - The usual SLL+LL fallback upon SLL conflict
   * - Pure SLL without LL fallback
   *
   ***COMBINED SLL+LL PARSING**
   *
   *When LL-fallback is enabled upon SLL conflict, correct predictions are
   *ensured regardless of how the termination condition is computed by this
   *method. Due to the substantially higher cost of LL prediction, the
   *prediction should only fall back to LL when the additional lookahead
   *cannot lead to a unique SLL prediction.
   *
   *Assuming combined SLL+LL parsing, an SLL configuration set with only
   *conflicting subsets should fall back to full LL, even if the
   *configuration sets don't resolve to the same alternative (e.g.
   *`{1,2`} and `{3,4`}. If there is at least one non-conflicting
   *configuration, SLL could continue with the hopes that more lookahead will
   *resolve via one of those non-conflicting configurations.
   *
   *Here's the prediction termination rule them: SLL (for SLL+LL parsing)
   *stops when it sees only conflicting configuration subsets. In contrast,
   *full LL keeps going when there is uncertainty.
   *
   ***HEURISTIC**
   *
   *As a heuristic, we stop prediction when we see any conflicting subset
   *unless we see a state that only has one alternative associated with it.
   *The single-alt-state thing lets prediction continue upon rules like
   *(otherwise, it would admit defeat too soon):
   *
   *`[12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ';' ;`
   *
   *When the ATN simulation reaches the state before `';'`, it has a
   *DFA state that looks like: `[12|1|[], 6|2|[], 12|2|[]]`. Naturally
   *`12|1|[]` and `12|2|[]` conflict, but we cannot stop
   *processing this node because alternative to has another way to continue,
   *via `[6|2|[]]`.
   *
   *It also let's us continue for this rule:
   *
   *`[1|1|[], 1|2|[], 8|3|[]] a : A | A | A B ;`
   *
   *After matching input A, we reach the stop state for rule A, state 1.
   *State 8 is the state right before B. Clearly alternatives 1 and 2
   *conflict and no amount of further lookahead will separate the two.
   *However, alternative 3 will be able to continue and so we do not stop
   *working on this state. In the previous example, we're concerned with
   *states associated with the conflicting alternatives. Here alt 3 is not
   *associated with the conflicting configs, but since we can continue
   *looking for input reasonably, don't declare the state done.
   *
   ***PURE SLL PARSING**
   *
   *To handle pure SLL parsing, all we have to do is make sure that we
   *combine stack contexts for configurations that differ only by semantic
   *predicate. From there, we can do the usual SLL termination heuristic.
   *
   ***PREDICATES IN SLL+LL PARSING**
   *
   *SLL decisions don't evaluate predicates until after they reach DFA stop
   *states because they need to create the DFA cache that works in all
   *semantic situations. In contrast, full LL evaluates predicates collected
   *during start state computation so it can ignore predicates thereafter.
   *This means that SLL termination detection can totally ignore semantic
   *predicates.
   *
   *Implementation-wise, {@link ATNConfigSet} combines stack contexts but not
   *semantic predicate contexts so we might see two configurations like the
   *following.
   *
   *`(s, 1, x, {`), (s, 1, x', {p})}
   *
   *Before testing these configurations against others, we have to merge
   *`x` and `x'` (without modifying the existing configurations).
   *For example, we test `(x+x')==x''` when looking for conflicts in
   *the following configurations.
   *
   *`(s, 1, x, {`), (s, 1, x', {p}), (s, 2, x'', {})}
   *
   *If the configuration set has predicates (as indicated by
   *{@link ATNConfigSet//hasSemanticContext}), this algorithm makes a copy of
   *the configurations to strip out all of the predicates so that a standard
   *{@link ATNConfigSet} will merge everything ignoring predicates.
   */
  static hasSLLConflictTerminatingPrediction(mode, configs) {
    if (_PredictionMode.allConfigsInRuleStopStates(configs)) {
      return true;
    }
    if (mode === _PredictionMode.SLL) {
      if (configs.hasSemanticContext) {
        const dup = new ATNConfigSet();
        for (let c of configs) {
          c = ATNConfig.duplicate(c, SemanticContext.NONE);
          dup.add(c);
        }
        configs = dup;
      }
    }
    const altSets = _PredictionMode.getConflictingAltSubsets(configs);
    return _PredictionMode.hasConflictingAltSet(altSets) && !_PredictionMode.hasStateAssociatedWithOneAlt(configs);
  }
  /**
   * Checks if any configuration in `configs` is in a
   * {@link RuleStopState}. Configurations meeting this condition have reached
   * the end of the decision rule (local context) or end of start rule (full
   * context).
   *
   * @param configs the configuration set to test
   * @returns `true` if any configuration in `configs` is in a
   * {@link RuleStopState}, otherwise `false`
   */
  static hasConfigInRuleStopState(configs) {
    for (const c of configs) {
      if (c.state instanceof RuleStopState) {
        return true;
      }
    }
    return false;
  }
  /**
   * Checks if all configurations in `configs` are in a
   * {@link RuleStopState}. Configurations meeting this condition have reached
   * the end of the decision rule (local context) or end of start rule (full
   * context).
   *
   * @param configs the configuration set to test
   * @returns `true` if all configurations in `configs` are in a
   * {@link RuleStopState}, otherwise `false`
   */
  static allConfigsInRuleStopStates(configs) {
    for (const c of configs) {
      if (!(c.state instanceof RuleStopState)) {
        return false;
      }
    }
    return true;
  }
  /**
   *
   * Full LL prediction termination.
   *
   * Can we stop looking ahead during ATN simulation or is there some
   * uncertainty as to which alternative we will ultimately pick, after
   * consuming more input? Even if there are partial conflicts, we might know
   * that everything is going to resolve to the same minimum alternative. That
   * means we can stop since no more lookahead will change that fact. On the
   * other hand, there might be multiple conflicts that resolve to different
   * minimums. That means we need more look ahead to decide which of those
   * alternatives we should predict.
   *
   * The basic idea is to split the set of configurations `C`, into
   * conflicting subsets `(s, _, ctx, _)` and singleton subsets with
   * non-conflicting configurations. Two configurations conflict if they have
   * identical {@link ATNConfig.state} and {@link ATNConfig.context} values
   * but different {@link ATNConfig.alt} value, e.g. `(s, i, ctx, _)`
   * and `(s, j, ctx, _)` for `i!=j`.
   *
   * Reduce these configuration subsets to the set of possible alternatives.
   * You can compute the alternative subsets in one pass as follows:
   *
   * `A_s,ctx = {i | (s, i, ctx, _)`} for each configuration in
   * `C` holding `s` and `ctx` fixed.
   *
   * Or in pseudo-code, for each configuration `c` in `C`:
   *
   * ```
   * map[c] U= c.{@link ATNConfig.alt alt} // map hash/equals uses s and x, not
   * alt and not pred
   * ```
   *
   * The values in `map` are the set of `A_s,ctx` sets.
   *
   * If `|A_s,ctx|=1` then there is no conflict associated with
   * `s` and `ctx`.
   *
   * Reduce the subsets to singletons by choosing a minimum of each subset. If
   * the union of these alternative subsets is a singleton, then no amount of
   * more lookahead will help us. We will always pick that alternative. If,
   * however, there is more than one alternative, then we are uncertain which
   * alternative to predict and must continue looking for resolution. We may
   * or may not discover an ambiguity in the future, even if there are no
   * conflicting subsets this round.
   *
   * The biggest sin is to terminate early because it means we've made a
   * decision but were uncertain as to the eventual outcome. We haven't used
   * enough lookahead. On the other hand, announcing a conflict too late is no
   * big deal; you will still have the conflict. It's just inefficient. It
   * might even look until the end of file.
   *
   * No special consideration for semantic predicates is required because
   * predicates are evaluated on-the-fly for full LL prediction, ensuring that
   * no configuration contains a semantic context during the termination
   * check.
   *
   * **CONFLICTING CONFIGS**
   *
   * Two configurations `(s, i, x)` and `(s, j, x')`, conflict when `i!=j` but `x=x'`. Because we merge all
   * `(s, i, _)` configurations together, that means that there are at most `n` configurations associated with state
   * `s` for `n` possible alternatives in the decision. The merged stacks complicate the comparison of configuration
   * contexts `x` and `x'`. Sam checks to see if one is a subset of the other by calling merge and checking to see
   * if the merged result is either `x` or `x'`. If the `x` associated with lowest alternative `i` is the superset,
   * then `i` is the only possible prediction since the others resolve to `min(i)` as well. However, if `x` is
   * associated with `j>i` then at least one stack configuration for `j` is not in conflict with alternative `i`.
   * The algorithm should keep going, looking for more lookahead due to the uncertainty.
   *
   * For simplicity, I'm doing a equality check between `x` and `x'` that lets the algorithm continue to consume
   * lookahead longer than necessary. The reason I like the equality is of course the simplicity but also because
   * that is the test you need to detect the alternatives that are actually in conflict.
   *
   * **CONTINUE/STOP RULE**
   *
   * Continue if union of resolved alternative sets from non-conflicting and conflicting alternative subsets has more
   * than one alternative. We are uncertain about which alternative to predict.
   *
   * The complete set of alternatives, `[i for (_,i,_)]`, tells us which alternatives are still in the running for
   * the amount of input we've consumed at this point. The conflicting sets let us to strip away configurations that
   * won't lead to more states because we resolve conflicts to the configuration with a minimum alternate for the
   * conflicting set.
   *
   * **CASES**
   *
   * - no conflicts and more than 1 alternative in set => continue
   * -  `(s, 1, x)`, `(s, 2, x)`, `(s, 3, z)`, `(s', 1, y)`, `(s', 2, y)` yields non-conflicting set `{3`} U
   *   conflicting sets `min({1,2`)} U `min({1,2`)} = `{1,3`} => continue
   * - `(s, 1, x)`, `(s, 2, x)`, `(s', 1, y)`, `(s', 2, y)`, `(s'', 1, z)` yields non-conflicting set `{1`} U
   *   conflicting sets `min({1,2`)} U `min({1,2`)} = `{1`} => stop and predict 1
   * - `(s, 1, x)`, `(s, 2, x)`, `(s', 1, y)`, `(s', 2, y)` yields conflicting, reduced sets `{1`} U
   *   `{1`} = `{1`} => stop and predict 1, can announce ambiguity `{1,2`}
   * - `(s, 1, x)`, `(s, 2, x)`, `(s', 2, y)`, `(s', 3, y)` yields conflicting, reduced sets `{1`} U
   *   `{2`} = `{1,2`} => continue
   * - `(s, 1, x)`, `(s, 2, x)`, `(s', 3, y)`, `(s', 4, y)` yields conflicting, reduced sets `{1`} U
   *   `{3`} = `{1,3`} => continue
   *
   * **EXACT AMBIGUITY DETECTION**
   *
   *If all states report the same conflicting set of alternatives, then we
   *know we have the exact ambiguity set.
   *
   * `|A_*i*|>1` and `A_*i* = A_*j*` for all *i*, *j*.
   *
   * In other words, we continue examining lookahead until all `A_i` have more than one alternative and all `A_i`
   * are the same. If `A={{1,2`, {1,3}}}, then regular LL prediction would terminate because the resolved set
   * is `{1`}. To determine what the real ambiguity is, we have to know whether the ambiguity is between one and
   * two or one and three so we keep going. We can only stop prediction when we need exact ambiguity detection when
   * the sets look like `A={{1,2`}} or `{{1,2`,{1,2}}}, etc...
   */
  static resolvesToJustOneViableAlt(altSets) {
    return _PredictionMode.getSingleViableAlt(altSets);
  }
  /**
   * Determines if every alternative subset in `altSets` contains more
   * than one alternative.
   *
   * @param altSets a collection of alternative subsets
   * @returns `true` if every {@link BitSet} in `altSets` has
   * {@link BitSet//cardinality cardinality} > 1, otherwise `false`
   */
  static allSubsetsConflict(altSets) {
    return !_PredictionMode.hasNonConflictingAltSet(altSets);
  }
  /**
   * Determines if any single alternative subset in `altSets` contains
   * exactly one alternative.
   *
   * @param altSets a collection of alternative subsets
   * @returns `true` if `altSets` contains a {@link BitSet} with
   * {@link BitSet//cardinality cardinality} 1, otherwise `false`
   */
  static hasNonConflictingAltSet(altSets) {
    for (const alts of altSets) {
      if (alts.length === 1) {
        return true;
      }
    }
    return false;
  }
  /**
   * Determines if any single alternative subset in `altSets` contains
   * more than one alternative.
   *
   * @param altSets a collection of alternative subsets
   * @returns `true` if `altSets` contains a {@link BitSet} with
   * {@link BitSet//cardinality cardinality} > 1, otherwise `false`
   */
  static hasConflictingAltSet(altSets) {
    for (const alts of altSets) {
      if (alts.length > 1) {
        return true;
      }
    }
    return false;
  }
  /**
   * Determines if every alternative subset in `altSets` is equivalent.
   *
   * @param altSets a collection of alternative subsets
   * @returns `true` if every member of `altSets` is equal to the
   * others, otherwise `false`
   */
  static allSubsetsEqual(altSets) {
    let first = null;
    for (const alts of altSets) {
      if (first === null) {
        first = alts;
      } else if (alts !== first) {
        return false;
      }
    }
    return true;
  }
  /**
   * Returns the unique alternative predicted by all alternative subsets in
   * `altSets`. If no such alternative exists, this method returns
   * {@link ATN.INVALID_ALT_NUMBER}.
   *
   * @param altSets a collection of alternative subsets
   */
  static getUniqueAlt(altSets) {
    const all = _PredictionMode.getAlts(altSets);
    if (all.length === 1) {
      return all.nextSetBit(0);
    } else {
      return ATN.INVALID_ALT_NUMBER;
    }
  }
  /**
   * Gets the complete set of represented alternatives for a collection of
   * alternative subsets. This method returns the union of each {@link BitSet}
   * in `altSets`.
   *
   * @param altSets a collection of alternative subsets
   * @returns the set of represented alternatives in `altSets`
   */
  static getAlts(altSets) {
    const all = new BitSet();
    altSets.forEach((alts) => {
      all.or(alts);
    });
    return all;
  }
  /**
   * This function gets the conflicting alt subsets from a configuration set.
   * For each configuration `c` in `configs`:
   *
   * ```
   * map[c] U= c.{@link ATNConfig.alt alt} // map hash/equals uses s and x, not
   * alt and not pred
   * ```
   */
  static getConflictingAltSubsets(configs) {
    const configToAlts = new HashMap(SubsetEqualityComparer.instance);
    for (const cfg of configs) {
      let alts = configToAlts.get(cfg);
      if (!alts) {
        alts = new BitSet();
        configToAlts.set(cfg, alts);
      }
      alts.set(cfg.alt);
    }
    return Array.from(configToAlts.values());
  }
  /**
   * Get a map from state to alt subset from a configuration set. For each configuration `c` in `configs`:
   *
   * ```
   * map[c.state] = c.alt
   * ```
   */
  static getStateToAltMap(configs) {
    const m2 = new HashMap(ObjectEqualityComparator.instance);
    for (const c of configs) {
      let alts = m2.get(c.state);
      if (!alts) {
        alts = new BitSet();
        m2.set(c.state, alts);
      }
      alts.set(c.alt);
    }
    return m2;
  }
  static hasStateAssociatedWithOneAlt(configs) {
    const counts = {};
    for (const c of configs) {
      const stateNumber = c.state.stateNumber;
      if (!counts[stateNumber]) {
        counts[stateNumber] = 0;
      }
      counts[stateNumber]++;
    }
    return Object.values(counts).some((count) => {
      return count === 1;
    });
  }
  static getSingleViableAlt(altSets) {
    let result = null;
    for (const alts of altSets) {
      const minAlt = alts.nextSetBit(0);
      if (result === null) {
        result = minAlt;
      } else if (result !== minAlt) {
        return ATN.INVALID_ALT_NUMBER;
      }
    }
    return result ?? 0;
  }
};
var ParserATNSimulator = class _ParserATNSimulator extends ATNSimulator {
  static {
    __name(this, "ParserATNSimulator");
  }
  static traceATNSimulator = false;
  static debug;
  static debugAdd = false;
  static debugClosure = false;
  static dfaDebug = false;
  static retryDebug = false;
  /** SLL, LL, or LL + exact ambig detection? */
  predictionMode;
  decisionToDFA;
  parser;
  /**
   * Each prediction operation uses a cache for merge of prediction contexts.
   * Don't keep around as it wastes huge amounts of memory. DoubleKeyMap
   * isn't synchronized but we're ok since two threads shouldn't reuse same
   * parser/atn sim object because it can only handle one input at a time.
   * This maps graphs a and b to merged result c. (a,b)->c. We can avoid
   * the merge if we ever see a and b again.  Note that (b,a)->c should
   * also be examined during cache lookup.
   */
  mergeCache = new DoubleDict();
  // Used also in the profiling ATN simulator.
  predictionState;
  constructor(recog, atn, decisionToDFA, sharedContextCache) {
    super(atn, sharedContextCache);
    this.parser = recog;
    this.decisionToDFA = decisionToDFA;
  }
  static getUniqueAlt(configs) {
    let alt = ATN.INVALID_ALT_NUMBER;
    for (const c of configs) {
      if (alt === ATN.INVALID_ALT_NUMBER) {
        alt = c.alt;
      } else if (c.alt !== alt) {
        return ATN.INVALID_ALT_NUMBER;
      }
    }
    return alt;
  }
  reset() {
  }
  clearDFA() {
    for (let d = 0; d < this.decisionToDFA.length; d++) {
      this.decisionToDFA[d] = new DFA(this.atn.getDecisionState(d), d);
    }
  }
  // TODO: make outerContext an optional parameter, not optional null.
  adaptivePredict(input, decision, outerContext) {
    if (_ParserATNSimulator.debug || _ParserATNSimulator.traceATNSimulator) {
      console.log("adaptivePredict decision " + decision + " exec LA(1)==" + this.getLookaheadName(input) + " line " + input.LT(1).line + ":" + input.LT(1).column);
    }
    const dfa = this.decisionToDFA[decision];
    this.predictionState = {
      input,
      startIndex: input.index,
      outerContext: outerContext ?? void 0,
      dfa
    };
    const m2 = input.mark();
    const index2 = input.index;
    try {
      let s0;
      if (dfa.isPrecedenceDfa) {
        s0 = dfa.getPrecedenceStartState(this.parser.getPrecedence());
      } else {
        s0 = dfa.s0;
      }
      if (!s0) {
        if (!outerContext) {
          outerContext = ParserRuleContext.empty;
        }
        if (_ParserATNSimulator.debug) {
          console.log("predictATN decision " + dfa.decision + " exec LA(1)==" + this.getLookaheadName(input) + ", outerContext=" + outerContext.toString(this.parser.ruleNames));
        }
        const fullCtx = false;
        let s0_closure = this.computeStartState(dfa.atnStartState, ParserRuleContext.empty, fullCtx);
        if (dfa.isPrecedenceDfa) {
          s0_closure = this.applyPrecedenceFilter(s0_closure);
          s0 = this.addDFAState(dfa, DFAState.fromConfigs(s0_closure));
          dfa.setPrecedenceStartState(this.parser.getPrecedence(), s0);
        } else {
          s0 = this.addDFAState(dfa, DFAState.fromConfigs(s0_closure));
          dfa.s0 = s0;
        }
      }
      const alt = this.execATN(dfa, s0, input, index2, outerContext);
      if (_ParserATNSimulator.debug) {
        console.log("DFA after predictATN: " + dfa.toString(this.parser.vocabulary));
      }
      return alt;
    } finally {
      this.predictionState.dfa = void 0;
      this.mergeCache = new DoubleDict();
      input.seek(index2);
      input.release(m2);
    }
  }
  /**
   * Performs ATN simulation to compute a predicted alternative based
   *  upon the remaining input, but also updates the DFA cache to avoid
   *  having to traverse the ATN again for the same input sequence.
   *
   * There are some key conditions we're looking for after computing a new
   * set of ATN configs (proposed DFA state):
   *       if the set is empty, there is no viable alternative for current symbol
   *       does the state uniquely predict an alternative?
   *       does the state have a conflict that would prevent us from
   *         putting it on the work list?
   *
   * We also have some key operations to do:
   *       add an edge from previous DFA state to potentially new DFA state, D,
   *         upon current symbol but only if adding to work list, which means in all
   *         cases except no viable alternative (and possibly non-greedy decisions?)
   *       collecting predicates and adding semantic context to DFA accept states
   *       adding rule context to context-sensitive DFA accept states
   *       consuming an input symbol
   *       reporting a conflict
   *       reporting an ambiguity
   *       reporting a context sensitivity
   *       reporting insufficient predicates
   *
   * cover these cases:
   *    dead end
   *    single alt
   *    single alt + preds
   *    conflict
   *    conflict + preds
   */
  execATN(dfa, s0, input, startIndex, outerContext) {
    if (_ParserATNSimulator.debug || _ParserATNSimulator.traceATNSimulator) {
      console.log("execATN decision " + dfa.decision + ", DFA state " + s0 + ", LA(1)==" + this.getLookaheadName(input) + " line " + input.LT(1).line + ":" + input.LT(1).column);
    }
    let alt;
    let previousState = s0;
    let t = input.LA(1);
    while (true) {
      let nextState = this.getExistingTargetState(previousState, t);
      if (!nextState) {
        nextState = this.computeTargetState(dfa, previousState, t);
      }
      if (nextState === ATNSimulator.ERROR) {
        const e = this.noViableAlt(input, outerContext, previousState.configs, startIndex);
        input.seek(startIndex);
        alt = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previousState.configs, outerContext);
        if (alt !== ATN.INVALID_ALT_NUMBER) {
          return alt;
        } else {
          throw e;
        }
      }
      if (nextState.requiresFullContext && this.predictionMode !== PredictionMode.SLL) {
        let conflictingAlts = null;
        if (nextState.predicates !== null) {
          if (_ParserATNSimulator.debug) {
            console.log("DFA state has preds in DFA sim LL failover");
          }
          const conflictIndex = input.index;
          if (conflictIndex !== startIndex) {
            input.seek(startIndex);
          }
          conflictingAlts = this.evalSemanticContext(nextState.predicates, outerContext, true);
          if (conflictingAlts.length === 1) {
            if (_ParserATNSimulator.debug) {
              console.log("Full LL avoided");
            }
            return conflictingAlts.nextSetBit(0);
          }
          if (conflictIndex !== startIndex) {
            input.seek(conflictIndex);
          }
        }
        if (_ParserATNSimulator.dfaDebug) {
          console.log("ctx sensitive state " + outerContext + " in " + nextState);
        }
        const fullCtx = true;
        const s0_closure = this.computeStartState(dfa.atnStartState, outerContext, fullCtx);
        this.reportAttemptingFullContext(dfa, conflictingAlts, nextState.configs, startIndex, input.index);
        alt = this.execATNWithFullContext(dfa, nextState, s0_closure, input, startIndex, outerContext);
        return alt;
      }
      if (nextState.isAcceptState) {
        if (nextState.predicates === null) {
          return nextState.prediction;
        }
        const stopIndex = input.index;
        input.seek(startIndex);
        const alts = this.evalSemanticContext(nextState.predicates, outerContext, true);
        if (alts.length === 0) {
          throw this.noViableAlt(input, outerContext, nextState.configs, startIndex);
        }
        if (alts.length === 1) {
          return alts.nextSetBit(0);
        }
        this.reportAmbiguity(dfa, nextState, startIndex, stopIndex, false, alts, nextState.configs);
        return alts.nextSetBit(0);
      }
      previousState = nextState;
      if (t !== Token.EOF) {
        input.consume();
        t = input.LA(1);
      }
    }
  }
  /**
   * Get an existing target state for an edge in the DFA. If the target state
   * for the edge has not yet been computed or is otherwise not available,
   * this method returns `null`.
   *
   * @param previousD The current DFA state
   * @param t The next input symbol
   * @returns The existing target DFA state for the given input symbol
   * `t`, or `null` if the target state for this edge is not
   * already cached
   */
  getExistingTargetState(previousD, t) {
    return previousD.edges[t + 1];
  }
  /**
   * Compute a target state for an edge in the DFA, and attempt to add the
   * computed state and corresponding edge to the DFA.
   *
   * @param dfa The DFA
   * @param previousD The current DFA state
   * @param t The next input symbol
   *
   * @returns The computed target DFA state for the given input symbol
   * `t`. If `t` does not lead to a valid DFA state, this method
   * returns {@link ERROR
   */
  computeTargetState(dfa, previousD, t) {
    const reach = this.computeReachSet(previousD.configs, t, false);
    if (reach === null) {
      this.addDFAEdge(dfa, previousD, t, ATNSimulator.ERROR);
      return ATNSimulator.ERROR;
    }
    let D = DFAState.fromConfigs(reach);
    const predictedAlt = _ParserATNSimulator.getUniqueAlt(reach);
    if (_ParserATNSimulator.debug) {
      const altSubSets = PredictionMode.getConflictingAltSubsets(reach);
      console.log("SLL altSubSets=" + arrayToString(altSubSets) + /*", previous=" + previousD.configs + */
      ", configs=" + reach + ", predict=" + predictedAlt + ", allSubsetsConflict=" + PredictionMode.allSubsetsConflict(altSubSets) + ", conflictingAlts=" + this.getConflictingAlts(reach));
    }
    if (predictedAlt !== ATN.INVALID_ALT_NUMBER) {
      D.isAcceptState = true;
      D.configs.uniqueAlt = predictedAlt;
      D.prediction = predictedAlt;
    } else if (PredictionMode.hasSLLConflictTerminatingPrediction(this.predictionMode, reach)) {
      D.configs.conflictingAlts = this.getConflictingAlts(reach);
      D.requiresFullContext = true;
      D.isAcceptState = true;
      D.prediction = D.configs.conflictingAlts.nextSetBit(0);
    }
    if (D.isAcceptState && D.configs.hasSemanticContext) {
      this.predicateDFAState(D, this.atn.getDecisionState(dfa.decision));
      if (D.predicates !== null) {
        D.prediction = ATN.INVALID_ALT_NUMBER;
      }
    }
    D = this.addDFAEdge(dfa, previousD, t, D);
    return D;
  }
  getRuleName(index2) {
    if (this.parser !== null && index2 >= 0) {
      return this.parser.ruleNames[index2];
    } else {
      return "<rule " + index2 + ">";
    }
  }
  getTokenName(t) {
    if (t === Token.EOF) {
      return "EOF";
    }
    const vocabulary = this.parser?.vocabulary ?? Vocabulary.EMPTY_VOCABULARY;
    const displayName = vocabulary.getDisplayName(t);
    if (displayName === t.toString()) {
      return displayName;
    }
    return displayName + "<" + t + ">";
  }
  getLookaheadName(input) {
    return this.getTokenName(input.LA(1));
  }
  /**
   * Used for debugging in adaptivePredict around execATN but I cut
   * it out for clarity now that alg. works well. We can leave this
   * "dead" code for a bit
   */
  dumpDeadEndConfigs(e) {
    console.log("dead end configs: ");
    const decs = e.deadEndConfigs;
    for (const c of decs) {
      let trans = "no edges";
      if (c.state.transitions.length > 0) {
        const t = c.state.transitions[0];
        if (t instanceof AtomTransition) {
          trans = "Atom " + this.getTokenName(t.labelValue);
        } else if (t instanceof SetTransition) {
          const neg = t instanceof NotSetTransition;
          trans = (neg ? "~" : "") + "Set " + t.label;
        }
      }
      console.error(c.toString(this.parser, true) + ":" + trans);
    }
  }
  predicateDFAState(dfaState, decisionState) {
    const altCount = decisionState.transitions.length;
    const altsToCollectPredsFrom = this.getConflictingAltsOrUniqueAlt(dfaState.configs);
    const altToPred = this.getPredsForAmbigAlts(altsToCollectPredsFrom, dfaState.configs, altCount);
    if (altToPred !== null) {
      dfaState.predicates = this.getPredicatePredictions(altsToCollectPredsFrom, altToPred);
      dfaState.prediction = ATN.INVALID_ALT_NUMBER;
    } else {
      dfaState.prediction = altsToCollectPredsFrom.nextSetBit(0);
    }
  }
  // comes back with reach.uniqueAlt set to a valid alt
  execATNWithFullContext(dfa, D, s0, input, startIndex, outerContext) {
    if (_ParserATNSimulator.debug || _ParserATNSimulator.traceATNSimulator) {
      console.log("execATNWithFullContext " + s0);
    }
    const fullCtx = true;
    let foundExactAmbig = false;
    let reach;
    let previous = s0;
    input.seek(startIndex);
    let t = input.LA(1);
    let predictedAlt = -1;
    for (; ; ) {
      reach = this.computeReachSet(previous, t, fullCtx);
      if (reach === null) {
        const e = this.noViableAlt(input, outerContext, previous, startIndex);
        input.seek(startIndex);
        const alt = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previous, outerContext);
        if (alt !== ATN.INVALID_ALT_NUMBER) {
          return alt;
        } else {
          throw e;
        }
      }
      const altSubSets = PredictionMode.getConflictingAltSubsets(reach);
      if (_ParserATNSimulator.debug) {
        console.log("LL altSubSets=" + altSubSets + ", predict=" + PredictionMode.getUniqueAlt(altSubSets) + ", resolvesToJustOneViableAlt=" + PredictionMode.resolvesToJustOneViableAlt(altSubSets));
      }
      reach.uniqueAlt = _ParserATNSimulator.getUniqueAlt(reach);
      if (reach.uniqueAlt !== ATN.INVALID_ALT_NUMBER) {
        predictedAlt = reach.uniqueAlt;
        break;
      } else if (this.predictionMode !== PredictionMode.LL_EXACT_AMBIG_DETECTION) {
        predictedAlt = PredictionMode.resolvesToJustOneViableAlt(altSubSets);
        if (predictedAlt !== ATN.INVALID_ALT_NUMBER) {
          break;
        }
      } else {
        if (PredictionMode.allSubsetsConflict(altSubSets) && PredictionMode.allSubsetsEqual(altSubSets)) {
          foundExactAmbig = true;
          predictedAlt = PredictionMode.getSingleViableAlt(altSubSets);
          break;
        }
      }
      previous = reach;
      if (t !== Token.EOF) {
        input.consume();
        t = input.LA(1);
      }
    }
    if (reach.uniqueAlt !== ATN.INVALID_ALT_NUMBER) {
      this.reportContextSensitivity(dfa, predictedAlt, reach, startIndex, input.index);
      return predictedAlt;
    }
    this.reportAmbiguity(dfa, D, startIndex, input.index, foundExactAmbig, reach.getAlts(), reach);
    return predictedAlt;
  }
  computeReachSet(closure, t, fullCtx) {
    if (_ParserATNSimulator.debug) {
      console.log("in computeReachSet, starting closure: " + closure);
    }
    const intermediate = new ATNConfigSet(fullCtx);
    let skippedStopStates = null;
    for (const c of closure) {
      if (_ParserATNSimulator.debug) {
        console.log("testing " + this.getTokenName(t) + " at " + c);
      }
      if (c.state instanceof RuleStopState) {
        if (fullCtx || t === Token.EOF) {
          if (skippedStopStates === null) {
            skippedStopStates = [];
          }
          skippedStopStates.push(c);
        }
        continue;
      }
      for (const trans of c.state.transitions) {
        const target = this.getReachableTarget(trans, t);
        if (target !== null) {
          const cfg = ATNConfig.createWithConfig(target, c);
          intermediate.add(cfg, this.mergeCache);
          if (_ParserATNSimulator.debugAdd) {
            console.log("added " + cfg + " to intermediate");
          }
        }
      }
    }
    let reach = null;
    if (skippedStopStates === null && t !== Token.EOF) {
      if (intermediate.length === 1) {
        reach = intermediate;
      } else if (_ParserATNSimulator.getUniqueAlt(intermediate) !== ATN.INVALID_ALT_NUMBER) {
        reach = intermediate;
      }
    }
    if (reach === null) {
      reach = new ATNConfigSet(fullCtx);
      const closureBusy = new HashSet();
      const treatEofAsEpsilon = t === Token.EOF;
      for (const config2 of intermediate) {
        this.closure(config2, reach, closureBusy, false, fullCtx, treatEofAsEpsilon);
      }
    }
    if (t === Token.EOF) {
      reach = this.removeAllConfigsNotInRuleStopState(reach, reach === intermediate);
    }
    if (skippedStopStates !== null && (!fullCtx || !PredictionMode.hasConfigInRuleStopState(reach))) {
      for (const config2 of skippedStopStates) {
        reach.add(config2, this.mergeCache);
      }
    }
    if (_ParserATNSimulator.traceATNSimulator) {
      console.log("computeReachSet " + closure + " -> " + reach);
    }
    if (reach.length === 0) {
      return null;
    } else {
      return reach;
    }
  }
  /**
   * Return a configuration set containing only the configurations from
   * `configs` which are in a {@link RuleStopState}. If all
   * configurations in `configs` are already in a rule stop state, this
   * method simply returns `configs`.
   *
   * When `lookToEndOfRule` is true, this method uses
   * {@link ATN.nextTokens} for each configuration in `configs` which is
   * not already in a rule stop state to see if a rule stop state is reachable
   * from the configuration via epsilon-only transitions.
   *
   * @param configs the configuration set to update
   * @param lookToEndOfRule when true, this method checks for rule stop states
   * reachable by epsilon-only transitions from each configuration in
   * `configs`.
   *
   * @returns `configs` if all configurations in `configs` are in a
   * rule stop state, otherwise return a new configuration set containing only
   * the configurations from `configs` which are in a rule stop state
   */
  removeAllConfigsNotInRuleStopState(configs, lookToEndOfRule) {
    if (PredictionMode.allConfigsInRuleStopStates(configs)) {
      return configs;
    }
    const result = new ATNConfigSet(configs.fullCtx);
    for (const config2 of configs) {
      if (config2.state instanceof RuleStopState) {
        result.add(config2, this.mergeCache);
        continue;
      }
      if (lookToEndOfRule && config2.state.epsilonOnlyTransitions) {
        const nextTokens = this.atn.nextTokens(config2.state);
        if (nextTokens.contains(Token.EPSILON)) {
          const endOfRuleState = this.atn.ruleToStopState[config2.state.ruleIndex];
          result.add(ATNConfig.createWithConfig(endOfRuleState, config2), this.mergeCache);
        }
      }
    }
    return result;
  }
  computeStartState(p, ctx2, fullCtx) {
    const initialContext = predictionContextFromRuleContext(this.atn, ctx2);
    const configs = new ATNConfigSet(fullCtx);
    if (_ParserATNSimulator.traceATNSimulator) {
      console.log("computeStartState from ATN state " + p + " initialContext=" + initialContext.toString(this.parser));
    }
    for (let i = 0; i < p.transitions.length; i++) {
      const target = p.transitions[i].target;
      const c = ATNConfig.createWithContext(target, i + 1, initialContext);
      const closureBusy = new HashSet();
      this.closure(c, configs, closureBusy, true, fullCtx, false);
    }
    return configs;
  }
  /**
   * This method transforms the start state computed by
   * {@link computeStartState} to the special start state used by a
   * precedence DFA for a particular precedence value. The transformation
   * process applies the following changes to the start state's configuration
   * set.
   *
   * 1. Evaluate the precedence predicates for each configuration using
   * {@link SemanticContext//evalPrecedence}.
   * 2. Remove all configurations which predict an alternative greater than
   * 1, for which another configuration that predicts alternative 1 is in the
   * same ATN state with the same prediction context. This transformation is
   * valid for the following reasons:
   * 3. The closure block cannot contain any epsilon transitions which bypass
   * the body of the closure, so all states reachable via alternative 1 are
   * part of the precedence alternatives of the transformed left-recursive
   * rule.
   * 4. The "primary" portion of a left recursive rule cannot contain an
   * epsilon transition, so the only way an alternative other than 1 can exist
   * in a state that is also reachable via alternative 1 is by nesting calls
   * to the left-recursive rule, with the outer calls not being at the
   * preferred precedence level.
   *
   *
   * The prediction context must be considered by this filter to address
   * situations like the following.
   *
   * `
   * ```
   * grammar TA;
   * prog: statement* EOF;
   * statement: letterA | statement letterA 'b' ;
   * letterA: 'a';
   * ```
   * `
   *
   * If the above grammar, the ATN state immediately before the token
   * reference `'a'` in `letterA` is reachable from the left edge
   * of both the primary and closure blocks of the left-recursive rule
   * `statement`. The prediction context associated with each of these
   * configurations distinguishes between them, and prevents the alternative
   * which stepped out to `prog` (and then back in to `statement`
   * from being eliminated by the filter.
   *
   * @param configs The configuration set computed by
   * {@link computeStartState} as the start state for the DFA.
   * @returns The transformed configuration set representing the start state
   * for a precedence DFA at a particular precedence level (determined by
   * calling {@link Parser//getPrecedence})
   */
  applyPrecedenceFilter(configs) {
    const statesFromAlt1 = [];
    const configSet = new ATNConfigSet(configs.fullCtx);
    for (const config2 of configs) {
      if (config2.alt !== 1) {
        continue;
      }
      const updatedContext = config2.semanticContext.evalPrecedence(
        this.parser,
        this.predictionState.outerContext
      );
      if (updatedContext === null) {
        continue;
      }
      statesFromAlt1[config2.state.stateNumber] = config2.context;
      if (updatedContext !== config2.semanticContext) {
        configSet.add(ATNConfig.duplicate(config2, updatedContext), this.mergeCache);
      } else {
        configSet.add(config2, this.mergeCache);
      }
    }
    for (const config2 of configs) {
      if (config2.alt === 1) {
        continue;
      }
      if (!config2.precedenceFilterSuppressed) {
        const context = statesFromAlt1[config2.state.stateNumber] || null;
        if (context !== null && context.equals(config2.context)) {
          continue;
        }
      }
      configSet.add(config2, this.mergeCache);
    }
    return configSet;
  }
  getReachableTarget(trans, ttype) {
    if (trans.matches(ttype, 0, this.atn.maxTokenType)) {
      return trans.target;
    } else {
      return null;
    }
  }
  getPredsForAmbigAlts(ambigAlts, configs, altCount) {
    let altToPred = [];
    for (const c of configs) {
      if (ambigAlts.get(c.alt)) {
        altToPred[c.alt] = SemanticContext.orContext(altToPred[c.alt] ?? null, c.semanticContext);
      }
    }
    let nPredAlts = 0;
    for (let i = 1; i < altCount + 1; i++) {
      const pred = altToPred[i] ?? null;
      if (pred === null) {
        altToPred[i] = SemanticContext.NONE;
      } else if (pred !== SemanticContext.NONE) {
        nPredAlts += 1;
      }
    }
    if (nPredAlts === 0) {
      altToPred = null;
    }
    if (_ParserATNSimulator.debug) {
      console.log("getPredsForAmbigAlts result " + arrayToString(altToPred));
    }
    return altToPred;
  }
  getPredicatePredictions(ambigAlts, altToPred) {
    const pairs = [];
    let containsPredicate = false;
    for (let i = 1; i < altToPred.length; i++) {
      const pred = altToPred[i];
      if (ambigAlts.get(i)) {
        pairs.push({ pred, alt: i });
      }
      if (pred !== SemanticContext.NONE) {
        containsPredicate = true;
      }
    }
    if (!containsPredicate) {
      return null;
    }
    return pairs;
  }
  /**
   * This method is used to improve the localization of error messages by
   * choosing an alternative rather than throwing a
   * {@link NoViableAltException} in particular prediction scenarios where the
   * {@link ERROR} state was reached during ATN simulation.
   *
   *
   * The default implementation of this method uses the following
   * algorithm to identify an ATN configuration which successfully parsed the
   * decision entry rule. Choosing such an alternative ensures that the
   * {@link ParserRuleContext} returned by the calling rule will be complete
   * and valid, and the syntax error will be reported later at a more
   * localized location.
   *
   * - If a syntactically valid path or paths reach the end of the decision rule and
   * they are semantically valid if predicated, return the min associated alt.
   * - Else, if a semantically invalid but syntactically valid path exist
   * or paths exist, return the minimum associated alt.
   *
   * - Otherwise, return {@link ATN//INVALID_ALT_NUMBER}.
   *
   *
   * In some scenarios, the algorithm described above could predict an
   * alternative which will result in a {@link FailedPredicateException} in
   * the parser. Specifically, this could occur if the *only* configuration
   * capable of successfully parsing to the end of the decision rule is
   * blocked by a semantic predicate. By choosing this alternative within
   * {@link adaptivePredict} instead of throwing a
   * {@link NoViableAltException}, the resulting
   * {@link FailedPredicateException} in the parser will identify the specific
   * predicate which is preventing the parser from successfully parsing the
   * decision rule, which helps developers identify and correct logic errors
   * in semantic predicates.
   *
   * @param configs The ATN configurations which were valid immediately before
   * the {@link ERROR} state was reached
   * @param outerContext The is the \gamma_0 initial parser context from the paper
   * or the parser stack at the instant before prediction commences.
   *
   * @returns The value to return from {@link adaptivePredict}, or
   * {@link ATN//INVALID_ALT_NUMBER} if a suitable alternative was not
   * identified and {@link adaptivePredict} should report an error instead
   */
  getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(configs, outerContext) {
    const splitConfigs = this.splitAccordingToSemanticValidity(configs, outerContext);
    const semValidConfigs = splitConfigs[0];
    const semInvalidConfigs = splitConfigs[1];
    let alt = this.getAltThatFinishedDecisionEntryRule(semValidConfigs);
    if (alt !== ATN.INVALID_ALT_NUMBER) {
      return alt;
    }
    if (semInvalidConfigs.length > 0) {
      alt = this.getAltThatFinishedDecisionEntryRule(semInvalidConfigs);
      if (alt !== ATN.INVALID_ALT_NUMBER) {
        return alt;
      }
    }
    return ATN.INVALID_ALT_NUMBER;
  }
  getAltThatFinishedDecisionEntryRule(configs) {
    const alts = [];
    for (const c of configs) {
      if (c.reachesIntoOuterContext || c.state instanceof RuleStopState && c.context.hasEmptyPath()) {
        if (alts.indexOf(c.alt) < 0) {
          alts.push(c.alt);
        }
      }
    }
    if (alts.length === 0) {
      return ATN.INVALID_ALT_NUMBER;
    } else {
      return Math.min(...alts);
    }
  }
  /**
   * Walk the list of configurations and split them according to
   * those that have preds evaluating to true/false.  If no pred, assume
   * true pred and include in succeeded set.  Returns Pair of sets.
   *
   * Create a new set so as not to alter the incoming parameter.
   *
   * Assumption: the input stream has been restored to the starting point
   * prediction, which is where predicates need to evaluate.
   */
  splitAccordingToSemanticValidity(configs, outerContext) {
    const succeeded = new ATNConfigSet(configs.fullCtx);
    const failed = new ATNConfigSet(configs.fullCtx);
    for (const c of configs) {
      if (c.semanticContext !== SemanticContext.NONE) {
        const predicateEvaluationResult = c.semanticContext.evaluate(this.parser, outerContext);
        if (predicateEvaluationResult) {
          succeeded.add(c);
        } else {
          failed.add(c);
        }
      } else {
        succeeded.add(c);
      }
    }
    return [succeeded, failed];
  }
  /**
   * Look through a list of predicate/alt pairs, returning alts for the
   * pairs that win. A `NONE` predicate indicates an alt containing an
   * unpredicated config which behaves as "always true." If !complete
   * then we stop at the first predicate that evaluates to true. This
   * includes pairs with null predicates.
   */
  evalSemanticContext(predPredictions, outerContext, complete) {
    const predictions = new BitSet();
    for (const pair of predPredictions) {
      if (pair.pred === SemanticContext.NONE) {
        predictions.set(pair.alt);
        if (!complete) {
          break;
        }
        continue;
      }
      const predicateEvaluationResult = pair.pred.evaluate(this.parser, outerContext);
      if (_ParserATNSimulator.debug || _ParserATNSimulator.dfaDebug) {
        console.log("eval pred " + pair + "=" + predicateEvaluationResult);
      }
      if (predicateEvaluationResult) {
        predictions.set(pair.alt);
        if (!complete) {
          break;
        }
      }
    }
    return predictions;
  }
  // TODO: If we are doing predicates, there is no point in pursuing
  //     closure operations if we reach a DFA state that uniquely predicts
  //     alternative. We will not be caching that DFA state and it is a
  //     waste to pursue the closure. Might have to advance when we do
  //     ambig detection thought :(
  //
  closure(config2, configs, closureBusy, collectPredicates, fullCtx, treatEofAsEpsilon) {
    const initialDepth = 0;
    this.closureCheckingStopState(
      config2,
      configs,
      closureBusy,
      collectPredicates,
      fullCtx,
      initialDepth,
      treatEofAsEpsilon
    );
  }
  closureCheckingStopState(config2, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon) {
    if (_ParserATNSimulator.traceATNSimulator || _ParserATNSimulator.debugClosure) {
      console.log("closure(" + config2.toString(this.parser, true) + ")");
    }
    if (config2.state instanceof RuleStopState) {
      if (config2.context && !config2.context.isEmpty()) {
        for (let i = 0; i < config2.context.length; i++) {
          if (config2.context.getReturnState(i) === PredictionContext.EMPTY_RETURN_STATE) {
            if (fullCtx) {
              configs.add(
                ATNConfig.createWithConfig(
                  config2.state,
                  config2,
                  EmptyPredictionContext.instance
                ),
                this.mergeCache
              );
              continue;
            } else {
              if (_ParserATNSimulator.debug) {
                console.log("FALLING off rule " + this.getRuleName(config2.state.ruleIndex));
              }
              this.closure_(
                config2,
                configs,
                closureBusy,
                collectPredicates,
                fullCtx,
                depth,
                treatEofAsEpsilon
              );
            }
            continue;
          }
          const returnState = this.atn.states[config2.context.getReturnState(i)];
          const newContext = config2.context.getParent(i);
          const c = ATNConfig.createWithContext(returnState, config2.alt, newContext, config2.semanticContext);
          c.reachesIntoOuterContext = config2.reachesIntoOuterContext;
          this.closureCheckingStopState(
            c,
            configs,
            closureBusy,
            collectPredicates,
            fullCtx,
            depth - 1,
            treatEofAsEpsilon
          );
        }
        return;
      } else if (fullCtx) {
        configs.add(config2, this.mergeCache);
        return;
      } else {
        if (_ParserATNSimulator.debug) {
          console.log("FALLING off rule " + this.getRuleName(config2.state.ruleIndex));
        }
      }
    }
    this.closure_(config2, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon);
  }
  // Do the actual work of walking epsilon edges//
  closure_(config2, configs, closureBusy, collectPredicates, fullCtx, depth, treatEofAsEpsilon) {
    const p = config2.state;
    if (!p.epsilonOnlyTransitions) {
      configs.add(config2, this.mergeCache);
    }
    for (let i = 0; i < p.transitions.length; i++) {
      if (i === 0 && this.canDropLoopEntryEdgeInLeftRecursiveRule(config2)) {
        continue;
      }
      const t = p.transitions[i];
      const continueCollecting = collectPredicates && !(t instanceof ActionTransition);
      const c = this.getEpsilonTarget(config2, t, continueCollecting, depth === 0, fullCtx, treatEofAsEpsilon);
      if (c) {
        let newDepth = depth;
        if (config2.state.constructor.stateType === ATNState.RULE_STOP) {
          if (this.predictionState.dfa && this.predictionState?.dfa.isPrecedenceDfa) {
            const outermostPrecedenceReturn = t.outermostPrecedenceReturn;
            if (outermostPrecedenceReturn === this.predictionState?.dfa.atnStartState?.ruleIndex) {
              c.precedenceFilterSuppressed = true;
            }
          }
          c.reachesIntoOuterContext = true;
          if (closureBusy.getOrAdd(c) !== c) {
            continue;
          }
          configs.dipsIntoOuterContext = true;
          newDepth -= 1;
          if (_ParserATNSimulator.debug) {
            console.log("dips into outer ctx: " + c);
          }
        } else {
          if (!t.isEpsilon && closureBusy.getOrAdd(c) !== c) {
            continue;
          }
          if (t instanceof RuleTransition) {
            if (newDepth >= 0) {
              newDepth += 1;
            }
          }
        }
        this.closureCheckingStopState(
          c,
          configs,
          closureBusy,
          continueCollecting,
          fullCtx,
          newDepth,
          treatEofAsEpsilon
        );
      }
    }
  }
  canDropLoopEntryEdgeInLeftRecursiveRule(config2) {
    const p = config2.state;
    if (p.constructor.stateType !== ATNState.STAR_LOOP_ENTRY || !config2.context) {
      return false;
    }
    if (!p.precedenceRuleDecision || config2.context.isEmpty() || config2.context.hasEmptyPath()) {
      return false;
    }
    const numCtxs = config2.context.length;
    for (let i = 0; i < numCtxs; i++) {
      const returnState = this.atn.states[config2.context.getReturnState(i)];
      if (returnState.ruleIndex !== p.ruleIndex) {
        return false;
      }
    }
    const decisionStartState = p.transitions[0].target;
    const blockEndStateNum = decisionStartState.endState.stateNumber;
    const blockEndState = this.atn.states[blockEndStateNum];
    for (let i = 0; i < numCtxs; i++) {
      const returnStateNumber = config2.context.getReturnState(i);
      const returnState = this.atn.states[returnStateNumber];
      if (returnState.transitions.length !== 1 || !returnState.transitions[0].isEpsilon) {
        return false;
      }
      const returnStateTarget = returnState.transitions[0].target;
      if (returnState.constructor.stateType === ATNState.BLOCK_END && returnStateTarget === p) {
        continue;
      }
      if (returnState === blockEndState) {
        continue;
      }
      if (returnStateTarget === blockEndState) {
        continue;
      }
      if (returnStateTarget.constructor.stateType === ATNState.BLOCK_END && returnStateTarget.transitions.length === 1 && returnStateTarget.transitions[0].isEpsilon && returnStateTarget.transitions[0].target === p) {
        continue;
      }
      return false;
    }
    return true;
  }
  getEpsilonTarget(config2, t, collectPredicates, inContext, fullCtx, treatEofAsEpsilon) {
    switch (t.transitionType) {
      case Transition.RULE: {
        return this.ruleTransition(config2, t);
      }
      case Transition.PRECEDENCE: {
        return this.precedenceTransition(
          config2,
          t,
          collectPredicates,
          inContext,
          fullCtx
        );
      }
      case Transition.PREDICATE: {
        return this.predTransition(config2, t, collectPredicates, inContext, fullCtx);
      }
      case Transition.ACTION: {
        if (_ParserATNSimulator.debug) {
          const at = t;
          const index2 = at.actionIndex === -1 ? 65535 : at.actionIndex;
          console.log("ACTION edge " + at.ruleIndex + ":" + index2);
        }
        return ATNConfig.createWithConfig(t.target, config2);
      }
      case Transition.EPSILON: {
        return ATNConfig.createWithConfig(t.target, config2);
      }
      case Transition.ATOM:
      case Transition.RANGE:
      case Transition.SET: {
        if (treatEofAsEpsilon) {
          if (t.matches(Token.EOF, 0, 1)) {
            return ATNConfig.createWithConfig(t.target, config2);
          }
        }
        return null;
      }
      default:
        return null;
    }
  }
  precedenceTransition(config2, pt, collectPredicates, inContext, fullCtx) {
    if (_ParserATNSimulator.debug) {
      console.log("PRED (collectPredicates=" + collectPredicates + ") " + pt.precedence + ">=_p, ctx dependent=true");
      if (this.parser !== null) {
        console.log("context surrounding pred is " + arrayToString(this.parser.getRuleInvocationStack()));
      }
    }
    let c = null;
    if (collectPredicates && inContext) {
      if (fullCtx && this.predictionState?.input) {
        const currentPosition = this.predictionState.input.index;
        this.predictionState.input.seek(this.predictionState.startIndex);
        const predSucceeds = pt.getPredicate().evaluate(this.parser, this.predictionState.outerContext);
        this.predictionState.input.seek(currentPosition);
        if (predSucceeds) {
          c = ATNConfig.createWithConfig(pt.target, config2);
        }
      } else {
        const newSemCtx = SemanticContext.andContext(config2.semanticContext, pt.getPredicate());
        c = ATNConfig.createWithSemanticContext(pt.target, config2, newSemCtx);
      }
    } else {
      c = ATNConfig.createWithConfig(pt.target, config2);
    }
    if (_ParserATNSimulator.debug) {
      console.log("config from pred transition=" + c);
    }
    return c;
  }
  predTransition(config2, pt, collectPredicates, inContext, fullCtx) {
    if (_ParserATNSimulator.debug) {
      console.log("PRED (collectPredicates=" + collectPredicates + ") " + pt.ruleIndex + ":" + pt.predIndex + ", ctx dependent=" + pt.isCtxDependent);
      if (this.parser !== null) {
        console.log("context surrounding pred is " + arrayToString(this.parser.getRuleInvocationStack()));
      }
    }
    let c = null;
    if (collectPredicates && (pt.isCtxDependent && inContext || !pt.isCtxDependent)) {
      if (fullCtx && this.predictionState?.input) {
        const currentPosition = this.predictionState.input.index;
        this.predictionState.input.seek(this.predictionState.startIndex);
        const predSucceeds = pt.getPredicate().evaluate(this.parser, this.predictionState.outerContext);
        this.predictionState.input.seek(currentPosition);
        if (predSucceeds) {
          c = ATNConfig.createWithConfig(pt.target, config2);
        }
      } else {
        const newSemCtx = SemanticContext.andContext(config2.semanticContext, pt.getPredicate());
        c = ATNConfig.createWithSemanticContext(pt.target, config2, newSemCtx);
      }
    } else {
      c = ATNConfig.createWithConfig(pt.target, config2);
    }
    if (_ParserATNSimulator.debug) {
      console.log("config from pred transition=" + c);
    }
    return c;
  }
  ruleTransition(config2, t) {
    if (_ParserATNSimulator.debug) {
      console.log("CALL rule " + this.getRuleName(t.target.ruleIndex) + ", ctx=" + config2.context);
    }
    const returnState = t.followState;
    const newContext = createSingletonPredictionContext(config2.context ?? void 0, returnState.stateNumber);
    return ATNConfig.createWithConfig(t.target, config2, newContext);
  }
  getConflictingAlts(configs) {
    const altSets = PredictionMode.getConflictingAltSubsets(configs);
    return PredictionMode.getAlts(altSets);
  }
  /**
   * Sam pointed out a problem with the previous definition, v3, of
   * ambiguous states. If we have another state associated with conflicting
   * alternatives, we should keep going. For example, the following grammar
   *
   * s : (ID | ID ID?) ';' ;
   *
   * When the ATN simulation reaches the state before ';', it has a DFA
   * state that looks like: [12|1|[], 6|2|[], 12|2|[]]. Naturally
   * 12|1|[] and 12|2|[] conflict, but we cannot stop processing this node
   * because alternative to has another way to continue, via [6|2|[]].
   * The key is that we have a single state that has config's only associated
   * with a single alternative, 2, and crucially the state transitions
   * among the configurations are all non-epsilon transitions. That means
   * we don't consider any conflicts that include alternative 2. So, we
   * ignore the conflict between alts 1 and 2. We ignore a set of
   * conflicting alts when there is an intersection with an alternative
   * associated with a single alt state in the state -> config-list map.
   *
   * It's also the case that we might have two conflicting configurations but
   * also a 3rd nonconflicting configuration for a different alternative:
   * [1|1|[], 1|2|[], 8|3|[]]. This can come about from grammar:
   *
   * a : A | A | A B ;
   *
   * After matching input A, we reach the stop state for rule A, state 1.
   * State 8 is the state right before B. Clearly alternatives 1 and 2
   * conflict and no amount of further lookahead will separate the two.
   * However, alternative 3 will be able to continue and so we do not
   * stop working on this state. In the previous example, we're concerned
   * with states associated with the conflicting alternatives. Here alt
   * 3 is not associated with the conflicting configs, but since we can continue
   * looking for input reasonably, I don't declare the state done. We
   * ignore a set of conflicting alts when we have an alternative
   * that we still need to pursue
   */
  getConflictingAltsOrUniqueAlt(configs) {
    let conflictingAlts;
    if (configs.uniqueAlt !== ATN.INVALID_ALT_NUMBER) {
      conflictingAlts = new BitSet();
      conflictingAlts.set(configs.uniqueAlt);
    } else {
      conflictingAlts = configs.conflictingAlts;
    }
    return conflictingAlts;
  }
  noViableAlt(input, outerContext, configs, startIndex) {
    return new NoViableAltException(this.parser, input, input.get(startIndex), input.LT(1), configs, outerContext);
  }
  /**
   * Add an edge to the DFA, if possible. This method calls
   * {@link addDFAState} to ensure the `to` state is present in the
   * DFA. If `from` is `null`, or if `t` is outside the
   * range of edges that can be represented in the DFA tables, this method
   * returns without adding the edge to the DFA.
   *
   * If `to` is `null`, this method returns `null`.
   * Otherwise, this method returns the {@link DFAState} returned by calling
   * {@link addDFAState} for the `to` state.
   *
   * @param dfa The DFA
   * @param from The source state for the edge
   * @param t The input symbol
   * @param to The target state for the edge
   *
   * @returns If `to` is `null`, this method returns `null`;
   * otherwise this method returns the result of calling {@link addDFAState}
   * on `to`
   */
  addDFAEdge(dfa, from, t, to) {
    if (_ParserATNSimulator.debug) {
      console.log("EDGE " + from + " -> " + to + " upon " + this.getTokenName(t));
    }
    to = this.addDFAState(dfa, to);
    if (t < -1 || t > this.atn.maxTokenType) {
      return to;
    }
    if (_ParserATNSimulator.debug) {
      console.log("DFA=\n" + dfa.toString(this.parser != null ? this.parser.vocabulary : Vocabulary.EMPTY_VOCABULARY));
    }
    from.edges[t + 1] = to;
    return to;
  }
  /**
   * Add state `D` to the DFA if it is not already present, and return
   * the actual instance stored in the DFA. If a state equivalent to `D`
   * is already in the DFA, the existing state is returned. Otherwise this
   * method returns `D` after adding it to the DFA.
   *
   * If `D` is {@link ERROR}, this method returns {@link ERROR} and
   * does not change the DFA.
   *
   * @param dfa The dfa.
   * @param newState The DFA state to add.
   *
   * @returns The state stored in the DFA. This will be either the existing state if `newState` is already in
   *          the DFA, or `newState` itself if the state was not already present.
   */
  addDFAState(dfa, newState) {
    if (newState === ATNSimulator.ERROR) {
      return newState;
    }
    const existing = dfa.getState(newState);
    if (existing !== null) {
      return existing;
    }
    if (!newState.configs.readOnly) {
      newState.configs.optimizeConfigs(this);
      newState.configs.setReadonly(true);
    }
    if (_ParserATNSimulator.traceATNSimulator) {
      console.log("addDFAState new " + newState);
    }
    dfa.addState(newState);
    return newState;
  }
  reportAttemptingFullContext(dfa, conflictingAlts, configs, startIndex, stopIndex) {
    if (_ParserATNSimulator.debug || _ParserATNSimulator.retryDebug) {
      const interval = new Interval(startIndex, stopIndex + 1);
      console.log("reportAttemptingFullContext decision=" + dfa.decision + ":" + configs + ", input=" + this.parser.tokenStream.getTextFromInterval(interval));
    }
    this.parser.errorListenerDispatch.reportAttemptingFullContext(
      this.parser,
      dfa,
      startIndex,
      stopIndex,
      conflictingAlts,
      configs
    );
  }
  reportContextSensitivity(dfa, prediction, configs, startIndex, stopIndex) {
    if (_ParserATNSimulator.debug || _ParserATNSimulator.retryDebug) {
      const interval = new Interval(startIndex, stopIndex + 1);
      console.log("reportContextSensitivity decision=" + dfa.decision + ":" + configs + ", input=" + this.parser.tokenStream.getTextFromInterval(interval));
    }
    this.parser.errorListenerDispatch.reportContextSensitivity(
      this.parser,
      dfa,
      startIndex,
      stopIndex,
      prediction,
      configs
    );
  }
  // If context sensitive parsing, we know it's ambiguity not conflict.
  reportAmbiguity(dfa, D, startIndex, stopIndex, exact, ambigAlts, configs) {
    if (_ParserATNSimulator.debug || _ParserATNSimulator.retryDebug) {
      const interval = new Interval(startIndex, stopIndex + 1);
      console.log("reportAmbiguity " + ambigAlts + ":" + configs + ", input=" + this.parser.tokenStream.getTextFromInterval(interval));
    }
    this.parser.errorListenerDispatch.reportAmbiguity(
      this.parser,
      dfa,
      startIndex,
      stopIndex,
      exact,
      ambigAlts,
      configs
    );
  }
};
var PredictionContextCache = class {
  static {
    __name(this, "PredictionContextCache");
  }
  cache = new HashMap(ObjectEqualityComparator.instance);
  /**
   * Add a context to the cache and return it. If the context already exists,
   * return that one instead and do not add a new context to the cache.
   * Protect shared cache from unsafe thread access.
   *
   * @param ctx tbd
   * @returns tbd
   */
  add(ctx2) {
    if (ctx2 === EmptyPredictionContext.instance) {
      return ctx2;
    }
    const existing = this.cache.get(ctx2);
    if (existing) {
      return existing;
    }
    this.cache.set(ctx2, ctx2);
    return ctx2;
  }
  get(ctx2) {
    return this.cache.get(ctx2);
  }
  get length() {
    return this.cache.size;
  }
};
var ProfilingATNSimulator = class extends ParserATNSimulator {
  static {
    __name(this, "ProfilingATNSimulator");
  }
  decisions;
  numDecisions = 0;
  currentDecision = 0;
  currentState;
  /**
   * At the point of LL failover, we record how SLL would resolve the conflict so that
   *  we can determine whether or not a decision / input pair is context-sensitive.
   *  If LL gives a different result than SLL's predicted alternative, we have a
   *  context sensitivity for sure. The converse is not necessarily true, however.
   *  It's possible that after conflict resolution chooses minimum alternatives,
   *  SLL could get the same answer as LL. Regardless of whether or not the result indicates
   *  an ambiguity, it is not treated as a context sensitivity because LL prediction
   *  was not required in order to produce a correct prediction for this decision and input sequence.
   *  It may in fact still be a context sensitivity but we don't know by looking at the
   *  minimum alternatives for the current input.
   */
  conflictingAltResolvedBySLL;
  sllStopIndex = 0;
  llStopIndex = 0;
  constructor(parser) {
    const sharedContextCache = parser.interpreter.sharedContextCache;
    super(parser, parser.interpreter.atn, parser.interpreter.decisionToDFA, sharedContextCache);
    if (sharedContextCache) {
      this.numDecisions = this.atn.decisionToState.length;
      this.decisions = new Array(this.numDecisions);
      for (let i = 0; i < this.numDecisions; i++) {
        this.decisions[i] = new DecisionInfo(i);
      }
    }
  }
  adaptivePredict(input, decision, outerContext) {
    try {
      this.sllStopIndex = -1;
      this.llStopIndex = -1;
      this.currentDecision = decision;
      const start = performance.now();
      const alt = super.adaptivePredict(input, decision, outerContext);
      const stop = performance.now();
      this.decisions[decision].timeInPrediction += stop - start;
      this.decisions[decision].invocations++;
      const sllLook = this.sllStopIndex - this.predictionState.startIndex + 1;
      this.decisions[decision].sllTotalLook += sllLook;
      this.decisions[decision].sllMinLook = this.decisions[decision].sllMinLook === 0 ? sllLook : Math.min(this.decisions[decision].sllMinLook, sllLook);
      if (sllLook > this.decisions[decision].sllMaxLook) {
        this.decisions[decision].sllMaxLook = sllLook;
        this.decisions[decision].sllMaxLookEvent = {
          decision,
          configs: null,
          predictedAlt: alt,
          input,
          startIndex: this.predictionState.startIndex,
          stopIndex: this.sllStopIndex,
          fullCtx: false
        };
      }
      if (this.llStopIndex >= 0) {
        const llLook = this.llStopIndex - this.predictionState.startIndex + 1;
        this.decisions[decision].llTotalLook += llLook;
        this.decisions[decision].llMinLook = this.decisions[decision].llMinLook === 0 ? llLook : Math.min(this.decisions[decision].llMinLook, llLook);
        if (llLook > this.decisions[decision].llMaxLook) {
          this.decisions[decision].llMaxLook = llLook;
          this.decisions[decision].llMaxLookEvent = {
            decision,
            configs: null,
            predictedAlt: alt,
            input,
            startIndex: this.predictionState.startIndex,
            stopIndex: this.llStopIndex,
            fullCtx: true
          };
        }
      }
      return alt;
    } finally {
      this.currentDecision = -1;
    }
  }
  getExistingTargetState(previousD, t) {
    this.sllStopIndex = this.predictionState.input.index;
    const existingTargetState = super.getExistingTargetState(previousD, t);
    if (existingTargetState !== void 0) {
      this.decisions[this.currentDecision].sllDFATransitions++;
      if (existingTargetState === ATNSimulator.ERROR) {
        this.decisions[this.currentDecision].errors.push({
          decision: this.currentDecision,
          configs: previousD.configs,
          input: this.predictionState.input,
          startIndex: this.predictionState.startIndex,
          stopIndex: this.sllStopIndex,
          fullCtx: false
        });
      }
    }
    this.currentState = existingTargetState;
    return existingTargetState;
  }
  computeTargetState(dfa, previousD, t) {
    const state = super.computeTargetState(dfa, previousD, t);
    this.currentState = state;
    return state;
  }
  computeReachSet(closure, t, fullCtx) {
    if (fullCtx && this.predictionState?.input) {
      this.llStopIndex = this.predictionState.input.index;
    }
    const reachConfigs = super.computeReachSet(closure, t, fullCtx);
    if (this.predictionState?.input) {
      if (fullCtx) {
        this.decisions[this.currentDecision].llATNTransitions++;
        if (reachConfigs === null) {
          this.decisions[this.currentDecision].errors.push({
            decision: this.currentDecision,
            configs: closure,
            input: this.predictionState.input,
            startIndex: this.predictionState.startIndex,
            stopIndex: this.sllStopIndex,
            fullCtx: true
          });
        }
      } else {
        this.decisions[this.currentDecision].sllATNTransitions++;
        if (reachConfigs === null) {
          this.decisions[this.currentDecision].errors.push({
            decision: this.currentDecision,
            configs: closure,
            input: this.predictionState.input,
            startIndex: this.predictionState.startIndex,
            stopIndex: this.sllStopIndex,
            fullCtx: false
          });
        }
      }
    }
    return reachConfigs;
  }
  reportAttemptingFullContext(dfa, conflictingAlts, configs, startIndex, stopIndex) {
    if (conflictingAlts !== null) {
      this.conflictingAltResolvedBySLL = conflictingAlts.nextSetBit(0);
    } else {
      this.conflictingAltResolvedBySLL = configs.getAlts().nextSetBit(0);
    }
    this.decisions[this.currentDecision].llFallback++;
    if (conflictingAlts) {
      super.reportAttemptingFullContext(dfa, conflictingAlts, configs, startIndex, stopIndex);
    }
  }
  reportContextSensitivity(dfa, prediction, configs, startIndex, stopIndex) {
    if (prediction !== this.conflictingAltResolvedBySLL && this.predictionState.input) {
      this.decisions[this.currentDecision].contextSensitivities.push({
        decision: this.currentDecision,
        configs,
        input: this.predictionState.input,
        startIndex,
        stopIndex,
        fullCtx: true
      });
    }
    super.reportContextSensitivity(dfa, prediction, configs, startIndex, stopIndex);
  }
  reportAmbiguity(dfa, state, startIndex, stopIndex, exact, ambigAlts, configs) {
    let prediction;
    if (ambigAlts) {
      prediction = ambigAlts.nextSetBit(0);
    } else {
      prediction = configs.getAlts().nextSetBit(0);
    }
    if (this.predictionState?.input) {
      if (configs.fullCtx && prediction !== this.conflictingAltResolvedBySLL) {
        this.decisions[this.currentDecision].contextSensitivities.push({
          decision: this.currentDecision,
          configs,
          input: this.predictionState.input,
          startIndex,
          stopIndex,
          fullCtx: true
        });
      }
      this.decisions[this.currentDecision].ambiguities.push({
        ambigAlts,
        decision: this.currentDecision,
        configs,
        input: this.predictionState.input,
        startIndex,
        stopIndex,
        fullCtx: configs.fullCtx
      });
    }
    super.reportAmbiguity(dfa, state, startIndex, stopIndex, exact, ambigAlts, configs);
  }
  getDecisionInfo() {
    return this.decisions;
  }
  getCurrentState() {
    return this.currentState;
  }
};
var PredPrediction;
((PredPrediction2) => {
  PredPrediction2.toString = /* @__PURE__ */ __name((prediction) => {
    return `(${prediction.pred}, ${prediction.alt})`;
  }, "toString");
})(PredPrediction || (PredPrediction = {}));
var ParseCancellationException = class extends Error {
  static {
    __name(this, "ParseCancellationException");
  }
  constructor(e) {
    super();
    this.cause = e;
  }
};
var InterpreterDataReader = class {
  static {
    __name(this, "InterpreterDataReader");
  }
  /**
   * The structure of the data file is very simple. Everything is line based with empty lines
   * separating the different parts. For lexers the layout is:
   * token literal names:
   * ...
   *
   * token symbolic names:
   * ...
   *
   * rule names:
   * ...
   *
   * channel names:
   * ...
   *
   * mode names:
   * ...
   *
   * atn:
   * a single line with comma separated int values, enclosed in a pair of squared brackets.
   *
   * Data for a parser does not contain channel and mode names.
   */
  static parseInterpreterData(source) {
    const ruleNames = [];
    const channels = [];
    const modes = [];
    const literalNames = [];
    const symbolicNames = [];
    const lines = source.split("\n");
    let index2 = 0;
    let line = lines[index2++];
    if (line !== "token literal names:") {
      throw new Error("Unexpected data entry");
    }
    do {
      line = lines[index2++];
      if (line.length === 0) {
        break;
      }
      literalNames.push(line === "null" ? null : line);
    } while (true);
    line = lines[index2++];
    if (line !== "token symbolic names:") {
      throw new Error("Unexpected data entry");
    }
    do {
      line = lines[index2++];
      if (line.length === 0) {
        break;
      }
      symbolicNames.push(line === "null" ? null : line);
    } while (true);
    line = lines[index2++];
    if (line !== "rule names:") {
      throw new Error("Unexpected data entry");
    }
    do {
      line = lines[index2++];
      if (line.length === 0) {
        break;
      }
      ruleNames.push(line);
    } while (true);
    line = lines[index2++];
    if (line === "channel names:") {
      do {
        line = lines[index2++];
        if (line.length === 0) {
          break;
        }
        channels.push(line);
      } while (true);
      line = lines[index2++];
      if (line !== "mode names:") {
        throw new Error("Unexpected data entry");
      }
      do {
        line = lines[index2++];
        if (line.length === 0) {
          break;
        }
        modes.push(line);
      } while (true);
    }
    line = lines[index2++];
    if (line !== "atn:") {
      throw new Error("Unexpected data entry");
    }
    line = lines[index2++];
    const elements = line.split(",");
    let value;
    const serializedATN = [];
    for (let i = 0; i < elements.length; ++i) {
      const element = elements[i];
      if (element.startsWith("[")) {
        value = Number(element.substring(1).trim());
      } else if (element.endsWith("]")) {
        value = Number(element.substring(0, element.length - 1).trim());
      } else {
        value = Number(element.trim());
      }
      serializedATN[i] = value;
    }
    const deserializer = new ATNDeserializer();
    return {
      atn: deserializer.deserialize(serializedATN),
      vocabulary: new Vocabulary(literalNames, symbolicNames, []),
      ruleNames,
      channels: channels.length > 0 ? channels : void 0,
      modes: modes.length > 0 ? modes : void 0
    };
  }
};
var AbstractParseTreeVisitor = class {
  static {
    __name(this, "AbstractParseTreeVisitor");
  }
  visit(tree) {
    return tree.accept(this);
  }
  visitChildren(node) {
    let result = this.defaultResult();
    const n2 = node.getChildCount();
    for (let i = 0; i < n2; i++) {
      if (!this.shouldVisitNextChild(node, result)) {
        break;
      }
      const c = node.getChild(i);
      if (c) {
        const childResult = c.accept(this);
        result = this.aggregateResult(result, childResult);
      }
    }
    return result;
  }
  visitTerminal(_node) {
    return this.defaultResult();
  }
  visitErrorNode(_node) {
    return this.defaultResult();
  }
  defaultResult() {
    return null;
  }
  shouldVisitNextChild(_node, _currentResult) {
    return true;
  }
  aggregateResult(aggregate, nextResult) {
    return nextResult;
  }
};
var ParseTreeWalker = class _ParseTreeWalker {
  static {
    __name(this, "ParseTreeWalker");
  }
  static DEFAULT = new _ParseTreeWalker();
  /**
   * Performs a walk on the given parse tree starting at the root and going down recursively
   * with depth-first search. On each node, {@link ParseTreeWalker.enterRule} is called before
   * recursively walking down into child nodes, then
   * {@link ParseTreeWalker.exitRule} is called after the recursive call to wind up.
   *
   * @param listener The listener used by the walker to process grammar rules
   * @param t The parse tree to be walked on
   */
  walk(listener, t) {
    const errorNode = t instanceof ErrorNode;
    if (errorNode) {
      listener.visitErrorNode(t);
    } else if (t instanceof TerminalNode) {
      listener.visitTerminal(t);
    } else {
      const r = t;
      this.enterRule(listener, r);
      for (let i = 0; i < t.getChildCount(); i++) {
        this.walk(listener, t.getChild(i));
      }
      this.exitRule(listener, r);
    }
  }
  /**
   * Enters a grammar rule by first triggering the generic event {@link ParseTreeListener.enterEveryRule}
   * then by triggering the event specific to the given parse tree node
   *
   * @param listener The listener responding to the trigger events
   * @param r The grammar rule containing the rule context
   */
  enterRule(listener, r) {
    const ctx2 = r.ruleContext;
    listener.enterEveryRule(ctx2);
    ctx2.enterRule(listener);
  }
  /**
   * Exits a grammar rule by first triggering the event specific to the given parse tree node
   * then by triggering the generic event {@link ParseTreeListener.exitEveryRule}
   *
   * @param listener The listener responding to the trigger events
   * @param r The grammar rule containing the rule context
   */
  exitRule(listener, r) {
    const ctx2 = r.ruleContext;
    ctx2.exitRule(listener);
    listener.exitEveryRule(ctx2);
  }
};
var CharStream;
((CharStream2) => {
  CharStream2.fromString = /* @__PURE__ */ __name((str) => {
    return new CharStreamImpl(str);
  }, "fromString");
})(CharStream || (CharStream = {}));
var CharStreamImpl = class {
  static {
    __name(this, "CharStreamImpl");
  }
  name = "";
  index = 0;
  data;
  constructor(input) {
    const codePoints = [];
    for (const char of input) {
      codePoints.push(char.codePointAt(0));
    }
    this.data = new Uint32Array(codePoints);
  }
  /**
   * Reset the stream so that it's in the same state it was
   * when the object was created *except* the data array is not
   * touched.
   */
  reset() {
    this.index = 0;
  }
  consume() {
    if (this.index >= this.data.length) {
      throw new Error("cannot consume EOF");
    }
    this.index += 1;
  }
  LA(offset) {
    if (offset === 0) {
      return 0;
    }
    if (offset < 0) {
      offset += 1;
    }
    const pos = this.index + offset - 1;
    if (pos < 0 || pos >= this.data.length) {
      return Token.EOF;
    }
    return this.data[pos];
  }
  // mark/release do nothing; we have entire buffer
  mark() {
    return -1;
  }
  release(_marker) {
  }
  /**
   * consume() ahead until p==_index; can't just set p=_index as we must
   * update line and column. If we seek backwards, just set p
   */
  seek(index2) {
    if (index2 <= this.index) {
      this.index = index2;
      return;
    }
    this.index = Math.min(index2, this.data.length);
  }
  getTextFromRange(start, stop) {
    stop = stop ?? this.data.length - 1;
    if (stop >= this.data.length) {
      stop = this.data.length - 1;
    }
    if (start >= this.data.length) {
      return "";
    }
    return this.stringFromRange(start, stop + 1);
  }
  getTextFromInterval(interval) {
    const start = interval.start;
    let stop = interval.stop;
    if (stop >= this.data.length) {
      stop = this.data.length - 1;
    }
    if (start >= this.data.length) {
      return "";
    }
    return this.stringFromRange(start, stop + 1);
  }
  toString() {
    return this.stringFromRange(0);
  }
  get size() {
    return this.data.length;
  }
  getSourceName() {
    if (this.name) {
      return this.name;
    }
    return IntStream.UNKNOWN_SOURCE_NAME;
  }
  stringFromRange(start, stop) {
    const data = this.data.slice(start, stop);
    let result = "";
    data.forEach((value) => {
      result += String.fromCodePoint(value);
    });
    return result;
  }
};
var isWritableToken = /* @__PURE__ */ __name((candidate) => {
  return candidate.setText !== void 0;
}, "isWritableToken");
var BufferedTokenStream = class {
  static {
    __name(this, "BufferedTokenStream");
  }
  /**
   * The {@link TokenSource} from which tokens for this stream are fetched.
   */
  tokenSource;
  /**
   * A collection of all tokens fetched from the token source. The list is
   * considered a complete view of the input once {@link fetchedEOF} is set
   * to `true`.
   */
  tokens = [];
  /**
   * The index into {@link tokens} of the current token (next token to
   * {@link consume}). {@link tokens}`[p]` should be
   * {@link LT LT(1)}.
   *
   * This field is set to -1 when the stream is first constructed or when
   * {@link setTokenSource} is called, indicating that the first token has
   * not yet been fetched from the token source. For additional information,
   * see the documentation of {@link IntStream} for a description of
   * Initializing Methods.
   */
  p = -1;
  /**
   * Indicates whether the {@link Token.EOF} token has been fetched from
   * {@link tokenSource} and added to {@link tokens}. This field improves
   * performance for the following cases:
   *
   * - {@link consume}: The lookahead check in {@link consume} to prevent
   * consuming the EOF symbol is optimized by checking the values of
   * {@link fetchedEOF} and {@link p} instead of calling {@link LA}.
   * - {@link fetch}: The check to prevent adding multiple EOF symbols into
   * {@link tokens} is trivial with this field.
   */
  fetchedEOF = false;
  constructor(tokenSource) {
    this.tokenSource = tokenSource;
  }
  mark() {
    return 0;
  }
  release(_marker) {
  }
  reset() {
    this.seek(0);
  }
  seek(index2) {
    this.lazyInit();
    this.p = this.adjustSeekIndex(index2);
  }
  get size() {
    return this.tokens.length;
  }
  get index() {
    return this.p;
  }
  get(index2) {
    this.lazyInit();
    return this.tokens[index2];
  }
  consume() {
    let skipEofCheck = false;
    if (this.p >= 0) {
      if (this.fetchedEOF) {
        skipEofCheck = this.p < this.tokens.length - 1;
      } else {
        skipEofCheck = this.p < this.tokens.length;
      }
    } else {
      skipEofCheck = false;
    }
    if (!skipEofCheck && this.LA(1) === Token.EOF) {
      throw new Error("cannot consume EOF");
    }
    if (this.sync(this.p + 1)) {
      this.p = this.adjustSeekIndex(this.p + 1);
    }
  }
  /**
   * Make sure index `i` in tokens has a token.
   *
   * @returns {boolean} `true` if a token is located at index `i`, otherwise `false`.
   */
  sync(i) {
    const n2 = i - this.tokens.length + 1;
    if (n2 > 0) {
      const fetched = this.fetch(n2);
      return fetched >= n2;
    }
    return true;
  }
  /**
   * Add `n` elements to buffer.
   *
   * @returns {number} The actual number of elements added to the buffer.
   */
  fetch(n2) {
    if (this.fetchedEOF) {
      return 0;
    }
    for (let i = 0; i < n2; i++) {
      const t = this.tokenSource.nextToken();
      if (isWritableToken(t)) {
        t.tokenIndex = this.tokens.length;
      }
      this.tokens.push(t);
      if (t.type === Token.EOF) {
        this.fetchedEOF = true;
        return i + 1;
      }
    }
    return n2;
  }
  /** Get all tokens from start..stop, inclusively. */
  getTokens(start, stop, types) {
    this.lazyInit();
    if (start === void 0 && stop === void 0) {
      return this.tokens;
    }
    start ??= 0;
    if (stop === void 0) {
      stop = this.tokens.length - 1;
    }
    if (start < 0 || stop >= this.tokens.length || stop < 0 || start >= this.tokens.length) {
      throw new RangeError("start " + start + " or stop " + stop + " not in 0.." + (this.tokens.length - 1));
    }
    if (start > stop) {
      return [];
    }
    if (types === void 0) {
      return this.tokens.slice(start, stop + 1);
    }
    const subset = [];
    if (stop >= this.tokens.length) {
      stop = this.tokens.length - 1;
    }
    for (let i = start; i < stop; i++) {
      const t = this.tokens[i];
      if (t.type === Token.EOF) {
        subset.push(t);
        break;
      }
      if (types.has(t.type)) {
        subset.push(t);
      }
    }
    return subset;
  }
  LA(k) {
    return this.LT(k)?.type ?? Token.INVALID_TYPE;
  }
  LB(k) {
    if (this.p - k < 0) {
      return null;
    }
    return this.tokens[this.p - k];
  }
  LT(k) {
    this.lazyInit();
    if (k === 0) {
      return null;
    }
    if (k < 0) {
      return this.LB(-k);
    }
    const i = this.p + k - 1;
    this.sync(i);
    if (i >= this.tokens.length) {
      return this.tokens[this.tokens.length - 1];
    }
    return this.tokens[i];
  }
  /**
   * Allowed derived classes to modify the behavior of operations which change
   * the current stream position by adjusting the target token index of a seek
   * operation. The default implementation simply returns `i`. If an
   * exception is thrown in this method, the current stream index should not be
   * changed.
   *
   * For example, {@link CommonTokenStream} overrides this method to ensure that
   * the seek target is always an on-channel token.
   *
   * @param  i The target token index.
   *
   * @returns The adjusted target token index.
   */
  adjustSeekIndex(i) {
    return i;
  }
  lazyInit() {
    if (this.p === -1) {
      this.setup();
    }
  }
  setup() {
    this.sync(0);
    this.p = this.adjustSeekIndex(0);
  }
  /** Reset this token stream by setting its token source. */
  setTokenSource(tokenSource) {
    this.tokenSource = tokenSource;
    this.tokens = [];
    this.p = -1;
    this.fetchedEOF = false;
  }
  /**
   * Given a starting index, return the index of the next token on channel.
   * Return i if tokens[i] is on channel. Return -1 if there are no tokens
   * on channel between i and EOF.
   */
  nextTokenOnChannel(i, channel) {
    this.sync(i);
    if (i >= this.tokens.length) {
      return -1;
    }
    let token = this.tokens[i];
    while (token.channel !== channel) {
      if (token.type === Token.EOF) {
        return -1;
      }
      i += 1;
      this.sync(i);
      token = this.tokens[i];
    }
    return i;
  }
  /**
   * Given a starting index, return the index of the previous token on
   * channel. Return `i` if `tokens[i]` is on channel. Return -1
   * if there are no tokens on channel between `i` and 0.
   *
   * If `i` specifies an index at or after the EOF token, the EOF token
   * index is returned. This is due to the fact that the EOF token is treated
   * as though it were on every channel.
   */
  previousTokenOnChannel(i, channel) {
    if (i >= this.tokens.length) {
      return this.tokens.length - 1;
    }
    while (i >= 0) {
      const token = this.tokens[i];
      if (token.type === Token.EOF || token.channel === channel) {
        return i;
      }
      --i;
    }
    return i;
  }
  /**
   * Collect all tokens on specified channel to the right of
   * the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or
   * EOF. If channel is -1, find any non default channel token.
   */
  getHiddenTokensToRight(tokenIndex, channel) {
    if (channel === void 0) {
      channel = -1;
    }
    this.lazyInit();
    if (tokenIndex < 0 || tokenIndex >= this.tokens.length) {
      throw new Error(`${tokenIndex} not in 0..${this.tokens.length - 1}`);
    }
    const nextOnChannel = this.nextTokenOnChannel(tokenIndex + 1, Lexer.DEFAULT_TOKEN_CHANNEL);
    const from = tokenIndex + 1;
    const to = nextOnChannel === -1 ? this.tokens.length - 1 : nextOnChannel;
    return this.filterForChannel(from, to, channel);
  }
  /**
   * Collect all tokens on specified channel to the left of
   * the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.
   * If channel is -1, find any non default channel token.
   */
  getHiddenTokensToLeft(tokenIndex, channel) {
    if (channel === void 0) {
      channel = -1;
    }
    this.lazyInit();
    if (tokenIndex < 0 || tokenIndex >= this.tokens.length) {
      throw new Error(`${tokenIndex} not in 0..${this.tokens.length - 1}`);
    }
    const prevOnChannel = this.previousTokenOnChannel(tokenIndex - 1, Lexer.DEFAULT_TOKEN_CHANNEL);
    if (prevOnChannel === tokenIndex - 1) {
      return void 0;
    }
    const from = prevOnChannel + 1;
    const to = tokenIndex - 1;
    return this.filterForChannel(from, to, channel);
  }
  filterForChannel(left, right, channel) {
    const hidden = [];
    for (let i = left; i < right + 1; i++) {
      const t = this.tokens[i];
      if (channel === -1) {
        if (t.channel !== Lexer.DEFAULT_TOKEN_CHANNEL) {
          hidden.push(t);
        }
      } else if (t.channel === channel) {
        hidden.push(t);
      }
    }
    if (hidden.length === 0) {
      return void 0;
    }
    return hidden;
  }
  getSourceName() {
    return this.tokenSource.sourceName;
  }
  /** Get the text of all tokens in this buffer. */
  getText() {
    return this.getTextFromInterval(Interval.of(0, this.size - 1));
  }
  getTextFromInterval(interval) {
    const start = interval.start;
    let stop = interval.stop;
    if (start < 0 || stop < 0) {
      return "";
    }
    this.sync(stop);
    if (stop >= this.tokens.length) {
      stop = this.tokens.length - 1;
    }
    let result = "";
    for (let i = start; i <= stop; ++i) {
      const t = this.tokens[i];
      if (t.type === Token.EOF) {
        break;
      }
      result += t.text;
    }
    return result;
  }
  getTextFromContext(ctx2) {
    return this.getTextFromInterval(ctx2.getSourceInterval());
  }
  getTextFromRange(start, stop) {
    if (start !== null && stop !== null) {
      return this.getTextFromInterval(Interval.of(start.tokenIndex, stop.tokenIndex));
    }
    return "";
  }
  /** Get all tokens from lexer until EOF. */
  fill() {
    this.lazyInit();
    while (this.fetch(1e3) === 1e3) {
      ;
    }
  }
  setLine(line) {
    this.tokenSource.line = line;
  }
  setColumn(column) {
    this.tokenSource.column = column;
  }
};
var CommonTokenStream = class extends BufferedTokenStream {
  static {
    __name(this, "CommonTokenStream");
  }
  /**
   * Specifies the channel to use for filtering tokens.
   *
   *
   * The default value is {@link Token.DEFAULT_CHANNEL}, which matches the
   * default channel assigned to tokens created by the lexer.
   */
  channel = Token.DEFAULT_CHANNEL;
  constructor(lexer, channel) {
    super(lexer);
    this.channel = channel ?? Token.DEFAULT_CHANNEL;
  }
  adjustSeekIndex(i) {
    return this.nextTokenOnChannel(i, this.channel);
  }
  LB(k) {
    if (k === 0 || this.index - k < 0) {
      return null;
    }
    let i = this.index;
    let n2 = 1;
    while (n2 <= k) {
      i = this.previousTokenOnChannel(i - 1, this.channel);
      n2 += 1;
    }
    if (i < 0) {
      return null;
    }
    return this.tokens[i];
  }
  LT(k) {
    this.lazyInit();
    if (k === 0) {
      return null;
    }
    if (k < 0) {
      return this.LB(-k);
    }
    let i = this.index;
    let n2 = 1;
    while (n2 < k) {
      if (this.sync(i + 1)) {
        i = this.nextTokenOnChannel(i + 1, this.channel);
      }
      n2 += 1;
    }
    return this.tokens[i];
  }
  // Count EOF just once.
  getNumberOfOnChannelTokens() {
    let n2 = 0;
    this.fill();
    for (const t of this.tokens) {
      if (t.channel === this.channel) {
        n2 += 1;
      }
      if (t.type === Token.EOF) {
        break;
      }
    }
    return n2;
  }
};
var XPathLexer = class _XPathLexer extends Lexer {
  static {
    __name(this, "XPathLexer");
  }
  static TOKEN_REF = 1;
  static RULE_REF = 2;
  static ANYWHERE = 3;
  static ROOT = 4;
  static WILDCARD = 5;
  static BANG = 6;
  static ID = 7;
  static STRING = 8;
  static channelNames = [
    "DEFAULT_TOKEN_CHANNEL",
    "HIDDEN"
  ];
  static literalNames = [
    null,
    null,
    null,
    "'//'",
    "'/'",
    "'*'",
    "'!'"
  ];
  static symbolicNames = [
    null,
    "TOKEN_REF",
    "RULE_REF",
    "ANYWHERE",
    "ROOT",
    "WILDCARD",
    "BANG",
    "ID",
    "STRING"
  ];
  static modeNames = [
    "DEFAULT_MODE"
  ];
  static ruleNames = [
    "ANYWHERE",
    "ROOT",
    "WILDCARD",
    "BANG",
    "ID",
    "NameChar",
    "NameStartChar",
    "STRING"
  ];
  constructor(input) {
    super(input);
    this.interpreter = new LexerATNSimulator(this, _XPathLexer._ATN, _XPathLexer.decisionsToDFA, new PredictionContextCache());
  }
  get grammarFileName() {
    return "XPathLexer.g4";
  }
  get literalNames() {
    return _XPathLexer.literalNames;
  }
  get symbolicNames() {
    return _XPathLexer.symbolicNames;
  }
  get ruleNames() {
    return _XPathLexer.ruleNames;
  }
  get serializedATN() {
    return _XPathLexer._serializedATN;
  }
  get channelNames() {
    return _XPathLexer.channelNames;
  }
  get modeNames() {
    return _XPathLexer.modeNames;
  }
  action(localContext, ruleIndex, actionIndex) {
    switch (ruleIndex) {
      case 4:
        this.ID_action(localContext, actionIndex);
        break;
    }
  }
  ID_action(localContext, actionIndex) {
    switch (actionIndex) {
      case 0:
        const text = this.text;
        if (text.charAt(0) === text.charAt(0).toUpperCase()) {
          this.type = _XPathLexer.TOKEN_REF;
        } else {
          this.type = _XPathLexer.RULE_REF;
        }
        break;
    }
  }
  static _serializedATN = [
    4,
    0,
    8,
    48,
    6,
    -1,
    2,
    0,
    7,
    0,
    2,
    1,
    7,
    1,
    2,
    2,
    7,
    2,
    2,
    3,
    7,
    3,
    2,
    4,
    7,
    4,
    2,
    5,
    7,
    5,
    2,
    6,
    7,
    6,
    2,
    7,
    7,
    7,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    2,
    1,
    2,
    1,
    3,
    1,
    3,
    1,
    4,
    1,
    4,
    5,
    4,
    29,
    8,
    4,
    10,
    4,
    12,
    4,
    32,
    9,
    4,
    1,
    4,
    1,
    4,
    1,
    5,
    1,
    5,
    1,
    6,
    1,
    6,
    1,
    7,
    1,
    7,
    5,
    7,
    42,
    8,
    7,
    10,
    7,
    12,
    7,
    45,
    9,
    7,
    1,
    7,
    1,
    7,
    1,
    43,
    0,
    8,
    1,
    3,
    3,
    4,
    5,
    5,
    7,
    6,
    9,
    7,
    11,
    0,
    13,
    0,
    15,
    8,
    1,
    0,
    2,
    784,
    0,
    0,
    8,
    14,
    27,
    48,
    57,
    65,
    90,
    95,
    95,
    97,
    122,
    127,
    159,
    170,
    170,
    173,
    173,
    181,
    181,
    186,
    186,
    192,
    214,
    216,
    246,
    248,
    705,
    710,
    721,
    736,
    740,
    748,
    748,
    750,
    750,
    768,
    884,
    886,
    887,
    890,
    893,
    895,
    895,
    902,
    902,
    904,
    906,
    908,
    908,
    910,
    929,
    931,
    1013,
    1015,
    1153,
    1155,
    1159,
    1162,
    1327,
    1329,
    1366,
    1369,
    1369,
    1376,
    1416,
    1425,
    1469,
    1471,
    1471,
    1473,
    1474,
    1476,
    1477,
    1479,
    1479,
    1488,
    1514,
    1519,
    1522,
    1536,
    1541,
    1552,
    1562,
    1564,
    1564,
    1568,
    1641,
    1646,
    1747,
    1749,
    1757,
    1759,
    1768,
    1770,
    1788,
    1791,
    1791,
    1807,
    1866,
    1869,
    1969,
    1984,
    2037,
    2042,
    2042,
    2045,
    2045,
    2048,
    2093,
    2112,
    2139,
    2144,
    2154,
    2160,
    2183,
    2185,
    2190,
    2192,
    2193,
    2200,
    2403,
    2406,
    2415,
    2417,
    2435,
    2437,
    2444,
    2447,
    2448,
    2451,
    2472,
    2474,
    2480,
    2482,
    2482,
    2486,
    2489,
    2492,
    2500,
    2503,
    2504,
    2507,
    2510,
    2519,
    2519,
    2524,
    2525,
    2527,
    2531,
    2534,
    2545,
    2556,
    2556,
    2558,
    2558,
    2561,
    2563,
    2565,
    2570,
    2575,
    2576,
    2579,
    2600,
    2602,
    2608,
    2610,
    2611,
    2613,
    2614,
    2616,
    2617,
    2620,
    2620,
    2622,
    2626,
    2631,
    2632,
    2635,
    2637,
    2641,
    2641,
    2649,
    2652,
    2654,
    2654,
    2662,
    2677,
    2689,
    2691,
    2693,
    2701,
    2703,
    2705,
    2707,
    2728,
    2730,
    2736,
    2738,
    2739,
    2741,
    2745,
    2748,
    2757,
    2759,
    2761,
    2763,
    2765,
    2768,
    2768,
    2784,
    2787,
    2790,
    2799,
    2809,
    2815,
    2817,
    2819,
    2821,
    2828,
    2831,
    2832,
    2835,
    2856,
    2858,
    2864,
    2866,
    2867,
    2869,
    2873,
    2876,
    2884,
    2887,
    2888,
    2891,
    2893,
    2901,
    2903,
    2908,
    2909,
    2911,
    2915,
    2918,
    2927,
    2929,
    2929,
    2946,
    2947,
    2949,
    2954,
    2958,
    2960,
    2962,
    2965,
    2969,
    2970,
    2972,
    2972,
    2974,
    2975,
    2979,
    2980,
    2984,
    2986,
    2990,
    3001,
    3006,
    3010,
    3014,
    3016,
    3018,
    3021,
    3024,
    3024,
    3031,
    3031,
    3046,
    3055,
    3072,
    3084,
    3086,
    3088,
    3090,
    3112,
    3114,
    3129,
    3132,
    3140,
    3142,
    3144,
    3146,
    3149,
    3157,
    3158,
    3160,
    3162,
    3165,
    3165,
    3168,
    3171,
    3174,
    3183,
    3200,
    3203,
    3205,
    3212,
    3214,
    3216,
    3218,
    3240,
    3242,
    3251,
    3253,
    3257,
    3260,
    3268,
    3270,
    3272,
    3274,
    3277,
    3285,
    3286,
    3293,
    3294,
    3296,
    3299,
    3302,
    3311,
    3313,
    3315,
    3328,
    3340,
    3342,
    3344,
    3346,
    3396,
    3398,
    3400,
    3402,
    3406,
    3412,
    3415,
    3423,
    3427,
    3430,
    3439,
    3450,
    3455,
    3457,
    3459,
    3461,
    3478,
    3482,
    3505,
    3507,
    3515,
    3517,
    3517,
    3520,
    3526,
    3530,
    3530,
    3535,
    3540,
    3542,
    3542,
    3544,
    3551,
    3558,
    3567,
    3570,
    3571,
    3585,
    3642,
    3648,
    3662,
    3664,
    3673,
    3713,
    3714,
    3716,
    3716,
    3718,
    3722,
    3724,
    3747,
    3749,
    3749,
    3751,
    3773,
    3776,
    3780,
    3782,
    3782,
    3784,
    3790,
    3792,
    3801,
    3804,
    3807,
    3840,
    3840,
    3864,
    3865,
    3872,
    3881,
    3893,
    3893,
    3895,
    3895,
    3897,
    3897,
    3902,
    3911,
    3913,
    3948,
    3953,
    3972,
    3974,
    3991,
    3993,
    4028,
    4038,
    4038,
    4096,
    4169,
    4176,
    4253,
    4256,
    4293,
    4295,
    4295,
    4301,
    4301,
    4304,
    4346,
    4348,
    4680,
    4682,
    4685,
    4688,
    4694,
    4696,
    4696,
    4698,
    4701,
    4704,
    4744,
    4746,
    4749,
    4752,
    4784,
    4786,
    4789,
    4792,
    4798,
    4800,
    4800,
    4802,
    4805,
    4808,
    4822,
    4824,
    4880,
    4882,
    4885,
    4888,
    4954,
    4957,
    4959,
    4992,
    5007,
    5024,
    5109,
    5112,
    5117,
    5121,
    5740,
    5743,
    5759,
    5761,
    5786,
    5792,
    5866,
    5870,
    5880,
    5888,
    5909,
    5919,
    5940,
    5952,
    5971,
    5984,
    5996,
    5998,
    6e3,
    6002,
    6003,
    6016,
    6099,
    6103,
    6103,
    6108,
    6109,
    6112,
    6121,
    6155,
    6169,
    6176,
    6264,
    6272,
    6314,
    6320,
    6389,
    6400,
    6430,
    6432,
    6443,
    6448,
    6459,
    6470,
    6509,
    6512,
    6516,
    6528,
    6571,
    6576,
    6601,
    6608,
    6617,
    6656,
    6683,
    6688,
    6750,
    6752,
    6780,
    6783,
    6793,
    6800,
    6809,
    6823,
    6823,
    6832,
    6845,
    6847,
    6862,
    6912,
    6988,
    6992,
    7001,
    7019,
    7027,
    7040,
    7155,
    7168,
    7223,
    7232,
    7241,
    7245,
    7293,
    7296,
    7304,
    7312,
    7354,
    7357,
    7359,
    7376,
    7378,
    7380,
    7418,
    7424,
    7957,
    7960,
    7965,
    7968,
    8005,
    8008,
    8013,
    8016,
    8023,
    8025,
    8025,
    8027,
    8027,
    8029,
    8029,
    8031,
    8061,
    8064,
    8116,
    8118,
    8124,
    8126,
    8126,
    8130,
    8132,
    8134,
    8140,
    8144,
    8147,
    8150,
    8155,
    8160,
    8172,
    8178,
    8180,
    8182,
    8188,
    8203,
    8207,
    8234,
    8238,
    8255,
    8256,
    8276,
    8276,
    8288,
    8292,
    8294,
    8303,
    8305,
    8305,
    8319,
    8319,
    8336,
    8348,
    8400,
    8412,
    8417,
    8417,
    8421,
    8432,
    8450,
    8450,
    8455,
    8455,
    8458,
    8467,
    8469,
    8469,
    8473,
    8477,
    8484,
    8484,
    8486,
    8486,
    8488,
    8488,
    8490,
    8493,
    8495,
    8505,
    8508,
    8511,
    8517,
    8521,
    8526,
    8526,
    8544,
    8584,
    11264,
    11492,
    11499,
    11507,
    11520,
    11557,
    11559,
    11559,
    11565,
    11565,
    11568,
    11623,
    11631,
    11631,
    11647,
    11670,
    11680,
    11686,
    11688,
    11694,
    11696,
    11702,
    11704,
    11710,
    11712,
    11718,
    11720,
    11726,
    11728,
    11734,
    11736,
    11742,
    11744,
    11775,
    11823,
    11823,
    12293,
    12295,
    12321,
    12335,
    12337,
    12341,
    12344,
    12348,
    12353,
    12438,
    12441,
    12442,
    12445,
    12447,
    12449,
    12538,
    12540,
    12543,
    12549,
    12591,
    12593,
    12686,
    12704,
    12735,
    12784,
    12799,
    13312,
    19903,
    19968,
    42124,
    42192,
    42237,
    42240,
    42508,
    42512,
    42539,
    42560,
    42607,
    42612,
    42621,
    42623,
    42737,
    42775,
    42783,
    42786,
    42888,
    42891,
    42954,
    42960,
    42961,
    42963,
    42963,
    42965,
    42969,
    42994,
    43047,
    43052,
    43052,
    43072,
    43123,
    43136,
    43205,
    43216,
    43225,
    43232,
    43255,
    43259,
    43259,
    43261,
    43309,
    43312,
    43347,
    43360,
    43388,
    43392,
    43456,
    43471,
    43481,
    43488,
    43518,
    43520,
    43574,
    43584,
    43597,
    43600,
    43609,
    43616,
    43638,
    43642,
    43714,
    43739,
    43741,
    43744,
    43759,
    43762,
    43766,
    43777,
    43782,
    43785,
    43790,
    43793,
    43798,
    43808,
    43814,
    43816,
    43822,
    43824,
    43866,
    43868,
    43881,
    43888,
    44010,
    44012,
    44013,
    44016,
    44025,
    44032,
    55203,
    55216,
    55238,
    55243,
    55291,
    63744,
    64109,
    64112,
    64217,
    64256,
    64262,
    64275,
    64279,
    64285,
    64296,
    64298,
    64310,
    64312,
    64316,
    64318,
    64318,
    64320,
    64321,
    64323,
    64324,
    64326,
    64433,
    64467,
    64829,
    64848,
    64911,
    64914,
    64967,
    65008,
    65019,
    65024,
    65039,
    65056,
    65071,
    65075,
    65076,
    65101,
    65103,
    65136,
    65140,
    65142,
    65276,
    65279,
    65279,
    65296,
    65305,
    65313,
    65338,
    65343,
    65343,
    65345,
    65370,
    65382,
    65470,
    65474,
    65479,
    65482,
    65487,
    65490,
    65495,
    65498,
    65500,
    65529,
    65531,
    65536,
    65547,
    65549,
    65574,
    65576,
    65594,
    65596,
    65597,
    65599,
    65613,
    65616,
    65629,
    65664,
    65786,
    65856,
    65908,
    66045,
    66045,
    66176,
    66204,
    66208,
    66256,
    66272,
    66272,
    66304,
    66335,
    66349,
    66378,
    66384,
    66426,
    66432,
    66461,
    66464,
    66499,
    66504,
    66511,
    66513,
    66517,
    66560,
    66717,
    66720,
    66729,
    66736,
    66771,
    66776,
    66811,
    66816,
    66855,
    66864,
    66915,
    66928,
    66938,
    66940,
    66954,
    66956,
    66962,
    66964,
    66965,
    66967,
    66977,
    66979,
    66993,
    66995,
    67001,
    67003,
    67004,
    67072,
    67382,
    67392,
    67413,
    67424,
    67431,
    67456,
    67461,
    67463,
    67504,
    67506,
    67514,
    67584,
    67589,
    67592,
    67592,
    67594,
    67637,
    67639,
    67640,
    67644,
    67644,
    67647,
    67669,
    67680,
    67702,
    67712,
    67742,
    67808,
    67826,
    67828,
    67829,
    67840,
    67861,
    67872,
    67897,
    67968,
    68023,
    68030,
    68031,
    68096,
    68099,
    68101,
    68102,
    68108,
    68115,
    68117,
    68119,
    68121,
    68149,
    68152,
    68154,
    68159,
    68159,
    68192,
    68220,
    68224,
    68252,
    68288,
    68295,
    68297,
    68326,
    68352,
    68405,
    68416,
    68437,
    68448,
    68466,
    68480,
    68497,
    68608,
    68680,
    68736,
    68786,
    68800,
    68850,
    68864,
    68903,
    68912,
    68921,
    69248,
    69289,
    69291,
    69292,
    69296,
    69297,
    69373,
    69404,
    69415,
    69415,
    69424,
    69456,
    69488,
    69509,
    69552,
    69572,
    69600,
    69622,
    69632,
    69702,
    69734,
    69749,
    69759,
    69818,
    69821,
    69821,
    69826,
    69826,
    69837,
    69837,
    69840,
    69864,
    69872,
    69881,
    69888,
    69940,
    69942,
    69951,
    69956,
    69959,
    69968,
    70003,
    70006,
    70006,
    70016,
    70084,
    70089,
    70092,
    70094,
    70106,
    70108,
    70108,
    70144,
    70161,
    70163,
    70199,
    70206,
    70209,
    70272,
    70278,
    70280,
    70280,
    70282,
    70285,
    70287,
    70301,
    70303,
    70312,
    70320,
    70378,
    70384,
    70393,
    70400,
    70403,
    70405,
    70412,
    70415,
    70416,
    70419,
    70440,
    70442,
    70448,
    70450,
    70451,
    70453,
    70457,
    70459,
    70468,
    70471,
    70472,
    70475,
    70477,
    70480,
    70480,
    70487,
    70487,
    70493,
    70499,
    70502,
    70508,
    70512,
    70516,
    70656,
    70730,
    70736,
    70745,
    70750,
    70753,
    70784,
    70853,
    70855,
    70855,
    70864,
    70873,
    71040,
    71093,
    71096,
    71104,
    71128,
    71133,
    71168,
    71232,
    71236,
    71236,
    71248,
    71257,
    71296,
    71352,
    71360,
    71369,
    71424,
    71450,
    71453,
    71467,
    71472,
    71481,
    71488,
    71494,
    71680,
    71738,
    71840,
    71913,
    71935,
    71942,
    71945,
    71945,
    71948,
    71955,
    71957,
    71958,
    71960,
    71989,
    71991,
    71992,
    71995,
    72003,
    72016,
    72025,
    72096,
    72103,
    72106,
    72151,
    72154,
    72161,
    72163,
    72164,
    72192,
    72254,
    72263,
    72263,
    72272,
    72345,
    72349,
    72349,
    72368,
    72440,
    72704,
    72712,
    72714,
    72758,
    72760,
    72768,
    72784,
    72793,
    72818,
    72847,
    72850,
    72871,
    72873,
    72886,
    72960,
    72966,
    72968,
    72969,
    72971,
    73014,
    73018,
    73018,
    73020,
    73021,
    73023,
    73031,
    73040,
    73049,
    73056,
    73061,
    73063,
    73064,
    73066,
    73102,
    73104,
    73105,
    73107,
    73112,
    73120,
    73129,
    73440,
    73462,
    73472,
    73488,
    73490,
    73530,
    73534,
    73538,
    73552,
    73561,
    73648,
    73648,
    73728,
    74649,
    74752,
    74862,
    74880,
    75075,
    77712,
    77808,
    77824,
    78933,
    82944,
    83526,
    92160,
    92728,
    92736,
    92766,
    92768,
    92777,
    92784,
    92862,
    92864,
    92873,
    92880,
    92909,
    92912,
    92916,
    92928,
    92982,
    92992,
    92995,
    93008,
    93017,
    93027,
    93047,
    93053,
    93071,
    93760,
    93823,
    93952,
    94026,
    94031,
    94087,
    94095,
    94111,
    94176,
    94177,
    94179,
    94180,
    94192,
    94193,
    94208,
    100343,
    100352,
    101589,
    101632,
    101640,
    110576,
    110579,
    110581,
    110587,
    110589,
    110590,
    110592,
    110882,
    110898,
    110898,
    110928,
    110930,
    110933,
    110933,
    110948,
    110951,
    110960,
    111355,
    113664,
    113770,
    113776,
    113788,
    113792,
    113800,
    113808,
    113817,
    113821,
    113822,
    113824,
    113827,
    118528,
    118573,
    118576,
    118598,
    119141,
    119145,
    119149,
    119170,
    119173,
    119179,
    119210,
    119213,
    119362,
    119364,
    119808,
    119892,
    119894,
    119964,
    119966,
    119967,
    119970,
    119970,
    119973,
    119974,
    119977,
    119980,
    119982,
    119993,
    119995,
    119995,
    119997,
    120003,
    120005,
    120069,
    120071,
    120074,
    120077,
    120084,
    120086,
    120092,
    120094,
    120121,
    120123,
    120126,
    120128,
    120132,
    120134,
    120134,
    120138,
    120144,
    120146,
    120485,
    120488,
    120512,
    120514,
    120538,
    120540,
    120570,
    120572,
    120596,
    120598,
    120628,
    120630,
    120654,
    120656,
    120686,
    120688,
    120712,
    120714,
    120744,
    120746,
    120770,
    120772,
    120779,
    120782,
    120831,
    121344,
    121398,
    121403,
    121452,
    121461,
    121461,
    121476,
    121476,
    121499,
    121503,
    121505,
    121519,
    122624,
    122654,
    122661,
    122666,
    122880,
    122886,
    122888,
    122904,
    122907,
    122913,
    122915,
    122916,
    122918,
    122922,
    122928,
    122989,
    123023,
    123023,
    123136,
    123180,
    123184,
    123197,
    123200,
    123209,
    123214,
    123214,
    123536,
    123566,
    123584,
    123641,
    124112,
    124153,
    124896,
    124902,
    124904,
    124907,
    124909,
    124910,
    124912,
    124926,
    124928,
    125124,
    125136,
    125142,
    125184,
    125259,
    125264,
    125273,
    126464,
    126467,
    126469,
    126495,
    126497,
    126498,
    126500,
    126500,
    126503,
    126503,
    126505,
    126514,
    126516,
    126519,
    126521,
    126521,
    126523,
    126523,
    126530,
    126530,
    126535,
    126535,
    126537,
    126537,
    126539,
    126539,
    126541,
    126543,
    126545,
    126546,
    126548,
    126548,
    126551,
    126551,
    126553,
    126553,
    126555,
    126555,
    126557,
    126557,
    126559,
    126559,
    126561,
    126562,
    126564,
    126564,
    126567,
    126570,
    126572,
    126578,
    126580,
    126583,
    126585,
    126588,
    126590,
    126590,
    126592,
    126601,
    126603,
    126619,
    126625,
    126627,
    126629,
    126633,
    126635,
    126651,
    130032,
    130041,
    131072,
    173791,
    173824,
    177977,
    177984,
    178205,
    178208,
    183969,
    183984,
    191456,
    194560,
    195101,
    196608,
    201546,
    201552,
    205743,
    917505,
    917505,
    917536,
    917631,
    917760,
    917999,
    662,
    0,
    65,
    90,
    97,
    122,
    170,
    170,
    181,
    181,
    186,
    186,
    192,
    214,
    216,
    246,
    248,
    705,
    710,
    721,
    736,
    740,
    748,
    748,
    750,
    750,
    880,
    884,
    886,
    887,
    890,
    893,
    895,
    895,
    902,
    902,
    904,
    906,
    908,
    908,
    910,
    929,
    931,
    1013,
    1015,
    1153,
    1162,
    1327,
    1329,
    1366,
    1369,
    1369,
    1376,
    1416,
    1488,
    1514,
    1519,
    1522,
    1568,
    1610,
    1646,
    1647,
    1649,
    1747,
    1749,
    1749,
    1765,
    1766,
    1774,
    1775,
    1786,
    1788,
    1791,
    1791,
    1808,
    1808,
    1810,
    1839,
    1869,
    1957,
    1969,
    1969,
    1994,
    2026,
    2036,
    2037,
    2042,
    2042,
    2048,
    2069,
    2074,
    2074,
    2084,
    2084,
    2088,
    2088,
    2112,
    2136,
    2144,
    2154,
    2160,
    2183,
    2185,
    2190,
    2208,
    2249,
    2308,
    2361,
    2365,
    2365,
    2384,
    2384,
    2392,
    2401,
    2417,
    2432,
    2437,
    2444,
    2447,
    2448,
    2451,
    2472,
    2474,
    2480,
    2482,
    2482,
    2486,
    2489,
    2493,
    2493,
    2510,
    2510,
    2524,
    2525,
    2527,
    2529,
    2544,
    2545,
    2556,
    2556,
    2565,
    2570,
    2575,
    2576,
    2579,
    2600,
    2602,
    2608,
    2610,
    2611,
    2613,
    2614,
    2616,
    2617,
    2649,
    2652,
    2654,
    2654,
    2674,
    2676,
    2693,
    2701,
    2703,
    2705,
    2707,
    2728,
    2730,
    2736,
    2738,
    2739,
    2741,
    2745,
    2749,
    2749,
    2768,
    2768,
    2784,
    2785,
    2809,
    2809,
    2821,
    2828,
    2831,
    2832,
    2835,
    2856,
    2858,
    2864,
    2866,
    2867,
    2869,
    2873,
    2877,
    2877,
    2908,
    2909,
    2911,
    2913,
    2929,
    2929,
    2947,
    2947,
    2949,
    2954,
    2958,
    2960,
    2962,
    2965,
    2969,
    2970,
    2972,
    2972,
    2974,
    2975,
    2979,
    2980,
    2984,
    2986,
    2990,
    3001,
    3024,
    3024,
    3077,
    3084,
    3086,
    3088,
    3090,
    3112,
    3114,
    3129,
    3133,
    3133,
    3160,
    3162,
    3165,
    3165,
    3168,
    3169,
    3200,
    3200,
    3205,
    3212,
    3214,
    3216,
    3218,
    3240,
    3242,
    3251,
    3253,
    3257,
    3261,
    3261,
    3293,
    3294,
    3296,
    3297,
    3313,
    3314,
    3332,
    3340,
    3342,
    3344,
    3346,
    3386,
    3389,
    3389,
    3406,
    3406,
    3412,
    3414,
    3423,
    3425,
    3450,
    3455,
    3461,
    3478,
    3482,
    3505,
    3507,
    3515,
    3517,
    3517,
    3520,
    3526,
    3585,
    3632,
    3634,
    3635,
    3648,
    3654,
    3713,
    3714,
    3716,
    3716,
    3718,
    3722,
    3724,
    3747,
    3749,
    3749,
    3751,
    3760,
    3762,
    3763,
    3773,
    3773,
    3776,
    3780,
    3782,
    3782,
    3804,
    3807,
    3840,
    3840,
    3904,
    3911,
    3913,
    3948,
    3976,
    3980,
    4096,
    4138,
    4159,
    4159,
    4176,
    4181,
    4186,
    4189,
    4193,
    4193,
    4197,
    4198,
    4206,
    4208,
    4213,
    4225,
    4238,
    4238,
    4256,
    4293,
    4295,
    4295,
    4301,
    4301,
    4304,
    4346,
    4348,
    4680,
    4682,
    4685,
    4688,
    4694,
    4696,
    4696,
    4698,
    4701,
    4704,
    4744,
    4746,
    4749,
    4752,
    4784,
    4786,
    4789,
    4792,
    4798,
    4800,
    4800,
    4802,
    4805,
    4808,
    4822,
    4824,
    4880,
    4882,
    4885,
    4888,
    4954,
    4992,
    5007,
    5024,
    5109,
    5112,
    5117,
    5121,
    5740,
    5743,
    5759,
    5761,
    5786,
    5792,
    5866,
    5870,
    5880,
    5888,
    5905,
    5919,
    5937,
    5952,
    5969,
    5984,
    5996,
    5998,
    6e3,
    6016,
    6067,
    6103,
    6103,
    6108,
    6108,
    6176,
    6264,
    6272,
    6276,
    6279,
    6312,
    6314,
    6314,
    6320,
    6389,
    6400,
    6430,
    6480,
    6509,
    6512,
    6516,
    6528,
    6571,
    6576,
    6601,
    6656,
    6678,
    6688,
    6740,
    6823,
    6823,
    6917,
    6963,
    6981,
    6988,
    7043,
    7072,
    7086,
    7087,
    7098,
    7141,
    7168,
    7203,
    7245,
    7247,
    7258,
    7293,
    7296,
    7304,
    7312,
    7354,
    7357,
    7359,
    7401,
    7404,
    7406,
    7411,
    7413,
    7414,
    7418,
    7418,
    7424,
    7615,
    7680,
    7957,
    7960,
    7965,
    7968,
    8005,
    8008,
    8013,
    8016,
    8023,
    8025,
    8025,
    8027,
    8027,
    8029,
    8029,
    8031,
    8061,
    8064,
    8116,
    8118,
    8124,
    8126,
    8126,
    8130,
    8132,
    8134,
    8140,
    8144,
    8147,
    8150,
    8155,
    8160,
    8172,
    8178,
    8180,
    8182,
    8188,
    8305,
    8305,
    8319,
    8319,
    8336,
    8348,
    8450,
    8450,
    8455,
    8455,
    8458,
    8467,
    8469,
    8469,
    8473,
    8477,
    8484,
    8484,
    8486,
    8486,
    8488,
    8488,
    8490,
    8493,
    8495,
    8505,
    8508,
    8511,
    8517,
    8521,
    8526,
    8526,
    8544,
    8584,
    11264,
    11492,
    11499,
    11502,
    11506,
    11507,
    11520,
    11557,
    11559,
    11559,
    11565,
    11565,
    11568,
    11623,
    11631,
    11631,
    11648,
    11670,
    11680,
    11686,
    11688,
    11694,
    11696,
    11702,
    11704,
    11710,
    11712,
    11718,
    11720,
    11726,
    11728,
    11734,
    11736,
    11742,
    11823,
    11823,
    12293,
    12295,
    12321,
    12329,
    12337,
    12341,
    12344,
    12348,
    12353,
    12438,
    12445,
    12447,
    12449,
    12538,
    12540,
    12543,
    12549,
    12591,
    12593,
    12686,
    12704,
    12735,
    12784,
    12799,
    13312,
    19903,
    19968,
    42124,
    42192,
    42237,
    42240,
    42508,
    42512,
    42527,
    42538,
    42539,
    42560,
    42606,
    42623,
    42653,
    42656,
    42735,
    42775,
    42783,
    42786,
    42888,
    42891,
    42954,
    42960,
    42961,
    42963,
    42963,
    42965,
    42969,
    42994,
    43009,
    43011,
    43013,
    43015,
    43018,
    43020,
    43042,
    43072,
    43123,
    43138,
    43187,
    43250,
    43255,
    43259,
    43259,
    43261,
    43262,
    43274,
    43301,
    43312,
    43334,
    43360,
    43388,
    43396,
    43442,
    43471,
    43471,
    43488,
    43492,
    43494,
    43503,
    43514,
    43518,
    43520,
    43560,
    43584,
    43586,
    43588,
    43595,
    43616,
    43638,
    43642,
    43642,
    43646,
    43695,
    43697,
    43697,
    43701,
    43702,
    43705,
    43709,
    43712,
    43712,
    43714,
    43714,
    43739,
    43741,
    43744,
    43754,
    43762,
    43764,
    43777,
    43782,
    43785,
    43790,
    43793,
    43798,
    43808,
    43814,
    43816,
    43822,
    43824,
    43866,
    43868,
    43881,
    43888,
    44002,
    44032,
    55203,
    55216,
    55238,
    55243,
    55291,
    63744,
    64109,
    64112,
    64217,
    64256,
    64262,
    64275,
    64279,
    64285,
    64285,
    64287,
    64296,
    64298,
    64310,
    64312,
    64316,
    64318,
    64318,
    64320,
    64321,
    64323,
    64324,
    64326,
    64433,
    64467,
    64829,
    64848,
    64911,
    64914,
    64967,
    65008,
    65019,
    65136,
    65140,
    65142,
    65276,
    65313,
    65338,
    65345,
    65370,
    65382,
    65470,
    65474,
    65479,
    65482,
    65487,
    65490,
    65495,
    65498,
    65500,
    65536,
    65547,
    65549,
    65574,
    65576,
    65594,
    65596,
    65597,
    65599,
    65613,
    65616,
    65629,
    65664,
    65786,
    65856,
    65908,
    66176,
    66204,
    66208,
    66256,
    66304,
    66335,
    66349,
    66378,
    66384,
    66421,
    66432,
    66461,
    66464,
    66499,
    66504,
    66511,
    66513,
    66517,
    66560,
    66717,
    66736,
    66771,
    66776,
    66811,
    66816,
    66855,
    66864,
    66915,
    66928,
    66938,
    66940,
    66954,
    66956,
    66962,
    66964,
    66965,
    66967,
    66977,
    66979,
    66993,
    66995,
    67001,
    67003,
    67004,
    67072,
    67382,
    67392,
    67413,
    67424,
    67431,
    67456,
    67461,
    67463,
    67504,
    67506,
    67514,
    67584,
    67589,
    67592,
    67592,
    67594,
    67637,
    67639,
    67640,
    67644,
    67644,
    67647,
    67669,
    67680,
    67702,
    67712,
    67742,
    67808,
    67826,
    67828,
    67829,
    67840,
    67861,
    67872,
    67897,
    67968,
    68023,
    68030,
    68031,
    68096,
    68096,
    68112,
    68115,
    68117,
    68119,
    68121,
    68149,
    68192,
    68220,
    68224,
    68252,
    68288,
    68295,
    68297,
    68324,
    68352,
    68405,
    68416,
    68437,
    68448,
    68466,
    68480,
    68497,
    68608,
    68680,
    68736,
    68786,
    68800,
    68850,
    68864,
    68899,
    69248,
    69289,
    69296,
    69297,
    69376,
    69404,
    69415,
    69415,
    69424,
    69445,
    69488,
    69505,
    69552,
    69572,
    69600,
    69622,
    69635,
    69687,
    69745,
    69746,
    69749,
    69749,
    69763,
    69807,
    69840,
    69864,
    69891,
    69926,
    69956,
    69956,
    69959,
    69959,
    69968,
    70002,
    70006,
    70006,
    70019,
    70066,
    70081,
    70084,
    70106,
    70106,
    70108,
    70108,
    70144,
    70161,
    70163,
    70187,
    70207,
    70208,
    70272,
    70278,
    70280,
    70280,
    70282,
    70285,
    70287,
    70301,
    70303,
    70312,
    70320,
    70366,
    70405,
    70412,
    70415,
    70416,
    70419,
    70440,
    70442,
    70448,
    70450,
    70451,
    70453,
    70457,
    70461,
    70461,
    70480,
    70480,
    70493,
    70497,
    70656,
    70708,
    70727,
    70730,
    70751,
    70753,
    70784,
    70831,
    70852,
    70853,
    70855,
    70855,
    71040,
    71086,
    71128,
    71131,
    71168,
    71215,
    71236,
    71236,
    71296,
    71338,
    71352,
    71352,
    71424,
    71450,
    71488,
    71494,
    71680,
    71723,
    71840,
    71903,
    71935,
    71942,
    71945,
    71945,
    71948,
    71955,
    71957,
    71958,
    71960,
    71983,
    71999,
    71999,
    72001,
    72001,
    72096,
    72103,
    72106,
    72144,
    72161,
    72161,
    72163,
    72163,
    72192,
    72192,
    72203,
    72242,
    72250,
    72250,
    72272,
    72272,
    72284,
    72329,
    72349,
    72349,
    72368,
    72440,
    72704,
    72712,
    72714,
    72750,
    72768,
    72768,
    72818,
    72847,
    72960,
    72966,
    72968,
    72969,
    72971,
    73008,
    73030,
    73030,
    73056,
    73061,
    73063,
    73064,
    73066,
    73097,
    73112,
    73112,
    73440,
    73458,
    73474,
    73474,
    73476,
    73488,
    73490,
    73523,
    73648,
    73648,
    73728,
    74649,
    74752,
    74862,
    74880,
    75075,
    77712,
    77808,
    77824,
    78895,
    78913,
    78918,
    82944,
    83526,
    92160,
    92728,
    92736,
    92766,
    92784,
    92862,
    92880,
    92909,
    92928,
    92975,
    92992,
    92995,
    93027,
    93047,
    93053,
    93071,
    93760,
    93823,
    93952,
    94026,
    94032,
    94032,
    94099,
    94111,
    94176,
    94177,
    94179,
    94179,
    94208,
    100343,
    100352,
    101589,
    101632,
    101640,
    110576,
    110579,
    110581,
    110587,
    110589,
    110590,
    110592,
    110882,
    110898,
    110898,
    110928,
    110930,
    110933,
    110933,
    110948,
    110951,
    110960,
    111355,
    113664,
    113770,
    113776,
    113788,
    113792,
    113800,
    113808,
    113817,
    119808,
    119892,
    119894,
    119964,
    119966,
    119967,
    119970,
    119970,
    119973,
    119974,
    119977,
    119980,
    119982,
    119993,
    119995,
    119995,
    119997,
    120003,
    120005,
    120069,
    120071,
    120074,
    120077,
    120084,
    120086,
    120092,
    120094,
    120121,
    120123,
    120126,
    120128,
    120132,
    120134,
    120134,
    120138,
    120144,
    120146,
    120485,
    120488,
    120512,
    120514,
    120538,
    120540,
    120570,
    120572,
    120596,
    120598,
    120628,
    120630,
    120654,
    120656,
    120686,
    120688,
    120712,
    120714,
    120744,
    120746,
    120770,
    120772,
    120779,
    122624,
    122654,
    122661,
    122666,
    122928,
    122989,
    123136,
    123180,
    123191,
    123197,
    123214,
    123214,
    123536,
    123565,
    123584,
    123627,
    124112,
    124139,
    124896,
    124902,
    124904,
    124907,
    124909,
    124910,
    124912,
    124926,
    124928,
    125124,
    125184,
    125251,
    125259,
    125259,
    126464,
    126467,
    126469,
    126495,
    126497,
    126498,
    126500,
    126500,
    126503,
    126503,
    126505,
    126514,
    126516,
    126519,
    126521,
    126521,
    126523,
    126523,
    126530,
    126530,
    126535,
    126535,
    126537,
    126537,
    126539,
    126539,
    126541,
    126543,
    126545,
    126546,
    126548,
    126548,
    126551,
    126551,
    126553,
    126553,
    126555,
    126555,
    126557,
    126557,
    126559,
    126559,
    126561,
    126562,
    126564,
    126564,
    126567,
    126570,
    126572,
    126578,
    126580,
    126583,
    126585,
    126588,
    126590,
    126590,
    126592,
    126601,
    126603,
    126619,
    126625,
    126627,
    126629,
    126633,
    126635,
    126651,
    131072,
    173791,
    173824,
    177977,
    177984,
    178205,
    178208,
    183969,
    183984,
    191456,
    194560,
    195101,
    196608,
    201546,
    201552,
    205743,
    47,
    0,
    1,
    1,
    0,
    0,
    0,
    0,
    3,
    1,
    0,
    0,
    0,
    0,
    5,
    1,
    0,
    0,
    0,
    0,
    7,
    1,
    0,
    0,
    0,
    0,
    9,
    1,
    0,
    0,
    0,
    0,
    15,
    1,
    0,
    0,
    0,
    1,
    17,
    1,
    0,
    0,
    0,
    3,
    20,
    1,
    0,
    0,
    0,
    5,
    22,
    1,
    0,
    0,
    0,
    7,
    24,
    1,
    0,
    0,
    0,
    9,
    26,
    1,
    0,
    0,
    0,
    11,
    35,
    1,
    0,
    0,
    0,
    13,
    37,
    1,
    0,
    0,
    0,
    15,
    39,
    1,
    0,
    0,
    0,
    17,
    18,
    5,
    47,
    0,
    0,
    18,
    19,
    5,
    47,
    0,
    0,
    19,
    2,
    1,
    0,
    0,
    0,
    20,
    21,
    5,
    47,
    0,
    0,
    21,
    4,
    1,
    0,
    0,
    0,
    22,
    23,
    5,
    42,
    0,
    0,
    23,
    6,
    1,
    0,
    0,
    0,
    24,
    25,
    5,
    33,
    0,
    0,
    25,
    8,
    1,
    0,
    0,
    0,
    26,
    30,
    3,
    13,
    6,
    0,
    27,
    29,
    3,
    11,
    5,
    0,
    28,
    27,
    1,
    0,
    0,
    0,
    29,
    32,
    1,
    0,
    0,
    0,
    30,
    28,
    1,
    0,
    0,
    0,
    30,
    31,
    1,
    0,
    0,
    0,
    31,
    33,
    1,
    0,
    0,
    0,
    32,
    30,
    1,
    0,
    0,
    0,
    33,
    34,
    6,
    4,
    0,
    0,
    34,
    10,
    1,
    0,
    0,
    0,
    35,
    36,
    7,
    0,
    0,
    0,
    36,
    12,
    1,
    0,
    0,
    0,
    37,
    38,
    7,
    1,
    0,
    0,
    38,
    14,
    1,
    0,
    0,
    0,
    39,
    43,
    5,
    39,
    0,
    0,
    40,
    42,
    9,
    0,
    0,
    0,
    41,
    40,
    1,
    0,
    0,
    0,
    42,
    45,
    1,
    0,
    0,
    0,
    43,
    44,
    1,
    0,
    0,
    0,
    43,
    41,
    1,
    0,
    0,
    0,
    44,
    46,
    1,
    0,
    0,
    0,
    45,
    43,
    1,
    0,
    0,
    0,
    46,
    47,
    5,
    39,
    0,
    0,
    47,
    16,
    1,
    0,
    0,
    0,
    3,
    0,
    30,
    43,
    1,
    1,
    4,
    0
  ];
  static __ATN;
  static get _ATN() {
    if (!_XPathLexer.__ATN) {
      _XPathLexer.__ATN = new ATNDeserializer().deserialize(_XPathLexer._serializedATN);
    }
    return _XPathLexer.__ATN;
  }
  static vocabulary = new Vocabulary(_XPathLexer.literalNames, _XPathLexer.symbolicNames, []);
  get vocabulary() {
    return _XPathLexer.vocabulary;
  }
  static decisionsToDFA = _XPathLexer._ATN.decisionToState.map((ds, index2) => {
    return new DFA(ds, index2);
  });
};
var XPathLexerErrorListener = class extends BaseErrorListener {
  static {
    __name(this, "XPathLexerErrorListener");
  }
  syntaxError(_recognizer, _offendingSymbol, _line, _charPositionInLine, _msg, _e) {
  }
};
var XPathElement = class {
  static {
    __name(this, "XPathElement");
  }
  invert;
  nodeName;
  /**
   * Construct element like `/ID` or `ID` or `/*` etc... `nodeName` is undefined if just node
   *
   * @param nodeName The name of the node; may be undefined for any node.
   */
  constructor(nodeName) {
    this.nodeName = nodeName;
    this.invert = false;
  }
  toString() {
    const inv = this.invert ? "!" : "";
    return "XPathElement[" + inv + this.nodeName + "]";
  }
};
var XPathRuleAnywhereElement = class extends XPathElement {
  static {
    __name(this, "XPathRuleAnywhereElement");
  }
  ruleIndex;
  constructor(ruleName, ruleIndex) {
    super(ruleName);
    this.ruleIndex = ruleIndex;
  }
  evaluate(t) {
    return Trees.findAllRuleNodes(t, this.ruleIndex);
  }
  toString() {
    const inv = this.invert ? "!" : "";
    return "XPathRuleAnywhereElement[" + inv + this.nodeName + "]";
  }
};
var XPathRuleElement = class extends XPathElement {
  static {
    __name(this, "XPathRuleElement");
  }
  ruleIndex;
  constructor(ruleName, ruleIndex) {
    super(ruleName);
    this.ruleIndex = ruleIndex;
  }
  evaluate(t) {
    const nodes = [];
    for (const c of Trees.getChildren(t)) {
      if (c instanceof ParserRuleContext) {
        if (c.ruleIndex === this.ruleIndex && !this.invert || c.ruleIndex !== this.ruleIndex && this.invert) {
          nodes.push(c);
        }
      }
    }
    return nodes;
  }
  toString() {
    const inv = this.invert ? "!" : "";
    return "XPathRuleElement[" + inv + this.nodeName + "]";
  }
};
var XPathTokenAnywhereElement = class extends XPathElement {
  static {
    __name(this, "XPathTokenAnywhereElement");
  }
  tokenType;
  constructor(tokenName, tokenType) {
    super(tokenName);
    this.tokenType = tokenType;
  }
  evaluate(t) {
    return Trees.findAllTokenNodes(t, this.tokenType);
  }
  toString() {
    const inv = this.invert ? "!" : "";
    return "XPathTokenAnywhereElement[" + inv + this.nodeName + "]";
  }
};
var XPathTokenElement = class extends XPathElement {
  static {
    __name(this, "XPathTokenElement");
  }
  tokenType;
  constructor(tokenName, tokenType) {
    super(tokenName);
    this.tokenType = tokenType;
  }
  evaluate(t) {
    const nodes = [];
    for (const c of Trees.getChildren(t)) {
      if (c instanceof TerminalNode && c.symbol) {
        if (c.symbol.type === this.tokenType && !this.invert || c.symbol.type !== this.tokenType && this.invert) {
          nodes.push(c);
        }
      }
    }
    return nodes;
  }
  toString() {
    const inv = this.invert ? "!" : "";
    return "XPathTokenElement[" + inv + this.nodeName + "]";
  }
};
var XPathWildcardAnywhereElement = class extends XPathElement {
  static {
    __name(this, "XPathWildcardAnywhereElement");
  }
  constructor() {
    super(XPath.WILDCARD);
  }
  evaluate(t) {
    if (this.invert) {
      return [];
    }
    return Trees.descendants(t);
  }
  toString() {
    const inv = this.invert ? "!" : "";
    return "XPathWildcardAnywhereElement[" + inv + this.nodeName + "]";
  }
};
var XPathWildcardElement = class extends XPathElement {
  static {
    __name(this, "XPathWildcardElement");
  }
  constructor() {
    super(XPath.WILDCARD);
  }
  evaluate(t) {
    const kids = [];
    if (this.invert) {
      return kids;
    }
    for (const c of Trees.getChildren(t)) {
      kids.push(c);
    }
    return kids;
  }
  toString() {
    const inv = this.invert ? "!" : "";
    return "XPathWildcardElement[" + inv + this.nodeName + "]";
  }
};
var XPath = class _XPath {
  static {
    __name(this, "XPath");
  }
  static WILDCARD = "*";
  // word not operator/separator
  static NOT = "!";
  // word for invert operator
  path;
  elements;
  parser;
  constructor(parser, path) {
    this.parser = parser;
    this.path = path;
    this.elements = this.split(path);
  }
  static findAll(tree, xpath, parser) {
    const p = new _XPath(parser, xpath);
    return p.evaluate(tree);
  }
  // TODO: check for invalid token/rule names, bad syntax
  split(path) {
    const lexer = new XPathLexer(CharStream.fromString(path));
    lexer.recover = (e) => {
      throw e;
    };
    lexer.removeErrorListeners();
    lexer.addErrorListener(new XPathLexerErrorListener());
    const tokenStream = new CommonTokenStream(lexer);
    try {
      tokenStream.fill();
    } catch (e) {
      if (e instanceof LexerNoViableAltException) {
        const pos = lexer.column;
        const msg = "Invalid tokens or characters at index " + pos + " in path '" + path + "' -- " + e.message;
        throw new RangeError(msg);
      }
      throw e;
    }
    const tokens = tokenStream.getTokens();
    const elements = [];
    const n2 = tokens.length;
    let i = 0;
    loop:
      while (i < n2) {
        const el = tokens[i];
        let next;
        switch (el.type) {
          case XPathLexer.ROOT:
          case XPathLexer.ANYWHERE:
            const anywhere = el.type === XPathLexer.ANYWHERE;
            i++;
            next = tokens[i];
            const invert = next.type === XPathLexer.BANG;
            if (invert) {
              i++;
              next = tokens[i];
            }
            const pathElement = this.getXPathElement(next, anywhere);
            pathElement.invert = invert;
            elements.push(pathElement);
            i++;
            break;
          case XPathLexer.TOKEN_REF:
          case XPathLexer.RULE_REF:
          case XPathLexer.WILDCARD:
            elements.push(this.getXPathElement(el, false));
            ++i;
            break;
          case Token.EOF:
            break loop;
          default:
            throw new Error("Unknown path element " + el);
        }
      }
    return elements;
  }
  /**
   * Return a list of all nodes starting at `t` as root that satisfy the
   * path. The root `/` is relative to the node passed to {@link evaluate}.
   */
  evaluate(t) {
    const dummyRoot = new ParserRuleContext(null);
    dummyRoot.addChild(t);
    let work = /* @__PURE__ */ new Set([dummyRoot]);
    let i = 0;
    while (i < this.elements.length) {
      const next = /* @__PURE__ */ new Set();
      for (const node of work) {
        if (node.getChildCount() > 0) {
          const matching = this.elements[i].evaluate(node);
          matching.forEach((tree) => {
            next.add(tree);
          }, next);
        }
      }
      i++;
      work = next;
    }
    return work;
  }
  /**
   * Convert word like `*` or `ID` or `expr` to a path
   * element. `anywhere` is `true` if `//` precedes the
   * word.
   */
  getXPathElement(wordToken, anywhere) {
    if (wordToken.type === Token.EOF) {
      throw new Error("Missing path element at end of path");
    }
    const word = wordToken.text;
    if (word == null) {
      throw new Error("Expected wordToken to have text content.");
    }
    const ttype = this.parser.getTokenType(word);
    const ruleIndex = this.parser.getRuleIndex(word);
    switch (wordToken.type) {
      case XPathLexer.WILDCARD:
        return anywhere ? new XPathWildcardAnywhereElement() : new XPathWildcardElement();
      case XPathLexer.TOKEN_REF:
      case XPathLexer.STRING:
        if (ttype === Token.INVALID_TYPE) {
          throw new Error(word + " at index " + wordToken.start + " isn't a valid token name");
        }
        return anywhere ? new XPathTokenAnywhereElement(word, ttype) : new XPathTokenElement(word, ttype);
      default:
        if (ruleIndex === -1) {
          throw new Error(word + " at index " + wordToken.start + " isn't a valid rule name");
        }
        return anywhere ? new XPathRuleAnywhereElement(word, ruleIndex) : new XPathRuleElement(word, ruleIndex);
    }
  }
};
var Chunk = class {
  static {
    __name(this, "Chunk");
  }
};
var ParseTreeMatch = class {
  static {
    __name(this, "ParseTreeMatch");
  }
  /**
   * This is the backing field for {@link #getTree()}.
   */
  tree;
  /**
   * This is the backing field for {@link #getPattern()}.
   */
  pattern;
  /**
   * This is the backing field for {@link #getLabels()}.
   */
  labels;
  /**
   * This is the backing field for {@link #getMismatchedNode()}.
   */
  mismatchedNode;
  /**
   * Constructs a new instance of {@link ParseTreeMatch} from the specified
   * parse tree and pattern.
   *
   * @param tree The parse tree to match against the pattern.
   * @param pattern The parse tree pattern.
   * @param labels A mapping from label names to collections of
   * {@link ParseTree} objects located by the tree pattern matching process.
   * @param mismatchedNode The first node which failed to match the tree
   * pattern during the matching process.
   */
  constructor(tree, pattern, labels, mismatchedNode) {
    this.tree = tree;
    this.pattern = pattern;
    this.labels = labels;
    this.mismatchedNode = mismatchedNode;
  }
  /**
   * Get the last node associated with a specific `label`.
   *
   * For example, for pattern `<id:ID>`, `get("id")` returns the
   * node matched for that `ID`. If more than one node
   * matched the specified label, only the last is returned. If there is
   * no node associated with the label, this returns `null`.
   *
   * Pattern tags like `<ID>` and `<expr>` without labels are
   * considered to be labeled with `ID` and `expr`, respectively.
   *
   * @param label The label to check.
   *
   * @returns The last {@link ParseTree} to match a tag with the specified
   * label, or `null` if no parse tree matched a tag with the label.
   */
  get(label) {
    const parseTrees = this.labels.get(label);
    if (!parseTrees || parseTrees.length === 0) {
      return null;
    }
    return parseTrees[parseTrees.length - 1];
  }
  /**
   * Return all nodes matching a rule or token tag with the specified label.
   *
   * If the `label` is the name of a parser rule or token in the
   * grammar, the resulting list will contain both the parse trees matching
   * rule or tags explicitly labeled with the label and the complete set of
   * parse trees matching the labeled and unlabeled tags in the pattern for
   * the parser rule or token. For example, if `label` is `"foo"`,
   * the result will contain *all* of the following.
   *
   * - Parse tree nodes matching tags of the form `<foo:anyRuleName>` and
   * `<foo:AnyTokenName>`.
   * - Parse tree nodes matching tags of the form `<anyLabel:foo>`.
   * - Parse tree nodes matching tags of the form `<foo>`.
   *
   * @param label The label.
   *
   * @returns A collection of all {@link ParseTree} nodes matching tags with
   * the specified `label`. If no nodes matched the label, an empty list
   * is returned.
   */
  getAll(label) {
    const nodes = this.labels.get(label);
    return nodes ?? [];
  }
  /**
   * Return a mapping from label -> [list of nodes].
   *
   * The map includes special entries corresponding to the names of rules and
   * tokens referenced in tags in the original pattern. For additional
   * information, see the description of {@link getAll(String)}.
   *
   * @returns A mapping from labels to parse tree nodes. If the parse tree
   * pattern did not contain any rule or token tags, this map will be empty.
   */
  getLabels() {
    return this.labels;
  }
  /**
   * Get the node at which we first detected a mismatch.
   *
   * @returns the node at which we first detected a mismatch, or `null`
   * if the match was successful.
   */
  getMismatchedNode() {
    return this.mismatchedNode;
  }
  /**
   * Gets a value indicating whether the match operation succeeded.
   *
   * @returns `true` if the match operation succeeded; otherwise, `false`.
   */
  succeeded() {
    return !this.mismatchedNode;
  }
  /**
   * Get the tree pattern we are matching against.
   *
   * @returns The tree pattern we are matching against.
   */
  getPattern() {
    return this.pattern;
  }
  /**
   * Get the parse tree we are trying to match to a pattern.
   *
   * @returns The {@link ParseTree} we are trying to match to a pattern.
   */
  getTree() {
    return this.tree;
  }
  toString() {
    return `Match ${this.succeeded() ? "succeeded" : "failed"}; found ${this.getLabels().size} labels`;
  }
};
var ParseTreePattern = class {
  static {
    __name(this, "ParseTreePattern");
  }
  /**
   * This is the backing field for {@link #getPatternRuleIndex()}.
   */
  patternRuleIndex;
  /**
   * This is the backing field for {@link #getPattern()}.
   */
  pattern;
  /**
   * This is the backing field for {@link #getPatternTree()}.
   */
  patternTree;
  /**
   * This is the backing field for {@link #getMatcher()}.
   */
  matcher;
  /**
   * Construct a new instance of the {@link ParseTreePattern} class.
   *
   * @param matcher The {@link ParseTreePatternMatcher} which created this
   * tree pattern.
   * @param pattern The tree pattern in concrete syntax form.
   * @param patternRuleIndex The parser rule which serves as the root of the
   * tree pattern.
   * @param patternTree The tree pattern in {@link ParseTree} form.
   */
  constructor(matcher, pattern, patternRuleIndex, patternTree) {
    this.matcher = matcher;
    this.patternRuleIndex = patternRuleIndex;
    this.pattern = pattern;
    this.patternTree = patternTree;
  }
  /**
   * Match a specific parse tree against this tree pattern.
   *
   * @param tree The parse tree to match against this tree pattern.
   * @returns A {@link ParseTreeMatch} object describing the result of the
   * match operation. The {@link ParseTreeMatch#succeeded()} method can be
   * used to determine whether or not the match was successful.
   */
  match(tree) {
    return this.matcher.match(tree, this);
  }
  /**
   * Determine whether or not a parse tree matches this tree pattern.
   *
   * @param tree The parse tree to match against this tree pattern.
   * @returns `true` if `tree` is a match for the current tree
   * pattern; otherwise, `false`.
   */
  matches(tree) {
    return this.matcher.match(tree, this).succeeded();
  }
  /**
   * Find all nodes using XPath and then try to match those subtrees against
   * this tree pattern.
   *
   * @param tree The {@link ParseTree} to match against this pattern.
   * @param xpath An expression matching the nodes
   *
   * @returns A collection of {@link ParseTreeMatch} objects describing the
   * successful matches. Unsuccessful matches are omitted from the result,
   * regardless of the reason for the failure.
   */
  findAll(tree, xpath) {
    const subtrees = XPath.findAll(tree, xpath, this.matcher.getParser());
    const matches = new Array();
    for (const t of subtrees) {
      const match = this.match(t);
      if (match.succeeded()) {
        matches.push(match);
      }
    }
    return matches;
  }
  /**
   * Get the {@link ParseTreePatternMatcher} which created this tree pattern.
   *
   * @returns The {@link ParseTreePatternMatcher} which created this tree
   * pattern.
   */
  getMatcher() {
    return this.matcher;
  }
  /**
   * Get the tree pattern in concrete syntax form.
   *
   * @returns The tree pattern in concrete syntax form.
   */
  getPattern() {
    return this.pattern;
  }
  /**
   * Get the parser rule which serves as the outermost rule for the tree
   * pattern.
   *
   * @returns The parser rule which serves as the outermost rule for the tree
   * pattern.
   */
  getPatternRuleIndex() {
    return this.patternRuleIndex;
  }
  /**
   * Get the tree pattern as a {@link ParseTree}. The rule and token tags from
   * the pattern are present in the parse tree as terminal nodes with a symbol
   * of type {@link RuleTagToken} or {@link TokenTagToken}.
   *
   * @returns The tree pattern as a {@link ParseTree}.
   */
  getPatternTree() {
    return this.patternTree;
  }
};
var InputMismatchException = class extends RecognitionException {
  static {
    __name(this, "InputMismatchException");
  }
  constructor(recognizer) {
    super({ message: "", recognizer, input: recognizer.inputStream, ctx: recognizer.context });
    this.offendingToken = recognizer.getCurrentToken();
  }
};
var FailedPredicateException = class extends RecognitionException {
  static {
    __name(this, "FailedPredicateException");
  }
  ruleIndex = 0;
  predicateIndex = 0;
  predicate;
  constructor(recognizer, predicate, message = null) {
    super({
      message: formatMessage(predicate ?? "no predicate", message ?? null),
      recognizer,
      input: recognizer.inputStream,
      ctx: recognizer.context
    });
    const s = recognizer.atn.states[recognizer.state];
    const trans = s.transitions[0];
    if (trans instanceof PredicateTransition) {
      this.ruleIndex = trans.ruleIndex;
      this.predicateIndex = trans.predIndex;
    } else {
      this.ruleIndex = 0;
      this.predicateIndex = 0;
    }
    this.predicate = predicate;
    this.offendingToken = recognizer.getCurrentToken();
  }
};
var formatMessage = /* @__PURE__ */ __name((predicate, message) => {
  if (message !== null) {
    return message;
  }
  return "failed predicate: {" + predicate + "}?";
}, "formatMessage");
var DefaultErrorStrategy = class {
  static {
    __name(this, "DefaultErrorStrategy");
  }
  /**
   * Indicates whether the error strategy is currently "recovering from an
   * error". This is used to suppress reporting multiple error messages while
   * attempting to recover from a detected syntax error.
   *
   * @see #inErrorRecoveryMode
   */
  errorRecoveryMode = false;
  /**
   * The index into the input stream where the last error occurred.
   * 	This is used to prevent infinite loops where an error is found
   *  but no token is consumed during recovery...another error is found,
   *  ad nauseam.  This is a failsafe mechanism to guarantee that at least
   *  one token/tree node is consumed for two errors.
   */
  lastErrorIndex = -1;
  lastErrorStates = new IntervalSet();
  /**
   * This field is used to propagate information about the lookahead following
   * the previous match. Since prediction prefers completing the current rule
   * to error recovery efforts, error reporting may occur later than the
   * original point where it was discoverable. The original context is used to
   * compute the true expected sets as though the reporting occurred as early
   * as possible.
   */
  nextTokensContext = null;
  nextTokenState = 0;
  /**
   * The default implementation simply calls {@link endErrorCondition} to
   * ensure that the handler is not in error recovery mode.
   */
  reset(recognizer) {
    this.endErrorCondition(recognizer);
  }
  /**
   * This method is called to enter error recovery mode when a recognition
   * exception is reported.
   *
   * @param _recognizer the parser instance
   */
  beginErrorCondition(_recognizer) {
    this.errorRecoveryMode = true;
  }
  inErrorRecoveryMode(_recognizer) {
    return this.errorRecoveryMode;
  }
  /**
   * This method is called to leave error recovery mode after recovering from
   * a recognition exception.
   */
  endErrorCondition(_recognizer) {
    this.errorRecoveryMode = false;
    this.lastErrorStates = new IntervalSet();
    this.lastErrorIndex = -1;
  }
  /**
   * The default implementation simply calls {@link endErrorCondition}.
   */
  reportMatch(recognizer) {
    this.endErrorCondition(recognizer);
  }
  /**
   * The default implementation returns immediately if the handler is already
   * in error recovery mode. Otherwise, it calls {@link beginErrorCondition}
   * and dispatches the reporting task based on the runtime type of `e`
   * according to the following table.
   *
   * - {@link NoViableAltException}: Dispatches the call to {@link reportNoViableAlternative}
   * - {@link InputMismatchException}: Dispatches the call to {@link reportInputMismatch}
   * - {@link FailedPredicateException}: Dispatches the call to {@link reportFailedPredicate}
   * - All other types: calls {@link Parser.notifyErrorListeners} to report the exception
   */
  reportError(recognizer, e) {
    if (this.inErrorRecoveryMode(recognizer)) {
      return;
    }
    this.beginErrorCondition(recognizer);
    if (e instanceof NoViableAltException) {
      this.reportNoViableAlternative(recognizer, e);
    } else if (e instanceof InputMismatchException) {
      this.reportInputMismatch(recognizer, e);
    } else if (e instanceof FailedPredicateException) {
      this.reportFailedPredicate(recognizer, e);
    } else {
      recognizer.notifyErrorListeners(e.message, e.offendingToken, e);
    }
  }
  /**
   * The default implementation resynchronizes the parser by consuming tokens
   * until we find one in the resynchronization set--loosely the set of tokens
   * that can follow the current rule.
   *
   */
  recover(recognizer, _e) {
    if (this.lastErrorIndex === recognizer.inputStream?.index && this.lastErrorStates.contains(recognizer.state)) {
      recognizer.consume();
    }
    this.lastErrorIndex = recognizer.inputStream?.index ?? 0;
    this.lastErrorStates.addOne(recognizer.state);
    const followSet = this.getErrorRecoverySet(recognizer);
    this.consumeUntil(recognizer, followSet);
  }
  /**
   * The default implementation of {@link ANTLRErrorStrategy.sync} makes sure
   * that the current lookahead symbol is consistent with what were expecting
   * at this point in the ATN. You can call this anytime but ANTLR only
   * generates code to check before subrules/loops and each iteration.
   *
   * Implements Jim Idle's magic sync mechanism in closures and optional
   * subrules. E.g.,
   *
   * ```
   * a : sync ( stuff sync )* ;
   * sync : {consume to what can follow sync} ;
   * ```
   *
   * At the start of a sub rule upon error, {@link sync} performs single
   * token deletion, if possible. If it can't do that, it bails on the current
   * rule and uses the default error recovery, which consumes until the
   * resynchronization set of the current rule.
   *
   * If the sub rule is optional (`(...)?`, `(...)*`, or block
   * with an empty alternative), then the expected set includes what follows
   * the subrule.
   *
   * During loop iteration, it consumes until it sees a token that can start a
   * sub rule or what follows loop. Yes, that is pretty aggressive. We opt to
   * stay in the loop as long as possible.
   *
   * **ORIGINS**
   *
   * Previous versions of ANTLR did a poor job of their recovery within loops.
   * A single mismatch token or missing token would force the parser to bail
   * out of the entire rules surrounding the loop. So, for rule
   *
   * ```
   * classDef : 'class' ID '{' member* '}'
   * ```
   *
   * input with an extra token between members would force the parser to
   * consume until it found the next class definition rather than the next
   * member definition of the current class.
   *
   * This functionality cost a little bit of effort because the parser has to
   * compare token set at the start of the loop and at each iteration. If for
   * some reason speed is suffering for you, you can turn off this
   * functionality by simply overriding this method as a blank { }.
   *
   */
  sync(recognizer) {
    if (this.inErrorRecoveryMode(recognizer)) {
      return;
    }
    const s = recognizer.atn.states[recognizer.state];
    const la = recognizer.tokenStream.LA(1);
    const nextTokens = recognizer.atn.nextTokens(s);
    if (nextTokens.contains(la)) {
      this.nextTokensContext = null;
      this.nextTokenState = ATNState.INVALID_STATE_NUMBER;
      return;
    }
    if (nextTokens.contains(Token.EPSILON)) {
      if (this.nextTokensContext === null) {
        this.nextTokensContext = recognizer.context;
        this.nextTokenState = recognizer.state;
      }
      return;
    }
    switch (s.constructor.stateType) {
      case ATNState.BLOCK_START:
      case ATNState.STAR_BLOCK_START:
      case ATNState.PLUS_BLOCK_START:
      case ATNState.STAR_LOOP_ENTRY: {
        if (this.singleTokenDeletion(recognizer) !== null) {
          return;
        }
        throw new InputMismatchException(recognizer);
      }
      case ATNState.PLUS_LOOP_BACK:
      case ATNState.STAR_LOOP_BACK: {
        this.reportUnwantedToken(recognizer);
        const expecting = new IntervalSet();
        expecting.addSet(recognizer.getExpectedTokens());
        const whatFollowsLoopIterationOrRule = expecting.addSet(this.getErrorRecoverySet(recognizer));
        this.consumeUntil(recognizer, whatFollowsLoopIterationOrRule);
        break;
      }
      default:
    }
  }
  /**
   * This is called by {@link reportError} when the exception is a
   * {@link NoViableAltException}.
   *
   * @see reportError
   *
   * @param recognizer the parser instance
   * @param e the recognition exception
   */
  reportNoViableAlternative(recognizer, e) {
    if (e.message.length > 0) {
      recognizer.notifyErrorListeners(e.message, e.offendingToken, e);
      return;
    }
    const tokens = recognizer.tokenStream;
    let input;
    if (tokens !== null && e.startToken) {
      if (e.startToken.type === Token.EOF) {
        input = "<EOF>";
      } else {
        input = tokens.getTextFromRange(e.startToken, e.offendingToken);
      }
    } else {
      input = "<unknown input>";
    }
    const msg = "no viable alternative at input " + this.escapeWSAndQuote(input);
    recognizer.notifyErrorListeners(msg, e.offendingToken, e);
  }
  /**
   * This is called by {@link reportError} when the exception is an {@link InputMismatchException}.
   *
   * @see reportError
   *
   * @param recognizer the parser instance
   * @param e the recognition exception
   */
  reportInputMismatch(recognizer, e) {
    if (e.message.length > 0) {
      recognizer.notifyErrorListeners(e.message, e.offendingToken, e);
      return;
    }
    const msg = "mismatched input " + this.getTokenErrorDisplay(e.offendingToken) + " expecting " + e.getExpectedTokens().toStringWithVocabulary(recognizer.vocabulary);
    recognizer.notifyErrorListeners(msg, e.offendingToken, e);
  }
  /**
   * This is called by {@link reportError} when the exception is a
   * {@link FailedPredicateException}.
   *
   * @see reportError
   *
   * @param recognizer the parser instance
   * @param e the recognition exception
   */
  reportFailedPredicate(recognizer, e) {
    const ruleName = recognizer.ruleNames[recognizer.context.ruleIndex];
    const msg = "rule " + ruleName + " " + e.message;
    recognizer.notifyErrorListeners(msg, e.offendingToken, e);
  }
  /**
   * This method is called to report a syntax error which requires the removal
   * of a token from the input stream. At the time this method is called, the
   * erroneous symbol is current `LT(1)` symbol and has not yet been
   * removed from the input stream. When this method returns,
   * `recognizer` is in error recovery mode.
   *
   * This method is called when {@link singleTokenDeletion} identifies
   * single-token deletion as a viable recovery strategy for a mismatched
   * input error.
   *
   * The default implementation simply returns if the handler is already in
   * error recovery mode. Otherwise, it calls {@link beginErrorCondition} to
   * enter error recovery mode, followed by calling
   * {@link Parser.notifyErrorListeners}.
   *
   * @param recognizer the parser instance
   */
  reportUnwantedToken(recognizer) {
    if (this.inErrorRecoveryMode(recognizer)) {
      return;
    }
    this.beginErrorCondition(recognizer);
    const t = recognizer.getCurrentToken();
    const tokenName = this.getTokenErrorDisplay(t);
    const expecting = this.getExpectedTokens(recognizer);
    const msg = "extraneous input " + tokenName + " expecting " + expecting.toStringWithVocabulary(recognizer.vocabulary);
    recognizer.notifyErrorListeners(msg, t, null);
  }
  /**
   * This method is called to report a syntax error which requires the
   * insertion of a missing token into the input stream. At the time this
   * method is called, the missing token has not yet been inserted. When this
   * method returns, `recognizer` is in error recovery mode.
   *
   * This method is called when {@link singleTokenInsertion} identifies
   * single-token insertion as a viable recovery strategy for a mismatched
   * input error.
   *
   * The default implementation simply returns if the handler is already in
   * error recovery mode. Otherwise, it calls {@link beginErrorCondition} to
   * enter error recovery mode, followed by calling
   * {@link Parser.notifyErrorListeners}.
   *
   * @param recognizer the parser instance
   */
  reportMissingToken(recognizer) {
    if (this.inErrorRecoveryMode(recognizer)) {
      return;
    }
    this.beginErrorCondition(recognizer);
    const t = recognizer.getCurrentToken();
    const expecting = this.getExpectedTokens(recognizer);
    const msg = "missing " + expecting.toStringWithVocabulary(recognizer.vocabulary) + " at " + this.getTokenErrorDisplay(t);
    recognizer.notifyErrorListeners(msg, t, null);
  }
  /**
   * The default implementation attempts to recover from the mismatched input
   * by using single token insertion and deletion as described below. If the
   * recovery attempt fails, this method throws an
   * {@link InputMismatchException}.
   *
   * **EXTRA TOKEN** (single token deletion)
   *
   * `LA(1)` is not what we are looking for. If `LA(2)` has the
   * right token, however, then assume `LA(1)` is some extra spurious
   * token and delete it. Then consume and return the next token (which was
   * the `LA(2)` token) as the successful result of the match operation.
   *
   * This recovery strategy is implemented by {@link singleTokenDeletion}.
   *
   * **MISSING TOKEN** (single token insertion)
   *
   * If current token (at `LA(1)`) is consistent with what could come
   * after the expected `LA(1)` token, then assume the token is missing
   * and use the parser's {@link TokenFactory} to create it on the fly. The
   * "insertion" is performed by returning the created token as the successful
   * result of the match operation.
   *
   * This recovery strategy is implemented by {@link singleTokenInsertion}.
   *
   * **EXAMPLE**
   *
   * For example, Input `i=(3;` is clearly missing the `')'`. When
   * the parser returns from the nested call to `expr`, it will have
   * call chain:
   *
   * ```
   * stat -> expr -> atom
   * ```
   *
   * and it will be trying to match the `')'` at this point in the
   * derivation:
   *
   * ```
   * => ID '=' '(' INT ')' ('+' atom)* ';'
   * ^
   * ```
   *
   * The attempt to match `')'` will fail when it sees `';'` and
   * call {@link recoverInline}. To recover, it sees that `LA(1)==';'`
   * is in the set of tokens that can follow the `')'` token reference
   * in rule `atom`. It can assume that you forgot the `')'`.
   */
  recoverInline(recognizer) {
    const matchedSymbol = this.singleTokenDeletion(recognizer);
    if (matchedSymbol) {
      recognizer.consume();
      return matchedSymbol;
    }
    if (this.singleTokenInsertion(recognizer)) {
      return this.getMissingSymbol(recognizer);
    }
    throw new InputMismatchException(recognizer);
  }
  /**
   * This method implements the single-token insertion inline error recovery
   * strategy. It is called by {@link recoverInline} if the single-token
   * deletion strategy fails to recover from the mismatched input. If this
   * method returns `true`, `recognizer` will be in error recovery
   * mode.
   *
   * This method determines whether or not single-token insertion is viable by
   * checking if the `LA(1)` input symbol could be successfully matched
   * if it were instead the `LA(2)` symbol. If this method returns
   * `true`, the caller is responsible for creating and inserting a
   * token with the correct type to produce this behavior.
   *
   * @param recognizer the parser instance
   * @returns `true` if single-token insertion is a viable recovery
   * strategy for the current mismatched input, otherwise `false`
   */
  singleTokenInsertion(recognizer) {
    const currentSymbolType = recognizer.tokenStream?.LA(1) ?? -1;
    const atn = recognizer.atn;
    const currentState = atn.states[recognizer.state];
    const next = currentState.transitions[0].target;
    const expectingAtLL2 = atn.nextTokens(next, recognizer.context ?? void 0);
    if (expectingAtLL2.contains(currentSymbolType)) {
      this.reportMissingToken(recognizer);
      return true;
    }
    return false;
  }
  /**
   * This method implements the single-token deletion inline error recovery
   * strategy. It is called by {@link recoverInline} to attempt to recover
   * from mismatched input. If this method returns null, the parser and error
   * handler state will not have changed. If this method returns non-null,
   * `recognizer` will *not* be in error recovery mode since the
   * returned token was a successful match.
   *
   * If the single-token deletion is successful, this method calls
   * {@link reportUnwantedToken} to report the error, followed by
   * {@link Parser.consume} to actually "delete" the extraneous token. Then,
   * before returning {@link reportMatch} is called to signal a successful
   * match.
   *
   * @param recognizer the parser instance
   * @returns the successfully matched {@link Token} instance if single-token
   * deletion successfully recovers from the mismatched input, otherwise
   * `null`
   */
  singleTokenDeletion(recognizer) {
    const nextTokenType = recognizer.tokenStream?.LA(2) ?? -1;
    const expecting = this.getExpectedTokens(recognizer);
    if (expecting.contains(nextTokenType)) {
      this.reportUnwantedToken(recognizer);
      recognizer.consume();
      const matchedSymbol = recognizer.getCurrentToken();
      this.reportMatch(recognizer);
      return matchedSymbol;
    }
    return null;
  }
  /**
   * Conjure up a missing token during error recovery.
   *
   * The recognizer attempts to recover from single missing
   * symbols. But, actions might refer to that missing symbol.
   * For example, x=ID {f($x);}. The action clearly assumes
   * that there has been an identifier matched previously and that
   * $x points at that token. If that token is missing, but
   * the next token in the stream is what we want we assume that
   * this token is missing and we keep going. Because we
   * have to return some token to replace the missing token,
   * we have to conjure one up. This method gives the user control
   * over the tokens returned for missing tokens. Mostly,
   * you will want to create something special for identifier
   * tokens. For literals such as '{' and ',', the default
   * action in the parser or tree parser works. It simply creates
   * a CommonToken of the appropriate type. The text will be the token.
   * If you change what tokens must be created by the lexer,
   * override this method to create the appropriate tokens.
   */
  getMissingSymbol(recognizer) {
    const currentSymbol = recognizer.getCurrentToken();
    const expecting = this.getExpectedTokens(recognizer);
    let expectedTokenType = Token.INVALID_TYPE;
    if (expecting.length !== 0) {
      expectedTokenType = expecting.minElement;
    }
    let tokenText;
    if (expectedTokenType === Token.EOF) {
      tokenText = "<missing EOF>";
    } else {
      tokenText = "<missing " + recognizer.vocabulary.getDisplayName(expectedTokenType) + ">";
    }
    let current = currentSymbol;
    const lookBack = recognizer.tokenStream?.LT(-1);
    if (current.type === Token.EOF && lookBack !== null) {
      current = lookBack;
    }
    return recognizer.getTokenFactory().create(
      current.source,
      expectedTokenType,
      tokenText,
      Token.DEFAULT_CHANNEL,
      -1,
      -1,
      current.line,
      current.column
    );
  }
  getExpectedTokens(recognizer) {
    return recognizer.getExpectedTokens();
  }
  /**
   * How should a token be displayed in an error message? The default
   * is to display just the text, but during development you might
   * want to have a lot of information spit out. Override in that case
   * to use t.toString() (which, for CommonToken, dumps everything about
   * the token). This is better than forcing you to override a method in
   * your token objects because you don't have to go modify your lexer
   * so that it creates a new Java type.
   */
  getTokenErrorDisplay(t) {
    if (t === null) {
      return "<no token>";
    }
    let s = t.text;
    if (!s) {
      if (t.type === Token.EOF) {
        s = "<EOF>";
      } else {
        s = "<" + t.type + ">";
      }
    }
    return this.escapeWSAndQuote(s);
  }
  escapeWSAndQuote(s) {
    s = s.replace(/\n/g, "\\n");
    s = s.replace(/\r/g, "\\r");
    s = s.replace(/\t/g, "\\t");
    return "'" + s + "'";
  }
  /**
   * Compute the error recovery set for the current rule. During
   * rule invocation, the parser pushes the set of tokens that can
   * follow that rule reference on the stack; this amounts to
   * computing FIRST of what follows the rule reference in the
   * enclosing rule. See LinearApproximator.FIRST().
   * This local follow set only includes tokens
   * from within the rule; i.e., the FIRST computation done by
   * ANTLR stops at the end of a rule.
   *
   * EXAMPLE
   *
   * When you find a "no viable alt exception", the input is not
   * consistent with any of the alternatives for rule r. The best
   * thing to do is to consume tokens until you see something that
   * can legally follow a call to r//or* any rule that called r.
   * You don't want the exact set of viable next tokens because the
   * input might just be missing a token--you might consume the
   * rest of the input looking for one of the missing tokens.
   *
   * Consider grammar:
   *
   * a : '[' b ']'
   * | '(' b ')'
   * ;
   * b : c '^' INT ;
   * c : ID
   * | INT
   * ;
   *
   * At each rule invocation, the set of tokens that could follow
   * that rule is pushed on a stack. Here are the various
   * context-sensitive follow sets:
   *
   * FOLLOW(b1_in_a) = FIRST(']') = ']'
   * FOLLOW(b2_in_a) = FIRST(')') = ')'
   * FOLLOW(c_in_b) = FIRST('^') = '^'
   *
   * Upon erroneous input "[]", the call chain is
   *
   * a -> b -> c
   *
   * and, hence, the follow context stack is:
   *
   * depth follow set start of rule execution
   * 0 <EOF> a (from main())
   * 1 ']' b
   * 2 '^' c
   *
   * Notice that ')' is not included, because b would have to have
   * been called from a different context in rule a for ')' to be
   * included.
   *
   * For error recovery, we cannot consider FOLLOW(c)
   * (context-sensitive or otherwise). We need the combined set of
   * all context-sensitive FOLLOW sets--the set of all tokens that
   * could follow any reference in the call chain. We need to
   * resync to one of those tokens. Note that FOLLOW(c)='^' and if
   * we resync'd to that token, we'd consume until EOF. We need to
   * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
   * In this case, for input "[]", LA(1) is ']' and in the set, so we would
   * not consume anything. After printing an error, rule c would
   * return normally. Rule b would not find the required '^' though.
   * At this point, it gets a mismatched token error and throws an
   * exception (since LA(1) is not in the viable following token
   * set). The rule exception handler tries to recover, but finds
   * the same recovery set and doesn't consume anything. Rule b
   * exits normally returning to rule a. Now it finds the ']' (and
   * with the successful match exits errorRecovery mode).
   *
   * So, you can see that the parser walks up the call chain looking
   * for the token that was a member of the recovery set.
   *
   * Errors are not generated in errorRecovery mode.
   *
   * ANTLR's error recovery mechanism is based upon original ideas:
   *
   * "Algorithms + Data Structures = Programs" by Niklaus Wirth
   *
   * and
   *
   * "A note on error recovery in recursive descent parsers":
   * http://portal.acm.org/citation.cfm?id=947902.947905
   *
   * Later, Josef Grosch had some good ideas:
   *
   * "Efficient and Comfortable Error Recovery in Recursive Descent
   * Parsers":
   * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
   *
   * Like Grosch I implement context-sensitive FOLLOW sets that are combined
   * at run-time upon error to avoid overhead during parsing.
   */
  getErrorRecoverySet(recognizer) {
    const atn = recognizer.atn;
    let ctx2 = recognizer.context;
    const recoverSet = new IntervalSet();
    while (ctx2 !== null && ctx2.invokingState >= 0) {
      const invokingState = atn.states[ctx2.invokingState];
      const rt = invokingState.transitions[0];
      const follow = atn.nextTokens(rt.followState);
      recoverSet.addSet(follow);
      ctx2 = ctx2.parent;
    }
    recoverSet.removeOne(Token.EPSILON);
    return recoverSet;
  }
  /** Consume tokens until one matches the given token set. */
  consumeUntil(recognizer, set2) {
    let ttype = recognizer.tokenStream?.LA(1) ?? -1;
    while (ttype !== Token.EOF && !set2.contains(ttype)) {
      recognizer.consume();
      ttype = recognizer.tokenStream?.LA(1) ?? -1;
    }
  }
};
var BailErrorStrategy = class extends DefaultErrorStrategy {
  static {
    __name(this, "BailErrorStrategy");
  }
  /**
   * Instead of recovering from exception `e`, re-throw it wrapped
   * in a {@link ParseCancellationException} so it is not caught by the
   * rule function catches. Use {@link Exception//getCause()} to get the
   * original {@link RecognitionException}.
   */
  recover(recognizer, e) {
    throw new ParseCancellationException(e);
  }
  /**
   * Make sure we don't attempt to recover inline; if the parser
   * successfully recovers, it won't throw an exception.
   */
  recoverInline(recognizer) {
    const exception = new InputMismatchException(recognizer);
    throw new ParseCancellationException(exception);
  }
  // Make sure we don't attempt to recover from problems in subrules.
  sync(_recognizer) {
  }
};
var ListTokenSource = class {
  static {
    __name(this, "ListTokenSource");
  }
  /**
   * The name of the input source. If this value is `null`, a call to
   * {@link #getSourceName} should return the source name used to create the
   * the next token in {@link #tokens} (or the previous token if the end of
   * the input has been reached).
   */
  sourceName;
  tokenFactory = CommonTokenFactory.DEFAULT;
  /**
   * The wrapped collection of {@link Token} objects to return.
   */
  tokens = [];
  /**
   * The index into {@link tokens} of token to return by the next call to
   * {@link #nextToken}. The end of the input is indicated by this value
   * being greater than or equal to the number of items in {@link #tokens}.
   */
  i = 0;
  /**
   * This field caches the EOF token for the token source.
   */
  eofToken = null;
  constructor(tokens, sourceName) {
    this.tokens = tokens;
    this.sourceName = sourceName ?? "";
  }
  get column() {
    if (this.i < this.tokens.length) {
      return this.tokens[this.i].column;
    }
    if (this.eofToken !== null) {
      return this.eofToken.column;
    }
    if (this.tokens.length > 0) {
      const lastToken = this.tokens[this.tokens.length - 1];
      const tokenText = lastToken.text;
      if (tokenText) {
        const lastNewLine = tokenText.lastIndexOf("\n");
        if (lastNewLine >= 0) {
          return tokenText.length - lastNewLine - 1;
        }
      }
      return lastToken.column + lastToken.stop - lastToken.start + 1;
    }
    return 0;
  }
  nextToken() {
    if (this.i >= this.tokens.length) {
      if (this.eofToken === null) {
        let start = -1;
        if (this.tokens.length > 0) {
          const previousStop = this.tokens[this.tokens.length - 1].stop;
          if (previousStop !== -1) {
            start = previousStop + 1;
          }
        }
        const stop = Math.max(-1, start - 1);
        this.eofToken = this.tokenFactory.create(
          [this, this.inputStream],
          Token.EOF,
          "EOF",
          Token.DEFAULT_CHANNEL,
          start,
          stop,
          this.line,
          this.column
        );
      }
      return this.eofToken;
    }
    const t = this.tokens[this.i];
    if (this.i === this.tokens.length - 1 && t.type === Token.EOF) {
      this.eofToken = t;
    }
    this.i++;
    return t;
  }
  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) {
      const lastToken = this.tokens[this.tokens.length - 1];
      let line = lastToken.line;
      const tokenText = lastToken.text;
      if (tokenText) {
        for (const char of tokenText) {
          if (char === "\n") {
            line++;
          }
        }
      }
      return line;
    }
    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;
    }
    return null;
  }
  getSourceName() {
    if (this.sourceName !== null) {
      return this.sourceName;
    }
    const inputStream = this.inputStream;
    if (inputStream !== null) {
      return inputStream.getSourceName();
    }
    return "List";
  }
};
var InterpreterRuleContext = class extends ParserRuleContext {
  static {
    __name(this, "InterpreterRuleContext");
  }
  /** This is the backing field for {@link #getRuleIndex}. */
  #ruleIndex;
  constructor(ruleIndex, parent, invokingStateNumber) {
    super(parent, invokingStateNumber);
    this.#ruleIndex = ruleIndex;
  }
  get ruleIndex() {
    return this.#ruleIndex;
  }
};
var TraceListener = class {
  static {
    __name(this, "TraceListener");
  }
  parser;
  constructor(parser) {
    this.parser = parser;
  }
  enterEveryRule(ctx2) {
    console.log("enter   " + this.parser.ruleNames[ctx2.ruleIndex] + ", LT(1)=" + this.parser.inputStream?.LT(1)?.text);
  }
  visitTerminal(node) {
    console.log("consume " + node.getSymbol() + " rule " + this.parser.ruleNames[this.parser.context.ruleIndex]);
  }
  exitEveryRule(ctx2) {
    console.log("exit    " + this.parser.ruleNames[ctx2.ruleIndex] + ", LT(1)=" + this.parser.inputStream?.LT(1)?.text);
  }
  visitErrorNode(_node) {
  }
};
var Parser = class extends Recognizer {
  static {
    __name(this, "Parser");
  }
  /** For testing only. */
  printer = null;
  /**
   * Specifies whether or not the parser should construct a parse tree during
   * the parsing process. The default value is `true`.
   *
   * @see #getBuildParseTree
   * @see #setBuildParseTree
   */
  buildParseTrees = true;
  /**
   * The error handling strategy for the parser. The default value is a new
   * instance of {@link DefaultErrorStrategy}.
   *
   * @see #getErrorHandler
   * @see #setErrorHandler
   */
  errorHandler = new DefaultErrorStrategy();
  /**
   * The {@link ParserRuleContext} object for the currently executing rule.
   * This is always non-null during the parsing process.
   */
  // TODO: make private
  context = null;
  precedenceStack = [];
  /**
   * The list of {@link ParseTreeListener} listeners registered to receive
   * events during the parse.
   *
   * @see #addParseListener
   */
  parseListeners = null;
  /**
   * The number of syntax errors reported during parsing. This value is
   * incremented each time {@link #notifyErrorListeners} is called.
   */
  syntaxErrors = 0;
  /** Indicates parser has matched EOF token. See {@link #exitRule()}. */
  matchedEOF = false;
  /**
   * When {@link #setTrace}`(true)` is called, a reference to the
   * {@link TraceListener} is stored here so it can be easily removed in a
   * later call to {@link #setTrace}`(false)`. The listener itself is
   * implemented as a parser listener so this field is not directly used by
   * other parser methods.
   */
  tracer = null;
  /**
   * This field holds the deserialized {@link ATN} with bypass alternatives, created
   * lazily upon first demand. In 4.10 I changed from map<serializedATNString, ATN>
   * since we only need one per parser object and also it complicates other targets
   * that don't use ATN strings.
   *
   * @see ATNDeserializationOptions#isGenerateRuleBypassTransitions()
   */
  bypassAltsAtnCache = null;
  #inputStream;
  /**
   * This is all the parsing support code essentially. Most of it is error recovery stuff.
   */
  constructor(input) {
    super();
    this.precedenceStack.push(0);
    this.syntaxErrors = 0;
    this.#inputStream = input;
  }
  /** reset the parser's state */
  reset(rewindInputStream = true) {
    if (rewindInputStream) {
      this.inputStream.seek(0);
    }
    this.errorHandler.reset(this);
    this.context = null;
    this.syntaxErrors = 0;
    this.matchedEOF = false;
    this.setTrace(false);
    this.precedenceStack = [];
    this.precedenceStack.push(0);
    if (this.interpreter) {
      this.interpreter.reset();
    }
  }
  /**
   * Match current input symbol against `ttype`. If the symbol type
   * matches, {@link ANTLRErrorStrategy//reportMatch} and {@link consume} are
   * called to complete the match process.
   *
   * If the symbol type does not match,
   * {@link ANTLRErrorStrategy//recoverInline} is called on the current error
   * strategy to attempt recovery. If {@link buildParseTree} is
   * `true` and the token index of the symbol returned by
   * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to
   * the parse tree by calling {@link ParserRuleContext//addErrorNode}.
   *
   * @param ttype the token type to match
   * @returns the matched symbol
   * @throws RecognitionException if the current input symbol did not match
   * `ttype` and the error strategy could not recover from the
   * mismatched symbol
   */
  match(ttype) {
    let t = this.getCurrentToken();
    if (t.type === ttype) {
      if (ttype === Token.EOF) {
        this.matchedEOF = true;
      }
      this.errorHandler.reportMatch(this);
      this.consume();
    } else {
      t = this.errorHandler.recoverInline(this);
      if (this.buildParseTrees && t.tokenIndex === -1) {
        this.context.addErrorNode(this.createErrorNode(this.context, t));
      }
    }
    return t;
  }
  /**
   * Match current input symbol as a wildcard. If the symbol type matches
   * (i.e. has a value greater than 0), {@link ANTLRErrorStrategy//reportMatch}
   * and {@link consume} are called to complete the match process.
   *
   * If the symbol type does not match,
   * {@link ANTLRErrorStrategy//recoverInline} is called on the current error
   * strategy to attempt recovery. If {@link buildParseTree} is
   * `true` and the token index of the symbol returned by
   * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to
   * the parse tree by calling {@link ParserRuleContext//addErrorNode}.
   *
   * @returns the matched symbol
   * @throws RecognitionException if the current input symbol did not match
   * a wildcard and the error strategy could not recover from the mismatched
   * symbol
   */
  matchWildcard() {
    let t = this.getCurrentToken();
    if (t.type > 0) {
      this.errorHandler.reportMatch(this);
      this.consume();
    } else {
      t = this.errorHandler.recoverInline(this);
      if (this.buildParseTrees && t.tokenIndex === -1) {
        this.context.addErrorNode(this.createErrorNode(this.context, t));
      }
    }
    return t;
  }
  getParseListeners() {
    return this.parseListeners ?? [];
  }
  /**
   * Registers `listener` to receive events during the parsing process.
   *
   * To support output-preserving grammar transformations (including but not
   * limited to left-recursion removal, automated left-factoring, and
   * optimized code generation), calls to listener methods during the parse
   * may differ substantially from calls made by
   * {@link ParseTreeWalker//DEFAULT} used after the parse is complete. In
   * particular, rule entry and exit events may occur in a different order
   * during the parse than after the parser. In addition, calls to certain
   * rule entry methods may be omitted.
   *
   * With the following specific exceptions, calls to listener events are
   * deterministic*, i.e. for identical input the calls to listener
   * methods will be the same.
   *
   * - Alterations to the grammar used to generate code may change the
   * behavior of the listener calls.
   * - Alterations to the command line options passed to ANTLR 4 when
   * generating the parser may change the behavior of the listener calls.
   * - Changing the version of the ANTLR Tool used to generate the parser
   * may change the behavior of the listener calls.
   *
   * @param listener the listener to add
   *
   * @throws NullPointerException if {@code} listener is `null`
   */
  addParseListener(listener) {
    if (listener === null) {
      throw new Error("listener");
    }
    if (this.parseListeners === null) {
      this.parseListeners = [];
    }
    this.parseListeners.push(listener);
  }
  /**
   * Remove `listener` from the list of parse listeners.
   *
   * If `listener` is `null` or has not been added as a parse
   * listener, this method does nothing.
   *
   * @param listener the listener to remove
   */
  removeParseListener(listener) {
    if (this.parseListeners !== null && listener !== null) {
      const idx = this.parseListeners.indexOf(listener);
      if (idx >= 0) {
        this.parseListeners.splice(idx, 1);
      }
      if (this.parseListeners.length === 0) {
        this.parseListeners = null;
      }
    }
  }
  // Remove all parse listeners.
  removeParseListeners() {
    this.parseListeners = null;
  }
  // Notify any parse listeners of an enter rule event.
  triggerEnterRuleEvent() {
    if (this.parseListeners !== null) {
      const ctx2 = this.context;
      this.parseListeners.forEach((listener) => {
        listener.enterEveryRule(ctx2);
        ctx2.enterRule(listener);
      });
    }
  }
  /**
   * Notify any parse listeners of an exit rule event.
   *
   * @see //addParseListener
   */
  triggerExitRuleEvent() {
    if (this.parseListeners !== null) {
      const ctx2 = this.context;
      this.parseListeners.slice(0).reverse().forEach((listener) => {
        ctx2.exitRule(listener);
        listener.exitEveryRule(ctx2);
      });
    }
  }
  getTokenFactory() {
    return this.inputStream.tokenSource.tokenFactory;
  }
  // Tell our token source and error strategy about a new way to create tokens.
  setTokenFactory(factory) {
    this.inputStream.tokenSource.tokenFactory = factory;
  }
  /**
   * The preferred method of getting a tree pattern. For example, here's a
   * sample use:
   *
   * ```
   * const t = parser.expr();
   * const p = parser.compileParseTreePattern("<ID>+0", MyParser.RULE_expr);
   * const m = p.match(t);
   * const id = m.get("ID");
   * ```
   */
  compileParseTreePattern(pattern, patternRuleIndex, lexer) {
    if (!lexer) {
      if (this.tokenStream !== null) {
        const tokenSource = this.tokenStream.tokenSource;
        if (tokenSource instanceof Lexer) {
          lexer = tokenSource;
        }
      }
    }
    if (!lexer) {
      throw new Error("Parser can't discover a lexer to use");
    }
    const m2 = new ParseTreePatternMatcher(lexer, this);
    return m2.compile(pattern, patternRuleIndex);
  }
  /**
   * The ATN with bypass alternatives is expensive to create so we create it
   * lazily.
   *
   * @throws UnsupportedOperationException if the current parser does not
   * implement the {@link getSerializedATN()} method.
   */
  getATNWithBypassAlts() {
    const serializedAtn = this.serializedATN;
    if (serializedAtn === null) {
      throw new Error("The current parser does not support an ATN with bypass alternatives.");
    }
    if (this.bypassAltsAtnCache !== null) {
      return this.bypassAltsAtnCache;
    }
    const deserializationOptions = { readOnly: false, verifyATN: true, generateRuleBypassTransitions: true };
    this.bypassAltsAtnCache = new ATNDeserializer(deserializationOptions).deserialize(serializedAtn);
    return this.bypassAltsAtnCache;
  }
  /**
   * Gets the number of syntax errors reported during parsing. This value is
   * incremented each time {@link notifyErrorListeners} is called.
   */
  get numberOfSyntaxErrors() {
    return this.syntaxErrors;
  }
  get inputStream() {
    return this.#inputStream;
  }
  set inputStream(input) {
    this.tokenStream = input;
  }
  get tokenStream() {
    return this.#inputStream;
  }
  /** Set the token stream and reset the parser. */
  set tokenStream(input) {
    this.reset(false);
    this.#inputStream = input;
  }
  /**
   * Match needs to return the current input symbol, which gets put
   * into the label for the associated token ref; e.g., x=ID.
   */
  getCurrentToken() {
    return this.inputStream.LT(1);
  }
  notifyErrorListeners(msg, offendingToken, err) {
    offendingToken = offendingToken ?? null;
    err = err ?? null;
    if (offendingToken === null) {
      offendingToken = this.getCurrentToken();
    }
    this.syntaxErrors += 1;
    const line = offendingToken.line;
    const column = offendingToken.column;
    this.errorListenerDispatch.syntaxError(this, offendingToken, line, column, msg, err);
  }
  /**
   * Consume and return the {@link getCurrentToken current symbol}.
   *
   * E.g., given the following input with `A` being the current
   * lookahead symbol, this function moves the cursor to `B` and returns
   * `A`.
   *
   * ```
   * A B
   * ^
   * ```
   *
   * If the parser is not in error recovery mode, the consumed symbol is added
   * to the parse tree using {@link ParserRuleContext//addChild(Token)}, and
   * {@link ParseTreeListener//visitTerminal} is called on any parse listeners.
   * If the parser *is* in error recovery mode, the consumed symbol is
   * added to the parse tree using
   * {@link ParserRuleContext//addErrorNode(Token)}, and
   * {@link ParseTreeListener//visitErrorNode} is called on any parse
   * listeners.
   */
  consume() {
    const o = this.getCurrentToken();
    if (o.type !== Token.EOF) {
      this.tokenStream.consume();
    }
    const hasListener = this.parseListeners !== null && this.parseListeners.length > 0;
    if (this.buildParseTrees || hasListener) {
      let node;
      if (this.errorHandler.inErrorRecoveryMode(this)) {
        node = this.context.addErrorNode(this.createErrorNode(this.context, o));
      } else {
        node = this.context.addTokenNode(o);
      }
      if (hasListener) {
        this.parseListeners.forEach((listener) => {
          if (node instanceof ErrorNode) {
            listener.visitErrorNode(node);
          } else {
            listener.visitTerminal(node);
          }
        });
      }
    }
    return o;
  }
  addContextToParseTree() {
    if (this.context?.parent) {
      this.context.parent.addChild(this.context);
    }
  }
  /**
   * Always called by generated parsers upon entry to a rule. Access field
   * {@link context} get the current context.
   */
  enterRule(localctx, state, _ruleIndex) {
    this.state = state;
    this.context = localctx;
    this.context.start = this.inputStream.LT(1);
    if (this.buildParseTrees) {
      this.addContextToParseTree();
    }
    this.triggerEnterRuleEvent();
  }
  exitRule() {
    if (this.matchedEOF) {
      this.context.stop = this.inputStream.LT(1);
    } else {
      this.context.stop = this.inputStream.LT(-1);
    }
    this.triggerExitRuleEvent();
    this.state = this.context.invokingState;
    this.context = this.context.parent;
  }
  enterOuterAlt(localctx, altNum) {
    localctx.setAltNumber(altNum);
    if (this.buildParseTrees && this.context !== localctx) {
      if (this.context?.parent) {
        this.context.parent.removeLastChild();
        this.context.parent.addChild(localctx);
      }
    }
    this.context = localctx;
  }
  /**
   * Get the precedence level for the top-most precedence rule.
   *
   * @returns The precedence level for the top-most precedence rule, or -1 if
   * the parser context is not nested within a precedence rule.
   */
  getPrecedence() {
    if (this.precedenceStack.length === 0) {
      return -1;
    }
    return this.precedenceStack[this.precedenceStack.length - 1];
  }
  enterRecursionRule(localctx, state, ruleIndex, precedence) {
    this.state = state;
    this.precedenceStack.push(precedence);
    this.context = localctx;
    this.context.start = this.inputStream.LT(1);
    this.triggerEnterRuleEvent();
  }
  /** Like {@link enterRule} but for recursive rules. */
  pushNewRecursionContext(localctx, state, _ruleIndex) {
    const previous = this.context;
    previous.parent = localctx;
    previous.invokingState = state;
    previous.stop = this.inputStream.LT(-1);
    this.context = localctx;
    this.context.start = previous.start;
    if (this.buildParseTrees) {
      this.context.addChild(previous);
    }
    this.triggerEnterRuleEvent();
  }
  unrollRecursionContexts(parent) {
    this.precedenceStack.pop();
    this.context.stop = this.inputStream.LT(-1);
    const retCtx = this.context;
    const parseListeners = this.getParseListeners();
    if (parseListeners !== null && parseListeners.length > 0) {
      while (this.context !== parent) {
        this.triggerExitRuleEvent();
        this.context = this.context.parent;
      }
    } else {
      this.context = parent;
    }
    retCtx.parent = parent;
    if (this.buildParseTrees && parent !== null) {
      parent.addChild(retCtx);
    }
  }
  getInvokingContext(ruleIndex) {
    let ctx2 = this.context;
    while (ctx2 !== null) {
      if (ctx2.ruleIndex === ruleIndex) {
        return ctx2;
      }
      ctx2 = ctx2.parent;
    }
    return null;
  }
  precpred(_localctx, precedence) {
    return precedence >= this.precedenceStack[this.precedenceStack.length - 1];
  }
  /**
   * Checks whether or not `symbol` can follow the current state in the
   * ATN. The behavior of this method is equivalent to the following, but is
   * implemented such that the complete context-sensitive follow set does not
   * need to be explicitly constructed.
   *
   * ```
   * return getExpectedTokens().contains(symbol);
   * ```
   *
   * @param symbol the symbol type to check
   * @returns `true` if `symbol` can follow the current state in
   * the ATN, otherwise `false`.
   */
  isExpectedToken(symbol2) {
    const atn = this.interpreter.atn;
    let ctx2 = this.context;
    const s = atn.states[this.state];
    let following = atn.nextTokens(s);
    if (following.contains(symbol2)) {
      return true;
    }
    if (!following.contains(Token.EPSILON)) {
      return false;
    }
    while (ctx2 !== null && ctx2.invokingState >= 0 && following.contains(Token.EPSILON)) {
      const invokingState = atn.states[ctx2.invokingState];
      const rt = invokingState.transitions[0];
      following = atn.nextTokens(rt.followState);
      if (following.contains(symbol2)) {
        return true;
      }
      ctx2 = ctx2.parent;
    }
    if (following.contains(Token.EPSILON) && symbol2 === Token.EOF) {
      return true;
    } else {
      return false;
    }
  }
  /**
   * Computes the set of input symbols which could follow the current parser
   * state and context, as given by {@link getState} and {@link getContext},
   * respectively.
   *
   * {@link ATN.getExpectedTokens ATN.getExpectedTokens(int, RuleContext)}
   */
  getExpectedTokens() {
    return this.interpreter.atn.getExpectedTokens(this.state, this.context);
  }
  getExpectedTokensWithinCurrentRule() {
    const atn = this.interpreter.atn;
    const s = atn.states[this.state];
    return atn.nextTokens(s);
  }
  /** Get a rule's index (i.e., `RULE_ruleName` field) or -1 if not found. */
  getRuleIndex(ruleName) {
    return this.getRuleIndexMap().get(ruleName) ?? -1;
  }
  /**
   * @returns an array of string of the rule names in your parser instance
   * leading up to a call to the current rule. You could override if
   * you want more details such as the file/line info of where
   * in the ATN a rule is invoked.
   *
   * this is very useful for error messages.
   */
  getRuleInvocationStack(p) {
    p = p ?? null;
    if (p === null) {
      p = this.context;
    }
    const stack = [];
    while (p !== null) {
      const ruleIndex = p.ruleIndex;
      if (ruleIndex < 0) {
        stack.push("n/a");
      } else {
        stack.push(this.ruleNames[ruleIndex]);
      }
      p = p.parent;
    }
    return stack;
  }
  /**
   * For debugging and other purposes.
   *
   * TODO: this differs from the Java version. Change it.
   */
  getDFAStrings() {
    return this.interpreter.decisionToDFA.toString();
  }
  /** For debugging and other purposes. */
  dumpDFA() {
    let seenOne = false;
    for (const dfa of this.interpreter.decisionToDFA) {
      if (dfa.length > 0) {
        if (seenOne) {
          console.log();
        }
        if (this.printer) {
          this.printer.println("Decision " + dfa.decision + ":");
          this.printer.print(dfa.toString(this.vocabulary));
        }
        seenOne = true;
      }
    }
  }
  getSourceName() {
    return this.inputStream.getSourceName();
  }
  getParseInfo() {
    const interp = this.interpreter;
    if (interp instanceof ProfilingATNSimulator) {
      return new ParseInfo(interp);
    }
    return void 0;
  }
  setProfile(profile) {
    const interp = this.interpreter;
    const saveMode = interp.predictionMode;
    if (profile) {
      if (!(interp instanceof ProfilingATNSimulator)) {
        this.interpreter = new ProfilingATNSimulator(this);
      }
    } else if (interp instanceof ProfilingATNSimulator) {
      const sharedContextCache = interp.sharedContextCache;
      if (sharedContextCache) {
        const sim = new ParserATNSimulator(this, this.atn, interp.decisionToDFA, sharedContextCache);
        this.interpreter = sim;
      }
    }
    this.interpreter.predictionMode = saveMode;
  }
  /**
   * During a parse is sometimes useful to listen in on the rule entry and exit
   * events as well as token matches. this is for quick and dirty debugging.
   */
  setTrace(trace) {
    if (!trace) {
      this.removeParseListener(this.tracer);
      this.tracer = null;
    } else {
      if (this.tracer !== null) {
        this.removeParseListener(this.tracer);
      }
      this.tracer = new TraceListener(this);
      this.addParseListener(this.tracer);
    }
  }
  createTerminalNode(parent, t) {
    return new TerminalNode(t);
  }
  createErrorNode(parent, t) {
    return new ErrorNode(t);
  }
};
var ParserInterpreter = class extends Parser {
  static {
    __name(this, "ParserInterpreter");
  }
  rootContext;
  overrideDecisionRoot = null;
  parentContextStack = [];
  overrideDecisionAlt = -1;
  overrideDecisionReached = false;
  decisionToDFA;
  sharedContextCache = new PredictionContextCache();
  pushRecursionContextStates;
  #overrideDecision = -1;
  #overrideDecisionInputIndex = -1;
  #grammarFileName;
  #atn;
  #ruleNames;
  #vocabulary;
  constructor(grammarFileName, vocabulary, ruleNames, atn, input) {
    super(input);
    this.#grammarFileName = grammarFileName;
    this.#atn = atn;
    this.#ruleNames = ruleNames.slice(0);
    this.#vocabulary = vocabulary;
    this.pushRecursionContextStates = new BitSet();
    for (const state of atn.states) {
      if (state instanceof StarLoopEntryState && state.precedenceRuleDecision) {
        this.pushRecursionContextStates.set(state.stateNumber);
      }
    }
    this.decisionToDFA = atn.decisionToState.map((ds, i) => {
      return new DFA(ds, i);
    });
    this.interpreter = new ParserATNSimulator(this, atn, this.decisionToDFA, this.sharedContextCache);
  }
  reset() {
    super.reset();
    this.overrideDecisionReached = false;
    this.overrideDecisionRoot = null;
  }
  get atn() {
    return this.#atn;
  }
  get vocabulary() {
    return this.#vocabulary;
  }
  get ruleNames() {
    return this.#ruleNames;
  }
  get grammarFileName() {
    return this.#grammarFileName;
  }
  get atnState() {
    return this.#atn.states[this.state];
  }
  parse(startRuleIndex) {
    const startRuleStartState = this.#atn.ruleToStartState[startRuleIndex];
    this.rootContext = this.createInterpreterRuleContext(null, ATNState.INVALID_STATE_NUMBER, startRuleIndex);
    if (startRuleStartState.isLeftRecursiveRule) {
      this.enterRecursionRule(this.rootContext, startRuleStartState.stateNumber, startRuleIndex, 0);
    } else {
      this.enterRule(this.rootContext, startRuleStartState.stateNumber, startRuleIndex);
    }
    while (true) {
      const p = this.atnState;
      switch (p.constructor.stateType) {
        case ATNState.RULE_STOP: {
          if (this.context?.isEmpty()) {
            if (startRuleStartState.isLeftRecursiveRule) {
              const result = this.context;
              const parentContext = this.parentContextStack.pop();
              this.unrollRecursionContexts(parentContext[0]);
              return result;
            } else {
              this.exitRule();
              return this.rootContext;
            }
          }
          this.visitRuleStopState(p);
          break;
        }
        default: {
          try {
            this.visitState(p);
          } catch (e) {
            if (e instanceof RecognitionException) {
              this.state = this.#atn.ruleToStopState[p.ruleIndex].stateNumber;
              this.errorHandler.reportError(this, e);
              this.recover(e);
            } else {
              throw e;
            }
          }
          break;
        }
      }
    }
  }
  addDecisionOverride(decision, tokenIndex, forcedAlt) {
    this.#overrideDecision = decision;
    this.#overrideDecisionInputIndex = tokenIndex;
    this.overrideDecisionAlt = forcedAlt;
  }
  get overrideDecision() {
    return this.#overrideDecision;
  }
  get overrideDecisionInputIndex() {
    return this.#overrideDecisionInputIndex;
  }
  enterRecursionRule(localctx, state, ruleIndex, precedence) {
    this.parentContextStack.push([this.context, localctx.invokingState]);
    super.enterRecursionRule(localctx, state, ruleIndex, precedence);
  }
  get serializedATN() {
    throw new Error("The ParserInterpreter does not support the serializedATN property.");
  }
  visitState(p) {
    let predictedAlt = 1;
    if (p instanceof DecisionState) {
      predictedAlt = this.visitDecisionState(p);
    }
    const transition = p.transitions[predictedAlt - 1];
    switch (transition.transitionType) {
      case Transition.EPSILON:
        if (this.pushRecursionContextStates.get(p.stateNumber) && !(transition.target.constructor.stateType === ATNState.LOOP_END)) {
          const parentContext = this.parentContextStack[this.parentContextStack.length - 1];
          const localctx = this.createInterpreterRuleContext(parentContext[0], parentContext[1], this.context.ruleIndex);
          this.pushNewRecursionContext(
            localctx,
            this.#atn.ruleToStartState[p.ruleIndex].stateNumber,
            this.context.ruleIndex
          );
        }
        break;
      case Transition.ATOM:
        this.match(transition.label.minElement);
        break;
      case Transition.RANGE:
      case Transition.SET:
      case Transition.NOT_SET:
        if (!transition.matches(this.inputStream.LA(1), Token.MIN_USER_TOKEN_TYPE, 65535)) {
          this.recoverInline();
        }
        this.matchWildcard();
        break;
      case Transition.WILDCARD:
        this.matchWildcard();
        break;
      case Transition.RULE:
        const ruleStartState = transition.target;
        const ruleIndex = ruleStartState.ruleIndex;
        const newContext = this.createInterpreterRuleContext(this.context, p.stateNumber, ruleIndex);
        if (ruleStartState.isLeftRecursiveRule) {
          this.enterRecursionRule(
            newContext,
            ruleStartState.stateNumber,
            ruleIndex,
            transition.precedence
          );
        } else {
          this.enterRule(newContext, transition.target.stateNumber, ruleIndex);
        }
        break;
      case Transition.PREDICATE:
        const predicateTransition = transition;
        if (!this.sempred(this.context, predicateTransition.ruleIndex, predicateTransition.predIndex)) {
          throw new FailedPredicateException(this);
        }
        break;
      case Transition.ACTION:
        const actionTransition = transition;
        this.action(this.context, actionTransition.ruleIndex, actionTransition.actionIndex);
        break;
      case Transition.PRECEDENCE:
        if (!this.precpred(this.context, transition.precedence)) {
          const precedence = transition.precedence;
          throw new FailedPredicateException(this, `precpred(_ctx, ${precedence})`);
        }
        break;
      default:
        throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.");
    }
    this.state = transition.target.stateNumber;
  }
  visitDecisionState(p) {
    let predictedAlt = 1;
    if (p.transitions.length > 1) {
      this.errorHandler.sync(this);
      const decision = p.decision;
      if (decision === this.#overrideDecision && this.inputStream.index === this.#overrideDecisionInputIndex && !this.overrideDecisionReached) {
        predictedAlt = this.overrideDecisionAlt;
        this.overrideDecisionReached = true;
      } else {
        predictedAlt = this.interpreter.adaptivePredict(this.inputStream, decision, this.context);
      }
    }
    return predictedAlt;
  }
  createInterpreterRuleContext(parent, invokingStateNumber, ruleIndex) {
    return new InterpreterRuleContext(ruleIndex, parent, invokingStateNumber);
  }
  visitRuleStopState(p) {
    const ruleStartState = this.#atn.ruleToStartState[p.ruleIndex];
    if (ruleStartState.isLeftRecursiveRule) {
      const [parentContext, state] = this.parentContextStack.pop();
      this.unrollRecursionContexts(parentContext);
      this.state = state;
    } else {
      this.exitRule();
    }
    const ruleTransition = this.#atn.states[this.state].transitions[0];
    this.state = ruleTransition.followState.stateNumber;
  }
  recover(e) {
    const i = this.inputStream.index;
    this.errorHandler.recover(this, e);
    if (this.inputStream.index === i) {
      const tok = e.offendingToken;
      if (!tok) {
        throw new Error("Expected exception to have an offending token");
      }
      const source = tok.tokenSource;
      const stream = source?.inputStream ?? null;
      const sourcePair = [source, stream];
      if (e instanceof InputMismatchException) {
        const expectedTokens = e.getExpectedTokens();
        if (!expectedTokens) {
          throw new Error("Expected the exception to provide expected tokens");
        }
        let expectedTokenType = Token.INVALID_TYPE;
        if (expectedTokens.length !== 0) {
          expectedTokenType = expectedTokens.minElement;
        }
        const errToken = this.getTokenFactory().create(
          sourcePair,
          expectedTokenType,
          tok.text,
          Token.DEFAULT_CHANNEL,
          -1,
          -1,
          tok.line,
          tok.column
        );
        this.context.addErrorNode(this.createErrorNode(this.context, errToken));
      } else {
        const errToken = this.getTokenFactory().create(
          sourcePair,
          Token.INVALID_TYPE,
          tok.text,
          Token.DEFAULT_CHANNEL,
          -1,
          -1,
          tok.line,
          tok.column
        );
        this.context.addErrorNode(this.createErrorNode(this.context, errToken));
      }
    }
  }
  recoverInline() {
    return this.errorHandler.recoverInline(this);
  }
};
var MultiMap = class extends Map {
  static {
    __name(this, "MultiMap");
  }
  map(key, value) {
    let elementsForKey = this.get(key);
    if (!elementsForKey) {
      elementsForKey = new Array();
      this.set(key, elementsForKey);
    }
    elementsForKey.push(value);
  }
  getPairs() {
    const pairs = new Array();
    for (const key of this.keys()) {
      const keys = this.get(key) ?? [];
      for (const value of keys) {
        pairs.push([key, value]);
      }
    }
    return pairs;
  }
  toString() {
    const entries = [];
    this.forEach((value, key) => {
      entries.push(`${key}=[${value.join(", ")}]`);
    });
    return `{${entries.join(", ")}}`;
  }
};
var CannotInvokeStartRuleError = class extends Error {
  static {
    __name(this, "CannotInvokeStartRuleError");
  }
  constructor(e) {
    super();
    this.cause = e;
  }
};
var RuleTagToken = class {
  static {
    __name(this, "RuleTagToken");
  }
  /** The name of the label associated with the rule tag. */
  label;
  /** The name of the parser rule associated with this rule tag. */
  ruleName;
  /**
   * The token type for the current token. This is the token type assigned to
   * the bypass alternative for the rule during ATN deserialization.
   */
  bypassTokenType;
  constructor(ruleName, bypassTokenType, label) {
    this.ruleName = ruleName;
    this.bypassTokenType = bypassTokenType;
    this.label = label;
  }
  /**
   * Rule tag tokens are always placed on the {@link #DEFAULT_CHANNEL}.
   */
  get channel() {
    return Token.DEFAULT_CHANNEL;
  }
  /**
   * This method returns the rule tag formatted with `<` and `>`
   * delimiters.
   */
  get text() {
    if (this.label !== void 0) {
      return "<" + this.label + ":" + this.ruleName + ">";
    }
    return "<" + this.ruleName + ">";
  }
  /**
   * Rule tag tokens have types assigned according to the rule bypass
   * transitions created during ATN deserialization.
   */
  get type() {
    return this.bypassTokenType;
  }
  /**
   * The implementation for {@link RuleTagToken} always returns 0.
   */
  get line() {
    return 0;
  }
  /**
   * The implementation for {@link RuleTagToken} always returns -1.
   */
  get column() {
    return -1;
  }
  /**
   * The implementation for {@link RuleTagToken} always returns -1.
   */
  get tokenIndex() {
    return -1;
  }
  /**
   * The implementation for {@link RuleTagToken} always returns -1.
   */
  get start() {
    return -1;
  }
  /**
   * The implementation for {@link RuleTagToken} always returns -1.
   */
  get stop() {
    return -1;
  }
  /**
   * The implementation for {@link RuleTagToken} always returns `null`.
   */
  get tokenSource() {
    return null;
  }
  /**
   * The implementation for {@link RuleTagToken} always returns `null`.
   */
  get inputStream() {
    return null;
  }
  /**
   * The implementation for {@link RuleTagToken} returns a string of the form
   * `ruleName:bypassTokenType`.
   */
  toString() {
    return this.ruleName + ":" + this.bypassTokenType;
  }
};
var StartRuleDoesNotConsumeFullPatternError = class extends Error {
  static {
    __name(this, "StartRuleDoesNotConsumeFullPatternError");
  }
};
var TagChunk = class extends Chunk {
  static {
    __name(this, "TagChunk");
  }
  tag;
  label;
  constructor(...args) {
    let label;
    let tag;
    if (args.length === 1) {
      tag = args[0];
    } else {
      label = args[0];
      tag = args[1];
    }
    super();
    if (!tag) {
      throw new Error("tag cannot be null or empty");
    }
    this.label = label;
    this.tag = tag;
  }
  /**
   * @returns a text representation of the tag chunk. Labeled tags
   * are returned in the form `label:tag`, and unlabeled tags are
   * returned as just the tag name.
   */
  toString() {
    if (this.label !== void 0) {
      return this.label + ":" + this.tag;
    }
    return this.tag;
  }
};
var TextChunk = class extends Chunk {
  static {
    __name(this, "TextChunk");
  }
  text;
  /**
   * Constructs a new instance of {@link TextChunk} with the specified text.
   *
   * @param text The text of this chunk.
   */
  constructor(text) {
    super();
    this.text = text;
  }
  /**
   * @returns the result of {@link #getText()} in single quotes.
   */
  toString() {
    return "'" + this.text + "'";
  }
};
var TokenTagToken = class extends CommonToken {
  static {
    __name(this, "TokenTagToken");
  }
  tokenName;
  /**
   * The name of the label associated with the rule tag, or undefined if this is an unlabeled rule tag.
   */
  label;
  constructor(tokenName, type, label) {
    super({ type, source: CommonToken.EMPTY_SOURCE });
    this.tokenName = tokenName;
    this.label = label;
  }
  /**
   *
   * @returns the token tag formatted with `<` and `>` delimiters.
   */
  get text() {
    if (this.label !== void 0) {
      return "<" + this.label + ":" + this.tokenName + ">";
    }
    return "<" + this.tokenName + ">";
  }
  /**
   * @returns a string of the form `tokenName:type`.
   */
  toString() {
    return this.tokenName + ":" + this.type;
  }
};
var ParseTreePatternMatcher = class {
  static {
    __name(this, "ParseTreePatternMatcher");
  }
  start = "<";
  stop = ">";
  escape = "\\";
  // e.g., \< and \> must escape BOTH!
  /**
   * This is the backing field for {@link #getLexer()}.
   */
  lexer;
  /**
   * This is the backing field for {@link #getParser()}.
   */
  parser;
  /**
   * Constructs a {@link ParseTreePatternMatcher} or from a {@link Lexer} and
   * {@link Parser} object. The lexer input stream is altered for tokenizing
   * the tree patterns. The parser is used as a convenient mechanism to get
   * the grammar name, plus token, rule names.
   */
  constructor(lexer, parser) {
    this.lexer = lexer;
    this.parser = parser;
  }
  /**
   * Set the delimiters used for marking rule and token tags within concrete
   * syntax used by the tree pattern parser.
   *
   * @param start The start delimiter.
   * @param stop The stop delimiter.
   * @param escapeLeft The escape sequence to use for escaping a start or stop delimiter.
   *
   * @throws Error if `start` is `null` or empty.
   * @throws Error if `stop` is `null` or empty.
   */
  setDelimiters(start, stop, escapeLeft) {
    if (start === null || start.length === 0) {
      throw new Error("start cannot be null or empty");
    }
    if (stop === null || stop.length === 0) {
      throw new Error("stop cannot be null or empty");
    }
    this.start = start;
    this.stop = stop;
    this.escape = escapeLeft;
  }
  matches(...args) {
    switch (args.length) {
      case 2: {
        const [tree, pattern] = args;
        const labels = new MultiMap();
        const mismatchedNode = this.matchImpl(tree, pattern.getPatternTree(), labels);
        return mismatchedNode === null;
      }
      case 3: {
        const [tree, pattern, patternRuleIndex] = args;
        const p = this.compile(pattern, patternRuleIndex);
        return this.matches(tree, p);
      }
      default: {
        throw new Error("Invalid number of arguments");
      }
    }
  }
  match(...args) {
    switch (args.length) {
      case 2: {
        const [tree, pattern] = args;
        const labels = new MultiMap();
        const mismatchedNode = this.matchImpl(tree, pattern.getPatternTree(), labels);
        return new ParseTreeMatch(tree, pattern, labels, mismatchedNode);
      }
      case 3: {
        const [tree, pattern, patternRuleIndex] = args;
        const p = this.compile(pattern, patternRuleIndex);
        return this.match(tree, p);
      }
      default: {
        throw new Error("Invalid number of arguments");
      }
    }
  }
  /**
   * For repeated use of a tree pattern, compile it to a
   * {@link ParseTreePattern} using this method.
   */
  compile(pattern, patternRuleIndex) {
    const tokenList = this.tokenize(pattern);
    const tokenSrc = new ListTokenSource(tokenList);
    const tokens = new CommonTokenStream(tokenSrc);
    const parserInterp = new ParserInterpreter(
      this.parser.grammarFileName,
      this.parser.vocabulary,
      this.parser.ruleNames,
      this.parser.getATNWithBypassAlts(),
      tokens
    );
    parserInterp.removeErrorListeners();
    let tree = null;
    try {
      parserInterp.errorHandler = new BailErrorStrategy();
      tree = parserInterp.parse(patternRuleIndex);
    } catch (error51) {
      if (error51 instanceof ParseCancellationException) {
        throw error51.cause;
      } else if (error51 instanceof RecognitionException) {
        throw error51;
      } else if (error51 instanceof Error) {
        throw new CannotInvokeStartRuleError(error51);
      } else {
        throw error51;
      }
    }
    if (tokens.LA(1) !== Token.EOF) {
      throw new StartRuleDoesNotConsumeFullPatternError();
    }
    return new ParseTreePattern(this, pattern, patternRuleIndex, tree);
  }
  /**
   * Used to convert the tree pattern string into a series of tokens. The
   * input stream is reset.
   */
  getLexer() {
    return this.lexer;
  }
  /**
   * Used to collect to the grammar file name, token names, rule names for
   * used to parse the pattern into a parse tree.
   */
  getParser() {
    return this.parser;
  }
  // ---- SUPPORT CODE ----
  tokenize(pattern) {
    const chunks = this.split(pattern);
    const tokens = new Array();
    for (const chunk of chunks) {
      if (chunk instanceof TagChunk) {
        const tagChunk = chunk;
        const char = tagChunk.tag[0];
        if (char === char.toUpperCase()) {
          const ttype = this.parser.getTokenType(tagChunk.tag);
          if (ttype === Token.INVALID_TYPE) {
            throw new Error("Unknown token " + tagChunk.tag + " in pattern: " + pattern);
          }
          const t = new TokenTagToken(tagChunk.tag, ttype, tagChunk.label);
          tokens.push(t);
        } else {
          if (char === char.toLowerCase()) {
            const ruleIndex = this.parser.getRuleIndex(tagChunk.tag);
            if (ruleIndex === -1) {
              throw new Error("Unknown rule " + tagChunk.tag + " in pattern: " + pattern);
            }
            const ruleImaginaryTokenType = this.parser.getATNWithBypassAlts().ruleToTokenType[ruleIndex];
            tokens.push(new RuleTagToken(tagChunk.tag, ruleImaginaryTokenType, tagChunk.label));
          } else {
            throw new Error("invalid tag: " + tagChunk.tag + " in pattern: " + pattern);
          }
        }
      } else {
        const textChunk = chunk;
        const input = CharStream.fromString(textChunk.text);
        this.lexer.inputStream = input;
        let t = this.lexer.nextToken();
        while (t.type !== Token.EOF) {
          tokens.push(t);
          t = this.lexer.nextToken();
        }
      }
    }
    return tokens;
  }
  /**
   * Split `<ID> = <e:expr> ;` into 4 chunks for tokenizing by {@link #tokenize}.
   */
  split(pattern) {
    let p = 0;
    const n2 = pattern.length;
    const chunks = new Array();
    const starts = new Array();
    const stops = new Array();
    while (p < n2) {
      if (p === pattern.indexOf(this.escape + this.start, p)) {
        p += this.escape.length + this.start.length;
      } else {
        if (p === pattern.indexOf(this.escape + this.stop, p)) {
          p += this.escape.length + this.stop.length;
        } else {
          if (p === pattern.indexOf(this.start, p)) {
            starts.push(p);
            p += this.start.length;
          } else {
            if (p === pattern.indexOf(this.stop, p)) {
              stops.push(p);
              p += this.stop.length;
            } else {
              p++;
            }
          }
        }
      }
    }
    if (starts.length > stops.length) {
      throw new Error("unterminated tag in pattern: " + pattern);
    }
    if (starts.length < stops.length) {
      throw new Error("missing start tag in pattern: " + pattern);
    }
    const tagCount = starts.length;
    for (let i = 0; i < tagCount; i++) {
      if (starts[i] >= stops[i]) {
        throw new Error("tag delimiters out of order in pattern: " + pattern);
      }
    }
    if (tagCount === 0) {
      const text = pattern.substring(0, n2);
      chunks.push(new TextChunk(text));
    }
    if (tagCount > 0 && starts[0] > 0) {
      const text = pattern.substring(0, starts[0]);
      chunks.push(new TextChunk(text));
    }
    for (let i = 0; i < tagCount; i++) {
      const tag = pattern.substring(starts[i] + this.start.length, stops[i]);
      let ruleOrToken = tag;
      let label;
      const colon = tag.indexOf(":");
      if (colon >= 0) {
        label = tag.substring(0, colon);
        ruleOrToken = tag.substring(colon + 1, tag.length);
      }
      chunks.push(new TagChunk(label, ruleOrToken));
      if (i + 1 < tagCount) {
        const text = pattern.substring(stops[i] + this.stop.length, starts[i + 1]);
        chunks.push(new TextChunk(text));
      }
    }
    if (tagCount > 0) {
      const afterLastTag = stops[tagCount - 1] + this.stop.length;
      if (afterLastTag < n2) {
        const text = pattern.substring(afterLastTag, n2);
        chunks.push(new TextChunk(text));
      }
    }
    for (let i = 0; i < chunks.length; i++) {
      const c = chunks[i];
      if (c instanceof TextChunk) {
        const tc = c;
        const unescaped = tc.text.replaceAll(this.escape, "");
        if (unescaped.length < tc.text.length) {
          chunks[i] = new TextChunk(unescaped);
        }
      }
    }
    return chunks;
  }
  /**
   * Recursively walk `tree` against `patternTree`, filling
   * `match.`{@link ParseTreeMatch#labels labels}.
   *
   * @returns the first node encountered in `tree` which does not match
   * a corresponding node in `patternTree`, or `null` if the match
   * was successful. The specific node returned depends on the matching
   * algorithm used by the implementation, and may be overridden.
   */
  matchImpl(tree, patternTree, labels) {
    if (tree instanceof TerminalNode && patternTree instanceof TerminalNode) {
      const t1 = tree;
      const t2 = patternTree;
      let mismatchedNode;
      if (t1.getSymbol().type === t2.getSymbol().type) {
        if (t2.getSymbol() instanceof TokenTagToken) {
          const tokenTagToken = t2.getSymbol();
          labels.map(tokenTagToken.tokenName, tree);
          if (tokenTagToken.label !== void 0) {
            labels.map(tokenTagToken.label, tree);
          }
        } else {
          if (t1.getText() === t2.getText()) {
          } else {
            if (!mismatchedNode) {
              mismatchedNode = t1;
            }
          }
        }
      } else {
        if (!mismatchedNode) {
          mismatchedNode = t1;
        }
      }
      return mismatchedNode;
    }
    if (tree instanceof ParserRuleContext && patternTree instanceof ParserRuleContext) {
      let mismatchedNode;
      const ruleTagToken = this.getRuleTagToken(patternTree);
      if (ruleTagToken) {
        if (tree.ruleIndex === patternTree.ruleIndex) {
          labels.map(ruleTagToken.ruleName, tree);
          if (ruleTagToken.label) {
            labels.map(ruleTagToken.label, tree);
          }
        } else {
          if (!mismatchedNode) {
            mismatchedNode = tree;
          }
        }
        return mismatchedNode;
      }
      if (tree.getChildCount() !== patternTree.getChildCount()) {
        if (!mismatchedNode) {
          mismatchedNode = tree;
        }
        return mismatchedNode;
      }
      const n2 = tree.getChildCount();
      for (let i = 0; i < n2; i++) {
        const childMatch = this.matchImpl(tree.getChild(i), patternTree.getChild(i), labels);
        if (childMatch) {
          return childMatch;
        }
      }
      return mismatchedNode;
    }
    return tree;
  }
  /**
   * Is `t` `(expr <expr>)` subtree?
   */
  getRuleTagToken(t) {
    if (t instanceof ParserRuleContext) {
      if (t.getChildCount() === 1 && t.getChild(0) instanceof TerminalNode) {
        const c = t.getChild(0);
        if (c.getSymbol() instanceof RuleTagToken) {
          return c.getSymbol();
        }
      }
    }
    return void 0;
  }
};
var DiagnosticErrorListener = class extends BaseErrorListener {
  static {
    __name(this, "DiagnosticErrorListener");
  }
  /**
   * When `true`, only exactly known ambiguities are reported.
   */
  exactOnly;
  constructor(exactOnly) {
    super();
    this.exactOnly = exactOnly ?? true;
  }
  reportAmbiguity = /* @__PURE__ */ __name((recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) => {
    if (this.exactOnly && !exact) {
      return;
    }
    const decision = this.getDecisionDescription(recognizer, dfa);
    const conflictingAlts = this.getConflictingAlts(ambigAlts, configs);
    const text = recognizer.tokenStream?.getTextFromInterval(Interval.of(startIndex, stopIndex));
    const message = `reportAmbiguity d=${decision}: ambigAlts=${conflictingAlts}, input='${text}'`;
    recognizer.notifyErrorListeners(message, null, null);
  }, "reportAmbiguity");
  reportAttemptingFullContext = /* @__PURE__ */ __name((recognizer, dfa, startIndex, stopIndex, _conflictingAlts, _configs) => {
    const decision = this.getDecisionDescription(recognizer, dfa);
    const text = recognizer.tokenStream?.getTextFromInterval(Interval.of(startIndex, stopIndex));
    const message = `reportAttemptingFullContext d=${decision}, input='${text}'`;
    recognizer.notifyErrorListeners(message, null, null);
  }, "reportAttemptingFullContext");
  reportContextSensitivity = /* @__PURE__ */ __name((recognizer, dfa, startIndex, stopIndex, _prediction, _configs) => {
    const decision = this.getDecisionDescription(recognizer, dfa);
    const text = recognizer.tokenStream?.getTextFromInterval(Interval.of(startIndex, stopIndex));
    const message = `reportContextSensitivity d=${decision}, input='${text}'`;
    recognizer.notifyErrorListeners(message, null, null);
  }, "reportContextSensitivity");
  getDecisionDescription = /* @__PURE__ */ __name((recognizer, dfa) => {
    const decision = dfa.decision;
    const ruleIndex = dfa.atnStartState.ruleIndex;
    const ruleNames = recognizer.ruleNames;
    if (ruleIndex < 0 || ruleIndex >= ruleNames.length) {
      return decision.toString();
    }
    const ruleName = ruleNames[ruleIndex];
    if (ruleName.length === 0) {
      return decision.toString();
    }
    return `${decision} (${ruleName})`;
  }, "getDecisionDescription");
  /**
   * Computes the set of conflicting or ambiguous alternatives from a
   * configuration set, if that information was not already provided by the
   * parser.
   *
   * @param reportedAlts The set of conflicting or ambiguous alternatives, as
   * reported by the parser.
   * @param configs The conflicting or ambiguous configuration set.
   * @returns Returns `reportedAlts` if it is not `null`, otherwise
   * returns the set of alternatives represented in `configs`.
   */
  getConflictingAlts = /* @__PURE__ */ __name((reportedAlts, configs) => {
    if (reportedAlts) {
      return reportedAlts;
    }
    const result = new BitSet();
    for (let i = 0; i < configs.configs.length; i++) {
      result.set(configs.configs[i].alt);
    }
    return result;
  }, "getConflictingAlts");
};
var LexerInterpreter = class extends Lexer {
  static {
    __name(this, "LexerInterpreter");
  }
  decisionToDFA;
  sharedContextCache = new PredictionContextCache();
  #grammarFileName;
  #atn;
  #ruleNames;
  #channelNames;
  #modeNames;
  #vocabulary;
  constructor(grammarFileName, vocabulary, ruleNames, channelNames, modeNames, atn, input) {
    super(input);
    if (atn.grammarType !== ATN.LEXER) {
      throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");
    }
    this.#grammarFileName = grammarFileName;
    this.#atn = atn;
    this.#ruleNames = ruleNames.slice(0);
    this.#channelNames = channelNames.slice(0);
    this.#modeNames = modeNames.slice(0);
    this.#vocabulary = vocabulary;
    this.decisionToDFA = atn.decisionToState.map((ds, i) => {
      return new DFA(ds, i);
    });
    this.interpreter = new LexerATNSimulator(this, atn, this.decisionToDFA, this.sharedContextCache);
  }
  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;
  }
  get serializedATN() {
    throw new Error("The LexerInterpreter does not support the serializedATN property.");
  }
};
var RuntimeMetaData = class _RuntimeMetaData {
  static {
    __name(this, "RuntimeMetaData");
  }
  /**
   * A compile-time constant containing the current version of the ANTLR 4
   * runtime library.
   *
   * This compile-time constant value allows generated parsers and other
   * libraries to include a literal reference to the version of the ANTLR 4
   * runtime library the code was compiled against. At each release, we
   * change this value.
   *
   * Version numbers are assumed to have the form
   *
   * major.minor.patch.revision-suffix,
   *
   * with the individual components defined as follows.
   *
   * - major is a required non-negative integer, and is equal to `4` for ANTLR 4.
   * - minor is a required non-negative integer.
   * - patch is an optional non-negative integer. When patch is omitted, the `.` (dot) appearing before it is
   *   also omitted.
   * - revision is an optional non-negative integer, and may only be included when patch is also included.
   *   When revision is omitted, the `.` (dot) appearing before it is also omitted.
   * - suffix is an optional string. When suffix is omitted, the `-` (hyphen-minus) appearing before it is also
   *   omitted.
   */
  static VERSION = "4.13.1";
  /**
   * Gets the currently executing version of the ANTLR 4 runtime library.
   *
   * This method provides runtime access to the {@link VERSION} field, as
   * opposed to directly referencing the field as a compile-time constant.
   *
   * @returns The currently executing version of the ANTLR 4 library
   */
  static getRuntimeVersion() {
    return _RuntimeMetaData.VERSION;
  }
  /**
   * This method provides the ability to detect mismatches between the version
   * of ANTLR 4 used to generate a parser, the version of the ANTLR runtime a
   * parser was compiled against, and the version of the ANTLR runtime which
   * is currently executing.
   *
   * The version check is designed to detect the following two specific
   * scenarios.
   *
   * - The ANTLR Tool version used for code generation does not match the
   * currently executing runtime version.
   * - The ANTLR Runtime version referenced at the time a parser was
   * compiled does not match the currently executing runtime version.
   *
   *
   * Starting with ANTLR 4.3, the code generator emits a call to this method
   * using two constants in each generated lexer and parser: a hard-coded
   * constant indicating the version of the tool used to generate the parser
   * and a reference to the compile-time constant {@link VERSION}. At
   * runtime, this method is called during the initialization of the generated
   * parser to detect mismatched versions, and notify the registered listeners
   * prior to creating instances of the parser.
   *
   *
   * This method does not perform any detection or filtering of semantic
   * changes between tool and runtime versions. It simply checks for a
   * version match and emits an error to stderr if a difference
   * is detected.
   *
   *
   * Note that some breaking changes between releases could result in other
   * types of runtime exceptions, such as a {@link LinkageError}, prior to
   * calling this method. In these cases, the underlying version mismatch will
   * not be reported here. This method is primarily intended to
   * notify users of potential semantic changes between releases that do not
   * result in binary compatibility problems which would be detected by the
   * class loader. As with semantic changes, changes that break binary
   * compatibility between releases are mentioned in the release notes
   * accompanying the affected release.
   *
   *
   * **Additional note for target developers:** The version check
   * implemented by this class is designed to address specific compatibility
   * concerns that may arise during the execution of Java applications. Other
   * targets should consider the implementation of this method in the context
   * of that target's known execution environment, which may or may not
   * resemble the design provided for the Java target.
   *
   * @param generatingToolVersion The version of the tool used to generate a parser.
   * This value may be null when called from user code that was not generated
   * by, and does not reference, the ANTLR 4 Tool itself.
   * @param compileTimeVersion The version of the runtime the parser was
   * compiled against. This should always be passed using a direct reference
   * to {@link VERSION}.
   */
  static checkVersion(generatingToolVersion, compileTimeVersion) {
    const runtimeVersion = _RuntimeMetaData.VERSION;
    let runtimeConflictsWithGeneratingTool = false;
    let runtimeConflictsWithCompileTimeTool = false;
    runtimeConflictsWithGeneratingTool = runtimeVersion !== generatingToolVersion && _RuntimeMetaData.getMajorMinorVersion(runtimeVersion) !== _RuntimeMetaData.getMajorMinorVersion(generatingToolVersion);
    runtimeConflictsWithCompileTimeTool = runtimeVersion !== compileTimeVersion && _RuntimeMetaData.getMajorMinorVersion(runtimeVersion) !== _RuntimeMetaData.getMajorMinorVersion(compileTimeVersion);
    if (runtimeConflictsWithGeneratingTool) {
      console.error(`ANTLR Tool version ${generatingToolVersion} used for code generation does not match the current runtime version ${runtimeVersion}`);
    }
    if (runtimeConflictsWithCompileTimeTool) {
      console.error(`ANTLR Runtime version ${compileTimeVersion} used for parser compilation does not match the current runtime version ${runtimeVersion}`);
    }
  }
  /**
   * Gets the major and minor version numbers from a version string. For
   * details about the syntax of the input `version`.
   * E.g., from x.y.z return x.y.
   *
   * @param version The complete version string.
   * @returns A string of the form *major*.*minor* containing
   * only the major and minor components of the version string.
   */
  static getMajorMinorVersion(version2) {
    const firstDot = version2.indexOf(".");
    const secondDot = firstDot >= 0 ? version2.indexOf(".", firstDot + 1) : -1;
    const firstDash = version2.indexOf("-");
    let referenceLength = version2.length;
    if (secondDot >= 0) {
      referenceLength = Math.min(referenceLength, secondDot);
    }
    if (firstDash >= 0) {
      referenceLength = Math.min(referenceLength, firstDash);
    }
    return version2.substring(0, referenceLength);
  }
};
var TokenStreamRewriter = class _TokenStreamRewriter {
  static {
    __name(this, "TokenStreamRewriter");
  }
  static DEFAULT_PROGRAM_NAME = "default";
  static PROGRAM_INIT_SIZE = 100;
  static MIN_TOKEN_INDEX = 0;
  /** Our source stream */
  tokens;
  /**
   * You may have multiple, named streams of rewrite operations.
   *  I'm calling these things "programs."
   *  Maps String (name) -> rewrite (List)
   */
  programs = /* @__PURE__ */ new Map();
  /** Map String (program name) -> Integer index */
  lastRewriteTokenIndexes;
  /**
   * @param tokens The token stream to modify
   */
  constructor(tokens) {
    this.tokens = tokens;
  }
  getTokenStream() {
    return this.tokens;
  }
  /**
   * Insert the supplied text after the specified token (or token index)
   */
  insertAfter(tokenOrIndex, text, programName = _TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {
    let index2;
    if (typeof tokenOrIndex === "number") {
      index2 = tokenOrIndex;
    } else {
      index2 = tokenOrIndex.tokenIndex;
    }
    const rewrites = this.getProgram(programName);
    const op = new InsertAfterOp(this.tokens, index2, rewrites.length, text);
    rewrites.push(op);
  }
  /**
   * Insert the supplied text before the specified token (or token index)
   */
  insertBefore(tokenOrIndex, text, programName = _TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {
    let index2;
    if (typeof tokenOrIndex === "number") {
      index2 = tokenOrIndex;
    } else {
      index2 = tokenOrIndex.tokenIndex;
    }
    const rewrites = this.getProgram(programName);
    const op = new InsertBeforeOp(this.tokens, index2, rewrites.length, text);
    rewrites.push(op);
  }
  /**
   * Replace the specified token with the supplied text
   */
  replaceSingle(tokenOrIndex, text, programName = _TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {
    this.replace(tokenOrIndex, tokenOrIndex, text, programName);
  }
  /**
   * Replace the specified range of tokens with the supplied text.
   */
  replace(from, to, text, programName = _TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {
    if (typeof from !== "number") {
      from = from.tokenIndex;
    }
    if (typeof to !== "number") {
      to = to.tokenIndex;
    }
    if (from > to || from < 0 || to < 0 || to >= this.tokens.size) {
      throw new RangeError(`replace: range invalid: ${from}..${to}(size=${this.tokens.size})`);
    }
    const rewrites = this.getProgram(programName);
    const op = new ReplaceOp(this.tokens, from, to, rewrites.length, text);
    rewrites.push(op);
  }
  /**
   * Delete the specified range of tokens
   */
  delete(from, to, programName = _TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {
    if (to == null) {
      to = from;
    }
    this.replace(from, to, null, programName);
  }
  getProgram(name) {
    let is = this.programs.get(name);
    if (is == null) {
      is = this.initializeProgram(name);
    }
    return is;
  }
  initializeProgram(name) {
    const is = [];
    this.programs.set(name, is);
    return is;
  }
  /**
   * @returns the text from the original tokens altered per the instructions given to this rewriter
   */
  getText(intervalOrProgram, programName = _TokenStreamRewriter.DEFAULT_PROGRAM_NAME) {
    let interval;
    if (intervalOrProgram instanceof Interval) {
      interval = intervalOrProgram;
    } else {
      interval = new Interval(0, this.tokens.size - 1);
    }
    if (typeof intervalOrProgram === "string") {
      programName = intervalOrProgram;
    }
    const rewrites = this.programs.get(programName);
    let start = interval.start;
    let stop = interval.stop;
    if (stop > this.tokens.size - 1) {
      stop = this.tokens.size - 1;
    }
    if (start < 0) {
      start = 0;
    }
    if (rewrites == null || rewrites.length === 0) {
      return this.tokens.getTextFromInterval(new Interval(start, stop));
    }
    const buf = [];
    const indexToOp = this.reduceToSingleOperationPerIndex(rewrites);
    let i = start;
    while (i <= stop && i < this.tokens.size) {
      const op = indexToOp.get(i);
      indexToOp.delete(i);
      const t = this.tokens.get(i);
      if (op == null) {
        if (t.type !== Token.EOF) {
          buf.push(String(t.text));
        }
        i++;
      } else {
        i = op.execute(buf);
      }
    }
    if (stop === this.tokens.size - 1) {
      for (const op of indexToOp.values()) {
        if (op && op.index >= this.tokens.size - 1) {
          buf.push(String(op.text));
        }
      }
    }
    return buf.join("");
  }
  /**
   * @returns a map from token index to operation
   */
  reduceToSingleOperationPerIndex(rewrites) {
    for (let i = 0; i < rewrites.length; i++) {
      const op = rewrites[i];
      if (op == null) {
        continue;
      }
      if (!(op instanceof ReplaceOp)) {
        continue;
      }
      const rop = op;
      const inserts = this.getKindOfOps(rewrites, InsertBeforeOp, i);
      for (const iop of inserts) {
        if (iop.index === rop.index) {
          rewrites[iop.instructionIndex] = null;
          rop.text = String(iop.text) + (rop.text != null ? rop.text.toString() : "");
        } else if (iop.index > rop.index && iop.index <= rop.lastIndex) {
          rewrites[iop.instructionIndex] = null;
        }
      }
      const prevReplaces = this.getKindOfOps(rewrites, ReplaceOp, i);
      for (const prevRop of prevReplaces) {
        if (prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex) {
          rewrites[prevRop.instructionIndex] = null;
          continue;
        }
        const disjoint = prevRop.lastIndex < rop.index || prevRop.index > rop.lastIndex;
        if (prevRop.text == null && rop.text == null && !disjoint) {
          rewrites[prevRop.instructionIndex] = null;
          rop.index = Math.min(prevRop.index, rop.index);
          rop.lastIndex = Math.max(prevRop.lastIndex, rop.lastIndex);
        } else if (!disjoint) {
          throw new Error(`replace op boundaries of ${rop} overlap with previous ${prevRop}`);
        }
      }
    }
    for (let i = 0; i < rewrites.length; i++) {
      const op = rewrites[i];
      if (op == null) {
        continue;
      }
      if (!(op instanceof InsertBeforeOp)) {
        continue;
      }
      const iop = op;
      const prevInserts = this.getKindOfOps(rewrites, InsertBeforeOp, i);
      for (const prevIop of prevInserts) {
        if (prevIop.index === iop.index) {
          if (prevIop instanceof InsertAfterOp) {
            iop.text = this.catOpText(prevIop.text, iop.text);
            rewrites[prevIop.instructionIndex] = null;
          } else if (prevIop instanceof InsertBeforeOp) {
            iop.text = this.catOpText(iop.text, prevIop.text);
            rewrites[prevIop.instructionIndex] = null;
          }
        }
      }
      const prevReplaces = this.getKindOfOps(rewrites, ReplaceOp, i);
      for (const rop of prevReplaces) {
        if (iop.index === rop.index) {
          rop.text = this.catOpText(iop.text, rop.text);
          rewrites[i] = null;
          continue;
        }
        if (iop.index >= rop.index && iop.index <= rop.lastIndex) {
          throw new Error(`insert op ${iop} within boundaries of previous ${rop}`);
        }
      }
    }
    const m2 = /* @__PURE__ */ new Map();
    for (const op of rewrites) {
      if (op == null) {
        continue;
      }
      if (m2.get(op.index) != null) {
        throw new Error("should only be one op per index");
      }
      m2.set(op.index, op);
    }
    return m2;
  }
  catOpText(a, b) {
    let x = "";
    let y = "";
    if (a != null) {
      x = a.toString();
    }
    if (b != null) {
      y = b.toString();
    }
    return x + y;
  }
  /**
   * Get all operations before an index of a particular kind
   */
  getKindOfOps(rewrites, kind, before) {
    return rewrites.slice(0, before).filter((op) => {
      return op && op instanceof kind;
    });
  }
};
var RewriteOperation = class {
  static {
    __name(this, "RewriteOperation");
  }
  /** What index into rewrites List are we? */
  instructionIndex;
  /** Token buffer index. */
  index;
  text;
  tokens;
  constructor(tokens, index2, instructionIndex, text) {
    this.tokens = tokens;
    this.instructionIndex = instructionIndex;
    this.index = index2;
    this.text = text === void 0 ? "" : text;
  }
  execute(_buf) {
    return this.index;
  }
  toString() {
    return "<RewriteOperation@" + this.tokens.get(this.index) + ':"' + this.text + '">';
  }
};
var InsertBeforeOp = class extends RewriteOperation {
  static {
    __name(this, "InsertBeforeOp");
  }
  constructor(tokens, index2, instructionIndex, text) {
    super(tokens, index2, instructionIndex, text);
  }
  /**
   * @returns the index of the next token to operate on
   */
  execute(buf) {
    if (this.text) {
      buf.push(this.text.toString());
    }
    if (this.tokens.get(this.index).type !== Token.EOF) {
      buf.push(String(this.tokens.get(this.index).text));
    }
    return this.index + 1;
  }
  toString() {
    return "<InsertBeforeOp@" + this.tokens.get(this.index) + ':"' + this.text + '">';
  }
};
var InsertAfterOp = class extends InsertBeforeOp {
  static {
    __name(this, "InsertAfterOp");
  }
  constructor(tokens, index2, instructionIndex, text) {
    super(tokens, index2 + 1, instructionIndex, text);
  }
  toString() {
    return "<InsertAfterOp@" + this.tokens.get(this.index) + ':"' + this.text + '">';
  }
};
var ReplaceOp = class extends RewriteOperation {
  static {
    __name(this, "ReplaceOp");
  }
  lastIndex;
  constructor(tokens, from, to, instructionIndex, text) {
    super(tokens, from, instructionIndex, text);
    this.lastIndex = to;
  }
  /**
   * @returns the index of the next token to operate on
   */
  execute(buf) {
    if (this.text) {
      buf.push(this.text.toString());
    }
    return this.lastIndex + 1;
  }
  toString() {
    if (this.text == null) {
      return "<DeleteOp@" + this.tokens.get(this.index) + ".." + this.tokens.get(this.lastIndex) + ">";
    }
    return "<ReplaceOp@" + this.tokens.get(this.index) + ".." + this.tokens.get(this.lastIndex) + ':"' + this.text + '">';
  }
};
var UnbufferedTokenStream = class {
  static {
    __name(this, "UnbufferedTokenStream");
  }
  tokenSource;
  /**
   * A moving window buffer of the data being scanned. While there's a marker,
   * we keep adding to buffer. Otherwise, {@link #consume consume()} resets so
   * we start filling at index 0 again.
   */
  tokens;
  /**
   * The number of tokens currently in {@link #tokens tokens}.
   *
   * This is not the buffer capacity, that's `tokens.length`.
   */
  n;
  /**
   * 0..n-1 index into {@link #tokens tokens} of next token.
   *
   * The `LT(1)` token is `tokens[p]`. If `p == n`, we are
   * out of buffered tokens.
   */
  p = 0;
  /**
   * Count up with {@link #mark mark()} and down with
   * {@link #release release()}. When we `release()` the last mark,
   * `numMarkers` reaches 0 and we reset the buffer. Copy
   * `tokens[p]..tokens[n-1]` to `tokens[0]..tokens[(n-1)-p]`.
   */
  numMarkers = 0;
  /**
   * This is the `LT(-1)` token for the current position.
   */
  lastToken;
  /**
   * When `numMarkers > 0`, this is the `LT(-1)` token for the
   * first token in {@link #tokens}. Otherwise, this is `null`.
   */
  lastTokenBufferStart;
  /**
   * Absolute token index. It's the index of the token about to be read via
   * `LT(1)`. Goes from 0 to the number of tokens in the entire stream,
   * although the stream size is unknown before the end is reached.
   *
   * This value is used to set the token indexes if the stream provides tokens
   * that implement {@link WritableToken}.
   */
  currentTokenIndex = 0;
  constructor(tokenSource, bufferSize) {
    this.tokenSource = tokenSource;
    bufferSize = bufferSize ?? 256;
    this.tokens = new Array(bufferSize);
    this.n = 0;
    this.fill(1);
  }
  get(i) {
    const bufferStartIndex = this.getBufferStartIndex();
    if (i < bufferStartIndex || i >= bufferStartIndex + this.n) {
      throw new Error("get(" + i + ") outside buffer: " + bufferStartIndex + ".." + (bufferStartIndex + this.n));
    }
    return this.tokens[i - bufferStartIndex];
  }
  // eslint-disable-next-line @typescript-eslint/naming-convention
  LT(i) {
    if (i === -1) {
      return this.lastToken;
    }
    this.sync(i);
    const index2 = this.p + i - 1;
    if (index2 < 0) {
      throw new Error("LT(" + i + ") gives negative index");
    }
    if (index2 >= this.n) {
      return this.tokens[this.n - 1];
    }
    return this.tokens[index2];
  }
  // eslint-disable-next-line @typescript-eslint/naming-convention
  LA(i) {
    return this.LT(i).type;
  }
  getText() {
    return "";
  }
  getTextFromContext(ctx2) {
    return this.getTextFromInterval(ctx2.getSourceInterval());
  }
  getTextFromInterval(interval) {
    const bufferStartIndex = this.getBufferStartIndex();
    const bufferStopIndex = bufferStartIndex + this.tokens.length - 1;
    const start = interval.start;
    const stop = interval.stop;
    if (start < bufferStartIndex || stop > bufferStopIndex) {
      throw new Error("interval " + interval + " not in token buffer window: " + bufferStartIndex + ".." + bufferStopIndex);
    }
    const a = start - bufferStartIndex;
    const b = stop - bufferStartIndex;
    let result = "";
    for (let i = a; i <= b; i++) {
      const t = this.tokens[i];
      result += t.text;
    }
    return result;
  }
  getTextFromRange(start, stop) {
    return this.getTextFromInterval(Interval.of(start.tokenIndex, stop.tokenIndex));
  }
  consume() {
    if (this.LA(1) === Token.EOF) {
      throw new Error("cannot consume EOF");
    }
    this.lastToken = this.tokens[this.p];
    if (this.p === this.n - 1 && this.numMarkers === 0) {
      this.n = 0;
      this.p = -1;
      this.lastTokenBufferStart = this.lastToken;
    }
    this.p++;
    this.currentTokenIndex++;
    this.sync(1);
  }
  /**
   * Return a marker that we can release later.
   *
   * The specific marker value used for this class allows for some level of
   * protection against misuse where `seek()` is called on a mark or
   * `release()` is called in the wrong order.
   */
  mark() {
    if (this.numMarkers === 0) {
      this.lastTokenBufferStart = this.lastToken;
    }
    const mark = -this.numMarkers - 1;
    this.numMarkers++;
    return mark;
  }
  release(marker) {
    const expectedMark = -this.numMarkers;
    if (marker !== expectedMark) {
      throw new Error("release() called with an invalid marker.");
    }
    this.numMarkers--;
    if (this.numMarkers === 0) {
      if (this.p > 0) {
        this.tokens.copyWithin(0, this.p, this.n);
        this.n = this.n - this.p;
        this.p = 0;
      }
      this.lastTokenBufferStart = this.lastToken;
    }
  }
  get index() {
    return this.currentTokenIndex;
  }
  seek(index2) {
    if (index2 === this.currentTokenIndex) {
      return;
    }
    if (index2 > this.currentTokenIndex) {
      this.sync(index2 - this.currentTokenIndex);
      index2 = Math.min(index2, this.getBufferStartIndex() + this.n - 1);
    }
    const bufferStartIndex = this.getBufferStartIndex();
    const i = index2 - bufferStartIndex;
    if (i < 0) {
      throw new Error("cannot seek to negative index " + index2);
    } else {
      if (i >= this.n) {
        throw new Error("seek to index outside buffer: " + index2 + " not in " + bufferStartIndex + ".." + (bufferStartIndex + this.n));
      }
    }
    this.p = i;
    this.currentTokenIndex = index2;
    if (this.p === 0) {
      this.lastToken = this.lastTokenBufferStart;
    } else {
      this.lastToken = this.tokens[this.p - 1];
    }
  }
  get size() {
    throw new Error("Unbuffered stream cannot know its size");
  }
  getSourceName() {
    return this.tokenSource.sourceName;
  }
  setLine(line) {
    this.tokenSource.line = line;
  }
  setColumn(column) {
    this.tokenSource.column = column;
  }
  /**
   * Make sure we have 'need' elements from current position {@link #p p}. Last valid
   * `p` index is `tokens.length-1`.  `p+need-1` is the tokens index 'need' elements
   * ahead.  If we need 1 element, `(p+1-1)==p` must be less than `tokens.length`.
   */
  sync(want) {
    const need = this.p + want - 1 - this.n + 1;
    if (need > 0) {
      this.fill(need);
    }
  }
  /**
   * Add `n` elements to the buffer. Returns the number of tokens
   * actually added to the buffer. If the return value is less than `n`,
   * then EOF was reached before `n` tokens could be added.
   */
  fill(n2) {
    for (let i = 0; i < n2; i++) {
      if (this.n > 0 && this.tokens[this.n - 1].type === Token.EOF) {
        return i;
      }
      const t = this.tokenSource.nextToken();
      this.add(t);
    }
    return n2;
  }
  add(t) {
    if (this.n >= this.tokens.length) {
      this.tokens.length = this.tokens.length * 2;
    }
    if (isWritableToken(t)) {
      t.setTokenIndex(this.getBufferStartIndex() + this.n);
    }
    this.tokens[this.n++] = t;
  }
  getBufferStartIndex() {
    return this.currentTokenIndex - this.p;
  }
};

// server/src/generated/SysMLv2Lexer.ts
var SysMLv2Lexer = class _SysMLv2Lexer extends Lexer {
  static ABOUT = 1;
  static ABSTRACT = 2;
  static ACCEPT = 3;
  static ACTION = 4;
  static ACTOR = 5;
  static AFTER = 6;
  static ALIAS = 7;
  static ALL = 8;
  static ALLOCATE = 9;
  static ALLOCATION = 10;
  static ANALYSIS = 11;
  static AND = 12;
  static AS = 13;
  static ASSERT = 14;
  static ASSIGN = 15;
  static ASSOC = 16;
  static ASSUME = 17;
  static AT = 18;
  static ATTRIBUTE = 19;
  static BEHAVIOR = 20;
  static BIND = 21;
  static BINDING = 22;
  static BOOL = 23;
  static BY = 24;
  static CALC = 25;
  static CASE = 26;
  static CHAINS = 27;
  static CLASS = 28;
  static CLASSIFIER = 29;
  static COMMENT = 30;
  static COMPOSITE = 31;
  static CONCERN = 32;
  static CONJUGATE = 33;
  static CONJUGATES = 34;
  static CONJUGATION = 35;
  static CONNECT = 36;
  static CONNECTION = 37;
  static CONNECTOR = 38;
  static CONST = 39;
  static CONSTANT = 40;
  static CONSTRAINT = 41;
  static CROSSES = 42;
  static DATATYPE = 43;
  static DECIDE = 44;
  static DEF = 45;
  static DEFAULT = 46;
  static DEFINED = 47;
  static DEPENDENCY = 48;
  static DERIVED = 49;
  static DIFFERENCES = 50;
  static DISJOINING = 51;
  static DISJOINT = 52;
  static DO = 53;
  static DOC = 54;
  static ELSE = 55;
  static END = 56;
  static ENTRY = 57;
  static ENUM = 58;
  static EVENT = 59;
  static EXHIBIT = 60;
  static EXIT = 61;
  static EXPOSE = 62;
  static EXPR = 63;
  static FALSE = 64;
  static FEATURE = 65;
  static FEATURED = 66;
  static FEATURING = 67;
  static FILTER = 68;
  static FIRST = 69;
  static FLOW = 70;
  static FOR = 71;
  static FORK = 72;
  static FRAME = 73;
  static FROM = 74;
  static FUNCTION = 75;
  static HASTYPE = 76;
  static IF = 77;
  static IMPLIES = 78;
  static IMPORT = 79;
  static IN = 80;
  static INCLUDE = 81;
  static INDIVIDUAL = 82;
  static INOUT = 83;
  static INTERACTION = 84;
  static INTERFACE = 85;
  static INTERSECTS = 86;
  static INV = 87;
  static INVERSE = 88;
  static INVERTING = 89;
  static ISTYPE = 90;
  static ITEM = 91;
  static JOIN = 92;
  static LANGUAGE = 93;
  static LIBRARY = 94;
  static LOCALE = 95;
  static LOOP = 96;
  static MEMBER = 97;
  static MERGE = 98;
  static MESSAGE = 99;
  static META = 100;
  static METACLASS = 101;
  static METADATA = 102;
  static MULTIPLICITY = 103;
  static NAMESPACE = 104;
  static NEW = 105;
  static NONUNIQUE = 106;
  static NOT = 107;
  static NULL = 108;
  static OBJECTIVE = 109;
  static OCCURRENCE = 110;
  static OF = 111;
  static OR = 112;
  static ORDERED = 113;
  static OUT = 114;
  static PACKAGE = 115;
  static PARALLEL = 116;
  static PART = 117;
  static PERFORM = 118;
  static PORT = 119;
  static PORTION = 120;
  static PREDICATE = 121;
  static PRIVATE = 122;
  static PROTECTED = 123;
  static PUBLIC = 124;
  static REDEFINES = 125;
  static REDEFINITION = 126;
  static REF = 127;
  static REFERENCES = 128;
  static RENDER = 129;
  static RENDERING = 130;
  static REP = 131;
  static REQUIRE = 132;
  static REQUIREMENT = 133;
  static RETURN = 134;
  static SATISFY = 135;
  static SEND = 136;
  static SNAPSHOT = 137;
  static SPECIALIZATION = 138;
  static SPECIALIZES = 139;
  static STAKEHOLDER = 140;
  static STANDARD = 141;
  static STATE = 142;
  static STEP = 143;
  static STRUCT = 144;
  static SUBCLASSIFIER = 145;
  static SUBJECT = 146;
  static SUBSET = 147;
  static SUBSETS = 148;
  static SUBTYPE = 149;
  static SUCCESSION = 150;
  static TERMINATE = 151;
  static THEN = 152;
  static TIMESLICE = 153;
  static TO = 154;
  static TRANSITION = 155;
  static TRUE = 156;
  static TYPE = 157;
  static TYPED = 158;
  static TYPING = 159;
  static UNIONS = 160;
  static UNTIL = 161;
  static USE = 162;
  static VAR = 163;
  static VARIANT = 164;
  static VARIATION = 165;
  static VERIFICATION = 166;
  static VERIFY = 167;
  static VIA = 168;
  static VIEW = 169;
  static VIEWPOINT = 170;
  static WHEN = 171;
  static WHILE = 172;
  static XOR = 173;
  static BANG_EQ_EQ = 174;
  static COLON_COLON_GT = 175;
  static COLON_GT_GT = 176;
  static EQ_EQ_EQ = 177;
  static BANG_EQ = 178;
  static STAR_STAR = 179;
  static ARROW = 180;
  static DOT_DOT = 181;
  static DOT_QUESTION = 182;
  static COLON_COLON = 183;
  static COLON_EQ = 184;
  static COLON_GT = 185;
  static LE = 186;
  static EQ_EQ = 187;
  static FAT_ARROW = 188;
  static GE = 189;
  static QUESTION_QUESTION = 190;
  static AT_AT = 191;
  static HASH = 192;
  static DOLLAR = 193;
  static PERCENT = 194;
  static AMP = 195;
  static LPAREN = 196;
  static RPAREN = 197;
  static STAR = 198;
  static PLUS = 199;
  static COMMA = 200;
  static MINUS = 201;
  static DOT = 202;
  static SLASH = 203;
  static COLON = 204;
  static SEMI = 205;
  static LT = 206;
  static EQ = 207;
  static GT = 208;
  static QUESTION = 209;
  static AT_SIGN = 210;
  static LBRACK = 211;
  static RBRACK = 212;
  static CARET = 213;
  static LBRACE = 214;
  static PIPE = 215;
  static RBRACE = 216;
  static TILDE = 217;
  static IDENTIFIER = 218;
  static STRING = 219;
  static DOUBLE_STRING = 220;
  static INTEGER = 221;
  static REAL = 222;
  static REGULAR_COMMENT = 223;
  static SINGLE_LINE_NOTE = 224;
  static BARE_LINE_COMMENT = 225;
  static WS = 226;
  static channelNames = [
    "DEFAULT_TOKEN_CHANNEL",
    "HIDDEN"
  ];
  static literalNames = [
    null,
    "'about'",
    "'abstract'",
    "'accept'",
    "'action'",
    "'actor'",
    "'after'",
    "'alias'",
    "'all'",
    "'allocate'",
    "'allocation'",
    "'analysis'",
    "'and'",
    "'as'",
    "'assert'",
    "'assign'",
    "'assoc'",
    "'assume'",
    "'at'",
    "'attribute'",
    "'behavior'",
    "'bind'",
    "'binding'",
    "'bool'",
    "'by'",
    "'calc'",
    "'case'",
    "'chains'",
    "'class'",
    "'classifier'",
    "'comment'",
    "'composite'",
    "'concern'",
    "'conjugate'",
    "'conjugates'",
    "'conjugation'",
    "'connect'",
    "'connection'",
    "'connector'",
    "'const'",
    "'constant'",
    "'constraint'",
    "'crosses'",
    "'datatype'",
    "'decide'",
    "'def'",
    "'default'",
    "'defined'",
    "'dependency'",
    "'derived'",
    "'differences'",
    "'disjoining'",
    "'disjoint'",
    "'do'",
    "'doc'",
    "'else'",
    "'end'",
    "'entry'",
    "'enum'",
    "'event'",
    "'exhibit'",
    "'exit'",
    "'expose'",
    "'expr'",
    "'false'",
    "'feature'",
    "'featured'",
    "'featuring'",
    "'filter'",
    "'first'",
    "'flow'",
    "'for'",
    "'fork'",
    "'frame'",
    "'from'",
    "'function'",
    "'hastype'",
    "'if'",
    "'implies'",
    "'import'",
    "'in'",
    "'include'",
    "'individual'",
    "'inout'",
    "'interaction'",
    "'interface'",
    "'intersects'",
    "'inv'",
    "'inverse'",
    "'inverting'",
    "'istype'",
    "'item'",
    "'join'",
    "'language'",
    "'library'",
    "'locale'",
    "'loop'",
    "'member'",
    "'merge'",
    "'message'",
    "'meta'",
    "'metaclass'",
    "'metadata'",
    "'multiplicity'",
    "'namespace'",
    "'new'",
    "'nonunique'",
    "'not'",
    "'null'",
    "'objective'",
    "'occurrence'",
    "'of'",
    "'or'",
    "'ordered'",
    "'out'",
    "'package'",
    "'parallel'",
    "'part'",
    "'perform'",
    "'port'",
    "'portion'",
    "'predicate'",
    "'private'",
    "'protected'",
    "'public'",
    "'redefines'",
    "'redefinition'",
    "'ref'",
    "'references'",
    "'render'",
    "'rendering'",
    "'rep'",
    "'require'",
    "'requirement'",
    "'return'",
    "'satisfy'",
    "'send'",
    "'snapshot'",
    "'specialization'",
    "'specializes'",
    "'stakeholder'",
    "'standard'",
    "'state'",
    "'step'",
    "'struct'",
    "'subclassifier'",
    "'subject'",
    "'subset'",
    "'subsets'",
    "'subtype'",
    "'succession'",
    "'terminate'",
    "'then'",
    "'timeslice'",
    "'to'",
    "'transition'",
    "'true'",
    "'type'",
    "'typed'",
    "'typing'",
    "'unions'",
    "'until'",
    "'use'",
    "'var'",
    "'variant'",
    "'variation'",
    "'verification'",
    "'verify'",
    "'via'",
    "'view'",
    "'viewpoint'",
    "'when'",
    "'while'",
    "'xor'",
    "'!=='",
    "'::>'",
    "':>>'",
    "'==='",
    "'!='",
    "'**'",
    "'->'",
    "'..'",
    "'.?'",
    "'::'",
    "':='",
    "':>'",
    "'<='",
    "'=='",
    "'=>'",
    "'>='",
    "'??'",
    "'@@'",
    "'#'",
    "'$'",
    "'%'",
    "'&'",
    "'('",
    "')'",
    "'*'",
    "'+'",
    "','",
    "'-'",
    "'.'",
    "'/'",
    "':'",
    "';'",
    "'<'",
    "'='",
    "'>'",
    "'?'",
    "'@'",
    "'['",
    "']'",
    "'^'",
    "'{'",
    "'|'",
    "'}'",
    "'~'",
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    "'//'"
  ];
  static symbolicNames = [
    null,
    "ABOUT",
    "ABSTRACT",
    "ACCEPT",
    "ACTION",
    "ACTOR",
    "AFTER",
    "ALIAS",
    "ALL",
    "ALLOCATE",
    "ALLOCATION",
    "ANALYSIS",
    "AND",
    "AS",
    "ASSERT",
    "ASSIGN",
    "ASSOC",
    "ASSUME",
    "AT",
    "ATTRIBUTE",
    "BEHAVIOR",
    "BIND",
    "BINDING",
    "BOOL",
    "BY",
    "CALC",
    "CASE",
    "CHAINS",
    "CLASS",
    "CLASSIFIER",
    "COMMENT",
    "COMPOSITE",
    "CONCERN",
    "CONJUGATE",
    "CONJUGATES",
    "CONJUGATION",
    "CONNECT",
    "CONNECTION",
    "CONNECTOR",
    "CONST",
    "CONSTANT",
    "CONSTRAINT",
    "CROSSES",
    "DATATYPE",
    "DECIDE",
    "DEF",
    "DEFAULT",
    "DEFINED",
    "DEPENDENCY",
    "DERIVED",
    "DIFFERENCES",
    "DISJOINING",
    "DISJOINT",
    "DO",
    "DOC",
    "ELSE",
    "END",
    "ENTRY",
    "ENUM",
    "EVENT",
    "EXHIBIT",
    "EXIT",
    "EXPOSE",
    "EXPR",
    "FALSE",
    "FEATURE",
    "FEATURED",
    "FEATURING",
    "FILTER",
    "FIRST",
    "FLOW",
    "FOR",
    "FORK",
    "FRAME",
    "FROM",
    "FUNCTION",
    "HASTYPE",
    "IF",
    "IMPLIES",
    "IMPORT",
    "IN",
    "INCLUDE",
    "INDIVIDUAL",
    "INOUT",
    "INTERACTION",
    "INTERFACE",
    "INTERSECTS",
    "INV",
    "INVERSE",
    "INVERTING",
    "ISTYPE",
    "ITEM",
    "JOIN",
    "LANGUAGE",
    "LIBRARY",
    "LOCALE",
    "LOOP",
    "MEMBER",
    "MERGE",
    "MESSAGE",
    "META",
    "METACLASS",
    "METADATA",
    "MULTIPLICITY",
    "NAMESPACE",
    "NEW",
    "NONUNIQUE",
    "NOT",
    "NULL",
    "OBJECTIVE",
    "OCCURRENCE",
    "OF",
    "OR",
    "ORDERED",
    "OUT",
    "PACKAGE",
    "PARALLEL",
    "PART",
    "PERFORM",
    "PORT",
    "PORTION",
    "PREDICATE",
    "PRIVATE",
    "PROTECTED",
    "PUBLIC",
    "REDEFINES",
    "REDEFINITION",
    "REF",
    "REFERENCES",
    "RENDER",
    "RENDERING",
    "REP",
    "REQUIRE",
    "REQUIREMENT",
    "RETURN",
    "SATISFY",
    "SEND",
    "SNAPSHOT",
    "SPECIALIZATION",
    "SPECIALIZES",
    "STAKEHOLDER",
    "STANDARD",
    "STATE",
    "STEP",
    "STRUCT",
    "SUBCLASSIFIER",
    "SUBJECT",
    "SUBSET",
    "SUBSETS",
    "SUBTYPE",
    "SUCCESSION",
    "TERMINATE",
    "THEN",
    "TIMESLICE",
    "TO",
    "TRANSITION",
    "TRUE",
    "TYPE",
    "TYPED",
    "TYPING",
    "UNIONS",
    "UNTIL",
    "USE",
    "VAR",
    "VARIANT",
    "VARIATION",
    "VERIFICATION",
    "VERIFY",
    "VIA",
    "VIEW",
    "VIEWPOINT",
    "WHEN",
    "WHILE",
    "XOR",
    "BANG_EQ_EQ",
    "COLON_COLON_GT",
    "COLON_GT_GT",
    "EQ_EQ_EQ",
    "BANG_EQ",
    "STAR_STAR",
    "ARROW",
    "DOT_DOT",
    "DOT_QUESTION",
    "COLON_COLON",
    "COLON_EQ",
    "COLON_GT",
    "LE",
    "EQ_EQ",
    "FAT_ARROW",
    "GE",
    "QUESTION_QUESTION",
    "AT_AT",
    "HASH",
    "DOLLAR",
    "PERCENT",
    "AMP",
    "LPAREN",
    "RPAREN",
    "STAR",
    "PLUS",
    "COMMA",
    "MINUS",
    "DOT",
    "SLASH",
    "COLON",
    "SEMI",
    "LT",
    "EQ",
    "GT",
    "QUESTION",
    "AT_SIGN",
    "LBRACK",
    "RBRACK",
    "CARET",
    "LBRACE",
    "PIPE",
    "RBRACE",
    "TILDE",
    "IDENTIFIER",
    "STRING",
    "DOUBLE_STRING",
    "INTEGER",
    "REAL",
    "REGULAR_COMMENT",
    "SINGLE_LINE_NOTE",
    "BARE_LINE_COMMENT",
    "WS"
  ];
  static modeNames = [
    "DEFAULT_MODE"
  ];
  static ruleNames = [
    "ABOUT",
    "ABSTRACT",
    "ACCEPT",
    "ACTION",
    "ACTOR",
    "AFTER",
    "ALIAS",
    "ALL",
    "ALLOCATE",
    "ALLOCATION",
    "ANALYSIS",
    "AND",
    "AS",
    "ASSERT",
    "ASSIGN",
    "ASSOC",
    "ASSUME",
    "AT",
    "ATTRIBUTE",
    "BEHAVIOR",
    "BIND",
    "BINDING",
    "BOOL",
    "BY",
    "CALC",
    "CASE",
    "CHAINS",
    "CLASS",
    "CLASSIFIER",
    "COMMENT",
    "COMPOSITE",
    "CONCERN",
    "CONJUGATE",
    "CONJUGATES",
    "CONJUGATION",
    "CONNECT",
    "CONNECTION",
    "CONNECTOR",
    "CONST",
    "CONSTANT",
    "CONSTRAINT",
    "CROSSES",
    "DATATYPE",
    "DECIDE",
    "DEF",
    "DEFAULT",
    "DEFINED",
    "DEPENDENCY",
    "DERIVED",
    "DIFFERENCES",
    "DISJOINING",
    "DISJOINT",
    "DO",
    "DOC",
    "ELSE",
    "END",
    "ENTRY",
    "ENUM",
    "EVENT",
    "EXHIBIT",
    "EXIT",
    "EXPOSE",
    "EXPR",
    "FALSE",
    "FEATURE",
    "FEATURED",
    "FEATURING",
    "FILTER",
    "FIRST",
    "FLOW",
    "FOR",
    "FORK",
    "FRAME",
    "FROM",
    "FUNCTION",
    "HASTYPE",
    "IF",
    "IMPLIES",
    "IMPORT",
    "IN",
    "INCLUDE",
    "INDIVIDUAL",
    "INOUT",
    "INTERACTION",
    "INTERFACE",
    "INTERSECTS",
    "INV",
    "INVERSE",
    "INVERTING",
    "ISTYPE",
    "ITEM",
    "JOIN",
    "LANGUAGE",
    "LIBRARY",
    "LOCALE",
    "LOOP",
    "MEMBER",
    "MERGE",
    "MESSAGE",
    "META",
    "METACLASS",
    "METADATA",
    "MULTIPLICITY",
    "NAMESPACE",
    "NEW",
    "NONUNIQUE",
    "NOT",
    "NULL",
    "OBJECTIVE",
    "OCCURRENCE",
    "OF",
    "OR",
    "ORDERED",
    "OUT",
    "PACKAGE",
    "PARALLEL",
    "PART",
    "PERFORM",
    "PORT",
    "PORTION",
    "PREDICATE",
    "PRIVATE",
    "PROTECTED",
    "PUBLIC",
    "REDEFINES",
    "REDEFINITION",
    "REF",
    "REFERENCES",
    "RENDER",
    "RENDERING",
    "REP",
    "REQUIRE",
    "REQUIREMENT",
    "RETURN",
    "SATISFY",
    "SEND",
    "SNAPSHOT",
    "SPECIALIZATION",
    "SPECIALIZES",
    "STAKEHOLDER",
    "STANDARD",
    "STATE",
    "STEP",
    "STRUCT",
    "SUBCLASSIFIER",
    "SUBJECT",
    "SUBSET",
    "SUBSETS",
    "SUBTYPE",
    "SUCCESSION",
    "TERMINATE",
    "THEN",
    "TIMESLICE",
    "TO",
    "TRANSITION",
    "TRUE",
    "TYPE",
    "TYPED",
    "TYPING",
    "UNIONS",
    "UNTIL",
    "USE",
    "VAR",
    "VARIANT",
    "VARIATION",
    "VERIFICATION",
    "VERIFY",
    "VIA",
    "VIEW",
    "VIEWPOINT",
    "WHEN",
    "WHILE",
    "XOR",
    "BANG_EQ_EQ",
    "COLON_COLON_GT",
    "COLON_GT_GT",
    "EQ_EQ_EQ",
    "BANG_EQ",
    "STAR_STAR",
    "ARROW",
    "DOT_DOT",
    "DOT_QUESTION",
    "COLON_COLON",
    "COLON_EQ",
    "COLON_GT",
    "LE",
    "EQ_EQ",
    "FAT_ARROW",
    "GE",
    "QUESTION_QUESTION",
    "AT_AT",
    "HASH",
    "DOLLAR",
    "PERCENT",
    "AMP",
    "LPAREN",
    "RPAREN",
    "STAR",
    "PLUS",
    "COMMA",
    "MINUS",
    "DOT",
    "SLASH",
    "COLON",
    "SEMI",
    "LT",
    "EQ",
    "GT",
    "QUESTION",
    "AT_SIGN",
    "LBRACK",
    "RBRACK",
    "CARET",
    "LBRACE",
    "PIPE",
    "RBRACE",
    "TILDE",
    "IDENTIFIER",
    "STRING",
    "DOUBLE_STRING",
    "INTEGER",
    "REAL",
    "REGULAR_COMMENT",
    "SINGLE_LINE_NOTE",
    "BARE_LINE_COMMENT",
    "WS"
  ];
  constructor(input) {
    super(input);
    this.interpreter = new LexerATNSimulator(this, _SysMLv2Lexer._ATN, _SysMLv2Lexer.decisionsToDFA, new PredictionContextCache());
  }
  get grammarFileName() {
    return "SysMLv2Lexer.g4";
  }
  get literalNames() {
    return _SysMLv2Lexer.literalNames;
  }
  get symbolicNames() {
    return _SysMLv2Lexer.symbolicNames;
  }
  get ruleNames() {
    return _SysMLv2Lexer.ruleNames;
  }
  get serializedATN() {
    return _SysMLv2Lexer._serializedATN;
  }
  get channelNames() {
    return _SysMLv2Lexer.channelNames;
  }
  get modeNames() {
    return _SysMLv2Lexer.modeNames;
  }
  static _serializedATN = [
    4,
    0,
    226,
    1971,
    6,
    -1,
    2,
    0,
    7,
    0,
    2,
    1,
    7,
    1,
    2,
    2,
    7,
    2,
    2,
    3,
    7,
    3,
    2,
    4,
    7,
    4,
    2,
    5,
    7,
    5,
    2,
    6,
    7,
    6,
    2,
    7,
    7,
    7,
    2,
    8,
    7,
    8,
    2,
    9,
    7,
    9,
    2,
    10,
    7,
    10,
    2,
    11,
    7,
    11,
    2,
    12,
    7,
    12,
    2,
    13,
    7,
    13,
    2,
    14,
    7,
    14,
    2,
    15,
    7,
    15,
    2,
    16,
    7,
    16,
    2,
    17,
    7,
    17,
    2,
    18,
    7,
    18,
    2,
    19,
    7,
    19,
    2,
    20,
    7,
    20,
    2,
    21,
    7,
    21,
    2,
    22,
    7,
    22,
    2,
    23,
    7,
    23,
    2,
    24,
    7,
    24,
    2,
    25,
    7,
    25,
    2,
    26,
    7,
    26,
    2,
    27,
    7,
    27,
    2,
    28,
    7,
    28,
    2,
    29,
    7,
    29,
    2,
    30,
    7,
    30,
    2,
    31,
    7,
    31,
    2,
    32,
    7,
    32,
    2,
    33,
    7,
    33,
    2,
    34,
    7,
    34,
    2,
    35,
    7,
    35,
    2,
    36,
    7,
    36,
    2,
    37,
    7,
    37,
    2,
    38,
    7,
    38,
    2,
    39,
    7,
    39,
    2,
    40,
    7,
    40,
    2,
    41,
    7,
    41,
    2,
    42,
    7,
    42,
    2,
    43,
    7,
    43,
    2,
    44,
    7,
    44,
    2,
    45,
    7,
    45,
    2,
    46,
    7,
    46,
    2,
    47,
    7,
    47,
    2,
    48,
    7,
    48,
    2,
    49,
    7,
    49,
    2,
    50,
    7,
    50,
    2,
    51,
    7,
    51,
    2,
    52,
    7,
    52,
    2,
    53,
    7,
    53,
    2,
    54,
    7,
    54,
    2,
    55,
    7,
    55,
    2,
    56,
    7,
    56,
    2,
    57,
    7,
    57,
    2,
    58,
    7,
    58,
    2,
    59,
    7,
    59,
    2,
    60,
    7,
    60,
    2,
    61,
    7,
    61,
    2,
    62,
    7,
    62,
    2,
    63,
    7,
    63,
    2,
    64,
    7,
    64,
    2,
    65,
    7,
    65,
    2,
    66,
    7,
    66,
    2,
    67,
    7,
    67,
    2,
    68,
    7,
    68,
    2,
    69,
    7,
    69,
    2,
    70,
    7,
    70,
    2,
    71,
    7,
    71,
    2,
    72,
    7,
    72,
    2,
    73,
    7,
    73,
    2,
    74,
    7,
    74,
    2,
    75,
    7,
    75,
    2,
    76,
    7,
    76,
    2,
    77,
    7,
    77,
    2,
    78,
    7,
    78,
    2,
    79,
    7,
    79,
    2,
    80,
    7,
    80,
    2,
    81,
    7,
    81,
    2,
    82,
    7,
    82,
    2,
    83,
    7,
    83,
    2,
    84,
    7,
    84,
    2,
    85,
    7,
    85,
    2,
    86,
    7,
    86,
    2,
    87,
    7,
    87,
    2,
    88,
    7,
    88,
    2,
    89,
    7,
    89,
    2,
    90,
    7,
    90,
    2,
    91,
    7,
    91,
    2,
    92,
    7,
    92,
    2,
    93,
    7,
    93,
    2,
    94,
    7,
    94,
    2,
    95,
    7,
    95,
    2,
    96,
    7,
    96,
    2,
    97,
    7,
    97,
    2,
    98,
    7,
    98,
    2,
    99,
    7,
    99,
    2,
    100,
    7,
    100,
    2,
    101,
    7,
    101,
    2,
    102,
    7,
    102,
    2,
    103,
    7,
    103,
    2,
    104,
    7,
    104,
    2,
    105,
    7,
    105,
    2,
    106,
    7,
    106,
    2,
    107,
    7,
    107,
    2,
    108,
    7,
    108,
    2,
    109,
    7,
    109,
    2,
    110,
    7,
    110,
    2,
    111,
    7,
    111,
    2,
    112,
    7,
    112,
    2,
    113,
    7,
    113,
    2,
    114,
    7,
    114,
    2,
    115,
    7,
    115,
    2,
    116,
    7,
    116,
    2,
    117,
    7,
    117,
    2,
    118,
    7,
    118,
    2,
    119,
    7,
    119,
    2,
    120,
    7,
    120,
    2,
    121,
    7,
    121,
    2,
    122,
    7,
    122,
    2,
    123,
    7,
    123,
    2,
    124,
    7,
    124,
    2,
    125,
    7,
    125,
    2,
    126,
    7,
    126,
    2,
    127,
    7,
    127,
    2,
    128,
    7,
    128,
    2,
    129,
    7,
    129,
    2,
    130,
    7,
    130,
    2,
    131,
    7,
    131,
    2,
    132,
    7,
    132,
    2,
    133,
    7,
    133,
    2,
    134,
    7,
    134,
    2,
    135,
    7,
    135,
    2,
    136,
    7,
    136,
    2,
    137,
    7,
    137,
    2,
    138,
    7,
    138,
    2,
    139,
    7,
    139,
    2,
    140,
    7,
    140,
    2,
    141,
    7,
    141,
    2,
    142,
    7,
    142,
    2,
    143,
    7,
    143,
    2,
    144,
    7,
    144,
    2,
    145,
    7,
    145,
    2,
    146,
    7,
    146,
    2,
    147,
    7,
    147,
    2,
    148,
    7,
    148,
    2,
    149,
    7,
    149,
    2,
    150,
    7,
    150,
    2,
    151,
    7,
    151,
    2,
    152,
    7,
    152,
    2,
    153,
    7,
    153,
    2,
    154,
    7,
    154,
    2,
    155,
    7,
    155,
    2,
    156,
    7,
    156,
    2,
    157,
    7,
    157,
    2,
    158,
    7,
    158,
    2,
    159,
    7,
    159,
    2,
    160,
    7,
    160,
    2,
    161,
    7,
    161,
    2,
    162,
    7,
    162,
    2,
    163,
    7,
    163,
    2,
    164,
    7,
    164,
    2,
    165,
    7,
    165,
    2,
    166,
    7,
    166,
    2,
    167,
    7,
    167,
    2,
    168,
    7,
    168,
    2,
    169,
    7,
    169,
    2,
    170,
    7,
    170,
    2,
    171,
    7,
    171,
    2,
    172,
    7,
    172,
    2,
    173,
    7,
    173,
    2,
    174,
    7,
    174,
    2,
    175,
    7,
    175,
    2,
    176,
    7,
    176,
    2,
    177,
    7,
    177,
    2,
    178,
    7,
    178,
    2,
    179,
    7,
    179,
    2,
    180,
    7,
    180,
    2,
    181,
    7,
    181,
    2,
    182,
    7,
    182,
    2,
    183,
    7,
    183,
    2,
    184,
    7,
    184,
    2,
    185,
    7,
    185,
    2,
    186,
    7,
    186,
    2,
    187,
    7,
    187,
    2,
    188,
    7,
    188,
    2,
    189,
    7,
    189,
    2,
    190,
    7,
    190,
    2,
    191,
    7,
    191,
    2,
    192,
    7,
    192,
    2,
    193,
    7,
    193,
    2,
    194,
    7,
    194,
    2,
    195,
    7,
    195,
    2,
    196,
    7,
    196,
    2,
    197,
    7,
    197,
    2,
    198,
    7,
    198,
    2,
    199,
    7,
    199,
    2,
    200,
    7,
    200,
    2,
    201,
    7,
    201,
    2,
    202,
    7,
    202,
    2,
    203,
    7,
    203,
    2,
    204,
    7,
    204,
    2,
    205,
    7,
    205,
    2,
    206,
    7,
    206,
    2,
    207,
    7,
    207,
    2,
    208,
    7,
    208,
    2,
    209,
    7,
    209,
    2,
    210,
    7,
    210,
    2,
    211,
    7,
    211,
    2,
    212,
    7,
    212,
    2,
    213,
    7,
    213,
    2,
    214,
    7,
    214,
    2,
    215,
    7,
    215,
    2,
    216,
    7,
    216,
    2,
    217,
    7,
    217,
    2,
    218,
    7,
    218,
    2,
    219,
    7,
    219,
    2,
    220,
    7,
    220,
    2,
    221,
    7,
    221,
    2,
    222,
    7,
    222,
    2,
    223,
    7,
    223,
    2,
    224,
    7,
    224,
    2,
    225,
    7,
    225,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    2,
    1,
    2,
    1,
    2,
    1,
    2,
    1,
    2,
    1,
    2,
    1,
    2,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    4,
    1,
    4,
    1,
    4,
    1,
    4,
    1,
    4,
    1,
    4,
    1,
    5,
    1,
    5,
    1,
    5,
    1,
    5,
    1,
    5,
    1,
    5,
    1,
    6,
    1,
    6,
    1,
    6,
    1,
    6,
    1,
    6,
    1,
    6,
    1,
    7,
    1,
    7,
    1,
    7,
    1,
    7,
    1,
    8,
    1,
    8,
    1,
    8,
    1,
    8,
    1,
    8,
    1,
    8,
    1,
    8,
    1,
    8,
    1,
    8,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    9,
    1,
    10,
    1,
    10,
    1,
    10,
    1,
    10,
    1,
    10,
    1,
    10,
    1,
    10,
    1,
    10,
    1,
    10,
    1,
    11,
    1,
    11,
    1,
    11,
    1,
    11,
    1,
    12,
    1,
    12,
    1,
    12,
    1,
    13,
    1,
    13,
    1,
    13,
    1,
    13,
    1,
    13,
    1,
    13,
    1,
    13,
    1,
    14,
    1,
    14,
    1,
    14,
    1,
    14,
    1,
    14,
    1,
    14,
    1,
    14,
    1,
    15,
    1,
    15,
    1,
    15,
    1,
    15,
    1,
    15,
    1,
    15,
    1,
    16,
    1,
    16,
    1,
    16,
    1,
    16,
    1,
    16,
    1,
    16,
    1,
    16,
    1,
    17,
    1,
    17,
    1,
    17,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    18,
    1,
    19,
    1,
    19,
    1,
    19,
    1,
    19,
    1,
    19,
    1,
    19,
    1,
    19,
    1,
    19,
    1,
    19,
    1,
    20,
    1,
    20,
    1,
    20,
    1,
    20,
    1,
    20,
    1,
    21,
    1,
    21,
    1,
    21,
    1,
    21,
    1,
    21,
    1,
    21,
    1,
    21,
    1,
    21,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    23,
    1,
    23,
    1,
    23,
    1,
    24,
    1,
    24,
    1,
    24,
    1,
    24,
    1,
    24,
    1,
    25,
    1,
    25,
    1,
    25,
    1,
    25,
    1,
    25,
    1,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    1,
    27,
    1,
    27,
    1,
    27,
    1,
    27,
    1,
    27,
    1,
    27,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    28,
    1,
    29,
    1,
    29,
    1,
    29,
    1,
    29,
    1,
    29,
    1,
    29,
    1,
    29,
    1,
    29,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    31,
    1,
    31,
    1,
    31,
    1,
    31,
    1,
    31,
    1,
    31,
    1,
    31,
    1,
    31,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    33,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    35,
    1,
    35,
    1,
    35,
    1,
    35,
    1,
    35,
    1,
    35,
    1,
    35,
    1,
    35,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    36,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    37,
    1,
    38,
    1,
    38,
    1,
    38,
    1,
    38,
    1,
    38,
    1,
    38,
    1,
    39,
    1,
    39,
    1,
    39,
    1,
    39,
    1,
    39,
    1,
    39,
    1,
    39,
    1,
    39,
    1,
    39,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    40,
    1,
    41,
    1,
    41,
    1,
    41,
    1,
    41,
    1,
    41,
    1,
    41,
    1,
    41,
    1,
    41,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    44,
    1,
    44,
    1,
    44,
    1,
    44,
    1,
    45,
    1,
    45,
    1,
    45,
    1,
    45,
    1,
    45,
    1,
    45,
    1,
    45,
    1,
    45,
    1,
    46,
    1,
    46,
    1,
    46,
    1,
    46,
    1,
    46,
    1,
    46,
    1,
    46,
    1,
    46,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    47,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    49,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    51,
    1,
    51,
    1,
    51,
    1,
    51,
    1,
    51,
    1,
    51,
    1,
    51,
    1,
    51,
    1,
    51,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    54,
    1,
    54,
    1,
    54,
    1,
    54,
    1,
    54,
    1,
    55,
    1,
    55,
    1,
    55,
    1,
    55,
    1,
    56,
    1,
    56,
    1,
    56,
    1,
    56,
    1,
    56,
    1,
    56,
    1,
    57,
    1,
    57,
    1,
    57,
    1,
    57,
    1,
    57,
    1,
    58,
    1,
    58,
    1,
    58,
    1,
    58,
    1,
    58,
    1,
    58,
    1,
    59,
    1,
    59,
    1,
    59,
    1,
    59,
    1,
    59,
    1,
    59,
    1,
    59,
    1,
    59,
    1,
    60,
    1,
    60,
    1,
    60,
    1,
    60,
    1,
    60,
    1,
    61,
    1,
    61,
    1,
    61,
    1,
    61,
    1,
    61,
    1,
    61,
    1,
    61,
    1,
    62,
    1,
    62,
    1,
    62,
    1,
    62,
    1,
    62,
    1,
    63,
    1,
    63,
    1,
    63,
    1,
    63,
    1,
    63,
    1,
    63,
    1,
    64,
    1,
    64,
    1,
    64,
    1,
    64,
    1,
    64,
    1,
    64,
    1,
    64,
    1,
    64,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    67,
    1,
    67,
    1,
    67,
    1,
    67,
    1,
    67,
    1,
    67,
    1,
    67,
    1,
    68,
    1,
    68,
    1,
    68,
    1,
    68,
    1,
    68,
    1,
    68,
    1,
    69,
    1,
    69,
    1,
    69,
    1,
    69,
    1,
    69,
    1,
    70,
    1,
    70,
    1,
    70,
    1,
    70,
    1,
    71,
    1,
    71,
    1,
    71,
    1,
    71,
    1,
    71,
    1,
    72,
    1,
    72,
    1,
    72,
    1,
    72,
    1,
    72,
    1,
    72,
    1,
    73,
    1,
    73,
    1,
    73,
    1,
    73,
    1,
    73,
    1,
    74,
    1,
    74,
    1,
    74,
    1,
    74,
    1,
    74,
    1,
    74,
    1,
    74,
    1,
    74,
    1,
    74,
    1,
    75,
    1,
    75,
    1,
    75,
    1,
    75,
    1,
    75,
    1,
    75,
    1,
    75,
    1,
    75,
    1,
    76,
    1,
    76,
    1,
    76,
    1,
    77,
    1,
    77,
    1,
    77,
    1,
    77,
    1,
    77,
    1,
    77,
    1,
    77,
    1,
    77,
    1,
    78,
    1,
    78,
    1,
    78,
    1,
    78,
    1,
    78,
    1,
    78,
    1,
    78,
    1,
    79,
    1,
    79,
    1,
    79,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    81,
    1,
    82,
    1,
    82,
    1,
    82,
    1,
    82,
    1,
    82,
    1,
    82,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    84,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    85,
    1,
    86,
    1,
    86,
    1,
    86,
    1,
    86,
    1,
    87,
    1,
    87,
    1,
    87,
    1,
    87,
    1,
    87,
    1,
    87,
    1,
    87,
    1,
    87,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    89,
    1,
    89,
    1,
    89,
    1,
    89,
    1,
    89,
    1,
    89,
    1,
    89,
    1,
    90,
    1,
    90,
    1,
    90,
    1,
    90,
    1,
    90,
    1,
    91,
    1,
    91,
    1,
    91,
    1,
    91,
    1,
    91,
    1,
    92,
    1,
    92,
    1,
    92,
    1,
    92,
    1,
    92,
    1,
    92,
    1,
    92,
    1,
    92,
    1,
    92,
    1,
    93,
    1,
    93,
    1,
    93,
    1,
    93,
    1,
    93,
    1,
    93,
    1,
    93,
    1,
    93,
    1,
    94,
    1,
    94,
    1,
    94,
    1,
    94,
    1,
    94,
    1,
    94,
    1,
    94,
    1,
    95,
    1,
    95,
    1,
    95,
    1,
    95,
    1,
    95,
    1,
    96,
    1,
    96,
    1,
    96,
    1,
    96,
    1,
    96,
    1,
    96,
    1,
    96,
    1,
    97,
    1,
    97,
    1,
    97,
    1,
    97,
    1,
    97,
    1,
    97,
    1,
    98,
    1,
    98,
    1,
    98,
    1,
    98,
    1,
    98,
    1,
    98,
    1,
    98,
    1,
    98,
    1,
    99,
    1,
    99,
    1,
    99,
    1,
    99,
    1,
    99,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    101,
    1,
    101,
    1,
    101,
    1,
    101,
    1,
    101,
    1,
    101,
    1,
    101,
    1,
    101,
    1,
    101,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    103,
    1,
    104,
    1,
    104,
    1,
    104,
    1,
    104,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    106,
    1,
    106,
    1,
    106,
    1,
    106,
    1,
    107,
    1,
    107,
    1,
    107,
    1,
    107,
    1,
    107,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    110,
    1,
    110,
    1,
    110,
    1,
    111,
    1,
    111,
    1,
    111,
    1,
    112,
    1,
    112,
    1,
    112,
    1,
    112,
    1,
    112,
    1,
    112,
    1,
    112,
    1,
    112,
    1,
    113,
    1,
    113,
    1,
    113,
    1,
    113,
    1,
    114,
    1,
    114,
    1,
    114,
    1,
    114,
    1,
    114,
    1,
    114,
    1,
    114,
    1,
    114,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    116,
    1,
    116,
    1,
    116,
    1,
    116,
    1,
    116,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    118,
    1,
    118,
    1,
    118,
    1,
    118,
    1,
    118,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    120,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    126,
    1,
    126,
    1,
    126,
    1,
    126,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    127,
    1,
    128,
    1,
    128,
    1,
    128,
    1,
    128,
    1,
    128,
    1,
    128,
    1,
    128,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    130,
    1,
    130,
    1,
    130,
    1,
    130,
    1,
    131,
    1,
    131,
    1,
    131,
    1,
    131,
    1,
    131,
    1,
    131,
    1,
    131,
    1,
    131,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    132,
    1,
    133,
    1,
    133,
    1,
    133,
    1,
    133,
    1,
    133,
    1,
    133,
    1,
    133,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    135,
    1,
    135,
    1,
    135,
    1,
    135,
    1,
    135,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    141,
    1,
    141,
    1,
    141,
    1,
    141,
    1,
    141,
    1,
    141,
    1,
    142,
    1,
    142,
    1,
    142,
    1,
    142,
    1,
    142,
    1,
    143,
    1,
    143,
    1,
    143,
    1,
    143,
    1,
    143,
    1,
    143,
    1,
    143,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    145,
    1,
    145,
    1,
    145,
    1,
    145,
    1,
    145,
    1,
    145,
    1,
    145,
    1,
    145,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    147,
    1,
    147,
    1,
    147,
    1,
    147,
    1,
    147,
    1,
    147,
    1,
    147,
    1,
    147,
    1,
    148,
    1,
    148,
    1,
    148,
    1,
    148,
    1,
    148,
    1,
    148,
    1,
    148,
    1,
    148,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    149,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    151,
    1,
    151,
    1,
    151,
    1,
    151,
    1,
    151,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    153,
    1,
    153,
    1,
    153,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    154,
    1,
    155,
    1,
    155,
    1,
    155,
    1,
    155,
    1,
    155,
    1,
    156,
    1,
    156,
    1,
    156,
    1,
    156,
    1,
    156,
    1,
    157,
    1,
    157,
    1,
    157,
    1,
    157,
    1,
    157,
    1,
    157,
    1,
    158,
    1,
    158,
    1,
    158,
    1,
    158,
    1,
    158,
    1,
    158,
    1,
    158,
    1,
    159,
    1,
    159,
    1,
    159,
    1,
    159,
    1,
    159,
    1,
    159,
    1,
    159,
    1,
    160,
    1,
    160,
    1,
    160,
    1,
    160,
    1,
    160,
    1,
    160,
    1,
    161,
    1,
    161,
    1,
    161,
    1,
    161,
    1,
    162,
    1,
    162,
    1,
    162,
    1,
    162,
    1,
    163,
    1,
    163,
    1,
    163,
    1,
    163,
    1,
    163,
    1,
    163,
    1,
    163,
    1,
    163,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    164,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    165,
    1,
    166,
    1,
    166,
    1,
    166,
    1,
    166,
    1,
    166,
    1,
    166,
    1,
    166,
    1,
    167,
    1,
    167,
    1,
    167,
    1,
    167,
    1,
    168,
    1,
    168,
    1,
    168,
    1,
    168,
    1,
    168,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    170,
    1,
    170,
    1,
    170,
    1,
    170,
    1,
    170,
    1,
    171,
    1,
    171,
    1,
    171,
    1,
    171,
    1,
    171,
    1,
    171,
    1,
    172,
    1,
    172,
    1,
    172,
    1,
    172,
    1,
    173,
    1,
    173,
    1,
    173,
    1,
    173,
    1,
    174,
    1,
    174,
    1,
    174,
    1,
    174,
    1,
    175,
    1,
    175,
    1,
    175,
    1,
    175,
    1,
    176,
    1,
    176,
    1,
    176,
    1,
    176,
    1,
    177,
    1,
    177,
    1,
    177,
    1,
    178,
    1,
    178,
    1,
    178,
    1,
    179,
    1,
    179,
    1,
    179,
    1,
    180,
    1,
    180,
    1,
    180,
    1,
    181,
    1,
    181,
    1,
    181,
    1,
    182,
    1,
    182,
    1,
    182,
    1,
    183,
    1,
    183,
    1,
    183,
    1,
    184,
    1,
    184,
    1,
    184,
    1,
    185,
    1,
    185,
    1,
    185,
    1,
    186,
    1,
    186,
    1,
    186,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    188,
    1,
    188,
    1,
    188,
    1,
    189,
    1,
    189,
    1,
    189,
    1,
    190,
    1,
    190,
    1,
    190,
    1,
    191,
    1,
    191,
    1,
    192,
    1,
    192,
    1,
    193,
    1,
    193,
    1,
    194,
    1,
    194,
    1,
    195,
    1,
    195,
    1,
    196,
    1,
    196,
    1,
    197,
    1,
    197,
    1,
    198,
    1,
    198,
    1,
    199,
    1,
    199,
    1,
    200,
    1,
    200,
    1,
    201,
    1,
    201,
    1,
    202,
    1,
    202,
    1,
    203,
    1,
    203,
    1,
    204,
    1,
    204,
    1,
    205,
    1,
    205,
    1,
    206,
    1,
    206,
    1,
    207,
    1,
    207,
    1,
    208,
    1,
    208,
    1,
    209,
    1,
    209,
    1,
    210,
    1,
    210,
    1,
    211,
    1,
    211,
    1,
    212,
    1,
    212,
    1,
    213,
    1,
    213,
    1,
    214,
    1,
    214,
    1,
    215,
    1,
    215,
    1,
    216,
    1,
    216,
    1,
    217,
    1,
    217,
    5,
    217,
    1852,
    8,
    217,
    10,
    217,
    12,
    217,
    1855,
    9,
    217,
    1,
    218,
    1,
    218,
    1,
    218,
    1,
    218,
    5,
    218,
    1861,
    8,
    218,
    10,
    218,
    12,
    218,
    1864,
    9,
    218,
    1,
    218,
    1,
    218,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    5,
    219,
    1872,
    8,
    219,
    10,
    219,
    12,
    219,
    1875,
    9,
    219,
    1,
    219,
    1,
    219,
    1,
    220,
    4,
    220,
    1880,
    8,
    220,
    11,
    220,
    12,
    220,
    1881,
    1,
    221,
    5,
    221,
    1885,
    8,
    221,
    10,
    221,
    12,
    221,
    1888,
    9,
    221,
    1,
    221,
    1,
    221,
    4,
    221,
    1892,
    8,
    221,
    11,
    221,
    12,
    221,
    1893,
    1,
    221,
    1,
    221,
    3,
    221,
    1898,
    8,
    221,
    1,
    221,
    4,
    221,
    1901,
    8,
    221,
    11,
    221,
    12,
    221,
    1902,
    3,
    221,
    1905,
    8,
    221,
    1,
    221,
    4,
    221,
    1908,
    8,
    221,
    11,
    221,
    12,
    221,
    1909,
    1,
    221,
    1,
    221,
    3,
    221,
    1914,
    8,
    221,
    1,
    221,
    4,
    221,
    1917,
    8,
    221,
    11,
    221,
    12,
    221,
    1918,
    3,
    221,
    1921,
    8,
    221,
    1,
    222,
    1,
    222,
    1,
    222,
    1,
    222,
    5,
    222,
    1927,
    8,
    222,
    10,
    222,
    12,
    222,
    1930,
    9,
    222,
    1,
    222,
    1,
    222,
    1,
    222,
    1,
    222,
    1,
    222,
    1,
    222,
    1,
    222,
    5,
    222,
    1939,
    8,
    222,
    10,
    222,
    12,
    222,
    1942,
    9,
    222,
    1,
    222,
    1,
    222,
    3,
    222,
    1946,
    8,
    222,
    1,
    223,
    1,
    223,
    1,
    223,
    1,
    223,
    1,
    223,
    5,
    223,
    1953,
    8,
    223,
    10,
    223,
    12,
    223,
    1956,
    9,
    223,
    1,
    223,
    1,
    223,
    1,
    224,
    1,
    224,
    1,
    224,
    1,
    224,
    1,
    224,
    1,
    225,
    4,
    225,
    1966,
    8,
    225,
    11,
    225,
    12,
    225,
    1967,
    1,
    225,
    1,
    225,
    2,
    1928,
    1940,
    0,
    226,
    1,
    1,
    3,
    2,
    5,
    3,
    7,
    4,
    9,
    5,
    11,
    6,
    13,
    7,
    15,
    8,
    17,
    9,
    19,
    10,
    21,
    11,
    23,
    12,
    25,
    13,
    27,
    14,
    29,
    15,
    31,
    16,
    33,
    17,
    35,
    18,
    37,
    19,
    39,
    20,
    41,
    21,
    43,
    22,
    45,
    23,
    47,
    24,
    49,
    25,
    51,
    26,
    53,
    27,
    55,
    28,
    57,
    29,
    59,
    30,
    61,
    31,
    63,
    32,
    65,
    33,
    67,
    34,
    69,
    35,
    71,
    36,
    73,
    37,
    75,
    38,
    77,
    39,
    79,
    40,
    81,
    41,
    83,
    42,
    85,
    43,
    87,
    44,
    89,
    45,
    91,
    46,
    93,
    47,
    95,
    48,
    97,
    49,
    99,
    50,
    101,
    51,
    103,
    52,
    105,
    53,
    107,
    54,
    109,
    55,
    111,
    56,
    113,
    57,
    115,
    58,
    117,
    59,
    119,
    60,
    121,
    61,
    123,
    62,
    125,
    63,
    127,
    64,
    129,
    65,
    131,
    66,
    133,
    67,
    135,
    68,
    137,
    69,
    139,
    70,
    141,
    71,
    143,
    72,
    145,
    73,
    147,
    74,
    149,
    75,
    151,
    76,
    153,
    77,
    155,
    78,
    157,
    79,
    159,
    80,
    161,
    81,
    163,
    82,
    165,
    83,
    167,
    84,
    169,
    85,
    171,
    86,
    173,
    87,
    175,
    88,
    177,
    89,
    179,
    90,
    181,
    91,
    183,
    92,
    185,
    93,
    187,
    94,
    189,
    95,
    191,
    96,
    193,
    97,
    195,
    98,
    197,
    99,
    199,
    100,
    201,
    101,
    203,
    102,
    205,
    103,
    207,
    104,
    209,
    105,
    211,
    106,
    213,
    107,
    215,
    108,
    217,
    109,
    219,
    110,
    221,
    111,
    223,
    112,
    225,
    113,
    227,
    114,
    229,
    115,
    231,
    116,
    233,
    117,
    235,
    118,
    237,
    119,
    239,
    120,
    241,
    121,
    243,
    122,
    245,
    123,
    247,
    124,
    249,
    125,
    251,
    126,
    253,
    127,
    255,
    128,
    257,
    129,
    259,
    130,
    261,
    131,
    263,
    132,
    265,
    133,
    267,
    134,
    269,
    135,
    271,
    136,
    273,
    137,
    275,
    138,
    277,
    139,
    279,
    140,
    281,
    141,
    283,
    142,
    285,
    143,
    287,
    144,
    289,
    145,
    291,
    146,
    293,
    147,
    295,
    148,
    297,
    149,
    299,
    150,
    301,
    151,
    303,
    152,
    305,
    153,
    307,
    154,
    309,
    155,
    311,
    156,
    313,
    157,
    315,
    158,
    317,
    159,
    319,
    160,
    321,
    161,
    323,
    162,
    325,
    163,
    327,
    164,
    329,
    165,
    331,
    166,
    333,
    167,
    335,
    168,
    337,
    169,
    339,
    170,
    341,
    171,
    343,
    172,
    345,
    173,
    347,
    174,
    349,
    175,
    351,
    176,
    353,
    177,
    355,
    178,
    357,
    179,
    359,
    180,
    361,
    181,
    363,
    182,
    365,
    183,
    367,
    184,
    369,
    185,
    371,
    186,
    373,
    187,
    375,
    188,
    377,
    189,
    379,
    190,
    381,
    191,
    383,
    192,
    385,
    193,
    387,
    194,
    389,
    195,
    391,
    196,
    393,
    197,
    395,
    198,
    397,
    199,
    399,
    200,
    401,
    201,
    403,
    202,
    405,
    203,
    407,
    204,
    409,
    205,
    411,
    206,
    413,
    207,
    415,
    208,
    417,
    209,
    419,
    210,
    421,
    211,
    423,
    212,
    425,
    213,
    427,
    214,
    429,
    215,
    431,
    216,
    433,
    217,
    435,
    218,
    437,
    219,
    439,
    220,
    441,
    221,
    443,
    222,
    445,
    223,
    447,
    224,
    449,
    225,
    451,
    226,
    1,
    0,
    10,
    3,
    0,
    65,
    90,
    95,
    95,
    97,
    122,
    4,
    0,
    48,
    57,
    65,
    90,
    95,
    95,
    97,
    122,
    2,
    0,
    39,
    39,
    92,
    92,
    2,
    0,
    34,
    34,
    92,
    92,
    1,
    0,
    48,
    57,
    2,
    0,
    69,
    69,
    101,
    101,
    2,
    0,
    43,
    43,
    45,
    45,
    3,
    0,
    10,
    10,
    13,
    13,
    42,
    42,
    2,
    0,
    10,
    10,
    13,
    13,
    3,
    0,
    9,
    10,
    13,
    13,
    32,
    32,
    1990,
    0,
    1,
    1,
    0,
    0,
    0,
    0,
    3,
    1,
    0,
    0,
    0,
    0,
    5,
    1,
    0,
    0,
    0,
    0,
    7,
    1,
    0,
    0,
    0,
    0,
    9,
    1,
    0,
    0,
    0,
    0,
    11,
    1,
    0,
    0,
    0,
    0,
    13,
    1,
    0,
    0,
    0,
    0,
    15,
    1,
    0,
    0,
    0,
    0,
    17,
    1,
    0,
    0,
    0,
    0,
    19,
    1,
    0,
    0,
    0,
    0,
    21,
    1,
    0,
    0,
    0,
    0,
    23,
    1,
    0,
    0,
    0,
    0,
    25,
    1,
    0,
    0,
    0,
    0,
    27,
    1,
    0,
    0,
    0,
    0,
    29,
    1,
    0,
    0,
    0,
    0,
    31,
    1,
    0,
    0,
    0,
    0,
    33,
    1,
    0,
    0,
    0,
    0,
    35,
    1,
    0,
    0,
    0,
    0,
    37,
    1,
    0,
    0,
    0,
    0,
    39,
    1,
    0,
    0,
    0,
    0,
    41,
    1,
    0,
    0,
    0,
    0,
    43,
    1,
    0,
    0,
    0,
    0,
    45,
    1,
    0,
    0,
    0,
    0,
    47,
    1,
    0,
    0,
    0,
    0,
    49,
    1,
    0,
    0,
    0,
    0,
    51,
    1,
    0,
    0,
    0,
    0,
    53,
    1,
    0,
    0,
    0,
    0,
    55,
    1,
    0,
    0,
    0,
    0,
    57,
    1,
    0,
    0,
    0,
    0,
    59,
    1,
    0,
    0,
    0,
    0,
    61,
    1,
    0,
    0,
    0,
    0,
    63,
    1,
    0,
    0,
    0,
    0,
    65,
    1,
    0,
    0,
    0,
    0,
    67,
    1,
    0,
    0,
    0,
    0,
    69,
    1,
    0,
    0,
    0,
    0,
    71,
    1,
    0,
    0,
    0,
    0,
    73,
    1,
    0,
    0,
    0,
    0,
    75,
    1,
    0,
    0,
    0,
    0,
    77,
    1,
    0,
    0,
    0,
    0,
    79,
    1,
    0,
    0,
    0,
    0,
    81,
    1,
    0,
    0,
    0,
    0,
    83,
    1,
    0,
    0,
    0,
    0,
    85,
    1,
    0,
    0,
    0,
    0,
    87,
    1,
    0,
    0,
    0,
    0,
    89,
    1,
    0,
    0,
    0,
    0,
    91,
    1,
    0,
    0,
    0,
    0,
    93,
    1,
    0,
    0,
    0,
    0,
    95,
    1,
    0,
    0,
    0,
    0,
    97,
    1,
    0,
    0,
    0,
    0,
    99,
    1,
    0,
    0,
    0,
    0,
    101,
    1,
    0,
    0,
    0,
    0,
    103,
    1,
    0,
    0,
    0,
    0,
    105,
    1,
    0,
    0,
    0,
    0,
    107,
    1,
    0,
    0,
    0,
    0,
    109,
    1,
    0,
    0,
    0,
    0,
    111,
    1,
    0,
    0,
    0,
    0,
    113,
    1,
    0,
    0,
    0,
    0,
    115,
    1,
    0,
    0,
    0,
    0,
    117,
    1,
    0,
    0,
    0,
    0,
    119,
    1,
    0,
    0,
    0,
    0,
    121,
    1,
    0,
    0,
    0,
    0,
    123,
    1,
    0,
    0,
    0,
    0,
    125,
    1,
    0,
    0,
    0,
    0,
    127,
    1,
    0,
    0,
    0,
    0,
    129,
    1,
    0,
    0,
    0,
    0,
    131,
    1,
    0,
    0,
    0,
    0,
    133,
    1,
    0,
    0,
    0,
    0,
    135,
    1,
    0,
    0,
    0,
    0,
    137,
    1,
    0,
    0,
    0,
    0,
    139,
    1,
    0,
    0,
    0,
    0,
    141,
    1,
    0,
    0,
    0,
    0,
    143,
    1,
    0,
    0,
    0,
    0,
    145,
    1,
    0,
    0,
    0,
    0,
    147,
    1,
    0,
    0,
    0,
    0,
    149,
    1,
    0,
    0,
    0,
    0,
    151,
    1,
    0,
    0,
    0,
    0,
    153,
    1,
    0,
    0,
    0,
    0,
    155,
    1,
    0,
    0,
    0,
    0,
    157,
    1,
    0,
    0,
    0,
    0,
    159,
    1,
    0,
    0,
    0,
    0,
    161,
    1,
    0,
    0,
    0,
    0,
    163,
    1,
    0,
    0,
    0,
    0,
    165,
    1,
    0,
    0,
    0,
    0,
    167,
    1,
    0,
    0,
    0,
    0,
    169,
    1,
    0,
    0,
    0,
    0,
    171,
    1,
    0,
    0,
    0,
    0,
    173,
    1,
    0,
    0,
    0,
    0,
    175,
    1,
    0,
    0,
    0,
    0,
    177,
    1,
    0,
    0,
    0,
    0,
    179,
    1,
    0,
    0,
    0,
    0,
    181,
    1,
    0,
    0,
    0,
    0,
    183,
    1,
    0,
    0,
    0,
    0,
    185,
    1,
    0,
    0,
    0,
    0,
    187,
    1,
    0,
    0,
    0,
    0,
    189,
    1,
    0,
    0,
    0,
    0,
    191,
    1,
    0,
    0,
    0,
    0,
    193,
    1,
    0,
    0,
    0,
    0,
    195,
    1,
    0,
    0,
    0,
    0,
    197,
    1,
    0,
    0,
    0,
    0,
    199,
    1,
    0,
    0,
    0,
    0,
    201,
    1,
    0,
    0,
    0,
    0,
    203,
    1,
    0,
    0,
    0,
    0,
    205,
    1,
    0,
    0,
    0,
    0,
    207,
    1,
    0,
    0,
    0,
    0,
    209,
    1,
    0,
    0,
    0,
    0,
    211,
    1,
    0,
    0,
    0,
    0,
    213,
    1,
    0,
    0,
    0,
    0,
    215,
    1,
    0,
    0,
    0,
    0,
    217,
    1,
    0,
    0,
    0,
    0,
    219,
    1,
    0,
    0,
    0,
    0,
    221,
    1,
    0,
    0,
    0,
    0,
    223,
    1,
    0,
    0,
    0,
    0,
    225,
    1,
    0,
    0,
    0,
    0,
    227,
    1,
    0,
    0,
    0,
    0,
    229,
    1,
    0,
    0,
    0,
    0,
    231,
    1,
    0,
    0,
    0,
    0,
    233,
    1,
    0,
    0,
    0,
    0,
    235,
    1,
    0,
    0,
    0,
    0,
    237,
    1,
    0,
    0,
    0,
    0,
    239,
    1,
    0,
    0,
    0,
    0,
    241,
    1,
    0,
    0,
    0,
    0,
    243,
    1,
    0,
    0,
    0,
    0,
    245,
    1,
    0,
    0,
    0,
    0,
    247,
    1,
    0,
    0,
    0,
    0,
    249,
    1,
    0,
    0,
    0,
    0,
    251,
    1,
    0,
    0,
    0,
    0,
    253,
    1,
    0,
    0,
    0,
    0,
    255,
    1,
    0,
    0,
    0,
    0,
    257,
    1,
    0,
    0,
    0,
    0,
    259,
    1,
    0,
    0,
    0,
    0,
    261,
    1,
    0,
    0,
    0,
    0,
    263,
    1,
    0,
    0,
    0,
    0,
    265,
    1,
    0,
    0,
    0,
    0,
    267,
    1,
    0,
    0,
    0,
    0,
    269,
    1,
    0,
    0,
    0,
    0,
    271,
    1,
    0,
    0,
    0,
    0,
    273,
    1,
    0,
    0,
    0,
    0,
    275,
    1,
    0,
    0,
    0,
    0,
    277,
    1,
    0,
    0,
    0,
    0,
    279,
    1,
    0,
    0,
    0,
    0,
    281,
    1,
    0,
    0,
    0,
    0,
    283,
    1,
    0,
    0,
    0,
    0,
    285,
    1,
    0,
    0,
    0,
    0,
    287,
    1,
    0,
    0,
    0,
    0,
    289,
    1,
    0,
    0,
    0,
    0,
    291,
    1,
    0,
    0,
    0,
    0,
    293,
    1,
    0,
    0,
    0,
    0,
    295,
    1,
    0,
    0,
    0,
    0,
    297,
    1,
    0,
    0,
    0,
    0,
    299,
    1,
    0,
    0,
    0,
    0,
    301,
    1,
    0,
    0,
    0,
    0,
    303,
    1,
    0,
    0,
    0,
    0,
    305,
    1,
    0,
    0,
    0,
    0,
    307,
    1,
    0,
    0,
    0,
    0,
    309,
    1,
    0,
    0,
    0,
    0,
    311,
    1,
    0,
    0,
    0,
    0,
    313,
    1,
    0,
    0,
    0,
    0,
    315,
    1,
    0,
    0,
    0,
    0,
    317,
    1,
    0,
    0,
    0,
    0,
    319,
    1,
    0,
    0,
    0,
    0,
    321,
    1,
    0,
    0,
    0,
    0,
    323,
    1,
    0,
    0,
    0,
    0,
    325,
    1,
    0,
    0,
    0,
    0,
    327,
    1,
    0,
    0,
    0,
    0,
    329,
    1,
    0,
    0,
    0,
    0,
    331,
    1,
    0,
    0,
    0,
    0,
    333,
    1,
    0,
    0,
    0,
    0,
    335,
    1,
    0,
    0,
    0,
    0,
    337,
    1,
    0,
    0,
    0,
    0,
    339,
    1,
    0,
    0,
    0,
    0,
    341,
    1,
    0,
    0,
    0,
    0,
    343,
    1,
    0,
    0,
    0,
    0,
    345,
    1,
    0,
    0,
    0,
    0,
    347,
    1,
    0,
    0,
    0,
    0,
    349,
    1,
    0,
    0,
    0,
    0,
    351,
    1,
    0,
    0,
    0,
    0,
    353,
    1,
    0,
    0,
    0,
    0,
    355,
    1,
    0,
    0,
    0,
    0,
    357,
    1,
    0,
    0,
    0,
    0,
    359,
    1,
    0,
    0,
    0,
    0,
    361,
    1,
    0,
    0,
    0,
    0,
    363,
    1,
    0,
    0,
    0,
    0,
    365,
    1,
    0,
    0,
    0,
    0,
    367,
    1,
    0,
    0,
    0,
    0,
    369,
    1,
    0,
    0,
    0,
    0,
    371,
    1,
    0,
    0,
    0,
    0,
    373,
    1,
    0,
    0,
    0,
    0,
    375,
    1,
    0,
    0,
    0,
    0,
    377,
    1,
    0,
    0,
    0,
    0,
    379,
    1,
    0,
    0,
    0,
    0,
    381,
    1,
    0,
    0,
    0,
    0,
    383,
    1,
    0,
    0,
    0,
    0,
    385,
    1,
    0,
    0,
    0,
    0,
    387,
    1,
    0,
    0,
    0,
    0,
    389,
    1,
    0,
    0,
    0,
    0,
    391,
    1,
    0,
    0,
    0,
    0,
    393,
    1,
    0,
    0,
    0,
    0,
    395,
    1,
    0,
    0,
    0,
    0,
    397,
    1,
    0,
    0,
    0,
    0,
    399,
    1,
    0,
    0,
    0,
    0,
    401,
    1,
    0,
    0,
    0,
    0,
    403,
    1,
    0,
    0,
    0,
    0,
    405,
    1,
    0,
    0,
    0,
    0,
    407,
    1,
    0,
    0,
    0,
    0,
    409,
    1,
    0,
    0,
    0,
    0,
    411,
    1,
    0,
    0,
    0,
    0,
    413,
    1,
    0,
    0,
    0,
    0,
    415,
    1,
    0,
    0,
    0,
    0,
    417,
    1,
    0,
    0,
    0,
    0,
    419,
    1,
    0,
    0,
    0,
    0,
    421,
    1,
    0,
    0,
    0,
    0,
    423,
    1,
    0,
    0,
    0,
    0,
    425,
    1,
    0,
    0,
    0,
    0,
    427,
    1,
    0,
    0,
    0,
    0,
    429,
    1,
    0,
    0,
    0,
    0,
    431,
    1,
    0,
    0,
    0,
    0,
    433,
    1,
    0,
    0,
    0,
    0,
    435,
    1,
    0,
    0,
    0,
    0,
    437,
    1,
    0,
    0,
    0,
    0,
    439,
    1,
    0,
    0,
    0,
    0,
    441,
    1,
    0,
    0,
    0,
    0,
    443,
    1,
    0,
    0,
    0,
    0,
    445,
    1,
    0,
    0,
    0,
    0,
    447,
    1,
    0,
    0,
    0,
    0,
    449,
    1,
    0,
    0,
    0,
    0,
    451,
    1,
    0,
    0,
    0,
    1,
    453,
    1,
    0,
    0,
    0,
    3,
    459,
    1,
    0,
    0,
    0,
    5,
    468,
    1,
    0,
    0,
    0,
    7,
    475,
    1,
    0,
    0,
    0,
    9,
    482,
    1,
    0,
    0,
    0,
    11,
    488,
    1,
    0,
    0,
    0,
    13,
    494,
    1,
    0,
    0,
    0,
    15,
    500,
    1,
    0,
    0,
    0,
    17,
    504,
    1,
    0,
    0,
    0,
    19,
    513,
    1,
    0,
    0,
    0,
    21,
    524,
    1,
    0,
    0,
    0,
    23,
    533,
    1,
    0,
    0,
    0,
    25,
    537,
    1,
    0,
    0,
    0,
    27,
    540,
    1,
    0,
    0,
    0,
    29,
    547,
    1,
    0,
    0,
    0,
    31,
    554,
    1,
    0,
    0,
    0,
    33,
    560,
    1,
    0,
    0,
    0,
    35,
    567,
    1,
    0,
    0,
    0,
    37,
    570,
    1,
    0,
    0,
    0,
    39,
    580,
    1,
    0,
    0,
    0,
    41,
    589,
    1,
    0,
    0,
    0,
    43,
    594,
    1,
    0,
    0,
    0,
    45,
    602,
    1,
    0,
    0,
    0,
    47,
    607,
    1,
    0,
    0,
    0,
    49,
    610,
    1,
    0,
    0,
    0,
    51,
    615,
    1,
    0,
    0,
    0,
    53,
    620,
    1,
    0,
    0,
    0,
    55,
    627,
    1,
    0,
    0,
    0,
    57,
    633,
    1,
    0,
    0,
    0,
    59,
    644,
    1,
    0,
    0,
    0,
    61,
    652,
    1,
    0,
    0,
    0,
    63,
    662,
    1,
    0,
    0,
    0,
    65,
    670,
    1,
    0,
    0,
    0,
    67,
    680,
    1,
    0,
    0,
    0,
    69,
    691,
    1,
    0,
    0,
    0,
    71,
    703,
    1,
    0,
    0,
    0,
    73,
    711,
    1,
    0,
    0,
    0,
    75,
    722,
    1,
    0,
    0,
    0,
    77,
    732,
    1,
    0,
    0,
    0,
    79,
    738,
    1,
    0,
    0,
    0,
    81,
    747,
    1,
    0,
    0,
    0,
    83,
    758,
    1,
    0,
    0,
    0,
    85,
    766,
    1,
    0,
    0,
    0,
    87,
    775,
    1,
    0,
    0,
    0,
    89,
    782,
    1,
    0,
    0,
    0,
    91,
    786,
    1,
    0,
    0,
    0,
    93,
    794,
    1,
    0,
    0,
    0,
    95,
    802,
    1,
    0,
    0,
    0,
    97,
    813,
    1,
    0,
    0,
    0,
    99,
    821,
    1,
    0,
    0,
    0,
    101,
    833,
    1,
    0,
    0,
    0,
    103,
    844,
    1,
    0,
    0,
    0,
    105,
    853,
    1,
    0,
    0,
    0,
    107,
    856,
    1,
    0,
    0,
    0,
    109,
    860,
    1,
    0,
    0,
    0,
    111,
    865,
    1,
    0,
    0,
    0,
    113,
    869,
    1,
    0,
    0,
    0,
    115,
    875,
    1,
    0,
    0,
    0,
    117,
    880,
    1,
    0,
    0,
    0,
    119,
    886,
    1,
    0,
    0,
    0,
    121,
    894,
    1,
    0,
    0,
    0,
    123,
    899,
    1,
    0,
    0,
    0,
    125,
    906,
    1,
    0,
    0,
    0,
    127,
    911,
    1,
    0,
    0,
    0,
    129,
    917,
    1,
    0,
    0,
    0,
    131,
    925,
    1,
    0,
    0,
    0,
    133,
    934,
    1,
    0,
    0,
    0,
    135,
    944,
    1,
    0,
    0,
    0,
    137,
    951,
    1,
    0,
    0,
    0,
    139,
    957,
    1,
    0,
    0,
    0,
    141,
    962,
    1,
    0,
    0,
    0,
    143,
    966,
    1,
    0,
    0,
    0,
    145,
    971,
    1,
    0,
    0,
    0,
    147,
    977,
    1,
    0,
    0,
    0,
    149,
    982,
    1,
    0,
    0,
    0,
    151,
    991,
    1,
    0,
    0,
    0,
    153,
    999,
    1,
    0,
    0,
    0,
    155,
    1002,
    1,
    0,
    0,
    0,
    157,
    1010,
    1,
    0,
    0,
    0,
    159,
    1017,
    1,
    0,
    0,
    0,
    161,
    1020,
    1,
    0,
    0,
    0,
    163,
    1028,
    1,
    0,
    0,
    0,
    165,
    1039,
    1,
    0,
    0,
    0,
    167,
    1045,
    1,
    0,
    0,
    0,
    169,
    1057,
    1,
    0,
    0,
    0,
    171,
    1067,
    1,
    0,
    0,
    0,
    173,
    1078,
    1,
    0,
    0,
    0,
    175,
    1082,
    1,
    0,
    0,
    0,
    177,
    1090,
    1,
    0,
    0,
    0,
    179,
    1100,
    1,
    0,
    0,
    0,
    181,
    1107,
    1,
    0,
    0,
    0,
    183,
    1112,
    1,
    0,
    0,
    0,
    185,
    1117,
    1,
    0,
    0,
    0,
    187,
    1126,
    1,
    0,
    0,
    0,
    189,
    1134,
    1,
    0,
    0,
    0,
    191,
    1141,
    1,
    0,
    0,
    0,
    193,
    1146,
    1,
    0,
    0,
    0,
    195,
    1153,
    1,
    0,
    0,
    0,
    197,
    1159,
    1,
    0,
    0,
    0,
    199,
    1167,
    1,
    0,
    0,
    0,
    201,
    1172,
    1,
    0,
    0,
    0,
    203,
    1182,
    1,
    0,
    0,
    0,
    205,
    1191,
    1,
    0,
    0,
    0,
    207,
    1204,
    1,
    0,
    0,
    0,
    209,
    1214,
    1,
    0,
    0,
    0,
    211,
    1218,
    1,
    0,
    0,
    0,
    213,
    1228,
    1,
    0,
    0,
    0,
    215,
    1232,
    1,
    0,
    0,
    0,
    217,
    1237,
    1,
    0,
    0,
    0,
    219,
    1247,
    1,
    0,
    0,
    0,
    221,
    1258,
    1,
    0,
    0,
    0,
    223,
    1261,
    1,
    0,
    0,
    0,
    225,
    1264,
    1,
    0,
    0,
    0,
    227,
    1272,
    1,
    0,
    0,
    0,
    229,
    1276,
    1,
    0,
    0,
    0,
    231,
    1284,
    1,
    0,
    0,
    0,
    233,
    1293,
    1,
    0,
    0,
    0,
    235,
    1298,
    1,
    0,
    0,
    0,
    237,
    1306,
    1,
    0,
    0,
    0,
    239,
    1311,
    1,
    0,
    0,
    0,
    241,
    1319,
    1,
    0,
    0,
    0,
    243,
    1329,
    1,
    0,
    0,
    0,
    245,
    1337,
    1,
    0,
    0,
    0,
    247,
    1347,
    1,
    0,
    0,
    0,
    249,
    1354,
    1,
    0,
    0,
    0,
    251,
    1364,
    1,
    0,
    0,
    0,
    253,
    1377,
    1,
    0,
    0,
    0,
    255,
    1381,
    1,
    0,
    0,
    0,
    257,
    1392,
    1,
    0,
    0,
    0,
    259,
    1399,
    1,
    0,
    0,
    0,
    261,
    1409,
    1,
    0,
    0,
    0,
    263,
    1413,
    1,
    0,
    0,
    0,
    265,
    1421,
    1,
    0,
    0,
    0,
    267,
    1433,
    1,
    0,
    0,
    0,
    269,
    1440,
    1,
    0,
    0,
    0,
    271,
    1448,
    1,
    0,
    0,
    0,
    273,
    1453,
    1,
    0,
    0,
    0,
    275,
    1462,
    1,
    0,
    0,
    0,
    277,
    1477,
    1,
    0,
    0,
    0,
    279,
    1489,
    1,
    0,
    0,
    0,
    281,
    1501,
    1,
    0,
    0,
    0,
    283,
    1510,
    1,
    0,
    0,
    0,
    285,
    1516,
    1,
    0,
    0,
    0,
    287,
    1521,
    1,
    0,
    0,
    0,
    289,
    1528,
    1,
    0,
    0,
    0,
    291,
    1542,
    1,
    0,
    0,
    0,
    293,
    1550,
    1,
    0,
    0,
    0,
    295,
    1557,
    1,
    0,
    0,
    0,
    297,
    1565,
    1,
    0,
    0,
    0,
    299,
    1573,
    1,
    0,
    0,
    0,
    301,
    1584,
    1,
    0,
    0,
    0,
    303,
    1594,
    1,
    0,
    0,
    0,
    305,
    1599,
    1,
    0,
    0,
    0,
    307,
    1609,
    1,
    0,
    0,
    0,
    309,
    1612,
    1,
    0,
    0,
    0,
    311,
    1623,
    1,
    0,
    0,
    0,
    313,
    1628,
    1,
    0,
    0,
    0,
    315,
    1633,
    1,
    0,
    0,
    0,
    317,
    1639,
    1,
    0,
    0,
    0,
    319,
    1646,
    1,
    0,
    0,
    0,
    321,
    1653,
    1,
    0,
    0,
    0,
    323,
    1659,
    1,
    0,
    0,
    0,
    325,
    1663,
    1,
    0,
    0,
    0,
    327,
    1667,
    1,
    0,
    0,
    0,
    329,
    1675,
    1,
    0,
    0,
    0,
    331,
    1685,
    1,
    0,
    0,
    0,
    333,
    1698,
    1,
    0,
    0,
    0,
    335,
    1705,
    1,
    0,
    0,
    0,
    337,
    1709,
    1,
    0,
    0,
    0,
    339,
    1714,
    1,
    0,
    0,
    0,
    341,
    1724,
    1,
    0,
    0,
    0,
    343,
    1729,
    1,
    0,
    0,
    0,
    345,
    1735,
    1,
    0,
    0,
    0,
    347,
    1739,
    1,
    0,
    0,
    0,
    349,
    1743,
    1,
    0,
    0,
    0,
    351,
    1747,
    1,
    0,
    0,
    0,
    353,
    1751,
    1,
    0,
    0,
    0,
    355,
    1755,
    1,
    0,
    0,
    0,
    357,
    1758,
    1,
    0,
    0,
    0,
    359,
    1761,
    1,
    0,
    0,
    0,
    361,
    1764,
    1,
    0,
    0,
    0,
    363,
    1767,
    1,
    0,
    0,
    0,
    365,
    1770,
    1,
    0,
    0,
    0,
    367,
    1773,
    1,
    0,
    0,
    0,
    369,
    1776,
    1,
    0,
    0,
    0,
    371,
    1779,
    1,
    0,
    0,
    0,
    373,
    1782,
    1,
    0,
    0,
    0,
    375,
    1785,
    1,
    0,
    0,
    0,
    377,
    1788,
    1,
    0,
    0,
    0,
    379,
    1791,
    1,
    0,
    0,
    0,
    381,
    1794,
    1,
    0,
    0,
    0,
    383,
    1797,
    1,
    0,
    0,
    0,
    385,
    1799,
    1,
    0,
    0,
    0,
    387,
    1801,
    1,
    0,
    0,
    0,
    389,
    1803,
    1,
    0,
    0,
    0,
    391,
    1805,
    1,
    0,
    0,
    0,
    393,
    1807,
    1,
    0,
    0,
    0,
    395,
    1809,
    1,
    0,
    0,
    0,
    397,
    1811,
    1,
    0,
    0,
    0,
    399,
    1813,
    1,
    0,
    0,
    0,
    401,
    1815,
    1,
    0,
    0,
    0,
    403,
    1817,
    1,
    0,
    0,
    0,
    405,
    1819,
    1,
    0,
    0,
    0,
    407,
    1821,
    1,
    0,
    0,
    0,
    409,
    1823,
    1,
    0,
    0,
    0,
    411,
    1825,
    1,
    0,
    0,
    0,
    413,
    1827,
    1,
    0,
    0,
    0,
    415,
    1829,
    1,
    0,
    0,
    0,
    417,
    1831,
    1,
    0,
    0,
    0,
    419,
    1833,
    1,
    0,
    0,
    0,
    421,
    1835,
    1,
    0,
    0,
    0,
    423,
    1837,
    1,
    0,
    0,
    0,
    425,
    1839,
    1,
    0,
    0,
    0,
    427,
    1841,
    1,
    0,
    0,
    0,
    429,
    1843,
    1,
    0,
    0,
    0,
    431,
    1845,
    1,
    0,
    0,
    0,
    433,
    1847,
    1,
    0,
    0,
    0,
    435,
    1849,
    1,
    0,
    0,
    0,
    437,
    1856,
    1,
    0,
    0,
    0,
    439,
    1867,
    1,
    0,
    0,
    0,
    441,
    1879,
    1,
    0,
    0,
    0,
    443,
    1920,
    1,
    0,
    0,
    0,
    445,
    1945,
    1,
    0,
    0,
    0,
    447,
    1947,
    1,
    0,
    0,
    0,
    449,
    1959,
    1,
    0,
    0,
    0,
    451,
    1965,
    1,
    0,
    0,
    0,
    453,
    454,
    5,
    97,
    0,
    0,
    454,
    455,
    5,
    98,
    0,
    0,
    455,
    456,
    5,
    111,
    0,
    0,
    456,
    457,
    5,
    117,
    0,
    0,
    457,
    458,
    5,
    116,
    0,
    0,
    458,
    2,
    1,
    0,
    0,
    0,
    459,
    460,
    5,
    97,
    0,
    0,
    460,
    461,
    5,
    98,
    0,
    0,
    461,
    462,
    5,
    115,
    0,
    0,
    462,
    463,
    5,
    116,
    0,
    0,
    463,
    464,
    5,
    114,
    0,
    0,
    464,
    465,
    5,
    97,
    0,
    0,
    465,
    466,
    5,
    99,
    0,
    0,
    466,
    467,
    5,
    116,
    0,
    0,
    467,
    4,
    1,
    0,
    0,
    0,
    468,
    469,
    5,
    97,
    0,
    0,
    469,
    470,
    5,
    99,
    0,
    0,
    470,
    471,
    5,
    99,
    0,
    0,
    471,
    472,
    5,
    101,
    0,
    0,
    472,
    473,
    5,
    112,
    0,
    0,
    473,
    474,
    5,
    116,
    0,
    0,
    474,
    6,
    1,
    0,
    0,
    0,
    475,
    476,
    5,
    97,
    0,
    0,
    476,
    477,
    5,
    99,
    0,
    0,
    477,
    478,
    5,
    116,
    0,
    0,
    478,
    479,
    5,
    105,
    0,
    0,
    479,
    480,
    5,
    111,
    0,
    0,
    480,
    481,
    5,
    110,
    0,
    0,
    481,
    8,
    1,
    0,
    0,
    0,
    482,
    483,
    5,
    97,
    0,
    0,
    483,
    484,
    5,
    99,
    0,
    0,
    484,
    485,
    5,
    116,
    0,
    0,
    485,
    486,
    5,
    111,
    0,
    0,
    486,
    487,
    5,
    114,
    0,
    0,
    487,
    10,
    1,
    0,
    0,
    0,
    488,
    489,
    5,
    97,
    0,
    0,
    489,
    490,
    5,
    102,
    0,
    0,
    490,
    491,
    5,
    116,
    0,
    0,
    491,
    492,
    5,
    101,
    0,
    0,
    492,
    493,
    5,
    114,
    0,
    0,
    493,
    12,
    1,
    0,
    0,
    0,
    494,
    495,
    5,
    97,
    0,
    0,
    495,
    496,
    5,
    108,
    0,
    0,
    496,
    497,
    5,
    105,
    0,
    0,
    497,
    498,
    5,
    97,
    0,
    0,
    498,
    499,
    5,
    115,
    0,
    0,
    499,
    14,
    1,
    0,
    0,
    0,
    500,
    501,
    5,
    97,
    0,
    0,
    501,
    502,
    5,
    108,
    0,
    0,
    502,
    503,
    5,
    108,
    0,
    0,
    503,
    16,
    1,
    0,
    0,
    0,
    504,
    505,
    5,
    97,
    0,
    0,
    505,
    506,
    5,
    108,
    0,
    0,
    506,
    507,
    5,
    108,
    0,
    0,
    507,
    508,
    5,
    111,
    0,
    0,
    508,
    509,
    5,
    99,
    0,
    0,
    509,
    510,
    5,
    97,
    0,
    0,
    510,
    511,
    5,
    116,
    0,
    0,
    511,
    512,
    5,
    101,
    0,
    0,
    512,
    18,
    1,
    0,
    0,
    0,
    513,
    514,
    5,
    97,
    0,
    0,
    514,
    515,
    5,
    108,
    0,
    0,
    515,
    516,
    5,
    108,
    0,
    0,
    516,
    517,
    5,
    111,
    0,
    0,
    517,
    518,
    5,
    99,
    0,
    0,
    518,
    519,
    5,
    97,
    0,
    0,
    519,
    520,
    5,
    116,
    0,
    0,
    520,
    521,
    5,
    105,
    0,
    0,
    521,
    522,
    5,
    111,
    0,
    0,
    522,
    523,
    5,
    110,
    0,
    0,
    523,
    20,
    1,
    0,
    0,
    0,
    524,
    525,
    5,
    97,
    0,
    0,
    525,
    526,
    5,
    110,
    0,
    0,
    526,
    527,
    5,
    97,
    0,
    0,
    527,
    528,
    5,
    108,
    0,
    0,
    528,
    529,
    5,
    121,
    0,
    0,
    529,
    530,
    5,
    115,
    0,
    0,
    530,
    531,
    5,
    105,
    0,
    0,
    531,
    532,
    5,
    115,
    0,
    0,
    532,
    22,
    1,
    0,
    0,
    0,
    533,
    534,
    5,
    97,
    0,
    0,
    534,
    535,
    5,
    110,
    0,
    0,
    535,
    536,
    5,
    100,
    0,
    0,
    536,
    24,
    1,
    0,
    0,
    0,
    537,
    538,
    5,
    97,
    0,
    0,
    538,
    539,
    5,
    115,
    0,
    0,
    539,
    26,
    1,
    0,
    0,
    0,
    540,
    541,
    5,
    97,
    0,
    0,
    541,
    542,
    5,
    115,
    0,
    0,
    542,
    543,
    5,
    115,
    0,
    0,
    543,
    544,
    5,
    101,
    0,
    0,
    544,
    545,
    5,
    114,
    0,
    0,
    545,
    546,
    5,
    116,
    0,
    0,
    546,
    28,
    1,
    0,
    0,
    0,
    547,
    548,
    5,
    97,
    0,
    0,
    548,
    549,
    5,
    115,
    0,
    0,
    549,
    550,
    5,
    115,
    0,
    0,
    550,
    551,
    5,
    105,
    0,
    0,
    551,
    552,
    5,
    103,
    0,
    0,
    552,
    553,
    5,
    110,
    0,
    0,
    553,
    30,
    1,
    0,
    0,
    0,
    554,
    555,
    5,
    97,
    0,
    0,
    555,
    556,
    5,
    115,
    0,
    0,
    556,
    557,
    5,
    115,
    0,
    0,
    557,
    558,
    5,
    111,
    0,
    0,
    558,
    559,
    5,
    99,
    0,
    0,
    559,
    32,
    1,
    0,
    0,
    0,
    560,
    561,
    5,
    97,
    0,
    0,
    561,
    562,
    5,
    115,
    0,
    0,
    562,
    563,
    5,
    115,
    0,
    0,
    563,
    564,
    5,
    117,
    0,
    0,
    564,
    565,
    5,
    109,
    0,
    0,
    565,
    566,
    5,
    101,
    0,
    0,
    566,
    34,
    1,
    0,
    0,
    0,
    567,
    568,
    5,
    97,
    0,
    0,
    568,
    569,
    5,
    116,
    0,
    0,
    569,
    36,
    1,
    0,
    0,
    0,
    570,
    571,
    5,
    97,
    0,
    0,
    571,
    572,
    5,
    116,
    0,
    0,
    572,
    573,
    5,
    116,
    0,
    0,
    573,
    574,
    5,
    114,
    0,
    0,
    574,
    575,
    5,
    105,
    0,
    0,
    575,
    576,
    5,
    98,
    0,
    0,
    576,
    577,
    5,
    117,
    0,
    0,
    577,
    578,
    5,
    116,
    0,
    0,
    578,
    579,
    5,
    101,
    0,
    0,
    579,
    38,
    1,
    0,
    0,
    0,
    580,
    581,
    5,
    98,
    0,
    0,
    581,
    582,
    5,
    101,
    0,
    0,
    582,
    583,
    5,
    104,
    0,
    0,
    583,
    584,
    5,
    97,
    0,
    0,
    584,
    585,
    5,
    118,
    0,
    0,
    585,
    586,
    5,
    105,
    0,
    0,
    586,
    587,
    5,
    111,
    0,
    0,
    587,
    588,
    5,
    114,
    0,
    0,
    588,
    40,
    1,
    0,
    0,
    0,
    589,
    590,
    5,
    98,
    0,
    0,
    590,
    591,
    5,
    105,
    0,
    0,
    591,
    592,
    5,
    110,
    0,
    0,
    592,
    593,
    5,
    100,
    0,
    0,
    593,
    42,
    1,
    0,
    0,
    0,
    594,
    595,
    5,
    98,
    0,
    0,
    595,
    596,
    5,
    105,
    0,
    0,
    596,
    597,
    5,
    110,
    0,
    0,
    597,
    598,
    5,
    100,
    0,
    0,
    598,
    599,
    5,
    105,
    0,
    0,
    599,
    600,
    5,
    110,
    0,
    0,
    600,
    601,
    5,
    103,
    0,
    0,
    601,
    44,
    1,
    0,
    0,
    0,
    602,
    603,
    5,
    98,
    0,
    0,
    603,
    604,
    5,
    111,
    0,
    0,
    604,
    605,
    5,
    111,
    0,
    0,
    605,
    606,
    5,
    108,
    0,
    0,
    606,
    46,
    1,
    0,
    0,
    0,
    607,
    608,
    5,
    98,
    0,
    0,
    608,
    609,
    5,
    121,
    0,
    0,
    609,
    48,
    1,
    0,
    0,
    0,
    610,
    611,
    5,
    99,
    0,
    0,
    611,
    612,
    5,
    97,
    0,
    0,
    612,
    613,
    5,
    108,
    0,
    0,
    613,
    614,
    5,
    99,
    0,
    0,
    614,
    50,
    1,
    0,
    0,
    0,
    615,
    616,
    5,
    99,
    0,
    0,
    616,
    617,
    5,
    97,
    0,
    0,
    617,
    618,
    5,
    115,
    0,
    0,
    618,
    619,
    5,
    101,
    0,
    0,
    619,
    52,
    1,
    0,
    0,
    0,
    620,
    621,
    5,
    99,
    0,
    0,
    621,
    622,
    5,
    104,
    0,
    0,
    622,
    623,
    5,
    97,
    0,
    0,
    623,
    624,
    5,
    105,
    0,
    0,
    624,
    625,
    5,
    110,
    0,
    0,
    625,
    626,
    5,
    115,
    0,
    0,
    626,
    54,
    1,
    0,
    0,
    0,
    627,
    628,
    5,
    99,
    0,
    0,
    628,
    629,
    5,
    108,
    0,
    0,
    629,
    630,
    5,
    97,
    0,
    0,
    630,
    631,
    5,
    115,
    0,
    0,
    631,
    632,
    5,
    115,
    0,
    0,
    632,
    56,
    1,
    0,
    0,
    0,
    633,
    634,
    5,
    99,
    0,
    0,
    634,
    635,
    5,
    108,
    0,
    0,
    635,
    636,
    5,
    97,
    0,
    0,
    636,
    637,
    5,
    115,
    0,
    0,
    637,
    638,
    5,
    115,
    0,
    0,
    638,
    639,
    5,
    105,
    0,
    0,
    639,
    640,
    5,
    102,
    0,
    0,
    640,
    641,
    5,
    105,
    0,
    0,
    641,
    642,
    5,
    101,
    0,
    0,
    642,
    643,
    5,
    114,
    0,
    0,
    643,
    58,
    1,
    0,
    0,
    0,
    644,
    645,
    5,
    99,
    0,
    0,
    645,
    646,
    5,
    111,
    0,
    0,
    646,
    647,
    5,
    109,
    0,
    0,
    647,
    648,
    5,
    109,
    0,
    0,
    648,
    649,
    5,
    101,
    0,
    0,
    649,
    650,
    5,
    110,
    0,
    0,
    650,
    651,
    5,
    116,
    0,
    0,
    651,
    60,
    1,
    0,
    0,
    0,
    652,
    653,
    5,
    99,
    0,
    0,
    653,
    654,
    5,
    111,
    0,
    0,
    654,
    655,
    5,
    109,
    0,
    0,
    655,
    656,
    5,
    112,
    0,
    0,
    656,
    657,
    5,
    111,
    0,
    0,
    657,
    658,
    5,
    115,
    0,
    0,
    658,
    659,
    5,
    105,
    0,
    0,
    659,
    660,
    5,
    116,
    0,
    0,
    660,
    661,
    5,
    101,
    0,
    0,
    661,
    62,
    1,
    0,
    0,
    0,
    662,
    663,
    5,
    99,
    0,
    0,
    663,
    664,
    5,
    111,
    0,
    0,
    664,
    665,
    5,
    110,
    0,
    0,
    665,
    666,
    5,
    99,
    0,
    0,
    666,
    667,
    5,
    101,
    0,
    0,
    667,
    668,
    5,
    114,
    0,
    0,
    668,
    669,
    5,
    110,
    0,
    0,
    669,
    64,
    1,
    0,
    0,
    0,
    670,
    671,
    5,
    99,
    0,
    0,
    671,
    672,
    5,
    111,
    0,
    0,
    672,
    673,
    5,
    110,
    0,
    0,
    673,
    674,
    5,
    106,
    0,
    0,
    674,
    675,
    5,
    117,
    0,
    0,
    675,
    676,
    5,
    103,
    0,
    0,
    676,
    677,
    5,
    97,
    0,
    0,
    677,
    678,
    5,
    116,
    0,
    0,
    678,
    679,
    5,
    101,
    0,
    0,
    679,
    66,
    1,
    0,
    0,
    0,
    680,
    681,
    5,
    99,
    0,
    0,
    681,
    682,
    5,
    111,
    0,
    0,
    682,
    683,
    5,
    110,
    0,
    0,
    683,
    684,
    5,
    106,
    0,
    0,
    684,
    685,
    5,
    117,
    0,
    0,
    685,
    686,
    5,
    103,
    0,
    0,
    686,
    687,
    5,
    97,
    0,
    0,
    687,
    688,
    5,
    116,
    0,
    0,
    688,
    689,
    5,
    101,
    0,
    0,
    689,
    690,
    5,
    115,
    0,
    0,
    690,
    68,
    1,
    0,
    0,
    0,
    691,
    692,
    5,
    99,
    0,
    0,
    692,
    693,
    5,
    111,
    0,
    0,
    693,
    694,
    5,
    110,
    0,
    0,
    694,
    695,
    5,
    106,
    0,
    0,
    695,
    696,
    5,
    117,
    0,
    0,
    696,
    697,
    5,
    103,
    0,
    0,
    697,
    698,
    5,
    97,
    0,
    0,
    698,
    699,
    5,
    116,
    0,
    0,
    699,
    700,
    5,
    105,
    0,
    0,
    700,
    701,
    5,
    111,
    0,
    0,
    701,
    702,
    5,
    110,
    0,
    0,
    702,
    70,
    1,
    0,
    0,
    0,
    703,
    704,
    5,
    99,
    0,
    0,
    704,
    705,
    5,
    111,
    0,
    0,
    705,
    706,
    5,
    110,
    0,
    0,
    706,
    707,
    5,
    110,
    0,
    0,
    707,
    708,
    5,
    101,
    0,
    0,
    708,
    709,
    5,
    99,
    0,
    0,
    709,
    710,
    5,
    116,
    0,
    0,
    710,
    72,
    1,
    0,
    0,
    0,
    711,
    712,
    5,
    99,
    0,
    0,
    712,
    713,
    5,
    111,
    0,
    0,
    713,
    714,
    5,
    110,
    0,
    0,
    714,
    715,
    5,
    110,
    0,
    0,
    715,
    716,
    5,
    101,
    0,
    0,
    716,
    717,
    5,
    99,
    0,
    0,
    717,
    718,
    5,
    116,
    0,
    0,
    718,
    719,
    5,
    105,
    0,
    0,
    719,
    720,
    5,
    111,
    0,
    0,
    720,
    721,
    5,
    110,
    0,
    0,
    721,
    74,
    1,
    0,
    0,
    0,
    722,
    723,
    5,
    99,
    0,
    0,
    723,
    724,
    5,
    111,
    0,
    0,
    724,
    725,
    5,
    110,
    0,
    0,
    725,
    726,
    5,
    110,
    0,
    0,
    726,
    727,
    5,
    101,
    0,
    0,
    727,
    728,
    5,
    99,
    0,
    0,
    728,
    729,
    5,
    116,
    0,
    0,
    729,
    730,
    5,
    111,
    0,
    0,
    730,
    731,
    5,
    114,
    0,
    0,
    731,
    76,
    1,
    0,
    0,
    0,
    732,
    733,
    5,
    99,
    0,
    0,
    733,
    734,
    5,
    111,
    0,
    0,
    734,
    735,
    5,
    110,
    0,
    0,
    735,
    736,
    5,
    115,
    0,
    0,
    736,
    737,
    5,
    116,
    0,
    0,
    737,
    78,
    1,
    0,
    0,
    0,
    738,
    739,
    5,
    99,
    0,
    0,
    739,
    740,
    5,
    111,
    0,
    0,
    740,
    741,
    5,
    110,
    0,
    0,
    741,
    742,
    5,
    115,
    0,
    0,
    742,
    743,
    5,
    116,
    0,
    0,
    743,
    744,
    5,
    97,
    0,
    0,
    744,
    745,
    5,
    110,
    0,
    0,
    745,
    746,
    5,
    116,
    0,
    0,
    746,
    80,
    1,
    0,
    0,
    0,
    747,
    748,
    5,
    99,
    0,
    0,
    748,
    749,
    5,
    111,
    0,
    0,
    749,
    750,
    5,
    110,
    0,
    0,
    750,
    751,
    5,
    115,
    0,
    0,
    751,
    752,
    5,
    116,
    0,
    0,
    752,
    753,
    5,
    114,
    0,
    0,
    753,
    754,
    5,
    97,
    0,
    0,
    754,
    755,
    5,
    105,
    0,
    0,
    755,
    756,
    5,
    110,
    0,
    0,
    756,
    757,
    5,
    116,
    0,
    0,
    757,
    82,
    1,
    0,
    0,
    0,
    758,
    759,
    5,
    99,
    0,
    0,
    759,
    760,
    5,
    114,
    0,
    0,
    760,
    761,
    5,
    111,
    0,
    0,
    761,
    762,
    5,
    115,
    0,
    0,
    762,
    763,
    5,
    115,
    0,
    0,
    763,
    764,
    5,
    101,
    0,
    0,
    764,
    765,
    5,
    115,
    0,
    0,
    765,
    84,
    1,
    0,
    0,
    0,
    766,
    767,
    5,
    100,
    0,
    0,
    767,
    768,
    5,
    97,
    0,
    0,
    768,
    769,
    5,
    116,
    0,
    0,
    769,
    770,
    5,
    97,
    0,
    0,
    770,
    771,
    5,
    116,
    0,
    0,
    771,
    772,
    5,
    121,
    0,
    0,
    772,
    773,
    5,
    112,
    0,
    0,
    773,
    774,
    5,
    101,
    0,
    0,
    774,
    86,
    1,
    0,
    0,
    0,
    775,
    776,
    5,
    100,
    0,
    0,
    776,
    777,
    5,
    101,
    0,
    0,
    777,
    778,
    5,
    99,
    0,
    0,
    778,
    779,
    5,
    105,
    0,
    0,
    779,
    780,
    5,
    100,
    0,
    0,
    780,
    781,
    5,
    101,
    0,
    0,
    781,
    88,
    1,
    0,
    0,
    0,
    782,
    783,
    5,
    100,
    0,
    0,
    783,
    784,
    5,
    101,
    0,
    0,
    784,
    785,
    5,
    102,
    0,
    0,
    785,
    90,
    1,
    0,
    0,
    0,
    786,
    787,
    5,
    100,
    0,
    0,
    787,
    788,
    5,
    101,
    0,
    0,
    788,
    789,
    5,
    102,
    0,
    0,
    789,
    790,
    5,
    97,
    0,
    0,
    790,
    791,
    5,
    117,
    0,
    0,
    791,
    792,
    5,
    108,
    0,
    0,
    792,
    793,
    5,
    116,
    0,
    0,
    793,
    92,
    1,
    0,
    0,
    0,
    794,
    795,
    5,
    100,
    0,
    0,
    795,
    796,
    5,
    101,
    0,
    0,
    796,
    797,
    5,
    102,
    0,
    0,
    797,
    798,
    5,
    105,
    0,
    0,
    798,
    799,
    5,
    110,
    0,
    0,
    799,
    800,
    5,
    101,
    0,
    0,
    800,
    801,
    5,
    100,
    0,
    0,
    801,
    94,
    1,
    0,
    0,
    0,
    802,
    803,
    5,
    100,
    0,
    0,
    803,
    804,
    5,
    101,
    0,
    0,
    804,
    805,
    5,
    112,
    0,
    0,
    805,
    806,
    5,
    101,
    0,
    0,
    806,
    807,
    5,
    110,
    0,
    0,
    807,
    808,
    5,
    100,
    0,
    0,
    808,
    809,
    5,
    101,
    0,
    0,
    809,
    810,
    5,
    110,
    0,
    0,
    810,
    811,
    5,
    99,
    0,
    0,
    811,
    812,
    5,
    121,
    0,
    0,
    812,
    96,
    1,
    0,
    0,
    0,
    813,
    814,
    5,
    100,
    0,
    0,
    814,
    815,
    5,
    101,
    0,
    0,
    815,
    816,
    5,
    114,
    0,
    0,
    816,
    817,
    5,
    105,
    0,
    0,
    817,
    818,
    5,
    118,
    0,
    0,
    818,
    819,
    5,
    101,
    0,
    0,
    819,
    820,
    5,
    100,
    0,
    0,
    820,
    98,
    1,
    0,
    0,
    0,
    821,
    822,
    5,
    100,
    0,
    0,
    822,
    823,
    5,
    105,
    0,
    0,
    823,
    824,
    5,
    102,
    0,
    0,
    824,
    825,
    5,
    102,
    0,
    0,
    825,
    826,
    5,
    101,
    0,
    0,
    826,
    827,
    5,
    114,
    0,
    0,
    827,
    828,
    5,
    101,
    0,
    0,
    828,
    829,
    5,
    110,
    0,
    0,
    829,
    830,
    5,
    99,
    0,
    0,
    830,
    831,
    5,
    101,
    0,
    0,
    831,
    832,
    5,
    115,
    0,
    0,
    832,
    100,
    1,
    0,
    0,
    0,
    833,
    834,
    5,
    100,
    0,
    0,
    834,
    835,
    5,
    105,
    0,
    0,
    835,
    836,
    5,
    115,
    0,
    0,
    836,
    837,
    5,
    106,
    0,
    0,
    837,
    838,
    5,
    111,
    0,
    0,
    838,
    839,
    5,
    105,
    0,
    0,
    839,
    840,
    5,
    110,
    0,
    0,
    840,
    841,
    5,
    105,
    0,
    0,
    841,
    842,
    5,
    110,
    0,
    0,
    842,
    843,
    5,
    103,
    0,
    0,
    843,
    102,
    1,
    0,
    0,
    0,
    844,
    845,
    5,
    100,
    0,
    0,
    845,
    846,
    5,
    105,
    0,
    0,
    846,
    847,
    5,
    115,
    0,
    0,
    847,
    848,
    5,
    106,
    0,
    0,
    848,
    849,
    5,
    111,
    0,
    0,
    849,
    850,
    5,
    105,
    0,
    0,
    850,
    851,
    5,
    110,
    0,
    0,
    851,
    852,
    5,
    116,
    0,
    0,
    852,
    104,
    1,
    0,
    0,
    0,
    853,
    854,
    5,
    100,
    0,
    0,
    854,
    855,
    5,
    111,
    0,
    0,
    855,
    106,
    1,
    0,
    0,
    0,
    856,
    857,
    5,
    100,
    0,
    0,
    857,
    858,
    5,
    111,
    0,
    0,
    858,
    859,
    5,
    99,
    0,
    0,
    859,
    108,
    1,
    0,
    0,
    0,
    860,
    861,
    5,
    101,
    0,
    0,
    861,
    862,
    5,
    108,
    0,
    0,
    862,
    863,
    5,
    115,
    0,
    0,
    863,
    864,
    5,
    101,
    0,
    0,
    864,
    110,
    1,
    0,
    0,
    0,
    865,
    866,
    5,
    101,
    0,
    0,
    866,
    867,
    5,
    110,
    0,
    0,
    867,
    868,
    5,
    100,
    0,
    0,
    868,
    112,
    1,
    0,
    0,
    0,
    869,
    870,
    5,
    101,
    0,
    0,
    870,
    871,
    5,
    110,
    0,
    0,
    871,
    872,
    5,
    116,
    0,
    0,
    872,
    873,
    5,
    114,
    0,
    0,
    873,
    874,
    5,
    121,
    0,
    0,
    874,
    114,
    1,
    0,
    0,
    0,
    875,
    876,
    5,
    101,
    0,
    0,
    876,
    877,
    5,
    110,
    0,
    0,
    877,
    878,
    5,
    117,
    0,
    0,
    878,
    879,
    5,
    109,
    0,
    0,
    879,
    116,
    1,
    0,
    0,
    0,
    880,
    881,
    5,
    101,
    0,
    0,
    881,
    882,
    5,
    118,
    0,
    0,
    882,
    883,
    5,
    101,
    0,
    0,
    883,
    884,
    5,
    110,
    0,
    0,
    884,
    885,
    5,
    116,
    0,
    0,
    885,
    118,
    1,
    0,
    0,
    0,
    886,
    887,
    5,
    101,
    0,
    0,
    887,
    888,
    5,
    120,
    0,
    0,
    888,
    889,
    5,
    104,
    0,
    0,
    889,
    890,
    5,
    105,
    0,
    0,
    890,
    891,
    5,
    98,
    0,
    0,
    891,
    892,
    5,
    105,
    0,
    0,
    892,
    893,
    5,
    116,
    0,
    0,
    893,
    120,
    1,
    0,
    0,
    0,
    894,
    895,
    5,
    101,
    0,
    0,
    895,
    896,
    5,
    120,
    0,
    0,
    896,
    897,
    5,
    105,
    0,
    0,
    897,
    898,
    5,
    116,
    0,
    0,
    898,
    122,
    1,
    0,
    0,
    0,
    899,
    900,
    5,
    101,
    0,
    0,
    900,
    901,
    5,
    120,
    0,
    0,
    901,
    902,
    5,
    112,
    0,
    0,
    902,
    903,
    5,
    111,
    0,
    0,
    903,
    904,
    5,
    115,
    0,
    0,
    904,
    905,
    5,
    101,
    0,
    0,
    905,
    124,
    1,
    0,
    0,
    0,
    906,
    907,
    5,
    101,
    0,
    0,
    907,
    908,
    5,
    120,
    0,
    0,
    908,
    909,
    5,
    112,
    0,
    0,
    909,
    910,
    5,
    114,
    0,
    0,
    910,
    126,
    1,
    0,
    0,
    0,
    911,
    912,
    5,
    102,
    0,
    0,
    912,
    913,
    5,
    97,
    0,
    0,
    913,
    914,
    5,
    108,
    0,
    0,
    914,
    915,
    5,
    115,
    0,
    0,
    915,
    916,
    5,
    101,
    0,
    0,
    916,
    128,
    1,
    0,
    0,
    0,
    917,
    918,
    5,
    102,
    0,
    0,
    918,
    919,
    5,
    101,
    0,
    0,
    919,
    920,
    5,
    97,
    0,
    0,
    920,
    921,
    5,
    116,
    0,
    0,
    921,
    922,
    5,
    117,
    0,
    0,
    922,
    923,
    5,
    114,
    0,
    0,
    923,
    924,
    5,
    101,
    0,
    0,
    924,
    130,
    1,
    0,
    0,
    0,
    925,
    926,
    5,
    102,
    0,
    0,
    926,
    927,
    5,
    101,
    0,
    0,
    927,
    928,
    5,
    97,
    0,
    0,
    928,
    929,
    5,
    116,
    0,
    0,
    929,
    930,
    5,
    117,
    0,
    0,
    930,
    931,
    5,
    114,
    0,
    0,
    931,
    932,
    5,
    101,
    0,
    0,
    932,
    933,
    5,
    100,
    0,
    0,
    933,
    132,
    1,
    0,
    0,
    0,
    934,
    935,
    5,
    102,
    0,
    0,
    935,
    936,
    5,
    101,
    0,
    0,
    936,
    937,
    5,
    97,
    0,
    0,
    937,
    938,
    5,
    116,
    0,
    0,
    938,
    939,
    5,
    117,
    0,
    0,
    939,
    940,
    5,
    114,
    0,
    0,
    940,
    941,
    5,
    105,
    0,
    0,
    941,
    942,
    5,
    110,
    0,
    0,
    942,
    943,
    5,
    103,
    0,
    0,
    943,
    134,
    1,
    0,
    0,
    0,
    944,
    945,
    5,
    102,
    0,
    0,
    945,
    946,
    5,
    105,
    0,
    0,
    946,
    947,
    5,
    108,
    0,
    0,
    947,
    948,
    5,
    116,
    0,
    0,
    948,
    949,
    5,
    101,
    0,
    0,
    949,
    950,
    5,
    114,
    0,
    0,
    950,
    136,
    1,
    0,
    0,
    0,
    951,
    952,
    5,
    102,
    0,
    0,
    952,
    953,
    5,
    105,
    0,
    0,
    953,
    954,
    5,
    114,
    0,
    0,
    954,
    955,
    5,
    115,
    0,
    0,
    955,
    956,
    5,
    116,
    0,
    0,
    956,
    138,
    1,
    0,
    0,
    0,
    957,
    958,
    5,
    102,
    0,
    0,
    958,
    959,
    5,
    108,
    0,
    0,
    959,
    960,
    5,
    111,
    0,
    0,
    960,
    961,
    5,
    119,
    0,
    0,
    961,
    140,
    1,
    0,
    0,
    0,
    962,
    963,
    5,
    102,
    0,
    0,
    963,
    964,
    5,
    111,
    0,
    0,
    964,
    965,
    5,
    114,
    0,
    0,
    965,
    142,
    1,
    0,
    0,
    0,
    966,
    967,
    5,
    102,
    0,
    0,
    967,
    968,
    5,
    111,
    0,
    0,
    968,
    969,
    5,
    114,
    0,
    0,
    969,
    970,
    5,
    107,
    0,
    0,
    970,
    144,
    1,
    0,
    0,
    0,
    971,
    972,
    5,
    102,
    0,
    0,
    972,
    973,
    5,
    114,
    0,
    0,
    973,
    974,
    5,
    97,
    0,
    0,
    974,
    975,
    5,
    109,
    0,
    0,
    975,
    976,
    5,
    101,
    0,
    0,
    976,
    146,
    1,
    0,
    0,
    0,
    977,
    978,
    5,
    102,
    0,
    0,
    978,
    979,
    5,
    114,
    0,
    0,
    979,
    980,
    5,
    111,
    0,
    0,
    980,
    981,
    5,
    109,
    0,
    0,
    981,
    148,
    1,
    0,
    0,
    0,
    982,
    983,
    5,
    102,
    0,
    0,
    983,
    984,
    5,
    117,
    0,
    0,
    984,
    985,
    5,
    110,
    0,
    0,
    985,
    986,
    5,
    99,
    0,
    0,
    986,
    987,
    5,
    116,
    0,
    0,
    987,
    988,
    5,
    105,
    0,
    0,
    988,
    989,
    5,
    111,
    0,
    0,
    989,
    990,
    5,
    110,
    0,
    0,
    990,
    150,
    1,
    0,
    0,
    0,
    991,
    992,
    5,
    104,
    0,
    0,
    992,
    993,
    5,
    97,
    0,
    0,
    993,
    994,
    5,
    115,
    0,
    0,
    994,
    995,
    5,
    116,
    0,
    0,
    995,
    996,
    5,
    121,
    0,
    0,
    996,
    997,
    5,
    112,
    0,
    0,
    997,
    998,
    5,
    101,
    0,
    0,
    998,
    152,
    1,
    0,
    0,
    0,
    999,
    1e3,
    5,
    105,
    0,
    0,
    1e3,
    1001,
    5,
    102,
    0,
    0,
    1001,
    154,
    1,
    0,
    0,
    0,
    1002,
    1003,
    5,
    105,
    0,
    0,
    1003,
    1004,
    5,
    109,
    0,
    0,
    1004,
    1005,
    5,
    112,
    0,
    0,
    1005,
    1006,
    5,
    108,
    0,
    0,
    1006,
    1007,
    5,
    105,
    0,
    0,
    1007,
    1008,
    5,
    101,
    0,
    0,
    1008,
    1009,
    5,
    115,
    0,
    0,
    1009,
    156,
    1,
    0,
    0,
    0,
    1010,
    1011,
    5,
    105,
    0,
    0,
    1011,
    1012,
    5,
    109,
    0,
    0,
    1012,
    1013,
    5,
    112,
    0,
    0,
    1013,
    1014,
    5,
    111,
    0,
    0,
    1014,
    1015,
    5,
    114,
    0,
    0,
    1015,
    1016,
    5,
    116,
    0,
    0,
    1016,
    158,
    1,
    0,
    0,
    0,
    1017,
    1018,
    5,
    105,
    0,
    0,
    1018,
    1019,
    5,
    110,
    0,
    0,
    1019,
    160,
    1,
    0,
    0,
    0,
    1020,
    1021,
    5,
    105,
    0,
    0,
    1021,
    1022,
    5,
    110,
    0,
    0,
    1022,
    1023,
    5,
    99,
    0,
    0,
    1023,
    1024,
    5,
    108,
    0,
    0,
    1024,
    1025,
    5,
    117,
    0,
    0,
    1025,
    1026,
    5,
    100,
    0,
    0,
    1026,
    1027,
    5,
    101,
    0,
    0,
    1027,
    162,
    1,
    0,
    0,
    0,
    1028,
    1029,
    5,
    105,
    0,
    0,
    1029,
    1030,
    5,
    110,
    0,
    0,
    1030,
    1031,
    5,
    100,
    0,
    0,
    1031,
    1032,
    5,
    105,
    0,
    0,
    1032,
    1033,
    5,
    118,
    0,
    0,
    1033,
    1034,
    5,
    105,
    0,
    0,
    1034,
    1035,
    5,
    100,
    0,
    0,
    1035,
    1036,
    5,
    117,
    0,
    0,
    1036,
    1037,
    5,
    97,
    0,
    0,
    1037,
    1038,
    5,
    108,
    0,
    0,
    1038,
    164,
    1,
    0,
    0,
    0,
    1039,
    1040,
    5,
    105,
    0,
    0,
    1040,
    1041,
    5,
    110,
    0,
    0,
    1041,
    1042,
    5,
    111,
    0,
    0,
    1042,
    1043,
    5,
    117,
    0,
    0,
    1043,
    1044,
    5,
    116,
    0,
    0,
    1044,
    166,
    1,
    0,
    0,
    0,
    1045,
    1046,
    5,
    105,
    0,
    0,
    1046,
    1047,
    5,
    110,
    0,
    0,
    1047,
    1048,
    5,
    116,
    0,
    0,
    1048,
    1049,
    5,
    101,
    0,
    0,
    1049,
    1050,
    5,
    114,
    0,
    0,
    1050,
    1051,
    5,
    97,
    0,
    0,
    1051,
    1052,
    5,
    99,
    0,
    0,
    1052,
    1053,
    5,
    116,
    0,
    0,
    1053,
    1054,
    5,
    105,
    0,
    0,
    1054,
    1055,
    5,
    111,
    0,
    0,
    1055,
    1056,
    5,
    110,
    0,
    0,
    1056,
    168,
    1,
    0,
    0,
    0,
    1057,
    1058,
    5,
    105,
    0,
    0,
    1058,
    1059,
    5,
    110,
    0,
    0,
    1059,
    1060,
    5,
    116,
    0,
    0,
    1060,
    1061,
    5,
    101,
    0,
    0,
    1061,
    1062,
    5,
    114,
    0,
    0,
    1062,
    1063,
    5,
    102,
    0,
    0,
    1063,
    1064,
    5,
    97,
    0,
    0,
    1064,
    1065,
    5,
    99,
    0,
    0,
    1065,
    1066,
    5,
    101,
    0,
    0,
    1066,
    170,
    1,
    0,
    0,
    0,
    1067,
    1068,
    5,
    105,
    0,
    0,
    1068,
    1069,
    5,
    110,
    0,
    0,
    1069,
    1070,
    5,
    116,
    0,
    0,
    1070,
    1071,
    5,
    101,
    0,
    0,
    1071,
    1072,
    5,
    114,
    0,
    0,
    1072,
    1073,
    5,
    115,
    0,
    0,
    1073,
    1074,
    5,
    101,
    0,
    0,
    1074,
    1075,
    5,
    99,
    0,
    0,
    1075,
    1076,
    5,
    116,
    0,
    0,
    1076,
    1077,
    5,
    115,
    0,
    0,
    1077,
    172,
    1,
    0,
    0,
    0,
    1078,
    1079,
    5,
    105,
    0,
    0,
    1079,
    1080,
    5,
    110,
    0,
    0,
    1080,
    1081,
    5,
    118,
    0,
    0,
    1081,
    174,
    1,
    0,
    0,
    0,
    1082,
    1083,
    5,
    105,
    0,
    0,
    1083,
    1084,
    5,
    110,
    0,
    0,
    1084,
    1085,
    5,
    118,
    0,
    0,
    1085,
    1086,
    5,
    101,
    0,
    0,
    1086,
    1087,
    5,
    114,
    0,
    0,
    1087,
    1088,
    5,
    115,
    0,
    0,
    1088,
    1089,
    5,
    101,
    0,
    0,
    1089,
    176,
    1,
    0,
    0,
    0,
    1090,
    1091,
    5,
    105,
    0,
    0,
    1091,
    1092,
    5,
    110,
    0,
    0,
    1092,
    1093,
    5,
    118,
    0,
    0,
    1093,
    1094,
    5,
    101,
    0,
    0,
    1094,
    1095,
    5,
    114,
    0,
    0,
    1095,
    1096,
    5,
    116,
    0,
    0,
    1096,
    1097,
    5,
    105,
    0,
    0,
    1097,
    1098,
    5,
    110,
    0,
    0,
    1098,
    1099,
    5,
    103,
    0,
    0,
    1099,
    178,
    1,
    0,
    0,
    0,
    1100,
    1101,
    5,
    105,
    0,
    0,
    1101,
    1102,
    5,
    115,
    0,
    0,
    1102,
    1103,
    5,
    116,
    0,
    0,
    1103,
    1104,
    5,
    121,
    0,
    0,
    1104,
    1105,
    5,
    112,
    0,
    0,
    1105,
    1106,
    5,
    101,
    0,
    0,
    1106,
    180,
    1,
    0,
    0,
    0,
    1107,
    1108,
    5,
    105,
    0,
    0,
    1108,
    1109,
    5,
    116,
    0,
    0,
    1109,
    1110,
    5,
    101,
    0,
    0,
    1110,
    1111,
    5,
    109,
    0,
    0,
    1111,
    182,
    1,
    0,
    0,
    0,
    1112,
    1113,
    5,
    106,
    0,
    0,
    1113,
    1114,
    5,
    111,
    0,
    0,
    1114,
    1115,
    5,
    105,
    0,
    0,
    1115,
    1116,
    5,
    110,
    0,
    0,
    1116,
    184,
    1,
    0,
    0,
    0,
    1117,
    1118,
    5,
    108,
    0,
    0,
    1118,
    1119,
    5,
    97,
    0,
    0,
    1119,
    1120,
    5,
    110,
    0,
    0,
    1120,
    1121,
    5,
    103,
    0,
    0,
    1121,
    1122,
    5,
    117,
    0,
    0,
    1122,
    1123,
    5,
    97,
    0,
    0,
    1123,
    1124,
    5,
    103,
    0,
    0,
    1124,
    1125,
    5,
    101,
    0,
    0,
    1125,
    186,
    1,
    0,
    0,
    0,
    1126,
    1127,
    5,
    108,
    0,
    0,
    1127,
    1128,
    5,
    105,
    0,
    0,
    1128,
    1129,
    5,
    98,
    0,
    0,
    1129,
    1130,
    5,
    114,
    0,
    0,
    1130,
    1131,
    5,
    97,
    0,
    0,
    1131,
    1132,
    5,
    114,
    0,
    0,
    1132,
    1133,
    5,
    121,
    0,
    0,
    1133,
    188,
    1,
    0,
    0,
    0,
    1134,
    1135,
    5,
    108,
    0,
    0,
    1135,
    1136,
    5,
    111,
    0,
    0,
    1136,
    1137,
    5,
    99,
    0,
    0,
    1137,
    1138,
    5,
    97,
    0,
    0,
    1138,
    1139,
    5,
    108,
    0,
    0,
    1139,
    1140,
    5,
    101,
    0,
    0,
    1140,
    190,
    1,
    0,
    0,
    0,
    1141,
    1142,
    5,
    108,
    0,
    0,
    1142,
    1143,
    5,
    111,
    0,
    0,
    1143,
    1144,
    5,
    111,
    0,
    0,
    1144,
    1145,
    5,
    112,
    0,
    0,
    1145,
    192,
    1,
    0,
    0,
    0,
    1146,
    1147,
    5,
    109,
    0,
    0,
    1147,
    1148,
    5,
    101,
    0,
    0,
    1148,
    1149,
    5,
    109,
    0,
    0,
    1149,
    1150,
    5,
    98,
    0,
    0,
    1150,
    1151,
    5,
    101,
    0,
    0,
    1151,
    1152,
    5,
    114,
    0,
    0,
    1152,
    194,
    1,
    0,
    0,
    0,
    1153,
    1154,
    5,
    109,
    0,
    0,
    1154,
    1155,
    5,
    101,
    0,
    0,
    1155,
    1156,
    5,
    114,
    0,
    0,
    1156,
    1157,
    5,
    103,
    0,
    0,
    1157,
    1158,
    5,
    101,
    0,
    0,
    1158,
    196,
    1,
    0,
    0,
    0,
    1159,
    1160,
    5,
    109,
    0,
    0,
    1160,
    1161,
    5,
    101,
    0,
    0,
    1161,
    1162,
    5,
    115,
    0,
    0,
    1162,
    1163,
    5,
    115,
    0,
    0,
    1163,
    1164,
    5,
    97,
    0,
    0,
    1164,
    1165,
    5,
    103,
    0,
    0,
    1165,
    1166,
    5,
    101,
    0,
    0,
    1166,
    198,
    1,
    0,
    0,
    0,
    1167,
    1168,
    5,
    109,
    0,
    0,
    1168,
    1169,
    5,
    101,
    0,
    0,
    1169,
    1170,
    5,
    116,
    0,
    0,
    1170,
    1171,
    5,
    97,
    0,
    0,
    1171,
    200,
    1,
    0,
    0,
    0,
    1172,
    1173,
    5,
    109,
    0,
    0,
    1173,
    1174,
    5,
    101,
    0,
    0,
    1174,
    1175,
    5,
    116,
    0,
    0,
    1175,
    1176,
    5,
    97,
    0,
    0,
    1176,
    1177,
    5,
    99,
    0,
    0,
    1177,
    1178,
    5,
    108,
    0,
    0,
    1178,
    1179,
    5,
    97,
    0,
    0,
    1179,
    1180,
    5,
    115,
    0,
    0,
    1180,
    1181,
    5,
    115,
    0,
    0,
    1181,
    202,
    1,
    0,
    0,
    0,
    1182,
    1183,
    5,
    109,
    0,
    0,
    1183,
    1184,
    5,
    101,
    0,
    0,
    1184,
    1185,
    5,
    116,
    0,
    0,
    1185,
    1186,
    5,
    97,
    0,
    0,
    1186,
    1187,
    5,
    100,
    0,
    0,
    1187,
    1188,
    5,
    97,
    0,
    0,
    1188,
    1189,
    5,
    116,
    0,
    0,
    1189,
    1190,
    5,
    97,
    0,
    0,
    1190,
    204,
    1,
    0,
    0,
    0,
    1191,
    1192,
    5,
    109,
    0,
    0,
    1192,
    1193,
    5,
    117,
    0,
    0,
    1193,
    1194,
    5,
    108,
    0,
    0,
    1194,
    1195,
    5,
    116,
    0,
    0,
    1195,
    1196,
    5,
    105,
    0,
    0,
    1196,
    1197,
    5,
    112,
    0,
    0,
    1197,
    1198,
    5,
    108,
    0,
    0,
    1198,
    1199,
    5,
    105,
    0,
    0,
    1199,
    1200,
    5,
    99,
    0,
    0,
    1200,
    1201,
    5,
    105,
    0,
    0,
    1201,
    1202,
    5,
    116,
    0,
    0,
    1202,
    1203,
    5,
    121,
    0,
    0,
    1203,
    206,
    1,
    0,
    0,
    0,
    1204,
    1205,
    5,
    110,
    0,
    0,
    1205,
    1206,
    5,
    97,
    0,
    0,
    1206,
    1207,
    5,
    109,
    0,
    0,
    1207,
    1208,
    5,
    101,
    0,
    0,
    1208,
    1209,
    5,
    115,
    0,
    0,
    1209,
    1210,
    5,
    112,
    0,
    0,
    1210,
    1211,
    5,
    97,
    0,
    0,
    1211,
    1212,
    5,
    99,
    0,
    0,
    1212,
    1213,
    5,
    101,
    0,
    0,
    1213,
    208,
    1,
    0,
    0,
    0,
    1214,
    1215,
    5,
    110,
    0,
    0,
    1215,
    1216,
    5,
    101,
    0,
    0,
    1216,
    1217,
    5,
    119,
    0,
    0,
    1217,
    210,
    1,
    0,
    0,
    0,
    1218,
    1219,
    5,
    110,
    0,
    0,
    1219,
    1220,
    5,
    111,
    0,
    0,
    1220,
    1221,
    5,
    110,
    0,
    0,
    1221,
    1222,
    5,
    117,
    0,
    0,
    1222,
    1223,
    5,
    110,
    0,
    0,
    1223,
    1224,
    5,
    105,
    0,
    0,
    1224,
    1225,
    5,
    113,
    0,
    0,
    1225,
    1226,
    5,
    117,
    0,
    0,
    1226,
    1227,
    5,
    101,
    0,
    0,
    1227,
    212,
    1,
    0,
    0,
    0,
    1228,
    1229,
    5,
    110,
    0,
    0,
    1229,
    1230,
    5,
    111,
    0,
    0,
    1230,
    1231,
    5,
    116,
    0,
    0,
    1231,
    214,
    1,
    0,
    0,
    0,
    1232,
    1233,
    5,
    110,
    0,
    0,
    1233,
    1234,
    5,
    117,
    0,
    0,
    1234,
    1235,
    5,
    108,
    0,
    0,
    1235,
    1236,
    5,
    108,
    0,
    0,
    1236,
    216,
    1,
    0,
    0,
    0,
    1237,
    1238,
    5,
    111,
    0,
    0,
    1238,
    1239,
    5,
    98,
    0,
    0,
    1239,
    1240,
    5,
    106,
    0,
    0,
    1240,
    1241,
    5,
    101,
    0,
    0,
    1241,
    1242,
    5,
    99,
    0,
    0,
    1242,
    1243,
    5,
    116,
    0,
    0,
    1243,
    1244,
    5,
    105,
    0,
    0,
    1244,
    1245,
    5,
    118,
    0,
    0,
    1245,
    1246,
    5,
    101,
    0,
    0,
    1246,
    218,
    1,
    0,
    0,
    0,
    1247,
    1248,
    5,
    111,
    0,
    0,
    1248,
    1249,
    5,
    99,
    0,
    0,
    1249,
    1250,
    5,
    99,
    0,
    0,
    1250,
    1251,
    5,
    117,
    0,
    0,
    1251,
    1252,
    5,
    114,
    0,
    0,
    1252,
    1253,
    5,
    114,
    0,
    0,
    1253,
    1254,
    5,
    101,
    0,
    0,
    1254,
    1255,
    5,
    110,
    0,
    0,
    1255,
    1256,
    5,
    99,
    0,
    0,
    1256,
    1257,
    5,
    101,
    0,
    0,
    1257,
    220,
    1,
    0,
    0,
    0,
    1258,
    1259,
    5,
    111,
    0,
    0,
    1259,
    1260,
    5,
    102,
    0,
    0,
    1260,
    222,
    1,
    0,
    0,
    0,
    1261,
    1262,
    5,
    111,
    0,
    0,
    1262,
    1263,
    5,
    114,
    0,
    0,
    1263,
    224,
    1,
    0,
    0,
    0,
    1264,
    1265,
    5,
    111,
    0,
    0,
    1265,
    1266,
    5,
    114,
    0,
    0,
    1266,
    1267,
    5,
    100,
    0,
    0,
    1267,
    1268,
    5,
    101,
    0,
    0,
    1268,
    1269,
    5,
    114,
    0,
    0,
    1269,
    1270,
    5,
    101,
    0,
    0,
    1270,
    1271,
    5,
    100,
    0,
    0,
    1271,
    226,
    1,
    0,
    0,
    0,
    1272,
    1273,
    5,
    111,
    0,
    0,
    1273,
    1274,
    5,
    117,
    0,
    0,
    1274,
    1275,
    5,
    116,
    0,
    0,
    1275,
    228,
    1,
    0,
    0,
    0,
    1276,
    1277,
    5,
    112,
    0,
    0,
    1277,
    1278,
    5,
    97,
    0,
    0,
    1278,
    1279,
    5,
    99,
    0,
    0,
    1279,
    1280,
    5,
    107,
    0,
    0,
    1280,
    1281,
    5,
    97,
    0,
    0,
    1281,
    1282,
    5,
    103,
    0,
    0,
    1282,
    1283,
    5,
    101,
    0,
    0,
    1283,
    230,
    1,
    0,
    0,
    0,
    1284,
    1285,
    5,
    112,
    0,
    0,
    1285,
    1286,
    5,
    97,
    0,
    0,
    1286,
    1287,
    5,
    114,
    0,
    0,
    1287,
    1288,
    5,
    97,
    0,
    0,
    1288,
    1289,
    5,
    108,
    0,
    0,
    1289,
    1290,
    5,
    108,
    0,
    0,
    1290,
    1291,
    5,
    101,
    0,
    0,
    1291,
    1292,
    5,
    108,
    0,
    0,
    1292,
    232,
    1,
    0,
    0,
    0,
    1293,
    1294,
    5,
    112,
    0,
    0,
    1294,
    1295,
    5,
    97,
    0,
    0,
    1295,
    1296,
    5,
    114,
    0,
    0,
    1296,
    1297,
    5,
    116,
    0,
    0,
    1297,
    234,
    1,
    0,
    0,
    0,
    1298,
    1299,
    5,
    112,
    0,
    0,
    1299,
    1300,
    5,
    101,
    0,
    0,
    1300,
    1301,
    5,
    114,
    0,
    0,
    1301,
    1302,
    5,
    102,
    0,
    0,
    1302,
    1303,
    5,
    111,
    0,
    0,
    1303,
    1304,
    5,
    114,
    0,
    0,
    1304,
    1305,
    5,
    109,
    0,
    0,
    1305,
    236,
    1,
    0,
    0,
    0,
    1306,
    1307,
    5,
    112,
    0,
    0,
    1307,
    1308,
    5,
    111,
    0,
    0,
    1308,
    1309,
    5,
    114,
    0,
    0,
    1309,
    1310,
    5,
    116,
    0,
    0,
    1310,
    238,
    1,
    0,
    0,
    0,
    1311,
    1312,
    5,
    112,
    0,
    0,
    1312,
    1313,
    5,
    111,
    0,
    0,
    1313,
    1314,
    5,
    114,
    0,
    0,
    1314,
    1315,
    5,
    116,
    0,
    0,
    1315,
    1316,
    5,
    105,
    0,
    0,
    1316,
    1317,
    5,
    111,
    0,
    0,
    1317,
    1318,
    5,
    110,
    0,
    0,
    1318,
    240,
    1,
    0,
    0,
    0,
    1319,
    1320,
    5,
    112,
    0,
    0,
    1320,
    1321,
    5,
    114,
    0,
    0,
    1321,
    1322,
    5,
    101,
    0,
    0,
    1322,
    1323,
    5,
    100,
    0,
    0,
    1323,
    1324,
    5,
    105,
    0,
    0,
    1324,
    1325,
    5,
    99,
    0,
    0,
    1325,
    1326,
    5,
    97,
    0,
    0,
    1326,
    1327,
    5,
    116,
    0,
    0,
    1327,
    1328,
    5,
    101,
    0,
    0,
    1328,
    242,
    1,
    0,
    0,
    0,
    1329,
    1330,
    5,
    112,
    0,
    0,
    1330,
    1331,
    5,
    114,
    0,
    0,
    1331,
    1332,
    5,
    105,
    0,
    0,
    1332,
    1333,
    5,
    118,
    0,
    0,
    1333,
    1334,
    5,
    97,
    0,
    0,
    1334,
    1335,
    5,
    116,
    0,
    0,
    1335,
    1336,
    5,
    101,
    0,
    0,
    1336,
    244,
    1,
    0,
    0,
    0,
    1337,
    1338,
    5,
    112,
    0,
    0,
    1338,
    1339,
    5,
    114,
    0,
    0,
    1339,
    1340,
    5,
    111,
    0,
    0,
    1340,
    1341,
    5,
    116,
    0,
    0,
    1341,
    1342,
    5,
    101,
    0,
    0,
    1342,
    1343,
    5,
    99,
    0,
    0,
    1343,
    1344,
    5,
    116,
    0,
    0,
    1344,
    1345,
    5,
    101,
    0,
    0,
    1345,
    1346,
    5,
    100,
    0,
    0,
    1346,
    246,
    1,
    0,
    0,
    0,
    1347,
    1348,
    5,
    112,
    0,
    0,
    1348,
    1349,
    5,
    117,
    0,
    0,
    1349,
    1350,
    5,
    98,
    0,
    0,
    1350,
    1351,
    5,
    108,
    0,
    0,
    1351,
    1352,
    5,
    105,
    0,
    0,
    1352,
    1353,
    5,
    99,
    0,
    0,
    1353,
    248,
    1,
    0,
    0,
    0,
    1354,
    1355,
    5,
    114,
    0,
    0,
    1355,
    1356,
    5,
    101,
    0,
    0,
    1356,
    1357,
    5,
    100,
    0,
    0,
    1357,
    1358,
    5,
    101,
    0,
    0,
    1358,
    1359,
    5,
    102,
    0,
    0,
    1359,
    1360,
    5,
    105,
    0,
    0,
    1360,
    1361,
    5,
    110,
    0,
    0,
    1361,
    1362,
    5,
    101,
    0,
    0,
    1362,
    1363,
    5,
    115,
    0,
    0,
    1363,
    250,
    1,
    0,
    0,
    0,
    1364,
    1365,
    5,
    114,
    0,
    0,
    1365,
    1366,
    5,
    101,
    0,
    0,
    1366,
    1367,
    5,
    100,
    0,
    0,
    1367,
    1368,
    5,
    101,
    0,
    0,
    1368,
    1369,
    5,
    102,
    0,
    0,
    1369,
    1370,
    5,
    105,
    0,
    0,
    1370,
    1371,
    5,
    110,
    0,
    0,
    1371,
    1372,
    5,
    105,
    0,
    0,
    1372,
    1373,
    5,
    116,
    0,
    0,
    1373,
    1374,
    5,
    105,
    0,
    0,
    1374,
    1375,
    5,
    111,
    0,
    0,
    1375,
    1376,
    5,
    110,
    0,
    0,
    1376,
    252,
    1,
    0,
    0,
    0,
    1377,
    1378,
    5,
    114,
    0,
    0,
    1378,
    1379,
    5,
    101,
    0,
    0,
    1379,
    1380,
    5,
    102,
    0,
    0,
    1380,
    254,
    1,
    0,
    0,
    0,
    1381,
    1382,
    5,
    114,
    0,
    0,
    1382,
    1383,
    5,
    101,
    0,
    0,
    1383,
    1384,
    5,
    102,
    0,
    0,
    1384,
    1385,
    5,
    101,
    0,
    0,
    1385,
    1386,
    5,
    114,
    0,
    0,
    1386,
    1387,
    5,
    101,
    0,
    0,
    1387,
    1388,
    5,
    110,
    0,
    0,
    1388,
    1389,
    5,
    99,
    0,
    0,
    1389,
    1390,
    5,
    101,
    0,
    0,
    1390,
    1391,
    5,
    115,
    0,
    0,
    1391,
    256,
    1,
    0,
    0,
    0,
    1392,
    1393,
    5,
    114,
    0,
    0,
    1393,
    1394,
    5,
    101,
    0,
    0,
    1394,
    1395,
    5,
    110,
    0,
    0,
    1395,
    1396,
    5,
    100,
    0,
    0,
    1396,
    1397,
    5,
    101,
    0,
    0,
    1397,
    1398,
    5,
    114,
    0,
    0,
    1398,
    258,
    1,
    0,
    0,
    0,
    1399,
    1400,
    5,
    114,
    0,
    0,
    1400,
    1401,
    5,
    101,
    0,
    0,
    1401,
    1402,
    5,
    110,
    0,
    0,
    1402,
    1403,
    5,
    100,
    0,
    0,
    1403,
    1404,
    5,
    101,
    0,
    0,
    1404,
    1405,
    5,
    114,
    0,
    0,
    1405,
    1406,
    5,
    105,
    0,
    0,
    1406,
    1407,
    5,
    110,
    0,
    0,
    1407,
    1408,
    5,
    103,
    0,
    0,
    1408,
    260,
    1,
    0,
    0,
    0,
    1409,
    1410,
    5,
    114,
    0,
    0,
    1410,
    1411,
    5,
    101,
    0,
    0,
    1411,
    1412,
    5,
    112,
    0,
    0,
    1412,
    262,
    1,
    0,
    0,
    0,
    1413,
    1414,
    5,
    114,
    0,
    0,
    1414,
    1415,
    5,
    101,
    0,
    0,
    1415,
    1416,
    5,
    113,
    0,
    0,
    1416,
    1417,
    5,
    117,
    0,
    0,
    1417,
    1418,
    5,
    105,
    0,
    0,
    1418,
    1419,
    5,
    114,
    0,
    0,
    1419,
    1420,
    5,
    101,
    0,
    0,
    1420,
    264,
    1,
    0,
    0,
    0,
    1421,
    1422,
    5,
    114,
    0,
    0,
    1422,
    1423,
    5,
    101,
    0,
    0,
    1423,
    1424,
    5,
    113,
    0,
    0,
    1424,
    1425,
    5,
    117,
    0,
    0,
    1425,
    1426,
    5,
    105,
    0,
    0,
    1426,
    1427,
    5,
    114,
    0,
    0,
    1427,
    1428,
    5,
    101,
    0,
    0,
    1428,
    1429,
    5,
    109,
    0,
    0,
    1429,
    1430,
    5,
    101,
    0,
    0,
    1430,
    1431,
    5,
    110,
    0,
    0,
    1431,
    1432,
    5,
    116,
    0,
    0,
    1432,
    266,
    1,
    0,
    0,
    0,
    1433,
    1434,
    5,
    114,
    0,
    0,
    1434,
    1435,
    5,
    101,
    0,
    0,
    1435,
    1436,
    5,
    116,
    0,
    0,
    1436,
    1437,
    5,
    117,
    0,
    0,
    1437,
    1438,
    5,
    114,
    0,
    0,
    1438,
    1439,
    5,
    110,
    0,
    0,
    1439,
    268,
    1,
    0,
    0,
    0,
    1440,
    1441,
    5,
    115,
    0,
    0,
    1441,
    1442,
    5,
    97,
    0,
    0,
    1442,
    1443,
    5,
    116,
    0,
    0,
    1443,
    1444,
    5,
    105,
    0,
    0,
    1444,
    1445,
    5,
    115,
    0,
    0,
    1445,
    1446,
    5,
    102,
    0,
    0,
    1446,
    1447,
    5,
    121,
    0,
    0,
    1447,
    270,
    1,
    0,
    0,
    0,
    1448,
    1449,
    5,
    115,
    0,
    0,
    1449,
    1450,
    5,
    101,
    0,
    0,
    1450,
    1451,
    5,
    110,
    0,
    0,
    1451,
    1452,
    5,
    100,
    0,
    0,
    1452,
    272,
    1,
    0,
    0,
    0,
    1453,
    1454,
    5,
    115,
    0,
    0,
    1454,
    1455,
    5,
    110,
    0,
    0,
    1455,
    1456,
    5,
    97,
    0,
    0,
    1456,
    1457,
    5,
    112,
    0,
    0,
    1457,
    1458,
    5,
    115,
    0,
    0,
    1458,
    1459,
    5,
    104,
    0,
    0,
    1459,
    1460,
    5,
    111,
    0,
    0,
    1460,
    1461,
    5,
    116,
    0,
    0,
    1461,
    274,
    1,
    0,
    0,
    0,
    1462,
    1463,
    5,
    115,
    0,
    0,
    1463,
    1464,
    5,
    112,
    0,
    0,
    1464,
    1465,
    5,
    101,
    0,
    0,
    1465,
    1466,
    5,
    99,
    0,
    0,
    1466,
    1467,
    5,
    105,
    0,
    0,
    1467,
    1468,
    5,
    97,
    0,
    0,
    1468,
    1469,
    5,
    108,
    0,
    0,
    1469,
    1470,
    5,
    105,
    0,
    0,
    1470,
    1471,
    5,
    122,
    0,
    0,
    1471,
    1472,
    5,
    97,
    0,
    0,
    1472,
    1473,
    5,
    116,
    0,
    0,
    1473,
    1474,
    5,
    105,
    0,
    0,
    1474,
    1475,
    5,
    111,
    0,
    0,
    1475,
    1476,
    5,
    110,
    0,
    0,
    1476,
    276,
    1,
    0,
    0,
    0,
    1477,
    1478,
    5,
    115,
    0,
    0,
    1478,
    1479,
    5,
    112,
    0,
    0,
    1479,
    1480,
    5,
    101,
    0,
    0,
    1480,
    1481,
    5,
    99,
    0,
    0,
    1481,
    1482,
    5,
    105,
    0,
    0,
    1482,
    1483,
    5,
    97,
    0,
    0,
    1483,
    1484,
    5,
    108,
    0,
    0,
    1484,
    1485,
    5,
    105,
    0,
    0,
    1485,
    1486,
    5,
    122,
    0,
    0,
    1486,
    1487,
    5,
    101,
    0,
    0,
    1487,
    1488,
    5,
    115,
    0,
    0,
    1488,
    278,
    1,
    0,
    0,
    0,
    1489,
    1490,
    5,
    115,
    0,
    0,
    1490,
    1491,
    5,
    116,
    0,
    0,
    1491,
    1492,
    5,
    97,
    0,
    0,
    1492,
    1493,
    5,
    107,
    0,
    0,
    1493,
    1494,
    5,
    101,
    0,
    0,
    1494,
    1495,
    5,
    104,
    0,
    0,
    1495,
    1496,
    5,
    111,
    0,
    0,
    1496,
    1497,
    5,
    108,
    0,
    0,
    1497,
    1498,
    5,
    100,
    0,
    0,
    1498,
    1499,
    5,
    101,
    0,
    0,
    1499,
    1500,
    5,
    114,
    0,
    0,
    1500,
    280,
    1,
    0,
    0,
    0,
    1501,
    1502,
    5,
    115,
    0,
    0,
    1502,
    1503,
    5,
    116,
    0,
    0,
    1503,
    1504,
    5,
    97,
    0,
    0,
    1504,
    1505,
    5,
    110,
    0,
    0,
    1505,
    1506,
    5,
    100,
    0,
    0,
    1506,
    1507,
    5,
    97,
    0,
    0,
    1507,
    1508,
    5,
    114,
    0,
    0,
    1508,
    1509,
    5,
    100,
    0,
    0,
    1509,
    282,
    1,
    0,
    0,
    0,
    1510,
    1511,
    5,
    115,
    0,
    0,
    1511,
    1512,
    5,
    116,
    0,
    0,
    1512,
    1513,
    5,
    97,
    0,
    0,
    1513,
    1514,
    5,
    116,
    0,
    0,
    1514,
    1515,
    5,
    101,
    0,
    0,
    1515,
    284,
    1,
    0,
    0,
    0,
    1516,
    1517,
    5,
    115,
    0,
    0,
    1517,
    1518,
    5,
    116,
    0,
    0,
    1518,
    1519,
    5,
    101,
    0,
    0,
    1519,
    1520,
    5,
    112,
    0,
    0,
    1520,
    286,
    1,
    0,
    0,
    0,
    1521,
    1522,
    5,
    115,
    0,
    0,
    1522,
    1523,
    5,
    116,
    0,
    0,
    1523,
    1524,
    5,
    114,
    0,
    0,
    1524,
    1525,
    5,
    117,
    0,
    0,
    1525,
    1526,
    5,
    99,
    0,
    0,
    1526,
    1527,
    5,
    116,
    0,
    0,
    1527,
    288,
    1,
    0,
    0,
    0,
    1528,
    1529,
    5,
    115,
    0,
    0,
    1529,
    1530,
    5,
    117,
    0,
    0,
    1530,
    1531,
    5,
    98,
    0,
    0,
    1531,
    1532,
    5,
    99,
    0,
    0,
    1532,
    1533,
    5,
    108,
    0,
    0,
    1533,
    1534,
    5,
    97,
    0,
    0,
    1534,
    1535,
    5,
    115,
    0,
    0,
    1535,
    1536,
    5,
    115,
    0,
    0,
    1536,
    1537,
    5,
    105,
    0,
    0,
    1537,
    1538,
    5,
    102,
    0,
    0,
    1538,
    1539,
    5,
    105,
    0,
    0,
    1539,
    1540,
    5,
    101,
    0,
    0,
    1540,
    1541,
    5,
    114,
    0,
    0,
    1541,
    290,
    1,
    0,
    0,
    0,
    1542,
    1543,
    5,
    115,
    0,
    0,
    1543,
    1544,
    5,
    117,
    0,
    0,
    1544,
    1545,
    5,
    98,
    0,
    0,
    1545,
    1546,
    5,
    106,
    0,
    0,
    1546,
    1547,
    5,
    101,
    0,
    0,
    1547,
    1548,
    5,
    99,
    0,
    0,
    1548,
    1549,
    5,
    116,
    0,
    0,
    1549,
    292,
    1,
    0,
    0,
    0,
    1550,
    1551,
    5,
    115,
    0,
    0,
    1551,
    1552,
    5,
    117,
    0,
    0,
    1552,
    1553,
    5,
    98,
    0,
    0,
    1553,
    1554,
    5,
    115,
    0,
    0,
    1554,
    1555,
    5,
    101,
    0,
    0,
    1555,
    1556,
    5,
    116,
    0,
    0,
    1556,
    294,
    1,
    0,
    0,
    0,
    1557,
    1558,
    5,
    115,
    0,
    0,
    1558,
    1559,
    5,
    117,
    0,
    0,
    1559,
    1560,
    5,
    98,
    0,
    0,
    1560,
    1561,
    5,
    115,
    0,
    0,
    1561,
    1562,
    5,
    101,
    0,
    0,
    1562,
    1563,
    5,
    116,
    0,
    0,
    1563,
    1564,
    5,
    115,
    0,
    0,
    1564,
    296,
    1,
    0,
    0,
    0,
    1565,
    1566,
    5,
    115,
    0,
    0,
    1566,
    1567,
    5,
    117,
    0,
    0,
    1567,
    1568,
    5,
    98,
    0,
    0,
    1568,
    1569,
    5,
    116,
    0,
    0,
    1569,
    1570,
    5,
    121,
    0,
    0,
    1570,
    1571,
    5,
    112,
    0,
    0,
    1571,
    1572,
    5,
    101,
    0,
    0,
    1572,
    298,
    1,
    0,
    0,
    0,
    1573,
    1574,
    5,
    115,
    0,
    0,
    1574,
    1575,
    5,
    117,
    0,
    0,
    1575,
    1576,
    5,
    99,
    0,
    0,
    1576,
    1577,
    5,
    99,
    0,
    0,
    1577,
    1578,
    5,
    101,
    0,
    0,
    1578,
    1579,
    5,
    115,
    0,
    0,
    1579,
    1580,
    5,
    115,
    0,
    0,
    1580,
    1581,
    5,
    105,
    0,
    0,
    1581,
    1582,
    5,
    111,
    0,
    0,
    1582,
    1583,
    5,
    110,
    0,
    0,
    1583,
    300,
    1,
    0,
    0,
    0,
    1584,
    1585,
    5,
    116,
    0,
    0,
    1585,
    1586,
    5,
    101,
    0,
    0,
    1586,
    1587,
    5,
    114,
    0,
    0,
    1587,
    1588,
    5,
    109,
    0,
    0,
    1588,
    1589,
    5,
    105,
    0,
    0,
    1589,
    1590,
    5,
    110,
    0,
    0,
    1590,
    1591,
    5,
    97,
    0,
    0,
    1591,
    1592,
    5,
    116,
    0,
    0,
    1592,
    1593,
    5,
    101,
    0,
    0,
    1593,
    302,
    1,
    0,
    0,
    0,
    1594,
    1595,
    5,
    116,
    0,
    0,
    1595,
    1596,
    5,
    104,
    0,
    0,
    1596,
    1597,
    5,
    101,
    0,
    0,
    1597,
    1598,
    5,
    110,
    0,
    0,
    1598,
    304,
    1,
    0,
    0,
    0,
    1599,
    1600,
    5,
    116,
    0,
    0,
    1600,
    1601,
    5,
    105,
    0,
    0,
    1601,
    1602,
    5,
    109,
    0,
    0,
    1602,
    1603,
    5,
    101,
    0,
    0,
    1603,
    1604,
    5,
    115,
    0,
    0,
    1604,
    1605,
    5,
    108,
    0,
    0,
    1605,
    1606,
    5,
    105,
    0,
    0,
    1606,
    1607,
    5,
    99,
    0,
    0,
    1607,
    1608,
    5,
    101,
    0,
    0,
    1608,
    306,
    1,
    0,
    0,
    0,
    1609,
    1610,
    5,
    116,
    0,
    0,
    1610,
    1611,
    5,
    111,
    0,
    0,
    1611,
    308,
    1,
    0,
    0,
    0,
    1612,
    1613,
    5,
    116,
    0,
    0,
    1613,
    1614,
    5,
    114,
    0,
    0,
    1614,
    1615,
    5,
    97,
    0,
    0,
    1615,
    1616,
    5,
    110,
    0,
    0,
    1616,
    1617,
    5,
    115,
    0,
    0,
    1617,
    1618,
    5,
    105,
    0,
    0,
    1618,
    1619,
    5,
    116,
    0,
    0,
    1619,
    1620,
    5,
    105,
    0,
    0,
    1620,
    1621,
    5,
    111,
    0,
    0,
    1621,
    1622,
    5,
    110,
    0,
    0,
    1622,
    310,
    1,
    0,
    0,
    0,
    1623,
    1624,
    5,
    116,
    0,
    0,
    1624,
    1625,
    5,
    114,
    0,
    0,
    1625,
    1626,
    5,
    117,
    0,
    0,
    1626,
    1627,
    5,
    101,
    0,
    0,
    1627,
    312,
    1,
    0,
    0,
    0,
    1628,
    1629,
    5,
    116,
    0,
    0,
    1629,
    1630,
    5,
    121,
    0,
    0,
    1630,
    1631,
    5,
    112,
    0,
    0,
    1631,
    1632,
    5,
    101,
    0,
    0,
    1632,
    314,
    1,
    0,
    0,
    0,
    1633,
    1634,
    5,
    116,
    0,
    0,
    1634,
    1635,
    5,
    121,
    0,
    0,
    1635,
    1636,
    5,
    112,
    0,
    0,
    1636,
    1637,
    5,
    101,
    0,
    0,
    1637,
    1638,
    5,
    100,
    0,
    0,
    1638,
    316,
    1,
    0,
    0,
    0,
    1639,
    1640,
    5,
    116,
    0,
    0,
    1640,
    1641,
    5,
    121,
    0,
    0,
    1641,
    1642,
    5,
    112,
    0,
    0,
    1642,
    1643,
    5,
    105,
    0,
    0,
    1643,
    1644,
    5,
    110,
    0,
    0,
    1644,
    1645,
    5,
    103,
    0,
    0,
    1645,
    318,
    1,
    0,
    0,
    0,
    1646,
    1647,
    5,
    117,
    0,
    0,
    1647,
    1648,
    5,
    110,
    0,
    0,
    1648,
    1649,
    5,
    105,
    0,
    0,
    1649,
    1650,
    5,
    111,
    0,
    0,
    1650,
    1651,
    5,
    110,
    0,
    0,
    1651,
    1652,
    5,
    115,
    0,
    0,
    1652,
    320,
    1,
    0,
    0,
    0,
    1653,
    1654,
    5,
    117,
    0,
    0,
    1654,
    1655,
    5,
    110,
    0,
    0,
    1655,
    1656,
    5,
    116,
    0,
    0,
    1656,
    1657,
    5,
    105,
    0,
    0,
    1657,
    1658,
    5,
    108,
    0,
    0,
    1658,
    322,
    1,
    0,
    0,
    0,
    1659,
    1660,
    5,
    117,
    0,
    0,
    1660,
    1661,
    5,
    115,
    0,
    0,
    1661,
    1662,
    5,
    101,
    0,
    0,
    1662,
    324,
    1,
    0,
    0,
    0,
    1663,
    1664,
    5,
    118,
    0,
    0,
    1664,
    1665,
    5,
    97,
    0,
    0,
    1665,
    1666,
    5,
    114,
    0,
    0,
    1666,
    326,
    1,
    0,
    0,
    0,
    1667,
    1668,
    5,
    118,
    0,
    0,
    1668,
    1669,
    5,
    97,
    0,
    0,
    1669,
    1670,
    5,
    114,
    0,
    0,
    1670,
    1671,
    5,
    105,
    0,
    0,
    1671,
    1672,
    5,
    97,
    0,
    0,
    1672,
    1673,
    5,
    110,
    0,
    0,
    1673,
    1674,
    5,
    116,
    0,
    0,
    1674,
    328,
    1,
    0,
    0,
    0,
    1675,
    1676,
    5,
    118,
    0,
    0,
    1676,
    1677,
    5,
    97,
    0,
    0,
    1677,
    1678,
    5,
    114,
    0,
    0,
    1678,
    1679,
    5,
    105,
    0,
    0,
    1679,
    1680,
    5,
    97,
    0,
    0,
    1680,
    1681,
    5,
    116,
    0,
    0,
    1681,
    1682,
    5,
    105,
    0,
    0,
    1682,
    1683,
    5,
    111,
    0,
    0,
    1683,
    1684,
    5,
    110,
    0,
    0,
    1684,
    330,
    1,
    0,
    0,
    0,
    1685,
    1686,
    5,
    118,
    0,
    0,
    1686,
    1687,
    5,
    101,
    0,
    0,
    1687,
    1688,
    5,
    114,
    0,
    0,
    1688,
    1689,
    5,
    105,
    0,
    0,
    1689,
    1690,
    5,
    102,
    0,
    0,
    1690,
    1691,
    5,
    105,
    0,
    0,
    1691,
    1692,
    5,
    99,
    0,
    0,
    1692,
    1693,
    5,
    97,
    0,
    0,
    1693,
    1694,
    5,
    116,
    0,
    0,
    1694,
    1695,
    5,
    105,
    0,
    0,
    1695,
    1696,
    5,
    111,
    0,
    0,
    1696,
    1697,
    5,
    110,
    0,
    0,
    1697,
    332,
    1,
    0,
    0,
    0,
    1698,
    1699,
    5,
    118,
    0,
    0,
    1699,
    1700,
    5,
    101,
    0,
    0,
    1700,
    1701,
    5,
    114,
    0,
    0,
    1701,
    1702,
    5,
    105,
    0,
    0,
    1702,
    1703,
    5,
    102,
    0,
    0,
    1703,
    1704,
    5,
    121,
    0,
    0,
    1704,
    334,
    1,
    0,
    0,
    0,
    1705,
    1706,
    5,
    118,
    0,
    0,
    1706,
    1707,
    5,
    105,
    0,
    0,
    1707,
    1708,
    5,
    97,
    0,
    0,
    1708,
    336,
    1,
    0,
    0,
    0,
    1709,
    1710,
    5,
    118,
    0,
    0,
    1710,
    1711,
    5,
    105,
    0,
    0,
    1711,
    1712,
    5,
    101,
    0,
    0,
    1712,
    1713,
    5,
    119,
    0,
    0,
    1713,
    338,
    1,
    0,
    0,
    0,
    1714,
    1715,
    5,
    118,
    0,
    0,
    1715,
    1716,
    5,
    105,
    0,
    0,
    1716,
    1717,
    5,
    101,
    0,
    0,
    1717,
    1718,
    5,
    119,
    0,
    0,
    1718,
    1719,
    5,
    112,
    0,
    0,
    1719,
    1720,
    5,
    111,
    0,
    0,
    1720,
    1721,
    5,
    105,
    0,
    0,
    1721,
    1722,
    5,
    110,
    0,
    0,
    1722,
    1723,
    5,
    116,
    0,
    0,
    1723,
    340,
    1,
    0,
    0,
    0,
    1724,
    1725,
    5,
    119,
    0,
    0,
    1725,
    1726,
    5,
    104,
    0,
    0,
    1726,
    1727,
    5,
    101,
    0,
    0,
    1727,
    1728,
    5,
    110,
    0,
    0,
    1728,
    342,
    1,
    0,
    0,
    0,
    1729,
    1730,
    5,
    119,
    0,
    0,
    1730,
    1731,
    5,
    104,
    0,
    0,
    1731,
    1732,
    5,
    105,
    0,
    0,
    1732,
    1733,
    5,
    108,
    0,
    0,
    1733,
    1734,
    5,
    101,
    0,
    0,
    1734,
    344,
    1,
    0,
    0,
    0,
    1735,
    1736,
    5,
    120,
    0,
    0,
    1736,
    1737,
    5,
    111,
    0,
    0,
    1737,
    1738,
    5,
    114,
    0,
    0,
    1738,
    346,
    1,
    0,
    0,
    0,
    1739,
    1740,
    5,
    33,
    0,
    0,
    1740,
    1741,
    5,
    61,
    0,
    0,
    1741,
    1742,
    5,
    61,
    0,
    0,
    1742,
    348,
    1,
    0,
    0,
    0,
    1743,
    1744,
    5,
    58,
    0,
    0,
    1744,
    1745,
    5,
    58,
    0,
    0,
    1745,
    1746,
    5,
    62,
    0,
    0,
    1746,
    350,
    1,
    0,
    0,
    0,
    1747,
    1748,
    5,
    58,
    0,
    0,
    1748,
    1749,
    5,
    62,
    0,
    0,
    1749,
    1750,
    5,
    62,
    0,
    0,
    1750,
    352,
    1,
    0,
    0,
    0,
    1751,
    1752,
    5,
    61,
    0,
    0,
    1752,
    1753,
    5,
    61,
    0,
    0,
    1753,
    1754,
    5,
    61,
    0,
    0,
    1754,
    354,
    1,
    0,
    0,
    0,
    1755,
    1756,
    5,
    33,
    0,
    0,
    1756,
    1757,
    5,
    61,
    0,
    0,
    1757,
    356,
    1,
    0,
    0,
    0,
    1758,
    1759,
    5,
    42,
    0,
    0,
    1759,
    1760,
    5,
    42,
    0,
    0,
    1760,
    358,
    1,
    0,
    0,
    0,
    1761,
    1762,
    5,
    45,
    0,
    0,
    1762,
    1763,
    5,
    62,
    0,
    0,
    1763,
    360,
    1,
    0,
    0,
    0,
    1764,
    1765,
    5,
    46,
    0,
    0,
    1765,
    1766,
    5,
    46,
    0,
    0,
    1766,
    362,
    1,
    0,
    0,
    0,
    1767,
    1768,
    5,
    46,
    0,
    0,
    1768,
    1769,
    5,
    63,
    0,
    0,
    1769,
    364,
    1,
    0,
    0,
    0,
    1770,
    1771,
    5,
    58,
    0,
    0,
    1771,
    1772,
    5,
    58,
    0,
    0,
    1772,
    366,
    1,
    0,
    0,
    0,
    1773,
    1774,
    5,
    58,
    0,
    0,
    1774,
    1775,
    5,
    61,
    0,
    0,
    1775,
    368,
    1,
    0,
    0,
    0,
    1776,
    1777,
    5,
    58,
    0,
    0,
    1777,
    1778,
    5,
    62,
    0,
    0,
    1778,
    370,
    1,
    0,
    0,
    0,
    1779,
    1780,
    5,
    60,
    0,
    0,
    1780,
    1781,
    5,
    61,
    0,
    0,
    1781,
    372,
    1,
    0,
    0,
    0,
    1782,
    1783,
    5,
    61,
    0,
    0,
    1783,
    1784,
    5,
    61,
    0,
    0,
    1784,
    374,
    1,
    0,
    0,
    0,
    1785,
    1786,
    5,
    61,
    0,
    0,
    1786,
    1787,
    5,
    62,
    0,
    0,
    1787,
    376,
    1,
    0,
    0,
    0,
    1788,
    1789,
    5,
    62,
    0,
    0,
    1789,
    1790,
    5,
    61,
    0,
    0,
    1790,
    378,
    1,
    0,
    0,
    0,
    1791,
    1792,
    5,
    63,
    0,
    0,
    1792,
    1793,
    5,
    63,
    0,
    0,
    1793,
    380,
    1,
    0,
    0,
    0,
    1794,
    1795,
    5,
    64,
    0,
    0,
    1795,
    1796,
    5,
    64,
    0,
    0,
    1796,
    382,
    1,
    0,
    0,
    0,
    1797,
    1798,
    5,
    35,
    0,
    0,
    1798,
    384,
    1,
    0,
    0,
    0,
    1799,
    1800,
    5,
    36,
    0,
    0,
    1800,
    386,
    1,
    0,
    0,
    0,
    1801,
    1802,
    5,
    37,
    0,
    0,
    1802,
    388,
    1,
    0,
    0,
    0,
    1803,
    1804,
    5,
    38,
    0,
    0,
    1804,
    390,
    1,
    0,
    0,
    0,
    1805,
    1806,
    5,
    40,
    0,
    0,
    1806,
    392,
    1,
    0,
    0,
    0,
    1807,
    1808,
    5,
    41,
    0,
    0,
    1808,
    394,
    1,
    0,
    0,
    0,
    1809,
    1810,
    5,
    42,
    0,
    0,
    1810,
    396,
    1,
    0,
    0,
    0,
    1811,
    1812,
    5,
    43,
    0,
    0,
    1812,
    398,
    1,
    0,
    0,
    0,
    1813,
    1814,
    5,
    44,
    0,
    0,
    1814,
    400,
    1,
    0,
    0,
    0,
    1815,
    1816,
    5,
    45,
    0,
    0,
    1816,
    402,
    1,
    0,
    0,
    0,
    1817,
    1818,
    5,
    46,
    0,
    0,
    1818,
    404,
    1,
    0,
    0,
    0,
    1819,
    1820,
    5,
    47,
    0,
    0,
    1820,
    406,
    1,
    0,
    0,
    0,
    1821,
    1822,
    5,
    58,
    0,
    0,
    1822,
    408,
    1,
    0,
    0,
    0,
    1823,
    1824,
    5,
    59,
    0,
    0,
    1824,
    410,
    1,
    0,
    0,
    0,
    1825,
    1826,
    5,
    60,
    0,
    0,
    1826,
    412,
    1,
    0,
    0,
    0,
    1827,
    1828,
    5,
    61,
    0,
    0,
    1828,
    414,
    1,
    0,
    0,
    0,
    1829,
    1830,
    5,
    62,
    0,
    0,
    1830,
    416,
    1,
    0,
    0,
    0,
    1831,
    1832,
    5,
    63,
    0,
    0,
    1832,
    418,
    1,
    0,
    0,
    0,
    1833,
    1834,
    5,
    64,
    0,
    0,
    1834,
    420,
    1,
    0,
    0,
    0,
    1835,
    1836,
    5,
    91,
    0,
    0,
    1836,
    422,
    1,
    0,
    0,
    0,
    1837,
    1838,
    5,
    93,
    0,
    0,
    1838,
    424,
    1,
    0,
    0,
    0,
    1839,
    1840,
    5,
    94,
    0,
    0,
    1840,
    426,
    1,
    0,
    0,
    0,
    1841,
    1842,
    5,
    123,
    0,
    0,
    1842,
    428,
    1,
    0,
    0,
    0,
    1843,
    1844,
    5,
    124,
    0,
    0,
    1844,
    430,
    1,
    0,
    0,
    0,
    1845,
    1846,
    5,
    125,
    0,
    0,
    1846,
    432,
    1,
    0,
    0,
    0,
    1847,
    1848,
    5,
    126,
    0,
    0,
    1848,
    434,
    1,
    0,
    0,
    0,
    1849,
    1853,
    7,
    0,
    0,
    0,
    1850,
    1852,
    7,
    1,
    0,
    0,
    1851,
    1850,
    1,
    0,
    0,
    0,
    1852,
    1855,
    1,
    0,
    0,
    0,
    1853,
    1851,
    1,
    0,
    0,
    0,
    1853,
    1854,
    1,
    0,
    0,
    0,
    1854,
    436,
    1,
    0,
    0,
    0,
    1855,
    1853,
    1,
    0,
    0,
    0,
    1856,
    1862,
    5,
    39,
    0,
    0,
    1857,
    1858,
    5,
    92,
    0,
    0,
    1858,
    1861,
    9,
    0,
    0,
    0,
    1859,
    1861,
    8,
    2,
    0,
    0,
    1860,
    1857,
    1,
    0,
    0,
    0,
    1860,
    1859,
    1,
    0,
    0,
    0,
    1861,
    1864,
    1,
    0,
    0,
    0,
    1862,
    1860,
    1,
    0,
    0,
    0,
    1862,
    1863,
    1,
    0,
    0,
    0,
    1863,
    1865,
    1,
    0,
    0,
    0,
    1864,
    1862,
    1,
    0,
    0,
    0,
    1865,
    1866,
    5,
    39,
    0,
    0,
    1866,
    438,
    1,
    0,
    0,
    0,
    1867,
    1873,
    5,
    34,
    0,
    0,
    1868,
    1869,
    5,
    92,
    0,
    0,
    1869,
    1872,
    9,
    0,
    0,
    0,
    1870,
    1872,
    8,
    3,
    0,
    0,
    1871,
    1868,
    1,
    0,
    0,
    0,
    1871,
    1870,
    1,
    0,
    0,
    0,
    1872,
    1875,
    1,
    0,
    0,
    0,
    1873,
    1871,
    1,
    0,
    0,
    0,
    1873,
    1874,
    1,
    0,
    0,
    0,
    1874,
    1876,
    1,
    0,
    0,
    0,
    1875,
    1873,
    1,
    0,
    0,
    0,
    1876,
    1877,
    5,
    34,
    0,
    0,
    1877,
    440,
    1,
    0,
    0,
    0,
    1878,
    1880,
    7,
    4,
    0,
    0,
    1879,
    1878,
    1,
    0,
    0,
    0,
    1880,
    1881,
    1,
    0,
    0,
    0,
    1881,
    1879,
    1,
    0,
    0,
    0,
    1881,
    1882,
    1,
    0,
    0,
    0,
    1882,
    442,
    1,
    0,
    0,
    0,
    1883,
    1885,
    7,
    4,
    0,
    0,
    1884,
    1883,
    1,
    0,
    0,
    0,
    1885,
    1888,
    1,
    0,
    0,
    0,
    1886,
    1884,
    1,
    0,
    0,
    0,
    1886,
    1887,
    1,
    0,
    0,
    0,
    1887,
    1889,
    1,
    0,
    0,
    0,
    1888,
    1886,
    1,
    0,
    0,
    0,
    1889,
    1891,
    5,
    46,
    0,
    0,
    1890,
    1892,
    7,
    4,
    0,
    0,
    1891,
    1890,
    1,
    0,
    0,
    0,
    1892,
    1893,
    1,
    0,
    0,
    0,
    1893,
    1891,
    1,
    0,
    0,
    0,
    1893,
    1894,
    1,
    0,
    0,
    0,
    1894,
    1904,
    1,
    0,
    0,
    0,
    1895,
    1897,
    7,
    5,
    0,
    0,
    1896,
    1898,
    7,
    6,
    0,
    0,
    1897,
    1896,
    1,
    0,
    0,
    0,
    1897,
    1898,
    1,
    0,
    0,
    0,
    1898,
    1900,
    1,
    0,
    0,
    0,
    1899,
    1901,
    7,
    4,
    0,
    0,
    1900,
    1899,
    1,
    0,
    0,
    0,
    1901,
    1902,
    1,
    0,
    0,
    0,
    1902,
    1900,
    1,
    0,
    0,
    0,
    1902,
    1903,
    1,
    0,
    0,
    0,
    1903,
    1905,
    1,
    0,
    0,
    0,
    1904,
    1895,
    1,
    0,
    0,
    0,
    1904,
    1905,
    1,
    0,
    0,
    0,
    1905,
    1921,
    1,
    0,
    0,
    0,
    1906,
    1908,
    7,
    4,
    0,
    0,
    1907,
    1906,
    1,
    0,
    0,
    0,
    1908,
    1909,
    1,
    0,
    0,
    0,
    1909,
    1907,
    1,
    0,
    0,
    0,
    1909,
    1910,
    1,
    0,
    0,
    0,
    1910,
    1911,
    1,
    0,
    0,
    0,
    1911,
    1913,
    7,
    5,
    0,
    0,
    1912,
    1914,
    7,
    6,
    0,
    0,
    1913,
    1912,
    1,
    0,
    0,
    0,
    1913,
    1914,
    1,
    0,
    0,
    0,
    1914,
    1916,
    1,
    0,
    0,
    0,
    1915,
    1917,
    7,
    4,
    0,
    0,
    1916,
    1915,
    1,
    0,
    0,
    0,
    1917,
    1918,
    1,
    0,
    0,
    0,
    1918,
    1916,
    1,
    0,
    0,
    0,
    1918,
    1919,
    1,
    0,
    0,
    0,
    1919,
    1921,
    1,
    0,
    0,
    0,
    1920,
    1886,
    1,
    0,
    0,
    0,
    1920,
    1907,
    1,
    0,
    0,
    0,
    1921,
    444,
    1,
    0,
    0,
    0,
    1922,
    1923,
    5,
    47,
    0,
    0,
    1923,
    1924,
    5,
    42,
    0,
    0,
    1924,
    1928,
    1,
    0,
    0,
    0,
    1925,
    1927,
    9,
    0,
    0,
    0,
    1926,
    1925,
    1,
    0,
    0,
    0,
    1927,
    1930,
    1,
    0,
    0,
    0,
    1928,
    1929,
    1,
    0,
    0,
    0,
    1928,
    1926,
    1,
    0,
    0,
    0,
    1929,
    1931,
    1,
    0,
    0,
    0,
    1930,
    1928,
    1,
    0,
    0,
    0,
    1931,
    1932,
    5,
    42,
    0,
    0,
    1932,
    1946,
    5,
    47,
    0,
    0,
    1933,
    1934,
    5,
    47,
    0,
    0,
    1934,
    1935,
    5,
    47,
    0,
    0,
    1935,
    1936,
    5,
    42,
    0,
    0,
    1936,
    1940,
    1,
    0,
    0,
    0,
    1937,
    1939,
    9,
    0,
    0,
    0,
    1938,
    1937,
    1,
    0,
    0,
    0,
    1939,
    1942,
    1,
    0,
    0,
    0,
    1940,
    1941,
    1,
    0,
    0,
    0,
    1940,
    1938,
    1,
    0,
    0,
    0,
    1941,
    1943,
    1,
    0,
    0,
    0,
    1942,
    1940,
    1,
    0,
    0,
    0,
    1943,
    1944,
    5,
    42,
    0,
    0,
    1944,
    1946,
    5,
    47,
    0,
    0,
    1945,
    1922,
    1,
    0,
    0,
    0,
    1945,
    1933,
    1,
    0,
    0,
    0,
    1946,
    446,
    1,
    0,
    0,
    0,
    1947,
    1948,
    5,
    47,
    0,
    0,
    1948,
    1949,
    5,
    47,
    0,
    0,
    1949,
    1950,
    1,
    0,
    0,
    0,
    1950,
    1954,
    8,
    7,
    0,
    0,
    1951,
    1953,
    8,
    8,
    0,
    0,
    1952,
    1951,
    1,
    0,
    0,
    0,
    1953,
    1956,
    1,
    0,
    0,
    0,
    1954,
    1952,
    1,
    0,
    0,
    0,
    1954,
    1955,
    1,
    0,
    0,
    0,
    1955,
    1957,
    1,
    0,
    0,
    0,
    1956,
    1954,
    1,
    0,
    0,
    0,
    1957,
    1958,
    6,
    223,
    0,
    0,
    1958,
    448,
    1,
    0,
    0,
    0,
    1959,
    1960,
    5,
    47,
    0,
    0,
    1960,
    1961,
    5,
    47,
    0,
    0,
    1961,
    1962,
    1,
    0,
    0,
    0,
    1962,
    1963,
    6,
    224,
    0,
    0,
    1963,
    450,
    1,
    0,
    0,
    0,
    1964,
    1966,
    7,
    9,
    0,
    0,
    1965,
    1964,
    1,
    0,
    0,
    0,
    1966,
    1967,
    1,
    0,
    0,
    0,
    1967,
    1965,
    1,
    0,
    0,
    0,
    1967,
    1968,
    1,
    0,
    0,
    0,
    1968,
    1969,
    1,
    0,
    0,
    0,
    1969,
    1970,
    6,
    225,
    0,
    0,
    1970,
    452,
    1,
    0,
    0,
    0,
    21,
    0,
    1853,
    1860,
    1862,
    1871,
    1873,
    1881,
    1886,
    1893,
    1897,
    1902,
    1904,
    1909,
    1913,
    1918,
    1920,
    1928,
    1940,
    1945,
    1954,
    1967,
    1,
    6,
    0,
    0
  ];
  static __ATN;
  static get _ATN() {
    if (!_SysMLv2Lexer.__ATN) {
      _SysMLv2Lexer.__ATN = new ATNDeserializer().deserialize(_SysMLv2Lexer._serializedATN);
    }
    return _SysMLv2Lexer.__ATN;
  }
  static vocabulary = new Vocabulary(_SysMLv2Lexer.literalNames, _SysMLv2Lexer.symbolicNames, []);
  get vocabulary() {
    return _SysMLv2Lexer.vocabulary;
  }
  static decisionsToDFA = _SysMLv2Lexer._ATN.decisionToState.map((ds, index2) => new DFA(ds, index2));
};

// server/src/generated/SysMLv2Parser.ts
var SysMLv2Parser = class _SysMLv2Parser extends Parser {
  static ABOUT = 1;
  static ABSTRACT = 2;
  static ACCEPT = 3;
  static ACTION = 4;
  static ACTOR = 5;
  static AFTER = 6;
  static ALIAS = 7;
  static ALL = 8;
  static ALLOCATE = 9;
  static ALLOCATION = 10;
  static ANALYSIS = 11;
  static AND = 12;
  static AS = 13;
  static ASSERT = 14;
  static ASSIGN = 15;
  static ASSOC = 16;
  static ASSUME = 17;
  static AT = 18;
  static ATTRIBUTE = 19;
  static BEHAVIOR = 20;
  static BIND = 21;
  static BINDING = 22;
  static BOOL = 23;
  static BY = 24;
  static CALC = 25;
  static CASE = 26;
  static CHAINS = 27;
  static CLASS = 28;
  static CLASSIFIER = 29;
  static COMMENT = 30;
  static COMPOSITE = 31;
  static CONCERN = 32;
  static CONJUGATE = 33;
  static CONJUGATES = 34;
  static CONJUGATION = 35;
  static CONNECT = 36;
  static CONNECTION = 37;
  static CONNECTOR = 38;
  static CONST = 39;
  static CONSTANT = 40;
  static CONSTRAINT = 41;
  static CROSSES = 42;
  static DATATYPE = 43;
  static DECIDE = 44;
  static DEF = 45;
  static DEFAULT = 46;
  static DEFINED = 47;
  static DEPENDENCY = 48;
  static DERIVED = 49;
  static DIFFERENCES = 50;
  static DISJOINING = 51;
  static DISJOINT = 52;
  static DO = 53;
  static DOC = 54;
  static ELSE = 55;
  static END = 56;
  static ENTRY = 57;
  static ENUM = 58;
  static EVENT = 59;
  static EXHIBIT = 60;
  static EXIT = 61;
  static EXPOSE = 62;
  static EXPR = 63;
  static FALSE = 64;
  static FEATURE = 65;
  static FEATURED = 66;
  static FEATURING = 67;
  static FILTER = 68;
  static FIRST = 69;
  static FLOW = 70;
  static FOR = 71;
  static FORK = 72;
  static FRAME = 73;
  static FROM = 74;
  static FUNCTION = 75;
  static HASTYPE = 76;
  static IF = 77;
  static IMPLIES = 78;
  static IMPORT = 79;
  static IN = 80;
  static INCLUDE = 81;
  static INDIVIDUAL = 82;
  static INOUT = 83;
  static INTERACTION = 84;
  static INTERFACE = 85;
  static INTERSECTS = 86;
  static INV = 87;
  static INVERSE = 88;
  static INVERTING = 89;
  static ISTYPE = 90;
  static ITEM = 91;
  static JOIN = 92;
  static LANGUAGE = 93;
  static LIBRARY = 94;
  static LOCALE = 95;
  static LOOP = 96;
  static MEMBER = 97;
  static MERGE = 98;
  static MESSAGE = 99;
  static META = 100;
  static METACLASS = 101;
  static METADATA = 102;
  static MULTIPLICITY = 103;
  static NAMESPACE = 104;
  static NEW = 105;
  static NONUNIQUE = 106;
  static NOT = 107;
  static NULL = 108;
  static OBJECTIVE = 109;
  static OCCURRENCE = 110;
  static OF = 111;
  static OR = 112;
  static ORDERED = 113;
  static OUT = 114;
  static PACKAGE = 115;
  static PARALLEL = 116;
  static PART = 117;
  static PERFORM = 118;
  static PORT = 119;
  static PORTION = 120;
  static PREDICATE = 121;
  static PRIVATE = 122;
  static PROTECTED = 123;
  static PUBLIC = 124;
  static REDEFINES = 125;
  static REDEFINITION = 126;
  static REF = 127;
  static REFERENCES = 128;
  static RENDER = 129;
  static RENDERING = 130;
  static REP = 131;
  static REQUIRE = 132;
  static REQUIREMENT = 133;
  static RETURN = 134;
  static SATISFY = 135;
  static SEND = 136;
  static SNAPSHOT = 137;
  static SPECIALIZATION = 138;
  static SPECIALIZES = 139;
  static STAKEHOLDER = 140;
  static STANDARD = 141;
  static STATE = 142;
  static STEP = 143;
  static STRUCT = 144;
  static SUBCLASSIFIER = 145;
  static SUBJECT = 146;
  static SUBSET = 147;
  static SUBSETS = 148;
  static SUBTYPE = 149;
  static SUCCESSION = 150;
  static TERMINATE = 151;
  static THEN = 152;
  static TIMESLICE = 153;
  static TO = 154;
  static TRANSITION = 155;
  static TRUE = 156;
  static TYPE = 157;
  static TYPED = 158;
  static TYPING = 159;
  static UNIONS = 160;
  static UNTIL = 161;
  static USE = 162;
  static VAR = 163;
  static VARIANT = 164;
  static VARIATION = 165;
  static VERIFICATION = 166;
  static VERIFY = 167;
  static VIA = 168;
  static VIEW = 169;
  static VIEWPOINT = 170;
  static WHEN = 171;
  static WHILE = 172;
  static XOR = 173;
  static BANG_EQ_EQ = 174;
  static COLON_COLON_GT = 175;
  static COLON_GT_GT = 176;
  static EQ_EQ_EQ = 177;
  static BANG_EQ = 178;
  static STAR_STAR = 179;
  static ARROW = 180;
  static DOT_DOT = 181;
  static DOT_QUESTION = 182;
  static COLON_COLON = 183;
  static COLON_EQ = 184;
  static COLON_GT = 185;
  static LE = 186;
  static EQ_EQ = 187;
  static FAT_ARROW = 188;
  static GE = 189;
  static QUESTION_QUESTION = 190;
  static AT_AT = 191;
  static HASH = 192;
  static DOLLAR = 193;
  static PERCENT = 194;
  static AMP = 195;
  static LPAREN = 196;
  static RPAREN = 197;
  static STAR = 198;
  static PLUS = 199;
  static COMMA = 200;
  static MINUS = 201;
  static DOT = 202;
  static SLASH = 203;
  static COLON = 204;
  static SEMI = 205;
  static LT = 206;
  static EQ = 207;
  static GT = 208;
  static QUESTION = 209;
  static AT_SIGN = 210;
  static LBRACK = 211;
  static RBRACK = 212;
  static CARET = 213;
  static LBRACE = 214;
  static PIPE = 215;
  static RBRACE = 216;
  static TILDE = 217;
  static IDENTIFIER = 218;
  static STRING = 219;
  static DOUBLE_STRING = 220;
  static INTEGER = 221;
  static REAL = 222;
  static REGULAR_COMMENT = 223;
  static SINGLE_LINE_NOTE = 224;
  static BARE_LINE_COMMENT = 225;
  static WS = 226;
  static RULE_ownedExpression = 0;
  static RULE_typeReference = 1;
  static RULE_sequenceExpressionList = 2;
  static RULE_baseExpression = 3;
  static RULE_nullExpression = 4;
  static RULE_featureReferenceExpression = 5;
  static RULE_constructorExpression = 6;
  static RULE_bodyExpression = 7;
  static RULE_argumentList = 8;
  static RULE_positionalArgumentList = 9;
  static RULE_namedArgumentList = 10;
  static RULE_namedArgument = 11;
  static RULE_literalExpression = 12;
  static RULE_literalBoolean = 13;
  static RULE_literalString = 14;
  static RULE_literalInteger = 15;
  static RULE_literalReal = 16;
  static RULE_literalInfinity = 17;
  static RULE_argumentMember = 18;
  static RULE_argumentExpressionMember = 19;
  static RULE_name = 20;
  static RULE_unreservedKeyword = 21;
  static RULE_identification = 22;
  static RULE_relationshipBody = 23;
  static RULE_relationshipOwnedElement = 24;
  static RULE_ownedRelatedElement = 25;
  static RULE_dependency = 26;
  static RULE_annotation = 27;
  static RULE_ownedAnnotation = 28;
  static RULE_annotatingElement = 29;
  static RULE_comment = 30;
  static RULE_documentation = 31;
  static RULE_textualRepresentation = 32;
  static RULE_rootNamespace = 33;
  static RULE_namespace = 34;
  static RULE_namespaceDeclaration = 35;
  static RULE_namespaceBody = 36;
  static RULE_namespaceBodyElement = 37;
  static RULE_memberPrefix = 38;
  static RULE_visibilityIndicator = 39;
  static RULE_namespaceMember = 40;
  static RULE_nonFeatureMember = 41;
  static RULE_namespaceFeatureMember = 42;
  static RULE_aliasMember = 43;
  static RULE_qualifiedName = 44;
  static RULE_importRule = 45;
  static RULE_importDeclaration = 46;
  static RULE_membershipImport = 47;
  static RULE_namespaceImport = 48;
  static RULE_filterPackage = 49;
  static RULE_filterPackageMember = 50;
  static RULE_memberElement = 51;
  static RULE_nonFeatureElement = 52;
  static RULE_featureElement = 53;
  static RULE_type = 54;
  static RULE_typePrefix = 55;
  static RULE_typeDeclaration = 56;
  static RULE_specializationPart = 57;
  static RULE_conjugationPart = 58;
  static RULE_typeRelationshipPart = 59;
  static RULE_disjoiningPart = 60;
  static RULE_unioningPart = 61;
  static RULE_intersectingPart = 62;
  static RULE_differencingPart = 63;
  static RULE_typeBody = 64;
  static RULE_typeBodyElement = 65;
  static RULE_specialization = 66;
  static RULE_ownedSpecialization = 67;
  static RULE_specificType = 68;
  static RULE_generalType = 69;
  static RULE_conjugation = 70;
  static RULE_ownedConjugation = 71;
  static RULE_disjoining = 72;
  static RULE_ownedDisjoining = 73;
  static RULE_unioning = 74;
  static RULE_intersecting = 75;
  static RULE_differencing = 76;
  static RULE_featureMember = 77;
  static RULE_typeFeatureMember = 78;
  static RULE_ownedFeatureMember = 79;
  static RULE_classifier = 80;
  static RULE_classifierDeclaration = 81;
  static RULE_superclassingPart = 82;
  static RULE_subclassification = 83;
  static RULE_ownedSubclassification = 84;
  static RULE_feature = 85;
  static RULE_endFeaturePrefix = 86;
  static RULE_basicFeaturePrefix = 87;
  static RULE_featurePrefix = 88;
  static RULE_ownedCrossFeatureMember = 89;
  static RULE_ownedCrossFeature = 90;
  static RULE_featureDirection = 91;
  static RULE_featureDeclaration = 92;
  static RULE_featureIdentification = 93;
  static RULE_featureRelationshipPart = 94;
  static RULE_chainingPart = 95;
  static RULE_invertingPart = 96;
  static RULE_typeFeaturingPart = 97;
  static RULE_featureSpecializationPart = 98;
  static RULE_multiplicityPart = 99;
  static RULE_featureSpecialization = 100;
  static RULE_typings = 101;
  static RULE_typedBy = 102;
  static RULE_subsettings = 103;
  static RULE_subsets = 104;
  static RULE_references = 105;
  static RULE_crosses = 106;
  static RULE_redefinitions = 107;
  static RULE_redefines = 108;
  static RULE_featureTyping = 109;
  static RULE_ownedFeatureTyping = 110;
  static RULE_subsetting = 111;
  static RULE_ownedSubsetting = 112;
  static RULE_ownedReferenceSubsetting = 113;
  static RULE_ownedCrossSubsetting = 114;
  static RULE_redefinition = 115;
  static RULE_ownedRedefinition = 116;
  static RULE_featureInverting = 117;
  static RULE_ownedFeatureInverting = 118;
  static RULE_typeFeaturing = 119;
  static RULE_ownedTypeFeaturing = 120;
  static RULE_dataType = 121;
  static RULE_class = 122;
  static RULE_structure = 123;
  static RULE_association = 124;
  static RULE_associationStructure = 125;
  static RULE_connector = 126;
  static RULE_connectorDeclaration = 127;
  static RULE_binaryConnectorDeclaration = 128;
  static RULE_naryConnectorDeclaration = 129;
  static RULE_connectorEndMember = 130;
  static RULE_connectorEnd = 131;
  static RULE_ownedCrossMultiplicityMember = 132;
  static RULE_ownedCrossMultiplicity = 133;
  static RULE_bindingConnector = 134;
  static RULE_bindingConnectorDeclaration = 135;
  static RULE_succession = 136;
  static RULE_successionDeclaration = 137;
  static RULE_behavior = 138;
  static RULE_step = 139;
  static RULE_function = 140;
  static RULE_functionBody = 141;
  static RULE_functionBodyPart = 142;
  static RULE_returnFeatureMember = 143;
  static RULE_resultExpressionMember = 144;
  static RULE_expression = 145;
  static RULE_predicate = 146;
  static RULE_booleanExpression = 147;
  static RULE_invariant = 148;
  static RULE_featureChainMember = 149;
  static RULE_interaction = 150;
  static RULE_flow = 151;
  static RULE_successionFlow = 152;
  static RULE_flowDeclaration = 153;
  static RULE_payloadFeatureMember = 154;
  static RULE_payloadFeature = 155;
  static RULE_payloadFeatureSpecializationPart = 156;
  static RULE_flowEndMember = 157;
  static RULE_flowEnd = 158;
  static RULE_valuePart = 159;
  static RULE_featureValue = 160;
  static RULE_multiplicity = 161;
  static RULE_multiplicitySubset = 162;
  static RULE_multiplicityRange = 163;
  static RULE_ownedMultiplicity = 164;
  static RULE_ownedMultiplicityRange = 165;
  static RULE_multiplicityBounds = 166;
  static RULE_multiplicityExpressionMember = 167;
  static RULE_metaclass = 168;
  static RULE_prefixMetadataAnnotation = 169;
  static RULE_prefixMetadataMember = 170;
  static RULE_prefixMetadataFeature = 171;
  static RULE_metadataFeature = 172;
  static RULE_metadataFeatureDeclaration = 173;
  static RULE_metadataBody = 174;
  static RULE_metadataBodyElement = 175;
  static RULE_metadataBodyFeatureMember = 176;
  static RULE_metadataBodyFeature = 177;
  static RULE_package = 178;
  static RULE_libraryPackage = 179;
  static RULE_packageDeclaration = 180;
  static RULE_packageBody = 181;
  static RULE_elementFilterMember = 182;
  static RULE_dependencyDeclaration = 183;
  static RULE_annotatingMember = 184;
  static RULE_packageBodyElement = 185;
  static RULE_packageMember = 186;
  static RULE_definitionElement = 187;
  static RULE_usageElement = 188;
  static RULE_basicDefinitionPrefix = 189;
  static RULE_definitionExtensionKeyword = 190;
  static RULE_definitionPrefix = 191;
  static RULE_definition = 192;
  static RULE_definitionDeclaration = 193;
  static RULE_definitionBody = 194;
  static RULE_definitionBodyItem = 195;
  static RULE_definitionBodyItemContent = 196;
  static RULE_definitionMember = 197;
  static RULE_variantUsageMember = 198;
  static RULE_nonOccurrenceUsageMember = 199;
  static RULE_structureUsageMember = 200;
  static RULE_behaviorUsageMember = 201;
  static RULE_refPrefix = 202;
  static RULE_basicUsagePrefix = 203;
  static RULE_endUsagePrefix = 204;
  static RULE_usageExtensionKeyword = 205;
  static RULE_unextendedUsagePrefix = 206;
  static RULE_usagePrefix = 207;
  static RULE_usage = 208;
  static RULE_usageDeclaration = 209;
  static RULE_usageCompletion = 210;
  static RULE_usageBody = 211;
  static RULE_defaultReferenceUsage = 212;
  static RULE_referenceUsage = 213;
  static RULE_endFeatureUsage = 214;
  static RULE_variantReference = 215;
  static RULE_nonOccurrenceUsageElement = 216;
  static RULE_endOccurrenceUsageElement = 217;
  static RULE_occurrenceUsageElement = 218;
  static RULE_structureUsageElement = 219;
  static RULE_behaviorUsageElement = 220;
  static RULE_variantUsageElement = 221;
  static RULE_subclassificationPart = 222;
  static RULE_attributeDefinition = 223;
  static RULE_attributeUsage = 224;
  static RULE_enumerationDefinition = 225;
  static RULE_enumerationBody = 226;
  static RULE_enumerationUsageMember = 227;
  static RULE_enumeratedValue = 228;
  static RULE_enumerationUsage = 229;
  static RULE_occurrenceDefinitionPrefix = 230;
  static RULE_occurrenceDefinition = 231;
  static RULE_individualDefinition = 232;
  static RULE_emptyMultiplicityMember = 233;
  static RULE_occurrenceUsagePrefix = 234;
  static RULE_occurrenceUsage = 235;
  static RULE_individualUsage = 236;
  static RULE_portionUsage = 237;
  static RULE_portionKind = 238;
  static RULE_eventOccurrenceUsage = 239;
  static RULE_sourceSuccessionMember = 240;
  static RULE_sourceSuccession = 241;
  static RULE_sourceEndMember = 242;
  static RULE_sourceEnd = 243;
  static RULE_itemDefinition = 244;
  static RULE_itemUsage = 245;
  static RULE_partDefinition = 246;
  static RULE_partUsage = 247;
  static RULE_portDefinition = 248;
  static RULE_conjugatedPortDefinitionMember = 249;
  static RULE_conjugatedPortDefinition = 250;
  static RULE_portUsage = 251;
  static RULE_conjugatedPortTyping = 252;
  static RULE_connectionDefinition = 253;
  static RULE_connectionUsage = 254;
  static RULE_connectorPart = 255;
  static RULE_binaryConnectorPart = 256;
  static RULE_naryConnectorPart = 257;
  static RULE_bindingConnectorAsUsage = 258;
  static RULE_successionAsUsage = 259;
  static RULE_interfaceDefinition = 260;
  static RULE_interfaceBody = 261;
  static RULE_interfaceBodyItem = 262;
  static RULE_interfaceNonOccurrenceUsageMember = 263;
  static RULE_interfaceNonOccurrenceUsageElement = 264;
  static RULE_interfaceOccurrenceUsageMember = 265;
  static RULE_interfaceOccurrenceUsageElement = 266;
  static RULE_defaultInterfaceEnd = 267;
  static RULE_interfaceUsage = 268;
  static RULE_interfaceUsageDeclaration = 269;
  static RULE_interfacePart = 270;
  static RULE_binaryInterfacePart = 271;
  static RULE_naryInterfacePart = 272;
  static RULE_interfaceEndMember = 273;
  static RULE_interfaceEnd = 274;
  static RULE_allocationDefinition = 275;
  static RULE_allocationUsage = 276;
  static RULE_allocationUsageDeclaration = 277;
  static RULE_flowDefinition = 278;
  static RULE_message = 279;
  static RULE_messageDeclaration = 280;
  static RULE_messageEventMember = 281;
  static RULE_messageEvent = 282;
  static RULE_flowUsage = 283;
  static RULE_successionFlowUsage = 284;
  static RULE_flowPayloadFeatureMember = 285;
  static RULE_flowPayloadFeature = 286;
  static RULE_actionDefinition = 287;
  static RULE_actionBody = 288;
  static RULE_actionBodyItem = 289;
  static RULE_nonBehaviorBodyItem = 290;
  static RULE_actionBehaviorMember = 291;
  static RULE_initialNodeMember = 292;
  static RULE_actionNodeMember = 293;
  static RULE_actionTargetSuccessionMember = 294;
  static RULE_guardedSuccessionMember = 295;
  static RULE_actionUsage = 296;
  static RULE_actionUsageDeclaration = 297;
  static RULE_performActionUsage = 298;
  static RULE_performActionUsageDeclaration = 299;
  static RULE_actionNode = 300;
  static RULE_actionNodeUsageDeclaration = 301;
  static RULE_actionNodePrefix = 302;
  static RULE_controlNode = 303;
  static RULE_controlNodePrefix = 304;
  static RULE_mergeNode = 305;
  static RULE_decisionNode = 306;
  static RULE_joinNode = 307;
  static RULE_forkNode = 308;
  static RULE_acceptNode = 309;
  static RULE_acceptNodeDeclaration = 310;
  static RULE_acceptParameterPart = 311;
  static RULE_payloadParameterMember = 312;
  static RULE_payloadParameter = 313;
  static RULE_triggerValuePart = 314;
  static RULE_triggerFeatureValue = 315;
  static RULE_triggerExpression = 316;
  static RULE_sendNode = 317;
  static RULE_sendNodeDeclaration = 318;
  static RULE_senderReceiverPart = 319;
  static RULE_nodeParameterMember = 320;
  static RULE_nodeParameter = 321;
  static RULE_featureBinding = 322;
  static RULE_emptyParameterMember = 323;
  static RULE_assignmentNode = 324;
  static RULE_assignmentNodeDeclaration = 325;
  static RULE_assignmentTargetMember = 326;
  static RULE_assignmentTargetParameter = 327;
  static RULE_assignmentTargetBinding = 328;
  static RULE_terminateNode = 329;
  static RULE_ifNode = 330;
  static RULE_expressionParameterMember = 331;
  static RULE_actionBodyParameterMember = 332;
  static RULE_actionBodyParameter = 333;
  static RULE_ifNodeParameterMember = 334;
  static RULE_whileLoopNode = 335;
  static RULE_forLoopNode = 336;
  static RULE_forVariableDeclarationMember = 337;
  static RULE_actionTargetSuccession = 338;
  static RULE_targetSuccession = 339;
  static RULE_guardedTargetSuccession = 340;
  static RULE_defaultTargetSuccession = 341;
  static RULE_guardedSuccession = 342;
  static RULE_stateDefinition = 343;
  static RULE_stateDefBody = 344;
  static RULE_stateBodyItem = 345;
  static RULE_entryActionMember = 346;
  static RULE_doActionMember = 347;
  static RULE_exitActionMember = 348;
  static RULE_entryTransitionMember = 349;
  static RULE_stateActionUsage = 350;
  static RULE_statePerformActionUsage = 351;
  static RULE_stateAcceptActionUsage = 352;
  static RULE_stateSendActionUsage = 353;
  static RULE_stateAssignmentActionUsage = 354;
  static RULE_transitionUsageMember = 355;
  static RULE_targetTransitionUsageMember = 356;
  static RULE_stateUsage = 357;
  static RULE_stateUsageBody = 358;
  static RULE_exhibitStateUsage = 359;
  static RULE_transitionUsage = 360;
  static RULE_targetTransitionUsage = 361;
  static RULE_triggerActionMember = 362;
  static RULE_triggerAction = 363;
  static RULE_guardExpressionMember = 364;
  static RULE_effectBehaviorMember = 365;
  static RULE_effectBehaviorUsage = 366;
  static RULE_transitionPerformActionUsage = 367;
  static RULE_transitionAcceptActionUsage = 368;
  static RULE_transitionSendActionUsage = 369;
  static RULE_transitionAssignmentActionUsage = 370;
  static RULE_transitionSuccessionMember = 371;
  static RULE_transitionSuccession = 372;
  static RULE_emptyEndMember = 373;
  static RULE_calculationDefinition = 374;
  static RULE_calculationUsage = 375;
  static RULE_calculationBody = 376;
  static RULE_calculationBodyPart = 377;
  static RULE_calculationBodyItem = 378;
  static RULE_returnParameterMember = 379;
  static RULE_constraintDefinition = 380;
  static RULE_constraintUsage = 381;
  static RULE_assertConstraintUsage = 382;
  static RULE_constraintUsageDeclaration = 383;
  static RULE_requirementDefinition = 384;
  static RULE_requirementBody = 385;
  static RULE_requirementBodyItem = 386;
  static RULE_subjectMember = 387;
  static RULE_subjectUsage = 388;
  static RULE_requirementConstraintMember = 389;
  static RULE_requirementKind = 390;
  static RULE_requirementConstraintUsage = 391;
  static RULE_framedConcernMember = 392;
  static RULE_framedConcernUsage = 393;
  static RULE_actorMember = 394;
  static RULE_actorUsage = 395;
  static RULE_stakeholderMember = 396;
  static RULE_stakeholderUsage = 397;
  static RULE_requirementUsage = 398;
  static RULE_satisfyRequirementUsage = 399;
  static RULE_satisfactionSubjectMember = 400;
  static RULE_satisfactionParameter = 401;
  static RULE_satisfactionFeatureValue = 402;
  static RULE_satisfactionReferenceExpression = 403;
  static RULE_concernDefinition = 404;
  static RULE_concernUsage = 405;
  static RULE_caseDefinition = 406;
  static RULE_caseUsage = 407;
  static RULE_caseBody = 408;
  static RULE_caseBodyItem = 409;
  static RULE_objectiveMember = 410;
  static RULE_objectiveRequirementUsage = 411;
  static RULE_analysisCaseDefinition = 412;
  static RULE_analysisCaseUsage = 413;
  static RULE_verificationCaseDefinition = 414;
  static RULE_verificationCaseUsage = 415;
  static RULE_requirementVerificationMember = 416;
  static RULE_requirementVerificationUsage = 417;
  static RULE_useCaseDefinition = 418;
  static RULE_useCaseUsage = 419;
  static RULE_includeUseCaseUsage = 420;
  static RULE_viewDefinition = 421;
  static RULE_viewDefinitionBody = 422;
  static RULE_viewDefinitionBodyItem = 423;
  static RULE_viewRenderingMember = 424;
  static RULE_viewRenderingUsage = 425;
  static RULE_viewUsage = 426;
  static RULE_viewBody = 427;
  static RULE_viewBodyItem = 428;
  static RULE_expose = 429;
  static RULE_membershipExpose = 430;
  static RULE_namespaceExpose = 431;
  static RULE_viewpointDefinition = 432;
  static RULE_viewpointUsage = 433;
  static RULE_renderingDefinition = 434;
  static RULE_renderingUsage = 435;
  static RULE_metadataDefinition = 436;
  static RULE_prefixMetadataUsage = 437;
  static RULE_metadataBodyUsageMember = 438;
  static RULE_metadataBodyUsage = 439;
  static RULE_extendedDefinition = 440;
  static RULE_extendedUsage = 441;
  static RULE_filterPackageImportDeclaration = 442;
  static RULE_namespaceImportDirect = 443;
  static RULE_calculationUsageDeclaration = 444;
  static RULE_emptyActionUsage_ = 445;
  static RULE_emptyFeature_ = 446;
  static RULE_emptyMultiplicity_ = 447;
  static RULE_emptyUsage_ = 448;
  static RULE_filterPackageImport = 449;
  static RULE_nonFeatureChainPrimaryExpression = 450;
  static RULE_portConjugation = 451;
  static literalNames = [
    null,
    "'about'",
    "'abstract'",
    "'accept'",
    "'action'",
    "'actor'",
    "'after'",
    "'alias'",
    "'all'",
    "'allocate'",
    "'allocation'",
    "'analysis'",
    "'and'",
    "'as'",
    "'assert'",
    "'assign'",
    "'assoc'",
    "'assume'",
    "'at'",
    "'attribute'",
    "'behavior'",
    "'bind'",
    "'binding'",
    "'bool'",
    "'by'",
    "'calc'",
    "'case'",
    "'chains'",
    "'class'",
    "'classifier'",
    "'comment'",
    "'composite'",
    "'concern'",
    "'conjugate'",
    "'conjugates'",
    "'conjugation'",
    "'connect'",
    "'connection'",
    "'connector'",
    "'const'",
    "'constant'",
    "'constraint'",
    "'crosses'",
    "'datatype'",
    "'decide'",
    "'def'",
    "'default'",
    "'defined'",
    "'dependency'",
    "'derived'",
    "'differences'",
    "'disjoining'",
    "'disjoint'",
    "'do'",
    "'doc'",
    "'else'",
    "'end'",
    "'entry'",
    "'enum'",
    "'event'",
    "'exhibit'",
    "'exit'",
    "'expose'",
    "'expr'",
    "'false'",
    "'feature'",
    "'featured'",
    "'featuring'",
    "'filter'",
    "'first'",
    "'flow'",
    "'for'",
    "'fork'",
    "'frame'",
    "'from'",
    "'function'",
    "'hastype'",
    "'if'",
    "'implies'",
    "'import'",
    "'in'",
    "'include'",
    "'individual'",
    "'inout'",
    "'interaction'",
    "'interface'",
    "'intersects'",
    "'inv'",
    "'inverse'",
    "'inverting'",
    "'istype'",
    "'item'",
    "'join'",
    "'language'",
    "'library'",
    "'locale'",
    "'loop'",
    "'member'",
    "'merge'",
    "'message'",
    "'meta'",
    "'metaclass'",
    "'metadata'",
    "'multiplicity'",
    "'namespace'",
    "'new'",
    "'nonunique'",
    "'not'",
    "'null'",
    "'objective'",
    "'occurrence'",
    "'of'",
    "'or'",
    "'ordered'",
    "'out'",
    "'package'",
    "'parallel'",
    "'part'",
    "'perform'",
    "'port'",
    "'portion'",
    "'predicate'",
    "'private'",
    "'protected'",
    "'public'",
    "'redefines'",
    "'redefinition'",
    "'ref'",
    "'references'",
    "'render'",
    "'rendering'",
    "'rep'",
    "'require'",
    "'requirement'",
    "'return'",
    "'satisfy'",
    "'send'",
    "'snapshot'",
    "'specialization'",
    "'specializes'",
    "'stakeholder'",
    "'standard'",
    "'state'",
    "'step'",
    "'struct'",
    "'subclassifier'",
    "'subject'",
    "'subset'",
    "'subsets'",
    "'subtype'",
    "'succession'",
    "'terminate'",
    "'then'",
    "'timeslice'",
    "'to'",
    "'transition'",
    "'true'",
    "'type'",
    "'typed'",
    "'typing'",
    "'unions'",
    "'until'",
    "'use'",
    "'var'",
    "'variant'",
    "'variation'",
    "'verification'",
    "'verify'",
    "'via'",
    "'view'",
    "'viewpoint'",
    "'when'",
    "'while'",
    "'xor'",
    "'!=='",
    "'::>'",
    "':>>'",
    "'==='",
    "'!='",
    "'**'",
    "'->'",
    "'..'",
    "'.?'",
    "'::'",
    "':='",
    "':>'",
    "'<='",
    "'=='",
    "'=>'",
    "'>='",
    "'??'",
    "'@@'",
    "'#'",
    "'$'",
    "'%'",
    "'&'",
    "'('",
    "')'",
    "'*'",
    "'+'",
    "','",
    "'-'",
    "'.'",
    "'/'",
    "':'",
    "';'",
    "'<'",
    "'='",
    "'>'",
    "'?'",
    "'@'",
    "'['",
    "']'",
    "'^'",
    "'{'",
    "'|'",
    "'}'",
    "'~'",
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    "'//'"
  ];
  static symbolicNames = [
    null,
    "ABOUT",
    "ABSTRACT",
    "ACCEPT",
    "ACTION",
    "ACTOR",
    "AFTER",
    "ALIAS",
    "ALL",
    "ALLOCATE",
    "ALLOCATION",
    "ANALYSIS",
    "AND",
    "AS",
    "ASSERT",
    "ASSIGN",
    "ASSOC",
    "ASSUME",
    "AT",
    "ATTRIBUTE",
    "BEHAVIOR",
    "BIND",
    "BINDING",
    "BOOL",
    "BY",
    "CALC",
    "CASE",
    "CHAINS",
    "CLASS",
    "CLASSIFIER",
    "COMMENT",
    "COMPOSITE",
    "CONCERN",
    "CONJUGATE",
    "CONJUGATES",
    "CONJUGATION",
    "CONNECT",
    "CONNECTION",
    "CONNECTOR",
    "CONST",
    "CONSTANT",
    "CONSTRAINT",
    "CROSSES",
    "DATATYPE",
    "DECIDE",
    "DEF",
    "DEFAULT",
    "DEFINED",
    "DEPENDENCY",
    "DERIVED",
    "DIFFERENCES",
    "DISJOINING",
    "DISJOINT",
    "DO",
    "DOC",
    "ELSE",
    "END",
    "ENTRY",
    "ENUM",
    "EVENT",
    "EXHIBIT",
    "EXIT",
    "EXPOSE",
    "EXPR",
    "FALSE",
    "FEATURE",
    "FEATURED",
    "FEATURING",
    "FILTER",
    "FIRST",
    "FLOW",
    "FOR",
    "FORK",
    "FRAME",
    "FROM",
    "FUNCTION",
    "HASTYPE",
    "IF",
    "IMPLIES",
    "IMPORT",
    "IN",
    "INCLUDE",
    "INDIVIDUAL",
    "INOUT",
    "INTERACTION",
    "INTERFACE",
    "INTERSECTS",
    "INV",
    "INVERSE",
    "INVERTING",
    "ISTYPE",
    "ITEM",
    "JOIN",
    "LANGUAGE",
    "LIBRARY",
    "LOCALE",
    "LOOP",
    "MEMBER",
    "MERGE",
    "MESSAGE",
    "META",
    "METACLASS",
    "METADATA",
    "MULTIPLICITY",
    "NAMESPACE",
    "NEW",
    "NONUNIQUE",
    "NOT",
    "NULL",
    "OBJECTIVE",
    "OCCURRENCE",
    "OF",
    "OR",
    "ORDERED",
    "OUT",
    "PACKAGE",
    "PARALLEL",
    "PART",
    "PERFORM",
    "PORT",
    "PORTION",
    "PREDICATE",
    "PRIVATE",
    "PROTECTED",
    "PUBLIC",
    "REDEFINES",
    "REDEFINITION",
    "REF",
    "REFERENCES",
    "RENDER",
    "RENDERING",
    "REP",
    "REQUIRE",
    "REQUIREMENT",
    "RETURN",
    "SATISFY",
    "SEND",
    "SNAPSHOT",
    "SPECIALIZATION",
    "SPECIALIZES",
    "STAKEHOLDER",
    "STANDARD",
    "STATE",
    "STEP",
    "STRUCT",
    "SUBCLASSIFIER",
    "SUBJECT",
    "SUBSET",
    "SUBSETS",
    "SUBTYPE",
    "SUCCESSION",
    "TERMINATE",
    "THEN",
    "TIMESLICE",
    "TO",
    "TRANSITION",
    "TRUE",
    "TYPE",
    "TYPED",
    "TYPING",
    "UNIONS",
    "UNTIL",
    "USE",
    "VAR",
    "VARIANT",
    "VARIATION",
    "VERIFICATION",
    "VERIFY",
    "VIA",
    "VIEW",
    "VIEWPOINT",
    "WHEN",
    "WHILE",
    "XOR",
    "BANG_EQ_EQ",
    "COLON_COLON_GT",
    "COLON_GT_GT",
    "EQ_EQ_EQ",
    "BANG_EQ",
    "STAR_STAR",
    "ARROW",
    "DOT_DOT",
    "DOT_QUESTION",
    "COLON_COLON",
    "COLON_EQ",
    "COLON_GT",
    "LE",
    "EQ_EQ",
    "FAT_ARROW",
    "GE",
    "QUESTION_QUESTION",
    "AT_AT",
    "HASH",
    "DOLLAR",
    "PERCENT",
    "AMP",
    "LPAREN",
    "RPAREN",
    "STAR",
    "PLUS",
    "COMMA",
    "MINUS",
    "DOT",
    "SLASH",
    "COLON",
    "SEMI",
    "LT",
    "EQ",
    "GT",
    "QUESTION",
    "AT_SIGN",
    "LBRACK",
    "RBRACK",
    "CARET",
    "LBRACE",
    "PIPE",
    "RBRACE",
    "TILDE",
    "IDENTIFIER",
    "STRING",
    "DOUBLE_STRING",
    "INTEGER",
    "REAL",
    "REGULAR_COMMENT",
    "SINGLE_LINE_NOTE",
    "BARE_LINE_COMMENT",
    "WS"
  ];
  static ruleNames = [
    "ownedExpression",
    "typeReference",
    "sequenceExpressionList",
    "baseExpression",
    "nullExpression",
    "featureReferenceExpression",
    "constructorExpression",
    "bodyExpression",
    "argumentList",
    "positionalArgumentList",
    "namedArgumentList",
    "namedArgument",
    "literalExpression",
    "literalBoolean",
    "literalString",
    "literalInteger",
    "literalReal",
    "literalInfinity",
    "argumentMember",
    "argumentExpressionMember",
    "name",
    "unreservedKeyword",
    "identification",
    "relationshipBody",
    "relationshipOwnedElement",
    "ownedRelatedElement",
    "dependency",
    "annotation",
    "ownedAnnotation",
    "annotatingElement",
    "comment",
    "documentation",
    "textualRepresentation",
    "rootNamespace",
    "namespace",
    "namespaceDeclaration",
    "namespaceBody",
    "namespaceBodyElement",
    "memberPrefix",
    "visibilityIndicator",
    "namespaceMember",
    "nonFeatureMember",
    "namespaceFeatureMember",
    "aliasMember",
    "qualifiedName",
    "importRule",
    "importDeclaration",
    "membershipImport",
    "namespaceImport",
    "filterPackage",
    "filterPackageMember",
    "memberElement",
    "nonFeatureElement",
    "featureElement",
    "type",
    "typePrefix",
    "typeDeclaration",
    "specializationPart",
    "conjugationPart",
    "typeRelationshipPart",
    "disjoiningPart",
    "unioningPart",
    "intersectingPart",
    "differencingPart",
    "typeBody",
    "typeBodyElement",
    "specialization",
    "ownedSpecialization",
    "specificType",
    "generalType",
    "conjugation",
    "ownedConjugation",
    "disjoining",
    "ownedDisjoining",
    "unioning",
    "intersecting",
    "differencing",
    "featureMember",
    "typeFeatureMember",
    "ownedFeatureMember",
    "classifier",
    "classifierDeclaration",
    "superclassingPart",
    "subclassification",
    "ownedSubclassification",
    "feature",
    "endFeaturePrefix",
    "basicFeaturePrefix",
    "featurePrefix",
    "ownedCrossFeatureMember",
    "ownedCrossFeature",
    "featureDirection",
    "featureDeclaration",
    "featureIdentification",
    "featureRelationshipPart",
    "chainingPart",
    "invertingPart",
    "typeFeaturingPart",
    "featureSpecializationPart",
    "multiplicityPart",
    "featureSpecialization",
    "typings",
    "typedBy",
    "subsettings",
    "subsets",
    "references",
    "crosses",
    "redefinitions",
    "redefines",
    "featureTyping",
    "ownedFeatureTyping",
    "subsetting",
    "ownedSubsetting",
    "ownedReferenceSubsetting",
    "ownedCrossSubsetting",
    "redefinition",
    "ownedRedefinition",
    "featureInverting",
    "ownedFeatureInverting",
    "typeFeaturing",
    "ownedTypeFeaturing",
    "dataType",
    "class",
    "structure",
    "association",
    "associationStructure",
    "connector",
    "connectorDeclaration",
    "binaryConnectorDeclaration",
    "naryConnectorDeclaration",
    "connectorEndMember",
    "connectorEnd",
    "ownedCrossMultiplicityMember",
    "ownedCrossMultiplicity",
    "bindingConnector",
    "bindingConnectorDeclaration",
    "succession",
    "successionDeclaration",
    "behavior",
    "step",
    "function",
    "functionBody",
    "functionBodyPart",
    "returnFeatureMember",
    "resultExpressionMember",
    "expression",
    "predicate",
    "booleanExpression",
    "invariant",
    "featureChainMember",
    "interaction",
    "flow",
    "successionFlow",
    "flowDeclaration",
    "payloadFeatureMember",
    "payloadFeature",
    "payloadFeatureSpecializationPart",
    "flowEndMember",
    "flowEnd",
    "valuePart",
    "featureValue",
    "multiplicity",
    "multiplicitySubset",
    "multiplicityRange",
    "ownedMultiplicity",
    "ownedMultiplicityRange",
    "multiplicityBounds",
    "multiplicityExpressionMember",
    "metaclass",
    "prefixMetadataAnnotation",
    "prefixMetadataMember",
    "prefixMetadataFeature",
    "metadataFeature",
    "metadataFeatureDeclaration",
    "metadataBody",
    "metadataBodyElement",
    "metadataBodyFeatureMember",
    "metadataBodyFeature",
    "package",
    "libraryPackage",
    "packageDeclaration",
    "packageBody",
    "elementFilterMember",
    "dependencyDeclaration",
    "annotatingMember",
    "packageBodyElement",
    "packageMember",
    "definitionElement",
    "usageElement",
    "basicDefinitionPrefix",
    "definitionExtensionKeyword",
    "definitionPrefix",
    "definition",
    "definitionDeclaration",
    "definitionBody",
    "definitionBodyItem",
    "definitionBodyItemContent",
    "definitionMember",
    "variantUsageMember",
    "nonOccurrenceUsageMember",
    "structureUsageMember",
    "behaviorUsageMember",
    "refPrefix",
    "basicUsagePrefix",
    "endUsagePrefix",
    "usageExtensionKeyword",
    "unextendedUsagePrefix",
    "usagePrefix",
    "usage",
    "usageDeclaration",
    "usageCompletion",
    "usageBody",
    "defaultReferenceUsage",
    "referenceUsage",
    "endFeatureUsage",
    "variantReference",
    "nonOccurrenceUsageElement",
    "endOccurrenceUsageElement",
    "occurrenceUsageElement",
    "structureUsageElement",
    "behaviorUsageElement",
    "variantUsageElement",
    "subclassificationPart",
    "attributeDefinition",
    "attributeUsage",
    "enumerationDefinition",
    "enumerationBody",
    "enumerationUsageMember",
    "enumeratedValue",
    "enumerationUsage",
    "occurrenceDefinitionPrefix",
    "occurrenceDefinition",
    "individualDefinition",
    "emptyMultiplicityMember",
    "occurrenceUsagePrefix",
    "occurrenceUsage",
    "individualUsage",
    "portionUsage",
    "portionKind",
    "eventOccurrenceUsage",
    "sourceSuccessionMember",
    "sourceSuccession",
    "sourceEndMember",
    "sourceEnd",
    "itemDefinition",
    "itemUsage",
    "partDefinition",
    "partUsage",
    "portDefinition",
    "conjugatedPortDefinitionMember",
    "conjugatedPortDefinition",
    "portUsage",
    "conjugatedPortTyping",
    "connectionDefinition",
    "connectionUsage",
    "connectorPart",
    "binaryConnectorPart",
    "naryConnectorPart",
    "bindingConnectorAsUsage",
    "successionAsUsage",
    "interfaceDefinition",
    "interfaceBody",
    "interfaceBodyItem",
    "interfaceNonOccurrenceUsageMember",
    "interfaceNonOccurrenceUsageElement",
    "interfaceOccurrenceUsageMember",
    "interfaceOccurrenceUsageElement",
    "defaultInterfaceEnd",
    "interfaceUsage",
    "interfaceUsageDeclaration",
    "interfacePart",
    "binaryInterfacePart",
    "naryInterfacePart",
    "interfaceEndMember",
    "interfaceEnd",
    "allocationDefinition",
    "allocationUsage",
    "allocationUsageDeclaration",
    "flowDefinition",
    "message",
    "messageDeclaration",
    "messageEventMember",
    "messageEvent",
    "flowUsage",
    "successionFlowUsage",
    "flowPayloadFeatureMember",
    "flowPayloadFeature",
    "actionDefinition",
    "actionBody",
    "actionBodyItem",
    "nonBehaviorBodyItem",
    "actionBehaviorMember",
    "initialNodeMember",
    "actionNodeMember",
    "actionTargetSuccessionMember",
    "guardedSuccessionMember",
    "actionUsage",
    "actionUsageDeclaration",
    "performActionUsage",
    "performActionUsageDeclaration",
    "actionNode",
    "actionNodeUsageDeclaration",
    "actionNodePrefix",
    "controlNode",
    "controlNodePrefix",
    "mergeNode",
    "decisionNode",
    "joinNode",
    "forkNode",
    "acceptNode",
    "acceptNodeDeclaration",
    "acceptParameterPart",
    "payloadParameterMember",
    "payloadParameter",
    "triggerValuePart",
    "triggerFeatureValue",
    "triggerExpression",
    "sendNode",
    "sendNodeDeclaration",
    "senderReceiverPart",
    "nodeParameterMember",
    "nodeParameter",
    "featureBinding",
    "emptyParameterMember",
    "assignmentNode",
    "assignmentNodeDeclaration",
    "assignmentTargetMember",
    "assignmentTargetParameter",
    "assignmentTargetBinding",
    "terminateNode",
    "ifNode",
    "expressionParameterMember",
    "actionBodyParameterMember",
    "actionBodyParameter",
    "ifNodeParameterMember",
    "whileLoopNode",
    "forLoopNode",
    "forVariableDeclarationMember",
    "actionTargetSuccession",
    "targetSuccession",
    "guardedTargetSuccession",
    "defaultTargetSuccession",
    "guardedSuccession",
    "stateDefinition",
    "stateDefBody",
    "stateBodyItem",
    "entryActionMember",
    "doActionMember",
    "exitActionMember",
    "entryTransitionMember",
    "stateActionUsage",
    "statePerformActionUsage",
    "stateAcceptActionUsage",
    "stateSendActionUsage",
    "stateAssignmentActionUsage",
    "transitionUsageMember",
    "targetTransitionUsageMember",
    "stateUsage",
    "stateUsageBody",
    "exhibitStateUsage",
    "transitionUsage",
    "targetTransitionUsage",
    "triggerActionMember",
    "triggerAction",
    "guardExpressionMember",
    "effectBehaviorMember",
    "effectBehaviorUsage",
    "transitionPerformActionUsage",
    "transitionAcceptActionUsage",
    "transitionSendActionUsage",
    "transitionAssignmentActionUsage",
    "transitionSuccessionMember",
    "transitionSuccession",
    "emptyEndMember",
    "calculationDefinition",
    "calculationUsage",
    "calculationBody",
    "calculationBodyPart",
    "calculationBodyItem",
    "returnParameterMember",
    "constraintDefinition",
    "constraintUsage",
    "assertConstraintUsage",
    "constraintUsageDeclaration",
    "requirementDefinition",
    "requirementBody",
    "requirementBodyItem",
    "subjectMember",
    "subjectUsage",
    "requirementConstraintMember",
    "requirementKind",
    "requirementConstraintUsage",
    "framedConcernMember",
    "framedConcernUsage",
    "actorMember",
    "actorUsage",
    "stakeholderMember",
    "stakeholderUsage",
    "requirementUsage",
    "satisfyRequirementUsage",
    "satisfactionSubjectMember",
    "satisfactionParameter",
    "satisfactionFeatureValue",
    "satisfactionReferenceExpression",
    "concernDefinition",
    "concernUsage",
    "caseDefinition",
    "caseUsage",
    "caseBody",
    "caseBodyItem",
    "objectiveMember",
    "objectiveRequirementUsage",
    "analysisCaseDefinition",
    "analysisCaseUsage",
    "verificationCaseDefinition",
    "verificationCaseUsage",
    "requirementVerificationMember",
    "requirementVerificationUsage",
    "useCaseDefinition",
    "useCaseUsage",
    "includeUseCaseUsage",
    "viewDefinition",
    "viewDefinitionBody",
    "viewDefinitionBodyItem",
    "viewRenderingMember",
    "viewRenderingUsage",
    "viewUsage",
    "viewBody",
    "viewBodyItem",
    "expose",
    "membershipExpose",
    "namespaceExpose",
    "viewpointDefinition",
    "viewpointUsage",
    "renderingDefinition",
    "renderingUsage",
    "metadataDefinition",
    "prefixMetadataUsage",
    "metadataBodyUsageMember",
    "metadataBodyUsage",
    "extendedDefinition",
    "extendedUsage",
    "filterPackageImportDeclaration",
    "namespaceImportDirect",
    "calculationUsageDeclaration",
    "emptyActionUsage_",
    "emptyFeature_",
    "emptyMultiplicity_",
    "emptyUsage_",
    "filterPackageImport",
    "nonFeatureChainPrimaryExpression",
    "portConjugation"
  ];
  get grammarFileName() {
    return "SysMLv2Parser.g4";
  }
  get literalNames() {
    return _SysMLv2Parser.literalNames;
  }
  get symbolicNames() {
    return _SysMLv2Parser.symbolicNames;
  }
  get ruleNames() {
    return _SysMLv2Parser.ruleNames;
  }
  get serializedATN() {
    return _SysMLv2Parser._serializedATN;
  }
  createFailedPredicateException(predicate, message) {
    return new FailedPredicateException(this, predicate, message);
  }
  constructor(input) {
    super(input);
    this.interpreter = new ParserATNSimulator(this, _SysMLv2Parser._ATN, _SysMLv2Parser.decisionsToDFA, new PredictionContextCache());
  }
  ownedExpression(_p) {
    if (_p === void 0) {
      _p = 0;
    }
    let parentContext = this.context;
    let parentState = this.state;
    let localContext = new OwnedExpressionContext(this.context, parentState);
    let previousContext = localContext;
    let _startState = 0;
    this.enterRecursionRule(localContext, 0, _SysMLv2Parser.RULE_ownedExpression, _p);
    let _la;
    try {
      let alternative;
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 919;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.IF:
            {
              this.state = 905;
              this.match(_SysMLv2Parser.IF);
              this.state = 906;
              this.ownedExpression(0);
              this.state = 907;
              this.match(_SysMLv2Parser.QUESTION);
              this.state = 908;
              this.ownedExpression(0);
              this.state = 909;
              this.match(_SysMLv2Parser.ELSE);
              this.state = 910;
              this.ownedExpression(28);
            }
            break;
          case _SysMLv2Parser.NOT:
          case _SysMLv2Parser.PLUS:
          case _SysMLv2Parser.MINUS:
          case _SysMLv2Parser.TILDE:
            {
              this.state = 912;
              _la = this.tokenStream.LA(1);
              if (!(_la === 107 || (_la - 199 & ~31) === 0 && (1 << _la - 199 & 262149) !== 0)) {
                this.errorHandler.recoverInline(this);
              } else {
                this.errorHandler.reportMatch(this);
                this.consume();
              }
              this.state = 913;
              this.ownedExpression(14);
            }
            break;
          case _SysMLv2Parser.AT_AT:
          case _SysMLv2Parser.AT_SIGN:
            {
              this.state = 914;
              _la = this.tokenStream.LA(1);
              if (!(_la === 191 || _la === 210)) {
                this.errorHandler.recoverInline(this);
              } else {
                this.errorHandler.reportMatch(this);
                this.consume();
              }
              this.state = 915;
              this.typeReference();
            }
            break;
          case _SysMLv2Parser.ALL:
            {
              this.state = 916;
              this.match(_SysMLv2Parser.ALL);
              this.state = 917;
              this.typeReference();
            }
            break;
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FALSE:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.NEW:
          case _SysMLv2Parser.NULL:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TRUE:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.LPAREN:
          case _SysMLv2Parser.STAR:
          case _SysMLv2Parser.LBRACE:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
          case _SysMLv2Parser.DOUBLE_STRING:
          case _SysMLv2Parser.INTEGER:
          case _SysMLv2Parser.REAL:
          case _SysMLv2Parser.REGULAR_COMMENT:
            {
              this.state = 918;
              this.baseExpression();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.context.stop = this.tokenStream.LT(-1);
        this.state = 1002;
        this.errorHandler.sync(this);
        alternative = this.interpreter.adaptivePredict(this.tokenStream, 5, this.context);
        while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
          if (alternative === 1) {
            if (this.parseListeners != null) {
              this.triggerExitRuleEvent();
            }
            previousContext = localContext;
            {
              this.state = 1e3;
              this.errorHandler.sync(this);
              switch (this.interpreter.adaptivePredict(this.tokenStream, 4, this.context)) {
                case 1:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 921;
                    if (!this.precpred(this.context, 27)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 27)");
                    }
                    this.state = 922;
                    this.match(_SysMLv2Parser.QUESTION_QUESTION);
                    this.state = 923;
                    this.ownedExpression(28);
                  }
                  break;
                case 2:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 924;
                    if (!this.precpred(this.context, 26)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 26)");
                    }
                    this.state = 925;
                    this.match(_SysMLv2Parser.IMPLIES);
                    this.state = 926;
                    this.ownedExpression(27);
                  }
                  break;
                case 3:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 927;
                    if (!this.precpred(this.context, 25)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 25)");
                    }
                    this.state = 928;
                    this.match(_SysMLv2Parser.OR);
                    this.state = 929;
                    this.ownedExpression(26);
                  }
                  break;
                case 4:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 930;
                    if (!this.precpred(this.context, 24)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 24)");
                    }
                    this.state = 931;
                    this.match(_SysMLv2Parser.AND);
                    this.state = 932;
                    this.ownedExpression(25);
                  }
                  break;
                case 5:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 933;
                    if (!this.precpred(this.context, 23)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 23)");
                    }
                    this.state = 934;
                    this.match(_SysMLv2Parser.XOR);
                    this.state = 935;
                    this.ownedExpression(24);
                  }
                  break;
                case 6:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 936;
                    if (!this.precpred(this.context, 22)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 22)");
                    }
                    this.state = 937;
                    this.match(_SysMLv2Parser.PIPE);
                    this.state = 938;
                    this.ownedExpression(23);
                  }
                  break;
                case 7:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 939;
                    if (!this.precpred(this.context, 21)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 21)");
                    }
                    this.state = 940;
                    this.match(_SysMLv2Parser.AMP);
                    this.state = 941;
                    this.ownedExpression(22);
                  }
                  break;
                case 8:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 942;
                    if (!this.precpred(this.context, 20)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 20)");
                    }
                    this.state = 943;
                    _la = this.tokenStream.LA(1);
                    if (!((_la - 174 & ~31) === 0 && (1 << _la - 174 & 8217) !== 0)) {
                      this.errorHandler.recoverInline(this);
                    } else {
                      this.errorHandler.reportMatch(this);
                      this.consume();
                    }
                    this.state = 944;
                    this.ownedExpression(21);
                  }
                  break;
                case 9:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 945;
                    if (!this.precpred(this.context, 19)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 19)");
                    }
                    this.state = 946;
                    _la = this.tokenStream.LA(1);
                    if (!((_la - 186 & ~31) === 0 && (1 << _la - 186 & 5242889) !== 0)) {
                      this.errorHandler.recoverInline(this);
                    } else {
                      this.errorHandler.reportMatch(this);
                      this.consume();
                    }
                    this.state = 947;
                    this.ownedExpression(20);
                  }
                  break;
                case 10:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 948;
                    if (!this.precpred(this.context, 18)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 18)");
                    }
                    this.state = 949;
                    this.match(_SysMLv2Parser.DOT_DOT);
                    this.state = 950;
                    this.ownedExpression(19);
                  }
                  break;
                case 11:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 951;
                    if (!this.precpred(this.context, 17)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 17)");
                    }
                    this.state = 952;
                    _la = this.tokenStream.LA(1);
                    if (!(_la === 199 || _la === 201)) {
                      this.errorHandler.recoverInline(this);
                    } else {
                      this.errorHandler.reportMatch(this);
                      this.consume();
                    }
                    this.state = 953;
                    this.ownedExpression(18);
                  }
                  break;
                case 12:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 954;
                    if (!this.precpred(this.context, 16)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 16)");
                    }
                    this.state = 955;
                    _la = this.tokenStream.LA(1);
                    if (!((_la - 194 & ~31) === 0 && (1 << _la - 194 & 529) !== 0)) {
                      this.errorHandler.recoverInline(this);
                    } else {
                      this.errorHandler.reportMatch(this);
                      this.consume();
                    }
                    this.state = 956;
                    this.ownedExpression(17);
                  }
                  break;
                case 13:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 957;
                    if (!this.precpred(this.context, 15)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 15)");
                    }
                    this.state = 958;
                    _la = this.tokenStream.LA(1);
                    if (!(_la === 179 || _la === 213)) {
                      this.errorHandler.recoverInline(this);
                    } else {
                      this.errorHandler.reportMatch(this);
                      this.consume();
                    }
                    this.state = 959;
                    this.ownedExpression(15);
                  }
                  break;
                case 14:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 960;
                    if (!this.precpred(this.context, 12)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 12)");
                    }
                    this.state = 961;
                    _la = this.tokenStream.LA(1);
                    if (!(_la === 76 || _la === 90 || _la === 210)) {
                      this.errorHandler.recoverInline(this);
                    } else {
                      this.errorHandler.reportMatch(this);
                      this.consume();
                    }
                    this.state = 962;
                    this.typeReference();
                  }
                  break;
                case 15:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 963;
                    if (!this.precpred(this.context, 11)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 11)");
                    }
                    this.state = 964;
                    this.match(_SysMLv2Parser.AS);
                    this.state = 965;
                    this.typeReference();
                  }
                  break;
                case 16:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 966;
                    if (!this.precpred(this.context, 10)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 10)");
                    }
                    this.state = 967;
                    this.match(_SysMLv2Parser.AT_AT);
                    this.state = 968;
                    this.typeReference();
                  }
                  break;
                case 17:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 969;
                    if (!this.precpred(this.context, 9)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 9)");
                    }
                    this.state = 970;
                    this.match(_SysMLv2Parser.META);
                    this.state = 971;
                    this.typeReference();
                  }
                  break;
                case 18:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 972;
                    if (!this.precpred(this.context, 8)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 8)");
                    }
                    this.state = 973;
                    this.match(_SysMLv2Parser.LBRACK);
                    this.state = 975;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                    if (_la === 8 || _la === 20 || (_la - 42 & ~31) === 0 && (1 << _la - 42 & 12582913) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 1414791685) !== 0 || (_la - 107 & ~31) === 0 && (1 << _la - 107 & 16387) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1073153) !== 0 || (_la - 191 & ~31) === 0 && (1 << _la - 191 & 4236772773) !== 0 || _la === 223) {
                      {
                        this.state = 974;
                        this.sequenceExpressionList();
                      }
                    }
                    this.state = 977;
                    this.match(_SysMLv2Parser.RBRACK);
                  }
                  break;
                case 19:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 978;
                    if (!this.precpred(this.context, 7)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 7)");
                    }
                    this.state = 979;
                    this.match(_SysMLv2Parser.HASH);
                    this.state = 980;
                    this.match(_SysMLv2Parser.LPAREN);
                    this.state = 982;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                    if (_la === 8 || _la === 20 || (_la - 42 & ~31) === 0 && (1 << _la - 42 & 12582913) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 1414791685) !== 0 || (_la - 107 & ~31) === 0 && (1 << _la - 107 & 16387) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1073153) !== 0 || (_la - 191 & ~31) === 0 && (1 << _la - 191 & 4236772773) !== 0 || _la === 223) {
                      {
                        this.state = 981;
                        this.sequenceExpressionList();
                      }
                    }
                    this.state = 984;
                    this.match(_SysMLv2Parser.RPAREN);
                  }
                  break;
                case 20:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 985;
                    if (!this.precpred(this.context, 6)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 6)");
                    }
                    this.state = 986;
                    this.argumentList();
                  }
                  break;
                case 21:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 987;
                    if (!this.precpred(this.context, 5)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 5)");
                    }
                    this.state = 988;
                    this.match(_SysMLv2Parser.DOT);
                    this.state = 989;
                    this.qualifiedName();
                  }
                  break;
                case 22:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 990;
                    if (!this.precpred(this.context, 4)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 4)");
                    }
                    this.state = 991;
                    this.match(_SysMLv2Parser.DOT_QUESTION);
                    this.state = 992;
                    this.bodyExpression();
                  }
                  break;
                case 23:
                  {
                    localContext = new OwnedExpressionContext(parentContext, parentState);
                    this.pushNewRecursionContext(localContext, _startState, _SysMLv2Parser.RULE_ownedExpression);
                    this.state = 993;
                    if (!this.precpred(this.context, 3)) {
                      throw this.createFailedPredicateException("this.precpred(this.context, 3)");
                    }
                    this.state = 994;
                    this.match(_SysMLv2Parser.ARROW);
                    this.state = 995;
                    this.qualifiedName();
                    this.state = 998;
                    this.errorHandler.sync(this);
                    switch (this.tokenStream.LA(1)) {
                      case _SysMLv2Parser.LBRACE:
                        {
                          this.state = 996;
                          this.bodyExpression();
                        }
                        break;
                      case _SysMLv2Parser.LPAREN:
                        {
                          this.state = 997;
                          this.argumentList();
                        }
                        break;
                      default:
                        throw new NoViableAltException(this);
                    }
                  }
                  break;
              }
            }
          }
          this.state = 1004;
          this.errorHandler.sync(this);
          alternative = this.interpreter.adaptivePredict(this.tokenStream, 5, this.context);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.unrollRecursionContexts(parentContext);
    }
    return localContext;
  }
  typeReference() {
    let localContext = new TypeReferenceContext(this.context, this.state);
    this.enterRule(localContext, 2, _SysMLv2Parser.RULE_typeReference);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1005;
        this.qualifiedName();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sequenceExpressionList() {
    let localContext = new SequenceExpressionListContext(this.context, this.state);
    this.enterRule(localContext, 4, _SysMLv2Parser.RULE_sequenceExpressionList);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1007;
        this.ownedExpression(0);
        this.state = 1012;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1008;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1009;
              this.ownedExpression(0);
            }
          }
          this.state = 1014;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  baseExpression() {
    let localContext = new BaseExpressionContext(this.context, this.state);
    this.enterRule(localContext, 6, _SysMLv2Parser.RULE_baseExpression);
    let _la;
    try {
      this.state = 1036;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 9, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1015;
            this.nullExpression();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1016;
            this.match(_SysMLv2Parser.REGULAR_COMMENT);
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1017;
            this.literalExpression();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1018;
            this.qualifiedName();
            this.state = 1022;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 7, this.context)) {
              case 1:
                {
                  this.state = 1019;
                  this.argumentList();
                }
                break;
              case 2:
                {
                  this.state = 1020;
                  this.match(_SysMLv2Parser.DOT);
                  this.state = 1021;
                  this.match(_SysMLv2Parser.METADATA);
                }
                break;
            }
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 1024;
            this.constructorExpression();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 1025;
            this.bodyExpression();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 1026;
            this.match(_SysMLv2Parser.LPAREN);
            this.state = 1027;
            this.match(_SysMLv2Parser.AS);
            this.state = 1028;
            this.typeReference();
            this.state = 1029;
            this.match(_SysMLv2Parser.RPAREN);
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 1031;
            this.match(_SysMLv2Parser.LPAREN);
            this.state = 1033;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 8 || _la === 20 || (_la - 42 & ~31) === 0 && (1 << _la - 42 & 12582913) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 1414791685) !== 0 || (_la - 107 & ~31) === 0 && (1 << _la - 107 & 16387) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1073153) !== 0 || (_la - 191 & ~31) === 0 && (1 << _la - 191 & 4236772773) !== 0 || _la === 223) {
              {
                this.state = 1032;
                this.sequenceExpressionList();
              }
            }
            this.state = 1035;
            this.match(_SysMLv2Parser.RPAREN);
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nullExpression() {
    let localContext = new NullExpressionContext(this.context, this.state);
    this.enterRule(localContext, 8, _SysMLv2Parser.RULE_nullExpression);
    try {
      this.state = 1041;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.NULL:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1038;
            this.match(_SysMLv2Parser.NULL);
          }
          break;
        case _SysMLv2Parser.LPAREN:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1039;
            this.match(_SysMLv2Parser.LPAREN);
            this.state = 1040;
            this.match(_SysMLv2Parser.RPAREN);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureReferenceExpression() {
    let localContext = new FeatureReferenceExpressionContext(this.context, this.state);
    this.enterRule(localContext, 10, _SysMLv2Parser.RULE_featureReferenceExpression);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1043;
        this.qualifiedName();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  constructorExpression() {
    let localContext = new ConstructorExpressionContext(this.context, this.state);
    this.enterRule(localContext, 12, _SysMLv2Parser.RULE_constructorExpression);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1045;
        this.match(_SysMLv2Parser.NEW);
        this.state = 1046;
        this.qualifiedName();
        this.state = 1047;
        this.argumentList();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  bodyExpression() {
    let localContext = new BodyExpressionContext(this.context, this.state);
    this.enterRule(localContext, 14, _SysMLv2Parser.RULE_bodyExpression);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1049;
        this.match(_SysMLv2Parser.LBRACE);
        this.state = 1050;
        this.functionBodyPart();
        this.state = 1051;
        this.match(_SysMLv2Parser.RBRACE);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  argumentList() {
    let localContext = new ArgumentListContext(this.context, this.state);
    this.enterRule(localContext, 16, _SysMLv2Parser.RULE_argumentList);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1053;
        this.match(_SysMLv2Parser.LPAREN);
        this.state = 1056;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 11, this.context)) {
          case 1:
            {
              this.state = 1054;
              this.positionalArgumentList();
            }
            break;
          case 2:
            {
              this.state = 1055;
              this.namedArgumentList();
            }
            break;
        }
        this.state = 1058;
        this.match(_SysMLv2Parser.RPAREN);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  positionalArgumentList() {
    let localContext = new PositionalArgumentListContext(this.context, this.state);
    this.enterRule(localContext, 18, _SysMLv2Parser.RULE_positionalArgumentList);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1060;
        this.ownedExpression(0);
        this.state = 1065;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1061;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1062;
              this.ownedExpression(0);
            }
          }
          this.state = 1067;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namedArgumentList() {
    let localContext = new NamedArgumentListContext(this.context, this.state);
    this.enterRule(localContext, 20, _SysMLv2Parser.RULE_namedArgumentList);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1068;
        this.namedArgument();
        this.state = 1073;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1069;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1070;
              this.namedArgument();
            }
          }
          this.state = 1075;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namedArgument() {
    let localContext = new NamedArgumentContext(this.context, this.state);
    this.enterRule(localContext, 22, _SysMLv2Parser.RULE_namedArgument);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1076;
        this.qualifiedName();
        this.state = 1077;
        this.match(_SysMLv2Parser.EQ);
        this.state = 1078;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  literalExpression() {
    let localContext = new LiteralExpressionContext(this.context, this.state);
    this.enterRule(localContext, 24, _SysMLv2Parser.RULE_literalExpression);
    try {
      this.state = 1085;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.FALSE:
        case _SysMLv2Parser.TRUE:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1080;
            this.literalBoolean();
          }
          break;
        case _SysMLv2Parser.DOUBLE_STRING:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1081;
            this.literalString();
          }
          break;
        case _SysMLv2Parser.INTEGER:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1082;
            this.literalInteger();
          }
          break;
        case _SysMLv2Parser.REAL:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1083;
            this.literalReal();
          }
          break;
        case _SysMLv2Parser.STAR:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 1084;
            this.literalInfinity();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  literalBoolean() {
    let localContext = new LiteralBooleanContext(this.context, this.state);
    this.enterRule(localContext, 26, _SysMLv2Parser.RULE_literalBoolean);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1087;
        _la = this.tokenStream.LA(1);
        if (!(_la === 64 || _la === 156)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  literalString() {
    let localContext = new LiteralStringContext(this.context, this.state);
    this.enterRule(localContext, 28, _SysMLv2Parser.RULE_literalString);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1089;
        this.match(_SysMLv2Parser.DOUBLE_STRING);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  literalInteger() {
    let localContext = new LiteralIntegerContext(this.context, this.state);
    this.enterRule(localContext, 30, _SysMLv2Parser.RULE_literalInteger);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1091;
        this.match(_SysMLv2Parser.INTEGER);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  literalReal() {
    let localContext = new LiteralRealContext(this.context, this.state);
    this.enterRule(localContext, 32, _SysMLv2Parser.RULE_literalReal);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1093;
        this.match(_SysMLv2Parser.REAL);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  literalInfinity() {
    let localContext = new LiteralInfinityContext(this.context, this.state);
    this.enterRule(localContext, 34, _SysMLv2Parser.RULE_literalInfinity);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1095;
        this.match(_SysMLv2Parser.STAR);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  argumentMember() {
    let localContext = new ArgumentMemberContext(this.context, this.state);
    this.enterRule(localContext, 36, _SysMLv2Parser.RULE_argumentMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1097;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  argumentExpressionMember() {
    let localContext = new ArgumentExpressionMemberContext(this.context, this.state);
    this.enterRule(localContext, 38, _SysMLv2Parser.RULE_argumentExpressionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1099;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  name() {
    let localContext = new NameContext(this.context, this.state);
    this.enterRule(localContext, 40, _SysMLv2Parser.RULE_name);
    try {
      this.state = 1104;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.IDENTIFIER:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1101;
            this.match(_SysMLv2Parser.IDENTIFIER);
          }
          break;
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1102;
            this.match(_SysMLv2Parser.STRING);
          }
          break;
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1103;
            this.unreservedKeyword();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  unreservedKeyword() {
    let localContext = new UnreservedKeywordContext(this.context, this.state);
    this.enterRule(localContext, 42, _SysMLv2Parser.RULE_unreservedKeyword);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1106;
        _la = this.tokenStream.LA(1);
        if (!(_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  identification() {
    let localContext = new IdentificationContext(this.context, this.state);
    this.enterRule(localContext, 44, _SysMLv2Parser.RULE_identification);
    try {
      this.state = 1118;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 16, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1108;
            this.match(_SysMLv2Parser.LT);
            this.state = 1109;
            this.name();
            this.state = 1110;
            this.match(_SysMLv2Parser.GT);
            this.state = 1111;
            this.name();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1113;
            this.match(_SysMLv2Parser.LT);
            this.state = 1114;
            this.name();
            this.state = 1115;
            this.match(_SysMLv2Parser.GT);
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1117;
            this.name();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  relationshipBody() {
    let localContext = new RelationshipBodyContext(this.context, this.state);
    this.enterRule(localContext, 46, _SysMLv2Parser.RULE_relationshipBody);
    let _la;
    try {
      this.state = 1137;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 19, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1120;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1121;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 1125;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 4040229124) !== 0 || (_la - 33 & ~31) === 0 && (1 << _la - 33 & 1085130343) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1909228581) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 4052157169) !== 0 || (_la - 131 & ~31) === 0 && (1 << _la - 131 & 470774913) !== 0 || (_la - 163 & ~31) === 0 && (1 << _la - 163 & 1648373761) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 581829) !== 0) {
              {
                {
                  this.state = 1122;
                  this.relationshipOwnedElement();
                }
              }
              this.state = 1127;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1128;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1129;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 1133;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 30 || _la === 54 || (_la - 93 & ~31) === 0 && (1 << _la - 93 & 517) !== 0 || _la === 131 || (_la - 192 & ~31) === 0 && (1 << _la - 192 & 2147745793) !== 0) {
              {
                {
                  this.state = 1130;
                  this.ownedAnnotation();
                }
              }
              this.state = 1135;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1136;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  relationshipOwnedElement() {
    let localContext = new RelationshipOwnedElementContext(this.context, this.state);
    this.enterRule(localContext, 48, _SysMLv2Parser.RULE_relationshipOwnedElement);
    try {
      this.state = 1141;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 20, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1139;
            this.ownedRelatedElement();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1140;
            this.ownedAnnotation();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedRelatedElement() {
    let localContext = new OwnedRelatedElementContext(this.context, this.state);
    this.enterRule(localContext, 50, _SysMLv2Parser.RULE_ownedRelatedElement);
    try {
      this.state = 1145;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 21, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1143;
            this.nonFeatureElement();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1144;
            this.featureElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  dependency() {
    let localContext = new DependencyContext(this.context, this.state);
    this.enterRule(localContext, 52, _SysMLv2Parser.RULE_dependency);
    let _la;
    try {
      this.state = 1189;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 28, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1150;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 192) {
              {
                {
                  this.state = 1147;
                  this.prefixMetadataAnnotation();
                }
              }
              this.state = 1152;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1153;
            this.match(_SysMLv2Parser.DEPENDENCY);
            this.state = 1158;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 24, this.context)) {
              case 1:
                {
                  this.state = 1155;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
                    {
                      this.state = 1154;
                      this.identification();
                    }
                  }
                  this.state = 1157;
                  this.match(_SysMLv2Parser.FROM);
                }
                break;
            }
            this.state = 1160;
            this.qualifiedName();
            this.state = 1165;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 200) {
              {
                {
                  this.state = 1161;
                  this.match(_SysMLv2Parser.COMMA);
                  this.state = 1162;
                  this.qualifiedName();
                }
              }
              this.state = 1167;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1168;
            this.match(_SysMLv2Parser.TO);
            this.state = 1169;
            this.qualifiedName();
            this.state = 1174;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 200) {
              {
                {
                  this.state = 1170;
                  this.match(_SysMLv2Parser.COMMA);
                  this.state = 1171;
                  this.qualifiedName();
                }
              }
              this.state = 1176;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1177;
            this.relationshipBody();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1182;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 192) {
              {
                {
                  this.state = 1179;
                  this.prefixMetadataAnnotation();
                }
              }
              this.state = 1184;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1185;
            this.match(_SysMLv2Parser.DEPENDENCY);
            this.state = 1186;
            this.dependencyDeclaration();
            this.state = 1187;
            this.relationshipBody();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  annotation() {
    let localContext = new AnnotationContext(this.context, this.state);
    this.enterRule(localContext, 54, _SysMLv2Parser.RULE_annotation);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1191;
        this.qualifiedName();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedAnnotation() {
    let localContext = new OwnedAnnotationContext(this.context, this.state);
    this.enterRule(localContext, 56, _SysMLv2Parser.RULE_ownedAnnotation);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1193;
        this.annotatingElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  annotatingElement() {
    let localContext = new AnnotatingElementContext(this.context, this.state);
    this.enterRule(localContext, 58, _SysMLv2Parser.RULE_annotatingElement);
    try {
      this.state = 1199;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.COMMENT:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.REGULAR_COMMENT:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1195;
            this.comment();
          }
          break;
        case _SysMLv2Parser.DOC:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1196;
            this.documentation();
          }
          break;
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.REP:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1197;
            this.textualRepresentation();
          }
          break;
        case _SysMLv2Parser.METADATA:
        case _SysMLv2Parser.HASH:
        case _SysMLv2Parser.AT_SIGN:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1198;
            this.metadataFeature();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  comment() {
    let localContext = new CommentContext(this.context, this.state);
    this.enterRule(localContext, 60, _SysMLv2Parser.RULE_comment);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1216;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 30) {
          {
            this.state = 1201;
            this.match(_SysMLv2Parser.COMMENT);
            this.state = 1203;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 30, this.context)) {
              case 1:
                {
                  this.state = 1202;
                  this.identification();
                }
                break;
            }
            this.state = 1214;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 1) {
              {
                this.state = 1205;
                this.match(_SysMLv2Parser.ABOUT);
                this.state = 1206;
                this.annotation();
                this.state = 1211;
                this.errorHandler.sync(this);
                _la = this.tokenStream.LA(1);
                while (_la === 200) {
                  {
                    {
                      this.state = 1207;
                      this.match(_SysMLv2Parser.COMMA);
                      this.state = 1208;
                      this.annotation();
                    }
                  }
                  this.state = 1213;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                }
              }
            }
          }
        }
        this.state = 1220;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 95) {
          {
            this.state = 1218;
            this.match(_SysMLv2Parser.LOCALE);
            this.state = 1219;
            this.match(_SysMLv2Parser.DOUBLE_STRING);
          }
        }
        this.state = 1222;
        this.match(_SysMLv2Parser.REGULAR_COMMENT);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  documentation() {
    let localContext = new DocumentationContext(this.context, this.state);
    this.enterRule(localContext, 62, _SysMLv2Parser.RULE_documentation);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1224;
        this.match(_SysMLv2Parser.DOC);
        this.state = 1226;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 35, this.context)) {
          case 1:
            {
              this.state = 1225;
              this.identification();
            }
            break;
        }
        this.state = 1230;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 95) {
          {
            this.state = 1228;
            this.match(_SysMLv2Parser.LOCALE);
            this.state = 1229;
            this.match(_SysMLv2Parser.DOUBLE_STRING);
          }
        }
        this.state = 1232;
        this.match(_SysMLv2Parser.REGULAR_COMMENT);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  textualRepresentation() {
    let localContext = new TextualRepresentationContext(this.context, this.state);
    this.enterRule(localContext, 64, _SysMLv2Parser.RULE_textualRepresentation);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1238;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 131) {
          {
            this.state = 1234;
            this.match(_SysMLv2Parser.REP);
            this.state = 1236;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 37, this.context)) {
              case 1:
                {
                  this.state = 1235;
                  this.identification();
                }
                break;
            }
          }
        }
        this.state = 1240;
        this.match(_SysMLv2Parser.LANGUAGE);
        this.state = 1241;
        this.match(_SysMLv2Parser.DOUBLE_STRING);
        this.state = 1242;
        this.match(_SysMLv2Parser.REGULAR_COMMENT);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  rootNamespace() {
    let localContext = new RootNamespaceContext(this.context, this.state);
    this.enterRule(localContext, 66, _SysMLv2Parser.RULE_rootNamespace);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1247;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while ((_la & ~31) === 0 && (1 << _la & 1182289556) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490981169) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948238905) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 412367019) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458587) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
          {
            {
              this.state = 1244;
              this.packageBodyElement();
            }
          }
          this.state = 1249;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 1250;
        this.match(_SysMLv2Parser.EOF);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespace() {
    let localContext = new NamespaceContext(this.context, this.state);
    this.enterRule(localContext, 68, _SysMLv2Parser.RULE_namespace);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1255;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 1252;
              this.prefixMetadataMember();
            }
          }
          this.state = 1257;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 1258;
        this.namespaceDeclaration();
        this.state = 1259;
        this.namespaceBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceDeclaration() {
    let localContext = new NamespaceDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 70, _SysMLv2Parser.RULE_namespaceDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1261;
        this.match(_SysMLv2Parser.NAMESPACE);
        this.state = 1263;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
          {
            this.state = 1262;
            this.identification();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceBody() {
    let localContext = new NamespaceBodyContext(this.context, this.state);
    this.enterRule(localContext, 72, _SysMLv2Parser.RULE_namespaceBody);
    let _la;
    try {
      this.state = 1274;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1265;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1266;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 1270;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 4040229252) !== 0 || (_la - 33 & ~31) === 0 && (1 << _la - 33 & 1085130343) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1909244965) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 4287038193) !== 0 || (_la - 131 & ~31) === 0 && (1 << _la - 131 & 470774913) !== 0 || (_la - 163 & ~31) === 0 && (1 << _la - 163 & 1648373761) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 581829) !== 0) {
              {
                {
                  this.state = 1267;
                  this.namespaceBodyElement();
                }
              }
              this.state = 1272;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1273;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceBodyElement() {
    let localContext = new NamespaceBodyElementContext(this.context, this.state);
    this.enterRule(localContext, 74, _SysMLv2Parser.RULE_namespaceBodyElement);
    try {
      this.state = 1279;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 44, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1276;
            this.namespaceMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1277;
            this.aliasMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1278;
            this.importRule();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  memberPrefix() {
    let localContext = new MemberPrefixContext(this.context, this.state);
    this.enterRule(localContext, 76, _SysMLv2Parser.RULE_memberPrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1282;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 122 & ~31) === 0 && (1 << _la - 122 & 7) !== 0) {
          {
            this.state = 1281;
            this.visibilityIndicator();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  visibilityIndicator() {
    let localContext = new VisibilityIndicatorContext(this.context, this.state);
    this.enterRule(localContext, 78, _SysMLv2Parser.RULE_visibilityIndicator);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1284;
        _la = this.tokenStream.LA(1);
        if (!((_la - 122 & ~31) === 0 && (1 << _la - 122 & 7) !== 0)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceMember() {
    let localContext = new NamespaceMemberContext(this.context, this.state);
    this.enterRule(localContext, 80, _SysMLv2Parser.RULE_namespaceMember);
    try {
      this.state = 1288;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 46, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1286;
            this.nonFeatureMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1287;
            this.namespaceFeatureMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nonFeatureMember() {
    let localContext = new NonFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 82, _SysMLv2Parser.RULE_nonFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1290;
        this.memberPrefix();
        this.state = 1291;
        this.memberElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceFeatureMember() {
    let localContext = new NamespaceFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 84, _SysMLv2Parser.RULE_namespaceFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1293;
        this.memberPrefix();
        this.state = 1294;
        this.featureElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  aliasMember() {
    let localContext = new AliasMemberContext(this.context, this.state);
    this.enterRule(localContext, 86, _SysMLv2Parser.RULE_aliasMember);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1296;
        this.memberPrefix();
        this.state = 1297;
        this.match(_SysMLv2Parser.ALIAS);
        this.state = 1302;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 206) {
          {
            this.state = 1298;
            this.match(_SysMLv2Parser.LT);
            this.state = 1299;
            this.name();
            this.state = 1300;
            this.match(_SysMLv2Parser.GT);
          }
        }
        this.state = 1305;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || _la === 218 || _la === 219) {
          {
            this.state = 1304;
            this.name();
          }
        }
        this.state = 1307;
        this.match(_SysMLv2Parser.FOR);
        this.state = 1308;
        this.qualifiedName();
        this.state = 1309;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  qualifiedName() {
    let localContext = new QualifiedNameContext(this.context, this.state);
    this.enterRule(localContext, 88, _SysMLv2Parser.RULE_qualifiedName);
    let _la;
    try {
      let alternative;
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1313;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 193) {
          {
            this.state = 1311;
            this.match(_SysMLv2Parser.DOLLAR);
            this.state = 1312;
            this.match(_SysMLv2Parser.COLON_COLON);
          }
        }
        this.state = 1320;
        this.errorHandler.sync(this);
        alternative = this.interpreter.adaptivePredict(this.tokenStream, 50, this.context);
        while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
          if (alternative === 1) {
            {
              {
                this.state = 1315;
                this.name();
                this.state = 1316;
                this.match(_SysMLv2Parser.COLON_COLON);
              }
            }
          }
          this.state = 1322;
          this.errorHandler.sync(this);
          alternative = this.interpreter.adaptivePredict(this.tokenStream, 50, this.context);
        }
        this.state = 1323;
        this.name();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  importRule() {
    let localContext = new ImportRuleContext(this.context, this.state);
    this.enterRule(localContext, 90, _SysMLv2Parser.RULE_importRule);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1326;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 122 & ~31) === 0 && (1 << _la - 122 & 7) !== 0) {
          {
            this.state = 1325;
            this.visibilityIndicator();
          }
        }
        this.state = 1328;
        this.match(_SysMLv2Parser.IMPORT);
        this.state = 1330;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 8) {
          {
            this.state = 1329;
            this.match(_SysMLv2Parser.ALL);
          }
        }
        this.state = 1332;
        this.importDeclaration();
        this.state = 1333;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  importDeclaration() {
    let localContext = new ImportDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 92, _SysMLv2Parser.RULE_importDeclaration);
    try {
      this.state = 1337;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 53, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1335;
            this.membershipImport();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1336;
            this.namespaceImport();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  membershipImport() {
    let localContext = new MembershipImportContext(this.context, this.state);
    this.enterRule(localContext, 94, _SysMLv2Parser.RULE_membershipImport);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1339;
        this.qualifiedName();
        this.state = 1342;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 183) {
          {
            this.state = 1340;
            this.match(_SysMLv2Parser.COLON_COLON);
            this.state = 1341;
            this.match(_SysMLv2Parser.STAR_STAR);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceImport() {
    let localContext = new NamespaceImportContext(this.context, this.state);
    this.enterRule(localContext, 96, _SysMLv2Parser.RULE_namespaceImport);
    let _la;
    try {
      this.state = 1352;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 56, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1344;
            this.qualifiedName();
            this.state = 1345;
            this.match(_SysMLv2Parser.COLON_COLON);
            this.state = 1346;
            this.match(_SysMLv2Parser.STAR);
            this.state = 1349;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 183) {
              {
                this.state = 1347;
                this.match(_SysMLv2Parser.COLON_COLON);
                this.state = 1348;
                this.match(_SysMLv2Parser.STAR_STAR);
              }
            }
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1351;
            this.filterPackage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  filterPackage() {
    let localContext = new FilterPackageContext(this.context, this.state);
    this.enterRule(localContext, 98, _SysMLv2Parser.RULE_filterPackage);
    let _la;
    try {
      this.state = 1366;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 59, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1354;
            this.filterPackageImportDeclaration();
            this.state = 1356;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            do {
              {
                {
                  this.state = 1355;
                  this.filterPackageMember();
                }
              }
              this.state = 1358;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            } while (_la === 211);
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1360;
            this.filterPackageImport();
            this.state = 1362;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            do {
              {
                {
                  this.state = 1361;
                  this.filterPackageMember();
                }
              }
              this.state = 1364;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            } while (_la === 211);
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  filterPackageMember() {
    let localContext = new FilterPackageMemberContext(this.context, this.state);
    this.enterRule(localContext, 100, _SysMLv2Parser.RULE_filterPackageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1368;
        this.match(_SysMLv2Parser.LBRACK);
        this.state = 1369;
        this.ownedExpression(0);
        this.state = 1370;
        this.match(_SysMLv2Parser.RBRACK);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  memberElement() {
    let localContext = new MemberElementContext(this.context, this.state);
    this.enterRule(localContext, 102, _SysMLv2Parser.RULE_memberElement);
    try {
      this.state = 1374;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 60, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1372;
            this.annotatingElement();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1373;
            this.nonFeatureElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nonFeatureElement() {
    let localContext = new NonFeatureElementContext(this.context, this.state);
    this.enterRule(localContext, 104, _SysMLv2Parser.RULE_nonFeatureElement);
    try {
      this.state = 1402;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 61, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1376;
            this.dependency();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1377;
            this.namespace();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1378;
            this.type_();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1379;
            this.classifier();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 1380;
            this.dataType();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 1381;
            this.class_();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 1382;
            this.structure();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 1383;
            this.metaclass();
          }
          break;
        case 9:
          this.enterOuterAlt(localContext, 9);
          {
            this.state = 1384;
            this.association();
          }
          break;
        case 10:
          this.enterOuterAlt(localContext, 10);
          {
            this.state = 1385;
            this.associationStructure();
          }
          break;
        case 11:
          this.enterOuterAlt(localContext, 11);
          {
            this.state = 1386;
            this.interaction();
          }
          break;
        case 12:
          this.enterOuterAlt(localContext, 12);
          {
            this.state = 1387;
            this.behavior();
          }
          break;
        case 13:
          this.enterOuterAlt(localContext, 13);
          {
            this.state = 1388;
            this.function_();
          }
          break;
        case 14:
          this.enterOuterAlt(localContext, 14);
          {
            this.state = 1389;
            this.predicate();
          }
          break;
        case 15:
          this.enterOuterAlt(localContext, 15);
          {
            this.state = 1390;
            this.multiplicity();
          }
          break;
        case 16:
          this.enterOuterAlt(localContext, 16);
          {
            this.state = 1391;
            this.package_();
          }
          break;
        case 17:
          this.enterOuterAlt(localContext, 17);
          {
            this.state = 1392;
            this.libraryPackage();
          }
          break;
        case 18:
          this.enterOuterAlt(localContext, 18);
          {
            this.state = 1393;
            this.specialization();
          }
          break;
        case 19:
          this.enterOuterAlt(localContext, 19);
          {
            this.state = 1394;
            this.conjugation();
          }
          break;
        case 20:
          this.enterOuterAlt(localContext, 20);
          {
            this.state = 1395;
            this.subclassification();
          }
          break;
        case 21:
          this.enterOuterAlt(localContext, 21);
          {
            this.state = 1396;
            this.disjoining();
          }
          break;
        case 22:
          this.enterOuterAlt(localContext, 22);
          {
            this.state = 1397;
            this.featureInverting();
          }
          break;
        case 23:
          this.enterOuterAlt(localContext, 23);
          {
            this.state = 1398;
            this.featureTyping();
          }
          break;
        case 24:
          this.enterOuterAlt(localContext, 24);
          {
            this.state = 1399;
            this.subsetting();
          }
          break;
        case 25:
          this.enterOuterAlt(localContext, 25);
          {
            this.state = 1400;
            this.redefinition();
          }
          break;
        case 26:
          this.enterOuterAlt(localContext, 26);
          {
            this.state = 1401;
            this.typeFeaturing();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureElement() {
    let localContext = new FeatureElementContext(this.context, this.state);
    this.enterRule(localContext, 106, _SysMLv2Parser.RULE_featureElement);
    try {
      this.state = 1414;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 62, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1404;
            this.feature();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1405;
            this.step();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1406;
            this.expression();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1407;
            this.booleanExpression();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 1408;
            this.invariant();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 1409;
            this.connector();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 1410;
            this.bindingConnector();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 1411;
            this.succession();
          }
          break;
        case 9:
          this.enterOuterAlt(localContext, 9);
          {
            this.state = 1412;
            this.flow();
          }
          break;
        case 10:
          this.enterOuterAlt(localContext, 10);
          {
            this.state = 1413;
            this.successionFlow();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  type_() {
    let localContext = new TypeContext(this.context, this.state);
    this.enterRule(localContext, 108, _SysMLv2Parser.RULE_type);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1416;
        this.typePrefix();
        this.state = 1417;
        this.match(_SysMLv2Parser.TYPE);
        this.state = 1418;
        this.typeDeclaration();
        this.state = 1419;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typePrefix() {
    let localContext = new TypePrefixContext(this.context, this.state);
    this.enterRule(localContext, 110, _SysMLv2Parser.RULE_typePrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1422;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2) {
          {
            this.state = 1421;
            this.match(_SysMLv2Parser.ABSTRACT);
          }
        }
        this.state = 1427;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 1424;
              this.prefixMetadataMember();
            }
          }
          this.state = 1429;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typeDeclaration() {
    let localContext = new TypeDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 112, _SysMLv2Parser.RULE_typeDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1431;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 8) {
          {
            this.state = 1430;
            this.match(_SysMLv2Parser.ALL);
          }
        }
        this.state = 1434;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
          {
            this.state = 1433;
            this.identification();
          }
        }
        this.state = 1437;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 211) {
          {
            this.state = 1436;
            this.ownedMultiplicity();
          }
        }
        this.state = 1441;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        do {
          {
            this.state = 1441;
            this.errorHandler.sync(this);
            switch (this.tokenStream.LA(1)) {
              case _SysMLv2Parser.SPECIALIZES:
              case _SysMLv2Parser.COLON_GT:
                {
                  this.state = 1439;
                  this.specializationPart();
                }
                break;
              case _SysMLv2Parser.CONJUGATES:
              case _SysMLv2Parser.TILDE:
                {
                  this.state = 1440;
                  this.conjugationPart();
                }
                break;
              default:
                throw new NoViableAltException(this);
            }
          }
          this.state = 1443;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        } while (_la === 34 || _la === 139 || _la === 185 || _la === 217);
        this.state = 1448;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 50 || _la === 52 || _la === 86 || _la === 160) {
          {
            {
              this.state = 1445;
              this.typeRelationshipPart();
            }
          }
          this.state = 1450;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  specializationPart() {
    let localContext = new SpecializationPartContext(this.context, this.state);
    this.enterRule(localContext, 114, _SysMLv2Parser.RULE_specializationPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1451;
        _la = this.tokenStream.LA(1);
        if (!(_la === 139 || _la === 185)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1452;
        this.ownedSpecialization();
        this.state = 1457;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1453;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1454;
              this.ownedSpecialization();
            }
          }
          this.state = 1459;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  conjugationPart() {
    let localContext = new ConjugationPartContext(this.context, this.state);
    this.enterRule(localContext, 116, _SysMLv2Parser.RULE_conjugationPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1460;
        _la = this.tokenStream.LA(1);
        if (!(_la === 34 || _la === 217)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1461;
        this.ownedConjugation();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typeRelationshipPart() {
    let localContext = new TypeRelationshipPartContext(this.context, this.state);
    this.enterRule(localContext, 118, _SysMLv2Parser.RULE_typeRelationshipPart);
    try {
      this.state = 1467;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.DISJOINT:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1463;
            this.disjoiningPart();
          }
          break;
        case _SysMLv2Parser.UNIONS:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1464;
            this.unioningPart();
          }
          break;
        case _SysMLv2Parser.INTERSECTS:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1465;
            this.intersectingPart();
          }
          break;
        case _SysMLv2Parser.DIFFERENCES:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1466;
            this.differencingPart();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  disjoiningPart() {
    let localContext = new DisjoiningPartContext(this.context, this.state);
    this.enterRule(localContext, 120, _SysMLv2Parser.RULE_disjoiningPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1469;
        this.match(_SysMLv2Parser.DISJOINT);
        this.state = 1470;
        this.match(_SysMLv2Parser.FROM);
        this.state = 1471;
        this.ownedDisjoining();
        this.state = 1476;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1472;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1473;
              this.ownedDisjoining();
            }
          }
          this.state = 1478;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  unioningPart() {
    let localContext = new UnioningPartContext(this.context, this.state);
    this.enterRule(localContext, 122, _SysMLv2Parser.RULE_unioningPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1479;
        this.match(_SysMLv2Parser.UNIONS);
        this.state = 1480;
        this.unioning();
        this.state = 1485;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1481;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1482;
              this.unioning();
            }
          }
          this.state = 1487;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  intersectingPart() {
    let localContext = new IntersectingPartContext(this.context, this.state);
    this.enterRule(localContext, 124, _SysMLv2Parser.RULE_intersectingPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1488;
        this.match(_SysMLv2Parser.INTERSECTS);
        this.state = 1489;
        this.intersecting();
        this.state = 1494;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1490;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1491;
              this.intersecting();
            }
          }
          this.state = 1496;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  differencingPart() {
    let localContext = new DifferencingPartContext(this.context, this.state);
    this.enterRule(localContext, 126, _SysMLv2Parser.RULE_differencingPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1497;
        this.match(_SysMLv2Parser.DIFFERENCES);
        this.state = 1498;
        this.differencing();
        this.state = 1503;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1499;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1500;
              this.differencing();
            }
          }
          this.state = 1505;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typeBody() {
    let localContext = new TypeBodyContext(this.context, this.state);
    this.enterRule(localContext, 128, _SysMLv2Parser.RULE_typeBody);
    let _la;
    try {
      this.state = 1515;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1506;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1507;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 1511;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 4040229252) !== 0 || (_la - 33 & ~31) === 0 && (1 << _la - 33 & 1085130343) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1909244965) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 4287038193) !== 0 || (_la - 131 & ~31) === 0 && (1 << _la - 131 & 470774913) !== 0 || (_la - 163 & ~31) === 0 && (1 << _la - 163 & 1648373761) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 581829) !== 0) {
              {
                {
                  this.state = 1508;
                  this.typeBodyElement();
                }
              }
              this.state = 1513;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 1514;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typeBodyElement() {
    let localContext = new TypeBodyElementContext(this.context, this.state);
    this.enterRule(localContext, 130, _SysMLv2Parser.RULE_typeBodyElement);
    try {
      this.state = 1521;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 79, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1517;
            this.nonFeatureMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1518;
            this.featureMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1519;
            this.aliasMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1520;
            this.importRule();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  specialization() {
    let localContext = new SpecializationContext(this.context, this.state);
    this.enterRule(localContext, 132, _SysMLv2Parser.RULE_specialization);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1527;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 138) {
          {
            this.state = 1523;
            this.match(_SysMLv2Parser.SPECIALIZATION);
            this.state = 1525;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 1524;
                this.identification();
              }
            }
          }
        }
        this.state = 1529;
        this.match(_SysMLv2Parser.SUBTYPE);
        this.state = 1530;
        this.specificType();
        this.state = 1531;
        _la = this.tokenStream.LA(1);
        if (!(_la === 139 || _la === 185)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1532;
        this.generalType();
        this.state = 1533;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedSpecialization() {
    let localContext = new OwnedSpecializationContext(this.context, this.state);
    this.enterRule(localContext, 134, _SysMLv2Parser.RULE_ownedSpecialization);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1535;
        this.generalType();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  specificType() {
    let localContext = new SpecificTypeContext(this.context, this.state);
    this.enterRule(localContext, 136, _SysMLv2Parser.RULE_specificType);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1537;
        this.qualifiedName();
        this.state = 1542;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1538;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1539;
              this.qualifiedName();
            }
          }
          this.state = 1544;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  generalType() {
    let localContext = new GeneralTypeContext(this.context, this.state);
    this.enterRule(localContext, 138, _SysMLv2Parser.RULE_generalType);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1545;
        this.qualifiedName();
        this.state = 1550;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1546;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1547;
              this.qualifiedName();
            }
          }
          this.state = 1552;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  conjugation() {
    let localContext = new ConjugationContext(this.context, this.state);
    this.enterRule(localContext, 140, _SysMLv2Parser.RULE_conjugation);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1557;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 35) {
          {
            this.state = 1553;
            this.match(_SysMLv2Parser.CONJUGATION);
            this.state = 1555;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 1554;
                this.identification();
              }
            }
          }
        }
        this.state = 1559;
        this.match(_SysMLv2Parser.CONJUGATE);
        this.state = 1560;
        this.qualifiedName();
        this.state = 1565;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1561;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1562;
              this.qualifiedName();
            }
          }
          this.state = 1567;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 1568;
        _la = this.tokenStream.LA(1);
        if (!(_la === 34 || _la === 217)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1569;
        this.qualifiedName();
        this.state = 1574;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1570;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1571;
              this.qualifiedName();
            }
          }
          this.state = 1576;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 1577;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedConjugation() {
    let localContext = new OwnedConjugationContext(this.context, this.state);
    this.enterRule(localContext, 142, _SysMLv2Parser.RULE_ownedConjugation);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1579;
        this.qualifiedName();
        this.state = 1584;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1580;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1581;
              this.qualifiedName();
            }
          }
          this.state = 1586;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  disjoining() {
    let localContext = new DisjoiningContext(this.context, this.state);
    this.enterRule(localContext, 144, _SysMLv2Parser.RULE_disjoining);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1591;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 51) {
          {
            this.state = 1587;
            this.match(_SysMLv2Parser.DISJOINING);
            this.state = 1589;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 1588;
                this.identification();
              }
            }
          }
        }
        this.state = 1593;
        this.match(_SysMLv2Parser.DISJOINT);
        this.state = 1594;
        this.qualifiedName();
        this.state = 1599;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1595;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1596;
              this.qualifiedName();
            }
          }
          this.state = 1601;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 1602;
        this.match(_SysMLv2Parser.FROM);
        this.state = 1603;
        this.qualifiedName();
        this.state = 1608;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1604;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1605;
              this.qualifiedName();
            }
          }
          this.state = 1610;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 1611;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedDisjoining() {
    let localContext = new OwnedDisjoiningContext(this.context, this.state);
    this.enterRule(localContext, 146, _SysMLv2Parser.RULE_ownedDisjoining);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1613;
        this.qualifiedName();
        this.state = 1618;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1614;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1615;
              this.qualifiedName();
            }
          }
          this.state = 1620;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  unioning() {
    let localContext = new UnioningContext(this.context, this.state);
    this.enterRule(localContext, 148, _SysMLv2Parser.RULE_unioning);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1621;
        this.qualifiedName();
        this.state = 1626;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1622;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1623;
              this.qualifiedName();
            }
          }
          this.state = 1628;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  intersecting() {
    let localContext = new IntersectingContext(this.context, this.state);
    this.enterRule(localContext, 150, _SysMLv2Parser.RULE_intersecting);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1629;
        this.qualifiedName();
        this.state = 1634;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1630;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1631;
              this.qualifiedName();
            }
          }
          this.state = 1636;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  differencing() {
    let localContext = new DifferencingContext(this.context, this.state);
    this.enterRule(localContext, 152, _SysMLv2Parser.RULE_differencing);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1637;
        this.qualifiedName();
        this.state = 1642;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1638;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1639;
              this.qualifiedName();
            }
          }
          this.state = 1644;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureMember() {
    let localContext = new FeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 154, _SysMLv2Parser.RULE_featureMember);
    try {
      this.state = 1647;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 97, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1645;
            this.typeFeatureMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1646;
            this.ownedFeatureMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typeFeatureMember() {
    let localContext = new TypeFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 156, _SysMLv2Parser.RULE_typeFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1649;
        this.memberPrefix();
        this.state = 1650;
        this.match(_SysMLv2Parser.MEMBER);
        this.state = 1651;
        this.featureElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedFeatureMember() {
    let localContext = new OwnedFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 158, _SysMLv2Parser.RULE_ownedFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1653;
        this.memberPrefix();
        this.state = 1654;
        this.featureElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  classifier() {
    let localContext = new ClassifierContext(this.context, this.state);
    this.enterRule(localContext, 160, _SysMLv2Parser.RULE_classifier);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1656;
        this.typePrefix();
        this.state = 1657;
        this.match(_SysMLv2Parser.CLASSIFIER);
        this.state = 1658;
        this.classifierDeclaration();
        this.state = 1659;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  classifierDeclaration() {
    let localContext = new ClassifierDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 162, _SysMLv2Parser.RULE_classifierDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1662;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 8) {
          {
            this.state = 1661;
            this.match(_SysMLv2Parser.ALL);
          }
        }
        this.state = 1665;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
          {
            this.state = 1664;
            this.identification();
          }
        }
        this.state = 1668;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 211) {
          {
            this.state = 1667;
            this.ownedMultiplicity();
          }
        }
        this.state = 1672;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.SPECIALIZES:
          case _SysMLv2Parser.COLON_GT:
            {
              this.state = 1670;
              this.superclassingPart();
            }
            break;
          case _SysMLv2Parser.CONJUGATES:
          case _SysMLv2Parser.TILDE:
            {
              this.state = 1671;
              this.conjugationPart();
            }
            break;
          case _SysMLv2Parser.DIFFERENCES:
          case _SysMLv2Parser.DISJOINT:
          case _SysMLv2Parser.INTERSECTS:
          case _SysMLv2Parser.UNIONS:
          case _SysMLv2Parser.SEMI:
          case _SysMLv2Parser.LBRACE:
            break;
          default:
            break;
        }
        this.state = 1677;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 50 || _la === 52 || _la === 86 || _la === 160) {
          {
            {
              this.state = 1674;
              this.typeRelationshipPart();
            }
          }
          this.state = 1679;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  superclassingPart() {
    let localContext = new SuperclassingPartContext(this.context, this.state);
    this.enterRule(localContext, 164, _SysMLv2Parser.RULE_superclassingPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1680;
        _la = this.tokenStream.LA(1);
        if (!(_la === 139 || _la === 185)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1681;
        this.ownedSubclassification();
        this.state = 1686;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1682;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1683;
              this.ownedSubclassification();
            }
          }
          this.state = 1688;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  subclassification() {
    let localContext = new SubclassificationContext(this.context, this.state);
    this.enterRule(localContext, 166, _SysMLv2Parser.RULE_subclassification);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1693;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 138) {
          {
            this.state = 1689;
            this.match(_SysMLv2Parser.SPECIALIZATION);
            this.state = 1691;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 1690;
                this.identification();
              }
            }
          }
        }
        this.state = 1695;
        this.match(_SysMLv2Parser.SUBCLASSIFIER);
        this.state = 1696;
        this.qualifiedName();
        this.state = 1697;
        _la = this.tokenStream.LA(1);
        if (!(_la === 139 || _la === 185)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1698;
        this.qualifiedName();
        this.state = 1699;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedSubclassification() {
    let localContext = new OwnedSubclassificationContext(this.context, this.state);
    this.enterRule(localContext, 168, _SysMLv2Parser.RULE_ownedSubclassification);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1701;
        this.qualifiedName();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  feature() {
    let localContext = new FeatureContext(this.context, this.state);
    this.enterRule(localContext, 170, _SysMLv2Parser.RULE_feature);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1720;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 110, this.context)) {
          case 1:
            {
              this.state = 1703;
              this.featurePrefix();
              this.state = 1706;
              this.errorHandler.sync(this);
              switch (this.tokenStream.LA(1)) {
                case _SysMLv2Parser.FEATURE:
                  {
                    this.state = 1704;
                    this.match(_SysMLv2Parser.FEATURE);
                  }
                  break;
                case _SysMLv2Parser.HASH:
                  {
                    this.state = 1705;
                    this.prefixMetadataMember();
                  }
                  break;
                default:
                  throw new NoViableAltException(this);
              }
              this.state = 1709;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 8 || _la === 20 || (_la - 34 & ~31) === 0 && (1 << _la - 34 & 2147492097) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 2488533505) !== 0 || (_la - 113 & ~31) === 0 && (1 << _la - 113 & 1073778945) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402687489) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 69730313) !== 0 || (_la - 217 & ~31) === 0 && (1 << _la - 217 & 7) !== 0) {
                {
                  this.state = 1708;
                  this.featureDeclaration();
                }
              }
            }
            break;
          case 2:
            {
              this.state = 1713;
              this.errorHandler.sync(this);
              switch (this.interpreter.adaptivePredict(this.tokenStream, 108, this.context)) {
                case 1:
                  {
                    this.state = 1711;
                    this.endFeaturePrefix();
                  }
                  break;
                case 2:
                  {
                    this.state = 1712;
                    this.basicFeaturePrefix();
                  }
                  break;
              }
              this.state = 1716;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 127) {
                {
                  this.state = 1715;
                  this.match(_SysMLv2Parser.REF);
                }
              }
              this.state = 1718;
              this.featureDeclaration();
            }
            break;
        }
        this.state = 1723;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 1722;
            this.valuePart();
          }
        }
        this.state = 1725;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  endFeaturePrefix() {
    let localContext = new EndFeaturePrefixContext(this.context, this.state);
    this.enterRule(localContext, 172, _SysMLv2Parser.RULE_endFeaturePrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1728;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 39) {
          {
            this.state = 1727;
            this.match(_SysMLv2Parser.CONST);
          }
        }
        this.state = 1730;
        this.match(_SysMLv2Parser.END);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  basicFeaturePrefix() {
    let localContext = new BasicFeaturePrefixContext(this.context, this.state);
    this.enterRule(localContext, 174, _SysMLv2Parser.RULE_basicFeaturePrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1733;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 80 || _la === 83 || _la === 114) {
          {
            this.state = 1732;
            this.featureDirection();
          }
        }
        this.state = 1736;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 49) {
          {
            this.state = 1735;
            this.match(_SysMLv2Parser.DERIVED);
          }
        }
        this.state = 1739;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2) {
          {
            this.state = 1738;
            this.match(_SysMLv2Parser.ABSTRACT);
          }
        }
        this.state = 1742;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 31 || _la === 120) {
          {
            this.state = 1741;
            _la = this.tokenStream.LA(1);
            if (!(_la === 31 || _la === 120)) {
              this.errorHandler.recoverInline(this);
            } else {
              this.errorHandler.reportMatch(this);
              this.consume();
            }
          }
        }
        this.state = 1745;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 117, this.context)) {
          case 1:
            {
              this.state = 1744;
              _la = this.tokenStream.LA(1);
              if (!(_la === 39 || _la === 163)) {
                this.errorHandler.recoverInline(this);
              } else {
                this.errorHandler.reportMatch(this);
                this.consume();
              }
            }
            break;
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featurePrefix() {
    let localContext = new FeaturePrefixContext(this.context, this.state);
    this.enterRule(localContext, 176, _SysMLv2Parser.RULE_featurePrefix);
    try {
      let alternative;
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1751;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 118, this.context)) {
          case 1:
            {
              this.state = 1747;
              this.endFeaturePrefix();
              this.state = 1748;
              this.ownedCrossFeatureMember();
            }
            break;
          case 2:
            {
              this.state = 1750;
              this.basicFeaturePrefix();
            }
            break;
        }
        this.state = 1756;
        this.errorHandler.sync(this);
        alternative = this.interpreter.adaptivePredict(this.tokenStream, 119, this.context);
        while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
          if (alternative === 1) {
            {
              {
                this.state = 1753;
                this.prefixMetadataMember();
              }
            }
          }
          this.state = 1758;
          this.errorHandler.sync(this);
          alternative = this.interpreter.adaptivePredict(this.tokenStream, 119, this.context);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedCrossFeatureMember() {
    let localContext = new OwnedCrossFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 178, _SysMLv2Parser.RULE_ownedCrossFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1759;
        this.ownedCrossFeature();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedCrossFeature() {
    let localContext = new OwnedCrossFeatureContext(this.context, this.state);
    this.enterRule(localContext, 180, _SysMLv2Parser.RULE_ownedCrossFeature);
    try {
      this.state = 1768;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 121, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1761;
            this.basicFeaturePrefix();
            this.state = 1762;
            this.featureDeclaration();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1764;
            this.basicUsagePrefix();
            this.state = 1766;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 120, this.context)) {
              case 1:
                {
                  this.state = 1765;
                  this.usageDeclaration();
                }
                break;
            }
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureDirection() {
    let localContext = new FeatureDirectionContext(this.context, this.state);
    this.enterRule(localContext, 182, _SysMLv2Parser.RULE_featureDirection);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1770;
        _la = this.tokenStream.LA(1);
        if (!(_la === 80 || _la === 83 || _la === 114)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureDeclaration() {
    let localContext = new FeatureDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 184, _SysMLv2Parser.RULE_featureDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1773;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 8) {
          {
            this.state = 1772;
            this.match(_SysMLv2Parser.ALL);
          }
        }
        this.state = 1782;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 124, this.context)) {
          case 1:
            {
              this.state = 1775;
              this.featureIdentification();
              this.state = 1778;
              this.errorHandler.sync(this);
              switch (this.interpreter.adaptivePredict(this.tokenStream, 123, this.context)) {
                case 1:
                  {
                    this.state = 1776;
                    this.featureSpecializationPart();
                  }
                  break;
                case 2:
                  {
                    this.state = 1777;
                    this.conjugationPart();
                  }
                  break;
              }
            }
            break;
          case 2:
            {
              this.state = 1780;
              this.featureSpecializationPart();
            }
            break;
          case 3:
            {
              this.state = 1781;
              this.conjugationPart();
            }
            break;
        }
        this.state = 1787;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while ((_la - 27 & ~31) === 0 && (1 << _la - 27 & 41943041) !== 0 || (_la - 66 & ~31) === 0 && (1 << _la - 66 & 5242881) !== 0 || _la === 160) {
          {
            {
              this.state = 1784;
              this.featureRelationshipPart();
            }
          }
          this.state = 1789;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureIdentification() {
    let localContext = new FeatureIdentificationContext(this.context, this.state);
    this.enterRule(localContext, 186, _SysMLv2Parser.RULE_featureIdentification);
    try {
      this.state = 1797;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.LT:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1790;
            this.match(_SysMLv2Parser.LT);
            this.state = 1791;
            this.name();
            this.state = 1792;
            this.match(_SysMLv2Parser.GT);
            this.state = 1794;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 126, this.context)) {
              case 1:
                {
                  this.state = 1793;
                  this.name();
                }
                break;
            }
          }
          break;
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1796;
            this.name();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureRelationshipPart() {
    let localContext = new FeatureRelationshipPartContext(this.context, this.state);
    this.enterRule(localContext, 188, _SysMLv2Parser.RULE_featureRelationshipPart);
    try {
      this.state = 1803;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.DIFFERENCES:
        case _SysMLv2Parser.DISJOINT:
        case _SysMLv2Parser.INTERSECTS:
        case _SysMLv2Parser.UNIONS:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1799;
            this.typeRelationshipPart();
          }
          break;
        case _SysMLv2Parser.CHAINS:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1800;
            this.chainingPart();
          }
          break;
        case _SysMLv2Parser.INVERSE:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1801;
            this.invertingPart();
          }
          break;
        case _SysMLv2Parser.FEATURED:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1802;
            this.typeFeaturingPart();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  chainingPart() {
    let localContext = new ChainingPartContext(this.context, this.state);
    this.enterRule(localContext, 190, _SysMLv2Parser.RULE_chainingPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1805;
        this.match(_SysMLv2Parser.CHAINS);
        this.state = 1806;
        this.qualifiedName();
        this.state = 1811;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1807;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1808;
              this.qualifiedName();
            }
          }
          this.state = 1813;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  invertingPart() {
    let localContext = new InvertingPartContext(this.context, this.state);
    this.enterRule(localContext, 192, _SysMLv2Parser.RULE_invertingPart);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1814;
        this.match(_SysMLv2Parser.INVERSE);
        this.state = 1815;
        this.match(_SysMLv2Parser.OF);
        this.state = 1816;
        this.ownedFeatureInverting();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typeFeaturingPart() {
    let localContext = new TypeFeaturingPartContext(this.context, this.state);
    this.enterRule(localContext, 194, _SysMLv2Parser.RULE_typeFeaturingPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1818;
        this.match(_SysMLv2Parser.FEATURED);
        this.state = 1819;
        this.match(_SysMLv2Parser.BY);
        this.state = 1820;
        this.ownedTypeFeaturing();
        this.state = 1825;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1821;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1822;
              this.ownedTypeFeaturing();
            }
          }
          this.state = 1827;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureSpecializationPart() {
    let localContext = new FeatureSpecializationPartContext(this.context, this.state);
    this.enterRule(localContext, 196, _SysMLv2Parser.RULE_featureSpecializationPart);
    try {
      let alternative;
      this.state = 1849;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.DEFINED:
        case _SysMLv2Parser.REDEFINES:
        case _SysMLv2Parser.REFERENCES:
        case _SysMLv2Parser.SUBSETS:
        case _SysMLv2Parser.TYPED:
        case _SysMLv2Parser.COLON_COLON_GT:
        case _SysMLv2Parser.COLON_GT_GT:
        case _SysMLv2Parser.COLON_GT:
        case _SysMLv2Parser.FAT_ARROW:
        case _SysMLv2Parser.COLON:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1829;
            this.errorHandler.sync(this);
            alternative = 1;
            do {
              switch (alternative) {
                case 1:
                  {
                    {
                      this.state = 1828;
                      this.featureSpecialization();
                    }
                  }
                  break;
                default:
                  throw new NoViableAltException(this);
              }
              this.state = 1831;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 131, this.context);
            } while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER);
            this.state = 1834;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 132, this.context)) {
              case 1:
                {
                  this.state = 1833;
                  this.multiplicityPart();
                }
                break;
            }
            this.state = 1839;
            this.errorHandler.sync(this);
            alternative = this.interpreter.adaptivePredict(this.tokenStream, 133, this.context);
            while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
              if (alternative === 1) {
                {
                  {
                    this.state = 1836;
                    this.featureSpecialization();
                  }
                }
              }
              this.state = 1841;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 133, this.context);
            }
          }
          break;
        case _SysMLv2Parser.NONUNIQUE:
        case _SysMLv2Parser.ORDERED:
        case _SysMLv2Parser.LBRACK:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1842;
            this.multiplicityPart();
            this.state = 1846;
            this.errorHandler.sync(this);
            alternative = this.interpreter.adaptivePredict(this.tokenStream, 134, this.context);
            while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
              if (alternative === 1) {
                {
                  {
                    this.state = 1843;
                    this.featureSpecialization();
                  }
                }
              }
              this.state = 1848;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 134, this.context);
            }
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  multiplicityPart() {
    let localContext = new MultiplicityPartContext(this.context, this.state);
    this.enterRule(localContext, 198, _SysMLv2Parser.RULE_multiplicityPart);
    try {
      this.state = 1872;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.LBRACK:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1851;
            this.ownedMultiplicity();
            this.state = 1860;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 138, this.context)) {
              case 1:
                {
                  this.state = 1852;
                  this.match(_SysMLv2Parser.ORDERED);
                  this.state = 1854;
                  this.errorHandler.sync(this);
                  switch (this.interpreter.adaptivePredict(this.tokenStream, 136, this.context)) {
                    case 1:
                      {
                        this.state = 1853;
                        this.match(_SysMLv2Parser.NONUNIQUE);
                      }
                      break;
                  }
                }
                break;
              case 2:
                {
                  this.state = 1856;
                  this.match(_SysMLv2Parser.NONUNIQUE);
                  this.state = 1858;
                  this.errorHandler.sync(this);
                  switch (this.interpreter.adaptivePredict(this.tokenStream, 137, this.context)) {
                    case 1:
                      {
                        this.state = 1857;
                        this.match(_SysMLv2Parser.ORDERED);
                      }
                      break;
                  }
                }
                break;
            }
          }
          break;
        case _SysMLv2Parser.NONUNIQUE:
        case _SysMLv2Parser.ORDERED:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1870;
            this.errorHandler.sync(this);
            switch (this.tokenStream.LA(1)) {
              case _SysMLv2Parser.ORDERED:
                {
                  this.state = 1862;
                  this.match(_SysMLv2Parser.ORDERED);
                  this.state = 1864;
                  this.errorHandler.sync(this);
                  switch (this.interpreter.adaptivePredict(this.tokenStream, 139, this.context)) {
                    case 1:
                      {
                        this.state = 1863;
                        this.match(_SysMLv2Parser.NONUNIQUE);
                      }
                      break;
                  }
                }
                break;
              case _SysMLv2Parser.NONUNIQUE:
                {
                  this.state = 1866;
                  this.match(_SysMLv2Parser.NONUNIQUE);
                  this.state = 1868;
                  this.errorHandler.sync(this);
                  switch (this.interpreter.adaptivePredict(this.tokenStream, 140, this.context)) {
                    case 1:
                      {
                        this.state = 1867;
                        this.match(_SysMLv2Parser.ORDERED);
                      }
                      break;
                  }
                }
                break;
              default:
                throw new NoViableAltException(this);
            }
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureSpecialization() {
    let localContext = new FeatureSpecializationContext(this.context, this.state);
    this.enterRule(localContext, 200, _SysMLv2Parser.RULE_featureSpecialization);
    try {
      this.state = 1879;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.DEFINED:
        case _SysMLv2Parser.TYPED:
        case _SysMLv2Parser.COLON:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1874;
            this.typings();
          }
          break;
        case _SysMLv2Parser.SUBSETS:
        case _SysMLv2Parser.COLON_GT:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1875;
            this.subsettings();
          }
          break;
        case _SysMLv2Parser.REFERENCES:
        case _SysMLv2Parser.COLON_COLON_GT:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1876;
            this.references();
          }
          break;
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FAT_ARROW:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 1877;
            this.crosses();
          }
          break;
        case _SysMLv2Parser.REDEFINES:
        case _SysMLv2Parser.COLON_GT_GT:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 1878;
            this.redefinitions();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typings() {
    let localContext = new TypingsContext(this.context, this.state);
    this.enterRule(localContext, 202, _SysMLv2Parser.RULE_typings);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1881;
        this.typedBy();
        this.state = 1886;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1882;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1883;
              this.featureTyping();
            }
          }
          this.state = 1888;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typedBy() {
    let localContext = new TypedByContext(this.context, this.state);
    this.enterRule(localContext, 204, _SysMLv2Parser.RULE_typedBy);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1894;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.COLON:
            {
              this.state = 1889;
              this.match(_SysMLv2Parser.COLON);
            }
            break;
          case _SysMLv2Parser.TYPED:
            {
              this.state = 1890;
              this.match(_SysMLv2Parser.TYPED);
              this.state = 1891;
              this.match(_SysMLv2Parser.BY);
            }
            break;
          case _SysMLv2Parser.DEFINED:
            {
              this.state = 1892;
              this.match(_SysMLv2Parser.DEFINED);
              this.state = 1893;
              this.match(_SysMLv2Parser.BY);
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 1896;
        this.featureTyping();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  subsettings() {
    let localContext = new SubsettingsContext(this.context, this.state);
    this.enterRule(localContext, 206, _SysMLv2Parser.RULE_subsettings);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1898;
        this.subsets();
        this.state = 1903;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1899;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1900;
              this.ownedSubsetting();
            }
          }
          this.state = 1905;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  subsets() {
    let localContext = new SubsetsContext(this.context, this.state);
    this.enterRule(localContext, 208, _SysMLv2Parser.RULE_subsets);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1906;
        _la = this.tokenStream.LA(1);
        if (!(_la === 148 || _la === 185)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1907;
        this.ownedSubsetting();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  references() {
    let localContext = new ReferencesContext(this.context, this.state);
    this.enterRule(localContext, 210, _SysMLv2Parser.RULE_references);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1909;
        _la = this.tokenStream.LA(1);
        if (!(_la === 128 || _la === 175)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1910;
        this.ownedReferenceSubsetting();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  crosses() {
    let localContext = new CrossesContext(this.context, this.state);
    this.enterRule(localContext, 212, _SysMLv2Parser.RULE_crosses);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1912;
        _la = this.tokenStream.LA(1);
        if (!(_la === 42 || _la === 188)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1913;
        this.ownedCrossSubsetting();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  redefinitions() {
    let localContext = new RedefinitionsContext(this.context, this.state);
    this.enterRule(localContext, 214, _SysMLv2Parser.RULE_redefinitions);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1915;
        this.redefines();
        this.state = 1920;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 1916;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 1917;
              this.ownedRedefinition();
            }
          }
          this.state = 1922;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  redefines() {
    let localContext = new RedefinesContext(this.context, this.state);
    this.enterRule(localContext, 216, _SysMLv2Parser.RULE_redefines);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1923;
        _la = this.tokenStream.LA(1);
        if (!(_la === 125 || _la === 176)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1924;
        this.ownedRedefinition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureTyping() {
    let localContext = new FeatureTypingContext(this.context, this.state);
    this.enterRule(localContext, 218, _SysMLv2Parser.RULE_featureTyping);
    let _la;
    try {
      this.state = 1944;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SPECIALIZATION:
        case _SysMLv2Parser.TYPING:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 1930;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 138) {
              {
                this.state = 1926;
                this.match(_SysMLv2Parser.SPECIALIZATION);
                this.state = 1928;
                this.errorHandler.sync(this);
                _la = this.tokenStream.LA(1);
                if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
                  {
                    this.state = 1927;
                    this.identification();
                  }
                }
              }
            }
            this.state = 1932;
            this.match(_SysMLv2Parser.TYPING);
            this.state = 1933;
            this.qualifiedName();
            this.state = 1937;
            this.errorHandler.sync(this);
            switch (this.tokenStream.LA(1)) {
              case _SysMLv2Parser.COLON:
                {
                  this.state = 1934;
                  this.match(_SysMLv2Parser.COLON);
                }
                break;
              case _SysMLv2Parser.TYPED:
                {
                  this.state = 1935;
                  this.match(_SysMLv2Parser.TYPED);
                  this.state = 1936;
                  this.match(_SysMLv2Parser.BY);
                }
                break;
              default:
                throw new NoViableAltException(this);
            }
            this.state = 1939;
            this.generalType();
            this.state = 1940;
            this.relationshipBody();
          }
          break;
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.DOLLAR:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 1942;
            this.ownedFeatureTyping();
          }
          break;
        case _SysMLv2Parser.TILDE:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 1943;
            this.conjugatedPortTyping();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedFeatureTyping() {
    let localContext = new OwnedFeatureTypingContext(this.context, this.state);
    this.enterRule(localContext, 220, _SysMLv2Parser.RULE_ownedFeatureTyping);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1946;
        this.qualifiedName();
        this.state = 1951;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1947;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1948;
              this.qualifiedName();
            }
          }
          this.state = 1953;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  subsetting() {
    let localContext = new SubsettingContext(this.context, this.state);
    this.enterRule(localContext, 222, _SysMLv2Parser.RULE_subsetting);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1958;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 138) {
          {
            this.state = 1954;
            this.match(_SysMLv2Parser.SPECIALIZATION);
            this.state = 1956;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 1955;
                this.identification();
              }
            }
          }
        }
        this.state = 1960;
        this.match(_SysMLv2Parser.SUBSET);
        this.state = 1961;
        this.specificType();
        this.state = 1962;
        _la = this.tokenStream.LA(1);
        if (!(_la === 148 || _la === 185)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1963;
        this.generalType();
        this.state = 1964;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedSubsetting() {
    let localContext = new OwnedSubsettingContext(this.context, this.state);
    this.enterRule(localContext, 224, _SysMLv2Parser.RULE_ownedSubsetting);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1966;
        this.qualifiedName();
        this.state = 1971;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1967;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1968;
              this.qualifiedName();
            }
          }
          this.state = 1973;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedReferenceSubsetting() {
    let localContext = new OwnedReferenceSubsettingContext(this.context, this.state);
    this.enterRule(localContext, 226, _SysMLv2Parser.RULE_ownedReferenceSubsetting);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1974;
        this.qualifiedName();
        this.state = 1979;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1975;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1976;
              this.qualifiedName();
            }
          }
          this.state = 1981;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedCrossSubsetting() {
    let localContext = new OwnedCrossSubsettingContext(this.context, this.state);
    this.enterRule(localContext, 228, _SysMLv2Parser.RULE_ownedCrossSubsetting);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1982;
        this.qualifiedName();
        this.state = 1987;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 1983;
              this.match(_SysMLv2Parser.DOT);
              this.state = 1984;
              this.qualifiedName();
            }
          }
          this.state = 1989;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  redefinition() {
    let localContext = new RedefinitionContext(this.context, this.state);
    this.enterRule(localContext, 230, _SysMLv2Parser.RULE_redefinition);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 1994;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 138) {
          {
            this.state = 1990;
            this.match(_SysMLv2Parser.SPECIALIZATION);
            this.state = 1992;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 1991;
                this.identification();
              }
            }
          }
        }
        this.state = 1996;
        this.match(_SysMLv2Parser.REDEFINITION);
        this.state = 1997;
        this.specificType();
        this.state = 1998;
        _la = this.tokenStream.LA(1);
        if (!(_la === 125 || _la === 176)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 1999;
        this.generalType();
        this.state = 2e3;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedRedefinition() {
    let localContext = new OwnedRedefinitionContext(this.context, this.state);
    this.enterRule(localContext, 232, _SysMLv2Parser.RULE_ownedRedefinition);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2002;
        this.qualifiedName();
        this.state = 2007;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 2003;
              this.match(_SysMLv2Parser.DOT);
              this.state = 2004;
              this.qualifiedName();
            }
          }
          this.state = 2009;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureInverting() {
    let localContext = new FeatureInvertingContext(this.context, this.state);
    this.enterRule(localContext, 234, _SysMLv2Parser.RULE_featureInverting);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2014;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 89) {
          {
            this.state = 2010;
            this.match(_SysMLv2Parser.INVERTING);
            this.state = 2012;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 2011;
                this.identification();
              }
            }
          }
        }
        this.state = 2016;
        this.match(_SysMLv2Parser.INVERSE);
        this.state = 2017;
        this.qualifiedName();
        this.state = 2022;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 2018;
              this.match(_SysMLv2Parser.DOT);
              this.state = 2019;
              this.qualifiedName();
            }
          }
          this.state = 2024;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2025;
        this.match(_SysMLv2Parser.OF);
        this.state = 2026;
        this.qualifiedName();
        this.state = 2031;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 2027;
              this.match(_SysMLv2Parser.DOT);
              this.state = 2028;
              this.qualifiedName();
            }
          }
          this.state = 2033;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2034;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedFeatureInverting() {
    let localContext = new OwnedFeatureInvertingContext(this.context, this.state);
    this.enterRule(localContext, 236, _SysMLv2Parser.RULE_ownedFeatureInverting);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2036;
        this.qualifiedName();
        this.state = 2041;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 2037;
              this.match(_SysMLv2Parser.DOT);
              this.state = 2038;
              this.qualifiedName();
            }
          }
          this.state = 2043;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  typeFeaturing() {
    let localContext = new TypeFeaturingContext(this.context, this.state);
    this.enterRule(localContext, 238, _SysMLv2Parser.RULE_typeFeaturing);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2044;
        this.match(_SysMLv2Parser.FEATURING);
        this.state = 2049;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 167, this.context)) {
          case 1:
            {
              this.state = 2046;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
                {
                  this.state = 2045;
                  this.identification();
                }
              }
              this.state = 2048;
              this.match(_SysMLv2Parser.OF);
            }
            break;
        }
        this.state = 2051;
        this.qualifiedName();
        this.state = 2052;
        this.match(_SysMLv2Parser.BY);
        this.state = 2053;
        this.qualifiedName();
        this.state = 2054;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedTypeFeaturing() {
    let localContext = new OwnedTypeFeaturingContext(this.context, this.state);
    this.enterRule(localContext, 240, _SysMLv2Parser.RULE_ownedTypeFeaturing);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2056;
        this.qualifiedName();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  dataType() {
    let localContext = new DataTypeContext(this.context, this.state);
    this.enterRule(localContext, 242, _SysMLv2Parser.RULE_dataType);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2058;
        this.typePrefix();
        this.state = 2059;
        this.match(_SysMLv2Parser.DATATYPE);
        this.state = 2060;
        this.classifierDeclaration();
        this.state = 2061;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  class_() {
    let localContext = new ClassContext(this.context, this.state);
    this.enterRule(localContext, 244, _SysMLv2Parser.RULE_class);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2063;
        this.typePrefix();
        this.state = 2064;
        this.match(_SysMLv2Parser.CLASS);
        this.state = 2065;
        this.classifierDeclaration();
        this.state = 2066;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  structure() {
    let localContext = new StructureContext(this.context, this.state);
    this.enterRule(localContext, 246, _SysMLv2Parser.RULE_structure);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2068;
        this.typePrefix();
        this.state = 2069;
        this.match(_SysMLv2Parser.STRUCT);
        this.state = 2070;
        this.classifierDeclaration();
        this.state = 2071;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  association() {
    let localContext = new AssociationContext(this.context, this.state);
    this.enterRule(localContext, 248, _SysMLv2Parser.RULE_association);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2073;
        this.typePrefix();
        this.state = 2074;
        this.match(_SysMLv2Parser.ASSOC);
        this.state = 2075;
        this.classifierDeclaration();
        this.state = 2076;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  associationStructure() {
    let localContext = new AssociationStructureContext(this.context, this.state);
    this.enterRule(localContext, 250, _SysMLv2Parser.RULE_associationStructure);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2078;
        this.typePrefix();
        this.state = 2079;
        this.match(_SysMLv2Parser.ASSOC);
        this.state = 2080;
        this.match(_SysMLv2Parser.STRUCT);
        this.state = 2081;
        this.classifierDeclaration();
        this.state = 2082;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  connector() {
    let localContext = new ConnectorContext(this.context, this.state);
    this.enterRule(localContext, 252, _SysMLv2Parser.RULE_connector);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2084;
        this.featurePrefix();
        this.state = 2085;
        this.match(_SysMLv2Parser.CONNECTOR);
        this.state = 2093;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 170, this.context)) {
          case 1:
            {
              this.state = 2087;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 8 || _la === 20 || (_la - 34 & ~31) === 0 && (1 << _la - 34 & 2147492097) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 2488533505) !== 0 || (_la - 113 & ~31) === 0 && (1 << _la - 113 & 1073778945) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402687489) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 69730313) !== 0 || (_la - 217 & ~31) === 0 && (1 << _la - 217 & 7) !== 0) {
                {
                  this.state = 2086;
                  this.featureDeclaration();
                }
              }
              this.state = 2090;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 46 || _la === 184 || _la === 207) {
                {
                  this.state = 2089;
                  this.valuePart();
                }
              }
            }
            break;
          case 2:
            {
              this.state = 2092;
              this.connectorDeclaration();
            }
            break;
        }
        this.state = 2095;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  connectorDeclaration() {
    let localContext = new ConnectorDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 254, _SysMLv2Parser.RULE_connectorDeclaration);
    try {
      this.state = 2099;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 171, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2097;
            this.binaryConnectorDeclaration();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2098;
            this.naryConnectorDeclaration();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  binaryConnectorDeclaration() {
    let localContext = new BinaryConnectorDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 256, _SysMLv2Parser.RULE_binaryConnectorDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2109;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 174, this.context)) {
          case 1:
            {
              this.state = 2102;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 8 || _la === 20 || (_la - 34 & ~31) === 0 && (1 << _la - 34 & 2147492097) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 2488533505) !== 0 || (_la - 113 & ~31) === 0 && (1 << _la - 113 & 1073778945) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402687489) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 69730313) !== 0 || (_la - 217 & ~31) === 0 && (1 << _la - 217 & 7) !== 0) {
                {
                  this.state = 2101;
                  this.featureDeclaration();
                }
              }
              this.state = 2104;
              this.match(_SysMLv2Parser.FROM);
            }
            break;
          case 2:
            {
              this.state = 2105;
              this.match(_SysMLv2Parser.ALL);
              this.state = 2107;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 74) {
                {
                  this.state = 2106;
                  this.match(_SysMLv2Parser.FROM);
                }
              }
            }
            break;
        }
        this.state = 2111;
        this.connectorEndMember();
        this.state = 2112;
        this.match(_SysMLv2Parser.TO);
        this.state = 2113;
        this.connectorEndMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  naryConnectorDeclaration() {
    let localContext = new NaryConnectorDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 258, _SysMLv2Parser.RULE_naryConnectorDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2116;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 8 || _la === 20 || (_la - 34 & ~31) === 0 && (1 << _la - 34 & 2147492097) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 2488533505) !== 0 || (_la - 113 & ~31) === 0 && (1 << _la - 113 & 1073778945) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402687489) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 69730313) !== 0 || (_la - 217 & ~31) === 0 && (1 << _la - 217 & 7) !== 0) {
          {
            this.state = 2115;
            this.featureDeclaration();
          }
        }
        this.state = 2118;
        this.match(_SysMLv2Parser.LPAREN);
        this.state = 2119;
        this.connectorEndMember();
        this.state = 2120;
        this.match(_SysMLv2Parser.COMMA);
        this.state = 2121;
        this.connectorEndMember();
        this.state = 2126;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 2122;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 2123;
              this.connectorEndMember();
            }
          }
          this.state = 2128;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2129;
        this.match(_SysMLv2Parser.RPAREN);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  connectorEndMember() {
    let localContext = new ConnectorEndMemberContext(this.context, this.state);
    this.enterRule(localContext, 260, _SysMLv2Parser.RULE_connectorEndMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2131;
        this.connectorEnd();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  connectorEnd() {
    let localContext = new ConnectorEndContext(this.context, this.state);
    this.enterRule(localContext, 262, _SysMLv2Parser.RULE_connectorEnd);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2134;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 211) {
          {
            this.state = 2133;
            this.ownedCrossMultiplicityMember();
          }
        }
        this.state = 2139;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 178, this.context)) {
          case 1:
            {
              this.state = 2136;
              this.name();
              this.state = 2137;
              _la = this.tokenStream.LA(1);
              if (!(_la === 128 || _la === 175)) {
                this.errorHandler.recoverInline(this);
              } else {
                this.errorHandler.reportMatch(this);
                this.consume();
              }
            }
            break;
        }
        this.state = 2141;
        this.ownedReferenceSubsetting();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedCrossMultiplicityMember() {
    let localContext = new OwnedCrossMultiplicityMemberContext(this.context, this.state);
    this.enterRule(localContext, 264, _SysMLv2Parser.RULE_ownedCrossMultiplicityMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2143;
        this.ownedCrossMultiplicity();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedCrossMultiplicity() {
    let localContext = new OwnedCrossMultiplicityContext(this.context, this.state);
    this.enterRule(localContext, 266, _SysMLv2Parser.RULE_ownedCrossMultiplicity);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2145;
        this.ownedMultiplicity();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  bindingConnector() {
    let localContext = new BindingConnectorContext(this.context, this.state);
    this.enterRule(localContext, 268, _SysMLv2Parser.RULE_bindingConnector);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2147;
        this.featurePrefix();
        this.state = 2148;
        this.match(_SysMLv2Parser.BINDING);
        this.state = 2149;
        this.bindingConnectorDeclaration();
        this.state = 2150;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  bindingConnectorDeclaration() {
    let localContext = new BindingConnectorDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 270, _SysMLv2Parser.RULE_bindingConnectorDeclaration);
    let _la;
    try {
      this.state = 2172;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 183, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2152;
            this.featureDeclaration();
            this.state = 2158;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 111) {
              {
                this.state = 2153;
                this.match(_SysMLv2Parser.OF);
                this.state = 2154;
                this.connectorEndMember();
                this.state = 2155;
                this.match(_SysMLv2Parser.EQ);
                this.state = 2156;
                this.connectorEndMember();
              }
            }
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2161;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 8) {
              {
                this.state = 2160;
                this.match(_SysMLv2Parser.ALL);
              }
            }
            this.state = 2170;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16793681) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 193 & ~31) === 0 && (1 << _la - 193 & 100925441) !== 0) {
              {
                this.state = 2164;
                this.errorHandler.sync(this);
                _la = this.tokenStream.LA(1);
                if (_la === 111) {
                  {
                    this.state = 2163;
                    this.match(_SysMLv2Parser.OF);
                  }
                }
                this.state = 2166;
                this.connectorEndMember();
                this.state = 2167;
                this.match(_SysMLv2Parser.EQ);
                this.state = 2168;
                this.connectorEndMember();
              }
            }
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  succession() {
    let localContext = new SuccessionContext(this.context, this.state);
    this.enterRule(localContext, 272, _SysMLv2Parser.RULE_succession);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2174;
        this.featurePrefix();
        this.state = 2175;
        this.match(_SysMLv2Parser.SUCCESSION);
        this.state = 2176;
        this.successionDeclaration();
        this.state = 2177;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  successionDeclaration() {
    let localContext = new SuccessionDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 274, _SysMLv2Parser.RULE_successionDeclaration);
    let _la;
    try {
      this.state = 2199;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 188, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2179;
            this.featureDeclaration();
            this.state = 2185;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 69) {
              {
                this.state = 2180;
                this.match(_SysMLv2Parser.FIRST);
                this.state = 2181;
                this.connectorEndMember();
                this.state = 2182;
                this.match(_SysMLv2Parser.THEN);
                this.state = 2183;
                this.connectorEndMember();
              }
            }
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2188;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 8) {
              {
                this.state = 2187;
                this.match(_SysMLv2Parser.ALL);
              }
            }
            this.state = 2197;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702609) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 193 & ~31) === 0 && (1 << _la - 193 & 100925441) !== 0) {
              {
                this.state = 2191;
                this.errorHandler.sync(this);
                _la = this.tokenStream.LA(1);
                if (_la === 69) {
                  {
                    this.state = 2190;
                    this.match(_SysMLv2Parser.FIRST);
                  }
                }
                this.state = 2193;
                this.connectorEndMember();
                this.state = 2194;
                this.match(_SysMLv2Parser.THEN);
                this.state = 2195;
                this.connectorEndMember();
              }
            }
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  behavior() {
    let localContext = new BehaviorContext(this.context, this.state);
    this.enterRule(localContext, 276, _SysMLv2Parser.RULE_behavior);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2201;
        this.typePrefix();
        this.state = 2202;
        this.match(_SysMLv2Parser.BEHAVIOR);
        this.state = 2203;
        this.classifierDeclaration();
        this.state = 2204;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  step() {
    let localContext = new StepContext(this.context, this.state);
    this.enterRule(localContext, 278, _SysMLv2Parser.RULE_step);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2206;
        this.featurePrefix();
        this.state = 2207;
        this.match(_SysMLv2Parser.STEP);
        this.state = 2208;
        this.featureDeclaration();
        this.state = 2210;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 2209;
            this.valuePart();
          }
        }
        this.state = 2212;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  function_() {
    let localContext = new FunctionContext(this.context, this.state);
    this.enterRule(localContext, 280, _SysMLv2Parser.RULE_function);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2214;
        this.typePrefix();
        this.state = 2215;
        this.match(_SysMLv2Parser.FUNCTION);
        this.state = 2216;
        this.classifierDeclaration();
        this.state = 2217;
        this.functionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  functionBody() {
    let localContext = new FunctionBodyContext(this.context, this.state);
    this.enterRule(localContext, 282, _SysMLv2Parser.RULE_functionBody);
    try {
      this.state = 2224;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2219;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2220;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 2221;
            this.functionBodyPart();
            this.state = 2222;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  functionBodyPart() {
    let localContext = new FunctionBodyPartContext(this.context, this.state);
    this.enterRule(localContext, 284, _SysMLv2Parser.RULE_functionBodyPart);
    let _la;
    try {
      let alternative;
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2231;
        this.errorHandler.sync(this);
        alternative = this.interpreter.adaptivePredict(this.tokenStream, 192, this.context);
        while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
          if (alternative === 1) {
            {
              this.state = 2229;
              this.errorHandler.sync(this);
              switch (this.interpreter.adaptivePredict(this.tokenStream, 191, this.context)) {
                case 1:
                  {
                    this.state = 2226;
                    this.definitionBodyItem();
                  }
                  break;
                case 2:
                  {
                    this.state = 2227;
                    this.typeBodyElement();
                  }
                  break;
                case 3:
                  {
                    this.state = 2228;
                    this.returnFeatureMember();
                  }
                  break;
              }
            }
          }
          this.state = 2233;
          this.errorHandler.sync(this);
          alternative = this.interpreter.adaptivePredict(this.tokenStream, 192, this.context);
        }
        this.state = 2235;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 8 || _la === 20 || (_la - 42 & ~31) === 0 && (1 << _la - 42 & 12582913) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 1414791685) !== 0 || (_la - 107 & ~31) === 0 && (1 << _la - 107 & 245763) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1073153) !== 0 || (_la - 191 & ~31) === 0 && (1 << _la - 191 & 4236772773) !== 0 || _la === 223) {
          {
            this.state = 2234;
            this.resultExpressionMember();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  returnFeatureMember() {
    let localContext = new ReturnFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 286, _SysMLv2Parser.RULE_returnFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2237;
        this.memberPrefix();
        this.state = 2238;
        this.match(_SysMLv2Parser.RETURN);
        this.state = 2239;
        this.featureElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  resultExpressionMember() {
    let localContext = new ResultExpressionMemberContext(this.context, this.state);
    this.enterRule(localContext, 288, _SysMLv2Parser.RULE_resultExpressionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2241;
        this.memberPrefix();
        this.state = 2242;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  expression() {
    let localContext = new ExpressionContext(this.context, this.state);
    this.enterRule(localContext, 290, _SysMLv2Parser.RULE_expression);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2244;
        this.featurePrefix();
        this.state = 2245;
        this.match(_SysMLv2Parser.EXPR);
        this.state = 2246;
        this.featureDeclaration();
        this.state = 2248;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 2247;
            this.valuePart();
          }
        }
        this.state = 2250;
        this.functionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  predicate() {
    let localContext = new PredicateContext(this.context, this.state);
    this.enterRule(localContext, 292, _SysMLv2Parser.RULE_predicate);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2252;
        this.typePrefix();
        this.state = 2253;
        this.match(_SysMLv2Parser.PREDICATE);
        this.state = 2254;
        this.classifierDeclaration();
        this.state = 2255;
        this.functionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  booleanExpression() {
    let localContext = new BooleanExpressionContext(this.context, this.state);
    this.enterRule(localContext, 294, _SysMLv2Parser.RULE_booleanExpression);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2257;
        this.featurePrefix();
        this.state = 2258;
        this.match(_SysMLv2Parser.BOOL);
        this.state = 2259;
        this.featureDeclaration();
        this.state = 2261;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 2260;
            this.valuePart();
          }
        }
        this.state = 2263;
        this.functionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  invariant() {
    let localContext = new InvariantContext(this.context, this.state);
    this.enterRule(localContext, 296, _SysMLv2Parser.RULE_invariant);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2265;
        this.featurePrefix();
        this.state = 2266;
        this.match(_SysMLv2Parser.INV);
        this.state = 2268;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 64 || _la === 156) {
          {
            this.state = 2267;
            _la = this.tokenStream.LA(1);
            if (!(_la === 64 || _la === 156)) {
              this.errorHandler.recoverInline(this);
            } else {
              this.errorHandler.reportMatch(this);
              this.consume();
            }
          }
        }
        this.state = 2270;
        this.featureDeclaration();
        this.state = 2272;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 2271;
            this.valuePart();
          }
        }
        this.state = 2274;
        this.functionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureChainMember() {
    let localContext = new FeatureChainMemberContext(this.context, this.state);
    this.enterRule(localContext, 298, _SysMLv2Parser.RULE_featureChainMember);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2276;
        this.qualifiedName();
        this.state = 2281;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 2277;
              this.match(_SysMLv2Parser.DOT);
              this.state = 2278;
              this.qualifiedName();
            }
          }
          this.state = 2283;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interaction() {
    let localContext = new InteractionContext(this.context, this.state);
    this.enterRule(localContext, 300, _SysMLv2Parser.RULE_interaction);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2284;
        this.typePrefix();
        this.state = 2285;
        this.match(_SysMLv2Parser.INTERACTION);
        this.state = 2286;
        this.classifierDeclaration();
        this.state = 2287;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flow() {
    let localContext = new FlowContext(this.context, this.state);
    this.enterRule(localContext, 302, _SysMLv2Parser.RULE_flow);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2289;
        this.featurePrefix();
        this.state = 2290;
        this.match(_SysMLv2Parser.FLOW);
        this.state = 2291;
        this.flowDeclaration();
        this.state = 2292;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  successionFlow() {
    let localContext = new SuccessionFlowContext(this.context, this.state);
    this.enterRule(localContext, 304, _SysMLv2Parser.RULE_successionFlow);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2294;
        this.featurePrefix();
        this.state = 2295;
        this.match(_SysMLv2Parser.SUCCESSION);
        this.state = 2296;
        this.match(_SysMLv2Parser.FLOW);
        this.state = 2297;
        this.flowDeclaration();
        this.state = 2298;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flowDeclaration() {
    let localContext = new FlowDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 306, _SysMLv2Parser.RULE_flowDeclaration);
    let _la;
    try {
      this.state = 2339;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 207, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2300;
            this.featureDeclaration();
            this.state = 2302;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 46 || _la === 184 || _la === 207) {
              {
                this.state = 2301;
                this.valuePart();
              }
            }
            this.state = 2306;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 111) {
              {
                this.state = 2304;
                this.match(_SysMLv2Parser.OF);
                this.state = 2305;
                this.payloadFeatureMember();
              }
            }
            this.state = 2313;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 74) {
              {
                this.state = 2308;
                this.match(_SysMLv2Parser.FROM);
                this.state = 2309;
                this.flowEndMember();
                this.state = 2310;
                this.match(_SysMLv2Parser.TO);
                this.state = 2311;
                this.flowEndMember();
              }
            }
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2316;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 8) {
              {
                this.state = 2315;
                this.match(_SysMLv2Parser.ALL);
              }
            }
            this.state = 2318;
            this.flowEndMember();
            this.state = 2319;
            this.match(_SysMLv2Parser.TO);
            this.state = 2320;
            this.flowEndMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2323;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 2322;
                this.usageDeclaration();
              }
            }
            this.state = 2326;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 46 || _la === 184 || _la === 207) {
              {
                this.state = 2325;
                this.valuePart();
              }
            }
            this.state = 2330;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 111) {
              {
                this.state = 2328;
                this.match(_SysMLv2Parser.OF);
                this.state = 2329;
                this.flowPayloadFeatureMember();
              }
            }
            this.state = 2337;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 74) {
              {
                this.state = 2332;
                this.match(_SysMLv2Parser.FROM);
                this.state = 2333;
                this.flowEndMember();
                this.state = 2334;
                this.match(_SysMLv2Parser.TO);
                this.state = 2335;
                this.flowEndMember();
              }
            }
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  payloadFeatureMember() {
    let localContext = new PayloadFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 308, _SysMLv2Parser.RULE_payloadFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2341;
        this.payloadFeature();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  payloadFeature() {
    let localContext = new PayloadFeatureContext(this.context, this.state);
    this.enterRule(localContext, 310, _SysMLv2Parser.RULE_payloadFeature);
    let _la;
    try {
      this.state = 2362;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 213, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2344;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
              {
                this.state = 2343;
                this.identification();
              }
            }
            this.state = 2346;
            this.valuePart();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2348;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 209, this.context)) {
              case 1:
                {
                  this.state = 2347;
                  this.identification();
                }
                break;
            }
            this.state = 2350;
            this.payloadFeatureSpecializationPart();
            this.state = 2352;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 46 || _la === 184 || _la === 207) {
              {
                this.state = 2351;
                this.valuePart();
              }
            }
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2354;
            this.ownedFeatureTyping();
            this.state = 2356;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 211) {
              {
                this.state = 2355;
                this.ownedMultiplicity();
              }
            }
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2358;
            this.ownedMultiplicity();
            this.state = 2360;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 193 & ~31) === 0 && (1 << _la - 193 & 100663297) !== 0) {
              {
                this.state = 2359;
                this.ownedFeatureTyping();
              }
            }
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  payloadFeatureSpecializationPart() {
    let localContext = new PayloadFeatureSpecializationPartContext(this.context, this.state);
    this.enterRule(localContext, 312, _SysMLv2Parser.RULE_payloadFeatureSpecializationPart);
    let _la;
    try {
      let alternative;
      this.state = 2384;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.DEFINED:
        case _SysMLv2Parser.REDEFINES:
        case _SysMLv2Parser.REFERENCES:
        case _SysMLv2Parser.SUBSETS:
        case _SysMLv2Parser.TYPED:
        case _SysMLv2Parser.COLON_COLON_GT:
        case _SysMLv2Parser.COLON_GT_GT:
        case _SysMLv2Parser.COLON_GT:
        case _SysMLv2Parser.FAT_ARROW:
        case _SysMLv2Parser.COLON:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2365;
            this.errorHandler.sync(this);
            alternative = 1;
            do {
              switch (alternative) {
                case 1:
                  {
                    {
                      this.state = 2364;
                      this.featureSpecialization();
                    }
                  }
                  break;
                default:
                  throw new NoViableAltException(this);
              }
              this.state = 2367;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 214, this.context);
            } while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER);
            this.state = 2370;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 106 || _la === 113 || _la === 211) {
              {
                this.state = 2369;
                this.multiplicityPart();
              }
            }
            this.state = 2375;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 42 || _la === 47 || (_la - 125 & ~31) === 0 && (1 << _la - 125 & 8388617) !== 0 || (_la - 158 & ~31) === 0 && (1 << _la - 158 & 1208352769) !== 0 || _la === 204) {
              {
                {
                  this.state = 2372;
                  this.featureSpecialization();
                }
              }
              this.state = 2377;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
          }
          break;
        case _SysMLv2Parser.NONUNIQUE:
        case _SysMLv2Parser.ORDERED:
        case _SysMLv2Parser.LBRACK:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2378;
            this.multiplicityPart();
            this.state = 2380;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            do {
              {
                {
                  this.state = 2379;
                  this.featureSpecialization();
                }
              }
              this.state = 2382;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            } while (_la === 42 || _la === 47 || (_la - 125 & ~31) === 0 && (1 << _la - 125 & 8388617) !== 0 || (_la - 158 & ~31) === 0 && (1 << _la - 158 & 1208352769) !== 0 || _la === 204);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flowEndMember() {
    let localContext = new FlowEndMemberContext(this.context, this.state);
    this.enterRule(localContext, 314, _SysMLv2Parser.RULE_flowEndMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2386;
        this.flowEnd();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flowEnd() {
    let localContext = new FlowEndContext(this.context, this.state);
    this.enterRule(localContext, 316, _SysMLv2Parser.RULE_flowEnd);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2388;
        this.qualifiedName();
        this.state = 2393;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 202) {
          {
            {
              this.state = 2389;
              this.match(_SysMLv2Parser.DOT);
              this.state = 2390;
              this.qualifiedName();
            }
          }
          this.state = 2395;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  valuePart() {
    let localContext = new ValuePartContext(this.context, this.state);
    this.enterRule(localContext, 318, _SysMLv2Parser.RULE_valuePart);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2396;
        this.featureValue();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureValue() {
    let localContext = new FeatureValueContext(this.context, this.state);
    this.enterRule(localContext, 320, _SysMLv2Parser.RULE_featureValue);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2404;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.EQ:
            {
              this.state = 2398;
              this.match(_SysMLv2Parser.EQ);
            }
            break;
          case _SysMLv2Parser.COLON_EQ:
            {
              this.state = 2399;
              this.match(_SysMLv2Parser.COLON_EQ);
            }
            break;
          case _SysMLv2Parser.DEFAULT:
            {
              this.state = 2400;
              this.match(_SysMLv2Parser.DEFAULT);
              this.state = 2402;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 184 || _la === 207) {
                {
                  this.state = 2401;
                  _la = this.tokenStream.LA(1);
                  if (!(_la === 184 || _la === 207)) {
                    this.errorHandler.recoverInline(this);
                  } else {
                    this.errorHandler.reportMatch(this);
                    this.consume();
                  }
                }
              }
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 2406;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  multiplicity() {
    let localContext = new MultiplicityContext(this.context, this.state);
    this.enterRule(localContext, 322, _SysMLv2Parser.RULE_multiplicity);
    try {
      this.state = 2410;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 222, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2408;
            this.multiplicitySubset();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2409;
            this.multiplicityRange();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  multiplicitySubset() {
    let localContext = new MultiplicitySubsetContext(this.context, this.state);
    this.enterRule(localContext, 324, _SysMLv2Parser.RULE_multiplicitySubset);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2412;
        this.match(_SysMLv2Parser.MULTIPLICITY);
        this.state = 2414;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
          {
            this.state = 2413;
            this.identification();
          }
        }
        this.state = 2416;
        this.subsets();
        this.state = 2417;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  multiplicityRange() {
    let localContext = new MultiplicityRangeContext(this.context, this.state);
    this.enterRule(localContext, 326, _SysMLv2Parser.RULE_multiplicityRange);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2419;
        this.match(_SysMLv2Parser.MULTIPLICITY);
        this.state = 2421;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
          {
            this.state = 2420;
            this.identification();
          }
        }
        this.state = 2423;
        this.multiplicityBounds();
        this.state = 2424;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedMultiplicity() {
    let localContext = new OwnedMultiplicityContext(this.context, this.state);
    this.enterRule(localContext, 328, _SysMLv2Parser.RULE_ownedMultiplicity);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2426;
        this.ownedMultiplicityRange();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ownedMultiplicityRange() {
    let localContext = new OwnedMultiplicityRangeContext(this.context, this.state);
    this.enterRule(localContext, 330, _SysMLv2Parser.RULE_ownedMultiplicityRange);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2428;
        this.multiplicityBounds();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  multiplicityBounds() {
    let localContext = new MultiplicityBoundsContext(this.context, this.state);
    this.enterRule(localContext, 332, _SysMLv2Parser.RULE_multiplicityBounds);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2430;
        this.match(_SysMLv2Parser.LBRACK);
        this.state = 2434;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 225, this.context)) {
          case 1:
            {
              this.state = 2431;
              this.multiplicityExpressionMember();
              this.state = 2432;
              this.match(_SysMLv2Parser.DOT_DOT);
            }
            break;
        }
        this.state = 2436;
        this.multiplicityExpressionMember();
        this.state = 2437;
        this.match(_SysMLv2Parser.RBRACK);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  multiplicityExpressionMember() {
    let localContext = new MultiplicityExpressionMemberContext(this.context, this.state);
    this.enterRule(localContext, 334, _SysMLv2Parser.RULE_multiplicityExpressionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2441;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.FALSE:
          case _SysMLv2Parser.TRUE:
          case _SysMLv2Parser.STAR:
          case _SysMLv2Parser.DOUBLE_STRING:
          case _SysMLv2Parser.INTEGER:
          case _SysMLv2Parser.REAL:
            {
              this.state = 2439;
              this.literalExpression();
            }
            break;
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 2440;
              this.featureReferenceExpression();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metaclass() {
    let localContext = new MetaclassContext(this.context, this.state);
    this.enterRule(localContext, 336, _SysMLv2Parser.RULE_metaclass);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2443;
        this.typePrefix();
        this.state = 2444;
        this.match(_SysMLv2Parser.METACLASS);
        this.state = 2445;
        this.classifierDeclaration();
        this.state = 2446;
        this.typeBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  prefixMetadataAnnotation() {
    let localContext = new PrefixMetadataAnnotationContext(this.context, this.state);
    this.enterRule(localContext, 338, _SysMLv2Parser.RULE_prefixMetadataAnnotation);
    try {
      this.state = 2452;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 227, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2448;
            this.match(_SysMLv2Parser.HASH);
            this.state = 2449;
            this.prefixMetadataFeature();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2450;
            this.match(_SysMLv2Parser.HASH);
            this.state = 2451;
            this.prefixMetadataUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  prefixMetadataMember() {
    let localContext = new PrefixMetadataMemberContext(this.context, this.state);
    this.enterRule(localContext, 340, _SysMLv2Parser.RULE_prefixMetadataMember);
    try {
      this.state = 2458;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 228, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2454;
            this.match(_SysMLv2Parser.HASH);
            this.state = 2455;
            this.prefixMetadataFeature();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2456;
            this.match(_SysMLv2Parser.HASH);
            this.state = 2457;
            this.prefixMetadataUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  prefixMetadataFeature() {
    let localContext = new PrefixMetadataFeatureContext(this.context, this.state);
    this.enterRule(localContext, 342, _SysMLv2Parser.RULE_prefixMetadataFeature);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2460;
        this.ownedFeatureTyping();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataFeature() {
    let localContext = new MetadataFeatureContext(this.context, this.state);
    this.enterRule(localContext, 344, _SysMLv2Parser.RULE_metadataFeature);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2465;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2462;
              this.prefixMetadataMember();
            }
          }
          this.state = 2467;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2468;
        _la = this.tokenStream.LA(1);
        if (!(_la === 102 || _la === 210)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 2469;
        this.metadataFeatureDeclaration();
        this.state = 2479;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 1) {
          {
            this.state = 2470;
            this.match(_SysMLv2Parser.ABOUT);
            this.state = 2471;
            this.annotation();
            this.state = 2476;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 200) {
              {
                {
                  this.state = 2472;
                  this.match(_SysMLv2Parser.COMMA);
                  this.state = 2473;
                  this.annotation();
                }
              }
              this.state = 2478;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
          }
        }
        this.state = 2481;
        this.metadataBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataFeatureDeclaration() {
    let localContext = new MetadataFeatureDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 346, _SysMLv2Parser.RULE_metadataFeatureDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2491;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 234, this.context)) {
          case 1:
            {
              this.state = 2484;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
                {
                  this.state = 2483;
                  this.identification();
                }
              }
              this.state = 2489;
              this.errorHandler.sync(this);
              switch (this.tokenStream.LA(1)) {
                case _SysMLv2Parser.COLON:
                  {
                    this.state = 2486;
                    this.match(_SysMLv2Parser.COLON);
                  }
                  break;
                case _SysMLv2Parser.TYPED:
                  {
                    this.state = 2487;
                    this.match(_SysMLv2Parser.TYPED);
                    this.state = 2488;
                    this.match(_SysMLv2Parser.BY);
                  }
                  break;
                default:
                  throw new NoViableAltException(this);
              }
            }
            break;
        }
        this.state = 2493;
        this.ownedFeatureTyping();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataBody() {
    let localContext = new MetadataBodyContext(this.context, this.state);
    this.enterRule(localContext, 348, _SysMLv2Parser.RULE_metadataBody);
    let _la;
    try {
      this.state = 2515;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 238, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2495;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2496;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 2500;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1880162436) !== 0 || (_la - 33 & ~31) === 0 && (1 << _la - 33 & 2917893) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1904755717) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 1057226993) !== 0 || (_la - 131 & ~31) === 0 && (1 << _la - 131 & 335901825) !== 0 || (_la - 163 & ~31) === 0 && (1 << _la - 163 & 1610620929) !== 0 || (_la - 210 & ~31) === 0 && (1 << _la - 210 & 9089) !== 0) {
              {
                {
                  this.state = 2497;
                  this.metadataBodyElement();
                }
              }
              this.state = 2502;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 2503;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2504;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 2511;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1175981204) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 71370273) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1947878433) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 1599348849) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 134232075) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 3221242267) !== 0 || (_la - 210 & ~31) === 0 && (1 << _la - 210 & 8961) !== 0) {
              {
                this.state = 2509;
                this.errorHandler.sync(this);
                switch (this.interpreter.adaptivePredict(this.tokenStream, 236, this.context)) {
                  case 1:
                    {
                      this.state = 2505;
                      this.definitionMember();
                    }
                    break;
                  case 2:
                    {
                      this.state = 2506;
                      this.metadataBodyUsageMember();
                    }
                    break;
                  case 3:
                    {
                      this.state = 2507;
                      this.aliasMember();
                    }
                    break;
                  case 4:
                    {
                      this.state = 2508;
                      this.importRule();
                    }
                    break;
                }
              }
              this.state = 2513;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 2514;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataBodyElement() {
    let localContext = new MetadataBodyElementContext(this.context, this.state);
    this.enterRule(localContext, 350, _SysMLv2Parser.RULE_metadataBodyElement);
    try {
      this.state = 2521;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 239, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2517;
            this.nonFeatureMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2518;
            this.metadataBodyFeatureMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2519;
            this.aliasMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2520;
            this.importRule();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataBodyFeatureMember() {
    let localContext = new MetadataBodyFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 352, _SysMLv2Parser.RULE_metadataBodyFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2523;
        this.metadataBodyFeature();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataBodyFeature() {
    let localContext = new MetadataBodyFeatureContext(this.context, this.state);
    this.enterRule(localContext, 354, _SysMLv2Parser.RULE_metadataBodyFeature);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2526;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 240, this.context)) {
          case 1:
            {
              this.state = 2525;
              this.match(_SysMLv2Parser.FEATURE);
            }
            break;
        }
        this.state = 2529;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 125 || _la === 176) {
          {
            this.state = 2528;
            _la = this.tokenStream.LA(1);
            if (!(_la === 125 || _la === 176)) {
              this.errorHandler.recoverInline(this);
            } else {
              this.errorHandler.reportMatch(this);
              this.consume();
            }
          }
        }
        this.state = 2531;
        this.ownedRedefinition();
        this.state = 2533;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
          {
            this.state = 2532;
            this.featureSpecializationPart();
          }
        }
        this.state = 2536;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 2535;
            this.valuePart();
          }
        }
        this.state = 2538;
        this.metadataBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  package_() {
    let localContext = new PackageContext(this.context, this.state);
    this.enterRule(localContext, 356, _SysMLv2Parser.RULE_package);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2543;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2540;
              this.prefixMetadataMember();
            }
          }
          this.state = 2545;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2546;
        this.packageDeclaration();
        this.state = 2547;
        this.packageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  libraryPackage() {
    let localContext = new LibraryPackageContext(this.context, this.state);
    this.enterRule(localContext, 358, _SysMLv2Parser.RULE_libraryPackage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2550;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 141) {
          {
            this.state = 2549;
            this.match(_SysMLv2Parser.STANDARD);
          }
        }
        this.state = 2552;
        this.match(_SysMLv2Parser.LIBRARY);
        this.state = 2556;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2553;
              this.prefixMetadataMember();
            }
          }
          this.state = 2558;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2559;
        this.packageDeclaration();
        this.state = 2560;
        this.packageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  packageDeclaration() {
    let localContext = new PackageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 360, _SysMLv2Parser.RULE_packageDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2562;
        this.match(_SysMLv2Parser.PACKAGE);
        this.state = 2564;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
          {
            this.state = 2563;
            this.identification();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  packageBody() {
    let localContext = new PackageBodyContext(this.context, this.state);
    this.enterRule(localContext, 362, _SysMLv2Parser.RULE_packageBody);
    let _la;
    try {
      this.state = 2575;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2566;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2567;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 2571;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182289556) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490981169) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948238905) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 412367019) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458587) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 2568;
                  this.packageBodyElement();
                }
              }
              this.state = 2573;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 2574;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  elementFilterMember() {
    let localContext = new ElementFilterMemberContext(this.context, this.state);
    this.enterRule(localContext, 364, _SysMLv2Parser.RULE_elementFilterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2577;
        this.memberPrefix();
        this.state = 2578;
        this.match(_SysMLv2Parser.FILTER);
        this.state = 2579;
        this.ownedExpression(0);
        this.state = 2580;
        this.match(_SysMLv2Parser.SEMI);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  dependencyDeclaration() {
    let localContext = new DependencyDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 366, _SysMLv2Parser.RULE_dependencyDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2586;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 251, this.context)) {
          case 1:
            {
              this.state = 2583;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
                {
                  this.state = 2582;
                  this.identification();
                }
              }
              this.state = 2585;
              this.match(_SysMLv2Parser.FROM);
            }
            break;
        }
        this.state = 2588;
        this.qualifiedName();
        this.state = 2593;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 2589;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 2590;
              this.qualifiedName();
            }
          }
          this.state = 2595;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2596;
        this.match(_SysMLv2Parser.TO);
        this.state = 2597;
        this.qualifiedName();
        this.state = 2602;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 2598;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 2599;
              this.qualifiedName();
            }
          }
          this.state = 2604;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  annotatingMember() {
    let localContext = new AnnotatingMemberContext(this.context, this.state);
    this.enterRule(localContext, 368, _SysMLv2Parser.RULE_annotatingMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2605;
        this.annotatingElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  packageBodyElement() {
    let localContext = new PackageBodyElementContext(this.context, this.state);
    this.enterRule(localContext, 370, _SysMLv2Parser.RULE_packageBodyElement);
    try {
      this.state = 2611;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 254, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2607;
            this.packageMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2608;
            this.elementFilterMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2609;
            this.aliasMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2610;
            this.importRule();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  packageMember() {
    let localContext = new PackageMemberContext(this.context, this.state);
    this.enterRule(localContext, 372, _SysMLv2Parser.RULE_packageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2613;
        this.memberPrefix();
        this.state = 2616;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 255, this.context)) {
          case 1:
            {
              this.state = 2614;
              this.definitionElement();
            }
            break;
          case 2:
            {
              this.state = 2615;
              this.usageElement();
            }
            break;
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionElement() {
    let localContext = new DefinitionElementContext(this.context, this.state);
    this.enterRule(localContext, 374, _SysMLv2Parser.RULE_definitionElement);
    try {
      this.state = 2648;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 256, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2618;
            this.package_();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2619;
            this.libraryPackage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2620;
            this.annotatingElement();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2621;
            this.dependency();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 2622;
            this.attributeDefinition();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 2623;
            this.enumerationDefinition();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 2624;
            this.occurrenceDefinition();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 2625;
            this.individualDefinition();
          }
          break;
        case 9:
          this.enterOuterAlt(localContext, 9);
          {
            this.state = 2626;
            this.itemDefinition();
          }
          break;
        case 10:
          this.enterOuterAlt(localContext, 10);
          {
            this.state = 2627;
            this.partDefinition();
          }
          break;
        case 11:
          this.enterOuterAlt(localContext, 11);
          {
            this.state = 2628;
            this.connectionDefinition();
          }
          break;
        case 12:
          this.enterOuterAlt(localContext, 12);
          {
            this.state = 2629;
            this.flowDefinition();
          }
          break;
        case 13:
          this.enterOuterAlt(localContext, 13);
          {
            this.state = 2630;
            this.interfaceDefinition();
          }
          break;
        case 14:
          this.enterOuterAlt(localContext, 14);
          {
            this.state = 2631;
            this.portDefinition();
          }
          break;
        case 15:
          this.enterOuterAlt(localContext, 15);
          {
            this.state = 2632;
            this.actionDefinition();
          }
          break;
        case 16:
          this.enterOuterAlt(localContext, 16);
          {
            this.state = 2633;
            this.calculationDefinition();
          }
          break;
        case 17:
          this.enterOuterAlt(localContext, 17);
          {
            this.state = 2634;
            this.stateDefinition();
          }
          break;
        case 18:
          this.enterOuterAlt(localContext, 18);
          {
            this.state = 2635;
            this.constraintDefinition();
          }
          break;
        case 19:
          this.enterOuterAlt(localContext, 19);
          {
            this.state = 2636;
            this.requirementDefinition();
          }
          break;
        case 20:
          this.enterOuterAlt(localContext, 20);
          {
            this.state = 2637;
            this.concernDefinition();
          }
          break;
        case 21:
          this.enterOuterAlt(localContext, 21);
          {
            this.state = 2638;
            this.caseDefinition();
          }
          break;
        case 22:
          this.enterOuterAlt(localContext, 22);
          {
            this.state = 2639;
            this.analysisCaseDefinition();
          }
          break;
        case 23:
          this.enterOuterAlt(localContext, 23);
          {
            this.state = 2640;
            this.verificationCaseDefinition();
          }
          break;
        case 24:
          this.enterOuterAlt(localContext, 24);
          {
            this.state = 2641;
            this.useCaseDefinition();
          }
          break;
        case 25:
          this.enterOuterAlt(localContext, 25);
          {
            this.state = 2642;
            this.viewDefinition();
          }
          break;
        case 26:
          this.enterOuterAlt(localContext, 26);
          {
            this.state = 2643;
            this.viewpointDefinition();
          }
          break;
        case 27:
          this.enterOuterAlt(localContext, 27);
          {
            this.state = 2644;
            this.renderingDefinition();
          }
          break;
        case 28:
          this.enterOuterAlt(localContext, 28);
          {
            this.state = 2645;
            this.metadataDefinition();
          }
          break;
        case 29:
          this.enterOuterAlt(localContext, 29);
          {
            this.state = 2646;
            this.allocationDefinition();
          }
          break;
        case 30:
          this.enterOuterAlt(localContext, 30);
          {
            this.state = 2647;
            this.extendedDefinition();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  usageElement() {
    let localContext = new UsageElementContext(this.context, this.state);
    this.enterRule(localContext, 376, _SysMLv2Parser.RULE_usageElement);
    try {
      this.state = 2652;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 257, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2650;
            this.nonOccurrenceUsageElement();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2651;
            this.occurrenceUsageElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  basicDefinitionPrefix() {
    let localContext = new BasicDefinitionPrefixContext(this.context, this.state);
    this.enterRule(localContext, 378, _SysMLv2Parser.RULE_basicDefinitionPrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2654;
        _la = this.tokenStream.LA(1);
        if (!(_la === 2 || _la === 165)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionExtensionKeyword() {
    let localContext = new DefinitionExtensionKeywordContext(this.context, this.state);
    this.enterRule(localContext, 380, _SysMLv2Parser.RULE_definitionExtensionKeyword);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2656;
        this.prefixMetadataMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionPrefix() {
    let localContext = new DefinitionPrefixContext(this.context, this.state);
    this.enterRule(localContext, 382, _SysMLv2Parser.RULE_definitionPrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2659;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2 || _la === 165) {
          {
            this.state = 2658;
            this.basicDefinitionPrefix();
          }
        }
        this.state = 2664;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2661;
              this.definitionExtensionKeyword();
            }
          }
          this.state = 2666;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definition() {
    let localContext = new DefinitionContext(this.context, this.state);
    this.enterRule(localContext, 384, _SysMLv2Parser.RULE_definition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2667;
        this.definitionDeclaration();
        this.state = 2668;
        this.definitionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionDeclaration() {
    let localContext = new DefinitionDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 386, _SysMLv2Parser.RULE_definitionDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2671;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || (_la - 206 & ~31) === 0 && (1 << _la - 206 & 12289) !== 0) {
          {
            this.state = 2670;
            this.identification();
          }
        }
        this.state = 2674;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 139 || _la === 185) {
          {
            this.state = 2673;
            this.subclassificationPart();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionBody() {
    let localContext = new DefinitionBodyContext(this.context, this.state);
    this.enterRule(localContext, 388, _SysMLv2Parser.RULE_definitionBody);
    let _la;
    try {
      this.state = 2685;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2676;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2677;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 2681;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182289556) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490981169) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948238897) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 416561323) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458591) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 2678;
                  this.definitionBodyItem();
                }
              }
              this.state = 2683;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 2684;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionBodyItem() {
    let localContext = new DefinitionBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 390, _SysMLv2Parser.RULE_definitionBodyItem);
    let _la;
    try {
      this.state = 2703;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 266, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2687;
            this.importRule();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2688;
            this.memberPrefix();
            this.state = 2689;
            this.definitionBodyItemContent();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2692;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 152) {
              {
                this.state = 2691;
                this.sourceSuccessionMember();
              }
            }
            this.state = 2694;
            this.memberPrefix();
            this.state = 2695;
            this.endOccurrenceUsageElement();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2698;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 152) {
              {
                this.state = 2697;
                this.sourceSuccessionMember();
              }
            }
            this.state = 2700;
            this.memberPrefix();
            this.state = 2701;
            this.occurrenceUsageElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionBodyItemContent() {
    let localContext = new DefinitionBodyItemContentContext(this.context, this.state);
    this.enterRule(localContext, 392, _SysMLv2Parser.RULE_definitionBodyItemContent);
    let _la;
    try {
      this.state = 2723;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 269, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2705;
            this.match(_SysMLv2Parser.ALIAS);
            this.state = 2710;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 206) {
              {
                this.state = 2706;
                this.match(_SysMLv2Parser.LT);
                this.state = 2707;
                this.name();
                this.state = 2708;
                this.match(_SysMLv2Parser.GT);
              }
            }
            this.state = 2713;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || _la === 218 || _la === 219) {
              {
                this.state = 2712;
                this.name();
              }
            }
            this.state = 2715;
            this.match(_SysMLv2Parser.FOR);
            this.state = 2716;
            this.qualifiedName();
            this.state = 2717;
            this.relationshipBody();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2719;
            this.match(_SysMLv2Parser.VARIANT);
            this.state = 2720;
            this.variantUsageElement();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2721;
            this.definitionElement();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2722;
            this.nonOccurrenceUsageElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  definitionMember() {
    let localContext = new DefinitionMemberContext(this.context, this.state);
    this.enterRule(localContext, 394, _SysMLv2Parser.RULE_definitionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2725;
        this.memberPrefix();
        this.state = 2726;
        this.definitionElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  variantUsageMember() {
    let localContext = new VariantUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 396, _SysMLv2Parser.RULE_variantUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2728;
        this.memberPrefix();
        this.state = 2729;
        this.match(_SysMLv2Parser.VARIANT);
        this.state = 2730;
        this.variantUsageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nonOccurrenceUsageMember() {
    let localContext = new NonOccurrenceUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 398, _SysMLv2Parser.RULE_nonOccurrenceUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2732;
        this.memberPrefix();
        this.state = 2733;
        this.nonOccurrenceUsageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  structureUsageMember() {
    let localContext = new StructureUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 400, _SysMLv2Parser.RULE_structureUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2735;
        this.memberPrefix();
        this.state = 2736;
        this.structureUsageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  behaviorUsageMember() {
    let localContext = new BehaviorUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 402, _SysMLv2Parser.RULE_behaviorUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2738;
        this.memberPrefix();
        this.state = 2739;
        this.behaviorUsageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  refPrefix() {
    let localContext = new RefPrefixContext(this.context, this.state);
    this.enterRule(localContext, 404, _SysMLv2Parser.RULE_refPrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2742;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 80 || _la === 83 || _la === 114) {
          {
            this.state = 2741;
            this.featureDirection();
          }
        }
        this.state = 2745;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 49) {
          {
            this.state = 2744;
            this.match(_SysMLv2Parser.DERIVED);
          }
        }
        this.state = 2748;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2 || _la === 165) {
          {
            this.state = 2747;
            _la = this.tokenStream.LA(1);
            if (!(_la === 2 || _la === 165)) {
              this.errorHandler.recoverInline(this);
            } else {
              this.errorHandler.reportMatch(this);
              this.consume();
            }
          }
        }
        this.state = 2751;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 40) {
          {
            this.state = 2750;
            this.match(_SysMLv2Parser.CONSTANT);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  basicUsagePrefix() {
    let localContext = new BasicUsagePrefixContext(this.context, this.state);
    this.enterRule(localContext, 406, _SysMLv2Parser.RULE_basicUsagePrefix);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2753;
        this.refPrefix();
        this.state = 2755;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 274, this.context)) {
          case 1:
            {
              this.state = 2754;
              this.match(_SysMLv2Parser.REF);
            }
            break;
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  endUsagePrefix() {
    let localContext = new EndUsagePrefixContext(this.context, this.state);
    this.enterRule(localContext, 408, _SysMLv2Parser.RULE_endUsagePrefix);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2757;
        this.match(_SysMLv2Parser.END);
        this.state = 2758;
        this.ownedCrossFeatureMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  usageExtensionKeyword() {
    let localContext = new UsageExtensionKeywordContext(this.context, this.state);
    this.enterRule(localContext, 410, _SysMLv2Parser.RULE_usageExtensionKeyword);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2760;
        this.prefixMetadataMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  unextendedUsagePrefix() {
    let localContext = new UnextendedUsagePrefixContext(this.context, this.state);
    this.enterRule(localContext, 412, _SysMLv2Parser.RULE_unextendedUsagePrefix);
    try {
      this.state = 2764;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.END:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2762;
            this.endUsagePrefix();
          }
          break;
        case _SysMLv2Parser.ABSTRACT:
        case _SysMLv2Parser.ATTRIBUTE:
        case _SysMLv2Parser.BIND:
        case _SysMLv2Parser.BINDING:
        case _SysMLv2Parser.CONSTANT:
        case _SysMLv2Parser.DERIVED:
        case _SysMLv2Parser.ENUM:
        case _SysMLv2Parser.FIRST:
        case _SysMLv2Parser.IN:
        case _SysMLv2Parser.INOUT:
        case _SysMLv2Parser.OUT:
        case _SysMLv2Parser.REF:
        case _SysMLv2Parser.SUCCESSION:
        case _SysMLv2Parser.VARIATION:
        case _SysMLv2Parser.HASH:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2763;
            this.basicUsagePrefix();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  usagePrefix() {
    let localContext = new UsagePrefixContext(this.context, this.state);
    this.enterRule(localContext, 414, _SysMLv2Parser.RULE_usagePrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2766;
        this.unextendedUsagePrefix();
        this.state = 2770;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2767;
              this.usageExtensionKeyword();
            }
          }
          this.state = 2772;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  usage() {
    let localContext = new UsageContext(this.context, this.state);
    this.enterRule(localContext, 416, _SysMLv2Parser.RULE_usage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2774;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 2773;
            this.usageDeclaration();
          }
        }
        this.state = 2776;
        this.usageCompletion();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  usageDeclaration() {
    let localContext = new UsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 418, _SysMLv2Parser.RULE_usageDeclaration);
    try {
      this.state = 2783;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 279, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2778;
            this.identification();
            this.state = 2780;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 278, this.context)) {
              case 1:
                {
                  this.state = 2779;
                  this.featureSpecializationPart();
                }
                break;
            }
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2782;
            this.featureSpecializationPart();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  usageCompletion() {
    let localContext = new UsageCompletionContext(this.context, this.state);
    this.enterRule(localContext, 420, _SysMLv2Parser.RULE_usageCompletion);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2786;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 2785;
            this.valuePart();
          }
        }
        this.state = 2788;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  usageBody() {
    let localContext = new UsageBodyContext(this.context, this.state);
    this.enterRule(localContext, 422, _SysMLv2Parser.RULE_usageBody);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2790;
        this.definitionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  defaultReferenceUsage() {
    let localContext = new DefaultReferenceUsageContext(this.context, this.state);
    this.enterRule(localContext, 424, _SysMLv2Parser.RULE_defaultReferenceUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2792;
        this.refPrefix();
        this.state = 2793;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  referenceUsage() {
    let localContext = new ReferenceUsageContext(this.context, this.state);
    this.enterRule(localContext, 426, _SysMLv2Parser.RULE_referenceUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2797;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.END:
            {
              this.state = 2795;
              this.endUsagePrefix();
            }
            break;
          case _SysMLv2Parser.ABSTRACT:
          case _SysMLv2Parser.CONSTANT:
          case _SysMLv2Parser.DERIVED:
          case _SysMLv2Parser.IN:
          case _SysMLv2Parser.INOUT:
          case _SysMLv2Parser.OUT:
          case _SysMLv2Parser.REF:
          case _SysMLv2Parser.VARIATION:
            {
              this.state = 2796;
              this.refPrefix();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 2799;
        this.match(_SysMLv2Parser.REF);
        this.state = 2800;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  endFeatureUsage() {
    let localContext = new EndFeatureUsageContext(this.context, this.state);
    this.enterRule(localContext, 428, _SysMLv2Parser.RULE_endFeatureUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2802;
        this.endUsagePrefix();
        this.state = 2803;
        this.featureDeclaration();
        this.state = 2804;
        this.usageCompletion();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  variantReference() {
    let localContext = new VariantReferenceContext(this.context, this.state);
    this.enterRule(localContext, 430, _SysMLv2Parser.RULE_variantReference);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2806;
        this.ownedReferenceSubsetting();
        this.state = 2810;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 42 || _la === 47 || (_la - 125 & ~31) === 0 && (1 << _la - 125 & 8388617) !== 0 || (_la - 158 & ~31) === 0 && (1 << _la - 158 & 1208352769) !== 0 || _la === 204) {
          {
            {
              this.state = 2807;
              this.featureSpecialization();
            }
          }
          this.state = 2812;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2813;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nonOccurrenceUsageElement() {
    let localContext = new NonOccurrenceUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 432, _SysMLv2Parser.RULE_nonOccurrenceUsageElement);
    try {
      this.state = 2823;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 283, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2815;
            this.referenceUsage();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2816;
            this.endFeatureUsage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2817;
            this.attributeUsage();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2818;
            this.enumerationUsage();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 2819;
            this.bindingConnectorAsUsage();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 2820;
            this.successionAsUsage();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 2821;
            this.extendedUsage();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 2822;
            this.defaultReferenceUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  endOccurrenceUsageElement() {
    let localContext = new EndOccurrenceUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 434, _SysMLv2Parser.RULE_endOccurrenceUsageElement);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2825;
        this.match(_SysMLv2Parser.END);
        this.state = 2827;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 20 || _la === 42 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 16777297) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1064961) !== 0 || _la === 218 || _la === 219) {
          {
            this.state = 2826;
            this.name();
          }
        }
        this.state = 2830;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 211) {
          {
            this.state = 2829;
            this.ownedCrossMultiplicityMember();
          }
        }
        this.state = 2833;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 106) {
          {
            this.state = 2832;
            this.match(_SysMLv2Parser.NONUNIQUE);
          }
        }
        this.state = 2835;
        this.occurrenceUsageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  occurrenceUsageElement() {
    let localContext = new OccurrenceUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 436, _SysMLv2Parser.RULE_occurrenceUsageElement);
    try {
      this.state = 2839;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 287, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2837;
            this.structureUsageElement();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2838;
            this.behaviorUsageElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  structureUsageElement() {
    let localContext = new StructureUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 438, _SysMLv2Parser.RULE_structureUsageElement);
    try {
      this.state = 2856;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 288, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2841;
            this.occurrenceUsage();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2842;
            this.individualUsage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2843;
            this.portionUsage();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2844;
            this.eventOccurrenceUsage();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 2845;
            this.itemUsage();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 2846;
            this.partUsage();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 2847;
            this.viewUsage();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 2848;
            this.renderingUsage();
          }
          break;
        case 9:
          this.enterOuterAlt(localContext, 9);
          {
            this.state = 2849;
            this.portUsage();
          }
          break;
        case 10:
          this.enterOuterAlt(localContext, 10);
          {
            this.state = 2850;
            this.connectionUsage();
          }
          break;
        case 11:
          this.enterOuterAlt(localContext, 11);
          {
            this.state = 2851;
            this.interfaceUsage();
          }
          break;
        case 12:
          this.enterOuterAlt(localContext, 12);
          {
            this.state = 2852;
            this.allocationUsage();
          }
          break;
        case 13:
          this.enterOuterAlt(localContext, 13);
          {
            this.state = 2853;
            this.message();
          }
          break;
        case 14:
          this.enterOuterAlt(localContext, 14);
          {
            this.state = 2854;
            this.flowUsage();
          }
          break;
        case 15:
          this.enterOuterAlt(localContext, 15);
          {
            this.state = 2855;
            this.successionFlowUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  behaviorUsageElement() {
    let localContext = new BehaviorUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 440, _SysMLv2Parser.RULE_behaviorUsageElement);
    try {
      this.state = 2874;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 289, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2858;
            this.actionUsage();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2859;
            this.calculationUsage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2860;
            this.stateUsage();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2861;
            this.constraintUsage();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 2862;
            this.requirementUsage();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 2863;
            this.concernUsage();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 2864;
            this.caseUsage();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 2865;
            this.analysisCaseUsage();
          }
          break;
        case 9:
          this.enterOuterAlt(localContext, 9);
          {
            this.state = 2866;
            this.verificationCaseUsage();
          }
          break;
        case 10:
          this.enterOuterAlt(localContext, 10);
          {
            this.state = 2867;
            this.useCaseUsage();
          }
          break;
        case 11:
          this.enterOuterAlt(localContext, 11);
          {
            this.state = 2868;
            this.viewpointUsage();
          }
          break;
        case 12:
          this.enterOuterAlt(localContext, 12);
          {
            this.state = 2869;
            this.performActionUsage();
          }
          break;
        case 13:
          this.enterOuterAlt(localContext, 13);
          {
            this.state = 2870;
            this.exhibitStateUsage();
          }
          break;
        case 14:
          this.enterOuterAlt(localContext, 14);
          {
            this.state = 2871;
            this.includeUseCaseUsage();
          }
          break;
        case 15:
          this.enterOuterAlt(localContext, 15);
          {
            this.state = 2872;
            this.assertConstraintUsage();
          }
          break;
        case 16:
          this.enterOuterAlt(localContext, 16);
          {
            this.state = 2873;
            this.satisfyRequirementUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  variantUsageElement() {
    let localContext = new VariantUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 442, _SysMLv2Parser.RULE_variantUsageElement);
    try {
      this.state = 2897;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 290, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2876;
            this.variantReference();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2877;
            this.referenceUsage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 2878;
            this.attributeUsage();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 2879;
            this.bindingConnectorAsUsage();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 2880;
            this.successionAsUsage();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 2881;
            this.occurrenceUsage();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 2882;
            this.individualUsage();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 2883;
            this.portionUsage();
          }
          break;
        case 9:
          this.enterOuterAlt(localContext, 9);
          {
            this.state = 2884;
            this.eventOccurrenceUsage();
          }
          break;
        case 10:
          this.enterOuterAlt(localContext, 10);
          {
            this.state = 2885;
            this.itemUsage();
          }
          break;
        case 11:
          this.enterOuterAlt(localContext, 11);
          {
            this.state = 2886;
            this.partUsage();
          }
          break;
        case 12:
          this.enterOuterAlt(localContext, 12);
          {
            this.state = 2887;
            this.viewUsage();
          }
          break;
        case 13:
          this.enterOuterAlt(localContext, 13);
          {
            this.state = 2888;
            this.renderingUsage();
          }
          break;
        case 14:
          this.enterOuterAlt(localContext, 14);
          {
            this.state = 2889;
            this.portUsage();
          }
          break;
        case 15:
          this.enterOuterAlt(localContext, 15);
          {
            this.state = 2890;
            this.connectionUsage();
          }
          break;
        case 16:
          this.enterOuterAlt(localContext, 16);
          {
            this.state = 2891;
            this.interfaceUsage();
          }
          break;
        case 17:
          this.enterOuterAlt(localContext, 17);
          {
            this.state = 2892;
            this.allocationUsage();
          }
          break;
        case 18:
          this.enterOuterAlt(localContext, 18);
          {
            this.state = 2893;
            this.message();
          }
          break;
        case 19:
          this.enterOuterAlt(localContext, 19);
          {
            this.state = 2894;
            this.flowUsage();
          }
          break;
        case 20:
          this.enterOuterAlt(localContext, 20);
          {
            this.state = 2895;
            this.successionFlowUsage();
          }
          break;
        case 21:
          this.enterOuterAlt(localContext, 21);
          {
            this.state = 2896;
            this.behaviorUsageElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  subclassificationPart() {
    let localContext = new SubclassificationPartContext(this.context, this.state);
    this.enterRule(localContext, 444, _SysMLv2Parser.RULE_subclassificationPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2899;
        _la = this.tokenStream.LA(1);
        if (!(_la === 139 || _la === 185)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
        this.state = 2900;
        this.ownedSubclassification();
        this.state = 2905;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 2901;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 2902;
              this.ownedSubclassification();
            }
          }
          this.state = 2907;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  attributeDefinition() {
    let localContext = new AttributeDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 446, _SysMLv2Parser.RULE_attributeDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2908;
        this.definitionPrefix();
        this.state = 2909;
        this.match(_SysMLv2Parser.ATTRIBUTE);
        this.state = 2910;
        this.match(_SysMLv2Parser.DEF);
        this.state = 2911;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  attributeUsage() {
    let localContext = new AttributeUsageContext(this.context, this.state);
    this.enterRule(localContext, 448, _SysMLv2Parser.RULE_attributeUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2913;
        this.usagePrefix();
        this.state = 2914;
        this.match(_SysMLv2Parser.ATTRIBUTE);
        this.state = 2915;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  enumerationDefinition() {
    let localContext = new EnumerationDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 450, _SysMLv2Parser.RULE_enumerationDefinition);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2920;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2917;
              this.definitionExtensionKeyword();
            }
          }
          this.state = 2922;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2923;
        this.match(_SysMLv2Parser.ENUM);
        this.state = 2924;
        this.match(_SysMLv2Parser.DEF);
        this.state = 2925;
        this.definitionDeclaration();
        this.state = 2926;
        this.enumerationBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  enumerationBody() {
    let localContext = new EnumerationBodyContext(this.context, this.state);
    this.enterRule(localContext, 452, _SysMLv2Parser.RULE_enumerationBody);
    let _la;
    try {
      this.state = 2938;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 2928;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 2929;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 2934;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 205521921) !== 0 || (_la - 54 & ~31) === 0 && (1 << _la - 54 & 1075841041) !== 0 || (_la - 93 & ~31) === 0 && (1 << _la - 93 & 4027590421) !== 0 || (_la - 125 & ~31) === 0 && (1 << _la - 125 & 8650825) !== 0 || (_la - 157 & ~31) === 0 && (1 << _la - 157 & 2550923331) !== 0 || (_la - 192 & ~31) === 0 && (1 << _la - 192 & 2353852417) !== 0) {
              {
                this.state = 2932;
                this.errorHandler.sync(this);
                switch (this.interpreter.adaptivePredict(this.tokenStream, 293, this.context)) {
                  case 1:
                    {
                      this.state = 2930;
                      this.annotatingMember();
                    }
                    break;
                  case 2:
                    {
                      this.state = 2931;
                      this.enumerationUsageMember();
                    }
                    break;
                }
              }
              this.state = 2936;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 2937;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  enumerationUsageMember() {
    let localContext = new EnumerationUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 454, _SysMLv2Parser.RULE_enumerationUsageMember);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2943;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2940;
              this.prefixMetadataMember();
            }
          }
          this.state = 2945;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2946;
        this.memberPrefix();
        this.state = 2947;
        this.enumeratedValue();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  enumeratedValue() {
    let localContext = new EnumeratedValueContext(this.context, this.state);
    this.enterRule(localContext, 456, _SysMLv2Parser.RULE_enumeratedValue);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2950;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 58) {
          {
            this.state = 2949;
            this.match(_SysMLv2Parser.ENUM);
          }
        }
        this.state = 2952;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  enumerationUsage() {
    let localContext = new EnumerationUsageContext(this.context, this.state);
    this.enterRule(localContext, 458, _SysMLv2Parser.RULE_enumerationUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2954;
        this.usagePrefix();
        this.state = 2955;
        this.match(_SysMLv2Parser.ENUM);
        this.state = 2956;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  occurrenceDefinitionPrefix() {
    let localContext = new OccurrenceDefinitionPrefixContext(this.context, this.state);
    this.enterRule(localContext, 460, _SysMLv2Parser.RULE_occurrenceDefinitionPrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2959;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2 || _la === 165) {
          {
            this.state = 2958;
            this.basicDefinitionPrefix();
          }
        }
        this.state = 2963;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 82) {
          {
            this.state = 2961;
            this.match(_SysMLv2Parser.INDIVIDUAL);
            this.state = 2962;
            this.emptyMultiplicityMember();
          }
        }
        this.state = 2968;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2965;
              this.definitionExtensionKeyword();
            }
          }
          this.state = 2970;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  occurrenceDefinition() {
    let localContext = new OccurrenceDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 462, _SysMLv2Parser.RULE_occurrenceDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2971;
        this.occurrenceDefinitionPrefix();
        this.state = 2972;
        this.match(_SysMLv2Parser.OCCURRENCE);
        this.state = 2973;
        this.match(_SysMLv2Parser.DEF);
        this.state = 2974;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  individualDefinition() {
    let localContext = new IndividualDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 464, _SysMLv2Parser.RULE_individualDefinition);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2977;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2 || _la === 165) {
          {
            this.state = 2976;
            this.basicDefinitionPrefix();
          }
        }
        this.state = 2979;
        this.match(_SysMLv2Parser.INDIVIDUAL);
        this.state = 2983;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2980;
              this.definitionExtensionKeyword();
            }
          }
          this.state = 2985;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 2986;
        this.match(_SysMLv2Parser.DEF);
        this.state = 2987;
        this.definition();
        this.state = 2988;
        this.emptyMultiplicityMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  emptyMultiplicityMember() {
    let localContext = new EmptyMultiplicityMemberContext(this.context, this.state);
    this.enterRule(localContext, 466, _SysMLv2Parser.RULE_emptyMultiplicityMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2990;
        this.emptyMultiplicity_();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  occurrenceUsagePrefix() {
    let localContext = new OccurrenceUsagePrefixContext(this.context, this.state);
    this.enterRule(localContext, 468, _SysMLv2Parser.RULE_occurrenceUsagePrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 2992;
        this.basicUsagePrefix();
        this.state = 2994;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 82) {
          {
            this.state = 2993;
            this.match(_SysMLv2Parser.INDIVIDUAL);
          }
        }
        this.state = 2997;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 137 || _la === 153) {
          {
            this.state = 2996;
            this.portionKind();
          }
        }
        this.state = 3002;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 2999;
              this.usageExtensionKeyword();
            }
          }
          this.state = 3004;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  occurrenceUsage() {
    let localContext = new OccurrenceUsageContext(this.context, this.state);
    this.enterRule(localContext, 470, _SysMLv2Parser.RULE_occurrenceUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3005;
        this.occurrenceUsagePrefix();
        this.state = 3006;
        this.match(_SysMLv2Parser.OCCURRENCE);
        this.state = 3007;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  individualUsage() {
    let localContext = new IndividualUsageContext(this.context, this.state);
    this.enterRule(localContext, 472, _SysMLv2Parser.RULE_individualUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3009;
        this.basicUsagePrefix();
        this.state = 3010;
        this.match(_SysMLv2Parser.INDIVIDUAL);
        this.state = 3014;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 3011;
              this.usageExtensionKeyword();
            }
          }
          this.state = 3016;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 3017;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  portionUsage() {
    let localContext = new PortionUsageContext(this.context, this.state);
    this.enterRule(localContext, 474, _SysMLv2Parser.RULE_portionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3019;
        this.basicUsagePrefix();
        this.state = 3021;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 82) {
          {
            this.state = 3020;
            this.match(_SysMLv2Parser.INDIVIDUAL);
          }
        }
        this.state = 3023;
        this.portionKind();
        this.state = 3027;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 3024;
              this.usageExtensionKeyword();
            }
          }
          this.state = 3029;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 3030;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  portionKind() {
    let localContext = new PortionKindContext(this.context, this.state);
    this.enterRule(localContext, 476, _SysMLv2Parser.RULE_portionKind);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3032;
        _la = this.tokenStream.LA(1);
        if (!(_la === 137 || _la === 153)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  eventOccurrenceUsage() {
    let localContext = new EventOccurrenceUsageContext(this.context, this.state);
    this.enterRule(localContext, 478, _SysMLv2Parser.RULE_eventOccurrenceUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3034;
        this.occurrenceUsagePrefix();
        this.state = 3035;
        this.match(_SysMLv2Parser.EVENT);
        this.state = 3044;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 3036;
              this.ownedReferenceSubsetting();
              this.state = 3038;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
                {
                  this.state = 3037;
                  this.featureSpecializationPart();
                }
              }
            }
            break;
          case _SysMLv2Parser.OCCURRENCE:
            {
              this.state = 3040;
              this.match(_SysMLv2Parser.OCCURRENCE);
              this.state = 3042;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
                {
                  this.state = 3041;
                  this.usageDeclaration();
                }
              }
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3046;
        this.usageCompletion();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sourceSuccessionMember() {
    let localContext = new SourceSuccessionMemberContext(this.context, this.state);
    this.enterRule(localContext, 480, _SysMLv2Parser.RULE_sourceSuccessionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3048;
        this.match(_SysMLv2Parser.THEN);
        this.state = 3049;
        this.sourceSuccession();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sourceSuccession() {
    let localContext = new SourceSuccessionContext(this.context, this.state);
    this.enterRule(localContext, 482, _SysMLv2Parser.RULE_sourceSuccession);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3051;
        this.sourceEndMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sourceEndMember() {
    let localContext = new SourceEndMemberContext(this.context, this.state);
    this.enterRule(localContext, 484, _SysMLv2Parser.RULE_sourceEndMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3053;
        this.sourceEnd();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sourceEnd() {
    let localContext = new SourceEndContext(this.context, this.state);
    this.enterRule(localContext, 486, _SysMLv2Parser.RULE_sourceEnd);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3056;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 312, this.context)) {
          case 1:
            {
              this.state = 3055;
              this.ownedMultiplicity();
            }
            break;
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  itemDefinition() {
    let localContext = new ItemDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 488, _SysMLv2Parser.RULE_itemDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3058;
        this.occurrenceDefinitionPrefix();
        this.state = 3059;
        this.match(_SysMLv2Parser.ITEM);
        this.state = 3060;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3061;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  itemUsage() {
    let localContext = new ItemUsageContext(this.context, this.state);
    this.enterRule(localContext, 490, _SysMLv2Parser.RULE_itemUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3063;
        this.occurrenceUsagePrefix();
        this.state = 3064;
        this.match(_SysMLv2Parser.ITEM);
        this.state = 3065;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  partDefinition() {
    let localContext = new PartDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 492, _SysMLv2Parser.RULE_partDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3067;
        this.occurrenceDefinitionPrefix();
        this.state = 3068;
        this.match(_SysMLv2Parser.PART);
        this.state = 3069;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3070;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  partUsage() {
    let localContext = new PartUsageContext(this.context, this.state);
    this.enterRule(localContext, 494, _SysMLv2Parser.RULE_partUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3072;
        this.occurrenceUsagePrefix();
        this.state = 3073;
        this.match(_SysMLv2Parser.PART);
        this.state = 3074;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  portDefinition() {
    let localContext = new PortDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 496, _SysMLv2Parser.RULE_portDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3076;
        this.definitionPrefix();
        this.state = 3077;
        this.match(_SysMLv2Parser.PORT);
        this.state = 3078;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3079;
        this.definition();
        this.state = 3080;
        this.conjugatedPortDefinitionMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  conjugatedPortDefinitionMember() {
    let localContext = new ConjugatedPortDefinitionMemberContext(this.context, this.state);
    this.enterRule(localContext, 498, _SysMLv2Parser.RULE_conjugatedPortDefinitionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3082;
        this.conjugatedPortDefinition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  conjugatedPortDefinition() {
    let localContext = new ConjugatedPortDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 500, _SysMLv2Parser.RULE_conjugatedPortDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3084;
        this.portConjugation();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  portUsage() {
    let localContext = new PortUsageContext(this.context, this.state);
    this.enterRule(localContext, 502, _SysMLv2Parser.RULE_portUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3086;
        this.occurrenceUsagePrefix();
        this.state = 3087;
        this.match(_SysMLv2Parser.PORT);
        this.state = 3088;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  conjugatedPortTyping() {
    let localContext = new ConjugatedPortTypingContext(this.context, this.state);
    this.enterRule(localContext, 504, _SysMLv2Parser.RULE_conjugatedPortTyping);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3090;
        this.match(_SysMLv2Parser.TILDE);
        this.state = 3091;
        this.qualifiedName();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  connectionDefinition() {
    let localContext = new ConnectionDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 506, _SysMLv2Parser.RULE_connectionDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3093;
        this.occurrenceDefinitionPrefix();
        this.state = 3094;
        this.match(_SysMLv2Parser.CONNECTION);
        this.state = 3095;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3096;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  connectionUsage() {
    let localContext = new ConnectionUsageContext(this.context, this.state);
    this.enterRule(localContext, 508, _SysMLv2Parser.RULE_connectionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3098;
        this.occurrenceUsagePrefix();
        this.state = 3112;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.CONNECTION:
            {
              this.state = 3099;
              this.match(_SysMLv2Parser.CONNECTION);
              this.state = 3101;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
                {
                  this.state = 3100;
                  this.usageDeclaration();
                }
              }
              this.state = 3104;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 46 || _la === 184 || _la === 207) {
                {
                  this.state = 3103;
                  this.valuePart();
                }
              }
              this.state = 3108;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 36) {
                {
                  this.state = 3106;
                  this.match(_SysMLv2Parser.CONNECT);
                  this.state = 3107;
                  this.connectorPart();
                }
              }
            }
            break;
          case _SysMLv2Parser.CONNECT:
            {
              this.state = 3110;
              this.match(_SysMLv2Parser.CONNECT);
              this.state = 3111;
              this.connectorPart();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3114;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  connectorPart() {
    let localContext = new ConnectorPartContext(this.context, this.state);
    this.enterRule(localContext, 510, _SysMLv2Parser.RULE_connectorPart);
    try {
      this.state = 3118;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.DOLLAR:
        case _SysMLv2Parser.LBRACK:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3116;
            this.binaryConnectorPart();
          }
          break;
        case _SysMLv2Parser.LPAREN:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3117;
            this.naryConnectorPart();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  binaryConnectorPart() {
    let localContext = new BinaryConnectorPartContext(this.context, this.state);
    this.enterRule(localContext, 512, _SysMLv2Parser.RULE_binaryConnectorPart);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3120;
        this.connectorEndMember();
        this.state = 3121;
        this.match(_SysMLv2Parser.TO);
        this.state = 3122;
        this.connectorEndMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  naryConnectorPart() {
    let localContext = new NaryConnectorPartContext(this.context, this.state);
    this.enterRule(localContext, 514, _SysMLv2Parser.RULE_naryConnectorPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3124;
        this.match(_SysMLv2Parser.LPAREN);
        this.state = 3125;
        this.connectorEndMember();
        this.state = 3126;
        this.match(_SysMLv2Parser.COMMA);
        this.state = 3127;
        this.connectorEndMember();
        this.state = 3132;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 3128;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 3129;
              this.connectorEndMember();
            }
          }
          this.state = 3134;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 3135;
        this.match(_SysMLv2Parser.RPAREN);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  bindingConnectorAsUsage() {
    let localContext = new BindingConnectorAsUsageContext(this.context, this.state);
    this.enterRule(localContext, 516, _SysMLv2Parser.RULE_bindingConnectorAsUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3137;
        this.usagePrefix();
        this.state = 3142;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 22) {
          {
            this.state = 3138;
            this.match(_SysMLv2Parser.BINDING);
            this.state = 3140;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 3139;
                this.usageDeclaration();
              }
            }
          }
        }
        this.state = 3144;
        this.match(_SysMLv2Parser.BIND);
        this.state = 3145;
        this.connectorEndMember();
        this.state = 3146;
        this.match(_SysMLv2Parser.EQ);
        this.state = 3147;
        this.connectorEndMember();
        this.state = 3148;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  successionAsUsage() {
    let localContext = new SuccessionAsUsageContext(this.context, this.state);
    this.enterRule(localContext, 518, _SysMLv2Parser.RULE_successionAsUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3150;
        this.usagePrefix();
        this.state = 3155;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 150) {
          {
            this.state = 3151;
            this.match(_SysMLv2Parser.SUCCESSION);
            this.state = 3153;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 3152;
                this.usageDeclaration();
              }
            }
          }
        }
        this.state = 3157;
        this.match(_SysMLv2Parser.FIRST);
        this.state = 3158;
        this.connectorEndMember();
        this.state = 3159;
        this.match(_SysMLv2Parser.THEN);
        this.state = 3160;
        this.connectorEndMember();
        this.state = 3161;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceDefinition() {
    let localContext = new InterfaceDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 520, _SysMLv2Parser.RULE_interfaceDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3163;
        this.occurrenceDefinitionPrefix();
        this.state = 3164;
        this.match(_SysMLv2Parser.INTERFACE);
        this.state = 3165;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3166;
        this.definitionDeclaration();
        this.state = 3167;
        this.interfaceBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceBody() {
    let localContext = new InterfaceBodyContext(this.context, this.state);
    this.enterRule(localContext, 522, _SysMLv2Parser.RULE_interfaceBody);
    let _la;
    try {
      this.state = 3178;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3169;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3170;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3174;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1181240980) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490930993) !== 0 || (_la - 69 & ~31) === 0 && (1 << _la - 69 & 1195473923) !== 0 || (_la - 102 & ~31) === 0 && (1 << _la - 102 & 2993926433) !== 0 || (_la - 135 & ~31) === 0 && (1 << _la - 135 & 3892740293) !== 0 || (_la - 169 & ~31) === 0 && (1 << _la - 169 & 8388611) !== 0 || _la === 210 || _la === 223) {
              {
                {
                  this.state = 3171;
                  this.interfaceBodyItem();
                }
              }
              this.state = 3176;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3177;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceBodyItem() {
    let localContext = new InterfaceBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 524, _SysMLv2Parser.RULE_interfaceBodyItem);
    let _la;
    try {
      this.state = 3189;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 326, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3180;
            this.definitionMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3181;
            this.variantUsageMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3182;
            this.interfaceNonOccurrenceUsageMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3184;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 152) {
              {
                this.state = 3183;
                this.sourceSuccessionMember();
              }
            }
            this.state = 3186;
            this.interfaceOccurrenceUsageMember();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 3187;
            this.aliasMember();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 3188;
            this.importRule();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceNonOccurrenceUsageMember() {
    let localContext = new InterfaceNonOccurrenceUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 526, _SysMLv2Parser.RULE_interfaceNonOccurrenceUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3191;
        this.memberPrefix();
        this.state = 3192;
        this.interfaceNonOccurrenceUsageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceNonOccurrenceUsageElement() {
    let localContext = new InterfaceNonOccurrenceUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 528, _SysMLv2Parser.RULE_interfaceNonOccurrenceUsageElement);
    try {
      this.state = 3199;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 327, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3194;
            this.referenceUsage();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3195;
            this.attributeUsage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3196;
            this.enumerationUsage();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3197;
            this.bindingConnectorAsUsage();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 3198;
            this.successionAsUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceOccurrenceUsageMember() {
    let localContext = new InterfaceOccurrenceUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 530, _SysMLv2Parser.RULE_interfaceOccurrenceUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3201;
        this.memberPrefix();
        this.state = 3202;
        this.interfaceOccurrenceUsageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceOccurrenceUsageElement() {
    let localContext = new InterfaceOccurrenceUsageElementContext(this.context, this.state);
    this.enterRule(localContext, 532, _SysMLv2Parser.RULE_interfaceOccurrenceUsageElement);
    try {
      this.state = 3208;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 328, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3204;
            this.defaultInterfaceEnd();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3205;
            this.endOccurrenceUsageElement();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3206;
            this.structureUsageElement();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3207;
            this.behaviorUsageElement();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  defaultInterfaceEnd() {
    let localContext = new DefaultInterfaceEndContext(this.context, this.state);
    this.enterRule(localContext, 534, _SysMLv2Parser.RULE_defaultInterfaceEnd);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3210;
        this.match(_SysMLv2Parser.END);
        this.state = 3211;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceUsage() {
    let localContext = new InterfaceUsageContext(this.context, this.state);
    this.enterRule(localContext, 536, _SysMLv2Parser.RULE_interfaceUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3213;
        this.occurrenceUsagePrefix();
        this.state = 3214;
        this.match(_SysMLv2Parser.INTERFACE);
        this.state = 3215;
        this.interfaceUsageDeclaration();
        this.state = 3216;
        this.interfaceBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceUsageDeclaration() {
    let localContext = new InterfaceUsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 538, _SysMLv2Parser.RULE_interfaceUsageDeclaration);
    let _la;
    try {
      this.state = 3229;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 332, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3219;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 3218;
                this.usageDeclaration();
              }
            }
            this.state = 3222;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 46 || _la === 184 || _la === 207) {
              {
                this.state = 3221;
                this.valuePart();
              }
            }
            this.state = 3226;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 36) {
              {
                this.state = 3224;
                this.match(_SysMLv2Parser.CONNECT);
                this.state = 3225;
                this.interfacePart();
              }
            }
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3228;
            this.interfacePart();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfacePart() {
    let localContext = new InterfacePartContext(this.context, this.state);
    this.enterRule(localContext, 540, _SysMLv2Parser.RULE_interfacePart);
    try {
      this.state = 3233;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.DOLLAR:
        case _SysMLv2Parser.LBRACK:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3231;
            this.binaryInterfacePart();
          }
          break;
        case _SysMLv2Parser.LPAREN:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3232;
            this.naryInterfacePart();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  binaryInterfacePart() {
    let localContext = new BinaryInterfacePartContext(this.context, this.state);
    this.enterRule(localContext, 542, _SysMLv2Parser.RULE_binaryInterfacePart);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3235;
        this.interfaceEndMember();
        this.state = 3236;
        this.match(_SysMLv2Parser.TO);
        this.state = 3237;
        this.interfaceEndMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  naryInterfacePart() {
    let localContext = new NaryInterfacePartContext(this.context, this.state);
    this.enterRule(localContext, 544, _SysMLv2Parser.RULE_naryInterfacePart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3239;
        this.match(_SysMLv2Parser.LPAREN);
        this.state = 3240;
        this.interfaceEndMember();
        this.state = 3241;
        this.match(_SysMLv2Parser.COMMA);
        this.state = 3242;
        this.interfaceEndMember();
        this.state = 3247;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 200) {
          {
            {
              this.state = 3243;
              this.match(_SysMLv2Parser.COMMA);
              this.state = 3244;
              this.interfaceEndMember();
            }
          }
          this.state = 3249;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 3250;
        this.match(_SysMLv2Parser.RPAREN);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceEndMember() {
    let localContext = new InterfaceEndMemberContext(this.context, this.state);
    this.enterRule(localContext, 546, _SysMLv2Parser.RULE_interfaceEndMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3252;
        this.interfaceEnd();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  interfaceEnd() {
    let localContext = new InterfaceEndContext(this.context, this.state);
    this.enterRule(localContext, 548, _SysMLv2Parser.RULE_interfaceEnd);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3255;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 211) {
          {
            this.state = 3254;
            this.ownedCrossMultiplicityMember();
          }
        }
        this.state = 3260;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 336, this.context)) {
          case 1:
            {
              this.state = 3257;
              this.name();
              this.state = 3258;
              _la = this.tokenStream.LA(1);
              if (!(_la === 128 || _la === 175)) {
                this.errorHandler.recoverInline(this);
              } else {
                this.errorHandler.reportMatch(this);
                this.consume();
              }
            }
            break;
        }
        this.state = 3262;
        this.ownedReferenceSubsetting();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  allocationDefinition() {
    let localContext = new AllocationDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 550, _SysMLv2Parser.RULE_allocationDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3264;
        this.occurrenceDefinitionPrefix();
        this.state = 3265;
        this.match(_SysMLv2Parser.ALLOCATION);
        this.state = 3266;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3267;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  allocationUsage() {
    let localContext = new AllocationUsageContext(this.context, this.state);
    this.enterRule(localContext, 552, _SysMLv2Parser.RULE_allocationUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3269;
        this.occurrenceUsagePrefix();
        this.state = 3270;
        this.allocationUsageDeclaration();
        this.state = 3271;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  allocationUsageDeclaration() {
    let localContext = new AllocationUsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 554, _SysMLv2Parser.RULE_allocationUsageDeclaration);
    let _la;
    try {
      this.state = 3283;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.ALLOCATION:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3273;
            this.match(_SysMLv2Parser.ALLOCATION);
            this.state = 3275;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 3274;
                this.usageDeclaration();
              }
            }
            this.state = 3279;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 9) {
              {
                this.state = 3277;
                this.match(_SysMLv2Parser.ALLOCATE);
                this.state = 3278;
                this.connectorPart();
              }
            }
          }
          break;
        case _SysMLv2Parser.ALLOCATE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3281;
            this.match(_SysMLv2Parser.ALLOCATE);
            this.state = 3282;
            this.connectorPart();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flowDefinition() {
    let localContext = new FlowDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 556, _SysMLv2Parser.RULE_flowDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3285;
        this.occurrenceDefinitionPrefix();
        this.state = 3286;
        this.match(_SysMLv2Parser.FLOW);
        this.state = 3287;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3288;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  message() {
    let localContext = new MessageContext(this.context, this.state);
    this.enterRule(localContext, 558, _SysMLv2Parser.RULE_message);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3290;
        this.occurrenceUsagePrefix();
        this.state = 3291;
        this.match(_SysMLv2Parser.MESSAGE);
        this.state = 3292;
        this.messageDeclaration();
        this.state = 3293;
        this.definitionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  messageDeclaration() {
    let localContext = new MessageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 560, _SysMLv2Parser.RULE_messageDeclaration);
    let _la;
    try {
      this.state = 3316;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 344, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3296;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 3295;
                this.usageDeclaration();
              }
            }
            this.state = 3299;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 46 || _la === 184 || _la === 207) {
              {
                this.state = 3298;
                this.valuePart();
              }
            }
            this.state = 3303;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 111) {
              {
                this.state = 3301;
                this.match(_SysMLv2Parser.OF);
                this.state = 3302;
                this.flowPayloadFeatureMember();
              }
            }
            this.state = 3310;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 74) {
              {
                this.state = 3305;
                this.match(_SysMLv2Parser.FROM);
                this.state = 3306;
                this.messageEventMember();
                this.state = 3307;
                this.match(_SysMLv2Parser.TO);
                this.state = 3308;
                this.messageEventMember();
              }
            }
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3312;
            this.messageEventMember();
            this.state = 3313;
            this.match(_SysMLv2Parser.TO);
            this.state = 3314;
            this.messageEventMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  messageEventMember() {
    let localContext = new MessageEventMemberContext(this.context, this.state);
    this.enterRule(localContext, 562, _SysMLv2Parser.RULE_messageEventMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3318;
        this.messageEvent();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  messageEvent() {
    let localContext = new MessageEventContext(this.context, this.state);
    this.enterRule(localContext, 564, _SysMLv2Parser.RULE_messageEvent);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3320;
        this.ownedReferenceSubsetting();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flowUsage() {
    let localContext = new FlowUsageContext(this.context, this.state);
    this.enterRule(localContext, 566, _SysMLv2Parser.RULE_flowUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3322;
        this.occurrenceUsagePrefix();
        this.state = 3323;
        this.match(_SysMLv2Parser.FLOW);
        this.state = 3324;
        this.flowDeclaration();
        this.state = 3325;
        this.definitionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  successionFlowUsage() {
    let localContext = new SuccessionFlowUsageContext(this.context, this.state);
    this.enterRule(localContext, 568, _SysMLv2Parser.RULE_successionFlowUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3327;
        this.occurrenceUsagePrefix();
        this.state = 3328;
        this.match(_SysMLv2Parser.SUCCESSION);
        this.state = 3329;
        this.match(_SysMLv2Parser.FLOW);
        this.state = 3330;
        this.flowDeclaration();
        this.state = 3331;
        this.definitionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flowPayloadFeatureMember() {
    let localContext = new FlowPayloadFeatureMemberContext(this.context, this.state);
    this.enterRule(localContext, 570, _SysMLv2Parser.RULE_flowPayloadFeatureMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3333;
        this.flowPayloadFeature();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  flowPayloadFeature() {
    let localContext = new FlowPayloadFeatureContext(this.context, this.state);
    this.enterRule(localContext, 572, _SysMLv2Parser.RULE_flowPayloadFeature);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3335;
        this.payloadFeature();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionDefinition() {
    let localContext = new ActionDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 574, _SysMLv2Parser.RULE_actionDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3337;
        this.occurrenceDefinitionPrefix();
        this.state = 3338;
        this.match(_SysMLv2Parser.ACTION);
        this.state = 3339;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3340;
        this.definitionDeclaration();
        this.state = 3341;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionBody() {
    let localContext = new ActionBodyContext(this.context, this.state);
    this.enterRule(localContext, 576, _SysMLv2Parser.RULE_actionBody);
    let _la;
    try {
      this.state = 3352;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3343;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3344;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3348;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182322332) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490985265) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 4229944561) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127799) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 418658539) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153459615) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 3345;
                  this.actionBodyItem();
                }
              }
              this.state = 3350;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3351;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionBodyItem() {
    let localContext = new ActionBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 578, _SysMLv2Parser.RULE_actionBodyItem);
    let _la;
    try {
      let alternative;
      this.state = 3373;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 350, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3354;
            this.nonBehaviorBodyItem();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3355;
            this.initialNodeMember();
            this.state = 3359;
            this.errorHandler.sync(this);
            alternative = this.interpreter.adaptivePredict(this.tokenStream, 347, this.context);
            while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
              if (alternative === 1) {
                {
                  {
                    this.state = 3356;
                    this.actionTargetSuccessionMember();
                  }
                }
              }
              this.state = 3361;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 347, this.context);
            }
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3363;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 152) {
              {
                this.state = 3362;
                this.sourceSuccessionMember();
              }
            }
            this.state = 3365;
            this.actionBehaviorMember();
            this.state = 3369;
            this.errorHandler.sync(this);
            alternative = this.interpreter.adaptivePredict(this.tokenStream, 349, this.context);
            while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
              if (alternative === 1) {
                {
                  {
                    this.state = 3366;
                    this.actionTargetSuccessionMember();
                  }
                }
              }
              this.state = 3371;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 349, this.context);
            }
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3372;
            this.guardedSuccessionMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nonBehaviorBodyItem() {
    let localContext = new NonBehaviorBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 580, _SysMLv2Parser.RULE_nonBehaviorBodyItem);
    let _la;
    try {
      this.state = 3384;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 352, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3375;
            this.importRule();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3376;
            this.aliasMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3377;
            this.definitionMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3378;
            this.variantUsageMember();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 3379;
            this.nonOccurrenceUsageMember();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 3381;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 152) {
              {
                this.state = 3380;
                this.sourceSuccessionMember();
              }
            }
            this.state = 3383;
            this.structureUsageMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionBehaviorMember() {
    let localContext = new ActionBehaviorMemberContext(this.context, this.state);
    this.enterRule(localContext, 582, _SysMLv2Parser.RULE_actionBehaviorMember);
    try {
      this.state = 3388;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 353, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3386;
            this.actionNodeMember();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3387;
            this.behaviorUsageMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  initialNodeMember() {
    let localContext = new InitialNodeMemberContext(this.context, this.state);
    this.enterRule(localContext, 584, _SysMLv2Parser.RULE_initialNodeMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3390;
        this.memberPrefix();
        this.state = 3391;
        this.match(_SysMLv2Parser.FIRST);
        this.state = 3392;
        this.qualifiedName();
        this.state = 3393;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionNodeMember() {
    let localContext = new ActionNodeMemberContext(this.context, this.state);
    this.enterRule(localContext, 586, _SysMLv2Parser.RULE_actionNodeMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3395;
        this.memberPrefix();
        this.state = 3396;
        this.actionNode();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionTargetSuccessionMember() {
    let localContext = new ActionTargetSuccessionMemberContext(this.context, this.state);
    this.enterRule(localContext, 588, _SysMLv2Parser.RULE_actionTargetSuccessionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3398;
        this.memberPrefix();
        this.state = 3399;
        this.actionTargetSuccession();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  guardedSuccessionMember() {
    let localContext = new GuardedSuccessionMemberContext(this.context, this.state);
    this.enterRule(localContext, 590, _SysMLv2Parser.RULE_guardedSuccessionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3401;
        this.memberPrefix();
        this.state = 3402;
        this.guardedSuccession();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionUsage() {
    let localContext = new ActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 592, _SysMLv2Parser.RULE_actionUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3404;
        this.occurrenceUsagePrefix();
        this.state = 3405;
        this.match(_SysMLv2Parser.ACTION);
        this.state = 3406;
        this.actionUsageDeclaration();
        this.state = 3407;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionUsageDeclaration() {
    let localContext = new ActionUsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 594, _SysMLv2Parser.RULE_actionUsageDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3410;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 3409;
            this.usageDeclaration();
          }
        }
        this.state = 3413;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 3412;
            this.valuePart();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  performActionUsage() {
    let localContext = new PerformActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 596, _SysMLv2Parser.RULE_performActionUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3415;
        this.occurrenceUsagePrefix();
        this.state = 3416;
        this.match(_SysMLv2Parser.PERFORM);
        this.state = 3417;
        this.performActionUsageDeclaration();
        this.state = 3418;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  performActionUsageDeclaration() {
    let localContext = new PerformActionUsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 598, _SysMLv2Parser.RULE_performActionUsageDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3428;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 3420;
              this.ownedReferenceSubsetting();
              this.state = 3422;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
                {
                  this.state = 3421;
                  this.featureSpecializationPart();
                }
              }
            }
            break;
          case _SysMLv2Parser.ACTION:
            {
              this.state = 3424;
              this.match(_SysMLv2Parser.ACTION);
              this.state = 3426;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
                {
                  this.state = 3425;
                  this.usageDeclaration();
                }
              }
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3431;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 3430;
            this.valuePart();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionNode() {
    let localContext = new ActionNodeContext(this.context, this.state);
    this.enterRule(localContext, 600, _SysMLv2Parser.RULE_actionNode);
    try {
      this.state = 3441;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 360, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3433;
            this.controlNode();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3434;
            this.sendNode();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3435;
            this.acceptNode();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3436;
            this.assignmentNode();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 3437;
            this.terminateNode();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 3438;
            this.ifNode();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 3439;
            this.whileLoopNode();
          }
          break;
        case 8:
          this.enterOuterAlt(localContext, 8);
          {
            this.state = 3440;
            this.forLoopNode();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionNodeUsageDeclaration() {
    let localContext = new ActionNodeUsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 602, _SysMLv2Parser.RULE_actionNodeUsageDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3443;
        this.match(_SysMLv2Parser.ACTION);
        this.state = 3445;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 3444;
            this.usageDeclaration();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionNodePrefix() {
    let localContext = new ActionNodePrefixContext(this.context, this.state);
    this.enterRule(localContext, 604, _SysMLv2Parser.RULE_actionNodePrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3447;
        this.occurrenceUsagePrefix();
        this.state = 3449;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 4) {
          {
            this.state = 3448;
            this.actionNodeUsageDeclaration();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  controlNode() {
    let localContext = new ControlNodeContext(this.context, this.state);
    this.enterRule(localContext, 606, _SysMLv2Parser.RULE_controlNode);
    try {
      this.state = 3455;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 363, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3451;
            this.mergeNode();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3452;
            this.decisionNode();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3453;
            this.joinNode();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3454;
            this.forkNode();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  controlNodePrefix() {
    let localContext = new ControlNodePrefixContext(this.context, this.state);
    this.enterRule(localContext, 608, _SysMLv2Parser.RULE_controlNodePrefix);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3457;
        this.refPrefix();
        this.state = 3459;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 82) {
          {
            this.state = 3458;
            this.match(_SysMLv2Parser.INDIVIDUAL);
          }
        }
        this.state = 3462;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 137 || _la === 153) {
          {
            this.state = 3461;
            this.portionKind();
          }
        }
        this.state = 3467;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 3464;
              this.usageExtensionKeyword();
            }
          }
          this.state = 3469;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  mergeNode() {
    let localContext = new MergeNodeContext(this.context, this.state);
    this.enterRule(localContext, 610, _SysMLv2Parser.RULE_mergeNode);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3470;
        this.controlNodePrefix();
        this.state = 3471;
        this.match(_SysMLv2Parser.MERGE);
        this.state = 3473;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 3472;
            this.usageDeclaration();
          }
        }
        this.state = 3475;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  decisionNode() {
    let localContext = new DecisionNodeContext(this.context, this.state);
    this.enterRule(localContext, 612, _SysMLv2Parser.RULE_decisionNode);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3477;
        this.controlNodePrefix();
        this.state = 3478;
        this.match(_SysMLv2Parser.DECIDE);
        this.state = 3480;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 3479;
            this.usageDeclaration();
          }
        }
        this.state = 3482;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  joinNode() {
    let localContext = new JoinNodeContext(this.context, this.state);
    this.enterRule(localContext, 614, _SysMLv2Parser.RULE_joinNode);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3484;
        this.controlNodePrefix();
        this.state = 3485;
        this.match(_SysMLv2Parser.JOIN);
        this.state = 3487;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 3486;
            this.usageDeclaration();
          }
        }
        this.state = 3489;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  forkNode() {
    let localContext = new ForkNodeContext(this.context, this.state);
    this.enterRule(localContext, 616, _SysMLv2Parser.RULE_forkNode);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3491;
        this.controlNodePrefix();
        this.state = 3492;
        this.match(_SysMLv2Parser.FORK);
        this.state = 3494;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 3493;
            this.usageDeclaration();
          }
        }
        this.state = 3496;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  acceptNode() {
    let localContext = new AcceptNodeContext(this.context, this.state);
    this.enterRule(localContext, 618, _SysMLv2Parser.RULE_acceptNode);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3498;
        this.occurrenceUsagePrefix();
        this.state = 3499;
        this.acceptNodeDeclaration();
        this.state = 3500;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  acceptNodeDeclaration() {
    let localContext = new AcceptNodeDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 620, _SysMLv2Parser.RULE_acceptNodeDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3503;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 4) {
          {
            this.state = 3502;
            this.actionNodeUsageDeclaration();
          }
        }
        this.state = 3505;
        this.match(_SysMLv2Parser.ACCEPT);
        this.state = 3506;
        this.acceptParameterPart();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  acceptParameterPart() {
    let localContext = new AcceptParameterPartContext(this.context, this.state);
    this.enterRule(localContext, 622, _SysMLv2Parser.RULE_acceptParameterPart);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3508;
        this.payloadParameterMember();
        this.state = 3511;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 168) {
          {
            this.state = 3509;
            this.match(_SysMLv2Parser.VIA);
            this.state = 3510;
            this.nodeParameterMember();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  payloadParameterMember() {
    let localContext = new PayloadParameterMemberContext(this.context, this.state);
    this.enterRule(localContext, 624, _SysMLv2Parser.RULE_payloadParameterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3513;
        this.payloadParameter();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  payloadParameter() {
    let localContext = new PayloadParameterContext(this.context, this.state);
    this.enterRule(localContext, 626, _SysMLv2Parser.RULE_payloadParameter);
    let _la;
    try {
      this.state = 3523;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 375, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3515;
            this.payloadFeature();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3517;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 373, this.context)) {
              case 1:
                {
                  this.state = 3516;
                  this.identification();
                }
                break;
            }
            this.state = 3520;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
              {
                this.state = 3519;
                this.payloadFeatureSpecializationPart();
              }
            }
            this.state = 3522;
            this.triggerValuePart();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  triggerValuePart() {
    let localContext = new TriggerValuePartContext(this.context, this.state);
    this.enterRule(localContext, 628, _SysMLv2Parser.RULE_triggerValuePart);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3525;
        this.triggerFeatureValue();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  triggerFeatureValue() {
    let localContext = new TriggerFeatureValueContext(this.context, this.state);
    this.enterRule(localContext, 630, _SysMLv2Parser.RULE_triggerFeatureValue);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3527;
        this.triggerExpression();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  triggerExpression() {
    let localContext = new TriggerExpressionContext(this.context, this.state);
    this.enterRule(localContext, 632, _SysMLv2Parser.RULE_triggerExpression);
    let _la;
    try {
      this.state = 3533;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.AFTER:
        case _SysMLv2Parser.AT:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3529;
            _la = this.tokenStream.LA(1);
            if (!(_la === 6 || _la === 18)) {
              this.errorHandler.recoverInline(this);
            } else {
              this.errorHandler.reportMatch(this);
              this.consume();
            }
            this.state = 3530;
            this.argumentMember();
          }
          break;
        case _SysMLv2Parser.WHEN:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3531;
            this.match(_SysMLv2Parser.WHEN);
            this.state = 3532;
            this.argumentExpressionMember();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sendNode() {
    let localContext = new SendNodeContext(this.context, this.state);
    this.enterRule(localContext, 634, _SysMLv2Parser.RULE_sendNode);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3535;
        this.occurrenceUsagePrefix();
        this.state = 3538;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.ACTION:
            {
              this.state = 3536;
              this.actionNodeUsageDeclaration();
            }
            break;
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.DEFAULT:
          case _SysMLv2Parser.DEFINED:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.NONUNIQUE:
          case _SysMLv2Parser.ORDERED:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.REDEFINES:
          case _SysMLv2Parser.REFERENCES:
          case _SysMLv2Parser.SEND:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.SUBSETS:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.TYPED:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.COLON_COLON_GT:
          case _SysMLv2Parser.COLON_GT_GT:
          case _SysMLv2Parser.COLON_EQ:
          case _SysMLv2Parser.COLON_GT:
          case _SysMLv2Parser.FAT_ARROW:
          case _SysMLv2Parser.COLON:
          case _SysMLv2Parser.LT:
          case _SysMLv2Parser.EQ:
          case _SysMLv2Parser.LBRACK:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 3537;
              this.actionUsageDeclaration();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3540;
        this.match(_SysMLv2Parser.SEND);
        this.state = 3549;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 380, this.context)) {
          case 1:
            {
              this.state = 3541;
              this.nodeParameterMember();
              this.state = 3543;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 154 || _la === 168) {
                {
                  this.state = 3542;
                  this.senderReceiverPart();
                }
              }
            }
            break;
          case 2:
            {
              this.state = 3545;
              this.emptyParameterMember();
              this.state = 3547;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 154 || _la === 168) {
                {
                  this.state = 3546;
                  this.senderReceiverPart();
                }
              }
            }
            break;
        }
        this.state = 3551;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sendNodeDeclaration() {
    let localContext = new SendNodeDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 636, _SysMLv2Parser.RULE_sendNodeDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3554;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 4) {
          {
            this.state = 3553;
            this.actionNodeUsageDeclaration();
          }
        }
        this.state = 3556;
        this.match(_SysMLv2Parser.SEND);
        this.state = 3557;
        this.nodeParameterMember();
        this.state = 3559;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 154 || _la === 168) {
          {
            this.state = 3558;
            this.senderReceiverPart();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  senderReceiverPart() {
    let localContext = new SenderReceiverPartContext(this.context, this.state);
    this.enterRule(localContext, 638, _SysMLv2Parser.RULE_senderReceiverPart);
    let _la;
    try {
      this.state = 3571;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.VIA:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3561;
            this.match(_SysMLv2Parser.VIA);
            this.state = 3562;
            this.nodeParameterMember();
            this.state = 3565;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 154) {
              {
                this.state = 3563;
                this.match(_SysMLv2Parser.TO);
                this.state = 3564;
                this.nodeParameterMember();
              }
            }
          }
          break;
        case _SysMLv2Parser.TO:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3567;
            this.emptyParameterMember();
            this.state = 3568;
            this.match(_SysMLv2Parser.TO);
            this.state = 3569;
            this.nodeParameterMember();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nodeParameterMember() {
    let localContext = new NodeParameterMemberContext(this.context, this.state);
    this.enterRule(localContext, 640, _SysMLv2Parser.RULE_nodeParameterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3573;
        this.nodeParameter();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nodeParameter() {
    let localContext = new NodeParameterContext(this.context, this.state);
    this.enterRule(localContext, 642, _SysMLv2Parser.RULE_nodeParameter);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3575;
        this.featureBinding();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  featureBinding() {
    let localContext = new FeatureBindingContext(this.context, this.state);
    this.enterRule(localContext, 644, _SysMLv2Parser.RULE_featureBinding);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3577;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  emptyParameterMember() {
    let localContext = new EmptyParameterMemberContext(this.context, this.state);
    this.enterRule(localContext, 646, _SysMLv2Parser.RULE_emptyParameterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3579;
        this.emptyUsage_();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  assignmentNode() {
    let localContext = new AssignmentNodeContext(this.context, this.state);
    this.enterRule(localContext, 648, _SysMLv2Parser.RULE_assignmentNode);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3581;
        this.occurrenceUsagePrefix();
        this.state = 3582;
        this.assignmentNodeDeclaration();
        this.state = 3583;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  assignmentNodeDeclaration() {
    let localContext = new AssignmentNodeDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 650, _SysMLv2Parser.RULE_assignmentNodeDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3586;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 4) {
          {
            this.state = 3585;
            this.actionNodeUsageDeclaration();
          }
        }
        this.state = 3588;
        this.match(_SysMLv2Parser.ASSIGN);
        this.state = 3589;
        this.assignmentTargetMember();
        this.state = 3590;
        this.featureChainMember();
        this.state = 3591;
        this.match(_SysMLv2Parser.COLON_EQ);
        this.state = 3592;
        this.nodeParameterMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  assignmentTargetMember() {
    let localContext = new AssignmentTargetMemberContext(this.context, this.state);
    this.enterRule(localContext, 652, _SysMLv2Parser.RULE_assignmentTargetMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3594;
        this.assignmentTargetParameter();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  assignmentTargetParameter() {
    let localContext = new AssignmentTargetParameterContext(this.context, this.state);
    this.enterRule(localContext, 654, _SysMLv2Parser.RULE_assignmentTargetParameter);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3599;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 386, this.context)) {
          case 1:
            {
              this.state = 3596;
              this.assignmentTargetBinding();
              this.state = 3597;
              this.match(_SysMLv2Parser.DOT);
            }
            break;
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  assignmentTargetBinding() {
    let localContext = new AssignmentTargetBindingContext(this.context, this.state);
    this.enterRule(localContext, 656, _SysMLv2Parser.RULE_assignmentTargetBinding);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3601;
        this.nonFeatureChainPrimaryExpression();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  terminateNode() {
    let localContext = new TerminateNodeContext(this.context, this.state);
    this.enterRule(localContext, 658, _SysMLv2Parser.RULE_terminateNode);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3603;
        this.occurrenceUsagePrefix();
        this.state = 3605;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 4) {
          {
            this.state = 3604;
            this.actionNodeUsageDeclaration();
          }
        }
        this.state = 3607;
        this.match(_SysMLv2Parser.TERMINATE);
        this.state = 3609;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 388, this.context)) {
          case 1:
            {
              this.state = 3608;
              this.nodeParameterMember();
            }
            break;
        }
        this.state = 3611;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ifNode() {
    let localContext = new IfNodeContext(this.context, this.state);
    this.enterRule(localContext, 660, _SysMLv2Parser.RULE_ifNode);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3613;
        this.actionNodePrefix();
        this.state = 3614;
        this.match(_SysMLv2Parser.IF);
        this.state = 3615;
        this.expressionParameterMember();
        this.state = 3616;
        this.actionBodyParameterMember();
        this.state = 3622;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 390, this.context)) {
          case 1:
            {
              this.state = 3617;
              this.match(_SysMLv2Parser.ELSE);
              this.state = 3620;
              this.errorHandler.sync(this);
              switch (this.interpreter.adaptivePredict(this.tokenStream, 389, this.context)) {
                case 1:
                  {
                    this.state = 3618;
                    this.actionBodyParameterMember();
                  }
                  break;
                case 2:
                  {
                    this.state = 3619;
                    this.ifNodeParameterMember();
                  }
                  break;
              }
            }
            break;
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  expressionParameterMember() {
    let localContext = new ExpressionParameterMemberContext(this.context, this.state);
    this.enterRule(localContext, 662, _SysMLv2Parser.RULE_expressionParameterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3624;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionBodyParameterMember() {
    let localContext = new ActionBodyParameterMemberContext(this.context, this.state);
    this.enterRule(localContext, 664, _SysMLv2Parser.RULE_actionBodyParameterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3626;
        this.actionBodyParameter();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionBodyParameter() {
    let localContext = new ActionBodyParameterContext(this.context, this.state);
    this.enterRule(localContext, 666, _SysMLv2Parser.RULE_actionBodyParameter);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3632;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 4) {
          {
            this.state = 3628;
            this.match(_SysMLv2Parser.ACTION);
            this.state = 3630;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 3629;
                this.usageDeclaration();
              }
            }
          }
        }
        this.state = 3634;
        this.match(_SysMLv2Parser.LBRACE);
        this.state = 3638;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while ((_la & ~31) === 0 && (1 << _la & 1182322332) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490985265) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 4229944561) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127799) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 418658539) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153459615) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
          {
            {
              this.state = 3635;
              this.actionBodyItem();
            }
          }
          this.state = 3640;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 3641;
        this.match(_SysMLv2Parser.RBRACE);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  ifNodeParameterMember() {
    let localContext = new IfNodeParameterMemberContext(this.context, this.state);
    this.enterRule(localContext, 668, _SysMLv2Parser.RULE_ifNodeParameterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3643;
        this.ifNode();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  whileLoopNode() {
    let localContext = new WhileLoopNodeContext(this.context, this.state);
    this.enterRule(localContext, 670, _SysMLv2Parser.RULE_whileLoopNode);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3645;
        this.actionNodePrefix();
        this.state = 3650;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.WHILE:
            {
              this.state = 3646;
              this.match(_SysMLv2Parser.WHILE);
              this.state = 3647;
              this.expressionParameterMember();
            }
            break;
          case _SysMLv2Parser.LOOP:
            {
              this.state = 3648;
              this.match(_SysMLv2Parser.LOOP);
              this.state = 3649;
              this.emptyParameterMember();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3652;
        this.actionBodyParameterMember();
        this.state = 3657;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 161) {
          {
            this.state = 3653;
            this.match(_SysMLv2Parser.UNTIL);
            this.state = 3654;
            this.expressionParameterMember();
            this.state = 3655;
            this.match(_SysMLv2Parser.SEMI);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  forLoopNode() {
    let localContext = new ForLoopNodeContext(this.context, this.state);
    this.enterRule(localContext, 672, _SysMLv2Parser.RULE_forLoopNode);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3659;
        this.actionNodePrefix();
        this.state = 3660;
        this.match(_SysMLv2Parser.FOR);
        this.state = 3661;
        this.forVariableDeclarationMember();
        this.state = 3662;
        this.match(_SysMLv2Parser.IN);
        this.state = 3663;
        this.nodeParameterMember();
        this.state = 3664;
        this.actionBodyParameterMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  forVariableDeclarationMember() {
    let localContext = new ForVariableDeclarationMemberContext(this.context, this.state);
    this.enterRule(localContext, 674, _SysMLv2Parser.RULE_forVariableDeclarationMember);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3667;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 3666;
            this.usageDeclaration();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actionTargetSuccession() {
    let localContext = new ActionTargetSuccessionContext(this.context, this.state);
    this.enterRule(localContext, 676, _SysMLv2Parser.RULE_actionTargetSuccession);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3672;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.THEN:
          case _SysMLv2Parser.LBRACK:
            {
              this.state = 3669;
              this.targetSuccession();
            }
            break;
          case _SysMLv2Parser.IF:
            {
              this.state = 3670;
              this.guardedTargetSuccession();
            }
            break;
          case _SysMLv2Parser.ELSE:
            {
              this.state = 3671;
              this.defaultTargetSuccession();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3674;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  targetSuccession() {
    let localContext = new TargetSuccessionContext(this.context, this.state);
    this.enterRule(localContext, 678, _SysMLv2Parser.RULE_targetSuccession);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3676;
        this.sourceEndMember();
        this.state = 3677;
        this.match(_SysMLv2Parser.THEN);
        this.state = 3678;
        this.connectorEndMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  guardedTargetSuccession() {
    let localContext = new GuardedTargetSuccessionContext(this.context, this.state);
    this.enterRule(localContext, 680, _SysMLv2Parser.RULE_guardedTargetSuccession);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3680;
        this.guardExpressionMember();
        this.state = 3681;
        this.match(_SysMLv2Parser.THEN);
        this.state = 3682;
        this.transitionSuccessionMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  defaultTargetSuccession() {
    let localContext = new DefaultTargetSuccessionContext(this.context, this.state);
    this.enterRule(localContext, 682, _SysMLv2Parser.RULE_defaultTargetSuccession);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3684;
        this.match(_SysMLv2Parser.ELSE);
        this.state = 3685;
        this.transitionSuccessionMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  guardedSuccession() {
    let localContext = new GuardedSuccessionContext(this.context, this.state);
    this.enterRule(localContext, 684, _SysMLv2Parser.RULE_guardedSuccession);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3691;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 150) {
          {
            this.state = 3687;
            this.match(_SysMLv2Parser.SUCCESSION);
            this.state = 3689;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
              {
                this.state = 3688;
                this.usageDeclaration();
              }
            }
          }
        }
        this.state = 3693;
        this.match(_SysMLv2Parser.FIRST);
        this.state = 3694;
        this.featureChainMember();
        this.state = 3695;
        this.guardExpressionMember();
        this.state = 3696;
        this.match(_SysMLv2Parser.THEN);
        this.state = 3697;
        this.transitionSuccessionMember();
        this.state = 3698;
        this.usageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateDefinition() {
    let localContext = new StateDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 686, _SysMLv2Parser.RULE_stateDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3700;
        this.occurrenceDefinitionPrefix();
        this.state = 3701;
        this.match(_SysMLv2Parser.STATE);
        this.state = 3702;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3703;
        this.definitionDeclaration();
        this.state = 3704;
        this.stateDefBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateDefBody() {
    let localContext = new StateDefBodyContext(this.context, this.state);
    this.enterRule(localContext, 688, _SysMLv2Parser.RULE_stateDefBody);
    let _la;
    try {
      this.state = 3718;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3706;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.PARALLEL:
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3708;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 116) {
              {
                this.state = 3707;
                this.match(_SysMLv2Parser.PARALLEL);
              }
            }
            this.state = 3710;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3714;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182289556) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 1063503665) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948238897) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 450115755) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458591) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 3711;
                  this.stateBodyItem();
                }
              }
              this.state = 3716;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3717;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateBodyItem() {
    let localContext = new StateBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 690, _SysMLv2Parser.RULE_stateBodyItem);
    let _la;
    try {
      let alternative;
      this.state = 3741;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 406, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3720;
            this.nonBehaviorBodyItem();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3722;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 152) {
              {
                this.state = 3721;
                this.sourceSuccessionMember();
              }
            }
            this.state = 3724;
            this.behaviorUsageMember();
            this.state = 3728;
            this.errorHandler.sync(this);
            alternative = this.interpreter.adaptivePredict(this.tokenStream, 404, this.context);
            while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
              if (alternative === 1) {
                {
                  {
                    this.state = 3725;
                    this.targetTransitionUsageMember();
                  }
                }
              }
              this.state = 3730;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 404, this.context);
            }
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3731;
            this.transitionUsageMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3732;
            this.entryActionMember();
            this.state = 3736;
            this.errorHandler.sync(this);
            alternative = this.interpreter.adaptivePredict(this.tokenStream, 405, this.context);
            while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
              if (alternative === 1) {
                {
                  {
                    this.state = 3733;
                    this.entryTransitionMember();
                  }
                }
              }
              this.state = 3738;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 405, this.context);
            }
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 3739;
            this.doActionMember();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 3740;
            this.exitActionMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  entryActionMember() {
    let localContext = new EntryActionMemberContext(this.context, this.state);
    this.enterRule(localContext, 692, _SysMLv2Parser.RULE_entryActionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3743;
        this.memberPrefix();
        this.state = 3744;
        this.match(_SysMLv2Parser.ENTRY);
        this.state = 3745;
        this.stateActionUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  doActionMember() {
    let localContext = new DoActionMemberContext(this.context, this.state);
    this.enterRule(localContext, 694, _SysMLv2Parser.RULE_doActionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3747;
        this.memberPrefix();
        this.state = 3748;
        this.match(_SysMLv2Parser.DO);
        this.state = 3749;
        this.stateActionUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  exitActionMember() {
    let localContext = new ExitActionMemberContext(this.context, this.state);
    this.enterRule(localContext, 696, _SysMLv2Parser.RULE_exitActionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3751;
        this.memberPrefix();
        this.state = 3752;
        this.match(_SysMLv2Parser.EXIT);
        this.state = 3753;
        this.stateActionUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  entryTransitionMember() {
    let localContext = new EntryTransitionMemberContext(this.context, this.state);
    this.enterRule(localContext, 698, _SysMLv2Parser.RULE_entryTransitionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3755;
        this.memberPrefix();
        this.state = 3759;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.IF:
            {
              this.state = 3756;
              this.guardedTargetSuccession();
            }
            break;
          case _SysMLv2Parser.THEN:
            {
              this.state = 3757;
              this.match(_SysMLv2Parser.THEN);
              this.state = 3758;
              this.transitionSuccessionMember();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3761;
        this.match(_SysMLv2Parser.SEMI);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateActionUsage() {
    let localContext = new StateActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 700, _SysMLv2Parser.RULE_stateActionUsage);
    try {
      this.state = 3770;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 408, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3763;
            this.emptyActionUsage_();
            this.state = 3764;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3766;
            this.statePerformActionUsage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3767;
            this.stateAcceptActionUsage();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3768;
            this.stateSendActionUsage();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 3769;
            this.stateAssignmentActionUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  statePerformActionUsage() {
    let localContext = new StatePerformActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 702, _SysMLv2Parser.RULE_statePerformActionUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3772;
        this.performActionUsageDeclaration();
        this.state = 3773;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateAcceptActionUsage() {
    let localContext = new StateAcceptActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 704, _SysMLv2Parser.RULE_stateAcceptActionUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3775;
        this.acceptNodeDeclaration();
        this.state = 3776;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateSendActionUsage() {
    let localContext = new StateSendActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 706, _SysMLv2Parser.RULE_stateSendActionUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3778;
        this.sendNodeDeclaration();
        this.state = 3779;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateAssignmentActionUsage() {
    let localContext = new StateAssignmentActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 708, _SysMLv2Parser.RULE_stateAssignmentActionUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3781;
        this.assignmentNodeDeclaration();
        this.state = 3782;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionUsageMember() {
    let localContext = new TransitionUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 710, _SysMLv2Parser.RULE_transitionUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3784;
        this.memberPrefix();
        this.state = 3785;
        this.transitionUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  targetTransitionUsageMember() {
    let localContext = new TargetTransitionUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 712, _SysMLv2Parser.RULE_targetTransitionUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3787;
        this.memberPrefix();
        this.state = 3788;
        this.targetTransitionUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateUsage() {
    let localContext = new StateUsageContext(this.context, this.state);
    this.enterRule(localContext, 714, _SysMLv2Parser.RULE_stateUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3790;
        this.occurrenceUsagePrefix();
        this.state = 3791;
        this.match(_SysMLv2Parser.STATE);
        this.state = 3792;
        this.actionUsageDeclaration();
        this.state = 3793;
        this.stateUsageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stateUsageBody() {
    let localContext = new StateUsageBodyContext(this.context, this.state);
    this.enterRule(localContext, 716, _SysMLv2Parser.RULE_stateUsageBody);
    let _la;
    try {
      this.state = 3807;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3795;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.PARALLEL:
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3797;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 116) {
              {
                this.state = 3796;
                this.match(_SysMLv2Parser.PARALLEL);
              }
            }
            this.state = 3799;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3803;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182289556) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 1063503665) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948238897) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 450115755) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458591) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 3800;
                  this.stateBodyItem();
                }
              }
              this.state = 3805;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3806;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  exhibitStateUsage() {
    let localContext = new ExhibitStateUsageContext(this.context, this.state);
    this.enterRule(localContext, 718, _SysMLv2Parser.RULE_exhibitStateUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3809;
        this.occurrenceUsagePrefix();
        this.state = 3810;
        this.match(_SysMLv2Parser.EXHIBIT);
        this.state = 3819;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 3811;
              this.ownedReferenceSubsetting();
              this.state = 3813;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
                {
                  this.state = 3812;
                  this.featureSpecializationPart();
                }
              }
            }
            break;
          case _SysMLv2Parser.STATE:
            {
              this.state = 3815;
              this.match(_SysMLv2Parser.STATE);
              this.state = 3817;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
                {
                  this.state = 3816;
                  this.usageDeclaration();
                }
              }
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 3822;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 3821;
            this.valuePart();
          }
        }
        this.state = 3824;
        this.stateUsageBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionUsage() {
    let localContext = new TransitionUsageContext(this.context, this.state);
    this.enterRule(localContext, 720, _SysMLv2Parser.RULE_transitionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3826;
        this.match(_SysMLv2Parser.TRANSITION);
        this.state = 3831;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 417, this.context)) {
          case 1:
            {
              this.state = 3828;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
                {
                  this.state = 3827;
                  this.usageDeclaration();
                }
              }
              this.state = 3830;
              this.match(_SysMLv2Parser.FIRST);
            }
            break;
        }
        this.state = 3833;
        this.featureChainMember();
        this.state = 3834;
        this.emptyParameterMember();
        this.state = 3838;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 3) {
          {
            this.state = 3835;
            this.emptyParameterMember();
            this.state = 3836;
            this.triggerActionMember();
          }
        }
        this.state = 3841;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 77) {
          {
            this.state = 3840;
            this.guardExpressionMember();
          }
        }
        this.state = 3844;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 53) {
          {
            this.state = 3843;
            this.effectBehaviorMember();
          }
        }
        this.state = 3846;
        this.match(_SysMLv2Parser.THEN);
        this.state = 3847;
        this.transitionSuccessionMember();
        this.state = 3848;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  targetTransitionUsage() {
    let localContext = new TargetTransitionUsageContext(this.context, this.state);
    this.enterRule(localContext, 722, _SysMLv2Parser.RULE_targetTransitionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3850;
        this.emptyParameterMember();
        this.state = 3875;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.TRANSITION:
            {
              this.state = 3851;
              this.match(_SysMLv2Parser.TRANSITION);
              this.state = 3855;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 3) {
                {
                  this.state = 3852;
                  this.emptyParameterMember();
                  this.state = 3853;
                  this.triggerActionMember();
                }
              }
              this.state = 3858;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 77) {
                {
                  this.state = 3857;
                  this.guardExpressionMember();
                }
              }
              this.state = 3861;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 53) {
                {
                  this.state = 3860;
                  this.effectBehaviorMember();
                }
              }
            }
            break;
          case _SysMLv2Parser.ACCEPT:
            {
              this.state = 3863;
              this.emptyParameterMember();
              this.state = 3864;
              this.triggerActionMember();
              this.state = 3866;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 77) {
                {
                  this.state = 3865;
                  this.guardExpressionMember();
                }
              }
              this.state = 3869;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 53) {
                {
                  this.state = 3868;
                  this.effectBehaviorMember();
                }
              }
            }
            break;
          case _SysMLv2Parser.IF:
            {
              this.state = 3871;
              this.guardExpressionMember();
              this.state = 3873;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 53) {
                {
                  this.state = 3872;
                  this.effectBehaviorMember();
                }
              }
            }
            break;
          case _SysMLv2Parser.THEN:
            break;
          default:
            break;
        }
        this.state = 3877;
        this.match(_SysMLv2Parser.THEN);
        this.state = 3878;
        this.transitionSuccessionMember();
        this.state = 3879;
        this.actionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  triggerActionMember() {
    let localContext = new TriggerActionMemberContext(this.context, this.state);
    this.enterRule(localContext, 724, _SysMLv2Parser.RULE_triggerActionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3881;
        this.match(_SysMLv2Parser.ACCEPT);
        this.state = 3882;
        this.triggerAction();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  triggerAction() {
    let localContext = new TriggerActionContext(this.context, this.state);
    this.enterRule(localContext, 726, _SysMLv2Parser.RULE_triggerAction);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3884;
        this.acceptParameterPart();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  guardExpressionMember() {
    let localContext = new GuardExpressionMemberContext(this.context, this.state);
    this.enterRule(localContext, 728, _SysMLv2Parser.RULE_guardExpressionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3886;
        this.match(_SysMLv2Parser.IF);
        this.state = 3887;
        this.ownedExpression(0);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  effectBehaviorMember() {
    let localContext = new EffectBehaviorMemberContext(this.context, this.state);
    this.enterRule(localContext, 730, _SysMLv2Parser.RULE_effectBehaviorMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3889;
        this.match(_SysMLv2Parser.DO);
        this.state = 3890;
        this.effectBehaviorUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  effectBehaviorUsage() {
    let localContext = new EffectBehaviorUsageContext(this.context, this.state);
    this.enterRule(localContext, 732, _SysMLv2Parser.RULE_effectBehaviorUsage);
    try {
      this.state = 3897;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 428, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3892;
            this.emptyActionUsage_();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3893;
            this.transitionPerformActionUsage();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 3894;
            this.transitionAcceptActionUsage();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 3895;
            this.transitionSendActionUsage();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 3896;
            this.transitionAssignmentActionUsage();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionPerformActionUsage() {
    let localContext = new TransitionPerformActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 734, _SysMLv2Parser.RULE_transitionPerformActionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3899;
        this.performActionUsageDeclaration();
        this.state = 3908;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 214) {
          {
            this.state = 3900;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3904;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182322332) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490985265) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 4229944561) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127799) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 418658539) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153459615) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 3901;
                  this.actionBodyItem();
                }
              }
              this.state = 3906;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3907;
            this.match(_SysMLv2Parser.RBRACE);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionAcceptActionUsage() {
    let localContext = new TransitionAcceptActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 736, _SysMLv2Parser.RULE_transitionAcceptActionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3910;
        this.acceptNodeDeclaration();
        this.state = 3919;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 214) {
          {
            this.state = 3911;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3915;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182322332) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490985265) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 4229944561) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127799) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 418658539) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153459615) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 3912;
                  this.actionBodyItem();
                }
              }
              this.state = 3917;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3918;
            this.match(_SysMLv2Parser.RBRACE);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionSendActionUsage() {
    let localContext = new TransitionSendActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 738, _SysMLv2Parser.RULE_transitionSendActionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3921;
        this.sendNodeDeclaration();
        this.state = 3930;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 214) {
          {
            this.state = 3922;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3926;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182322332) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490985265) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 4229944561) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127799) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 418658539) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153459615) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 3923;
                  this.actionBodyItem();
                }
              }
              this.state = 3928;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3929;
            this.match(_SysMLv2Parser.RBRACE);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionAssignmentActionUsage() {
    let localContext = new TransitionAssignmentActionUsageContext(this.context, this.state);
    this.enterRule(localContext, 740, _SysMLv2Parser.RULE_transitionAssignmentActionUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3932;
        this.assignmentNodeDeclaration();
        this.state = 3941;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 214) {
          {
            this.state = 3933;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3937;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182322332) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490985265) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 4229944561) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127799) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 418658539) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153459615) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 3934;
                  this.actionBodyItem();
                }
              }
              this.state = 3939;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 3940;
            this.match(_SysMLv2Parser.RBRACE);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionSuccessionMember() {
    let localContext = new TransitionSuccessionMemberContext(this.context, this.state);
    this.enterRule(localContext, 742, _SysMLv2Parser.RULE_transitionSuccessionMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3943;
        this.transitionSuccession();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  transitionSuccession() {
    let localContext = new TransitionSuccessionContext(this.context, this.state);
    this.enterRule(localContext, 744, _SysMLv2Parser.RULE_transitionSuccession);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3945;
        this.emptyEndMember();
        this.state = 3946;
        this.connectorEndMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  emptyEndMember() {
    let localContext = new EmptyEndMemberContext(this.context, this.state);
    this.enterRule(localContext, 746, _SysMLv2Parser.RULE_emptyEndMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3948;
        this.emptyFeature_();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  calculationDefinition() {
    let localContext = new CalculationDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 748, _SysMLv2Parser.RULE_calculationDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3950;
        this.occurrenceDefinitionPrefix();
        this.state = 3951;
        this.match(_SysMLv2Parser.CALC);
        this.state = 3952;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3953;
        this.definitionDeclaration();
        this.state = 3954;
        this.calculationBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  calculationUsage() {
    let localContext = new CalculationUsageContext(this.context, this.state);
    this.enterRule(localContext, 750, _SysMLv2Parser.RULE_calculationUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3956;
        this.occurrenceUsagePrefix();
        this.state = 3957;
        this.match(_SysMLv2Parser.CALC);
        this.state = 3958;
        this.actionUsageDeclaration();
        this.state = 3959;
        this.calculationBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  calculationBody() {
    let localContext = new CalculationBodyContext(this.context, this.state);
    this.enterRule(localContext, 752, _SysMLv2Parser.RULE_calculationBody);
    try {
      this.state = 3966;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3961;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3962;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 3963;
            this.calculationBodyPart();
            this.state = 3964;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  calculationBodyPart() {
    let localContext = new CalculationBodyPartContext(this.context, this.state);
    this.enterRule(localContext, 754, _SysMLv2Parser.RULE_calculationBodyPart);
    let _la;
    try {
      let alternative;
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3971;
        this.errorHandler.sync(this);
        alternative = this.interpreter.adaptivePredict(this.tokenStream, 438, this.context);
        while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
          if (alternative === 1) {
            {
              {
                this.state = 3968;
                this.calculationBodyItem();
              }
            }
          }
          this.state = 3973;
          this.errorHandler.sync(this);
          alternative = this.interpreter.adaptivePredict(this.tokenStream, 438, this.context);
        }
        this.state = 3975;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 8 || _la === 20 || (_la - 42 & ~31) === 0 && (1 << _la - 42 & 12582913) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 1414791685) !== 0 || (_la - 107 & ~31) === 0 && (1 << _la - 107 & 245763) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1073153) !== 0 || (_la - 191 & ~31) === 0 && (1 << _la - 191 & 4236772773) !== 0 || _la === 223) {
          {
            this.state = 3974;
            this.resultExpressionMember();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  calculationBodyItem() {
    let localContext = new CalculationBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 756, _SysMLv2Parser.RULE_calculationBodyItem);
    try {
      this.state = 3979;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 440, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 3977;
            this.actionBodyItem();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 3978;
            this.returnParameterMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  returnParameterMember() {
    let localContext = new ReturnParameterMemberContext(this.context, this.state);
    this.enterRule(localContext, 758, _SysMLv2Parser.RULE_returnParameterMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3981;
        this.memberPrefix();
        this.state = 3982;
        this.match(_SysMLv2Parser.RETURN);
        this.state = 3983;
        this.usageElement();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  constraintDefinition() {
    let localContext = new ConstraintDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 760, _SysMLv2Parser.RULE_constraintDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3985;
        this.occurrenceDefinitionPrefix();
        this.state = 3986;
        this.match(_SysMLv2Parser.CONSTRAINT);
        this.state = 3987;
        this.match(_SysMLv2Parser.DEF);
        this.state = 3988;
        this.definitionDeclaration();
        this.state = 3989;
        this.calculationBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  constraintUsage() {
    let localContext = new ConstraintUsageContext(this.context, this.state);
    this.enterRule(localContext, 762, _SysMLv2Parser.RULE_constraintUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3991;
        this.occurrenceUsagePrefix();
        this.state = 3992;
        this.match(_SysMLv2Parser.CONSTRAINT);
        this.state = 3993;
        this.constraintUsageDeclaration();
        this.state = 3994;
        this.calculationBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  assertConstraintUsage() {
    let localContext = new AssertConstraintUsageContext(this.context, this.state);
    this.enterRule(localContext, 764, _SysMLv2Parser.RULE_assertConstraintUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 3996;
        this.occurrenceUsagePrefix();
        this.state = 3997;
        this.match(_SysMLv2Parser.ASSERT);
        this.state = 3999;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 107) {
          {
            this.state = 3998;
            this.match(_SysMLv2Parser.NOT);
          }
        }
        this.state = 4007;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 4001;
              this.ownedReferenceSubsetting();
              this.state = 4003;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
                {
                  this.state = 4002;
                  this.featureSpecializationPart();
                }
              }
            }
            break;
          case _SysMLv2Parser.CONSTRAINT:
            {
              this.state = 4005;
              this.match(_SysMLv2Parser.CONSTRAINT);
              this.state = 4006;
              this.constraintUsageDeclaration();
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 4009;
        this.calculationBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  constraintUsageDeclaration() {
    let localContext = new ConstraintUsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 766, _SysMLv2Parser.RULE_constraintUsageDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4012;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 4011;
            this.usageDeclaration();
          }
        }
        this.state = 4015;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 4014;
            this.valuePart();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementDefinition() {
    let localContext = new RequirementDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 768, _SysMLv2Parser.RULE_requirementDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4017;
        this.occurrenceDefinitionPrefix();
        this.state = 4018;
        this.match(_SysMLv2Parser.REQUIREMENT);
        this.state = 4019;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4020;
        this.definitionDeclaration();
        this.state = 4021;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementBody() {
    let localContext = new RequirementBodyContext(this.context, this.state);
    this.enterRule(localContext, 770, _SysMLv2Parser.RULE_requirementBody);
    let _la;
    try {
      this.state = 4032;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4023;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4024;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 4028;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182420660) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490981169) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948239153) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 130 & ~31) === 0 && (1 << _la - 130 & 416627887) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458623) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 4025;
                  this.requirementBodyItem();
                }
              }
              this.state = 4030;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 4031;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementBodyItem() {
    let localContext = new RequirementBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 772, _SysMLv2Parser.RULE_requirementBodyItem);
    try {
      this.state = 4041;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 448, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4034;
            this.definitionBodyItem();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4035;
            this.subjectMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 4036;
            this.requirementConstraintMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 4037;
            this.framedConcernMember();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 4038;
            this.requirementVerificationMember();
          }
          break;
        case 6:
          this.enterOuterAlt(localContext, 6);
          {
            this.state = 4039;
            this.actorMember();
          }
          break;
        case 7:
          this.enterOuterAlt(localContext, 7);
          {
            this.state = 4040;
            this.stakeholderMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  subjectMember() {
    let localContext = new SubjectMemberContext(this.context, this.state);
    this.enterRule(localContext, 774, _SysMLv2Parser.RULE_subjectMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4043;
        this.memberPrefix();
        this.state = 4044;
        this.subjectUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  subjectUsage() {
    let localContext = new SubjectUsageContext(this.context, this.state);
    this.enterRule(localContext, 776, _SysMLv2Parser.RULE_subjectUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4046;
        this.match(_SysMLv2Parser.SUBJECT);
        this.state = 4050;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 4047;
              this.usageExtensionKeyword();
            }
          }
          this.state = 4052;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 4053;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementConstraintMember() {
    let localContext = new RequirementConstraintMemberContext(this.context, this.state);
    this.enterRule(localContext, 778, _SysMLv2Parser.RULE_requirementConstraintMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4055;
        this.memberPrefix();
        this.state = 4056;
        this.requirementKind();
        this.state = 4057;
        this.requirementConstraintUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementKind() {
    let localContext = new RequirementKindContext(this.context, this.state);
    this.enterRule(localContext, 780, _SysMLv2Parser.RULE_requirementKind);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4059;
        _la = this.tokenStream.LA(1);
        if (!(_la === 17 || _la === 132)) {
          this.errorHandler.recoverInline(this);
        } else {
          this.errorHandler.reportMatch(this);
          this.consume();
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementConstraintUsage() {
    let localContext = new RequirementConstraintUsageContext(this.context, this.state);
    this.enterRule(localContext, 782, _SysMLv2Parser.RULE_requirementConstraintUsage);
    let _la;
    try {
      this.state = 4084;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.DOLLAR:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4061;
            this.ownedReferenceSubsetting();
            this.state = 4063;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
              {
                this.state = 4062;
                this.featureSpecializationPart();
              }
            }
            this.state = 4065;
            this.requirementBody();
          }
          break;
        case _SysMLv2Parser.CONSTRAINT:
        case _SysMLv2Parser.HASH:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4079;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 453, this.context)) {
              case 1:
                {
                  this.state = 4070;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  while (_la === 192) {
                    {
                      {
                        this.state = 4067;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4072;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  }
                  this.state = 4073;
                  this.match(_SysMLv2Parser.CONSTRAINT);
                }
                break;
              case 2:
                {
                  this.state = 4075;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  do {
                    {
                      {
                        this.state = 4074;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4077;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  } while (_la === 192);
                }
                break;
            }
            this.state = 4081;
            this.constraintUsageDeclaration();
            this.state = 4082;
            this.calculationBody();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  framedConcernMember() {
    let localContext = new FramedConcernMemberContext(this.context, this.state);
    this.enterRule(localContext, 784, _SysMLv2Parser.RULE_framedConcernMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4086;
        this.memberPrefix();
        this.state = 4087;
        this.match(_SysMLv2Parser.FRAME);
        this.state = 4088;
        this.framedConcernUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  framedConcernUsage() {
    let localContext = new FramedConcernUsageContext(this.context, this.state);
    this.enterRule(localContext, 786, _SysMLv2Parser.RULE_framedConcernUsage);
    let _la;
    try {
      this.state = 4113;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.DOLLAR:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4090;
            this.ownedReferenceSubsetting();
            this.state = 4092;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
              {
                this.state = 4091;
                this.featureSpecializationPart();
              }
            }
            this.state = 4094;
            this.calculationBody();
          }
          break;
        case _SysMLv2Parser.CONCERN:
        case _SysMLv2Parser.HASH:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4108;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 458, this.context)) {
              case 1:
                {
                  this.state = 4099;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  while (_la === 192) {
                    {
                      {
                        this.state = 4096;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4101;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  }
                  this.state = 4102;
                  this.match(_SysMLv2Parser.CONCERN);
                }
                break;
              case 2:
                {
                  this.state = 4104;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  do {
                    {
                      {
                        this.state = 4103;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4106;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  } while (_la === 192);
                }
                break;
            }
            this.state = 4110;
            this.calculationUsageDeclaration();
            this.state = 4111;
            this.calculationBody();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actorMember() {
    let localContext = new ActorMemberContext(this.context, this.state);
    this.enterRule(localContext, 788, _SysMLv2Parser.RULE_actorMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4115;
        this.memberPrefix();
        this.state = 4116;
        this.actorUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  actorUsage() {
    let localContext = new ActorUsageContext(this.context, this.state);
    this.enterRule(localContext, 790, _SysMLv2Parser.RULE_actorUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4118;
        this.match(_SysMLv2Parser.ACTOR);
        this.state = 4122;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 4119;
              this.usageExtensionKeyword();
            }
          }
          this.state = 4124;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 4125;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stakeholderMember() {
    let localContext = new StakeholderMemberContext(this.context, this.state);
    this.enterRule(localContext, 792, _SysMLv2Parser.RULE_stakeholderMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4127;
        this.memberPrefix();
        this.state = 4128;
        this.stakeholderUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  stakeholderUsage() {
    let localContext = new StakeholderUsageContext(this.context, this.state);
    this.enterRule(localContext, 794, _SysMLv2Parser.RULE_stakeholderUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4130;
        this.match(_SysMLv2Parser.STAKEHOLDER);
        this.state = 4134;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 4131;
              this.usageExtensionKeyword();
            }
          }
          this.state = 4136;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 4137;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementUsage() {
    let localContext = new RequirementUsageContext(this.context, this.state);
    this.enterRule(localContext, 796, _SysMLv2Parser.RULE_requirementUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4139;
        this.occurrenceUsagePrefix();
        this.state = 4140;
        this.match(_SysMLv2Parser.REQUIREMENT);
        this.state = 4141;
        this.constraintUsageDeclaration();
        this.state = 4142;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  satisfyRequirementUsage() {
    let localContext = new SatisfyRequirementUsageContext(this.context, this.state);
    this.enterRule(localContext, 798, _SysMLv2Parser.RULE_satisfyRequirementUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4144;
        this.occurrenceUsagePrefix();
        this.state = 4150;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.ASSERT:
            {
              this.state = 4145;
              this.match(_SysMLv2Parser.ASSERT);
              this.state = 4147;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 107) {
                {
                  this.state = 4146;
                  this.match(_SysMLv2Parser.NOT);
                }
              }
            }
            break;
          case _SysMLv2Parser.NOT:
            {
              this.state = 4149;
              this.match(_SysMLv2Parser.NOT);
            }
            break;
          case _SysMLv2Parser.SATISFY:
            break;
          default:
            break;
        }
        this.state = 4152;
        this.match(_SysMLv2Parser.SATISFY);
        this.state = 4161;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 4153;
              this.ownedReferenceSubsetting();
              this.state = 4155;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
                {
                  this.state = 4154;
                  this.featureSpecializationPart();
                }
              }
            }
            break;
          case _SysMLv2Parser.REQUIREMENT:
            {
              this.state = 4157;
              this.match(_SysMLv2Parser.REQUIREMENT);
              this.state = 4159;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
                {
                  this.state = 4158;
                  this.usageDeclaration();
                }
              }
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 4164;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 4163;
            this.valuePart();
          }
        }
        this.state = 4168;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 24) {
          {
            this.state = 4166;
            this.match(_SysMLv2Parser.BY);
            this.state = 4167;
            this.satisfactionSubjectMember();
          }
        }
        this.state = 4170;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  satisfactionSubjectMember() {
    let localContext = new SatisfactionSubjectMemberContext(this.context, this.state);
    this.enterRule(localContext, 800, _SysMLv2Parser.RULE_satisfactionSubjectMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4172;
        this.satisfactionParameter();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  satisfactionParameter() {
    let localContext = new SatisfactionParameterContext(this.context, this.state);
    this.enterRule(localContext, 802, _SysMLv2Parser.RULE_satisfactionParameter);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4174;
        this.satisfactionFeatureValue();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  satisfactionFeatureValue() {
    let localContext = new SatisfactionFeatureValueContext(this.context, this.state);
    this.enterRule(localContext, 804, _SysMLv2Parser.RULE_satisfactionFeatureValue);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4176;
        this.satisfactionReferenceExpression();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  satisfactionReferenceExpression() {
    let localContext = new SatisfactionReferenceExpressionContext(this.context, this.state);
    this.enterRule(localContext, 806, _SysMLv2Parser.RULE_satisfactionReferenceExpression);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4178;
        this.featureChainMember();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  concernDefinition() {
    let localContext = new ConcernDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 808, _SysMLv2Parser.RULE_concernDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4180;
        this.occurrenceDefinitionPrefix();
        this.state = 4181;
        this.match(_SysMLv2Parser.CONCERN);
        this.state = 4182;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4183;
        this.definitionDeclaration();
        this.state = 4184;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  concernUsage() {
    let localContext = new ConcernUsageContext(this.context, this.state);
    this.enterRule(localContext, 810, _SysMLv2Parser.RULE_concernUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4186;
        this.occurrenceUsagePrefix();
        this.state = 4187;
        this.match(_SysMLv2Parser.CONCERN);
        this.state = 4188;
        this.constraintUsageDeclaration();
        this.state = 4189;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  caseDefinition() {
    let localContext = new CaseDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 812, _SysMLv2Parser.RULE_caseDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4191;
        this.occurrenceDefinitionPrefix();
        this.state = 4192;
        this.match(_SysMLv2Parser.CASE);
        this.state = 4193;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4194;
        this.definitionDeclaration();
        this.state = 4195;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  caseUsage() {
    let localContext = new CaseUsageContext(this.context, this.state);
    this.enterRule(localContext, 814, _SysMLv2Parser.RULE_caseUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4197;
        this.occurrenceUsagePrefix();
        this.state = 4198;
        this.match(_SysMLv2Parser.CASE);
        this.state = 4199;
        this.constraintUsageDeclaration();
        this.state = 4200;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  caseBody() {
    let localContext = new CaseBodyContext(this.context, this.state);
    this.enterRule(localContext, 816, _SysMLv2Parser.RULE_caseBody);
    let _la;
    try {
      let alternative;
      this.state = 4214;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4202;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4203;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 4207;
            this.errorHandler.sync(this);
            alternative = this.interpreter.adaptivePredict(this.tokenStream, 469, this.context);
            while (alternative !== 2 && alternative !== ATN.INVALID_ALT_NUMBER) {
              if (alternative === 1) {
                {
                  {
                    this.state = 4204;
                    this.caseBodyItem();
                  }
                }
              }
              this.state = 4209;
              this.errorHandler.sync(this);
              alternative = this.interpreter.adaptivePredict(this.tokenStream, 469, this.context);
            }
            this.state = 4211;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 8 || _la === 20 || (_la - 42 & ~31) === 0 && (1 << _la - 42 & 12582913) !== 0 || (_la - 75 & ~31) === 0 && (1 << _la - 75 & 1414791685) !== 0 || (_la - 107 & ~31) === 0 && (1 << _la - 107 & 245763) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1073153) !== 0 || (_la - 191 & ~31) === 0 && (1 << _la - 191 & 4236772773) !== 0 || _la === 223) {
              {
                this.state = 4210;
                this.resultExpressionMember();
              }
            }
            this.state = 4213;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  caseBodyItem() {
    let localContext = new CaseBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 818, _SysMLv2Parser.RULE_caseBodyItem);
    try {
      this.state = 4221;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 472, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4216;
            this.actionBodyItem();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4217;
            this.returnParameterMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 4218;
            this.subjectMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 4219;
            this.actorMember();
          }
          break;
        case 5:
          this.enterOuterAlt(localContext, 5);
          {
            this.state = 4220;
            this.objectiveMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  objectiveMember() {
    let localContext = new ObjectiveMemberContext(this.context, this.state);
    this.enterRule(localContext, 820, _SysMLv2Parser.RULE_objectiveMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4223;
        this.memberPrefix();
        this.state = 4224;
        this.match(_SysMLv2Parser.OBJECTIVE);
        this.state = 4225;
        this.objectiveRequirementUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  objectiveRequirementUsage() {
    let localContext = new ObjectiveRequirementUsageContext(this.context, this.state);
    this.enterRule(localContext, 822, _SysMLv2Parser.RULE_objectiveRequirementUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4230;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 4227;
              this.usageExtensionKeyword();
            }
          }
          this.state = 4232;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 4233;
        this.constraintUsageDeclaration();
        this.state = 4234;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  analysisCaseDefinition() {
    let localContext = new AnalysisCaseDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 824, _SysMLv2Parser.RULE_analysisCaseDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4236;
        this.occurrenceDefinitionPrefix();
        this.state = 4237;
        this.match(_SysMLv2Parser.ANALYSIS);
        this.state = 4238;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4239;
        this.definitionDeclaration();
        this.state = 4240;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  analysisCaseUsage() {
    let localContext = new AnalysisCaseUsageContext(this.context, this.state);
    this.enterRule(localContext, 826, _SysMLv2Parser.RULE_analysisCaseUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4242;
        this.occurrenceUsagePrefix();
        this.state = 4243;
        this.match(_SysMLv2Parser.ANALYSIS);
        this.state = 4244;
        this.constraintUsageDeclaration();
        this.state = 4245;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  verificationCaseDefinition() {
    let localContext = new VerificationCaseDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 828, _SysMLv2Parser.RULE_verificationCaseDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4247;
        this.occurrenceDefinitionPrefix();
        this.state = 4248;
        this.match(_SysMLv2Parser.VERIFICATION);
        this.state = 4249;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4250;
        this.definitionDeclaration();
        this.state = 4251;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  verificationCaseUsage() {
    let localContext = new VerificationCaseUsageContext(this.context, this.state);
    this.enterRule(localContext, 830, _SysMLv2Parser.RULE_verificationCaseUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4253;
        this.occurrenceUsagePrefix();
        this.state = 4254;
        this.match(_SysMLv2Parser.VERIFICATION);
        this.state = 4255;
        this.constraintUsageDeclaration();
        this.state = 4256;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementVerificationMember() {
    let localContext = new RequirementVerificationMemberContext(this.context, this.state);
    this.enterRule(localContext, 832, _SysMLv2Parser.RULE_requirementVerificationMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4258;
        this.memberPrefix();
        this.state = 4259;
        this.match(_SysMLv2Parser.VERIFY);
        this.state = 4260;
        this.requirementVerificationUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  requirementVerificationUsage() {
    let localContext = new RequirementVerificationUsageContext(this.context, this.state);
    this.enterRule(localContext, 834, _SysMLv2Parser.RULE_requirementVerificationUsage);
    let _la;
    try {
      this.state = 4288;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.DOLLAR:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4262;
            this.ownedReferenceSubsetting();
            this.state = 4266;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while (_la === 42 || _la === 47 || (_la - 125 & ~31) === 0 && (1 << _la - 125 & 8388617) !== 0 || (_la - 158 & ~31) === 0 && (1 << _la - 158 & 1208352769) !== 0 || _la === 204) {
              {
                {
                  this.state = 4263;
                  this.featureSpecialization();
                }
              }
              this.state = 4268;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 4269;
            this.requirementBody();
          }
          break;
        case _SysMLv2Parser.REQUIREMENT:
        case _SysMLv2Parser.HASH:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4283;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 477, this.context)) {
              case 1:
                {
                  this.state = 4274;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  while (_la === 192) {
                    {
                      {
                        this.state = 4271;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4276;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  }
                  this.state = 4277;
                  this.match(_SysMLv2Parser.REQUIREMENT);
                }
                break;
              case 2:
                {
                  this.state = 4279;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  do {
                    {
                      {
                        this.state = 4278;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4281;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  } while (_la === 192);
                }
                break;
            }
            this.state = 4285;
            this.constraintUsageDeclaration();
            this.state = 4286;
            this.requirementBody();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  useCaseDefinition() {
    let localContext = new UseCaseDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 836, _SysMLv2Parser.RULE_useCaseDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4290;
        this.occurrenceDefinitionPrefix();
        this.state = 4291;
        this.match(_SysMLv2Parser.USE);
        this.state = 4292;
        this.match(_SysMLv2Parser.CASE);
        this.state = 4293;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4294;
        this.definitionDeclaration();
        this.state = 4295;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  useCaseUsage() {
    let localContext = new UseCaseUsageContext(this.context, this.state);
    this.enterRule(localContext, 838, _SysMLv2Parser.RULE_useCaseUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4297;
        this.occurrenceUsagePrefix();
        this.state = 4298;
        this.match(_SysMLv2Parser.USE);
        this.state = 4299;
        this.match(_SysMLv2Parser.CASE);
        this.state = 4300;
        this.constraintUsageDeclaration();
        this.state = 4301;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  includeUseCaseUsage() {
    let localContext = new IncludeUseCaseUsageContext(this.context, this.state);
    this.enterRule(localContext, 840, _SysMLv2Parser.RULE_includeUseCaseUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4303;
        this.occurrenceUsagePrefix();
        this.state = 4304;
        this.match(_SysMLv2Parser.INCLUDE);
        this.state = 4314;
        this.errorHandler.sync(this);
        switch (this.tokenStream.LA(1)) {
          case _SysMLv2Parser.BEHAVIOR:
          case _SysMLv2Parser.CROSSES:
          case _SysMLv2Parser.FEATURE:
          case _SysMLv2Parser.FUNCTION:
          case _SysMLv2Parser.INTERACTION:
          case _SysMLv2Parser.LANGUAGE:
          case _SysMLv2Parser.LOCALE:
          case _SysMLv2Parser.MEMBER:
          case _SysMLv2Parser.METACLASS:
          case _SysMLv2Parser.MULTIPLICITY:
          case _SysMLv2Parser.PREDICATE:
          case _SysMLv2Parser.STEP:
          case _SysMLv2Parser.TYPE:
          case _SysMLv2Parser.VAR:
          case _SysMLv2Parser.DOLLAR:
          case _SysMLv2Parser.IDENTIFIER:
          case _SysMLv2Parser.STRING:
            {
              this.state = 4305;
              this.ownedReferenceSubsetting();
              this.state = 4307;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
                {
                  this.state = 4306;
                  this.featureSpecializationPart();
                }
              }
            }
            break;
          case _SysMLv2Parser.USE:
            {
              this.state = 4309;
              this.match(_SysMLv2Parser.USE);
              this.state = 4310;
              this.match(_SysMLv2Parser.CASE);
              this.state = 4312;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
              if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
                {
                  this.state = 4311;
                  this.usageDeclaration();
                }
              }
            }
            break;
          default:
            throw new NoViableAltException(this);
        }
        this.state = 4317;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 4316;
            this.valuePart();
          }
        }
        this.state = 4319;
        this.caseBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewDefinition() {
    let localContext = new ViewDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 842, _SysMLv2Parser.RULE_viewDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4321;
        this.occurrenceDefinitionPrefix();
        this.state = 4322;
        this.match(_SysMLv2Parser.VIEW);
        this.state = 4323;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4324;
        this.definitionDeclaration();
        this.state = 4325;
        this.viewDefinitionBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewDefinitionBody() {
    let localContext = new ViewDefinitionBodyContext(this.context, this.state);
    this.enterRule(localContext, 844, _SysMLv2Parser.RULE_viewDefinitionBody);
    let _la;
    try {
      this.state = 4336;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4327;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4328;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 4332;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182289556) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 490981169) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948238905) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 129 & ~31) === 0 && (1 << _la - 129 & 833122647) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458591) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 4329;
                  this.viewDefinitionBodyItem();
                }
              }
              this.state = 4334;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 4335;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewDefinitionBodyItem() {
    let localContext = new ViewDefinitionBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 846, _SysMLv2Parser.RULE_viewDefinitionBodyItem);
    try {
      this.state = 4341;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 485, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4338;
            this.definitionBodyItem();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4339;
            this.elementFilterMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 4340;
            this.viewRenderingMember();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewRenderingMember() {
    let localContext = new ViewRenderingMemberContext(this.context, this.state);
    this.enterRule(localContext, 848, _SysMLv2Parser.RULE_viewRenderingMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4343;
        this.memberPrefix();
        this.state = 4344;
        this.match(_SysMLv2Parser.RENDER);
        this.state = 4345;
        this.viewRenderingUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewRenderingUsage() {
    let localContext = new ViewRenderingUsageContext(this.context, this.state);
    this.enterRule(localContext, 850, _SysMLv2Parser.RULE_viewRenderingUsage);
    let _la;
    try {
      this.state = 4368;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.BEHAVIOR:
        case _SysMLv2Parser.CROSSES:
        case _SysMLv2Parser.FEATURE:
        case _SysMLv2Parser.FUNCTION:
        case _SysMLv2Parser.INTERACTION:
        case _SysMLv2Parser.LANGUAGE:
        case _SysMLv2Parser.LOCALE:
        case _SysMLv2Parser.MEMBER:
        case _SysMLv2Parser.METACLASS:
        case _SysMLv2Parser.MULTIPLICITY:
        case _SysMLv2Parser.PREDICATE:
        case _SysMLv2Parser.STEP:
        case _SysMLv2Parser.TYPE:
        case _SysMLv2Parser.VAR:
        case _SysMLv2Parser.DOLLAR:
        case _SysMLv2Parser.IDENTIFIER:
        case _SysMLv2Parser.STRING:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4347;
            this.ownedReferenceSubsetting();
            this.state = 4349;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
              {
                this.state = 4348;
                this.featureSpecializationPart();
              }
            }
            this.state = 4351;
            this.usageBody();
          }
          break;
        case _SysMLv2Parser.RENDERING:
        case _SysMLv2Parser.HASH:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4365;
            this.errorHandler.sync(this);
            switch (this.interpreter.adaptivePredict(this.tokenStream, 489, this.context)) {
              case 1:
                {
                  this.state = 4356;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  while (_la === 192) {
                    {
                      {
                        this.state = 4353;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4358;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  }
                  this.state = 4359;
                  this.match(_SysMLv2Parser.RENDERING);
                }
                break;
              case 2:
                {
                  this.state = 4361;
                  this.errorHandler.sync(this);
                  _la = this.tokenStream.LA(1);
                  do {
                    {
                      {
                        this.state = 4360;
                        this.usageExtensionKeyword();
                      }
                    }
                    this.state = 4363;
                    this.errorHandler.sync(this);
                    _la = this.tokenStream.LA(1);
                  } while (_la === 192);
                }
                break;
            }
            this.state = 4367;
            this.usage();
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewUsage() {
    let localContext = new ViewUsageContext(this.context, this.state);
    this.enterRule(localContext, 852, _SysMLv2Parser.RULE_viewUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4370;
        this.occurrenceUsagePrefix();
        this.state = 4371;
        this.match(_SysMLv2Parser.VIEW);
        this.state = 4373;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 4372;
            this.usageDeclaration();
          }
        }
        this.state = 4376;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 4375;
            this.valuePart();
          }
        }
        this.state = 4378;
        this.viewBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewBody() {
    let localContext = new ViewBodyContext(this.context, this.state);
    this.enterRule(localContext, 854, _SysMLv2Parser.RULE_viewBody);
    let _la;
    try {
      this.state = 4389;
      this.errorHandler.sync(this);
      switch (this.tokenStream.LA(1)) {
        case _SysMLv2Parser.SEMI:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4380;
            this.match(_SysMLv2Parser.SEMI);
          }
          break;
        case _SysMLv2Parser.LBRACE:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4381;
            this.match(_SysMLv2Parser.LBRACE);
            this.state = 4385;
            this.errorHandler.sync(this);
            _la = this.tokenStream.LA(1);
            while ((_la & ~31) === 0 && (1 << _la & 1182289556) !== 0 || (_la - 32 & ~31) === 0 && (1 << _la - 32 & 1564722993) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1948238905) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 3749127797) !== 0 || (_la - 129 & ~31) === 0 && (1 << _la - 129 & 833122647) !== 0 || (_la - 162 & ~31) === 0 && (1 << _la - 162 & 1153458591) !== 0 || (_la - 204 & ~31) === 0 && (1 << _la - 204 & 574671) !== 0) {
              {
                {
                  this.state = 4382;
                  this.viewBodyItem();
                }
              }
              this.state = 4387;
              this.errorHandler.sync(this);
              _la = this.tokenStream.LA(1);
            }
            this.state = 4388;
            this.match(_SysMLv2Parser.RBRACE);
          }
          break;
        default:
          throw new NoViableAltException(this);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewBodyItem() {
    let localContext = new ViewBodyItemContext(this.context, this.state);
    this.enterRule(localContext, 856, _SysMLv2Parser.RULE_viewBodyItem);
    try {
      this.state = 4395;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 495, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4391;
            this.definitionBodyItem();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4392;
            this.elementFilterMember();
          }
          break;
        case 3:
          this.enterOuterAlt(localContext, 3);
          {
            this.state = 4393;
            this.viewRenderingMember();
          }
          break;
        case 4:
          this.enterOuterAlt(localContext, 4);
          {
            this.state = 4394;
            this.expose();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  expose() {
    let localContext = new ExposeContext(this.context, this.state);
    this.enterRule(localContext, 858, _SysMLv2Parser.RULE_expose);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4397;
        this.match(_SysMLv2Parser.EXPOSE);
        this.state = 4400;
        this.errorHandler.sync(this);
        switch (this.interpreter.adaptivePredict(this.tokenStream, 496, this.context)) {
          case 1:
            {
              this.state = 4398;
              this.membershipExpose();
            }
            break;
          case 2:
            {
              this.state = 4399;
              this.namespaceExpose();
            }
            break;
        }
        this.state = 4402;
        this.relationshipBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  membershipExpose() {
    let localContext = new MembershipExposeContext(this.context, this.state);
    this.enterRule(localContext, 860, _SysMLv2Parser.RULE_membershipExpose);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4404;
        this.membershipImport();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceExpose() {
    let localContext = new NamespaceExposeContext(this.context, this.state);
    this.enterRule(localContext, 862, _SysMLv2Parser.RULE_namespaceExpose);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4406;
        this.namespaceImport();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewpointDefinition() {
    let localContext = new ViewpointDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 864, _SysMLv2Parser.RULE_viewpointDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4408;
        this.occurrenceDefinitionPrefix();
        this.state = 4409;
        this.match(_SysMLv2Parser.VIEWPOINT);
        this.state = 4410;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4411;
        this.definitionDeclaration();
        this.state = 4412;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  viewpointUsage() {
    let localContext = new ViewpointUsageContext(this.context, this.state);
    this.enterRule(localContext, 866, _SysMLv2Parser.RULE_viewpointUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4414;
        this.occurrenceUsagePrefix();
        this.state = 4415;
        this.match(_SysMLv2Parser.VIEWPOINT);
        this.state = 4416;
        this.constraintUsageDeclaration();
        this.state = 4417;
        this.requirementBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  renderingDefinition() {
    let localContext = new RenderingDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 868, _SysMLv2Parser.RULE_renderingDefinition);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4419;
        this.occurrenceDefinitionPrefix();
        this.state = 4420;
        this.match(_SysMLv2Parser.RENDERING);
        this.state = 4421;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4422;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  renderingUsage() {
    let localContext = new RenderingUsageContext(this.context, this.state);
    this.enterRule(localContext, 870, _SysMLv2Parser.RULE_renderingUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4424;
        this.occurrenceUsagePrefix();
        this.state = 4425;
        this.match(_SysMLv2Parser.RENDERING);
        this.state = 4426;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataDefinition() {
    let localContext = new MetadataDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 872, _SysMLv2Parser.RULE_metadataDefinition);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4429;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2) {
          {
            this.state = 4428;
            this.match(_SysMLv2Parser.ABSTRACT);
          }
        }
        this.state = 4434;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        while (_la === 192) {
          {
            {
              this.state = 4431;
              this.definitionExtensionKeyword();
            }
          }
          this.state = 4436;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        }
        this.state = 4437;
        this.match(_SysMLv2Parser.METADATA);
        this.state = 4438;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4439;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  prefixMetadataUsage() {
    let localContext = new PrefixMetadataUsageContext(this.context, this.state);
    this.enterRule(localContext, 874, _SysMLv2Parser.RULE_prefixMetadataUsage);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4441;
        this.ownedFeatureTyping();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataBodyUsageMember() {
    let localContext = new MetadataBodyUsageMemberContext(this.context, this.state);
    this.enterRule(localContext, 876, _SysMLv2Parser.RULE_metadataBodyUsageMember);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4443;
        this.metadataBodyUsage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  metadataBodyUsage() {
    let localContext = new MetadataBodyUsageContext(this.context, this.state);
    this.enterRule(localContext, 878, _SysMLv2Parser.RULE_metadataBodyUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4446;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 127) {
          {
            this.state = 4445;
            this.match(_SysMLv2Parser.REF);
          }
        }
        this.state = 4449;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 125 || _la === 176) {
          {
            this.state = 4448;
            _la = this.tokenStream.LA(1);
            if (!(_la === 125 || _la === 176)) {
              this.errorHandler.recoverInline(this);
            } else {
              this.errorHandler.reportMatch(this);
              this.consume();
            }
          }
        }
        this.state = 4451;
        this.ownedRedefinition();
        this.state = 4453;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 42 || _la === 47 || (_la - 106 & ~31) === 0 && (1 << _la - 106 & 4718721) !== 0 || (_la - 148 & ~31) === 0 && (1 << _la - 148 & 402654209) !== 0 || (_la - 185 & ~31) === 0 && (1 << _la - 185 & 67633161) !== 0) {
          {
            this.state = 4452;
            this.featureSpecializationPart();
          }
        }
        this.state = 4456;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 4455;
            this.valuePart();
          }
        }
        this.state = 4458;
        this.metadataBody();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  extendedDefinition() {
    let localContext = new ExtendedDefinitionContext(this.context, this.state);
    this.enterRule(localContext, 880, _SysMLv2Parser.RULE_extendedDefinition);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4461;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 2 || _la === 165) {
          {
            this.state = 4460;
            this.basicDefinitionPrefix();
          }
        }
        this.state = 4464;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        do {
          {
            {
              this.state = 4463;
              this.definitionExtensionKeyword();
            }
          }
          this.state = 4466;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        } while (_la === 192);
        this.state = 4468;
        this.match(_SysMLv2Parser.DEF);
        this.state = 4469;
        this.definition();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  extendedUsage() {
    let localContext = new ExtendedUsageContext(this.context, this.state);
    this.enterRule(localContext, 882, _SysMLv2Parser.RULE_extendedUsage);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4471;
        this.unextendedUsagePrefix();
        this.state = 4473;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        do {
          {
            {
              this.state = 4472;
              this.usageExtensionKeyword();
            }
          }
          this.state = 4475;
          this.errorHandler.sync(this);
          _la = this.tokenStream.LA(1);
        } while (_la === 192);
        this.state = 4477;
        this.usage();
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  filterPackageImportDeclaration() {
    let localContext = new FilterPackageImportDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 884, _SysMLv2Parser.RULE_filterPackageImportDeclaration);
    try {
      this.state = 4481;
      this.errorHandler.sync(this);
      switch (this.interpreter.adaptivePredict(this.tokenStream, 506, this.context)) {
        case 1:
          this.enterOuterAlt(localContext, 1);
          {
            this.state = 4479;
            this.membershipImport();
          }
          break;
        case 2:
          this.enterOuterAlt(localContext, 2);
          {
            this.state = 4480;
            this.namespaceImportDirect();
          }
          break;
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  namespaceImportDirect() {
    let localContext = new NamespaceImportDirectContext(this.context, this.state);
    this.enterRule(localContext, 886, _SysMLv2Parser.RULE_namespaceImportDirect);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4483;
        this.qualifiedName();
        this.state = 4484;
        this.match(_SysMLv2Parser.COLON_COLON);
        this.state = 4485;
        this.match(_SysMLv2Parser.STAR);
        this.state = 4488;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 183) {
          {
            this.state = 4486;
            this.match(_SysMLv2Parser.COLON_COLON);
            this.state = 4487;
            this.match(_SysMLv2Parser.STAR_STAR);
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  calculationUsageDeclaration() {
    let localContext = new CalculationUsageDeclarationContext(this.context, this.state);
    this.enterRule(localContext, 888, _SysMLv2Parser.RULE_calculationUsageDeclaration);
    let _la;
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4491;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if ((_la - 20 & ~31) === 0 && (1 << _la - 20 & 138412033) !== 0 || (_la - 65 & ~31) === 0 && (1 << _la - 65 & 1342702593) !== 0 || (_la - 97 & ~31) === 0 && (1 << _la - 97 & 2432762449) !== 0 || (_la - 143 & ~31) === 0 && (1 << _la - 143 & 1097761) !== 0 || (_la - 175 & ~31) === 0 && (1 << _la - 175 & 2684363779) !== 0 || (_la - 211 & ~31) === 0 && (1 << _la - 211 & 385) !== 0) {
          {
            this.state = 4490;
            this.usageDeclaration();
          }
        }
        this.state = 4494;
        this.errorHandler.sync(this);
        _la = this.tokenStream.LA(1);
        if (_la === 46 || _la === 184 || _la === 207) {
          {
            this.state = 4493;
            this.valuePart();
          }
        }
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  emptyActionUsage_() {
    let localContext = new EmptyActionUsage_Context(this.context, this.state);
    this.enterRule(localContext, 890, _SysMLv2Parser.RULE_emptyActionUsage_);
    try {
      this.enterOuterAlt(localContext, 1);
      {
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  emptyFeature_() {
    let localContext = new EmptyFeature_Context(this.context, this.state);
    this.enterRule(localContext, 892, _SysMLv2Parser.RULE_emptyFeature_);
    try {
      this.enterOuterAlt(localContext, 1);
      {
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  emptyMultiplicity_() {
    let localContext = new EmptyMultiplicity_Context(this.context, this.state);
    this.enterRule(localContext, 894, _SysMLv2Parser.RULE_emptyMultiplicity_);
    try {
      this.enterOuterAlt(localContext, 1);
      {
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  emptyUsage_() {
    let localContext = new EmptyUsage_Context(this.context, this.state);
    this.enterRule(localContext, 896, _SysMLv2Parser.RULE_emptyUsage_);
    try {
      this.enterOuterAlt(localContext, 1);
      {
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  filterPackageImport() {
    let localContext = new FilterPackageImportContext(this.context, this.state);
    this.enterRule(localContext, 898, _SysMLv2Parser.RULE_filterPackageImport);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4504;
        this.match(_SysMLv2Parser.IDENTIFIER);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  nonFeatureChainPrimaryExpression() {
    let localContext = new NonFeatureChainPrimaryExpressionContext(this.context, this.state);
    this.enterRule(localContext, 900, _SysMLv2Parser.RULE_nonFeatureChainPrimaryExpression);
    try {
      this.enterOuterAlt(localContext, 1);
      {
        this.state = 4506;
        this.match(_SysMLv2Parser.IDENTIFIER);
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  portConjugation() {
    let localContext = new PortConjugationContext(this.context, this.state);
    this.enterRule(localContext, 902, _SysMLv2Parser.RULE_portConjugation);
    try {
      this.enterOuterAlt(localContext, 1);
      {
      }
    } catch (re) {
      if (re instanceof RecognitionException) {
        this.errorHandler.reportError(this, re);
        this.errorHandler.recover(this, re);
      } else {
        throw re;
      }
    } finally {
      this.exitRule();
    }
    return localContext;
  }
  sempred(localContext, ruleIndex, predIndex) {
    switch (ruleIndex) {
      case 0:
        return this.ownedExpression_sempred(localContext, predIndex);
    }
    return true;
  }
  ownedExpression_sempred(localContext, predIndex) {
    switch (predIndex) {
      case 0:
        return this.precpred(this.context, 27);
      case 1:
        return this.precpred(this.context, 26);
      case 2:
        return this.precpred(this.context, 25);
      case 3:
        return this.precpred(this.context, 24);
      case 4:
        return this.precpred(this.context, 23);
      case 5:
        return this.precpred(this.context, 22);
      case 6:
        return this.precpred(this.context, 21);
      case 7:
        return this.precpred(this.context, 20);
      case 8:
        return this.precpred(this.context, 19);
      case 9:
        return this.precpred(this.context, 18);
      case 10:
        return this.precpred(this.context, 17);
      case 11:
        return this.precpred(this.context, 16);
      case 12:
        return this.precpred(this.context, 15);
      case 13:
        return this.precpred(this.context, 12);
      case 14:
        return this.precpred(this.context, 11);
      case 15:
        return this.precpred(this.context, 10);
      case 16:
        return this.precpred(this.context, 9);
      case 17:
        return this.precpred(this.context, 8);
      case 18:
        return this.precpred(this.context, 7);
      case 19:
        return this.precpred(this.context, 6);
      case 20:
        return this.precpred(this.context, 5);
      case 21:
        return this.precpred(this.context, 4);
      case 22:
        return this.precpred(this.context, 3);
    }
    return true;
  }
  static _serializedATN = [
    4,
    1,
    226,
    4511,
    2,
    0,
    7,
    0,
    2,
    1,
    7,
    1,
    2,
    2,
    7,
    2,
    2,
    3,
    7,
    3,
    2,
    4,
    7,
    4,
    2,
    5,
    7,
    5,
    2,
    6,
    7,
    6,
    2,
    7,
    7,
    7,
    2,
    8,
    7,
    8,
    2,
    9,
    7,
    9,
    2,
    10,
    7,
    10,
    2,
    11,
    7,
    11,
    2,
    12,
    7,
    12,
    2,
    13,
    7,
    13,
    2,
    14,
    7,
    14,
    2,
    15,
    7,
    15,
    2,
    16,
    7,
    16,
    2,
    17,
    7,
    17,
    2,
    18,
    7,
    18,
    2,
    19,
    7,
    19,
    2,
    20,
    7,
    20,
    2,
    21,
    7,
    21,
    2,
    22,
    7,
    22,
    2,
    23,
    7,
    23,
    2,
    24,
    7,
    24,
    2,
    25,
    7,
    25,
    2,
    26,
    7,
    26,
    2,
    27,
    7,
    27,
    2,
    28,
    7,
    28,
    2,
    29,
    7,
    29,
    2,
    30,
    7,
    30,
    2,
    31,
    7,
    31,
    2,
    32,
    7,
    32,
    2,
    33,
    7,
    33,
    2,
    34,
    7,
    34,
    2,
    35,
    7,
    35,
    2,
    36,
    7,
    36,
    2,
    37,
    7,
    37,
    2,
    38,
    7,
    38,
    2,
    39,
    7,
    39,
    2,
    40,
    7,
    40,
    2,
    41,
    7,
    41,
    2,
    42,
    7,
    42,
    2,
    43,
    7,
    43,
    2,
    44,
    7,
    44,
    2,
    45,
    7,
    45,
    2,
    46,
    7,
    46,
    2,
    47,
    7,
    47,
    2,
    48,
    7,
    48,
    2,
    49,
    7,
    49,
    2,
    50,
    7,
    50,
    2,
    51,
    7,
    51,
    2,
    52,
    7,
    52,
    2,
    53,
    7,
    53,
    2,
    54,
    7,
    54,
    2,
    55,
    7,
    55,
    2,
    56,
    7,
    56,
    2,
    57,
    7,
    57,
    2,
    58,
    7,
    58,
    2,
    59,
    7,
    59,
    2,
    60,
    7,
    60,
    2,
    61,
    7,
    61,
    2,
    62,
    7,
    62,
    2,
    63,
    7,
    63,
    2,
    64,
    7,
    64,
    2,
    65,
    7,
    65,
    2,
    66,
    7,
    66,
    2,
    67,
    7,
    67,
    2,
    68,
    7,
    68,
    2,
    69,
    7,
    69,
    2,
    70,
    7,
    70,
    2,
    71,
    7,
    71,
    2,
    72,
    7,
    72,
    2,
    73,
    7,
    73,
    2,
    74,
    7,
    74,
    2,
    75,
    7,
    75,
    2,
    76,
    7,
    76,
    2,
    77,
    7,
    77,
    2,
    78,
    7,
    78,
    2,
    79,
    7,
    79,
    2,
    80,
    7,
    80,
    2,
    81,
    7,
    81,
    2,
    82,
    7,
    82,
    2,
    83,
    7,
    83,
    2,
    84,
    7,
    84,
    2,
    85,
    7,
    85,
    2,
    86,
    7,
    86,
    2,
    87,
    7,
    87,
    2,
    88,
    7,
    88,
    2,
    89,
    7,
    89,
    2,
    90,
    7,
    90,
    2,
    91,
    7,
    91,
    2,
    92,
    7,
    92,
    2,
    93,
    7,
    93,
    2,
    94,
    7,
    94,
    2,
    95,
    7,
    95,
    2,
    96,
    7,
    96,
    2,
    97,
    7,
    97,
    2,
    98,
    7,
    98,
    2,
    99,
    7,
    99,
    2,
    100,
    7,
    100,
    2,
    101,
    7,
    101,
    2,
    102,
    7,
    102,
    2,
    103,
    7,
    103,
    2,
    104,
    7,
    104,
    2,
    105,
    7,
    105,
    2,
    106,
    7,
    106,
    2,
    107,
    7,
    107,
    2,
    108,
    7,
    108,
    2,
    109,
    7,
    109,
    2,
    110,
    7,
    110,
    2,
    111,
    7,
    111,
    2,
    112,
    7,
    112,
    2,
    113,
    7,
    113,
    2,
    114,
    7,
    114,
    2,
    115,
    7,
    115,
    2,
    116,
    7,
    116,
    2,
    117,
    7,
    117,
    2,
    118,
    7,
    118,
    2,
    119,
    7,
    119,
    2,
    120,
    7,
    120,
    2,
    121,
    7,
    121,
    2,
    122,
    7,
    122,
    2,
    123,
    7,
    123,
    2,
    124,
    7,
    124,
    2,
    125,
    7,
    125,
    2,
    126,
    7,
    126,
    2,
    127,
    7,
    127,
    2,
    128,
    7,
    128,
    2,
    129,
    7,
    129,
    2,
    130,
    7,
    130,
    2,
    131,
    7,
    131,
    2,
    132,
    7,
    132,
    2,
    133,
    7,
    133,
    2,
    134,
    7,
    134,
    2,
    135,
    7,
    135,
    2,
    136,
    7,
    136,
    2,
    137,
    7,
    137,
    2,
    138,
    7,
    138,
    2,
    139,
    7,
    139,
    2,
    140,
    7,
    140,
    2,
    141,
    7,
    141,
    2,
    142,
    7,
    142,
    2,
    143,
    7,
    143,
    2,
    144,
    7,
    144,
    2,
    145,
    7,
    145,
    2,
    146,
    7,
    146,
    2,
    147,
    7,
    147,
    2,
    148,
    7,
    148,
    2,
    149,
    7,
    149,
    2,
    150,
    7,
    150,
    2,
    151,
    7,
    151,
    2,
    152,
    7,
    152,
    2,
    153,
    7,
    153,
    2,
    154,
    7,
    154,
    2,
    155,
    7,
    155,
    2,
    156,
    7,
    156,
    2,
    157,
    7,
    157,
    2,
    158,
    7,
    158,
    2,
    159,
    7,
    159,
    2,
    160,
    7,
    160,
    2,
    161,
    7,
    161,
    2,
    162,
    7,
    162,
    2,
    163,
    7,
    163,
    2,
    164,
    7,
    164,
    2,
    165,
    7,
    165,
    2,
    166,
    7,
    166,
    2,
    167,
    7,
    167,
    2,
    168,
    7,
    168,
    2,
    169,
    7,
    169,
    2,
    170,
    7,
    170,
    2,
    171,
    7,
    171,
    2,
    172,
    7,
    172,
    2,
    173,
    7,
    173,
    2,
    174,
    7,
    174,
    2,
    175,
    7,
    175,
    2,
    176,
    7,
    176,
    2,
    177,
    7,
    177,
    2,
    178,
    7,
    178,
    2,
    179,
    7,
    179,
    2,
    180,
    7,
    180,
    2,
    181,
    7,
    181,
    2,
    182,
    7,
    182,
    2,
    183,
    7,
    183,
    2,
    184,
    7,
    184,
    2,
    185,
    7,
    185,
    2,
    186,
    7,
    186,
    2,
    187,
    7,
    187,
    2,
    188,
    7,
    188,
    2,
    189,
    7,
    189,
    2,
    190,
    7,
    190,
    2,
    191,
    7,
    191,
    2,
    192,
    7,
    192,
    2,
    193,
    7,
    193,
    2,
    194,
    7,
    194,
    2,
    195,
    7,
    195,
    2,
    196,
    7,
    196,
    2,
    197,
    7,
    197,
    2,
    198,
    7,
    198,
    2,
    199,
    7,
    199,
    2,
    200,
    7,
    200,
    2,
    201,
    7,
    201,
    2,
    202,
    7,
    202,
    2,
    203,
    7,
    203,
    2,
    204,
    7,
    204,
    2,
    205,
    7,
    205,
    2,
    206,
    7,
    206,
    2,
    207,
    7,
    207,
    2,
    208,
    7,
    208,
    2,
    209,
    7,
    209,
    2,
    210,
    7,
    210,
    2,
    211,
    7,
    211,
    2,
    212,
    7,
    212,
    2,
    213,
    7,
    213,
    2,
    214,
    7,
    214,
    2,
    215,
    7,
    215,
    2,
    216,
    7,
    216,
    2,
    217,
    7,
    217,
    2,
    218,
    7,
    218,
    2,
    219,
    7,
    219,
    2,
    220,
    7,
    220,
    2,
    221,
    7,
    221,
    2,
    222,
    7,
    222,
    2,
    223,
    7,
    223,
    2,
    224,
    7,
    224,
    2,
    225,
    7,
    225,
    2,
    226,
    7,
    226,
    2,
    227,
    7,
    227,
    2,
    228,
    7,
    228,
    2,
    229,
    7,
    229,
    2,
    230,
    7,
    230,
    2,
    231,
    7,
    231,
    2,
    232,
    7,
    232,
    2,
    233,
    7,
    233,
    2,
    234,
    7,
    234,
    2,
    235,
    7,
    235,
    2,
    236,
    7,
    236,
    2,
    237,
    7,
    237,
    2,
    238,
    7,
    238,
    2,
    239,
    7,
    239,
    2,
    240,
    7,
    240,
    2,
    241,
    7,
    241,
    2,
    242,
    7,
    242,
    2,
    243,
    7,
    243,
    2,
    244,
    7,
    244,
    2,
    245,
    7,
    245,
    2,
    246,
    7,
    246,
    2,
    247,
    7,
    247,
    2,
    248,
    7,
    248,
    2,
    249,
    7,
    249,
    2,
    250,
    7,
    250,
    2,
    251,
    7,
    251,
    2,
    252,
    7,
    252,
    2,
    253,
    7,
    253,
    2,
    254,
    7,
    254,
    2,
    255,
    7,
    255,
    2,
    256,
    7,
    256,
    2,
    257,
    7,
    257,
    2,
    258,
    7,
    258,
    2,
    259,
    7,
    259,
    2,
    260,
    7,
    260,
    2,
    261,
    7,
    261,
    2,
    262,
    7,
    262,
    2,
    263,
    7,
    263,
    2,
    264,
    7,
    264,
    2,
    265,
    7,
    265,
    2,
    266,
    7,
    266,
    2,
    267,
    7,
    267,
    2,
    268,
    7,
    268,
    2,
    269,
    7,
    269,
    2,
    270,
    7,
    270,
    2,
    271,
    7,
    271,
    2,
    272,
    7,
    272,
    2,
    273,
    7,
    273,
    2,
    274,
    7,
    274,
    2,
    275,
    7,
    275,
    2,
    276,
    7,
    276,
    2,
    277,
    7,
    277,
    2,
    278,
    7,
    278,
    2,
    279,
    7,
    279,
    2,
    280,
    7,
    280,
    2,
    281,
    7,
    281,
    2,
    282,
    7,
    282,
    2,
    283,
    7,
    283,
    2,
    284,
    7,
    284,
    2,
    285,
    7,
    285,
    2,
    286,
    7,
    286,
    2,
    287,
    7,
    287,
    2,
    288,
    7,
    288,
    2,
    289,
    7,
    289,
    2,
    290,
    7,
    290,
    2,
    291,
    7,
    291,
    2,
    292,
    7,
    292,
    2,
    293,
    7,
    293,
    2,
    294,
    7,
    294,
    2,
    295,
    7,
    295,
    2,
    296,
    7,
    296,
    2,
    297,
    7,
    297,
    2,
    298,
    7,
    298,
    2,
    299,
    7,
    299,
    2,
    300,
    7,
    300,
    2,
    301,
    7,
    301,
    2,
    302,
    7,
    302,
    2,
    303,
    7,
    303,
    2,
    304,
    7,
    304,
    2,
    305,
    7,
    305,
    2,
    306,
    7,
    306,
    2,
    307,
    7,
    307,
    2,
    308,
    7,
    308,
    2,
    309,
    7,
    309,
    2,
    310,
    7,
    310,
    2,
    311,
    7,
    311,
    2,
    312,
    7,
    312,
    2,
    313,
    7,
    313,
    2,
    314,
    7,
    314,
    2,
    315,
    7,
    315,
    2,
    316,
    7,
    316,
    2,
    317,
    7,
    317,
    2,
    318,
    7,
    318,
    2,
    319,
    7,
    319,
    2,
    320,
    7,
    320,
    2,
    321,
    7,
    321,
    2,
    322,
    7,
    322,
    2,
    323,
    7,
    323,
    2,
    324,
    7,
    324,
    2,
    325,
    7,
    325,
    2,
    326,
    7,
    326,
    2,
    327,
    7,
    327,
    2,
    328,
    7,
    328,
    2,
    329,
    7,
    329,
    2,
    330,
    7,
    330,
    2,
    331,
    7,
    331,
    2,
    332,
    7,
    332,
    2,
    333,
    7,
    333,
    2,
    334,
    7,
    334,
    2,
    335,
    7,
    335,
    2,
    336,
    7,
    336,
    2,
    337,
    7,
    337,
    2,
    338,
    7,
    338,
    2,
    339,
    7,
    339,
    2,
    340,
    7,
    340,
    2,
    341,
    7,
    341,
    2,
    342,
    7,
    342,
    2,
    343,
    7,
    343,
    2,
    344,
    7,
    344,
    2,
    345,
    7,
    345,
    2,
    346,
    7,
    346,
    2,
    347,
    7,
    347,
    2,
    348,
    7,
    348,
    2,
    349,
    7,
    349,
    2,
    350,
    7,
    350,
    2,
    351,
    7,
    351,
    2,
    352,
    7,
    352,
    2,
    353,
    7,
    353,
    2,
    354,
    7,
    354,
    2,
    355,
    7,
    355,
    2,
    356,
    7,
    356,
    2,
    357,
    7,
    357,
    2,
    358,
    7,
    358,
    2,
    359,
    7,
    359,
    2,
    360,
    7,
    360,
    2,
    361,
    7,
    361,
    2,
    362,
    7,
    362,
    2,
    363,
    7,
    363,
    2,
    364,
    7,
    364,
    2,
    365,
    7,
    365,
    2,
    366,
    7,
    366,
    2,
    367,
    7,
    367,
    2,
    368,
    7,
    368,
    2,
    369,
    7,
    369,
    2,
    370,
    7,
    370,
    2,
    371,
    7,
    371,
    2,
    372,
    7,
    372,
    2,
    373,
    7,
    373,
    2,
    374,
    7,
    374,
    2,
    375,
    7,
    375,
    2,
    376,
    7,
    376,
    2,
    377,
    7,
    377,
    2,
    378,
    7,
    378,
    2,
    379,
    7,
    379,
    2,
    380,
    7,
    380,
    2,
    381,
    7,
    381,
    2,
    382,
    7,
    382,
    2,
    383,
    7,
    383,
    2,
    384,
    7,
    384,
    2,
    385,
    7,
    385,
    2,
    386,
    7,
    386,
    2,
    387,
    7,
    387,
    2,
    388,
    7,
    388,
    2,
    389,
    7,
    389,
    2,
    390,
    7,
    390,
    2,
    391,
    7,
    391,
    2,
    392,
    7,
    392,
    2,
    393,
    7,
    393,
    2,
    394,
    7,
    394,
    2,
    395,
    7,
    395,
    2,
    396,
    7,
    396,
    2,
    397,
    7,
    397,
    2,
    398,
    7,
    398,
    2,
    399,
    7,
    399,
    2,
    400,
    7,
    400,
    2,
    401,
    7,
    401,
    2,
    402,
    7,
    402,
    2,
    403,
    7,
    403,
    2,
    404,
    7,
    404,
    2,
    405,
    7,
    405,
    2,
    406,
    7,
    406,
    2,
    407,
    7,
    407,
    2,
    408,
    7,
    408,
    2,
    409,
    7,
    409,
    2,
    410,
    7,
    410,
    2,
    411,
    7,
    411,
    2,
    412,
    7,
    412,
    2,
    413,
    7,
    413,
    2,
    414,
    7,
    414,
    2,
    415,
    7,
    415,
    2,
    416,
    7,
    416,
    2,
    417,
    7,
    417,
    2,
    418,
    7,
    418,
    2,
    419,
    7,
    419,
    2,
    420,
    7,
    420,
    2,
    421,
    7,
    421,
    2,
    422,
    7,
    422,
    2,
    423,
    7,
    423,
    2,
    424,
    7,
    424,
    2,
    425,
    7,
    425,
    2,
    426,
    7,
    426,
    2,
    427,
    7,
    427,
    2,
    428,
    7,
    428,
    2,
    429,
    7,
    429,
    2,
    430,
    7,
    430,
    2,
    431,
    7,
    431,
    2,
    432,
    7,
    432,
    2,
    433,
    7,
    433,
    2,
    434,
    7,
    434,
    2,
    435,
    7,
    435,
    2,
    436,
    7,
    436,
    2,
    437,
    7,
    437,
    2,
    438,
    7,
    438,
    2,
    439,
    7,
    439,
    2,
    440,
    7,
    440,
    2,
    441,
    7,
    441,
    2,
    442,
    7,
    442,
    2,
    443,
    7,
    443,
    2,
    444,
    7,
    444,
    2,
    445,
    7,
    445,
    2,
    446,
    7,
    446,
    2,
    447,
    7,
    447,
    2,
    448,
    7,
    448,
    2,
    449,
    7,
    449,
    2,
    450,
    7,
    450,
    2,
    451,
    7,
    451,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    3,
    0,
    920,
    8,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    3,
    0,
    976,
    8,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    3,
    0,
    983,
    8,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    1,
    0,
    3,
    0,
    999,
    8,
    0,
    5,
    0,
    1001,
    8,
    0,
    10,
    0,
    12,
    0,
    1004,
    9,
    0,
    1,
    1,
    1,
    1,
    1,
    2,
    1,
    2,
    1,
    2,
    5,
    2,
    1011,
    8,
    2,
    10,
    2,
    12,
    2,
    1014,
    9,
    2,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    3,
    3,
    1023,
    8,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    1,
    3,
    3,
    3,
    1034,
    8,
    3,
    1,
    3,
    3,
    3,
    1037,
    8,
    3,
    1,
    4,
    1,
    4,
    1,
    4,
    3,
    4,
    1042,
    8,
    4,
    1,
    5,
    1,
    5,
    1,
    6,
    1,
    6,
    1,
    6,
    1,
    6,
    1,
    7,
    1,
    7,
    1,
    7,
    1,
    7,
    1,
    8,
    1,
    8,
    1,
    8,
    3,
    8,
    1057,
    8,
    8,
    1,
    8,
    1,
    8,
    1,
    9,
    1,
    9,
    1,
    9,
    5,
    9,
    1064,
    8,
    9,
    10,
    9,
    12,
    9,
    1067,
    9,
    9,
    1,
    10,
    1,
    10,
    1,
    10,
    5,
    10,
    1072,
    8,
    10,
    10,
    10,
    12,
    10,
    1075,
    9,
    10,
    1,
    11,
    1,
    11,
    1,
    11,
    1,
    11,
    1,
    12,
    1,
    12,
    1,
    12,
    1,
    12,
    1,
    12,
    3,
    12,
    1086,
    8,
    12,
    1,
    13,
    1,
    13,
    1,
    14,
    1,
    14,
    1,
    15,
    1,
    15,
    1,
    16,
    1,
    16,
    1,
    17,
    1,
    17,
    1,
    18,
    1,
    18,
    1,
    19,
    1,
    19,
    1,
    20,
    1,
    20,
    1,
    20,
    3,
    20,
    1105,
    8,
    20,
    1,
    21,
    1,
    21,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    1,
    22,
    3,
    22,
    1119,
    8,
    22,
    1,
    23,
    1,
    23,
    1,
    23,
    5,
    23,
    1124,
    8,
    23,
    10,
    23,
    12,
    23,
    1127,
    9,
    23,
    1,
    23,
    1,
    23,
    1,
    23,
    5,
    23,
    1132,
    8,
    23,
    10,
    23,
    12,
    23,
    1135,
    9,
    23,
    1,
    23,
    3,
    23,
    1138,
    8,
    23,
    1,
    24,
    1,
    24,
    3,
    24,
    1142,
    8,
    24,
    1,
    25,
    1,
    25,
    3,
    25,
    1146,
    8,
    25,
    1,
    26,
    5,
    26,
    1149,
    8,
    26,
    10,
    26,
    12,
    26,
    1152,
    9,
    26,
    1,
    26,
    1,
    26,
    3,
    26,
    1156,
    8,
    26,
    1,
    26,
    3,
    26,
    1159,
    8,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    5,
    26,
    1164,
    8,
    26,
    10,
    26,
    12,
    26,
    1167,
    9,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    5,
    26,
    1173,
    8,
    26,
    10,
    26,
    12,
    26,
    1176,
    9,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    5,
    26,
    1181,
    8,
    26,
    10,
    26,
    12,
    26,
    1184,
    9,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    1,
    26,
    3,
    26,
    1190,
    8,
    26,
    1,
    27,
    1,
    27,
    1,
    28,
    1,
    28,
    1,
    29,
    1,
    29,
    1,
    29,
    1,
    29,
    3,
    29,
    1200,
    8,
    29,
    1,
    30,
    1,
    30,
    3,
    30,
    1204,
    8,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    1,
    30,
    5,
    30,
    1210,
    8,
    30,
    10,
    30,
    12,
    30,
    1213,
    9,
    30,
    3,
    30,
    1215,
    8,
    30,
    3,
    30,
    1217,
    8,
    30,
    1,
    30,
    1,
    30,
    3,
    30,
    1221,
    8,
    30,
    1,
    30,
    1,
    30,
    1,
    31,
    1,
    31,
    3,
    31,
    1227,
    8,
    31,
    1,
    31,
    1,
    31,
    3,
    31,
    1231,
    8,
    31,
    1,
    31,
    1,
    31,
    1,
    32,
    1,
    32,
    3,
    32,
    1237,
    8,
    32,
    3,
    32,
    1239,
    8,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    32,
    1,
    33,
    5,
    33,
    1246,
    8,
    33,
    10,
    33,
    12,
    33,
    1249,
    9,
    33,
    1,
    33,
    1,
    33,
    1,
    34,
    5,
    34,
    1254,
    8,
    34,
    10,
    34,
    12,
    34,
    1257,
    9,
    34,
    1,
    34,
    1,
    34,
    1,
    34,
    1,
    35,
    1,
    35,
    3,
    35,
    1264,
    8,
    35,
    1,
    36,
    1,
    36,
    1,
    36,
    5,
    36,
    1269,
    8,
    36,
    10,
    36,
    12,
    36,
    1272,
    9,
    36,
    1,
    36,
    3,
    36,
    1275,
    8,
    36,
    1,
    37,
    1,
    37,
    1,
    37,
    3,
    37,
    1280,
    8,
    37,
    1,
    38,
    3,
    38,
    1283,
    8,
    38,
    1,
    39,
    1,
    39,
    1,
    40,
    1,
    40,
    3,
    40,
    1289,
    8,
    40,
    1,
    41,
    1,
    41,
    1,
    41,
    1,
    42,
    1,
    42,
    1,
    42,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    3,
    43,
    1303,
    8,
    43,
    1,
    43,
    3,
    43,
    1306,
    8,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    43,
    1,
    44,
    1,
    44,
    3,
    44,
    1314,
    8,
    44,
    1,
    44,
    1,
    44,
    1,
    44,
    5,
    44,
    1319,
    8,
    44,
    10,
    44,
    12,
    44,
    1322,
    9,
    44,
    1,
    44,
    1,
    44,
    1,
    45,
    3,
    45,
    1327,
    8,
    45,
    1,
    45,
    1,
    45,
    3,
    45,
    1331,
    8,
    45,
    1,
    45,
    1,
    45,
    1,
    45,
    1,
    46,
    1,
    46,
    3,
    46,
    1338,
    8,
    46,
    1,
    47,
    1,
    47,
    1,
    47,
    3,
    47,
    1343,
    8,
    47,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    48,
    1,
    48,
    3,
    48,
    1350,
    8,
    48,
    1,
    48,
    3,
    48,
    1353,
    8,
    48,
    1,
    49,
    1,
    49,
    4,
    49,
    1357,
    8,
    49,
    11,
    49,
    12,
    49,
    1358,
    1,
    49,
    1,
    49,
    4,
    49,
    1363,
    8,
    49,
    11,
    49,
    12,
    49,
    1364,
    3,
    49,
    1367,
    8,
    49,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    50,
    1,
    51,
    1,
    51,
    3,
    51,
    1375,
    8,
    51,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    1,
    52,
    3,
    52,
    1403,
    8,
    52,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    1,
    53,
    3,
    53,
    1415,
    8,
    53,
    1,
    54,
    1,
    54,
    1,
    54,
    1,
    54,
    1,
    54,
    1,
    55,
    3,
    55,
    1423,
    8,
    55,
    1,
    55,
    5,
    55,
    1426,
    8,
    55,
    10,
    55,
    12,
    55,
    1429,
    9,
    55,
    1,
    56,
    3,
    56,
    1432,
    8,
    56,
    1,
    56,
    3,
    56,
    1435,
    8,
    56,
    1,
    56,
    3,
    56,
    1438,
    8,
    56,
    1,
    56,
    1,
    56,
    4,
    56,
    1442,
    8,
    56,
    11,
    56,
    12,
    56,
    1443,
    1,
    56,
    5,
    56,
    1447,
    8,
    56,
    10,
    56,
    12,
    56,
    1450,
    9,
    56,
    1,
    57,
    1,
    57,
    1,
    57,
    1,
    57,
    5,
    57,
    1456,
    8,
    57,
    10,
    57,
    12,
    57,
    1459,
    9,
    57,
    1,
    58,
    1,
    58,
    1,
    58,
    1,
    59,
    1,
    59,
    1,
    59,
    1,
    59,
    3,
    59,
    1468,
    8,
    59,
    1,
    60,
    1,
    60,
    1,
    60,
    1,
    60,
    1,
    60,
    5,
    60,
    1475,
    8,
    60,
    10,
    60,
    12,
    60,
    1478,
    9,
    60,
    1,
    61,
    1,
    61,
    1,
    61,
    1,
    61,
    5,
    61,
    1484,
    8,
    61,
    10,
    61,
    12,
    61,
    1487,
    9,
    61,
    1,
    62,
    1,
    62,
    1,
    62,
    1,
    62,
    5,
    62,
    1493,
    8,
    62,
    10,
    62,
    12,
    62,
    1496,
    9,
    62,
    1,
    63,
    1,
    63,
    1,
    63,
    1,
    63,
    5,
    63,
    1502,
    8,
    63,
    10,
    63,
    12,
    63,
    1505,
    9,
    63,
    1,
    64,
    1,
    64,
    1,
    64,
    5,
    64,
    1510,
    8,
    64,
    10,
    64,
    12,
    64,
    1513,
    9,
    64,
    1,
    64,
    3,
    64,
    1516,
    8,
    64,
    1,
    65,
    1,
    65,
    1,
    65,
    1,
    65,
    3,
    65,
    1522,
    8,
    65,
    1,
    66,
    1,
    66,
    3,
    66,
    1526,
    8,
    66,
    3,
    66,
    1528,
    8,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    66,
    1,
    67,
    1,
    67,
    1,
    68,
    1,
    68,
    1,
    68,
    5,
    68,
    1541,
    8,
    68,
    10,
    68,
    12,
    68,
    1544,
    9,
    68,
    1,
    69,
    1,
    69,
    1,
    69,
    5,
    69,
    1549,
    8,
    69,
    10,
    69,
    12,
    69,
    1552,
    9,
    69,
    1,
    70,
    1,
    70,
    3,
    70,
    1556,
    8,
    70,
    3,
    70,
    1558,
    8,
    70,
    1,
    70,
    1,
    70,
    1,
    70,
    1,
    70,
    5,
    70,
    1564,
    8,
    70,
    10,
    70,
    12,
    70,
    1567,
    9,
    70,
    1,
    70,
    1,
    70,
    1,
    70,
    1,
    70,
    5,
    70,
    1573,
    8,
    70,
    10,
    70,
    12,
    70,
    1576,
    9,
    70,
    1,
    70,
    1,
    70,
    1,
    71,
    1,
    71,
    1,
    71,
    5,
    71,
    1583,
    8,
    71,
    10,
    71,
    12,
    71,
    1586,
    9,
    71,
    1,
    72,
    1,
    72,
    3,
    72,
    1590,
    8,
    72,
    3,
    72,
    1592,
    8,
    72,
    1,
    72,
    1,
    72,
    1,
    72,
    1,
    72,
    5,
    72,
    1598,
    8,
    72,
    10,
    72,
    12,
    72,
    1601,
    9,
    72,
    1,
    72,
    1,
    72,
    1,
    72,
    1,
    72,
    5,
    72,
    1607,
    8,
    72,
    10,
    72,
    12,
    72,
    1610,
    9,
    72,
    1,
    72,
    1,
    72,
    1,
    73,
    1,
    73,
    1,
    73,
    5,
    73,
    1617,
    8,
    73,
    10,
    73,
    12,
    73,
    1620,
    9,
    73,
    1,
    74,
    1,
    74,
    1,
    74,
    5,
    74,
    1625,
    8,
    74,
    10,
    74,
    12,
    74,
    1628,
    9,
    74,
    1,
    75,
    1,
    75,
    1,
    75,
    5,
    75,
    1633,
    8,
    75,
    10,
    75,
    12,
    75,
    1636,
    9,
    75,
    1,
    76,
    1,
    76,
    1,
    76,
    5,
    76,
    1641,
    8,
    76,
    10,
    76,
    12,
    76,
    1644,
    9,
    76,
    1,
    77,
    1,
    77,
    3,
    77,
    1648,
    8,
    77,
    1,
    78,
    1,
    78,
    1,
    78,
    1,
    78,
    1,
    79,
    1,
    79,
    1,
    79,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    80,
    1,
    81,
    3,
    81,
    1663,
    8,
    81,
    1,
    81,
    3,
    81,
    1666,
    8,
    81,
    1,
    81,
    3,
    81,
    1669,
    8,
    81,
    1,
    81,
    1,
    81,
    3,
    81,
    1673,
    8,
    81,
    1,
    81,
    5,
    81,
    1676,
    8,
    81,
    10,
    81,
    12,
    81,
    1679,
    9,
    81,
    1,
    82,
    1,
    82,
    1,
    82,
    1,
    82,
    5,
    82,
    1685,
    8,
    82,
    10,
    82,
    12,
    82,
    1688,
    9,
    82,
    1,
    83,
    1,
    83,
    3,
    83,
    1692,
    8,
    83,
    3,
    83,
    1694,
    8,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    83,
    1,
    84,
    1,
    84,
    1,
    85,
    1,
    85,
    1,
    85,
    3,
    85,
    1707,
    8,
    85,
    1,
    85,
    3,
    85,
    1710,
    8,
    85,
    1,
    85,
    1,
    85,
    3,
    85,
    1714,
    8,
    85,
    1,
    85,
    3,
    85,
    1717,
    8,
    85,
    1,
    85,
    1,
    85,
    3,
    85,
    1721,
    8,
    85,
    1,
    85,
    3,
    85,
    1724,
    8,
    85,
    1,
    85,
    1,
    85,
    1,
    86,
    3,
    86,
    1729,
    8,
    86,
    1,
    86,
    1,
    86,
    1,
    87,
    3,
    87,
    1734,
    8,
    87,
    1,
    87,
    3,
    87,
    1737,
    8,
    87,
    1,
    87,
    3,
    87,
    1740,
    8,
    87,
    1,
    87,
    3,
    87,
    1743,
    8,
    87,
    1,
    87,
    3,
    87,
    1746,
    8,
    87,
    1,
    88,
    1,
    88,
    1,
    88,
    1,
    88,
    3,
    88,
    1752,
    8,
    88,
    1,
    88,
    5,
    88,
    1755,
    8,
    88,
    10,
    88,
    12,
    88,
    1758,
    9,
    88,
    1,
    89,
    1,
    89,
    1,
    90,
    1,
    90,
    1,
    90,
    1,
    90,
    1,
    90,
    3,
    90,
    1767,
    8,
    90,
    3,
    90,
    1769,
    8,
    90,
    1,
    91,
    1,
    91,
    1,
    92,
    3,
    92,
    1774,
    8,
    92,
    1,
    92,
    1,
    92,
    1,
    92,
    3,
    92,
    1779,
    8,
    92,
    1,
    92,
    1,
    92,
    3,
    92,
    1783,
    8,
    92,
    1,
    92,
    5,
    92,
    1786,
    8,
    92,
    10,
    92,
    12,
    92,
    1789,
    9,
    92,
    1,
    93,
    1,
    93,
    1,
    93,
    1,
    93,
    3,
    93,
    1795,
    8,
    93,
    1,
    93,
    3,
    93,
    1798,
    8,
    93,
    1,
    94,
    1,
    94,
    1,
    94,
    1,
    94,
    3,
    94,
    1804,
    8,
    94,
    1,
    95,
    1,
    95,
    1,
    95,
    1,
    95,
    5,
    95,
    1810,
    8,
    95,
    10,
    95,
    12,
    95,
    1813,
    9,
    95,
    1,
    96,
    1,
    96,
    1,
    96,
    1,
    96,
    1,
    97,
    1,
    97,
    1,
    97,
    1,
    97,
    1,
    97,
    5,
    97,
    1824,
    8,
    97,
    10,
    97,
    12,
    97,
    1827,
    9,
    97,
    1,
    98,
    4,
    98,
    1830,
    8,
    98,
    11,
    98,
    12,
    98,
    1831,
    1,
    98,
    3,
    98,
    1835,
    8,
    98,
    1,
    98,
    5,
    98,
    1838,
    8,
    98,
    10,
    98,
    12,
    98,
    1841,
    9,
    98,
    1,
    98,
    1,
    98,
    5,
    98,
    1845,
    8,
    98,
    10,
    98,
    12,
    98,
    1848,
    9,
    98,
    3,
    98,
    1850,
    8,
    98,
    1,
    99,
    1,
    99,
    1,
    99,
    3,
    99,
    1855,
    8,
    99,
    1,
    99,
    1,
    99,
    3,
    99,
    1859,
    8,
    99,
    3,
    99,
    1861,
    8,
    99,
    1,
    99,
    1,
    99,
    3,
    99,
    1865,
    8,
    99,
    1,
    99,
    1,
    99,
    3,
    99,
    1869,
    8,
    99,
    3,
    99,
    1871,
    8,
    99,
    3,
    99,
    1873,
    8,
    99,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    1,
    100,
    3,
    100,
    1880,
    8,
    100,
    1,
    101,
    1,
    101,
    1,
    101,
    5,
    101,
    1885,
    8,
    101,
    10,
    101,
    12,
    101,
    1888,
    9,
    101,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    1,
    102,
    3,
    102,
    1895,
    8,
    102,
    1,
    102,
    1,
    102,
    1,
    103,
    1,
    103,
    1,
    103,
    5,
    103,
    1902,
    8,
    103,
    10,
    103,
    12,
    103,
    1905,
    9,
    103,
    1,
    104,
    1,
    104,
    1,
    104,
    1,
    105,
    1,
    105,
    1,
    105,
    1,
    106,
    1,
    106,
    1,
    106,
    1,
    107,
    1,
    107,
    1,
    107,
    5,
    107,
    1919,
    8,
    107,
    10,
    107,
    12,
    107,
    1922,
    9,
    107,
    1,
    108,
    1,
    108,
    1,
    108,
    1,
    109,
    1,
    109,
    3,
    109,
    1929,
    8,
    109,
    3,
    109,
    1931,
    8,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    3,
    109,
    1938,
    8,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    1,
    109,
    3,
    109,
    1945,
    8,
    109,
    1,
    110,
    1,
    110,
    1,
    110,
    5,
    110,
    1950,
    8,
    110,
    10,
    110,
    12,
    110,
    1953,
    9,
    110,
    1,
    111,
    1,
    111,
    3,
    111,
    1957,
    8,
    111,
    3,
    111,
    1959,
    8,
    111,
    1,
    111,
    1,
    111,
    1,
    111,
    1,
    111,
    1,
    111,
    1,
    111,
    1,
    112,
    1,
    112,
    1,
    112,
    5,
    112,
    1970,
    8,
    112,
    10,
    112,
    12,
    112,
    1973,
    9,
    112,
    1,
    113,
    1,
    113,
    1,
    113,
    5,
    113,
    1978,
    8,
    113,
    10,
    113,
    12,
    113,
    1981,
    9,
    113,
    1,
    114,
    1,
    114,
    1,
    114,
    5,
    114,
    1986,
    8,
    114,
    10,
    114,
    12,
    114,
    1989,
    9,
    114,
    1,
    115,
    1,
    115,
    3,
    115,
    1993,
    8,
    115,
    3,
    115,
    1995,
    8,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    115,
    1,
    116,
    1,
    116,
    1,
    116,
    5,
    116,
    2006,
    8,
    116,
    10,
    116,
    12,
    116,
    2009,
    9,
    116,
    1,
    117,
    1,
    117,
    3,
    117,
    2013,
    8,
    117,
    3,
    117,
    2015,
    8,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    5,
    117,
    2021,
    8,
    117,
    10,
    117,
    12,
    117,
    2024,
    9,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    1,
    117,
    5,
    117,
    2030,
    8,
    117,
    10,
    117,
    12,
    117,
    2033,
    9,
    117,
    1,
    117,
    1,
    117,
    1,
    118,
    1,
    118,
    1,
    118,
    5,
    118,
    2040,
    8,
    118,
    10,
    118,
    12,
    118,
    2043,
    9,
    118,
    1,
    119,
    1,
    119,
    3,
    119,
    2047,
    8,
    119,
    1,
    119,
    3,
    119,
    2050,
    8,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    119,
    1,
    120,
    1,
    120,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    121,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    122,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    123,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    124,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    125,
    1,
    126,
    1,
    126,
    1,
    126,
    3,
    126,
    2088,
    8,
    126,
    1,
    126,
    3,
    126,
    2091,
    8,
    126,
    1,
    126,
    3,
    126,
    2094,
    8,
    126,
    1,
    126,
    1,
    126,
    1,
    127,
    1,
    127,
    3,
    127,
    2100,
    8,
    127,
    1,
    128,
    3,
    128,
    2103,
    8,
    128,
    1,
    128,
    1,
    128,
    1,
    128,
    3,
    128,
    2108,
    8,
    128,
    3,
    128,
    2110,
    8,
    128,
    1,
    128,
    1,
    128,
    1,
    128,
    1,
    128,
    1,
    129,
    3,
    129,
    2117,
    8,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    1,
    129,
    5,
    129,
    2125,
    8,
    129,
    10,
    129,
    12,
    129,
    2128,
    9,
    129,
    1,
    129,
    1,
    129,
    1,
    130,
    1,
    130,
    1,
    131,
    3,
    131,
    2135,
    8,
    131,
    1,
    131,
    1,
    131,
    1,
    131,
    3,
    131,
    2140,
    8,
    131,
    1,
    131,
    1,
    131,
    1,
    132,
    1,
    132,
    1,
    133,
    1,
    133,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    134,
    1,
    135,
    1,
    135,
    1,
    135,
    1,
    135,
    1,
    135,
    1,
    135,
    3,
    135,
    2159,
    8,
    135,
    1,
    135,
    3,
    135,
    2162,
    8,
    135,
    1,
    135,
    3,
    135,
    2165,
    8,
    135,
    1,
    135,
    1,
    135,
    1,
    135,
    1,
    135,
    3,
    135,
    2171,
    8,
    135,
    3,
    135,
    2173,
    8,
    135,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    136,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    3,
    137,
    2186,
    8,
    137,
    1,
    137,
    3,
    137,
    2189,
    8,
    137,
    1,
    137,
    3,
    137,
    2192,
    8,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    1,
    137,
    3,
    137,
    2198,
    8,
    137,
    3,
    137,
    2200,
    8,
    137,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    138,
    1,
    139,
    1,
    139,
    1,
    139,
    1,
    139,
    3,
    139,
    2211,
    8,
    139,
    1,
    139,
    1,
    139,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    140,
    1,
    141,
    1,
    141,
    1,
    141,
    1,
    141,
    1,
    141,
    3,
    141,
    2225,
    8,
    141,
    1,
    142,
    1,
    142,
    1,
    142,
    5,
    142,
    2230,
    8,
    142,
    10,
    142,
    12,
    142,
    2233,
    9,
    142,
    1,
    142,
    3,
    142,
    2236,
    8,
    142,
    1,
    143,
    1,
    143,
    1,
    143,
    1,
    143,
    1,
    144,
    1,
    144,
    1,
    144,
    1,
    145,
    1,
    145,
    1,
    145,
    1,
    145,
    3,
    145,
    2249,
    8,
    145,
    1,
    145,
    1,
    145,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    146,
    1,
    147,
    1,
    147,
    1,
    147,
    1,
    147,
    3,
    147,
    2262,
    8,
    147,
    1,
    147,
    1,
    147,
    1,
    148,
    1,
    148,
    1,
    148,
    3,
    148,
    2269,
    8,
    148,
    1,
    148,
    1,
    148,
    3,
    148,
    2273,
    8,
    148,
    1,
    148,
    1,
    148,
    1,
    149,
    1,
    149,
    1,
    149,
    5,
    149,
    2280,
    8,
    149,
    10,
    149,
    12,
    149,
    2283,
    9,
    149,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    150,
    1,
    151,
    1,
    151,
    1,
    151,
    1,
    151,
    1,
    151,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    152,
    1,
    153,
    1,
    153,
    3,
    153,
    2303,
    8,
    153,
    1,
    153,
    1,
    153,
    3,
    153,
    2307,
    8,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    3,
    153,
    2314,
    8,
    153,
    1,
    153,
    3,
    153,
    2317,
    8,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    3,
    153,
    2324,
    8,
    153,
    1,
    153,
    3,
    153,
    2327,
    8,
    153,
    1,
    153,
    1,
    153,
    3,
    153,
    2331,
    8,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    1,
    153,
    3,
    153,
    2338,
    8,
    153,
    3,
    153,
    2340,
    8,
    153,
    1,
    154,
    1,
    154,
    1,
    155,
    3,
    155,
    2345,
    8,
    155,
    1,
    155,
    1,
    155,
    3,
    155,
    2349,
    8,
    155,
    1,
    155,
    1,
    155,
    3,
    155,
    2353,
    8,
    155,
    1,
    155,
    1,
    155,
    3,
    155,
    2357,
    8,
    155,
    1,
    155,
    1,
    155,
    3,
    155,
    2361,
    8,
    155,
    3,
    155,
    2363,
    8,
    155,
    1,
    156,
    4,
    156,
    2366,
    8,
    156,
    11,
    156,
    12,
    156,
    2367,
    1,
    156,
    3,
    156,
    2371,
    8,
    156,
    1,
    156,
    5,
    156,
    2374,
    8,
    156,
    10,
    156,
    12,
    156,
    2377,
    9,
    156,
    1,
    156,
    1,
    156,
    4,
    156,
    2381,
    8,
    156,
    11,
    156,
    12,
    156,
    2382,
    3,
    156,
    2385,
    8,
    156,
    1,
    157,
    1,
    157,
    1,
    158,
    1,
    158,
    1,
    158,
    5,
    158,
    2392,
    8,
    158,
    10,
    158,
    12,
    158,
    2395,
    9,
    158,
    1,
    159,
    1,
    159,
    1,
    160,
    1,
    160,
    1,
    160,
    1,
    160,
    3,
    160,
    2403,
    8,
    160,
    3,
    160,
    2405,
    8,
    160,
    1,
    160,
    1,
    160,
    1,
    161,
    1,
    161,
    3,
    161,
    2411,
    8,
    161,
    1,
    162,
    1,
    162,
    3,
    162,
    2415,
    8,
    162,
    1,
    162,
    1,
    162,
    1,
    162,
    1,
    163,
    1,
    163,
    3,
    163,
    2422,
    8,
    163,
    1,
    163,
    1,
    163,
    1,
    163,
    1,
    164,
    1,
    164,
    1,
    165,
    1,
    165,
    1,
    166,
    1,
    166,
    1,
    166,
    1,
    166,
    3,
    166,
    2435,
    8,
    166,
    1,
    166,
    1,
    166,
    1,
    166,
    1,
    167,
    1,
    167,
    3,
    167,
    2442,
    8,
    167,
    1,
    168,
    1,
    168,
    1,
    168,
    1,
    168,
    1,
    168,
    1,
    169,
    1,
    169,
    1,
    169,
    1,
    169,
    3,
    169,
    2453,
    8,
    169,
    1,
    170,
    1,
    170,
    1,
    170,
    1,
    170,
    3,
    170,
    2459,
    8,
    170,
    1,
    171,
    1,
    171,
    1,
    172,
    5,
    172,
    2464,
    8,
    172,
    10,
    172,
    12,
    172,
    2467,
    9,
    172,
    1,
    172,
    1,
    172,
    1,
    172,
    1,
    172,
    1,
    172,
    1,
    172,
    5,
    172,
    2475,
    8,
    172,
    10,
    172,
    12,
    172,
    2478,
    9,
    172,
    3,
    172,
    2480,
    8,
    172,
    1,
    172,
    1,
    172,
    1,
    173,
    3,
    173,
    2485,
    8,
    173,
    1,
    173,
    1,
    173,
    1,
    173,
    3,
    173,
    2490,
    8,
    173,
    3,
    173,
    2492,
    8,
    173,
    1,
    173,
    1,
    173,
    1,
    174,
    1,
    174,
    1,
    174,
    5,
    174,
    2499,
    8,
    174,
    10,
    174,
    12,
    174,
    2502,
    9,
    174,
    1,
    174,
    1,
    174,
    1,
    174,
    1,
    174,
    1,
    174,
    1,
    174,
    5,
    174,
    2510,
    8,
    174,
    10,
    174,
    12,
    174,
    2513,
    9,
    174,
    1,
    174,
    3,
    174,
    2516,
    8,
    174,
    1,
    175,
    1,
    175,
    1,
    175,
    1,
    175,
    3,
    175,
    2522,
    8,
    175,
    1,
    176,
    1,
    176,
    1,
    177,
    3,
    177,
    2527,
    8,
    177,
    1,
    177,
    3,
    177,
    2530,
    8,
    177,
    1,
    177,
    1,
    177,
    3,
    177,
    2534,
    8,
    177,
    1,
    177,
    3,
    177,
    2537,
    8,
    177,
    1,
    177,
    1,
    177,
    1,
    178,
    5,
    178,
    2542,
    8,
    178,
    10,
    178,
    12,
    178,
    2545,
    9,
    178,
    1,
    178,
    1,
    178,
    1,
    178,
    1,
    179,
    3,
    179,
    2551,
    8,
    179,
    1,
    179,
    1,
    179,
    5,
    179,
    2555,
    8,
    179,
    10,
    179,
    12,
    179,
    2558,
    9,
    179,
    1,
    179,
    1,
    179,
    1,
    179,
    1,
    180,
    1,
    180,
    3,
    180,
    2565,
    8,
    180,
    1,
    181,
    1,
    181,
    1,
    181,
    5,
    181,
    2570,
    8,
    181,
    10,
    181,
    12,
    181,
    2573,
    9,
    181,
    1,
    181,
    3,
    181,
    2576,
    8,
    181,
    1,
    182,
    1,
    182,
    1,
    182,
    1,
    182,
    1,
    182,
    1,
    183,
    3,
    183,
    2584,
    8,
    183,
    1,
    183,
    3,
    183,
    2587,
    8,
    183,
    1,
    183,
    1,
    183,
    1,
    183,
    5,
    183,
    2592,
    8,
    183,
    10,
    183,
    12,
    183,
    2595,
    9,
    183,
    1,
    183,
    1,
    183,
    1,
    183,
    1,
    183,
    5,
    183,
    2601,
    8,
    183,
    10,
    183,
    12,
    183,
    2604,
    9,
    183,
    1,
    184,
    1,
    184,
    1,
    185,
    1,
    185,
    1,
    185,
    1,
    185,
    3,
    185,
    2612,
    8,
    185,
    1,
    186,
    1,
    186,
    1,
    186,
    3,
    186,
    2617,
    8,
    186,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    1,
    187,
    3,
    187,
    2649,
    8,
    187,
    1,
    188,
    1,
    188,
    3,
    188,
    2653,
    8,
    188,
    1,
    189,
    1,
    189,
    1,
    190,
    1,
    190,
    1,
    191,
    3,
    191,
    2660,
    8,
    191,
    1,
    191,
    5,
    191,
    2663,
    8,
    191,
    10,
    191,
    12,
    191,
    2666,
    9,
    191,
    1,
    192,
    1,
    192,
    1,
    192,
    1,
    193,
    3,
    193,
    2672,
    8,
    193,
    1,
    193,
    3,
    193,
    2675,
    8,
    193,
    1,
    194,
    1,
    194,
    1,
    194,
    5,
    194,
    2680,
    8,
    194,
    10,
    194,
    12,
    194,
    2683,
    9,
    194,
    1,
    194,
    3,
    194,
    2686,
    8,
    194,
    1,
    195,
    1,
    195,
    1,
    195,
    1,
    195,
    1,
    195,
    3,
    195,
    2693,
    8,
    195,
    1,
    195,
    1,
    195,
    1,
    195,
    1,
    195,
    3,
    195,
    2699,
    8,
    195,
    1,
    195,
    1,
    195,
    1,
    195,
    3,
    195,
    2704,
    8,
    195,
    1,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    3,
    196,
    2711,
    8,
    196,
    1,
    196,
    3,
    196,
    2714,
    8,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    1,
    196,
    3,
    196,
    2724,
    8,
    196,
    1,
    197,
    1,
    197,
    1,
    197,
    1,
    198,
    1,
    198,
    1,
    198,
    1,
    198,
    1,
    199,
    1,
    199,
    1,
    199,
    1,
    200,
    1,
    200,
    1,
    200,
    1,
    201,
    1,
    201,
    1,
    201,
    1,
    202,
    3,
    202,
    2743,
    8,
    202,
    1,
    202,
    3,
    202,
    2746,
    8,
    202,
    1,
    202,
    3,
    202,
    2749,
    8,
    202,
    1,
    202,
    3,
    202,
    2752,
    8,
    202,
    1,
    203,
    1,
    203,
    3,
    203,
    2756,
    8,
    203,
    1,
    204,
    1,
    204,
    1,
    204,
    1,
    205,
    1,
    205,
    1,
    206,
    1,
    206,
    3,
    206,
    2765,
    8,
    206,
    1,
    207,
    1,
    207,
    5,
    207,
    2769,
    8,
    207,
    10,
    207,
    12,
    207,
    2772,
    9,
    207,
    1,
    208,
    3,
    208,
    2775,
    8,
    208,
    1,
    208,
    1,
    208,
    1,
    209,
    1,
    209,
    3,
    209,
    2781,
    8,
    209,
    1,
    209,
    3,
    209,
    2784,
    8,
    209,
    1,
    210,
    3,
    210,
    2787,
    8,
    210,
    1,
    210,
    1,
    210,
    1,
    211,
    1,
    211,
    1,
    212,
    1,
    212,
    1,
    212,
    1,
    213,
    1,
    213,
    3,
    213,
    2798,
    8,
    213,
    1,
    213,
    1,
    213,
    1,
    213,
    1,
    214,
    1,
    214,
    1,
    214,
    1,
    214,
    1,
    215,
    1,
    215,
    5,
    215,
    2809,
    8,
    215,
    10,
    215,
    12,
    215,
    2812,
    9,
    215,
    1,
    215,
    1,
    215,
    1,
    216,
    1,
    216,
    1,
    216,
    1,
    216,
    1,
    216,
    1,
    216,
    1,
    216,
    1,
    216,
    3,
    216,
    2824,
    8,
    216,
    1,
    217,
    1,
    217,
    3,
    217,
    2828,
    8,
    217,
    1,
    217,
    3,
    217,
    2831,
    8,
    217,
    1,
    217,
    3,
    217,
    2834,
    8,
    217,
    1,
    217,
    1,
    217,
    1,
    218,
    1,
    218,
    3,
    218,
    2840,
    8,
    218,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    1,
    219,
    3,
    219,
    2857,
    8,
    219,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    1,
    220,
    3,
    220,
    2875,
    8,
    220,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    1,
    221,
    3,
    221,
    2898,
    8,
    221,
    1,
    222,
    1,
    222,
    1,
    222,
    1,
    222,
    5,
    222,
    2904,
    8,
    222,
    10,
    222,
    12,
    222,
    2907,
    9,
    222,
    1,
    223,
    1,
    223,
    1,
    223,
    1,
    223,
    1,
    223,
    1,
    224,
    1,
    224,
    1,
    224,
    1,
    224,
    1,
    225,
    5,
    225,
    2919,
    8,
    225,
    10,
    225,
    12,
    225,
    2922,
    9,
    225,
    1,
    225,
    1,
    225,
    1,
    225,
    1,
    225,
    1,
    225,
    1,
    226,
    1,
    226,
    1,
    226,
    1,
    226,
    5,
    226,
    2933,
    8,
    226,
    10,
    226,
    12,
    226,
    2936,
    9,
    226,
    1,
    226,
    3,
    226,
    2939,
    8,
    226,
    1,
    227,
    5,
    227,
    2942,
    8,
    227,
    10,
    227,
    12,
    227,
    2945,
    9,
    227,
    1,
    227,
    1,
    227,
    1,
    227,
    1,
    228,
    3,
    228,
    2951,
    8,
    228,
    1,
    228,
    1,
    228,
    1,
    229,
    1,
    229,
    1,
    229,
    1,
    229,
    1,
    230,
    3,
    230,
    2960,
    8,
    230,
    1,
    230,
    1,
    230,
    3,
    230,
    2964,
    8,
    230,
    1,
    230,
    5,
    230,
    2967,
    8,
    230,
    10,
    230,
    12,
    230,
    2970,
    9,
    230,
    1,
    231,
    1,
    231,
    1,
    231,
    1,
    231,
    1,
    231,
    1,
    232,
    3,
    232,
    2978,
    8,
    232,
    1,
    232,
    1,
    232,
    5,
    232,
    2982,
    8,
    232,
    10,
    232,
    12,
    232,
    2985,
    9,
    232,
    1,
    232,
    1,
    232,
    1,
    232,
    1,
    232,
    1,
    233,
    1,
    233,
    1,
    234,
    1,
    234,
    3,
    234,
    2995,
    8,
    234,
    1,
    234,
    3,
    234,
    2998,
    8,
    234,
    1,
    234,
    5,
    234,
    3001,
    8,
    234,
    10,
    234,
    12,
    234,
    3004,
    9,
    234,
    1,
    235,
    1,
    235,
    1,
    235,
    1,
    235,
    1,
    236,
    1,
    236,
    1,
    236,
    5,
    236,
    3013,
    8,
    236,
    10,
    236,
    12,
    236,
    3016,
    9,
    236,
    1,
    236,
    1,
    236,
    1,
    237,
    1,
    237,
    3,
    237,
    3022,
    8,
    237,
    1,
    237,
    1,
    237,
    5,
    237,
    3026,
    8,
    237,
    10,
    237,
    12,
    237,
    3029,
    9,
    237,
    1,
    237,
    1,
    237,
    1,
    238,
    1,
    238,
    1,
    239,
    1,
    239,
    1,
    239,
    1,
    239,
    3,
    239,
    3039,
    8,
    239,
    1,
    239,
    1,
    239,
    3,
    239,
    3043,
    8,
    239,
    3,
    239,
    3045,
    8,
    239,
    1,
    239,
    1,
    239,
    1,
    240,
    1,
    240,
    1,
    240,
    1,
    241,
    1,
    241,
    1,
    242,
    1,
    242,
    1,
    243,
    3,
    243,
    3057,
    8,
    243,
    1,
    244,
    1,
    244,
    1,
    244,
    1,
    244,
    1,
    244,
    1,
    245,
    1,
    245,
    1,
    245,
    1,
    245,
    1,
    246,
    1,
    246,
    1,
    246,
    1,
    246,
    1,
    246,
    1,
    247,
    1,
    247,
    1,
    247,
    1,
    247,
    1,
    248,
    1,
    248,
    1,
    248,
    1,
    248,
    1,
    248,
    1,
    248,
    1,
    249,
    1,
    249,
    1,
    250,
    1,
    250,
    1,
    251,
    1,
    251,
    1,
    251,
    1,
    251,
    1,
    252,
    1,
    252,
    1,
    252,
    1,
    253,
    1,
    253,
    1,
    253,
    1,
    253,
    1,
    253,
    1,
    254,
    1,
    254,
    1,
    254,
    3,
    254,
    3102,
    8,
    254,
    1,
    254,
    3,
    254,
    3105,
    8,
    254,
    1,
    254,
    1,
    254,
    3,
    254,
    3109,
    8,
    254,
    1,
    254,
    1,
    254,
    3,
    254,
    3113,
    8,
    254,
    1,
    254,
    1,
    254,
    1,
    255,
    1,
    255,
    3,
    255,
    3119,
    8,
    255,
    1,
    256,
    1,
    256,
    1,
    256,
    1,
    256,
    1,
    257,
    1,
    257,
    1,
    257,
    1,
    257,
    1,
    257,
    1,
    257,
    5,
    257,
    3131,
    8,
    257,
    10,
    257,
    12,
    257,
    3134,
    9,
    257,
    1,
    257,
    1,
    257,
    1,
    258,
    1,
    258,
    1,
    258,
    3,
    258,
    3141,
    8,
    258,
    3,
    258,
    3143,
    8,
    258,
    1,
    258,
    1,
    258,
    1,
    258,
    1,
    258,
    1,
    258,
    1,
    258,
    1,
    259,
    1,
    259,
    1,
    259,
    3,
    259,
    3154,
    8,
    259,
    3,
    259,
    3156,
    8,
    259,
    1,
    259,
    1,
    259,
    1,
    259,
    1,
    259,
    1,
    259,
    1,
    259,
    1,
    260,
    1,
    260,
    1,
    260,
    1,
    260,
    1,
    260,
    1,
    260,
    1,
    261,
    1,
    261,
    1,
    261,
    5,
    261,
    3173,
    8,
    261,
    10,
    261,
    12,
    261,
    3176,
    9,
    261,
    1,
    261,
    3,
    261,
    3179,
    8,
    261,
    1,
    262,
    1,
    262,
    1,
    262,
    1,
    262,
    3,
    262,
    3185,
    8,
    262,
    1,
    262,
    1,
    262,
    1,
    262,
    3,
    262,
    3190,
    8,
    262,
    1,
    263,
    1,
    263,
    1,
    263,
    1,
    264,
    1,
    264,
    1,
    264,
    1,
    264,
    1,
    264,
    3,
    264,
    3200,
    8,
    264,
    1,
    265,
    1,
    265,
    1,
    265,
    1,
    266,
    1,
    266,
    1,
    266,
    1,
    266,
    3,
    266,
    3209,
    8,
    266,
    1,
    267,
    1,
    267,
    1,
    267,
    1,
    268,
    1,
    268,
    1,
    268,
    1,
    268,
    1,
    268,
    1,
    269,
    3,
    269,
    3220,
    8,
    269,
    1,
    269,
    3,
    269,
    3223,
    8,
    269,
    1,
    269,
    1,
    269,
    3,
    269,
    3227,
    8,
    269,
    1,
    269,
    3,
    269,
    3230,
    8,
    269,
    1,
    270,
    1,
    270,
    3,
    270,
    3234,
    8,
    270,
    1,
    271,
    1,
    271,
    1,
    271,
    1,
    271,
    1,
    272,
    1,
    272,
    1,
    272,
    1,
    272,
    1,
    272,
    1,
    272,
    5,
    272,
    3246,
    8,
    272,
    10,
    272,
    12,
    272,
    3249,
    9,
    272,
    1,
    272,
    1,
    272,
    1,
    273,
    1,
    273,
    1,
    274,
    3,
    274,
    3256,
    8,
    274,
    1,
    274,
    1,
    274,
    1,
    274,
    3,
    274,
    3261,
    8,
    274,
    1,
    274,
    1,
    274,
    1,
    275,
    1,
    275,
    1,
    275,
    1,
    275,
    1,
    275,
    1,
    276,
    1,
    276,
    1,
    276,
    1,
    276,
    1,
    277,
    1,
    277,
    3,
    277,
    3276,
    8,
    277,
    1,
    277,
    1,
    277,
    3,
    277,
    3280,
    8,
    277,
    1,
    277,
    1,
    277,
    3,
    277,
    3284,
    8,
    277,
    1,
    278,
    1,
    278,
    1,
    278,
    1,
    278,
    1,
    278,
    1,
    279,
    1,
    279,
    1,
    279,
    1,
    279,
    1,
    279,
    1,
    280,
    3,
    280,
    3297,
    8,
    280,
    1,
    280,
    3,
    280,
    3300,
    8,
    280,
    1,
    280,
    1,
    280,
    3,
    280,
    3304,
    8,
    280,
    1,
    280,
    1,
    280,
    1,
    280,
    1,
    280,
    1,
    280,
    3,
    280,
    3311,
    8,
    280,
    1,
    280,
    1,
    280,
    1,
    280,
    1,
    280,
    3,
    280,
    3317,
    8,
    280,
    1,
    281,
    1,
    281,
    1,
    282,
    1,
    282,
    1,
    283,
    1,
    283,
    1,
    283,
    1,
    283,
    1,
    283,
    1,
    284,
    1,
    284,
    1,
    284,
    1,
    284,
    1,
    284,
    1,
    284,
    1,
    285,
    1,
    285,
    1,
    286,
    1,
    286,
    1,
    287,
    1,
    287,
    1,
    287,
    1,
    287,
    1,
    287,
    1,
    287,
    1,
    288,
    1,
    288,
    1,
    288,
    5,
    288,
    3347,
    8,
    288,
    10,
    288,
    12,
    288,
    3350,
    9,
    288,
    1,
    288,
    3,
    288,
    3353,
    8,
    288,
    1,
    289,
    1,
    289,
    1,
    289,
    5,
    289,
    3358,
    8,
    289,
    10,
    289,
    12,
    289,
    3361,
    9,
    289,
    1,
    289,
    3,
    289,
    3364,
    8,
    289,
    1,
    289,
    1,
    289,
    5,
    289,
    3368,
    8,
    289,
    10,
    289,
    12,
    289,
    3371,
    9,
    289,
    1,
    289,
    3,
    289,
    3374,
    8,
    289,
    1,
    290,
    1,
    290,
    1,
    290,
    1,
    290,
    1,
    290,
    1,
    290,
    3,
    290,
    3382,
    8,
    290,
    1,
    290,
    3,
    290,
    3385,
    8,
    290,
    1,
    291,
    1,
    291,
    3,
    291,
    3389,
    8,
    291,
    1,
    292,
    1,
    292,
    1,
    292,
    1,
    292,
    1,
    292,
    1,
    293,
    1,
    293,
    1,
    293,
    1,
    294,
    1,
    294,
    1,
    294,
    1,
    295,
    1,
    295,
    1,
    295,
    1,
    296,
    1,
    296,
    1,
    296,
    1,
    296,
    1,
    296,
    1,
    297,
    3,
    297,
    3411,
    8,
    297,
    1,
    297,
    3,
    297,
    3414,
    8,
    297,
    1,
    298,
    1,
    298,
    1,
    298,
    1,
    298,
    1,
    298,
    1,
    299,
    1,
    299,
    3,
    299,
    3423,
    8,
    299,
    1,
    299,
    1,
    299,
    3,
    299,
    3427,
    8,
    299,
    3,
    299,
    3429,
    8,
    299,
    1,
    299,
    3,
    299,
    3432,
    8,
    299,
    1,
    300,
    1,
    300,
    1,
    300,
    1,
    300,
    1,
    300,
    1,
    300,
    1,
    300,
    1,
    300,
    3,
    300,
    3442,
    8,
    300,
    1,
    301,
    1,
    301,
    3,
    301,
    3446,
    8,
    301,
    1,
    302,
    1,
    302,
    3,
    302,
    3450,
    8,
    302,
    1,
    303,
    1,
    303,
    1,
    303,
    1,
    303,
    3,
    303,
    3456,
    8,
    303,
    1,
    304,
    1,
    304,
    3,
    304,
    3460,
    8,
    304,
    1,
    304,
    3,
    304,
    3463,
    8,
    304,
    1,
    304,
    5,
    304,
    3466,
    8,
    304,
    10,
    304,
    12,
    304,
    3469,
    9,
    304,
    1,
    305,
    1,
    305,
    1,
    305,
    3,
    305,
    3474,
    8,
    305,
    1,
    305,
    1,
    305,
    1,
    306,
    1,
    306,
    1,
    306,
    3,
    306,
    3481,
    8,
    306,
    1,
    306,
    1,
    306,
    1,
    307,
    1,
    307,
    1,
    307,
    3,
    307,
    3488,
    8,
    307,
    1,
    307,
    1,
    307,
    1,
    308,
    1,
    308,
    1,
    308,
    3,
    308,
    3495,
    8,
    308,
    1,
    308,
    1,
    308,
    1,
    309,
    1,
    309,
    1,
    309,
    1,
    309,
    1,
    310,
    3,
    310,
    3504,
    8,
    310,
    1,
    310,
    1,
    310,
    1,
    310,
    1,
    311,
    1,
    311,
    1,
    311,
    3,
    311,
    3512,
    8,
    311,
    1,
    312,
    1,
    312,
    1,
    313,
    1,
    313,
    3,
    313,
    3518,
    8,
    313,
    1,
    313,
    3,
    313,
    3521,
    8,
    313,
    1,
    313,
    3,
    313,
    3524,
    8,
    313,
    1,
    314,
    1,
    314,
    1,
    315,
    1,
    315,
    1,
    316,
    1,
    316,
    1,
    316,
    1,
    316,
    3,
    316,
    3534,
    8,
    316,
    1,
    317,
    1,
    317,
    1,
    317,
    3,
    317,
    3539,
    8,
    317,
    1,
    317,
    1,
    317,
    1,
    317,
    3,
    317,
    3544,
    8,
    317,
    1,
    317,
    1,
    317,
    3,
    317,
    3548,
    8,
    317,
    3,
    317,
    3550,
    8,
    317,
    1,
    317,
    1,
    317,
    1,
    318,
    3,
    318,
    3555,
    8,
    318,
    1,
    318,
    1,
    318,
    1,
    318,
    3,
    318,
    3560,
    8,
    318,
    1,
    319,
    1,
    319,
    1,
    319,
    1,
    319,
    3,
    319,
    3566,
    8,
    319,
    1,
    319,
    1,
    319,
    1,
    319,
    1,
    319,
    3,
    319,
    3572,
    8,
    319,
    1,
    320,
    1,
    320,
    1,
    321,
    1,
    321,
    1,
    322,
    1,
    322,
    1,
    323,
    1,
    323,
    1,
    324,
    1,
    324,
    1,
    324,
    1,
    324,
    1,
    325,
    3,
    325,
    3587,
    8,
    325,
    1,
    325,
    1,
    325,
    1,
    325,
    1,
    325,
    1,
    325,
    1,
    325,
    1,
    326,
    1,
    326,
    1,
    327,
    1,
    327,
    1,
    327,
    3,
    327,
    3600,
    8,
    327,
    1,
    328,
    1,
    328,
    1,
    329,
    1,
    329,
    3,
    329,
    3606,
    8,
    329,
    1,
    329,
    1,
    329,
    3,
    329,
    3610,
    8,
    329,
    1,
    329,
    1,
    329,
    1,
    330,
    1,
    330,
    1,
    330,
    1,
    330,
    1,
    330,
    1,
    330,
    1,
    330,
    3,
    330,
    3621,
    8,
    330,
    3,
    330,
    3623,
    8,
    330,
    1,
    331,
    1,
    331,
    1,
    332,
    1,
    332,
    1,
    333,
    1,
    333,
    3,
    333,
    3631,
    8,
    333,
    3,
    333,
    3633,
    8,
    333,
    1,
    333,
    1,
    333,
    5,
    333,
    3637,
    8,
    333,
    10,
    333,
    12,
    333,
    3640,
    9,
    333,
    1,
    333,
    1,
    333,
    1,
    334,
    1,
    334,
    1,
    335,
    1,
    335,
    1,
    335,
    1,
    335,
    1,
    335,
    3,
    335,
    3651,
    8,
    335,
    1,
    335,
    1,
    335,
    1,
    335,
    1,
    335,
    1,
    335,
    3,
    335,
    3658,
    8,
    335,
    1,
    336,
    1,
    336,
    1,
    336,
    1,
    336,
    1,
    336,
    1,
    336,
    1,
    336,
    1,
    337,
    3,
    337,
    3668,
    8,
    337,
    1,
    338,
    1,
    338,
    1,
    338,
    3,
    338,
    3673,
    8,
    338,
    1,
    338,
    1,
    338,
    1,
    339,
    1,
    339,
    1,
    339,
    1,
    339,
    1,
    340,
    1,
    340,
    1,
    340,
    1,
    340,
    1,
    341,
    1,
    341,
    1,
    341,
    1,
    342,
    1,
    342,
    3,
    342,
    3690,
    8,
    342,
    3,
    342,
    3692,
    8,
    342,
    1,
    342,
    1,
    342,
    1,
    342,
    1,
    342,
    1,
    342,
    1,
    342,
    1,
    342,
    1,
    343,
    1,
    343,
    1,
    343,
    1,
    343,
    1,
    343,
    1,
    343,
    1,
    344,
    1,
    344,
    3,
    344,
    3709,
    8,
    344,
    1,
    344,
    1,
    344,
    5,
    344,
    3713,
    8,
    344,
    10,
    344,
    12,
    344,
    3716,
    9,
    344,
    1,
    344,
    3,
    344,
    3719,
    8,
    344,
    1,
    345,
    1,
    345,
    3,
    345,
    3723,
    8,
    345,
    1,
    345,
    1,
    345,
    5,
    345,
    3727,
    8,
    345,
    10,
    345,
    12,
    345,
    3730,
    9,
    345,
    1,
    345,
    1,
    345,
    1,
    345,
    5,
    345,
    3735,
    8,
    345,
    10,
    345,
    12,
    345,
    3738,
    9,
    345,
    1,
    345,
    1,
    345,
    3,
    345,
    3742,
    8,
    345,
    1,
    346,
    1,
    346,
    1,
    346,
    1,
    346,
    1,
    347,
    1,
    347,
    1,
    347,
    1,
    347,
    1,
    348,
    1,
    348,
    1,
    348,
    1,
    348,
    1,
    349,
    1,
    349,
    1,
    349,
    1,
    349,
    3,
    349,
    3760,
    8,
    349,
    1,
    349,
    1,
    349,
    1,
    350,
    1,
    350,
    1,
    350,
    1,
    350,
    1,
    350,
    1,
    350,
    1,
    350,
    3,
    350,
    3771,
    8,
    350,
    1,
    351,
    1,
    351,
    1,
    351,
    1,
    352,
    1,
    352,
    1,
    352,
    1,
    353,
    1,
    353,
    1,
    353,
    1,
    354,
    1,
    354,
    1,
    354,
    1,
    355,
    1,
    355,
    1,
    355,
    1,
    356,
    1,
    356,
    1,
    356,
    1,
    357,
    1,
    357,
    1,
    357,
    1,
    357,
    1,
    357,
    1,
    358,
    1,
    358,
    3,
    358,
    3798,
    8,
    358,
    1,
    358,
    1,
    358,
    5,
    358,
    3802,
    8,
    358,
    10,
    358,
    12,
    358,
    3805,
    9,
    358,
    1,
    358,
    3,
    358,
    3808,
    8,
    358,
    1,
    359,
    1,
    359,
    1,
    359,
    1,
    359,
    3,
    359,
    3814,
    8,
    359,
    1,
    359,
    1,
    359,
    3,
    359,
    3818,
    8,
    359,
    3,
    359,
    3820,
    8,
    359,
    1,
    359,
    3,
    359,
    3823,
    8,
    359,
    1,
    359,
    1,
    359,
    1,
    360,
    1,
    360,
    3,
    360,
    3829,
    8,
    360,
    1,
    360,
    3,
    360,
    3832,
    8,
    360,
    1,
    360,
    1,
    360,
    1,
    360,
    1,
    360,
    1,
    360,
    3,
    360,
    3839,
    8,
    360,
    1,
    360,
    3,
    360,
    3842,
    8,
    360,
    1,
    360,
    3,
    360,
    3845,
    8,
    360,
    1,
    360,
    1,
    360,
    1,
    360,
    1,
    360,
    1,
    361,
    1,
    361,
    1,
    361,
    1,
    361,
    1,
    361,
    3,
    361,
    3856,
    8,
    361,
    1,
    361,
    3,
    361,
    3859,
    8,
    361,
    1,
    361,
    3,
    361,
    3862,
    8,
    361,
    1,
    361,
    1,
    361,
    1,
    361,
    3,
    361,
    3867,
    8,
    361,
    1,
    361,
    3,
    361,
    3870,
    8,
    361,
    1,
    361,
    1,
    361,
    3,
    361,
    3874,
    8,
    361,
    3,
    361,
    3876,
    8,
    361,
    1,
    361,
    1,
    361,
    1,
    361,
    1,
    361,
    1,
    362,
    1,
    362,
    1,
    362,
    1,
    363,
    1,
    363,
    1,
    364,
    1,
    364,
    1,
    364,
    1,
    365,
    1,
    365,
    1,
    365,
    1,
    366,
    1,
    366,
    1,
    366,
    1,
    366,
    1,
    366,
    3,
    366,
    3898,
    8,
    366,
    1,
    367,
    1,
    367,
    1,
    367,
    5,
    367,
    3903,
    8,
    367,
    10,
    367,
    12,
    367,
    3906,
    9,
    367,
    1,
    367,
    3,
    367,
    3909,
    8,
    367,
    1,
    368,
    1,
    368,
    1,
    368,
    5,
    368,
    3914,
    8,
    368,
    10,
    368,
    12,
    368,
    3917,
    9,
    368,
    1,
    368,
    3,
    368,
    3920,
    8,
    368,
    1,
    369,
    1,
    369,
    1,
    369,
    5,
    369,
    3925,
    8,
    369,
    10,
    369,
    12,
    369,
    3928,
    9,
    369,
    1,
    369,
    3,
    369,
    3931,
    8,
    369,
    1,
    370,
    1,
    370,
    1,
    370,
    5,
    370,
    3936,
    8,
    370,
    10,
    370,
    12,
    370,
    3939,
    9,
    370,
    1,
    370,
    3,
    370,
    3942,
    8,
    370,
    1,
    371,
    1,
    371,
    1,
    372,
    1,
    372,
    1,
    372,
    1,
    373,
    1,
    373,
    1,
    374,
    1,
    374,
    1,
    374,
    1,
    374,
    1,
    374,
    1,
    374,
    1,
    375,
    1,
    375,
    1,
    375,
    1,
    375,
    1,
    375,
    1,
    376,
    1,
    376,
    1,
    376,
    1,
    376,
    1,
    376,
    3,
    376,
    3967,
    8,
    376,
    1,
    377,
    5,
    377,
    3970,
    8,
    377,
    10,
    377,
    12,
    377,
    3973,
    9,
    377,
    1,
    377,
    3,
    377,
    3976,
    8,
    377,
    1,
    378,
    1,
    378,
    3,
    378,
    3980,
    8,
    378,
    1,
    379,
    1,
    379,
    1,
    379,
    1,
    379,
    1,
    380,
    1,
    380,
    1,
    380,
    1,
    380,
    1,
    380,
    1,
    380,
    1,
    381,
    1,
    381,
    1,
    381,
    1,
    381,
    1,
    381,
    1,
    382,
    1,
    382,
    1,
    382,
    3,
    382,
    4e3,
    8,
    382,
    1,
    382,
    1,
    382,
    3,
    382,
    4004,
    8,
    382,
    1,
    382,
    1,
    382,
    3,
    382,
    4008,
    8,
    382,
    1,
    382,
    1,
    382,
    1,
    383,
    3,
    383,
    4013,
    8,
    383,
    1,
    383,
    3,
    383,
    4016,
    8,
    383,
    1,
    384,
    1,
    384,
    1,
    384,
    1,
    384,
    1,
    384,
    1,
    384,
    1,
    385,
    1,
    385,
    1,
    385,
    5,
    385,
    4027,
    8,
    385,
    10,
    385,
    12,
    385,
    4030,
    9,
    385,
    1,
    385,
    3,
    385,
    4033,
    8,
    385,
    1,
    386,
    1,
    386,
    1,
    386,
    1,
    386,
    1,
    386,
    1,
    386,
    1,
    386,
    3,
    386,
    4042,
    8,
    386,
    1,
    387,
    1,
    387,
    1,
    387,
    1,
    388,
    1,
    388,
    5,
    388,
    4049,
    8,
    388,
    10,
    388,
    12,
    388,
    4052,
    9,
    388,
    1,
    388,
    1,
    388,
    1,
    389,
    1,
    389,
    1,
    389,
    1,
    389,
    1,
    390,
    1,
    390,
    1,
    391,
    1,
    391,
    3,
    391,
    4064,
    8,
    391,
    1,
    391,
    1,
    391,
    1,
    391,
    5,
    391,
    4069,
    8,
    391,
    10,
    391,
    12,
    391,
    4072,
    9,
    391,
    1,
    391,
    1,
    391,
    4,
    391,
    4076,
    8,
    391,
    11,
    391,
    12,
    391,
    4077,
    3,
    391,
    4080,
    8,
    391,
    1,
    391,
    1,
    391,
    1,
    391,
    3,
    391,
    4085,
    8,
    391,
    1,
    392,
    1,
    392,
    1,
    392,
    1,
    392,
    1,
    393,
    1,
    393,
    3,
    393,
    4093,
    8,
    393,
    1,
    393,
    1,
    393,
    1,
    393,
    5,
    393,
    4098,
    8,
    393,
    10,
    393,
    12,
    393,
    4101,
    9,
    393,
    1,
    393,
    1,
    393,
    4,
    393,
    4105,
    8,
    393,
    11,
    393,
    12,
    393,
    4106,
    3,
    393,
    4109,
    8,
    393,
    1,
    393,
    1,
    393,
    1,
    393,
    3,
    393,
    4114,
    8,
    393,
    1,
    394,
    1,
    394,
    1,
    394,
    1,
    395,
    1,
    395,
    5,
    395,
    4121,
    8,
    395,
    10,
    395,
    12,
    395,
    4124,
    9,
    395,
    1,
    395,
    1,
    395,
    1,
    396,
    1,
    396,
    1,
    396,
    1,
    397,
    1,
    397,
    5,
    397,
    4133,
    8,
    397,
    10,
    397,
    12,
    397,
    4136,
    9,
    397,
    1,
    397,
    1,
    397,
    1,
    398,
    1,
    398,
    1,
    398,
    1,
    398,
    1,
    398,
    1,
    399,
    1,
    399,
    1,
    399,
    3,
    399,
    4148,
    8,
    399,
    1,
    399,
    3,
    399,
    4151,
    8,
    399,
    1,
    399,
    1,
    399,
    1,
    399,
    3,
    399,
    4156,
    8,
    399,
    1,
    399,
    1,
    399,
    3,
    399,
    4160,
    8,
    399,
    3,
    399,
    4162,
    8,
    399,
    1,
    399,
    3,
    399,
    4165,
    8,
    399,
    1,
    399,
    1,
    399,
    3,
    399,
    4169,
    8,
    399,
    1,
    399,
    1,
    399,
    1,
    400,
    1,
    400,
    1,
    401,
    1,
    401,
    1,
    402,
    1,
    402,
    1,
    403,
    1,
    403,
    1,
    404,
    1,
    404,
    1,
    404,
    1,
    404,
    1,
    404,
    1,
    404,
    1,
    405,
    1,
    405,
    1,
    405,
    1,
    405,
    1,
    405,
    1,
    406,
    1,
    406,
    1,
    406,
    1,
    406,
    1,
    406,
    1,
    406,
    1,
    407,
    1,
    407,
    1,
    407,
    1,
    407,
    1,
    407,
    1,
    408,
    1,
    408,
    1,
    408,
    5,
    408,
    4206,
    8,
    408,
    10,
    408,
    12,
    408,
    4209,
    9,
    408,
    1,
    408,
    3,
    408,
    4212,
    8,
    408,
    1,
    408,
    3,
    408,
    4215,
    8,
    408,
    1,
    409,
    1,
    409,
    1,
    409,
    1,
    409,
    1,
    409,
    3,
    409,
    4222,
    8,
    409,
    1,
    410,
    1,
    410,
    1,
    410,
    1,
    410,
    1,
    411,
    5,
    411,
    4229,
    8,
    411,
    10,
    411,
    12,
    411,
    4232,
    9,
    411,
    1,
    411,
    1,
    411,
    1,
    411,
    1,
    412,
    1,
    412,
    1,
    412,
    1,
    412,
    1,
    412,
    1,
    412,
    1,
    413,
    1,
    413,
    1,
    413,
    1,
    413,
    1,
    413,
    1,
    414,
    1,
    414,
    1,
    414,
    1,
    414,
    1,
    414,
    1,
    414,
    1,
    415,
    1,
    415,
    1,
    415,
    1,
    415,
    1,
    415,
    1,
    416,
    1,
    416,
    1,
    416,
    1,
    416,
    1,
    417,
    1,
    417,
    5,
    417,
    4265,
    8,
    417,
    10,
    417,
    12,
    417,
    4268,
    9,
    417,
    1,
    417,
    1,
    417,
    1,
    417,
    5,
    417,
    4273,
    8,
    417,
    10,
    417,
    12,
    417,
    4276,
    9,
    417,
    1,
    417,
    1,
    417,
    4,
    417,
    4280,
    8,
    417,
    11,
    417,
    12,
    417,
    4281,
    3,
    417,
    4284,
    8,
    417,
    1,
    417,
    1,
    417,
    1,
    417,
    3,
    417,
    4289,
    8,
    417,
    1,
    418,
    1,
    418,
    1,
    418,
    1,
    418,
    1,
    418,
    1,
    418,
    1,
    418,
    1,
    419,
    1,
    419,
    1,
    419,
    1,
    419,
    1,
    419,
    1,
    419,
    1,
    420,
    1,
    420,
    1,
    420,
    1,
    420,
    3,
    420,
    4308,
    8,
    420,
    1,
    420,
    1,
    420,
    1,
    420,
    3,
    420,
    4313,
    8,
    420,
    3,
    420,
    4315,
    8,
    420,
    1,
    420,
    3,
    420,
    4318,
    8,
    420,
    1,
    420,
    1,
    420,
    1,
    421,
    1,
    421,
    1,
    421,
    1,
    421,
    1,
    421,
    1,
    421,
    1,
    422,
    1,
    422,
    1,
    422,
    5,
    422,
    4331,
    8,
    422,
    10,
    422,
    12,
    422,
    4334,
    9,
    422,
    1,
    422,
    3,
    422,
    4337,
    8,
    422,
    1,
    423,
    1,
    423,
    1,
    423,
    3,
    423,
    4342,
    8,
    423,
    1,
    424,
    1,
    424,
    1,
    424,
    1,
    424,
    1,
    425,
    1,
    425,
    3,
    425,
    4350,
    8,
    425,
    1,
    425,
    1,
    425,
    1,
    425,
    5,
    425,
    4355,
    8,
    425,
    10,
    425,
    12,
    425,
    4358,
    9,
    425,
    1,
    425,
    1,
    425,
    4,
    425,
    4362,
    8,
    425,
    11,
    425,
    12,
    425,
    4363,
    3,
    425,
    4366,
    8,
    425,
    1,
    425,
    3,
    425,
    4369,
    8,
    425,
    1,
    426,
    1,
    426,
    1,
    426,
    3,
    426,
    4374,
    8,
    426,
    1,
    426,
    3,
    426,
    4377,
    8,
    426,
    1,
    426,
    1,
    426,
    1,
    427,
    1,
    427,
    1,
    427,
    5,
    427,
    4384,
    8,
    427,
    10,
    427,
    12,
    427,
    4387,
    9,
    427,
    1,
    427,
    3,
    427,
    4390,
    8,
    427,
    1,
    428,
    1,
    428,
    1,
    428,
    1,
    428,
    3,
    428,
    4396,
    8,
    428,
    1,
    429,
    1,
    429,
    1,
    429,
    3,
    429,
    4401,
    8,
    429,
    1,
    429,
    1,
    429,
    1,
    430,
    1,
    430,
    1,
    431,
    1,
    431,
    1,
    432,
    1,
    432,
    1,
    432,
    1,
    432,
    1,
    432,
    1,
    432,
    1,
    433,
    1,
    433,
    1,
    433,
    1,
    433,
    1,
    433,
    1,
    434,
    1,
    434,
    1,
    434,
    1,
    434,
    1,
    434,
    1,
    435,
    1,
    435,
    1,
    435,
    1,
    435,
    1,
    436,
    3,
    436,
    4430,
    8,
    436,
    1,
    436,
    5,
    436,
    4433,
    8,
    436,
    10,
    436,
    12,
    436,
    4436,
    9,
    436,
    1,
    436,
    1,
    436,
    1,
    436,
    1,
    436,
    1,
    437,
    1,
    437,
    1,
    438,
    1,
    438,
    1,
    439,
    3,
    439,
    4447,
    8,
    439,
    1,
    439,
    3,
    439,
    4450,
    8,
    439,
    1,
    439,
    1,
    439,
    3,
    439,
    4454,
    8,
    439,
    1,
    439,
    3,
    439,
    4457,
    8,
    439,
    1,
    439,
    1,
    439,
    1,
    440,
    3,
    440,
    4462,
    8,
    440,
    1,
    440,
    4,
    440,
    4465,
    8,
    440,
    11,
    440,
    12,
    440,
    4466,
    1,
    440,
    1,
    440,
    1,
    440,
    1,
    441,
    1,
    441,
    4,
    441,
    4474,
    8,
    441,
    11,
    441,
    12,
    441,
    4475,
    1,
    441,
    1,
    441,
    1,
    442,
    1,
    442,
    3,
    442,
    4482,
    8,
    442,
    1,
    443,
    1,
    443,
    1,
    443,
    1,
    443,
    1,
    443,
    3,
    443,
    4489,
    8,
    443,
    1,
    444,
    3,
    444,
    4492,
    8,
    444,
    1,
    444,
    3,
    444,
    4495,
    8,
    444,
    1,
    445,
    1,
    445,
    1,
    446,
    1,
    446,
    1,
    447,
    1,
    447,
    1,
    448,
    1,
    448,
    1,
    449,
    1,
    449,
    1,
    450,
    1,
    450,
    1,
    451,
    1,
    451,
    1,
    451,
    0,
    1,
    0,
    452,
    0,
    2,
    4,
    6,
    8,
    10,
    12,
    14,
    16,
    18,
    20,
    22,
    24,
    26,
    28,
    30,
    32,
    34,
    36,
    38,
    40,
    42,
    44,
    46,
    48,
    50,
    52,
    54,
    56,
    58,
    60,
    62,
    64,
    66,
    68,
    70,
    72,
    74,
    76,
    78,
    80,
    82,
    84,
    86,
    88,
    90,
    92,
    94,
    96,
    98,
    100,
    102,
    104,
    106,
    108,
    110,
    112,
    114,
    116,
    118,
    120,
    122,
    124,
    126,
    128,
    130,
    132,
    134,
    136,
    138,
    140,
    142,
    144,
    146,
    148,
    150,
    152,
    154,
    156,
    158,
    160,
    162,
    164,
    166,
    168,
    170,
    172,
    174,
    176,
    178,
    180,
    182,
    184,
    186,
    188,
    190,
    192,
    194,
    196,
    198,
    200,
    202,
    204,
    206,
    208,
    210,
    212,
    214,
    216,
    218,
    220,
    222,
    224,
    226,
    228,
    230,
    232,
    234,
    236,
    238,
    240,
    242,
    244,
    246,
    248,
    250,
    252,
    254,
    256,
    258,
    260,
    262,
    264,
    266,
    268,
    270,
    272,
    274,
    276,
    278,
    280,
    282,
    284,
    286,
    288,
    290,
    292,
    294,
    296,
    298,
    300,
    302,
    304,
    306,
    308,
    310,
    312,
    314,
    316,
    318,
    320,
    322,
    324,
    326,
    328,
    330,
    332,
    334,
    336,
    338,
    340,
    342,
    344,
    346,
    348,
    350,
    352,
    354,
    356,
    358,
    360,
    362,
    364,
    366,
    368,
    370,
    372,
    374,
    376,
    378,
    380,
    382,
    384,
    386,
    388,
    390,
    392,
    394,
    396,
    398,
    400,
    402,
    404,
    406,
    408,
    410,
    412,
    414,
    416,
    418,
    420,
    422,
    424,
    426,
    428,
    430,
    432,
    434,
    436,
    438,
    440,
    442,
    444,
    446,
    448,
    450,
    452,
    454,
    456,
    458,
    460,
    462,
    464,
    466,
    468,
    470,
    472,
    474,
    476,
    478,
    480,
    482,
    484,
    486,
    488,
    490,
    492,
    494,
    496,
    498,
    500,
    502,
    504,
    506,
    508,
    510,
    512,
    514,
    516,
    518,
    520,
    522,
    524,
    526,
    528,
    530,
    532,
    534,
    536,
    538,
    540,
    542,
    544,
    546,
    548,
    550,
    552,
    554,
    556,
    558,
    560,
    562,
    564,
    566,
    568,
    570,
    572,
    574,
    576,
    578,
    580,
    582,
    584,
    586,
    588,
    590,
    592,
    594,
    596,
    598,
    600,
    602,
    604,
    606,
    608,
    610,
    612,
    614,
    616,
    618,
    620,
    622,
    624,
    626,
    628,
    630,
    632,
    634,
    636,
    638,
    640,
    642,
    644,
    646,
    648,
    650,
    652,
    654,
    656,
    658,
    660,
    662,
    664,
    666,
    668,
    670,
    672,
    674,
    676,
    678,
    680,
    682,
    684,
    686,
    688,
    690,
    692,
    694,
    696,
    698,
    700,
    702,
    704,
    706,
    708,
    710,
    712,
    714,
    716,
    718,
    720,
    722,
    724,
    726,
    728,
    730,
    732,
    734,
    736,
    738,
    740,
    742,
    744,
    746,
    748,
    750,
    752,
    754,
    756,
    758,
    760,
    762,
    764,
    766,
    768,
    770,
    772,
    774,
    776,
    778,
    780,
    782,
    784,
    786,
    788,
    790,
    792,
    794,
    796,
    798,
    800,
    802,
    804,
    806,
    808,
    810,
    812,
    814,
    816,
    818,
    820,
    822,
    824,
    826,
    828,
    830,
    832,
    834,
    836,
    838,
    840,
    842,
    844,
    846,
    848,
    850,
    852,
    854,
    856,
    858,
    860,
    862,
    864,
    866,
    868,
    870,
    872,
    874,
    876,
    878,
    880,
    882,
    884,
    886,
    888,
    890,
    892,
    894,
    896,
    898,
    900,
    902,
    0,
    26,
    4,
    0,
    107,
    107,
    199,
    199,
    201,
    201,
    217,
    217,
    2,
    0,
    191,
    191,
    210,
    210,
    3,
    0,
    174,
    174,
    177,
    178,
    187,
    187,
    4,
    0,
    186,
    186,
    189,
    189,
    206,
    206,
    208,
    208,
    2,
    0,
    199,
    199,
    201,
    201,
    3,
    0,
    194,
    194,
    198,
    198,
    203,
    203,
    2,
    0,
    179,
    179,
    213,
    213,
    3,
    0,
    76,
    76,
    90,
    90,
    210,
    210,
    2,
    0,
    64,
    64,
    156,
    156,
    14,
    0,
    20,
    20,
    42,
    42,
    65,
    65,
    75,
    75,
    84,
    84,
    93,
    93,
    95,
    95,
    97,
    97,
    101,
    101,
    103,
    103,
    121,
    121,
    143,
    143,
    157,
    157,
    163,
    163,
    1,
    0,
    122,
    124,
    2,
    0,
    139,
    139,
    185,
    185,
    2,
    0,
    34,
    34,
    217,
    217,
    2,
    0,
    31,
    31,
    120,
    120,
    2,
    0,
    39,
    39,
    163,
    163,
    3,
    0,
    80,
    80,
    83,
    83,
    114,
    114,
    2,
    0,
    148,
    148,
    185,
    185,
    2,
    0,
    128,
    128,
    175,
    175,
    2,
    0,
    42,
    42,
    188,
    188,
    2,
    0,
    125,
    125,
    176,
    176,
    2,
    0,
    184,
    184,
    207,
    207,
    2,
    0,
    102,
    102,
    210,
    210,
    2,
    0,
    2,
    2,
    165,
    165,
    2,
    0,
    137,
    137,
    153,
    153,
    2,
    0,
    6,
    6,
    18,
    18,
    2,
    0,
    17,
    17,
    132,
    132,
    4801,
    0,
    919,
    1,
    0,
    0,
    0,
    2,
    1005,
    1,
    0,
    0,
    0,
    4,
    1007,
    1,
    0,
    0,
    0,
    6,
    1036,
    1,
    0,
    0,
    0,
    8,
    1041,
    1,
    0,
    0,
    0,
    10,
    1043,
    1,
    0,
    0,
    0,
    12,
    1045,
    1,
    0,
    0,
    0,
    14,
    1049,
    1,
    0,
    0,
    0,
    16,
    1053,
    1,
    0,
    0,
    0,
    18,
    1060,
    1,
    0,
    0,
    0,
    20,
    1068,
    1,
    0,
    0,
    0,
    22,
    1076,
    1,
    0,
    0,
    0,
    24,
    1085,
    1,
    0,
    0,
    0,
    26,
    1087,
    1,
    0,
    0,
    0,
    28,
    1089,
    1,
    0,
    0,
    0,
    30,
    1091,
    1,
    0,
    0,
    0,
    32,
    1093,
    1,
    0,
    0,
    0,
    34,
    1095,
    1,
    0,
    0,
    0,
    36,
    1097,
    1,
    0,
    0,
    0,
    38,
    1099,
    1,
    0,
    0,
    0,
    40,
    1104,
    1,
    0,
    0,
    0,
    42,
    1106,
    1,
    0,
    0,
    0,
    44,
    1118,
    1,
    0,
    0,
    0,
    46,
    1137,
    1,
    0,
    0,
    0,
    48,
    1141,
    1,
    0,
    0,
    0,
    50,
    1145,
    1,
    0,
    0,
    0,
    52,
    1189,
    1,
    0,
    0,
    0,
    54,
    1191,
    1,
    0,
    0,
    0,
    56,
    1193,
    1,
    0,
    0,
    0,
    58,
    1199,
    1,
    0,
    0,
    0,
    60,
    1216,
    1,
    0,
    0,
    0,
    62,
    1224,
    1,
    0,
    0,
    0,
    64,
    1238,
    1,
    0,
    0,
    0,
    66,
    1247,
    1,
    0,
    0,
    0,
    68,
    1255,
    1,
    0,
    0,
    0,
    70,
    1261,
    1,
    0,
    0,
    0,
    72,
    1274,
    1,
    0,
    0,
    0,
    74,
    1279,
    1,
    0,
    0,
    0,
    76,
    1282,
    1,
    0,
    0,
    0,
    78,
    1284,
    1,
    0,
    0,
    0,
    80,
    1288,
    1,
    0,
    0,
    0,
    82,
    1290,
    1,
    0,
    0,
    0,
    84,
    1293,
    1,
    0,
    0,
    0,
    86,
    1296,
    1,
    0,
    0,
    0,
    88,
    1313,
    1,
    0,
    0,
    0,
    90,
    1326,
    1,
    0,
    0,
    0,
    92,
    1337,
    1,
    0,
    0,
    0,
    94,
    1339,
    1,
    0,
    0,
    0,
    96,
    1352,
    1,
    0,
    0,
    0,
    98,
    1366,
    1,
    0,
    0,
    0,
    100,
    1368,
    1,
    0,
    0,
    0,
    102,
    1374,
    1,
    0,
    0,
    0,
    104,
    1402,
    1,
    0,
    0,
    0,
    106,
    1414,
    1,
    0,
    0,
    0,
    108,
    1416,
    1,
    0,
    0,
    0,
    110,
    1422,
    1,
    0,
    0,
    0,
    112,
    1431,
    1,
    0,
    0,
    0,
    114,
    1451,
    1,
    0,
    0,
    0,
    116,
    1460,
    1,
    0,
    0,
    0,
    118,
    1467,
    1,
    0,
    0,
    0,
    120,
    1469,
    1,
    0,
    0,
    0,
    122,
    1479,
    1,
    0,
    0,
    0,
    124,
    1488,
    1,
    0,
    0,
    0,
    126,
    1497,
    1,
    0,
    0,
    0,
    128,
    1515,
    1,
    0,
    0,
    0,
    130,
    1521,
    1,
    0,
    0,
    0,
    132,
    1527,
    1,
    0,
    0,
    0,
    134,
    1535,
    1,
    0,
    0,
    0,
    136,
    1537,
    1,
    0,
    0,
    0,
    138,
    1545,
    1,
    0,
    0,
    0,
    140,
    1557,
    1,
    0,
    0,
    0,
    142,
    1579,
    1,
    0,
    0,
    0,
    144,
    1591,
    1,
    0,
    0,
    0,
    146,
    1613,
    1,
    0,
    0,
    0,
    148,
    1621,
    1,
    0,
    0,
    0,
    150,
    1629,
    1,
    0,
    0,
    0,
    152,
    1637,
    1,
    0,
    0,
    0,
    154,
    1647,
    1,
    0,
    0,
    0,
    156,
    1649,
    1,
    0,
    0,
    0,
    158,
    1653,
    1,
    0,
    0,
    0,
    160,
    1656,
    1,
    0,
    0,
    0,
    162,
    1662,
    1,
    0,
    0,
    0,
    164,
    1680,
    1,
    0,
    0,
    0,
    166,
    1693,
    1,
    0,
    0,
    0,
    168,
    1701,
    1,
    0,
    0,
    0,
    170,
    1720,
    1,
    0,
    0,
    0,
    172,
    1728,
    1,
    0,
    0,
    0,
    174,
    1733,
    1,
    0,
    0,
    0,
    176,
    1751,
    1,
    0,
    0,
    0,
    178,
    1759,
    1,
    0,
    0,
    0,
    180,
    1768,
    1,
    0,
    0,
    0,
    182,
    1770,
    1,
    0,
    0,
    0,
    184,
    1773,
    1,
    0,
    0,
    0,
    186,
    1797,
    1,
    0,
    0,
    0,
    188,
    1803,
    1,
    0,
    0,
    0,
    190,
    1805,
    1,
    0,
    0,
    0,
    192,
    1814,
    1,
    0,
    0,
    0,
    194,
    1818,
    1,
    0,
    0,
    0,
    196,
    1849,
    1,
    0,
    0,
    0,
    198,
    1872,
    1,
    0,
    0,
    0,
    200,
    1879,
    1,
    0,
    0,
    0,
    202,
    1881,
    1,
    0,
    0,
    0,
    204,
    1894,
    1,
    0,
    0,
    0,
    206,
    1898,
    1,
    0,
    0,
    0,
    208,
    1906,
    1,
    0,
    0,
    0,
    210,
    1909,
    1,
    0,
    0,
    0,
    212,
    1912,
    1,
    0,
    0,
    0,
    214,
    1915,
    1,
    0,
    0,
    0,
    216,
    1923,
    1,
    0,
    0,
    0,
    218,
    1944,
    1,
    0,
    0,
    0,
    220,
    1946,
    1,
    0,
    0,
    0,
    222,
    1958,
    1,
    0,
    0,
    0,
    224,
    1966,
    1,
    0,
    0,
    0,
    226,
    1974,
    1,
    0,
    0,
    0,
    228,
    1982,
    1,
    0,
    0,
    0,
    230,
    1994,
    1,
    0,
    0,
    0,
    232,
    2002,
    1,
    0,
    0,
    0,
    234,
    2014,
    1,
    0,
    0,
    0,
    236,
    2036,
    1,
    0,
    0,
    0,
    238,
    2044,
    1,
    0,
    0,
    0,
    240,
    2056,
    1,
    0,
    0,
    0,
    242,
    2058,
    1,
    0,
    0,
    0,
    244,
    2063,
    1,
    0,
    0,
    0,
    246,
    2068,
    1,
    0,
    0,
    0,
    248,
    2073,
    1,
    0,
    0,
    0,
    250,
    2078,
    1,
    0,
    0,
    0,
    252,
    2084,
    1,
    0,
    0,
    0,
    254,
    2099,
    1,
    0,
    0,
    0,
    256,
    2109,
    1,
    0,
    0,
    0,
    258,
    2116,
    1,
    0,
    0,
    0,
    260,
    2131,
    1,
    0,
    0,
    0,
    262,
    2134,
    1,
    0,
    0,
    0,
    264,
    2143,
    1,
    0,
    0,
    0,
    266,
    2145,
    1,
    0,
    0,
    0,
    268,
    2147,
    1,
    0,
    0,
    0,
    270,
    2172,
    1,
    0,
    0,
    0,
    272,
    2174,
    1,
    0,
    0,
    0,
    274,
    2199,
    1,
    0,
    0,
    0,
    276,
    2201,
    1,
    0,
    0,
    0,
    278,
    2206,
    1,
    0,
    0,
    0,
    280,
    2214,
    1,
    0,
    0,
    0,
    282,
    2224,
    1,
    0,
    0,
    0,
    284,
    2231,
    1,
    0,
    0,
    0,
    286,
    2237,
    1,
    0,
    0,
    0,
    288,
    2241,
    1,
    0,
    0,
    0,
    290,
    2244,
    1,
    0,
    0,
    0,
    292,
    2252,
    1,
    0,
    0,
    0,
    294,
    2257,
    1,
    0,
    0,
    0,
    296,
    2265,
    1,
    0,
    0,
    0,
    298,
    2276,
    1,
    0,
    0,
    0,
    300,
    2284,
    1,
    0,
    0,
    0,
    302,
    2289,
    1,
    0,
    0,
    0,
    304,
    2294,
    1,
    0,
    0,
    0,
    306,
    2339,
    1,
    0,
    0,
    0,
    308,
    2341,
    1,
    0,
    0,
    0,
    310,
    2362,
    1,
    0,
    0,
    0,
    312,
    2384,
    1,
    0,
    0,
    0,
    314,
    2386,
    1,
    0,
    0,
    0,
    316,
    2388,
    1,
    0,
    0,
    0,
    318,
    2396,
    1,
    0,
    0,
    0,
    320,
    2404,
    1,
    0,
    0,
    0,
    322,
    2410,
    1,
    0,
    0,
    0,
    324,
    2412,
    1,
    0,
    0,
    0,
    326,
    2419,
    1,
    0,
    0,
    0,
    328,
    2426,
    1,
    0,
    0,
    0,
    330,
    2428,
    1,
    0,
    0,
    0,
    332,
    2430,
    1,
    0,
    0,
    0,
    334,
    2441,
    1,
    0,
    0,
    0,
    336,
    2443,
    1,
    0,
    0,
    0,
    338,
    2452,
    1,
    0,
    0,
    0,
    340,
    2458,
    1,
    0,
    0,
    0,
    342,
    2460,
    1,
    0,
    0,
    0,
    344,
    2465,
    1,
    0,
    0,
    0,
    346,
    2491,
    1,
    0,
    0,
    0,
    348,
    2515,
    1,
    0,
    0,
    0,
    350,
    2521,
    1,
    0,
    0,
    0,
    352,
    2523,
    1,
    0,
    0,
    0,
    354,
    2526,
    1,
    0,
    0,
    0,
    356,
    2543,
    1,
    0,
    0,
    0,
    358,
    2550,
    1,
    0,
    0,
    0,
    360,
    2562,
    1,
    0,
    0,
    0,
    362,
    2575,
    1,
    0,
    0,
    0,
    364,
    2577,
    1,
    0,
    0,
    0,
    366,
    2586,
    1,
    0,
    0,
    0,
    368,
    2605,
    1,
    0,
    0,
    0,
    370,
    2611,
    1,
    0,
    0,
    0,
    372,
    2613,
    1,
    0,
    0,
    0,
    374,
    2648,
    1,
    0,
    0,
    0,
    376,
    2652,
    1,
    0,
    0,
    0,
    378,
    2654,
    1,
    0,
    0,
    0,
    380,
    2656,
    1,
    0,
    0,
    0,
    382,
    2659,
    1,
    0,
    0,
    0,
    384,
    2667,
    1,
    0,
    0,
    0,
    386,
    2671,
    1,
    0,
    0,
    0,
    388,
    2685,
    1,
    0,
    0,
    0,
    390,
    2703,
    1,
    0,
    0,
    0,
    392,
    2723,
    1,
    0,
    0,
    0,
    394,
    2725,
    1,
    0,
    0,
    0,
    396,
    2728,
    1,
    0,
    0,
    0,
    398,
    2732,
    1,
    0,
    0,
    0,
    400,
    2735,
    1,
    0,
    0,
    0,
    402,
    2738,
    1,
    0,
    0,
    0,
    404,
    2742,
    1,
    0,
    0,
    0,
    406,
    2753,
    1,
    0,
    0,
    0,
    408,
    2757,
    1,
    0,
    0,
    0,
    410,
    2760,
    1,
    0,
    0,
    0,
    412,
    2764,
    1,
    0,
    0,
    0,
    414,
    2766,
    1,
    0,
    0,
    0,
    416,
    2774,
    1,
    0,
    0,
    0,
    418,
    2783,
    1,
    0,
    0,
    0,
    420,
    2786,
    1,
    0,
    0,
    0,
    422,
    2790,
    1,
    0,
    0,
    0,
    424,
    2792,
    1,
    0,
    0,
    0,
    426,
    2797,
    1,
    0,
    0,
    0,
    428,
    2802,
    1,
    0,
    0,
    0,
    430,
    2806,
    1,
    0,
    0,
    0,
    432,
    2823,
    1,
    0,
    0,
    0,
    434,
    2825,
    1,
    0,
    0,
    0,
    436,
    2839,
    1,
    0,
    0,
    0,
    438,
    2856,
    1,
    0,
    0,
    0,
    440,
    2874,
    1,
    0,
    0,
    0,
    442,
    2897,
    1,
    0,
    0,
    0,
    444,
    2899,
    1,
    0,
    0,
    0,
    446,
    2908,
    1,
    0,
    0,
    0,
    448,
    2913,
    1,
    0,
    0,
    0,
    450,
    2920,
    1,
    0,
    0,
    0,
    452,
    2938,
    1,
    0,
    0,
    0,
    454,
    2943,
    1,
    0,
    0,
    0,
    456,
    2950,
    1,
    0,
    0,
    0,
    458,
    2954,
    1,
    0,
    0,
    0,
    460,
    2959,
    1,
    0,
    0,
    0,
    462,
    2971,
    1,
    0,
    0,
    0,
    464,
    2977,
    1,
    0,
    0,
    0,
    466,
    2990,
    1,
    0,
    0,
    0,
    468,
    2992,
    1,
    0,
    0,
    0,
    470,
    3005,
    1,
    0,
    0,
    0,
    472,
    3009,
    1,
    0,
    0,
    0,
    474,
    3019,
    1,
    0,
    0,
    0,
    476,
    3032,
    1,
    0,
    0,
    0,
    478,
    3034,
    1,
    0,
    0,
    0,
    480,
    3048,
    1,
    0,
    0,
    0,
    482,
    3051,
    1,
    0,
    0,
    0,
    484,
    3053,
    1,
    0,
    0,
    0,
    486,
    3056,
    1,
    0,
    0,
    0,
    488,
    3058,
    1,
    0,
    0,
    0,
    490,
    3063,
    1,
    0,
    0,
    0,
    492,
    3067,
    1,
    0,
    0,
    0,
    494,
    3072,
    1,
    0,
    0,
    0,
    496,
    3076,
    1,
    0,
    0,
    0,
    498,
    3082,
    1,
    0,
    0,
    0,
    500,
    3084,
    1,
    0,
    0,
    0,
    502,
    3086,
    1,
    0,
    0,
    0,
    504,
    3090,
    1,
    0,
    0,
    0,
    506,
    3093,
    1,
    0,
    0,
    0,
    508,
    3098,
    1,
    0,
    0,
    0,
    510,
    3118,
    1,
    0,
    0,
    0,
    512,
    3120,
    1,
    0,
    0,
    0,
    514,
    3124,
    1,
    0,
    0,
    0,
    516,
    3137,
    1,
    0,
    0,
    0,
    518,
    3150,
    1,
    0,
    0,
    0,
    520,
    3163,
    1,
    0,
    0,
    0,
    522,
    3178,
    1,
    0,
    0,
    0,
    524,
    3189,
    1,
    0,
    0,
    0,
    526,
    3191,
    1,
    0,
    0,
    0,
    528,
    3199,
    1,
    0,
    0,
    0,
    530,
    3201,
    1,
    0,
    0,
    0,
    532,
    3208,
    1,
    0,
    0,
    0,
    534,
    3210,
    1,
    0,
    0,
    0,
    536,
    3213,
    1,
    0,
    0,
    0,
    538,
    3229,
    1,
    0,
    0,
    0,
    540,
    3233,
    1,
    0,
    0,
    0,
    542,
    3235,
    1,
    0,
    0,
    0,
    544,
    3239,
    1,
    0,
    0,
    0,
    546,
    3252,
    1,
    0,
    0,
    0,
    548,
    3255,
    1,
    0,
    0,
    0,
    550,
    3264,
    1,
    0,
    0,
    0,
    552,
    3269,
    1,
    0,
    0,
    0,
    554,
    3283,
    1,
    0,
    0,
    0,
    556,
    3285,
    1,
    0,
    0,
    0,
    558,
    3290,
    1,
    0,
    0,
    0,
    560,
    3316,
    1,
    0,
    0,
    0,
    562,
    3318,
    1,
    0,
    0,
    0,
    564,
    3320,
    1,
    0,
    0,
    0,
    566,
    3322,
    1,
    0,
    0,
    0,
    568,
    3327,
    1,
    0,
    0,
    0,
    570,
    3333,
    1,
    0,
    0,
    0,
    572,
    3335,
    1,
    0,
    0,
    0,
    574,
    3337,
    1,
    0,
    0,
    0,
    576,
    3352,
    1,
    0,
    0,
    0,
    578,
    3373,
    1,
    0,
    0,
    0,
    580,
    3384,
    1,
    0,
    0,
    0,
    582,
    3388,
    1,
    0,
    0,
    0,
    584,
    3390,
    1,
    0,
    0,
    0,
    586,
    3395,
    1,
    0,
    0,
    0,
    588,
    3398,
    1,
    0,
    0,
    0,
    590,
    3401,
    1,
    0,
    0,
    0,
    592,
    3404,
    1,
    0,
    0,
    0,
    594,
    3410,
    1,
    0,
    0,
    0,
    596,
    3415,
    1,
    0,
    0,
    0,
    598,
    3428,
    1,
    0,
    0,
    0,
    600,
    3441,
    1,
    0,
    0,
    0,
    602,
    3443,
    1,
    0,
    0,
    0,
    604,
    3447,
    1,
    0,
    0,
    0,
    606,
    3455,
    1,
    0,
    0,
    0,
    608,
    3457,
    1,
    0,
    0,
    0,
    610,
    3470,
    1,
    0,
    0,
    0,
    612,
    3477,
    1,
    0,
    0,
    0,
    614,
    3484,
    1,
    0,
    0,
    0,
    616,
    3491,
    1,
    0,
    0,
    0,
    618,
    3498,
    1,
    0,
    0,
    0,
    620,
    3503,
    1,
    0,
    0,
    0,
    622,
    3508,
    1,
    0,
    0,
    0,
    624,
    3513,
    1,
    0,
    0,
    0,
    626,
    3523,
    1,
    0,
    0,
    0,
    628,
    3525,
    1,
    0,
    0,
    0,
    630,
    3527,
    1,
    0,
    0,
    0,
    632,
    3533,
    1,
    0,
    0,
    0,
    634,
    3535,
    1,
    0,
    0,
    0,
    636,
    3554,
    1,
    0,
    0,
    0,
    638,
    3571,
    1,
    0,
    0,
    0,
    640,
    3573,
    1,
    0,
    0,
    0,
    642,
    3575,
    1,
    0,
    0,
    0,
    644,
    3577,
    1,
    0,
    0,
    0,
    646,
    3579,
    1,
    0,
    0,
    0,
    648,
    3581,
    1,
    0,
    0,
    0,
    650,
    3586,
    1,
    0,
    0,
    0,
    652,
    3594,
    1,
    0,
    0,
    0,
    654,
    3599,
    1,
    0,
    0,
    0,
    656,
    3601,
    1,
    0,
    0,
    0,
    658,
    3603,
    1,
    0,
    0,
    0,
    660,
    3613,
    1,
    0,
    0,
    0,
    662,
    3624,
    1,
    0,
    0,
    0,
    664,
    3626,
    1,
    0,
    0,
    0,
    666,
    3632,
    1,
    0,
    0,
    0,
    668,
    3643,
    1,
    0,
    0,
    0,
    670,
    3645,
    1,
    0,
    0,
    0,
    672,
    3659,
    1,
    0,
    0,
    0,
    674,
    3667,
    1,
    0,
    0,
    0,
    676,
    3672,
    1,
    0,
    0,
    0,
    678,
    3676,
    1,
    0,
    0,
    0,
    680,
    3680,
    1,
    0,
    0,
    0,
    682,
    3684,
    1,
    0,
    0,
    0,
    684,
    3691,
    1,
    0,
    0,
    0,
    686,
    3700,
    1,
    0,
    0,
    0,
    688,
    3718,
    1,
    0,
    0,
    0,
    690,
    3741,
    1,
    0,
    0,
    0,
    692,
    3743,
    1,
    0,
    0,
    0,
    694,
    3747,
    1,
    0,
    0,
    0,
    696,
    3751,
    1,
    0,
    0,
    0,
    698,
    3755,
    1,
    0,
    0,
    0,
    700,
    3770,
    1,
    0,
    0,
    0,
    702,
    3772,
    1,
    0,
    0,
    0,
    704,
    3775,
    1,
    0,
    0,
    0,
    706,
    3778,
    1,
    0,
    0,
    0,
    708,
    3781,
    1,
    0,
    0,
    0,
    710,
    3784,
    1,
    0,
    0,
    0,
    712,
    3787,
    1,
    0,
    0,
    0,
    714,
    3790,
    1,
    0,
    0,
    0,
    716,
    3807,
    1,
    0,
    0,
    0,
    718,
    3809,
    1,
    0,
    0,
    0,
    720,
    3826,
    1,
    0,
    0,
    0,
    722,
    3850,
    1,
    0,
    0,
    0,
    724,
    3881,
    1,
    0,
    0,
    0,
    726,
    3884,
    1,
    0,
    0,
    0,
    728,
    3886,
    1,
    0,
    0,
    0,
    730,
    3889,
    1,
    0,
    0,
    0,
    732,
    3897,
    1,
    0,
    0,
    0,
    734,
    3899,
    1,
    0,
    0,
    0,
    736,
    3910,
    1,
    0,
    0,
    0,
    738,
    3921,
    1,
    0,
    0,
    0,
    740,
    3932,
    1,
    0,
    0,
    0,
    742,
    3943,
    1,
    0,
    0,
    0,
    744,
    3945,
    1,
    0,
    0,
    0,
    746,
    3948,
    1,
    0,
    0,
    0,
    748,
    3950,
    1,
    0,
    0,
    0,
    750,
    3956,
    1,
    0,
    0,
    0,
    752,
    3966,
    1,
    0,
    0,
    0,
    754,
    3971,
    1,
    0,
    0,
    0,
    756,
    3979,
    1,
    0,
    0,
    0,
    758,
    3981,
    1,
    0,
    0,
    0,
    760,
    3985,
    1,
    0,
    0,
    0,
    762,
    3991,
    1,
    0,
    0,
    0,
    764,
    3996,
    1,
    0,
    0,
    0,
    766,
    4012,
    1,
    0,
    0,
    0,
    768,
    4017,
    1,
    0,
    0,
    0,
    770,
    4032,
    1,
    0,
    0,
    0,
    772,
    4041,
    1,
    0,
    0,
    0,
    774,
    4043,
    1,
    0,
    0,
    0,
    776,
    4046,
    1,
    0,
    0,
    0,
    778,
    4055,
    1,
    0,
    0,
    0,
    780,
    4059,
    1,
    0,
    0,
    0,
    782,
    4084,
    1,
    0,
    0,
    0,
    784,
    4086,
    1,
    0,
    0,
    0,
    786,
    4113,
    1,
    0,
    0,
    0,
    788,
    4115,
    1,
    0,
    0,
    0,
    790,
    4118,
    1,
    0,
    0,
    0,
    792,
    4127,
    1,
    0,
    0,
    0,
    794,
    4130,
    1,
    0,
    0,
    0,
    796,
    4139,
    1,
    0,
    0,
    0,
    798,
    4144,
    1,
    0,
    0,
    0,
    800,
    4172,
    1,
    0,
    0,
    0,
    802,
    4174,
    1,
    0,
    0,
    0,
    804,
    4176,
    1,
    0,
    0,
    0,
    806,
    4178,
    1,
    0,
    0,
    0,
    808,
    4180,
    1,
    0,
    0,
    0,
    810,
    4186,
    1,
    0,
    0,
    0,
    812,
    4191,
    1,
    0,
    0,
    0,
    814,
    4197,
    1,
    0,
    0,
    0,
    816,
    4214,
    1,
    0,
    0,
    0,
    818,
    4221,
    1,
    0,
    0,
    0,
    820,
    4223,
    1,
    0,
    0,
    0,
    822,
    4230,
    1,
    0,
    0,
    0,
    824,
    4236,
    1,
    0,
    0,
    0,
    826,
    4242,
    1,
    0,
    0,
    0,
    828,
    4247,
    1,
    0,
    0,
    0,
    830,
    4253,
    1,
    0,
    0,
    0,
    832,
    4258,
    1,
    0,
    0,
    0,
    834,
    4288,
    1,
    0,
    0,
    0,
    836,
    4290,
    1,
    0,
    0,
    0,
    838,
    4297,
    1,
    0,
    0,
    0,
    840,
    4303,
    1,
    0,
    0,
    0,
    842,
    4321,
    1,
    0,
    0,
    0,
    844,
    4336,
    1,
    0,
    0,
    0,
    846,
    4341,
    1,
    0,
    0,
    0,
    848,
    4343,
    1,
    0,
    0,
    0,
    850,
    4368,
    1,
    0,
    0,
    0,
    852,
    4370,
    1,
    0,
    0,
    0,
    854,
    4389,
    1,
    0,
    0,
    0,
    856,
    4395,
    1,
    0,
    0,
    0,
    858,
    4397,
    1,
    0,
    0,
    0,
    860,
    4404,
    1,
    0,
    0,
    0,
    862,
    4406,
    1,
    0,
    0,
    0,
    864,
    4408,
    1,
    0,
    0,
    0,
    866,
    4414,
    1,
    0,
    0,
    0,
    868,
    4419,
    1,
    0,
    0,
    0,
    870,
    4424,
    1,
    0,
    0,
    0,
    872,
    4429,
    1,
    0,
    0,
    0,
    874,
    4441,
    1,
    0,
    0,
    0,
    876,
    4443,
    1,
    0,
    0,
    0,
    878,
    4446,
    1,
    0,
    0,
    0,
    880,
    4461,
    1,
    0,
    0,
    0,
    882,
    4471,
    1,
    0,
    0,
    0,
    884,
    4481,
    1,
    0,
    0,
    0,
    886,
    4483,
    1,
    0,
    0,
    0,
    888,
    4491,
    1,
    0,
    0,
    0,
    890,
    4496,
    1,
    0,
    0,
    0,
    892,
    4498,
    1,
    0,
    0,
    0,
    894,
    4500,
    1,
    0,
    0,
    0,
    896,
    4502,
    1,
    0,
    0,
    0,
    898,
    4504,
    1,
    0,
    0,
    0,
    900,
    4506,
    1,
    0,
    0,
    0,
    902,
    4508,
    1,
    0,
    0,
    0,
    904,
    905,
    6,
    0,
    -1,
    0,
    905,
    906,
    5,
    77,
    0,
    0,
    906,
    907,
    3,
    0,
    0,
    0,
    907,
    908,
    5,
    209,
    0,
    0,
    908,
    909,
    3,
    0,
    0,
    0,
    909,
    910,
    5,
    55,
    0,
    0,
    910,
    911,
    3,
    0,
    0,
    28,
    911,
    920,
    1,
    0,
    0,
    0,
    912,
    913,
    7,
    0,
    0,
    0,
    913,
    920,
    3,
    0,
    0,
    14,
    914,
    915,
    7,
    1,
    0,
    0,
    915,
    920,
    3,
    2,
    1,
    0,
    916,
    917,
    5,
    8,
    0,
    0,
    917,
    920,
    3,
    2,
    1,
    0,
    918,
    920,
    3,
    6,
    3,
    0,
    919,
    904,
    1,
    0,
    0,
    0,
    919,
    912,
    1,
    0,
    0,
    0,
    919,
    914,
    1,
    0,
    0,
    0,
    919,
    916,
    1,
    0,
    0,
    0,
    919,
    918,
    1,
    0,
    0,
    0,
    920,
    1002,
    1,
    0,
    0,
    0,
    921,
    922,
    10,
    27,
    0,
    0,
    922,
    923,
    5,
    190,
    0,
    0,
    923,
    1001,
    3,
    0,
    0,
    28,
    924,
    925,
    10,
    26,
    0,
    0,
    925,
    926,
    5,
    78,
    0,
    0,
    926,
    1001,
    3,
    0,
    0,
    27,
    927,
    928,
    10,
    25,
    0,
    0,
    928,
    929,
    5,
    112,
    0,
    0,
    929,
    1001,
    3,
    0,
    0,
    26,
    930,
    931,
    10,
    24,
    0,
    0,
    931,
    932,
    5,
    12,
    0,
    0,
    932,
    1001,
    3,
    0,
    0,
    25,
    933,
    934,
    10,
    23,
    0,
    0,
    934,
    935,
    5,
    173,
    0,
    0,
    935,
    1001,
    3,
    0,
    0,
    24,
    936,
    937,
    10,
    22,
    0,
    0,
    937,
    938,
    5,
    215,
    0,
    0,
    938,
    1001,
    3,
    0,
    0,
    23,
    939,
    940,
    10,
    21,
    0,
    0,
    940,
    941,
    5,
    195,
    0,
    0,
    941,
    1001,
    3,
    0,
    0,
    22,
    942,
    943,
    10,
    20,
    0,
    0,
    943,
    944,
    7,
    2,
    0,
    0,
    944,
    1001,
    3,
    0,
    0,
    21,
    945,
    946,
    10,
    19,
    0,
    0,
    946,
    947,
    7,
    3,
    0,
    0,
    947,
    1001,
    3,
    0,
    0,
    20,
    948,
    949,
    10,
    18,
    0,
    0,
    949,
    950,
    5,
    181,
    0,
    0,
    950,
    1001,
    3,
    0,
    0,
    19,
    951,
    952,
    10,
    17,
    0,
    0,
    952,
    953,
    7,
    4,
    0,
    0,
    953,
    1001,
    3,
    0,
    0,
    18,
    954,
    955,
    10,
    16,
    0,
    0,
    955,
    956,
    7,
    5,
    0,
    0,
    956,
    1001,
    3,
    0,
    0,
    17,
    957,
    958,
    10,
    15,
    0,
    0,
    958,
    959,
    7,
    6,
    0,
    0,
    959,
    1001,
    3,
    0,
    0,
    15,
    960,
    961,
    10,
    12,
    0,
    0,
    961,
    962,
    7,
    7,
    0,
    0,
    962,
    1001,
    3,
    2,
    1,
    0,
    963,
    964,
    10,
    11,
    0,
    0,
    964,
    965,
    5,
    13,
    0,
    0,
    965,
    1001,
    3,
    2,
    1,
    0,
    966,
    967,
    10,
    10,
    0,
    0,
    967,
    968,
    5,
    191,
    0,
    0,
    968,
    1001,
    3,
    2,
    1,
    0,
    969,
    970,
    10,
    9,
    0,
    0,
    970,
    971,
    5,
    100,
    0,
    0,
    971,
    1001,
    3,
    2,
    1,
    0,
    972,
    973,
    10,
    8,
    0,
    0,
    973,
    975,
    5,
    211,
    0,
    0,
    974,
    976,
    3,
    4,
    2,
    0,
    975,
    974,
    1,
    0,
    0,
    0,
    975,
    976,
    1,
    0,
    0,
    0,
    976,
    977,
    1,
    0,
    0,
    0,
    977,
    1001,
    5,
    212,
    0,
    0,
    978,
    979,
    10,
    7,
    0,
    0,
    979,
    980,
    5,
    192,
    0,
    0,
    980,
    982,
    5,
    196,
    0,
    0,
    981,
    983,
    3,
    4,
    2,
    0,
    982,
    981,
    1,
    0,
    0,
    0,
    982,
    983,
    1,
    0,
    0,
    0,
    983,
    984,
    1,
    0,
    0,
    0,
    984,
    1001,
    5,
    197,
    0,
    0,
    985,
    986,
    10,
    6,
    0,
    0,
    986,
    1001,
    3,
    16,
    8,
    0,
    987,
    988,
    10,
    5,
    0,
    0,
    988,
    989,
    5,
    202,
    0,
    0,
    989,
    1001,
    3,
    88,
    44,
    0,
    990,
    991,
    10,
    4,
    0,
    0,
    991,
    992,
    5,
    182,
    0,
    0,
    992,
    1001,
    3,
    14,
    7,
    0,
    993,
    994,
    10,
    3,
    0,
    0,
    994,
    995,
    5,
    180,
    0,
    0,
    995,
    998,
    3,
    88,
    44,
    0,
    996,
    999,
    3,
    14,
    7,
    0,
    997,
    999,
    3,
    16,
    8,
    0,
    998,
    996,
    1,
    0,
    0,
    0,
    998,
    997,
    1,
    0,
    0,
    0,
    999,
    1001,
    1,
    0,
    0,
    0,
    1e3,
    921,
    1,
    0,
    0,
    0,
    1e3,
    924,
    1,
    0,
    0,
    0,
    1e3,
    927,
    1,
    0,
    0,
    0,
    1e3,
    930,
    1,
    0,
    0,
    0,
    1e3,
    933,
    1,
    0,
    0,
    0,
    1e3,
    936,
    1,
    0,
    0,
    0,
    1e3,
    939,
    1,
    0,
    0,
    0,
    1e3,
    942,
    1,
    0,
    0,
    0,
    1e3,
    945,
    1,
    0,
    0,
    0,
    1e3,
    948,
    1,
    0,
    0,
    0,
    1e3,
    951,
    1,
    0,
    0,
    0,
    1e3,
    954,
    1,
    0,
    0,
    0,
    1e3,
    957,
    1,
    0,
    0,
    0,
    1e3,
    960,
    1,
    0,
    0,
    0,
    1e3,
    963,
    1,
    0,
    0,
    0,
    1e3,
    966,
    1,
    0,
    0,
    0,
    1e3,
    969,
    1,
    0,
    0,
    0,
    1e3,
    972,
    1,
    0,
    0,
    0,
    1e3,
    978,
    1,
    0,
    0,
    0,
    1e3,
    985,
    1,
    0,
    0,
    0,
    1e3,
    987,
    1,
    0,
    0,
    0,
    1e3,
    990,
    1,
    0,
    0,
    0,
    1e3,
    993,
    1,
    0,
    0,
    0,
    1001,
    1004,
    1,
    0,
    0,
    0,
    1002,
    1e3,
    1,
    0,
    0,
    0,
    1002,
    1003,
    1,
    0,
    0,
    0,
    1003,
    1,
    1,
    0,
    0,
    0,
    1004,
    1002,
    1,
    0,
    0,
    0,
    1005,
    1006,
    3,
    88,
    44,
    0,
    1006,
    3,
    1,
    0,
    0,
    0,
    1007,
    1012,
    3,
    0,
    0,
    0,
    1008,
    1009,
    5,
    200,
    0,
    0,
    1009,
    1011,
    3,
    0,
    0,
    0,
    1010,
    1008,
    1,
    0,
    0,
    0,
    1011,
    1014,
    1,
    0,
    0,
    0,
    1012,
    1010,
    1,
    0,
    0,
    0,
    1012,
    1013,
    1,
    0,
    0,
    0,
    1013,
    5,
    1,
    0,
    0,
    0,
    1014,
    1012,
    1,
    0,
    0,
    0,
    1015,
    1037,
    3,
    8,
    4,
    0,
    1016,
    1037,
    5,
    223,
    0,
    0,
    1017,
    1037,
    3,
    24,
    12,
    0,
    1018,
    1022,
    3,
    88,
    44,
    0,
    1019,
    1023,
    3,
    16,
    8,
    0,
    1020,
    1021,
    5,
    202,
    0,
    0,
    1021,
    1023,
    5,
    102,
    0,
    0,
    1022,
    1019,
    1,
    0,
    0,
    0,
    1022,
    1020,
    1,
    0,
    0,
    0,
    1022,
    1023,
    1,
    0,
    0,
    0,
    1023,
    1037,
    1,
    0,
    0,
    0,
    1024,
    1037,
    3,
    12,
    6,
    0,
    1025,
    1037,
    3,
    14,
    7,
    0,
    1026,
    1027,
    5,
    196,
    0,
    0,
    1027,
    1028,
    5,
    13,
    0,
    0,
    1028,
    1029,
    3,
    2,
    1,
    0,
    1029,
    1030,
    5,
    197,
    0,
    0,
    1030,
    1037,
    1,
    0,
    0,
    0,
    1031,
    1033,
    5,
    196,
    0,
    0,
    1032,
    1034,
    3,
    4,
    2,
    0,
    1033,
    1032,
    1,
    0,
    0,
    0,
    1033,
    1034,
    1,
    0,
    0,
    0,
    1034,
    1035,
    1,
    0,
    0,
    0,
    1035,
    1037,
    5,
    197,
    0,
    0,
    1036,
    1015,
    1,
    0,
    0,
    0,
    1036,
    1016,
    1,
    0,
    0,
    0,
    1036,
    1017,
    1,
    0,
    0,
    0,
    1036,
    1018,
    1,
    0,
    0,
    0,
    1036,
    1024,
    1,
    0,
    0,
    0,
    1036,
    1025,
    1,
    0,
    0,
    0,
    1036,
    1026,
    1,
    0,
    0,
    0,
    1036,
    1031,
    1,
    0,
    0,
    0,
    1037,
    7,
    1,
    0,
    0,
    0,
    1038,
    1042,
    5,
    108,
    0,
    0,
    1039,
    1040,
    5,
    196,
    0,
    0,
    1040,
    1042,
    5,
    197,
    0,
    0,
    1041,
    1038,
    1,
    0,
    0,
    0,
    1041,
    1039,
    1,
    0,
    0,
    0,
    1042,
    9,
    1,
    0,
    0,
    0,
    1043,
    1044,
    3,
    88,
    44,
    0,
    1044,
    11,
    1,
    0,
    0,
    0,
    1045,
    1046,
    5,
    105,
    0,
    0,
    1046,
    1047,
    3,
    88,
    44,
    0,
    1047,
    1048,
    3,
    16,
    8,
    0,
    1048,
    13,
    1,
    0,
    0,
    0,
    1049,
    1050,
    5,
    214,
    0,
    0,
    1050,
    1051,
    3,
    284,
    142,
    0,
    1051,
    1052,
    5,
    216,
    0,
    0,
    1052,
    15,
    1,
    0,
    0,
    0,
    1053,
    1056,
    5,
    196,
    0,
    0,
    1054,
    1057,
    3,
    18,
    9,
    0,
    1055,
    1057,
    3,
    20,
    10,
    0,
    1056,
    1054,
    1,
    0,
    0,
    0,
    1056,
    1055,
    1,
    0,
    0,
    0,
    1056,
    1057,
    1,
    0,
    0,
    0,
    1057,
    1058,
    1,
    0,
    0,
    0,
    1058,
    1059,
    5,
    197,
    0,
    0,
    1059,
    17,
    1,
    0,
    0,
    0,
    1060,
    1065,
    3,
    0,
    0,
    0,
    1061,
    1062,
    5,
    200,
    0,
    0,
    1062,
    1064,
    3,
    0,
    0,
    0,
    1063,
    1061,
    1,
    0,
    0,
    0,
    1064,
    1067,
    1,
    0,
    0,
    0,
    1065,
    1063,
    1,
    0,
    0,
    0,
    1065,
    1066,
    1,
    0,
    0,
    0,
    1066,
    19,
    1,
    0,
    0,
    0,
    1067,
    1065,
    1,
    0,
    0,
    0,
    1068,
    1073,
    3,
    22,
    11,
    0,
    1069,
    1070,
    5,
    200,
    0,
    0,
    1070,
    1072,
    3,
    22,
    11,
    0,
    1071,
    1069,
    1,
    0,
    0,
    0,
    1072,
    1075,
    1,
    0,
    0,
    0,
    1073,
    1071,
    1,
    0,
    0,
    0,
    1073,
    1074,
    1,
    0,
    0,
    0,
    1074,
    21,
    1,
    0,
    0,
    0,
    1075,
    1073,
    1,
    0,
    0,
    0,
    1076,
    1077,
    3,
    88,
    44,
    0,
    1077,
    1078,
    5,
    207,
    0,
    0,
    1078,
    1079,
    3,
    0,
    0,
    0,
    1079,
    23,
    1,
    0,
    0,
    0,
    1080,
    1086,
    3,
    26,
    13,
    0,
    1081,
    1086,
    3,
    28,
    14,
    0,
    1082,
    1086,
    3,
    30,
    15,
    0,
    1083,
    1086,
    3,
    32,
    16,
    0,
    1084,
    1086,
    3,
    34,
    17,
    0,
    1085,
    1080,
    1,
    0,
    0,
    0,
    1085,
    1081,
    1,
    0,
    0,
    0,
    1085,
    1082,
    1,
    0,
    0,
    0,
    1085,
    1083,
    1,
    0,
    0,
    0,
    1085,
    1084,
    1,
    0,
    0,
    0,
    1086,
    25,
    1,
    0,
    0,
    0,
    1087,
    1088,
    7,
    8,
    0,
    0,
    1088,
    27,
    1,
    0,
    0,
    0,
    1089,
    1090,
    5,
    220,
    0,
    0,
    1090,
    29,
    1,
    0,
    0,
    0,
    1091,
    1092,
    5,
    221,
    0,
    0,
    1092,
    31,
    1,
    0,
    0,
    0,
    1093,
    1094,
    5,
    222,
    0,
    0,
    1094,
    33,
    1,
    0,
    0,
    0,
    1095,
    1096,
    5,
    198,
    0,
    0,
    1096,
    35,
    1,
    0,
    0,
    0,
    1097,
    1098,
    3,
    0,
    0,
    0,
    1098,
    37,
    1,
    0,
    0,
    0,
    1099,
    1100,
    3,
    0,
    0,
    0,
    1100,
    39,
    1,
    0,
    0,
    0,
    1101,
    1105,
    5,
    218,
    0,
    0,
    1102,
    1105,
    5,
    219,
    0,
    0,
    1103,
    1105,
    3,
    42,
    21,
    0,
    1104,
    1101,
    1,
    0,
    0,
    0,
    1104,
    1102,
    1,
    0,
    0,
    0,
    1104,
    1103,
    1,
    0,
    0,
    0,
    1105,
    41,
    1,
    0,
    0,
    0,
    1106,
    1107,
    7,
    9,
    0,
    0,
    1107,
    43,
    1,
    0,
    0,
    0,
    1108,
    1109,
    5,
    206,
    0,
    0,
    1109,
    1110,
    3,
    40,
    20,
    0,
    1110,
    1111,
    5,
    208,
    0,
    0,
    1111,
    1112,
    3,
    40,
    20,
    0,
    1112,
    1119,
    1,
    0,
    0,
    0,
    1113,
    1114,
    5,
    206,
    0,
    0,
    1114,
    1115,
    3,
    40,
    20,
    0,
    1115,
    1116,
    5,
    208,
    0,
    0,
    1116,
    1119,
    1,
    0,
    0,
    0,
    1117,
    1119,
    3,
    40,
    20,
    0,
    1118,
    1108,
    1,
    0,
    0,
    0,
    1118,
    1113,
    1,
    0,
    0,
    0,
    1118,
    1117,
    1,
    0,
    0,
    0,
    1119,
    45,
    1,
    0,
    0,
    0,
    1120,
    1138,
    5,
    205,
    0,
    0,
    1121,
    1125,
    5,
    214,
    0,
    0,
    1122,
    1124,
    3,
    48,
    24,
    0,
    1123,
    1122,
    1,
    0,
    0,
    0,
    1124,
    1127,
    1,
    0,
    0,
    0,
    1125,
    1123,
    1,
    0,
    0,
    0,
    1125,
    1126,
    1,
    0,
    0,
    0,
    1126,
    1128,
    1,
    0,
    0,
    0,
    1127,
    1125,
    1,
    0,
    0,
    0,
    1128,
    1138,
    5,
    216,
    0,
    0,
    1129,
    1133,
    5,
    214,
    0,
    0,
    1130,
    1132,
    3,
    56,
    28,
    0,
    1131,
    1130,
    1,
    0,
    0,
    0,
    1132,
    1135,
    1,
    0,
    0,
    0,
    1133,
    1131,
    1,
    0,
    0,
    0,
    1133,
    1134,
    1,
    0,
    0,
    0,
    1134,
    1136,
    1,
    0,
    0,
    0,
    1135,
    1133,
    1,
    0,
    0,
    0,
    1136,
    1138,
    5,
    216,
    0,
    0,
    1137,
    1120,
    1,
    0,
    0,
    0,
    1137,
    1121,
    1,
    0,
    0,
    0,
    1137,
    1129,
    1,
    0,
    0,
    0,
    1138,
    47,
    1,
    0,
    0,
    0,
    1139,
    1142,
    3,
    50,
    25,
    0,
    1140,
    1142,
    3,
    56,
    28,
    0,
    1141,
    1139,
    1,
    0,
    0,
    0,
    1141,
    1140,
    1,
    0,
    0,
    0,
    1142,
    49,
    1,
    0,
    0,
    0,
    1143,
    1146,
    3,
    104,
    52,
    0,
    1144,
    1146,
    3,
    106,
    53,
    0,
    1145,
    1143,
    1,
    0,
    0,
    0,
    1145,
    1144,
    1,
    0,
    0,
    0,
    1146,
    51,
    1,
    0,
    0,
    0,
    1147,
    1149,
    3,
    338,
    169,
    0,
    1148,
    1147,
    1,
    0,
    0,
    0,
    1149,
    1152,
    1,
    0,
    0,
    0,
    1150,
    1148,
    1,
    0,
    0,
    0,
    1150,
    1151,
    1,
    0,
    0,
    0,
    1151,
    1153,
    1,
    0,
    0,
    0,
    1152,
    1150,
    1,
    0,
    0,
    0,
    1153,
    1158,
    5,
    48,
    0,
    0,
    1154,
    1156,
    3,
    44,
    22,
    0,
    1155,
    1154,
    1,
    0,
    0,
    0,
    1155,
    1156,
    1,
    0,
    0,
    0,
    1156,
    1157,
    1,
    0,
    0,
    0,
    1157,
    1159,
    5,
    74,
    0,
    0,
    1158,
    1155,
    1,
    0,
    0,
    0,
    1158,
    1159,
    1,
    0,
    0,
    0,
    1159,
    1160,
    1,
    0,
    0,
    0,
    1160,
    1165,
    3,
    88,
    44,
    0,
    1161,
    1162,
    5,
    200,
    0,
    0,
    1162,
    1164,
    3,
    88,
    44,
    0,
    1163,
    1161,
    1,
    0,
    0,
    0,
    1164,
    1167,
    1,
    0,
    0,
    0,
    1165,
    1163,
    1,
    0,
    0,
    0,
    1165,
    1166,
    1,
    0,
    0,
    0,
    1166,
    1168,
    1,
    0,
    0,
    0,
    1167,
    1165,
    1,
    0,
    0,
    0,
    1168,
    1169,
    5,
    154,
    0,
    0,
    1169,
    1174,
    3,
    88,
    44,
    0,
    1170,
    1171,
    5,
    200,
    0,
    0,
    1171,
    1173,
    3,
    88,
    44,
    0,
    1172,
    1170,
    1,
    0,
    0,
    0,
    1173,
    1176,
    1,
    0,
    0,
    0,
    1174,
    1172,
    1,
    0,
    0,
    0,
    1174,
    1175,
    1,
    0,
    0,
    0,
    1175,
    1177,
    1,
    0,
    0,
    0,
    1176,
    1174,
    1,
    0,
    0,
    0,
    1177,
    1178,
    3,
    46,
    23,
    0,
    1178,
    1190,
    1,
    0,
    0,
    0,
    1179,
    1181,
    3,
    338,
    169,
    0,
    1180,
    1179,
    1,
    0,
    0,
    0,
    1181,
    1184,
    1,
    0,
    0,
    0,
    1182,
    1180,
    1,
    0,
    0,
    0,
    1182,
    1183,
    1,
    0,
    0,
    0,
    1183,
    1185,
    1,
    0,
    0,
    0,
    1184,
    1182,
    1,
    0,
    0,
    0,
    1185,
    1186,
    5,
    48,
    0,
    0,
    1186,
    1187,
    3,
    366,
    183,
    0,
    1187,
    1188,
    3,
    46,
    23,
    0,
    1188,
    1190,
    1,
    0,
    0,
    0,
    1189,
    1150,
    1,
    0,
    0,
    0,
    1189,
    1182,
    1,
    0,
    0,
    0,
    1190,
    53,
    1,
    0,
    0,
    0,
    1191,
    1192,
    3,
    88,
    44,
    0,
    1192,
    55,
    1,
    0,
    0,
    0,
    1193,
    1194,
    3,
    58,
    29,
    0,
    1194,
    57,
    1,
    0,
    0,
    0,
    1195,
    1200,
    3,
    60,
    30,
    0,
    1196,
    1200,
    3,
    62,
    31,
    0,
    1197,
    1200,
    3,
    64,
    32,
    0,
    1198,
    1200,
    3,
    344,
    172,
    0,
    1199,
    1195,
    1,
    0,
    0,
    0,
    1199,
    1196,
    1,
    0,
    0,
    0,
    1199,
    1197,
    1,
    0,
    0,
    0,
    1199,
    1198,
    1,
    0,
    0,
    0,
    1200,
    59,
    1,
    0,
    0,
    0,
    1201,
    1203,
    5,
    30,
    0,
    0,
    1202,
    1204,
    3,
    44,
    22,
    0,
    1203,
    1202,
    1,
    0,
    0,
    0,
    1203,
    1204,
    1,
    0,
    0,
    0,
    1204,
    1214,
    1,
    0,
    0,
    0,
    1205,
    1206,
    5,
    1,
    0,
    0,
    1206,
    1211,
    3,
    54,
    27,
    0,
    1207,
    1208,
    5,
    200,
    0,
    0,
    1208,
    1210,
    3,
    54,
    27,
    0,
    1209,
    1207,
    1,
    0,
    0,
    0,
    1210,
    1213,
    1,
    0,
    0,
    0,
    1211,
    1209,
    1,
    0,
    0,
    0,
    1211,
    1212,
    1,
    0,
    0,
    0,
    1212,
    1215,
    1,
    0,
    0,
    0,
    1213,
    1211,
    1,
    0,
    0,
    0,
    1214,
    1205,
    1,
    0,
    0,
    0,
    1214,
    1215,
    1,
    0,
    0,
    0,
    1215,
    1217,
    1,
    0,
    0,
    0,
    1216,
    1201,
    1,
    0,
    0,
    0,
    1216,
    1217,
    1,
    0,
    0,
    0,
    1217,
    1220,
    1,
    0,
    0,
    0,
    1218,
    1219,
    5,
    95,
    0,
    0,
    1219,
    1221,
    5,
    220,
    0,
    0,
    1220,
    1218,
    1,
    0,
    0,
    0,
    1220,
    1221,
    1,
    0,
    0,
    0,
    1221,
    1222,
    1,
    0,
    0,
    0,
    1222,
    1223,
    5,
    223,
    0,
    0,
    1223,
    61,
    1,
    0,
    0,
    0,
    1224,
    1226,
    5,
    54,
    0,
    0,
    1225,
    1227,
    3,
    44,
    22,
    0,
    1226,
    1225,
    1,
    0,
    0,
    0,
    1226,
    1227,
    1,
    0,
    0,
    0,
    1227,
    1230,
    1,
    0,
    0,
    0,
    1228,
    1229,
    5,
    95,
    0,
    0,
    1229,
    1231,
    5,
    220,
    0,
    0,
    1230,
    1228,
    1,
    0,
    0,
    0,
    1230,
    1231,
    1,
    0,
    0,
    0,
    1231,
    1232,
    1,
    0,
    0,
    0,
    1232,
    1233,
    5,
    223,
    0,
    0,
    1233,
    63,
    1,
    0,
    0,
    0,
    1234,
    1236,
    5,
    131,
    0,
    0,
    1235,
    1237,
    3,
    44,
    22,
    0,
    1236,
    1235,
    1,
    0,
    0,
    0,
    1236,
    1237,
    1,
    0,
    0,
    0,
    1237,
    1239,
    1,
    0,
    0,
    0,
    1238,
    1234,
    1,
    0,
    0,
    0,
    1238,
    1239,
    1,
    0,
    0,
    0,
    1239,
    1240,
    1,
    0,
    0,
    0,
    1240,
    1241,
    5,
    93,
    0,
    0,
    1241,
    1242,
    5,
    220,
    0,
    0,
    1242,
    1243,
    5,
    223,
    0,
    0,
    1243,
    65,
    1,
    0,
    0,
    0,
    1244,
    1246,
    3,
    370,
    185,
    0,
    1245,
    1244,
    1,
    0,
    0,
    0,
    1246,
    1249,
    1,
    0,
    0,
    0,
    1247,
    1245,
    1,
    0,
    0,
    0,
    1247,
    1248,
    1,
    0,
    0,
    0,
    1248,
    1250,
    1,
    0,
    0,
    0,
    1249,
    1247,
    1,
    0,
    0,
    0,
    1250,
    1251,
    5,
    0,
    0,
    1,
    1251,
    67,
    1,
    0,
    0,
    0,
    1252,
    1254,
    3,
    340,
    170,
    0,
    1253,
    1252,
    1,
    0,
    0,
    0,
    1254,
    1257,
    1,
    0,
    0,
    0,
    1255,
    1253,
    1,
    0,
    0,
    0,
    1255,
    1256,
    1,
    0,
    0,
    0,
    1256,
    1258,
    1,
    0,
    0,
    0,
    1257,
    1255,
    1,
    0,
    0,
    0,
    1258,
    1259,
    3,
    70,
    35,
    0,
    1259,
    1260,
    3,
    72,
    36,
    0,
    1260,
    69,
    1,
    0,
    0,
    0,
    1261,
    1263,
    5,
    104,
    0,
    0,
    1262,
    1264,
    3,
    44,
    22,
    0,
    1263,
    1262,
    1,
    0,
    0,
    0,
    1263,
    1264,
    1,
    0,
    0,
    0,
    1264,
    71,
    1,
    0,
    0,
    0,
    1265,
    1275,
    5,
    205,
    0,
    0,
    1266,
    1270,
    5,
    214,
    0,
    0,
    1267,
    1269,
    3,
    74,
    37,
    0,
    1268,
    1267,
    1,
    0,
    0,
    0,
    1269,
    1272,
    1,
    0,
    0,
    0,
    1270,
    1268,
    1,
    0,
    0,
    0,
    1270,
    1271,
    1,
    0,
    0,
    0,
    1271,
    1273,
    1,
    0,
    0,
    0,
    1272,
    1270,
    1,
    0,
    0,
    0,
    1273,
    1275,
    5,
    216,
    0,
    0,
    1274,
    1265,
    1,
    0,
    0,
    0,
    1274,
    1266,
    1,
    0,
    0,
    0,
    1275,
    73,
    1,
    0,
    0,
    0,
    1276,
    1280,
    3,
    80,
    40,
    0,
    1277,
    1280,
    3,
    86,
    43,
    0,
    1278,
    1280,
    3,
    90,
    45,
    0,
    1279,
    1276,
    1,
    0,
    0,
    0,
    1279,
    1277,
    1,
    0,
    0,
    0,
    1279,
    1278,
    1,
    0,
    0,
    0,
    1280,
    75,
    1,
    0,
    0,
    0,
    1281,
    1283,
    3,
    78,
    39,
    0,
    1282,
    1281,
    1,
    0,
    0,
    0,
    1282,
    1283,
    1,
    0,
    0,
    0,
    1283,
    77,
    1,
    0,
    0,
    0,
    1284,
    1285,
    7,
    10,
    0,
    0,
    1285,
    79,
    1,
    0,
    0,
    0,
    1286,
    1289,
    3,
    82,
    41,
    0,
    1287,
    1289,
    3,
    84,
    42,
    0,
    1288,
    1286,
    1,
    0,
    0,
    0,
    1288,
    1287,
    1,
    0,
    0,
    0,
    1289,
    81,
    1,
    0,
    0,
    0,
    1290,
    1291,
    3,
    76,
    38,
    0,
    1291,
    1292,
    3,
    102,
    51,
    0,
    1292,
    83,
    1,
    0,
    0,
    0,
    1293,
    1294,
    3,
    76,
    38,
    0,
    1294,
    1295,
    3,
    106,
    53,
    0,
    1295,
    85,
    1,
    0,
    0,
    0,
    1296,
    1297,
    3,
    76,
    38,
    0,
    1297,
    1302,
    5,
    7,
    0,
    0,
    1298,
    1299,
    5,
    206,
    0,
    0,
    1299,
    1300,
    3,
    40,
    20,
    0,
    1300,
    1301,
    5,
    208,
    0,
    0,
    1301,
    1303,
    1,
    0,
    0,
    0,
    1302,
    1298,
    1,
    0,
    0,
    0,
    1302,
    1303,
    1,
    0,
    0,
    0,
    1303,
    1305,
    1,
    0,
    0,
    0,
    1304,
    1306,
    3,
    40,
    20,
    0,
    1305,
    1304,
    1,
    0,
    0,
    0,
    1305,
    1306,
    1,
    0,
    0,
    0,
    1306,
    1307,
    1,
    0,
    0,
    0,
    1307,
    1308,
    5,
    71,
    0,
    0,
    1308,
    1309,
    3,
    88,
    44,
    0,
    1309,
    1310,
    3,
    46,
    23,
    0,
    1310,
    87,
    1,
    0,
    0,
    0,
    1311,
    1312,
    5,
    193,
    0,
    0,
    1312,
    1314,
    5,
    183,
    0,
    0,
    1313,
    1311,
    1,
    0,
    0,
    0,
    1313,
    1314,
    1,
    0,
    0,
    0,
    1314,
    1320,
    1,
    0,
    0,
    0,
    1315,
    1316,
    3,
    40,
    20,
    0,
    1316,
    1317,
    5,
    183,
    0,
    0,
    1317,
    1319,
    1,
    0,
    0,
    0,
    1318,
    1315,
    1,
    0,
    0,
    0,
    1319,
    1322,
    1,
    0,
    0,
    0,
    1320,
    1318,
    1,
    0,
    0,
    0,
    1320,
    1321,
    1,
    0,
    0,
    0,
    1321,
    1323,
    1,
    0,
    0,
    0,
    1322,
    1320,
    1,
    0,
    0,
    0,
    1323,
    1324,
    3,
    40,
    20,
    0,
    1324,
    89,
    1,
    0,
    0,
    0,
    1325,
    1327,
    3,
    78,
    39,
    0,
    1326,
    1325,
    1,
    0,
    0,
    0,
    1326,
    1327,
    1,
    0,
    0,
    0,
    1327,
    1328,
    1,
    0,
    0,
    0,
    1328,
    1330,
    5,
    79,
    0,
    0,
    1329,
    1331,
    5,
    8,
    0,
    0,
    1330,
    1329,
    1,
    0,
    0,
    0,
    1330,
    1331,
    1,
    0,
    0,
    0,
    1331,
    1332,
    1,
    0,
    0,
    0,
    1332,
    1333,
    3,
    92,
    46,
    0,
    1333,
    1334,
    3,
    46,
    23,
    0,
    1334,
    91,
    1,
    0,
    0,
    0,
    1335,
    1338,
    3,
    94,
    47,
    0,
    1336,
    1338,
    3,
    96,
    48,
    0,
    1337,
    1335,
    1,
    0,
    0,
    0,
    1337,
    1336,
    1,
    0,
    0,
    0,
    1338,
    93,
    1,
    0,
    0,
    0,
    1339,
    1342,
    3,
    88,
    44,
    0,
    1340,
    1341,
    5,
    183,
    0,
    0,
    1341,
    1343,
    5,
    179,
    0,
    0,
    1342,
    1340,
    1,
    0,
    0,
    0,
    1342,
    1343,
    1,
    0,
    0,
    0,
    1343,
    95,
    1,
    0,
    0,
    0,
    1344,
    1345,
    3,
    88,
    44,
    0,
    1345,
    1346,
    5,
    183,
    0,
    0,
    1346,
    1349,
    5,
    198,
    0,
    0,
    1347,
    1348,
    5,
    183,
    0,
    0,
    1348,
    1350,
    5,
    179,
    0,
    0,
    1349,
    1347,
    1,
    0,
    0,
    0,
    1349,
    1350,
    1,
    0,
    0,
    0,
    1350,
    1353,
    1,
    0,
    0,
    0,
    1351,
    1353,
    3,
    98,
    49,
    0,
    1352,
    1344,
    1,
    0,
    0,
    0,
    1352,
    1351,
    1,
    0,
    0,
    0,
    1353,
    97,
    1,
    0,
    0,
    0,
    1354,
    1356,
    3,
    884,
    442,
    0,
    1355,
    1357,
    3,
    100,
    50,
    0,
    1356,
    1355,
    1,
    0,
    0,
    0,
    1357,
    1358,
    1,
    0,
    0,
    0,
    1358,
    1356,
    1,
    0,
    0,
    0,
    1358,
    1359,
    1,
    0,
    0,
    0,
    1359,
    1367,
    1,
    0,
    0,
    0,
    1360,
    1362,
    3,
    898,
    449,
    0,
    1361,
    1363,
    3,
    100,
    50,
    0,
    1362,
    1361,
    1,
    0,
    0,
    0,
    1363,
    1364,
    1,
    0,
    0,
    0,
    1364,
    1362,
    1,
    0,
    0,
    0,
    1364,
    1365,
    1,
    0,
    0,
    0,
    1365,
    1367,
    1,
    0,
    0,
    0,
    1366,
    1354,
    1,
    0,
    0,
    0,
    1366,
    1360,
    1,
    0,
    0,
    0,
    1367,
    99,
    1,
    0,
    0,
    0,
    1368,
    1369,
    5,
    211,
    0,
    0,
    1369,
    1370,
    3,
    0,
    0,
    0,
    1370,
    1371,
    5,
    212,
    0,
    0,
    1371,
    101,
    1,
    0,
    0,
    0,
    1372,
    1375,
    3,
    58,
    29,
    0,
    1373,
    1375,
    3,
    104,
    52,
    0,
    1374,
    1372,
    1,
    0,
    0,
    0,
    1374,
    1373,
    1,
    0,
    0,
    0,
    1375,
    103,
    1,
    0,
    0,
    0,
    1376,
    1403,
    3,
    52,
    26,
    0,
    1377,
    1403,
    3,
    68,
    34,
    0,
    1378,
    1403,
    3,
    108,
    54,
    0,
    1379,
    1403,
    3,
    160,
    80,
    0,
    1380,
    1403,
    3,
    242,
    121,
    0,
    1381,
    1403,
    3,
    244,
    122,
    0,
    1382,
    1403,
    3,
    246,
    123,
    0,
    1383,
    1403,
    3,
    336,
    168,
    0,
    1384,
    1403,
    3,
    248,
    124,
    0,
    1385,
    1403,
    3,
    250,
    125,
    0,
    1386,
    1403,
    3,
    300,
    150,
    0,
    1387,
    1403,
    3,
    276,
    138,
    0,
    1388,
    1403,
    3,
    280,
    140,
    0,
    1389,
    1403,
    3,
    292,
    146,
    0,
    1390,
    1403,
    3,
    322,
    161,
    0,
    1391,
    1403,
    3,
    356,
    178,
    0,
    1392,
    1403,
    3,
    358,
    179,
    0,
    1393,
    1403,
    3,
    132,
    66,
    0,
    1394,
    1403,
    3,
    140,
    70,
    0,
    1395,
    1403,
    3,
    166,
    83,
    0,
    1396,
    1403,
    3,
    144,
    72,
    0,
    1397,
    1403,
    3,
    234,
    117,
    0,
    1398,
    1403,
    3,
    218,
    109,
    0,
    1399,
    1403,
    3,
    222,
    111,
    0,
    1400,
    1403,
    3,
    230,
    115,
    0,
    1401,
    1403,
    3,
    238,
    119,
    0,
    1402,
    1376,
    1,
    0,
    0,
    0,
    1402,
    1377,
    1,
    0,
    0,
    0,
    1402,
    1378,
    1,
    0,
    0,
    0,
    1402,
    1379,
    1,
    0,
    0,
    0,
    1402,
    1380,
    1,
    0,
    0,
    0,
    1402,
    1381,
    1,
    0,
    0,
    0,
    1402,
    1382,
    1,
    0,
    0,
    0,
    1402,
    1383,
    1,
    0,
    0,
    0,
    1402,
    1384,
    1,
    0,
    0,
    0,
    1402,
    1385,
    1,
    0,
    0,
    0,
    1402,
    1386,
    1,
    0,
    0,
    0,
    1402,
    1387,
    1,
    0,
    0,
    0,
    1402,
    1388,
    1,
    0,
    0,
    0,
    1402,
    1389,
    1,
    0,
    0,
    0,
    1402,
    1390,
    1,
    0,
    0,
    0,
    1402,
    1391,
    1,
    0,
    0,
    0,
    1402,
    1392,
    1,
    0,
    0,
    0,
    1402,
    1393,
    1,
    0,
    0,
    0,
    1402,
    1394,
    1,
    0,
    0,
    0,
    1402,
    1395,
    1,
    0,
    0,
    0,
    1402,
    1396,
    1,
    0,
    0,
    0,
    1402,
    1397,
    1,
    0,
    0,
    0,
    1402,
    1398,
    1,
    0,
    0,
    0,
    1402,
    1399,
    1,
    0,
    0,
    0,
    1402,
    1400,
    1,
    0,
    0,
    0,
    1402,
    1401,
    1,
    0,
    0,
    0,
    1403,
    105,
    1,
    0,
    0,
    0,
    1404,
    1415,
    3,
    170,
    85,
    0,
    1405,
    1415,
    3,
    278,
    139,
    0,
    1406,
    1415,
    3,
    290,
    145,
    0,
    1407,
    1415,
    3,
    294,
    147,
    0,
    1408,
    1415,
    3,
    296,
    148,
    0,
    1409,
    1415,
    3,
    252,
    126,
    0,
    1410,
    1415,
    3,
    268,
    134,
    0,
    1411,
    1415,
    3,
    272,
    136,
    0,
    1412,
    1415,
    3,
    302,
    151,
    0,
    1413,
    1415,
    3,
    304,
    152,
    0,
    1414,
    1404,
    1,
    0,
    0,
    0,
    1414,
    1405,
    1,
    0,
    0,
    0,
    1414,
    1406,
    1,
    0,
    0,
    0,
    1414,
    1407,
    1,
    0,
    0,
    0,
    1414,
    1408,
    1,
    0,
    0,
    0,
    1414,
    1409,
    1,
    0,
    0,
    0,
    1414,
    1410,
    1,
    0,
    0,
    0,
    1414,
    1411,
    1,
    0,
    0,
    0,
    1414,
    1412,
    1,
    0,
    0,
    0,
    1414,
    1413,
    1,
    0,
    0,
    0,
    1415,
    107,
    1,
    0,
    0,
    0,
    1416,
    1417,
    3,
    110,
    55,
    0,
    1417,
    1418,
    5,
    157,
    0,
    0,
    1418,
    1419,
    3,
    112,
    56,
    0,
    1419,
    1420,
    3,
    128,
    64,
    0,
    1420,
    109,
    1,
    0,
    0,
    0,
    1421,
    1423,
    5,
    2,
    0,
    0,
    1422,
    1421,
    1,
    0,
    0,
    0,
    1422,
    1423,
    1,
    0,
    0,
    0,
    1423,
    1427,
    1,
    0,
    0,
    0,
    1424,
    1426,
    3,
    340,
    170,
    0,
    1425,
    1424,
    1,
    0,
    0,
    0,
    1426,
    1429,
    1,
    0,
    0,
    0,
    1427,
    1425,
    1,
    0,
    0,
    0,
    1427,
    1428,
    1,
    0,
    0,
    0,
    1428,
    111,
    1,
    0,
    0,
    0,
    1429,
    1427,
    1,
    0,
    0,
    0,
    1430,
    1432,
    5,
    8,
    0,
    0,
    1431,
    1430,
    1,
    0,
    0,
    0,
    1431,
    1432,
    1,
    0,
    0,
    0,
    1432,
    1434,
    1,
    0,
    0,
    0,
    1433,
    1435,
    3,
    44,
    22,
    0,
    1434,
    1433,
    1,
    0,
    0,
    0,
    1434,
    1435,
    1,
    0,
    0,
    0,
    1435,
    1437,
    1,
    0,
    0,
    0,
    1436,
    1438,
    3,
    328,
    164,
    0,
    1437,
    1436,
    1,
    0,
    0,
    0,
    1437,
    1438,
    1,
    0,
    0,
    0,
    1438,
    1441,
    1,
    0,
    0,
    0,
    1439,
    1442,
    3,
    114,
    57,
    0,
    1440,
    1442,
    3,
    116,
    58,
    0,
    1441,
    1439,
    1,
    0,
    0,
    0,
    1441,
    1440,
    1,
    0,
    0,
    0,
    1442,
    1443,
    1,
    0,
    0,
    0,
    1443,
    1441,
    1,
    0,
    0,
    0,
    1443,
    1444,
    1,
    0,
    0,
    0,
    1444,
    1448,
    1,
    0,
    0,
    0,
    1445,
    1447,
    3,
    118,
    59,
    0,
    1446,
    1445,
    1,
    0,
    0,
    0,
    1447,
    1450,
    1,
    0,
    0,
    0,
    1448,
    1446,
    1,
    0,
    0,
    0,
    1448,
    1449,
    1,
    0,
    0,
    0,
    1449,
    113,
    1,
    0,
    0,
    0,
    1450,
    1448,
    1,
    0,
    0,
    0,
    1451,
    1452,
    7,
    11,
    0,
    0,
    1452,
    1457,
    3,
    134,
    67,
    0,
    1453,
    1454,
    5,
    200,
    0,
    0,
    1454,
    1456,
    3,
    134,
    67,
    0,
    1455,
    1453,
    1,
    0,
    0,
    0,
    1456,
    1459,
    1,
    0,
    0,
    0,
    1457,
    1455,
    1,
    0,
    0,
    0,
    1457,
    1458,
    1,
    0,
    0,
    0,
    1458,
    115,
    1,
    0,
    0,
    0,
    1459,
    1457,
    1,
    0,
    0,
    0,
    1460,
    1461,
    7,
    12,
    0,
    0,
    1461,
    1462,
    3,
    142,
    71,
    0,
    1462,
    117,
    1,
    0,
    0,
    0,
    1463,
    1468,
    3,
    120,
    60,
    0,
    1464,
    1468,
    3,
    122,
    61,
    0,
    1465,
    1468,
    3,
    124,
    62,
    0,
    1466,
    1468,
    3,
    126,
    63,
    0,
    1467,
    1463,
    1,
    0,
    0,
    0,
    1467,
    1464,
    1,
    0,
    0,
    0,
    1467,
    1465,
    1,
    0,
    0,
    0,
    1467,
    1466,
    1,
    0,
    0,
    0,
    1468,
    119,
    1,
    0,
    0,
    0,
    1469,
    1470,
    5,
    52,
    0,
    0,
    1470,
    1471,
    5,
    74,
    0,
    0,
    1471,
    1476,
    3,
    146,
    73,
    0,
    1472,
    1473,
    5,
    200,
    0,
    0,
    1473,
    1475,
    3,
    146,
    73,
    0,
    1474,
    1472,
    1,
    0,
    0,
    0,
    1475,
    1478,
    1,
    0,
    0,
    0,
    1476,
    1474,
    1,
    0,
    0,
    0,
    1476,
    1477,
    1,
    0,
    0,
    0,
    1477,
    121,
    1,
    0,
    0,
    0,
    1478,
    1476,
    1,
    0,
    0,
    0,
    1479,
    1480,
    5,
    160,
    0,
    0,
    1480,
    1485,
    3,
    148,
    74,
    0,
    1481,
    1482,
    5,
    200,
    0,
    0,
    1482,
    1484,
    3,
    148,
    74,
    0,
    1483,
    1481,
    1,
    0,
    0,
    0,
    1484,
    1487,
    1,
    0,
    0,
    0,
    1485,
    1483,
    1,
    0,
    0,
    0,
    1485,
    1486,
    1,
    0,
    0,
    0,
    1486,
    123,
    1,
    0,
    0,
    0,
    1487,
    1485,
    1,
    0,
    0,
    0,
    1488,
    1489,
    5,
    86,
    0,
    0,
    1489,
    1494,
    3,
    150,
    75,
    0,
    1490,
    1491,
    5,
    200,
    0,
    0,
    1491,
    1493,
    3,
    150,
    75,
    0,
    1492,
    1490,
    1,
    0,
    0,
    0,
    1493,
    1496,
    1,
    0,
    0,
    0,
    1494,
    1492,
    1,
    0,
    0,
    0,
    1494,
    1495,
    1,
    0,
    0,
    0,
    1495,
    125,
    1,
    0,
    0,
    0,
    1496,
    1494,
    1,
    0,
    0,
    0,
    1497,
    1498,
    5,
    50,
    0,
    0,
    1498,
    1503,
    3,
    152,
    76,
    0,
    1499,
    1500,
    5,
    200,
    0,
    0,
    1500,
    1502,
    3,
    152,
    76,
    0,
    1501,
    1499,
    1,
    0,
    0,
    0,
    1502,
    1505,
    1,
    0,
    0,
    0,
    1503,
    1501,
    1,
    0,
    0,
    0,
    1503,
    1504,
    1,
    0,
    0,
    0,
    1504,
    127,
    1,
    0,
    0,
    0,
    1505,
    1503,
    1,
    0,
    0,
    0,
    1506,
    1516,
    5,
    205,
    0,
    0,
    1507,
    1511,
    5,
    214,
    0,
    0,
    1508,
    1510,
    3,
    130,
    65,
    0,
    1509,
    1508,
    1,
    0,
    0,
    0,
    1510,
    1513,
    1,
    0,
    0,
    0,
    1511,
    1509,
    1,
    0,
    0,
    0,
    1511,
    1512,
    1,
    0,
    0,
    0,
    1512,
    1514,
    1,
    0,
    0,
    0,
    1513,
    1511,
    1,
    0,
    0,
    0,
    1514,
    1516,
    5,
    216,
    0,
    0,
    1515,
    1506,
    1,
    0,
    0,
    0,
    1515,
    1507,
    1,
    0,
    0,
    0,
    1516,
    129,
    1,
    0,
    0,
    0,
    1517,
    1522,
    3,
    82,
    41,
    0,
    1518,
    1522,
    3,
    154,
    77,
    0,
    1519,
    1522,
    3,
    86,
    43,
    0,
    1520,
    1522,
    3,
    90,
    45,
    0,
    1521,
    1517,
    1,
    0,
    0,
    0,
    1521,
    1518,
    1,
    0,
    0,
    0,
    1521,
    1519,
    1,
    0,
    0,
    0,
    1521,
    1520,
    1,
    0,
    0,
    0,
    1522,
    131,
    1,
    0,
    0,
    0,
    1523,
    1525,
    5,
    138,
    0,
    0,
    1524,
    1526,
    3,
    44,
    22,
    0,
    1525,
    1524,
    1,
    0,
    0,
    0,
    1525,
    1526,
    1,
    0,
    0,
    0,
    1526,
    1528,
    1,
    0,
    0,
    0,
    1527,
    1523,
    1,
    0,
    0,
    0,
    1527,
    1528,
    1,
    0,
    0,
    0,
    1528,
    1529,
    1,
    0,
    0,
    0,
    1529,
    1530,
    5,
    149,
    0,
    0,
    1530,
    1531,
    3,
    136,
    68,
    0,
    1531,
    1532,
    7,
    11,
    0,
    0,
    1532,
    1533,
    3,
    138,
    69,
    0,
    1533,
    1534,
    3,
    46,
    23,
    0,
    1534,
    133,
    1,
    0,
    0,
    0,
    1535,
    1536,
    3,
    138,
    69,
    0,
    1536,
    135,
    1,
    0,
    0,
    0,
    1537,
    1542,
    3,
    88,
    44,
    0,
    1538,
    1539,
    5,
    202,
    0,
    0,
    1539,
    1541,
    3,
    88,
    44,
    0,
    1540,
    1538,
    1,
    0,
    0,
    0,
    1541,
    1544,
    1,
    0,
    0,
    0,
    1542,
    1540,
    1,
    0,
    0,
    0,
    1542,
    1543,
    1,
    0,
    0,
    0,
    1543,
    137,
    1,
    0,
    0,
    0,
    1544,
    1542,
    1,
    0,
    0,
    0,
    1545,
    1550,
    3,
    88,
    44,
    0,
    1546,
    1547,
    5,
    202,
    0,
    0,
    1547,
    1549,
    3,
    88,
    44,
    0,
    1548,
    1546,
    1,
    0,
    0,
    0,
    1549,
    1552,
    1,
    0,
    0,
    0,
    1550,
    1548,
    1,
    0,
    0,
    0,
    1550,
    1551,
    1,
    0,
    0,
    0,
    1551,
    139,
    1,
    0,
    0,
    0,
    1552,
    1550,
    1,
    0,
    0,
    0,
    1553,
    1555,
    5,
    35,
    0,
    0,
    1554,
    1556,
    3,
    44,
    22,
    0,
    1555,
    1554,
    1,
    0,
    0,
    0,
    1555,
    1556,
    1,
    0,
    0,
    0,
    1556,
    1558,
    1,
    0,
    0,
    0,
    1557,
    1553,
    1,
    0,
    0,
    0,
    1557,
    1558,
    1,
    0,
    0,
    0,
    1558,
    1559,
    1,
    0,
    0,
    0,
    1559,
    1560,
    5,
    33,
    0,
    0,
    1560,
    1565,
    3,
    88,
    44,
    0,
    1561,
    1562,
    5,
    202,
    0,
    0,
    1562,
    1564,
    3,
    88,
    44,
    0,
    1563,
    1561,
    1,
    0,
    0,
    0,
    1564,
    1567,
    1,
    0,
    0,
    0,
    1565,
    1563,
    1,
    0,
    0,
    0,
    1565,
    1566,
    1,
    0,
    0,
    0,
    1566,
    1568,
    1,
    0,
    0,
    0,
    1567,
    1565,
    1,
    0,
    0,
    0,
    1568,
    1569,
    7,
    12,
    0,
    0,
    1569,
    1574,
    3,
    88,
    44,
    0,
    1570,
    1571,
    5,
    202,
    0,
    0,
    1571,
    1573,
    3,
    88,
    44,
    0,
    1572,
    1570,
    1,
    0,
    0,
    0,
    1573,
    1576,
    1,
    0,
    0,
    0,
    1574,
    1572,
    1,
    0,
    0,
    0,
    1574,
    1575,
    1,
    0,
    0,
    0,
    1575,
    1577,
    1,
    0,
    0,
    0,
    1576,
    1574,
    1,
    0,
    0,
    0,
    1577,
    1578,
    3,
    46,
    23,
    0,
    1578,
    141,
    1,
    0,
    0,
    0,
    1579,
    1584,
    3,
    88,
    44,
    0,
    1580,
    1581,
    5,
    202,
    0,
    0,
    1581,
    1583,
    3,
    88,
    44,
    0,
    1582,
    1580,
    1,
    0,
    0,
    0,
    1583,
    1586,
    1,
    0,
    0,
    0,
    1584,
    1582,
    1,
    0,
    0,
    0,
    1584,
    1585,
    1,
    0,
    0,
    0,
    1585,
    143,
    1,
    0,
    0,
    0,
    1586,
    1584,
    1,
    0,
    0,
    0,
    1587,
    1589,
    5,
    51,
    0,
    0,
    1588,
    1590,
    3,
    44,
    22,
    0,
    1589,
    1588,
    1,
    0,
    0,
    0,
    1589,
    1590,
    1,
    0,
    0,
    0,
    1590,
    1592,
    1,
    0,
    0,
    0,
    1591,
    1587,
    1,
    0,
    0,
    0,
    1591,
    1592,
    1,
    0,
    0,
    0,
    1592,
    1593,
    1,
    0,
    0,
    0,
    1593,
    1594,
    5,
    52,
    0,
    0,
    1594,
    1599,
    3,
    88,
    44,
    0,
    1595,
    1596,
    5,
    202,
    0,
    0,
    1596,
    1598,
    3,
    88,
    44,
    0,
    1597,
    1595,
    1,
    0,
    0,
    0,
    1598,
    1601,
    1,
    0,
    0,
    0,
    1599,
    1597,
    1,
    0,
    0,
    0,
    1599,
    1600,
    1,
    0,
    0,
    0,
    1600,
    1602,
    1,
    0,
    0,
    0,
    1601,
    1599,
    1,
    0,
    0,
    0,
    1602,
    1603,
    5,
    74,
    0,
    0,
    1603,
    1608,
    3,
    88,
    44,
    0,
    1604,
    1605,
    5,
    202,
    0,
    0,
    1605,
    1607,
    3,
    88,
    44,
    0,
    1606,
    1604,
    1,
    0,
    0,
    0,
    1607,
    1610,
    1,
    0,
    0,
    0,
    1608,
    1606,
    1,
    0,
    0,
    0,
    1608,
    1609,
    1,
    0,
    0,
    0,
    1609,
    1611,
    1,
    0,
    0,
    0,
    1610,
    1608,
    1,
    0,
    0,
    0,
    1611,
    1612,
    3,
    46,
    23,
    0,
    1612,
    145,
    1,
    0,
    0,
    0,
    1613,
    1618,
    3,
    88,
    44,
    0,
    1614,
    1615,
    5,
    202,
    0,
    0,
    1615,
    1617,
    3,
    88,
    44,
    0,
    1616,
    1614,
    1,
    0,
    0,
    0,
    1617,
    1620,
    1,
    0,
    0,
    0,
    1618,
    1616,
    1,
    0,
    0,
    0,
    1618,
    1619,
    1,
    0,
    0,
    0,
    1619,
    147,
    1,
    0,
    0,
    0,
    1620,
    1618,
    1,
    0,
    0,
    0,
    1621,
    1626,
    3,
    88,
    44,
    0,
    1622,
    1623,
    5,
    202,
    0,
    0,
    1623,
    1625,
    3,
    88,
    44,
    0,
    1624,
    1622,
    1,
    0,
    0,
    0,
    1625,
    1628,
    1,
    0,
    0,
    0,
    1626,
    1624,
    1,
    0,
    0,
    0,
    1626,
    1627,
    1,
    0,
    0,
    0,
    1627,
    149,
    1,
    0,
    0,
    0,
    1628,
    1626,
    1,
    0,
    0,
    0,
    1629,
    1634,
    3,
    88,
    44,
    0,
    1630,
    1631,
    5,
    202,
    0,
    0,
    1631,
    1633,
    3,
    88,
    44,
    0,
    1632,
    1630,
    1,
    0,
    0,
    0,
    1633,
    1636,
    1,
    0,
    0,
    0,
    1634,
    1632,
    1,
    0,
    0,
    0,
    1634,
    1635,
    1,
    0,
    0,
    0,
    1635,
    151,
    1,
    0,
    0,
    0,
    1636,
    1634,
    1,
    0,
    0,
    0,
    1637,
    1642,
    3,
    88,
    44,
    0,
    1638,
    1639,
    5,
    202,
    0,
    0,
    1639,
    1641,
    3,
    88,
    44,
    0,
    1640,
    1638,
    1,
    0,
    0,
    0,
    1641,
    1644,
    1,
    0,
    0,
    0,
    1642,
    1640,
    1,
    0,
    0,
    0,
    1642,
    1643,
    1,
    0,
    0,
    0,
    1643,
    153,
    1,
    0,
    0,
    0,
    1644,
    1642,
    1,
    0,
    0,
    0,
    1645,
    1648,
    3,
    156,
    78,
    0,
    1646,
    1648,
    3,
    158,
    79,
    0,
    1647,
    1645,
    1,
    0,
    0,
    0,
    1647,
    1646,
    1,
    0,
    0,
    0,
    1648,
    155,
    1,
    0,
    0,
    0,
    1649,
    1650,
    3,
    76,
    38,
    0,
    1650,
    1651,
    5,
    97,
    0,
    0,
    1651,
    1652,
    3,
    106,
    53,
    0,
    1652,
    157,
    1,
    0,
    0,
    0,
    1653,
    1654,
    3,
    76,
    38,
    0,
    1654,
    1655,
    3,
    106,
    53,
    0,
    1655,
    159,
    1,
    0,
    0,
    0,
    1656,
    1657,
    3,
    110,
    55,
    0,
    1657,
    1658,
    5,
    29,
    0,
    0,
    1658,
    1659,
    3,
    162,
    81,
    0,
    1659,
    1660,
    3,
    128,
    64,
    0,
    1660,
    161,
    1,
    0,
    0,
    0,
    1661,
    1663,
    5,
    8,
    0,
    0,
    1662,
    1661,
    1,
    0,
    0,
    0,
    1662,
    1663,
    1,
    0,
    0,
    0,
    1663,
    1665,
    1,
    0,
    0,
    0,
    1664,
    1666,
    3,
    44,
    22,
    0,
    1665,
    1664,
    1,
    0,
    0,
    0,
    1665,
    1666,
    1,
    0,
    0,
    0,
    1666,
    1668,
    1,
    0,
    0,
    0,
    1667,
    1669,
    3,
    328,
    164,
    0,
    1668,
    1667,
    1,
    0,
    0,
    0,
    1668,
    1669,
    1,
    0,
    0,
    0,
    1669,
    1672,
    1,
    0,
    0,
    0,
    1670,
    1673,
    3,
    164,
    82,
    0,
    1671,
    1673,
    3,
    116,
    58,
    0,
    1672,
    1670,
    1,
    0,
    0,
    0,
    1672,
    1671,
    1,
    0,
    0,
    0,
    1672,
    1673,
    1,
    0,
    0,
    0,
    1673,
    1677,
    1,
    0,
    0,
    0,
    1674,
    1676,
    3,
    118,
    59,
    0,
    1675,
    1674,
    1,
    0,
    0,
    0,
    1676,
    1679,
    1,
    0,
    0,
    0,
    1677,
    1675,
    1,
    0,
    0,
    0,
    1677,
    1678,
    1,
    0,
    0,
    0,
    1678,
    163,
    1,
    0,
    0,
    0,
    1679,
    1677,
    1,
    0,
    0,
    0,
    1680,
    1681,
    7,
    11,
    0,
    0,
    1681,
    1686,
    3,
    168,
    84,
    0,
    1682,
    1683,
    5,
    200,
    0,
    0,
    1683,
    1685,
    3,
    168,
    84,
    0,
    1684,
    1682,
    1,
    0,
    0,
    0,
    1685,
    1688,
    1,
    0,
    0,
    0,
    1686,
    1684,
    1,
    0,
    0,
    0,
    1686,
    1687,
    1,
    0,
    0,
    0,
    1687,
    165,
    1,
    0,
    0,
    0,
    1688,
    1686,
    1,
    0,
    0,
    0,
    1689,
    1691,
    5,
    138,
    0,
    0,
    1690,
    1692,
    3,
    44,
    22,
    0,
    1691,
    1690,
    1,
    0,
    0,
    0,
    1691,
    1692,
    1,
    0,
    0,
    0,
    1692,
    1694,
    1,
    0,
    0,
    0,
    1693,
    1689,
    1,
    0,
    0,
    0,
    1693,
    1694,
    1,
    0,
    0,
    0,
    1694,
    1695,
    1,
    0,
    0,
    0,
    1695,
    1696,
    5,
    145,
    0,
    0,
    1696,
    1697,
    3,
    88,
    44,
    0,
    1697,
    1698,
    7,
    11,
    0,
    0,
    1698,
    1699,
    3,
    88,
    44,
    0,
    1699,
    1700,
    3,
    46,
    23,
    0,
    1700,
    167,
    1,
    0,
    0,
    0,
    1701,
    1702,
    3,
    88,
    44,
    0,
    1702,
    169,
    1,
    0,
    0,
    0,
    1703,
    1706,
    3,
    176,
    88,
    0,
    1704,
    1707,
    5,
    65,
    0,
    0,
    1705,
    1707,
    3,
    340,
    170,
    0,
    1706,
    1704,
    1,
    0,
    0,
    0,
    1706,
    1705,
    1,
    0,
    0,
    0,
    1707,
    1709,
    1,
    0,
    0,
    0,
    1708,
    1710,
    3,
    184,
    92,
    0,
    1709,
    1708,
    1,
    0,
    0,
    0,
    1709,
    1710,
    1,
    0,
    0,
    0,
    1710,
    1721,
    1,
    0,
    0,
    0,
    1711,
    1714,
    3,
    172,
    86,
    0,
    1712,
    1714,
    3,
    174,
    87,
    0,
    1713,
    1711,
    1,
    0,
    0,
    0,
    1713,
    1712,
    1,
    0,
    0,
    0,
    1714,
    1716,
    1,
    0,
    0,
    0,
    1715,
    1717,
    5,
    127,
    0,
    0,
    1716,
    1715,
    1,
    0,
    0,
    0,
    1716,
    1717,
    1,
    0,
    0,
    0,
    1717,
    1718,
    1,
    0,
    0,
    0,
    1718,
    1719,
    3,
    184,
    92,
    0,
    1719,
    1721,
    1,
    0,
    0,
    0,
    1720,
    1703,
    1,
    0,
    0,
    0,
    1720,
    1713,
    1,
    0,
    0,
    0,
    1721,
    1723,
    1,
    0,
    0,
    0,
    1722,
    1724,
    3,
    318,
    159,
    0,
    1723,
    1722,
    1,
    0,
    0,
    0,
    1723,
    1724,
    1,
    0,
    0,
    0,
    1724,
    1725,
    1,
    0,
    0,
    0,
    1725,
    1726,
    3,
    128,
    64,
    0,
    1726,
    171,
    1,
    0,
    0,
    0,
    1727,
    1729,
    5,
    39,
    0,
    0,
    1728,
    1727,
    1,
    0,
    0,
    0,
    1728,
    1729,
    1,
    0,
    0,
    0,
    1729,
    1730,
    1,
    0,
    0,
    0,
    1730,
    1731,
    5,
    56,
    0,
    0,
    1731,
    173,
    1,
    0,
    0,
    0,
    1732,
    1734,
    3,
    182,
    91,
    0,
    1733,
    1732,
    1,
    0,
    0,
    0,
    1733,
    1734,
    1,
    0,
    0,
    0,
    1734,
    1736,
    1,
    0,
    0,
    0,
    1735,
    1737,
    5,
    49,
    0,
    0,
    1736,
    1735,
    1,
    0,
    0,
    0,
    1736,
    1737,
    1,
    0,
    0,
    0,
    1737,
    1739,
    1,
    0,
    0,
    0,
    1738,
    1740,
    5,
    2,
    0,
    0,
    1739,
    1738,
    1,
    0,
    0,
    0,
    1739,
    1740,
    1,
    0,
    0,
    0,
    1740,
    1742,
    1,
    0,
    0,
    0,
    1741,
    1743,
    7,
    13,
    0,
    0,
    1742,
    1741,
    1,
    0,
    0,
    0,
    1742,
    1743,
    1,
    0,
    0,
    0,
    1743,
    1745,
    1,
    0,
    0,
    0,
    1744,
    1746,
    7,
    14,
    0,
    0,
    1745,
    1744,
    1,
    0,
    0,
    0,
    1745,
    1746,
    1,
    0,
    0,
    0,
    1746,
    175,
    1,
    0,
    0,
    0,
    1747,
    1748,
    3,
    172,
    86,
    0,
    1748,
    1749,
    3,
    178,
    89,
    0,
    1749,
    1752,
    1,
    0,
    0,
    0,
    1750,
    1752,
    3,
    174,
    87,
    0,
    1751,
    1747,
    1,
    0,
    0,
    0,
    1751,
    1750,
    1,
    0,
    0,
    0,
    1752,
    1756,
    1,
    0,
    0,
    0,
    1753,
    1755,
    3,
    340,
    170,
    0,
    1754,
    1753,
    1,
    0,
    0,
    0,
    1755,
    1758,
    1,
    0,
    0,
    0,
    1756,
    1754,
    1,
    0,
    0,
    0,
    1756,
    1757,
    1,
    0,
    0,
    0,
    1757,
    177,
    1,
    0,
    0,
    0,
    1758,
    1756,
    1,
    0,
    0,
    0,
    1759,
    1760,
    3,
    180,
    90,
    0,
    1760,
    179,
    1,
    0,
    0,
    0,
    1761,
    1762,
    3,
    174,
    87,
    0,
    1762,
    1763,
    3,
    184,
    92,
    0,
    1763,
    1769,
    1,
    0,
    0,
    0,
    1764,
    1766,
    3,
    406,
    203,
    0,
    1765,
    1767,
    3,
    418,
    209,
    0,
    1766,
    1765,
    1,
    0,
    0,
    0,
    1766,
    1767,
    1,
    0,
    0,
    0,
    1767,
    1769,
    1,
    0,
    0,
    0,
    1768,
    1761,
    1,
    0,
    0,
    0,
    1768,
    1764,
    1,
    0,
    0,
    0,
    1769,
    181,
    1,
    0,
    0,
    0,
    1770,
    1771,
    7,
    15,
    0,
    0,
    1771,
    183,
    1,
    0,
    0,
    0,
    1772,
    1774,
    5,
    8,
    0,
    0,
    1773,
    1772,
    1,
    0,
    0,
    0,
    1773,
    1774,
    1,
    0,
    0,
    0,
    1774,
    1782,
    1,
    0,
    0,
    0,
    1775,
    1778,
    3,
    186,
    93,
    0,
    1776,
    1779,
    3,
    196,
    98,
    0,
    1777,
    1779,
    3,
    116,
    58,
    0,
    1778,
    1776,
    1,
    0,
    0,
    0,
    1778,
    1777,
    1,
    0,
    0,
    0,
    1778,
    1779,
    1,
    0,
    0,
    0,
    1779,
    1783,
    1,
    0,
    0,
    0,
    1780,
    1783,
    3,
    196,
    98,
    0,
    1781,
    1783,
    3,
    116,
    58,
    0,
    1782,
    1775,
    1,
    0,
    0,
    0,
    1782,
    1780,
    1,
    0,
    0,
    0,
    1782,
    1781,
    1,
    0,
    0,
    0,
    1783,
    1787,
    1,
    0,
    0,
    0,
    1784,
    1786,
    3,
    188,
    94,
    0,
    1785,
    1784,
    1,
    0,
    0,
    0,
    1786,
    1789,
    1,
    0,
    0,
    0,
    1787,
    1785,
    1,
    0,
    0,
    0,
    1787,
    1788,
    1,
    0,
    0,
    0,
    1788,
    185,
    1,
    0,
    0,
    0,
    1789,
    1787,
    1,
    0,
    0,
    0,
    1790,
    1791,
    5,
    206,
    0,
    0,
    1791,
    1792,
    3,
    40,
    20,
    0,
    1792,
    1794,
    5,
    208,
    0,
    0,
    1793,
    1795,
    3,
    40,
    20,
    0,
    1794,
    1793,
    1,
    0,
    0,
    0,
    1794,
    1795,
    1,
    0,
    0,
    0,
    1795,
    1798,
    1,
    0,
    0,
    0,
    1796,
    1798,
    3,
    40,
    20,
    0,
    1797,
    1790,
    1,
    0,
    0,
    0,
    1797,
    1796,
    1,
    0,
    0,
    0,
    1798,
    187,
    1,
    0,
    0,
    0,
    1799,
    1804,
    3,
    118,
    59,
    0,
    1800,
    1804,
    3,
    190,
    95,
    0,
    1801,
    1804,
    3,
    192,
    96,
    0,
    1802,
    1804,
    3,
    194,
    97,
    0,
    1803,
    1799,
    1,
    0,
    0,
    0,
    1803,
    1800,
    1,
    0,
    0,
    0,
    1803,
    1801,
    1,
    0,
    0,
    0,
    1803,
    1802,
    1,
    0,
    0,
    0,
    1804,
    189,
    1,
    0,
    0,
    0,
    1805,
    1806,
    5,
    27,
    0,
    0,
    1806,
    1811,
    3,
    88,
    44,
    0,
    1807,
    1808,
    5,
    202,
    0,
    0,
    1808,
    1810,
    3,
    88,
    44,
    0,
    1809,
    1807,
    1,
    0,
    0,
    0,
    1810,
    1813,
    1,
    0,
    0,
    0,
    1811,
    1809,
    1,
    0,
    0,
    0,
    1811,
    1812,
    1,
    0,
    0,
    0,
    1812,
    191,
    1,
    0,
    0,
    0,
    1813,
    1811,
    1,
    0,
    0,
    0,
    1814,
    1815,
    5,
    88,
    0,
    0,
    1815,
    1816,
    5,
    111,
    0,
    0,
    1816,
    1817,
    3,
    236,
    118,
    0,
    1817,
    193,
    1,
    0,
    0,
    0,
    1818,
    1819,
    5,
    66,
    0,
    0,
    1819,
    1820,
    5,
    24,
    0,
    0,
    1820,
    1825,
    3,
    240,
    120,
    0,
    1821,
    1822,
    5,
    200,
    0,
    0,
    1822,
    1824,
    3,
    240,
    120,
    0,
    1823,
    1821,
    1,
    0,
    0,
    0,
    1824,
    1827,
    1,
    0,
    0,
    0,
    1825,
    1823,
    1,
    0,
    0,
    0,
    1825,
    1826,
    1,
    0,
    0,
    0,
    1826,
    195,
    1,
    0,
    0,
    0,
    1827,
    1825,
    1,
    0,
    0,
    0,
    1828,
    1830,
    3,
    200,
    100,
    0,
    1829,
    1828,
    1,
    0,
    0,
    0,
    1830,
    1831,
    1,
    0,
    0,
    0,
    1831,
    1829,
    1,
    0,
    0,
    0,
    1831,
    1832,
    1,
    0,
    0,
    0,
    1832,
    1834,
    1,
    0,
    0,
    0,
    1833,
    1835,
    3,
    198,
    99,
    0,
    1834,
    1833,
    1,
    0,
    0,
    0,
    1834,
    1835,
    1,
    0,
    0,
    0,
    1835,
    1839,
    1,
    0,
    0,
    0,
    1836,
    1838,
    3,
    200,
    100,
    0,
    1837,
    1836,
    1,
    0,
    0,
    0,
    1838,
    1841,
    1,
    0,
    0,
    0,
    1839,
    1837,
    1,
    0,
    0,
    0,
    1839,
    1840,
    1,
    0,
    0,
    0,
    1840,
    1850,
    1,
    0,
    0,
    0,
    1841,
    1839,
    1,
    0,
    0,
    0,
    1842,
    1846,
    3,
    198,
    99,
    0,
    1843,
    1845,
    3,
    200,
    100,
    0,
    1844,
    1843,
    1,
    0,
    0,
    0,
    1845,
    1848,
    1,
    0,
    0,
    0,
    1846,
    1844,
    1,
    0,
    0,
    0,
    1846,
    1847,
    1,
    0,
    0,
    0,
    1847,
    1850,
    1,
    0,
    0,
    0,
    1848,
    1846,
    1,
    0,
    0,
    0,
    1849,
    1829,
    1,
    0,
    0,
    0,
    1849,
    1842,
    1,
    0,
    0,
    0,
    1850,
    197,
    1,
    0,
    0,
    0,
    1851,
    1860,
    3,
    328,
    164,
    0,
    1852,
    1854,
    5,
    113,
    0,
    0,
    1853,
    1855,
    5,
    106,
    0,
    0,
    1854,
    1853,
    1,
    0,
    0,
    0,
    1854,
    1855,
    1,
    0,
    0,
    0,
    1855,
    1861,
    1,
    0,
    0,
    0,
    1856,
    1858,
    5,
    106,
    0,
    0,
    1857,
    1859,
    5,
    113,
    0,
    0,
    1858,
    1857,
    1,
    0,
    0,
    0,
    1858,
    1859,
    1,
    0,
    0,
    0,
    1859,
    1861,
    1,
    0,
    0,
    0,
    1860,
    1852,
    1,
    0,
    0,
    0,
    1860,
    1856,
    1,
    0,
    0,
    0,
    1860,
    1861,
    1,
    0,
    0,
    0,
    1861,
    1873,
    1,
    0,
    0,
    0,
    1862,
    1864,
    5,
    113,
    0,
    0,
    1863,
    1865,
    5,
    106,
    0,
    0,
    1864,
    1863,
    1,
    0,
    0,
    0,
    1864,
    1865,
    1,
    0,
    0,
    0,
    1865,
    1871,
    1,
    0,
    0,
    0,
    1866,
    1868,
    5,
    106,
    0,
    0,
    1867,
    1869,
    5,
    113,
    0,
    0,
    1868,
    1867,
    1,
    0,
    0,
    0,
    1868,
    1869,
    1,
    0,
    0,
    0,
    1869,
    1871,
    1,
    0,
    0,
    0,
    1870,
    1862,
    1,
    0,
    0,
    0,
    1870,
    1866,
    1,
    0,
    0,
    0,
    1871,
    1873,
    1,
    0,
    0,
    0,
    1872,
    1851,
    1,
    0,
    0,
    0,
    1872,
    1870,
    1,
    0,
    0,
    0,
    1873,
    199,
    1,
    0,
    0,
    0,
    1874,
    1880,
    3,
    202,
    101,
    0,
    1875,
    1880,
    3,
    206,
    103,
    0,
    1876,
    1880,
    3,
    210,
    105,
    0,
    1877,
    1880,
    3,
    212,
    106,
    0,
    1878,
    1880,
    3,
    214,
    107,
    0,
    1879,
    1874,
    1,
    0,
    0,
    0,
    1879,
    1875,
    1,
    0,
    0,
    0,
    1879,
    1876,
    1,
    0,
    0,
    0,
    1879,
    1877,
    1,
    0,
    0,
    0,
    1879,
    1878,
    1,
    0,
    0,
    0,
    1880,
    201,
    1,
    0,
    0,
    0,
    1881,
    1886,
    3,
    204,
    102,
    0,
    1882,
    1883,
    5,
    200,
    0,
    0,
    1883,
    1885,
    3,
    218,
    109,
    0,
    1884,
    1882,
    1,
    0,
    0,
    0,
    1885,
    1888,
    1,
    0,
    0,
    0,
    1886,
    1884,
    1,
    0,
    0,
    0,
    1886,
    1887,
    1,
    0,
    0,
    0,
    1887,
    203,
    1,
    0,
    0,
    0,
    1888,
    1886,
    1,
    0,
    0,
    0,
    1889,
    1895,
    5,
    204,
    0,
    0,
    1890,
    1891,
    5,
    158,
    0,
    0,
    1891,
    1895,
    5,
    24,
    0,
    0,
    1892,
    1893,
    5,
    47,
    0,
    0,
    1893,
    1895,
    5,
    24,
    0,
    0,
    1894,
    1889,
    1,
    0,
    0,
    0,
    1894,
    1890,
    1,
    0,
    0,
    0,
    1894,
    1892,
    1,
    0,
    0,
    0,
    1895,
    1896,
    1,
    0,
    0,
    0,
    1896,
    1897,
    3,
    218,
    109,
    0,
    1897,
    205,
    1,
    0,
    0,
    0,
    1898,
    1903,
    3,
    208,
    104,
    0,
    1899,
    1900,
    5,
    200,
    0,
    0,
    1900,
    1902,
    3,
    224,
    112,
    0,
    1901,
    1899,
    1,
    0,
    0,
    0,
    1902,
    1905,
    1,
    0,
    0,
    0,
    1903,
    1901,
    1,
    0,
    0,
    0,
    1903,
    1904,
    1,
    0,
    0,
    0,
    1904,
    207,
    1,
    0,
    0,
    0,
    1905,
    1903,
    1,
    0,
    0,
    0,
    1906,
    1907,
    7,
    16,
    0,
    0,
    1907,
    1908,
    3,
    224,
    112,
    0,
    1908,
    209,
    1,
    0,
    0,
    0,
    1909,
    1910,
    7,
    17,
    0,
    0,
    1910,
    1911,
    3,
    226,
    113,
    0,
    1911,
    211,
    1,
    0,
    0,
    0,
    1912,
    1913,
    7,
    18,
    0,
    0,
    1913,
    1914,
    3,
    228,
    114,
    0,
    1914,
    213,
    1,
    0,
    0,
    0,
    1915,
    1920,
    3,
    216,
    108,
    0,
    1916,
    1917,
    5,
    200,
    0,
    0,
    1917,
    1919,
    3,
    232,
    116,
    0,
    1918,
    1916,
    1,
    0,
    0,
    0,
    1919,
    1922,
    1,
    0,
    0,
    0,
    1920,
    1918,
    1,
    0,
    0,
    0,
    1920,
    1921,
    1,
    0,
    0,
    0,
    1921,
    215,
    1,
    0,
    0,
    0,
    1922,
    1920,
    1,
    0,
    0,
    0,
    1923,
    1924,
    7,
    19,
    0,
    0,
    1924,
    1925,
    3,
    232,
    116,
    0,
    1925,
    217,
    1,
    0,
    0,
    0,
    1926,
    1928,
    5,
    138,
    0,
    0,
    1927,
    1929,
    3,
    44,
    22,
    0,
    1928,
    1927,
    1,
    0,
    0,
    0,
    1928,
    1929,
    1,
    0,
    0,
    0,
    1929,
    1931,
    1,
    0,
    0,
    0,
    1930,
    1926,
    1,
    0,
    0,
    0,
    1930,
    1931,
    1,
    0,
    0,
    0,
    1931,
    1932,
    1,
    0,
    0,
    0,
    1932,
    1933,
    5,
    159,
    0,
    0,
    1933,
    1937,
    3,
    88,
    44,
    0,
    1934,
    1938,
    5,
    204,
    0,
    0,
    1935,
    1936,
    5,
    158,
    0,
    0,
    1936,
    1938,
    5,
    24,
    0,
    0,
    1937,
    1934,
    1,
    0,
    0,
    0,
    1937,
    1935,
    1,
    0,
    0,
    0,
    1938,
    1939,
    1,
    0,
    0,
    0,
    1939,
    1940,
    3,
    138,
    69,
    0,
    1940,
    1941,
    3,
    46,
    23,
    0,
    1941,
    1945,
    1,
    0,
    0,
    0,
    1942,
    1945,
    3,
    220,
    110,
    0,
    1943,
    1945,
    3,
    504,
    252,
    0,
    1944,
    1930,
    1,
    0,
    0,
    0,
    1944,
    1942,
    1,
    0,
    0,
    0,
    1944,
    1943,
    1,
    0,
    0,
    0,
    1945,
    219,
    1,
    0,
    0,
    0,
    1946,
    1951,
    3,
    88,
    44,
    0,
    1947,
    1948,
    5,
    202,
    0,
    0,
    1948,
    1950,
    3,
    88,
    44,
    0,
    1949,
    1947,
    1,
    0,
    0,
    0,
    1950,
    1953,
    1,
    0,
    0,
    0,
    1951,
    1949,
    1,
    0,
    0,
    0,
    1951,
    1952,
    1,
    0,
    0,
    0,
    1952,
    221,
    1,
    0,
    0,
    0,
    1953,
    1951,
    1,
    0,
    0,
    0,
    1954,
    1956,
    5,
    138,
    0,
    0,
    1955,
    1957,
    3,
    44,
    22,
    0,
    1956,
    1955,
    1,
    0,
    0,
    0,
    1956,
    1957,
    1,
    0,
    0,
    0,
    1957,
    1959,
    1,
    0,
    0,
    0,
    1958,
    1954,
    1,
    0,
    0,
    0,
    1958,
    1959,
    1,
    0,
    0,
    0,
    1959,
    1960,
    1,
    0,
    0,
    0,
    1960,
    1961,
    5,
    147,
    0,
    0,
    1961,
    1962,
    3,
    136,
    68,
    0,
    1962,
    1963,
    7,
    16,
    0,
    0,
    1963,
    1964,
    3,
    138,
    69,
    0,
    1964,
    1965,
    3,
    46,
    23,
    0,
    1965,
    223,
    1,
    0,
    0,
    0,
    1966,
    1971,
    3,
    88,
    44,
    0,
    1967,
    1968,
    5,
    202,
    0,
    0,
    1968,
    1970,
    3,
    88,
    44,
    0,
    1969,
    1967,
    1,
    0,
    0,
    0,
    1970,
    1973,
    1,
    0,
    0,
    0,
    1971,
    1969,
    1,
    0,
    0,
    0,
    1971,
    1972,
    1,
    0,
    0,
    0,
    1972,
    225,
    1,
    0,
    0,
    0,
    1973,
    1971,
    1,
    0,
    0,
    0,
    1974,
    1979,
    3,
    88,
    44,
    0,
    1975,
    1976,
    5,
    202,
    0,
    0,
    1976,
    1978,
    3,
    88,
    44,
    0,
    1977,
    1975,
    1,
    0,
    0,
    0,
    1978,
    1981,
    1,
    0,
    0,
    0,
    1979,
    1977,
    1,
    0,
    0,
    0,
    1979,
    1980,
    1,
    0,
    0,
    0,
    1980,
    227,
    1,
    0,
    0,
    0,
    1981,
    1979,
    1,
    0,
    0,
    0,
    1982,
    1987,
    3,
    88,
    44,
    0,
    1983,
    1984,
    5,
    202,
    0,
    0,
    1984,
    1986,
    3,
    88,
    44,
    0,
    1985,
    1983,
    1,
    0,
    0,
    0,
    1986,
    1989,
    1,
    0,
    0,
    0,
    1987,
    1985,
    1,
    0,
    0,
    0,
    1987,
    1988,
    1,
    0,
    0,
    0,
    1988,
    229,
    1,
    0,
    0,
    0,
    1989,
    1987,
    1,
    0,
    0,
    0,
    1990,
    1992,
    5,
    138,
    0,
    0,
    1991,
    1993,
    3,
    44,
    22,
    0,
    1992,
    1991,
    1,
    0,
    0,
    0,
    1992,
    1993,
    1,
    0,
    0,
    0,
    1993,
    1995,
    1,
    0,
    0,
    0,
    1994,
    1990,
    1,
    0,
    0,
    0,
    1994,
    1995,
    1,
    0,
    0,
    0,
    1995,
    1996,
    1,
    0,
    0,
    0,
    1996,
    1997,
    5,
    126,
    0,
    0,
    1997,
    1998,
    3,
    136,
    68,
    0,
    1998,
    1999,
    7,
    19,
    0,
    0,
    1999,
    2e3,
    3,
    138,
    69,
    0,
    2e3,
    2001,
    3,
    46,
    23,
    0,
    2001,
    231,
    1,
    0,
    0,
    0,
    2002,
    2007,
    3,
    88,
    44,
    0,
    2003,
    2004,
    5,
    202,
    0,
    0,
    2004,
    2006,
    3,
    88,
    44,
    0,
    2005,
    2003,
    1,
    0,
    0,
    0,
    2006,
    2009,
    1,
    0,
    0,
    0,
    2007,
    2005,
    1,
    0,
    0,
    0,
    2007,
    2008,
    1,
    0,
    0,
    0,
    2008,
    233,
    1,
    0,
    0,
    0,
    2009,
    2007,
    1,
    0,
    0,
    0,
    2010,
    2012,
    5,
    89,
    0,
    0,
    2011,
    2013,
    3,
    44,
    22,
    0,
    2012,
    2011,
    1,
    0,
    0,
    0,
    2012,
    2013,
    1,
    0,
    0,
    0,
    2013,
    2015,
    1,
    0,
    0,
    0,
    2014,
    2010,
    1,
    0,
    0,
    0,
    2014,
    2015,
    1,
    0,
    0,
    0,
    2015,
    2016,
    1,
    0,
    0,
    0,
    2016,
    2017,
    5,
    88,
    0,
    0,
    2017,
    2022,
    3,
    88,
    44,
    0,
    2018,
    2019,
    5,
    202,
    0,
    0,
    2019,
    2021,
    3,
    88,
    44,
    0,
    2020,
    2018,
    1,
    0,
    0,
    0,
    2021,
    2024,
    1,
    0,
    0,
    0,
    2022,
    2020,
    1,
    0,
    0,
    0,
    2022,
    2023,
    1,
    0,
    0,
    0,
    2023,
    2025,
    1,
    0,
    0,
    0,
    2024,
    2022,
    1,
    0,
    0,
    0,
    2025,
    2026,
    5,
    111,
    0,
    0,
    2026,
    2031,
    3,
    88,
    44,
    0,
    2027,
    2028,
    5,
    202,
    0,
    0,
    2028,
    2030,
    3,
    88,
    44,
    0,
    2029,
    2027,
    1,
    0,
    0,
    0,
    2030,
    2033,
    1,
    0,
    0,
    0,
    2031,
    2029,
    1,
    0,
    0,
    0,
    2031,
    2032,
    1,
    0,
    0,
    0,
    2032,
    2034,
    1,
    0,
    0,
    0,
    2033,
    2031,
    1,
    0,
    0,
    0,
    2034,
    2035,
    3,
    46,
    23,
    0,
    2035,
    235,
    1,
    0,
    0,
    0,
    2036,
    2041,
    3,
    88,
    44,
    0,
    2037,
    2038,
    5,
    202,
    0,
    0,
    2038,
    2040,
    3,
    88,
    44,
    0,
    2039,
    2037,
    1,
    0,
    0,
    0,
    2040,
    2043,
    1,
    0,
    0,
    0,
    2041,
    2039,
    1,
    0,
    0,
    0,
    2041,
    2042,
    1,
    0,
    0,
    0,
    2042,
    237,
    1,
    0,
    0,
    0,
    2043,
    2041,
    1,
    0,
    0,
    0,
    2044,
    2049,
    5,
    67,
    0,
    0,
    2045,
    2047,
    3,
    44,
    22,
    0,
    2046,
    2045,
    1,
    0,
    0,
    0,
    2046,
    2047,
    1,
    0,
    0,
    0,
    2047,
    2048,
    1,
    0,
    0,
    0,
    2048,
    2050,
    5,
    111,
    0,
    0,
    2049,
    2046,
    1,
    0,
    0,
    0,
    2049,
    2050,
    1,
    0,
    0,
    0,
    2050,
    2051,
    1,
    0,
    0,
    0,
    2051,
    2052,
    3,
    88,
    44,
    0,
    2052,
    2053,
    5,
    24,
    0,
    0,
    2053,
    2054,
    3,
    88,
    44,
    0,
    2054,
    2055,
    3,
    46,
    23,
    0,
    2055,
    239,
    1,
    0,
    0,
    0,
    2056,
    2057,
    3,
    88,
    44,
    0,
    2057,
    241,
    1,
    0,
    0,
    0,
    2058,
    2059,
    3,
    110,
    55,
    0,
    2059,
    2060,
    5,
    43,
    0,
    0,
    2060,
    2061,
    3,
    162,
    81,
    0,
    2061,
    2062,
    3,
    128,
    64,
    0,
    2062,
    243,
    1,
    0,
    0,
    0,
    2063,
    2064,
    3,
    110,
    55,
    0,
    2064,
    2065,
    5,
    28,
    0,
    0,
    2065,
    2066,
    3,
    162,
    81,
    0,
    2066,
    2067,
    3,
    128,
    64,
    0,
    2067,
    245,
    1,
    0,
    0,
    0,
    2068,
    2069,
    3,
    110,
    55,
    0,
    2069,
    2070,
    5,
    144,
    0,
    0,
    2070,
    2071,
    3,
    162,
    81,
    0,
    2071,
    2072,
    3,
    128,
    64,
    0,
    2072,
    247,
    1,
    0,
    0,
    0,
    2073,
    2074,
    3,
    110,
    55,
    0,
    2074,
    2075,
    5,
    16,
    0,
    0,
    2075,
    2076,
    3,
    162,
    81,
    0,
    2076,
    2077,
    3,
    128,
    64,
    0,
    2077,
    249,
    1,
    0,
    0,
    0,
    2078,
    2079,
    3,
    110,
    55,
    0,
    2079,
    2080,
    5,
    16,
    0,
    0,
    2080,
    2081,
    5,
    144,
    0,
    0,
    2081,
    2082,
    3,
    162,
    81,
    0,
    2082,
    2083,
    3,
    128,
    64,
    0,
    2083,
    251,
    1,
    0,
    0,
    0,
    2084,
    2085,
    3,
    176,
    88,
    0,
    2085,
    2093,
    5,
    38,
    0,
    0,
    2086,
    2088,
    3,
    184,
    92,
    0,
    2087,
    2086,
    1,
    0,
    0,
    0,
    2087,
    2088,
    1,
    0,
    0,
    0,
    2088,
    2090,
    1,
    0,
    0,
    0,
    2089,
    2091,
    3,
    318,
    159,
    0,
    2090,
    2089,
    1,
    0,
    0,
    0,
    2090,
    2091,
    1,
    0,
    0,
    0,
    2091,
    2094,
    1,
    0,
    0,
    0,
    2092,
    2094,
    3,
    254,
    127,
    0,
    2093,
    2087,
    1,
    0,
    0,
    0,
    2093,
    2092,
    1,
    0,
    0,
    0,
    2094,
    2095,
    1,
    0,
    0,
    0,
    2095,
    2096,
    3,
    128,
    64,
    0,
    2096,
    253,
    1,
    0,
    0,
    0,
    2097,
    2100,
    3,
    256,
    128,
    0,
    2098,
    2100,
    3,
    258,
    129,
    0,
    2099,
    2097,
    1,
    0,
    0,
    0,
    2099,
    2098,
    1,
    0,
    0,
    0,
    2100,
    255,
    1,
    0,
    0,
    0,
    2101,
    2103,
    3,
    184,
    92,
    0,
    2102,
    2101,
    1,
    0,
    0,
    0,
    2102,
    2103,
    1,
    0,
    0,
    0,
    2103,
    2104,
    1,
    0,
    0,
    0,
    2104,
    2110,
    5,
    74,
    0,
    0,
    2105,
    2107,
    5,
    8,
    0,
    0,
    2106,
    2108,
    5,
    74,
    0,
    0,
    2107,
    2106,
    1,
    0,
    0,
    0,
    2107,
    2108,
    1,
    0,
    0,
    0,
    2108,
    2110,
    1,
    0,
    0,
    0,
    2109,
    2102,
    1,
    0,
    0,
    0,
    2109,
    2105,
    1,
    0,
    0,
    0,
    2109,
    2110,
    1,
    0,
    0,
    0,
    2110,
    2111,
    1,
    0,
    0,
    0,
    2111,
    2112,
    3,
    260,
    130,
    0,
    2112,
    2113,
    5,
    154,
    0,
    0,
    2113,
    2114,
    3,
    260,
    130,
    0,
    2114,
    257,
    1,
    0,
    0,
    0,
    2115,
    2117,
    3,
    184,
    92,
    0,
    2116,
    2115,
    1,
    0,
    0,
    0,
    2116,
    2117,
    1,
    0,
    0,
    0,
    2117,
    2118,
    1,
    0,
    0,
    0,
    2118,
    2119,
    5,
    196,
    0,
    0,
    2119,
    2120,
    3,
    260,
    130,
    0,
    2120,
    2121,
    5,
    200,
    0,
    0,
    2121,
    2126,
    3,
    260,
    130,
    0,
    2122,
    2123,
    5,
    200,
    0,
    0,
    2123,
    2125,
    3,
    260,
    130,
    0,
    2124,
    2122,
    1,
    0,
    0,
    0,
    2125,
    2128,
    1,
    0,
    0,
    0,
    2126,
    2124,
    1,
    0,
    0,
    0,
    2126,
    2127,
    1,
    0,
    0,
    0,
    2127,
    2129,
    1,
    0,
    0,
    0,
    2128,
    2126,
    1,
    0,
    0,
    0,
    2129,
    2130,
    5,
    197,
    0,
    0,
    2130,
    259,
    1,
    0,
    0,
    0,
    2131,
    2132,
    3,
    262,
    131,
    0,
    2132,
    261,
    1,
    0,
    0,
    0,
    2133,
    2135,
    3,
    264,
    132,
    0,
    2134,
    2133,
    1,
    0,
    0,
    0,
    2134,
    2135,
    1,
    0,
    0,
    0,
    2135,
    2139,
    1,
    0,
    0,
    0,
    2136,
    2137,
    3,
    40,
    20,
    0,
    2137,
    2138,
    7,
    17,
    0,
    0,
    2138,
    2140,
    1,
    0,
    0,
    0,
    2139,
    2136,
    1,
    0,
    0,
    0,
    2139,
    2140,
    1,
    0,
    0,
    0,
    2140,
    2141,
    1,
    0,
    0,
    0,
    2141,
    2142,
    3,
    226,
    113,
    0,
    2142,
    263,
    1,
    0,
    0,
    0,
    2143,
    2144,
    3,
    266,
    133,
    0,
    2144,
    265,
    1,
    0,
    0,
    0,
    2145,
    2146,
    3,
    328,
    164,
    0,
    2146,
    267,
    1,
    0,
    0,
    0,
    2147,
    2148,
    3,
    176,
    88,
    0,
    2148,
    2149,
    5,
    22,
    0,
    0,
    2149,
    2150,
    3,
    270,
    135,
    0,
    2150,
    2151,
    3,
    128,
    64,
    0,
    2151,
    269,
    1,
    0,
    0,
    0,
    2152,
    2158,
    3,
    184,
    92,
    0,
    2153,
    2154,
    5,
    111,
    0,
    0,
    2154,
    2155,
    3,
    260,
    130,
    0,
    2155,
    2156,
    5,
    207,
    0,
    0,
    2156,
    2157,
    3,
    260,
    130,
    0,
    2157,
    2159,
    1,
    0,
    0,
    0,
    2158,
    2153,
    1,
    0,
    0,
    0,
    2158,
    2159,
    1,
    0,
    0,
    0,
    2159,
    2173,
    1,
    0,
    0,
    0,
    2160,
    2162,
    5,
    8,
    0,
    0,
    2161,
    2160,
    1,
    0,
    0,
    0,
    2161,
    2162,
    1,
    0,
    0,
    0,
    2162,
    2170,
    1,
    0,
    0,
    0,
    2163,
    2165,
    5,
    111,
    0,
    0,
    2164,
    2163,
    1,
    0,
    0,
    0,
    2164,
    2165,
    1,
    0,
    0,
    0,
    2165,
    2166,
    1,
    0,
    0,
    0,
    2166,
    2167,
    3,
    260,
    130,
    0,
    2167,
    2168,
    5,
    207,
    0,
    0,
    2168,
    2169,
    3,
    260,
    130,
    0,
    2169,
    2171,
    1,
    0,
    0,
    0,
    2170,
    2164,
    1,
    0,
    0,
    0,
    2170,
    2171,
    1,
    0,
    0,
    0,
    2171,
    2173,
    1,
    0,
    0,
    0,
    2172,
    2152,
    1,
    0,
    0,
    0,
    2172,
    2161,
    1,
    0,
    0,
    0,
    2173,
    271,
    1,
    0,
    0,
    0,
    2174,
    2175,
    3,
    176,
    88,
    0,
    2175,
    2176,
    5,
    150,
    0,
    0,
    2176,
    2177,
    3,
    274,
    137,
    0,
    2177,
    2178,
    3,
    128,
    64,
    0,
    2178,
    273,
    1,
    0,
    0,
    0,
    2179,
    2185,
    3,
    184,
    92,
    0,
    2180,
    2181,
    5,
    69,
    0,
    0,
    2181,
    2182,
    3,
    260,
    130,
    0,
    2182,
    2183,
    5,
    152,
    0,
    0,
    2183,
    2184,
    3,
    260,
    130,
    0,
    2184,
    2186,
    1,
    0,
    0,
    0,
    2185,
    2180,
    1,
    0,
    0,
    0,
    2185,
    2186,
    1,
    0,
    0,
    0,
    2186,
    2200,
    1,
    0,
    0,
    0,
    2187,
    2189,
    5,
    8,
    0,
    0,
    2188,
    2187,
    1,
    0,
    0,
    0,
    2188,
    2189,
    1,
    0,
    0,
    0,
    2189,
    2197,
    1,
    0,
    0,
    0,
    2190,
    2192,
    5,
    69,
    0,
    0,
    2191,
    2190,
    1,
    0,
    0,
    0,
    2191,
    2192,
    1,
    0,
    0,
    0,
    2192,
    2193,
    1,
    0,
    0,
    0,
    2193,
    2194,
    3,
    260,
    130,
    0,
    2194,
    2195,
    5,
    152,
    0,
    0,
    2195,
    2196,
    3,
    260,
    130,
    0,
    2196,
    2198,
    1,
    0,
    0,
    0,
    2197,
    2191,
    1,
    0,
    0,
    0,
    2197,
    2198,
    1,
    0,
    0,
    0,
    2198,
    2200,
    1,
    0,
    0,
    0,
    2199,
    2179,
    1,
    0,
    0,
    0,
    2199,
    2188,
    1,
    0,
    0,
    0,
    2200,
    275,
    1,
    0,
    0,
    0,
    2201,
    2202,
    3,
    110,
    55,
    0,
    2202,
    2203,
    5,
    20,
    0,
    0,
    2203,
    2204,
    3,
    162,
    81,
    0,
    2204,
    2205,
    3,
    128,
    64,
    0,
    2205,
    277,
    1,
    0,
    0,
    0,
    2206,
    2207,
    3,
    176,
    88,
    0,
    2207,
    2208,
    5,
    143,
    0,
    0,
    2208,
    2210,
    3,
    184,
    92,
    0,
    2209,
    2211,
    3,
    318,
    159,
    0,
    2210,
    2209,
    1,
    0,
    0,
    0,
    2210,
    2211,
    1,
    0,
    0,
    0,
    2211,
    2212,
    1,
    0,
    0,
    0,
    2212,
    2213,
    3,
    128,
    64,
    0,
    2213,
    279,
    1,
    0,
    0,
    0,
    2214,
    2215,
    3,
    110,
    55,
    0,
    2215,
    2216,
    5,
    75,
    0,
    0,
    2216,
    2217,
    3,
    162,
    81,
    0,
    2217,
    2218,
    3,
    282,
    141,
    0,
    2218,
    281,
    1,
    0,
    0,
    0,
    2219,
    2225,
    5,
    205,
    0,
    0,
    2220,
    2221,
    5,
    214,
    0,
    0,
    2221,
    2222,
    3,
    284,
    142,
    0,
    2222,
    2223,
    5,
    216,
    0,
    0,
    2223,
    2225,
    1,
    0,
    0,
    0,
    2224,
    2219,
    1,
    0,
    0,
    0,
    2224,
    2220,
    1,
    0,
    0,
    0,
    2225,
    283,
    1,
    0,
    0,
    0,
    2226,
    2230,
    3,
    390,
    195,
    0,
    2227,
    2230,
    3,
    130,
    65,
    0,
    2228,
    2230,
    3,
    286,
    143,
    0,
    2229,
    2226,
    1,
    0,
    0,
    0,
    2229,
    2227,
    1,
    0,
    0,
    0,
    2229,
    2228,
    1,
    0,
    0,
    0,
    2230,
    2233,
    1,
    0,
    0,
    0,
    2231,
    2229,
    1,
    0,
    0,
    0,
    2231,
    2232,
    1,
    0,
    0,
    0,
    2232,
    2235,
    1,
    0,
    0,
    0,
    2233,
    2231,
    1,
    0,
    0,
    0,
    2234,
    2236,
    3,
    288,
    144,
    0,
    2235,
    2234,
    1,
    0,
    0,
    0,
    2235,
    2236,
    1,
    0,
    0,
    0,
    2236,
    285,
    1,
    0,
    0,
    0,
    2237,
    2238,
    3,
    76,
    38,
    0,
    2238,
    2239,
    5,
    134,
    0,
    0,
    2239,
    2240,
    3,
    106,
    53,
    0,
    2240,
    287,
    1,
    0,
    0,
    0,
    2241,
    2242,
    3,
    76,
    38,
    0,
    2242,
    2243,
    3,
    0,
    0,
    0,
    2243,
    289,
    1,
    0,
    0,
    0,
    2244,
    2245,
    3,
    176,
    88,
    0,
    2245,
    2246,
    5,
    63,
    0,
    0,
    2246,
    2248,
    3,
    184,
    92,
    0,
    2247,
    2249,
    3,
    318,
    159,
    0,
    2248,
    2247,
    1,
    0,
    0,
    0,
    2248,
    2249,
    1,
    0,
    0,
    0,
    2249,
    2250,
    1,
    0,
    0,
    0,
    2250,
    2251,
    3,
    282,
    141,
    0,
    2251,
    291,
    1,
    0,
    0,
    0,
    2252,
    2253,
    3,
    110,
    55,
    0,
    2253,
    2254,
    5,
    121,
    0,
    0,
    2254,
    2255,
    3,
    162,
    81,
    0,
    2255,
    2256,
    3,
    282,
    141,
    0,
    2256,
    293,
    1,
    0,
    0,
    0,
    2257,
    2258,
    3,
    176,
    88,
    0,
    2258,
    2259,
    5,
    23,
    0,
    0,
    2259,
    2261,
    3,
    184,
    92,
    0,
    2260,
    2262,
    3,
    318,
    159,
    0,
    2261,
    2260,
    1,
    0,
    0,
    0,
    2261,
    2262,
    1,
    0,
    0,
    0,
    2262,
    2263,
    1,
    0,
    0,
    0,
    2263,
    2264,
    3,
    282,
    141,
    0,
    2264,
    295,
    1,
    0,
    0,
    0,
    2265,
    2266,
    3,
    176,
    88,
    0,
    2266,
    2268,
    5,
    87,
    0,
    0,
    2267,
    2269,
    7,
    8,
    0,
    0,
    2268,
    2267,
    1,
    0,
    0,
    0,
    2268,
    2269,
    1,
    0,
    0,
    0,
    2269,
    2270,
    1,
    0,
    0,
    0,
    2270,
    2272,
    3,
    184,
    92,
    0,
    2271,
    2273,
    3,
    318,
    159,
    0,
    2272,
    2271,
    1,
    0,
    0,
    0,
    2272,
    2273,
    1,
    0,
    0,
    0,
    2273,
    2274,
    1,
    0,
    0,
    0,
    2274,
    2275,
    3,
    282,
    141,
    0,
    2275,
    297,
    1,
    0,
    0,
    0,
    2276,
    2281,
    3,
    88,
    44,
    0,
    2277,
    2278,
    5,
    202,
    0,
    0,
    2278,
    2280,
    3,
    88,
    44,
    0,
    2279,
    2277,
    1,
    0,
    0,
    0,
    2280,
    2283,
    1,
    0,
    0,
    0,
    2281,
    2279,
    1,
    0,
    0,
    0,
    2281,
    2282,
    1,
    0,
    0,
    0,
    2282,
    299,
    1,
    0,
    0,
    0,
    2283,
    2281,
    1,
    0,
    0,
    0,
    2284,
    2285,
    3,
    110,
    55,
    0,
    2285,
    2286,
    5,
    84,
    0,
    0,
    2286,
    2287,
    3,
    162,
    81,
    0,
    2287,
    2288,
    3,
    128,
    64,
    0,
    2288,
    301,
    1,
    0,
    0,
    0,
    2289,
    2290,
    3,
    176,
    88,
    0,
    2290,
    2291,
    5,
    70,
    0,
    0,
    2291,
    2292,
    3,
    306,
    153,
    0,
    2292,
    2293,
    3,
    128,
    64,
    0,
    2293,
    303,
    1,
    0,
    0,
    0,
    2294,
    2295,
    3,
    176,
    88,
    0,
    2295,
    2296,
    5,
    150,
    0,
    0,
    2296,
    2297,
    5,
    70,
    0,
    0,
    2297,
    2298,
    3,
    306,
    153,
    0,
    2298,
    2299,
    3,
    128,
    64,
    0,
    2299,
    305,
    1,
    0,
    0,
    0,
    2300,
    2302,
    3,
    184,
    92,
    0,
    2301,
    2303,
    3,
    318,
    159,
    0,
    2302,
    2301,
    1,
    0,
    0,
    0,
    2302,
    2303,
    1,
    0,
    0,
    0,
    2303,
    2306,
    1,
    0,
    0,
    0,
    2304,
    2305,
    5,
    111,
    0,
    0,
    2305,
    2307,
    3,
    308,
    154,
    0,
    2306,
    2304,
    1,
    0,
    0,
    0,
    2306,
    2307,
    1,
    0,
    0,
    0,
    2307,
    2313,
    1,
    0,
    0,
    0,
    2308,
    2309,
    5,
    74,
    0,
    0,
    2309,
    2310,
    3,
    314,
    157,
    0,
    2310,
    2311,
    5,
    154,
    0,
    0,
    2311,
    2312,
    3,
    314,
    157,
    0,
    2312,
    2314,
    1,
    0,
    0,
    0,
    2313,
    2308,
    1,
    0,
    0,
    0,
    2313,
    2314,
    1,
    0,
    0,
    0,
    2314,
    2340,
    1,
    0,
    0,
    0,
    2315,
    2317,
    5,
    8,
    0,
    0,
    2316,
    2315,
    1,
    0,
    0,
    0,
    2316,
    2317,
    1,
    0,
    0,
    0,
    2317,
    2318,
    1,
    0,
    0,
    0,
    2318,
    2319,
    3,
    314,
    157,
    0,
    2319,
    2320,
    5,
    154,
    0,
    0,
    2320,
    2321,
    3,
    314,
    157,
    0,
    2321,
    2340,
    1,
    0,
    0,
    0,
    2322,
    2324,
    3,
    418,
    209,
    0,
    2323,
    2322,
    1,
    0,
    0,
    0,
    2323,
    2324,
    1,
    0,
    0,
    0,
    2324,
    2326,
    1,
    0,
    0,
    0,
    2325,
    2327,
    3,
    318,
    159,
    0,
    2326,
    2325,
    1,
    0,
    0,
    0,
    2326,
    2327,
    1,
    0,
    0,
    0,
    2327,
    2330,
    1,
    0,
    0,
    0,
    2328,
    2329,
    5,
    111,
    0,
    0,
    2329,
    2331,
    3,
    570,
    285,
    0,
    2330,
    2328,
    1,
    0,
    0,
    0,
    2330,
    2331,
    1,
    0,
    0,
    0,
    2331,
    2337,
    1,
    0,
    0,
    0,
    2332,
    2333,
    5,
    74,
    0,
    0,
    2333,
    2334,
    3,
    314,
    157,
    0,
    2334,
    2335,
    5,
    154,
    0,
    0,
    2335,
    2336,
    3,
    314,
    157,
    0,
    2336,
    2338,
    1,
    0,
    0,
    0,
    2337,
    2332,
    1,
    0,
    0,
    0,
    2337,
    2338,
    1,
    0,
    0,
    0,
    2338,
    2340,
    1,
    0,
    0,
    0,
    2339,
    2300,
    1,
    0,
    0,
    0,
    2339,
    2316,
    1,
    0,
    0,
    0,
    2339,
    2323,
    1,
    0,
    0,
    0,
    2340,
    307,
    1,
    0,
    0,
    0,
    2341,
    2342,
    3,
    310,
    155,
    0,
    2342,
    309,
    1,
    0,
    0,
    0,
    2343,
    2345,
    3,
    44,
    22,
    0,
    2344,
    2343,
    1,
    0,
    0,
    0,
    2344,
    2345,
    1,
    0,
    0,
    0,
    2345,
    2346,
    1,
    0,
    0,
    0,
    2346,
    2363,
    3,
    318,
    159,
    0,
    2347,
    2349,
    3,
    44,
    22,
    0,
    2348,
    2347,
    1,
    0,
    0,
    0,
    2348,
    2349,
    1,
    0,
    0,
    0,
    2349,
    2350,
    1,
    0,
    0,
    0,
    2350,
    2352,
    3,
    312,
    156,
    0,
    2351,
    2353,
    3,
    318,
    159,
    0,
    2352,
    2351,
    1,
    0,
    0,
    0,
    2352,
    2353,
    1,
    0,
    0,
    0,
    2353,
    2363,
    1,
    0,
    0,
    0,
    2354,
    2356,
    3,
    220,
    110,
    0,
    2355,
    2357,
    3,
    328,
    164,
    0,
    2356,
    2355,
    1,
    0,
    0,
    0,
    2356,
    2357,
    1,
    0,
    0,
    0,
    2357,
    2363,
    1,
    0,
    0,
    0,
    2358,
    2360,
    3,
    328,
    164,
    0,
    2359,
    2361,
    3,
    220,
    110,
    0,
    2360,
    2359,
    1,
    0,
    0,
    0,
    2360,
    2361,
    1,
    0,
    0,
    0,
    2361,
    2363,
    1,
    0,
    0,
    0,
    2362,
    2344,
    1,
    0,
    0,
    0,
    2362,
    2348,
    1,
    0,
    0,
    0,
    2362,
    2354,
    1,
    0,
    0,
    0,
    2362,
    2358,
    1,
    0,
    0,
    0,
    2363,
    311,
    1,
    0,
    0,
    0,
    2364,
    2366,
    3,
    200,
    100,
    0,
    2365,
    2364,
    1,
    0,
    0,
    0,
    2366,
    2367,
    1,
    0,
    0,
    0,
    2367,
    2365,
    1,
    0,
    0,
    0,
    2367,
    2368,
    1,
    0,
    0,
    0,
    2368,
    2370,
    1,
    0,
    0,
    0,
    2369,
    2371,
    3,
    198,
    99,
    0,
    2370,
    2369,
    1,
    0,
    0,
    0,
    2370,
    2371,
    1,
    0,
    0,
    0,
    2371,
    2375,
    1,
    0,
    0,
    0,
    2372,
    2374,
    3,
    200,
    100,
    0,
    2373,
    2372,
    1,
    0,
    0,
    0,
    2374,
    2377,
    1,
    0,
    0,
    0,
    2375,
    2373,
    1,
    0,
    0,
    0,
    2375,
    2376,
    1,
    0,
    0,
    0,
    2376,
    2385,
    1,
    0,
    0,
    0,
    2377,
    2375,
    1,
    0,
    0,
    0,
    2378,
    2380,
    3,
    198,
    99,
    0,
    2379,
    2381,
    3,
    200,
    100,
    0,
    2380,
    2379,
    1,
    0,
    0,
    0,
    2381,
    2382,
    1,
    0,
    0,
    0,
    2382,
    2380,
    1,
    0,
    0,
    0,
    2382,
    2383,
    1,
    0,
    0,
    0,
    2383,
    2385,
    1,
    0,
    0,
    0,
    2384,
    2365,
    1,
    0,
    0,
    0,
    2384,
    2378,
    1,
    0,
    0,
    0,
    2385,
    313,
    1,
    0,
    0,
    0,
    2386,
    2387,
    3,
    316,
    158,
    0,
    2387,
    315,
    1,
    0,
    0,
    0,
    2388,
    2393,
    3,
    88,
    44,
    0,
    2389,
    2390,
    5,
    202,
    0,
    0,
    2390,
    2392,
    3,
    88,
    44,
    0,
    2391,
    2389,
    1,
    0,
    0,
    0,
    2392,
    2395,
    1,
    0,
    0,
    0,
    2393,
    2391,
    1,
    0,
    0,
    0,
    2393,
    2394,
    1,
    0,
    0,
    0,
    2394,
    317,
    1,
    0,
    0,
    0,
    2395,
    2393,
    1,
    0,
    0,
    0,
    2396,
    2397,
    3,
    320,
    160,
    0,
    2397,
    319,
    1,
    0,
    0,
    0,
    2398,
    2405,
    5,
    207,
    0,
    0,
    2399,
    2405,
    5,
    184,
    0,
    0,
    2400,
    2402,
    5,
    46,
    0,
    0,
    2401,
    2403,
    7,
    20,
    0,
    0,
    2402,
    2401,
    1,
    0,
    0,
    0,
    2402,
    2403,
    1,
    0,
    0,
    0,
    2403,
    2405,
    1,
    0,
    0,
    0,
    2404,
    2398,
    1,
    0,
    0,
    0,
    2404,
    2399,
    1,
    0,
    0,
    0,
    2404,
    2400,
    1,
    0,
    0,
    0,
    2405,
    2406,
    1,
    0,
    0,
    0,
    2406,
    2407,
    3,
    0,
    0,
    0,
    2407,
    321,
    1,
    0,
    0,
    0,
    2408,
    2411,
    3,
    324,
    162,
    0,
    2409,
    2411,
    3,
    326,
    163,
    0,
    2410,
    2408,
    1,
    0,
    0,
    0,
    2410,
    2409,
    1,
    0,
    0,
    0,
    2411,
    323,
    1,
    0,
    0,
    0,
    2412,
    2414,
    5,
    103,
    0,
    0,
    2413,
    2415,
    3,
    44,
    22,
    0,
    2414,
    2413,
    1,
    0,
    0,
    0,
    2414,
    2415,
    1,
    0,
    0,
    0,
    2415,
    2416,
    1,
    0,
    0,
    0,
    2416,
    2417,
    3,
    208,
    104,
    0,
    2417,
    2418,
    3,
    128,
    64,
    0,
    2418,
    325,
    1,
    0,
    0,
    0,
    2419,
    2421,
    5,
    103,
    0,
    0,
    2420,
    2422,
    3,
    44,
    22,
    0,
    2421,
    2420,
    1,
    0,
    0,
    0,
    2421,
    2422,
    1,
    0,
    0,
    0,
    2422,
    2423,
    1,
    0,
    0,
    0,
    2423,
    2424,
    3,
    332,
    166,
    0,
    2424,
    2425,
    3,
    128,
    64,
    0,
    2425,
    327,
    1,
    0,
    0,
    0,
    2426,
    2427,
    3,
    330,
    165,
    0,
    2427,
    329,
    1,
    0,
    0,
    0,
    2428,
    2429,
    3,
    332,
    166,
    0,
    2429,
    331,
    1,
    0,
    0,
    0,
    2430,
    2434,
    5,
    211,
    0,
    0,
    2431,
    2432,
    3,
    334,
    167,
    0,
    2432,
    2433,
    5,
    181,
    0,
    0,
    2433,
    2435,
    1,
    0,
    0,
    0,
    2434,
    2431,
    1,
    0,
    0,
    0,
    2434,
    2435,
    1,
    0,
    0,
    0,
    2435,
    2436,
    1,
    0,
    0,
    0,
    2436,
    2437,
    3,
    334,
    167,
    0,
    2437,
    2438,
    5,
    212,
    0,
    0,
    2438,
    333,
    1,
    0,
    0,
    0,
    2439,
    2442,
    3,
    24,
    12,
    0,
    2440,
    2442,
    3,
    10,
    5,
    0,
    2441,
    2439,
    1,
    0,
    0,
    0,
    2441,
    2440,
    1,
    0,
    0,
    0,
    2442,
    335,
    1,
    0,
    0,
    0,
    2443,
    2444,
    3,
    110,
    55,
    0,
    2444,
    2445,
    5,
    101,
    0,
    0,
    2445,
    2446,
    3,
    162,
    81,
    0,
    2446,
    2447,
    3,
    128,
    64,
    0,
    2447,
    337,
    1,
    0,
    0,
    0,
    2448,
    2449,
    5,
    192,
    0,
    0,
    2449,
    2453,
    3,
    342,
    171,
    0,
    2450,
    2451,
    5,
    192,
    0,
    0,
    2451,
    2453,
    3,
    874,
    437,
    0,
    2452,
    2448,
    1,
    0,
    0,
    0,
    2452,
    2450,
    1,
    0,
    0,
    0,
    2453,
    339,
    1,
    0,
    0,
    0,
    2454,
    2455,
    5,
    192,
    0,
    0,
    2455,
    2459,
    3,
    342,
    171,
    0,
    2456,
    2457,
    5,
    192,
    0,
    0,
    2457,
    2459,
    3,
    874,
    437,
    0,
    2458,
    2454,
    1,
    0,
    0,
    0,
    2458,
    2456,
    1,
    0,
    0,
    0,
    2459,
    341,
    1,
    0,
    0,
    0,
    2460,
    2461,
    3,
    220,
    110,
    0,
    2461,
    343,
    1,
    0,
    0,
    0,
    2462,
    2464,
    3,
    340,
    170,
    0,
    2463,
    2462,
    1,
    0,
    0,
    0,
    2464,
    2467,
    1,
    0,
    0,
    0,
    2465,
    2463,
    1,
    0,
    0,
    0,
    2465,
    2466,
    1,
    0,
    0,
    0,
    2466,
    2468,
    1,
    0,
    0,
    0,
    2467,
    2465,
    1,
    0,
    0,
    0,
    2468,
    2469,
    7,
    21,
    0,
    0,
    2469,
    2479,
    3,
    346,
    173,
    0,
    2470,
    2471,
    5,
    1,
    0,
    0,
    2471,
    2476,
    3,
    54,
    27,
    0,
    2472,
    2473,
    5,
    200,
    0,
    0,
    2473,
    2475,
    3,
    54,
    27,
    0,
    2474,
    2472,
    1,
    0,
    0,
    0,
    2475,
    2478,
    1,
    0,
    0,
    0,
    2476,
    2474,
    1,
    0,
    0,
    0,
    2476,
    2477,
    1,
    0,
    0,
    0,
    2477,
    2480,
    1,
    0,
    0,
    0,
    2478,
    2476,
    1,
    0,
    0,
    0,
    2479,
    2470,
    1,
    0,
    0,
    0,
    2479,
    2480,
    1,
    0,
    0,
    0,
    2480,
    2481,
    1,
    0,
    0,
    0,
    2481,
    2482,
    3,
    348,
    174,
    0,
    2482,
    345,
    1,
    0,
    0,
    0,
    2483,
    2485,
    3,
    44,
    22,
    0,
    2484,
    2483,
    1,
    0,
    0,
    0,
    2484,
    2485,
    1,
    0,
    0,
    0,
    2485,
    2489,
    1,
    0,
    0,
    0,
    2486,
    2490,
    5,
    204,
    0,
    0,
    2487,
    2488,
    5,
    158,
    0,
    0,
    2488,
    2490,
    5,
    24,
    0,
    0,
    2489,
    2486,
    1,
    0,
    0,
    0,
    2489,
    2487,
    1,
    0,
    0,
    0,
    2490,
    2492,
    1,
    0,
    0,
    0,
    2491,
    2484,
    1,
    0,
    0,
    0,
    2491,
    2492,
    1,
    0,
    0,
    0,
    2492,
    2493,
    1,
    0,
    0,
    0,
    2493,
    2494,
    3,
    220,
    110,
    0,
    2494,
    347,
    1,
    0,
    0,
    0,
    2495,
    2516,
    5,
    205,
    0,
    0,
    2496,
    2500,
    5,
    214,
    0,
    0,
    2497,
    2499,
    3,
    350,
    175,
    0,
    2498,
    2497,
    1,
    0,
    0,
    0,
    2499,
    2502,
    1,
    0,
    0,
    0,
    2500,
    2498,
    1,
    0,
    0,
    0,
    2500,
    2501,
    1,
    0,
    0,
    0,
    2501,
    2503,
    1,
    0,
    0,
    0,
    2502,
    2500,
    1,
    0,
    0,
    0,
    2503,
    2516,
    5,
    216,
    0,
    0,
    2504,
    2511,
    5,
    214,
    0,
    0,
    2505,
    2510,
    3,
    394,
    197,
    0,
    2506,
    2510,
    3,
    876,
    438,
    0,
    2507,
    2510,
    3,
    86,
    43,
    0,
    2508,
    2510,
    3,
    90,
    45,
    0,
    2509,
    2505,
    1,
    0,
    0,
    0,
    2509,
    2506,
    1,
    0,
    0,
    0,
    2509,
    2507,
    1,
    0,
    0,
    0,
    2509,
    2508,
    1,
    0,
    0,
    0,
    2510,
    2513,
    1,
    0,
    0,
    0,
    2511,
    2509,
    1,
    0,
    0,
    0,
    2511,
    2512,
    1,
    0,
    0,
    0,
    2512,
    2514,
    1,
    0,
    0,
    0,
    2513,
    2511,
    1,
    0,
    0,
    0,
    2514,
    2516,
    5,
    216,
    0,
    0,
    2515,
    2495,
    1,
    0,
    0,
    0,
    2515,
    2496,
    1,
    0,
    0,
    0,
    2515,
    2504,
    1,
    0,
    0,
    0,
    2516,
    349,
    1,
    0,
    0,
    0,
    2517,
    2522,
    3,
    82,
    41,
    0,
    2518,
    2522,
    3,
    352,
    176,
    0,
    2519,
    2522,
    3,
    86,
    43,
    0,
    2520,
    2522,
    3,
    90,
    45,
    0,
    2521,
    2517,
    1,
    0,
    0,
    0,
    2521,
    2518,
    1,
    0,
    0,
    0,
    2521,
    2519,
    1,
    0,
    0,
    0,
    2521,
    2520,
    1,
    0,
    0,
    0,
    2522,
    351,
    1,
    0,
    0,
    0,
    2523,
    2524,
    3,
    354,
    177,
    0,
    2524,
    353,
    1,
    0,
    0,
    0,
    2525,
    2527,
    5,
    65,
    0,
    0,
    2526,
    2525,
    1,
    0,
    0,
    0,
    2526,
    2527,
    1,
    0,
    0,
    0,
    2527,
    2529,
    1,
    0,
    0,
    0,
    2528,
    2530,
    7,
    19,
    0,
    0,
    2529,
    2528,
    1,
    0,
    0,
    0,
    2529,
    2530,
    1,
    0,
    0,
    0,
    2530,
    2531,
    1,
    0,
    0,
    0,
    2531,
    2533,
    3,
    232,
    116,
    0,
    2532,
    2534,
    3,
    196,
    98,
    0,
    2533,
    2532,
    1,
    0,
    0,
    0,
    2533,
    2534,
    1,
    0,
    0,
    0,
    2534,
    2536,
    1,
    0,
    0,
    0,
    2535,
    2537,
    3,
    318,
    159,
    0,
    2536,
    2535,
    1,
    0,
    0,
    0,
    2536,
    2537,
    1,
    0,
    0,
    0,
    2537,
    2538,
    1,
    0,
    0,
    0,
    2538,
    2539,
    3,
    348,
    174,
    0,
    2539,
    355,
    1,
    0,
    0,
    0,
    2540,
    2542,
    3,
    340,
    170,
    0,
    2541,
    2540,
    1,
    0,
    0,
    0,
    2542,
    2545,
    1,
    0,
    0,
    0,
    2543,
    2541,
    1,
    0,
    0,
    0,
    2543,
    2544,
    1,
    0,
    0,
    0,
    2544,
    2546,
    1,
    0,
    0,
    0,
    2545,
    2543,
    1,
    0,
    0,
    0,
    2546,
    2547,
    3,
    360,
    180,
    0,
    2547,
    2548,
    3,
    362,
    181,
    0,
    2548,
    357,
    1,
    0,
    0,
    0,
    2549,
    2551,
    5,
    141,
    0,
    0,
    2550,
    2549,
    1,
    0,
    0,
    0,
    2550,
    2551,
    1,
    0,
    0,
    0,
    2551,
    2552,
    1,
    0,
    0,
    0,
    2552,
    2556,
    5,
    94,
    0,
    0,
    2553,
    2555,
    3,
    340,
    170,
    0,
    2554,
    2553,
    1,
    0,
    0,
    0,
    2555,
    2558,
    1,
    0,
    0,
    0,
    2556,
    2554,
    1,
    0,
    0,
    0,
    2556,
    2557,
    1,
    0,
    0,
    0,
    2557,
    2559,
    1,
    0,
    0,
    0,
    2558,
    2556,
    1,
    0,
    0,
    0,
    2559,
    2560,
    3,
    360,
    180,
    0,
    2560,
    2561,
    3,
    362,
    181,
    0,
    2561,
    359,
    1,
    0,
    0,
    0,
    2562,
    2564,
    5,
    115,
    0,
    0,
    2563,
    2565,
    3,
    44,
    22,
    0,
    2564,
    2563,
    1,
    0,
    0,
    0,
    2564,
    2565,
    1,
    0,
    0,
    0,
    2565,
    361,
    1,
    0,
    0,
    0,
    2566,
    2576,
    5,
    205,
    0,
    0,
    2567,
    2571,
    5,
    214,
    0,
    0,
    2568,
    2570,
    3,
    370,
    185,
    0,
    2569,
    2568,
    1,
    0,
    0,
    0,
    2570,
    2573,
    1,
    0,
    0,
    0,
    2571,
    2569,
    1,
    0,
    0,
    0,
    2571,
    2572,
    1,
    0,
    0,
    0,
    2572,
    2574,
    1,
    0,
    0,
    0,
    2573,
    2571,
    1,
    0,
    0,
    0,
    2574,
    2576,
    5,
    216,
    0,
    0,
    2575,
    2566,
    1,
    0,
    0,
    0,
    2575,
    2567,
    1,
    0,
    0,
    0,
    2576,
    363,
    1,
    0,
    0,
    0,
    2577,
    2578,
    3,
    76,
    38,
    0,
    2578,
    2579,
    5,
    68,
    0,
    0,
    2579,
    2580,
    3,
    0,
    0,
    0,
    2580,
    2581,
    5,
    205,
    0,
    0,
    2581,
    365,
    1,
    0,
    0,
    0,
    2582,
    2584,
    3,
    44,
    22,
    0,
    2583,
    2582,
    1,
    0,
    0,
    0,
    2583,
    2584,
    1,
    0,
    0,
    0,
    2584,
    2585,
    1,
    0,
    0,
    0,
    2585,
    2587,
    5,
    74,
    0,
    0,
    2586,
    2583,
    1,
    0,
    0,
    0,
    2586,
    2587,
    1,
    0,
    0,
    0,
    2587,
    2588,
    1,
    0,
    0,
    0,
    2588,
    2593,
    3,
    88,
    44,
    0,
    2589,
    2590,
    5,
    200,
    0,
    0,
    2590,
    2592,
    3,
    88,
    44,
    0,
    2591,
    2589,
    1,
    0,
    0,
    0,
    2592,
    2595,
    1,
    0,
    0,
    0,
    2593,
    2591,
    1,
    0,
    0,
    0,
    2593,
    2594,
    1,
    0,
    0,
    0,
    2594,
    2596,
    1,
    0,
    0,
    0,
    2595,
    2593,
    1,
    0,
    0,
    0,
    2596,
    2597,
    5,
    154,
    0,
    0,
    2597,
    2602,
    3,
    88,
    44,
    0,
    2598,
    2599,
    5,
    200,
    0,
    0,
    2599,
    2601,
    3,
    88,
    44,
    0,
    2600,
    2598,
    1,
    0,
    0,
    0,
    2601,
    2604,
    1,
    0,
    0,
    0,
    2602,
    2600,
    1,
    0,
    0,
    0,
    2602,
    2603,
    1,
    0,
    0,
    0,
    2603,
    367,
    1,
    0,
    0,
    0,
    2604,
    2602,
    1,
    0,
    0,
    0,
    2605,
    2606,
    3,
    58,
    29,
    0,
    2606,
    369,
    1,
    0,
    0,
    0,
    2607,
    2612,
    3,
    372,
    186,
    0,
    2608,
    2612,
    3,
    364,
    182,
    0,
    2609,
    2612,
    3,
    86,
    43,
    0,
    2610,
    2612,
    3,
    90,
    45,
    0,
    2611,
    2607,
    1,
    0,
    0,
    0,
    2611,
    2608,
    1,
    0,
    0,
    0,
    2611,
    2609,
    1,
    0,
    0,
    0,
    2611,
    2610,
    1,
    0,
    0,
    0,
    2612,
    371,
    1,
    0,
    0,
    0,
    2613,
    2616,
    3,
    76,
    38,
    0,
    2614,
    2617,
    3,
    374,
    187,
    0,
    2615,
    2617,
    3,
    376,
    188,
    0,
    2616,
    2614,
    1,
    0,
    0,
    0,
    2616,
    2615,
    1,
    0,
    0,
    0,
    2617,
    373,
    1,
    0,
    0,
    0,
    2618,
    2649,
    3,
    356,
    178,
    0,
    2619,
    2649,
    3,
    358,
    179,
    0,
    2620,
    2649,
    3,
    58,
    29,
    0,
    2621,
    2649,
    3,
    52,
    26,
    0,
    2622,
    2649,
    3,
    446,
    223,
    0,
    2623,
    2649,
    3,
    450,
    225,
    0,
    2624,
    2649,
    3,
    462,
    231,
    0,
    2625,
    2649,
    3,
    464,
    232,
    0,
    2626,
    2649,
    3,
    488,
    244,
    0,
    2627,
    2649,
    3,
    492,
    246,
    0,
    2628,
    2649,
    3,
    506,
    253,
    0,
    2629,
    2649,
    3,
    556,
    278,
    0,
    2630,
    2649,
    3,
    520,
    260,
    0,
    2631,
    2649,
    3,
    496,
    248,
    0,
    2632,
    2649,
    3,
    574,
    287,
    0,
    2633,
    2649,
    3,
    748,
    374,
    0,
    2634,
    2649,
    3,
    686,
    343,
    0,
    2635,
    2649,
    3,
    760,
    380,
    0,
    2636,
    2649,
    3,
    768,
    384,
    0,
    2637,
    2649,
    3,
    808,
    404,
    0,
    2638,
    2649,
    3,
    812,
    406,
    0,
    2639,
    2649,
    3,
    824,
    412,
    0,
    2640,
    2649,
    3,
    828,
    414,
    0,
    2641,
    2649,
    3,
    836,
    418,
    0,
    2642,
    2649,
    3,
    842,
    421,
    0,
    2643,
    2649,
    3,
    864,
    432,
    0,
    2644,
    2649,
    3,
    868,
    434,
    0,
    2645,
    2649,
    3,
    872,
    436,
    0,
    2646,
    2649,
    3,
    550,
    275,
    0,
    2647,
    2649,
    3,
    880,
    440,
    0,
    2648,
    2618,
    1,
    0,
    0,
    0,
    2648,
    2619,
    1,
    0,
    0,
    0,
    2648,
    2620,
    1,
    0,
    0,
    0,
    2648,
    2621,
    1,
    0,
    0,
    0,
    2648,
    2622,
    1,
    0,
    0,
    0,
    2648,
    2623,
    1,
    0,
    0,
    0,
    2648,
    2624,
    1,
    0,
    0,
    0,
    2648,
    2625,
    1,
    0,
    0,
    0,
    2648,
    2626,
    1,
    0,
    0,
    0,
    2648,
    2627,
    1,
    0,
    0,
    0,
    2648,
    2628,
    1,
    0,
    0,
    0,
    2648,
    2629,
    1,
    0,
    0,
    0,
    2648,
    2630,
    1,
    0,
    0,
    0,
    2648,
    2631,
    1,
    0,
    0,
    0,
    2648,
    2632,
    1,
    0,
    0,
    0,
    2648,
    2633,
    1,
    0,
    0,
    0,
    2648,
    2634,
    1,
    0,
    0,
    0,
    2648,
    2635,
    1,
    0,
    0,
    0,
    2648,
    2636,
    1,
    0,
    0,
    0,
    2648,
    2637,
    1,
    0,
    0,
    0,
    2648,
    2638,
    1,
    0,
    0,
    0,
    2648,
    2639,
    1,
    0,
    0,
    0,
    2648,
    2640,
    1,
    0,
    0,
    0,
    2648,
    2641,
    1,
    0,
    0,
    0,
    2648,
    2642,
    1,
    0,
    0,
    0,
    2648,
    2643,
    1,
    0,
    0,
    0,
    2648,
    2644,
    1,
    0,
    0,
    0,
    2648,
    2645,
    1,
    0,
    0,
    0,
    2648,
    2646,
    1,
    0,
    0,
    0,
    2648,
    2647,
    1,
    0,
    0,
    0,
    2649,
    375,
    1,
    0,
    0,
    0,
    2650,
    2653,
    3,
    432,
    216,
    0,
    2651,
    2653,
    3,
    436,
    218,
    0,
    2652,
    2650,
    1,
    0,
    0,
    0,
    2652,
    2651,
    1,
    0,
    0,
    0,
    2653,
    377,
    1,
    0,
    0,
    0,
    2654,
    2655,
    7,
    22,
    0,
    0,
    2655,
    379,
    1,
    0,
    0,
    0,
    2656,
    2657,
    3,
    340,
    170,
    0,
    2657,
    381,
    1,
    0,
    0,
    0,
    2658,
    2660,
    3,
    378,
    189,
    0,
    2659,
    2658,
    1,
    0,
    0,
    0,
    2659,
    2660,
    1,
    0,
    0,
    0,
    2660,
    2664,
    1,
    0,
    0,
    0,
    2661,
    2663,
    3,
    380,
    190,
    0,
    2662,
    2661,
    1,
    0,
    0,
    0,
    2663,
    2666,
    1,
    0,
    0,
    0,
    2664,
    2662,
    1,
    0,
    0,
    0,
    2664,
    2665,
    1,
    0,
    0,
    0,
    2665,
    383,
    1,
    0,
    0,
    0,
    2666,
    2664,
    1,
    0,
    0,
    0,
    2667,
    2668,
    3,
    386,
    193,
    0,
    2668,
    2669,
    3,
    388,
    194,
    0,
    2669,
    385,
    1,
    0,
    0,
    0,
    2670,
    2672,
    3,
    44,
    22,
    0,
    2671,
    2670,
    1,
    0,
    0,
    0,
    2671,
    2672,
    1,
    0,
    0,
    0,
    2672,
    2674,
    1,
    0,
    0,
    0,
    2673,
    2675,
    3,
    444,
    222,
    0,
    2674,
    2673,
    1,
    0,
    0,
    0,
    2674,
    2675,
    1,
    0,
    0,
    0,
    2675,
    387,
    1,
    0,
    0,
    0,
    2676,
    2686,
    5,
    205,
    0,
    0,
    2677,
    2681,
    5,
    214,
    0,
    0,
    2678,
    2680,
    3,
    390,
    195,
    0,
    2679,
    2678,
    1,
    0,
    0,
    0,
    2680,
    2683,
    1,
    0,
    0,
    0,
    2681,
    2679,
    1,
    0,
    0,
    0,
    2681,
    2682,
    1,
    0,
    0,
    0,
    2682,
    2684,
    1,
    0,
    0,
    0,
    2683,
    2681,
    1,
    0,
    0,
    0,
    2684,
    2686,
    5,
    216,
    0,
    0,
    2685,
    2676,
    1,
    0,
    0,
    0,
    2685,
    2677,
    1,
    0,
    0,
    0,
    2686,
    389,
    1,
    0,
    0,
    0,
    2687,
    2704,
    3,
    90,
    45,
    0,
    2688,
    2689,
    3,
    76,
    38,
    0,
    2689,
    2690,
    3,
    392,
    196,
    0,
    2690,
    2704,
    1,
    0,
    0,
    0,
    2691,
    2693,
    3,
    480,
    240,
    0,
    2692,
    2691,
    1,
    0,
    0,
    0,
    2692,
    2693,
    1,
    0,
    0,
    0,
    2693,
    2694,
    1,
    0,
    0,
    0,
    2694,
    2695,
    3,
    76,
    38,
    0,
    2695,
    2696,
    3,
    434,
    217,
    0,
    2696,
    2704,
    1,
    0,
    0,
    0,
    2697,
    2699,
    3,
    480,
    240,
    0,
    2698,
    2697,
    1,
    0,
    0,
    0,
    2698,
    2699,
    1,
    0,
    0,
    0,
    2699,
    2700,
    1,
    0,
    0,
    0,
    2700,
    2701,
    3,
    76,
    38,
    0,
    2701,
    2702,
    3,
    436,
    218,
    0,
    2702,
    2704,
    1,
    0,
    0,
    0,
    2703,
    2687,
    1,
    0,
    0,
    0,
    2703,
    2688,
    1,
    0,
    0,
    0,
    2703,
    2692,
    1,
    0,
    0,
    0,
    2703,
    2698,
    1,
    0,
    0,
    0,
    2704,
    391,
    1,
    0,
    0,
    0,
    2705,
    2710,
    5,
    7,
    0,
    0,
    2706,
    2707,
    5,
    206,
    0,
    0,
    2707,
    2708,
    3,
    40,
    20,
    0,
    2708,
    2709,
    5,
    208,
    0,
    0,
    2709,
    2711,
    1,
    0,
    0,
    0,
    2710,
    2706,
    1,
    0,
    0,
    0,
    2710,
    2711,
    1,
    0,
    0,
    0,
    2711,
    2713,
    1,
    0,
    0,
    0,
    2712,
    2714,
    3,
    40,
    20,
    0,
    2713,
    2712,
    1,
    0,
    0,
    0,
    2713,
    2714,
    1,
    0,
    0,
    0,
    2714,
    2715,
    1,
    0,
    0,
    0,
    2715,
    2716,
    5,
    71,
    0,
    0,
    2716,
    2717,
    3,
    88,
    44,
    0,
    2717,
    2718,
    3,
    46,
    23,
    0,
    2718,
    2724,
    1,
    0,
    0,
    0,
    2719,
    2720,
    5,
    164,
    0,
    0,
    2720,
    2724,
    3,
    442,
    221,
    0,
    2721,
    2724,
    3,
    374,
    187,
    0,
    2722,
    2724,
    3,
    432,
    216,
    0,
    2723,
    2705,
    1,
    0,
    0,
    0,
    2723,
    2719,
    1,
    0,
    0,
    0,
    2723,
    2721,
    1,
    0,
    0,
    0,
    2723,
    2722,
    1,
    0,
    0,
    0,
    2724,
    393,
    1,
    0,
    0,
    0,
    2725,
    2726,
    3,
    76,
    38,
    0,
    2726,
    2727,
    3,
    374,
    187,
    0,
    2727,
    395,
    1,
    0,
    0,
    0,
    2728,
    2729,
    3,
    76,
    38,
    0,
    2729,
    2730,
    5,
    164,
    0,
    0,
    2730,
    2731,
    3,
    442,
    221,
    0,
    2731,
    397,
    1,
    0,
    0,
    0,
    2732,
    2733,
    3,
    76,
    38,
    0,
    2733,
    2734,
    3,
    432,
    216,
    0,
    2734,
    399,
    1,
    0,
    0,
    0,
    2735,
    2736,
    3,
    76,
    38,
    0,
    2736,
    2737,
    3,
    438,
    219,
    0,
    2737,
    401,
    1,
    0,
    0,
    0,
    2738,
    2739,
    3,
    76,
    38,
    0,
    2739,
    2740,
    3,
    440,
    220,
    0,
    2740,
    403,
    1,
    0,
    0,
    0,
    2741,
    2743,
    3,
    182,
    91,
    0,
    2742,
    2741,
    1,
    0,
    0,
    0,
    2742,
    2743,
    1,
    0,
    0,
    0,
    2743,
    2745,
    1,
    0,
    0,
    0,
    2744,
    2746,
    5,
    49,
    0,
    0,
    2745,
    2744,
    1,
    0,
    0,
    0,
    2745,
    2746,
    1,
    0,
    0,
    0,
    2746,
    2748,
    1,
    0,
    0,
    0,
    2747,
    2749,
    7,
    22,
    0,
    0,
    2748,
    2747,
    1,
    0,
    0,
    0,
    2748,
    2749,
    1,
    0,
    0,
    0,
    2749,
    2751,
    1,
    0,
    0,
    0,
    2750,
    2752,
    5,
    40,
    0,
    0,
    2751,
    2750,
    1,
    0,
    0,
    0,
    2751,
    2752,
    1,
    0,
    0,
    0,
    2752,
    405,
    1,
    0,
    0,
    0,
    2753,
    2755,
    3,
    404,
    202,
    0,
    2754,
    2756,
    5,
    127,
    0,
    0,
    2755,
    2754,
    1,
    0,
    0,
    0,
    2755,
    2756,
    1,
    0,
    0,
    0,
    2756,
    407,
    1,
    0,
    0,
    0,
    2757,
    2758,
    5,
    56,
    0,
    0,
    2758,
    2759,
    3,
    178,
    89,
    0,
    2759,
    409,
    1,
    0,
    0,
    0,
    2760,
    2761,
    3,
    340,
    170,
    0,
    2761,
    411,
    1,
    0,
    0,
    0,
    2762,
    2765,
    3,
    408,
    204,
    0,
    2763,
    2765,
    3,
    406,
    203,
    0,
    2764,
    2762,
    1,
    0,
    0,
    0,
    2764,
    2763,
    1,
    0,
    0,
    0,
    2765,
    413,
    1,
    0,
    0,
    0,
    2766,
    2770,
    3,
    412,
    206,
    0,
    2767,
    2769,
    3,
    410,
    205,
    0,
    2768,
    2767,
    1,
    0,
    0,
    0,
    2769,
    2772,
    1,
    0,
    0,
    0,
    2770,
    2768,
    1,
    0,
    0,
    0,
    2770,
    2771,
    1,
    0,
    0,
    0,
    2771,
    415,
    1,
    0,
    0,
    0,
    2772,
    2770,
    1,
    0,
    0,
    0,
    2773,
    2775,
    3,
    418,
    209,
    0,
    2774,
    2773,
    1,
    0,
    0,
    0,
    2774,
    2775,
    1,
    0,
    0,
    0,
    2775,
    2776,
    1,
    0,
    0,
    0,
    2776,
    2777,
    3,
    420,
    210,
    0,
    2777,
    417,
    1,
    0,
    0,
    0,
    2778,
    2780,
    3,
    44,
    22,
    0,
    2779,
    2781,
    3,
    196,
    98,
    0,
    2780,
    2779,
    1,
    0,
    0,
    0,
    2780,
    2781,
    1,
    0,
    0,
    0,
    2781,
    2784,
    1,
    0,
    0,
    0,
    2782,
    2784,
    3,
    196,
    98,
    0,
    2783,
    2778,
    1,
    0,
    0,
    0,
    2783,
    2782,
    1,
    0,
    0,
    0,
    2784,
    419,
    1,
    0,
    0,
    0,
    2785,
    2787,
    3,
    318,
    159,
    0,
    2786,
    2785,
    1,
    0,
    0,
    0,
    2786,
    2787,
    1,
    0,
    0,
    0,
    2787,
    2788,
    1,
    0,
    0,
    0,
    2788,
    2789,
    3,
    422,
    211,
    0,
    2789,
    421,
    1,
    0,
    0,
    0,
    2790,
    2791,
    3,
    388,
    194,
    0,
    2791,
    423,
    1,
    0,
    0,
    0,
    2792,
    2793,
    3,
    404,
    202,
    0,
    2793,
    2794,
    3,
    416,
    208,
    0,
    2794,
    425,
    1,
    0,
    0,
    0,
    2795,
    2798,
    3,
    408,
    204,
    0,
    2796,
    2798,
    3,
    404,
    202,
    0,
    2797,
    2795,
    1,
    0,
    0,
    0,
    2797,
    2796,
    1,
    0,
    0,
    0,
    2798,
    2799,
    1,
    0,
    0,
    0,
    2799,
    2800,
    5,
    127,
    0,
    0,
    2800,
    2801,
    3,
    416,
    208,
    0,
    2801,
    427,
    1,
    0,
    0,
    0,
    2802,
    2803,
    3,
    408,
    204,
    0,
    2803,
    2804,
    3,
    184,
    92,
    0,
    2804,
    2805,
    3,
    420,
    210,
    0,
    2805,
    429,
    1,
    0,
    0,
    0,
    2806,
    2810,
    3,
    226,
    113,
    0,
    2807,
    2809,
    3,
    200,
    100,
    0,
    2808,
    2807,
    1,
    0,
    0,
    0,
    2809,
    2812,
    1,
    0,
    0,
    0,
    2810,
    2808,
    1,
    0,
    0,
    0,
    2810,
    2811,
    1,
    0,
    0,
    0,
    2811,
    2813,
    1,
    0,
    0,
    0,
    2812,
    2810,
    1,
    0,
    0,
    0,
    2813,
    2814,
    3,
    422,
    211,
    0,
    2814,
    431,
    1,
    0,
    0,
    0,
    2815,
    2824,
    3,
    426,
    213,
    0,
    2816,
    2824,
    3,
    428,
    214,
    0,
    2817,
    2824,
    3,
    448,
    224,
    0,
    2818,
    2824,
    3,
    458,
    229,
    0,
    2819,
    2824,
    3,
    516,
    258,
    0,
    2820,
    2824,
    3,
    518,
    259,
    0,
    2821,
    2824,
    3,
    882,
    441,
    0,
    2822,
    2824,
    3,
    424,
    212,
    0,
    2823,
    2815,
    1,
    0,
    0,
    0,
    2823,
    2816,
    1,
    0,
    0,
    0,
    2823,
    2817,
    1,
    0,
    0,
    0,
    2823,
    2818,
    1,
    0,
    0,
    0,
    2823,
    2819,
    1,
    0,
    0,
    0,
    2823,
    2820,
    1,
    0,
    0,
    0,
    2823,
    2821,
    1,
    0,
    0,
    0,
    2823,
    2822,
    1,
    0,
    0,
    0,
    2824,
    433,
    1,
    0,
    0,
    0,
    2825,
    2827,
    5,
    56,
    0,
    0,
    2826,
    2828,
    3,
    40,
    20,
    0,
    2827,
    2826,
    1,
    0,
    0,
    0,
    2827,
    2828,
    1,
    0,
    0,
    0,
    2828,
    2830,
    1,
    0,
    0,
    0,
    2829,
    2831,
    3,
    264,
    132,
    0,
    2830,
    2829,
    1,
    0,
    0,
    0,
    2830,
    2831,
    1,
    0,
    0,
    0,
    2831,
    2833,
    1,
    0,
    0,
    0,
    2832,
    2834,
    5,
    106,
    0,
    0,
    2833,
    2832,
    1,
    0,
    0,
    0,
    2833,
    2834,
    1,
    0,
    0,
    0,
    2834,
    2835,
    1,
    0,
    0,
    0,
    2835,
    2836,
    3,
    436,
    218,
    0,
    2836,
    435,
    1,
    0,
    0,
    0,
    2837,
    2840,
    3,
    438,
    219,
    0,
    2838,
    2840,
    3,
    440,
    220,
    0,
    2839,
    2837,
    1,
    0,
    0,
    0,
    2839,
    2838,
    1,
    0,
    0,
    0,
    2840,
    437,
    1,
    0,
    0,
    0,
    2841,
    2857,
    3,
    470,
    235,
    0,
    2842,
    2857,
    3,
    472,
    236,
    0,
    2843,
    2857,
    3,
    474,
    237,
    0,
    2844,
    2857,
    3,
    478,
    239,
    0,
    2845,
    2857,
    3,
    490,
    245,
    0,
    2846,
    2857,
    3,
    494,
    247,
    0,
    2847,
    2857,
    3,
    852,
    426,
    0,
    2848,
    2857,
    3,
    870,
    435,
    0,
    2849,
    2857,
    3,
    502,
    251,
    0,
    2850,
    2857,
    3,
    508,
    254,
    0,
    2851,
    2857,
    3,
    536,
    268,
    0,
    2852,
    2857,
    3,
    552,
    276,
    0,
    2853,
    2857,
    3,
    558,
    279,
    0,
    2854,
    2857,
    3,
    566,
    283,
    0,
    2855,
    2857,
    3,
    568,
    284,
    0,
    2856,
    2841,
    1,
    0,
    0,
    0,
    2856,
    2842,
    1,
    0,
    0,
    0,
    2856,
    2843,
    1,
    0,
    0,
    0,
    2856,
    2844,
    1,
    0,
    0,
    0,
    2856,
    2845,
    1,
    0,
    0,
    0,
    2856,
    2846,
    1,
    0,
    0,
    0,
    2856,
    2847,
    1,
    0,
    0,
    0,
    2856,
    2848,
    1,
    0,
    0,
    0,
    2856,
    2849,
    1,
    0,
    0,
    0,
    2856,
    2850,
    1,
    0,
    0,
    0,
    2856,
    2851,
    1,
    0,
    0,
    0,
    2856,
    2852,
    1,
    0,
    0,
    0,
    2856,
    2853,
    1,
    0,
    0,
    0,
    2856,
    2854,
    1,
    0,
    0,
    0,
    2856,
    2855,
    1,
    0,
    0,
    0,
    2857,
    439,
    1,
    0,
    0,
    0,
    2858,
    2875,
    3,
    592,
    296,
    0,
    2859,
    2875,
    3,
    750,
    375,
    0,
    2860,
    2875,
    3,
    714,
    357,
    0,
    2861,
    2875,
    3,
    762,
    381,
    0,
    2862,
    2875,
    3,
    796,
    398,
    0,
    2863,
    2875,
    3,
    810,
    405,
    0,
    2864,
    2875,
    3,
    814,
    407,
    0,
    2865,
    2875,
    3,
    826,
    413,
    0,
    2866,
    2875,
    3,
    830,
    415,
    0,
    2867,
    2875,
    3,
    838,
    419,
    0,
    2868,
    2875,
    3,
    866,
    433,
    0,
    2869,
    2875,
    3,
    596,
    298,
    0,
    2870,
    2875,
    3,
    718,
    359,
    0,
    2871,
    2875,
    3,
    840,
    420,
    0,
    2872,
    2875,
    3,
    764,
    382,
    0,
    2873,
    2875,
    3,
    798,
    399,
    0,
    2874,
    2858,
    1,
    0,
    0,
    0,
    2874,
    2859,
    1,
    0,
    0,
    0,
    2874,
    2860,
    1,
    0,
    0,
    0,
    2874,
    2861,
    1,
    0,
    0,
    0,
    2874,
    2862,
    1,
    0,
    0,
    0,
    2874,
    2863,
    1,
    0,
    0,
    0,
    2874,
    2864,
    1,
    0,
    0,
    0,
    2874,
    2865,
    1,
    0,
    0,
    0,
    2874,
    2866,
    1,
    0,
    0,
    0,
    2874,
    2867,
    1,
    0,
    0,
    0,
    2874,
    2868,
    1,
    0,
    0,
    0,
    2874,
    2869,
    1,
    0,
    0,
    0,
    2874,
    2870,
    1,
    0,
    0,
    0,
    2874,
    2871,
    1,
    0,
    0,
    0,
    2874,
    2872,
    1,
    0,
    0,
    0,
    2874,
    2873,
    1,
    0,
    0,
    0,
    2875,
    441,
    1,
    0,
    0,
    0,
    2876,
    2898,
    3,
    430,
    215,
    0,
    2877,
    2898,
    3,
    426,
    213,
    0,
    2878,
    2898,
    3,
    448,
    224,
    0,
    2879,
    2898,
    3,
    516,
    258,
    0,
    2880,
    2898,
    3,
    518,
    259,
    0,
    2881,
    2898,
    3,
    470,
    235,
    0,
    2882,
    2898,
    3,
    472,
    236,
    0,
    2883,
    2898,
    3,
    474,
    237,
    0,
    2884,
    2898,
    3,
    478,
    239,
    0,
    2885,
    2898,
    3,
    490,
    245,
    0,
    2886,
    2898,
    3,
    494,
    247,
    0,
    2887,
    2898,
    3,
    852,
    426,
    0,
    2888,
    2898,
    3,
    870,
    435,
    0,
    2889,
    2898,
    3,
    502,
    251,
    0,
    2890,
    2898,
    3,
    508,
    254,
    0,
    2891,
    2898,
    3,
    536,
    268,
    0,
    2892,
    2898,
    3,
    552,
    276,
    0,
    2893,
    2898,
    3,
    558,
    279,
    0,
    2894,
    2898,
    3,
    566,
    283,
    0,
    2895,
    2898,
    3,
    568,
    284,
    0,
    2896,
    2898,
    3,
    440,
    220,
    0,
    2897,
    2876,
    1,
    0,
    0,
    0,
    2897,
    2877,
    1,
    0,
    0,
    0,
    2897,
    2878,
    1,
    0,
    0,
    0,
    2897,
    2879,
    1,
    0,
    0,
    0,
    2897,
    2880,
    1,
    0,
    0,
    0,
    2897,
    2881,
    1,
    0,
    0,
    0,
    2897,
    2882,
    1,
    0,
    0,
    0,
    2897,
    2883,
    1,
    0,
    0,
    0,
    2897,
    2884,
    1,
    0,
    0,
    0,
    2897,
    2885,
    1,
    0,
    0,
    0,
    2897,
    2886,
    1,
    0,
    0,
    0,
    2897,
    2887,
    1,
    0,
    0,
    0,
    2897,
    2888,
    1,
    0,
    0,
    0,
    2897,
    2889,
    1,
    0,
    0,
    0,
    2897,
    2890,
    1,
    0,
    0,
    0,
    2897,
    2891,
    1,
    0,
    0,
    0,
    2897,
    2892,
    1,
    0,
    0,
    0,
    2897,
    2893,
    1,
    0,
    0,
    0,
    2897,
    2894,
    1,
    0,
    0,
    0,
    2897,
    2895,
    1,
    0,
    0,
    0,
    2897,
    2896,
    1,
    0,
    0,
    0,
    2898,
    443,
    1,
    0,
    0,
    0,
    2899,
    2900,
    7,
    11,
    0,
    0,
    2900,
    2905,
    3,
    168,
    84,
    0,
    2901,
    2902,
    5,
    200,
    0,
    0,
    2902,
    2904,
    3,
    168,
    84,
    0,
    2903,
    2901,
    1,
    0,
    0,
    0,
    2904,
    2907,
    1,
    0,
    0,
    0,
    2905,
    2903,
    1,
    0,
    0,
    0,
    2905,
    2906,
    1,
    0,
    0,
    0,
    2906,
    445,
    1,
    0,
    0,
    0,
    2907,
    2905,
    1,
    0,
    0,
    0,
    2908,
    2909,
    3,
    382,
    191,
    0,
    2909,
    2910,
    5,
    19,
    0,
    0,
    2910,
    2911,
    5,
    45,
    0,
    0,
    2911,
    2912,
    3,
    384,
    192,
    0,
    2912,
    447,
    1,
    0,
    0,
    0,
    2913,
    2914,
    3,
    414,
    207,
    0,
    2914,
    2915,
    5,
    19,
    0,
    0,
    2915,
    2916,
    3,
    416,
    208,
    0,
    2916,
    449,
    1,
    0,
    0,
    0,
    2917,
    2919,
    3,
    380,
    190,
    0,
    2918,
    2917,
    1,
    0,
    0,
    0,
    2919,
    2922,
    1,
    0,
    0,
    0,
    2920,
    2918,
    1,
    0,
    0,
    0,
    2920,
    2921,
    1,
    0,
    0,
    0,
    2921,
    2923,
    1,
    0,
    0,
    0,
    2922,
    2920,
    1,
    0,
    0,
    0,
    2923,
    2924,
    5,
    58,
    0,
    0,
    2924,
    2925,
    5,
    45,
    0,
    0,
    2925,
    2926,
    3,
    386,
    193,
    0,
    2926,
    2927,
    3,
    452,
    226,
    0,
    2927,
    451,
    1,
    0,
    0,
    0,
    2928,
    2939,
    5,
    205,
    0,
    0,
    2929,
    2934,
    5,
    214,
    0,
    0,
    2930,
    2933,
    3,
    368,
    184,
    0,
    2931,
    2933,
    3,
    454,
    227,
    0,
    2932,
    2930,
    1,
    0,
    0,
    0,
    2932,
    2931,
    1,
    0,
    0,
    0,
    2933,
    2936,
    1,
    0,
    0,
    0,
    2934,
    2932,
    1,
    0,
    0,
    0,
    2934,
    2935,
    1,
    0,
    0,
    0,
    2935,
    2937,
    1,
    0,
    0,
    0,
    2936,
    2934,
    1,
    0,
    0,
    0,
    2937,
    2939,
    5,
    216,
    0,
    0,
    2938,
    2928,
    1,
    0,
    0,
    0,
    2938,
    2929,
    1,
    0,
    0,
    0,
    2939,
    453,
    1,
    0,
    0,
    0,
    2940,
    2942,
    3,
    340,
    170,
    0,
    2941,
    2940,
    1,
    0,
    0,
    0,
    2942,
    2945,
    1,
    0,
    0,
    0,
    2943,
    2941,
    1,
    0,
    0,
    0,
    2943,
    2944,
    1,
    0,
    0,
    0,
    2944,
    2946,
    1,
    0,
    0,
    0,
    2945,
    2943,
    1,
    0,
    0,
    0,
    2946,
    2947,
    3,
    76,
    38,
    0,
    2947,
    2948,
    3,
    456,
    228,
    0,
    2948,
    455,
    1,
    0,
    0,
    0,
    2949,
    2951,
    5,
    58,
    0,
    0,
    2950,
    2949,
    1,
    0,
    0,
    0,
    2950,
    2951,
    1,
    0,
    0,
    0,
    2951,
    2952,
    1,
    0,
    0,
    0,
    2952,
    2953,
    3,
    416,
    208,
    0,
    2953,
    457,
    1,
    0,
    0,
    0,
    2954,
    2955,
    3,
    414,
    207,
    0,
    2955,
    2956,
    5,
    58,
    0,
    0,
    2956,
    2957,
    3,
    416,
    208,
    0,
    2957,
    459,
    1,
    0,
    0,
    0,
    2958,
    2960,
    3,
    378,
    189,
    0,
    2959,
    2958,
    1,
    0,
    0,
    0,
    2959,
    2960,
    1,
    0,
    0,
    0,
    2960,
    2963,
    1,
    0,
    0,
    0,
    2961,
    2962,
    5,
    82,
    0,
    0,
    2962,
    2964,
    3,
    466,
    233,
    0,
    2963,
    2961,
    1,
    0,
    0,
    0,
    2963,
    2964,
    1,
    0,
    0,
    0,
    2964,
    2968,
    1,
    0,
    0,
    0,
    2965,
    2967,
    3,
    380,
    190,
    0,
    2966,
    2965,
    1,
    0,
    0,
    0,
    2967,
    2970,
    1,
    0,
    0,
    0,
    2968,
    2966,
    1,
    0,
    0,
    0,
    2968,
    2969,
    1,
    0,
    0,
    0,
    2969,
    461,
    1,
    0,
    0,
    0,
    2970,
    2968,
    1,
    0,
    0,
    0,
    2971,
    2972,
    3,
    460,
    230,
    0,
    2972,
    2973,
    5,
    110,
    0,
    0,
    2973,
    2974,
    5,
    45,
    0,
    0,
    2974,
    2975,
    3,
    384,
    192,
    0,
    2975,
    463,
    1,
    0,
    0,
    0,
    2976,
    2978,
    3,
    378,
    189,
    0,
    2977,
    2976,
    1,
    0,
    0,
    0,
    2977,
    2978,
    1,
    0,
    0,
    0,
    2978,
    2979,
    1,
    0,
    0,
    0,
    2979,
    2983,
    5,
    82,
    0,
    0,
    2980,
    2982,
    3,
    380,
    190,
    0,
    2981,
    2980,
    1,
    0,
    0,
    0,
    2982,
    2985,
    1,
    0,
    0,
    0,
    2983,
    2981,
    1,
    0,
    0,
    0,
    2983,
    2984,
    1,
    0,
    0,
    0,
    2984,
    2986,
    1,
    0,
    0,
    0,
    2985,
    2983,
    1,
    0,
    0,
    0,
    2986,
    2987,
    5,
    45,
    0,
    0,
    2987,
    2988,
    3,
    384,
    192,
    0,
    2988,
    2989,
    3,
    466,
    233,
    0,
    2989,
    465,
    1,
    0,
    0,
    0,
    2990,
    2991,
    3,
    894,
    447,
    0,
    2991,
    467,
    1,
    0,
    0,
    0,
    2992,
    2994,
    3,
    406,
    203,
    0,
    2993,
    2995,
    5,
    82,
    0,
    0,
    2994,
    2993,
    1,
    0,
    0,
    0,
    2994,
    2995,
    1,
    0,
    0,
    0,
    2995,
    2997,
    1,
    0,
    0,
    0,
    2996,
    2998,
    3,
    476,
    238,
    0,
    2997,
    2996,
    1,
    0,
    0,
    0,
    2997,
    2998,
    1,
    0,
    0,
    0,
    2998,
    3002,
    1,
    0,
    0,
    0,
    2999,
    3001,
    3,
    410,
    205,
    0,
    3e3,
    2999,
    1,
    0,
    0,
    0,
    3001,
    3004,
    1,
    0,
    0,
    0,
    3002,
    3e3,
    1,
    0,
    0,
    0,
    3002,
    3003,
    1,
    0,
    0,
    0,
    3003,
    469,
    1,
    0,
    0,
    0,
    3004,
    3002,
    1,
    0,
    0,
    0,
    3005,
    3006,
    3,
    468,
    234,
    0,
    3006,
    3007,
    5,
    110,
    0,
    0,
    3007,
    3008,
    3,
    416,
    208,
    0,
    3008,
    471,
    1,
    0,
    0,
    0,
    3009,
    3010,
    3,
    406,
    203,
    0,
    3010,
    3014,
    5,
    82,
    0,
    0,
    3011,
    3013,
    3,
    410,
    205,
    0,
    3012,
    3011,
    1,
    0,
    0,
    0,
    3013,
    3016,
    1,
    0,
    0,
    0,
    3014,
    3012,
    1,
    0,
    0,
    0,
    3014,
    3015,
    1,
    0,
    0,
    0,
    3015,
    3017,
    1,
    0,
    0,
    0,
    3016,
    3014,
    1,
    0,
    0,
    0,
    3017,
    3018,
    3,
    416,
    208,
    0,
    3018,
    473,
    1,
    0,
    0,
    0,
    3019,
    3021,
    3,
    406,
    203,
    0,
    3020,
    3022,
    5,
    82,
    0,
    0,
    3021,
    3020,
    1,
    0,
    0,
    0,
    3021,
    3022,
    1,
    0,
    0,
    0,
    3022,
    3023,
    1,
    0,
    0,
    0,
    3023,
    3027,
    3,
    476,
    238,
    0,
    3024,
    3026,
    3,
    410,
    205,
    0,
    3025,
    3024,
    1,
    0,
    0,
    0,
    3026,
    3029,
    1,
    0,
    0,
    0,
    3027,
    3025,
    1,
    0,
    0,
    0,
    3027,
    3028,
    1,
    0,
    0,
    0,
    3028,
    3030,
    1,
    0,
    0,
    0,
    3029,
    3027,
    1,
    0,
    0,
    0,
    3030,
    3031,
    3,
    416,
    208,
    0,
    3031,
    475,
    1,
    0,
    0,
    0,
    3032,
    3033,
    7,
    23,
    0,
    0,
    3033,
    477,
    1,
    0,
    0,
    0,
    3034,
    3035,
    3,
    468,
    234,
    0,
    3035,
    3044,
    5,
    59,
    0,
    0,
    3036,
    3038,
    3,
    226,
    113,
    0,
    3037,
    3039,
    3,
    196,
    98,
    0,
    3038,
    3037,
    1,
    0,
    0,
    0,
    3038,
    3039,
    1,
    0,
    0,
    0,
    3039,
    3045,
    1,
    0,
    0,
    0,
    3040,
    3042,
    5,
    110,
    0,
    0,
    3041,
    3043,
    3,
    418,
    209,
    0,
    3042,
    3041,
    1,
    0,
    0,
    0,
    3042,
    3043,
    1,
    0,
    0,
    0,
    3043,
    3045,
    1,
    0,
    0,
    0,
    3044,
    3036,
    1,
    0,
    0,
    0,
    3044,
    3040,
    1,
    0,
    0,
    0,
    3045,
    3046,
    1,
    0,
    0,
    0,
    3046,
    3047,
    3,
    420,
    210,
    0,
    3047,
    479,
    1,
    0,
    0,
    0,
    3048,
    3049,
    5,
    152,
    0,
    0,
    3049,
    3050,
    3,
    482,
    241,
    0,
    3050,
    481,
    1,
    0,
    0,
    0,
    3051,
    3052,
    3,
    484,
    242,
    0,
    3052,
    483,
    1,
    0,
    0,
    0,
    3053,
    3054,
    3,
    486,
    243,
    0,
    3054,
    485,
    1,
    0,
    0,
    0,
    3055,
    3057,
    3,
    328,
    164,
    0,
    3056,
    3055,
    1,
    0,
    0,
    0,
    3056,
    3057,
    1,
    0,
    0,
    0,
    3057,
    487,
    1,
    0,
    0,
    0,
    3058,
    3059,
    3,
    460,
    230,
    0,
    3059,
    3060,
    5,
    91,
    0,
    0,
    3060,
    3061,
    5,
    45,
    0,
    0,
    3061,
    3062,
    3,
    384,
    192,
    0,
    3062,
    489,
    1,
    0,
    0,
    0,
    3063,
    3064,
    3,
    468,
    234,
    0,
    3064,
    3065,
    5,
    91,
    0,
    0,
    3065,
    3066,
    3,
    416,
    208,
    0,
    3066,
    491,
    1,
    0,
    0,
    0,
    3067,
    3068,
    3,
    460,
    230,
    0,
    3068,
    3069,
    5,
    117,
    0,
    0,
    3069,
    3070,
    5,
    45,
    0,
    0,
    3070,
    3071,
    3,
    384,
    192,
    0,
    3071,
    493,
    1,
    0,
    0,
    0,
    3072,
    3073,
    3,
    468,
    234,
    0,
    3073,
    3074,
    5,
    117,
    0,
    0,
    3074,
    3075,
    3,
    416,
    208,
    0,
    3075,
    495,
    1,
    0,
    0,
    0,
    3076,
    3077,
    3,
    382,
    191,
    0,
    3077,
    3078,
    5,
    119,
    0,
    0,
    3078,
    3079,
    5,
    45,
    0,
    0,
    3079,
    3080,
    3,
    384,
    192,
    0,
    3080,
    3081,
    3,
    498,
    249,
    0,
    3081,
    497,
    1,
    0,
    0,
    0,
    3082,
    3083,
    3,
    500,
    250,
    0,
    3083,
    499,
    1,
    0,
    0,
    0,
    3084,
    3085,
    3,
    902,
    451,
    0,
    3085,
    501,
    1,
    0,
    0,
    0,
    3086,
    3087,
    3,
    468,
    234,
    0,
    3087,
    3088,
    5,
    119,
    0,
    0,
    3088,
    3089,
    3,
    416,
    208,
    0,
    3089,
    503,
    1,
    0,
    0,
    0,
    3090,
    3091,
    5,
    217,
    0,
    0,
    3091,
    3092,
    3,
    88,
    44,
    0,
    3092,
    505,
    1,
    0,
    0,
    0,
    3093,
    3094,
    3,
    460,
    230,
    0,
    3094,
    3095,
    5,
    37,
    0,
    0,
    3095,
    3096,
    5,
    45,
    0,
    0,
    3096,
    3097,
    3,
    384,
    192,
    0,
    3097,
    507,
    1,
    0,
    0,
    0,
    3098,
    3112,
    3,
    468,
    234,
    0,
    3099,
    3101,
    5,
    37,
    0,
    0,
    3100,
    3102,
    3,
    418,
    209,
    0,
    3101,
    3100,
    1,
    0,
    0,
    0,
    3101,
    3102,
    1,
    0,
    0,
    0,
    3102,
    3104,
    1,
    0,
    0,
    0,
    3103,
    3105,
    3,
    318,
    159,
    0,
    3104,
    3103,
    1,
    0,
    0,
    0,
    3104,
    3105,
    1,
    0,
    0,
    0,
    3105,
    3108,
    1,
    0,
    0,
    0,
    3106,
    3107,
    5,
    36,
    0,
    0,
    3107,
    3109,
    3,
    510,
    255,
    0,
    3108,
    3106,
    1,
    0,
    0,
    0,
    3108,
    3109,
    1,
    0,
    0,
    0,
    3109,
    3113,
    1,
    0,
    0,
    0,
    3110,
    3111,
    5,
    36,
    0,
    0,
    3111,
    3113,
    3,
    510,
    255,
    0,
    3112,
    3099,
    1,
    0,
    0,
    0,
    3112,
    3110,
    1,
    0,
    0,
    0,
    3113,
    3114,
    1,
    0,
    0,
    0,
    3114,
    3115,
    3,
    422,
    211,
    0,
    3115,
    509,
    1,
    0,
    0,
    0,
    3116,
    3119,
    3,
    512,
    256,
    0,
    3117,
    3119,
    3,
    514,
    257,
    0,
    3118,
    3116,
    1,
    0,
    0,
    0,
    3118,
    3117,
    1,
    0,
    0,
    0,
    3119,
    511,
    1,
    0,
    0,
    0,
    3120,
    3121,
    3,
    260,
    130,
    0,
    3121,
    3122,
    5,
    154,
    0,
    0,
    3122,
    3123,
    3,
    260,
    130,
    0,
    3123,
    513,
    1,
    0,
    0,
    0,
    3124,
    3125,
    5,
    196,
    0,
    0,
    3125,
    3126,
    3,
    260,
    130,
    0,
    3126,
    3127,
    5,
    200,
    0,
    0,
    3127,
    3132,
    3,
    260,
    130,
    0,
    3128,
    3129,
    5,
    200,
    0,
    0,
    3129,
    3131,
    3,
    260,
    130,
    0,
    3130,
    3128,
    1,
    0,
    0,
    0,
    3131,
    3134,
    1,
    0,
    0,
    0,
    3132,
    3130,
    1,
    0,
    0,
    0,
    3132,
    3133,
    1,
    0,
    0,
    0,
    3133,
    3135,
    1,
    0,
    0,
    0,
    3134,
    3132,
    1,
    0,
    0,
    0,
    3135,
    3136,
    5,
    197,
    0,
    0,
    3136,
    515,
    1,
    0,
    0,
    0,
    3137,
    3142,
    3,
    414,
    207,
    0,
    3138,
    3140,
    5,
    22,
    0,
    0,
    3139,
    3141,
    3,
    418,
    209,
    0,
    3140,
    3139,
    1,
    0,
    0,
    0,
    3140,
    3141,
    1,
    0,
    0,
    0,
    3141,
    3143,
    1,
    0,
    0,
    0,
    3142,
    3138,
    1,
    0,
    0,
    0,
    3142,
    3143,
    1,
    0,
    0,
    0,
    3143,
    3144,
    1,
    0,
    0,
    0,
    3144,
    3145,
    5,
    21,
    0,
    0,
    3145,
    3146,
    3,
    260,
    130,
    0,
    3146,
    3147,
    5,
    207,
    0,
    0,
    3147,
    3148,
    3,
    260,
    130,
    0,
    3148,
    3149,
    3,
    422,
    211,
    0,
    3149,
    517,
    1,
    0,
    0,
    0,
    3150,
    3155,
    3,
    414,
    207,
    0,
    3151,
    3153,
    5,
    150,
    0,
    0,
    3152,
    3154,
    3,
    418,
    209,
    0,
    3153,
    3152,
    1,
    0,
    0,
    0,
    3153,
    3154,
    1,
    0,
    0,
    0,
    3154,
    3156,
    1,
    0,
    0,
    0,
    3155,
    3151,
    1,
    0,
    0,
    0,
    3155,
    3156,
    1,
    0,
    0,
    0,
    3156,
    3157,
    1,
    0,
    0,
    0,
    3157,
    3158,
    5,
    69,
    0,
    0,
    3158,
    3159,
    3,
    260,
    130,
    0,
    3159,
    3160,
    5,
    152,
    0,
    0,
    3160,
    3161,
    3,
    260,
    130,
    0,
    3161,
    3162,
    3,
    422,
    211,
    0,
    3162,
    519,
    1,
    0,
    0,
    0,
    3163,
    3164,
    3,
    460,
    230,
    0,
    3164,
    3165,
    5,
    85,
    0,
    0,
    3165,
    3166,
    5,
    45,
    0,
    0,
    3166,
    3167,
    3,
    386,
    193,
    0,
    3167,
    3168,
    3,
    522,
    261,
    0,
    3168,
    521,
    1,
    0,
    0,
    0,
    3169,
    3179,
    5,
    205,
    0,
    0,
    3170,
    3174,
    5,
    214,
    0,
    0,
    3171,
    3173,
    3,
    524,
    262,
    0,
    3172,
    3171,
    1,
    0,
    0,
    0,
    3173,
    3176,
    1,
    0,
    0,
    0,
    3174,
    3172,
    1,
    0,
    0,
    0,
    3174,
    3175,
    1,
    0,
    0,
    0,
    3175,
    3177,
    1,
    0,
    0,
    0,
    3176,
    3174,
    1,
    0,
    0,
    0,
    3177,
    3179,
    5,
    216,
    0,
    0,
    3178,
    3169,
    1,
    0,
    0,
    0,
    3178,
    3170,
    1,
    0,
    0,
    0,
    3179,
    523,
    1,
    0,
    0,
    0,
    3180,
    3190,
    3,
    394,
    197,
    0,
    3181,
    3190,
    3,
    396,
    198,
    0,
    3182,
    3190,
    3,
    526,
    263,
    0,
    3183,
    3185,
    3,
    480,
    240,
    0,
    3184,
    3183,
    1,
    0,
    0,
    0,
    3184,
    3185,
    1,
    0,
    0,
    0,
    3185,
    3186,
    1,
    0,
    0,
    0,
    3186,
    3190,
    3,
    530,
    265,
    0,
    3187,
    3190,
    3,
    86,
    43,
    0,
    3188,
    3190,
    3,
    90,
    45,
    0,
    3189,
    3180,
    1,
    0,
    0,
    0,
    3189,
    3181,
    1,
    0,
    0,
    0,
    3189,
    3182,
    1,
    0,
    0,
    0,
    3189,
    3184,
    1,
    0,
    0,
    0,
    3189,
    3187,
    1,
    0,
    0,
    0,
    3189,
    3188,
    1,
    0,
    0,
    0,
    3190,
    525,
    1,
    0,
    0,
    0,
    3191,
    3192,
    3,
    76,
    38,
    0,
    3192,
    3193,
    3,
    528,
    264,
    0,
    3193,
    527,
    1,
    0,
    0,
    0,
    3194,
    3200,
    3,
    426,
    213,
    0,
    3195,
    3200,
    3,
    448,
    224,
    0,
    3196,
    3200,
    3,
    458,
    229,
    0,
    3197,
    3200,
    3,
    516,
    258,
    0,
    3198,
    3200,
    3,
    518,
    259,
    0,
    3199,
    3194,
    1,
    0,
    0,
    0,
    3199,
    3195,
    1,
    0,
    0,
    0,
    3199,
    3196,
    1,
    0,
    0,
    0,
    3199,
    3197,
    1,
    0,
    0,
    0,
    3199,
    3198,
    1,
    0,
    0,
    0,
    3200,
    529,
    1,
    0,
    0,
    0,
    3201,
    3202,
    3,
    76,
    38,
    0,
    3202,
    3203,
    3,
    532,
    266,
    0,
    3203,
    531,
    1,
    0,
    0,
    0,
    3204,
    3209,
    3,
    534,
    267,
    0,
    3205,
    3209,
    3,
    434,
    217,
    0,
    3206,
    3209,
    3,
    438,
    219,
    0,
    3207,
    3209,
    3,
    440,
    220,
    0,
    3208,
    3204,
    1,
    0,
    0,
    0,
    3208,
    3205,
    1,
    0,
    0,
    0,
    3208,
    3206,
    1,
    0,
    0,
    0,
    3208,
    3207,
    1,
    0,
    0,
    0,
    3209,
    533,
    1,
    0,
    0,
    0,
    3210,
    3211,
    5,
    56,
    0,
    0,
    3211,
    3212,
    3,
    416,
    208,
    0,
    3212,
    535,
    1,
    0,
    0,
    0,
    3213,
    3214,
    3,
    468,
    234,
    0,
    3214,
    3215,
    5,
    85,
    0,
    0,
    3215,
    3216,
    3,
    538,
    269,
    0,
    3216,
    3217,
    3,
    522,
    261,
    0,
    3217,
    537,
    1,
    0,
    0,
    0,
    3218,
    3220,
    3,
    418,
    209,
    0,
    3219,
    3218,
    1,
    0,
    0,
    0,
    3219,
    3220,
    1,
    0,
    0,
    0,
    3220,
    3222,
    1,
    0,
    0,
    0,
    3221,
    3223,
    3,
    318,
    159,
    0,
    3222,
    3221,
    1,
    0,
    0,
    0,
    3222,
    3223,
    1,
    0,
    0,
    0,
    3223,
    3226,
    1,
    0,
    0,
    0,
    3224,
    3225,
    5,
    36,
    0,
    0,
    3225,
    3227,
    3,
    540,
    270,
    0,
    3226,
    3224,
    1,
    0,
    0,
    0,
    3226,
    3227,
    1,
    0,
    0,
    0,
    3227,
    3230,
    1,
    0,
    0,
    0,
    3228,
    3230,
    3,
    540,
    270,
    0,
    3229,
    3219,
    1,
    0,
    0,
    0,
    3229,
    3228,
    1,
    0,
    0,
    0,
    3230,
    539,
    1,
    0,
    0,
    0,
    3231,
    3234,
    3,
    542,
    271,
    0,
    3232,
    3234,
    3,
    544,
    272,
    0,
    3233,
    3231,
    1,
    0,
    0,
    0,
    3233,
    3232,
    1,
    0,
    0,
    0,
    3234,
    541,
    1,
    0,
    0,
    0,
    3235,
    3236,
    3,
    546,
    273,
    0,
    3236,
    3237,
    5,
    154,
    0,
    0,
    3237,
    3238,
    3,
    546,
    273,
    0,
    3238,
    543,
    1,
    0,
    0,
    0,
    3239,
    3240,
    5,
    196,
    0,
    0,
    3240,
    3241,
    3,
    546,
    273,
    0,
    3241,
    3242,
    5,
    200,
    0,
    0,
    3242,
    3247,
    3,
    546,
    273,
    0,
    3243,
    3244,
    5,
    200,
    0,
    0,
    3244,
    3246,
    3,
    546,
    273,
    0,
    3245,
    3243,
    1,
    0,
    0,
    0,
    3246,
    3249,
    1,
    0,
    0,
    0,
    3247,
    3245,
    1,
    0,
    0,
    0,
    3247,
    3248,
    1,
    0,
    0,
    0,
    3248,
    3250,
    1,
    0,
    0,
    0,
    3249,
    3247,
    1,
    0,
    0,
    0,
    3250,
    3251,
    5,
    197,
    0,
    0,
    3251,
    545,
    1,
    0,
    0,
    0,
    3252,
    3253,
    3,
    548,
    274,
    0,
    3253,
    547,
    1,
    0,
    0,
    0,
    3254,
    3256,
    3,
    264,
    132,
    0,
    3255,
    3254,
    1,
    0,
    0,
    0,
    3255,
    3256,
    1,
    0,
    0,
    0,
    3256,
    3260,
    1,
    0,
    0,
    0,
    3257,
    3258,
    3,
    40,
    20,
    0,
    3258,
    3259,
    7,
    17,
    0,
    0,
    3259,
    3261,
    1,
    0,
    0,
    0,
    3260,
    3257,
    1,
    0,
    0,
    0,
    3260,
    3261,
    1,
    0,
    0,
    0,
    3261,
    3262,
    1,
    0,
    0,
    0,
    3262,
    3263,
    3,
    226,
    113,
    0,
    3263,
    549,
    1,
    0,
    0,
    0,
    3264,
    3265,
    3,
    460,
    230,
    0,
    3265,
    3266,
    5,
    10,
    0,
    0,
    3266,
    3267,
    5,
    45,
    0,
    0,
    3267,
    3268,
    3,
    384,
    192,
    0,
    3268,
    551,
    1,
    0,
    0,
    0,
    3269,
    3270,
    3,
    468,
    234,
    0,
    3270,
    3271,
    3,
    554,
    277,
    0,
    3271,
    3272,
    3,
    422,
    211,
    0,
    3272,
    553,
    1,
    0,
    0,
    0,
    3273,
    3275,
    5,
    10,
    0,
    0,
    3274,
    3276,
    3,
    418,
    209,
    0,
    3275,
    3274,
    1,
    0,
    0,
    0,
    3275,
    3276,
    1,
    0,
    0,
    0,
    3276,
    3279,
    1,
    0,
    0,
    0,
    3277,
    3278,
    5,
    9,
    0,
    0,
    3278,
    3280,
    3,
    510,
    255,
    0,
    3279,
    3277,
    1,
    0,
    0,
    0,
    3279,
    3280,
    1,
    0,
    0,
    0,
    3280,
    3284,
    1,
    0,
    0,
    0,
    3281,
    3282,
    5,
    9,
    0,
    0,
    3282,
    3284,
    3,
    510,
    255,
    0,
    3283,
    3273,
    1,
    0,
    0,
    0,
    3283,
    3281,
    1,
    0,
    0,
    0,
    3284,
    555,
    1,
    0,
    0,
    0,
    3285,
    3286,
    3,
    460,
    230,
    0,
    3286,
    3287,
    5,
    70,
    0,
    0,
    3287,
    3288,
    5,
    45,
    0,
    0,
    3288,
    3289,
    3,
    384,
    192,
    0,
    3289,
    557,
    1,
    0,
    0,
    0,
    3290,
    3291,
    3,
    468,
    234,
    0,
    3291,
    3292,
    5,
    99,
    0,
    0,
    3292,
    3293,
    3,
    560,
    280,
    0,
    3293,
    3294,
    3,
    388,
    194,
    0,
    3294,
    559,
    1,
    0,
    0,
    0,
    3295,
    3297,
    3,
    418,
    209,
    0,
    3296,
    3295,
    1,
    0,
    0,
    0,
    3296,
    3297,
    1,
    0,
    0,
    0,
    3297,
    3299,
    1,
    0,
    0,
    0,
    3298,
    3300,
    3,
    318,
    159,
    0,
    3299,
    3298,
    1,
    0,
    0,
    0,
    3299,
    3300,
    1,
    0,
    0,
    0,
    3300,
    3303,
    1,
    0,
    0,
    0,
    3301,
    3302,
    5,
    111,
    0,
    0,
    3302,
    3304,
    3,
    570,
    285,
    0,
    3303,
    3301,
    1,
    0,
    0,
    0,
    3303,
    3304,
    1,
    0,
    0,
    0,
    3304,
    3310,
    1,
    0,
    0,
    0,
    3305,
    3306,
    5,
    74,
    0,
    0,
    3306,
    3307,
    3,
    562,
    281,
    0,
    3307,
    3308,
    5,
    154,
    0,
    0,
    3308,
    3309,
    3,
    562,
    281,
    0,
    3309,
    3311,
    1,
    0,
    0,
    0,
    3310,
    3305,
    1,
    0,
    0,
    0,
    3310,
    3311,
    1,
    0,
    0,
    0,
    3311,
    3317,
    1,
    0,
    0,
    0,
    3312,
    3313,
    3,
    562,
    281,
    0,
    3313,
    3314,
    5,
    154,
    0,
    0,
    3314,
    3315,
    3,
    562,
    281,
    0,
    3315,
    3317,
    1,
    0,
    0,
    0,
    3316,
    3296,
    1,
    0,
    0,
    0,
    3316,
    3312,
    1,
    0,
    0,
    0,
    3317,
    561,
    1,
    0,
    0,
    0,
    3318,
    3319,
    3,
    564,
    282,
    0,
    3319,
    563,
    1,
    0,
    0,
    0,
    3320,
    3321,
    3,
    226,
    113,
    0,
    3321,
    565,
    1,
    0,
    0,
    0,
    3322,
    3323,
    3,
    468,
    234,
    0,
    3323,
    3324,
    5,
    70,
    0,
    0,
    3324,
    3325,
    3,
    306,
    153,
    0,
    3325,
    3326,
    3,
    388,
    194,
    0,
    3326,
    567,
    1,
    0,
    0,
    0,
    3327,
    3328,
    3,
    468,
    234,
    0,
    3328,
    3329,
    5,
    150,
    0,
    0,
    3329,
    3330,
    5,
    70,
    0,
    0,
    3330,
    3331,
    3,
    306,
    153,
    0,
    3331,
    3332,
    3,
    388,
    194,
    0,
    3332,
    569,
    1,
    0,
    0,
    0,
    3333,
    3334,
    3,
    572,
    286,
    0,
    3334,
    571,
    1,
    0,
    0,
    0,
    3335,
    3336,
    3,
    310,
    155,
    0,
    3336,
    573,
    1,
    0,
    0,
    0,
    3337,
    3338,
    3,
    460,
    230,
    0,
    3338,
    3339,
    5,
    4,
    0,
    0,
    3339,
    3340,
    5,
    45,
    0,
    0,
    3340,
    3341,
    3,
    386,
    193,
    0,
    3341,
    3342,
    3,
    576,
    288,
    0,
    3342,
    575,
    1,
    0,
    0,
    0,
    3343,
    3353,
    5,
    205,
    0,
    0,
    3344,
    3348,
    5,
    214,
    0,
    0,
    3345,
    3347,
    3,
    578,
    289,
    0,
    3346,
    3345,
    1,
    0,
    0,
    0,
    3347,
    3350,
    1,
    0,
    0,
    0,
    3348,
    3346,
    1,
    0,
    0,
    0,
    3348,
    3349,
    1,
    0,
    0,
    0,
    3349,
    3351,
    1,
    0,
    0,
    0,
    3350,
    3348,
    1,
    0,
    0,
    0,
    3351,
    3353,
    5,
    216,
    0,
    0,
    3352,
    3343,
    1,
    0,
    0,
    0,
    3352,
    3344,
    1,
    0,
    0,
    0,
    3353,
    577,
    1,
    0,
    0,
    0,
    3354,
    3374,
    3,
    580,
    290,
    0,
    3355,
    3359,
    3,
    584,
    292,
    0,
    3356,
    3358,
    3,
    588,
    294,
    0,
    3357,
    3356,
    1,
    0,
    0,
    0,
    3358,
    3361,
    1,
    0,
    0,
    0,
    3359,
    3357,
    1,
    0,
    0,
    0,
    3359,
    3360,
    1,
    0,
    0,
    0,
    3360,
    3374,
    1,
    0,
    0,
    0,
    3361,
    3359,
    1,
    0,
    0,
    0,
    3362,
    3364,
    3,
    480,
    240,
    0,
    3363,
    3362,
    1,
    0,
    0,
    0,
    3363,
    3364,
    1,
    0,
    0,
    0,
    3364,
    3365,
    1,
    0,
    0,
    0,
    3365,
    3369,
    3,
    582,
    291,
    0,
    3366,
    3368,
    3,
    588,
    294,
    0,
    3367,
    3366,
    1,
    0,
    0,
    0,
    3368,
    3371,
    1,
    0,
    0,
    0,
    3369,
    3367,
    1,
    0,
    0,
    0,
    3369,
    3370,
    1,
    0,
    0,
    0,
    3370,
    3374,
    1,
    0,
    0,
    0,
    3371,
    3369,
    1,
    0,
    0,
    0,
    3372,
    3374,
    3,
    590,
    295,
    0,
    3373,
    3354,
    1,
    0,
    0,
    0,
    3373,
    3355,
    1,
    0,
    0,
    0,
    3373,
    3363,
    1,
    0,
    0,
    0,
    3373,
    3372,
    1,
    0,
    0,
    0,
    3374,
    579,
    1,
    0,
    0,
    0,
    3375,
    3385,
    3,
    90,
    45,
    0,
    3376,
    3385,
    3,
    86,
    43,
    0,
    3377,
    3385,
    3,
    394,
    197,
    0,
    3378,
    3385,
    3,
    396,
    198,
    0,
    3379,
    3385,
    3,
    398,
    199,
    0,
    3380,
    3382,
    3,
    480,
    240,
    0,
    3381,
    3380,
    1,
    0,
    0,
    0,
    3381,
    3382,
    1,
    0,
    0,
    0,
    3382,
    3383,
    1,
    0,
    0,
    0,
    3383,
    3385,
    3,
    400,
    200,
    0,
    3384,
    3375,
    1,
    0,
    0,
    0,
    3384,
    3376,
    1,
    0,
    0,
    0,
    3384,
    3377,
    1,
    0,
    0,
    0,
    3384,
    3378,
    1,
    0,
    0,
    0,
    3384,
    3379,
    1,
    0,
    0,
    0,
    3384,
    3381,
    1,
    0,
    0,
    0,
    3385,
    581,
    1,
    0,
    0,
    0,
    3386,
    3389,
    3,
    586,
    293,
    0,
    3387,
    3389,
    3,
    402,
    201,
    0,
    3388,
    3386,
    1,
    0,
    0,
    0,
    3388,
    3387,
    1,
    0,
    0,
    0,
    3389,
    583,
    1,
    0,
    0,
    0,
    3390,
    3391,
    3,
    76,
    38,
    0,
    3391,
    3392,
    5,
    69,
    0,
    0,
    3392,
    3393,
    3,
    88,
    44,
    0,
    3393,
    3394,
    3,
    46,
    23,
    0,
    3394,
    585,
    1,
    0,
    0,
    0,
    3395,
    3396,
    3,
    76,
    38,
    0,
    3396,
    3397,
    3,
    600,
    300,
    0,
    3397,
    587,
    1,
    0,
    0,
    0,
    3398,
    3399,
    3,
    76,
    38,
    0,
    3399,
    3400,
    3,
    676,
    338,
    0,
    3400,
    589,
    1,
    0,
    0,
    0,
    3401,
    3402,
    3,
    76,
    38,
    0,
    3402,
    3403,
    3,
    684,
    342,
    0,
    3403,
    591,
    1,
    0,
    0,
    0,
    3404,
    3405,
    3,
    468,
    234,
    0,
    3405,
    3406,
    5,
    4,
    0,
    0,
    3406,
    3407,
    3,
    594,
    297,
    0,
    3407,
    3408,
    3,
    576,
    288,
    0,
    3408,
    593,
    1,
    0,
    0,
    0,
    3409,
    3411,
    3,
    418,
    209,
    0,
    3410,
    3409,
    1,
    0,
    0,
    0,
    3410,
    3411,
    1,
    0,
    0,
    0,
    3411,
    3413,
    1,
    0,
    0,
    0,
    3412,
    3414,
    3,
    318,
    159,
    0,
    3413,
    3412,
    1,
    0,
    0,
    0,
    3413,
    3414,
    1,
    0,
    0,
    0,
    3414,
    595,
    1,
    0,
    0,
    0,
    3415,
    3416,
    3,
    468,
    234,
    0,
    3416,
    3417,
    5,
    118,
    0,
    0,
    3417,
    3418,
    3,
    598,
    299,
    0,
    3418,
    3419,
    3,
    576,
    288,
    0,
    3419,
    597,
    1,
    0,
    0,
    0,
    3420,
    3422,
    3,
    226,
    113,
    0,
    3421,
    3423,
    3,
    196,
    98,
    0,
    3422,
    3421,
    1,
    0,
    0,
    0,
    3422,
    3423,
    1,
    0,
    0,
    0,
    3423,
    3429,
    1,
    0,
    0,
    0,
    3424,
    3426,
    5,
    4,
    0,
    0,
    3425,
    3427,
    3,
    418,
    209,
    0,
    3426,
    3425,
    1,
    0,
    0,
    0,
    3426,
    3427,
    1,
    0,
    0,
    0,
    3427,
    3429,
    1,
    0,
    0,
    0,
    3428,
    3420,
    1,
    0,
    0,
    0,
    3428,
    3424,
    1,
    0,
    0,
    0,
    3429,
    3431,
    1,
    0,
    0,
    0,
    3430,
    3432,
    3,
    318,
    159,
    0,
    3431,
    3430,
    1,
    0,
    0,
    0,
    3431,
    3432,
    1,
    0,
    0,
    0,
    3432,
    599,
    1,
    0,
    0,
    0,
    3433,
    3442,
    3,
    606,
    303,
    0,
    3434,
    3442,
    3,
    634,
    317,
    0,
    3435,
    3442,
    3,
    618,
    309,
    0,
    3436,
    3442,
    3,
    648,
    324,
    0,
    3437,
    3442,
    3,
    658,
    329,
    0,
    3438,
    3442,
    3,
    660,
    330,
    0,
    3439,
    3442,
    3,
    670,
    335,
    0,
    3440,
    3442,
    3,
    672,
    336,
    0,
    3441,
    3433,
    1,
    0,
    0,
    0,
    3441,
    3434,
    1,
    0,
    0,
    0,
    3441,
    3435,
    1,
    0,
    0,
    0,
    3441,
    3436,
    1,
    0,
    0,
    0,
    3441,
    3437,
    1,
    0,
    0,
    0,
    3441,
    3438,
    1,
    0,
    0,
    0,
    3441,
    3439,
    1,
    0,
    0,
    0,
    3441,
    3440,
    1,
    0,
    0,
    0,
    3442,
    601,
    1,
    0,
    0,
    0,
    3443,
    3445,
    5,
    4,
    0,
    0,
    3444,
    3446,
    3,
    418,
    209,
    0,
    3445,
    3444,
    1,
    0,
    0,
    0,
    3445,
    3446,
    1,
    0,
    0,
    0,
    3446,
    603,
    1,
    0,
    0,
    0,
    3447,
    3449,
    3,
    468,
    234,
    0,
    3448,
    3450,
    3,
    602,
    301,
    0,
    3449,
    3448,
    1,
    0,
    0,
    0,
    3449,
    3450,
    1,
    0,
    0,
    0,
    3450,
    605,
    1,
    0,
    0,
    0,
    3451,
    3456,
    3,
    610,
    305,
    0,
    3452,
    3456,
    3,
    612,
    306,
    0,
    3453,
    3456,
    3,
    614,
    307,
    0,
    3454,
    3456,
    3,
    616,
    308,
    0,
    3455,
    3451,
    1,
    0,
    0,
    0,
    3455,
    3452,
    1,
    0,
    0,
    0,
    3455,
    3453,
    1,
    0,
    0,
    0,
    3455,
    3454,
    1,
    0,
    0,
    0,
    3456,
    607,
    1,
    0,
    0,
    0,
    3457,
    3459,
    3,
    404,
    202,
    0,
    3458,
    3460,
    5,
    82,
    0,
    0,
    3459,
    3458,
    1,
    0,
    0,
    0,
    3459,
    3460,
    1,
    0,
    0,
    0,
    3460,
    3462,
    1,
    0,
    0,
    0,
    3461,
    3463,
    3,
    476,
    238,
    0,
    3462,
    3461,
    1,
    0,
    0,
    0,
    3462,
    3463,
    1,
    0,
    0,
    0,
    3463,
    3467,
    1,
    0,
    0,
    0,
    3464,
    3466,
    3,
    410,
    205,
    0,
    3465,
    3464,
    1,
    0,
    0,
    0,
    3466,
    3469,
    1,
    0,
    0,
    0,
    3467,
    3465,
    1,
    0,
    0,
    0,
    3467,
    3468,
    1,
    0,
    0,
    0,
    3468,
    609,
    1,
    0,
    0,
    0,
    3469,
    3467,
    1,
    0,
    0,
    0,
    3470,
    3471,
    3,
    608,
    304,
    0,
    3471,
    3473,
    5,
    98,
    0,
    0,
    3472,
    3474,
    3,
    418,
    209,
    0,
    3473,
    3472,
    1,
    0,
    0,
    0,
    3473,
    3474,
    1,
    0,
    0,
    0,
    3474,
    3475,
    1,
    0,
    0,
    0,
    3475,
    3476,
    3,
    576,
    288,
    0,
    3476,
    611,
    1,
    0,
    0,
    0,
    3477,
    3478,
    3,
    608,
    304,
    0,
    3478,
    3480,
    5,
    44,
    0,
    0,
    3479,
    3481,
    3,
    418,
    209,
    0,
    3480,
    3479,
    1,
    0,
    0,
    0,
    3480,
    3481,
    1,
    0,
    0,
    0,
    3481,
    3482,
    1,
    0,
    0,
    0,
    3482,
    3483,
    3,
    576,
    288,
    0,
    3483,
    613,
    1,
    0,
    0,
    0,
    3484,
    3485,
    3,
    608,
    304,
    0,
    3485,
    3487,
    5,
    92,
    0,
    0,
    3486,
    3488,
    3,
    418,
    209,
    0,
    3487,
    3486,
    1,
    0,
    0,
    0,
    3487,
    3488,
    1,
    0,
    0,
    0,
    3488,
    3489,
    1,
    0,
    0,
    0,
    3489,
    3490,
    3,
    576,
    288,
    0,
    3490,
    615,
    1,
    0,
    0,
    0,
    3491,
    3492,
    3,
    608,
    304,
    0,
    3492,
    3494,
    5,
    72,
    0,
    0,
    3493,
    3495,
    3,
    418,
    209,
    0,
    3494,
    3493,
    1,
    0,
    0,
    0,
    3494,
    3495,
    1,
    0,
    0,
    0,
    3495,
    3496,
    1,
    0,
    0,
    0,
    3496,
    3497,
    3,
    576,
    288,
    0,
    3497,
    617,
    1,
    0,
    0,
    0,
    3498,
    3499,
    3,
    468,
    234,
    0,
    3499,
    3500,
    3,
    620,
    310,
    0,
    3500,
    3501,
    3,
    576,
    288,
    0,
    3501,
    619,
    1,
    0,
    0,
    0,
    3502,
    3504,
    3,
    602,
    301,
    0,
    3503,
    3502,
    1,
    0,
    0,
    0,
    3503,
    3504,
    1,
    0,
    0,
    0,
    3504,
    3505,
    1,
    0,
    0,
    0,
    3505,
    3506,
    5,
    3,
    0,
    0,
    3506,
    3507,
    3,
    622,
    311,
    0,
    3507,
    621,
    1,
    0,
    0,
    0,
    3508,
    3511,
    3,
    624,
    312,
    0,
    3509,
    3510,
    5,
    168,
    0,
    0,
    3510,
    3512,
    3,
    640,
    320,
    0,
    3511,
    3509,
    1,
    0,
    0,
    0,
    3511,
    3512,
    1,
    0,
    0,
    0,
    3512,
    623,
    1,
    0,
    0,
    0,
    3513,
    3514,
    3,
    626,
    313,
    0,
    3514,
    625,
    1,
    0,
    0,
    0,
    3515,
    3524,
    3,
    310,
    155,
    0,
    3516,
    3518,
    3,
    44,
    22,
    0,
    3517,
    3516,
    1,
    0,
    0,
    0,
    3517,
    3518,
    1,
    0,
    0,
    0,
    3518,
    3520,
    1,
    0,
    0,
    0,
    3519,
    3521,
    3,
    312,
    156,
    0,
    3520,
    3519,
    1,
    0,
    0,
    0,
    3520,
    3521,
    1,
    0,
    0,
    0,
    3521,
    3522,
    1,
    0,
    0,
    0,
    3522,
    3524,
    3,
    628,
    314,
    0,
    3523,
    3515,
    1,
    0,
    0,
    0,
    3523,
    3517,
    1,
    0,
    0,
    0,
    3524,
    627,
    1,
    0,
    0,
    0,
    3525,
    3526,
    3,
    630,
    315,
    0,
    3526,
    629,
    1,
    0,
    0,
    0,
    3527,
    3528,
    3,
    632,
    316,
    0,
    3528,
    631,
    1,
    0,
    0,
    0,
    3529,
    3530,
    7,
    24,
    0,
    0,
    3530,
    3534,
    3,
    36,
    18,
    0,
    3531,
    3532,
    5,
    171,
    0,
    0,
    3532,
    3534,
    3,
    38,
    19,
    0,
    3533,
    3529,
    1,
    0,
    0,
    0,
    3533,
    3531,
    1,
    0,
    0,
    0,
    3534,
    633,
    1,
    0,
    0,
    0,
    3535,
    3538,
    3,
    468,
    234,
    0,
    3536,
    3539,
    3,
    602,
    301,
    0,
    3537,
    3539,
    3,
    594,
    297,
    0,
    3538,
    3536,
    1,
    0,
    0,
    0,
    3538,
    3537,
    1,
    0,
    0,
    0,
    3539,
    3540,
    1,
    0,
    0,
    0,
    3540,
    3549,
    5,
    136,
    0,
    0,
    3541,
    3543,
    3,
    640,
    320,
    0,
    3542,
    3544,
    3,
    638,
    319,
    0,
    3543,
    3542,
    1,
    0,
    0,
    0,
    3543,
    3544,
    1,
    0,
    0,
    0,
    3544,
    3550,
    1,
    0,
    0,
    0,
    3545,
    3547,
    3,
    646,
    323,
    0,
    3546,
    3548,
    3,
    638,
    319,
    0,
    3547,
    3546,
    1,
    0,
    0,
    0,
    3547,
    3548,
    1,
    0,
    0,
    0,
    3548,
    3550,
    1,
    0,
    0,
    0,
    3549,
    3541,
    1,
    0,
    0,
    0,
    3549,
    3545,
    1,
    0,
    0,
    0,
    3550,
    3551,
    1,
    0,
    0,
    0,
    3551,
    3552,
    3,
    576,
    288,
    0,
    3552,
    635,
    1,
    0,
    0,
    0,
    3553,
    3555,
    3,
    602,
    301,
    0,
    3554,
    3553,
    1,
    0,
    0,
    0,
    3554,
    3555,
    1,
    0,
    0,
    0,
    3555,
    3556,
    1,
    0,
    0,
    0,
    3556,
    3557,
    5,
    136,
    0,
    0,
    3557,
    3559,
    3,
    640,
    320,
    0,
    3558,
    3560,
    3,
    638,
    319,
    0,
    3559,
    3558,
    1,
    0,
    0,
    0,
    3559,
    3560,
    1,
    0,
    0,
    0,
    3560,
    637,
    1,
    0,
    0,
    0,
    3561,
    3562,
    5,
    168,
    0,
    0,
    3562,
    3565,
    3,
    640,
    320,
    0,
    3563,
    3564,
    5,
    154,
    0,
    0,
    3564,
    3566,
    3,
    640,
    320,
    0,
    3565,
    3563,
    1,
    0,
    0,
    0,
    3565,
    3566,
    1,
    0,
    0,
    0,
    3566,
    3572,
    1,
    0,
    0,
    0,
    3567,
    3568,
    3,
    646,
    323,
    0,
    3568,
    3569,
    5,
    154,
    0,
    0,
    3569,
    3570,
    3,
    640,
    320,
    0,
    3570,
    3572,
    1,
    0,
    0,
    0,
    3571,
    3561,
    1,
    0,
    0,
    0,
    3571,
    3567,
    1,
    0,
    0,
    0,
    3572,
    639,
    1,
    0,
    0,
    0,
    3573,
    3574,
    3,
    642,
    321,
    0,
    3574,
    641,
    1,
    0,
    0,
    0,
    3575,
    3576,
    3,
    644,
    322,
    0,
    3576,
    643,
    1,
    0,
    0,
    0,
    3577,
    3578,
    3,
    0,
    0,
    0,
    3578,
    645,
    1,
    0,
    0,
    0,
    3579,
    3580,
    3,
    896,
    448,
    0,
    3580,
    647,
    1,
    0,
    0,
    0,
    3581,
    3582,
    3,
    468,
    234,
    0,
    3582,
    3583,
    3,
    650,
    325,
    0,
    3583,
    3584,
    3,
    576,
    288,
    0,
    3584,
    649,
    1,
    0,
    0,
    0,
    3585,
    3587,
    3,
    602,
    301,
    0,
    3586,
    3585,
    1,
    0,
    0,
    0,
    3586,
    3587,
    1,
    0,
    0,
    0,
    3587,
    3588,
    1,
    0,
    0,
    0,
    3588,
    3589,
    5,
    15,
    0,
    0,
    3589,
    3590,
    3,
    652,
    326,
    0,
    3590,
    3591,
    3,
    298,
    149,
    0,
    3591,
    3592,
    5,
    184,
    0,
    0,
    3592,
    3593,
    3,
    640,
    320,
    0,
    3593,
    651,
    1,
    0,
    0,
    0,
    3594,
    3595,
    3,
    654,
    327,
    0,
    3595,
    653,
    1,
    0,
    0,
    0,
    3596,
    3597,
    3,
    656,
    328,
    0,
    3597,
    3598,
    5,
    202,
    0,
    0,
    3598,
    3600,
    1,
    0,
    0,
    0,
    3599,
    3596,
    1,
    0,
    0,
    0,
    3599,
    3600,
    1,
    0,
    0,
    0,
    3600,
    655,
    1,
    0,
    0,
    0,
    3601,
    3602,
    3,
    900,
    450,
    0,
    3602,
    657,
    1,
    0,
    0,
    0,
    3603,
    3605,
    3,
    468,
    234,
    0,
    3604,
    3606,
    3,
    602,
    301,
    0,
    3605,
    3604,
    1,
    0,
    0,
    0,
    3605,
    3606,
    1,
    0,
    0,
    0,
    3606,
    3607,
    1,
    0,
    0,
    0,
    3607,
    3609,
    5,
    151,
    0,
    0,
    3608,
    3610,
    3,
    640,
    320,
    0,
    3609,
    3608,
    1,
    0,
    0,
    0,
    3609,
    3610,
    1,
    0,
    0,
    0,
    3610,
    3611,
    1,
    0,
    0,
    0,
    3611,
    3612,
    3,
    576,
    288,
    0,
    3612,
    659,
    1,
    0,
    0,
    0,
    3613,
    3614,
    3,
    604,
    302,
    0,
    3614,
    3615,
    5,
    77,
    0,
    0,
    3615,
    3616,
    3,
    662,
    331,
    0,
    3616,
    3622,
    3,
    664,
    332,
    0,
    3617,
    3620,
    5,
    55,
    0,
    0,
    3618,
    3621,
    3,
    664,
    332,
    0,
    3619,
    3621,
    3,
    668,
    334,
    0,
    3620,
    3618,
    1,
    0,
    0,
    0,
    3620,
    3619,
    1,
    0,
    0,
    0,
    3621,
    3623,
    1,
    0,
    0,
    0,
    3622,
    3617,
    1,
    0,
    0,
    0,
    3622,
    3623,
    1,
    0,
    0,
    0,
    3623,
    661,
    1,
    0,
    0,
    0,
    3624,
    3625,
    3,
    0,
    0,
    0,
    3625,
    663,
    1,
    0,
    0,
    0,
    3626,
    3627,
    3,
    666,
    333,
    0,
    3627,
    665,
    1,
    0,
    0,
    0,
    3628,
    3630,
    5,
    4,
    0,
    0,
    3629,
    3631,
    3,
    418,
    209,
    0,
    3630,
    3629,
    1,
    0,
    0,
    0,
    3630,
    3631,
    1,
    0,
    0,
    0,
    3631,
    3633,
    1,
    0,
    0,
    0,
    3632,
    3628,
    1,
    0,
    0,
    0,
    3632,
    3633,
    1,
    0,
    0,
    0,
    3633,
    3634,
    1,
    0,
    0,
    0,
    3634,
    3638,
    5,
    214,
    0,
    0,
    3635,
    3637,
    3,
    578,
    289,
    0,
    3636,
    3635,
    1,
    0,
    0,
    0,
    3637,
    3640,
    1,
    0,
    0,
    0,
    3638,
    3636,
    1,
    0,
    0,
    0,
    3638,
    3639,
    1,
    0,
    0,
    0,
    3639,
    3641,
    1,
    0,
    0,
    0,
    3640,
    3638,
    1,
    0,
    0,
    0,
    3641,
    3642,
    5,
    216,
    0,
    0,
    3642,
    667,
    1,
    0,
    0,
    0,
    3643,
    3644,
    3,
    660,
    330,
    0,
    3644,
    669,
    1,
    0,
    0,
    0,
    3645,
    3650,
    3,
    604,
    302,
    0,
    3646,
    3647,
    5,
    172,
    0,
    0,
    3647,
    3651,
    3,
    662,
    331,
    0,
    3648,
    3649,
    5,
    96,
    0,
    0,
    3649,
    3651,
    3,
    646,
    323,
    0,
    3650,
    3646,
    1,
    0,
    0,
    0,
    3650,
    3648,
    1,
    0,
    0,
    0,
    3651,
    3652,
    1,
    0,
    0,
    0,
    3652,
    3657,
    3,
    664,
    332,
    0,
    3653,
    3654,
    5,
    161,
    0,
    0,
    3654,
    3655,
    3,
    662,
    331,
    0,
    3655,
    3656,
    5,
    205,
    0,
    0,
    3656,
    3658,
    1,
    0,
    0,
    0,
    3657,
    3653,
    1,
    0,
    0,
    0,
    3657,
    3658,
    1,
    0,
    0,
    0,
    3658,
    671,
    1,
    0,
    0,
    0,
    3659,
    3660,
    3,
    604,
    302,
    0,
    3660,
    3661,
    5,
    71,
    0,
    0,
    3661,
    3662,
    3,
    674,
    337,
    0,
    3662,
    3663,
    5,
    80,
    0,
    0,
    3663,
    3664,
    3,
    640,
    320,
    0,
    3664,
    3665,
    3,
    664,
    332,
    0,
    3665,
    673,
    1,
    0,
    0,
    0,
    3666,
    3668,
    3,
    418,
    209,
    0,
    3667,
    3666,
    1,
    0,
    0,
    0,
    3667,
    3668,
    1,
    0,
    0,
    0,
    3668,
    675,
    1,
    0,
    0,
    0,
    3669,
    3673,
    3,
    678,
    339,
    0,
    3670,
    3673,
    3,
    680,
    340,
    0,
    3671,
    3673,
    3,
    682,
    341,
    0,
    3672,
    3669,
    1,
    0,
    0,
    0,
    3672,
    3670,
    1,
    0,
    0,
    0,
    3672,
    3671,
    1,
    0,
    0,
    0,
    3673,
    3674,
    1,
    0,
    0,
    0,
    3674,
    3675,
    3,
    422,
    211,
    0,
    3675,
    677,
    1,
    0,
    0,
    0,
    3676,
    3677,
    3,
    484,
    242,
    0,
    3677,
    3678,
    5,
    152,
    0,
    0,
    3678,
    3679,
    3,
    260,
    130,
    0,
    3679,
    679,
    1,
    0,
    0,
    0,
    3680,
    3681,
    3,
    728,
    364,
    0,
    3681,
    3682,
    5,
    152,
    0,
    0,
    3682,
    3683,
    3,
    742,
    371,
    0,
    3683,
    681,
    1,
    0,
    0,
    0,
    3684,
    3685,
    5,
    55,
    0,
    0,
    3685,
    3686,
    3,
    742,
    371,
    0,
    3686,
    683,
    1,
    0,
    0,
    0,
    3687,
    3689,
    5,
    150,
    0,
    0,
    3688,
    3690,
    3,
    418,
    209,
    0,
    3689,
    3688,
    1,
    0,
    0,
    0,
    3689,
    3690,
    1,
    0,
    0,
    0,
    3690,
    3692,
    1,
    0,
    0,
    0,
    3691,
    3687,
    1,
    0,
    0,
    0,
    3691,
    3692,
    1,
    0,
    0,
    0,
    3692,
    3693,
    1,
    0,
    0,
    0,
    3693,
    3694,
    5,
    69,
    0,
    0,
    3694,
    3695,
    3,
    298,
    149,
    0,
    3695,
    3696,
    3,
    728,
    364,
    0,
    3696,
    3697,
    5,
    152,
    0,
    0,
    3697,
    3698,
    3,
    742,
    371,
    0,
    3698,
    3699,
    3,
    422,
    211,
    0,
    3699,
    685,
    1,
    0,
    0,
    0,
    3700,
    3701,
    3,
    460,
    230,
    0,
    3701,
    3702,
    5,
    142,
    0,
    0,
    3702,
    3703,
    5,
    45,
    0,
    0,
    3703,
    3704,
    3,
    386,
    193,
    0,
    3704,
    3705,
    3,
    688,
    344,
    0,
    3705,
    687,
    1,
    0,
    0,
    0,
    3706,
    3719,
    5,
    205,
    0,
    0,
    3707,
    3709,
    5,
    116,
    0,
    0,
    3708,
    3707,
    1,
    0,
    0,
    0,
    3708,
    3709,
    1,
    0,
    0,
    0,
    3709,
    3710,
    1,
    0,
    0,
    0,
    3710,
    3714,
    5,
    214,
    0,
    0,
    3711,
    3713,
    3,
    690,
    345,
    0,
    3712,
    3711,
    1,
    0,
    0,
    0,
    3713,
    3716,
    1,
    0,
    0,
    0,
    3714,
    3712,
    1,
    0,
    0,
    0,
    3714,
    3715,
    1,
    0,
    0,
    0,
    3715,
    3717,
    1,
    0,
    0,
    0,
    3716,
    3714,
    1,
    0,
    0,
    0,
    3717,
    3719,
    5,
    216,
    0,
    0,
    3718,
    3706,
    1,
    0,
    0,
    0,
    3718,
    3708,
    1,
    0,
    0,
    0,
    3719,
    689,
    1,
    0,
    0,
    0,
    3720,
    3742,
    3,
    580,
    290,
    0,
    3721,
    3723,
    3,
    480,
    240,
    0,
    3722,
    3721,
    1,
    0,
    0,
    0,
    3722,
    3723,
    1,
    0,
    0,
    0,
    3723,
    3724,
    1,
    0,
    0,
    0,
    3724,
    3728,
    3,
    402,
    201,
    0,
    3725,
    3727,
    3,
    712,
    356,
    0,
    3726,
    3725,
    1,
    0,
    0,
    0,
    3727,
    3730,
    1,
    0,
    0,
    0,
    3728,
    3726,
    1,
    0,
    0,
    0,
    3728,
    3729,
    1,
    0,
    0,
    0,
    3729,
    3742,
    1,
    0,
    0,
    0,
    3730,
    3728,
    1,
    0,
    0,
    0,
    3731,
    3742,
    3,
    710,
    355,
    0,
    3732,
    3736,
    3,
    692,
    346,
    0,
    3733,
    3735,
    3,
    698,
    349,
    0,
    3734,
    3733,
    1,
    0,
    0,
    0,
    3735,
    3738,
    1,
    0,
    0,
    0,
    3736,
    3734,
    1,
    0,
    0,
    0,
    3736,
    3737,
    1,
    0,
    0,
    0,
    3737,
    3742,
    1,
    0,
    0,
    0,
    3738,
    3736,
    1,
    0,
    0,
    0,
    3739,
    3742,
    3,
    694,
    347,
    0,
    3740,
    3742,
    3,
    696,
    348,
    0,
    3741,
    3720,
    1,
    0,
    0,
    0,
    3741,
    3722,
    1,
    0,
    0,
    0,
    3741,
    3731,
    1,
    0,
    0,
    0,
    3741,
    3732,
    1,
    0,
    0,
    0,
    3741,
    3739,
    1,
    0,
    0,
    0,
    3741,
    3740,
    1,
    0,
    0,
    0,
    3742,
    691,
    1,
    0,
    0,
    0,
    3743,
    3744,
    3,
    76,
    38,
    0,
    3744,
    3745,
    5,
    57,
    0,
    0,
    3745,
    3746,
    3,
    700,
    350,
    0,
    3746,
    693,
    1,
    0,
    0,
    0,
    3747,
    3748,
    3,
    76,
    38,
    0,
    3748,
    3749,
    5,
    53,
    0,
    0,
    3749,
    3750,
    3,
    700,
    350,
    0,
    3750,
    695,
    1,
    0,
    0,
    0,
    3751,
    3752,
    3,
    76,
    38,
    0,
    3752,
    3753,
    5,
    61,
    0,
    0,
    3753,
    3754,
    3,
    700,
    350,
    0,
    3754,
    697,
    1,
    0,
    0,
    0,
    3755,
    3759,
    3,
    76,
    38,
    0,
    3756,
    3760,
    3,
    680,
    340,
    0,
    3757,
    3758,
    5,
    152,
    0,
    0,
    3758,
    3760,
    3,
    742,
    371,
    0,
    3759,
    3756,
    1,
    0,
    0,
    0,
    3759,
    3757,
    1,
    0,
    0,
    0,
    3760,
    3761,
    1,
    0,
    0,
    0,
    3761,
    3762,
    5,
    205,
    0,
    0,
    3762,
    699,
    1,
    0,
    0,
    0,
    3763,
    3764,
    3,
    890,
    445,
    0,
    3764,
    3765,
    5,
    205,
    0,
    0,
    3765,
    3771,
    1,
    0,
    0,
    0,
    3766,
    3771,
    3,
    702,
    351,
    0,
    3767,
    3771,
    3,
    704,
    352,
    0,
    3768,
    3771,
    3,
    706,
    353,
    0,
    3769,
    3771,
    3,
    708,
    354,
    0,
    3770,
    3763,
    1,
    0,
    0,
    0,
    3770,
    3766,
    1,
    0,
    0,
    0,
    3770,
    3767,
    1,
    0,
    0,
    0,
    3770,
    3768,
    1,
    0,
    0,
    0,
    3770,
    3769,
    1,
    0,
    0,
    0,
    3771,
    701,
    1,
    0,
    0,
    0,
    3772,
    3773,
    3,
    598,
    299,
    0,
    3773,
    3774,
    3,
    576,
    288,
    0,
    3774,
    703,
    1,
    0,
    0,
    0,
    3775,
    3776,
    3,
    620,
    310,
    0,
    3776,
    3777,
    3,
    576,
    288,
    0,
    3777,
    705,
    1,
    0,
    0,
    0,
    3778,
    3779,
    3,
    636,
    318,
    0,
    3779,
    3780,
    3,
    576,
    288,
    0,
    3780,
    707,
    1,
    0,
    0,
    0,
    3781,
    3782,
    3,
    650,
    325,
    0,
    3782,
    3783,
    3,
    576,
    288,
    0,
    3783,
    709,
    1,
    0,
    0,
    0,
    3784,
    3785,
    3,
    76,
    38,
    0,
    3785,
    3786,
    3,
    720,
    360,
    0,
    3786,
    711,
    1,
    0,
    0,
    0,
    3787,
    3788,
    3,
    76,
    38,
    0,
    3788,
    3789,
    3,
    722,
    361,
    0,
    3789,
    713,
    1,
    0,
    0,
    0,
    3790,
    3791,
    3,
    468,
    234,
    0,
    3791,
    3792,
    5,
    142,
    0,
    0,
    3792,
    3793,
    3,
    594,
    297,
    0,
    3793,
    3794,
    3,
    716,
    358,
    0,
    3794,
    715,
    1,
    0,
    0,
    0,
    3795,
    3808,
    5,
    205,
    0,
    0,
    3796,
    3798,
    5,
    116,
    0,
    0,
    3797,
    3796,
    1,
    0,
    0,
    0,
    3797,
    3798,
    1,
    0,
    0,
    0,
    3798,
    3799,
    1,
    0,
    0,
    0,
    3799,
    3803,
    5,
    214,
    0,
    0,
    3800,
    3802,
    3,
    690,
    345,
    0,
    3801,
    3800,
    1,
    0,
    0,
    0,
    3802,
    3805,
    1,
    0,
    0,
    0,
    3803,
    3801,
    1,
    0,
    0,
    0,
    3803,
    3804,
    1,
    0,
    0,
    0,
    3804,
    3806,
    1,
    0,
    0,
    0,
    3805,
    3803,
    1,
    0,
    0,
    0,
    3806,
    3808,
    5,
    216,
    0,
    0,
    3807,
    3795,
    1,
    0,
    0,
    0,
    3807,
    3797,
    1,
    0,
    0,
    0,
    3808,
    717,
    1,
    0,
    0,
    0,
    3809,
    3810,
    3,
    468,
    234,
    0,
    3810,
    3819,
    5,
    60,
    0,
    0,
    3811,
    3813,
    3,
    226,
    113,
    0,
    3812,
    3814,
    3,
    196,
    98,
    0,
    3813,
    3812,
    1,
    0,
    0,
    0,
    3813,
    3814,
    1,
    0,
    0,
    0,
    3814,
    3820,
    1,
    0,
    0,
    0,
    3815,
    3817,
    5,
    142,
    0,
    0,
    3816,
    3818,
    3,
    418,
    209,
    0,
    3817,
    3816,
    1,
    0,
    0,
    0,
    3817,
    3818,
    1,
    0,
    0,
    0,
    3818,
    3820,
    1,
    0,
    0,
    0,
    3819,
    3811,
    1,
    0,
    0,
    0,
    3819,
    3815,
    1,
    0,
    0,
    0,
    3820,
    3822,
    1,
    0,
    0,
    0,
    3821,
    3823,
    3,
    318,
    159,
    0,
    3822,
    3821,
    1,
    0,
    0,
    0,
    3822,
    3823,
    1,
    0,
    0,
    0,
    3823,
    3824,
    1,
    0,
    0,
    0,
    3824,
    3825,
    3,
    716,
    358,
    0,
    3825,
    719,
    1,
    0,
    0,
    0,
    3826,
    3831,
    5,
    155,
    0,
    0,
    3827,
    3829,
    3,
    418,
    209,
    0,
    3828,
    3827,
    1,
    0,
    0,
    0,
    3828,
    3829,
    1,
    0,
    0,
    0,
    3829,
    3830,
    1,
    0,
    0,
    0,
    3830,
    3832,
    5,
    69,
    0,
    0,
    3831,
    3828,
    1,
    0,
    0,
    0,
    3831,
    3832,
    1,
    0,
    0,
    0,
    3832,
    3833,
    1,
    0,
    0,
    0,
    3833,
    3834,
    3,
    298,
    149,
    0,
    3834,
    3838,
    3,
    646,
    323,
    0,
    3835,
    3836,
    3,
    646,
    323,
    0,
    3836,
    3837,
    3,
    724,
    362,
    0,
    3837,
    3839,
    1,
    0,
    0,
    0,
    3838,
    3835,
    1,
    0,
    0,
    0,
    3838,
    3839,
    1,
    0,
    0,
    0,
    3839,
    3841,
    1,
    0,
    0,
    0,
    3840,
    3842,
    3,
    728,
    364,
    0,
    3841,
    3840,
    1,
    0,
    0,
    0,
    3841,
    3842,
    1,
    0,
    0,
    0,
    3842,
    3844,
    1,
    0,
    0,
    0,
    3843,
    3845,
    3,
    730,
    365,
    0,
    3844,
    3843,
    1,
    0,
    0,
    0,
    3844,
    3845,
    1,
    0,
    0,
    0,
    3845,
    3846,
    1,
    0,
    0,
    0,
    3846,
    3847,
    5,
    152,
    0,
    0,
    3847,
    3848,
    3,
    742,
    371,
    0,
    3848,
    3849,
    3,
    576,
    288,
    0,
    3849,
    721,
    1,
    0,
    0,
    0,
    3850,
    3875,
    3,
    646,
    323,
    0,
    3851,
    3855,
    5,
    155,
    0,
    0,
    3852,
    3853,
    3,
    646,
    323,
    0,
    3853,
    3854,
    3,
    724,
    362,
    0,
    3854,
    3856,
    1,
    0,
    0,
    0,
    3855,
    3852,
    1,
    0,
    0,
    0,
    3855,
    3856,
    1,
    0,
    0,
    0,
    3856,
    3858,
    1,
    0,
    0,
    0,
    3857,
    3859,
    3,
    728,
    364,
    0,
    3858,
    3857,
    1,
    0,
    0,
    0,
    3858,
    3859,
    1,
    0,
    0,
    0,
    3859,
    3861,
    1,
    0,
    0,
    0,
    3860,
    3862,
    3,
    730,
    365,
    0,
    3861,
    3860,
    1,
    0,
    0,
    0,
    3861,
    3862,
    1,
    0,
    0,
    0,
    3862,
    3876,
    1,
    0,
    0,
    0,
    3863,
    3864,
    3,
    646,
    323,
    0,
    3864,
    3866,
    3,
    724,
    362,
    0,
    3865,
    3867,
    3,
    728,
    364,
    0,
    3866,
    3865,
    1,
    0,
    0,
    0,
    3866,
    3867,
    1,
    0,
    0,
    0,
    3867,
    3869,
    1,
    0,
    0,
    0,
    3868,
    3870,
    3,
    730,
    365,
    0,
    3869,
    3868,
    1,
    0,
    0,
    0,
    3869,
    3870,
    1,
    0,
    0,
    0,
    3870,
    3876,
    1,
    0,
    0,
    0,
    3871,
    3873,
    3,
    728,
    364,
    0,
    3872,
    3874,
    3,
    730,
    365,
    0,
    3873,
    3872,
    1,
    0,
    0,
    0,
    3873,
    3874,
    1,
    0,
    0,
    0,
    3874,
    3876,
    1,
    0,
    0,
    0,
    3875,
    3851,
    1,
    0,
    0,
    0,
    3875,
    3863,
    1,
    0,
    0,
    0,
    3875,
    3871,
    1,
    0,
    0,
    0,
    3875,
    3876,
    1,
    0,
    0,
    0,
    3876,
    3877,
    1,
    0,
    0,
    0,
    3877,
    3878,
    5,
    152,
    0,
    0,
    3878,
    3879,
    3,
    742,
    371,
    0,
    3879,
    3880,
    3,
    576,
    288,
    0,
    3880,
    723,
    1,
    0,
    0,
    0,
    3881,
    3882,
    5,
    3,
    0,
    0,
    3882,
    3883,
    3,
    726,
    363,
    0,
    3883,
    725,
    1,
    0,
    0,
    0,
    3884,
    3885,
    3,
    622,
    311,
    0,
    3885,
    727,
    1,
    0,
    0,
    0,
    3886,
    3887,
    5,
    77,
    0,
    0,
    3887,
    3888,
    3,
    0,
    0,
    0,
    3888,
    729,
    1,
    0,
    0,
    0,
    3889,
    3890,
    5,
    53,
    0,
    0,
    3890,
    3891,
    3,
    732,
    366,
    0,
    3891,
    731,
    1,
    0,
    0,
    0,
    3892,
    3898,
    3,
    890,
    445,
    0,
    3893,
    3898,
    3,
    734,
    367,
    0,
    3894,
    3898,
    3,
    736,
    368,
    0,
    3895,
    3898,
    3,
    738,
    369,
    0,
    3896,
    3898,
    3,
    740,
    370,
    0,
    3897,
    3892,
    1,
    0,
    0,
    0,
    3897,
    3893,
    1,
    0,
    0,
    0,
    3897,
    3894,
    1,
    0,
    0,
    0,
    3897,
    3895,
    1,
    0,
    0,
    0,
    3897,
    3896,
    1,
    0,
    0,
    0,
    3898,
    733,
    1,
    0,
    0,
    0,
    3899,
    3908,
    3,
    598,
    299,
    0,
    3900,
    3904,
    5,
    214,
    0,
    0,
    3901,
    3903,
    3,
    578,
    289,
    0,
    3902,
    3901,
    1,
    0,
    0,
    0,
    3903,
    3906,
    1,
    0,
    0,
    0,
    3904,
    3902,
    1,
    0,
    0,
    0,
    3904,
    3905,
    1,
    0,
    0,
    0,
    3905,
    3907,
    1,
    0,
    0,
    0,
    3906,
    3904,
    1,
    0,
    0,
    0,
    3907,
    3909,
    5,
    216,
    0,
    0,
    3908,
    3900,
    1,
    0,
    0,
    0,
    3908,
    3909,
    1,
    0,
    0,
    0,
    3909,
    735,
    1,
    0,
    0,
    0,
    3910,
    3919,
    3,
    620,
    310,
    0,
    3911,
    3915,
    5,
    214,
    0,
    0,
    3912,
    3914,
    3,
    578,
    289,
    0,
    3913,
    3912,
    1,
    0,
    0,
    0,
    3914,
    3917,
    1,
    0,
    0,
    0,
    3915,
    3913,
    1,
    0,
    0,
    0,
    3915,
    3916,
    1,
    0,
    0,
    0,
    3916,
    3918,
    1,
    0,
    0,
    0,
    3917,
    3915,
    1,
    0,
    0,
    0,
    3918,
    3920,
    5,
    216,
    0,
    0,
    3919,
    3911,
    1,
    0,
    0,
    0,
    3919,
    3920,
    1,
    0,
    0,
    0,
    3920,
    737,
    1,
    0,
    0,
    0,
    3921,
    3930,
    3,
    636,
    318,
    0,
    3922,
    3926,
    5,
    214,
    0,
    0,
    3923,
    3925,
    3,
    578,
    289,
    0,
    3924,
    3923,
    1,
    0,
    0,
    0,
    3925,
    3928,
    1,
    0,
    0,
    0,
    3926,
    3924,
    1,
    0,
    0,
    0,
    3926,
    3927,
    1,
    0,
    0,
    0,
    3927,
    3929,
    1,
    0,
    0,
    0,
    3928,
    3926,
    1,
    0,
    0,
    0,
    3929,
    3931,
    5,
    216,
    0,
    0,
    3930,
    3922,
    1,
    0,
    0,
    0,
    3930,
    3931,
    1,
    0,
    0,
    0,
    3931,
    739,
    1,
    0,
    0,
    0,
    3932,
    3941,
    3,
    650,
    325,
    0,
    3933,
    3937,
    5,
    214,
    0,
    0,
    3934,
    3936,
    3,
    578,
    289,
    0,
    3935,
    3934,
    1,
    0,
    0,
    0,
    3936,
    3939,
    1,
    0,
    0,
    0,
    3937,
    3935,
    1,
    0,
    0,
    0,
    3937,
    3938,
    1,
    0,
    0,
    0,
    3938,
    3940,
    1,
    0,
    0,
    0,
    3939,
    3937,
    1,
    0,
    0,
    0,
    3940,
    3942,
    5,
    216,
    0,
    0,
    3941,
    3933,
    1,
    0,
    0,
    0,
    3941,
    3942,
    1,
    0,
    0,
    0,
    3942,
    741,
    1,
    0,
    0,
    0,
    3943,
    3944,
    3,
    744,
    372,
    0,
    3944,
    743,
    1,
    0,
    0,
    0,
    3945,
    3946,
    3,
    746,
    373,
    0,
    3946,
    3947,
    3,
    260,
    130,
    0,
    3947,
    745,
    1,
    0,
    0,
    0,
    3948,
    3949,
    3,
    892,
    446,
    0,
    3949,
    747,
    1,
    0,
    0,
    0,
    3950,
    3951,
    3,
    460,
    230,
    0,
    3951,
    3952,
    5,
    25,
    0,
    0,
    3952,
    3953,
    5,
    45,
    0,
    0,
    3953,
    3954,
    3,
    386,
    193,
    0,
    3954,
    3955,
    3,
    752,
    376,
    0,
    3955,
    749,
    1,
    0,
    0,
    0,
    3956,
    3957,
    3,
    468,
    234,
    0,
    3957,
    3958,
    5,
    25,
    0,
    0,
    3958,
    3959,
    3,
    594,
    297,
    0,
    3959,
    3960,
    3,
    752,
    376,
    0,
    3960,
    751,
    1,
    0,
    0,
    0,
    3961,
    3967,
    5,
    205,
    0,
    0,
    3962,
    3963,
    5,
    214,
    0,
    0,
    3963,
    3964,
    3,
    754,
    377,
    0,
    3964,
    3965,
    5,
    216,
    0,
    0,
    3965,
    3967,
    1,
    0,
    0,
    0,
    3966,
    3961,
    1,
    0,
    0,
    0,
    3966,
    3962,
    1,
    0,
    0,
    0,
    3967,
    753,
    1,
    0,
    0,
    0,
    3968,
    3970,
    3,
    756,
    378,
    0,
    3969,
    3968,
    1,
    0,
    0,
    0,
    3970,
    3973,
    1,
    0,
    0,
    0,
    3971,
    3969,
    1,
    0,
    0,
    0,
    3971,
    3972,
    1,
    0,
    0,
    0,
    3972,
    3975,
    1,
    0,
    0,
    0,
    3973,
    3971,
    1,
    0,
    0,
    0,
    3974,
    3976,
    3,
    288,
    144,
    0,
    3975,
    3974,
    1,
    0,
    0,
    0,
    3975,
    3976,
    1,
    0,
    0,
    0,
    3976,
    755,
    1,
    0,
    0,
    0,
    3977,
    3980,
    3,
    578,
    289,
    0,
    3978,
    3980,
    3,
    758,
    379,
    0,
    3979,
    3977,
    1,
    0,
    0,
    0,
    3979,
    3978,
    1,
    0,
    0,
    0,
    3980,
    757,
    1,
    0,
    0,
    0,
    3981,
    3982,
    3,
    76,
    38,
    0,
    3982,
    3983,
    5,
    134,
    0,
    0,
    3983,
    3984,
    3,
    376,
    188,
    0,
    3984,
    759,
    1,
    0,
    0,
    0,
    3985,
    3986,
    3,
    460,
    230,
    0,
    3986,
    3987,
    5,
    41,
    0,
    0,
    3987,
    3988,
    5,
    45,
    0,
    0,
    3988,
    3989,
    3,
    386,
    193,
    0,
    3989,
    3990,
    3,
    752,
    376,
    0,
    3990,
    761,
    1,
    0,
    0,
    0,
    3991,
    3992,
    3,
    468,
    234,
    0,
    3992,
    3993,
    5,
    41,
    0,
    0,
    3993,
    3994,
    3,
    766,
    383,
    0,
    3994,
    3995,
    3,
    752,
    376,
    0,
    3995,
    763,
    1,
    0,
    0,
    0,
    3996,
    3997,
    3,
    468,
    234,
    0,
    3997,
    3999,
    5,
    14,
    0,
    0,
    3998,
    4e3,
    5,
    107,
    0,
    0,
    3999,
    3998,
    1,
    0,
    0,
    0,
    3999,
    4e3,
    1,
    0,
    0,
    0,
    4e3,
    4007,
    1,
    0,
    0,
    0,
    4001,
    4003,
    3,
    226,
    113,
    0,
    4002,
    4004,
    3,
    196,
    98,
    0,
    4003,
    4002,
    1,
    0,
    0,
    0,
    4003,
    4004,
    1,
    0,
    0,
    0,
    4004,
    4008,
    1,
    0,
    0,
    0,
    4005,
    4006,
    5,
    41,
    0,
    0,
    4006,
    4008,
    3,
    766,
    383,
    0,
    4007,
    4001,
    1,
    0,
    0,
    0,
    4007,
    4005,
    1,
    0,
    0,
    0,
    4008,
    4009,
    1,
    0,
    0,
    0,
    4009,
    4010,
    3,
    752,
    376,
    0,
    4010,
    765,
    1,
    0,
    0,
    0,
    4011,
    4013,
    3,
    418,
    209,
    0,
    4012,
    4011,
    1,
    0,
    0,
    0,
    4012,
    4013,
    1,
    0,
    0,
    0,
    4013,
    4015,
    1,
    0,
    0,
    0,
    4014,
    4016,
    3,
    318,
    159,
    0,
    4015,
    4014,
    1,
    0,
    0,
    0,
    4015,
    4016,
    1,
    0,
    0,
    0,
    4016,
    767,
    1,
    0,
    0,
    0,
    4017,
    4018,
    3,
    460,
    230,
    0,
    4018,
    4019,
    5,
    133,
    0,
    0,
    4019,
    4020,
    5,
    45,
    0,
    0,
    4020,
    4021,
    3,
    386,
    193,
    0,
    4021,
    4022,
    3,
    770,
    385,
    0,
    4022,
    769,
    1,
    0,
    0,
    0,
    4023,
    4033,
    5,
    205,
    0,
    0,
    4024,
    4028,
    5,
    214,
    0,
    0,
    4025,
    4027,
    3,
    772,
    386,
    0,
    4026,
    4025,
    1,
    0,
    0,
    0,
    4027,
    4030,
    1,
    0,
    0,
    0,
    4028,
    4026,
    1,
    0,
    0,
    0,
    4028,
    4029,
    1,
    0,
    0,
    0,
    4029,
    4031,
    1,
    0,
    0,
    0,
    4030,
    4028,
    1,
    0,
    0,
    0,
    4031,
    4033,
    5,
    216,
    0,
    0,
    4032,
    4023,
    1,
    0,
    0,
    0,
    4032,
    4024,
    1,
    0,
    0,
    0,
    4033,
    771,
    1,
    0,
    0,
    0,
    4034,
    4042,
    3,
    390,
    195,
    0,
    4035,
    4042,
    3,
    774,
    387,
    0,
    4036,
    4042,
    3,
    778,
    389,
    0,
    4037,
    4042,
    3,
    784,
    392,
    0,
    4038,
    4042,
    3,
    832,
    416,
    0,
    4039,
    4042,
    3,
    788,
    394,
    0,
    4040,
    4042,
    3,
    792,
    396,
    0,
    4041,
    4034,
    1,
    0,
    0,
    0,
    4041,
    4035,
    1,
    0,
    0,
    0,
    4041,
    4036,
    1,
    0,
    0,
    0,
    4041,
    4037,
    1,
    0,
    0,
    0,
    4041,
    4038,
    1,
    0,
    0,
    0,
    4041,
    4039,
    1,
    0,
    0,
    0,
    4041,
    4040,
    1,
    0,
    0,
    0,
    4042,
    773,
    1,
    0,
    0,
    0,
    4043,
    4044,
    3,
    76,
    38,
    0,
    4044,
    4045,
    3,
    776,
    388,
    0,
    4045,
    775,
    1,
    0,
    0,
    0,
    4046,
    4050,
    5,
    146,
    0,
    0,
    4047,
    4049,
    3,
    410,
    205,
    0,
    4048,
    4047,
    1,
    0,
    0,
    0,
    4049,
    4052,
    1,
    0,
    0,
    0,
    4050,
    4048,
    1,
    0,
    0,
    0,
    4050,
    4051,
    1,
    0,
    0,
    0,
    4051,
    4053,
    1,
    0,
    0,
    0,
    4052,
    4050,
    1,
    0,
    0,
    0,
    4053,
    4054,
    3,
    416,
    208,
    0,
    4054,
    777,
    1,
    0,
    0,
    0,
    4055,
    4056,
    3,
    76,
    38,
    0,
    4056,
    4057,
    3,
    780,
    390,
    0,
    4057,
    4058,
    3,
    782,
    391,
    0,
    4058,
    779,
    1,
    0,
    0,
    0,
    4059,
    4060,
    7,
    25,
    0,
    0,
    4060,
    781,
    1,
    0,
    0,
    0,
    4061,
    4063,
    3,
    226,
    113,
    0,
    4062,
    4064,
    3,
    196,
    98,
    0,
    4063,
    4062,
    1,
    0,
    0,
    0,
    4063,
    4064,
    1,
    0,
    0,
    0,
    4064,
    4065,
    1,
    0,
    0,
    0,
    4065,
    4066,
    3,
    770,
    385,
    0,
    4066,
    4085,
    1,
    0,
    0,
    0,
    4067,
    4069,
    3,
    410,
    205,
    0,
    4068,
    4067,
    1,
    0,
    0,
    0,
    4069,
    4072,
    1,
    0,
    0,
    0,
    4070,
    4068,
    1,
    0,
    0,
    0,
    4070,
    4071,
    1,
    0,
    0,
    0,
    4071,
    4073,
    1,
    0,
    0,
    0,
    4072,
    4070,
    1,
    0,
    0,
    0,
    4073,
    4080,
    5,
    41,
    0,
    0,
    4074,
    4076,
    3,
    410,
    205,
    0,
    4075,
    4074,
    1,
    0,
    0,
    0,
    4076,
    4077,
    1,
    0,
    0,
    0,
    4077,
    4075,
    1,
    0,
    0,
    0,
    4077,
    4078,
    1,
    0,
    0,
    0,
    4078,
    4080,
    1,
    0,
    0,
    0,
    4079,
    4070,
    1,
    0,
    0,
    0,
    4079,
    4075,
    1,
    0,
    0,
    0,
    4080,
    4081,
    1,
    0,
    0,
    0,
    4081,
    4082,
    3,
    766,
    383,
    0,
    4082,
    4083,
    3,
    752,
    376,
    0,
    4083,
    4085,
    1,
    0,
    0,
    0,
    4084,
    4061,
    1,
    0,
    0,
    0,
    4084,
    4079,
    1,
    0,
    0,
    0,
    4085,
    783,
    1,
    0,
    0,
    0,
    4086,
    4087,
    3,
    76,
    38,
    0,
    4087,
    4088,
    5,
    73,
    0,
    0,
    4088,
    4089,
    3,
    786,
    393,
    0,
    4089,
    785,
    1,
    0,
    0,
    0,
    4090,
    4092,
    3,
    226,
    113,
    0,
    4091,
    4093,
    3,
    196,
    98,
    0,
    4092,
    4091,
    1,
    0,
    0,
    0,
    4092,
    4093,
    1,
    0,
    0,
    0,
    4093,
    4094,
    1,
    0,
    0,
    0,
    4094,
    4095,
    3,
    752,
    376,
    0,
    4095,
    4114,
    1,
    0,
    0,
    0,
    4096,
    4098,
    3,
    410,
    205,
    0,
    4097,
    4096,
    1,
    0,
    0,
    0,
    4098,
    4101,
    1,
    0,
    0,
    0,
    4099,
    4097,
    1,
    0,
    0,
    0,
    4099,
    4100,
    1,
    0,
    0,
    0,
    4100,
    4102,
    1,
    0,
    0,
    0,
    4101,
    4099,
    1,
    0,
    0,
    0,
    4102,
    4109,
    5,
    32,
    0,
    0,
    4103,
    4105,
    3,
    410,
    205,
    0,
    4104,
    4103,
    1,
    0,
    0,
    0,
    4105,
    4106,
    1,
    0,
    0,
    0,
    4106,
    4104,
    1,
    0,
    0,
    0,
    4106,
    4107,
    1,
    0,
    0,
    0,
    4107,
    4109,
    1,
    0,
    0,
    0,
    4108,
    4099,
    1,
    0,
    0,
    0,
    4108,
    4104,
    1,
    0,
    0,
    0,
    4109,
    4110,
    1,
    0,
    0,
    0,
    4110,
    4111,
    3,
    888,
    444,
    0,
    4111,
    4112,
    3,
    752,
    376,
    0,
    4112,
    4114,
    1,
    0,
    0,
    0,
    4113,
    4090,
    1,
    0,
    0,
    0,
    4113,
    4108,
    1,
    0,
    0,
    0,
    4114,
    787,
    1,
    0,
    0,
    0,
    4115,
    4116,
    3,
    76,
    38,
    0,
    4116,
    4117,
    3,
    790,
    395,
    0,
    4117,
    789,
    1,
    0,
    0,
    0,
    4118,
    4122,
    5,
    5,
    0,
    0,
    4119,
    4121,
    3,
    410,
    205,
    0,
    4120,
    4119,
    1,
    0,
    0,
    0,
    4121,
    4124,
    1,
    0,
    0,
    0,
    4122,
    4120,
    1,
    0,
    0,
    0,
    4122,
    4123,
    1,
    0,
    0,
    0,
    4123,
    4125,
    1,
    0,
    0,
    0,
    4124,
    4122,
    1,
    0,
    0,
    0,
    4125,
    4126,
    3,
    416,
    208,
    0,
    4126,
    791,
    1,
    0,
    0,
    0,
    4127,
    4128,
    3,
    76,
    38,
    0,
    4128,
    4129,
    3,
    794,
    397,
    0,
    4129,
    793,
    1,
    0,
    0,
    0,
    4130,
    4134,
    5,
    140,
    0,
    0,
    4131,
    4133,
    3,
    410,
    205,
    0,
    4132,
    4131,
    1,
    0,
    0,
    0,
    4133,
    4136,
    1,
    0,
    0,
    0,
    4134,
    4132,
    1,
    0,
    0,
    0,
    4134,
    4135,
    1,
    0,
    0,
    0,
    4135,
    4137,
    1,
    0,
    0,
    0,
    4136,
    4134,
    1,
    0,
    0,
    0,
    4137,
    4138,
    3,
    416,
    208,
    0,
    4138,
    795,
    1,
    0,
    0,
    0,
    4139,
    4140,
    3,
    468,
    234,
    0,
    4140,
    4141,
    5,
    133,
    0,
    0,
    4141,
    4142,
    3,
    766,
    383,
    0,
    4142,
    4143,
    3,
    770,
    385,
    0,
    4143,
    797,
    1,
    0,
    0,
    0,
    4144,
    4150,
    3,
    468,
    234,
    0,
    4145,
    4147,
    5,
    14,
    0,
    0,
    4146,
    4148,
    5,
    107,
    0,
    0,
    4147,
    4146,
    1,
    0,
    0,
    0,
    4147,
    4148,
    1,
    0,
    0,
    0,
    4148,
    4151,
    1,
    0,
    0,
    0,
    4149,
    4151,
    5,
    107,
    0,
    0,
    4150,
    4145,
    1,
    0,
    0,
    0,
    4150,
    4149,
    1,
    0,
    0,
    0,
    4150,
    4151,
    1,
    0,
    0,
    0,
    4151,
    4152,
    1,
    0,
    0,
    0,
    4152,
    4161,
    5,
    135,
    0,
    0,
    4153,
    4155,
    3,
    226,
    113,
    0,
    4154,
    4156,
    3,
    196,
    98,
    0,
    4155,
    4154,
    1,
    0,
    0,
    0,
    4155,
    4156,
    1,
    0,
    0,
    0,
    4156,
    4162,
    1,
    0,
    0,
    0,
    4157,
    4159,
    5,
    133,
    0,
    0,
    4158,
    4160,
    3,
    418,
    209,
    0,
    4159,
    4158,
    1,
    0,
    0,
    0,
    4159,
    4160,
    1,
    0,
    0,
    0,
    4160,
    4162,
    1,
    0,
    0,
    0,
    4161,
    4153,
    1,
    0,
    0,
    0,
    4161,
    4157,
    1,
    0,
    0,
    0,
    4162,
    4164,
    1,
    0,
    0,
    0,
    4163,
    4165,
    3,
    318,
    159,
    0,
    4164,
    4163,
    1,
    0,
    0,
    0,
    4164,
    4165,
    1,
    0,
    0,
    0,
    4165,
    4168,
    1,
    0,
    0,
    0,
    4166,
    4167,
    5,
    24,
    0,
    0,
    4167,
    4169,
    3,
    800,
    400,
    0,
    4168,
    4166,
    1,
    0,
    0,
    0,
    4168,
    4169,
    1,
    0,
    0,
    0,
    4169,
    4170,
    1,
    0,
    0,
    0,
    4170,
    4171,
    3,
    770,
    385,
    0,
    4171,
    799,
    1,
    0,
    0,
    0,
    4172,
    4173,
    3,
    802,
    401,
    0,
    4173,
    801,
    1,
    0,
    0,
    0,
    4174,
    4175,
    3,
    804,
    402,
    0,
    4175,
    803,
    1,
    0,
    0,
    0,
    4176,
    4177,
    3,
    806,
    403,
    0,
    4177,
    805,
    1,
    0,
    0,
    0,
    4178,
    4179,
    3,
    298,
    149,
    0,
    4179,
    807,
    1,
    0,
    0,
    0,
    4180,
    4181,
    3,
    460,
    230,
    0,
    4181,
    4182,
    5,
    32,
    0,
    0,
    4182,
    4183,
    5,
    45,
    0,
    0,
    4183,
    4184,
    3,
    386,
    193,
    0,
    4184,
    4185,
    3,
    770,
    385,
    0,
    4185,
    809,
    1,
    0,
    0,
    0,
    4186,
    4187,
    3,
    468,
    234,
    0,
    4187,
    4188,
    5,
    32,
    0,
    0,
    4188,
    4189,
    3,
    766,
    383,
    0,
    4189,
    4190,
    3,
    770,
    385,
    0,
    4190,
    811,
    1,
    0,
    0,
    0,
    4191,
    4192,
    3,
    460,
    230,
    0,
    4192,
    4193,
    5,
    26,
    0,
    0,
    4193,
    4194,
    5,
    45,
    0,
    0,
    4194,
    4195,
    3,
    386,
    193,
    0,
    4195,
    4196,
    3,
    816,
    408,
    0,
    4196,
    813,
    1,
    0,
    0,
    0,
    4197,
    4198,
    3,
    468,
    234,
    0,
    4198,
    4199,
    5,
    26,
    0,
    0,
    4199,
    4200,
    3,
    766,
    383,
    0,
    4200,
    4201,
    3,
    816,
    408,
    0,
    4201,
    815,
    1,
    0,
    0,
    0,
    4202,
    4215,
    5,
    205,
    0,
    0,
    4203,
    4207,
    5,
    214,
    0,
    0,
    4204,
    4206,
    3,
    818,
    409,
    0,
    4205,
    4204,
    1,
    0,
    0,
    0,
    4206,
    4209,
    1,
    0,
    0,
    0,
    4207,
    4205,
    1,
    0,
    0,
    0,
    4207,
    4208,
    1,
    0,
    0,
    0,
    4208,
    4211,
    1,
    0,
    0,
    0,
    4209,
    4207,
    1,
    0,
    0,
    0,
    4210,
    4212,
    3,
    288,
    144,
    0,
    4211,
    4210,
    1,
    0,
    0,
    0,
    4211,
    4212,
    1,
    0,
    0,
    0,
    4212,
    4213,
    1,
    0,
    0,
    0,
    4213,
    4215,
    5,
    216,
    0,
    0,
    4214,
    4202,
    1,
    0,
    0,
    0,
    4214,
    4203,
    1,
    0,
    0,
    0,
    4215,
    817,
    1,
    0,
    0,
    0,
    4216,
    4222,
    3,
    578,
    289,
    0,
    4217,
    4222,
    3,
    758,
    379,
    0,
    4218,
    4222,
    3,
    774,
    387,
    0,
    4219,
    4222,
    3,
    788,
    394,
    0,
    4220,
    4222,
    3,
    820,
    410,
    0,
    4221,
    4216,
    1,
    0,
    0,
    0,
    4221,
    4217,
    1,
    0,
    0,
    0,
    4221,
    4218,
    1,
    0,
    0,
    0,
    4221,
    4219,
    1,
    0,
    0,
    0,
    4221,
    4220,
    1,
    0,
    0,
    0,
    4222,
    819,
    1,
    0,
    0,
    0,
    4223,
    4224,
    3,
    76,
    38,
    0,
    4224,
    4225,
    5,
    109,
    0,
    0,
    4225,
    4226,
    3,
    822,
    411,
    0,
    4226,
    821,
    1,
    0,
    0,
    0,
    4227,
    4229,
    3,
    410,
    205,
    0,
    4228,
    4227,
    1,
    0,
    0,
    0,
    4229,
    4232,
    1,
    0,
    0,
    0,
    4230,
    4228,
    1,
    0,
    0,
    0,
    4230,
    4231,
    1,
    0,
    0,
    0,
    4231,
    4233,
    1,
    0,
    0,
    0,
    4232,
    4230,
    1,
    0,
    0,
    0,
    4233,
    4234,
    3,
    766,
    383,
    0,
    4234,
    4235,
    3,
    770,
    385,
    0,
    4235,
    823,
    1,
    0,
    0,
    0,
    4236,
    4237,
    3,
    460,
    230,
    0,
    4237,
    4238,
    5,
    11,
    0,
    0,
    4238,
    4239,
    5,
    45,
    0,
    0,
    4239,
    4240,
    3,
    386,
    193,
    0,
    4240,
    4241,
    3,
    816,
    408,
    0,
    4241,
    825,
    1,
    0,
    0,
    0,
    4242,
    4243,
    3,
    468,
    234,
    0,
    4243,
    4244,
    5,
    11,
    0,
    0,
    4244,
    4245,
    3,
    766,
    383,
    0,
    4245,
    4246,
    3,
    816,
    408,
    0,
    4246,
    827,
    1,
    0,
    0,
    0,
    4247,
    4248,
    3,
    460,
    230,
    0,
    4248,
    4249,
    5,
    166,
    0,
    0,
    4249,
    4250,
    5,
    45,
    0,
    0,
    4250,
    4251,
    3,
    386,
    193,
    0,
    4251,
    4252,
    3,
    816,
    408,
    0,
    4252,
    829,
    1,
    0,
    0,
    0,
    4253,
    4254,
    3,
    468,
    234,
    0,
    4254,
    4255,
    5,
    166,
    0,
    0,
    4255,
    4256,
    3,
    766,
    383,
    0,
    4256,
    4257,
    3,
    816,
    408,
    0,
    4257,
    831,
    1,
    0,
    0,
    0,
    4258,
    4259,
    3,
    76,
    38,
    0,
    4259,
    4260,
    5,
    167,
    0,
    0,
    4260,
    4261,
    3,
    834,
    417,
    0,
    4261,
    833,
    1,
    0,
    0,
    0,
    4262,
    4266,
    3,
    226,
    113,
    0,
    4263,
    4265,
    3,
    200,
    100,
    0,
    4264,
    4263,
    1,
    0,
    0,
    0,
    4265,
    4268,
    1,
    0,
    0,
    0,
    4266,
    4264,
    1,
    0,
    0,
    0,
    4266,
    4267,
    1,
    0,
    0,
    0,
    4267,
    4269,
    1,
    0,
    0,
    0,
    4268,
    4266,
    1,
    0,
    0,
    0,
    4269,
    4270,
    3,
    770,
    385,
    0,
    4270,
    4289,
    1,
    0,
    0,
    0,
    4271,
    4273,
    3,
    410,
    205,
    0,
    4272,
    4271,
    1,
    0,
    0,
    0,
    4273,
    4276,
    1,
    0,
    0,
    0,
    4274,
    4272,
    1,
    0,
    0,
    0,
    4274,
    4275,
    1,
    0,
    0,
    0,
    4275,
    4277,
    1,
    0,
    0,
    0,
    4276,
    4274,
    1,
    0,
    0,
    0,
    4277,
    4284,
    5,
    133,
    0,
    0,
    4278,
    4280,
    3,
    410,
    205,
    0,
    4279,
    4278,
    1,
    0,
    0,
    0,
    4280,
    4281,
    1,
    0,
    0,
    0,
    4281,
    4279,
    1,
    0,
    0,
    0,
    4281,
    4282,
    1,
    0,
    0,
    0,
    4282,
    4284,
    1,
    0,
    0,
    0,
    4283,
    4274,
    1,
    0,
    0,
    0,
    4283,
    4279,
    1,
    0,
    0,
    0,
    4284,
    4285,
    1,
    0,
    0,
    0,
    4285,
    4286,
    3,
    766,
    383,
    0,
    4286,
    4287,
    3,
    770,
    385,
    0,
    4287,
    4289,
    1,
    0,
    0,
    0,
    4288,
    4262,
    1,
    0,
    0,
    0,
    4288,
    4283,
    1,
    0,
    0,
    0,
    4289,
    835,
    1,
    0,
    0,
    0,
    4290,
    4291,
    3,
    460,
    230,
    0,
    4291,
    4292,
    5,
    162,
    0,
    0,
    4292,
    4293,
    5,
    26,
    0,
    0,
    4293,
    4294,
    5,
    45,
    0,
    0,
    4294,
    4295,
    3,
    386,
    193,
    0,
    4295,
    4296,
    3,
    816,
    408,
    0,
    4296,
    837,
    1,
    0,
    0,
    0,
    4297,
    4298,
    3,
    468,
    234,
    0,
    4298,
    4299,
    5,
    162,
    0,
    0,
    4299,
    4300,
    5,
    26,
    0,
    0,
    4300,
    4301,
    3,
    766,
    383,
    0,
    4301,
    4302,
    3,
    816,
    408,
    0,
    4302,
    839,
    1,
    0,
    0,
    0,
    4303,
    4304,
    3,
    468,
    234,
    0,
    4304,
    4314,
    5,
    81,
    0,
    0,
    4305,
    4307,
    3,
    226,
    113,
    0,
    4306,
    4308,
    3,
    196,
    98,
    0,
    4307,
    4306,
    1,
    0,
    0,
    0,
    4307,
    4308,
    1,
    0,
    0,
    0,
    4308,
    4315,
    1,
    0,
    0,
    0,
    4309,
    4310,
    5,
    162,
    0,
    0,
    4310,
    4312,
    5,
    26,
    0,
    0,
    4311,
    4313,
    3,
    418,
    209,
    0,
    4312,
    4311,
    1,
    0,
    0,
    0,
    4312,
    4313,
    1,
    0,
    0,
    0,
    4313,
    4315,
    1,
    0,
    0,
    0,
    4314,
    4305,
    1,
    0,
    0,
    0,
    4314,
    4309,
    1,
    0,
    0,
    0,
    4315,
    4317,
    1,
    0,
    0,
    0,
    4316,
    4318,
    3,
    318,
    159,
    0,
    4317,
    4316,
    1,
    0,
    0,
    0,
    4317,
    4318,
    1,
    0,
    0,
    0,
    4318,
    4319,
    1,
    0,
    0,
    0,
    4319,
    4320,
    3,
    816,
    408,
    0,
    4320,
    841,
    1,
    0,
    0,
    0,
    4321,
    4322,
    3,
    460,
    230,
    0,
    4322,
    4323,
    5,
    169,
    0,
    0,
    4323,
    4324,
    5,
    45,
    0,
    0,
    4324,
    4325,
    3,
    386,
    193,
    0,
    4325,
    4326,
    3,
    844,
    422,
    0,
    4326,
    843,
    1,
    0,
    0,
    0,
    4327,
    4337,
    5,
    205,
    0,
    0,
    4328,
    4332,
    5,
    214,
    0,
    0,
    4329,
    4331,
    3,
    846,
    423,
    0,
    4330,
    4329,
    1,
    0,
    0,
    0,
    4331,
    4334,
    1,
    0,
    0,
    0,
    4332,
    4330,
    1,
    0,
    0,
    0,
    4332,
    4333,
    1,
    0,
    0,
    0,
    4333,
    4335,
    1,
    0,
    0,
    0,
    4334,
    4332,
    1,
    0,
    0,
    0,
    4335,
    4337,
    5,
    216,
    0,
    0,
    4336,
    4327,
    1,
    0,
    0,
    0,
    4336,
    4328,
    1,
    0,
    0,
    0,
    4337,
    845,
    1,
    0,
    0,
    0,
    4338,
    4342,
    3,
    390,
    195,
    0,
    4339,
    4342,
    3,
    364,
    182,
    0,
    4340,
    4342,
    3,
    848,
    424,
    0,
    4341,
    4338,
    1,
    0,
    0,
    0,
    4341,
    4339,
    1,
    0,
    0,
    0,
    4341,
    4340,
    1,
    0,
    0,
    0,
    4342,
    847,
    1,
    0,
    0,
    0,
    4343,
    4344,
    3,
    76,
    38,
    0,
    4344,
    4345,
    5,
    129,
    0,
    0,
    4345,
    4346,
    3,
    850,
    425,
    0,
    4346,
    849,
    1,
    0,
    0,
    0,
    4347,
    4349,
    3,
    226,
    113,
    0,
    4348,
    4350,
    3,
    196,
    98,
    0,
    4349,
    4348,
    1,
    0,
    0,
    0,
    4349,
    4350,
    1,
    0,
    0,
    0,
    4350,
    4351,
    1,
    0,
    0,
    0,
    4351,
    4352,
    3,
    422,
    211,
    0,
    4352,
    4369,
    1,
    0,
    0,
    0,
    4353,
    4355,
    3,
    410,
    205,
    0,
    4354,
    4353,
    1,
    0,
    0,
    0,
    4355,
    4358,
    1,
    0,
    0,
    0,
    4356,
    4354,
    1,
    0,
    0,
    0,
    4356,
    4357,
    1,
    0,
    0,
    0,
    4357,
    4359,
    1,
    0,
    0,
    0,
    4358,
    4356,
    1,
    0,
    0,
    0,
    4359,
    4366,
    5,
    130,
    0,
    0,
    4360,
    4362,
    3,
    410,
    205,
    0,
    4361,
    4360,
    1,
    0,
    0,
    0,
    4362,
    4363,
    1,
    0,
    0,
    0,
    4363,
    4361,
    1,
    0,
    0,
    0,
    4363,
    4364,
    1,
    0,
    0,
    0,
    4364,
    4366,
    1,
    0,
    0,
    0,
    4365,
    4356,
    1,
    0,
    0,
    0,
    4365,
    4361,
    1,
    0,
    0,
    0,
    4366,
    4367,
    1,
    0,
    0,
    0,
    4367,
    4369,
    3,
    416,
    208,
    0,
    4368,
    4347,
    1,
    0,
    0,
    0,
    4368,
    4365,
    1,
    0,
    0,
    0,
    4369,
    851,
    1,
    0,
    0,
    0,
    4370,
    4371,
    3,
    468,
    234,
    0,
    4371,
    4373,
    5,
    169,
    0,
    0,
    4372,
    4374,
    3,
    418,
    209,
    0,
    4373,
    4372,
    1,
    0,
    0,
    0,
    4373,
    4374,
    1,
    0,
    0,
    0,
    4374,
    4376,
    1,
    0,
    0,
    0,
    4375,
    4377,
    3,
    318,
    159,
    0,
    4376,
    4375,
    1,
    0,
    0,
    0,
    4376,
    4377,
    1,
    0,
    0,
    0,
    4377,
    4378,
    1,
    0,
    0,
    0,
    4378,
    4379,
    3,
    854,
    427,
    0,
    4379,
    853,
    1,
    0,
    0,
    0,
    4380,
    4390,
    5,
    205,
    0,
    0,
    4381,
    4385,
    5,
    214,
    0,
    0,
    4382,
    4384,
    3,
    856,
    428,
    0,
    4383,
    4382,
    1,
    0,
    0,
    0,
    4384,
    4387,
    1,
    0,
    0,
    0,
    4385,
    4383,
    1,
    0,
    0,
    0,
    4385,
    4386,
    1,
    0,
    0,
    0,
    4386,
    4388,
    1,
    0,
    0,
    0,
    4387,
    4385,
    1,
    0,
    0,
    0,
    4388,
    4390,
    5,
    216,
    0,
    0,
    4389,
    4380,
    1,
    0,
    0,
    0,
    4389,
    4381,
    1,
    0,
    0,
    0,
    4390,
    855,
    1,
    0,
    0,
    0,
    4391,
    4396,
    3,
    390,
    195,
    0,
    4392,
    4396,
    3,
    364,
    182,
    0,
    4393,
    4396,
    3,
    848,
    424,
    0,
    4394,
    4396,
    3,
    858,
    429,
    0,
    4395,
    4391,
    1,
    0,
    0,
    0,
    4395,
    4392,
    1,
    0,
    0,
    0,
    4395,
    4393,
    1,
    0,
    0,
    0,
    4395,
    4394,
    1,
    0,
    0,
    0,
    4396,
    857,
    1,
    0,
    0,
    0,
    4397,
    4400,
    5,
    62,
    0,
    0,
    4398,
    4401,
    3,
    860,
    430,
    0,
    4399,
    4401,
    3,
    862,
    431,
    0,
    4400,
    4398,
    1,
    0,
    0,
    0,
    4400,
    4399,
    1,
    0,
    0,
    0,
    4401,
    4402,
    1,
    0,
    0,
    0,
    4402,
    4403,
    3,
    46,
    23,
    0,
    4403,
    859,
    1,
    0,
    0,
    0,
    4404,
    4405,
    3,
    94,
    47,
    0,
    4405,
    861,
    1,
    0,
    0,
    0,
    4406,
    4407,
    3,
    96,
    48,
    0,
    4407,
    863,
    1,
    0,
    0,
    0,
    4408,
    4409,
    3,
    460,
    230,
    0,
    4409,
    4410,
    5,
    170,
    0,
    0,
    4410,
    4411,
    5,
    45,
    0,
    0,
    4411,
    4412,
    3,
    386,
    193,
    0,
    4412,
    4413,
    3,
    770,
    385,
    0,
    4413,
    865,
    1,
    0,
    0,
    0,
    4414,
    4415,
    3,
    468,
    234,
    0,
    4415,
    4416,
    5,
    170,
    0,
    0,
    4416,
    4417,
    3,
    766,
    383,
    0,
    4417,
    4418,
    3,
    770,
    385,
    0,
    4418,
    867,
    1,
    0,
    0,
    0,
    4419,
    4420,
    3,
    460,
    230,
    0,
    4420,
    4421,
    5,
    130,
    0,
    0,
    4421,
    4422,
    5,
    45,
    0,
    0,
    4422,
    4423,
    3,
    384,
    192,
    0,
    4423,
    869,
    1,
    0,
    0,
    0,
    4424,
    4425,
    3,
    468,
    234,
    0,
    4425,
    4426,
    5,
    130,
    0,
    0,
    4426,
    4427,
    3,
    416,
    208,
    0,
    4427,
    871,
    1,
    0,
    0,
    0,
    4428,
    4430,
    5,
    2,
    0,
    0,
    4429,
    4428,
    1,
    0,
    0,
    0,
    4429,
    4430,
    1,
    0,
    0,
    0,
    4430,
    4434,
    1,
    0,
    0,
    0,
    4431,
    4433,
    3,
    380,
    190,
    0,
    4432,
    4431,
    1,
    0,
    0,
    0,
    4433,
    4436,
    1,
    0,
    0,
    0,
    4434,
    4432,
    1,
    0,
    0,
    0,
    4434,
    4435,
    1,
    0,
    0,
    0,
    4435,
    4437,
    1,
    0,
    0,
    0,
    4436,
    4434,
    1,
    0,
    0,
    0,
    4437,
    4438,
    5,
    102,
    0,
    0,
    4438,
    4439,
    5,
    45,
    0,
    0,
    4439,
    4440,
    3,
    384,
    192,
    0,
    4440,
    873,
    1,
    0,
    0,
    0,
    4441,
    4442,
    3,
    220,
    110,
    0,
    4442,
    875,
    1,
    0,
    0,
    0,
    4443,
    4444,
    3,
    878,
    439,
    0,
    4444,
    877,
    1,
    0,
    0,
    0,
    4445,
    4447,
    5,
    127,
    0,
    0,
    4446,
    4445,
    1,
    0,
    0,
    0,
    4446,
    4447,
    1,
    0,
    0,
    0,
    4447,
    4449,
    1,
    0,
    0,
    0,
    4448,
    4450,
    7,
    19,
    0,
    0,
    4449,
    4448,
    1,
    0,
    0,
    0,
    4449,
    4450,
    1,
    0,
    0,
    0,
    4450,
    4451,
    1,
    0,
    0,
    0,
    4451,
    4453,
    3,
    232,
    116,
    0,
    4452,
    4454,
    3,
    196,
    98,
    0,
    4453,
    4452,
    1,
    0,
    0,
    0,
    4453,
    4454,
    1,
    0,
    0,
    0,
    4454,
    4456,
    1,
    0,
    0,
    0,
    4455,
    4457,
    3,
    318,
    159,
    0,
    4456,
    4455,
    1,
    0,
    0,
    0,
    4456,
    4457,
    1,
    0,
    0,
    0,
    4457,
    4458,
    1,
    0,
    0,
    0,
    4458,
    4459,
    3,
    348,
    174,
    0,
    4459,
    879,
    1,
    0,
    0,
    0,
    4460,
    4462,
    3,
    378,
    189,
    0,
    4461,
    4460,
    1,
    0,
    0,
    0,
    4461,
    4462,
    1,
    0,
    0,
    0,
    4462,
    4464,
    1,
    0,
    0,
    0,
    4463,
    4465,
    3,
    380,
    190,
    0,
    4464,
    4463,
    1,
    0,
    0,
    0,
    4465,
    4466,
    1,
    0,
    0,
    0,
    4466,
    4464,
    1,
    0,
    0,
    0,
    4466,
    4467,
    1,
    0,
    0,
    0,
    4467,
    4468,
    1,
    0,
    0,
    0,
    4468,
    4469,
    5,
    45,
    0,
    0,
    4469,
    4470,
    3,
    384,
    192,
    0,
    4470,
    881,
    1,
    0,
    0,
    0,
    4471,
    4473,
    3,
    412,
    206,
    0,
    4472,
    4474,
    3,
    410,
    205,
    0,
    4473,
    4472,
    1,
    0,
    0,
    0,
    4474,
    4475,
    1,
    0,
    0,
    0,
    4475,
    4473,
    1,
    0,
    0,
    0,
    4475,
    4476,
    1,
    0,
    0,
    0,
    4476,
    4477,
    1,
    0,
    0,
    0,
    4477,
    4478,
    3,
    416,
    208,
    0,
    4478,
    883,
    1,
    0,
    0,
    0,
    4479,
    4482,
    3,
    94,
    47,
    0,
    4480,
    4482,
    3,
    886,
    443,
    0,
    4481,
    4479,
    1,
    0,
    0,
    0,
    4481,
    4480,
    1,
    0,
    0,
    0,
    4482,
    885,
    1,
    0,
    0,
    0,
    4483,
    4484,
    3,
    88,
    44,
    0,
    4484,
    4485,
    5,
    183,
    0,
    0,
    4485,
    4488,
    5,
    198,
    0,
    0,
    4486,
    4487,
    5,
    183,
    0,
    0,
    4487,
    4489,
    5,
    179,
    0,
    0,
    4488,
    4486,
    1,
    0,
    0,
    0,
    4488,
    4489,
    1,
    0,
    0,
    0,
    4489,
    887,
    1,
    0,
    0,
    0,
    4490,
    4492,
    3,
    418,
    209,
    0,
    4491,
    4490,
    1,
    0,
    0,
    0,
    4491,
    4492,
    1,
    0,
    0,
    0,
    4492,
    4494,
    1,
    0,
    0,
    0,
    4493,
    4495,
    3,
    318,
    159,
    0,
    4494,
    4493,
    1,
    0,
    0,
    0,
    4494,
    4495,
    1,
    0,
    0,
    0,
    4495,
    889,
    1,
    0,
    0,
    0,
    4496,
    4497,
    1,
    0,
    0,
    0,
    4497,
    891,
    1,
    0,
    0,
    0,
    4498,
    4499,
    1,
    0,
    0,
    0,
    4499,
    893,
    1,
    0,
    0,
    0,
    4500,
    4501,
    1,
    0,
    0,
    0,
    4501,
    895,
    1,
    0,
    0,
    0,
    4502,
    4503,
    1,
    0,
    0,
    0,
    4503,
    897,
    1,
    0,
    0,
    0,
    4504,
    4505,
    5,
    218,
    0,
    0,
    4505,
    899,
    1,
    0,
    0,
    0,
    4506,
    4507,
    5,
    218,
    0,
    0,
    4507,
    901,
    1,
    0,
    0,
    0,
    4508,
    4509,
    1,
    0,
    0,
    0,
    4509,
    903,
    1,
    0,
    0,
    0,
    510,
    919,
    975,
    982,
    998,
    1e3,
    1002,
    1012,
    1022,
    1033,
    1036,
    1041,
    1056,
    1065,
    1073,
    1085,
    1104,
    1118,
    1125,
    1133,
    1137,
    1141,
    1145,
    1150,
    1155,
    1158,
    1165,
    1174,
    1182,
    1189,
    1199,
    1203,
    1211,
    1214,
    1216,
    1220,
    1226,
    1230,
    1236,
    1238,
    1247,
    1255,
    1263,
    1270,
    1274,
    1279,
    1282,
    1288,
    1302,
    1305,
    1313,
    1320,
    1326,
    1330,
    1337,
    1342,
    1349,
    1352,
    1358,
    1364,
    1366,
    1374,
    1402,
    1414,
    1422,
    1427,
    1431,
    1434,
    1437,
    1441,
    1443,
    1448,
    1457,
    1467,
    1476,
    1485,
    1494,
    1503,
    1511,
    1515,
    1521,
    1525,
    1527,
    1542,
    1550,
    1555,
    1557,
    1565,
    1574,
    1584,
    1589,
    1591,
    1599,
    1608,
    1618,
    1626,
    1634,
    1642,
    1647,
    1662,
    1665,
    1668,
    1672,
    1677,
    1686,
    1691,
    1693,
    1706,
    1709,
    1713,
    1716,
    1720,
    1723,
    1728,
    1733,
    1736,
    1739,
    1742,
    1745,
    1751,
    1756,
    1766,
    1768,
    1773,
    1778,
    1782,
    1787,
    1794,
    1797,
    1803,
    1811,
    1825,
    1831,
    1834,
    1839,
    1846,
    1849,
    1854,
    1858,
    1860,
    1864,
    1868,
    1870,
    1872,
    1879,
    1886,
    1894,
    1903,
    1920,
    1928,
    1930,
    1937,
    1944,
    1951,
    1956,
    1958,
    1971,
    1979,
    1987,
    1992,
    1994,
    2007,
    2012,
    2014,
    2022,
    2031,
    2041,
    2046,
    2049,
    2087,
    2090,
    2093,
    2099,
    2102,
    2107,
    2109,
    2116,
    2126,
    2134,
    2139,
    2158,
    2161,
    2164,
    2170,
    2172,
    2185,
    2188,
    2191,
    2197,
    2199,
    2210,
    2224,
    2229,
    2231,
    2235,
    2248,
    2261,
    2268,
    2272,
    2281,
    2302,
    2306,
    2313,
    2316,
    2323,
    2326,
    2330,
    2337,
    2339,
    2344,
    2348,
    2352,
    2356,
    2360,
    2362,
    2367,
    2370,
    2375,
    2382,
    2384,
    2393,
    2402,
    2404,
    2410,
    2414,
    2421,
    2434,
    2441,
    2452,
    2458,
    2465,
    2476,
    2479,
    2484,
    2489,
    2491,
    2500,
    2509,
    2511,
    2515,
    2521,
    2526,
    2529,
    2533,
    2536,
    2543,
    2550,
    2556,
    2564,
    2571,
    2575,
    2583,
    2586,
    2593,
    2602,
    2611,
    2616,
    2648,
    2652,
    2659,
    2664,
    2671,
    2674,
    2681,
    2685,
    2692,
    2698,
    2703,
    2710,
    2713,
    2723,
    2742,
    2745,
    2748,
    2751,
    2755,
    2764,
    2770,
    2774,
    2780,
    2783,
    2786,
    2797,
    2810,
    2823,
    2827,
    2830,
    2833,
    2839,
    2856,
    2874,
    2897,
    2905,
    2920,
    2932,
    2934,
    2938,
    2943,
    2950,
    2959,
    2963,
    2968,
    2977,
    2983,
    2994,
    2997,
    3002,
    3014,
    3021,
    3027,
    3038,
    3042,
    3044,
    3056,
    3101,
    3104,
    3108,
    3112,
    3118,
    3132,
    3140,
    3142,
    3153,
    3155,
    3174,
    3178,
    3184,
    3189,
    3199,
    3208,
    3219,
    3222,
    3226,
    3229,
    3233,
    3247,
    3255,
    3260,
    3275,
    3279,
    3283,
    3296,
    3299,
    3303,
    3310,
    3316,
    3348,
    3352,
    3359,
    3363,
    3369,
    3373,
    3381,
    3384,
    3388,
    3410,
    3413,
    3422,
    3426,
    3428,
    3431,
    3441,
    3445,
    3449,
    3455,
    3459,
    3462,
    3467,
    3473,
    3480,
    3487,
    3494,
    3503,
    3511,
    3517,
    3520,
    3523,
    3533,
    3538,
    3543,
    3547,
    3549,
    3554,
    3559,
    3565,
    3571,
    3586,
    3599,
    3605,
    3609,
    3620,
    3622,
    3630,
    3632,
    3638,
    3650,
    3657,
    3667,
    3672,
    3689,
    3691,
    3708,
    3714,
    3718,
    3722,
    3728,
    3736,
    3741,
    3759,
    3770,
    3797,
    3803,
    3807,
    3813,
    3817,
    3819,
    3822,
    3828,
    3831,
    3838,
    3841,
    3844,
    3855,
    3858,
    3861,
    3866,
    3869,
    3873,
    3875,
    3897,
    3904,
    3908,
    3915,
    3919,
    3926,
    3930,
    3937,
    3941,
    3966,
    3971,
    3975,
    3979,
    3999,
    4003,
    4007,
    4012,
    4015,
    4028,
    4032,
    4041,
    4050,
    4063,
    4070,
    4077,
    4079,
    4084,
    4092,
    4099,
    4106,
    4108,
    4113,
    4122,
    4134,
    4147,
    4150,
    4155,
    4159,
    4161,
    4164,
    4168,
    4207,
    4211,
    4214,
    4221,
    4230,
    4266,
    4274,
    4281,
    4283,
    4288,
    4307,
    4312,
    4314,
    4317,
    4332,
    4336,
    4341,
    4349,
    4356,
    4363,
    4365,
    4368,
    4373,
    4376,
    4385,
    4389,
    4395,
    4400,
    4429,
    4434,
    4446,
    4449,
    4453,
    4456,
    4461,
    4466,
    4475,
    4481,
    4488,
    4491,
    4494
  ];
  static __ATN;
  static get _ATN() {
    if (!_SysMLv2Parser.__ATN) {
      _SysMLv2Parser.__ATN = new ATNDeserializer().deserialize(_SysMLv2Parser._serializedATN);
    }
    return _SysMLv2Parser.__ATN;
  }
  static vocabulary = new Vocabulary(_SysMLv2Parser.literalNames, _SysMLv2Parser.symbolicNames, []);
  get vocabulary() {
    return _SysMLv2Parser.vocabulary;
  }
  static decisionsToDFA = _SysMLv2Parser._ATN.decisionToState.map((ds, index2) => new DFA(ds, index2));
};
var OwnedExpressionContext = class _OwnedExpressionContext extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  IF() {
    return this.getToken(SysMLv2Parser.IF, 0);
  }
  ownedExpression(i) {
    if (i === void 0) {
      return this.getRuleContexts(_OwnedExpressionContext);
    }
    return this.getRuleContext(i, _OwnedExpressionContext);
  }
  QUESTION() {
    return this.getToken(SysMLv2Parser.QUESTION, 0);
  }
  ELSE() {
    return this.getToken(SysMLv2Parser.ELSE, 0);
  }
  PLUS() {
    return this.getToken(SysMLv2Parser.PLUS, 0);
  }
  MINUS() {
    return this.getToken(SysMLv2Parser.MINUS, 0);
  }
  TILDE() {
    return this.getToken(SysMLv2Parser.TILDE, 0);
  }
  NOT() {
    return this.getToken(SysMLv2Parser.NOT, 0);
  }
  typeReference() {
    return this.getRuleContext(0, TypeReferenceContext);
  }
  AT_SIGN() {
    return this.getToken(SysMLv2Parser.AT_SIGN, 0);
  }
  AT_AT() {
    return this.getToken(SysMLv2Parser.AT_AT, 0);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  baseExpression() {
    return this.getRuleContext(0, BaseExpressionContext);
  }
  QUESTION_QUESTION() {
    return this.getToken(SysMLv2Parser.QUESTION_QUESTION, 0);
  }
  IMPLIES() {
    return this.getToken(SysMLv2Parser.IMPLIES, 0);
  }
  OR() {
    return this.getToken(SysMLv2Parser.OR, 0);
  }
  AND() {
    return this.getToken(SysMLv2Parser.AND, 0);
  }
  XOR() {
    return this.getToken(SysMLv2Parser.XOR, 0);
  }
  PIPE() {
    return this.getToken(SysMLv2Parser.PIPE, 0);
  }
  AMP() {
    return this.getToken(SysMLv2Parser.AMP, 0);
  }
  EQ_EQ() {
    return this.getToken(SysMLv2Parser.EQ_EQ, 0);
  }
  BANG_EQ() {
    return this.getToken(SysMLv2Parser.BANG_EQ, 0);
  }
  EQ_EQ_EQ() {
    return this.getToken(SysMLv2Parser.EQ_EQ_EQ, 0);
  }
  BANG_EQ_EQ() {
    return this.getToken(SysMLv2Parser.BANG_EQ_EQ, 0);
  }
  LT() {
    return this.getToken(SysMLv2Parser.LT, 0);
  }
  GT() {
    return this.getToken(SysMLv2Parser.GT, 0);
  }
  LE() {
    return this.getToken(SysMLv2Parser.LE, 0);
  }
  GE() {
    return this.getToken(SysMLv2Parser.GE, 0);
  }
  DOT_DOT() {
    return this.getToken(SysMLv2Parser.DOT_DOT, 0);
  }
  STAR() {
    return this.getToken(SysMLv2Parser.STAR, 0);
  }
  SLASH() {
    return this.getToken(SysMLv2Parser.SLASH, 0);
  }
  PERCENT() {
    return this.getToken(SysMLv2Parser.PERCENT, 0);
  }
  STAR_STAR() {
    return this.getToken(SysMLv2Parser.STAR_STAR, 0);
  }
  CARET() {
    return this.getToken(SysMLv2Parser.CARET, 0);
  }
  ISTYPE() {
    return this.getToken(SysMLv2Parser.ISTYPE, 0);
  }
  HASTYPE() {
    return this.getToken(SysMLv2Parser.HASTYPE, 0);
  }
  AS() {
    return this.getToken(SysMLv2Parser.AS, 0);
  }
  META() {
    return this.getToken(SysMLv2Parser.META, 0);
  }
  LBRACK() {
    return this.getToken(SysMLv2Parser.LBRACK, 0);
  }
  RBRACK() {
    return this.getToken(SysMLv2Parser.RBRACK, 0);
  }
  sequenceExpressionList() {
    return this.getRuleContext(0, SequenceExpressionListContext);
  }
  HASH() {
    return this.getToken(SysMLv2Parser.HASH, 0);
  }
  LPAREN() {
    return this.getToken(SysMLv2Parser.LPAREN, 0);
  }
  RPAREN() {
    return this.getToken(SysMLv2Parser.RPAREN, 0);
  }
  argumentList() {
    return this.getRuleContext(0, ArgumentListContext);
  }
  DOT() {
    return this.getToken(SysMLv2Parser.DOT, 0);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  DOT_QUESTION() {
    return this.getToken(SysMLv2Parser.DOT_QUESTION, 0);
  }
  bodyExpression() {
    return this.getRuleContext(0, BodyExpressionContext);
  }
  ARROW() {
    return this.getToken(SysMLv2Parser.ARROW, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedExpression;
  }
  enterRule(listener) {
    if (listener.enterOwnedExpression) {
      listener.enterOwnedExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedExpression) {
      listener.exitOwnedExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedExpression) {
      return visitor.visitOwnedExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeReferenceContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeReference;
  }
  enterRule(listener) {
    if (listener.enterTypeReference) {
      listener.enterTypeReference(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeReference) {
      listener.exitTypeReference(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeReference) {
      return visitor.visitTypeReference(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SequenceExpressionListContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedExpression(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedExpressionContext);
    }
    return this.getRuleContext(i, OwnedExpressionContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_sequenceExpressionList;
  }
  enterRule(listener) {
    if (listener.enterSequenceExpressionList) {
      listener.enterSequenceExpressionList(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSequenceExpressionList) {
      listener.exitSequenceExpressionList(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSequenceExpressionList) {
      return visitor.visitSequenceExpressionList(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BaseExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nullExpression() {
    return this.getRuleContext(0, NullExpressionContext);
  }
  REGULAR_COMMENT() {
    return this.getToken(SysMLv2Parser.REGULAR_COMMENT, 0);
  }
  literalExpression() {
    return this.getRuleContext(0, LiteralExpressionContext);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  argumentList() {
    return this.getRuleContext(0, ArgumentListContext);
  }
  DOT() {
    return this.getToken(SysMLv2Parser.DOT, 0);
  }
  METADATA() {
    return this.getToken(SysMLv2Parser.METADATA, 0);
  }
  constructorExpression() {
    return this.getRuleContext(0, ConstructorExpressionContext);
  }
  bodyExpression() {
    return this.getRuleContext(0, BodyExpressionContext);
  }
  LPAREN() {
    return this.getToken(SysMLv2Parser.LPAREN, 0);
  }
  AS() {
    return this.getToken(SysMLv2Parser.AS, 0);
  }
  typeReference() {
    return this.getRuleContext(0, TypeReferenceContext);
  }
  RPAREN() {
    return this.getToken(SysMLv2Parser.RPAREN, 0);
  }
  sequenceExpressionList() {
    return this.getRuleContext(0, SequenceExpressionListContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_baseExpression;
  }
  enterRule(listener) {
    if (listener.enterBaseExpression) {
      listener.enterBaseExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBaseExpression) {
      listener.exitBaseExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBaseExpression) {
      return visitor.visitBaseExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NullExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  NULL() {
    return this.getToken(SysMLv2Parser.NULL, 0);
  }
  LPAREN() {
    return this.getToken(SysMLv2Parser.LPAREN, 0);
  }
  RPAREN() {
    return this.getToken(SysMLv2Parser.RPAREN, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nullExpression;
  }
  enterRule(listener) {
    if (listener.enterNullExpression) {
      listener.enterNullExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNullExpression) {
      listener.exitNullExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNullExpression) {
      return visitor.visitNullExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureReferenceExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureReferenceExpression;
  }
  enterRule(listener) {
    if (listener.enterFeatureReferenceExpression) {
      listener.enterFeatureReferenceExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureReferenceExpression) {
      listener.exitFeatureReferenceExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureReferenceExpression) {
      return visitor.visitFeatureReferenceExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConstructorExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  NEW() {
    return this.getToken(SysMLv2Parser.NEW, 0);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  argumentList() {
    return this.getRuleContext(0, ArgumentListContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_constructorExpression;
  }
  enterRule(listener) {
    if (listener.enterConstructorExpression) {
      listener.enterConstructorExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConstructorExpression) {
      listener.exitConstructorExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConstructorExpression) {
      return visitor.visitConstructorExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BodyExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  functionBodyPart() {
    return this.getRuleContext(0, FunctionBodyPartContext);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_bodyExpression;
  }
  enterRule(listener) {
    if (listener.enterBodyExpression) {
      listener.enterBodyExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBodyExpression) {
      listener.exitBodyExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBodyExpression) {
      return visitor.visitBodyExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ArgumentListContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LPAREN() {
    return this.getToken(SysMLv2Parser.LPAREN, 0);
  }
  RPAREN() {
    return this.getToken(SysMLv2Parser.RPAREN, 0);
  }
  positionalArgumentList() {
    return this.getRuleContext(0, PositionalArgumentListContext);
  }
  namedArgumentList() {
    return this.getRuleContext(0, NamedArgumentListContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_argumentList;
  }
  enterRule(listener) {
    if (listener.enterArgumentList) {
      listener.enterArgumentList(this);
    }
  }
  exitRule(listener) {
    if (listener.exitArgumentList) {
      listener.exitArgumentList(this);
    }
  }
  accept(visitor) {
    if (visitor.visitArgumentList) {
      return visitor.visitArgumentList(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PositionalArgumentListContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedExpression(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedExpressionContext);
    }
    return this.getRuleContext(i, OwnedExpressionContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_positionalArgumentList;
  }
  enterRule(listener) {
    if (listener.enterPositionalArgumentList) {
      listener.enterPositionalArgumentList(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPositionalArgumentList) {
      listener.exitPositionalArgumentList(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPositionalArgumentList) {
      return visitor.visitPositionalArgumentList(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamedArgumentListContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  namedArgument(i) {
    if (i === void 0) {
      return this.getRuleContexts(NamedArgumentContext);
    }
    return this.getRuleContext(i, NamedArgumentContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namedArgumentList;
  }
  enterRule(listener) {
    if (listener.enterNamedArgumentList) {
      listener.enterNamedArgumentList(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamedArgumentList) {
      listener.exitNamedArgumentList(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamedArgumentList) {
      return visitor.visitNamedArgumentList(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamedArgumentContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  EQ() {
    return this.getToken(SysMLv2Parser.EQ, 0);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namedArgument;
  }
  enterRule(listener) {
    if (listener.enterNamedArgument) {
      listener.enterNamedArgument(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamedArgument) {
      listener.exitNamedArgument(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamedArgument) {
      return visitor.visitNamedArgument(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var LiteralExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  literalBoolean() {
    return this.getRuleContext(0, LiteralBooleanContext);
  }
  literalString() {
    return this.getRuleContext(0, LiteralStringContext);
  }
  literalInteger() {
    return this.getRuleContext(0, LiteralIntegerContext);
  }
  literalReal() {
    return this.getRuleContext(0, LiteralRealContext);
  }
  literalInfinity() {
    return this.getRuleContext(0, LiteralInfinityContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_literalExpression;
  }
  enterRule(listener) {
    if (listener.enterLiteralExpression) {
      listener.enterLiteralExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitLiteralExpression) {
      listener.exitLiteralExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitLiteralExpression) {
      return visitor.visitLiteralExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var LiteralBooleanContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  TRUE() {
    return this.getToken(SysMLv2Parser.TRUE, 0);
  }
  FALSE() {
    return this.getToken(SysMLv2Parser.FALSE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_literalBoolean;
  }
  enterRule(listener) {
    if (listener.enterLiteralBoolean) {
      listener.enterLiteralBoolean(this);
    }
  }
  exitRule(listener) {
    if (listener.exitLiteralBoolean) {
      listener.exitLiteralBoolean(this);
    }
  }
  accept(visitor) {
    if (visitor.visitLiteralBoolean) {
      return visitor.visitLiteralBoolean(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var LiteralStringContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DOUBLE_STRING() {
    return this.getToken(SysMLv2Parser.DOUBLE_STRING, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_literalString;
  }
  enterRule(listener) {
    if (listener.enterLiteralString) {
      listener.enterLiteralString(this);
    }
  }
  exitRule(listener) {
    if (listener.exitLiteralString) {
      listener.exitLiteralString(this);
    }
  }
  accept(visitor) {
    if (visitor.visitLiteralString) {
      return visitor.visitLiteralString(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var LiteralIntegerContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  INTEGER() {
    return this.getToken(SysMLv2Parser.INTEGER, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_literalInteger;
  }
  enterRule(listener) {
    if (listener.enterLiteralInteger) {
      listener.enterLiteralInteger(this);
    }
  }
  exitRule(listener) {
    if (listener.exitLiteralInteger) {
      listener.exitLiteralInteger(this);
    }
  }
  accept(visitor) {
    if (visitor.visitLiteralInteger) {
      return visitor.visitLiteralInteger(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var LiteralRealContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  REAL() {
    return this.getToken(SysMLv2Parser.REAL, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_literalReal;
  }
  enterRule(listener) {
    if (listener.enterLiteralReal) {
      listener.enterLiteralReal(this);
    }
  }
  exitRule(listener) {
    if (listener.exitLiteralReal) {
      listener.exitLiteralReal(this);
    }
  }
  accept(visitor) {
    if (visitor.visitLiteralReal) {
      return visitor.visitLiteralReal(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var LiteralInfinityContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  STAR() {
    return this.getToken(SysMLv2Parser.STAR, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_literalInfinity;
  }
  enterRule(listener) {
    if (listener.enterLiteralInfinity) {
      listener.enterLiteralInfinity(this);
    }
  }
  exitRule(listener) {
    if (listener.exitLiteralInfinity) {
      listener.exitLiteralInfinity(this);
    }
  }
  accept(visitor) {
    if (visitor.visitLiteralInfinity) {
      return visitor.visitLiteralInfinity(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ArgumentMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_argumentMember;
  }
  enterRule(listener) {
    if (listener.enterArgumentMember) {
      listener.enterArgumentMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitArgumentMember) {
      listener.exitArgumentMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitArgumentMember) {
      return visitor.visitArgumentMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ArgumentExpressionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_argumentExpressionMember;
  }
  enterRule(listener) {
    if (listener.enterArgumentExpressionMember) {
      listener.enterArgumentExpressionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitArgumentExpressionMember) {
      listener.exitArgumentExpressionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitArgumentExpressionMember) {
      return visitor.visitArgumentExpressionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NameContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  IDENTIFIER() {
    return this.getToken(SysMLv2Parser.IDENTIFIER, 0);
  }
  STRING() {
    return this.getToken(SysMLv2Parser.STRING, 0);
  }
  unreservedKeyword() {
    return this.getRuleContext(0, UnreservedKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_name;
  }
  enterRule(listener) {
    if (listener.enterName) {
      listener.enterName(this);
    }
  }
  exitRule(listener) {
    if (listener.exitName) {
      listener.exitName(this);
    }
  }
  accept(visitor) {
    if (visitor.visitName) {
      return visitor.visitName(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UnreservedKeywordContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  TYPE() {
    return this.getToken(SysMLv2Parser.TYPE, 0);
  }
  MULTIPLICITY() {
    return this.getToken(SysMLv2Parser.MULTIPLICITY, 0);
  }
  VAR() {
    return this.getToken(SysMLv2Parser.VAR, 0);
  }
  LANGUAGE() {
    return this.getToken(SysMLv2Parser.LANGUAGE, 0);
  }
  LOCALE() {
    return this.getToken(SysMLv2Parser.LOCALE, 0);
  }
  CROSSES() {
    return this.getToken(SysMLv2Parser.CROSSES, 0);
  }
  STEP() {
    return this.getToken(SysMLv2Parser.STEP, 0);
  }
  FEATURE() {
    return this.getToken(SysMLv2Parser.FEATURE, 0);
  }
  BEHAVIOR() {
    return this.getToken(SysMLv2Parser.BEHAVIOR, 0);
  }
  FUNCTION() {
    return this.getToken(SysMLv2Parser.FUNCTION, 0);
  }
  MEMBER() {
    return this.getToken(SysMLv2Parser.MEMBER, 0);
  }
  PREDICATE() {
    return this.getToken(SysMLv2Parser.PREDICATE, 0);
  }
  INTERACTION() {
    return this.getToken(SysMLv2Parser.INTERACTION, 0);
  }
  METACLASS() {
    return this.getToken(SysMLv2Parser.METACLASS, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_unreservedKeyword;
  }
  enterRule(listener) {
    if (listener.enterUnreservedKeyword) {
      listener.enterUnreservedKeyword(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUnreservedKeyword) {
      listener.exitUnreservedKeyword(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUnreservedKeyword) {
      return visitor.visitUnreservedKeyword(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IdentificationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LT() {
    return this.getToken(SysMLv2Parser.LT, 0);
  }
  name(i) {
    if (i === void 0) {
      return this.getRuleContexts(NameContext);
    }
    return this.getRuleContext(i, NameContext);
  }
  GT() {
    return this.getToken(SysMLv2Parser.GT, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_identification;
  }
  enterRule(listener) {
    if (listener.enterIdentification) {
      listener.enterIdentification(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIdentification) {
      listener.exitIdentification(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIdentification) {
      return visitor.visitIdentification(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RelationshipBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  relationshipOwnedElement(i) {
    if (i === void 0) {
      return this.getRuleContexts(RelationshipOwnedElementContext);
    }
    return this.getRuleContext(i, RelationshipOwnedElementContext);
  }
  ownedAnnotation(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedAnnotationContext);
    }
    return this.getRuleContext(i, OwnedAnnotationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_relationshipBody;
  }
  enterRule(listener) {
    if (listener.enterRelationshipBody) {
      listener.enterRelationshipBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRelationshipBody) {
      listener.exitRelationshipBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRelationshipBody) {
      return visitor.visitRelationshipBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RelationshipOwnedElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedRelatedElement() {
    return this.getRuleContext(0, OwnedRelatedElementContext);
  }
  ownedAnnotation() {
    return this.getRuleContext(0, OwnedAnnotationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_relationshipOwnedElement;
  }
  enterRule(listener) {
    if (listener.enterRelationshipOwnedElement) {
      listener.enterRelationshipOwnedElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRelationshipOwnedElement) {
      listener.exitRelationshipOwnedElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRelationshipOwnedElement) {
      return visitor.visitRelationshipOwnedElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedRelatedElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonFeatureElement() {
    return this.getRuleContext(0, NonFeatureElementContext);
  }
  featureElement() {
    return this.getRuleContext(0, FeatureElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedRelatedElement;
  }
  enterRule(listener) {
    if (listener.enterOwnedRelatedElement) {
      listener.enterOwnedRelatedElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedRelatedElement) {
      listener.exitOwnedRelatedElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedRelatedElement) {
      return visitor.visitOwnedRelatedElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DependencyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DEPENDENCY() {
    return this.getToken(SysMLv2Parser.DEPENDENCY, 0);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  prefixMetadataAnnotation(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataAnnotationContext);
    }
    return this.getRuleContext(i, PrefixMetadataAnnotationContext);
  }
  FROM() {
    return this.getToken(SysMLv2Parser.FROM, 0);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  dependencyDeclaration() {
    return this.getRuleContext(0, DependencyDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_dependency;
  }
  enterRule(listener) {
    if (listener.enterDependency) {
      listener.enterDependency(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDependency) {
      listener.exitDependency(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDependency) {
      return visitor.visitDependency(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AnnotationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_annotation;
  }
  enterRule(listener) {
    if (listener.enterAnnotation) {
      listener.enterAnnotation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAnnotation) {
      listener.exitAnnotation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAnnotation) {
      return visitor.visitAnnotation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedAnnotationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  annotatingElement() {
    return this.getRuleContext(0, AnnotatingElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedAnnotation;
  }
  enterRule(listener) {
    if (listener.enterOwnedAnnotation) {
      listener.enterOwnedAnnotation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedAnnotation) {
      listener.exitOwnedAnnotation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedAnnotation) {
      return visitor.visitOwnedAnnotation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AnnotatingElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  comment() {
    return this.getRuleContext(0, CommentContext);
  }
  documentation() {
    return this.getRuleContext(0, DocumentationContext);
  }
  textualRepresentation() {
    return this.getRuleContext(0, TextualRepresentationContext);
  }
  metadataFeature() {
    return this.getRuleContext(0, MetadataFeatureContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_annotatingElement;
  }
  enterRule(listener) {
    if (listener.enterAnnotatingElement) {
      listener.enterAnnotatingElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAnnotatingElement) {
      listener.exitAnnotatingElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAnnotatingElement) {
      return visitor.visitAnnotatingElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CommentContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  REGULAR_COMMENT() {
    return this.getToken(SysMLv2Parser.REGULAR_COMMENT, 0);
  }
  COMMENT() {
    return this.getToken(SysMLv2Parser.COMMENT, 0);
  }
  LOCALE() {
    return this.getToken(SysMLv2Parser.LOCALE, 0);
  }
  DOUBLE_STRING() {
    return this.getToken(SysMLv2Parser.DOUBLE_STRING, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  ABOUT() {
    return this.getToken(SysMLv2Parser.ABOUT, 0);
  }
  annotation(i) {
    if (i === void 0) {
      return this.getRuleContexts(AnnotationContext);
    }
    return this.getRuleContext(i, AnnotationContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_comment;
  }
  enterRule(listener) {
    if (listener.enterComment) {
      listener.enterComment(this);
    }
  }
  exitRule(listener) {
    if (listener.exitComment) {
      listener.exitComment(this);
    }
  }
  accept(visitor) {
    if (visitor.visitComment) {
      return visitor.visitComment(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DocumentationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DOC() {
    return this.getToken(SysMLv2Parser.DOC, 0);
  }
  REGULAR_COMMENT() {
    return this.getToken(SysMLv2Parser.REGULAR_COMMENT, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  LOCALE() {
    return this.getToken(SysMLv2Parser.LOCALE, 0);
  }
  DOUBLE_STRING() {
    return this.getToken(SysMLv2Parser.DOUBLE_STRING, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_documentation;
  }
  enterRule(listener) {
    if (listener.enterDocumentation) {
      listener.enterDocumentation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDocumentation) {
      listener.exitDocumentation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDocumentation) {
      return visitor.visitDocumentation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TextualRepresentationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LANGUAGE() {
    return this.getToken(SysMLv2Parser.LANGUAGE, 0);
  }
  DOUBLE_STRING() {
    return this.getToken(SysMLv2Parser.DOUBLE_STRING, 0);
  }
  REGULAR_COMMENT() {
    return this.getToken(SysMLv2Parser.REGULAR_COMMENT, 0);
  }
  REP() {
    return this.getToken(SysMLv2Parser.REP, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_textualRepresentation;
  }
  enterRule(listener) {
    if (listener.enterTextualRepresentation) {
      listener.enterTextualRepresentation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTextualRepresentation) {
      listener.exitTextualRepresentation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTextualRepresentation) {
      return visitor.visitTextualRepresentation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RootNamespaceContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  EOF() {
    return this.getToken(SysMLv2Parser.EOF, 0);
  }
  packageBodyElement(i) {
    if (i === void 0) {
      return this.getRuleContexts(PackageBodyElementContext);
    }
    return this.getRuleContext(i, PackageBodyElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_rootNamespace;
  }
  enterRule(listener) {
    if (listener.enterRootNamespace) {
      listener.enterRootNamespace(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRootNamespace) {
      listener.exitRootNamespace(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRootNamespace) {
      return visitor.visitRootNamespace(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  namespaceDeclaration() {
    return this.getRuleContext(0, NamespaceDeclarationContext);
  }
  namespaceBody() {
    return this.getRuleContext(0, NamespaceBodyContext);
  }
  prefixMetadataMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataMemberContext);
    }
    return this.getRuleContext(i, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespace;
  }
  enterRule(listener) {
    if (listener.enterNamespace) {
      listener.enterNamespace(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespace) {
      listener.exitNamespace(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespace) {
      return visitor.visitNamespace(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  NAMESPACE() {
    return this.getToken(SysMLv2Parser.NAMESPACE, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceDeclaration;
  }
  enterRule(listener) {
    if (listener.enterNamespaceDeclaration) {
      listener.enterNamespaceDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceDeclaration) {
      listener.exitNamespaceDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceDeclaration) {
      return visitor.visitNamespaceDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  namespaceBodyElement(i) {
    if (i === void 0) {
      return this.getRuleContexts(NamespaceBodyElementContext);
    }
    return this.getRuleContext(i, NamespaceBodyElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceBody;
  }
  enterRule(listener) {
    if (listener.enterNamespaceBody) {
      listener.enterNamespaceBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceBody) {
      listener.exitNamespaceBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceBody) {
      return visitor.visitNamespaceBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceBodyElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  namespaceMember() {
    return this.getRuleContext(0, NamespaceMemberContext);
  }
  aliasMember() {
    return this.getRuleContext(0, AliasMemberContext);
  }
  importRule() {
    return this.getRuleContext(0, ImportRuleContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceBodyElement;
  }
  enterRule(listener) {
    if (listener.enterNamespaceBodyElement) {
      listener.enterNamespaceBodyElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceBodyElement) {
      listener.exitNamespaceBodyElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceBodyElement) {
      return visitor.visitNamespaceBodyElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MemberPrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  visibilityIndicator() {
    return this.getRuleContext(0, VisibilityIndicatorContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_memberPrefix;
  }
  enterRule(listener) {
    if (listener.enterMemberPrefix) {
      listener.enterMemberPrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMemberPrefix) {
      listener.exitMemberPrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMemberPrefix) {
      return visitor.visitMemberPrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var VisibilityIndicatorContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  PUBLIC() {
    return this.getToken(SysMLv2Parser.PUBLIC, 0);
  }
  PRIVATE() {
    return this.getToken(SysMLv2Parser.PRIVATE, 0);
  }
  PROTECTED() {
    return this.getToken(SysMLv2Parser.PROTECTED, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_visibilityIndicator;
  }
  enterRule(listener) {
    if (listener.enterVisibilityIndicator) {
      listener.enterVisibilityIndicator(this);
    }
  }
  exitRule(listener) {
    if (listener.exitVisibilityIndicator) {
      listener.exitVisibilityIndicator(this);
    }
  }
  accept(visitor) {
    if (visitor.visitVisibilityIndicator) {
      return visitor.visitVisibilityIndicator(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonFeatureMember() {
    return this.getRuleContext(0, NonFeatureMemberContext);
  }
  namespaceFeatureMember() {
    return this.getRuleContext(0, NamespaceFeatureMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceMember;
  }
  enterRule(listener) {
    if (listener.enterNamespaceMember) {
      listener.enterNamespaceMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceMember) {
      listener.exitNamespaceMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceMember) {
      return visitor.visitNamespaceMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NonFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  memberElement() {
    return this.getRuleContext(0, MemberElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nonFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterNonFeatureMember) {
      listener.enterNonFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNonFeatureMember) {
      listener.exitNonFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNonFeatureMember) {
      return visitor.visitNonFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  featureElement() {
    return this.getRuleContext(0, FeatureElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterNamespaceFeatureMember) {
      listener.enterNamespaceFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceFeatureMember) {
      listener.exitNamespaceFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceFeatureMember) {
      return visitor.visitNamespaceFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AliasMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  ALIAS() {
    return this.getToken(SysMLv2Parser.ALIAS, 0);
  }
  FOR() {
    return this.getToken(SysMLv2Parser.FOR, 0);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  LT() {
    return this.getToken(SysMLv2Parser.LT, 0);
  }
  name(i) {
    if (i === void 0) {
      return this.getRuleContexts(NameContext);
    }
    return this.getRuleContext(i, NameContext);
  }
  GT() {
    return this.getToken(SysMLv2Parser.GT, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_aliasMember;
  }
  enterRule(listener) {
    if (listener.enterAliasMember) {
      listener.enterAliasMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAliasMember) {
      listener.exitAliasMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAliasMember) {
      return visitor.visitAliasMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var QualifiedNameContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  name(i) {
    if (i === void 0) {
      return this.getRuleContexts(NameContext);
    }
    return this.getRuleContext(i, NameContext);
  }
  DOLLAR() {
    return this.getToken(SysMLv2Parser.DOLLAR, 0);
  }
  COLON_COLON(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COLON_COLON);
    } else {
      return this.getToken(SysMLv2Parser.COLON_COLON, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_qualifiedName;
  }
  enterRule(listener) {
    if (listener.enterQualifiedName) {
      listener.enterQualifiedName(this);
    }
  }
  exitRule(listener) {
    if (listener.exitQualifiedName) {
      listener.exitQualifiedName(this);
    }
  }
  accept(visitor) {
    if (visitor.visitQualifiedName) {
      return visitor.visitQualifiedName(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ImportRuleContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  IMPORT() {
    return this.getToken(SysMLv2Parser.IMPORT, 0);
  }
  importDeclaration() {
    return this.getRuleContext(0, ImportDeclarationContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  visibilityIndicator() {
    return this.getRuleContext(0, VisibilityIndicatorContext);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_importRule;
  }
  enterRule(listener) {
    if (listener.enterImportRule) {
      listener.enterImportRule(this);
    }
  }
  exitRule(listener) {
    if (listener.exitImportRule) {
      listener.exitImportRule(this);
    }
  }
  accept(visitor) {
    if (visitor.visitImportRule) {
      return visitor.visitImportRule(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ImportDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  membershipImport() {
    return this.getRuleContext(0, MembershipImportContext);
  }
  namespaceImport() {
    return this.getRuleContext(0, NamespaceImportContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_importDeclaration;
  }
  enterRule(listener) {
    if (listener.enterImportDeclaration) {
      listener.enterImportDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitImportDeclaration) {
      listener.exitImportDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitImportDeclaration) {
      return visitor.visitImportDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MembershipImportContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  COLON_COLON() {
    return this.getToken(SysMLv2Parser.COLON_COLON, 0);
  }
  STAR_STAR() {
    return this.getToken(SysMLv2Parser.STAR_STAR, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_membershipImport;
  }
  enterRule(listener) {
    if (listener.enterMembershipImport) {
      listener.enterMembershipImport(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMembershipImport) {
      listener.exitMembershipImport(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMembershipImport) {
      return visitor.visitMembershipImport(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceImportContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  COLON_COLON(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COLON_COLON);
    } else {
      return this.getToken(SysMLv2Parser.COLON_COLON, i);
    }
  }
  STAR() {
    return this.getToken(SysMLv2Parser.STAR, 0);
  }
  STAR_STAR() {
    return this.getToken(SysMLv2Parser.STAR_STAR, 0);
  }
  filterPackage() {
    return this.getRuleContext(0, FilterPackageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceImport;
  }
  enterRule(listener) {
    if (listener.enterNamespaceImport) {
      listener.enterNamespaceImport(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceImport) {
      listener.exitNamespaceImport(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceImport) {
      return visitor.visitNamespaceImport(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FilterPackageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  filterPackageImportDeclaration() {
    return this.getRuleContext(0, FilterPackageImportDeclarationContext);
  }
  filterPackageMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(FilterPackageMemberContext);
    }
    return this.getRuleContext(i, FilterPackageMemberContext);
  }
  filterPackageImport() {
    return this.getRuleContext(0, FilterPackageImportContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_filterPackage;
  }
  enterRule(listener) {
    if (listener.enterFilterPackage) {
      listener.enterFilterPackage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFilterPackage) {
      listener.exitFilterPackage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFilterPackage) {
      return visitor.visitFilterPackage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FilterPackageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LBRACK() {
    return this.getToken(SysMLv2Parser.LBRACK, 0);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  RBRACK() {
    return this.getToken(SysMLv2Parser.RBRACK, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_filterPackageMember;
  }
  enterRule(listener) {
    if (listener.enterFilterPackageMember) {
      listener.enterFilterPackageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFilterPackageMember) {
      listener.exitFilterPackageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFilterPackageMember) {
      return visitor.visitFilterPackageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MemberElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  annotatingElement() {
    return this.getRuleContext(0, AnnotatingElementContext);
  }
  nonFeatureElement() {
    return this.getRuleContext(0, NonFeatureElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_memberElement;
  }
  enterRule(listener) {
    if (listener.enterMemberElement) {
      listener.enterMemberElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMemberElement) {
      listener.exitMemberElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMemberElement) {
      return visitor.visitMemberElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NonFeatureElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  dependency() {
    return this.getRuleContext(0, DependencyContext);
  }
  namespace() {
    return this.getRuleContext(0, NamespaceContext);
  }
  type() {
    return this.getRuleContext(0, TypeContext);
  }
  classifier() {
    return this.getRuleContext(0, ClassifierContext);
  }
  dataType() {
    return this.getRuleContext(0, DataTypeContext);
  }
  class() {
    return this.getRuleContext(0, ClassContext);
  }
  structure() {
    return this.getRuleContext(0, StructureContext);
  }
  metaclass() {
    return this.getRuleContext(0, MetaclassContext);
  }
  association() {
    return this.getRuleContext(0, AssociationContext);
  }
  associationStructure() {
    return this.getRuleContext(0, AssociationStructureContext);
  }
  interaction() {
    return this.getRuleContext(0, InteractionContext);
  }
  behavior() {
    return this.getRuleContext(0, BehaviorContext);
  }
  function() {
    return this.getRuleContext(0, FunctionContext);
  }
  predicate() {
    return this.getRuleContext(0, PredicateContext);
  }
  multiplicity() {
    return this.getRuleContext(0, MultiplicityContext);
  }
  package() {
    return this.getRuleContext(0, PackageContext);
  }
  libraryPackage() {
    return this.getRuleContext(0, LibraryPackageContext);
  }
  specialization() {
    return this.getRuleContext(0, SpecializationContext);
  }
  conjugation() {
    return this.getRuleContext(0, ConjugationContext);
  }
  subclassification() {
    return this.getRuleContext(0, SubclassificationContext);
  }
  disjoining() {
    return this.getRuleContext(0, DisjoiningContext);
  }
  featureInverting() {
    return this.getRuleContext(0, FeatureInvertingContext);
  }
  featureTyping() {
    return this.getRuleContext(0, FeatureTypingContext);
  }
  subsetting() {
    return this.getRuleContext(0, SubsettingContext);
  }
  redefinition() {
    return this.getRuleContext(0, RedefinitionContext);
  }
  typeFeaturing() {
    return this.getRuleContext(0, TypeFeaturingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nonFeatureElement;
  }
  enterRule(listener) {
    if (listener.enterNonFeatureElement) {
      listener.enterNonFeatureElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNonFeatureElement) {
      listener.exitNonFeatureElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNonFeatureElement) {
      return visitor.visitNonFeatureElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  feature() {
    return this.getRuleContext(0, FeatureContext);
  }
  step() {
    return this.getRuleContext(0, StepContext);
  }
  expression() {
    return this.getRuleContext(0, ExpressionContext);
  }
  booleanExpression() {
    return this.getRuleContext(0, BooleanExpressionContext);
  }
  invariant() {
    return this.getRuleContext(0, InvariantContext);
  }
  connector() {
    return this.getRuleContext(0, ConnectorContext);
  }
  bindingConnector() {
    return this.getRuleContext(0, BindingConnectorContext);
  }
  succession() {
    return this.getRuleContext(0, SuccessionContext);
  }
  flow() {
    return this.getRuleContext(0, FlowContext);
  }
  successionFlow() {
    return this.getRuleContext(0, SuccessionFlowContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureElement;
  }
  enterRule(listener) {
    if (listener.enterFeatureElement) {
      listener.enterFeatureElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureElement) {
      listener.exitFeatureElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureElement) {
      return visitor.visitFeatureElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  TYPE() {
    return this.getToken(SysMLv2Parser.TYPE, 0);
  }
  typeDeclaration() {
    return this.getRuleContext(0, TypeDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_type;
  }
  enterRule(listener) {
    if (listener.enterType) {
      listener.enterType(this);
    }
  }
  exitRule(listener) {
    if (listener.exitType) {
      listener.exitType(this);
    }
  }
  accept(visitor) {
    if (visitor.visitType) {
      return visitor.visitType(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ABSTRACT() {
    return this.getToken(SysMLv2Parser.ABSTRACT, 0);
  }
  prefixMetadataMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataMemberContext);
    }
    return this.getRuleContext(i, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typePrefix;
  }
  enterRule(listener) {
    if (listener.enterTypePrefix) {
      listener.enterTypePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypePrefix) {
      listener.exitTypePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypePrefix) {
      return visitor.visitTypePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  ownedMultiplicity() {
    return this.getRuleContext(0, OwnedMultiplicityContext);
  }
  specializationPart(i) {
    if (i === void 0) {
      return this.getRuleContexts(SpecializationPartContext);
    }
    return this.getRuleContext(i, SpecializationPartContext);
  }
  conjugationPart(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConjugationPartContext);
    }
    return this.getRuleContext(i, ConjugationPartContext);
  }
  typeRelationshipPart(i) {
    if (i === void 0) {
      return this.getRuleContexts(TypeRelationshipPartContext);
    }
    return this.getRuleContext(i, TypeRelationshipPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeDeclaration;
  }
  enterRule(listener) {
    if (listener.enterTypeDeclaration) {
      listener.enterTypeDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeDeclaration) {
      listener.exitTypeDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeDeclaration) {
      return visitor.visitTypeDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SpecializationPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedSpecialization(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedSpecializationContext);
    }
    return this.getRuleContext(i, OwnedSpecializationContext);
  }
  COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT, 0);
  }
  SPECIALIZES() {
    return this.getToken(SysMLv2Parser.SPECIALIZES, 0);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_specializationPart;
  }
  enterRule(listener) {
    if (listener.enterSpecializationPart) {
      listener.enterSpecializationPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSpecializationPart) {
      listener.exitSpecializationPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSpecializationPart) {
      return visitor.visitSpecializationPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConjugationPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedConjugation() {
    return this.getRuleContext(0, OwnedConjugationContext);
  }
  TILDE() {
    return this.getToken(SysMLv2Parser.TILDE, 0);
  }
  CONJUGATES() {
    return this.getToken(SysMLv2Parser.CONJUGATES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_conjugationPart;
  }
  enterRule(listener) {
    if (listener.enterConjugationPart) {
      listener.enterConjugationPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConjugationPart) {
      listener.exitConjugationPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConjugationPart) {
      return visitor.visitConjugationPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeRelationshipPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  disjoiningPart() {
    return this.getRuleContext(0, DisjoiningPartContext);
  }
  unioningPart() {
    return this.getRuleContext(0, UnioningPartContext);
  }
  intersectingPart() {
    return this.getRuleContext(0, IntersectingPartContext);
  }
  differencingPart() {
    return this.getRuleContext(0, DifferencingPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeRelationshipPart;
  }
  enterRule(listener) {
    if (listener.enterTypeRelationshipPart) {
      listener.enterTypeRelationshipPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeRelationshipPart) {
      listener.exitTypeRelationshipPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeRelationshipPart) {
      return visitor.visitTypeRelationshipPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DisjoiningPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DISJOINT() {
    return this.getToken(SysMLv2Parser.DISJOINT, 0);
  }
  FROM() {
    return this.getToken(SysMLv2Parser.FROM, 0);
  }
  ownedDisjoining(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedDisjoiningContext);
    }
    return this.getRuleContext(i, OwnedDisjoiningContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_disjoiningPart;
  }
  enterRule(listener) {
    if (listener.enterDisjoiningPart) {
      listener.enterDisjoiningPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDisjoiningPart) {
      listener.exitDisjoiningPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDisjoiningPart) {
      return visitor.visitDisjoiningPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UnioningPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  UNIONS() {
    return this.getToken(SysMLv2Parser.UNIONS, 0);
  }
  unioning(i) {
    if (i === void 0) {
      return this.getRuleContexts(UnioningContext);
    }
    return this.getRuleContext(i, UnioningContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_unioningPart;
  }
  enterRule(listener) {
    if (listener.enterUnioningPart) {
      listener.enterUnioningPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUnioningPart) {
      listener.exitUnioningPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUnioningPart) {
      return visitor.visitUnioningPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IntersectingPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  INTERSECTS() {
    return this.getToken(SysMLv2Parser.INTERSECTS, 0);
  }
  intersecting(i) {
    if (i === void 0) {
      return this.getRuleContexts(IntersectingContext);
    }
    return this.getRuleContext(i, IntersectingContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_intersectingPart;
  }
  enterRule(listener) {
    if (listener.enterIntersectingPart) {
      listener.enterIntersectingPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIntersectingPart) {
      listener.exitIntersectingPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIntersectingPart) {
      return visitor.visitIntersectingPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DifferencingPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DIFFERENCES() {
    return this.getToken(SysMLv2Parser.DIFFERENCES, 0);
  }
  differencing(i) {
    if (i === void 0) {
      return this.getRuleContexts(DifferencingContext);
    }
    return this.getRuleContext(i, DifferencingContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_differencingPart;
  }
  enterRule(listener) {
    if (listener.enterDifferencingPart) {
      listener.enterDifferencingPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDifferencingPart) {
      listener.exitDifferencingPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDifferencingPart) {
      return visitor.visitDifferencingPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  typeBodyElement(i) {
    if (i === void 0) {
      return this.getRuleContexts(TypeBodyElementContext);
    }
    return this.getRuleContext(i, TypeBodyElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeBody;
  }
  enterRule(listener) {
    if (listener.enterTypeBody) {
      listener.enterTypeBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeBody) {
      listener.exitTypeBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeBody) {
      return visitor.visitTypeBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeBodyElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonFeatureMember() {
    return this.getRuleContext(0, NonFeatureMemberContext);
  }
  featureMember() {
    return this.getRuleContext(0, FeatureMemberContext);
  }
  aliasMember() {
    return this.getRuleContext(0, AliasMemberContext);
  }
  importRule() {
    return this.getRuleContext(0, ImportRuleContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeBodyElement;
  }
  enterRule(listener) {
    if (listener.enterTypeBodyElement) {
      listener.enterTypeBodyElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeBodyElement) {
      listener.exitTypeBodyElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeBodyElement) {
      return visitor.visitTypeBodyElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SpecializationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SUBTYPE() {
    return this.getToken(SysMLv2Parser.SUBTYPE, 0);
  }
  specificType() {
    return this.getRuleContext(0, SpecificTypeContext);
  }
  generalType() {
    return this.getRuleContext(0, GeneralTypeContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT, 0);
  }
  SPECIALIZES() {
    return this.getToken(SysMLv2Parser.SPECIALIZES, 0);
  }
  SPECIALIZATION() {
    return this.getToken(SysMLv2Parser.SPECIALIZATION, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_specialization;
  }
  enterRule(listener) {
    if (listener.enterSpecialization) {
      listener.enterSpecialization(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSpecialization) {
      listener.exitSpecialization(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSpecialization) {
      return visitor.visitSpecialization(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedSpecializationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  generalType() {
    return this.getRuleContext(0, GeneralTypeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedSpecialization;
  }
  enterRule(listener) {
    if (listener.enterOwnedSpecialization) {
      listener.enterOwnedSpecialization(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedSpecialization) {
      listener.exitOwnedSpecialization(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedSpecialization) {
      return visitor.visitOwnedSpecialization(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SpecificTypeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_specificType;
  }
  enterRule(listener) {
    if (listener.enterSpecificType) {
      listener.enterSpecificType(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSpecificType) {
      listener.exitSpecificType(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSpecificType) {
      return visitor.visitSpecificType(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var GeneralTypeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_generalType;
  }
  enterRule(listener) {
    if (listener.enterGeneralType) {
      listener.enterGeneralType(this);
    }
  }
  exitRule(listener) {
    if (listener.exitGeneralType) {
      listener.exitGeneralType(this);
    }
  }
  accept(visitor) {
    if (visitor.visitGeneralType) {
      return visitor.visitGeneralType(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConjugationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  CONJUGATE() {
    return this.getToken(SysMLv2Parser.CONJUGATE, 0);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  TILDE() {
    return this.getToken(SysMLv2Parser.TILDE, 0);
  }
  CONJUGATES() {
    return this.getToken(SysMLv2Parser.CONJUGATES, 0);
  }
  CONJUGATION() {
    return this.getToken(SysMLv2Parser.CONJUGATION, 0);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_conjugation;
  }
  enterRule(listener) {
    if (listener.enterConjugation) {
      listener.enterConjugation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConjugation) {
      listener.exitConjugation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConjugation) {
      return visitor.visitConjugation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedConjugationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedConjugation;
  }
  enterRule(listener) {
    if (listener.enterOwnedConjugation) {
      listener.enterOwnedConjugation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedConjugation) {
      listener.exitOwnedConjugation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedConjugation) {
      return visitor.visitOwnedConjugation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DisjoiningContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DISJOINT() {
    return this.getToken(SysMLv2Parser.DISJOINT, 0);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  FROM() {
    return this.getToken(SysMLv2Parser.FROM, 0);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  DISJOINING() {
    return this.getToken(SysMLv2Parser.DISJOINING, 0);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_disjoining;
  }
  enterRule(listener) {
    if (listener.enterDisjoining) {
      listener.enterDisjoining(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDisjoining) {
      listener.exitDisjoining(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDisjoining) {
      return visitor.visitDisjoining(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedDisjoiningContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedDisjoining;
  }
  enterRule(listener) {
    if (listener.enterOwnedDisjoining) {
      listener.enterOwnedDisjoining(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedDisjoining) {
      listener.exitOwnedDisjoining(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedDisjoining) {
      return visitor.visitOwnedDisjoining(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UnioningContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_unioning;
  }
  enterRule(listener) {
    if (listener.enterUnioning) {
      listener.enterUnioning(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUnioning) {
      listener.exitUnioning(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUnioning) {
      return visitor.visitUnioning(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IntersectingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_intersecting;
  }
  enterRule(listener) {
    if (listener.enterIntersecting) {
      listener.enterIntersecting(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIntersecting) {
      listener.exitIntersecting(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIntersecting) {
      return visitor.visitIntersecting(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DifferencingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_differencing;
  }
  enterRule(listener) {
    if (listener.enterDifferencing) {
      listener.enterDifferencing(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDifferencing) {
      listener.exitDifferencing(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDifferencing) {
      return visitor.visitDifferencing(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typeFeatureMember() {
    return this.getRuleContext(0, TypeFeatureMemberContext);
  }
  ownedFeatureMember() {
    return this.getRuleContext(0, OwnedFeatureMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureMember;
  }
  enterRule(listener) {
    if (listener.enterFeatureMember) {
      listener.enterFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureMember) {
      listener.exitFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureMember) {
      return visitor.visitFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  MEMBER() {
    return this.getToken(SysMLv2Parser.MEMBER, 0);
  }
  featureElement() {
    return this.getRuleContext(0, FeatureElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterTypeFeatureMember) {
      listener.enterTypeFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeFeatureMember) {
      listener.exitTypeFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeFeatureMember) {
      return visitor.visitTypeFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  featureElement() {
    return this.getRuleContext(0, FeatureElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterOwnedFeatureMember) {
      listener.enterOwnedFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedFeatureMember) {
      listener.exitOwnedFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedFeatureMember) {
      return visitor.visitOwnedFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ClassifierContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  CLASSIFIER() {
    return this.getToken(SysMLv2Parser.CLASSIFIER, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_classifier;
  }
  enterRule(listener) {
    if (listener.enterClassifier) {
      listener.enterClassifier(this);
    }
  }
  exitRule(listener) {
    if (listener.exitClassifier) {
      listener.exitClassifier(this);
    }
  }
  accept(visitor) {
    if (visitor.visitClassifier) {
      return visitor.visitClassifier(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ClassifierDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  ownedMultiplicity() {
    return this.getRuleContext(0, OwnedMultiplicityContext);
  }
  superclassingPart() {
    return this.getRuleContext(0, SuperclassingPartContext);
  }
  conjugationPart() {
    return this.getRuleContext(0, ConjugationPartContext);
  }
  typeRelationshipPart(i) {
    if (i === void 0) {
      return this.getRuleContexts(TypeRelationshipPartContext);
    }
    return this.getRuleContext(i, TypeRelationshipPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_classifierDeclaration;
  }
  enterRule(listener) {
    if (listener.enterClassifierDeclaration) {
      listener.enterClassifierDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitClassifierDeclaration) {
      listener.exitClassifierDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitClassifierDeclaration) {
      return visitor.visitClassifierDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SuperclassingPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedSubclassification(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedSubclassificationContext);
    }
    return this.getRuleContext(i, OwnedSubclassificationContext);
  }
  COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT, 0);
  }
  SPECIALIZES() {
    return this.getToken(SysMLv2Parser.SPECIALIZES, 0);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_superclassingPart;
  }
  enterRule(listener) {
    if (listener.enterSuperclassingPart) {
      listener.enterSuperclassingPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSuperclassingPart) {
      listener.exitSuperclassingPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSuperclassingPart) {
      return visitor.visitSuperclassingPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SubclassificationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SUBCLASSIFIER() {
    return this.getToken(SysMLv2Parser.SUBCLASSIFIER, 0);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT, 0);
  }
  SPECIALIZES() {
    return this.getToken(SysMLv2Parser.SPECIALIZES, 0);
  }
  SPECIALIZATION() {
    return this.getToken(SysMLv2Parser.SPECIALIZATION, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_subclassification;
  }
  enterRule(listener) {
    if (listener.enterSubclassification) {
      listener.enterSubclassification(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSubclassification) {
      listener.exitSubclassification(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSubclassification) {
      return visitor.visitSubclassification(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedSubclassificationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedSubclassification;
  }
  enterRule(listener) {
    if (listener.enterOwnedSubclassification) {
      listener.enterOwnedSubclassification(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedSubclassification) {
      listener.exitOwnedSubclassification(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedSubclassification) {
      return visitor.visitOwnedSubclassification(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  FEATURE() {
    return this.getToken(SysMLv2Parser.FEATURE, 0);
  }
  prefixMetadataMember() {
    return this.getRuleContext(0, PrefixMetadataMemberContext);
  }
  endFeaturePrefix() {
    return this.getRuleContext(0, EndFeaturePrefixContext);
  }
  basicFeaturePrefix() {
    return this.getRuleContext(0, BasicFeaturePrefixContext);
  }
  REF() {
    return this.getToken(SysMLv2Parser.REF, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_feature;
  }
  enterRule(listener) {
    if (listener.enterFeature) {
      listener.enterFeature(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeature) {
      listener.exitFeature(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeature) {
      return visitor.visitFeature(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EndFeaturePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  END() {
    return this.getToken(SysMLv2Parser.END, 0);
  }
  CONST() {
    return this.getToken(SysMLv2Parser.CONST, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_endFeaturePrefix;
  }
  enterRule(listener) {
    if (listener.enterEndFeaturePrefix) {
      listener.enterEndFeaturePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEndFeaturePrefix) {
      listener.exitEndFeaturePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEndFeaturePrefix) {
      return visitor.visitEndFeaturePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BasicFeaturePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureDirection() {
    return this.getRuleContext(0, FeatureDirectionContext);
  }
  DERIVED() {
    return this.getToken(SysMLv2Parser.DERIVED, 0);
  }
  ABSTRACT() {
    return this.getToken(SysMLv2Parser.ABSTRACT, 0);
  }
  COMPOSITE() {
    return this.getToken(SysMLv2Parser.COMPOSITE, 0);
  }
  PORTION() {
    return this.getToken(SysMLv2Parser.PORTION, 0);
  }
  VAR() {
    return this.getToken(SysMLv2Parser.VAR, 0);
  }
  CONST() {
    return this.getToken(SysMLv2Parser.CONST, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_basicFeaturePrefix;
  }
  enterRule(listener) {
    if (listener.enterBasicFeaturePrefix) {
      listener.enterBasicFeaturePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBasicFeaturePrefix) {
      listener.exitBasicFeaturePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBasicFeaturePrefix) {
      return visitor.visitBasicFeaturePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeaturePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  endFeaturePrefix() {
    return this.getRuleContext(0, EndFeaturePrefixContext);
  }
  ownedCrossFeatureMember() {
    return this.getRuleContext(0, OwnedCrossFeatureMemberContext);
  }
  basicFeaturePrefix() {
    return this.getRuleContext(0, BasicFeaturePrefixContext);
  }
  prefixMetadataMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataMemberContext);
    }
    return this.getRuleContext(i, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featurePrefix;
  }
  enterRule(listener) {
    if (listener.enterFeaturePrefix) {
      listener.enterFeaturePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeaturePrefix) {
      listener.exitFeaturePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeaturePrefix) {
      return visitor.visitFeaturePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedCrossFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedCrossFeature() {
    return this.getRuleContext(0, OwnedCrossFeatureContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedCrossFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterOwnedCrossFeatureMember) {
      listener.enterOwnedCrossFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedCrossFeatureMember) {
      listener.exitOwnedCrossFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedCrossFeatureMember) {
      return visitor.visitOwnedCrossFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedCrossFeatureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  basicFeaturePrefix() {
    return this.getRuleContext(0, BasicFeaturePrefixContext);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  basicUsagePrefix() {
    return this.getRuleContext(0, BasicUsagePrefixContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedCrossFeature;
  }
  enterRule(listener) {
    if (listener.enterOwnedCrossFeature) {
      listener.enterOwnedCrossFeature(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedCrossFeature) {
      listener.exitOwnedCrossFeature(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedCrossFeature) {
      return visitor.visitOwnedCrossFeature(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureDirectionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  IN() {
    return this.getToken(SysMLv2Parser.IN, 0);
  }
  OUT() {
    return this.getToken(SysMLv2Parser.OUT, 0);
  }
  INOUT() {
    return this.getToken(SysMLv2Parser.INOUT, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureDirection;
  }
  enterRule(listener) {
    if (listener.enterFeatureDirection) {
      listener.enterFeatureDirection(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureDirection) {
      listener.exitFeatureDirection(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureDirection) {
      return visitor.visitFeatureDirection(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureIdentification() {
    return this.getRuleContext(0, FeatureIdentificationContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  conjugationPart() {
    return this.getRuleContext(0, ConjugationPartContext);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  featureRelationshipPart(i) {
    if (i === void 0) {
      return this.getRuleContexts(FeatureRelationshipPartContext);
    }
    return this.getRuleContext(i, FeatureRelationshipPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureDeclaration;
  }
  enterRule(listener) {
    if (listener.enterFeatureDeclaration) {
      listener.enterFeatureDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureDeclaration) {
      listener.exitFeatureDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureDeclaration) {
      return visitor.visitFeatureDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureIdentificationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LT() {
    return this.getToken(SysMLv2Parser.LT, 0);
  }
  name(i) {
    if (i === void 0) {
      return this.getRuleContexts(NameContext);
    }
    return this.getRuleContext(i, NameContext);
  }
  GT() {
    return this.getToken(SysMLv2Parser.GT, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureIdentification;
  }
  enterRule(listener) {
    if (listener.enterFeatureIdentification) {
      listener.enterFeatureIdentification(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureIdentification) {
      listener.exitFeatureIdentification(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureIdentification) {
      return visitor.visitFeatureIdentification(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureRelationshipPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typeRelationshipPart() {
    return this.getRuleContext(0, TypeRelationshipPartContext);
  }
  chainingPart() {
    return this.getRuleContext(0, ChainingPartContext);
  }
  invertingPart() {
    return this.getRuleContext(0, InvertingPartContext);
  }
  typeFeaturingPart() {
    return this.getRuleContext(0, TypeFeaturingPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureRelationshipPart;
  }
  enterRule(listener) {
    if (listener.enterFeatureRelationshipPart) {
      listener.enterFeatureRelationshipPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureRelationshipPart) {
      listener.exitFeatureRelationshipPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureRelationshipPart) {
      return visitor.visitFeatureRelationshipPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ChainingPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  CHAINS() {
    return this.getToken(SysMLv2Parser.CHAINS, 0);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_chainingPart;
  }
  enterRule(listener) {
    if (listener.enterChainingPart) {
      listener.enterChainingPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitChainingPart) {
      listener.exitChainingPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitChainingPart) {
      return visitor.visitChainingPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InvertingPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  INVERSE() {
    return this.getToken(SysMLv2Parser.INVERSE, 0);
  }
  OF() {
    return this.getToken(SysMLv2Parser.OF, 0);
  }
  ownedFeatureInverting() {
    return this.getRuleContext(0, OwnedFeatureInvertingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_invertingPart;
  }
  enterRule(listener) {
    if (listener.enterInvertingPart) {
      listener.enterInvertingPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInvertingPart) {
      listener.exitInvertingPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInvertingPart) {
      return visitor.visitInvertingPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeFeaturingPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  FEATURED() {
    return this.getToken(SysMLv2Parser.FEATURED, 0);
  }
  BY() {
    return this.getToken(SysMLv2Parser.BY, 0);
  }
  ownedTypeFeaturing(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedTypeFeaturingContext);
    }
    return this.getRuleContext(i, OwnedTypeFeaturingContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeFeaturingPart;
  }
  enterRule(listener) {
    if (listener.enterTypeFeaturingPart) {
      listener.enterTypeFeaturingPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeFeaturingPart) {
      listener.exitTypeFeaturingPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeFeaturingPart) {
      return visitor.visitTypeFeaturingPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureSpecializationPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureSpecialization(i) {
    if (i === void 0) {
      return this.getRuleContexts(FeatureSpecializationContext);
    }
    return this.getRuleContext(i, FeatureSpecializationContext);
  }
  multiplicityPart() {
    return this.getRuleContext(0, MultiplicityPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureSpecializationPart;
  }
  enterRule(listener) {
    if (listener.enterFeatureSpecializationPart) {
      listener.enterFeatureSpecializationPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureSpecializationPart) {
      listener.exitFeatureSpecializationPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureSpecializationPart) {
      return visitor.visitFeatureSpecializationPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MultiplicityPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedMultiplicity() {
    return this.getRuleContext(0, OwnedMultiplicityContext);
  }
  ORDERED() {
    return this.getToken(SysMLv2Parser.ORDERED, 0);
  }
  NONUNIQUE() {
    return this.getToken(SysMLv2Parser.NONUNIQUE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_multiplicityPart;
  }
  enterRule(listener) {
    if (listener.enterMultiplicityPart) {
      listener.enterMultiplicityPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMultiplicityPart) {
      listener.exitMultiplicityPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMultiplicityPart) {
      return visitor.visitMultiplicityPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureSpecializationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typings() {
    return this.getRuleContext(0, TypingsContext);
  }
  subsettings() {
    return this.getRuleContext(0, SubsettingsContext);
  }
  references() {
    return this.getRuleContext(0, ReferencesContext);
  }
  crosses() {
    return this.getRuleContext(0, CrossesContext);
  }
  redefinitions() {
    return this.getRuleContext(0, RedefinitionsContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureSpecialization;
  }
  enterRule(listener) {
    if (listener.enterFeatureSpecialization) {
      listener.enterFeatureSpecialization(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureSpecialization) {
      listener.exitFeatureSpecialization(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureSpecialization) {
      return visitor.visitFeatureSpecialization(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypingsContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typedBy() {
    return this.getRuleContext(0, TypedByContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  featureTyping(i) {
    if (i === void 0) {
      return this.getRuleContexts(FeatureTypingContext);
    }
    return this.getRuleContext(i, FeatureTypingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typings;
  }
  enterRule(listener) {
    if (listener.enterTypings) {
      listener.enterTypings(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypings) {
      listener.exitTypings(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypings) {
      return visitor.visitTypings(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypedByContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureTyping() {
    return this.getRuleContext(0, FeatureTypingContext);
  }
  COLON() {
    return this.getToken(SysMLv2Parser.COLON, 0);
  }
  TYPED() {
    return this.getToken(SysMLv2Parser.TYPED, 0);
  }
  BY() {
    return this.getToken(SysMLv2Parser.BY, 0);
  }
  DEFINED() {
    return this.getToken(SysMLv2Parser.DEFINED, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typedBy;
  }
  enterRule(listener) {
    if (listener.enterTypedBy) {
      listener.enterTypedBy(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypedBy) {
      listener.exitTypedBy(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypedBy) {
      return visitor.visitTypedBy(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SubsettingsContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  subsets() {
    return this.getRuleContext(0, SubsetsContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  ownedSubsetting(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedSubsettingContext);
    }
    return this.getRuleContext(i, OwnedSubsettingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_subsettings;
  }
  enterRule(listener) {
    if (listener.enterSubsettings) {
      listener.enterSubsettings(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSubsettings) {
      listener.exitSubsettings(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSubsettings) {
      return visitor.visitSubsettings(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SubsetsContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedSubsetting() {
    return this.getRuleContext(0, OwnedSubsettingContext);
  }
  COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT, 0);
  }
  SUBSETS() {
    return this.getToken(SysMLv2Parser.SUBSETS, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_subsets;
  }
  enterRule(listener) {
    if (listener.enterSubsets) {
      listener.enterSubsets(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSubsets) {
      listener.exitSubsets(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSubsets) {
      return visitor.visitSubsets(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ReferencesContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  COLON_COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_COLON_GT, 0);
  }
  REFERENCES() {
    return this.getToken(SysMLv2Parser.REFERENCES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_references;
  }
  enterRule(listener) {
    if (listener.enterReferences) {
      listener.enterReferences(this);
    }
  }
  exitRule(listener) {
    if (listener.exitReferences) {
      listener.exitReferences(this);
    }
  }
  accept(visitor) {
    if (visitor.visitReferences) {
      return visitor.visitReferences(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CrossesContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedCrossSubsetting() {
    return this.getRuleContext(0, OwnedCrossSubsettingContext);
  }
  FAT_ARROW() {
    return this.getToken(SysMLv2Parser.FAT_ARROW, 0);
  }
  CROSSES() {
    return this.getToken(SysMLv2Parser.CROSSES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_crosses;
  }
  enterRule(listener) {
    if (listener.enterCrosses) {
      listener.enterCrosses(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCrosses) {
      listener.exitCrosses(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCrosses) {
      return visitor.visitCrosses(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RedefinitionsContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  redefines() {
    return this.getRuleContext(0, RedefinesContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  ownedRedefinition(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedRedefinitionContext);
    }
    return this.getRuleContext(i, OwnedRedefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_redefinitions;
  }
  enterRule(listener) {
    if (listener.enterRedefinitions) {
      listener.enterRedefinitions(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRedefinitions) {
      listener.exitRedefinitions(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRedefinitions) {
      return visitor.visitRedefinitions(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RedefinesContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedRedefinition() {
    return this.getRuleContext(0, OwnedRedefinitionContext);
  }
  COLON_GT_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT_GT, 0);
  }
  REDEFINES() {
    return this.getToken(SysMLv2Parser.REDEFINES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_redefines;
  }
  enterRule(listener) {
    if (listener.enterRedefines) {
      listener.enterRedefines(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRedefines) {
      listener.exitRedefines(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRedefines) {
      return visitor.visitRedefines(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureTypingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  TYPING() {
    return this.getToken(SysMLv2Parser.TYPING, 0);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  generalType() {
    return this.getRuleContext(0, GeneralTypeContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  COLON() {
    return this.getToken(SysMLv2Parser.COLON, 0);
  }
  TYPED() {
    return this.getToken(SysMLv2Parser.TYPED, 0);
  }
  BY() {
    return this.getToken(SysMLv2Parser.BY, 0);
  }
  SPECIALIZATION() {
    return this.getToken(SysMLv2Parser.SPECIALIZATION, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  ownedFeatureTyping() {
    return this.getRuleContext(0, OwnedFeatureTypingContext);
  }
  conjugatedPortTyping() {
    return this.getRuleContext(0, ConjugatedPortTypingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureTyping;
  }
  enterRule(listener) {
    if (listener.enterFeatureTyping) {
      listener.enterFeatureTyping(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureTyping) {
      listener.exitFeatureTyping(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureTyping) {
      return visitor.visitFeatureTyping(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedFeatureTypingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedFeatureTyping;
  }
  enterRule(listener) {
    if (listener.enterOwnedFeatureTyping) {
      listener.enterOwnedFeatureTyping(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedFeatureTyping) {
      listener.exitOwnedFeatureTyping(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedFeatureTyping) {
      return visitor.visitOwnedFeatureTyping(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SubsettingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SUBSET() {
    return this.getToken(SysMLv2Parser.SUBSET, 0);
  }
  specificType() {
    return this.getRuleContext(0, SpecificTypeContext);
  }
  generalType() {
    return this.getRuleContext(0, GeneralTypeContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT, 0);
  }
  SUBSETS() {
    return this.getToken(SysMLv2Parser.SUBSETS, 0);
  }
  SPECIALIZATION() {
    return this.getToken(SysMLv2Parser.SPECIALIZATION, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_subsetting;
  }
  enterRule(listener) {
    if (listener.enterSubsetting) {
      listener.enterSubsetting(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSubsetting) {
      listener.exitSubsetting(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSubsetting) {
      return visitor.visitSubsetting(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedSubsettingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedSubsetting;
  }
  enterRule(listener) {
    if (listener.enterOwnedSubsetting) {
      listener.enterOwnedSubsetting(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedSubsetting) {
      listener.exitOwnedSubsetting(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedSubsetting) {
      return visitor.visitOwnedSubsetting(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedReferenceSubsettingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedReferenceSubsetting;
  }
  enterRule(listener) {
    if (listener.enterOwnedReferenceSubsetting) {
      listener.enterOwnedReferenceSubsetting(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedReferenceSubsetting) {
      listener.exitOwnedReferenceSubsetting(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedReferenceSubsetting) {
      return visitor.visitOwnedReferenceSubsetting(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedCrossSubsettingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedCrossSubsetting;
  }
  enterRule(listener) {
    if (listener.enterOwnedCrossSubsetting) {
      listener.enterOwnedCrossSubsetting(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedCrossSubsetting) {
      listener.exitOwnedCrossSubsetting(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedCrossSubsetting) {
      return visitor.visitOwnedCrossSubsetting(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RedefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  REDEFINITION() {
    return this.getToken(SysMLv2Parser.REDEFINITION, 0);
  }
  specificType() {
    return this.getRuleContext(0, SpecificTypeContext);
  }
  generalType() {
    return this.getRuleContext(0, GeneralTypeContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  COLON_GT_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT_GT, 0);
  }
  REDEFINES() {
    return this.getToken(SysMLv2Parser.REDEFINES, 0);
  }
  SPECIALIZATION() {
    return this.getToken(SysMLv2Parser.SPECIALIZATION, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_redefinition;
  }
  enterRule(listener) {
    if (listener.enterRedefinition) {
      listener.enterRedefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRedefinition) {
      listener.exitRedefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRedefinition) {
      return visitor.visitRedefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedRedefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedRedefinition;
  }
  enterRule(listener) {
    if (listener.enterOwnedRedefinition) {
      listener.enterOwnedRedefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedRedefinition) {
      listener.exitOwnedRedefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedRedefinition) {
      return visitor.visitOwnedRedefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureInvertingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  INVERSE() {
    return this.getToken(SysMLv2Parser.INVERSE, 0);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  OF() {
    return this.getToken(SysMLv2Parser.OF, 0);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  INVERTING() {
    return this.getToken(SysMLv2Parser.INVERTING, 0);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureInverting;
  }
  enterRule(listener) {
    if (listener.enterFeatureInverting) {
      listener.enterFeatureInverting(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureInverting) {
      listener.exitFeatureInverting(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureInverting) {
      return visitor.visitFeatureInverting(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedFeatureInvertingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedFeatureInverting;
  }
  enterRule(listener) {
    if (listener.enterOwnedFeatureInverting) {
      listener.enterOwnedFeatureInverting(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedFeatureInverting) {
      listener.exitOwnedFeatureInverting(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedFeatureInverting) {
      return visitor.visitOwnedFeatureInverting(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TypeFeaturingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  FEATURING() {
    return this.getToken(SysMLv2Parser.FEATURING, 0);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  BY() {
    return this.getToken(SysMLv2Parser.BY, 0);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  OF() {
    return this.getToken(SysMLv2Parser.OF, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_typeFeaturing;
  }
  enterRule(listener) {
    if (listener.enterTypeFeaturing) {
      listener.enterTypeFeaturing(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTypeFeaturing) {
      listener.exitTypeFeaturing(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTypeFeaturing) {
      return visitor.visitTypeFeaturing(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedTypeFeaturingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedTypeFeaturing;
  }
  enterRule(listener) {
    if (listener.enterOwnedTypeFeaturing) {
      listener.enterOwnedTypeFeaturing(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedTypeFeaturing) {
      listener.exitOwnedTypeFeaturing(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedTypeFeaturing) {
      return visitor.visitOwnedTypeFeaturing(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DataTypeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  DATATYPE() {
    return this.getToken(SysMLv2Parser.DATATYPE, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_dataType;
  }
  enterRule(listener) {
    if (listener.enterDataType) {
      listener.enterDataType(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDataType) {
      listener.exitDataType(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDataType) {
      return visitor.visitDataType(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ClassContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  CLASS() {
    return this.getToken(SysMLv2Parser.CLASS, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_class;
  }
  enterRule(listener) {
    if (listener.enterClass) {
      listener.enterClass(this);
    }
  }
  exitRule(listener) {
    if (listener.exitClass) {
      listener.exitClass(this);
    }
  }
  accept(visitor) {
    if (visitor.visitClass) {
      return visitor.visitClass(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StructureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  STRUCT() {
    return this.getToken(SysMLv2Parser.STRUCT, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_structure;
  }
  enterRule(listener) {
    if (listener.enterStructure) {
      listener.enterStructure(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStructure) {
      listener.exitStructure(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStructure) {
      return visitor.visitStructure(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssociationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  ASSOC() {
    return this.getToken(SysMLv2Parser.ASSOC, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_association;
  }
  enterRule(listener) {
    if (listener.enterAssociation) {
      listener.enterAssociation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssociation) {
      listener.exitAssociation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssociation) {
      return visitor.visitAssociation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssociationStructureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  ASSOC() {
    return this.getToken(SysMLv2Parser.ASSOC, 0);
  }
  STRUCT() {
    return this.getToken(SysMLv2Parser.STRUCT, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_associationStructure;
  }
  enterRule(listener) {
    if (listener.enterAssociationStructure) {
      listener.enterAssociationStructure(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssociationStructure) {
      listener.exitAssociationStructure(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssociationStructure) {
      return visitor.visitAssociationStructure(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConnectorContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  CONNECTOR() {
    return this.getToken(SysMLv2Parser.CONNECTOR, 0);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  connectorDeclaration() {
    return this.getRuleContext(0, ConnectorDeclarationContext);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_connector;
  }
  enterRule(listener) {
    if (listener.enterConnector) {
      listener.enterConnector(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConnector) {
      listener.exitConnector(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConnector) {
      return visitor.visitConnector(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConnectorDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  binaryConnectorDeclaration() {
    return this.getRuleContext(0, BinaryConnectorDeclarationContext);
  }
  naryConnectorDeclaration() {
    return this.getRuleContext(0, NaryConnectorDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_connectorDeclaration;
  }
  enterRule(listener) {
    if (listener.enterConnectorDeclaration) {
      listener.enterConnectorDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConnectorDeclaration) {
      listener.exitConnectorDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConnectorDeclaration) {
      return visitor.visitConnectorDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BinaryConnectorDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  FROM() {
    return this.getToken(SysMLv2Parser.FROM, 0);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_binaryConnectorDeclaration;
  }
  enterRule(listener) {
    if (listener.enterBinaryConnectorDeclaration) {
      listener.enterBinaryConnectorDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBinaryConnectorDeclaration) {
      listener.exitBinaryConnectorDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBinaryConnectorDeclaration) {
      return visitor.visitBinaryConnectorDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NaryConnectorDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LPAREN() {
    return this.getToken(SysMLv2Parser.LPAREN, 0);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  RPAREN() {
    return this.getToken(SysMLv2Parser.RPAREN, 0);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_naryConnectorDeclaration;
  }
  enterRule(listener) {
    if (listener.enterNaryConnectorDeclaration) {
      listener.enterNaryConnectorDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNaryConnectorDeclaration) {
      listener.exitNaryConnectorDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNaryConnectorDeclaration) {
      return visitor.visitNaryConnectorDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConnectorEndMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  connectorEnd() {
    return this.getRuleContext(0, ConnectorEndContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_connectorEndMember;
  }
  enterRule(listener) {
    if (listener.enterConnectorEndMember) {
      listener.enterConnectorEndMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConnectorEndMember) {
      listener.exitConnectorEndMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConnectorEndMember) {
      return visitor.visitConnectorEndMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConnectorEndContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  ownedCrossMultiplicityMember() {
    return this.getRuleContext(0, OwnedCrossMultiplicityMemberContext);
  }
  name() {
    return this.getRuleContext(0, NameContext);
  }
  COLON_COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_COLON_GT, 0);
  }
  REFERENCES() {
    return this.getToken(SysMLv2Parser.REFERENCES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_connectorEnd;
  }
  enterRule(listener) {
    if (listener.enterConnectorEnd) {
      listener.enterConnectorEnd(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConnectorEnd) {
      listener.exitConnectorEnd(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConnectorEnd) {
      return visitor.visitConnectorEnd(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedCrossMultiplicityMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedCrossMultiplicity() {
    return this.getRuleContext(0, OwnedCrossMultiplicityContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedCrossMultiplicityMember;
  }
  enterRule(listener) {
    if (listener.enterOwnedCrossMultiplicityMember) {
      listener.enterOwnedCrossMultiplicityMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedCrossMultiplicityMember) {
      listener.exitOwnedCrossMultiplicityMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedCrossMultiplicityMember) {
      return visitor.visitOwnedCrossMultiplicityMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedCrossMultiplicityContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedMultiplicity() {
    return this.getRuleContext(0, OwnedMultiplicityContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedCrossMultiplicity;
  }
  enterRule(listener) {
    if (listener.enterOwnedCrossMultiplicity) {
      listener.enterOwnedCrossMultiplicity(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedCrossMultiplicity) {
      listener.exitOwnedCrossMultiplicity(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedCrossMultiplicity) {
      return visitor.visitOwnedCrossMultiplicity(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BindingConnectorContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  BINDING() {
    return this.getToken(SysMLv2Parser.BINDING, 0);
  }
  bindingConnectorDeclaration() {
    return this.getRuleContext(0, BindingConnectorDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_bindingConnector;
  }
  enterRule(listener) {
    if (listener.enterBindingConnector) {
      listener.enterBindingConnector(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBindingConnector) {
      listener.exitBindingConnector(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBindingConnector) {
      return visitor.visitBindingConnector(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BindingConnectorDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  OF() {
    return this.getToken(SysMLv2Parser.OF, 0);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  EQ() {
    return this.getToken(SysMLv2Parser.EQ, 0);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_bindingConnectorDeclaration;
  }
  enterRule(listener) {
    if (listener.enterBindingConnectorDeclaration) {
      listener.enterBindingConnectorDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBindingConnectorDeclaration) {
      listener.exitBindingConnectorDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBindingConnectorDeclaration) {
      return visitor.visitBindingConnectorDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  SUCCESSION() {
    return this.getToken(SysMLv2Parser.SUCCESSION, 0);
  }
  successionDeclaration() {
    return this.getRuleContext(0, SuccessionDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_succession;
  }
  enterRule(listener) {
    if (listener.enterSuccession) {
      listener.enterSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSuccession) {
      listener.exitSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSuccession) {
      return visitor.visitSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SuccessionDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  FIRST() {
    return this.getToken(SysMLv2Parser.FIRST, 0);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_successionDeclaration;
  }
  enterRule(listener) {
    if (listener.enterSuccessionDeclaration) {
      listener.enterSuccessionDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSuccessionDeclaration) {
      listener.exitSuccessionDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSuccessionDeclaration) {
      return visitor.visitSuccessionDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BehaviorContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  BEHAVIOR() {
    return this.getToken(SysMLv2Parser.BEHAVIOR, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_behavior;
  }
  enterRule(listener) {
    if (listener.enterBehavior) {
      listener.enterBehavior(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBehavior) {
      listener.exitBehavior(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBehavior) {
      return visitor.visitBehavior(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StepContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  STEP() {
    return this.getToken(SysMLv2Parser.STEP, 0);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_step;
  }
  enterRule(listener) {
    if (listener.enterStep) {
      listener.enterStep(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStep) {
      listener.exitStep(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStep) {
      return visitor.visitStep(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FunctionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  FUNCTION() {
    return this.getToken(SysMLv2Parser.FUNCTION, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  functionBody() {
    return this.getRuleContext(0, FunctionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_function;
  }
  enterRule(listener) {
    if (listener.enterFunction) {
      listener.enterFunction(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFunction) {
      listener.exitFunction(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFunction) {
      return visitor.visitFunction(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FunctionBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  functionBodyPart() {
    return this.getRuleContext(0, FunctionBodyPartContext);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_functionBody;
  }
  enterRule(listener) {
    if (listener.enterFunctionBody) {
      listener.enterFunctionBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFunctionBody) {
      listener.exitFunctionBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFunctionBody) {
      return visitor.visitFunctionBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FunctionBodyPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionBodyItemContext);
    }
    return this.getRuleContext(i, DefinitionBodyItemContext);
  }
  typeBodyElement(i) {
    if (i === void 0) {
      return this.getRuleContexts(TypeBodyElementContext);
    }
    return this.getRuleContext(i, TypeBodyElementContext);
  }
  returnFeatureMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ReturnFeatureMemberContext);
    }
    return this.getRuleContext(i, ReturnFeatureMemberContext);
  }
  resultExpressionMember() {
    return this.getRuleContext(0, ResultExpressionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_functionBodyPart;
  }
  enterRule(listener) {
    if (listener.enterFunctionBodyPart) {
      listener.enterFunctionBodyPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFunctionBodyPart) {
      listener.exitFunctionBodyPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFunctionBodyPart) {
      return visitor.visitFunctionBodyPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ReturnFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  RETURN() {
    return this.getToken(SysMLv2Parser.RETURN, 0);
  }
  featureElement() {
    return this.getRuleContext(0, FeatureElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_returnFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterReturnFeatureMember) {
      listener.enterReturnFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitReturnFeatureMember) {
      listener.exitReturnFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitReturnFeatureMember) {
      return visitor.visitReturnFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ResultExpressionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_resultExpressionMember;
  }
  enterRule(listener) {
    if (listener.enterResultExpressionMember) {
      listener.enterResultExpressionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitResultExpressionMember) {
      listener.exitResultExpressionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitResultExpressionMember) {
      return visitor.visitResultExpressionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  EXPR() {
    return this.getToken(SysMLv2Parser.EXPR, 0);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  functionBody() {
    return this.getRuleContext(0, FunctionBodyContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_expression;
  }
  enterRule(listener) {
    if (listener.enterExpression) {
      listener.enterExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitExpression) {
      listener.exitExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitExpression) {
      return visitor.visitExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PredicateContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  PREDICATE() {
    return this.getToken(SysMLv2Parser.PREDICATE, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  functionBody() {
    return this.getRuleContext(0, FunctionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_predicate;
  }
  enterRule(listener) {
    if (listener.enterPredicate) {
      listener.enterPredicate(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPredicate) {
      listener.exitPredicate(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPredicate) {
      return visitor.visitPredicate(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BooleanExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  BOOL() {
    return this.getToken(SysMLv2Parser.BOOL, 0);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  functionBody() {
    return this.getRuleContext(0, FunctionBodyContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_booleanExpression;
  }
  enterRule(listener) {
    if (listener.enterBooleanExpression) {
      listener.enterBooleanExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBooleanExpression) {
      listener.exitBooleanExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBooleanExpression) {
      return visitor.visitBooleanExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InvariantContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  INV() {
    return this.getToken(SysMLv2Parser.INV, 0);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  functionBody() {
    return this.getRuleContext(0, FunctionBodyContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  TRUE() {
    return this.getToken(SysMLv2Parser.TRUE, 0);
  }
  FALSE() {
    return this.getToken(SysMLv2Parser.FALSE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_invariant;
  }
  enterRule(listener) {
    if (listener.enterInvariant) {
      listener.enterInvariant(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInvariant) {
      listener.exitInvariant(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInvariant) {
      return visitor.visitInvariant(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureChainMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureChainMember;
  }
  enterRule(listener) {
    if (listener.enterFeatureChainMember) {
      listener.enterFeatureChainMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureChainMember) {
      listener.exitFeatureChainMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureChainMember) {
      return visitor.visitFeatureChainMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InteractionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  INTERACTION() {
    return this.getToken(SysMLv2Parser.INTERACTION, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interaction;
  }
  enterRule(listener) {
    if (listener.enterInteraction) {
      listener.enterInteraction(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInteraction) {
      listener.exitInteraction(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInteraction) {
      return visitor.visitInteraction(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  FLOW() {
    return this.getToken(SysMLv2Parser.FLOW, 0);
  }
  flowDeclaration() {
    return this.getRuleContext(0, FlowDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flow;
  }
  enterRule(listener) {
    if (listener.enterFlow) {
      listener.enterFlow(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlow) {
      listener.exitFlow(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlow) {
      return visitor.visitFlow(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SuccessionFlowContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featurePrefix() {
    return this.getRuleContext(0, FeaturePrefixContext);
  }
  SUCCESSION() {
    return this.getToken(SysMLv2Parser.SUCCESSION, 0);
  }
  FLOW() {
    return this.getToken(SysMLv2Parser.FLOW, 0);
  }
  flowDeclaration() {
    return this.getRuleContext(0, FlowDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_successionFlow;
  }
  enterRule(listener) {
    if (listener.enterSuccessionFlow) {
      listener.enterSuccessionFlow(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSuccessionFlow) {
      listener.exitSuccessionFlow(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSuccessionFlow) {
      return visitor.visitSuccessionFlow(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  OF() {
    return this.getToken(SysMLv2Parser.OF, 0);
  }
  payloadFeatureMember() {
    return this.getRuleContext(0, PayloadFeatureMemberContext);
  }
  FROM() {
    return this.getToken(SysMLv2Parser.FROM, 0);
  }
  flowEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(FlowEndMemberContext);
    }
    return this.getRuleContext(i, FlowEndMemberContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  ALL() {
    return this.getToken(SysMLv2Parser.ALL, 0);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  flowPayloadFeatureMember() {
    return this.getRuleContext(0, FlowPayloadFeatureMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flowDeclaration;
  }
  enterRule(listener) {
    if (listener.enterFlowDeclaration) {
      listener.enterFlowDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlowDeclaration) {
      listener.exitFlowDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlowDeclaration) {
      return visitor.visitFlowDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PayloadFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  payloadFeature() {
    return this.getRuleContext(0, PayloadFeatureContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_payloadFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterPayloadFeatureMember) {
      listener.enterPayloadFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPayloadFeatureMember) {
      listener.exitPayloadFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPayloadFeatureMember) {
      return visitor.visitPayloadFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PayloadFeatureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  payloadFeatureSpecializationPart() {
    return this.getRuleContext(0, PayloadFeatureSpecializationPartContext);
  }
  ownedFeatureTyping() {
    return this.getRuleContext(0, OwnedFeatureTypingContext);
  }
  ownedMultiplicity() {
    return this.getRuleContext(0, OwnedMultiplicityContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_payloadFeature;
  }
  enterRule(listener) {
    if (listener.enterPayloadFeature) {
      listener.enterPayloadFeature(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPayloadFeature) {
      listener.exitPayloadFeature(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPayloadFeature) {
      return visitor.visitPayloadFeature(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PayloadFeatureSpecializationPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureSpecialization(i) {
    if (i === void 0) {
      return this.getRuleContexts(FeatureSpecializationContext);
    }
    return this.getRuleContext(i, FeatureSpecializationContext);
  }
  multiplicityPart() {
    return this.getRuleContext(0, MultiplicityPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_payloadFeatureSpecializationPart;
  }
  enterRule(listener) {
    if (listener.enterPayloadFeatureSpecializationPart) {
      listener.enterPayloadFeatureSpecializationPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPayloadFeatureSpecializationPart) {
      listener.exitPayloadFeatureSpecializationPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPayloadFeatureSpecializationPart) {
      return visitor.visitPayloadFeatureSpecializationPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowEndMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  flowEnd() {
    return this.getRuleContext(0, FlowEndContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flowEndMember;
  }
  enterRule(listener) {
    if (listener.enterFlowEndMember) {
      listener.enterFlowEndMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlowEndMember) {
      listener.exitFlowEndMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlowEndMember) {
      return visitor.visitFlowEndMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowEndContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  DOT(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.DOT);
    } else {
      return this.getToken(SysMLv2Parser.DOT, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flowEnd;
  }
  enterRule(listener) {
    if (listener.enterFlowEnd) {
      listener.enterFlowEnd(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlowEnd) {
      listener.exitFlowEnd(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlowEnd) {
      return visitor.visitFlowEnd(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ValuePartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureValue() {
    return this.getRuleContext(0, FeatureValueContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_valuePart;
  }
  enterRule(listener) {
    if (listener.enterValuePart) {
      listener.enterValuePart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitValuePart) {
      listener.exitValuePart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitValuePart) {
      return visitor.visitValuePart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureValueContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  EQ() {
    return this.getToken(SysMLv2Parser.EQ, 0);
  }
  COLON_EQ() {
    return this.getToken(SysMLv2Parser.COLON_EQ, 0);
  }
  DEFAULT() {
    return this.getToken(SysMLv2Parser.DEFAULT, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureValue;
  }
  enterRule(listener) {
    if (listener.enterFeatureValue) {
      listener.enterFeatureValue(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureValue) {
      listener.exitFeatureValue(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureValue) {
      return visitor.visitFeatureValue(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MultiplicityContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  multiplicitySubset() {
    return this.getRuleContext(0, MultiplicitySubsetContext);
  }
  multiplicityRange() {
    return this.getRuleContext(0, MultiplicityRangeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_multiplicity;
  }
  enterRule(listener) {
    if (listener.enterMultiplicity) {
      listener.enterMultiplicity(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMultiplicity) {
      listener.exitMultiplicity(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMultiplicity) {
      return visitor.visitMultiplicity(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MultiplicitySubsetContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  MULTIPLICITY() {
    return this.getToken(SysMLv2Parser.MULTIPLICITY, 0);
  }
  subsets() {
    return this.getRuleContext(0, SubsetsContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_multiplicitySubset;
  }
  enterRule(listener) {
    if (listener.enterMultiplicitySubset) {
      listener.enterMultiplicitySubset(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMultiplicitySubset) {
      listener.exitMultiplicitySubset(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMultiplicitySubset) {
      return visitor.visitMultiplicitySubset(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MultiplicityRangeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  MULTIPLICITY() {
    return this.getToken(SysMLv2Parser.MULTIPLICITY, 0);
  }
  multiplicityBounds() {
    return this.getRuleContext(0, MultiplicityBoundsContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_multiplicityRange;
  }
  enterRule(listener) {
    if (listener.enterMultiplicityRange) {
      listener.enterMultiplicityRange(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMultiplicityRange) {
      listener.exitMultiplicityRange(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMultiplicityRange) {
      return visitor.visitMultiplicityRange(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedMultiplicityContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedMultiplicityRange() {
    return this.getRuleContext(0, OwnedMultiplicityRangeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedMultiplicity;
  }
  enterRule(listener) {
    if (listener.enterOwnedMultiplicity) {
      listener.enterOwnedMultiplicity(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedMultiplicity) {
      listener.exitOwnedMultiplicity(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedMultiplicity) {
      return visitor.visitOwnedMultiplicity(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OwnedMultiplicityRangeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  multiplicityBounds() {
    return this.getRuleContext(0, MultiplicityBoundsContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ownedMultiplicityRange;
  }
  enterRule(listener) {
    if (listener.enterOwnedMultiplicityRange) {
      listener.enterOwnedMultiplicityRange(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOwnedMultiplicityRange) {
      listener.exitOwnedMultiplicityRange(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOwnedMultiplicityRange) {
      return visitor.visitOwnedMultiplicityRange(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MultiplicityBoundsContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LBRACK() {
    return this.getToken(SysMLv2Parser.LBRACK, 0);
  }
  multiplicityExpressionMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(MultiplicityExpressionMemberContext);
    }
    return this.getRuleContext(i, MultiplicityExpressionMemberContext);
  }
  RBRACK() {
    return this.getToken(SysMLv2Parser.RBRACK, 0);
  }
  DOT_DOT() {
    return this.getToken(SysMLv2Parser.DOT_DOT, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_multiplicityBounds;
  }
  enterRule(listener) {
    if (listener.enterMultiplicityBounds) {
      listener.enterMultiplicityBounds(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMultiplicityBounds) {
      listener.exitMultiplicityBounds(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMultiplicityBounds) {
      return visitor.visitMultiplicityBounds(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MultiplicityExpressionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  literalExpression() {
    return this.getRuleContext(0, LiteralExpressionContext);
  }
  featureReferenceExpression() {
    return this.getRuleContext(0, FeatureReferenceExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_multiplicityExpressionMember;
  }
  enterRule(listener) {
    if (listener.enterMultiplicityExpressionMember) {
      listener.enterMultiplicityExpressionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMultiplicityExpressionMember) {
      listener.exitMultiplicityExpressionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMultiplicityExpressionMember) {
      return visitor.visitMultiplicityExpressionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetaclassContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  typePrefix() {
    return this.getRuleContext(0, TypePrefixContext);
  }
  METACLASS() {
    return this.getToken(SysMLv2Parser.METACLASS, 0);
  }
  classifierDeclaration() {
    return this.getRuleContext(0, ClassifierDeclarationContext);
  }
  typeBody() {
    return this.getRuleContext(0, TypeBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metaclass;
  }
  enterRule(listener) {
    if (listener.enterMetaclass) {
      listener.enterMetaclass(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetaclass) {
      listener.exitMetaclass(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetaclass) {
      return visitor.visitMetaclass(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PrefixMetadataAnnotationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  HASH() {
    return this.getToken(SysMLv2Parser.HASH, 0);
  }
  prefixMetadataFeature() {
    return this.getRuleContext(0, PrefixMetadataFeatureContext);
  }
  prefixMetadataUsage() {
    return this.getRuleContext(0, PrefixMetadataUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_prefixMetadataAnnotation;
  }
  enterRule(listener) {
    if (listener.enterPrefixMetadataAnnotation) {
      listener.enterPrefixMetadataAnnotation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPrefixMetadataAnnotation) {
      listener.exitPrefixMetadataAnnotation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPrefixMetadataAnnotation) {
      return visitor.visitPrefixMetadataAnnotation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PrefixMetadataMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  HASH() {
    return this.getToken(SysMLv2Parser.HASH, 0);
  }
  prefixMetadataFeature() {
    return this.getRuleContext(0, PrefixMetadataFeatureContext);
  }
  prefixMetadataUsage() {
    return this.getRuleContext(0, PrefixMetadataUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_prefixMetadataMember;
  }
  enterRule(listener) {
    if (listener.enterPrefixMetadataMember) {
      listener.enterPrefixMetadataMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPrefixMetadataMember) {
      listener.exitPrefixMetadataMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPrefixMetadataMember) {
      return visitor.visitPrefixMetadataMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PrefixMetadataFeatureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedFeatureTyping() {
    return this.getRuleContext(0, OwnedFeatureTypingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_prefixMetadataFeature;
  }
  enterRule(listener) {
    if (listener.enterPrefixMetadataFeature) {
      listener.enterPrefixMetadataFeature(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPrefixMetadataFeature) {
      listener.exitPrefixMetadataFeature(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPrefixMetadataFeature) {
      return visitor.visitPrefixMetadataFeature(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataFeatureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  metadataFeatureDeclaration() {
    return this.getRuleContext(0, MetadataFeatureDeclarationContext);
  }
  metadataBody() {
    return this.getRuleContext(0, MetadataBodyContext);
  }
  AT_SIGN() {
    return this.getToken(SysMLv2Parser.AT_SIGN, 0);
  }
  METADATA() {
    return this.getToken(SysMLv2Parser.METADATA, 0);
  }
  prefixMetadataMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataMemberContext);
    }
    return this.getRuleContext(i, PrefixMetadataMemberContext);
  }
  ABOUT() {
    return this.getToken(SysMLv2Parser.ABOUT, 0);
  }
  annotation(i) {
    if (i === void 0) {
      return this.getRuleContexts(AnnotationContext);
    }
    return this.getRuleContext(i, AnnotationContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataFeature;
  }
  enterRule(listener) {
    if (listener.enterMetadataFeature) {
      listener.enterMetadataFeature(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataFeature) {
      listener.exitMetadataFeature(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataFeature) {
      return visitor.visitMetadataFeature(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataFeatureDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedFeatureTyping() {
    return this.getRuleContext(0, OwnedFeatureTypingContext);
  }
  COLON() {
    return this.getToken(SysMLv2Parser.COLON, 0);
  }
  TYPED() {
    return this.getToken(SysMLv2Parser.TYPED, 0);
  }
  BY() {
    return this.getToken(SysMLv2Parser.BY, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataFeatureDeclaration;
  }
  enterRule(listener) {
    if (listener.enterMetadataFeatureDeclaration) {
      listener.enterMetadataFeatureDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataFeatureDeclaration) {
      listener.exitMetadataFeatureDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataFeatureDeclaration) {
      return visitor.visitMetadataFeatureDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  metadataBodyElement(i) {
    if (i === void 0) {
      return this.getRuleContexts(MetadataBodyElementContext);
    }
    return this.getRuleContext(i, MetadataBodyElementContext);
  }
  definitionMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionMemberContext);
    }
    return this.getRuleContext(i, DefinitionMemberContext);
  }
  metadataBodyUsageMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(MetadataBodyUsageMemberContext);
    }
    return this.getRuleContext(i, MetadataBodyUsageMemberContext);
  }
  aliasMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(AliasMemberContext);
    }
    return this.getRuleContext(i, AliasMemberContext);
  }
  importRule(i) {
    if (i === void 0) {
      return this.getRuleContexts(ImportRuleContext);
    }
    return this.getRuleContext(i, ImportRuleContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataBody;
  }
  enterRule(listener) {
    if (listener.enterMetadataBody) {
      listener.enterMetadataBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataBody) {
      listener.exitMetadataBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataBody) {
      return visitor.visitMetadataBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataBodyElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonFeatureMember() {
    return this.getRuleContext(0, NonFeatureMemberContext);
  }
  metadataBodyFeatureMember() {
    return this.getRuleContext(0, MetadataBodyFeatureMemberContext);
  }
  aliasMember() {
    return this.getRuleContext(0, AliasMemberContext);
  }
  importRule() {
    return this.getRuleContext(0, ImportRuleContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataBodyElement;
  }
  enterRule(listener) {
    if (listener.enterMetadataBodyElement) {
      listener.enterMetadataBodyElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataBodyElement) {
      listener.exitMetadataBodyElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataBodyElement) {
      return visitor.visitMetadataBodyElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataBodyFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  metadataBodyFeature() {
    return this.getRuleContext(0, MetadataBodyFeatureContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataBodyFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterMetadataBodyFeatureMember) {
      listener.enterMetadataBodyFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataBodyFeatureMember) {
      listener.exitMetadataBodyFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataBodyFeatureMember) {
      return visitor.visitMetadataBodyFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataBodyFeatureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedRedefinition() {
    return this.getRuleContext(0, OwnedRedefinitionContext);
  }
  metadataBody() {
    return this.getRuleContext(0, MetadataBodyContext);
  }
  FEATURE() {
    return this.getToken(SysMLv2Parser.FEATURE, 0);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  COLON_GT_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT_GT, 0);
  }
  REDEFINES() {
    return this.getToken(SysMLv2Parser.REDEFINES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataBodyFeature;
  }
  enterRule(listener) {
    if (listener.enterMetadataBodyFeature) {
      listener.enterMetadataBodyFeature(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataBodyFeature) {
      listener.exitMetadataBodyFeature(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataBodyFeature) {
      return visitor.visitMetadataBodyFeature(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PackageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  packageDeclaration() {
    return this.getRuleContext(0, PackageDeclarationContext);
  }
  packageBody() {
    return this.getRuleContext(0, PackageBodyContext);
  }
  prefixMetadataMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataMemberContext);
    }
    return this.getRuleContext(i, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_package;
  }
  enterRule(listener) {
    if (listener.enterPackage) {
      listener.enterPackage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPackage) {
      listener.exitPackage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPackage) {
      return visitor.visitPackage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var LibraryPackageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LIBRARY() {
    return this.getToken(SysMLv2Parser.LIBRARY, 0);
  }
  packageDeclaration() {
    return this.getRuleContext(0, PackageDeclarationContext);
  }
  packageBody() {
    return this.getRuleContext(0, PackageBodyContext);
  }
  STANDARD() {
    return this.getToken(SysMLv2Parser.STANDARD, 0);
  }
  prefixMetadataMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataMemberContext);
    }
    return this.getRuleContext(i, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_libraryPackage;
  }
  enterRule(listener) {
    if (listener.enterLibraryPackage) {
      listener.enterLibraryPackage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitLibraryPackage) {
      listener.exitLibraryPackage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitLibraryPackage) {
      return visitor.visitLibraryPackage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PackageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  PACKAGE() {
    return this.getToken(SysMLv2Parser.PACKAGE, 0);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_packageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterPackageDeclaration) {
      listener.enterPackageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPackageDeclaration) {
      listener.exitPackageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPackageDeclaration) {
      return visitor.visitPackageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PackageBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  packageBodyElement(i) {
    if (i === void 0) {
      return this.getRuleContexts(PackageBodyElementContext);
    }
    return this.getRuleContext(i, PackageBodyElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_packageBody;
  }
  enterRule(listener) {
    if (listener.enterPackageBody) {
      listener.enterPackageBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPackageBody) {
      listener.exitPackageBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPackageBody) {
      return visitor.visitPackageBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ElementFilterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  FILTER() {
    return this.getToken(SysMLv2Parser.FILTER, 0);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_elementFilterMember;
  }
  enterRule(listener) {
    if (listener.enterElementFilterMember) {
      listener.enterElementFilterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitElementFilterMember) {
      listener.exitElementFilterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitElementFilterMember) {
      return visitor.visitElementFilterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DependencyDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName(i) {
    if (i === void 0) {
      return this.getRuleContexts(QualifiedNameContext);
    }
    return this.getRuleContext(i, QualifiedNameContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  FROM() {
    return this.getToken(SysMLv2Parser.FROM, 0);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_dependencyDeclaration;
  }
  enterRule(listener) {
    if (listener.enterDependencyDeclaration) {
      listener.enterDependencyDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDependencyDeclaration) {
      listener.exitDependencyDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDependencyDeclaration) {
      return visitor.visitDependencyDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AnnotatingMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  annotatingElement() {
    return this.getRuleContext(0, AnnotatingElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_annotatingMember;
  }
  enterRule(listener) {
    if (listener.enterAnnotatingMember) {
      listener.enterAnnotatingMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAnnotatingMember) {
      listener.exitAnnotatingMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAnnotatingMember) {
      return visitor.visitAnnotatingMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PackageBodyElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  packageMember() {
    return this.getRuleContext(0, PackageMemberContext);
  }
  elementFilterMember() {
    return this.getRuleContext(0, ElementFilterMemberContext);
  }
  aliasMember() {
    return this.getRuleContext(0, AliasMemberContext);
  }
  importRule() {
    return this.getRuleContext(0, ImportRuleContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_packageBodyElement;
  }
  enterRule(listener) {
    if (listener.enterPackageBodyElement) {
      listener.enterPackageBodyElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPackageBodyElement) {
      listener.exitPackageBodyElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPackageBodyElement) {
      return visitor.visitPackageBodyElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PackageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  definitionElement() {
    return this.getRuleContext(0, DefinitionElementContext);
  }
  usageElement() {
    return this.getRuleContext(0, UsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_packageMember;
  }
  enterRule(listener) {
    if (listener.enterPackageMember) {
      listener.enterPackageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPackageMember) {
      listener.exitPackageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPackageMember) {
      return visitor.visitPackageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  package() {
    return this.getRuleContext(0, PackageContext);
  }
  libraryPackage() {
    return this.getRuleContext(0, LibraryPackageContext);
  }
  annotatingElement() {
    return this.getRuleContext(0, AnnotatingElementContext);
  }
  dependency() {
    return this.getRuleContext(0, DependencyContext);
  }
  attributeDefinition() {
    return this.getRuleContext(0, AttributeDefinitionContext);
  }
  enumerationDefinition() {
    return this.getRuleContext(0, EnumerationDefinitionContext);
  }
  occurrenceDefinition() {
    return this.getRuleContext(0, OccurrenceDefinitionContext);
  }
  individualDefinition() {
    return this.getRuleContext(0, IndividualDefinitionContext);
  }
  itemDefinition() {
    return this.getRuleContext(0, ItemDefinitionContext);
  }
  partDefinition() {
    return this.getRuleContext(0, PartDefinitionContext);
  }
  connectionDefinition() {
    return this.getRuleContext(0, ConnectionDefinitionContext);
  }
  flowDefinition() {
    return this.getRuleContext(0, FlowDefinitionContext);
  }
  interfaceDefinition() {
    return this.getRuleContext(0, InterfaceDefinitionContext);
  }
  portDefinition() {
    return this.getRuleContext(0, PortDefinitionContext);
  }
  actionDefinition() {
    return this.getRuleContext(0, ActionDefinitionContext);
  }
  calculationDefinition() {
    return this.getRuleContext(0, CalculationDefinitionContext);
  }
  stateDefinition() {
    return this.getRuleContext(0, StateDefinitionContext);
  }
  constraintDefinition() {
    return this.getRuleContext(0, ConstraintDefinitionContext);
  }
  requirementDefinition() {
    return this.getRuleContext(0, RequirementDefinitionContext);
  }
  concernDefinition() {
    return this.getRuleContext(0, ConcernDefinitionContext);
  }
  caseDefinition() {
    return this.getRuleContext(0, CaseDefinitionContext);
  }
  analysisCaseDefinition() {
    return this.getRuleContext(0, AnalysisCaseDefinitionContext);
  }
  verificationCaseDefinition() {
    return this.getRuleContext(0, VerificationCaseDefinitionContext);
  }
  useCaseDefinition() {
    return this.getRuleContext(0, UseCaseDefinitionContext);
  }
  viewDefinition() {
    return this.getRuleContext(0, ViewDefinitionContext);
  }
  viewpointDefinition() {
    return this.getRuleContext(0, ViewpointDefinitionContext);
  }
  renderingDefinition() {
    return this.getRuleContext(0, RenderingDefinitionContext);
  }
  metadataDefinition() {
    return this.getRuleContext(0, MetadataDefinitionContext);
  }
  allocationDefinition() {
    return this.getRuleContext(0, AllocationDefinitionContext);
  }
  extendedDefinition() {
    return this.getRuleContext(0, ExtendedDefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionElement;
  }
  enterRule(listener) {
    if (listener.enterDefinitionElement) {
      listener.enterDefinitionElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionElement) {
      listener.exitDefinitionElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionElement) {
      return visitor.visitDefinitionElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonOccurrenceUsageElement() {
    return this.getRuleContext(0, NonOccurrenceUsageElementContext);
  }
  occurrenceUsageElement() {
    return this.getRuleContext(0, OccurrenceUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_usageElement;
  }
  enterRule(listener) {
    if (listener.enterUsageElement) {
      listener.enterUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUsageElement) {
      listener.exitUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUsageElement) {
      return visitor.visitUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BasicDefinitionPrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ABSTRACT() {
    return this.getToken(SysMLv2Parser.ABSTRACT, 0);
  }
  VARIATION() {
    return this.getToken(SysMLv2Parser.VARIATION, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_basicDefinitionPrefix;
  }
  enterRule(listener) {
    if (listener.enterBasicDefinitionPrefix) {
      listener.enterBasicDefinitionPrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBasicDefinitionPrefix) {
      listener.exitBasicDefinitionPrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBasicDefinitionPrefix) {
      return visitor.visitBasicDefinitionPrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionExtensionKeywordContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  prefixMetadataMember() {
    return this.getRuleContext(0, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionExtensionKeyword;
  }
  enterRule(listener) {
    if (listener.enterDefinitionExtensionKeyword) {
      listener.enterDefinitionExtensionKeyword(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionExtensionKeyword) {
      listener.exitDefinitionExtensionKeyword(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionExtensionKeyword) {
      return visitor.visitDefinitionExtensionKeyword(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionPrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  basicDefinitionPrefix() {
    return this.getRuleContext(0, BasicDefinitionPrefixContext);
  }
  definitionExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionExtensionKeywordContext);
    }
    return this.getRuleContext(i, DefinitionExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionPrefix;
  }
  enterRule(listener) {
    if (listener.enterDefinitionPrefix) {
      listener.enterDefinitionPrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionPrefix) {
      listener.exitDefinitionPrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionPrefix) {
      return visitor.visitDefinitionPrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  definitionBody() {
    return this.getRuleContext(0, DefinitionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definition;
  }
  enterRule(listener) {
    if (listener.enterDefinition) {
      listener.enterDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinition) {
      listener.exitDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinition) {
      return visitor.visitDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  subclassificationPart() {
    return this.getRuleContext(0, SubclassificationPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionDeclaration;
  }
  enterRule(listener) {
    if (listener.enterDefinitionDeclaration) {
      listener.enterDefinitionDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionDeclaration) {
      listener.exitDefinitionDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionDeclaration) {
      return visitor.visitDefinitionDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  definitionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionBodyItemContext);
    }
    return this.getRuleContext(i, DefinitionBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionBody;
  }
  enterRule(listener) {
    if (listener.enterDefinitionBody) {
      listener.enterDefinitionBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionBody) {
      listener.exitDefinitionBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionBody) {
      return visitor.visitDefinitionBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  importRule() {
    return this.getRuleContext(0, ImportRuleContext);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  definitionBodyItemContent() {
    return this.getRuleContext(0, DefinitionBodyItemContentContext);
  }
  endOccurrenceUsageElement() {
    return this.getRuleContext(0, EndOccurrenceUsageElementContext);
  }
  sourceSuccessionMember() {
    return this.getRuleContext(0, SourceSuccessionMemberContext);
  }
  occurrenceUsageElement() {
    return this.getRuleContext(0, OccurrenceUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionBodyItem;
  }
  enterRule(listener) {
    if (listener.enterDefinitionBodyItem) {
      listener.enterDefinitionBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionBodyItem) {
      listener.exitDefinitionBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionBodyItem) {
      return visitor.visitDefinitionBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionBodyItemContentContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ALIAS() {
    return this.getToken(SysMLv2Parser.ALIAS, 0);
  }
  FOR() {
    return this.getToken(SysMLv2Parser.FOR, 0);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  LT() {
    return this.getToken(SysMLv2Parser.LT, 0);
  }
  name(i) {
    if (i === void 0) {
      return this.getRuleContexts(NameContext);
    }
    return this.getRuleContext(i, NameContext);
  }
  GT() {
    return this.getToken(SysMLv2Parser.GT, 0);
  }
  VARIANT() {
    return this.getToken(SysMLv2Parser.VARIANT, 0);
  }
  variantUsageElement() {
    return this.getRuleContext(0, VariantUsageElementContext);
  }
  definitionElement() {
    return this.getRuleContext(0, DefinitionElementContext);
  }
  nonOccurrenceUsageElement() {
    return this.getRuleContext(0, NonOccurrenceUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionBodyItemContent;
  }
  enterRule(listener) {
    if (listener.enterDefinitionBodyItemContent) {
      listener.enterDefinitionBodyItemContent(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionBodyItemContent) {
      listener.exitDefinitionBodyItemContent(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionBodyItemContent) {
      return visitor.visitDefinitionBodyItemContent(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefinitionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  definitionElement() {
    return this.getRuleContext(0, DefinitionElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_definitionMember;
  }
  enterRule(listener) {
    if (listener.enterDefinitionMember) {
      listener.enterDefinitionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefinitionMember) {
      listener.exitDefinitionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefinitionMember) {
      return visitor.visitDefinitionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var VariantUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  VARIANT() {
    return this.getToken(SysMLv2Parser.VARIANT, 0);
  }
  variantUsageElement() {
    return this.getRuleContext(0, VariantUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_variantUsageMember;
  }
  enterRule(listener) {
    if (listener.enterVariantUsageMember) {
      listener.enterVariantUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitVariantUsageMember) {
      listener.exitVariantUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitVariantUsageMember) {
      return visitor.visitVariantUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NonOccurrenceUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  nonOccurrenceUsageElement() {
    return this.getRuleContext(0, NonOccurrenceUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nonOccurrenceUsageMember;
  }
  enterRule(listener) {
    if (listener.enterNonOccurrenceUsageMember) {
      listener.enterNonOccurrenceUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNonOccurrenceUsageMember) {
      listener.exitNonOccurrenceUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNonOccurrenceUsageMember) {
      return visitor.visitNonOccurrenceUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StructureUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  structureUsageElement() {
    return this.getRuleContext(0, StructureUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_structureUsageMember;
  }
  enterRule(listener) {
    if (listener.enterStructureUsageMember) {
      listener.enterStructureUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStructureUsageMember) {
      listener.exitStructureUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStructureUsageMember) {
      return visitor.visitStructureUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BehaviorUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  behaviorUsageElement() {
    return this.getRuleContext(0, BehaviorUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_behaviorUsageMember;
  }
  enterRule(listener) {
    if (listener.enterBehaviorUsageMember) {
      listener.enterBehaviorUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBehaviorUsageMember) {
      listener.exitBehaviorUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBehaviorUsageMember) {
      return visitor.visitBehaviorUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RefPrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureDirection() {
    return this.getRuleContext(0, FeatureDirectionContext);
  }
  DERIVED() {
    return this.getToken(SysMLv2Parser.DERIVED, 0);
  }
  CONSTANT() {
    return this.getToken(SysMLv2Parser.CONSTANT, 0);
  }
  ABSTRACT() {
    return this.getToken(SysMLv2Parser.ABSTRACT, 0);
  }
  VARIATION() {
    return this.getToken(SysMLv2Parser.VARIATION, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_refPrefix;
  }
  enterRule(listener) {
    if (listener.enterRefPrefix) {
      listener.enterRefPrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRefPrefix) {
      listener.exitRefPrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRefPrefix) {
      return visitor.visitRefPrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BasicUsagePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  refPrefix() {
    return this.getRuleContext(0, RefPrefixContext);
  }
  REF() {
    return this.getToken(SysMLv2Parser.REF, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_basicUsagePrefix;
  }
  enterRule(listener) {
    if (listener.enterBasicUsagePrefix) {
      listener.enterBasicUsagePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBasicUsagePrefix) {
      listener.exitBasicUsagePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBasicUsagePrefix) {
      return visitor.visitBasicUsagePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EndUsagePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  END() {
    return this.getToken(SysMLv2Parser.END, 0);
  }
  ownedCrossFeatureMember() {
    return this.getRuleContext(0, OwnedCrossFeatureMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_endUsagePrefix;
  }
  enterRule(listener) {
    if (listener.enterEndUsagePrefix) {
      listener.enterEndUsagePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEndUsagePrefix) {
      listener.exitEndUsagePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEndUsagePrefix) {
      return visitor.visitEndUsagePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UsageExtensionKeywordContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  prefixMetadataMember() {
    return this.getRuleContext(0, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_usageExtensionKeyword;
  }
  enterRule(listener) {
    if (listener.enterUsageExtensionKeyword) {
      listener.enterUsageExtensionKeyword(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUsageExtensionKeyword) {
      listener.exitUsageExtensionKeyword(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUsageExtensionKeyword) {
      return visitor.visitUsageExtensionKeyword(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UnextendedUsagePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  endUsagePrefix() {
    return this.getRuleContext(0, EndUsagePrefixContext);
  }
  basicUsagePrefix() {
    return this.getRuleContext(0, BasicUsagePrefixContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_unextendedUsagePrefix;
  }
  enterRule(listener) {
    if (listener.enterUnextendedUsagePrefix) {
      listener.enterUnextendedUsagePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUnextendedUsagePrefix) {
      listener.exitUnextendedUsagePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUnextendedUsagePrefix) {
      return visitor.visitUnextendedUsagePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UsagePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  unextendedUsagePrefix() {
    return this.getRuleContext(0, UnextendedUsagePrefixContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_usagePrefix;
  }
  enterRule(listener) {
    if (listener.enterUsagePrefix) {
      listener.enterUsagePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUsagePrefix) {
      listener.exitUsagePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUsagePrefix) {
      return visitor.visitUsagePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageCompletion() {
    return this.getRuleContext(0, UsageCompletionContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_usage;
  }
  enterRule(listener) {
    if (listener.enterUsage) {
      listener.enterUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUsage) {
      listener.exitUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUsage) {
      return visitor.visitUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_usageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterUsageDeclaration) {
      listener.enterUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUsageDeclaration) {
      listener.exitUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUsageDeclaration) {
      return visitor.visitUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UsageCompletionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_usageCompletion;
  }
  enterRule(listener) {
    if (listener.enterUsageCompletion) {
      listener.enterUsageCompletion(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUsageCompletion) {
      listener.exitUsageCompletion(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUsageCompletion) {
      return visitor.visitUsageCompletion(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UsageBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionBody() {
    return this.getRuleContext(0, DefinitionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_usageBody;
  }
  enterRule(listener) {
    if (listener.enterUsageBody) {
      listener.enterUsageBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUsageBody) {
      listener.exitUsageBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUsageBody) {
      return visitor.visitUsageBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefaultReferenceUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  refPrefix() {
    return this.getRuleContext(0, RefPrefixContext);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_defaultReferenceUsage;
  }
  enterRule(listener) {
    if (listener.enterDefaultReferenceUsage) {
      listener.enterDefaultReferenceUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefaultReferenceUsage) {
      listener.exitDefaultReferenceUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefaultReferenceUsage) {
      return visitor.visitDefaultReferenceUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ReferenceUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  REF() {
    return this.getToken(SysMLv2Parser.REF, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  endUsagePrefix() {
    return this.getRuleContext(0, EndUsagePrefixContext);
  }
  refPrefix() {
    return this.getRuleContext(0, RefPrefixContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_referenceUsage;
  }
  enterRule(listener) {
    if (listener.enterReferenceUsage) {
      listener.enterReferenceUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitReferenceUsage) {
      listener.exitReferenceUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitReferenceUsage) {
      return visitor.visitReferenceUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EndFeatureUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  endUsagePrefix() {
    return this.getRuleContext(0, EndUsagePrefixContext);
  }
  featureDeclaration() {
    return this.getRuleContext(0, FeatureDeclarationContext);
  }
  usageCompletion() {
    return this.getRuleContext(0, UsageCompletionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_endFeatureUsage;
  }
  enterRule(listener) {
    if (listener.enterEndFeatureUsage) {
      listener.enterEndFeatureUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEndFeatureUsage) {
      listener.exitEndFeatureUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEndFeatureUsage) {
      return visitor.visitEndFeatureUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var VariantReferenceContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  featureSpecialization(i) {
    if (i === void 0) {
      return this.getRuleContexts(FeatureSpecializationContext);
    }
    return this.getRuleContext(i, FeatureSpecializationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_variantReference;
  }
  enterRule(listener) {
    if (listener.enterVariantReference) {
      listener.enterVariantReference(this);
    }
  }
  exitRule(listener) {
    if (listener.exitVariantReference) {
      listener.exitVariantReference(this);
    }
  }
  accept(visitor) {
    if (visitor.visitVariantReference) {
      return visitor.visitVariantReference(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NonOccurrenceUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  referenceUsage() {
    return this.getRuleContext(0, ReferenceUsageContext);
  }
  endFeatureUsage() {
    return this.getRuleContext(0, EndFeatureUsageContext);
  }
  attributeUsage() {
    return this.getRuleContext(0, AttributeUsageContext);
  }
  enumerationUsage() {
    return this.getRuleContext(0, EnumerationUsageContext);
  }
  bindingConnectorAsUsage() {
    return this.getRuleContext(0, BindingConnectorAsUsageContext);
  }
  successionAsUsage() {
    return this.getRuleContext(0, SuccessionAsUsageContext);
  }
  extendedUsage() {
    return this.getRuleContext(0, ExtendedUsageContext);
  }
  defaultReferenceUsage() {
    return this.getRuleContext(0, DefaultReferenceUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nonOccurrenceUsageElement;
  }
  enterRule(listener) {
    if (listener.enterNonOccurrenceUsageElement) {
      listener.enterNonOccurrenceUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNonOccurrenceUsageElement) {
      listener.exitNonOccurrenceUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNonOccurrenceUsageElement) {
      return visitor.visitNonOccurrenceUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EndOccurrenceUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  END() {
    return this.getToken(SysMLv2Parser.END, 0);
  }
  occurrenceUsageElement() {
    return this.getRuleContext(0, OccurrenceUsageElementContext);
  }
  name() {
    return this.getRuleContext(0, NameContext);
  }
  ownedCrossMultiplicityMember() {
    return this.getRuleContext(0, OwnedCrossMultiplicityMemberContext);
  }
  NONUNIQUE() {
    return this.getToken(SysMLv2Parser.NONUNIQUE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_endOccurrenceUsageElement;
  }
  enterRule(listener) {
    if (listener.enterEndOccurrenceUsageElement) {
      listener.enterEndOccurrenceUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEndOccurrenceUsageElement) {
      listener.exitEndOccurrenceUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEndOccurrenceUsageElement) {
      return visitor.visitEndOccurrenceUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OccurrenceUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  structureUsageElement() {
    return this.getRuleContext(0, StructureUsageElementContext);
  }
  behaviorUsageElement() {
    return this.getRuleContext(0, BehaviorUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_occurrenceUsageElement;
  }
  enterRule(listener) {
    if (listener.enterOccurrenceUsageElement) {
      listener.enterOccurrenceUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOccurrenceUsageElement) {
      listener.exitOccurrenceUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOccurrenceUsageElement) {
      return visitor.visitOccurrenceUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StructureUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsage() {
    return this.getRuleContext(0, OccurrenceUsageContext);
  }
  individualUsage() {
    return this.getRuleContext(0, IndividualUsageContext);
  }
  portionUsage() {
    return this.getRuleContext(0, PortionUsageContext);
  }
  eventOccurrenceUsage() {
    return this.getRuleContext(0, EventOccurrenceUsageContext);
  }
  itemUsage() {
    return this.getRuleContext(0, ItemUsageContext);
  }
  partUsage() {
    return this.getRuleContext(0, PartUsageContext);
  }
  viewUsage() {
    return this.getRuleContext(0, ViewUsageContext);
  }
  renderingUsage() {
    return this.getRuleContext(0, RenderingUsageContext);
  }
  portUsage() {
    return this.getRuleContext(0, PortUsageContext);
  }
  connectionUsage() {
    return this.getRuleContext(0, ConnectionUsageContext);
  }
  interfaceUsage() {
    return this.getRuleContext(0, InterfaceUsageContext);
  }
  allocationUsage() {
    return this.getRuleContext(0, AllocationUsageContext);
  }
  message() {
    return this.getRuleContext(0, MessageContext);
  }
  flowUsage() {
    return this.getRuleContext(0, FlowUsageContext);
  }
  successionFlowUsage() {
    return this.getRuleContext(0, SuccessionFlowUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_structureUsageElement;
  }
  enterRule(listener) {
    if (listener.enterStructureUsageElement) {
      listener.enterStructureUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStructureUsageElement) {
      listener.exitStructureUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStructureUsageElement) {
      return visitor.visitStructureUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BehaviorUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionUsage() {
    return this.getRuleContext(0, ActionUsageContext);
  }
  calculationUsage() {
    return this.getRuleContext(0, CalculationUsageContext);
  }
  stateUsage() {
    return this.getRuleContext(0, StateUsageContext);
  }
  constraintUsage() {
    return this.getRuleContext(0, ConstraintUsageContext);
  }
  requirementUsage() {
    return this.getRuleContext(0, RequirementUsageContext);
  }
  concernUsage() {
    return this.getRuleContext(0, ConcernUsageContext);
  }
  caseUsage() {
    return this.getRuleContext(0, CaseUsageContext);
  }
  analysisCaseUsage() {
    return this.getRuleContext(0, AnalysisCaseUsageContext);
  }
  verificationCaseUsage() {
    return this.getRuleContext(0, VerificationCaseUsageContext);
  }
  useCaseUsage() {
    return this.getRuleContext(0, UseCaseUsageContext);
  }
  viewpointUsage() {
    return this.getRuleContext(0, ViewpointUsageContext);
  }
  performActionUsage() {
    return this.getRuleContext(0, PerformActionUsageContext);
  }
  exhibitStateUsage() {
    return this.getRuleContext(0, ExhibitStateUsageContext);
  }
  includeUseCaseUsage() {
    return this.getRuleContext(0, IncludeUseCaseUsageContext);
  }
  assertConstraintUsage() {
    return this.getRuleContext(0, AssertConstraintUsageContext);
  }
  satisfyRequirementUsage() {
    return this.getRuleContext(0, SatisfyRequirementUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_behaviorUsageElement;
  }
  enterRule(listener) {
    if (listener.enterBehaviorUsageElement) {
      listener.enterBehaviorUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBehaviorUsageElement) {
      listener.exitBehaviorUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBehaviorUsageElement) {
      return visitor.visitBehaviorUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var VariantUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  variantReference() {
    return this.getRuleContext(0, VariantReferenceContext);
  }
  referenceUsage() {
    return this.getRuleContext(0, ReferenceUsageContext);
  }
  attributeUsage() {
    return this.getRuleContext(0, AttributeUsageContext);
  }
  bindingConnectorAsUsage() {
    return this.getRuleContext(0, BindingConnectorAsUsageContext);
  }
  successionAsUsage() {
    return this.getRuleContext(0, SuccessionAsUsageContext);
  }
  occurrenceUsage() {
    return this.getRuleContext(0, OccurrenceUsageContext);
  }
  individualUsage() {
    return this.getRuleContext(0, IndividualUsageContext);
  }
  portionUsage() {
    return this.getRuleContext(0, PortionUsageContext);
  }
  eventOccurrenceUsage() {
    return this.getRuleContext(0, EventOccurrenceUsageContext);
  }
  itemUsage() {
    return this.getRuleContext(0, ItemUsageContext);
  }
  partUsage() {
    return this.getRuleContext(0, PartUsageContext);
  }
  viewUsage() {
    return this.getRuleContext(0, ViewUsageContext);
  }
  renderingUsage() {
    return this.getRuleContext(0, RenderingUsageContext);
  }
  portUsage() {
    return this.getRuleContext(0, PortUsageContext);
  }
  connectionUsage() {
    return this.getRuleContext(0, ConnectionUsageContext);
  }
  interfaceUsage() {
    return this.getRuleContext(0, InterfaceUsageContext);
  }
  allocationUsage() {
    return this.getRuleContext(0, AllocationUsageContext);
  }
  message() {
    return this.getRuleContext(0, MessageContext);
  }
  flowUsage() {
    return this.getRuleContext(0, FlowUsageContext);
  }
  successionFlowUsage() {
    return this.getRuleContext(0, SuccessionFlowUsageContext);
  }
  behaviorUsageElement() {
    return this.getRuleContext(0, BehaviorUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_variantUsageElement;
  }
  enterRule(listener) {
    if (listener.enterVariantUsageElement) {
      listener.enterVariantUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitVariantUsageElement) {
      listener.exitVariantUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitVariantUsageElement) {
      return visitor.visitVariantUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SubclassificationPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedSubclassification(i) {
    if (i === void 0) {
      return this.getRuleContexts(OwnedSubclassificationContext);
    }
    return this.getRuleContext(i, OwnedSubclassificationContext);
  }
  COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT, 0);
  }
  SPECIALIZES() {
    return this.getToken(SysMLv2Parser.SPECIALIZES, 0);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_subclassificationPart;
  }
  enterRule(listener) {
    if (listener.enterSubclassificationPart) {
      listener.enterSubclassificationPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSubclassificationPart) {
      listener.exitSubclassificationPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSubclassificationPart) {
      return visitor.visitSubclassificationPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AttributeDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionPrefix() {
    return this.getRuleContext(0, DefinitionPrefixContext);
  }
  ATTRIBUTE() {
    return this.getToken(SysMLv2Parser.ATTRIBUTE, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_attributeDefinition;
  }
  enterRule(listener) {
    if (listener.enterAttributeDefinition) {
      listener.enterAttributeDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAttributeDefinition) {
      listener.exitAttributeDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAttributeDefinition) {
      return visitor.visitAttributeDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AttributeUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usagePrefix() {
    return this.getRuleContext(0, UsagePrefixContext);
  }
  ATTRIBUTE() {
    return this.getToken(SysMLv2Parser.ATTRIBUTE, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_attributeUsage;
  }
  enterRule(listener) {
    if (listener.enterAttributeUsage) {
      listener.enterAttributeUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAttributeUsage) {
      listener.exitAttributeUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAttributeUsage) {
      return visitor.visitAttributeUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EnumerationDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ENUM() {
    return this.getToken(SysMLv2Parser.ENUM, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  enumerationBody() {
    return this.getRuleContext(0, EnumerationBodyContext);
  }
  definitionExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionExtensionKeywordContext);
    }
    return this.getRuleContext(i, DefinitionExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_enumerationDefinition;
  }
  enterRule(listener) {
    if (listener.enterEnumerationDefinition) {
      listener.enterEnumerationDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEnumerationDefinition) {
      listener.exitEnumerationDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEnumerationDefinition) {
      return visitor.visitEnumerationDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EnumerationBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  annotatingMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(AnnotatingMemberContext);
    }
    return this.getRuleContext(i, AnnotatingMemberContext);
  }
  enumerationUsageMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(EnumerationUsageMemberContext);
    }
    return this.getRuleContext(i, EnumerationUsageMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_enumerationBody;
  }
  enterRule(listener) {
    if (listener.enterEnumerationBody) {
      listener.enterEnumerationBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEnumerationBody) {
      listener.exitEnumerationBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEnumerationBody) {
      return visitor.visitEnumerationBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EnumerationUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  enumeratedValue() {
    return this.getRuleContext(0, EnumeratedValueContext);
  }
  prefixMetadataMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(PrefixMetadataMemberContext);
    }
    return this.getRuleContext(i, PrefixMetadataMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_enumerationUsageMember;
  }
  enterRule(listener) {
    if (listener.enterEnumerationUsageMember) {
      listener.enterEnumerationUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEnumerationUsageMember) {
      listener.exitEnumerationUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEnumerationUsageMember) {
      return visitor.visitEnumerationUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EnumeratedValueContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  ENUM() {
    return this.getToken(SysMLv2Parser.ENUM, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_enumeratedValue;
  }
  enterRule(listener) {
    if (listener.enterEnumeratedValue) {
      listener.enterEnumeratedValue(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEnumeratedValue) {
      listener.exitEnumeratedValue(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEnumeratedValue) {
      return visitor.visitEnumeratedValue(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EnumerationUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usagePrefix() {
    return this.getRuleContext(0, UsagePrefixContext);
  }
  ENUM() {
    return this.getToken(SysMLv2Parser.ENUM, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_enumerationUsage;
  }
  enterRule(listener) {
    if (listener.enterEnumerationUsage) {
      listener.enterEnumerationUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEnumerationUsage) {
      listener.exitEnumerationUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEnumerationUsage) {
      return visitor.visitEnumerationUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OccurrenceDefinitionPrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  basicDefinitionPrefix() {
    return this.getRuleContext(0, BasicDefinitionPrefixContext);
  }
  INDIVIDUAL() {
    return this.getToken(SysMLv2Parser.INDIVIDUAL, 0);
  }
  emptyMultiplicityMember() {
    return this.getRuleContext(0, EmptyMultiplicityMemberContext);
  }
  definitionExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionExtensionKeywordContext);
    }
    return this.getRuleContext(i, DefinitionExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_occurrenceDefinitionPrefix;
  }
  enterRule(listener) {
    if (listener.enterOccurrenceDefinitionPrefix) {
      listener.enterOccurrenceDefinitionPrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOccurrenceDefinitionPrefix) {
      listener.exitOccurrenceDefinitionPrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOccurrenceDefinitionPrefix) {
      return visitor.visitOccurrenceDefinitionPrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OccurrenceDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  OCCURRENCE() {
    return this.getToken(SysMLv2Parser.OCCURRENCE, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_occurrenceDefinition;
  }
  enterRule(listener) {
    if (listener.enterOccurrenceDefinition) {
      listener.enterOccurrenceDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOccurrenceDefinition) {
      listener.exitOccurrenceDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOccurrenceDefinition) {
      return visitor.visitOccurrenceDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IndividualDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  INDIVIDUAL() {
    return this.getToken(SysMLv2Parser.INDIVIDUAL, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  emptyMultiplicityMember() {
    return this.getRuleContext(0, EmptyMultiplicityMemberContext);
  }
  basicDefinitionPrefix() {
    return this.getRuleContext(0, BasicDefinitionPrefixContext);
  }
  definitionExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionExtensionKeywordContext);
    }
    return this.getRuleContext(i, DefinitionExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_individualDefinition;
  }
  enterRule(listener) {
    if (listener.enterIndividualDefinition) {
      listener.enterIndividualDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIndividualDefinition) {
      listener.exitIndividualDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIndividualDefinition) {
      return visitor.visitIndividualDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EmptyMultiplicityMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  emptyMultiplicity_() {
    return this.getRuleContext(0, EmptyMultiplicity_Context);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_emptyMultiplicityMember;
  }
  enterRule(listener) {
    if (listener.enterEmptyMultiplicityMember) {
      listener.enterEmptyMultiplicityMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEmptyMultiplicityMember) {
      listener.exitEmptyMultiplicityMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEmptyMultiplicityMember) {
      return visitor.visitEmptyMultiplicityMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OccurrenceUsagePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  basicUsagePrefix() {
    return this.getRuleContext(0, BasicUsagePrefixContext);
  }
  INDIVIDUAL() {
    return this.getToken(SysMLv2Parser.INDIVIDUAL, 0);
  }
  portionKind() {
    return this.getRuleContext(0, PortionKindContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_occurrenceUsagePrefix;
  }
  enterRule(listener) {
    if (listener.enterOccurrenceUsagePrefix) {
      listener.enterOccurrenceUsagePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOccurrenceUsagePrefix) {
      listener.exitOccurrenceUsagePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOccurrenceUsagePrefix) {
      return visitor.visitOccurrenceUsagePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var OccurrenceUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  OCCURRENCE() {
    return this.getToken(SysMLv2Parser.OCCURRENCE, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_occurrenceUsage;
  }
  enterRule(listener) {
    if (listener.enterOccurrenceUsage) {
      listener.enterOccurrenceUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitOccurrenceUsage) {
      listener.exitOccurrenceUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitOccurrenceUsage) {
      return visitor.visitOccurrenceUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IndividualUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  basicUsagePrefix() {
    return this.getRuleContext(0, BasicUsagePrefixContext);
  }
  INDIVIDUAL() {
    return this.getToken(SysMLv2Parser.INDIVIDUAL, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_individualUsage;
  }
  enterRule(listener) {
    if (listener.enterIndividualUsage) {
      listener.enterIndividualUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIndividualUsage) {
      listener.exitIndividualUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIndividualUsage) {
      return visitor.visitIndividualUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PortionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  basicUsagePrefix() {
    return this.getRuleContext(0, BasicUsagePrefixContext);
  }
  portionKind() {
    return this.getRuleContext(0, PortionKindContext);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  INDIVIDUAL() {
    return this.getToken(SysMLv2Parser.INDIVIDUAL, 0);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_portionUsage;
  }
  enterRule(listener) {
    if (listener.enterPortionUsage) {
      listener.enterPortionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPortionUsage) {
      listener.exitPortionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPortionUsage) {
      return visitor.visitPortionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PortionKindContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SNAPSHOT() {
    return this.getToken(SysMLv2Parser.SNAPSHOT, 0);
  }
  TIMESLICE() {
    return this.getToken(SysMLv2Parser.TIMESLICE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_portionKind;
  }
  enterRule(listener) {
    if (listener.enterPortionKind) {
      listener.enterPortionKind(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPortionKind) {
      listener.exitPortionKind(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPortionKind) {
      return visitor.visitPortionKind(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EventOccurrenceUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  EVENT() {
    return this.getToken(SysMLv2Parser.EVENT, 0);
  }
  usageCompletion() {
    return this.getRuleContext(0, UsageCompletionContext);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  OCCURRENCE() {
    return this.getToken(SysMLv2Parser.OCCURRENCE, 0);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_eventOccurrenceUsage;
  }
  enterRule(listener) {
    if (listener.enterEventOccurrenceUsage) {
      listener.enterEventOccurrenceUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEventOccurrenceUsage) {
      listener.exitEventOccurrenceUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEventOccurrenceUsage) {
      return visitor.visitEventOccurrenceUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SourceSuccessionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  sourceSuccession() {
    return this.getRuleContext(0, SourceSuccessionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_sourceSuccessionMember;
  }
  enterRule(listener) {
    if (listener.enterSourceSuccessionMember) {
      listener.enterSourceSuccessionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSourceSuccessionMember) {
      listener.exitSourceSuccessionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSourceSuccessionMember) {
      return visitor.visitSourceSuccessionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SourceSuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  sourceEndMember() {
    return this.getRuleContext(0, SourceEndMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_sourceSuccession;
  }
  enterRule(listener) {
    if (listener.enterSourceSuccession) {
      listener.enterSourceSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSourceSuccession) {
      listener.exitSourceSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSourceSuccession) {
      return visitor.visitSourceSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SourceEndMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  sourceEnd() {
    return this.getRuleContext(0, SourceEndContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_sourceEndMember;
  }
  enterRule(listener) {
    if (listener.enterSourceEndMember) {
      listener.enterSourceEndMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSourceEndMember) {
      listener.exitSourceEndMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSourceEndMember) {
      return visitor.visitSourceEndMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SourceEndContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedMultiplicity() {
    return this.getRuleContext(0, OwnedMultiplicityContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_sourceEnd;
  }
  enterRule(listener) {
    if (listener.enterSourceEnd) {
      listener.enterSourceEnd(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSourceEnd) {
      listener.exitSourceEnd(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSourceEnd) {
      return visitor.visitSourceEnd(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ItemDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  ITEM() {
    return this.getToken(SysMLv2Parser.ITEM, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_itemDefinition;
  }
  enterRule(listener) {
    if (listener.enterItemDefinition) {
      listener.enterItemDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitItemDefinition) {
      listener.exitItemDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitItemDefinition) {
      return visitor.visitItemDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ItemUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  ITEM() {
    return this.getToken(SysMLv2Parser.ITEM, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_itemUsage;
  }
  enterRule(listener) {
    if (listener.enterItemUsage) {
      listener.enterItemUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitItemUsage) {
      listener.exitItemUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitItemUsage) {
      return visitor.visitItemUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PartDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  PART() {
    return this.getToken(SysMLv2Parser.PART, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_partDefinition;
  }
  enterRule(listener) {
    if (listener.enterPartDefinition) {
      listener.enterPartDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPartDefinition) {
      listener.exitPartDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPartDefinition) {
      return visitor.visitPartDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PartUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  PART() {
    return this.getToken(SysMLv2Parser.PART, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_partUsage;
  }
  enterRule(listener) {
    if (listener.enterPartUsage) {
      listener.enterPartUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPartUsage) {
      listener.exitPartUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPartUsage) {
      return visitor.visitPartUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PortDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionPrefix() {
    return this.getRuleContext(0, DefinitionPrefixContext);
  }
  PORT() {
    return this.getToken(SysMLv2Parser.PORT, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  conjugatedPortDefinitionMember() {
    return this.getRuleContext(0, ConjugatedPortDefinitionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_portDefinition;
  }
  enterRule(listener) {
    if (listener.enterPortDefinition) {
      listener.enterPortDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPortDefinition) {
      listener.exitPortDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPortDefinition) {
      return visitor.visitPortDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConjugatedPortDefinitionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  conjugatedPortDefinition() {
    return this.getRuleContext(0, ConjugatedPortDefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_conjugatedPortDefinitionMember;
  }
  enterRule(listener) {
    if (listener.enterConjugatedPortDefinitionMember) {
      listener.enterConjugatedPortDefinitionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConjugatedPortDefinitionMember) {
      listener.exitConjugatedPortDefinitionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConjugatedPortDefinitionMember) {
      return visitor.visitConjugatedPortDefinitionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConjugatedPortDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  portConjugation() {
    return this.getRuleContext(0, PortConjugationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_conjugatedPortDefinition;
  }
  enterRule(listener) {
    if (listener.enterConjugatedPortDefinition) {
      listener.enterConjugatedPortDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConjugatedPortDefinition) {
      listener.exitConjugatedPortDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConjugatedPortDefinition) {
      return visitor.visitConjugatedPortDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PortUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  PORT() {
    return this.getToken(SysMLv2Parser.PORT, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_portUsage;
  }
  enterRule(listener) {
    if (listener.enterPortUsage) {
      listener.enterPortUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPortUsage) {
      listener.exitPortUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPortUsage) {
      return visitor.visitPortUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConjugatedPortTypingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  TILDE() {
    return this.getToken(SysMLv2Parser.TILDE, 0);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_conjugatedPortTyping;
  }
  enterRule(listener) {
    if (listener.enterConjugatedPortTyping) {
      listener.enterConjugatedPortTyping(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConjugatedPortTyping) {
      listener.exitConjugatedPortTyping(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConjugatedPortTyping) {
      return visitor.visitConjugatedPortTyping(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConnectionDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  CONNECTION() {
    return this.getToken(SysMLv2Parser.CONNECTION, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_connectionDefinition;
  }
  enterRule(listener) {
    if (listener.enterConnectionDefinition) {
      listener.enterConnectionDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConnectionDefinition) {
      listener.exitConnectionDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConnectionDefinition) {
      return visitor.visitConnectionDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConnectionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  CONNECTION() {
    return this.getToken(SysMLv2Parser.CONNECTION, 0);
  }
  CONNECT() {
    return this.getToken(SysMLv2Parser.CONNECT, 0);
  }
  connectorPart() {
    return this.getRuleContext(0, ConnectorPartContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_connectionUsage;
  }
  enterRule(listener) {
    if (listener.enterConnectionUsage) {
      listener.enterConnectionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConnectionUsage) {
      listener.exitConnectionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConnectionUsage) {
      return visitor.visitConnectionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConnectorPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  binaryConnectorPart() {
    return this.getRuleContext(0, BinaryConnectorPartContext);
  }
  naryConnectorPart() {
    return this.getRuleContext(0, NaryConnectorPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_connectorPart;
  }
  enterRule(listener) {
    if (listener.enterConnectorPart) {
      listener.enterConnectorPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConnectorPart) {
      listener.exitConnectorPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConnectorPart) {
      return visitor.visitConnectorPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BinaryConnectorPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_binaryConnectorPart;
  }
  enterRule(listener) {
    if (listener.enterBinaryConnectorPart) {
      listener.enterBinaryConnectorPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBinaryConnectorPart) {
      listener.exitBinaryConnectorPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBinaryConnectorPart) {
      return visitor.visitBinaryConnectorPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NaryConnectorPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LPAREN() {
    return this.getToken(SysMLv2Parser.LPAREN, 0);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  RPAREN() {
    return this.getToken(SysMLv2Parser.RPAREN, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_naryConnectorPart;
  }
  enterRule(listener) {
    if (listener.enterNaryConnectorPart) {
      listener.enterNaryConnectorPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNaryConnectorPart) {
      listener.exitNaryConnectorPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNaryConnectorPart) {
      return visitor.visitNaryConnectorPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BindingConnectorAsUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usagePrefix() {
    return this.getRuleContext(0, UsagePrefixContext);
  }
  BIND() {
    return this.getToken(SysMLv2Parser.BIND, 0);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  EQ() {
    return this.getToken(SysMLv2Parser.EQ, 0);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  BINDING() {
    return this.getToken(SysMLv2Parser.BINDING, 0);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_bindingConnectorAsUsage;
  }
  enterRule(listener) {
    if (listener.enterBindingConnectorAsUsage) {
      listener.enterBindingConnectorAsUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBindingConnectorAsUsage) {
      listener.exitBindingConnectorAsUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBindingConnectorAsUsage) {
      return visitor.visitBindingConnectorAsUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SuccessionAsUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usagePrefix() {
    return this.getRuleContext(0, UsagePrefixContext);
  }
  FIRST() {
    return this.getToken(SysMLv2Parser.FIRST, 0);
  }
  connectorEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ConnectorEndMemberContext);
    }
    return this.getRuleContext(i, ConnectorEndMemberContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  SUCCESSION() {
    return this.getToken(SysMLv2Parser.SUCCESSION, 0);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_successionAsUsage;
  }
  enterRule(listener) {
    if (listener.enterSuccessionAsUsage) {
      listener.enterSuccessionAsUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSuccessionAsUsage) {
      listener.exitSuccessionAsUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSuccessionAsUsage) {
      return visitor.visitSuccessionAsUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  INTERFACE() {
    return this.getToken(SysMLv2Parser.INTERFACE, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  interfaceBody() {
    return this.getRuleContext(0, InterfaceBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceDefinition;
  }
  enterRule(listener) {
    if (listener.enterInterfaceDefinition) {
      listener.enterInterfaceDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceDefinition) {
      listener.exitInterfaceDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceDefinition) {
      return visitor.visitInterfaceDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  interfaceBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(InterfaceBodyItemContext);
    }
    return this.getRuleContext(i, InterfaceBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceBody;
  }
  enterRule(listener) {
    if (listener.enterInterfaceBody) {
      listener.enterInterfaceBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceBody) {
      listener.exitInterfaceBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceBody) {
      return visitor.visitInterfaceBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionMember() {
    return this.getRuleContext(0, DefinitionMemberContext);
  }
  variantUsageMember() {
    return this.getRuleContext(0, VariantUsageMemberContext);
  }
  interfaceNonOccurrenceUsageMember() {
    return this.getRuleContext(0, InterfaceNonOccurrenceUsageMemberContext);
  }
  interfaceOccurrenceUsageMember() {
    return this.getRuleContext(0, InterfaceOccurrenceUsageMemberContext);
  }
  sourceSuccessionMember() {
    return this.getRuleContext(0, SourceSuccessionMemberContext);
  }
  aliasMember() {
    return this.getRuleContext(0, AliasMemberContext);
  }
  importRule() {
    return this.getRuleContext(0, ImportRuleContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceBodyItem;
  }
  enterRule(listener) {
    if (listener.enterInterfaceBodyItem) {
      listener.enterInterfaceBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceBodyItem) {
      listener.exitInterfaceBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceBodyItem) {
      return visitor.visitInterfaceBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceNonOccurrenceUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  interfaceNonOccurrenceUsageElement() {
    return this.getRuleContext(0, InterfaceNonOccurrenceUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceNonOccurrenceUsageMember;
  }
  enterRule(listener) {
    if (listener.enterInterfaceNonOccurrenceUsageMember) {
      listener.enterInterfaceNonOccurrenceUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceNonOccurrenceUsageMember) {
      listener.exitInterfaceNonOccurrenceUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceNonOccurrenceUsageMember) {
      return visitor.visitInterfaceNonOccurrenceUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceNonOccurrenceUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  referenceUsage() {
    return this.getRuleContext(0, ReferenceUsageContext);
  }
  attributeUsage() {
    return this.getRuleContext(0, AttributeUsageContext);
  }
  enumerationUsage() {
    return this.getRuleContext(0, EnumerationUsageContext);
  }
  bindingConnectorAsUsage() {
    return this.getRuleContext(0, BindingConnectorAsUsageContext);
  }
  successionAsUsage() {
    return this.getRuleContext(0, SuccessionAsUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceNonOccurrenceUsageElement;
  }
  enterRule(listener) {
    if (listener.enterInterfaceNonOccurrenceUsageElement) {
      listener.enterInterfaceNonOccurrenceUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceNonOccurrenceUsageElement) {
      listener.exitInterfaceNonOccurrenceUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceNonOccurrenceUsageElement) {
      return visitor.visitInterfaceNonOccurrenceUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceOccurrenceUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  interfaceOccurrenceUsageElement() {
    return this.getRuleContext(0, InterfaceOccurrenceUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceOccurrenceUsageMember;
  }
  enterRule(listener) {
    if (listener.enterInterfaceOccurrenceUsageMember) {
      listener.enterInterfaceOccurrenceUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceOccurrenceUsageMember) {
      listener.exitInterfaceOccurrenceUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceOccurrenceUsageMember) {
      return visitor.visitInterfaceOccurrenceUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceOccurrenceUsageElementContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  defaultInterfaceEnd() {
    return this.getRuleContext(0, DefaultInterfaceEndContext);
  }
  endOccurrenceUsageElement() {
    return this.getRuleContext(0, EndOccurrenceUsageElementContext);
  }
  structureUsageElement() {
    return this.getRuleContext(0, StructureUsageElementContext);
  }
  behaviorUsageElement() {
    return this.getRuleContext(0, BehaviorUsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceOccurrenceUsageElement;
  }
  enterRule(listener) {
    if (listener.enterInterfaceOccurrenceUsageElement) {
      listener.enterInterfaceOccurrenceUsageElement(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceOccurrenceUsageElement) {
      listener.exitInterfaceOccurrenceUsageElement(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceOccurrenceUsageElement) {
      return visitor.visitInterfaceOccurrenceUsageElement(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefaultInterfaceEndContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  END() {
    return this.getToken(SysMLv2Parser.END, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_defaultInterfaceEnd;
  }
  enterRule(listener) {
    if (listener.enterDefaultInterfaceEnd) {
      listener.enterDefaultInterfaceEnd(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefaultInterfaceEnd) {
      listener.exitDefaultInterfaceEnd(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefaultInterfaceEnd) {
      return visitor.visitDefaultInterfaceEnd(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  INTERFACE() {
    return this.getToken(SysMLv2Parser.INTERFACE, 0);
  }
  interfaceUsageDeclaration() {
    return this.getRuleContext(0, InterfaceUsageDeclarationContext);
  }
  interfaceBody() {
    return this.getRuleContext(0, InterfaceBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceUsage;
  }
  enterRule(listener) {
    if (listener.enterInterfaceUsage) {
      listener.enterInterfaceUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceUsage) {
      listener.exitInterfaceUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceUsage) {
      return visitor.visitInterfaceUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceUsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  CONNECT() {
    return this.getToken(SysMLv2Parser.CONNECT, 0);
  }
  interfacePart() {
    return this.getRuleContext(0, InterfacePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceUsageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterInterfaceUsageDeclaration) {
      listener.enterInterfaceUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceUsageDeclaration) {
      listener.exitInterfaceUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceUsageDeclaration) {
      return visitor.visitInterfaceUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfacePartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  binaryInterfacePart() {
    return this.getRuleContext(0, BinaryInterfacePartContext);
  }
  naryInterfacePart() {
    return this.getRuleContext(0, NaryInterfacePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfacePart;
  }
  enterRule(listener) {
    if (listener.enterInterfacePart) {
      listener.enterInterfacePart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfacePart) {
      listener.exitInterfacePart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfacePart) {
      return visitor.visitInterfacePart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var BinaryInterfacePartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  interfaceEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(InterfaceEndMemberContext);
    }
    return this.getRuleContext(i, InterfaceEndMemberContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_binaryInterfacePart;
  }
  enterRule(listener) {
    if (listener.enterBinaryInterfacePart) {
      listener.enterBinaryInterfacePart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitBinaryInterfacePart) {
      listener.exitBinaryInterfacePart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitBinaryInterfacePart) {
      return visitor.visitBinaryInterfacePart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NaryInterfacePartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LPAREN() {
    return this.getToken(SysMLv2Parser.LPAREN, 0);
  }
  interfaceEndMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(InterfaceEndMemberContext);
    }
    return this.getRuleContext(i, InterfaceEndMemberContext);
  }
  COMMA(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COMMA);
    } else {
      return this.getToken(SysMLv2Parser.COMMA, i);
    }
  }
  RPAREN() {
    return this.getToken(SysMLv2Parser.RPAREN, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_naryInterfacePart;
  }
  enterRule(listener) {
    if (listener.enterNaryInterfacePart) {
      listener.enterNaryInterfacePart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNaryInterfacePart) {
      listener.exitNaryInterfacePart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNaryInterfacePart) {
      return visitor.visitNaryInterfacePart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceEndMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  interfaceEnd() {
    return this.getRuleContext(0, InterfaceEndContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceEndMember;
  }
  enterRule(listener) {
    if (listener.enterInterfaceEndMember) {
      listener.enterInterfaceEndMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceEndMember) {
      listener.exitInterfaceEndMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceEndMember) {
      return visitor.visitInterfaceEndMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InterfaceEndContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  ownedCrossMultiplicityMember() {
    return this.getRuleContext(0, OwnedCrossMultiplicityMemberContext);
  }
  name() {
    return this.getRuleContext(0, NameContext);
  }
  COLON_COLON_GT() {
    return this.getToken(SysMLv2Parser.COLON_COLON_GT, 0);
  }
  REFERENCES() {
    return this.getToken(SysMLv2Parser.REFERENCES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_interfaceEnd;
  }
  enterRule(listener) {
    if (listener.enterInterfaceEnd) {
      listener.enterInterfaceEnd(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInterfaceEnd) {
      listener.exitInterfaceEnd(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInterfaceEnd) {
      return visitor.visitInterfaceEnd(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AllocationDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  ALLOCATION() {
    return this.getToken(SysMLv2Parser.ALLOCATION, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_allocationDefinition;
  }
  enterRule(listener) {
    if (listener.enterAllocationDefinition) {
      listener.enterAllocationDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAllocationDefinition) {
      listener.exitAllocationDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAllocationDefinition) {
      return visitor.visitAllocationDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AllocationUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  allocationUsageDeclaration() {
    return this.getRuleContext(0, AllocationUsageDeclarationContext);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_allocationUsage;
  }
  enterRule(listener) {
    if (listener.enterAllocationUsage) {
      listener.enterAllocationUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAllocationUsage) {
      listener.exitAllocationUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAllocationUsage) {
      return visitor.visitAllocationUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AllocationUsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ALLOCATION() {
    return this.getToken(SysMLv2Parser.ALLOCATION, 0);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  ALLOCATE() {
    return this.getToken(SysMLv2Parser.ALLOCATE, 0);
  }
  connectorPart() {
    return this.getRuleContext(0, ConnectorPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_allocationUsageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterAllocationUsageDeclaration) {
      listener.enterAllocationUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAllocationUsageDeclaration) {
      listener.exitAllocationUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAllocationUsageDeclaration) {
      return visitor.visitAllocationUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  FLOW() {
    return this.getToken(SysMLv2Parser.FLOW, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flowDefinition;
  }
  enterRule(listener) {
    if (listener.enterFlowDefinition) {
      listener.enterFlowDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlowDefinition) {
      listener.exitFlowDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlowDefinition) {
      return visitor.visitFlowDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MessageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  MESSAGE() {
    return this.getToken(SysMLv2Parser.MESSAGE, 0);
  }
  messageDeclaration() {
    return this.getRuleContext(0, MessageDeclarationContext);
  }
  definitionBody() {
    return this.getRuleContext(0, DefinitionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_message;
  }
  enterRule(listener) {
    if (listener.enterMessage) {
      listener.enterMessage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMessage) {
      listener.exitMessage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMessage) {
      return visitor.visitMessage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MessageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  OF() {
    return this.getToken(SysMLv2Parser.OF, 0);
  }
  flowPayloadFeatureMember() {
    return this.getRuleContext(0, FlowPayloadFeatureMemberContext);
  }
  FROM() {
    return this.getToken(SysMLv2Parser.FROM, 0);
  }
  messageEventMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(MessageEventMemberContext);
    }
    return this.getRuleContext(i, MessageEventMemberContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_messageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterMessageDeclaration) {
      listener.enterMessageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMessageDeclaration) {
      listener.exitMessageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMessageDeclaration) {
      return visitor.visitMessageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MessageEventMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  messageEvent() {
    return this.getRuleContext(0, MessageEventContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_messageEventMember;
  }
  enterRule(listener) {
    if (listener.enterMessageEventMember) {
      listener.enterMessageEventMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMessageEventMember) {
      listener.exitMessageEventMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMessageEventMember) {
      return visitor.visitMessageEventMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MessageEventContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_messageEvent;
  }
  enterRule(listener) {
    if (listener.enterMessageEvent) {
      listener.enterMessageEvent(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMessageEvent) {
      listener.exitMessageEvent(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMessageEvent) {
      return visitor.visitMessageEvent(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  FLOW() {
    return this.getToken(SysMLv2Parser.FLOW, 0);
  }
  flowDeclaration() {
    return this.getRuleContext(0, FlowDeclarationContext);
  }
  definitionBody() {
    return this.getRuleContext(0, DefinitionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flowUsage;
  }
  enterRule(listener) {
    if (listener.enterFlowUsage) {
      listener.enterFlowUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlowUsage) {
      listener.exitFlowUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlowUsage) {
      return visitor.visitFlowUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SuccessionFlowUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  SUCCESSION() {
    return this.getToken(SysMLv2Parser.SUCCESSION, 0);
  }
  FLOW() {
    return this.getToken(SysMLv2Parser.FLOW, 0);
  }
  flowDeclaration() {
    return this.getRuleContext(0, FlowDeclarationContext);
  }
  definitionBody() {
    return this.getRuleContext(0, DefinitionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_successionFlowUsage;
  }
  enterRule(listener) {
    if (listener.enterSuccessionFlowUsage) {
      listener.enterSuccessionFlowUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSuccessionFlowUsage) {
      listener.exitSuccessionFlowUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSuccessionFlowUsage) {
      return visitor.visitSuccessionFlowUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowPayloadFeatureMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  flowPayloadFeature() {
    return this.getRuleContext(0, FlowPayloadFeatureContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flowPayloadFeatureMember;
  }
  enterRule(listener) {
    if (listener.enterFlowPayloadFeatureMember) {
      listener.enterFlowPayloadFeatureMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlowPayloadFeatureMember) {
      listener.exitFlowPayloadFeatureMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlowPayloadFeatureMember) {
      return visitor.visitFlowPayloadFeatureMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FlowPayloadFeatureContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  payloadFeature() {
    return this.getRuleContext(0, PayloadFeatureContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_flowPayloadFeature;
  }
  enterRule(listener) {
    if (listener.enterFlowPayloadFeature) {
      listener.enterFlowPayloadFeature(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFlowPayloadFeature) {
      listener.exitFlowPayloadFeature(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFlowPayloadFeature) {
      return visitor.visitFlowPayloadFeature(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  ACTION() {
    return this.getToken(SysMLv2Parser.ACTION, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionDefinition;
  }
  enterRule(listener) {
    if (listener.enterActionDefinition) {
      listener.enterActionDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionDefinition) {
      listener.exitActionDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionDefinition) {
      return visitor.visitActionDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  actionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionBodyItemContext);
    }
    return this.getRuleContext(i, ActionBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionBody;
  }
  enterRule(listener) {
    if (listener.enterActionBody) {
      listener.enterActionBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionBody) {
      listener.exitActionBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionBody) {
      return visitor.visitActionBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonBehaviorBodyItem() {
    return this.getRuleContext(0, NonBehaviorBodyItemContext);
  }
  initialNodeMember() {
    return this.getRuleContext(0, InitialNodeMemberContext);
  }
  actionTargetSuccessionMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionTargetSuccessionMemberContext);
    }
    return this.getRuleContext(i, ActionTargetSuccessionMemberContext);
  }
  actionBehaviorMember() {
    return this.getRuleContext(0, ActionBehaviorMemberContext);
  }
  sourceSuccessionMember() {
    return this.getRuleContext(0, SourceSuccessionMemberContext);
  }
  guardedSuccessionMember() {
    return this.getRuleContext(0, GuardedSuccessionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionBodyItem;
  }
  enterRule(listener) {
    if (listener.enterActionBodyItem) {
      listener.enterActionBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionBodyItem) {
      listener.exitActionBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionBodyItem) {
      return visitor.visitActionBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NonBehaviorBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  importRule() {
    return this.getRuleContext(0, ImportRuleContext);
  }
  aliasMember() {
    return this.getRuleContext(0, AliasMemberContext);
  }
  definitionMember() {
    return this.getRuleContext(0, DefinitionMemberContext);
  }
  variantUsageMember() {
    return this.getRuleContext(0, VariantUsageMemberContext);
  }
  nonOccurrenceUsageMember() {
    return this.getRuleContext(0, NonOccurrenceUsageMemberContext);
  }
  structureUsageMember() {
    return this.getRuleContext(0, StructureUsageMemberContext);
  }
  sourceSuccessionMember() {
    return this.getRuleContext(0, SourceSuccessionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nonBehaviorBodyItem;
  }
  enterRule(listener) {
    if (listener.enterNonBehaviorBodyItem) {
      listener.enterNonBehaviorBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNonBehaviorBodyItem) {
      listener.exitNonBehaviorBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNonBehaviorBodyItem) {
      return visitor.visitNonBehaviorBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionBehaviorMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionNodeMember() {
    return this.getRuleContext(0, ActionNodeMemberContext);
  }
  behaviorUsageMember() {
    return this.getRuleContext(0, BehaviorUsageMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionBehaviorMember;
  }
  enterRule(listener) {
    if (listener.enterActionBehaviorMember) {
      listener.enterActionBehaviorMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionBehaviorMember) {
      listener.exitActionBehaviorMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionBehaviorMember) {
      return visitor.visitActionBehaviorMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var InitialNodeMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  FIRST() {
    return this.getToken(SysMLv2Parser.FIRST, 0);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_initialNodeMember;
  }
  enterRule(listener) {
    if (listener.enterInitialNodeMember) {
      listener.enterInitialNodeMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitInitialNodeMember) {
      listener.exitInitialNodeMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitInitialNodeMember) {
      return visitor.visitInitialNodeMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionNodeMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  actionNode() {
    return this.getRuleContext(0, ActionNodeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionNodeMember;
  }
  enterRule(listener) {
    if (listener.enterActionNodeMember) {
      listener.enterActionNodeMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionNodeMember) {
      listener.exitActionNodeMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionNodeMember) {
      return visitor.visitActionNodeMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionTargetSuccessionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  actionTargetSuccession() {
    return this.getRuleContext(0, ActionTargetSuccessionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionTargetSuccessionMember;
  }
  enterRule(listener) {
    if (listener.enterActionTargetSuccessionMember) {
      listener.enterActionTargetSuccessionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionTargetSuccessionMember) {
      listener.exitActionTargetSuccessionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionTargetSuccessionMember) {
      return visitor.visitActionTargetSuccessionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var GuardedSuccessionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  guardedSuccession() {
    return this.getRuleContext(0, GuardedSuccessionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_guardedSuccessionMember;
  }
  enterRule(listener) {
    if (listener.enterGuardedSuccessionMember) {
      listener.enterGuardedSuccessionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitGuardedSuccessionMember) {
      listener.exitGuardedSuccessionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitGuardedSuccessionMember) {
      return visitor.visitGuardedSuccessionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  ACTION() {
    return this.getToken(SysMLv2Parser.ACTION, 0);
  }
  actionUsageDeclaration() {
    return this.getRuleContext(0, ActionUsageDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionUsage;
  }
  enterRule(listener) {
    if (listener.enterActionUsage) {
      listener.enterActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionUsage) {
      listener.exitActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionUsage) {
      return visitor.visitActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionUsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionUsageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterActionUsageDeclaration) {
      listener.enterActionUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionUsageDeclaration) {
      listener.exitActionUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionUsageDeclaration) {
      return visitor.visitActionUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PerformActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  PERFORM() {
    return this.getToken(SysMLv2Parser.PERFORM, 0);
  }
  performActionUsageDeclaration() {
    return this.getRuleContext(0, PerformActionUsageDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_performActionUsage;
  }
  enterRule(listener) {
    if (listener.enterPerformActionUsage) {
      listener.enterPerformActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPerformActionUsage) {
      listener.exitPerformActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPerformActionUsage) {
      return visitor.visitPerformActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PerformActionUsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  ACTION() {
    return this.getToken(SysMLv2Parser.ACTION, 0);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_performActionUsageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterPerformActionUsageDeclaration) {
      listener.enterPerformActionUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPerformActionUsageDeclaration) {
      listener.exitPerformActionUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPerformActionUsageDeclaration) {
      return visitor.visitPerformActionUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  controlNode() {
    return this.getRuleContext(0, ControlNodeContext);
  }
  sendNode() {
    return this.getRuleContext(0, SendNodeContext);
  }
  acceptNode() {
    return this.getRuleContext(0, AcceptNodeContext);
  }
  assignmentNode() {
    return this.getRuleContext(0, AssignmentNodeContext);
  }
  terminateNode() {
    return this.getRuleContext(0, TerminateNodeContext);
  }
  ifNode() {
    return this.getRuleContext(0, IfNodeContext);
  }
  whileLoopNode() {
    return this.getRuleContext(0, WhileLoopNodeContext);
  }
  forLoopNode() {
    return this.getRuleContext(0, ForLoopNodeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionNode;
  }
  enterRule(listener) {
    if (listener.enterActionNode) {
      listener.enterActionNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionNode) {
      listener.exitActionNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionNode) {
      return visitor.visitActionNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionNodeUsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ACTION() {
    return this.getToken(SysMLv2Parser.ACTION, 0);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionNodeUsageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterActionNodeUsageDeclaration) {
      listener.enterActionNodeUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionNodeUsageDeclaration) {
      listener.exitActionNodeUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionNodeUsageDeclaration) {
      return visitor.visitActionNodeUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionNodePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  actionNodeUsageDeclaration() {
    return this.getRuleContext(0, ActionNodeUsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionNodePrefix;
  }
  enterRule(listener) {
    if (listener.enterActionNodePrefix) {
      listener.enterActionNodePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionNodePrefix) {
      listener.exitActionNodePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionNodePrefix) {
      return visitor.visitActionNodePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ControlNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  mergeNode() {
    return this.getRuleContext(0, MergeNodeContext);
  }
  decisionNode() {
    return this.getRuleContext(0, DecisionNodeContext);
  }
  joinNode() {
    return this.getRuleContext(0, JoinNodeContext);
  }
  forkNode() {
    return this.getRuleContext(0, ForkNodeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_controlNode;
  }
  enterRule(listener) {
    if (listener.enterControlNode) {
      listener.enterControlNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitControlNode) {
      listener.exitControlNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitControlNode) {
      return visitor.visitControlNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ControlNodePrefixContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  refPrefix() {
    return this.getRuleContext(0, RefPrefixContext);
  }
  INDIVIDUAL() {
    return this.getToken(SysMLv2Parser.INDIVIDUAL, 0);
  }
  portionKind() {
    return this.getRuleContext(0, PortionKindContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_controlNodePrefix;
  }
  enterRule(listener) {
    if (listener.enterControlNodePrefix) {
      listener.enterControlNodePrefix(this);
    }
  }
  exitRule(listener) {
    if (listener.exitControlNodePrefix) {
      listener.exitControlNodePrefix(this);
    }
  }
  accept(visitor) {
    if (visitor.visitControlNodePrefix) {
      return visitor.visitControlNodePrefix(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MergeNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  controlNodePrefix() {
    return this.getRuleContext(0, ControlNodePrefixContext);
  }
  MERGE() {
    return this.getToken(SysMLv2Parser.MERGE, 0);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_mergeNode;
  }
  enterRule(listener) {
    if (listener.enterMergeNode) {
      listener.enterMergeNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMergeNode) {
      listener.exitMergeNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMergeNode) {
      return visitor.visitMergeNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DecisionNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  controlNodePrefix() {
    return this.getRuleContext(0, ControlNodePrefixContext);
  }
  DECIDE() {
    return this.getToken(SysMLv2Parser.DECIDE, 0);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_decisionNode;
  }
  enterRule(listener) {
    if (listener.enterDecisionNode) {
      listener.enterDecisionNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDecisionNode) {
      listener.exitDecisionNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDecisionNode) {
      return visitor.visitDecisionNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var JoinNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  controlNodePrefix() {
    return this.getRuleContext(0, ControlNodePrefixContext);
  }
  JOIN() {
    return this.getToken(SysMLv2Parser.JOIN, 0);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_joinNode;
  }
  enterRule(listener) {
    if (listener.enterJoinNode) {
      listener.enterJoinNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitJoinNode) {
      listener.exitJoinNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitJoinNode) {
      return visitor.visitJoinNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ForkNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  controlNodePrefix() {
    return this.getRuleContext(0, ControlNodePrefixContext);
  }
  FORK() {
    return this.getToken(SysMLv2Parser.FORK, 0);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_forkNode;
  }
  enterRule(listener) {
    if (listener.enterForkNode) {
      listener.enterForkNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitForkNode) {
      listener.exitForkNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitForkNode) {
      return visitor.visitForkNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AcceptNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  acceptNodeDeclaration() {
    return this.getRuleContext(0, AcceptNodeDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_acceptNode;
  }
  enterRule(listener) {
    if (listener.enterAcceptNode) {
      listener.enterAcceptNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAcceptNode) {
      listener.exitAcceptNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAcceptNode) {
      return visitor.visitAcceptNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AcceptNodeDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ACCEPT() {
    return this.getToken(SysMLv2Parser.ACCEPT, 0);
  }
  acceptParameterPart() {
    return this.getRuleContext(0, AcceptParameterPartContext);
  }
  actionNodeUsageDeclaration() {
    return this.getRuleContext(0, ActionNodeUsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_acceptNodeDeclaration;
  }
  enterRule(listener) {
    if (listener.enterAcceptNodeDeclaration) {
      listener.enterAcceptNodeDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAcceptNodeDeclaration) {
      listener.exitAcceptNodeDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAcceptNodeDeclaration) {
      return visitor.visitAcceptNodeDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AcceptParameterPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  payloadParameterMember() {
    return this.getRuleContext(0, PayloadParameterMemberContext);
  }
  VIA() {
    return this.getToken(SysMLv2Parser.VIA, 0);
  }
  nodeParameterMember() {
    return this.getRuleContext(0, NodeParameterMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_acceptParameterPart;
  }
  enterRule(listener) {
    if (listener.enterAcceptParameterPart) {
      listener.enterAcceptParameterPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAcceptParameterPart) {
      listener.exitAcceptParameterPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAcceptParameterPart) {
      return visitor.visitAcceptParameterPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PayloadParameterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  payloadParameter() {
    return this.getRuleContext(0, PayloadParameterContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_payloadParameterMember;
  }
  enterRule(listener) {
    if (listener.enterPayloadParameterMember) {
      listener.enterPayloadParameterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPayloadParameterMember) {
      listener.exitPayloadParameterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPayloadParameterMember) {
      return visitor.visitPayloadParameterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PayloadParameterContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  payloadFeature() {
    return this.getRuleContext(0, PayloadFeatureContext);
  }
  triggerValuePart() {
    return this.getRuleContext(0, TriggerValuePartContext);
  }
  identification() {
    return this.getRuleContext(0, IdentificationContext);
  }
  payloadFeatureSpecializationPart() {
    return this.getRuleContext(0, PayloadFeatureSpecializationPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_payloadParameter;
  }
  enterRule(listener) {
    if (listener.enterPayloadParameter) {
      listener.enterPayloadParameter(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPayloadParameter) {
      listener.exitPayloadParameter(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPayloadParameter) {
      return visitor.visitPayloadParameter(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TriggerValuePartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  triggerFeatureValue() {
    return this.getRuleContext(0, TriggerFeatureValueContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_triggerValuePart;
  }
  enterRule(listener) {
    if (listener.enterTriggerValuePart) {
      listener.enterTriggerValuePart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTriggerValuePart) {
      listener.exitTriggerValuePart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTriggerValuePart) {
      return visitor.visitTriggerValuePart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TriggerFeatureValueContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  triggerExpression() {
    return this.getRuleContext(0, TriggerExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_triggerFeatureValue;
  }
  enterRule(listener) {
    if (listener.enterTriggerFeatureValue) {
      listener.enterTriggerFeatureValue(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTriggerFeatureValue) {
      listener.exitTriggerFeatureValue(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTriggerFeatureValue) {
      return visitor.visitTriggerFeatureValue(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TriggerExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  argumentMember() {
    return this.getRuleContext(0, ArgumentMemberContext);
  }
  AT() {
    return this.getToken(SysMLv2Parser.AT, 0);
  }
  AFTER() {
    return this.getToken(SysMLv2Parser.AFTER, 0);
  }
  WHEN() {
    return this.getToken(SysMLv2Parser.WHEN, 0);
  }
  argumentExpressionMember() {
    return this.getRuleContext(0, ArgumentExpressionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_triggerExpression;
  }
  enterRule(listener) {
    if (listener.enterTriggerExpression) {
      listener.enterTriggerExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTriggerExpression) {
      listener.exitTriggerExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTriggerExpression) {
      return visitor.visitTriggerExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SendNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  SEND() {
    return this.getToken(SysMLv2Parser.SEND, 0);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  actionNodeUsageDeclaration() {
    return this.getRuleContext(0, ActionNodeUsageDeclarationContext);
  }
  actionUsageDeclaration() {
    return this.getRuleContext(0, ActionUsageDeclarationContext);
  }
  nodeParameterMember() {
    return this.getRuleContext(0, NodeParameterMemberContext);
  }
  emptyParameterMember() {
    return this.getRuleContext(0, EmptyParameterMemberContext);
  }
  senderReceiverPart() {
    return this.getRuleContext(0, SenderReceiverPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_sendNode;
  }
  enterRule(listener) {
    if (listener.enterSendNode) {
      listener.enterSendNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSendNode) {
      listener.exitSendNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSendNode) {
      return visitor.visitSendNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SendNodeDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEND() {
    return this.getToken(SysMLv2Parser.SEND, 0);
  }
  nodeParameterMember() {
    return this.getRuleContext(0, NodeParameterMemberContext);
  }
  actionNodeUsageDeclaration() {
    return this.getRuleContext(0, ActionNodeUsageDeclarationContext);
  }
  senderReceiverPart() {
    return this.getRuleContext(0, SenderReceiverPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_sendNodeDeclaration;
  }
  enterRule(listener) {
    if (listener.enterSendNodeDeclaration) {
      listener.enterSendNodeDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSendNodeDeclaration) {
      listener.exitSendNodeDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSendNodeDeclaration) {
      return visitor.visitSendNodeDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SenderReceiverPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  VIA() {
    return this.getToken(SysMLv2Parser.VIA, 0);
  }
  nodeParameterMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(NodeParameterMemberContext);
    }
    return this.getRuleContext(i, NodeParameterMemberContext);
  }
  TO() {
    return this.getToken(SysMLv2Parser.TO, 0);
  }
  emptyParameterMember() {
    return this.getRuleContext(0, EmptyParameterMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_senderReceiverPart;
  }
  enterRule(listener) {
    if (listener.enterSenderReceiverPart) {
      listener.enterSenderReceiverPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSenderReceiverPart) {
      listener.exitSenderReceiverPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSenderReceiverPart) {
      return visitor.visitSenderReceiverPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NodeParameterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nodeParameter() {
    return this.getRuleContext(0, NodeParameterContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nodeParameterMember;
  }
  enterRule(listener) {
    if (listener.enterNodeParameterMember) {
      listener.enterNodeParameterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNodeParameterMember) {
      listener.exitNodeParameterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNodeParameterMember) {
      return visitor.visitNodeParameterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NodeParameterContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureBinding() {
    return this.getRuleContext(0, FeatureBindingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nodeParameter;
  }
  enterRule(listener) {
    if (listener.enterNodeParameter) {
      listener.enterNodeParameter(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNodeParameter) {
      listener.exitNodeParameter(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNodeParameter) {
      return visitor.visitNodeParameter(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FeatureBindingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_featureBinding;
  }
  enterRule(listener) {
    if (listener.enterFeatureBinding) {
      listener.enterFeatureBinding(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFeatureBinding) {
      listener.exitFeatureBinding(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFeatureBinding) {
      return visitor.visitFeatureBinding(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EmptyParameterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  emptyUsage_() {
    return this.getRuleContext(0, EmptyUsage_Context);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_emptyParameterMember;
  }
  enterRule(listener) {
    if (listener.enterEmptyParameterMember) {
      listener.enterEmptyParameterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEmptyParameterMember) {
      listener.exitEmptyParameterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEmptyParameterMember) {
      return visitor.visitEmptyParameterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssignmentNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  assignmentNodeDeclaration() {
    return this.getRuleContext(0, AssignmentNodeDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_assignmentNode;
  }
  enterRule(listener) {
    if (listener.enterAssignmentNode) {
      listener.enterAssignmentNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssignmentNode) {
      listener.exitAssignmentNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssignmentNode) {
      return visitor.visitAssignmentNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssignmentNodeDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ASSIGN() {
    return this.getToken(SysMLv2Parser.ASSIGN, 0);
  }
  assignmentTargetMember() {
    return this.getRuleContext(0, AssignmentTargetMemberContext);
  }
  featureChainMember() {
    return this.getRuleContext(0, FeatureChainMemberContext);
  }
  COLON_EQ() {
    return this.getToken(SysMLv2Parser.COLON_EQ, 0);
  }
  nodeParameterMember() {
    return this.getRuleContext(0, NodeParameterMemberContext);
  }
  actionNodeUsageDeclaration() {
    return this.getRuleContext(0, ActionNodeUsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_assignmentNodeDeclaration;
  }
  enterRule(listener) {
    if (listener.enterAssignmentNodeDeclaration) {
      listener.enterAssignmentNodeDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssignmentNodeDeclaration) {
      listener.exitAssignmentNodeDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssignmentNodeDeclaration) {
      return visitor.visitAssignmentNodeDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssignmentTargetMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  assignmentTargetParameter() {
    return this.getRuleContext(0, AssignmentTargetParameterContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_assignmentTargetMember;
  }
  enterRule(listener) {
    if (listener.enterAssignmentTargetMember) {
      listener.enterAssignmentTargetMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssignmentTargetMember) {
      listener.exitAssignmentTargetMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssignmentTargetMember) {
      return visitor.visitAssignmentTargetMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssignmentTargetParameterContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  assignmentTargetBinding() {
    return this.getRuleContext(0, AssignmentTargetBindingContext);
  }
  DOT() {
    return this.getToken(SysMLv2Parser.DOT, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_assignmentTargetParameter;
  }
  enterRule(listener) {
    if (listener.enterAssignmentTargetParameter) {
      listener.enterAssignmentTargetParameter(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssignmentTargetParameter) {
      listener.exitAssignmentTargetParameter(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssignmentTargetParameter) {
      return visitor.visitAssignmentTargetParameter(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssignmentTargetBindingContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonFeatureChainPrimaryExpression() {
    return this.getRuleContext(0, NonFeatureChainPrimaryExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_assignmentTargetBinding;
  }
  enterRule(listener) {
    if (listener.enterAssignmentTargetBinding) {
      listener.enterAssignmentTargetBinding(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssignmentTargetBinding) {
      listener.exitAssignmentTargetBinding(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssignmentTargetBinding) {
      return visitor.visitAssignmentTargetBinding(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TerminateNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  TERMINATE() {
    return this.getToken(SysMLv2Parser.TERMINATE, 0);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  actionNodeUsageDeclaration() {
    return this.getRuleContext(0, ActionNodeUsageDeclarationContext);
  }
  nodeParameterMember() {
    return this.getRuleContext(0, NodeParameterMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_terminateNode;
  }
  enterRule(listener) {
    if (listener.enterTerminateNode) {
      listener.enterTerminateNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTerminateNode) {
      listener.exitTerminateNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTerminateNode) {
      return visitor.visitTerminateNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IfNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionNodePrefix() {
    return this.getRuleContext(0, ActionNodePrefixContext);
  }
  IF() {
    return this.getToken(SysMLv2Parser.IF, 0);
  }
  expressionParameterMember() {
    return this.getRuleContext(0, ExpressionParameterMemberContext);
  }
  actionBodyParameterMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionBodyParameterMemberContext);
    }
    return this.getRuleContext(i, ActionBodyParameterMemberContext);
  }
  ELSE() {
    return this.getToken(SysMLv2Parser.ELSE, 0);
  }
  ifNodeParameterMember() {
    return this.getRuleContext(0, IfNodeParameterMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ifNode;
  }
  enterRule(listener) {
    if (listener.enterIfNode) {
      listener.enterIfNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIfNode) {
      listener.exitIfNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIfNode) {
      return visitor.visitIfNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ExpressionParameterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_expressionParameterMember;
  }
  enterRule(listener) {
    if (listener.enterExpressionParameterMember) {
      listener.enterExpressionParameterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitExpressionParameterMember) {
      listener.exitExpressionParameterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitExpressionParameterMember) {
      return visitor.visitExpressionParameterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionBodyParameterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionBodyParameter() {
    return this.getRuleContext(0, ActionBodyParameterContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionBodyParameterMember;
  }
  enterRule(listener) {
    if (listener.enterActionBodyParameterMember) {
      listener.enterActionBodyParameterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionBodyParameterMember) {
      listener.exitActionBodyParameterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionBodyParameterMember) {
      return visitor.visitActionBodyParameterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionBodyParameterContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  ACTION() {
    return this.getToken(SysMLv2Parser.ACTION, 0);
  }
  actionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionBodyItemContext);
    }
    return this.getRuleContext(i, ActionBodyItemContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionBodyParameter;
  }
  enterRule(listener) {
    if (listener.enterActionBodyParameter) {
      listener.enterActionBodyParameter(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionBodyParameter) {
      listener.exitActionBodyParameter(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionBodyParameter) {
      return visitor.visitActionBodyParameter(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IfNodeParameterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ifNode() {
    return this.getRuleContext(0, IfNodeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_ifNodeParameterMember;
  }
  enterRule(listener) {
    if (listener.enterIfNodeParameterMember) {
      listener.enterIfNodeParameterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIfNodeParameterMember) {
      listener.exitIfNodeParameterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIfNodeParameterMember) {
      return visitor.visitIfNodeParameterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var WhileLoopNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionNodePrefix() {
    return this.getRuleContext(0, ActionNodePrefixContext);
  }
  actionBodyParameterMember() {
    return this.getRuleContext(0, ActionBodyParameterMemberContext);
  }
  WHILE() {
    return this.getToken(SysMLv2Parser.WHILE, 0);
  }
  expressionParameterMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(ExpressionParameterMemberContext);
    }
    return this.getRuleContext(i, ExpressionParameterMemberContext);
  }
  LOOP() {
    return this.getToken(SysMLv2Parser.LOOP, 0);
  }
  emptyParameterMember() {
    return this.getRuleContext(0, EmptyParameterMemberContext);
  }
  UNTIL() {
    return this.getToken(SysMLv2Parser.UNTIL, 0);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_whileLoopNode;
  }
  enterRule(listener) {
    if (listener.enterWhileLoopNode) {
      listener.enterWhileLoopNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitWhileLoopNode) {
      listener.exitWhileLoopNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitWhileLoopNode) {
      return visitor.visitWhileLoopNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ForLoopNodeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionNodePrefix() {
    return this.getRuleContext(0, ActionNodePrefixContext);
  }
  FOR() {
    return this.getToken(SysMLv2Parser.FOR, 0);
  }
  forVariableDeclarationMember() {
    return this.getRuleContext(0, ForVariableDeclarationMemberContext);
  }
  IN() {
    return this.getToken(SysMLv2Parser.IN, 0);
  }
  nodeParameterMember() {
    return this.getRuleContext(0, NodeParameterMemberContext);
  }
  actionBodyParameterMember() {
    return this.getRuleContext(0, ActionBodyParameterMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_forLoopNode;
  }
  enterRule(listener) {
    if (listener.enterForLoopNode) {
      listener.enterForLoopNode(this);
    }
  }
  exitRule(listener) {
    if (listener.exitForLoopNode) {
      listener.exitForLoopNode(this);
    }
  }
  accept(visitor) {
    if (visitor.visitForLoopNode) {
      return visitor.visitForLoopNode(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ForVariableDeclarationMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_forVariableDeclarationMember;
  }
  enterRule(listener) {
    if (listener.enterForVariableDeclarationMember) {
      listener.enterForVariableDeclarationMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitForVariableDeclarationMember) {
      listener.exitForVariableDeclarationMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitForVariableDeclarationMember) {
      return visitor.visitForVariableDeclarationMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActionTargetSuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  targetSuccession() {
    return this.getRuleContext(0, TargetSuccessionContext);
  }
  guardedTargetSuccession() {
    return this.getRuleContext(0, GuardedTargetSuccessionContext);
  }
  defaultTargetSuccession() {
    return this.getRuleContext(0, DefaultTargetSuccessionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actionTargetSuccession;
  }
  enterRule(listener) {
    if (listener.enterActionTargetSuccession) {
      listener.enterActionTargetSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActionTargetSuccession) {
      listener.exitActionTargetSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActionTargetSuccession) {
      return visitor.visitActionTargetSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TargetSuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  sourceEndMember() {
    return this.getRuleContext(0, SourceEndMemberContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  connectorEndMember() {
    return this.getRuleContext(0, ConnectorEndMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_targetSuccession;
  }
  enterRule(listener) {
    if (listener.enterTargetSuccession) {
      listener.enterTargetSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTargetSuccession) {
      listener.exitTargetSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTargetSuccession) {
      return visitor.visitTargetSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var GuardedTargetSuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  guardExpressionMember() {
    return this.getRuleContext(0, GuardExpressionMemberContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  transitionSuccessionMember() {
    return this.getRuleContext(0, TransitionSuccessionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_guardedTargetSuccession;
  }
  enterRule(listener) {
    if (listener.enterGuardedTargetSuccession) {
      listener.enterGuardedTargetSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitGuardedTargetSuccession) {
      listener.exitGuardedTargetSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitGuardedTargetSuccession) {
      return visitor.visitGuardedTargetSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DefaultTargetSuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ELSE() {
    return this.getToken(SysMLv2Parser.ELSE, 0);
  }
  transitionSuccessionMember() {
    return this.getRuleContext(0, TransitionSuccessionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_defaultTargetSuccession;
  }
  enterRule(listener) {
    if (listener.enterDefaultTargetSuccession) {
      listener.enterDefaultTargetSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDefaultTargetSuccession) {
      listener.exitDefaultTargetSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDefaultTargetSuccession) {
      return visitor.visitDefaultTargetSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var GuardedSuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  FIRST() {
    return this.getToken(SysMLv2Parser.FIRST, 0);
  }
  featureChainMember() {
    return this.getRuleContext(0, FeatureChainMemberContext);
  }
  guardExpressionMember() {
    return this.getRuleContext(0, GuardExpressionMemberContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  transitionSuccessionMember() {
    return this.getRuleContext(0, TransitionSuccessionMemberContext);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  SUCCESSION() {
    return this.getToken(SysMLv2Parser.SUCCESSION, 0);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_guardedSuccession;
  }
  enterRule(listener) {
    if (listener.enterGuardedSuccession) {
      listener.enterGuardedSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitGuardedSuccession) {
      listener.exitGuardedSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitGuardedSuccession) {
      return visitor.visitGuardedSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  STATE() {
    return this.getToken(SysMLv2Parser.STATE, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  stateDefBody() {
    return this.getRuleContext(0, StateDefBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateDefinition;
  }
  enterRule(listener) {
    if (listener.enterStateDefinition) {
      listener.enterStateDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateDefinition) {
      listener.exitStateDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateDefinition) {
      return visitor.visitStateDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateDefBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  PARALLEL() {
    return this.getToken(SysMLv2Parser.PARALLEL, 0);
  }
  stateBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(StateBodyItemContext);
    }
    return this.getRuleContext(i, StateBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateDefBody;
  }
  enterRule(listener) {
    if (listener.enterStateDefBody) {
      listener.enterStateDefBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateDefBody) {
      listener.exitStateDefBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateDefBody) {
      return visitor.visitStateDefBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  nonBehaviorBodyItem() {
    return this.getRuleContext(0, NonBehaviorBodyItemContext);
  }
  behaviorUsageMember() {
    return this.getRuleContext(0, BehaviorUsageMemberContext);
  }
  sourceSuccessionMember() {
    return this.getRuleContext(0, SourceSuccessionMemberContext);
  }
  targetTransitionUsageMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(TargetTransitionUsageMemberContext);
    }
    return this.getRuleContext(i, TargetTransitionUsageMemberContext);
  }
  transitionUsageMember() {
    return this.getRuleContext(0, TransitionUsageMemberContext);
  }
  entryActionMember() {
    return this.getRuleContext(0, EntryActionMemberContext);
  }
  entryTransitionMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(EntryTransitionMemberContext);
    }
    return this.getRuleContext(i, EntryTransitionMemberContext);
  }
  doActionMember() {
    return this.getRuleContext(0, DoActionMemberContext);
  }
  exitActionMember() {
    return this.getRuleContext(0, ExitActionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateBodyItem;
  }
  enterRule(listener) {
    if (listener.enterStateBodyItem) {
      listener.enterStateBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateBodyItem) {
      listener.exitStateBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateBodyItem) {
      return visitor.visitStateBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EntryActionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  ENTRY() {
    return this.getToken(SysMLv2Parser.ENTRY, 0);
  }
  stateActionUsage() {
    return this.getRuleContext(0, StateActionUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_entryActionMember;
  }
  enterRule(listener) {
    if (listener.enterEntryActionMember) {
      listener.enterEntryActionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEntryActionMember) {
      listener.exitEntryActionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEntryActionMember) {
      return visitor.visitEntryActionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var DoActionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  DO() {
    return this.getToken(SysMLv2Parser.DO, 0);
  }
  stateActionUsage() {
    return this.getRuleContext(0, StateActionUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_doActionMember;
  }
  enterRule(listener) {
    if (listener.enterDoActionMember) {
      listener.enterDoActionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitDoActionMember) {
      listener.exitDoActionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitDoActionMember) {
      return visitor.visitDoActionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ExitActionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  EXIT() {
    return this.getToken(SysMLv2Parser.EXIT, 0);
  }
  stateActionUsage() {
    return this.getRuleContext(0, StateActionUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_exitActionMember;
  }
  enterRule(listener) {
    if (listener.enterExitActionMember) {
      listener.enterExitActionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitExitActionMember) {
      listener.exitExitActionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitExitActionMember) {
      return visitor.visitExitActionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EntryTransitionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  guardedTargetSuccession() {
    return this.getRuleContext(0, GuardedTargetSuccessionContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  transitionSuccessionMember() {
    return this.getRuleContext(0, TransitionSuccessionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_entryTransitionMember;
  }
  enterRule(listener) {
    if (listener.enterEntryTransitionMember) {
      listener.enterEntryTransitionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEntryTransitionMember) {
      listener.exitEntryTransitionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEntryTransitionMember) {
      return visitor.visitEntryTransitionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  emptyActionUsage_() {
    return this.getRuleContext(0, EmptyActionUsage_Context);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  statePerformActionUsage() {
    return this.getRuleContext(0, StatePerformActionUsageContext);
  }
  stateAcceptActionUsage() {
    return this.getRuleContext(0, StateAcceptActionUsageContext);
  }
  stateSendActionUsage() {
    return this.getRuleContext(0, StateSendActionUsageContext);
  }
  stateAssignmentActionUsage() {
    return this.getRuleContext(0, StateAssignmentActionUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateActionUsage;
  }
  enterRule(listener) {
    if (listener.enterStateActionUsage) {
      listener.enterStateActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateActionUsage) {
      listener.exitStateActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateActionUsage) {
      return visitor.visitStateActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StatePerformActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  performActionUsageDeclaration() {
    return this.getRuleContext(0, PerformActionUsageDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_statePerformActionUsage;
  }
  enterRule(listener) {
    if (listener.enterStatePerformActionUsage) {
      listener.enterStatePerformActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStatePerformActionUsage) {
      listener.exitStatePerformActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStatePerformActionUsage) {
      return visitor.visitStatePerformActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateAcceptActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  acceptNodeDeclaration() {
    return this.getRuleContext(0, AcceptNodeDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateAcceptActionUsage;
  }
  enterRule(listener) {
    if (listener.enterStateAcceptActionUsage) {
      listener.enterStateAcceptActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateAcceptActionUsage) {
      listener.exitStateAcceptActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateAcceptActionUsage) {
      return visitor.visitStateAcceptActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateSendActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  sendNodeDeclaration() {
    return this.getRuleContext(0, SendNodeDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateSendActionUsage;
  }
  enterRule(listener) {
    if (listener.enterStateSendActionUsage) {
      listener.enterStateSendActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateSendActionUsage) {
      listener.exitStateSendActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateSendActionUsage) {
      return visitor.visitStateSendActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateAssignmentActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  assignmentNodeDeclaration() {
    return this.getRuleContext(0, AssignmentNodeDeclarationContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateAssignmentActionUsage;
  }
  enterRule(listener) {
    if (listener.enterStateAssignmentActionUsage) {
      listener.enterStateAssignmentActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateAssignmentActionUsage) {
      listener.exitStateAssignmentActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateAssignmentActionUsage) {
      return visitor.visitStateAssignmentActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  transitionUsage() {
    return this.getRuleContext(0, TransitionUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionUsageMember;
  }
  enterRule(listener) {
    if (listener.enterTransitionUsageMember) {
      listener.enterTransitionUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionUsageMember) {
      listener.exitTransitionUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionUsageMember) {
      return visitor.visitTransitionUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TargetTransitionUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  targetTransitionUsage() {
    return this.getRuleContext(0, TargetTransitionUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_targetTransitionUsageMember;
  }
  enterRule(listener) {
    if (listener.enterTargetTransitionUsageMember) {
      listener.enterTargetTransitionUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTargetTransitionUsageMember) {
      listener.exitTargetTransitionUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTargetTransitionUsageMember) {
      return visitor.visitTargetTransitionUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  STATE() {
    return this.getToken(SysMLv2Parser.STATE, 0);
  }
  actionUsageDeclaration() {
    return this.getRuleContext(0, ActionUsageDeclarationContext);
  }
  stateUsageBody() {
    return this.getRuleContext(0, StateUsageBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateUsage;
  }
  enterRule(listener) {
    if (listener.enterStateUsage) {
      listener.enterStateUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateUsage) {
      listener.exitStateUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateUsage) {
      return visitor.visitStateUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StateUsageBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  PARALLEL() {
    return this.getToken(SysMLv2Parser.PARALLEL, 0);
  }
  stateBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(StateBodyItemContext);
    }
    return this.getRuleContext(i, StateBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stateUsageBody;
  }
  enterRule(listener) {
    if (listener.enterStateUsageBody) {
      listener.enterStateUsageBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStateUsageBody) {
      listener.exitStateUsageBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStateUsageBody) {
      return visitor.visitStateUsageBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ExhibitStateUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  EXHIBIT() {
    return this.getToken(SysMLv2Parser.EXHIBIT, 0);
  }
  stateUsageBody() {
    return this.getRuleContext(0, StateUsageBodyContext);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  STATE() {
    return this.getToken(SysMLv2Parser.STATE, 0);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_exhibitStateUsage;
  }
  enterRule(listener) {
    if (listener.enterExhibitStateUsage) {
      listener.enterExhibitStateUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitExhibitStateUsage) {
      listener.exitExhibitStateUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitExhibitStateUsage) {
      return visitor.visitExhibitStateUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  TRANSITION() {
    return this.getToken(SysMLv2Parser.TRANSITION, 0);
  }
  featureChainMember() {
    return this.getRuleContext(0, FeatureChainMemberContext);
  }
  emptyParameterMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(EmptyParameterMemberContext);
    }
    return this.getRuleContext(i, EmptyParameterMemberContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  transitionSuccessionMember() {
    return this.getRuleContext(0, TransitionSuccessionMemberContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  FIRST() {
    return this.getToken(SysMLv2Parser.FIRST, 0);
  }
  triggerActionMember() {
    return this.getRuleContext(0, TriggerActionMemberContext);
  }
  guardExpressionMember() {
    return this.getRuleContext(0, GuardExpressionMemberContext);
  }
  effectBehaviorMember() {
    return this.getRuleContext(0, EffectBehaviorMemberContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionUsage;
  }
  enterRule(listener) {
    if (listener.enterTransitionUsage) {
      listener.enterTransitionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionUsage) {
      listener.exitTransitionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionUsage) {
      return visitor.visitTransitionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TargetTransitionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  emptyParameterMember(i) {
    if (i === void 0) {
      return this.getRuleContexts(EmptyParameterMemberContext);
    }
    return this.getRuleContext(i, EmptyParameterMemberContext);
  }
  THEN() {
    return this.getToken(SysMLv2Parser.THEN, 0);
  }
  transitionSuccessionMember() {
    return this.getRuleContext(0, TransitionSuccessionMemberContext);
  }
  actionBody() {
    return this.getRuleContext(0, ActionBodyContext);
  }
  TRANSITION() {
    return this.getToken(SysMLv2Parser.TRANSITION, 0);
  }
  triggerActionMember() {
    return this.getRuleContext(0, TriggerActionMemberContext);
  }
  guardExpressionMember() {
    return this.getRuleContext(0, GuardExpressionMemberContext);
  }
  effectBehaviorMember() {
    return this.getRuleContext(0, EffectBehaviorMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_targetTransitionUsage;
  }
  enterRule(listener) {
    if (listener.enterTargetTransitionUsage) {
      listener.enterTargetTransitionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTargetTransitionUsage) {
      listener.exitTargetTransitionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTargetTransitionUsage) {
      return visitor.visitTargetTransitionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TriggerActionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ACCEPT() {
    return this.getToken(SysMLv2Parser.ACCEPT, 0);
  }
  triggerAction() {
    return this.getRuleContext(0, TriggerActionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_triggerActionMember;
  }
  enterRule(listener) {
    if (listener.enterTriggerActionMember) {
      listener.enterTriggerActionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTriggerActionMember) {
      listener.exitTriggerActionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTriggerActionMember) {
      return visitor.visitTriggerActionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TriggerActionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  acceptParameterPart() {
    return this.getRuleContext(0, AcceptParameterPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_triggerAction;
  }
  enterRule(listener) {
    if (listener.enterTriggerAction) {
      listener.enterTriggerAction(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTriggerAction) {
      listener.exitTriggerAction(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTriggerAction) {
      return visitor.visitTriggerAction(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var GuardExpressionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  IF() {
    return this.getToken(SysMLv2Parser.IF, 0);
  }
  ownedExpression() {
    return this.getRuleContext(0, OwnedExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_guardExpressionMember;
  }
  enterRule(listener) {
    if (listener.enterGuardExpressionMember) {
      listener.enterGuardExpressionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitGuardExpressionMember) {
      listener.exitGuardExpressionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitGuardExpressionMember) {
      return visitor.visitGuardExpressionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EffectBehaviorMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DO() {
    return this.getToken(SysMLv2Parser.DO, 0);
  }
  effectBehaviorUsage() {
    return this.getRuleContext(0, EffectBehaviorUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_effectBehaviorMember;
  }
  enterRule(listener) {
    if (listener.enterEffectBehaviorMember) {
      listener.enterEffectBehaviorMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEffectBehaviorMember) {
      listener.exitEffectBehaviorMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEffectBehaviorMember) {
      return visitor.visitEffectBehaviorMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EffectBehaviorUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  emptyActionUsage_() {
    return this.getRuleContext(0, EmptyActionUsage_Context);
  }
  transitionPerformActionUsage() {
    return this.getRuleContext(0, TransitionPerformActionUsageContext);
  }
  transitionAcceptActionUsage() {
    return this.getRuleContext(0, TransitionAcceptActionUsageContext);
  }
  transitionSendActionUsage() {
    return this.getRuleContext(0, TransitionSendActionUsageContext);
  }
  transitionAssignmentActionUsage() {
    return this.getRuleContext(0, TransitionAssignmentActionUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_effectBehaviorUsage;
  }
  enterRule(listener) {
    if (listener.enterEffectBehaviorUsage) {
      listener.enterEffectBehaviorUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEffectBehaviorUsage) {
      listener.exitEffectBehaviorUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEffectBehaviorUsage) {
      return visitor.visitEffectBehaviorUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionPerformActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  performActionUsageDeclaration() {
    return this.getRuleContext(0, PerformActionUsageDeclarationContext);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  actionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionBodyItemContext);
    }
    return this.getRuleContext(i, ActionBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionPerformActionUsage;
  }
  enterRule(listener) {
    if (listener.enterTransitionPerformActionUsage) {
      listener.enterTransitionPerformActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionPerformActionUsage) {
      listener.exitTransitionPerformActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionPerformActionUsage) {
      return visitor.visitTransitionPerformActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionAcceptActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  acceptNodeDeclaration() {
    return this.getRuleContext(0, AcceptNodeDeclarationContext);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  actionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionBodyItemContext);
    }
    return this.getRuleContext(i, ActionBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionAcceptActionUsage;
  }
  enterRule(listener) {
    if (listener.enterTransitionAcceptActionUsage) {
      listener.enterTransitionAcceptActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionAcceptActionUsage) {
      listener.exitTransitionAcceptActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionAcceptActionUsage) {
      return visitor.visitTransitionAcceptActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionSendActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  sendNodeDeclaration() {
    return this.getRuleContext(0, SendNodeDeclarationContext);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  actionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionBodyItemContext);
    }
    return this.getRuleContext(i, ActionBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionSendActionUsage;
  }
  enterRule(listener) {
    if (listener.enterTransitionSendActionUsage) {
      listener.enterTransitionSendActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionSendActionUsage) {
      listener.exitTransitionSendActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionSendActionUsage) {
      return visitor.visitTransitionSendActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionAssignmentActionUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  assignmentNodeDeclaration() {
    return this.getRuleContext(0, AssignmentNodeDeclarationContext);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  actionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ActionBodyItemContext);
    }
    return this.getRuleContext(i, ActionBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionAssignmentActionUsage;
  }
  enterRule(listener) {
    if (listener.enterTransitionAssignmentActionUsage) {
      listener.enterTransitionAssignmentActionUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionAssignmentActionUsage) {
      listener.exitTransitionAssignmentActionUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionAssignmentActionUsage) {
      return visitor.visitTransitionAssignmentActionUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionSuccessionMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  transitionSuccession() {
    return this.getRuleContext(0, TransitionSuccessionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionSuccessionMember;
  }
  enterRule(listener) {
    if (listener.enterTransitionSuccessionMember) {
      listener.enterTransitionSuccessionMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionSuccessionMember) {
      listener.exitTransitionSuccessionMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionSuccessionMember) {
      return visitor.visitTransitionSuccessionMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var TransitionSuccessionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  emptyEndMember() {
    return this.getRuleContext(0, EmptyEndMemberContext);
  }
  connectorEndMember() {
    return this.getRuleContext(0, ConnectorEndMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_transitionSuccession;
  }
  enterRule(listener) {
    if (listener.enterTransitionSuccession) {
      listener.enterTransitionSuccession(this);
    }
  }
  exitRule(listener) {
    if (listener.exitTransitionSuccession) {
      listener.exitTransitionSuccession(this);
    }
  }
  accept(visitor) {
    if (visitor.visitTransitionSuccession) {
      return visitor.visitTransitionSuccession(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EmptyEndMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  emptyFeature_() {
    return this.getRuleContext(0, EmptyFeature_Context);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_emptyEndMember;
  }
  enterRule(listener) {
    if (listener.enterEmptyEndMember) {
      listener.enterEmptyEndMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEmptyEndMember) {
      listener.exitEmptyEndMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEmptyEndMember) {
      return visitor.visitEmptyEndMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CalculationDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  CALC() {
    return this.getToken(SysMLv2Parser.CALC, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  calculationBody() {
    return this.getRuleContext(0, CalculationBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_calculationDefinition;
  }
  enterRule(listener) {
    if (listener.enterCalculationDefinition) {
      listener.enterCalculationDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCalculationDefinition) {
      listener.exitCalculationDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCalculationDefinition) {
      return visitor.visitCalculationDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CalculationUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  CALC() {
    return this.getToken(SysMLv2Parser.CALC, 0);
  }
  actionUsageDeclaration() {
    return this.getRuleContext(0, ActionUsageDeclarationContext);
  }
  calculationBody() {
    return this.getRuleContext(0, CalculationBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_calculationUsage;
  }
  enterRule(listener) {
    if (listener.enterCalculationUsage) {
      listener.enterCalculationUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCalculationUsage) {
      listener.exitCalculationUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCalculationUsage) {
      return visitor.visitCalculationUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CalculationBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  calculationBodyPart() {
    return this.getRuleContext(0, CalculationBodyPartContext);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_calculationBody;
  }
  enterRule(listener) {
    if (listener.enterCalculationBody) {
      listener.enterCalculationBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCalculationBody) {
      listener.exitCalculationBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCalculationBody) {
      return visitor.visitCalculationBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CalculationBodyPartContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  calculationBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(CalculationBodyItemContext);
    }
    return this.getRuleContext(i, CalculationBodyItemContext);
  }
  resultExpressionMember() {
    return this.getRuleContext(0, ResultExpressionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_calculationBodyPart;
  }
  enterRule(listener) {
    if (listener.enterCalculationBodyPart) {
      listener.enterCalculationBodyPart(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCalculationBodyPart) {
      listener.exitCalculationBodyPart(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCalculationBodyPart) {
      return visitor.visitCalculationBodyPart(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CalculationBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionBodyItem() {
    return this.getRuleContext(0, ActionBodyItemContext);
  }
  returnParameterMember() {
    return this.getRuleContext(0, ReturnParameterMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_calculationBodyItem;
  }
  enterRule(listener) {
    if (listener.enterCalculationBodyItem) {
      listener.enterCalculationBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCalculationBodyItem) {
      listener.exitCalculationBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCalculationBodyItem) {
      return visitor.visitCalculationBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ReturnParameterMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  RETURN() {
    return this.getToken(SysMLv2Parser.RETURN, 0);
  }
  usageElement() {
    return this.getRuleContext(0, UsageElementContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_returnParameterMember;
  }
  enterRule(listener) {
    if (listener.enterReturnParameterMember) {
      listener.enterReturnParameterMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitReturnParameterMember) {
      listener.exitReturnParameterMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitReturnParameterMember) {
      return visitor.visitReturnParameterMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConstraintDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  CONSTRAINT() {
    return this.getToken(SysMLv2Parser.CONSTRAINT, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  calculationBody() {
    return this.getRuleContext(0, CalculationBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_constraintDefinition;
  }
  enterRule(listener) {
    if (listener.enterConstraintDefinition) {
      listener.enterConstraintDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConstraintDefinition) {
      listener.exitConstraintDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConstraintDefinition) {
      return visitor.visitConstraintDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConstraintUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  CONSTRAINT() {
    return this.getToken(SysMLv2Parser.CONSTRAINT, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  calculationBody() {
    return this.getRuleContext(0, CalculationBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_constraintUsage;
  }
  enterRule(listener) {
    if (listener.enterConstraintUsage) {
      listener.enterConstraintUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConstraintUsage) {
      listener.exitConstraintUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConstraintUsage) {
      return visitor.visitConstraintUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AssertConstraintUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  ASSERT() {
    return this.getToken(SysMLv2Parser.ASSERT, 0);
  }
  calculationBody() {
    return this.getRuleContext(0, CalculationBodyContext);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  CONSTRAINT() {
    return this.getToken(SysMLv2Parser.CONSTRAINT, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  NOT() {
    return this.getToken(SysMLv2Parser.NOT, 0);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_assertConstraintUsage;
  }
  enterRule(listener) {
    if (listener.enterAssertConstraintUsage) {
      listener.enterAssertConstraintUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAssertConstraintUsage) {
      listener.exitAssertConstraintUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAssertConstraintUsage) {
      return visitor.visitAssertConstraintUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConstraintUsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_constraintUsageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterConstraintUsageDeclaration) {
      listener.enterConstraintUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConstraintUsageDeclaration) {
      listener.exitConstraintUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConstraintUsageDeclaration) {
      return visitor.visitConstraintUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  REQUIREMENT() {
    return this.getToken(SysMLv2Parser.REQUIREMENT, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementDefinition;
  }
  enterRule(listener) {
    if (listener.enterRequirementDefinition) {
      listener.enterRequirementDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementDefinition) {
      listener.exitRequirementDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementDefinition) {
      return visitor.visitRequirementDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  requirementBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(RequirementBodyItemContext);
    }
    return this.getRuleContext(i, RequirementBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementBody;
  }
  enterRule(listener) {
    if (listener.enterRequirementBody) {
      listener.enterRequirementBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementBody) {
      listener.exitRequirementBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementBody) {
      return visitor.visitRequirementBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionBodyItem() {
    return this.getRuleContext(0, DefinitionBodyItemContext);
  }
  subjectMember() {
    return this.getRuleContext(0, SubjectMemberContext);
  }
  requirementConstraintMember() {
    return this.getRuleContext(0, RequirementConstraintMemberContext);
  }
  framedConcernMember() {
    return this.getRuleContext(0, FramedConcernMemberContext);
  }
  requirementVerificationMember() {
    return this.getRuleContext(0, RequirementVerificationMemberContext);
  }
  actorMember() {
    return this.getRuleContext(0, ActorMemberContext);
  }
  stakeholderMember() {
    return this.getRuleContext(0, StakeholderMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementBodyItem;
  }
  enterRule(listener) {
    if (listener.enterRequirementBodyItem) {
      listener.enterRequirementBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementBodyItem) {
      listener.exitRequirementBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementBodyItem) {
      return visitor.visitRequirementBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SubjectMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  subjectUsage() {
    return this.getRuleContext(0, SubjectUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_subjectMember;
  }
  enterRule(listener) {
    if (listener.enterSubjectMember) {
      listener.enterSubjectMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSubjectMember) {
      listener.exitSubjectMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSubjectMember) {
      return visitor.visitSubjectMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SubjectUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SUBJECT() {
    return this.getToken(SysMLv2Parser.SUBJECT, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_subjectUsage;
  }
  enterRule(listener) {
    if (listener.enterSubjectUsage) {
      listener.enterSubjectUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSubjectUsage) {
      listener.exitSubjectUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSubjectUsage) {
      return visitor.visitSubjectUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementConstraintMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  requirementKind() {
    return this.getRuleContext(0, RequirementKindContext);
  }
  requirementConstraintUsage() {
    return this.getRuleContext(0, RequirementConstraintUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementConstraintMember;
  }
  enterRule(listener) {
    if (listener.enterRequirementConstraintMember) {
      listener.enterRequirementConstraintMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementConstraintMember) {
      listener.exitRequirementConstraintMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementConstraintMember) {
      return visitor.visitRequirementConstraintMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementKindContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ASSUME() {
    return this.getToken(SysMLv2Parser.ASSUME, 0);
  }
  REQUIRE() {
    return this.getToken(SysMLv2Parser.REQUIRE, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementKind;
  }
  enterRule(listener) {
    if (listener.enterRequirementKind) {
      listener.enterRequirementKind(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementKind) {
      listener.exitRequirementKind(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementKind) {
      return visitor.visitRequirementKind(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementConstraintUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  calculationBody() {
    return this.getRuleContext(0, CalculationBodyContext);
  }
  CONSTRAINT() {
    return this.getToken(SysMLv2Parser.CONSTRAINT, 0);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementConstraintUsage;
  }
  enterRule(listener) {
    if (listener.enterRequirementConstraintUsage) {
      listener.enterRequirementConstraintUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementConstraintUsage) {
      listener.exitRequirementConstraintUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementConstraintUsage) {
      return visitor.visitRequirementConstraintUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FramedConcernMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  FRAME() {
    return this.getToken(SysMLv2Parser.FRAME, 0);
  }
  framedConcernUsage() {
    return this.getRuleContext(0, FramedConcernUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_framedConcernMember;
  }
  enterRule(listener) {
    if (listener.enterFramedConcernMember) {
      listener.enterFramedConcernMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFramedConcernMember) {
      listener.exitFramedConcernMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFramedConcernMember) {
      return visitor.visitFramedConcernMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FramedConcernUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  calculationBody() {
    return this.getRuleContext(0, CalculationBodyContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  calculationUsageDeclaration() {
    return this.getRuleContext(0, CalculationUsageDeclarationContext);
  }
  CONCERN() {
    return this.getToken(SysMLv2Parser.CONCERN, 0);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_framedConcernUsage;
  }
  enterRule(listener) {
    if (listener.enterFramedConcernUsage) {
      listener.enterFramedConcernUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFramedConcernUsage) {
      listener.exitFramedConcernUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFramedConcernUsage) {
      return visitor.visitFramedConcernUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActorMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  actorUsage() {
    return this.getRuleContext(0, ActorUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actorMember;
  }
  enterRule(listener) {
    if (listener.enterActorMember) {
      listener.enterActorMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActorMember) {
      listener.exitActorMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActorMember) {
      return visitor.visitActorMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ActorUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ACTOR() {
    return this.getToken(SysMLv2Parser.ACTOR, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_actorUsage;
  }
  enterRule(listener) {
    if (listener.enterActorUsage) {
      listener.enterActorUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitActorUsage) {
      listener.exitActorUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitActorUsage) {
      return visitor.visitActorUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StakeholderMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  stakeholderUsage() {
    return this.getRuleContext(0, StakeholderUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stakeholderMember;
  }
  enterRule(listener) {
    if (listener.enterStakeholderMember) {
      listener.enterStakeholderMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStakeholderMember) {
      listener.exitStakeholderMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStakeholderMember) {
      return visitor.visitStakeholderMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var StakeholderUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  STAKEHOLDER() {
    return this.getToken(SysMLv2Parser.STAKEHOLDER, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_stakeholderUsage;
  }
  enterRule(listener) {
    if (listener.enterStakeholderUsage) {
      listener.enterStakeholderUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitStakeholderUsage) {
      listener.exitStakeholderUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitStakeholderUsage) {
      return visitor.visitStakeholderUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  REQUIREMENT() {
    return this.getToken(SysMLv2Parser.REQUIREMENT, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementUsage;
  }
  enterRule(listener) {
    if (listener.enterRequirementUsage) {
      listener.enterRequirementUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementUsage) {
      listener.exitRequirementUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementUsage) {
      return visitor.visitRequirementUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SatisfyRequirementUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  SATISFY() {
    return this.getToken(SysMLv2Parser.SATISFY, 0);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  REQUIREMENT() {
    return this.getToken(SysMLv2Parser.REQUIREMENT, 0);
  }
  ASSERT() {
    return this.getToken(SysMLv2Parser.ASSERT, 0);
  }
  NOT() {
    return this.getToken(SysMLv2Parser.NOT, 0);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  BY() {
    return this.getToken(SysMLv2Parser.BY, 0);
  }
  satisfactionSubjectMember() {
    return this.getRuleContext(0, SatisfactionSubjectMemberContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_satisfyRequirementUsage;
  }
  enterRule(listener) {
    if (listener.enterSatisfyRequirementUsage) {
      listener.enterSatisfyRequirementUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSatisfyRequirementUsage) {
      listener.exitSatisfyRequirementUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSatisfyRequirementUsage) {
      return visitor.visitSatisfyRequirementUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SatisfactionSubjectMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  satisfactionParameter() {
    return this.getRuleContext(0, SatisfactionParameterContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_satisfactionSubjectMember;
  }
  enterRule(listener) {
    if (listener.enterSatisfactionSubjectMember) {
      listener.enterSatisfactionSubjectMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSatisfactionSubjectMember) {
      listener.exitSatisfactionSubjectMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSatisfactionSubjectMember) {
      return visitor.visitSatisfactionSubjectMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SatisfactionParameterContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  satisfactionFeatureValue() {
    return this.getRuleContext(0, SatisfactionFeatureValueContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_satisfactionParameter;
  }
  enterRule(listener) {
    if (listener.enterSatisfactionParameter) {
      listener.enterSatisfactionParameter(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSatisfactionParameter) {
      listener.exitSatisfactionParameter(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSatisfactionParameter) {
      return visitor.visitSatisfactionParameter(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SatisfactionFeatureValueContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  satisfactionReferenceExpression() {
    return this.getRuleContext(0, SatisfactionReferenceExpressionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_satisfactionFeatureValue;
  }
  enterRule(listener) {
    if (listener.enterSatisfactionFeatureValue) {
      listener.enterSatisfactionFeatureValue(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSatisfactionFeatureValue) {
      listener.exitSatisfactionFeatureValue(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSatisfactionFeatureValue) {
      return visitor.visitSatisfactionFeatureValue(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var SatisfactionReferenceExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  featureChainMember() {
    return this.getRuleContext(0, FeatureChainMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_satisfactionReferenceExpression;
  }
  enterRule(listener) {
    if (listener.enterSatisfactionReferenceExpression) {
      listener.enterSatisfactionReferenceExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitSatisfactionReferenceExpression) {
      listener.exitSatisfactionReferenceExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitSatisfactionReferenceExpression) {
      return visitor.visitSatisfactionReferenceExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConcernDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  CONCERN() {
    return this.getToken(SysMLv2Parser.CONCERN, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_concernDefinition;
  }
  enterRule(listener) {
    if (listener.enterConcernDefinition) {
      listener.enterConcernDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConcernDefinition) {
      listener.exitConcernDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConcernDefinition) {
      return visitor.visitConcernDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ConcernUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  CONCERN() {
    return this.getToken(SysMLv2Parser.CONCERN, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_concernUsage;
  }
  enterRule(listener) {
    if (listener.enterConcernUsage) {
      listener.enterConcernUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitConcernUsage) {
      listener.exitConcernUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitConcernUsage) {
      return visitor.visitConcernUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CaseDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  CASE() {
    return this.getToken(SysMLv2Parser.CASE, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_caseDefinition;
  }
  enterRule(listener) {
    if (listener.enterCaseDefinition) {
      listener.enterCaseDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCaseDefinition) {
      listener.exitCaseDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCaseDefinition) {
      return visitor.visitCaseDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CaseUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  CASE() {
    return this.getToken(SysMLv2Parser.CASE, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_caseUsage;
  }
  enterRule(listener) {
    if (listener.enterCaseUsage) {
      listener.enterCaseUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCaseUsage) {
      listener.exitCaseUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCaseUsage) {
      return visitor.visitCaseUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CaseBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  caseBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(CaseBodyItemContext);
    }
    return this.getRuleContext(i, CaseBodyItemContext);
  }
  resultExpressionMember() {
    return this.getRuleContext(0, ResultExpressionMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_caseBody;
  }
  enterRule(listener) {
    if (listener.enterCaseBody) {
      listener.enterCaseBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCaseBody) {
      listener.exitCaseBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCaseBody) {
      return visitor.visitCaseBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CaseBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  actionBodyItem() {
    return this.getRuleContext(0, ActionBodyItemContext);
  }
  returnParameterMember() {
    return this.getRuleContext(0, ReturnParameterMemberContext);
  }
  subjectMember() {
    return this.getRuleContext(0, SubjectMemberContext);
  }
  actorMember() {
    return this.getRuleContext(0, ActorMemberContext);
  }
  objectiveMember() {
    return this.getRuleContext(0, ObjectiveMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_caseBodyItem;
  }
  enterRule(listener) {
    if (listener.enterCaseBodyItem) {
      listener.enterCaseBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCaseBodyItem) {
      listener.exitCaseBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCaseBodyItem) {
      return visitor.visitCaseBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ObjectiveMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  OBJECTIVE() {
    return this.getToken(SysMLv2Parser.OBJECTIVE, 0);
  }
  objectiveRequirementUsage() {
    return this.getRuleContext(0, ObjectiveRequirementUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_objectiveMember;
  }
  enterRule(listener) {
    if (listener.enterObjectiveMember) {
      listener.enterObjectiveMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitObjectiveMember) {
      listener.exitObjectiveMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitObjectiveMember) {
      return visitor.visitObjectiveMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ObjectiveRequirementUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_objectiveRequirementUsage;
  }
  enterRule(listener) {
    if (listener.enterObjectiveRequirementUsage) {
      listener.enterObjectiveRequirementUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitObjectiveRequirementUsage) {
      listener.exitObjectiveRequirementUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitObjectiveRequirementUsage) {
      return visitor.visitObjectiveRequirementUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AnalysisCaseDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  ANALYSIS() {
    return this.getToken(SysMLv2Parser.ANALYSIS, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_analysisCaseDefinition;
  }
  enterRule(listener) {
    if (listener.enterAnalysisCaseDefinition) {
      listener.enterAnalysisCaseDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAnalysisCaseDefinition) {
      listener.exitAnalysisCaseDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAnalysisCaseDefinition) {
      return visitor.visitAnalysisCaseDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var AnalysisCaseUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  ANALYSIS() {
    return this.getToken(SysMLv2Parser.ANALYSIS, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_analysisCaseUsage;
  }
  enterRule(listener) {
    if (listener.enterAnalysisCaseUsage) {
      listener.enterAnalysisCaseUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitAnalysisCaseUsage) {
      listener.exitAnalysisCaseUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitAnalysisCaseUsage) {
      return visitor.visitAnalysisCaseUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var VerificationCaseDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  VERIFICATION() {
    return this.getToken(SysMLv2Parser.VERIFICATION, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_verificationCaseDefinition;
  }
  enterRule(listener) {
    if (listener.enterVerificationCaseDefinition) {
      listener.enterVerificationCaseDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitVerificationCaseDefinition) {
      listener.exitVerificationCaseDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitVerificationCaseDefinition) {
      return visitor.visitVerificationCaseDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var VerificationCaseUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  VERIFICATION() {
    return this.getToken(SysMLv2Parser.VERIFICATION, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_verificationCaseUsage;
  }
  enterRule(listener) {
    if (listener.enterVerificationCaseUsage) {
      listener.enterVerificationCaseUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitVerificationCaseUsage) {
      listener.exitVerificationCaseUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitVerificationCaseUsage) {
      return visitor.visitVerificationCaseUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementVerificationMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  VERIFY() {
    return this.getToken(SysMLv2Parser.VERIFY, 0);
  }
  requirementVerificationUsage() {
    return this.getRuleContext(0, RequirementVerificationUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementVerificationMember;
  }
  enterRule(listener) {
    if (listener.enterRequirementVerificationMember) {
      listener.enterRequirementVerificationMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementVerificationMember) {
      listener.exitRequirementVerificationMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementVerificationMember) {
      return visitor.visitRequirementVerificationMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RequirementVerificationUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  featureSpecialization(i) {
    if (i === void 0) {
      return this.getRuleContexts(FeatureSpecializationContext);
    }
    return this.getRuleContext(i, FeatureSpecializationContext);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  REQUIREMENT() {
    return this.getToken(SysMLv2Parser.REQUIREMENT, 0);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_requirementVerificationUsage;
  }
  enterRule(listener) {
    if (listener.enterRequirementVerificationUsage) {
      listener.enterRequirementVerificationUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRequirementVerificationUsage) {
      listener.exitRequirementVerificationUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRequirementVerificationUsage) {
      return visitor.visitRequirementVerificationUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UseCaseDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  USE() {
    return this.getToken(SysMLv2Parser.USE, 0);
  }
  CASE() {
    return this.getToken(SysMLv2Parser.CASE, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_useCaseDefinition;
  }
  enterRule(listener) {
    if (listener.enterUseCaseDefinition) {
      listener.enterUseCaseDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUseCaseDefinition) {
      listener.exitUseCaseDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUseCaseDefinition) {
      return visitor.visitUseCaseDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var UseCaseUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  USE() {
    return this.getToken(SysMLv2Parser.USE, 0);
  }
  CASE() {
    return this.getToken(SysMLv2Parser.CASE, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_useCaseUsage;
  }
  enterRule(listener) {
    if (listener.enterUseCaseUsage) {
      listener.enterUseCaseUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitUseCaseUsage) {
      listener.exitUseCaseUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitUseCaseUsage) {
      return visitor.visitUseCaseUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var IncludeUseCaseUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  INCLUDE() {
    return this.getToken(SysMLv2Parser.INCLUDE, 0);
  }
  caseBody() {
    return this.getRuleContext(0, CaseBodyContext);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  USE() {
    return this.getToken(SysMLv2Parser.USE, 0);
  }
  CASE() {
    return this.getToken(SysMLv2Parser.CASE, 0);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_includeUseCaseUsage;
  }
  enterRule(listener) {
    if (listener.enterIncludeUseCaseUsage) {
      listener.enterIncludeUseCaseUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitIncludeUseCaseUsage) {
      listener.exitIncludeUseCaseUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitIncludeUseCaseUsage) {
      return visitor.visitIncludeUseCaseUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  VIEW() {
    return this.getToken(SysMLv2Parser.VIEW, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  viewDefinitionBody() {
    return this.getRuleContext(0, ViewDefinitionBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewDefinition;
  }
  enterRule(listener) {
    if (listener.enterViewDefinition) {
      listener.enterViewDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewDefinition) {
      listener.exitViewDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewDefinition) {
      return visitor.visitViewDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewDefinitionBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  viewDefinitionBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ViewDefinitionBodyItemContext);
    }
    return this.getRuleContext(i, ViewDefinitionBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewDefinitionBody;
  }
  enterRule(listener) {
    if (listener.enterViewDefinitionBody) {
      listener.enterViewDefinitionBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewDefinitionBody) {
      listener.exitViewDefinitionBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewDefinitionBody) {
      return visitor.visitViewDefinitionBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewDefinitionBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionBodyItem() {
    return this.getRuleContext(0, DefinitionBodyItemContext);
  }
  elementFilterMember() {
    return this.getRuleContext(0, ElementFilterMemberContext);
  }
  viewRenderingMember() {
    return this.getRuleContext(0, ViewRenderingMemberContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewDefinitionBodyItem;
  }
  enterRule(listener) {
    if (listener.enterViewDefinitionBodyItem) {
      listener.enterViewDefinitionBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewDefinitionBodyItem) {
      listener.exitViewDefinitionBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewDefinitionBodyItem) {
      return visitor.visitViewDefinitionBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewRenderingMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  memberPrefix() {
    return this.getRuleContext(0, MemberPrefixContext);
  }
  RENDER() {
    return this.getToken(SysMLv2Parser.RENDER, 0);
  }
  viewRenderingUsage() {
    return this.getRuleContext(0, ViewRenderingUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewRenderingMember;
  }
  enterRule(listener) {
    if (listener.enterViewRenderingMember) {
      listener.enterViewRenderingMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewRenderingMember) {
      listener.exitViewRenderingMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewRenderingMember) {
      return visitor.visitViewRenderingMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewRenderingUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedReferenceSubsetting() {
    return this.getRuleContext(0, OwnedReferenceSubsettingContext);
  }
  usageBody() {
    return this.getRuleContext(0, UsageBodyContext);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  RENDERING() {
    return this.getToken(SysMLv2Parser.RENDERING, 0);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewRenderingUsage;
  }
  enterRule(listener) {
    if (listener.enterViewRenderingUsage) {
      listener.enterViewRenderingUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewRenderingUsage) {
      listener.exitViewRenderingUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewRenderingUsage) {
      return visitor.visitViewRenderingUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  VIEW() {
    return this.getToken(SysMLv2Parser.VIEW, 0);
  }
  viewBody() {
    return this.getRuleContext(0, ViewBodyContext);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewUsage;
  }
  enterRule(listener) {
    if (listener.enterViewUsage) {
      listener.enterViewUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewUsage) {
      listener.exitViewUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewUsage) {
      return visitor.visitViewUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewBodyContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  SEMI() {
    return this.getToken(SysMLv2Parser.SEMI, 0);
  }
  LBRACE() {
    return this.getToken(SysMLv2Parser.LBRACE, 0);
  }
  RBRACE() {
    return this.getToken(SysMLv2Parser.RBRACE, 0);
  }
  viewBodyItem(i) {
    if (i === void 0) {
      return this.getRuleContexts(ViewBodyItemContext);
    }
    return this.getRuleContext(i, ViewBodyItemContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewBody;
  }
  enterRule(listener) {
    if (listener.enterViewBody) {
      listener.enterViewBody(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewBody) {
      listener.exitViewBody(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewBody) {
      return visitor.visitViewBody(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewBodyItemContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  definitionBodyItem() {
    return this.getRuleContext(0, DefinitionBodyItemContext);
  }
  elementFilterMember() {
    return this.getRuleContext(0, ElementFilterMemberContext);
  }
  viewRenderingMember() {
    return this.getRuleContext(0, ViewRenderingMemberContext);
  }
  expose() {
    return this.getRuleContext(0, ExposeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewBodyItem;
  }
  enterRule(listener) {
    if (listener.enterViewBodyItem) {
      listener.enterViewBodyItem(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewBodyItem) {
      listener.exitViewBodyItem(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewBodyItem) {
      return visitor.visitViewBodyItem(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ExposeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  EXPOSE() {
    return this.getToken(SysMLv2Parser.EXPOSE, 0);
  }
  relationshipBody() {
    return this.getRuleContext(0, RelationshipBodyContext);
  }
  membershipExpose() {
    return this.getRuleContext(0, MembershipExposeContext);
  }
  namespaceExpose() {
    return this.getRuleContext(0, NamespaceExposeContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_expose;
  }
  enterRule(listener) {
    if (listener.enterExpose) {
      listener.enterExpose(this);
    }
  }
  exitRule(listener) {
    if (listener.exitExpose) {
      listener.exitExpose(this);
    }
  }
  accept(visitor) {
    if (visitor.visitExpose) {
      return visitor.visitExpose(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MembershipExposeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  membershipImport() {
    return this.getRuleContext(0, MembershipImportContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_membershipExpose;
  }
  enterRule(listener) {
    if (listener.enterMembershipExpose) {
      listener.enterMembershipExpose(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMembershipExpose) {
      listener.exitMembershipExpose(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMembershipExpose) {
      return visitor.visitMembershipExpose(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceExposeContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  namespaceImport() {
    return this.getRuleContext(0, NamespaceImportContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceExpose;
  }
  enterRule(listener) {
    if (listener.enterNamespaceExpose) {
      listener.enterNamespaceExpose(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceExpose) {
      listener.exitNamespaceExpose(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceExpose) {
      return visitor.visitNamespaceExpose(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewpointDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  VIEWPOINT() {
    return this.getToken(SysMLv2Parser.VIEWPOINT, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definitionDeclaration() {
    return this.getRuleContext(0, DefinitionDeclarationContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewpointDefinition;
  }
  enterRule(listener) {
    if (listener.enterViewpointDefinition) {
      listener.enterViewpointDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewpointDefinition) {
      listener.exitViewpointDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewpointDefinition) {
      return visitor.visitViewpointDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ViewpointUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  VIEWPOINT() {
    return this.getToken(SysMLv2Parser.VIEWPOINT, 0);
  }
  constraintUsageDeclaration() {
    return this.getRuleContext(0, ConstraintUsageDeclarationContext);
  }
  requirementBody() {
    return this.getRuleContext(0, RequirementBodyContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_viewpointUsage;
  }
  enterRule(listener) {
    if (listener.enterViewpointUsage) {
      listener.enterViewpointUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitViewpointUsage) {
      listener.exitViewpointUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitViewpointUsage) {
      return visitor.visitViewpointUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RenderingDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceDefinitionPrefix() {
    return this.getRuleContext(0, OccurrenceDefinitionPrefixContext);
  }
  RENDERING() {
    return this.getToken(SysMLv2Parser.RENDERING, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_renderingDefinition;
  }
  enterRule(listener) {
    if (listener.enterRenderingDefinition) {
      listener.enterRenderingDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRenderingDefinition) {
      listener.exitRenderingDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRenderingDefinition) {
      return visitor.visitRenderingDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var RenderingUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  occurrenceUsagePrefix() {
    return this.getRuleContext(0, OccurrenceUsagePrefixContext);
  }
  RENDERING() {
    return this.getToken(SysMLv2Parser.RENDERING, 0);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_renderingUsage;
  }
  enterRule(listener) {
    if (listener.enterRenderingUsage) {
      listener.enterRenderingUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitRenderingUsage) {
      listener.exitRenderingUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitRenderingUsage) {
      return visitor.visitRenderingUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  METADATA() {
    return this.getToken(SysMLv2Parser.METADATA, 0);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  ABSTRACT() {
    return this.getToken(SysMLv2Parser.ABSTRACT, 0);
  }
  definitionExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionExtensionKeywordContext);
    }
    return this.getRuleContext(i, DefinitionExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataDefinition;
  }
  enterRule(listener) {
    if (listener.enterMetadataDefinition) {
      listener.enterMetadataDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataDefinition) {
      listener.exitMetadataDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataDefinition) {
      return visitor.visitMetadataDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PrefixMetadataUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedFeatureTyping() {
    return this.getRuleContext(0, OwnedFeatureTypingContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_prefixMetadataUsage;
  }
  enterRule(listener) {
    if (listener.enterPrefixMetadataUsage) {
      listener.enterPrefixMetadataUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPrefixMetadataUsage) {
      listener.exitPrefixMetadataUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPrefixMetadataUsage) {
      return visitor.visitPrefixMetadataUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataBodyUsageMemberContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  metadataBodyUsage() {
    return this.getRuleContext(0, MetadataBodyUsageContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataBodyUsageMember;
  }
  enterRule(listener) {
    if (listener.enterMetadataBodyUsageMember) {
      listener.enterMetadataBodyUsageMember(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataBodyUsageMember) {
      listener.exitMetadataBodyUsageMember(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataBodyUsageMember) {
      return visitor.visitMetadataBodyUsageMember(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var MetadataBodyUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  ownedRedefinition() {
    return this.getRuleContext(0, OwnedRedefinitionContext);
  }
  metadataBody() {
    return this.getRuleContext(0, MetadataBodyContext);
  }
  REF() {
    return this.getToken(SysMLv2Parser.REF, 0);
  }
  featureSpecializationPart() {
    return this.getRuleContext(0, FeatureSpecializationPartContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  COLON_GT_GT() {
    return this.getToken(SysMLv2Parser.COLON_GT_GT, 0);
  }
  REDEFINES() {
    return this.getToken(SysMLv2Parser.REDEFINES, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_metadataBodyUsage;
  }
  enterRule(listener) {
    if (listener.enterMetadataBodyUsage) {
      listener.enterMetadataBodyUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitMetadataBodyUsage) {
      listener.exitMetadataBodyUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitMetadataBodyUsage) {
      return visitor.visitMetadataBodyUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ExtendedDefinitionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  DEF() {
    return this.getToken(SysMLv2Parser.DEF, 0);
  }
  definition() {
    return this.getRuleContext(0, DefinitionContext);
  }
  basicDefinitionPrefix() {
    return this.getRuleContext(0, BasicDefinitionPrefixContext);
  }
  definitionExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(DefinitionExtensionKeywordContext);
    }
    return this.getRuleContext(i, DefinitionExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_extendedDefinition;
  }
  enterRule(listener) {
    if (listener.enterExtendedDefinition) {
      listener.enterExtendedDefinition(this);
    }
  }
  exitRule(listener) {
    if (listener.exitExtendedDefinition) {
      listener.exitExtendedDefinition(this);
    }
  }
  accept(visitor) {
    if (visitor.visitExtendedDefinition) {
      return visitor.visitExtendedDefinition(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var ExtendedUsageContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  unextendedUsagePrefix() {
    return this.getRuleContext(0, UnextendedUsagePrefixContext);
  }
  usage() {
    return this.getRuleContext(0, UsageContext);
  }
  usageExtensionKeyword(i) {
    if (i === void 0) {
      return this.getRuleContexts(UsageExtensionKeywordContext);
    }
    return this.getRuleContext(i, UsageExtensionKeywordContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_extendedUsage;
  }
  enterRule(listener) {
    if (listener.enterExtendedUsage) {
      listener.enterExtendedUsage(this);
    }
  }
  exitRule(listener) {
    if (listener.exitExtendedUsage) {
      listener.exitExtendedUsage(this);
    }
  }
  accept(visitor) {
    if (visitor.visitExtendedUsage) {
      return visitor.visitExtendedUsage(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FilterPackageImportDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  membershipImport() {
    return this.getRuleContext(0, MembershipImportContext);
  }
  namespaceImportDirect() {
    return this.getRuleContext(0, NamespaceImportDirectContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_filterPackageImportDeclaration;
  }
  enterRule(listener) {
    if (listener.enterFilterPackageImportDeclaration) {
      listener.enterFilterPackageImportDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFilterPackageImportDeclaration) {
      listener.exitFilterPackageImportDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFilterPackageImportDeclaration) {
      return visitor.visitFilterPackageImportDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NamespaceImportDirectContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  qualifiedName() {
    return this.getRuleContext(0, QualifiedNameContext);
  }
  COLON_COLON(i) {
    if (i === void 0) {
      return this.getTokens(SysMLv2Parser.COLON_COLON);
    } else {
      return this.getToken(SysMLv2Parser.COLON_COLON, i);
    }
  }
  STAR() {
    return this.getToken(SysMLv2Parser.STAR, 0);
  }
  STAR_STAR() {
    return this.getToken(SysMLv2Parser.STAR_STAR, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_namespaceImportDirect;
  }
  enterRule(listener) {
    if (listener.enterNamespaceImportDirect) {
      listener.enterNamespaceImportDirect(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNamespaceImportDirect) {
      listener.exitNamespaceImportDirect(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNamespaceImportDirect) {
      return visitor.visitNamespaceImportDirect(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var CalculationUsageDeclarationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  usageDeclaration() {
    return this.getRuleContext(0, UsageDeclarationContext);
  }
  valuePart() {
    return this.getRuleContext(0, ValuePartContext);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_calculationUsageDeclaration;
  }
  enterRule(listener) {
    if (listener.enterCalculationUsageDeclaration) {
      listener.enterCalculationUsageDeclaration(this);
    }
  }
  exitRule(listener) {
    if (listener.exitCalculationUsageDeclaration) {
      listener.exitCalculationUsageDeclaration(this);
    }
  }
  accept(visitor) {
    if (visitor.visitCalculationUsageDeclaration) {
      return visitor.visitCalculationUsageDeclaration(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EmptyActionUsage_Context = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_emptyActionUsage_;
  }
  enterRule(listener) {
    if (listener.enterEmptyActionUsage_) {
      listener.enterEmptyActionUsage_(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEmptyActionUsage_) {
      listener.exitEmptyActionUsage_(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEmptyActionUsage_) {
      return visitor.visitEmptyActionUsage_(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EmptyFeature_Context = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_emptyFeature_;
  }
  enterRule(listener) {
    if (listener.enterEmptyFeature_) {
      listener.enterEmptyFeature_(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEmptyFeature_) {
      listener.exitEmptyFeature_(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEmptyFeature_) {
      return visitor.visitEmptyFeature_(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EmptyMultiplicity_Context = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_emptyMultiplicity_;
  }
  enterRule(listener) {
    if (listener.enterEmptyMultiplicity_) {
      listener.enterEmptyMultiplicity_(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEmptyMultiplicity_) {
      listener.exitEmptyMultiplicity_(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEmptyMultiplicity_) {
      return visitor.visitEmptyMultiplicity_(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var EmptyUsage_Context = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_emptyUsage_;
  }
  enterRule(listener) {
    if (listener.enterEmptyUsage_) {
      listener.enterEmptyUsage_(this);
    }
  }
  exitRule(listener) {
    if (listener.exitEmptyUsage_) {
      listener.exitEmptyUsage_(this);
    }
  }
  accept(visitor) {
    if (visitor.visitEmptyUsage_) {
      return visitor.visitEmptyUsage_(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var FilterPackageImportContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  IDENTIFIER() {
    return this.getToken(SysMLv2Parser.IDENTIFIER, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_filterPackageImport;
  }
  enterRule(listener) {
    if (listener.enterFilterPackageImport) {
      listener.enterFilterPackageImport(this);
    }
  }
  exitRule(listener) {
    if (listener.exitFilterPackageImport) {
      listener.exitFilterPackageImport(this);
    }
  }
  accept(visitor) {
    if (visitor.visitFilterPackageImport) {
      return visitor.visitFilterPackageImport(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var NonFeatureChainPrimaryExpressionContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  IDENTIFIER() {
    return this.getToken(SysMLv2Parser.IDENTIFIER, 0);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_nonFeatureChainPrimaryExpression;
  }
  enterRule(listener) {
    if (listener.enterNonFeatureChainPrimaryExpression) {
      listener.enterNonFeatureChainPrimaryExpression(this);
    }
  }
  exitRule(listener) {
    if (listener.exitNonFeatureChainPrimaryExpression) {
      listener.exitNonFeatureChainPrimaryExpression(this);
    }
  }
  accept(visitor) {
    if (visitor.visitNonFeatureChainPrimaryExpression) {
      return visitor.visitNonFeatureChainPrimaryExpression(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};
var PortConjugationContext = class extends ParserRuleContext {
  constructor(parent, invokingState) {
    super(parent, invokingState);
  }
  get ruleIndex() {
    return SysMLv2Parser.RULE_portConjugation;
  }
  enterRule(listener) {
    if (listener.enterPortConjugation) {
      listener.enterPortConjugation(this);
    }
  }
  exitRule(listener) {
    if (listener.exitPortConjugation) {
      listener.exitPortConjugation(this);
    }
  }
  accept(visitor) {
    if (visitor.visitPortConjugation) {
      return visitor.visitPortConjugation(this);
    } else {
      return visitor.visitChildren(this);
    }
  }
};

// server/src/parser/dfaLoader.ts
var _loaded = false;
var _everLoaded = false;
var _dfaStatesCleaned = false;
function isDfaPreSeeded() {
  return _loaded;
}
function hasStaleDfaStates() {
  return _everLoaded && !_dfaStatesCleaned;
}
function markDfaNotPreSeeded() {
  _loaded = false;
}
function clearAllDFAStates() {
  const dfas = SysMLv2Parser.decisionsToDFA;
  for (const dfa of dfas) {
    if (!dfa.s0) continue;
    if (dfa.isPrecedenceDfa) {
      dfa.s0 = DFAState.fromState(-1);
    } else {
      dfa.s0 = void 0;
    }
    if (dfa.states && typeof dfa.states.clear === "function") {
      dfa.states.clear();
    }
  }
  _dfaStatesCleaned = true;
}

// server/src/parser/errorListener.ts
var SysMLErrorListener = class extends BaseErrorListener {
  errors = [];
  syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, _e) {
    const token = offendingSymbol;
    const length = token?.text?.length ?? 1;
    this.errors.push({
      // ANTLR lines are 1-based, convert to 0-based for LSP.
      // Clamp to 0 to guard against edge cases (e.g. EOF at line 0).
      line: Math.max(0, line - 1),
      column: charPositionInLine,
      message: msg,
      offendingSymbol: token,
      length
    });
  }
  getErrors() {
    return this.errors;
  }
  clear() {
    this.errors = [];
  }
  hasErrors() {
    return this.errors.length > 0;
  }
};

// server/src/parser/parseDocument.ts
function parseDocument(text) {
  const result = parseDocumentCore(text);
  if (result.errors.length > 0 && hasStaleDfaStates()) {
    markDfaNotPreSeeded();
    clearAllDFAStates();
    return parseDocumentLL(text, result.lexer, result.tokenStream);
  }
  if (isDfaPreSeeded()) {
    markDfaNotPreSeeded();
  }
  return result;
}
function parseDocumentCore(text) {
  const inputStream = CharStream.fromString(text);
  const lexer = new SysMLv2Lexer(inputStream);
  const tokenStream = new CommonTokenStream(lexer);
  const lexStart = Date.now();
  tokenStream.fill();
  const lexMs = Date.now() - lexStart;
  const parser = new SysMLv2Parser(tokenStream);
  const errorListener = new SysMLErrorListener();
  lexer.removeErrorListeners();
  parser.removeErrorListeners();
  let tree = null;
  const parseStart = Date.now();
  try {
    parser.interpreter.predictionMode = PredictionMode.SLL;
    parser.errorHandler = new BailErrorStrategy();
    tree = parser.rootNamespace();
  } catch {
    tree = null;
  }
  if (!tree) {
    tokenStream.seek(0);
    parser.reset();
    parser.interpreter.predictionMode = PredictionMode.LL;
    parser.errorHandler = new DefaultErrorStrategy();
    parser.addErrorListener(errorListener);
    try {
      tree = parser.rootNamespace();
    } catch {
    }
  }
  const parseMs = Date.now() - parseStart;
  return {
    tree,
    tokenStream,
    parser,
    lexer,
    errors: errorListener.getErrors(),
    timing: { lexMs, parseMs }
  };
}
function parseDocumentLL(text, prevLexer, prevTokenStream) {
  let lexer;
  let tokenStream;
  let lexMs;
  if (prevLexer && prevTokenStream) {
    lexer = prevLexer;
    tokenStream = prevTokenStream;
    tokenStream.seek(0);
    lexMs = 0;
  } else {
    const inputStream = CharStream.fromString(text);
    lexer = new SysMLv2Lexer(inputStream);
    tokenStream = new CommonTokenStream(lexer);
    const lexStart = Date.now();
    tokenStream.fill();
    lexMs = Date.now() - lexStart;
  }
  const parser = new SysMLv2Parser(tokenStream);
  const errorListener = new SysMLErrorListener();
  lexer.removeErrorListeners();
  parser.removeErrorListeners();
  parser.addErrorListener(errorListener);
  let tree = null;
  const parseStart = Date.now();
  parser.interpreter.predictionMode = PredictionMode.LL;
  parser.errorHandler = new DefaultErrorStrategy();
  try {
    tree = parser.rootNamespace();
  } catch {
  }
  const parseMs = Date.now() - parseStart;
  return {
    tree,
    tokenStream,
    parser,
    lexer,
    errors: errorListener.getErrors(),
    timing: { lexMs, parseMs }
  };
}
var _batchBailStrategy = new BailErrorStrategy();
var _batchDefaultStrategy = new DefaultErrorStrategy();

// server/src/providers/semanticValidator.ts
var import_node = __toESM(require_node3());

// server/src/utils/identUtils.ts
function isIdentPart(c) {
  return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 48 && c <= 57 || c === 95;
}
function stripComments(text) {
  return text.replace(/\/\*[\s\S]*?\*\//g, (m2) => m2.replace(/[^\n]/g, " ")).replace(/\/\/[^\n]*/g, (m2) => " ".repeat(m2.length));
}

// server/src/library/libraryIndex.ts
var index;
var typeIndex;
function resolveLibraryType(name) {
  if (!typeIndex) return void 0;
  const exact = typeIndex.get(name);
  if (exact) return exact;
  if (name.includes("::")) {
    const member = name.split("::").pop();
    return typeIndex.get(member);
  }
  return void 0;
}
function getLibraryPackageNames() {
  return index ? Array.from(index.keys()) : [];
}

// server/src/parser/positionUtils.ts
function tokenToPosition(token) {
  return {
    line: (token.line ?? 1) - 1,
    character: token.column ?? 0
  };
}
function tokenToRange(token) {
  const start = tokenToPosition(token);
  const length = token.text?.length ?? 1;
  return {
    start,
    end: { line: start.line, character: start.character + length }
  };
}
function contextToRange(ctx2) {
  const startToken = ctx2.start;
  const stopToken = ctx2.stop ?? ctx2.start;
  if (!startToken) {
    return { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } };
  }
  const start = {
    line: (startToken.line ?? 1) - 1,
    character: startToken.column ?? 0
  };
  const end = stopToken ? {
    line: (stopToken.line ?? 1) - 1,
    character: (stopToken.column ?? 0) + (stopToken.text?.length ?? 1)
  } : { line: start.line, character: start.character + 1 };
  return { start, end };
}

// server/src/utils/sysmlKeywords.ts
var SYSML_KEYWORDS_ARRAY = SysMLv2Lexer.literalNames.filter((n2) => n2 != null).map((n2) => n2.replace(/^'|'$/g, "")).filter((n2) => /^[a-z]+$/.test(n2)).sort();
var SYSML_KEYWORDS = new Set(SYSML_KEYWORDS_ARRAY);

// server/src/symbols/scope.ts
var Scope = class {
  constructor(id, parent = null) {
    this.id = id;
    this.parent = parent;
  }
  id;
  parent;
  /** Symbols declared directly in this scope (name → symbol) */
  symbols = /* @__PURE__ */ new Map();
  /**
   * Define a new symbol in this scope.
   */
  define(symbol2) {
    this.symbols.set(symbol2.name, symbol2);
  }
  /**
   * Look up a symbol by name in this scope only (no parent chain).
   */
  lookupLocal(name) {
    return this.symbols.get(name);
  }
  /**
   * Look up a symbol by name, walking up the parent scope chain.
   */
  resolve(name) {
    const local = this.symbols.get(name);
    if (local) {
      return local;
    }
    return this.parent?.resolve(name);
  }
  /**
   * Look up a qualified name (e.g., "Pkg::SubPkg::Type").
   */
  resolveQualified(qualifiedName) {
    const parts = qualifiedName.split("::");
    if (parts.length === 1) {
      return this.resolve(parts[0]);
    }
    const current = this.resolve(parts[0]);
    if (!current) {
      return void 0;
    }
    return current;
  }
  /**
   * Get all symbols in this scope (not including parent scopes).
   */
  getLocalSymbols() {
    return Array.from(this.symbols.values());
  }
  /**
   * Get all symbols reachable from this scope (including parent chain).
   */
  getAllVisibleSymbols() {
    const result = /* @__PURE__ */ new Map();
    let scope = this;
    while (scope) {
      for (const [name, symbol2] of scope.symbols) {
        if (!result.has(name)) {
          result.set(name, symbol2);
        }
      }
      scope = scope.parent;
    }
    return Array.from(result.values());
  }
};

// server/src/symbols/symbolTable.ts
var RULE_INDEX_TO_KIND = /* @__PURE__ */ new Map([
  [SysMLv2Parser.RULE_package, "package" /* Package */],
  // 178
  [SysMLv2Parser.RULE_libraryPackage, "package" /* Package */],
  // 179
  [SysMLv2Parser.RULE_partDefinition, "part def" /* PartDef */],
  // 246
  [SysMLv2Parser.RULE_attributeDefinition, "attribute def" /* AttributeDef */],
  // 223
  [SysMLv2Parser.RULE_portDefinition, "port def" /* PortDef */],
  // 248
  [SysMLv2Parser.RULE_connectionDefinition, "connection def" /* ConnectionDef */],
  // 253
  [SysMLv2Parser.RULE_interfaceDefinition, "interface def" /* InterfaceDef */],
  // 260
  [SysMLv2Parser.RULE_actionDefinition, "action def" /* ActionDef */],
  // 287
  [SysMLv2Parser.RULE_stateDefinition, "state def" /* StateDef */],
  // 343
  [SysMLv2Parser.RULE_requirementDefinition, "requirement def" /* RequirementDef */],
  // 384
  [SysMLv2Parser.RULE_constraintDefinition, "constraint def" /* ConstraintDef */],
  // 380
  [SysMLv2Parser.RULE_itemDefinition, "item def" /* ItemDef */],
  // 244
  [SysMLv2Parser.RULE_allocationDefinition, "allocation def" /* AllocationDef */],
  // 275
  [SysMLv2Parser.RULE_useCaseDefinition, "use case def" /* UseCaseDef */],
  // 418
  [SysMLv2Parser.RULE_enumerationDefinition, "enum def" /* EnumDef */],
  // 225
  [SysMLv2Parser.RULE_enumeratedValue, "enum" /* EnumUsage */],
  // 228
  [SysMLv2Parser.RULE_enumerationUsage, "enum" /* EnumUsage */],
  // 229
  [SysMLv2Parser.RULE_calculationDefinition, "calc def" /* CalcDef */],
  // 374
  [SysMLv2Parser.RULE_viewDefinition, "view def" /* ViewDef */],
  // 421
  [SysMLv2Parser.RULE_viewpointDefinition, "viewpoint def" /* ViewpointDef */],
  // 432
  [SysMLv2Parser.RULE_metadataDefinition, "metadata def" /* MetadataDef */],
  // 436
  [SysMLv2Parser.RULE_partUsage, "part" /* PartUsage */],
  // 247
  [SysMLv2Parser.RULE_attributeUsage, "attribute" /* AttributeUsage */],
  // 224
  [SysMLv2Parser.RULE_portUsage, "port" /* PortUsage */],
  // 251
  [SysMLv2Parser.RULE_connectionUsage, "connection" /* ConnectionUsage */],
  // 254
  [SysMLv2Parser.RULE_actionUsage, "action" /* ActionUsage */],
  // 296
  [SysMLv2Parser.RULE_stateUsage, "state" /* StateUsage */],
  // 357
  [SysMLv2Parser.RULE_requirementUsage, "requirement" /* RequirementUsage */],
  // 398
  [SysMLv2Parser.RULE_constraintUsage, "constraint" /* ConstraintUsage */],
  // 381
  [SysMLv2Parser.RULE_itemUsage, "item" /* ItemUsage */],
  // 245
  [SysMLv2Parser.RULE_allocationUsage, "allocation" /* AllocationUsage */],
  // 276
  [SysMLv2Parser.RULE_useCaseUsage, "use case" /* UseCaseUsage */],
  // 419
  [SysMLv2Parser.RULE_includeUseCaseUsage, "include use case" /* IncludeUseCaseUsage */],
  // 420
  [SysMLv2Parser.RULE_actorUsage, "actor" /* ActorUsage */],
  // 395
  [SysMLv2Parser.RULE_subjectUsage, "subject" /* SubjectUsage */],
  // 388
  [SysMLv2Parser.RULE_stakeholderUsage, "stakeholder" /* StakeholderUsage */],
  // 397
  [SysMLv2Parser.RULE_referenceUsage, "ref" /* RefUsage */],
  // 213
  [SysMLv2Parser.RULE_interfaceUsage, "interface" /* InterfaceUsage */],
  // 268
  [SysMLv2Parser.RULE_performActionUsage, "perform action" /* PerformActionUsage */],
  // 298
  [SysMLv2Parser.RULE_exhibitStateUsage, "exhibit state" /* ExhibitStateUsage */],
  // 359
  [SysMLv2Parser.RULE_transitionUsage, "transition" /* TransitionUsage */],
  // 360
  [SysMLv2Parser.RULE_occurrenceDefinition, "occurrence def" /* OccurrenceDef */],
  // 231
  [SysMLv2Parser.RULE_occurrenceUsage, "occurrence" /* OccurrenceUsage */],
  // 235
  [SysMLv2Parser.RULE_renderingDefinition, "rendering def" /* RenderingDef */],
  // 434
  [SysMLv2Parser.RULE_viewUsage, "view" /* ViewUsage */],
  // 426
  [SysMLv2Parser.RULE_viewpointUsage, "viewpoint" /* ViewpointUsage */],
  // 433
  [SysMLv2Parser.RULE_verificationCaseDefinition, "verification case def" /* VerificationCaseDef */],
  // 414
  [SysMLv2Parser.RULE_verificationCaseUsage, "verification case" /* VerificationCaseUsage */],
  // 415
  [SysMLv2Parser.RULE_analysisCaseDefinition, "analysis case def" /* AnalysisCaseDef */],
  // 412
  [SysMLv2Parser.RULE_analysisCaseUsage, "analysis case" /* AnalysisCaseUsage */],
  // 413
  [SysMLv2Parser.RULE_aliasMember, "alias" /* Alias */]
  // 43
]);
var NAME_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_identification,
  // 22
  SysMLv2Parser.RULE_name,
  // 20
  SysMLv2Parser.RULE_qualifiedName
  // 44
]);
var PREFIX_EXTENSION_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_prefixMetadataAnnotation,
  // 169
  SysMLv2Parser.RULE_prefixMetadataMember,
  // 170
  SysMLv2Parser.RULE_prefixMetadataFeature,
  // 171
  SysMLv2Parser.RULE_prefixMetadataUsage,
  // 437
  SysMLv2Parser.RULE_definitionExtensionKeyword,
  // 190
  SysMLv2Parser.RULE_usageExtensionKeyword,
  // 205
  SysMLv2Parser.RULE_occurrenceDefinitionPrefix,
  // 230
  SysMLv2Parser.RULE_occurrenceUsagePrefix,
  // 234
  SysMLv2Parser.RULE_definitionPrefix,
  // 191
  SysMLv2Parser.RULE_basicDefinitionPrefix,
  // 189
  SysMLv2Parser.RULE_typePrefix,
  // 55
  SysMLv2Parser.RULE_featurePrefix,
  // 88
  SysMLv2Parser.RULE_basicFeaturePrefix,
  // 87
  SysMLv2Parser.RULE_endFeaturePrefix
  // 86
]);
var TYPE_SPECIALIZATION_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_specialization,
  // 66
  SysMLv2Parser.RULE_ownedSpecialization,
  // 67
  SysMLv2Parser.RULE_subclassification,
  // 83
  SysMLv2Parser.RULE_ownedSubclassification,
  // 84
  SysMLv2Parser.RULE_subsetting,
  // 111
  SysMLv2Parser.RULE_ownedSubsetting,
  // 112
  SysMLv2Parser.RULE_specializationPart
  // 57
]);
var TYPE_TYPING_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_typings,
  // 101
  SysMLv2Parser.RULE_featureTyping,
  // 109
  SysMLv2Parser.RULE_ownedFeatureTyping,
  // 110
  SysMLv2Parser.RULE_conjugation,
  // 70  (see NOTE above)
  SysMLv2Parser.RULE_ownedConjugation,
  // 71  (see NOTE above)
  SysMLv2Parser.RULE_disjoining,
  // 72  (see NOTE above)
  SysMLv2Parser.RULE_ownedDisjoining
  // 73  (see NOTE above)
]);
var TYPE_EXTRACTION_RULE_INDICES = /* @__PURE__ */ new Set([
  ...TYPE_SPECIALIZATION_RULE_INDICES,
  ...TYPE_TYPING_RULE_INDICES
]);
var TYPE_RECURSE_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_featureSpecialization,
  // 100
  SysMLv2Parser.RULE_featureSpecializationPart,
  // 98
  SysMLv2Parser.RULE_featureDeclaration,
  // 92
  SysMLv2Parser.RULE_usageCompletion,
  // 210
  SysMLv2Parser.RULE_definition,
  // 192
  SysMLv2Parser.RULE_usage
  // 208
]);
var DOC_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_comment,
  // 30
  SysMLv2Parser.RULE_documentation
  // 31
]);
var PREFIX_METADATA_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_prefixMetadataMember,
  // 170
  SysMLv2Parser.RULE_prefixMetadataAnnotation
  // 169
]);
var PREFIX_METADATA_RECURSE_RULE_INDICES = /* @__PURE__ */ new Set([
  SysMLv2Parser.RULE_prefixMetadataFeature,
  // 171
  SysMLv2Parser.RULE_prefixMetadataUsage,
  // 437
  SysMLv2Parser.RULE_definitionExtensionKeyword,
  // 190
  SysMLv2Parser.RULE_usageExtensionKeyword,
  // 205
  SysMLv2Parser.RULE_definitionPrefix,
  // 191
  SysMLv2Parser.RULE_basicDefinitionPrefix,
  // 189
  SysMLv2Parser.RULE_definition,
  // 192
  SysMLv2Parser.RULE_usage,
  // 208
  SysMLv2Parser.RULE_occurrenceDefinitionPrefix,
  // 230
  SysMLv2Parser.RULE_occurrenceUsagePrefix,
  // 234
  SysMLv2Parser.RULE_usagePrefix,
  // 207
  SysMLv2Parser.RULE_unextendedUsagePrefix,
  // 206
  SysMLv2Parser.RULE_basicUsagePrefix
  // 203
]);
var RE_KEYWORD_TRUNCATE = /(?<![A-Za-z_])(redefines|subsets|references|connect|bind|first|then|flow|allocate|assign|accept|send|decide|merge|join|fork|via|default)\b.*/i;
var RE_KEYWORD_TRUNCATE_SPEC = /(?<![A-Za-z_])(redefines|references|connect|bind|first|then|flow|allocate|assign|accept|send|decide|merge|join|fork|via|default)\b.*/i;
var RE_SPEC = /(?:specializes|:>|:>>)\s*('[^']+'|[A-Za-z_]\w*(?:::\w+)*)(?:\s*,\s*(?:'[^']+'|[A-Za-z_]\w*(?:::\w+)*))*/;
var RE_SPEC_WITH_SUBSETS = /(?:specializes|subsets|:>|:>>)\s*('[^']+'|[A-Za-z_]\w*(?:::\w+)*)(?:\s*,\s*(?:'[^']+'|[A-Za-z_]\w*(?:::\w+)*))*/;
var RE_DEFINED_BY = /definedby\s*([A-Za-z_]\w*(?:::\w+)*(?:\s*,\s*[A-Za-z_]\w*(?:::\w+)*)*)/;
var RE_TYPING = /:(?![:>])\s*('[^']+'|[A-Za-z_]\w*(?:::\w+)*)/;
var RE_QUOTED_NAME = /'([^']+)'/;
var RE_IDENT_START = /^([A-Za-z_]\w*(?:::\w+)*)/;
var SymbolTable = class {
  /** All symbols indexed by qualified name */
  symbols = /* @__PURE__ */ new Map();
  /** All symbols indexed by URI for cross-file lookup */
  symbolsByUri = /* @__PURE__ */ new Map();
  /** All symbols indexed by simple name for O(1) lookup */
  symbolsByName = /* @__PURE__ */ new Map();
  /** Symbols sorted by (line, character) per URI for O(log n) positional lookup */
  symbolsByPosition = /* @__PURE__ */ new Map();
  /** Reverse index: type name → symbols that reference it in typeNames */
  typeNameRefs = /* @__PURE__ */ new Map();
  /** Cached array from getAllSymbols(), invalidated on any mutation */
  allSymbolsCache;
  /** The global scope */
  globalScope;
  constructor() {
    this.globalScope = new Scope("__global__");
  }
  /**
   * Build the symbol table from a parse result.
   */
  build(uri, parseResult) {
    this.clearUri(uri);
    if (!parseResult.tree) {
      return;
    }
    this.walkTree(parseResult.tree, uri, this.globalScope, "");
    this.resolveViewInheritance(uri);
  }
  /**
   * Get a symbol by its qualified name.
   */
  getSymbol(qualifiedName) {
    return this.symbols.get(qualifiedName);
  }
  /**
   * Find a symbol by name (simple name, not qualified).
   */
  findByName(name) {
    return this.symbolsByName.get(name) ?? [];
  }
  /**
   * Find all symbols in a given URI.
   */
  getSymbolsForUri(uri) {
    return this.symbolsByUri.get(uri) ?? [];
  }
  /**
   * Get all symbols in the table.
   * Returns a cached array — invalidated on symbol add/remove.
   */
  getAllSymbols() {
    if (!this.allSymbolsCache) {
      this.allSymbolsCache = Array.from(this.symbols.values());
    }
    return this.allSymbolsCache;
  }
  /**
   * Get the global scope for resolution.
   */
  getGlobalScope() {
    return this.globalScope;
  }
  /**
   * Find the symbol at a given position in a document.
   * Uses a position-sorted index with binary search for O(log n) lookup.
   */
  findSymbolAtPosition(uri, line, character) {
    const sorted = this.symbolsByPosition.get(uri);
    if (!sorted || sorted.length === 0) return void 0;
    let lo = 0;
    let hi = sorted.length - 1;
    while (lo < hi) {
      const mid = lo + hi + 1 >>> 1;
      const r = sorted[mid].selectionRange.start;
      if (r.line < line || r.line === line && r.character <= character) {
        lo = mid;
      } else {
        hi = mid - 1;
      }
    }
    let best;
    let bestSize = Infinity;
    for (let i = lo; i >= 0; i--) {
      const sym = sorted[i];
      const r = sym.selectionRange;
      if (r.start.line < line - 1 && r.end.line < line) break;
      if (r.start.line < line && r.end.line < line) continue;
      if (line >= r.start.line && line <= r.end.line && (line > r.start.line || character >= r.start.character) && (line < r.end.line || character <= r.end.character)) {
        const size = (r.end.line - r.start.line) * 1e4 + (r.end.character - r.start.character);
        if (size < bestSize) {
          best = sym;
          bestSize = size;
        }
      }
    }
    return best;
  }
  /**
   * Find all references to a symbol name across all documents.
   * Matches symbols whose name equals the target OR whose typeNames include it.
   * Uses a reverse index for O(1) typeName lookup.
   */
  findReferences(name) {
    const results = [];
    const byName = this.symbolsByName.get(name);
    if (byName) results.push(...byName);
    const refs = this.typeNameRefs.get(name);
    if (refs) {
      for (const sym of refs) {
        if (sym.name !== name) {
          results.push(sym);
        }
      }
    }
    return results;
  }
  /**
   * Count references to a symbol name without allocating a result array.
   */
  countReferences(name) {
    let count = 0;
    const byName = this.symbolsByName.get(name);
    if (byName) count += byName.length;
    const refs = this.typeNameRefs.get(name);
    if (refs) {
      for (const sym of refs) {
        if (sym.name !== name) count++;
      }
    }
    return count;
  }
  // --------------------------------------------------------------------------
  // Private tree-walking
  // --------------------------------------------------------------------------
  /**
   * Remove all symbols for a given URI (public API for document close/eviction).
   */
  removeUri(uri) {
    this.clearUri(uri);
    this.symbolsByUri.delete(uri);
  }
  clearUri(uri) {
    const existing = this.symbolsByUri.get(uri);
    if (existing && existing.length > 0) {
      const affectedNames = /* @__PURE__ */ new Set();
      const affectedTypeNames = /* @__PURE__ */ new Set();
      for (const sym of existing) {
        this.symbols.delete(sym.qualifiedName);
        affectedNames.add(sym.name);
        for (const tn of sym.typeNames) {
          affectedTypeNames.add(tn);
        }
      }
      for (const name of affectedNames) {
        const list = this.symbolsByName.get(name);
        if (list) {
          const filtered = list.filter((s) => s.uri !== uri);
          if (filtered.length === 0) this.symbolsByName.delete(name);
          else this.symbolsByName.set(name, filtered);
        }
      }
      for (const tn of affectedTypeNames) {
        const list = this.typeNameRefs.get(tn);
        if (list) {
          const filtered = list.filter((s) => s.uri !== uri);
          if (filtered.length === 0) this.typeNameRefs.delete(tn);
          else this.typeNameRefs.set(tn, filtered);
        }
      }
      this.allSymbolsCache = void 0;
    }
    this.symbolsByUri.set(uri, []);
    this.symbolsByPosition.set(uri, []);
  }
  /**
   * Resolve view specialization chains to inherit filters, rendering,
   * and expose targets from parent view definitions.
   *
   * For example, if `view x : PartsTreeView` and `PartsTreeView :> TreeView`,
   * and TreeView has `render asTreeDiagram`, then x inherits that rendering.
   */
  resolveViewInheritance(uri) {
    const symbols = this.symbolsByUri.get(uri) ?? [];
    const viewSymbols = symbols.filter(
      (s) => s.kind === "view" /* ViewUsage */ || s.kind === "view def" /* ViewDef */
    );
    if (viewSymbols.length === 0) return;
    const viewDefsByName = /* @__PURE__ */ new Map();
    for (const s of this.getAllSymbols()) {
      if (s.kind === "view def" /* ViewDef */) {
        viewDefsByName.set(s.name, s);
      }
    }
    for (const view of viewSymbols) {
      const visited = /* @__PURE__ */ new Set();
      let current = view;
      for (let depth = 0; depth < 5 && current; depth++) {
        if (visited.has(current.name)) break;
        visited.add(current.name);
        const parentName = current.typeNames[0] ?? current.typeName;
        if (!parentName) break;
        const parent = viewDefsByName.get(parentName);
        if (!parent) break;
        if (parent.viewFilters && parent.viewFilters.length > 0) {
          if (!view.viewFilters) {
            view.viewFilters = [...parent.viewFilters];
          } else {
            for (const f of parent.viewFilters) {
              if (!view.viewFilters.includes(f)) {
                view.viewFilters.push(f);
              }
            }
          }
        }
        if (parent.viewRendering && !view.viewRendering) {
          view.viewRendering = parent.viewRendering;
        }
        if (parent.exposeTargets && parent.exposeTargets.length > 0 && (!view.exposeTargets || view.exposeTargets.length === 0)) {
          view.exposeTargets = [...parent.exposeTargets];
        }
        current = parent;
      }
    }
  }
  /**
   * Recursively walk the parse tree, extracting SysML element declarations.
   *
   * This is a generic tree walker that inspects rule names to identify
   * SysML elements. It works by pattern-matching on the ANTLR rule
   * context class names from the generated parser.
   */
  walkTree(ctx2, uri, currentScope, parentQualifiedName) {
    const ruleName = this.getRuleName(ctx2);
    const symbol2 = this.tryExtractSymbol(ctx2, uri, ruleName, parentQualifiedName);
    let childScope = currentScope;
    if (symbol2) {
      this.registerSymbol(symbol2, uri, currentScope);
      childScope = new Scope(symbol2.qualifiedName, currentScope);
    } else {
      this.registerAnonymousTypeRefs(ctx2, uri, parentQualifiedName);
    }
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof ParserRuleContext) {
        this.walkTree(
          child,
          uri,
          childScope,
          symbol2?.qualifiedName ?? parentQualifiedName
        );
      }
    }
  }
  registerSymbol(symbol2, uri, scope) {
    this.symbols.set(symbol2.qualifiedName, symbol2);
    this.allSymbolsCache = void 0;
    const uriSymbols = this.symbolsByUri.get(uri) ?? [];
    uriSymbols.push(symbol2);
    this.symbolsByUri.set(uri, uriSymbols);
    const nameList = this.symbolsByName.get(symbol2.name) ?? [];
    nameList.push(symbol2);
    this.symbolsByName.set(symbol2.name, nameList);
    const posList = this.symbolsByPosition.get(uri) ?? [];
    const startLine = symbol2.selectionRange.start.line;
    const startChar = symbol2.selectionRange.start.character;
    if (posList.length === 0 || startLine > posList[posList.length - 1].selectionRange.start.line || startLine === posList[posList.length - 1].selectionRange.start.line && startChar >= posList[posList.length - 1].selectionRange.start.character) {
      posList.push(symbol2);
    } else {
      let lo = 0, hi = posList.length;
      while (lo < hi) {
        const mid = lo + hi >>> 1;
        const mr = posList[mid].selectionRange.start;
        if (mr.line < startLine || mr.line === startLine && mr.character < startChar) {
          lo = mid + 1;
        } else {
          hi = mid;
        }
      }
      posList.splice(lo, 0, symbol2);
    }
    this.symbolsByPosition.set(uri, posList);
    for (const tn of symbol2.typeNames) {
      const refList = this.typeNameRefs.get(tn) ?? [];
      refList.push(symbol2);
      this.typeNameRefs.set(tn, refList);
    }
    scope.define(symbol2);
  }
  /**
   * For anonymous elements (elements with a recognized kind but no name),
   * extract type names and register them in the reverse index so that
   * "Go to References" on a type definition still finds anonymous usages
   * like `interface : PwrHeaterIface connect ...`.
   */
  registerAnonymousTypeRefs(ctx2, uri, parentQualifiedName) {
    const kind = RULE_INDEX_TO_KIND.get(ctx2.ruleIndex);
    if (kind === void 0) return;
    const typeNames = this.extractTypeNames(ctx2);
    if (typeNames.length === 0) return;
    const range = contextToRange(ctx2);
    const anonName = `<anonymous ${kind}>`;
    const qualifiedName = parentQualifiedName ? `${parentQualifiedName}::${anonName}#${range.start.line}` : `${anonName}#${range.start.line}`;
    const anonSymbol = {
      name: anonName,
      kind,
      qualifiedName,
      range,
      selectionRange: range,
      uri,
      typeName: typeNames[0],
      typeNames,
      specializationNames: [],
      parentQualifiedName: parentQualifiedName || void 0,
      children: []
    };
    for (const tn of typeNames) {
      const refList = this.typeNameRefs.get(tn) ?? [];
      refList.push(anonSymbol);
      this.typeNameRefs.set(tn, refList);
    }
    const uriSymbols = this.symbolsByUri.get(uri) ?? [];
    uriSymbols.push(anonSymbol);
    this.symbolsByUri.set(uri, uriSymbols);
    const posList = this.symbolsByPosition.get(uri) ?? [];
    const startLine = range.start.line;
    const startChar = range.start.character;
    if (posList.length === 0 || startLine > posList[posList.length - 1].selectionRange.start.line || startLine === posList[posList.length - 1].selectionRange.start.line && startChar >= posList[posList.length - 1].selectionRange.start.character) {
      posList.push(anonSymbol);
    } else {
      let lo = 0, hi = posList.length;
      while (lo < hi) {
        const mid = lo + hi >>> 1;
        const mr = posList[mid].selectionRange.start;
        if (mr.line < startLine || mr.line === startLine && mr.character < startChar) {
          lo = mid + 1;
        } else {
          hi = mid;
        }
      }
      posList.splice(lo, 0, anonSymbol);
    }
    this.symbolsByPosition.set(uri, posList);
  }
  /**
   * Get the parser rule name from a context (e.g., "packageDeclaration").
   */
  getRuleName(ctx2) {
    const idx = ctx2.ruleIndex;
    if (idx >= 0 && idx < SysMLv2Parser.ruleNames.length) {
      return SysMLv2Parser.ruleNames[idx];
    }
    const ctorName = ctx2.constructor.name;
    if (ctorName.endsWith("Context")) {
      return ctorName.slice(0, -"Context".length);
    }
    return ctorName;
  }
  /**
   * Try to extract a SysMLSymbol from a parse tree context.
   * Returns undefined if this context doesn't represent a named declaration.
   */
  tryExtractSymbol(ctx2, uri, ruleName, parentQualifiedName) {
    const kind = this.inferKind(ruleName, ctx2);
    if (kind === void 0) {
      return void 0;
    }
    const name = this.extractName(ctx2);
    if (!name) {
      return void 0;
    }
    const qualifiedName = parentQualifiedName ? `${parentQualifiedName}::${name}` : name;
    const range = contextToRange(ctx2);
    const selectionRange = this.extractNameRange(ctx2) ?? range;
    const typeNames = this.extractTypeNames(ctx2);
    const specializationNames = this.extractSpecializationNames(ctx2);
    const typeName = typeNames[0];
    const documentation = this.extractDocumentation(ctx2);
    const { multiplicity, multiplicityRange } = isUsage(kind) ? this.extractMultiplicity(ctx2) : {};
    const metadataAnnotations = this.extractPrefixMetadataAnnotations(ctx2);
    const isView = kind === "view" /* ViewUsage */ || kind === "view def" /* ViewDef */;
    const isPackage = kind === "package" /* Package */;
    const exposeTargets = isView ? this.extractExposeTargets(ctx2) : void 0;
    const viewFilters = isView || isPackage ? this.extractViewFilters(ctx2) : void 0;
    const viewRendering = isView ? this.extractViewRendering(ctx2) : void 0;
    return {
      name,
      kind,
      qualifiedName,
      range,
      selectionRange,
      uri,
      typeName,
      typeNames,
      specializationNames,
      documentation,
      parentQualifiedName: parentQualifiedName || void 0,
      children: [],
      multiplicity,
      multiplicityRange,
      metadataAnnotations: metadataAnnotations.length > 0 ? metadataAnnotations : void 0,
      exposeTargets: exposeTargets && exposeTargets.length > 0 ? exposeTargets : void 0,
      viewFilters: viewFilters && viewFilters.length > 0 ? viewFilters : void 0,
      viewRendering: viewRendering || void 0
    };
  }
  /**
   * Infer the SysML element kind from the ANTLR rule index.
   * Uses a pre-built Map for O(1) lookup — no string allocation.
   */
  inferKind(_ruleName, ctx2) {
    return RULE_INDEX_TO_KIND.get(ctx2.ruleIndex);
  }
  /**
   * Extract the declared name from a parse tree context.
   * Looks for an IDENT token or a name/identification sub-rule.
   */
  extractName(ctx2) {
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof TerminalNode) {
        const token = child.symbol;
        if (this.isIdentifierToken(token)) {
          return this.unquoteName(token.text ?? "");
        }
      }
      if (child instanceof ParserRuleContext) {
        if (NAME_RULE_INDICES.has(child.ruleIndex)) {
          const name = this.extractTextFromSubtree(child);
          if (name) return name;
        }
      }
    }
    for (let i = 0; i < Math.min(ctx2.getChildCount(), 5); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof ParserRuleContext) {
        if (this.isPrefixOrExtensionContext(child)) continue;
        const name = this.extractName(child);
        if (name) return name;
      }
    }
    return void 0;
  }
  /**
   * Extract the range of just the name token.
   */
  extractNameRange(ctx2) {
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof TerminalNode && this.isIdentifierToken(child.symbol)) {
        return tokenToRange(child.symbol);
      }
      if (child instanceof ParserRuleContext) {
        if (this.isPrefixOrExtensionContext(child)) continue;
        const result = this.extractNameRange(child);
        if (result) return result;
      }
    }
    return void 0;
  }
  /**
   * Extract a type name from specialization syntax (": TypeName" or ":> TypeName").
   */
  /**
   * Extract all type names from a context.
   * Handles both usage typing (`:` / `defined by`) and definition
   * specialization (`specializes` / `:>`).
   *
   * Examples:
   *   part x : A, B          → ['A', 'B']
   *   part x defined by A, B → ['A', 'B']
   *   part def X specializes A, B → ['A', 'B']
   *   part def X :> A, B     → ['A', 'B']
   */
  extractTypeNames(ctx2) {
    const names = [];
    this.collectTypeNamesFromTree(ctx2, names, 0);
    if (names.length > 0) return names;
    const fullText = ctx2.getText();
    const braceIdx = fullText.indexOf("{");
    let text = braceIdx >= 0 ? fullText.substring(0, braceIdx) : fullText;
    text = text.replace(RE_KEYWORD_TRUNCATE, "");
    const specMatch = text.match(RE_SPEC);
    if (specMatch) {
      const specStr = text.substring(text.indexOf(specMatch[0]) + specMatch[0].indexOf(specMatch[1]));
      for (const part of specStr.split(",")) {
        const qm = part.match(RE_QUOTED_NAME);
        if (qm) {
          names.push(qm[1]);
          continue;
        }
        const m2 = part.trim().match(RE_IDENT_START);
        if (m2) names.push(m2[1]);
      }
      return names;
    }
    const defByMatch = text.match(RE_DEFINED_BY);
    if (defByMatch) {
      for (const part of defByMatch[1].split(",")) {
        const m2 = part.trim().match(RE_IDENT_START);
        if (m2) names.push(m2[1]);
      }
      return names;
    }
    const typingMatch = text.match(RE_TYPING);
    if (typingMatch) {
      const fullMatchIdx = text.indexOf(typingMatch[0]);
      const afterColon = text.substring(fullMatchIdx + 1).trim();
      for (const part of afterColon.split(",")) {
        const qm = part.match(RE_QUOTED_NAME);
        if (qm) {
          names.push(qm[1]);
          continue;
        }
        const m2 = part.trim().match(RE_IDENT_START);
        if (m2) names.push(m2[1]);
      }
      return names;
    }
    return names;
  }
  /**
   * Extract only the specialization names (:> / specializes / subsets) from a context.
   * Uses the same tree-walk as extractTypeNames but restricted to
   * TYPE_SPECIALIZATION_RULE_INDICES so that : typing names are excluded.
   * Falls back to a regex path that covers :> / :>> / specializes / subsets.
   */
  extractSpecializationNames(ctx2) {
    const names = [];
    this.collectNamesFromTree(ctx2, names, 0, TYPE_SPECIALIZATION_RULE_INDICES);
    if (names.length > 0) return names;
    const fullText = ctx2.getText();
    const braceIdx = fullText.indexOf("{");
    let text = braceIdx >= 0 ? fullText.substring(0, braceIdx) : fullText;
    text = text.replace(RE_KEYWORD_TRUNCATE_SPEC, "");
    const specMatch = text.match(RE_SPEC_WITH_SUBSETS);
    if (specMatch) {
      const specStr = text.substring(text.indexOf(specMatch[0]) + specMatch[0].indexOf(specMatch[1]));
      for (const part of specStr.split(",")) {
        const qm = part.match(RE_QUOTED_NAME);
        if (qm) {
          names.push(qm[1]);
          continue;
        }
        const m2 = part.trim().match(RE_IDENT_START);
        if (m2) names.push(m2[1]);
      }
    }
    return names;
  }
  /**
   * Recursively walk the parse tree to find typing / specialization rules.
   * Recurses into declaration wrappers (up to maxDepth) so that
   * `interfaceUsage → interfaceUsageDeclaration → usageDeclaration →
   *  featureSpecializationPart → featureSpecialization → typings` is found.
   */
  collectTypeNamesFromTree(ctx2, names, depth) {
    this.collectNamesFromTree(ctx2, names, depth, TYPE_EXTRACTION_RULE_INDICES);
  }
  /**
   * Core recursive tree walker used by both collectTypeNamesFromTree and
   * extractSpecializationNames — parameterised on which extraction rule set to use.
   */
  collectNamesFromTree(ctx2, names, depth, extractionRules) {
    if (depth > 6) return;
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (!(child instanceof ParserRuleContext)) continue;
      const ri = child.ruleIndex;
      if (extractionRules.has(ri)) {
        const childText = child.getText();
        const stripped = childText.replace(/^(specializes|:>>|:>|:|definedby|subsets|redefines|references|conjugates|disjoints)/i, "");
        for (const part of stripped.split(",")) {
          const qm = part.match(/'([^']+)'/);
          if (qm) {
            names.push(qm[1]);
          } else {
            const m2 = part.match(/([A-Za-z_]\w*(?:::\w+)*)/);
            if (m2) names.push(m2[1]);
          }
        }
      } else if (
        // Recurse into declaration / part / body wrappers that may
        // contain nested typing rules (but NOT into body rules that
        // contain children — to avoid collecting types from members).
        TYPE_RECURSE_RULE_INDICES.has(ri) || // Also recurse into any rule whose name contains 'declaration'
        // (covers e.g. interfaceUsageDeclaration, usageDeclaration, etc.)
        SysMLv2Parser.ruleNames[ri]?.includes("eclaration")
      ) {
        this.collectNamesFromTree(child, names, depth + 1, extractionRules);
      }
    }
  }
  /**
   * Extract documentation from a comment or doc child.
   */
  extractDocumentation(ctx2) {
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof ParserRuleContext) {
        if (DOC_RULE_INDICES.has(child.ruleIndex)) {
          const raw = child.getText();
          if (raw) {
            let text = raw;
            if (text.startsWith("doc")) text = text.slice(3);
            if (text.startsWith("comment")) text = text.slice(7);
            text = text.replace(/^\/\*\s*/, "").replace(/\s*\*\/$/, "");
            text = text.replace(/^\/\/\s*/, "");
            return text.trim() || raw;
          }
          return raw ?? void 0;
        }
        const nested = this.extractDocumentation(child);
        if (nested) return nested;
      }
    }
    return void 0;
  }
  /**
   * Extract multiplicity from a context.
   * Looks for MultiplicityBoundsContext in the subtree.
   * Returns { multiplicity: "1..5", multiplicityRange: { lower: 1, upper: 5 } }
   */
  extractMultiplicity(ctx2) {
    const multCtx = this.findMultiplicityBounds(ctx2);
    if (!multCtx) {
      return {};
    }
    const members = multCtx.multiplicityExpressionMember();
    if (!members || members.length === 0) {
      return {};
    }
    const values = [];
    for (const member of members) {
      const rawText = member.getText()?.trim();
      if (rawText) {
        values.push(rawText);
      }
    }
    if (values.length === 0) {
      return {};
    }
    let lower;
    let upper;
    let multiplicity;
    if (values.length === 1) {
      multiplicity = values[0];
      if (values[0] === "*") {
        lower = 0;
        upper = "*";
      } else {
        const num = parseInt(values[0], 10);
        if (isNaN(num)) {
          return { multiplicity };
        }
        lower = num;
        upper = num;
      }
    } else {
      multiplicity = `${values[0]}..${values[1]}`;
      lower = parseInt(values[0], 10);
      if (isNaN(lower)) {
        return { multiplicity };
      }
      if (values[1] === "*") {
        upper = "*";
      } else {
        upper = parseInt(values[1], 10);
        if (isNaN(upper)) {
          return { multiplicity };
        }
      }
    }
    return {
      multiplicity,
      multiplicityRange: { lower, upper }
    };
  }
  /**
   * Recursively search for a MultiplicityBoundsContext in the subtree.
   */
  findMultiplicityBounds(ctx2) {
    if (ctx2.ruleIndex === SysMLv2Parser.RULE_multiplicityBounds) {
      return ctx2;
    }
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof ParserRuleContext) {
        const result = this.findMultiplicityBounds(child);
        if (result) {
          return result;
        }
      }
    }
    return void 0;
  }
  /**
   * Whether a context is a prefix metadata or definition/usage prefix rule.
   * These contain annotation identifiers (e.g. from `#product`) that should
   * not be mistaken for the element's own declared name.
   */
  isPrefixOrExtensionContext(ctx2) {
    return PREFIX_EXTENSION_RULE_INDICES.has(ctx2.ruleIndex);
  }
  /**
   * Extract prefix metadata annotation names from a context.
   * Looks for `#name` patterns in prefixMetadataMember / prefixMetadataAnnotation children.
   */
  extractPrefixMetadataAnnotations(ctx2) {
    const annotations = [];
    this.collectPrefixMetadata(ctx2, annotations, 0);
    return annotations;
  }
  collectPrefixMetadata(ctx2, annotations, depth) {
    if (depth > 4) return;
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (!(child instanceof ParserRuleContext)) continue;
      const ri = child.ruleIndex;
      if (PREFIX_METADATA_RULE_INDICES.has(ri)) {
        const name = this.extractTextFromSubtree(child);
        if (name) annotations.push(name);
      } else if (PREFIX_METADATA_RECURSE_RULE_INDICES.has(ri)) {
        this.collectPrefixMetadata(child, annotations, depth + 1);
      }
    }
  }
  /**
   * Check if a token is an identifier (not a keyword or punctuation).
   * Also accepts SysML quoted names ('single quoted strings').
   */
  isIdentifierToken(token) {
    const text = token.text;
    if (!text) return false;
    if (this.isQuotedName(text)) return true;
    return /^[a-zA-Z_]/.test(text) && !this.isKeyword(text);
  }
  /**
   * Check if text is a SysML quoted name (single-quoted string).
   */
  isQuotedName(text) {
    return text.length >= 3 && text.startsWith("'") && text.endsWith("'");
  }
  /**
   * Strip quotes from a SysML quoted name, returning the inner text.
   * Returns the text unchanged if not quoted.
   */
  unquoteName(text) {
    if (this.isQuotedName(text)) {
      return text.slice(1, -1);
    }
    return text;
  }
  /**
   * Check if a text is a SysML keyword.
   * Uses the shared keyword set derived from the generated lexer.
   */
  isKeyword(text) {
    return SYSML_KEYWORDS.has(text);
  }
  /**
   * Extract expose target qualified names from a view body.
   * Walks viewBody/viewDefinitionBody children to find expose rules,
   * then extracts the qualified name from membershipExpose or namespaceExpose.
   */
  extractExposeTargets(ctx2) {
    const targets = [];
    this.collectExposeTargets(ctx2, targets, 0);
    return targets;
  }
  collectExposeTargets(ctx2, targets, depth) {
    if (depth > 6) return;
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (!(child instanceof ParserRuleContext)) continue;
      const ri = child.ruleIndex;
      if (ri === SysMLv2Parser.RULE_expose) {
        const target = this.extractExposeQualifiedName(child);
        if (target) targets.push(target);
      } else if (ri === SysMLv2Parser.RULE_viewBody || ri === SysMLv2Parser.RULE_viewBodyItem || ri === SysMLv2Parser.RULE_viewDefinitionBody || ri === SysMLv2Parser.RULE_viewDefinitionBodyItem) {
        this.collectExposeTargets(child, targets, depth + 1);
      }
    }
  }
  /**
   * Extract the qualified name from an expose rule.
   * Handles both membershipExpose (single name, optionally ::**)
   * and namespaceExpose (name::* or name::**).
   */
  extractExposeQualifiedName(exposeCtx) {
    for (let i = 0; i < exposeCtx.getChildCount(); i++) {
      const child = exposeCtx.getChild(i);
      if (!(child instanceof ParserRuleContext)) continue;
      const ri = child.ruleIndex;
      if (ri === SysMLv2Parser.RULE_membershipExpose || ri === SysMLv2Parser.RULE_namespaceExpose) {
        return this.extractFullExposeText(child);
      }
    }
    return void 0;
  }
  /**
   * Extract the full text of an expose target including :: and wildcard tokens.
   * Returns e.g. "Vehicle::engine", "Pkg::*", "Pkg::**"
   */
  extractFullExposeText(ctx2) {
    const parts = [];
    this.collectExposeText(ctx2, parts);
    return parts.length > 0 ? parts.join("") : void 0;
  }
  collectExposeText(ctx2, parts) {
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof TerminalNode) {
        const text = child.symbol.text;
        if (text) parts.push(text);
      } else if (child instanceof ParserRuleContext) {
        this.collectExposeText(child, parts);
      }
    }
  }
  /**
   * Extract element filter expressions from a view body.
   * Looks for elementFilterMember rules containing `filter @ QualifiedName`.
   */
  extractViewFilters(ctx2) {
    const filters = [];
    this.collectViewFilters(ctx2, filters, 0);
    return filters;
  }
  collectViewFilters(ctx2, filters, depth) {
    if (depth > 6) return;
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (!(child instanceof ParserRuleContext)) continue;
      const ri = child.ruleIndex;
      if (ri === SysMLv2Parser.RULE_elementFilterMember) {
        const text = this.extractFullExposeText(child);
        if (text) {
          const cleaned = text.replace(/^filter/i, "").replace(/;$/g, "").trim();
          if (cleaned) filters.push(cleaned);
        }
      } else if (ri === SysMLv2Parser.RULE_viewBody || ri === SysMLv2Parser.RULE_viewBodyItem || ri === SysMLv2Parser.RULE_viewDefinitionBody || ri === SysMLv2Parser.RULE_viewDefinitionBodyItem || ri === SysMLv2Parser.RULE_packageBody || ri === SysMLv2Parser.RULE_packageBodyElement) {
        this.collectViewFilters(child, filters, depth + 1);
      }
    }
  }
  /**
   * Extract the view rendering reference from a view body.
   * Looks for viewRenderingMember rules containing `render QualifiedName`.
   */
  extractViewRendering(ctx2) {
    return this.findViewRendering(ctx2, 0);
  }
  findViewRendering(ctx2, depth) {
    if (depth > 6) return void 0;
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (!(child instanceof ParserRuleContext)) continue;
      const ri = child.ruleIndex;
      if (ri === SysMLv2Parser.RULE_viewRenderingMember) {
        const text = this.extractFullExposeText(child);
        if (text) {
          const cleaned = text.replace(/^render/i, "").replace(/[;{}]/g, "").trim();
          if (cleaned) return cleaned;
        }
      } else if (ri === SysMLv2Parser.RULE_viewBody || ri === SysMLv2Parser.RULE_viewBodyItem || ri === SysMLv2Parser.RULE_viewDefinitionBody || ri === SysMLv2Parser.RULE_viewDefinitionBodyItem) {
        const found = this.findViewRendering(child, depth + 1);
        if (found) return found;
      }
    }
    return void 0;
  }
  /**
   * Extract all text content from a subtree (concatenate terminal nodes).
   */
  extractTextFromSubtree(ctx2) {
    const parts = [];
    for (let i = 0; i < ctx2.getChildCount(); i++) {
      const child = ctx2.getChild(i);
      if (child instanceof TerminalNode) {
        const text = child.symbol.text;
        if (text && this.isIdentifierToken(child.symbol)) {
          parts.push(this.unquoteName(text));
        }
      } else if (child instanceof ParserRuleContext) {
        const sub = this.extractTextFromSubtree(child);
        if (sub) parts.push(sub);
      }
    }
    return parts.length > 0 ? parts.join("::") : void 0;
  }
};

// server/src/model/sysmlModelProvider.ts
function containsWord(text, word) {
  let idx = 0;
  while ((idx = text.indexOf(word, idx)) !== -1) {
    const before = idx > 0 ? text.charCodeAt(idx - 1) : 32;
    const after = idx + word.length < text.length ? text.charCodeAt(idx + word.length) : 32;
    if (!isIdentPart(before) && !isIdentPart(after)) return true;
    idx += 1;
  }
  return false;
}
function findWordPositions(text, word) {
  const results = [];
  let idx = 0;
  while ((idx = text.indexOf(word, idx)) !== -1) {
    const before = idx > 0 ? text.charCodeAt(idx - 1) : 32;
    const afterIdx = idx + word.length;
    const after = afterIdx < text.length ? text.charCodeAt(afterIdx) : 32;
    if (!isIdentPart(before) && !isIdentPart(after)) {
      results.push({ pos: idx, afterPos: afterIdx });
    }
    idx += 1;
  }
  return results;
}
function findWordPositionsCI(text, word) {
  const lower = text.toLowerCase();
  const wordLower = word.toLowerCase();
  const results = [];
  let idx = 0;
  while ((idx = lower.indexOf(wordLower, idx)) !== -1) {
    const before = idx > 0 ? lower.charCodeAt(idx - 1) : 32;
    const afterIdx = idx + wordLower.length;
    const after = afterIdx < lower.length ? lower.charCodeAt(afterIdx) : 32;
    if (!isIdentPart(before) && !isIdentPart(after)) {
      results.push({ pos: idx, afterPos: afterIdx });
    }
    idx += 1;
  }
  return results;
}
function skipWS(text, pos) {
  while (pos < text.length) {
    const ch = text[pos];
    if (ch === " " || ch === "	" || ch === "\n" || ch === "\r") pos++;
    else break;
  }
  return pos;
}
function readIdent(text, pos, allowDots = false) {
  let end = pos;
  while (end < text.length) {
    const ch = text.charCodeAt(end);
    if (isIdentPart(ch)) {
      end++;
    } else if (allowDots && text[end] === ".") {
      end++;
    } else if (text[end] === ":" && end + 1 < text.length && text[end + 1] === ":") {
      end += 2;
    } else {
      break;
    }
  }
  return [text.substring(pos, end), end];
}
function readNameOrQuoted(text, pos, allowDots = false) {
  if (pos < text.length && text[pos] === "'") {
    const close = text.indexOf("'", pos + 1);
    if (close >= 0) return [text.substring(pos + 1, close), close + 1];
  }
  return readIdent(text, pos, allowDots);
}
function readWordAfterKeyword(text, afterPos, allowDots = false) {
  const start = skipWS(text, afterPos);
  return readIdent(text, start, allowDots);
}
function readCommaSeparatedIdents(text, pos) {
  const names = [];
  let p = skipWS(text, pos);
  while (p < text.length) {
    const [name, end] = readIdent(text, p);
    if (!name) break;
    names.push(name);
    p = skipWS(text, end);
    if (p < text.length && text[p] === ",") {
      p = skipWS(text, p + 1);
    } else {
      break;
    }
  }
  return names;
}
var SysMLModelProvider = class {
  constructor(documentManager) {
    this.documentManager = documentManager;
  }
  documentManager;
  /** Cached symbol tables keyed by URI. */
  _stCache = /* @__PURE__ */ new Map();
  /** Remove cached symbol table for a URI (e.g. on document close). */
  removeUri(uri) {
    this._stCache.delete(uri);
  }
  /**
   * Drop **all** cached symbol tables.
   * Returns the number of entries that were evicted.
   */
  clearAll() {
    const count = this._stCache.size;
    this._stCache.clear();
    return count;
  }
  /** Number of cached symbol tables (for diagnostics / stats). */
  get cacheSize() {
    return this._stCache.size;
  }
  /**
   * Return a cached-or-fresh SymbolTable for a URI.
   *
   * The table is rebuilt only when the document version changes.
   */
  _getSymbolTable(uri, parseResult) {
    const version2 = this.documentManager.getVersion(uri);
    const cached2 = this._stCache.get(uri);
    if (cached2 && cached2.version === version2) {
      return cached2.table;
    }
    const table = new SymbolTable();
    table.build(uri, parseResult);
    this._stCache.set(uri, { version: version2, table });
    return table;
  }
  /**
   * Build the model response for a document.
   *
   * @param uri       Document URI
   * @param version   Document version (for staleness detection)
   * @param scopes    Which sections to include (empty/undefined = all)
   */
  getModel(uri, version2, scopes) {
    const startTime = Date.now();
    const parseResult = this.documentManager.get(uri);
    if (!parseResult) {
      return { version: -1 };
    }
    const scopeSet = new Set(
      scopes && scopes.length > 0 ? scopes : ["elements", "relationships", "sequenceDiagrams", "activityDiagrams", "resolvedTypes", "diagnostics"]
    );
    const symbolTable = this._getSymbolTable(uri, parseResult);
    const text = this.documentManager.getText(uri) ?? "";
    const lines = text.split("\n");
    const result = { version: version2 };
    if (scopeSet.has("elements")) {
      result.elements = this.convertToElementDTOs(symbolTable, uri, lines);
    }
    if (scopeSet.has("relationships")) {
      result.relationships = this.extractRelationships(symbolTable, uri, lines);
    }
    if (scopeSet.has("sequenceDiagrams")) {
      result.sequenceDiagrams = this.extractSequenceDiagrams(symbolTable, uri, lines);
    }
    if (scopeSet.has("activityDiagrams")) {
      result.activityDiagrams = this.extractActivityDiagrams(symbolTable, uri, lines);
    }
    if (scopeSet.has("resolvedTypes")) {
      result.resolvedTypes = this.extractResolvedTypes(symbolTable, uri, lines);
    }
    if (scopeSet.has("diagnostics")) {
      result.diagnostics = this.extractSemanticDiagnostics(symbolTable, uri);
    }
    const allSymbols = symbolTable.getSymbolsForUri(uri);
    const resolved = allSymbols.filter((s) => s.typeNames.length > 0);
    const parseTimeMs = this.documentManager.getParseTimeMs(uri);
    const timingBreakdown = this.documentManager.getTimingBreakdown(uri);
    const modelBuildTimeMs = Date.now() - startTime;
    result.stats = {
      totalElements: allSymbols.length,
      resolvedElements: resolved.length,
      unresolvedElements: allSymbols.length - resolved.length,
      parseTimeMs,
      lexTimeMs: timingBreakdown.lexMs,
      parseOnlyTimeMs: timingBreakdown.parseMs,
      modelBuildTimeMs,
      complexity: analyseComplexity(allSymbols)
    };
    return result;
  }
  // -----------------------------------------------------------------------
  // Element Tree Conversion
  // -----------------------------------------------------------------------
  /**
   * Convert the symbol table into a recursive element tree.
   *
   * The symbol table stores a flat list with `parentQualifiedName` pointers.
   * We rebuild the tree by grouping symbols by parent and recursively
   * attaching children.
   */
  convertToElementDTOs(symbolTable, uri, lines) {
    const symbols = symbolTable.getSymbolsForUri(uri);
    const byQualifiedName = /* @__PURE__ */ new Map();
    for (const sym of symbols) {
      byQualifiedName.set(sym.qualifiedName, sym);
    }
    const childrenOf = /* @__PURE__ */ new Map();
    for (const sym of symbols) {
      if (sym.parentQualifiedName && byQualifiedName.has(sym.parentQualifiedName)) {
        const list = childrenOf.get(sym.parentQualifiedName) ?? [];
        list.push(sym);
        childrenOf.set(sym.parentQualifiedName, list);
      }
    }
    const roots = symbols.filter(
      (s) => !s.parentQualifiedName || !byQualifiedName.has(s.parentQualifiedName)
    );
    return roots.map((s) => this.symbolToElementDTO(s, childrenOf, lines));
  }
  /**
   * Convert a single SysMLSymbol into an SysMLElementDTO, recursively
   * including children.
   */
  symbolToElementDTO(symbol2, childrenOf, lines) {
    const childSymbols = (childrenOf.get(symbol2.qualifiedName) ?? []).filter((c) => c.qualifiedName !== symbol2.qualifiedName);
    const children = childSymbols.map(
      (c) => this.symbolToElementDTO(c, childrenOf, lines)
    );
    const attributes = {};
    if (symbol2.typeNames.length > 0) {
      const typeLabel = symbol2.typeNames.join(", ");
      if (symbol2.kind === "port" /* PortUsage */ || symbol2.kind === "port def" /* PortDef */) {
        attributes["portType"] = typeLabel;
      } else {
        attributes["partType"] = typeLabel;
      }
    }
    if (symbol2.documentation) {
      attributes["documentation"] = symbol2.documentation;
    }
    if (symbol2.metadataAnnotations && symbol2.metadataAnnotations.length > 0) {
      attributes["metadataAnnotations"] = symbol2.metadataAnnotations.join(", ");
    }
    if (symbol2.exposeTargets && symbol2.exposeTargets.length > 0) {
      attributes["exposeTargets"] = symbol2.exposeTargets.join(",");
    }
    if (symbol2.viewFilters && symbol2.viewFilters.length > 0) {
      attributes["viewFilters"] = symbol2.viewFilters.join(",");
    }
    if (symbol2.viewRendering) {
      attributes["viewRendering"] = symbol2.viewRendering;
    }
    const direction = this.extractDirection(symbol2, lines);
    if (direction) {
      attributes["direction"] = direction;
    }
    const multiplicity = this.extractMultiplicity(symbol2, lines);
    if (multiplicity) {
      attributes["multiplicity"] = multiplicity;
    }
    const modifier = this.extractModifier(symbol2, lines);
    if (modifier) {
      attributes["modifier"] = modifier;
    }
    const visibility = this.extractVisibility(symbol2, lines);
    if (visibility) {
      attributes["visibility"] = visibility;
    }
    const value = this.extractValue(symbol2, lines);
    if (value) {
      attributes["value"] = value;
    }
    const relationships = [];
    for (const tn of symbol2.typeNames) {
      relationships.push({
        type: "typing",
        source: symbol2.name,
        target: tn
      });
    }
    const specializations = this.extractSpecializations(symbol2, lines);
    for (const spec of specializations) {
      relationships.push({
        type: "specializes",
        source: symbol2.name,
        target: spec
      });
    }
    return {
      type: symbol2.kind,
      name: symbol2.name,
      range: this.rangeToDTO(symbol2.range),
      children,
      attributes,
      relationships
    };
  }
  // -----------------------------------------------------------------------
  // Relationship Extraction
  // -----------------------------------------------------------------------
  /**
   * Extract a flat list of relationships from the symbol table.
   * Includes typing, specialization, connections, and more.
   */
  extractRelationships(symbolTable, uri, lines) {
    const symbols = symbolTable.getSymbolsForUri(uri);
    const relationships = [];
    for (const symbol2 of symbols) {
      if (symbol2.kind === "package" /* Package */ || symbol2.kind === "import" /* Import */ || symbol2.kind === "comment" /* Comment */ || symbol2.kind === "doc" /* Doc */) {
        continue;
      }
      if (symbol2.typeNames.length > 0 && isUsage(symbol2.kind)) {
        for (const tn of symbol2.typeNames) {
          relationships.push({
            type: "typing",
            source: symbol2.name,
            target: tn
          });
        }
      }
      const specializations = this.extractSpecializations(symbol2, lines);
      for (const spec of specializations) {
        relationships.push({
          type: "specializes",
          source: symbol2.name,
          target: spec
        });
      }
      if (symbol2.kind === "connection" /* ConnectionUsage */) {
        const connectionTargets = this.extractConnectionEndpoints(symbol2, lines);
        if (connectionTargets.length === 2) {
          relationships.push({
            type: "connection",
            source: connectionTargets[0],
            target: connectionTargets[1],
            name: symbol2.name
          });
        }
      }
      if (symbol2.kind === "allocation" /* AllocationUsage */) {
        const allocTargets = this.extractConnectionEndpoints(symbol2, lines);
        if (allocTargets.length === 2) {
          relationships.push({
            type: "allocation",
            source: allocTargets[0],
            target: allocTargets[1],
            name: symbol2.name
          });
        }
      }
      const elementText = this.getElementText(symbol2, lines);
      const additionalRels = this.extractKeywordRelationships(symbol2.name, elementText);
      relationships.push(...additionalRels);
    }
    const fullText = lines.join("\n");
    const standaloneSatisfy = this.extractStandaloneSatisfyVerify(stripComments(fullText));
    for (const rel of standaloneSatisfy) {
      const isDup = relationships.some(
        (r) => r.type === rel.type && r.source === rel.source && r.target === rel.target
      );
      if (!isDup) relationships.push(rel);
    }
    return relationships;
  }
  // -----------------------------------------------------------------------
  // Sequence Diagram Extraction
  // -----------------------------------------------------------------------
  /**
   * Extract sequence diagram data from the symbol table.
   *
   * Sequence diagrams are built from:
   * 1. Action definitions/usages with explicit send/accept message patterns
   * 2. Synthesised from action definitions that have first/then/done flows
   *    (flow-to-sequence synthesis — matches ANTLR behaviour)
   */
  extractSequenceDiagrams(symbolTable, uri, lines) {
    const symbols = symbolTable.getSymbolsForUri(uri);
    const diagrams = [];
    const seen = /* @__PURE__ */ new Set();
    for (const symbol2 of symbols) {
      if (symbol2.kind !== "action def" /* ActionDef */ && symbol2.kind !== "action" /* ActionUsage */) {
        continue;
      }
      const children = this.getChildSymbols(symbol2, symbolTable);
      const participants = [];
      const messages = [];
      for (const child of children) {
        if (child.kind === "part" /* PartUsage */ || child.kind === "item" /* ItemUsage */) {
          participants.push({
            name: child.name,
            type: child.typeNames.join(", ") || child.kind,
            range: this.rangeToDTO(child.range)
          });
        }
      }
      const fullText = this.getFullElementText(symbol2, lines);
      let occurrence = 1;
      for (const { afterPos } of findWordPositionsCI(fullText, "send")) {
        const sigStart = skipWS(fullText, afterPos);
        const [signal, afterSig] = readIdent(fullText, sigStart, true);
        if (!signal) continue;
        const kwStart = skipWS(fullText, afterSig);
        const [kw, afterKw] = readIdent(fullText, kwStart);
        if (kw !== "via" && kw !== "to") continue;
        const tgtStart = skipWS(fullText, afterKw);
        const [target] = readIdent(fullText, tgtStart, true);
        if (!target) continue;
        messages.push({
          name: `send_${occurrence}`,
          from: symbol2.name,
          to: target,
          payload: signal,
          occurrence: occurrence++,
          range: this.rangeToDTO(symbol2.range)
        });
      }
      for (const { afterPos } of findWordPositionsCI(fullText, "accept")) {
        const sigStart = skipWS(fullText, afterPos);
        const [signal, afterSig] = readIdent(fullText, sigStart, true);
        if (!signal) continue;
        const kwStart = skipWS(fullText, afterSig);
        const [kw, afterKw] = readIdent(fullText, kwStart);
        if (kw !== "via" && kw !== "from") continue;
        const srcStart = skipWS(fullText, afterKw);
        const [source] = readIdent(fullText, srcStart, true);
        if (!source) continue;
        messages.push({
          name: `accept_${occurrence}`,
          from: source,
          to: symbol2.name,
          payload: signal,
          occurrence: occurrence++,
          range: this.rangeToDTO(symbol2.range)
        });
      }
      for (const child of children) {
        if (child.kind === "action" /* ActionUsage */) {
          const childText = this.getFullElementText(child, lines);
          for (const { afterPos } of findWordPositionsCI(childText, "send")) {
            const sigStart = skipWS(childText, afterPos);
            const [signal, afterSig] = readIdent(childText, sigStart, true);
            if (!signal) continue;
            const kwStart = skipWS(childText, afterSig);
            const [kw, afterKw] = readIdent(childText, kwStart);
            if (kw !== "via" && kw !== "to") continue;
            const tgtStart = skipWS(childText, afterKw);
            const [target] = readIdent(childText, tgtStart, true);
            if (!target) continue;
            messages.push({
              name: child.name,
              from: target ?? symbol2.name,
              to: signal ?? "",
              payload: signal ?? "",
              occurrence: occurrence++,
              range: this.rangeToDTO(child.range)
            });
          }
          for (const { afterPos } of findWordPositionsCI(childText, "accept")) {
            const sigStart = skipWS(childText, afterPos);
            const [signal, afterSig] = readIdent(childText, sigStart, true);
            if (!signal) continue;
            const kwStart = skipWS(childText, afterSig);
            const [kw, afterKw] = readIdent(childText, kwStart);
            if (kw !== "via" && kw !== "from") continue;
            const srcStart = skipWS(childText, afterKw);
            const [source] = readIdent(childText, srcStart, true);
            if (!source) continue;
            messages.push({
              name: child.name,
              from: source ?? "",
              to: symbol2.name,
              payload: signal ?? "",
              occurrence: occurrence++,
              range: this.rangeToDTO(child.range)
            });
          }
        }
      }
      if (participants.length > 0 || messages.length > 0) {
        diagrams.push({
          name: symbol2.name,
          participants,
          messages,
          range: this.rangeToDTO(symbol2.range)
        });
        if (messages.length > 0) {
          seen.add(symbol2.qualifiedName);
        }
      }
    }
    for (const symbol2 of symbols) {
      if (seen.has(symbol2.qualifiedName)) continue;
      if (symbol2.kind !== "action def" /* ActionDef */ && symbol2.kind !== "action" /* ActionUsage */) {
        continue;
      }
      const children = this.getChildSymbols(symbol2, symbolTable);
      const hasChildActions = children.some(
        (c) => c.kind === "action" /* ActionUsage */ || c.kind === "action def" /* ActionDef */
      );
      if (!hasChildActions) continue;
      const flows = this.extractSuccessions(symbol2, lines);
      if (flows.length === 0) continue;
      const participants = children.filter((c) => c.kind === "action" /* ActionUsage */ || c.kind === "action def" /* ActionDef */).map((c) => ({
        name: c.name,
        type: c.typeNames.join(", ") || "action",
        range: this.rangeToDTO(c.range)
      }));
      const messages = [];
      let occ = 1;
      for (const flow of flows) {
        if (flow.from === "start" || flow.to === "done") continue;
        const label = flow.guard ?? flow.to;
        messages.push({
          name: label,
          from: flow.from,
          to: flow.to,
          payload: flow.guard ?? "",
          occurrence: occ++,
          range: flow.range
        });
      }
      if (participants.length > 0 || messages.length > 0) {
        const existingIdx = diagrams.findIndex((d) => d.name === symbol2.name);
        if (existingIdx >= 0) {
          diagrams.splice(existingIdx, 1);
        }
        diagrams.push({
          name: symbol2.name,
          participants,
          messages,
          range: this.rangeToDTO(symbol2.range)
        });
      }
    }
    const containerKinds = /* @__PURE__ */ new Set([
      "part def" /* PartDef */,
      "part" /* PartUsage */,
      "item def" /* ItemDef */,
      "item" /* ItemUsage */,
      "interface def" /* InterfaceDef */,
      "interface" /* InterfaceUsage */,
      "connection def" /* ConnectionDef */,
      "connection" /* ConnectionUsage */,
      "occurrence def" /* OccurrenceDef */,
      "occurrence" /* OccurrenceUsage */
    ]);
    const rootName = (qualified) => {
      if (!qualified) return qualified;
      const dotIdx = qualified.indexOf(".");
      const head = dotIdx >= 0 ? qualified.substring(0, dotIdx) : qualified;
      const ccIdx = head.lastIndexOf("::");
      return ccIdx >= 0 ? head.substring(ccIdx + 2) : head;
    };
    for (const symbol2 of symbols) {
      if (seen.has(symbol2.qualifiedName)) continue;
      if (!containerKinds.has(symbol2.kind)) continue;
      const children = this.getChildSymbols(symbol2, symbolTable);
      const fullText = this.getFullElementText(symbol2, lines);
      const parsedMessages = [];
      let occ = 1;
      for (const keyword of ["flow", "message"]) {
        for (const { afterPos } of findWordPositionsCI(fullText, keyword)) {
          const nameStart = skipWS(fullText, afterPos);
          const [name, afterName] = readIdent(fullText, nameStart);
          if (!name || name === "def") continue;
          const fromStart = skipWS(fullText, afterName);
          const [fromKw, afterFromKw] = readIdent(fullText, fromStart);
          if (fromKw !== "from") continue;
          const srcStart = skipWS(fullText, afterFromKw);
          const [srcRaw, afterSrc] = readIdent(fullText, srcStart, true);
          if (!srcRaw) continue;
          const toStart = skipWS(fullText, afterSrc);
          const [toKw, afterToKw] = readIdent(fullText, toStart);
          if (toKw !== "to") continue;
          const tgtStart = skipWS(fullText, afterToKw);
          const [tgtRaw] = readIdent(fullText, tgtStart, true);
          if (!tgtRaw) continue;
          parsedMessages.push({
            name,
            from: rootName(srcRaw),
            to: rootName(tgtRaw),
            payload: name,
            occurrence: occ++,
            range: this.rangeToDTO(symbol2.range)
          });
        }
      }
      if (parsedMessages.length === 0) continue;
      const participants = [];
      for (const child of children) {
        if (child.kind === "part" /* PartUsage */ || child.kind === "item" /* ItemUsage */ || child.kind === "part def" /* PartDef */ || child.kind === "item def" /* ItemDef */ || child.kind === "ref" /* RefUsage */) {
          if (!participants.find((p) => p.name === child.name)) {
            participants.push({
              name: child.name,
              type: child.typeNames.join(", ") || child.kind,
              range: this.rangeToDTO(child.range)
            });
          }
        }
      }
      for (const msg of parsedMessages) {
        for (const endpoint of [msg.from, msg.to]) {
          if (endpoint && !participants.find((p) => p.name === endpoint)) {
            participants.push({
              name: endpoint,
              type: "participant",
              range: this.rangeToDTO(symbol2.range)
            });
          }
        }
      }
      const existingIdx = diagrams.findIndex((d) => d.name === symbol2.name);
      if (existingIdx >= 0) {
        diagrams.splice(existingIdx, 1);
      }
      diagrams.push({
        name: symbol2.name,
        participants,
        messages: parsedMessages,
        range: this.rangeToDTO(symbol2.range)
      });
      seen.add(symbol2.qualifiedName);
    }
    return diagrams;
  }
  // -----------------------------------------------------------------------
  // Activity Diagram Extraction
  // -----------------------------------------------------------------------
  /**
   * Extract activity diagram data from action definitions and usages.
   *
   * D2: Now also includes ActionUsage elements that have child actions
   * (not just ActionDef), to capture perform actions and inline activities.
   */
  extractActivityDiagrams(symbolTable, uri, lines) {
    const symbols = symbolTable.getSymbolsForUri(uri);
    const diagrams = [];
    for (const symbol2 of symbols) {
      if (symbol2.kind !== "action def" /* ActionDef */ && symbol2.kind !== "action" /* ActionUsage */) {
        continue;
      }
      const children = this.getChildSymbols(symbol2, symbolTable);
      const hasChildActions = children.some(
        (c) => c.kind === "action" /* ActionUsage */ || c.kind === "action def" /* ActionDef */
      );
      if (symbol2.kind === "action" /* ActionUsage */ && !hasChildActions) {
        continue;
      }
      const actions = [];
      const decisions = [];
      const flows = [];
      const states = [];
      for (const child of children) {
        const childText = this.getElementText(child, lines);
        if (child.kind === "action" /* ActionUsage */ || child.kind === "action def" /* ActionDef */) {
          let actionType = "action";
          const lowerText = childText.toLowerCase();
          if (lowerText.includes("fork")) actionType = "fork";
          else if (lowerText.includes("join")) actionType = "join";
          else if (lowerText.includes("merge")) actionType = "merge";
          else if (lowerText.includes("decide")) actionType = "decision";
          const subActions = this.getChildSymbols(child, symbolTable).filter((c) => c.kind === "action" /* ActionUsage */ || c.kind === "action def" /* ActionDef */).map((c) => this.symbolToActionDTO(c, symbolTable, lines));
          actions.push({
            name: child.name,
            type: actionType,
            isDefinition: child.kind === "action def" /* ActionDef */,
            range: this.rangeToDTO(child.range),
            parent: symbol2.name,
            children: subActions.map((a) => a.name),
            subActions: subActions.length > 0 ? subActions : void 0
          });
          if (actionType === "decision") {
            const branches = this.extractDecisionBranches(child, lines);
            decisions.push({
              name: child.name,
              condition: "",
              branches,
              range: this.rangeToDTO(child.range)
            });
          }
        }
        if (child.kind === "state" /* StateUsage */ || child.kind === "state def" /* StateDef */) {
          const stateType = childText.toLowerCase().includes("initial") ? "initial" : childText.toLowerCase().includes("final") ? "final" : "intermediate";
          states.push({
            name: child.name,
            type: stateType,
            range: this.rangeToDTO(child.range)
          });
        }
      }
      const successionFlows = this.extractSuccessions(symbol2, lines);
      flows.push(...successionFlows);
      const fullText = this.getFullElementText(symbol2, lines);
      const decideHits = findWordPositions(fullText, "decide");
      const hasDecideStmt = decideHits.some(({ afterPos }) => {
        const p = skipWS(fullText, afterPos);
        return p < fullText.length && fullText[p] === ";";
      });
      if (hasDecideStmt) {
        const branches = [];
        for (const { afterPos: ifAfter } of findWordPositions(fullText, "if")) {
          const thenIdx = fullText.indexOf("then", ifAfter);
          if (thenIdx < 0) continue;
          const bBefore = thenIdx > 0 ? fullText.charCodeAt(thenIdx - 1) : 32;
          const bAfter = thenIdx + 4 < fullText.length ? fullText.charCodeAt(thenIdx + 4) : 32;
          if (isIdentPart(bBefore) || isIdentPart(bAfter)) continue;
          const condition = fullText.substring(ifAfter, thenIdx).trim();
          const [target] = readWordAfterKeyword(fullText, thenIdx + 4);
          if (target) {
            branches.push({ condition, target });
          }
        }
        if (branches.length > 0) {
          decisions.push({
            name: "decide",
            condition: "",
            branches,
            range: this.rangeToDTO(symbol2.range)
          });
        }
      }
      if (flows.length > 0) {
        const hasStartFlow = flows.some((f) => f.from === "start");
        const hasDoneFlow = flows.some((f) => f.to === "done");
        if (hasStartFlow) {
          actions.unshift({
            name: "start",
            type: "initial",
            isDefinition: false,
            range: this.rangeToDTO(symbol2.range)
          });
        }
        if (hasDoneFlow) {
          actions.push({
            name: "done",
            type: "final",
            isDefinition: false,
            range: this.rangeToDTO(symbol2.range)
          });
        }
        if (flows.some((f) => f.from === "decide")) {
          actions.push({
            name: "decide",
            type: "decision",
            isDefinition: false,
            range: this.rangeToDTO(symbol2.range)
          });
        }
      }
      if (actions.length > 0 || flows.length > 0 || states.length > 0) {
        diagrams.push({
          name: symbol2.name,
          actions,
          decisions,
          flows,
          states,
          range: this.rangeToDTO(symbol2.range)
        });
      }
    }
    return diagrams;
  }
  // -----------------------------------------------------------------------
  // Resolved Types Extraction
  // -----------------------------------------------------------------------
  /**
   * Extract resolved type information from the symbol table.
   *
   * This provides specialization chains and feature lists for definitions.
   * Because the LSP server doesn't yet have a full type resolver or library
   * index, we provide what's available from the parse tree.
   */
  extractResolvedTypes(symbolTable, uri, lines) {
    const symbols = symbolTable.getSymbolsForUri(uri);
    const result = {};
    for (const symbol2 of symbols) {
      if (!isDefinition(symbol2.kind) && symbol2.typeNames.length === 0) {
        continue;
      }
      const specializes = [];
      const specList = this.extractSpecializations(symbol2, lines);
      for (const s of specList) {
        if (!specializes.includes(s)) {
          specializes.push(s);
        }
      }
      for (const tn of symbol2.typeNames) {
        if (!specializes.includes(tn)) {
          specializes.push(tn);
        }
      }
      const specializationChain = [...specializes];
      const children = this.getChildSymbols(symbol2, symbolTable);
      const features = children.filter((c) => isUsage(c.kind)).map((c) => ({
        name: c.name,
        kind: this.featureKindFromElementKind(c.kind),
        type: c.typeNames.join(", ") || void 0,
        isDerived: false,
        isReadonly: false
      }));
      result[symbol2.qualifiedName] = {
        qualifiedName: symbol2.qualifiedName,
        simpleName: symbol2.name,
        kind: symbol2.kind,
        isLibraryType: false,
        specializationChain,
        specializes,
        features
      };
    }
    return result;
  }
  // -----------------------------------------------------------------------
  // Semantic Diagnostics
  // -----------------------------------------------------------------------
  /**
   * Extract semantic diagnostics beyond syntax errors.
   * Includes type resolution warnings, enum keyword validation, etc.
   */
  extractSemanticDiagnostics(symbolTable, uri) {
    const symbols = symbolTable.getSymbolsForUri(uri);
    const diagnostics = [];
    const allSymbolNames = new Set(symbolTable.getAllSymbols().map((s) => s.name));
    for (const symbol2 of symbols) {
      for (const tn of symbol2.typeNames) {
        if (!allSymbolNames.has(tn)) {
          diagnostics.push({
            code: "unresolved-type",
            message: `Type '${tn}' could not be resolved in the current scope`,
            severity: "warning",
            range: this.rangeToDTO(symbol2.selectionRange),
            elementName: symbol2.name
          });
        }
      }
      if (symbol2.kind === "enum def" /* EnumDef */) {
        const children = this.getChildSymbols(symbol2, symbolTable);
        const hasEnumValues = children.some(
          (c) => c.kind === "enum" /* EnumUsage */ || c.kind === "attribute" /* AttributeUsage */
        );
        if (!hasEnumValues) {
          diagnostics.push({
            code: "empty-enum",
            message: `Enumeration '${symbol2.name}' has no enum values defined`,
            severity: "info",
            range: this.rangeToDTO(symbol2.range),
            elementName: symbol2.name
          });
        }
      }
    }
    return diagnostics;
  }
  // -----------------------------------------------------------------------
  // Helper Methods
  // -----------------------------------------------------------------------
  /** Convert LSP Range → RangeDTO. */
  rangeToDTO(range) {
    return {
      start: { line: range.start.line, character: range.start.character },
      end: { line: range.end.line, character: range.end.character }
    };
  }
  /** Get child symbols for a given parent symbol. */
  getChildSymbols(parent, symbolTable) {
    const allSymbols = symbolTable.getSymbolsForUri(parent.uri);
    return allSymbols.filter((s) => s.parentQualifiedName === parent.qualifiedName);
  }
  /**
   * Get the source text for an element's declaration line only
   * (not children's text).  This avoids over-matching on parent elements
   * whose range spans child elements.
   */
  getElementText(symbol2, lines) {
    const startLine = symbol2.range.start.line;
    const endLine = Math.min(startLine + 2, symbol2.range.end.line, lines.length - 1);
    return lines.slice(startLine, endLine + 1).join("\n");
  }
  /**
   * Get the full source text for an element's entire range.
   * Used when we need to scan the whole body (e.g., succession flows).
   */
  getFullElementText(symbol2, lines) {
    const startLine = symbol2.range.start.line;
    const endLine = Math.min(symbol2.range.end.line, lines.length - 1);
    return lines.slice(startLine, endLine + 1).join("\n");
  }
  /** Extract port direction (in | out | inout) from source text. */
  extractDirection(symbol2, lines) {
    if (symbol2.kind !== "port" /* PortUsage */ && symbol2.kind !== "port def" /* PortDef */) {
      return void 0;
    }
    const elementText = this.getElementText(symbol2, lines);
    if (containsWord(elementText, "inout")) return "inout";
    if (containsWord(elementText, "in")) return "in";
    if (containsWord(elementText, "out")) return "out";
    return void 0;
  }
  /** Extract multiplicity (e.g., [4], [0..*]) from source text. */
  extractMultiplicity(symbol2, lines) {
    const elementText = this.getElementText(symbol2, lines);
    const open = elementText.indexOf("[");
    if (open < 0) return void 0;
    const close = elementText.indexOf("]", open + 1);
    if (close < 0) return void 0;
    return elementText.substring(open + 1, close);
  }
  /** Extract modifiers (abstract, readonly, derived, etc.) from source text. */
  extractModifier(symbol2, lines) {
    const elementText = this.getElementText(symbol2, lines);
    const modifiers = [];
    if (containsWord(elementText, "abstract")) modifiers.push("abstract");
    if (containsWord(elementText, "readonly")) modifiers.push("readonly");
    if (containsWord(elementText, "derived")) modifiers.push("derived");
    if (containsWord(elementText, "variation")) modifiers.push("variation");
    if (containsWord(elementText, "individual")) modifiers.push("individual");
    return modifiers.length > 0 ? modifiers.join(", ") : void 0;
  }
  /** Extract visibility (public | private | protected) from source text. */
  extractVisibility(symbol2, lines) {
    const elementText = this.getElementText(symbol2, lines);
    if (containsWord(elementText, "private")) return "private";
    if (containsWord(elementText, "protected")) return "protected";
    if (containsWord(elementText, "public")) return "public";
    return void 0;
  }
  /** Extract default/assigned value from source text. */
  extractValue(symbol2, lines) {
    if (symbol2.kind !== "attribute" /* AttributeUsage */) {
      return void 0;
    }
    const elementText = this.getElementText(symbol2, lines);
    const eqIdx = elementText.indexOf("=");
    if (eqIdx < 0) return void 0;
    let start = eqIdx + 1;
    if (start < elementText.length && elementText[start] === "=") return void 0;
    start = skipWS(elementText, start);
    let end = start;
    while (end < elementText.length) {
      const ch = elementText[end];
      if (ch === ";" || ch === "{" || ch === "}" || ch === "\n") break;
      end++;
    }
    const val = elementText.substring(start, end).trim();
    if (val && !val.includes("def") && val.length < 100) {
      return val;
    }
    return void 0;
  }
  /** Extract all specialization targets from `:>` or `specializes` syntax. */
  extractSpecializations(symbol2, lines) {
    const elementText = this.getElementText(symbol2, lines);
    const colonGtIdx = elementText.indexOf(":>");
    if (colonGtIdx >= 0) {
      if (colonGtIdx + 2 < elementText.length && elementText[colonGtIdx + 2] === ">") {
      } else {
        return readCommaSeparatedIdents(elementText, colonGtIdx + 2);
      }
    }
    const specPositions = findWordPositions(elementText, "specializes");
    if (specPositions.length > 0) {
      return readCommaSeparatedIdents(elementText, specPositions[0].afterPos);
    }
    return [];
  }
  /** Extract connection endpoints from `connect` syntax. */
  extractConnectionEndpoints(symbol2, lines) {
    const elementText = this.getElementText(symbol2, lines);
    const endpoints = [];
    const connectPositions = findWordPositions(elementText, "connect");
    for (const { afterPos } of connectPositions) {
      const [name1, end1] = readWordAfterKeyword(elementText, afterPos, true);
      if (!name1) continue;
      const toPos = skipWS(elementText, end1);
      if (elementText.substring(toPos, toPos + 2) === "to") {
        const afterTo = toPos + 2;
        const [name2] = readWordAfterKeyword(elementText, afterTo, true);
        if (name2) {
          endpoints.push(name1, name2);
          return endpoints;
        }
      }
    }
    const endPositions = findWordPositions(elementText, "end");
    for (const { afterPos } of endPositions) {
      const [name] = readWordAfterKeyword(elementText, afterPos, true);
      if (name) endpoints.push(name);
    }
    return endpoints;
  }
  /**
   * Scan full source text for standalone `satisfy X by Y` and `verify X by Y`
   * statements that aren't nested inside another symbol's declaration.
   */
  extractStandaloneSatisfyVerify(text) {
    const rels = [];
    const keywords = ["satisfy", "verify"];
    for (const kw of keywords) {
      const positions = findWordPositions(text, kw);
      for (const { afterPos } of positions) {
        let pos = skipWS(text, afterPos);
        const [nextWord, afterWord] = readNameOrQuoted(text, pos);
        if (nextWord === "requirement") {
          pos = skipWS(text, afterWord);
        } else {
          pos = skipWS(text, afterPos);
        }
        const [reqName, afterReq] = readNameOrQuoted(text, pos);
        if (!reqName || reqName === "requirement") continue;
        const byPos = skipWS(text, afterReq);
        const [byWord, afterBy] = readIdent(text, byPos);
        let source;
        if (byWord === "by") {
          const [byTarget] = readNameOrQuoted(text, skipWS(text, afterBy));
          if (!byTarget) continue;
          source = byTarget;
        }
        rels.push({ type: kw, source, target: reqName });
      }
    }
    return rels;
  }
  /** Extract relationship keywords from element text. */
  extractKeywordRelationships(elementName, elementText) {
    elementText = stripComments(elementText);
    const rels = [];
    const subsetsPositions = findWordPositions(elementText, "subsets");
    if (subsetsPositions.length > 0) {
      const [target] = readWordAfterKeyword(elementText, subsetsPositions[0].afterPos);
      if (target) rels.push({ type: "subsetting", source: elementName, target });
    }
    const redefPositions = findWordPositions(elementText, "redefines");
    if (redefPositions.length > 0) {
      const [target] = readWordAfterKeyword(elementText, redefPositions[0].afterPos);
      if (target) rels.push({ type: "redefinition", source: elementName, target });
    }
    const satisfyPositions = findWordPositions(elementText, "satisfy");
    if (satisfyPositions.length > 0) {
      let pos = skipWS(elementText, satisfyPositions[0].afterPos);
      const [nextWord, afterWord] = readNameOrQuoted(elementText, pos);
      if (nextWord === "requirement") {
        pos = skipWS(elementText, afterWord);
      }
      const [reqName, afterReq] = readNameOrQuoted(elementText, pos);
      if (reqName && reqName !== "requirement") {
        let satisfier = elementName;
        const byPos = skipWS(elementText, afterReq);
        const [byWord, afterBy] = readIdent(elementText, byPos);
        if (byWord === "by") {
          const [byTarget] = readNameOrQuoted(elementText, skipWS(elementText, afterBy));
          if (byTarget) satisfier = byTarget;
        }
        rels.push({ type: "satisfy", source: satisfier, target: reqName });
      }
    }
    const verifyPositions = findWordPositions(elementText, "verify");
    if (verifyPositions.length > 0) {
      let pos = skipWS(elementText, verifyPositions[0].afterPos);
      const [nextWord, afterWord] = readNameOrQuoted(elementText, pos);
      if (nextWord === "requirement") {
        pos = skipWS(elementText, afterWord);
      }
      const [reqName, afterReq] = readNameOrQuoted(elementText, pos);
      if (reqName && reqName !== "requirement") {
        let verifier = elementName;
        const byPos = skipWS(elementText, afterReq);
        const [byWord, afterBy] = readIdent(elementText, byPos);
        if (byWord === "by") {
          const [byTarget] = readNameOrQuoted(elementText, skipWS(elementText, afterBy));
          if (byTarget) verifier = byTarget;
        }
        rels.push({ type: "verify", source: verifier, target: reqName });
      }
    }
    return rels;
  }
  /** Extract decision branches from decision node text. */
  extractDecisionBranches(symbol2, lines) {
    const elementText = this.getElementText(symbol2, lines);
    const branches = [];
    const ifPositions = findWordPositions(elementText, "if");
    for (const { afterPos } of ifPositions) {
      const thenIdx = elementText.indexOf("then", afterPos);
      if (thenIdx < 0) continue;
      const beforeThen = thenIdx > 0 ? elementText.charCodeAt(thenIdx - 1) : 32;
      const afterThen = thenIdx + 4 < elementText.length ? elementText.charCodeAt(thenIdx + 4) : 32;
      if (isIdentPart(beforeThen) || isIdentPart(afterThen)) continue;
      const condition = elementText.substring(afterPos, thenIdx).trim();
      const [target] = readWordAfterKeyword(elementText, thenIdx + 4);
      if (target) {
        branches.push({ condition, target });
      }
    }
    const elsePositions = findWordPositions(elementText, "else");
    if (elsePositions.length > 0) {
      const [target] = readWordAfterKeyword(elementText, elsePositions[0].afterPos);
      if (target) {
        branches.push({ condition: "else", target });
      }
    }
    return branches;
  }
  /**
   * Extract succession (control flow) relationships from action body text.
   *
   * Handles multi-line succession chains, inline patterns, and
   * decision/merge control flow patterns:
   *   - Multi-line: `first X;` / `then Y;` / `then Z;`
   *   - Inline:     `first X then Y;`
   *   - Explicit:   `succession first X then Y;`
   *   - Decision:   `decide; if <cond> then X; merge Y;`
   *   - Quoted:     `then 'My Action';`
   */
  extractSuccessions(parent, lines) {
    const elementText = this.getFullElementText(parent, lines);
    const flows = [];
    const seen = /* @__PURE__ */ new Set();
    const range = this.rangeToDTO(parent.range);
    const addFlow = (from, to, guard) => {
      if (from === to) return;
      const key = `${from}->${to}`;
      if (seen.has(key)) return;
      seen.add(key);
      const f = { from, to, range };
      if (guard) f.guard = guard;
      flows.push(f);
    };
    function braceDepthAt(text, pos) {
      let depth = 0;
      for (let i = 0; i < pos && i < text.length; i++) {
        if (text[i] === "{") depth++;
        else if (text[i] === "}") depth--;
      }
      return depth;
    }
    const firstBrace = elementText.indexOf("{");
    const topDepth = firstBrace >= 0 ? braceDepthAt(elementText, firstBrace + 1) : 1;
    const stripQualifier = (name) => {
      const idx = name.lastIndexOf("::");
      return idx >= 0 ? name.substring(idx + 2) : name;
    };
    const tokens = [];
    for (const { pos, afterPos } of findWordPositions(elementText, "first")) {
      if (braceDepthAt(elementText, pos) !== topDepth) continue;
      const nameStart = skipWS(elementText, afterPos);
      const [name] = readNameOrQuoted(elementText, nameStart);
      if (name) {
        tokens.push({ type: "first", name: stripQualifier(name), index: pos });
      }
    }
    for (const { pos, afterPos } of findWordPositions(elementText, "then")) {
      if (braceDepthAt(elementText, pos) !== topDepth) continue;
      const lookbackStart = Math.max(0, pos - 100);
      const preceding = elementText.substring(lookbackStart, pos);
      if (containsWord(preceding, "if") && !preceding.includes(";")) continue;
      let nameStart = skipWS(elementText, afterPos);
      const [maybeAction, afterAction] = readIdent(elementText, nameStart);
      if (maybeAction === "action") {
        nameStart = skipWS(elementText, afterAction);
      }
      const [name] = readNameOrQuoted(elementText, nameStart);
      if (!name || name === "if") continue;
      tokens.push({ type: "then", name: stripQualifier(name), index: pos });
    }
    tokens.sort((a, b) => a.index - b.index);
    const coveredIndices = /* @__PURE__ */ new Set();
    for (let i = 0; i < tokens.length; i++) {
      if (tokens[i].type === "first") {
        const chain = [tokens[i].name];
        coveredIndices.add(i);
        for (let j = i + 1; j < tokens.length; j++) {
          if (tokens[j].type === "then") {
            chain.push(tokens[j].name);
            coveredIndices.add(j);
          } else {
            break;
          }
        }
        for (let k = 0; k < chain.length - 1; k++) {
          addFlow(chain[k], chain[k + 1]);
        }
      }
    }
    const uncoveredThens = tokens.filter(
      (t, i) => !coveredIndices.has(i) && t.type === "then"
    );
    if (uncoveredThens.length > 0) {
      for (let i = 0; i < uncoveredThens.length - 1; i++) {
        addFlow(uncoveredThens[i].name, uncoveredThens[i + 1].name);
      }
    }
    if (flows.length > 0) {
      const allTargets = new Set(flows.map((f) => f.to));
      const allSources = new Set(flows.map((f) => f.from));
      const entryActions = flows.map((f) => f.from).filter((name) => name !== "start" && name !== "done" && !allTargets.has(name));
      const exitActions = flows.map((f) => f.to).filter((name) => name !== "start" && name !== "done" && !allSources.has(name));
      if (entryActions.length > 0) {
        addFlow("start", entryActions[0]);
      }
      if (exitActions.length > 0) {
        addFlow(exitActions[exitActions.length - 1], "done");
      }
    }
    for (const { afterPos } of findWordPositions(elementText, "succession")) {
      let p = skipWS(elementText, afterPos);
      const [word1, afterWord1] = readIdent(elementText, p);
      if (word1 === "flow") {
        p = skipWS(elementText, afterWord1);
        const [fromKw, afterFrom] = readIdent(elementText, p);
        if (fromKw === "from") {
          p = skipWS(elementText, afterFrom);
          const [srcFull, afterSrc] = readIdent(elementText, p, true);
          const src = srcFull.includes(".") ? srcFull.substring(0, srcFull.indexOf(".")) : srcFull;
          p = skipWS(elementText, afterSrc);
          const [toKw, afterTo] = readIdent(elementText, p);
          if (toKw === "to") {
            p = skipWS(elementText, afterTo);
            const [dstFull] = readIdent(elementText, p, true);
            const dst = dstFull.includes(".") ? dstFull.substring(0, dstFull.indexOf(".")) : dstFull;
            if (src && dst) addFlow(src, dst);
          }
        }
        continue;
      }
      let nameStart = p;
      if (word1 === "first") {
        nameStart = skipWS(elementText, afterWord1);
      }
      const [name1] = readNameOrQuoted(elementText, nameStart);
      if (!name1) continue;
      const afterName1 = nameStart + name1.length + (elementText[nameStart] === "'" ? 2 : 0);
      const thenCheck = skipWS(elementText, afterName1);
      const [thenKw, afterThen] = readIdent(elementText, thenCheck);
      if (thenKw === "then") {
        const name2Start = skipWS(elementText, afterThen);
        const [name2] = readNameOrQuoted(elementText, name2Start);
        if (name2) addFlow(stripQualifier(name1), stripQualifier(name2));
      }
    }
    const decidePositions = findWordPositions(elementText, "decide");
    const hasDecide = decidePositions.some(({ afterPos }) => {
      const p = skipWS(elementText, afterPos);
      return p < elementText.length && elementText[p] === ";";
    });
    if (hasDecide) {
      for (let fi = flows.length - 1; fi >= 0; fi--) {
        if (flows[fi].from === "decide") {
          seen.delete(`decide->${flows[fi].to}`);
          flows.splice(fi, 1);
        }
      }
      const branchTargets = [];
      for (const { afterPos: ifAfter } of findWordPositions(elementText, "if")) {
        const thenIdx = elementText.indexOf("then", ifAfter);
        if (thenIdx < 0) continue;
        const bBefore = thenIdx > 0 ? elementText.charCodeAt(thenIdx - 1) : 32;
        const bAfter = thenIdx + 4 < elementText.length ? elementText.charCodeAt(thenIdx + 4) : 32;
        if (isIdentPart(bBefore) || isIdentPart(bAfter)) continue;
        const condition = elementText.substring(ifAfter, thenIdx).trim();
        const targetStart = skipWS(elementText, thenIdx + 4);
        const [target] = readNameOrQuoted(elementText, targetStart);
        if (target) {
          const afterTarget = targetStart + target.length + (elementText[targetStart] === "'" ? 2 : 0);
          const semi = skipWS(elementText, afterTarget);
          if (semi < elementText.length && elementText[semi] === ";") {
            addFlow("decide", target, condition);
            branchTargets.push(target);
          }
        }
      }
      for (const { pos: mergePos, afterPos: mergeAfter } of findWordPositions(elementText, "merge")) {
        const mStart = skipWS(elementText, mergeAfter);
        const [mergeTarget] = readNameOrQuoted(elementText, mStart);
        if (!mergeTarget) continue;
        const afterMT = mStart + mergeTarget.length + (elementText[mStart] === "'" ? 2 : 0);
        const semiP = skipWS(elementText, afterMT);
        if (semiP >= elementText.length || elementText[semiP] !== ";") continue;
        for (const branch of branchTargets) {
          addFlow(branch, mergeTarget);
        }
        const afterMerge = tokens.filter(
          (t) => t.type === "then" && t.index > mergePos
        );
        if (afterMerge.length > 0) {
          addFlow(mergeTarget, afterMerge[0].name);
        } else if (mergeTarget !== "done") {
          addFlow(mergeTarget, "done");
        }
      }
    }
    return flows;
  }
  /** Convert element kind to feature kind string. */
  featureKindFromElementKind(kind) {
    switch (kind) {
      case "attribute" /* AttributeUsage */:
      case "attribute def" /* AttributeDef */:
        return "attribute";
      case "port" /* PortUsage */:
      case "port def" /* PortDef */:
        return "port";
      case "action" /* ActionUsage */:
      case "action def" /* ActionDef */:
        return "action";
      case "state" /* StateUsage */:
      case "state def" /* StateDef */:
        return "state";
      default:
        return "reference";
    }
  }
  /** Convert an action symbol to an ActivityActionDTO. */
  symbolToActionDTO(symbol2, symbolTable, lines) {
    const childText = this.getElementText(symbol2, lines);
    let actionType = "action";
    const lowerText = childText.toLowerCase();
    if (lowerText.includes("fork")) actionType = "fork";
    else if (lowerText.includes("join")) actionType = "join";
    else if (lowerText.includes("merge")) actionType = "merge";
    else if (lowerText.includes("decide")) actionType = "decision";
    return {
      name: symbol2.name,
      type: actionType,
      isDefinition: symbol2.kind === "action def" /* ActionDef */,
      range: this.rangeToDTO(symbol2.range)
    };
  }
};

// server/src/providers/semanticValidator.ts
var STANDARD_LIBRARY_TYPES = /* @__PURE__ */ new Set([
  // Kernel Data Types
  "Boolean",
  "String",
  "Integer",
  "Real",
  "Natural",
  "Positive",
  "Complex",
  "Number",
  "Rational",
  "ScalarValues",
  "DataFunctions",
  // Kernel Semantic Library
  "Anything",
  "Nothing",
  "Object",
  "Occurrence",
  "Base",
  "Objects",
  "Occurrences",
  "Items",
  "Parts",
  "Ports",
  "Actions",
  "States",
  "Connections",
  "Interfaces",
  "Allocations",
  "Requirements",
  "Constraints",
  "Calculations",
  "Cases",
  "Flows",
  "Transfers",
  "Performances",
  "TransitionPerformances",
  // Common library packages
  "ISQ",
  "SI",
  "USCustomaryUnits",
  "Quantities",
  "MeasurementReferences",
  "ScalarValues",
  // StandardViewDefinitions (SysML v2 standard library)
  "GeneralView",
  "InterconnectionView",
  "ActionFlowView",
  "StateTransitionView",
  "SequenceView",
  "GeometryView",
  "GridView",
  "BrowserView",
  "StandardViewDefinitions",
  // Views library (rendering types)
  "View",
  "ViewpointCheck",
  "Rendering",
  "TextualRendering",
  "GraphicalRendering",
  "TabularRendering",
  "Views",
  // ISQ Base quantities (ISO 80000)
  "LengthValue",
  "MassValue",
  "DurationValue",
  "TimeValue",
  "ElectricCurrentValue",
  "ThermodynamicTemperatureValue",
  "TemperatureValue",
  "AmountOfSubstanceValue",
  "LuminousIntensityValue",
  // ISQ Derived quantities (commonly used)
  "AreaValue",
  "VolumeValue",
  "SpeedValue",
  "VelocityValue",
  "AccelerationValue",
  "ForceValue",
  "EnergyValue",
  "PowerValue",
  "PressureValue",
  "TorqueValue",
  "MomentOfForceValue",
  "AngularVelocityValue",
  "FrequencyValue",
  "DensityValue",
  "MassFlowRateValue",
  "VolumeFlowRateValue",
  // ISQ units
  "LengthUnit",
  "MassUnit",
  "DurationUnit",
  "TimeUnit"
]);
var CONSTRAINT_KEYWORDS = /* @__PURE__ */ new Set([
  "and",
  "or",
  "not",
  "xor",
  "implies",
  "if",
  "then",
  "else",
  "true",
  "false",
  "null",
  "require",
  "constraint",
  "subject",
  "return",
  "doc",
  "comment",
  "assert",
  "assume"
]);
function isISQValueType(name) {
  if (!name.endsWith("Value") || name.length < 6) return false;
  const ch0 = name.charCodeAt(0);
  if (ch0 < 65 || ch0 > 90) return false;
  for (let i = 1; i < name.length; i++) {
    const c = name.charCodeAt(i);
    if (!(c >= 65 && c <= 90 || c >= 97 && c <= 122)) return false;
  }
  return true;
}
var SemanticValidator = class _SemanticValidator {
  constructor(documentManager) {
    this.documentManager = documentManager;
    this.modelProvider = new SysMLModelProvider(documentManager);
  }
  documentManager;
  modelProvider;
  /** Cached workspace-wide satisfy data, invalidated when any document version changes. */
  satisfyCache;
  /** Cached workspace-wide verify data, invalidated when any document version changes. */
  verifyCache;
  /** Cached symbol indexes, invalidated when workspace symbol table changes. */
  indexCache;
  /** Cached allSymbolNames set, keyed on allSymbols array identity. */
  symbolNamesCache;
  /** Cached library package names — never changes after init. */
  libraryNamesCache;
  addRequirementNameVariants(out, ref) {
    if (!ref) return;
    const trimmed = ref.trim();
    if (!trimmed) return;
    out.add(trimmed);
    const lastSeg = trimmed.includes("::") ? trimmed.split("::").pop() : trimmed;
    out.add(lastSeg);
  }
  collectWorkspaceRequirementRelationshipNames() {
    const satisfiedNames = /* @__PURE__ */ new Set();
    const verifiedNames = /* @__PURE__ */ new Set();
    const uris = this.documentManager.getUris();
    for (const uri of uris) {
      const version2 = this.documentManager.getVersion(uri);
      if (version2 < 0) continue;
      const model = this.modelProvider.getModel(uri, version2, ["relationships"]);
      const rels = model.relationships ?? [];
      for (const rel of rels) {
        if (rel.type === "satisfy") {
          this.addRequirementNameVariants(satisfiedNames, rel.target);
        } else if (rel.type === "verify") {
          this.addRequirementNameVariants(verifiedNames, rel.target);
        }
      }
    }
    return { satisfiedNames, verifiedNames };
  }
  /**
   * Run all semantic validation rules and return LSP Diagnostic objects.
   */
  validate(uri) {
    const symbolTable = this.documentManager.getWorkspaceSymbolTable();
    const symbols = symbolTable.getSymbolsForUri(uri);
    if (symbols.length === 0) return [];
    const allSymbols = symbolTable.getAllSymbols();
    let allSymbolNames;
    if (this.symbolNamesCache && this.symbolNamesCache.symbols === allSymbols) {
      allSymbolNames = this.symbolNamesCache.names;
    } else {
      allSymbolNames = new Set(allSymbols.map((s) => s.name));
      this.symbolNamesCache = { symbols: allSymbols, names: allSymbolNames };
    }
    if (!this.libraryNamesCache) {
      this.libraryNamesCache = new Set(getLibraryPackageNames());
    }
    const libraryNames = this.libraryNamesCache;
    const text = this.documentManager.getText(uri) ?? "";
    const indexes = this.getOrBuildIndexes(allSymbols);
    const diagnostics = [];
    for (const symbol2 of symbols) {
      diagnostics.push(
        ...this.checkUnresolvedType(symbol2, allSymbolNames, libraryNames),
        ...this.checkInvalidMultiplicity(symbol2),
        ...this.checkEmptyEnum(symbol2, symbols),
        ...this.checkNamingConvention(symbol2),
        ...this.checkMissingDocumentation(symbol2)
      );
    }
    diagnostics.push(...this.checkDuplicateDefinitions(symbols));
    diagnostics.push(...this.checkUnusedDefinitions(allSymbols, uri));
    diagnostics.push(...this.checkRedefinitionMultiplicity(symbols, indexes, text));
    diagnostics.push(...this.checkPortCompatibility(text, uri, indexes));
    diagnostics.push(...this.checkConstraintBodyReferences(text, uri, symbols, indexes));
    diagnostics.push(...this.checkCircularSpecialization(symbols, indexes));
    diagnostics.push(...this.checkCircularContainment(symbols, indexes));
    diagnostics.push(...this.checkUnsatisfiedRequirements(symbols, indexes));
    diagnostics.push(...this.checkUnverifiedRequirements(symbols, indexes));
    diagnostics.push(...this.checkViewpointSatisfaction(symbols, indexes));
    return this.dedupeDiagnostics(diagnostics);
  }
  /**
   * Rule: Unresolved type reference.
   *
   * When a feature (part, attribute, port, etc.) references a type name
   * that doesn't exist in the document's symbol table or the standard
   * library, flag it as a warning. If the feature has a mandatory
   * multiplicity (lower >= 1), escalate to error with extra context.
   */
  checkUnresolvedType(symbol2, allSymbolNames, libraryNames) {
    if (!symbol2.typeName) return [];
    let typeName = symbol2.typeName;
    const kwMatch = typeName.match(/^([A-Z][A-Za-z_0-9]*?)(redefines|subsets|references|connect|bind|default|via|accept|send|flow|allocate|assign|decide|merge|join|fork)([A-Z])/);
    if (kwMatch) {
      typeName = kwMatch[1];
    }
    const rootSegment = typeName.split("::")[0];
    if (allSymbolNames.has(typeName) || allSymbolNames.has(rootSegment) || STANDARD_LIBRARY_TYPES.has(typeName) || STANDARD_LIBRARY_TYPES.has(rootSegment) || libraryNames.has(rootSegment) || // Pattern match for ISQ quantity value types (e.g., LengthValue, TorqueValue)
    isISQValueType(typeName) || // Check the scanned library type index (covers all ISQ/SI types including
    // those with digits like CartesianSpatial3dCoordinateFrame)
    resolveLibraryType(typeName) !== void 0 || resolveLibraryType(rootSegment) !== void 0 || // Names starting with lowercase are feature references (subsettings
    // via :>), not type references — don't flag them as unresolved types.
    // e.g. "attribute x :> distancePerVolume" references a feature, not a type.
    typeName.charCodeAt(0) >= 97 && typeName.charCodeAt(0) <= 122) {
      return [];
    }
    const isMandatory = symbol2.multiplicityRange && symbol2.multiplicityRange.lower >= 1;
    const severity = isMandatory ? import_node.DiagnosticSeverity.Error : import_node.DiagnosticSeverity.Warning;
    let message = `Type '${typeName}' is not defined in the current document or standard library`;
    if (isMandatory) {
      const multStr = symbol2.multiplicity ?? "1";
      message += ` (feature '${symbol2.name}' requires multiplicity [${multStr}])`;
    }
    return [{
      severity,
      range: symbol2.selectionRange,
      message,
      source: "sysml",
      code: "unresolved-type",
      data: { typeName }
    }];
  }
  /**
   * Rule: Invalid multiplicity bounds.
   *
   * Checks that lower bound ≤ upper bound when both are numeric.
   * Examples of invalid: [5..2], [10..1]
   */
  checkInvalidMultiplicity(symbol2) {
    if (!symbol2.multiplicityRange || !symbol2.multiplicity) return [];
    const { lower, upper } = symbol2.multiplicityRange;
    if (typeof upper === "number" && lower > upper) {
      return [{
        severity: import_node.DiagnosticSeverity.Error,
        range: symbol2.selectionRange,
        message: `Invalid multiplicity [${symbol2.multiplicity}]: lower bound (${lower}) exceeds upper bound (${upper})`,
        source: "sysml",
        code: "invalid-multiplicity"
      }];
    }
    if (lower < 0) {
      return [{
        severity: import_node.DiagnosticSeverity.Error,
        range: symbol2.selectionRange,
        message: `Invalid multiplicity [${symbol2.multiplicity}]: lower bound cannot be negative`,
        source: "sysml",
        code: "invalid-multiplicity"
      }];
    }
    return [];
  }
  /**
   * Rule: Empty enumeration definition.
   *
   * An enum def with no enum values is likely incomplete.
   */
  checkEmptyEnum(symbol2, allSymbols) {
    if (symbol2.kind !== "enum def" /* EnumDef */) return [];
    const children = allSymbols.filter(
      (s) => s.parentQualifiedName === symbol2.qualifiedName
    );
    const hasEnumValues = children.some(
      (c) => c.kind === "enum" /* EnumUsage */ || c.kind === "attribute" /* AttributeUsage */
    );
    if (!hasEnumValues) {
      return [{
        severity: import_node.DiagnosticSeverity.Information,
        range: symbol2.selectionRange,
        message: `Enumeration '${symbol2.name}' has no enum values defined`,
        source: "sysml",
        code: "empty-enum"
      }];
    }
    return [];
  }
  /**
   * Rule: Naming convention.
   * Definitions should use PascalCase, usages should use camelCase.
   */
  checkNamingConvention(symbol2) {
    if (!symbol2.name) return [];
    if (symbol2.kind === "package" /* Package */ || symbol2.kind === "import" /* Import */ || symbol2.kind === "comment" /* Comment */ || symbol2.kind === "doc" /* Doc */ || symbol2.kind === "alias" /* Alias */ || symbol2.kind === "unknown" /* Unknown */) return [];
    if (isDefinition(symbol2.kind)) {
      const ch = symbol2.name[0];
      if (ch === ch.toLowerCase() && ch !== ch.toUpperCase()) {
        return [{
          severity: import_node.DiagnosticSeverity.Hint,
          range: symbol2.selectionRange,
          message: `Definition '${symbol2.name}' should use PascalCase`,
          source: "sysml",
          code: "naming-convention",
          data: { name: symbol2.name, convention: "PascalCase" }
        }];
      }
    } else {
      const ch = symbol2.name[0];
      if (ch === ch.toUpperCase() && ch !== ch.toLowerCase()) {
        return [{
          severity: import_node.DiagnosticSeverity.Hint,
          range: symbol2.selectionRange,
          message: `Usage '${symbol2.name}' should use camelCase`,
          source: "sysml",
          code: "naming-convention",
          data: { name: symbol2.name, convention: "camelCase" }
        }];
      }
    }
    return [];
  }
  /**
   * Rule: Missing documentation.
   * Definitions without a doc comment get a hint.
   */
  checkMissingDocumentation(symbol2) {
    if (!isDefinition(symbol2.kind)) return [];
    if (symbol2.documentation) return [];
    return [{
      severity: import_node.DiagnosticSeverity.Information,
      range: symbol2.selectionRange,
      message: `Definition '${symbol2.name}' has no documentation`,
      source: "sysml",
      code: "missing-doc",
      data: { name: symbol2.name }
    }];
  }
  /**
   * Rule: Unused definitions.
   * Definitions not referenced by any symbol typeNames and that do not
   * themselves specialize/redefine another type.
   */
  checkUnusedDefinitions(symbols, targetUri) {
    const defs = symbols.filter(
      (s) => s.kind === "part def" /* PartDef */ || s.kind === "action def" /* ActionDef */
    );
    const defsInScope = targetUri ? defs.filter((def) => def.uri === targetUri) : defs;
    const referencedTypes = new Set(
      symbols.filter((s) => s.kind !== "package" /* Package */).flatMap((s) => s.typeNames)
    );
    for (const s of symbols) {
      if (s.exposeTargets) {
        for (const target of s.exposeTargets) {
          const simpleName = target.replace(/::\*{1,2}$/, "").split("::").pop();
          if (simpleName) referencedTypes.add(simpleName);
        }
      }
    }
    const diagnostics = [];
    for (const def of defsInScope) {
      const isReferenced = referencedTypes.has(def.name);
      const hasBaseType = (def.typeNames?.length ?? 0) > 0;
      if (!isReferenced && !hasBaseType) {
        diagnostics.push({
          severity: import_node.DiagnosticSeverity.Warning,
          range: def.selectionRange,
          message: `Definition '${def.name}' is not referenced by any usage in the workspace`,
          source: "sysml",
          code: "unused-definition",
          data: { name: def.name }
        });
      }
    }
    return diagnostics;
  }
  /**
   * Rule: Duplicate definition names in the same scope.
   *
   * Two definitions (part def, port def, etc.) with the same name
   * in the same parent scope indicate a conflict.
   */
  /**
   * Static helper: run semantic validation rules without a DocumentManager.
   * Used by the MCP layer which works directly with SysMLSymbol arrays.
   */
  static validateSymbols(symbolsInUri, allNames, opts) {
    const diagnostics = [];
    const instance = Object.create(_SemanticValidator.prototype);
    const allSymbols = opts?.allSymbols ?? symbolsInUri;
    const includeStyleRules = opts?.includeStyleRules ?? true;
    const indexes = instance.buildSymbolIndexes(allSymbols);
    for (const symbol2 of symbolsInUri) {
      diagnostics.push(
        ...instance.checkUnresolvedType(symbol2, allNames, /* @__PURE__ */ new Set()),
        ...instance.checkInvalidMultiplicity(symbol2),
        ...instance.checkEmptyEnum(symbol2, symbolsInUri)
      );
      if (includeStyleRules) {
        diagnostics.push(
          ...instance.checkNamingConvention(symbol2),
          ...instance.checkMissingDocumentation(symbol2)
        );
      }
    }
    diagnostics.push(...instance.checkDuplicateDefinitions(symbolsInUri));
    diagnostics.push(...instance.checkUnusedDefinitions(allSymbols));
    diagnostics.push(...instance.checkRedefinitionMultiplicity(symbolsInUri, indexes, opts?.text));
    diagnostics.push(...instance.checkCircularSpecialization(symbolsInUri, indexes));
    diagnostics.push(...instance.checkCircularContainment(symbolsInUri, indexes));
    diagnostics.push(...instance.checkUnsatisfiedRequirements(
      allSymbols,
      indexes,
      opts?.text ? [opts.text] : []
    ));
    diagnostics.push(...instance.checkUnverifiedRequirements(
      allSymbols,
      indexes,
      opts?.text ? [opts.text] : []
    ));
    if (opts?.text && opts.uri) {
      diagnostics.push(...instance.checkPortCompatibility(opts.text, opts.uri, indexes));
      diagnostics.push(...instance.checkConstraintBodyReferences(opts.text, opts.uri, symbolsInUri, indexes));
    }
    return instance.dedupeDiagnostics(diagnostics);
  }
  /**
   * Rule: Circular specialization chain.
   *
   * Detects cycles in definition specialization hierarchies.
   * For example: A :> B, B :> C, C :> A forms a cycle.
   */
  checkCircularSpecialization(symbolsInUri, indexes) {
    const diagnostics = [];
    const defsInFile = symbolsInUri.filter((s) => isDefinition(s.kind) && s.typeNames.length > 0);
    for (const def of defsInFile) {
      const visited = /* @__PURE__ */ new Set();
      visited.add(def.name);
      const cycle = this.followSpecializationChain(def.name, def.typeNames, visited, indexes);
      if (cycle) {
        diagnostics.push({
          severity: import_node.DiagnosticSeverity.Error,
          range: def.selectionRange,
          message: `Circular specialization: ${cycle.join(" :> ")} :> ${cycle[0]}`,
          source: "sysml",
          code: "circular-specialization"
        });
      }
    }
    return diagnostics;
  }
  /**
   * Walk the specialization chain from a set of type names and detect if any
   * path leads back to a name already in the visited set.
   */
  followSpecializationChain(originName, typeNames, visited, indexes) {
    for (const tn of typeNames) {
      if (visited.has(tn)) {
        return [...visited];
      }
      const candidates = indexes.definitionsByName.get(tn);
      if (!candidates || candidates.length === 0) continue;
      const target = candidates[0];
      if (target.typeNames.length === 0) continue;
      visited.add(tn);
      const cycle = this.followSpecializationChain(originName, target.typeNames, visited, indexes);
      if (cycle) return cycle;
      visited.delete(tn);
    }
    return void 0;
  }
  /**
   * Rule: Circular containment.
   *
   * Detects cycles where definition A contains a feature typed by B and
   * definition B contains a feature typed by A (or longer transitive chains).
   */
  checkCircularContainment(symbolsInUri, indexes) {
    const diagnostics = [];
    const defsInFile = symbolsInUri.filter((s) => isDefinition(s.kind));
    for (const def of defsInFile) {
      const children = indexes.byParent.get(def.qualifiedName) ?? [];
      const childTypeNames = children.flatMap((c) => c.typeNames).filter((t) => t.length > 0);
      if (childTypeNames.length === 0) continue;
      for (const childTypeName of childTypeNames) {
        if (childTypeName === def.name) continue;
        const visited = /* @__PURE__ */ new Set();
        visited.add(def.name);
        const cycle = this.followContainmentChain(childTypeName, visited, indexes);
        if (cycle) {
          const offendingChild = children.find((c) => c.typeNames.includes(childTypeName));
          const range = offendingChild?.selectionRange ?? def.selectionRange;
          diagnostics.push({
            severity: import_node.DiagnosticSeverity.Error,
            range,
            message: `Circular containment: ${cycle.join(" -> ")} -> ${cycle[0]}`,
            source: "sysml",
            code: "circular-containment"
          });
          break;
        }
      }
    }
    return diagnostics;
  }
  /**
   * Walk the containment chain: for a type name, find its definition,
   * check its children's types, and see if any loops back.
   */
  followContainmentChain(typeName, visited, indexes) {
    if (visited.has(typeName)) {
      return [...visited];
    }
    const candidates = indexes.definitionsByName.get(typeName);
    if (!candidates || candidates.length === 0) return void 0;
    const target = candidates[0];
    const children = indexes.byParent.get(target.qualifiedName) ?? [];
    const childTypeNames = children.flatMap((c) => c.typeNames).filter((t) => t.length > 0);
    if (childTypeNames.length === 0) return void 0;
    visited.add(typeName);
    for (const tn of childTypeNames) {
      const cycle = this.followContainmentChain(tn, visited, indexes);
      if (cycle) return cycle;
    }
    visited.delete(typeName);
    return void 0;
  }
  /**
   * Rule: unsatisfied requirements.
   *
   * Requirement usages that are not referenced by any `satisfy` statement
   * anywhere in the workspace receive a warning. Only top-level requirement
   * usages are checked — nested requirements inside a satisfy block or
   * requirement definitions are skipped.
   */
  checkUnsatisfiedRequirements(allSymbols, indexes, workspaceTexts) {
    const diagnostics = [];
    let satisfiedNames;
    let satisfyBlockRanges;
    if (workspaceTexts) {
      satisfiedNames = /* @__PURE__ */ new Set();
      satisfyBlockRanges = /* @__PURE__ */ new Map();
      for (const text of workspaceTexts) {
        this.extractSatisfyReferences(text, satisfiedNames);
        satisfyBlockRanges.set("__static__", this.extractSatisfyBlockRanges(text));
      }
    } else if (this.documentManager) {
      const uris = this.documentManager.getUris();
      const versionKey = uris.map((u) => u + ":" + this.documentManager.getVersion(u)).join("|");
      if (this.satisfyCache && this.satisfyCache.versionKey === versionKey) {
        satisfiedNames = this.satisfyCache.satisfiedNames;
        satisfyBlockRanges = this.satisfyCache.satisfyBlockRanges;
      } else {
        const relNames = this.collectWorkspaceRequirementRelationshipNames();
        satisfiedNames = relNames.satisfiedNames;
        satisfyBlockRanges = /* @__PURE__ */ new Map();
        for (const uri of uris) {
          const text = this.documentManager.getText(uri);
          if (text) {
            satisfyBlockRanges.set(uri, this.extractSatisfyBlockRanges(text));
          }
        }
        this.satisfyCache = { versionKey, satisfiedNames, satisfyBlockRanges };
        if (!this.verifyCache || this.verifyCache.versionKey !== versionKey) {
          this.verifyCache = { versionKey, verifiedNames: relNames.verifiedNames };
        }
      }
    } else {
      satisfiedNames = /* @__PURE__ */ new Set();
      satisfyBlockRanges = /* @__PURE__ */ new Map();
    }
    const requirementUsages = allSymbols.filter(
      (s) => s.kind === "requirement" /* RequirementUsage */
    );
    for (const req of requirementUsages) {
      if (req.parentQualifiedName) {
        const parent = indexes.byQualifiedName.get(req.parentQualifiedName);
        if (parent?.kind === "requirement" /* RequirementUsage */) continue;
      }
      const uriRanges = satisfyBlockRanges.get(req.uri) ?? satisfyBlockRanges.get("__static__") ?? [];
      const reqLine = req.selectionRange.start.line;
      if (uriRanges.some((r) => reqLine >= r.startLine && reqLine <= r.endLine)) continue;
      const isSatisfied = satisfiedNames.has(req.name) || satisfiedNames.has(req.qualifiedName);
      if (!isSatisfied) {
        diagnostics.push({
          severity: import_node.DiagnosticSeverity.Warning,
          range: req.selectionRange,
          message: `Requirement '${req.name}' is not satisfied by any element`,
          source: "sysml",
          code: "unsatisfied-requirement",
          data: { name: req.name, qualifiedName: req.qualifiedName }
        });
      }
    }
    return diagnostics;
  }
  /**
   * Extract requirement references from `satisfy` statements in a text.
   * Adds both the full qualified name and the simple (last segment) name.
   *
   * Patterns matched:
   *   satisfy QualifiedName by ...
   *   satisfy QualifiedName;
   */
  extractSatisfyReferences(text, out) {
    const stripped = stripComments(text);
    const re = /\bsatisfy\s+(?:requirement\s+)?([\w]+(?:::[\w]+)*)\s+(?:by\b|;|:)/g;
    let m2;
    while ((m2 = re.exec(stripped)) !== null) {
      const ref = m2[1];
      out.add(ref);
      const lastSeg = ref.includes("::") ? ref.split("::").pop() : ref;
      out.add(lastSeg);
    }
  }
  /**
   * Extract the line ranges of satisfy block bodies from text.
   * Returns an array of { startLine, endLine } for each satisfy { ... } block.
   */
  extractSatisfyBlockRanges(text) {
    const ranges = [];
    const stripped = stripComments(text);
    const re = /\bsatisfy\b[^;{]*\{/g;
    let m2;
    let lineOffsets;
    while ((m2 = re.exec(stripped)) !== null) {
      const open = m2.index + m2[0].length - 1;
      let depth = 1;
      let i = open + 1;
      while (i < stripped.length && depth > 0) {
        if (stripped[i] === "{") depth++;
        if (stripped[i] === "}") depth--;
        i++;
      }
      if (depth !== 0) continue;
      if (!lineOffsets) {
        lineOffsets = [0];
        for (let j = 0; j < text.length; j++) {
          if (text[j] === "\n") lineOffsets.push(j + 1);
        }
      }
      ranges.push({
        startLine: this.offsetToLine(lineOffsets, open),
        endLine: this.offsetToLine(lineOffsets, i - 1)
      });
    }
    return ranges;
  }
  /**
   * Rule: unverified requirements.
   *
   * In SysML v2, `satisfy` declares that a design element fulfills a
   * requirement, while `verify` declares that a verification case (test)
   * checks whether a requirement is met.  Good practice requires both.
   *
   * This rule warns when a requirement usage has no `verify` statement
   * anywhere in the workspace, regardless of satisfaction status.
   *
   * SysML v2 verify patterns detected:
   *   verify <requirement> by <verificationCase>;
   *   verify <qualifiedName>;
   *   verification case def X { verify <requirement>; }
   */
  checkUnverifiedRequirements(allSymbols, indexes, workspaceTexts) {
    const diagnostics = [];
    let satisfiedNames;
    let verifiedNames;
    let satisfyBlockRanges;
    if (workspaceTexts) {
      satisfiedNames = /* @__PURE__ */ new Set();
      verifiedNames = /* @__PURE__ */ new Set();
      satisfyBlockRanges = /* @__PURE__ */ new Map();
      for (const text of workspaceTexts) {
        this.extractSatisfyReferences(text, satisfiedNames);
        this.extractVerifyReferences(text, verifiedNames);
        satisfyBlockRanges.set("__static__", this.extractSatisfyBlockRanges(text));
      }
    } else if (this.documentManager) {
      const uris = this.documentManager.getUris();
      const versionKey = uris.map((u) => u + ":" + this.documentManager.getVersion(u)).join("|");
      const satisfyCacheValid = this.satisfyCache && this.satisfyCache.versionKey === versionKey;
      const verifyCacheValid = this.verifyCache && this.verifyCache.versionKey === versionKey;
      if (!satisfyCacheValid || !verifyCacheValid) {
        const relNames = this.collectWorkspaceRequirementRelationshipNames();
        if (!satisfyCacheValid) {
          satisfyBlockRanges = /* @__PURE__ */ new Map();
          for (const uri of uris) {
            const text = this.documentManager.getText(uri);
            if (text) {
              satisfyBlockRanges.set(uri, this.extractSatisfyBlockRanges(text));
            }
          }
          this.satisfyCache = { versionKey, satisfiedNames: relNames.satisfiedNames, satisfyBlockRanges };
        }
        if (!verifyCacheValid) {
          this.verifyCache = { versionKey, verifiedNames: relNames.verifiedNames };
        }
      }
      satisfiedNames = this.satisfyCache.satisfiedNames;
      satisfyBlockRanges = this.satisfyCache.satisfyBlockRanges;
      verifiedNames = this.verifyCache.verifiedNames;
    } else {
      satisfiedNames = /* @__PURE__ */ new Set();
      verifiedNames = /* @__PURE__ */ new Set();
      satisfyBlockRanges = /* @__PURE__ */ new Map();
    }
    const requirementUsages = allSymbols.filter(
      (s) => s.kind === "requirement" /* RequirementUsage */
    );
    for (const req of requirementUsages) {
      if (req.parentQualifiedName) {
        const parent = indexes.byQualifiedName.get(req.parentQualifiedName);
        if (parent?.kind === "requirement" /* RequirementUsage */) continue;
      }
      const uriRanges = satisfyBlockRanges.get(req.uri) ?? satisfyBlockRanges.get("__static__") ?? [];
      const reqLine = req.selectionRange.start.line;
      if (uriRanges.some((r) => reqLine >= r.startLine && reqLine <= r.endLine)) continue;
      const isSatisfied = satisfiedNames.has(req.name) || satisfiedNames.has(req.qualifiedName);
      const isVerified = verifiedNames.has(req.name) || verifiedNames.has(req.qualifiedName);
      if (!isVerified) {
        const message = isSatisfied ? `Requirement '${req.name}' is satisfied but has no verification case \u2014 consider adding: verify ${req.name} by <VerificationCase>;` : `Requirement '${req.name}' has no verification case \u2014 consider adding: verify ${req.name} by <VerificationCase>;`;
        diagnostics.push({
          severity: import_node.DiagnosticSeverity.Warning,
          range: req.selectionRange,
          message,
          source: "sysml",
          code: "unverified-requirement",
          data: { name: req.name, qualifiedName: req.qualifiedName }
        });
      }
    }
    return diagnostics;
  }
  /**
   * Extract requirement references from `verify` statements in text.
   * Adds both the full qualified name and the simple (last segment) name.
   *
   * Patterns matched:
   *   verify QualifiedName by ...
   *   verify QualifiedName;
   *   verify requirement QualifiedName by ...
   */
  extractVerifyReferences(text, out) {
    const stripped = stripComments(text);
    const re = /\bverify\s+(?:requirement\s+)?([\w]+(?:::[\w]+)*)\s*(?:by\b|;|:|\{)/g;
    let m2;
    while ((m2 = re.exec(stripped)) !== null) {
      const ref = m2[1];
      out.add(ref);
      const lastSeg = ref.includes("::") ? ref.split("::").pop() : ref;
      out.add(lastSeg);
    }
  }
  /** Binary-search a sorted line-offset table to find the 0-based line for a character offset. */
  offsetToLine(lineOffsets, offset) {
    let lo = 0;
    let hi = lineOffsets.length - 1;
    while (lo < hi) {
      const mid = lo + hi + 1 >>> 1;
      if (lineOffsets[mid] <= offset) lo = mid;
      else hi = mid - 1;
    }
    return lo;
  }
  /**
   * Rule: viewpoint satisfaction checking.
   *
   * Warns when:
   * - A view satisfies a viewpoint but has no expose directives
   * - A view references an undefined viewpoint
   */
  checkViewpointSatisfaction(symbols, _indexes) {
    const diagnostics = [];
    const views = symbols.filter((s) => s.kind === "view" /* ViewUsage */);
    const _viewpointNames = new Set(
      symbols.filter((s) => s.kind === "viewpoint def" /* ViewpointDef */ || s.kind === "viewpoint" /* ViewpointUsage */).map((s) => s.name)
    );
    for (const view of views) {
      const hasExpose = view.exposeTargets && view.exposeTargets.length > 0;
      const hasFilter = view.viewFilters && view.viewFilters.length > 0;
      if (!hasExpose && !hasFilter) {
        diagnostics.push({
          severity: import_node.DiagnosticSeverity.Information,
          range: view.selectionRange,
          message: `View '${view.name}' has no expose or filter directives \u2014 it will show all elements`,
          source: "sysml",
          code: "view-no-scope"
        });
      }
    }
    return diagnostics;
  }
  /**
   * Rule: redefinition multiplicity must conform to base feature multiplicity.
   *
   * For `:>>` / `redefines`, this checks only the lower/upper numeric relation:
   *   base.lower <= redefined.lower <= redefined.upper <= base.upper (if bounded)
   */
  checkRedefinitionMultiplicity(symbolsInUri, indexes, text) {
    const diagnostics = [];
    const lines = text?.split("\n");
    for (const s of symbolsInUri) {
      if (!s.typeName || !s.multiplicityRange) continue;
      const c0 = s.typeName.charCodeAt(0);
      const isLikelyRedef = c0 >= 97 && c0 <= 122;
      if (!isLikelyRedef) continue;
      if (lines) {
        const lineIdx = s.selectionRange.start.line;
        const line = lines[lineIdx] || "";
        if (!/:>>/.test(line) && !/\bredefines\b/.test(line)) continue;
      }
      const candidates = indexes.byName.get(s.typeName) ?? [];
      const base = candidates.find((c) => !!c.multiplicityRange);
      if (!base?.multiplicityRange) continue;
      const baseLower = base.multiplicityRange.lower;
      const baseUpper = base.multiplicityRange.upper;
      const curLower = s.multiplicityRange.lower;
      const curUpper = s.multiplicityRange.upper;
      const lowerOk = curLower >= baseLower;
      const upperOk = baseUpper === "*" || curUpper !== "*" && curUpper <= baseUpper;
      if (lowerOk && upperOk) continue;
      diagnostics.push({
        severity: import_node.DiagnosticSeverity.Error,
        range: s.selectionRange,
        message: `Redefinition multiplicity [${s.multiplicity ?? "?"}] is incompatible with base '${base.name}' multiplicity [${base.multiplicity ?? "?"}]`,
        source: "sysml",
        code: "invalid-redefinition-multiplicity"
      });
    }
    return diagnostics;
  }
  /**
   * Rule: both ends of a `connect a to b` relation should resolve to ports with compatible types.
   *
   * Flags connections where ports have different types, unless:
   * - One port is a conjugate (~) of the other
   * - The connection is inside an interface definition
   * - The connection is within an interface usage
   * - Both ports are untyped (empty port defs with no features)
   */
  checkPortCompatibility(text, uri, indexes) {
    if (!text) return [];
    const diagnostics = [];
    const lines = text.split("\n");
    const re = /\bconnect\s+([A-Za-z_][\w.]*)\s+to\s+([A-Za-z_][\w.]*)/g;
    let m2;
    while ((m2 = re.exec(text)) !== null) {
      const left = m2[1].split(".").pop();
      const right = m2[2].split(".").pop();
      const lSym = (indexes.portsByName.get(left) ?? [])[0];
      const rSym = (indexes.portsByName.get(right) ?? [])[0];
      if (!lSym || !rSym) continue;
      const lType = lSym.typeNames[0] ?? lSym.typeName;
      const rType = rSym.typeNames[0] ?? rSym.typeName;
      if (!lType || !rType || lType === rType) continue;
      if (lType === "~" + rType || rType === "~" + lType) continue;
      if (lType.startsWith("~") && lType.slice(1) === rType) continue;
      if (rType.startsWith("~") && rType.slice(1) === lType) continue;
      const matchLine = text.substring(0, m2.index).split("\n").length - 1;
      let insideInterfaceDef = false;
      for (let i = matchLine; i >= 0 && i >= matchLine - 30; i--) {
        const line = (lines[i] || "").trim();
        if (/\binterface\s+def\b/.test(line)) {
          insideInterfaceDef = true;
          break;
        }
        if (/^\s*package\b/.test(line)) break;
      }
      if (insideInterfaceDef) continue;
      const precedingText = text.substring(Math.max(0, m2.index - 300), m2.index);
      if (/\binterface\s+\w[\w']*(:\w[\w']*)?\s*$/m.test(precedingText)) continue;
      const lDefSyms = indexes.byName.get(lType) ?? [];
      const rDefSyms = indexes.byName.get(rType) ?? [];
      const lDef = lDefSyms.find((s) => s.kind.includes("def"));
      const rDef = rDefSyms.find((s) => s.kind.includes("def"));
      const lChildren = lDef ? indexes.byParent.get(lDef.qualifiedName) ?? [] : [];
      const rChildren = rDef ? indexes.byParent.get(rDef.qualifiedName) ?? [] : [];
      if (lChildren.length === 0 && rChildren.length === 0) continue;
      if (lDef && rDef) {
        const lHierarchy = this.resolveTypeHierarchy(lType, indexes);
        const rHierarchy = this.resolveTypeHierarchy(rType, indexes);
        if (lHierarchy.has(rType) || rHierarchy.has(lType)) continue;
        const hasCommonAncestor = [...lHierarchy].some((t) => rHierarchy.has(t));
        if (hasCommonAncestor) continue;
        const lChildNames = new Set(lChildren.map((c) => c.name));
        const hasSharedFeature = rChildren.some((c) => lChildNames.has(c.name));
        if (hasSharedFeature) continue;
      }
      const range = this.indexToRange(text, m2.index, m2[0].length);
      diagnostics.push({
        severity: import_node.DiagnosticSeverity.Warning,
        range,
        message: `Port compatibility issue: '${left}' (${lType}) is connected to '${right}' (${rType})`,
        source: "sysml",
        code: "incompatible-port-types",
        data: { uri }
      });
    }
    return diagnostics;
  }
  /**
   * Resolve the full type hierarchy for a type name by following
   * specialization chains transitively (max depth 10).
   * Returns a Set of all ancestor type names including the type itself.
   */
  resolveTypeHierarchy(typeName, indexes) {
    const hierarchy = /* @__PURE__ */ new Set();
    const queue = [typeName];
    while (queue.length > 0 && hierarchy.size < 50) {
      const current = queue.shift();
      if (hierarchy.has(current)) continue;
      hierarchy.add(current);
      const defs = indexes.byName.get(current) ?? [];
      for (const def of defs) {
        if (!def.kind.includes("def")) continue;
        for (const parent of def.typeNames) {
          if (!hierarchy.has(parent)) queue.push(parent);
        }
      }
    }
    return hierarchy;
  }
  /**
   * Rule: identifiers used in constraint bodies must resolve from parent-feature scope.
   */
  checkConstraintBodyReferences(text, uri, symbolsInUri, indexes) {
    if (!text) return [];
    const diagnostics = [];
    const blocks = this.extractConstraintBlocks(text);
    for (const b of blocks) {
      if (this.hasDocumentationOnlyConstraintBody(b.body)) {
        if (b.isRequire && this.isInsideViewpoint(text, b.bodyOffset)) continue;
        const trimStart = b.body.search(/\S/);
        const startInBody = trimStart >= 0 ? trimStart : 0;
        const trimmedLen = Math.max(1, b.body.trim().length);
        diagnostics.push({
          severity: import_node.DiagnosticSeverity.Warning,
          range: this.indexToRange(text, b.bodyOffset + startInBody, trimmedLen),
          message: "Invalid constraint body: expected expression, found documentation text",
          source: "sysml",
          code: "invalid-constraint-body",
          data: { uri }
        });
        continue;
      }
      const parent = this.findConstraintScopeSymbol(symbolsInUri, indexes, b.startLine);
      if (!parent) continue;
      const parentMembers = indexes.byParent.get(parent.qualifiedName) ?? [];
      if (parentMembers.length === 0) continue;
      const ignoredRanges = this.getIgnoredBodyRanges(b.body);
      const idRe = /\b([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*)\b/g;
      let im;
      while ((im = idRe.exec(b.body)) !== null) {
        if (this.isIndexInRanges(im.index, ignoredRanges)) continue;
        const expr = im[1];
        if (this.isConstraintKeyword(expr)) continue;
        if (/^\d/.test(expr)) continue;
        const path = expr.split(".");
        const ok = this.resolvePathFromParent(path, parentMembers, indexes);
        if (ok) continue;
        if (path.length === 1) {
          const root = path[0];
          if (indexes.byName.has(root) || resolveLibraryType(root) !== void 0) {
            continue;
          }
        }
        const absoluteStart = b.bodyOffset + im.index;
        diagnostics.push({
          severity: import_node.DiagnosticSeverity.Warning,
          range: this.indexToRange(text, absoluteStart, expr.length),
          message: `Unresolved constraint reference '${expr}' in scope '${parent.name}'`,
          source: "sysml",
          code: "unresolved-constraint-reference",
          data: { uri }
        });
      }
    }
    return diagnostics;
  }
  extractConstraintBlocks(text) {
    const out = [];
    const re = /\b(require\s+)?constraint\s*\{/g;
    let m2;
    while ((m2 = re.exec(text)) !== null) {
      const open = m2.index + m2[0].length - 1;
      let depth = 1;
      let i = open + 1;
      while (i < text.length && depth > 0) {
        const ch = text[i];
        if (ch === "{") depth++;
        if (ch === "}") depth--;
        i++;
      }
      if (depth !== 0) continue;
      const bodyStart = open + 1;
      const bodyEnd = i - 1;
      const body = text.slice(bodyStart, bodyEnd);
      const startLine = text.slice(0, bodyStart).split("\n").length - 1;
      out.push({ body, bodyOffset: bodyStart, startLine, isRequire: !!m2[1] });
    }
    return out;
  }
  resolvePathFromParent(path, parentMembers, indexes) {
    const root = parentMembers.find((s) => s.name === path[0]);
    if (!root) return false;
    if (path.length === 1) return true;
    let typeName = root.typeNames[0] ?? root.typeName;
    for (let i = 1; i < path.length; i++) {
      if (!typeName) return false;
      const typeDefs = indexes.definitionsByName.get(typeName) ?? [];
      const typeDef = typeDefs[0];
      if (!typeDef) return false;
      const member = (indexes.byParent.get(typeDef.qualifiedName) ?? []).find((s) => s.name === path[i]);
      if (!member) return false;
      typeName = member.typeNames[0] ?? member.typeName;
    }
    return true;
  }
  findContainingSymbolByLine(symbols, line) {
    return symbols.filter((s) => s.range.start.line <= line && s.range.end.line >= line).sort((a, b) => {
      const ar = (a.range.end.line - a.range.start.line) * 1e3 + (a.range.end.character - a.range.start.character);
      const br = (b.range.end.line - b.range.start.line) * 1e3 + (b.range.end.character - b.range.start.character);
      return ar - br;
    })[0];
  }
  findConstraintScopeSymbol(symbolsInUri, indexes, line) {
    let scope = this.findContainingSymbolByLine(symbolsInUri, line);
    while (scope) {
      const members = indexes.byParent.get(scope.qualifiedName) ?? [];
      if (members.length > 0) return scope;
      if (!scope.parentQualifiedName) return scope;
      scope = indexes.byQualifiedName.get(scope.parentQualifiedName);
    }
    return void 0;
  }
  /**
   * Return cached indexes if the workspace symbol table hasn't changed,
   * otherwise rebuild and cache.
   */
  getOrBuildIndexes(allSymbols) {
    if (this.indexCache && this.indexCache.symbols === allSymbols) {
      return this.indexCache.indexes;
    }
    const indexes = this.buildSymbolIndexes(allSymbols);
    this.indexCache = { symbols: allSymbols, indexes };
    return indexes;
  }
  buildSymbolIndexes(allSymbols) {
    const byName = /* @__PURE__ */ new Map();
    const byParent = /* @__PURE__ */ new Map();
    const byQualifiedName = /* @__PURE__ */ new Map();
    const definitionsByName = /* @__PURE__ */ new Map();
    const portsByName = /* @__PURE__ */ new Map();
    for (const s of allSymbols) {
      const nameList = byName.get(s.name) ?? [];
      nameList.push(s);
      byName.set(s.name, nameList);
      byQualifiedName.set(s.qualifiedName, s);
      if (s.parentQualifiedName) {
        const children = byParent.get(s.parentQualifiedName) ?? [];
        children.push(s);
        byParent.set(s.parentQualifiedName, children);
      }
      if (isDefinition(s.kind)) {
        const defs = definitionsByName.get(s.name) ?? [];
        defs.push(s);
        definitionsByName.set(s.name, defs);
      }
      if (s.kind === "port" /* PortUsage */ || s.kind === "port def" /* PortDef */) {
        const ports = portsByName.get(s.name) ?? [];
        ports.push(s);
        portsByName.set(s.name, ports);
      }
    }
    return { byName, byParent, byQualifiedName, definitionsByName, portsByName };
  }
  isConstraintKeyword(value) {
    return CONSTRAINT_KEYWORDS.has(value);
  }
  getIgnoredBodyRanges(body) {
    const ranges = [];
    const blockRe = /\/\*[\s\S]*?\*\//g;
    let m2;
    while ((m2 = blockRe.exec(body)) !== null) {
      ranges.push({ start: m2.index, end: m2.index + m2[0].length });
    }
    const lineRe = /\/\/[^\n\r]*/g;
    while ((m2 = lineRe.exec(body)) !== null) {
      ranges.push({ start: m2.index, end: m2.index + m2[0].length });
    }
    return ranges;
  }
  isIndexInRanges(index2, ranges) {
    for (const r of ranges) {
      if (index2 >= r.start && index2 < r.end) return true;
    }
    return false;
  }
  hasDocumentationOnlyConstraintBody(body) {
    const trimmed = body.trim();
    if (!trimmed) return false;
    const withoutComments = trimmed.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/\/\/[^\n\r]*/g, " ").trim();
    if (withoutComments === "doc" || withoutComments === "comment") {
      return true;
    }
    const hasExprSignal = /[<>=!+\-*/%()[\].,:]|\b(and|or|not)\b/.test(withoutComments);
    const proseOnly = /^[A-Za-z_\s]+$/.test(withoutComments);
    return proseOnly && !hasExprSignal;
  }
  isInsideViewpoint(text, offset) {
    const preceding = text.slice(0, offset);
    let depth = 0;
    for (let i = preceding.length - 1; i >= 0; i--) {
      const ch = preceding[i];
      if (ch === "}") depth++;
      if (ch === "{") {
        if (depth > 0) {
          depth--;
          continue;
        }
        const before = preceding.slice(0, i).trimEnd();
        return /\bviewpoint\b/.test(before.slice(-40));
      }
    }
    return false;
  }
  /** Cached line-offset table for indexToRange — avoids O(n) text.slice().split() per call */
  lineOffsetCache;
  indexToRange(text, start, length) {
    let offsets;
    if (this.lineOffsetCache && this.lineOffsetCache.text === text) {
      offsets = this.lineOffsetCache.offsets;
    } else {
      offsets = [0];
      for (let i = 0; i < text.length; i++) {
        if (text[i] === "\n") offsets.push(i + 1);
      }
      this.lineOffsetCache = { text, offsets };
    }
    let lo = 0;
    let hi = offsets.length - 1;
    while (lo < hi) {
      const mid = lo + hi + 1 >>> 1;
      if (offsets[mid] <= start) lo = mid;
      else hi = mid - 1;
    }
    const startLine = lo;
    const startChar = start - offsets[startLine];
    return {
      start: { line: startLine, character: startChar },
      end: { line: startLine, character: startChar + length }
    };
  }
  dedupeDiagnostics(diags) {
    const seen = /* @__PURE__ */ new Set();
    const out = [];
    for (const d of diags) {
      const key = [
        d.code ?? "no-code",
        d.range.start.line,
        d.range.start.character,
        d.range.end.line,
        d.range.end.character,
        d.message
      ].join("|");
      if (seen.has(key)) continue;
      seen.add(key);
      out.push(d);
    }
    return out;
  }
  checkDuplicateDefinitions(symbols) {
    const diagnostics = [];
    const definitionsByScope = /* @__PURE__ */ new Map();
    for (const symbol2 of symbols) {
      if (!isDefinition(symbol2.kind)) continue;
      const scope = symbol2.parentQualifiedName ?? "__root__";
      let scopeMap = definitionsByScope.get(scope);
      if (!scopeMap) {
        scopeMap = /* @__PURE__ */ new Map();
        definitionsByScope.set(scope, scopeMap);
      }
      let defs = scopeMap.get(symbol2.name);
      if (!defs) {
        defs = [];
        scopeMap.set(symbol2.name, defs);
      }
      defs.push(symbol2);
    }
    for (const scopeMap of definitionsByScope.values()) {
      for (const [name, defs] of scopeMap) {
        if (defs.length > 1) {
          for (const def of defs) {
            diagnostics.push({
              severity: import_node.DiagnosticSeverity.Warning,
              range: def.selectionRange,
              message: `Duplicate definition: '${name}' is defined ${defs.length} times in the same scope`,
              source: "sysml",
              code: "duplicate-definition"
            });
          }
        }
      }
    }
    return diagnostics;
  }
};

// server/src/mcpCore.ts
var McpContext = class {
  symbolTable = new SymbolTable();
  loadedDocuments = /* @__PURE__ */ new Map();
  loadedDocumentHashes = /* @__PURE__ */ new Map();
  lastParseErrors = /* @__PURE__ */ new Map();
  lastParseTiming = /* @__PURE__ */ new Map();
};
function hashTextFNV1a(text) {
  let hash2 = 2166136261;
  for (let i = 0; i < text.length; i++) {
    hash2 ^= text.charCodeAt(i);
    hash2 = Math.imul(hash2, 16777619);
  }
  return hash2 >>> 0;
}
function ensureParsed(ctx2, uri, code) {
  if (code !== void 0) {
    parseAndBuild(ctx2, code, uri);
    return;
  }
  const symbols = ctx2.symbolTable.getSymbolsForUri(uri);
  if (symbols.length === 0) {
    const cached2 = ctx2.loadedDocuments.get(uri);
    if (cached2) {
      parseAndBuild(ctx2, cached2, uri);
    }
  }
}
function formatSymbol(sym) {
  const specSet = new Set(sym.specializationNames);
  const typingOnly = sym.typeNames.filter((n2) => !specSet.has(n2));
  return {
    name: sym.name,
    kind: sym.kind,
    qualifiedName: sym.qualifiedName,
    ...typingOnly.length > 0 ? { type: typingOnly.join(", ") } : {},
    ...sym.specializationNames.length > 0 ? { specializes: sym.specializationNames.join(", ") } : {},
    ...sym.documentation ? { documentation: sym.documentation } : {},
    ...sym.parentQualifiedName ? { parent: sym.parentQualifiedName } : {},
    ...sym.children.length > 0 ? { children: sym.children } : {},
    location: {
      uri: sym.uri,
      range: sym.range
    }
  };
}
function formatError2(err) {
  return {
    line: err.line + 1,
    column: err.column + 1,
    message: err.message,
    length: err.length
  };
}
function parseAndBuild(ctx2, text, uri) {
  const hash2 = hashTextFNV1a(text);
  const prevHash = ctx2.loadedDocumentHashes.get(uri);
  const currentSymbolCount = ctx2.symbolTable.getSymbolsForUri(uri).length;
  const cachedErrors = ctx2.lastParseErrors.get(uri) ?? [];
  const canReuseCachedParse = currentSymbolCount > 0 || cachedErrors.length > 0;
  if (prevHash === hash2 && ctx2.lastParseTiming.has(uri) && canReuseCachedParse) {
    return {
      errors: cachedErrors,
      symbolCount: currentSymbolCount,
      timingMs: ctx2.lastParseTiming.get(uri) ?? { lex: 0, parse: 0 }
    };
  }
  const result = parseDocument(text);
  ctx2.symbolTable.build(uri, result);
  ctx2.loadedDocuments.set(uri, text);
  ctx2.loadedDocumentHashes.set(uri, hash2);
  ctx2.lastParseErrors.set(uri, result.errors);
  const timing = { lex: result.timing.lexMs, parse: result.timing.parseMs };
  ctx2.lastParseTiming.set(uri, timing);
  return {
    errors: result.errors,
    symbolCount: ctx2.symbolTable.getSymbolsForUri(uri).length,
    timingMs: timing
  };
}
function handleParse(ctx2, code, uri) {
  const docUri = uri ?? "untitled.sysml";
  const { errors, symbolCount, timingMs } = parseAndBuild(ctx2, code, docUri);
  const summary = {
    uri: docUri,
    symbolCount,
    errorCount: errors.length,
    timing: timingMs
  };
  if (errors.length > 0) {
    summary.errors = errors.map(formatError2);
  }
  const allSymbols = ctx2.symbolTable.getSymbolsForUri(docUri);
  const topLevel = allSymbols.filter((s) => !s.parentQualifiedName).map((s) => `${s.kind} ${s.qualifiedName}`);
  if (topLevel.length > 0) {
    summary.topLevelElements = topLevel;
  }
  return summary;
}
function handlePreview(ctx2, opts) {
  const docUri = opts.uri ?? "preview.sysml";
  const { errors } = parseAndBuild(ctx2, opts.code, docUri);
  const allSymbols = ctx2.symbolTable.getSymbolsForUri(docUri);
  const allNames = new Set(ctx2.symbolTable.getAllSymbols().map((s) => s.name));
  const semanticDiags = SemanticValidator.validateSymbols(allSymbols, allNames, {
    allSymbols: ctx2.symbolTable.getAllSymbols(),
    text: opts.code,
    uri: docUri
  });
  let renderSymbols = allSymbols;
  if (opts.focus) {
    const focusName = opts.focus;
    const focusSet = /* @__PURE__ */ new Set();
    const childrenOf = /* @__PURE__ */ new Map();
    for (const s of allSymbols) {
      if (s.parentQualifiedName) {
        const list = childrenOf.get(s.parentQualifiedName) ?? [];
        list.push(s);
        childrenOf.set(s.parentQualifiedName, list);
      }
    }
    const focused = allSymbols.filter(
      (s) => s.name === focusName || s.qualifiedName === focusName || s.qualifiedName.endsWith(`::${focusName}`)
    );
    for (const f of focused) {
      focusSet.add(f.qualifiedName);
      const children = childrenOf.get(f.qualifiedName) ?? [];
      for (const child of children) {
        focusSet.add(child.qualifiedName);
      }
      if (f.parentQualifiedName) {
        focusSet.add(f.parentQualifiedName);
      }
      const typeSource = [...f.typeNames];
      for (const child of children) {
        typeSource.push(...child.typeNames);
      }
      for (const tn of typeSource) {
        const typed = allSymbols.find((s) => s.name === tn || s.qualifiedName === tn);
        if (typed) {
          focusSet.add(typed.qualifiedName);
          for (const child of childrenOf.get(typed.qualifiedName) ?? []) {
            focusSet.add(child.qualifiedName);
          }
        }
      }
    }
    if (focusSet.size > 0) {
      renderSymbols = allSymbols.filter((s) => focusSet.has(s.qualifiedName));
    }
  }
  const mermaid = generateMermaidDiagram(renderSymbols, allSymbols, opts.diagramType);
  const result = {
    diagram: mermaid.diagram,
    diagramType: mermaid.diagramType,
    description: mermaid.description,
    elementCount: mermaid.elementCount,
    errors: errors.map(formatError2)
  };
  if (opts.originalCode) {
    const origUri = "preview-original.sysml";
    const origResult = parseDocument(opts.originalCode);
    const origTable = new SymbolTable();
    origTable.build(origUri, origResult);
    const origSymbols = origTable.getSymbolsForUri(origUri);
    const diff = diffSymbols(origSymbols, allSymbols);
    result.diff = {
      added: diff.added.map((s) => `${s.kind} ${s.qualifiedName}`),
      changed: diff.changed.map((s) => `${s.kind} ${s.qualifiedName}`),
      removed: diff.removed,
      unchangedCount: diff.unchanged.length
    };
  }
  if (semanticDiags.length > 0) {
    result.semanticIssues = semanticDiags.map((d) => ({
      line: d.range.start.line + 1,
      column: d.range.start.character + 1,
      message: d.message,
      severity: d.severity === 1 ? "error" : d.severity === 2 ? "warning" : "info"
    }));
  }
  return result;
}
function handleValidate(ctx2, code, uri) {
  const docUri = uri ?? "untitled.sysml";
  const { errors } = parseAndBuild(ctx2, code, docUri);
  const symbols = ctx2.symbolTable.getSymbolsForUri(docUri);
  const allNames = new Set(ctx2.symbolTable.getAllSymbols().map((s) => s.name));
  const semanticDiags = SemanticValidator.validateSymbols(symbols, allNames, {
    allSymbols: ctx2.symbolTable.getAllSymbols(),
    text: code,
    uri: docUri
  });
  const semanticIssues = semanticDiags.map((d) => ({
    line: d.range.start.line + 1,
    column: d.range.start.character + 1,
    message: d.message,
    severity: d.severity === 1 ? "error" : d.severity === 2 ? "warning" : d.severity === 3 ? "info" : "hint",
    code: d.code
  }));
  return {
    valid: errors.length === 0 && semanticDiags.filter((d) => d.severity === 1).length === 0,
    syntaxErrors: errors.map(formatError2),
    semanticIssues,
    totalIssues: errors.length + semanticDiags.length
  };
}
function handleGetDiagnostics(ctx2, uri, code) {
  const docUri = uri ?? "untitled.sysml";
  ensureParsed(ctx2, docUri, code);
  const symbols = ctx2.symbolTable.getSymbolsForUri(docUri);
  const allNames = new Set(ctx2.symbolTable.getAllSymbols().map((s) => s.name));
  const diags = SemanticValidator.validateSymbols(symbols, allNames, {
    allSymbols: ctx2.symbolTable.getAllSymbols(),
    text: code ?? ctx2.loadedDocuments.get(docUri),
    uri: docUri
  });
  const summary = {};
  for (const d of diags) {
    const code2 = String(d.code ?? "unknown");
    summary[code2] = (summary[code2] ?? 0) + 1;
  }
  return {
    uri: docUri,
    diagnostics: diags.map((d) => ({
      line: d.range.start.line + 1,
      column: d.range.start.character + 1,
      message: d.message,
      severity: d.severity === 1 ? "error" : d.severity === 2 ? "warning" : d.severity === 3 ? "info" : "hint",
      code: d.code
    })),
    summary
  };
}
function handleGetSymbols(ctx2, opts) {
  if (opts.code) {
    const docUri = opts.uri ?? "untitled.sysml";
    ensureParsed(ctx2, docUri, opts.code);
  }
  let symbols = opts.uri ? ctx2.symbolTable.getSymbolsForUri(opts.uri) : ctx2.symbolTable.getAllSymbols();
  if (opts.kind) {
    symbols = symbols.filter((s) => s.kind.toLowerCase() === opts.kind.toLowerCase());
  }
  if (opts.definitionsOnly) {
    symbols = symbols.filter((s) => isDefinition(s.kind));
  }
  if (opts.usagesOnly) {
    symbols = symbols.filter((s) => isUsage(s.kind));
  }
  return { count: symbols.length, symbols: symbols.map(formatSymbol) };
}
function handleGetDefinition(ctx2, name, code, uri) {
  if (code) {
    ensureParsed(ctx2, uri ?? "untitled.sysml", code);
  }
  const exact = ctx2.symbolTable.getSymbol(name);
  if (exact) {
    return formatSymbol(exact);
  }
  const matches = ctx2.symbolTable.findByName(name);
  if (matches.length === 0) {
    return { found: false, message: `No symbol found with name "${name}"` };
  }
  return { found: true, count: matches.length, symbols: matches.map(formatSymbol) };
}
function handleGetReferences(ctx2, name, code, uri) {
  if (code) {
    ensureParsed(ctx2, uri ?? "untitled.sysml", code);
  }
  const refs = ctx2.symbolTable.findReferences(name);
  return { name, referenceCount: refs.length, references: refs.map(formatSymbol) };
}
function handleGetHierarchy(ctx2, name, code, uri) {
  if (code) {
    ensureParsed(ctx2, uri ?? "untitled.sysml", code);
  }
  const exact = ctx2.symbolTable.getSymbol(name);
  const target = exact ?? ctx2.symbolTable.findByName(name)[0];
  if (!target) {
    return { found: false, message: `No symbol "${name}" found` };
  }
  const ancestors = [];
  let current = target.parentQualifiedName;
  while (current) {
    const parent = ctx2.symbolTable.getSymbol(current);
    if (!parent) break;
    ancestors.unshift({ name: parent.name, kind: parent.kind, qualifiedName: parent.qualifiedName });
    current = parent.parentQualifiedName;
  }
  const children = target.children.map((qn) => ctx2.symbolTable.getSymbol(qn)).filter((s) => s !== void 0).map((s) => ({
    name: s.name,
    kind: s.kind,
    qualifiedName: s.qualifiedName,
    ...s.typeNames.length > 0 ? { type: s.typeNames.join(", ") } : {}
  }));
  return {
    element: {
      name: target.name,
      kind: target.kind,
      qualifiedName: target.qualifiedName,
      ...target.typeNames.length > 0 ? { type: target.typeNames.join(", ") } : {}
    },
    ancestors,
    children
  };
}
function handleGetModelSummary(ctx2, code, uri) {
  if (code) {
    ensureParsed(ctx2, uri ?? "untitled.sysml", code);
  }
  const allSymbols = ctx2.symbolTable.getAllSymbols();
  const kindCounts = {};
  for (const sym of allSymbols) {
    kindCounts[sym.kind] = (kindCounts[sym.kind] ?? 0) + 1;
  }
  const sorted = Object.entries(kindCounts).sort(([, a], [, b]) => b - a);
  return {
    totalSymbols: allSymbols.length,
    loadedDocuments: Array.from(ctx2.loadedDocuments.keys()),
    elementsByKind: Object.fromEntries(sorted),
    definitions: allSymbols.filter((s) => isDefinition(s.kind)).length,
    usages: allSymbols.filter((s) => isUsage(s.kind)).length
  };
}
function handleGetComplexity(ctx2, uri, code) {
  if (code) {
    ensureParsed(ctx2, uri ?? "untitled.sysml", code);
  }
  const symbols = uri ? ctx2.symbolTable.getSymbolsForUri(uri) : ctx2.symbolTable.getAllSymbols();
  return analyseComplexity(symbols);
}
function getElementKinds() {
  const kinds = Object.values(SysMLElementKind);
  return {
    definitions: kinds.filter((k) => isDefinition(k)),
    usages: kinds.filter((k) => isUsage(k)),
    other: kinds.filter((k) => !isDefinition(k) && !isUsage(k)),
    total: kinds.length
  };
}
function handleResourceElementKinds() {
  return getElementKinds();
}
function handleResourceKeywords() {
  return { keywords: SYSML_KEYWORDS_ARRAY, count: SYSML_KEYWORDS_ARRAY.length };
}
function handleResourceGrammarOverview() {
  return `# SysML v2 Grammar Overview

## Element Categories

### Definitions (Types)
Definitions declare reusable types:
- \`part def\` \u2014 structural element type
- \`attribute def\` \u2014 value type
- \`port def\` \u2014 interface point type
- \`connection def\` \u2014 connection type
- \`interface def\` \u2014 interface type
- \`action def\` \u2014 behavior type
- \`state def\` \u2014 state machine type
- \`requirement def\` \u2014 requirement type
- \`constraint def\` \u2014 constraint type
- \`item def\` \u2014 general item type
- \`enum def\` \u2014 enumeration type
- \`calc def\` \u2014 calculation type
- \`use case def\` \u2014 use case type
- \`allocation def\` \u2014 allocation type
- \`view def\` / \`viewpoint def\` \u2014 viewpoint types

### Usages (Instances)
Usages create instances of definitions:
- \`part\` \u2014 structural instance
- \`attribute\` \u2014 value instance
- \`port\` \u2014 port instance
- \`action\` \u2014 action step
- \`state\` \u2014 state instance
- \`requirement\` \u2014 requirement instance
- \`item\` \u2014 item instance

## Specialisation Syntax
- \`part car : Vehicle\` \u2014 \`car\` specialises \`Vehicle\`
- \`part car :> baseVehicle\` \u2014 \`car\` subsets \`baseVehicle\`
- \`part car :>> specificVehicle\` \u2014 \`car\` redefines \`specificVehicle\`

## Packages & Namespaces
\`\`\`sysml
package VehicleModel {
    part def Vehicle { ... }
    part car : Vehicle;
}
\`\`\`

## Documentation
\`\`\`sysml
part def Vehicle {
    doc /* A general vehicle definition */
    attribute mass : Real;
}
\`\`\`

## Unrestricted Names
Names with spaces use single quotes: \`part 'Main Assembly' : Assembly;\`
`;
}
function handlePromptReviewSysml(ctx2, code) {
  const { errors, symbolCount } = parseAndBuild(ctx2, code, "review.sysml");
  const allSymbols = ctx2.symbolTable.getSymbolsForUri("review.sysml");
  const defs = allSymbols.filter((s) => isDefinition(s.kind));
  const usages = allSymbols.filter((s) => isUsage(s.kind));
  const context = [
    `Parsed: ${symbolCount} symbols, ${errors.length} syntax errors`,
    `Definitions: ${defs.map((d) => `${d.kind} ${d.name}`).join(", ") || "none"}`,
    `Usages: ${usages.map((u) => `${u.kind} ${u.name}`).join(", ") || "none"}`
  ];
  if (errors.length > 0) {
    context.push(`Errors: ${errors.map((e) => `line ${e.line + 1}: ${e.message}`).join("; ")}`);
  }
  return [{
    role: "user",
    content: {
      type: "text",
      text: `Please review the following SysML v2 model for correctness, completeness, and best practices.

## Parse Results
${context.join("\n")}

## Source Code
\`\`\`sysml
${code}
\`\`\`

Please check for:
1. Syntax errors and how to fix them
2. Missing type specialisations
3. Naming conventions (PascalCase for definitions, camelCase for usages)
4. Missing documentation (doc comments)
5. Structural completeness (are there orphaned usages without definitions?)
6. Suggestions for additional ports, attributes, or constraints`
    }
  }];
}
function handlePromptExplainElement(element) {
  return [{
    role: "user",
    content: {
      type: "text",
      text: `Explain the SysML v2 element kind "${element}" in detail. Include:

1. What it represents in systems engineering
2. The difference between its definition form and usage form (if applicable)
3. Common attributes and relationships
4. A simple SysML v2 code example
5. When to use it vs similar elements

Use the SysML v2 syntax (not SysML v1 block diagrams).`
    }
  }];
}
function handlePromptGenerateSysml(description, scope) {
  const scopeHint = scope ? `Focus on: ${scope}` : "Include structural definitions, key attributes, ports, and connections.";
  return [{
    role: "user",
    content: {
      type: "text",
      text: `Generate a SysML v2 model for the following system description.

## System Description
${description}

## Scope
${scopeHint}

## Requirements
- Use valid SysML v2 syntax
- Organise elements in packages
- Use PascalCase for definitions, camelCase for usages
- Add doc comments for key elements
- Include type specialisations where appropriate
- Use ports and connections for interfaces between parts

Return the complete SysML v2 source code in a single code block.`
    }
  }];
}

// server/src/mcpServer.ts
var server = new McpServer(
  { name: "sysml-v2", version: "0.1.4" },
  {
    capabilities: { logging: {} },
    instructions: 'SysML v2 Model Context server. CRITICAL RULES:\n1. Call EXACTLY the tool(s) the user asked for \u2014 nothing more. Never add extra tool calls.\n2. "preview" means ONLY the preview tool. NEVER call getComplexity alongside preview.\n3. getComplexity may ONLY be called when the user literally asks for "complexity" or "metrics".\n4. AFTER calling the preview tool, you MUST IMMEDIATELY call the "renderMermaidDiagram" tool.\n   Pass the "mermaidMarkup" field from the preview response as the "markup" parameter.\n   Pass the "title" field as the "title" parameter.\n   Do NOT paste mermaid markup as text \u2014 it will not render visually.\n   The renderMermaidDiagram tool is the ONLY way to display diagrams to the user.\n5. After rendering the diagram, reply with ONLY a brief one-sentence summary.\n   NEVER show raw JSON, mermaid markup, element counts, participant counts, or semantic notes.\n6. If the user asks "visualise/visualize this file" (or similar), use preview/visualise/visualize/visualiseFile/visualizeFile.\n   Do NOT use getDefinition or getComplexity for these requests.'
  }
);
var ctx = new McpContext();
server.registerTool(
  "parse",
  {
    title: "Parse SysML Document",
    description: "Parse a SysML v2 document and build a symbol table. Returns syntax errors (if any) and a summary of discovered symbols. The parsed model is retained for subsequent queries (getSymbols, getDefinition, etc.).",
    inputSchema: {
      code: external_exports.string().describe("The SysML v2 source code to parse"),
      uri: external_exports.string().optional().describe('A URI/name to identify this document (defaults to "untitled.sysml")')
    }
  },
  async ({ code, uri }) => ({
    content: [{ type: "text", text: JSON.stringify(handleParse(ctx, code, uri), null, 2) }]
  })
);
server.registerTool(
  "validate",
  {
    title: "Validate SysML Document",
    description: "Parse and validate a SysML v2 document. Returns both syntax errors and semantic issues (unresolved types, invalid multiplicity, empty enums, duplicate definitions, unused definitions, naming conventions, missing docs).",
    inputSchema: {
      code: external_exports.string().describe("The SysML v2 source code to validate"),
      uri: external_exports.string().optional().describe("A URI/name to identify this document")
    }
  },
  async ({ code, uri }) => ({
    content: [{ type: "text", text: JSON.stringify(handleValidate(ctx, code, uri), null, 2) }]
  })
);
server.registerTool(
  "getDiagnostics",
  {
    title: "Get Model Diagnostics (NOT Visualization)",
    description: 'Return semantic diagnostics for a SysML document: unresolved types, invalid multiplicity, empty enums, duplicate definitions, unused definitions, naming convention violations, and missing documentation. Use this when the user asks things like: "get diagnostics for this file", "check this file", or "show validation errors". Never use this tool for visualization requests (visualise/visualize/show diagram/preview). Optionally provide `code` to parse inline without a separate parse call.',
    inputSchema: {
      uri: external_exports.string().optional().describe('The URI of the document to diagnose (defaults to "untitled.sysml")'),
      code: external_exports.string().optional().describe("SysML source code to parse before running diagnostics")
    }
  },
  async ({ uri, code }) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetDiagnostics(ctx, uri, code), null, 2) }]
  })
);
server.registerTool(
  "diagnostics",
  {
    title: "Diagnostics For File",
    description: 'Alias of getDiagnostics. Use this for natural-language requests such as "get diagnostics", "diagnostics for this file", "check this file", or "what errors are in this model".',
    inputSchema: {
      uri: external_exports.string().optional().describe('The URI of the document to diagnose (defaults to "untitled.sysml")'),
      code: external_exports.string().optional().describe("SysML source code to parse before running diagnostics")
    }
  },
  async ({ uri, code }) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetDiagnostics(ctx, uri, code), null, 2) }]
  })
);
server.registerTool(
  "validateFile",
  {
    title: "Validate This File",
    description: 'Alias of validate. Use this when the user says "validate this file", "validate model", or "run validation".',
    inputSchema: {
      code: external_exports.string().describe("The SysML v2 source code to validate"),
      uri: external_exports.string().optional().describe("A URI/name to identify this document")
    }
  },
  async ({ code, uri }) => ({
    content: [{ type: "text", text: JSON.stringify(handleValidate(ctx, code, uri), null, 2) }]
  })
);
server.registerTool(
  "getSymbols",
  {
    title: "Get SysML Symbols",
    description: 'List all symbols from the loaded SysML document(s). Optionally filter by element kind (e.g., "part def", "action") or document URI. Provide `code` to parse inline without a separate parse call.',
    inputSchema: {
      kind: external_exports.string().optional().describe('Filter by SysML element kind (e.g., "part def", "port", "action def")'),
      uri: external_exports.string().optional().describe("Filter by document URI. If omitted, returns symbols from all loaded documents."),
      definitionsOnly: external_exports.boolean().optional().describe("If true, return only definition elements (types)"),
      usagesOnly: external_exports.boolean().optional().describe("If true, return only usage elements (instances)"),
      code: external_exports.string().optional().describe("SysML source code to parse before listing symbols")
    }
  },
  async (args) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetSymbols(ctx, args), null, 2) }]
  })
);
server.registerTool(
  "getDefinition",
  {
    title: "Get Symbol Definition (NOT Visualization)",
    description: "Find the definition of a SysML element by name or qualified name. Returns matching symbols with their location and type information. Never use this tool for visualization requests (visualise/visualize/show diagram/preview). Provide `code` to parse inline without a separate parse call.",
    inputSchema: {
      name: external_exports.string().describe('The symbol name to look up (simple name or qualified name like "Package::Element")'),
      code: external_exports.string().optional().describe("SysML source code to parse before looking up the symbol"),
      uri: external_exports.string().optional().describe('Document URI for the provided code (defaults to "untitled.sysml")')
    }
  },
  async ({ name, code, uri }) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetDefinition(ctx, name, code, uri), null, 2) }]
  })
);
server.registerTool(
  "getReferences",
  {
    title: "Find References",
    description: "Find all references to a symbol by name across all loaded documents. Never use this tool for visualization requests (visualise/visualize/show diagram/preview). Provide `code` to parse inline without a separate parse call.",
    inputSchema: {
      name: external_exports.string().describe("The symbol name to find references for"),
      code: external_exports.string().optional().describe("SysML source code to parse before finding references"),
      uri: external_exports.string().optional().describe('Document URI for the provided code (defaults to "untitled.sysml")')
    }
  },
  async ({ name, code, uri }) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetReferences(ctx, name, code, uri), null, 2) }]
  })
);
server.registerTool(
  "getHierarchy",
  {
    title: "Get Element Hierarchy",
    description: "Get the parent\u2013child hierarchy of a SysML element, showing its containment structure (package \u2192 definition \u2192 usage). Provide `code` to parse inline without a separate parse call.",
    inputSchema: {
      name: external_exports.string().describe("The qualified name or simple name of the element to inspect"),
      code: external_exports.string().optional().describe("SysML source code to parse before inspecting hierarchy"),
      uri: external_exports.string().optional().describe('Document URI for the provided code (defaults to "untitled.sysml")')
    }
  },
  async ({ name, code, uri }) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetHierarchy(ctx, name, code, uri), null, 2) }]
  })
);
server.registerTool(
  "getModelSummary",
  {
    title: "Get Model Summary",
    description: "Return a high-level summary of the loaded SysML model(s), including element counts by kind and a list of loaded documents. Provide `code` to parse inline without a separate parse call.",
    inputSchema: {
      code: external_exports.string().optional().describe("SysML source code to parse before summarising"),
      uri: external_exports.string().optional().describe('Document URI for the provided code (defaults to "untitled.sysml")')
    }
  },
  async ({ code, uri }) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetModelSummary(ctx, code, uri), null, 2) }]
  })
);
server.registerTool(
  "getComplexity",
  {
    title: "Get Model Complexity (NOT Visualization)",
    description: 'IMPORTANT: Do NOT call this tool unless the user\'s message contains the word "complexity" or "metrics". Never call alongside preview or other tools. Do NOT use this for diagnostics, validation, errors, warnings, or "check this file" requests. Do NOT use this when the user asks to visualise/visualize/show/preview a diagram. Analyse the structural complexity of the loaded SysML model(s). Returns a Model Complexity Index (0\u2013100), per-definition hotspots, coupling count, documentation coverage, and other metrics. Optionally scope the analysis to a single document URI. Provide `code` to parse inline without a separate parse call.',
    annotations: {
      title: "Get Model Complexity",
      readOnlyHint: true,
      openWorldHint: false
    },
    inputSchema: {
      uri: external_exports.string().optional().describe("Optional document URI to scope the analysis to a single file"),
      code: external_exports.string().optional().describe("SysML source code to parse before analysing complexity")
    }
  },
  async ({ uri, code }) => ({
    content: [{ type: "text", text: JSON.stringify(handleGetComplexity(ctx, uri, code), null, 2) }]
  })
);
var previewInputSchema = {
  code: external_exports.string().optional().describe(
    "The SysML v2 source code to preview. Can be a complete model or a snippet. If omitted, the server tries to use cached code for `uri` or the most recently parsed document."
  ),
  originalCode: external_exports.string().optional().describe(
    "Optional original SysML code to compare against. When provided, the response includes a diff summary showing added, changed, and removed elements."
  ),
  diagramType: external_exports.enum(["general", "activity", "state", "sequence", "interconnection", "usecase"]).optional().describe(
    "Force a specific diagram type. If omitted, the best type is auto-detected from the element kinds in the code (e.g., actions \u2192 activity, use cases \u2192 usecase diagram)."
  ),
  focus: external_exports.string().optional().describe(
    "Focus the diagram on a specific element by name. Only the element, its children, parent, and related types will be rendered \u2014 useful for large models."
  ),
  uri: external_exports.string().optional().describe(
    'A URI/name for the document (defaults to "preview.sysml")'
  )
};
function buildPreviewToolResponse(args) {
  let resolvedCode = args.code;
  let resolvedUri = args.uri;
  if (!resolvedCode) {
    if (resolvedUri && ctx.loadedDocuments.has(resolvedUri)) {
      resolvedCode = ctx.loadedDocuments.get(resolvedUri);
    } else {
      const loadedUris = Array.from(ctx.loadedDocuments.keys());
      const latestUri = loadedUris.length > 0 ? loadedUris[loadedUris.length - 1] : void 0;
      if (latestUri) {
        resolvedUri = resolvedUri ?? latestUri;
        resolvedCode = ctx.loadedDocuments.get(latestUri);
      }
    }
  }
  if (!resolvedCode) {
    return {
      content: [
        {
          type: "text",
          text: "No SysML source is available to visualise. Provide `code`, or provide a `uri` that has been parsed in this MCP session."
        }
      ]
    };
  }
  const result = handlePreview(ctx, {
    code: resolvedCode,
    originalCode: args.originalCode,
    diagramType: args.diagramType,
    focus: args.focus,
    uri: resolvedUri
  });
  const renderData = {
    mermaidMarkup: result.diagram,
    title: result.description
  };
  if (result.diff) {
    renderData.diff = result.diff;
  }
  if (result.errors.length > 0) {
    renderData.syntaxErrors = result.errors;
  }
  return {
    content: [
      {
        type: "text",
        text: 'ACTION REQUIRED: You MUST now call the "renderMermaidDiagram" tool to display this diagram.\nPass the "mermaidMarkup" field from the data below as the "markup" parameter and the "title" field as the "title" parameter.\n\nAFTER the diagram renders, respond with ONLY a single brief sentence such as "Here is your <diagramType> diagram." and nothing else.\nDo NOT show or describe: mermaid markup, JSON data, element counts, participant counts, interaction counts, semantic notes, or any raw tool output.\nIf there are syntaxErrors in the data, mention them briefly. Otherwise output NOTHING extra.'
      },
      {
        type: "text",
        text: JSON.stringify(renderData, null, 2)
      }
    ]
  };
}
server.registerTool(
  "preview",
  {
    title: "Preview SysML Diagram",
    description: 'Parse SysML v2 code and generate a Mermaid diagram. Use this when the user asks things like: "visualise this", "visualize this", "show me the diagram", or "preview this model". Supports General, Activity, State, Sequence, Use Case, and Interconnection views \u2014 the best type is auto-detected from the code, or you can specify one. Optionally provide original code to see a diff of what changed.\n\nRENDERING: The response includes a `mermaidMarkup` field containing valid Mermaid syntax. After receiving the response, you MUST call the `renderMermaidDiagram` tool, passing the mermaidMarkup value as the `markup` parameter and the title as the `title` parameter. This is the ONLY way to show the diagram visually to the user.',
    inputSchema: previewInputSchema
  },
  async ({ code, originalCode, diagramType, focus, uri }) => buildPreviewToolResponse({ code, originalCode, diagramType, focus, uri })
);
server.registerTool(
  "visualiseThisFile",
  {
    title: "Visualise This File (Primary)",
    description: 'PRIMARY visualization intent tool. Use this when the user says "visualise this file", "show diagram for this file", or "preview this file". This tool uses the most recently parsed document in the current MCP session.',
    inputSchema: {
      diagramType: external_exports.enum(["general", "activity", "state", "sequence", "interconnection", "usecase"]).optional().describe("Optional diagram type override."),
      focus: external_exports.string().optional().describe("Optional element name to focus the diagram on.")
    }
  },
  async ({ diagramType, focus }) => buildPreviewToolResponse({ diagramType, focus })
);
server.registerTool(
  "visualizeThisFile",
  {
    title: "Visualize This File (Primary)",
    description: 'PRIMARY visualization intent tool. Use this when the user says "visualize this file", "show diagram for this file", or "preview this file". This tool uses the most recently parsed document in the current MCP session.',
    inputSchema: {
      diagramType: external_exports.enum(["general", "activity", "state", "sequence", "interconnection", "usecase"]).optional().describe("Optional diagram type override."),
      focus: external_exports.string().optional().describe("Optional element name to focus the diagram on.")
    }
  },
  async ({ diagramType, focus }) => buildPreviewToolResponse({ diagramType, focus })
);
server.registerTool(
  "visualise-this-file",
  {
    title: "Visualise This File",
    description: 'Primary visualization tool for prompts like "visualise this file".',
    inputSchema: {
      diagramType: external_exports.enum(["general", "activity", "state", "sequence", "interconnection", "usecase"]).optional().describe("Optional diagram type override."),
      focus: external_exports.string().optional().describe("Optional element name to focus the diagram on.")
    }
  },
  async ({ diagramType, focus }) => buildPreviewToolResponse({ diagramType, focus })
);
server.registerTool(
  "visualize-this-file",
  {
    title: "Visualize This File",
    description: 'Primary visualization tool for prompts like "visualize this file".',
    inputSchema: {
      diagramType: external_exports.enum(["general", "activity", "state", "sequence", "interconnection", "usecase"]).optional().describe("Optional diagram type override."),
      focus: external_exports.string().optional().describe("Optional element name to focus the diagram on.")
    }
  },
  async ({ diagramType, focus }) => buildPreviewToolResponse({ diagramType, focus })
);
server.registerTool(
  "visualise",
  {
    title: "Visualise SysML Model",
    description: 'Alias of preview. Use when the user says "visualise this", "show diagram", or "draw this model".',
    inputSchema: previewInputSchema
  },
  async ({ code, originalCode, diagramType, focus, uri }) => buildPreviewToolResponse({ code, originalCode, diagramType, focus, uri })
);
server.registerTool(
  "visualize",
  {
    title: "Visualize SysML Model",
    description: 'Alias of preview. Use when the user says "visualize this", "show diagram", or "draw this model".',
    inputSchema: previewInputSchema
  },
  async ({ code, originalCode, diagramType, focus, uri }) => buildPreviewToolResponse({ code, originalCode, diagramType, focus, uri })
);
server.registerTool(
  "visualiseFile",
  {
    title: "Visualise This File",
    description: 'File-oriented alias of preview. Use this for prompts like "visualise this file". Accepts a URI and uses cached session content when code is not provided.',
    inputSchema: {
      uri: external_exports.string().optional().describe("Document URI to visualise. If omitted, uses the most recently parsed document in session."),
      code: external_exports.string().optional().describe("Optional SysML source code. If provided, it takes precedence."),
      originalCode: external_exports.string().optional().describe("Optional original SysML code to compare against."),
      diagramType: external_exports.enum(["general", "activity", "state", "sequence", "interconnection", "usecase"]).optional().describe("Optional diagram type override."),
      focus: external_exports.string().optional().describe("Optional element name to focus the diagram on.")
    }
  },
  async ({ uri, code, originalCode, diagramType, focus }) => buildPreviewToolResponse({ uri, code, originalCode, diagramType, focus })
);
server.registerTool(
  "visualizeFile",
  {
    title: "Visualize This File",
    description: 'File-oriented alias of preview. Use this for prompts like "visualize this file". Accepts a URI and uses cached session content when code is not provided.',
    inputSchema: {
      uri: external_exports.string().optional().describe("Document URI to visualize. If omitted, uses the most recently parsed document in session."),
      code: external_exports.string().optional().describe("Optional SysML source code. If provided, it takes precedence."),
      originalCode: external_exports.string().optional().describe("Optional original SysML code to compare against."),
      diagramType: external_exports.enum(["general", "activity", "state", "sequence", "interconnection", "usecase"]).optional().describe("Optional diagram type override."),
      focus: external_exports.string().optional().describe("Optional element name to focus the diagram on.")
    }
  },
  async ({ uri, code, originalCode, diagramType, focus }) => buildPreviewToolResponse({ uri, code, originalCode, diagramType, focus })
);
server.registerResource(
  "sysml-element-kinds",
  "sysml://element-kinds",
  {
    title: "SysML v2 Element Kinds",
    description: "Reference of all SysML v2 element kinds recognised by the parser, grouped into definitions and usages.",
    mimeType: "application/json"
  },
  async (uri) => ({
    contents: [{ uri: uri.href, text: JSON.stringify(handleResourceElementKinds(), null, 2) }]
  })
);
server.registerResource(
  "sysml-keywords",
  "sysml://keywords",
  {
    title: "SysML v2 Keywords",
    description: "Complete list of SysML v2 language keywords, useful for syntax reference.",
    mimeType: "application/json"
  },
  async (uri) => ({
    contents: [{ uri: uri.href, text: JSON.stringify(handleResourceKeywords(), null, 2) }]
  })
);
server.registerResource(
  "sysml-grammar-overview",
  "sysml://grammar-overview",
  {
    title: "SysML v2 Grammar Overview",
    description: "A concise overview of the SysML v2 language structure: element categories, specialisation syntax, and common patterns.",
    mimeType: "text/markdown"
  },
  async (uri) => ({
    contents: [{ uri: uri.href, text: handleResourceGrammarOverview() }]
  })
);
server.registerPrompt(
  "review-sysml",
  {
    title: "Review SysML Model",
    description: "Analyse a SysML v2 model for correctness, best practices, and potential improvements.",
    argsSchema: { code: external_exports.string().describe("The SysML v2 source code to review") }
  },
  async ({ code }) => ({
    messages: handlePromptReviewSysml(ctx, code)
  })
);
server.registerPrompt(
  "explain-element",
  {
    title: "Explain SysML Element",
    description: "Explain what a specific SysML v2 element kind is and how it is used.",
    argsSchema: {
      element: external_exports.string().describe('The SysML element kind to explain (e.g., "part def", "action", "port def", "requirement")')
    }
  },
  async ({ element }) => ({
    messages: handlePromptExplainElement(element)
  })
);
server.registerPrompt(
  "generate-sysml",
  {
    title: "Generate SysML Model",
    description: "Generate a SysML v2 model from a natural language description of a system.",
    argsSchema: {
      description: external_exports.string().describe("A natural language description of the system to model"),
      scope: external_exports.string().optional().describe('Desired scope/focus (e.g., "structural only", "with requirements", "full behavioral")')
    }
  },
  async ({ description, scope }) => ({
    messages: handlePromptGenerateSysml(description, scope)
  })
);
async function main() {
  const transport = new StdioServerTransport();
  await server.connect(transport);
}
main().catch((err) => {
  console.error("MCP server failed to start:", err);
  process.exit(1);
});
//# sourceMappingURL=mcpServer.js.map
