function mkJavaScript(e) {
  var t = e.statementIndent, n = e.jsonld, r = e.json || n, i = e.typescript, a = e.wordCharacters || /[\w$\xa1-\uffff]/, o = (function() {
    function e2(e3) {
      return {
        type: e3,
        style: "keyword"
      };
    }
    var t2 = e2("keyword a"), n2 = e2("keyword b"), r2 = e2("keyword c"), i2 = e2("keyword d"), a2 = e2("operator"), o2 = {
      type: "atom",
      style: "atom"
    };
    return {
      if: e2("if"),
      while: t2,
      with: t2,
      else: n2,
      do: n2,
      try: n2,
      finally: n2,
      return: i2,
      break: i2,
      continue: i2,
      new: e2("new"),
      delete: r2,
      void: r2,
      throw: r2,
      debugger: e2("debugger"),
      var: e2("var"),
      const: e2("var"),
      let: e2("var"),
      function: e2("function"),
      catch: e2("catch"),
      for: e2("for"),
      switch: e2("switch"),
      case: e2("case"),
      default: e2("default"),
      in: a2,
      typeof: a2,
      instanceof: a2,
      true: o2,
      false: o2,
      null: o2,
      undefined: o2,
      NaN: o2,
      Infinity: o2,
      this: e2("this"),
      class: e2("class"),
      super: e2("atom"),
      yield: r2,
      export: e2("export"),
      import: e2("import"),
      extends: r2,
      await: r2
    };
  })(), s = /[+\-*&%=<>!?|~^@]/, c = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
  function l(e2) {
    for (var t2 = false, n2, r2 = false; (n2 = e2.next()) != null; ) {
      if (!t2) {
        if (n2 == "/" && !r2) return;
        n2 == "[" ? r2 = true : r2 && n2 == "]" && (r2 = false);
      }
      t2 = !t2 && n2 == "\\";
    }
  }
  var u, d;
  function f(e2, t2, n2) {
    return u = e2, d = n2, t2;
  }
  function p(e2, t2) {
    var n2 = e2.next();
    if (n2 == '"' || n2 == "'") return t2.tokenize = ee(n2), t2.tokenize(e2, t2);
    if (n2 == "." && e2.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) return f("number", "number");
    if (n2 == "." && e2.match("..")) return f("spread", "meta");
    if (/[\[\]{}\(\),;\:\.]/.test(n2)) return f(n2);
    if (n2 == "=" && e2.eat(">")) return f("=>", "operator");
    if (n2 == "0" && e2.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) return f("number", "number");
    if (/\d/.test(n2)) return e2.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), f("number", "number");
    if (n2 == "/") return e2.eat("*") ? (t2.tokenize = m, m(e2, t2)) : e2.eat("/") ? (e2.skipToEnd(), f("comment", "comment")) : et(e2, t2, 1) ? (l(e2), e2.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), f("regexp", "string.special")) : (e2.eat("="), f("operator", "operator", e2.current()));
    if (n2 == "`") return t2.tokenize = h, h(e2, t2);
    if (n2 == "#" && e2.peek() == "!") return e2.skipToEnd(), f("meta", "meta");
    if (n2 == "#" && e2.eatWhile(a)) return f("variable", "property");
    if (n2 == "<" && e2.match("!--") || n2 == "-" && e2.match("->") && !/\S/.test(e2.string.slice(0, e2.start))) return e2.skipToEnd(), f("comment", "comment");
    if (s.test(n2)) return (n2 != ">" || !t2.lexical || t2.lexical.type != ">") && (e2.eat("=") ? (n2 == "!" || n2 == "=") && e2.eat("=") : /[<>*+\-|&?]/.test(n2) && (e2.eat(n2), n2 == ">" && e2.eat(n2))), n2 == "?" && e2.eat(".") ? f(".") : f("operator", "operator", e2.current());
    if (a.test(n2)) {
      e2.eatWhile(a);
      var r2 = e2.current();
      if (t2.lastType != ".") {
        if (o.propertyIsEnumerable(r2)) {
          var i2 = o[r2];
          return f(i2.type, i2.style, r2);
        }
        if (r2 == "async" && e2.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false)) return f("async", "keyword", r2);
      }
      return f("variable", "variable", r2);
    }
  }
  function ee(e2) {
    return function(t2, r2) {
      var i2 = false, a2;
      if (n && t2.peek() == "@" && t2.match(c)) return r2.tokenize = p, f("jsonld-keyword", "meta");
      for (; (a2 = t2.next()) != null && !(a2 == e2 && !i2); ) i2 = !i2 && a2 == "\\";
      return i2 || (r2.tokenize = p), f("string", "string");
    };
  }
  function m(e2, t2) {
    for (var n2 = false, r2; r2 = e2.next(); ) {
      if (r2 == "/" && n2) {
        t2.tokenize = p;
        break;
      }
      n2 = r2 == "*";
    }
    return f("comment", "comment");
  }
  function h(e2, t2) {
    for (var n2 = false, r2; (r2 = e2.next()) != null; ) {
      if (!n2 && (r2 == "`" || r2 == "$" && e2.eat("{"))) {
        t2.tokenize = p;
        break;
      }
      n2 = !n2 && r2 == "\\";
    }
    return f("quasi", "string.special", e2.current());
  }
  var te = "([{}])";
  function ne(e2, t2) {
    t2.fatArrowAt && (t2.fatArrowAt = null);
    var n2 = e2.string.indexOf("=>", e2.start);
    if (!(n2 < 0)) {
      if (i) {
        var r2 = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e2.string.slice(e2.start, n2));
        r2 && (n2 = r2.index);
      }
      for (var o2 = 0, s2 = false, c2 = n2 - 1; c2 >= 0; --c2) {
        var l2 = e2.string.charAt(c2), u2 = te.indexOf(l2);
        if (u2 >= 0 && u2 < 3) {
          if (!o2) {
            ++c2;
            break;
          }
          if (--o2 == 0) {
            l2 == "(" && (s2 = true);
            break;
          }
        } else if (u2 >= 3 && u2 < 6) ++o2;
        else if (a.test(l2)) s2 = true;
        else if (/["'\/`]/.test(l2)) for (; ; --c2) {
          if (c2 == 0) return;
          if (e2.string.charAt(c2 - 1) == l2 && e2.string.charAt(c2 - 2) != "\\") {
            c2--;
            break;
          }
        }
        else if (s2 && !o2) {
          ++c2;
          break;
        }
      }
      s2 && !o2 && (t2.fatArrowAt = c2);
    }
  }
  var re = {
    atom: true,
    number: true,
    variable: true,
    string: true,
    regexp: true,
    this: true,
    import: true,
    "jsonld-keyword": true
  };
  function ie(e2, t2, n2, r2, i2, a2) {
    this.indented = e2, this.column = t2, this.type = n2, this.prev = i2, this.info = a2, r2 != null && (this.align = r2);
  }
  function ae(e2, t2) {
    for (var n2 = e2.localVars; n2; n2 = n2.next) if (n2.name == t2) return true;
    for (var r2 = e2.context; r2; r2 = r2.prev) for (var n2 = r2.vars; n2; n2 = n2.next) if (n2.name == t2) return true;
  }
  function oe(e2, t2, n2, i2, a2) {
    var o2 = e2.cc;
    for (g.state = e2, g.stream = a2, g.marked = null, g.cc = o2, g.style = t2, e2.lexical.hasOwnProperty("align") || (e2.lexical.align = true); ; ) if ((o2.length ? o2.pop() : r ? A : k)(n2, i2)) {
      for (; o2.length && o2[o2.length - 1].lex; ) o2.pop()();
      return g.marked ? g.marked : n2 == "variable" && ae(e2, i2) ? "variableName.local" : t2;
    }
  }
  var g = {
    state: null,
    column: null,
    marked: null,
    cc: null
  };
  function _() {
    for (var e2 = arguments.length - 1; e2 >= 0; e2--) g.cc.push(arguments[e2]);
  }
  function v() {
    return _.apply(null, arguments), true;
  }
  function se(e2, t2) {
    for (var n2 = t2; n2; n2 = n2.next) if (n2.name == e2) return true;
    return false;
  }
  function y(t2) {
    var n2 = g.state;
    if (g.marked = "def", n2.context) {
      if (n2.lexical.info == "var" && n2.context && n2.context.block) {
        var r2 = ce(t2, n2.context);
        if (r2 != null) {
          n2.context = r2;
          return;
        }
      } else if (!se(t2, n2.localVars)) {
        n2.localVars = new S(t2, n2.localVars);
        return;
      }
    }
    e.globalVars && !se(t2, n2.globalVars) && (n2.globalVars = new S(t2, n2.globalVars));
  }
  function ce(e2, t2) {
    if (t2) if (t2.block) {
      var n2 = ce(e2, t2.prev);
      return n2 ? n2 == t2.prev ? t2 : new x(n2, t2.vars, true) : null;
    } else if (se(e2, t2.vars)) return t2;
    else return new x(t2.prev, new S(e2, t2.vars), false);
    else return null;
  }
  function b(e2) {
    return e2 == "public" || e2 == "private" || e2 == "protected" || e2 == "abstract" || e2 == "readonly";
  }
  function x(e2, t2, n2) {
    this.prev = e2, this.vars = t2, this.block = n2;
  }
  function S(e2, t2) {
    this.name = e2, this.next = t2;
  }
  var le = new S("this", new S("arguments", null));
  function C() {
    g.state.context = new x(g.state.context, g.state.localVars, false), g.state.localVars = le;
  }
  function w() {
    g.state.context = new x(g.state.context, g.state.localVars, true), g.state.localVars = null;
  }
  C.lex = w.lex = true;
  function T() {
    g.state.localVars = g.state.context.vars, g.state.context = g.state.context.prev;
  }
  T.lex = true;
  function E(e2, t2) {
    var n2 = function() {
      var n3 = g.state, r2 = n3.indented;
      if (n3.lexical.type == "stat") r2 = n3.lexical.indented;
      else for (var i2 = n3.lexical; i2 && i2.type == ")" && i2.align; i2 = i2.prev) r2 = i2.indented;
      n3.lexical = new ie(r2, g.stream.column(), e2, null, n3.lexical, t2);
    };
    return n2.lex = true, n2;
  }
  function D() {
    var e2 = g.state;
    e2.lexical.prev && (e2.lexical.type == ")" && (e2.indented = e2.lexical.indented), e2.lexical = e2.lexical.prev);
  }
  D.lex = true;
  function O(e2) {
    function t2(n2) {
      return n2 == e2 ? v() : e2 == ";" || n2 == "}" || n2 == ")" || n2 == "]" ? _() : v(t2);
    }
    return t2;
  }
  function k(e2, t2) {
    return e2 == "var" ? v(E("vardef", t2), Me, O(";"), D) : e2 == "keyword a" ? v(E("form"), de, k, D) : e2 == "keyword b" ? v(E("form"), k, D) : e2 == "keyword d" ? g.stream.match(/^\s*$/, false) ? v() : v(E("stat"), M, O(";"), D) : e2 == "debugger" ? v(O(";")) : e2 == "{" ? v(E("}"), w, B, D, T) : e2 == ";" ? v() : e2 == "if" ? (g.state.lexical.info == "else" && g.state.cc[g.state.cc.length - 1] == D && g.state.cc.pop()(), v(E("form"), de, k, D, Ie)) : e2 == "function" ? v(Y) : e2 == "for" ? v(E("form"), w, Le, k, T, D) : e2 == "class" || i && t2 == "interface" ? (g.marked = "keyword", v(E("form", e2 == "class" ? e2 : t2), Ve, D)) : e2 == "variable" ? i && t2 == "declare" ? (g.marked = "keyword", v(k)) : i && (t2 == "module" || t2 == "enum" || t2 == "type") && g.stream.match(/^\s*\w/, false) ? (g.marked = "keyword", t2 == "enum" ? v(Ze) : t2 == "type" ? v(ze, O("operator"), H, O(";")) : v(E("form"), K, O("{"), E("}"), B, D, D)) : i && t2 == "namespace" ? (g.marked = "keyword", v(E("form"), A, k, D)) : i && t2 == "abstract" ? (g.marked = "keyword", v(k)) : v(E("stat"), ye) : e2 == "switch" ? v(E("form"), de, O("{"), E("}", "switch"), w, B, D, D, T) : e2 == "case" ? v(A, O(":")) : e2 == "default" ? v(O(":")) : e2 == "catch" ? v(E("form"), C, ue, k, D, T) : e2 == "export" ? v(E("stat"), Ue, D) : e2 == "import" ? v(E("stat"), Ge, D) : e2 == "async" ? v(k) : t2 == "@" ? v(A, k) : _(E("stat"), A, O(";"), D);
  }
  function ue(e2) {
    if (e2 == "(") return v(Z, O(")"));
  }
  function A(e2, t2) {
    return fe(e2, t2, false);
  }
  function j(e2, t2) {
    return fe(e2, t2, true);
  }
  function de(e2) {
    return e2 == "(" ? v(E(")"), M, O(")"), D) : _();
  }
  function fe(e2, t2, n2) {
    if (g.state.fatArrowAt == g.stream.start) {
      var r2 = n2 ? he : me;
      if (e2 == "(") return v(C, E(")"), R(Z, ")"), D, O("=>"), r2, T);
      if (e2 == "variable") return _(C, K, O("=>"), r2, T);
    }
    var a2 = n2 ? P : N;
    return re.hasOwnProperty(e2) ? v(a2) : e2 == "function" ? v(Y, a2) : e2 == "class" || i && t2 == "interface" ? (g.marked = "keyword", v(E("form"), Be, D)) : e2 == "keyword c" || e2 == "async" ? v(n2 ? j : A) : e2 == "(" ? v(E(")"), M, O(")"), D, a2) : e2 == "operator" || e2 == "spread" ? v(n2 ? j : A) : e2 == "[" ? v(E("]"), Xe, D, a2) : e2 == "{" ? z(I, "}", null, a2) : e2 == "quasi" ? _(F, a2) : e2 == "new" ? v(ge(n2)) : v();
  }
  function M(e2) {
    return e2.match(/[;\}\)\],]/) ? _() : _(A);
  }
  function N(e2, t2) {
    return e2 == "," ? v(M) : P(e2, t2, false);
  }
  function P(e2, t2, n2) {
    var r2 = n2 == 0 ? N : P, a2 = n2 == 0 ? A : j;
    if (e2 == "=>") return v(C, n2 ? he : me, T);
    if (e2 == "operator") return /\+\+|--/.test(t2) || i && t2 == "!" ? v(r2) : i && t2 == "<" && g.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false) ? v(E(">"), R(H, ">"), D, r2) : t2 == "?" ? v(A, O(":"), a2) : v(a2);
    if (e2 == "quasi") return _(F, r2);
    if (e2 != ";") {
      if (e2 == "(") return z(j, ")", "call", r2);
      if (e2 == ".") return v(be, r2);
      if (e2 == "[") return v(E("]"), M, O("]"), D, r2);
      if (i && t2 == "as") return g.marked = "keyword", v(H, r2);
      if (e2 == "regexp") return g.state.lastType = g.marked = "operator", g.stream.backUp(g.stream.pos - g.stream.start - 1), v(a2);
    }
  }
  function F(e2, t2) {
    return e2 == "quasi" ? t2.slice(t2.length - 2) == "${" ? v(M, pe) : v(F) : _();
  }
  function pe(e2) {
    if (e2 == "}") return g.marked = "string.special", g.state.tokenize = h, v(F);
  }
  function me(e2) {
    return ne(g.stream, g.state), _(e2 == "{" ? k : A);
  }
  function he(e2) {
    return ne(g.stream, g.state), _(e2 == "{" ? k : j);
  }
  function ge(e2) {
    return function(t2) {
      return t2 == "." ? v(e2 ? ve : _e) : t2 == "variable" && i ? v(Ae, e2 ? P : N) : _(e2 ? j : A);
    };
  }
  function _e(e2, t2) {
    if (t2 == "target") return g.marked = "keyword", v(N);
  }
  function ve(e2, t2) {
    if (t2 == "target") return g.marked = "keyword", v(P);
  }
  function ye(e2) {
    return e2 == ":" ? v(D, k) : _(N, O(";"), D);
  }
  function be(e2) {
    if (e2 == "variable") return g.marked = "property", v();
  }
  function I(e2, t2) {
    if (e2 == "async") return g.marked = "property", v(I);
    if (e2 == "variable" || g.style == "keyword") {
      if (g.marked = "property", t2 == "get" || t2 == "set") return v(xe);
      var r2;
      return i && g.state.fatArrowAt == g.stream.start && (r2 = g.stream.match(/^\s*:\s*/, false)) && (g.state.fatArrowAt = g.stream.pos + r2[0].length), v(L);
    } else if (e2 == "number" || e2 == "string") return g.marked = n ? "property" : g.style + " property", v(L);
    else if (e2 == "jsonld-keyword") return v(L);
    else if (i && b(t2)) return g.marked = "keyword", v(I);
    else if (e2 == "[") return v(A, V, O("]"), L);
    else if (e2 == "spread") return v(j, L);
    else if (t2 == "*") return g.marked = "keyword", v(I);
    else if (e2 == ":") return _(L);
  }
  function xe(e2) {
    return e2 == "variable" ? (g.marked = "property", v(Y)) : _(L);
  }
  function L(e2) {
    if (e2 == ":") return v(j);
    if (e2 == "(") return _(Y);
  }
  function R(e2, t2, n2) {
    function r2(i2, a2) {
      if (n2 ? n2.indexOf(i2) > -1 : i2 == ",") {
        var o2 = g.state.lexical;
        return o2.info == "call" && (o2.pos = (o2.pos || 0) + 1), v(function(n3, r3) {
          return n3 == t2 || r3 == t2 ? _() : _(e2);
        }, r2);
      }
      return i2 == t2 || a2 == t2 ? v() : n2 && n2.indexOf(";") > -1 ? _(e2) : v(O(t2));
    }
    return function(n3, i2) {
      return n3 == t2 || i2 == t2 ? v() : _(e2, r2);
    };
  }
  function z(e2, t2, n2) {
    for (var r2 = 3; r2 < arguments.length; r2++) g.cc.push(arguments[r2]);
    return v(E(t2, n2), R(e2, t2), D);
  }
  function B(e2) {
    return e2 == "}" ? v() : _(k, B);
  }
  function V(e2, t2) {
    if (i) {
      if (e2 == ":") return v(H);
      if (t2 == "?") return v(V);
    }
  }
  function Se(e2, t2) {
    if (i && (e2 == ":" || t2 == "in")) return v(H);
  }
  function Ce(e2) {
    if (i && e2 == ":") return g.stream.match(/^\s*\w+\s+is\b/, false) ? v(A, we, H) : v(H);
  }
  function we(e2, t2) {
    if (t2 == "is") return g.marked = "keyword", v();
  }
  function H(e2, t2) {
    if (t2 == "keyof" || t2 == "typeof" || t2 == "infer" || t2 == "readonly") return g.marked = "keyword", v(t2 == "typeof" ? j : H);
    if (e2 == "variable" || t2 == "void") return g.marked = "type", v(W);
    if (t2 == "|" || t2 == "&") return v(H);
    if (e2 == "string" || e2 == "number" || e2 == "atom") return v(W);
    if (e2 == "[") return v(E("]"), R(H, "]", ","), D, W);
    if (e2 == "{") return v(E("}"), Ee, D, W);
    if (e2 == "(") return v(R(ke, ")"), Te, W);
    if (e2 == "<") return v(R(H, ">"), H);
    if (e2 == "quasi") return _(De, W);
  }
  function Te(e2) {
    if (e2 == "=>") return v(H);
  }
  function Ee(e2) {
    return e2.match(/[\}\)\]]/) ? v() : e2 == "," || e2 == ";" ? v(Ee) : _(U, Ee);
  }
  function U(e2, t2) {
    if (e2 == "variable" || g.style == "keyword") return g.marked = "property", v(U);
    if (t2 == "?" || e2 == "number" || e2 == "string") return v(U);
    if (e2 == ":") return v(H);
    if (e2 == "[") return v(O("variable"), Se, O("]"), U);
    if (e2 == "(") return _(X, U);
    if (!e2.match(/[;\}\)\],]/)) return v();
  }
  function De(e2, t2) {
    return e2 == "quasi" ? t2.slice(t2.length - 2) == "${" ? v(H, Oe) : v(De) : _();
  }
  function Oe(e2) {
    if (e2 == "}") return g.marked = "string.special", g.state.tokenize = h, v(De);
  }
  function ke(e2, t2) {
    return e2 == "variable" && g.stream.match(/^\s*[?:]/, false) || t2 == "?" ? v(ke) : e2 == ":" ? v(H) : e2 == "spread" ? v(ke) : _(H);
  }
  function W(e2, t2) {
    if (t2 == "<") return v(E(">"), R(H, ">"), D, W);
    if (t2 == "|" || e2 == "." || t2 == "&") return v(H);
    if (e2 == "[") return v(H, O("]"), W);
    if (t2 == "extends" || t2 == "implements") return g.marked = "keyword", v(H);
    if (t2 == "?") return v(H, O(":"), H);
  }
  function Ae(e2, t2) {
    if (t2 == "<") return v(E(">"), R(H, ">"), D, W);
  }
  function G() {
    return _(H, je);
  }
  function je(e2, t2) {
    if (t2 == "=") return v(H);
  }
  function Me(e2, t2) {
    return t2 == "enum" ? (g.marked = "keyword", v(Ze)) : _(K, V, q, Fe);
  }
  function K(e2, t2) {
    if (i && b(t2)) return g.marked = "keyword", v(K);
    if (e2 == "variable") return y(t2), v();
    if (e2 == "spread") return v(K);
    if (e2 == "[") return z(Pe, "]");
    if (e2 == "{") return z(Ne, "}");
  }
  function Ne(e2, t2) {
    return e2 == "variable" && !g.stream.match(/^\s*:/, false) ? (y(t2), v(q)) : (e2 == "variable" && (g.marked = "property"), e2 == "spread" ? v(K) : e2 == "}" ? _() : e2 == "[" ? v(A, O("]"), O(":"), Ne) : v(O(":"), K, q));
  }
  function Pe() {
    return _(K, q);
  }
  function q(e2, t2) {
    if (t2 == "=") return v(j);
  }
  function Fe(e2) {
    if (e2 == ",") return v(Me);
  }
  function Ie(e2, t2) {
    if (e2 == "keyword b" && t2 == "else") return v(E("form", "else"), k, D);
  }
  function Le(e2, t2) {
    if (t2 == "await") return v(Le);
    if (e2 == "(") return v(E(")"), Re, D);
  }
  function Re(e2) {
    return e2 == "var" ? v(Me, J) : e2 == "variable" ? v(J) : _(J);
  }
  function J(e2, t2) {
    return e2 == ")" ? v() : e2 == ";" ? v(J) : t2 == "in" || t2 == "of" ? (g.marked = "keyword", v(A, J)) : _(A, J);
  }
  function Y(e2, t2) {
    if (t2 == "*") return g.marked = "keyword", v(Y);
    if (e2 == "variable") return y(t2), v(Y);
    if (e2 == "(") return v(C, E(")"), R(Z, ")"), D, Ce, k, T);
    if (i && t2 == "<") return v(E(">"), R(G, ">"), D, Y);
  }
  function X(e2, t2) {
    if (t2 == "*") return g.marked = "keyword", v(X);
    if (e2 == "variable") return y(t2), v(X);
    if (e2 == "(") return v(C, E(")"), R(Z, ")"), D, Ce, T);
    if (i && t2 == "<") return v(E(">"), R(G, ">"), D, X);
  }
  function ze(e2, t2) {
    if (e2 == "keyword" || e2 == "variable") return g.marked = "type", v(ze);
    if (t2 == "<") return v(E(">"), R(G, ">"), D);
  }
  function Z(e2, t2) {
    return t2 == "@" && v(A, Z), e2 == "spread" ? v(Z) : i && b(t2) ? (g.marked = "keyword", v(Z)) : i && e2 == "this" ? v(V, q) : _(K, V, q);
  }
  function Be(e2, t2) {
    return e2 == "variable" ? Ve(e2, t2) : Q(e2, t2);
  }
  function Ve(e2, t2) {
    if (e2 == "variable") return y(t2), v(Q);
  }
  function Q(e2, t2) {
    if (t2 == "<") return v(E(">"), R(G, ">"), D, Q);
    if (t2 == "extends" || t2 == "implements" || i && e2 == ",") return t2 == "implements" && (g.marked = "keyword"), v(i ? H : A, Q);
    if (e2 == "{") return v(E("}"), $, D);
  }
  function $(e2, t2) {
    if (e2 == "async" || e2 == "variable" && (t2 == "static" || t2 == "get" || t2 == "set" || i && b(t2)) && g.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false)) return g.marked = "keyword", v($);
    if (e2 == "variable" || g.style == "keyword") return g.marked = "property", v(He, $);
    if (e2 == "number" || e2 == "string") return v(He, $);
    if (e2 == "[") return v(A, V, O("]"), He, $);
    if (t2 == "*") return g.marked = "keyword", v($);
    if (i && e2 == "(") return _(X, $);
    if (e2 == ";" || e2 == ",") return v($);
    if (e2 == "}") return v();
    if (t2 == "@") return v(A, $);
  }
  function He(e2, t2) {
    if (t2 == "!" || t2 == "?") return v(He);
    if (e2 == ":") return v(H, q);
    if (t2 == "=") return v(j);
    var n2 = g.state.lexical.prev;
    return _(n2 && n2.info == "interface" ? X : Y);
  }
  function Ue(e2, t2) {
    return t2 == "*" ? (g.marked = "keyword", v(Ye, O(";"))) : t2 == "default" ? (g.marked = "keyword", v(A, O(";"))) : e2 == "{" ? v(R(We, "}"), Ye, O(";")) : _(k);
  }
  function We(e2, t2) {
    if (t2 == "as") return g.marked = "keyword", v(O("variable"));
    if (e2 == "variable") return _(j, We);
  }
  function Ge(e2) {
    return e2 == "string" ? v() : e2 == "(" ? _(A) : e2 == "." ? _(N) : _(Ke, qe, Ye);
  }
  function Ke(e2, t2) {
    return e2 == "{" ? z(Ke, "}") : (e2 == "variable" && y(t2), t2 == "*" && (g.marked = "keyword"), v(Je));
  }
  function qe(e2) {
    if (e2 == ",") return v(Ke, qe);
  }
  function Je(e2, t2) {
    if (t2 == "as") return g.marked = "keyword", v(Ke);
  }
  function Ye(e2, t2) {
    if (t2 == "from") return g.marked = "keyword", v(A);
  }
  function Xe(e2) {
    return e2 == "]" ? v() : _(R(j, "]"));
  }
  function Ze() {
    return _(E("form"), K, O("{"), E("}"), R(Qe, "}"), D, D);
  }
  function Qe() {
    return _(K, q);
  }
  function $e(e2, t2) {
    return e2.lastType == "operator" || e2.lastType == "," || s.test(t2.charAt(0)) || /[,.]/.test(t2.charAt(0));
  }
  function et(e2, t2, n2) {
    return t2.tokenize == p && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t2.lastType) || t2.lastType == "quasi" && /\{\s*$/.test(e2.string.slice(0, e2.pos - (n2 || 0)));
  }
  return {
    name: e.name,
    startState: function(t2) {
      var n2 = {
        tokenize: p,
        lastType: "sof",
        cc: [],
        lexical: new ie(-t2, 0, "block", false),
        localVars: e.localVars,
        context: e.localVars && new x(null, null, false),
        indented: 0
      };
      return e.globalVars && typeof e.globalVars == "object" && (n2.globalVars = e.globalVars), n2;
    },
    token: function(e2, t2) {
      if (e2.sol() && (t2.lexical.hasOwnProperty("align") || (t2.lexical.align = false), t2.indented = e2.indentation(), ne(e2, t2)), t2.tokenize != m && e2.eatSpace()) return null;
      var n2 = t2.tokenize(e2, t2);
      return u == "comment" ? n2 : (t2.lastType = u == "operator" && (d == "++" || d == "--") ? "incdec" : u, oe(t2, n2, u, d, e2));
    },
    indent: function(n2, r2, i2) {
      if (n2.tokenize == m || n2.tokenize == h) return null;
      if (n2.tokenize != p) return 0;
      var a2 = r2 && r2.charAt(0), o2 = n2.lexical, s2;
      if (!/^\s*else\b/.test(r2)) for (var c2 = n2.cc.length - 1; c2 >= 0; --c2) {
        var l2 = n2.cc[c2];
        if (l2 == D) o2 = o2.prev;
        else if (l2 != Ie && l2 != T) break;
      }
      for (; (o2.type == "stat" || o2.type == "form") && (a2 == "}" || (s2 = n2.cc[n2.cc.length - 1]) && (s2 == N || s2 == P) && !/^[,\.=+\-*:?[\(]/.test(r2)); ) o2 = o2.prev;
      t && o2.type == ")" && o2.prev.type == "stat" && (o2 = o2.prev);
      var u2 = o2.type, d2 = a2 == u2;
      return u2 == "vardef" ? o2.indented + (n2.lastType == "operator" || n2.lastType == "," ? o2.info.length + 1 : 0) : u2 == "form" && a2 == "{" ? o2.indented : u2 == "form" ? o2.indented + i2.unit : u2 == "stat" ? o2.indented + ($e(n2, r2) ? t || i2.unit : 0) : o2.info == "switch" && !d2 && e.doubleIndentSwitch != 0 ? o2.indented + (/^(?:case|default)\b/.test(r2) ? i2.unit : 2 * i2.unit) : o2.align ? o2.column + (d2 ? 0 : 1) : o2.indented + (d2 ? 0 : i2.unit);
    },
    languageData: {
      indentOnInput: /^\s*(?:case .*?:|default:|\{|\})$/,
      commentTokens: r ? void 0 : {
        line: "//",
        block: {
          open: "/*",
          close: "*/"
        }
      },
      closeBrackets: { brackets: [
        "(",
        "[",
        "{",
        "'",
        '"',
        "`"
      ] },
      wordChars: "$"
    }
  };
}
const javascript = mkJavaScript({ name: "javascript" });
mkJavaScript({
  name: "json",
  json: true
});
const jsonld = mkJavaScript({
  name: "json",
  jsonld: true
});
mkJavaScript({
  name: "typescript",
  typescript: true
});
export {
  jsonld as n,
  javascript as t
};
