const {
  SvelteComponent: Zl,
  assign: Jl,
  children: Ql,
  claim_element: eh,
  create_slot: th,
  detach: ia,
  element: rh,
  get_all_dirty_from_scope: ih,
  get_slot_changes: sh,
  get_spread_update: nh,
  init: ah,
  insert_hydration: oh,
  safe_not_equal: lh,
  set_dynamic_element_data: sa,
  set_style: Ye,
  toggle_class: nt,
  transition_in: e0,
  transition_out: t0,
  update_slot_base: hh
} = window.__gradio__svelte__internal;
function ch(i) {
  let e, t, r;
  const n = (
    /*#slots*/
    i[22].default
  ), o = th(
    n,
    i,
    /*$$scope*/
    i[21],
    null
  );
  let c = [
    { "data-testid": (
      /*test_id*/
      i[10]
    ) },
    { id: (
      /*elem_id*/
      i[5]
    ) },
    {
      class: t = "block " + /*elem_classes*/
      i[6].join(" ") + " svelte-dbzldu"
    }
  ], s = {};
  for (let a = 0; a < c.length; a += 1)
    s = Jl(s, c[a]);
  return {
    c() {
      e = rh(
        /*tag*/
        i[18]
      ), o && o.c(), this.h();
    },
    l(a) {
      e = eh(
        a,
        /*tag*/
        (i[18] || "null").toUpperCase(),
        {
          "data-testid": !0,
          id: !0,
          class: !0
        }
      );
      var u = Ql(e);
      o && o.l(u), u.forEach(ia), this.h();
    },
    h() {
      sa(
        /*tag*/
        i[18]
      )(e, s), nt(
        e,
        "hidden",
        /*visible*/
        i[13] === !1
      ), nt(
        e,
        "padded",
        /*padding*/
        i[9]
      ), nt(
        e,
        "flex",
        /*flex*/
        i[0]
      ), nt(
        e,
        "border_focus",
        /*border_mode*/
        i[8] === "focus"
      ), nt(
        e,
        "border_contrast",
        /*border_mode*/
        i[8] === "contrast"
      ), nt(e, "hide-container", !/*explicit_call*/
      i[11] && !/*container*/
      i[12]), nt(
        e,
        "auto-margin",
        /*scale*/
        i[16] === null
      ), Ye(
        e,
        "height",
        /*get_dimension*/
        i[19](
          /*height*/
          i[1]
        )
      ), Ye(
        e,
        "min-height",
        /*get_dimension*/
        i[19](
          /*min_height*/
          i[2]
        )
      ), Ye(
        e,
        "max-height",
        /*get_dimension*/
        i[19](
          /*max_height*/
          i[3]
        )
      ), Ye(e, "width", typeof /*width*/
      i[4] == "number" ? `calc(min(${/*width*/
      i[4]}px, 100%))` : (
        /*get_dimension*/
        i[19](
          /*width*/
          i[4]
        )
      )), Ye(
        e,
        "border-style",
        /*variant*/
        i[7]
      ), Ye(
        e,
        "overflow",
        /*allow_overflow*/
        i[14] ? (
          /*overflow_behavior*/
          i[15]
        ) : "hidden"
      ), Ye(
        e,
        "flex-grow",
        /*scale*/
        i[16]
      ), Ye(e, "min-width", `calc(min(${/*min_width*/
      i[17]}px, 100%))`), Ye(e, "border-width", "var(--block-border-width)");
    },
    m(a, u) {
      oh(a, e, u), o && o.m(e, null), r = !0;
    },
    p(a, u) {
      o && o.p && (!r || u & /*$$scope*/
      2097152) && hh(
        o,
        n,
        a,
        /*$$scope*/
        a[21],
        r ? sh(
          n,
          /*$$scope*/
          a[21],
          u,
          null
        ) : ih(
          /*$$scope*/
          a[21]
        ),
        null
      ), sa(
        /*tag*/
        a[18]
      )(e, s = nh(c, [
        (!r || u & /*test_id*/
        1024) && { "data-testid": (
          /*test_id*/
          a[10]
        ) },
        (!r || u & /*elem_id*/
        32) && { id: (
          /*elem_id*/
          a[5]
        ) },
        (!r || u & /*elem_classes*/
        64 && t !== (t = "block " + /*elem_classes*/
        a[6].join(" ") + " svelte-dbzldu")) && { class: t }
      ])), nt(
        e,
        "hidden",
        /*visible*/
        a[13] === !1
      ), nt(
        e,
        "padded",
        /*padding*/
        a[9]
      ), nt(
        e,
        "flex",
        /*flex*/
        a[0]
      ), nt(
        e,
        "border_focus",
        /*border_mode*/
        a[8] === "focus"
      ), nt(
        e,
        "border_contrast",
        /*border_mode*/
        a[8] === "contrast"
      ), nt(e, "hide-container", !/*explicit_call*/
      a[11] && !/*container*/
      a[12]), nt(
        e,
        "auto-margin",
        /*scale*/
        a[16] === null
      ), u & /*height*/
      2 && Ye(
        e,
        "height",
        /*get_dimension*/
        a[19](
          /*height*/
          a[1]
        )
      ), u & /*min_height*/
      4 && Ye(
        e,
        "min-height",
        /*get_dimension*/
        a[19](
          /*min_height*/
          a[2]
        )
      ), u & /*max_height*/
      8 && Ye(
        e,
        "max-height",
        /*get_dimension*/
        a[19](
          /*max_height*/
          a[3]
        )
      ), u & /*width*/
      16 && Ye(e, "width", typeof /*width*/
      a[4] == "number" ? `calc(min(${/*width*/
      a[4]}px, 100%))` : (
        /*get_dimension*/
        a[19](
          /*width*/
          a[4]
        )
      )), u & /*variant*/
      128 && Ye(
        e,
        "border-style",
        /*variant*/
        a[7]
      ), u & /*allow_overflow, overflow_behavior*/
      49152 && Ye(
        e,
        "overflow",
        /*allow_overflow*/
        a[14] ? (
          /*overflow_behavior*/
          a[15]
        ) : "hidden"
      ), u & /*scale*/
      65536 && Ye(
        e,
        "flex-grow",
        /*scale*/
        a[16]
      ), u & /*min_width*/
      131072 && Ye(e, "min-width", `calc(min(${/*min_width*/
      a[17]}px, 100%))`);
    },
    i(a) {
      r || (e0(o, a), r = !0);
    },
    o(a) {
      t0(o, a), r = !1;
    },
    d(a) {
      a && ia(e), o && o.d(a);
    }
  };
}
function uh(i) {
  let e, t = (
    /*tag*/
    i[18] && ch(i)
  );
  return {
    c() {
      t && t.c();
    },
    l(r) {
      t && t.l(r);
    },
    m(r, n) {
      t && t.m(r, n), e = !0;
    },
    p(r, [n]) {
      /*tag*/
      r[18] && t.p(r, n);
    },
    i(r) {
      e || (e0(t, r), e = !0);
    },
    o(r) {
      t0(t, r), e = !1;
    },
    d(r) {
      t && t.d(r);
    }
  };
}
function dh(i, e, t) {
  let { $$slots: r = {}, $$scope: n } = e, { height: o = void 0 } = e, { min_height: c = void 0 } = e, { max_height: s = void 0 } = e, { width: a = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: p = [] } = e, { variant: f = "solid" } = e, { border_mode: g = "base" } = e, { padding: v = !0 } = e, { type: C = "normal" } = e, { test_id: b = void 0 } = e, { explicit_call: d = !1 } = e, { container: m = !0 } = e, { visible: h = !0 } = e, { allow_overflow: l = !0 } = e, { overflow_behavior: _ = "auto" } = e, { scale: S = null } = e, { min_width: x = 0 } = e, { flex: D = !1 } = e;
  h || (D = !1);
  let y = C === "fieldset" ? "fieldset" : "div";
  const E = (B) => {
    if (B !== void 0) {
      if (typeof B == "number")
        return B + "px";
      if (typeof B == "string")
        return B;
    }
  };
  return i.$$set = (B) => {
    "height" in B && t(1, o = B.height), "min_height" in B && t(2, c = B.min_height), "max_height" in B && t(3, s = B.max_height), "width" in B && t(4, a = B.width), "elem_id" in B && t(5, u = B.elem_id), "elem_classes" in B && t(6, p = B.elem_classes), "variant" in B && t(7, f = B.variant), "border_mode" in B && t(8, g = B.border_mode), "padding" in B && t(9, v = B.padding), "type" in B && t(20, C = B.type), "test_id" in B && t(10, b = B.test_id), "explicit_call" in B && t(11, d = B.explicit_call), "container" in B && t(12, m = B.container), "visible" in B && t(13, h = B.visible), "allow_overflow" in B && t(14, l = B.allow_overflow), "overflow_behavior" in B && t(15, _ = B.overflow_behavior), "scale" in B && t(16, S = B.scale), "min_width" in B && t(17, x = B.min_width), "flex" in B && t(0, D = B.flex), "$$scope" in B && t(21, n = B.$$scope);
  }, [
    D,
    o,
    c,
    s,
    a,
    u,
    p,
    f,
    g,
    v,
    b,
    d,
    m,
    h,
    l,
    _,
    S,
    x,
    y,
    E,
    C,
    n,
    r
  ];
}
class fh extends Zl {
  constructor(e) {
    super(), ah(this, e, dh, uh, lh, {
      height: 1,
      min_height: 2,
      max_height: 3,
      width: 4,
      elem_id: 5,
      elem_classes: 6,
      variant: 7,
      border_mode: 8,
      padding: 9,
      type: 20,
      test_id: 10,
      explicit_call: 11,
      container: 12,
      visible: 13,
      allow_overflow: 14,
      overflow_behavior: 15,
      scale: 16,
      min_width: 17,
      flex: 0
    });
  }
}
class ct {
  // The + prefix indicates that these fields aren't writeable
  // Lexer holding the input string.
  // Start offset, zero-based inclusive.
  // End offset, zero-based exclusive.
  constructor(e, t, r) {
    this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = e, this.start = t, this.end = r;
  }
  /**
   * Merges two `SourceLocation`s from location providers, given they are
   * provided in order of appearance.
   * - Returns the first one's location if only the first is provided.
   * - Returns a merged range of the first and the last if both are provided
   *   and their lexers match.
   * - Otherwise, returns null.
   */
  static range(e, t) {
    return t ? !e || !e.loc || !t.loc || e.loc.lexer !== t.loc.lexer ? null : new ct(e.loc.lexer, e.loc.start, t.loc.end) : e && e.loc;
  }
}
class St {
  // don't expand the token
  // used in \noexpand
  constructor(e, t) {
    this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = e, this.loc = t;
  }
  /**
   * Given a pair of tokens (this and endToken), compute a `Token` encompassing
   * the whole input range enclosed by these two.
   */
  range(e, t) {
    return new St(t, ct.range(this, e));
  }
}
class ie {
  // Error start position based on passed-in Token or ParseNode.
  // Length of affected text based on passed-in Token or ParseNode.
  // The underlying error message without any context added.
  constructor(e, t) {
    this.name = void 0, this.position = void 0, this.length = void 0, this.rawMessage = void 0;
    var r = "KaTeX parse error: " + e, n, o, c = t && t.loc;
    if (c && c.start <= c.end) {
      var s = c.lexer.input;
      n = c.start, o = c.end, n === s.length ? r += " at end of input: " : r += " at position " + (n + 1) + ": ";
      var a = s.slice(n, o).replace(/[^]/g, "$&̲"), u;
      n > 15 ? u = "…" + s.slice(n - 15, n) : u = s.slice(0, n);
      var p;
      o + 15 < s.length ? p = s.slice(o, o + 15) + "…" : p = s.slice(o), r += u + a + p;
    }
    var f = new Error(r);
    return f.name = "ParseError", f.__proto__ = ie.prototype, f.position = n, n != null && o != null && (f.length = o - n), f.rawMessage = e, f;
  }
}
ie.prototype.__proto__ = Error.prototype;
var mh = function(e, t) {
  return e.indexOf(t) !== -1;
}, ph = function(e, t) {
  return e === void 0 ? t : e;
}, _h = /([A-Z])/g, gh = function(e) {
  return e.replace(_h, "-$1").toLowerCase();
}, vh = {
  "&": "&amp;",
  ">": "&gt;",
  "<": "&lt;",
  '"': "&quot;",
  "'": "&#x27;"
}, bh = /[&><"']/g;
function wh(i) {
  return String(i).replace(bh, (e) => vh[e]);
}
var r0 = function i(e) {
  return e.type === "ordgroup" || e.type === "color" ? e.body.length === 1 ? i(e.body[0]) : e : e.type === "font" ? i(e.body) : e;
}, yh = function(e) {
  var t = r0(e);
  return t.type === "mathord" || t.type === "textord" || t.type === "atom";
}, Sh = function(e) {
  if (!e)
    throw new Error("Expected non-null, but got " + String(e));
  return e;
}, Ch = function(e) {
  var t = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);
  return t ? t[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]) ? null : t[1].toLowerCase() : "_relative";
}, _e = {
  contains: mh,
  deflt: ph,
  escape: wh,
  hyphenate: gh,
  getBaseElem: r0,
  isCharacterBox: yh,
  protocolFromUrl: Ch
}, Hi = {
  displayMode: {
    type: "boolean",
    description: "Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",
    cli: "-d, --display-mode"
  },
  output: {
    type: {
      enum: ["htmlAndMathml", "html", "mathml"]
    },
    description: "Determines the markup language of the output.",
    cli: "-F, --format <type>"
  },
  leqno: {
    type: "boolean",
    description: "Render display math in leqno style (left-justified tags)."
  },
  fleqn: {
    type: "boolean",
    description: "Render display math flush left."
  },
  throwOnError: {
    type: "boolean",
    default: !0,
    cli: "-t, --no-throw-on-error",
    cliDescription: "Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."
  },
  errorColor: {
    type: "string",
    default: "#cc0000",
    cli: "-c, --error-color <color>",
    cliDescription: "A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",
    cliProcessor: (i) => "#" + i
  },
  macros: {
    type: "object",
    cli: "-m, --macro <def>",
    cliDescription: "Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",
    cliDefault: [],
    cliProcessor: (i, e) => (e.push(i), e)
  },
  minRuleThickness: {
    type: "number",
    description: "Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",
    processor: (i) => Math.max(0, i),
    cli: "--min-rule-thickness <size>",
    cliProcessor: parseFloat
  },
  colorIsTextColor: {
    type: "boolean",
    description: "Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",
    cli: "-b, --color-is-text-color"
  },
  strict: {
    type: [{
      enum: ["warn", "ignore", "error"]
    }, "boolean", "function"],
    description: "Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",
    cli: "-S, --strict",
    cliDefault: !1
  },
  trust: {
    type: ["boolean", "function"],
    description: "Trust the input, enabling all HTML features such as \\url.",
    cli: "-T, --trust"
  },
  maxSize: {
    type: "number",
    default: 1 / 0,
    description: "If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",
    processor: (i) => Math.max(0, i),
    cli: "-s, --max-size <n>",
    cliProcessor: parseInt
  },
  maxExpand: {
    type: "number",
    default: 1e3,
    description: "Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",
    processor: (i) => Math.max(0, i),
    cli: "-e, --max-expand <n>",
    cliProcessor: (i) => i === "Infinity" ? 1 / 0 : parseInt(i)
  },
  globalGroup: {
    type: "boolean",
    cli: !1
  }
};
function xh(i) {
  if (i.default)
    return i.default;
  var e = i.type, t = Array.isArray(e) ? e[0] : e;
  if (typeof t != "string")
    return t.enum[0];
  switch (t) {
    case "boolean":
      return !1;
    case "string":
      return "";
    case "number":
      return 0;
    case "object":
      return {};
  }
}
class cn {
  constructor(e) {
    this.displayMode = void 0, this.output = void 0, this.leqno = void 0, this.fleqn = void 0, this.throwOnError = void 0, this.errorColor = void 0, this.macros = void 0, this.minRuleThickness = void 0, this.colorIsTextColor = void 0, this.strict = void 0, this.trust = void 0, this.maxSize = void 0, this.maxExpand = void 0, this.globalGroup = void 0, e = e || {};
    for (var t in Hi)
      if (Hi.hasOwnProperty(t)) {
        var r = Hi[t];
        this[t] = e[t] !== void 0 ? r.processor ? r.processor(e[t]) : e[t] : xh(r);
      }
  }
  /**
   * Report nonstrict (non-LaTeX-compatible) input.
   * Can safely not be called if `this.strict` is false in JavaScript.
   */
  reportNonstrict(e, t, r) {
    var n = this.strict;
    if (typeof n == "function" && (n = n(e, t, r)), !(!n || n === "ignore")) {
      if (n === !0 || n === "error")
        throw new ie("LaTeX-incompatible input and strict mode is set to 'error': " + (t + " [" + e + "]"), r);
      n === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (t + " [" + e + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + n + "': " + t + " [" + e + "]"));
    }
  }
  /**
   * Check whether to apply strict (LaTeX-adhering) behavior for unusual
   * input (like `\\`).  Unlike `nonstrict`, will not throw an error;
   * instead, "error" translates to a return value of `true`, while "ignore"
   * translates to a return value of `false`.  May still print a warning:
   * "warn" prints a warning and returns `false`.
   * This is for the second category of `errorCode`s listed in the README.
   */
  useStrictBehavior(e, t, r) {
    var n = this.strict;
    if (typeof n == "function")
      try {
        n = n(e, t, r);
      } catch {
        n = "error";
      }
    return !n || n === "ignore" ? !1 : n === !0 || n === "error" ? !0 : n === "warn" ? (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (t + " [" + e + "]")), !1) : (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + n + "': " + t + " [" + e + "]")), !1);
  }
  /**
   * Check whether to test potentially dangerous input, and return
   * `true` (trusted) or `false` (untrusted).  The sole argument `context`
   * should be an object with `command` field specifying the relevant LaTeX
   * command (as a string starting with `\`), and any other arguments, etc.
   * If `context` has a `url` field, a `protocol` field will automatically
   * get added by this function (changing the specified object).
   */
  isTrusted(e) {
    if (e.url && !e.protocol) {
      var t = _e.protocolFromUrl(e.url);
      if (t == null)
        return !1;
      e.protocol = t;
    }
    var r = typeof this.trust == "function" ? this.trust(e) : this.trust;
    return !!r;
  }
}
class dr {
  constructor(e, t, r) {
    this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = e, this.size = t, this.cramped = r;
  }
  /**
   * Get the style of a superscript given a base in the current style.
   */
  sup() {
    return Ut[kh[this.id]];
  }
  /**
   * Get the style of a subscript given a base in the current style.
   */
  sub() {
    return Ut[Dh[this.id]];
  }
  /**
   * Get the style of a fraction numerator given the fraction in the current
   * style.
   */
  fracNum() {
    return Ut[Eh[this.id]];
  }
  /**
   * Get the style of a fraction denominator given the fraction in the current
   * style.
   */
  fracDen() {
    return Ut[Ah[this.id]];
  }
  /**
   * Get the cramped version of a style (in particular, cramping a cramped style
   * doesn't change the style).
   */
  cramp() {
    return Ut[Th[this.id]];
  }
  /**
   * Get a text or display version of this style.
   */
  text() {
    return Ut[Mh[this.id]];
  }
  /**
   * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
   */
  isTight() {
    return this.size >= 2;
  }
}
var un = 0, Xi = 1, qr = 2, nr = 3, hi = 4, bt = 5, Wr = 6, tt = 7, Ut = [new dr(un, 0, !1), new dr(Xi, 0, !0), new dr(qr, 1, !1), new dr(nr, 1, !0), new dr(hi, 2, !1), new dr(bt, 2, !0), new dr(Wr, 3, !1), new dr(tt, 3, !0)], kh = [hi, bt, hi, bt, Wr, tt, Wr, tt], Dh = [bt, bt, bt, bt, tt, tt, tt, tt], Eh = [qr, nr, hi, bt, Wr, tt, Wr, tt], Ah = [nr, nr, bt, bt, tt, tt, tt, tt], Th = [Xi, Xi, nr, nr, bt, bt, tt, tt], Mh = [un, Xi, qr, nr, qr, nr, qr, nr], ve = {
  DISPLAY: Ut[un],
  TEXT: Ut[qr],
  SCRIPT: Ut[hi],
  SCRIPTSCRIPT: Ut[Wr]
}, Us = [{
  // Latin characters beyond the Latin-1 characters we have metrics for.
  // Needed for Czech, Hungarian and Turkish text, for example.
  name: "latin",
  blocks: [
    [256, 591],
    // Latin Extended-A and Latin Extended-B
    [768, 879]
    // Combining Diacritical marks
  ]
}, {
  // The Cyrillic script used by Russian and related languages.
  // A Cyrillic subset used to be supported as explicitly defined
  // symbols in symbols.js
  name: "cyrillic",
  blocks: [[1024, 1279]]
}, {
  // Armenian
  name: "armenian",
  blocks: [[1328, 1423]]
}, {
  // The Brahmic scripts of South and Southeast Asia
  // Devanagari (0900–097F)
  // Bengali (0980–09FF)
  // Gurmukhi (0A00–0A7F)
  // Gujarati (0A80–0AFF)
  // Oriya (0B00–0B7F)
  // Tamil (0B80–0BFF)
  // Telugu (0C00–0C7F)
  // Kannada (0C80–0CFF)
  // Malayalam (0D00–0D7F)
  // Sinhala (0D80–0DFF)
  // Thai (0E00–0E7F)
  // Lao (0E80–0EFF)
  // Tibetan (0F00–0FFF)
  // Myanmar (1000–109F)
  name: "brahmic",
  blocks: [[2304, 4255]]
}, {
  name: "georgian",
  blocks: [[4256, 4351]]
}, {
  // Chinese and Japanese.
  // The "k" in cjk is for Korean, but we've separated Korean out
  name: "cjk",
  blocks: [
    [12288, 12543],
    // CJK symbols and punctuation, Hiragana, Katakana
    [19968, 40879],
    // CJK ideograms
    [65280, 65376]
    // Fullwidth punctuation
    // TODO: add halfwidth Katakana and Romanji glyphs
  ]
}, {
  // Korean
  name: "hangul",
  blocks: [[44032, 55215]]
}];
function Bh(i) {
  for (var e = 0; e < Us.length; e++)
    for (var t = Us[e], r = 0; r < t.blocks.length; r++) {
      var n = t.blocks[r];
      if (i >= n[0] && i <= n[1])
        return t.name;
    }
  return null;
}
var Ni = [];
Us.forEach((i) => i.blocks.forEach((e) => Ni.push(...e)));
function i0(i) {
  for (var e = 0; e < Ni.length; e += 2)
    if (i >= Ni[e] && i <= Ni[e + 1])
      return !0;
  return !1;
}
var Ir = 80, Fh = function(e, t) {
  return "M95," + (622 + e + t) + `
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l` + e / 2.075 + " -" + e + `
c5.3,-9.3,12,-14,20,-14
H400000v` + (40 + e) + `H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M` + (834 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
}, Rh = function(e, t) {
  return "M263," + (601 + e + t) + `c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l` + e / 2.084 + " -" + e + `
c4.7,-7.3,11,-11,19,-11
H40000v` + (40 + e) + `H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
}, Lh = function(e, t) {
  return "M983 " + (10 + e + t) + `
l` + e / 3.13 + " -" + e + `
c4,-6.7,10,-10,18,-10 H400000v` + (40 + e) + `
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
}, Oh = function(e, t) {
  return "M424," + (2398 + e + t) + `
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l` + e / 4.223 + " -" + e + `c4,-6.7,10,-10,18,-10 H400000
v` + (40 + e) + `H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M` + (1001 + e) + " " + t + `
h400000v` + (40 + e) + "h-400000z";
}, Ih = function(e, t) {
  return "M473," + (2713 + e + t) + `
c339.3,-1799.3,509.3,-2700,510,-2702 l` + e / 5.298 + " -" + e + `
c3.3,-7.3,9.3,-11,18,-11 H400000v` + (40 + e) + `H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "H1017.7z";
}, Ph = function(e) {
  var t = e / 2;
  return "M400000 " + e + " H0 L" + t + " 0 l65 45 L145 " + (e - 80) + " H400000z";
}, zh = function(e, t, r) {
  var n = r - 54 - t - e;
  return "M702 " + (e + t) + "H400000" + (40 + e) + `
H742v` + n + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 ` + t + "H400000v" + (40 + e) + "H742z";
}, Hh = function(e, t, r) {
  t = 1e3 * t;
  var n = "";
  switch (e) {
    case "sqrtMain":
      n = Fh(t, Ir);
      break;
    case "sqrtSize1":
      n = Rh(t, Ir);
      break;
    case "sqrtSize2":
      n = Lh(t, Ir);
      break;
    case "sqrtSize3":
      n = Oh(t, Ir);
      break;
    case "sqrtSize4":
      n = Ih(t, Ir);
      break;
    case "sqrtTall":
      n = zh(t, Ir, r);
  }
  return n;
}, Nh = function(e, t) {
  switch (e) {
    case "⎜":
      return "M291 0 H417 V" + t + " H291z M291 0 H417 V" + t + " H291z";
    case "∣":
      return "M145 0 H188 V" + t + " H145z M145 0 H188 V" + t + " H145z";
    case "∥":
      return "M145 0 H188 V" + t + " H145z M145 0 H188 V" + t + " H145z" + ("M367 0 H410 V" + t + " H367z M367 0 H410 V" + t + " H367z");
    case "⎟":
      return "M457 0 H583 V" + t + " H457z M457 0 H583 V" + t + " H457z";
    case "⎢":
      return "M319 0 H403 V" + t + " H319z M319 0 H403 V" + t + " H319z";
    case "⎥":
      return "M263 0 H347 V" + t + " H263z M263 0 H347 V" + t + " H263z";
    case "⎪":
      return "M384 0 H504 V" + t + " H384z M384 0 H504 V" + t + " H384z";
    case "⏐":
      return "M312 0 H355 V" + t + " H312z M312 0 H355 V" + t + " H312z";
    case "‖":
      return "M257 0 H300 V" + t + " H257z M257 0 H300 V" + t + " H257z" + ("M478 0 H521 V" + t + " H478z M478 0 H521 V" + t + " H478z");
    default:
      return "";
  }
}, na = {
  // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
  doubleleftarrow: `M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,
  // doublerightarrow is from glyph U+21D2 in font KaTeX Main
  doublerightarrow: `M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,
  // leftarrow is from glyph U+2190 in font KaTeX Main
  leftarrow: `M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,
  // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular
  leftbrace: `M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,
  leftbraceunder: `M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,
  // overgroup is from the MnSymbol package (public domain)
  leftgroup: `M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,
  leftgroupunder: `M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,
  // Harpoons are from glyph U+21BD in font KaTeX Main
  leftharpoon: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,
  leftharpoonplus: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,
  leftharpoondown: `M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,
  leftharpoondownplus: `M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,
  // hook is from glyph U+21A9 in font KaTeX Main
  lefthook: `M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,
  leftlinesegment: `M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,
  leftmapsto: `M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,
  // tofrom is from glyph U+21C4 in font KaTeX AMS Regular
  leftToFrom: `M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,
  longequal: `M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,
  midbrace: `M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,
  midbraceunder: `M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,
  oiintSize1: `M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,
  oiintSize2: `M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,
  oiiintSize1: `M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,
  oiiintSize2: `M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,
  rightarrow: `M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,
  rightbrace: `M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,
  rightbraceunder: `M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,
  rightgroup: `M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,
  rightgroupunder: `M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,
  rightharpoon: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,
  rightharpoonplus: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,
  rightharpoondown: `M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,
  rightharpoondownplus: `M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,
  righthook: `M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,
  rightlinesegment: `M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,
  rightToFrom: `M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,
  // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular
  twoheadleftarrow: `M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,
  twoheadrightarrow: `M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,
  // tilde1 is a modified version of a glyph from the MnSymbol package
  tilde1: `M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,
  // ditto tilde2, tilde3, & tilde4
  tilde2: `M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,
  tilde3: `M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,
  tilde4: `M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,
  // vec is from glyph U+20D7 in font KaTeX Main
  vec: `M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,
  // widehat1 is a modified version of a glyph from the MnSymbol package
  widehat1: `M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,
  // ditto widehat2, widehat3, & widehat4
  widehat2: `M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
  widehat3: `M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
  widehat4: `M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
  // widecheck paths are all inverted versions of widehat
  widecheck1: `M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,
  widecheck2: `M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
  widecheck3: `M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
  widecheck4: `M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
  // The next ten paths support reaction arrows from the mhchem package.
  // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX
  // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main
  baraboveleftarrow: `M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,
  // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
  rightarrowabovebar: `M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,
  // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.
  // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em
  baraboveshortleftharpoon: `M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,
  rightharpoonaboveshortbar: `M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,
  shortbaraboveleftharpoon: `M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,
  shortrightharpoonabovebar: `M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`
}, qh = function(e, t) {
  switch (e) {
    case "lbrack":
      return "M403 1759 V84 H666 V0 H319 V1759 v" + t + ` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v` + t + " v1759 h84z";
    case "rbrack":
      return "M347 1759 V0 H0 V84 H263 V1759 v" + t + ` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v` + t + " v1759 h84z";
    case "vert":
      return "M145 15 v585 v" + t + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + t + " v585 h43z";
    case "doublevert":
      return "M145 15 v585 v" + t + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + t + ` v585 h43z
M367 15 v585 v` + t + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v` + t + " v585 h43z";
    case "lfloor":
      return "M319 602 V0 H403 V602 v" + t + ` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v` + t + " v1715 H319z";
    case "rfloor":
      return "M319 602 V0 H403 V602 v" + t + ` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v` + t + " v1715 H319z";
    case "lceil":
      return "M403 1759 V84 H666 V0 H319 V1759 v" + t + ` v602 h84z
M403 1759 V0 H319 V1759 v` + t + " v602 h84z";
    case "rceil":
      return "M347 1759 V0 H0 V84 H263 V1759 v" + t + ` v602 h84z
M347 1759 V0 h-84 V1759 v` + t + " v602 h84z";
    case "lparen":
      return `M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,` + (t + 84) + `c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-` + (t + 92) + `c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;
    case "rparen":
      return `M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,` + (t + 9) + `
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-` + (t + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;
    default:
      throw new Error("Unknown stretchy delimiter.");
  }
};
class ui {
  // HtmlDomNode
  // Never used; needed for satisfying interface.
  constructor(e) {
    this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = e, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
  }
  hasClass(e) {
    return _e.contains(this.classes, e);
  }
  /** Convert the fragment into a node. */
  toNode() {
    for (var e = document.createDocumentFragment(), t = 0; t < this.children.length; t++)
      e.appendChild(this.children[t].toNode());
    return e;
  }
  /** Convert the fragment into HTML markup. */
  toMarkup() {
    for (var e = "", t = 0; t < this.children.length; t++)
      e += this.children[t].toMarkup();
    return e;
  }
  /**
   * Converts the math node into a string, similar to innerText. Applies to
   * MathDomNode's only.
   */
  toText() {
    var e = (t) => t.toText();
    return this.children.map(e).join("");
  }
}
var Wt = {
  "AMS-Regular": {
    32: [0, 0, 0, 0, 0.25],
    65: [0, 0.68889, 0, 0, 0.72222],
    66: [0, 0.68889, 0, 0, 0.66667],
    67: [0, 0.68889, 0, 0, 0.72222],
    68: [0, 0.68889, 0, 0, 0.72222],
    69: [0, 0.68889, 0, 0, 0.66667],
    70: [0, 0.68889, 0, 0, 0.61111],
    71: [0, 0.68889, 0, 0, 0.77778],
    72: [0, 0.68889, 0, 0, 0.77778],
    73: [0, 0.68889, 0, 0, 0.38889],
    74: [0.16667, 0.68889, 0, 0, 0.5],
    75: [0, 0.68889, 0, 0, 0.77778],
    76: [0, 0.68889, 0, 0, 0.66667],
    77: [0, 0.68889, 0, 0, 0.94445],
    78: [0, 0.68889, 0, 0, 0.72222],
    79: [0.16667, 0.68889, 0, 0, 0.77778],
    80: [0, 0.68889, 0, 0, 0.61111],
    81: [0.16667, 0.68889, 0, 0, 0.77778],
    82: [0, 0.68889, 0, 0, 0.72222],
    83: [0, 0.68889, 0, 0, 0.55556],
    84: [0, 0.68889, 0, 0, 0.66667],
    85: [0, 0.68889, 0, 0, 0.72222],
    86: [0, 0.68889, 0, 0, 0.72222],
    87: [0, 0.68889, 0, 0, 1],
    88: [0, 0.68889, 0, 0, 0.72222],
    89: [0, 0.68889, 0, 0, 0.72222],
    90: [0, 0.68889, 0, 0, 0.66667],
    107: [0, 0.68889, 0, 0, 0.55556],
    160: [0, 0, 0, 0, 0.25],
    165: [0, 0.675, 0.025, 0, 0.75],
    174: [0.15559, 0.69224, 0, 0, 0.94666],
    240: [0, 0.68889, 0, 0, 0.55556],
    295: [0, 0.68889, 0, 0, 0.54028],
    710: [0, 0.825, 0, 0, 2.33334],
    732: [0, 0.9, 0, 0, 2.33334],
    770: [0, 0.825, 0, 0, 2.33334],
    771: [0, 0.9, 0, 0, 2.33334],
    989: [0.08167, 0.58167, 0, 0, 0.77778],
    1008: [0, 0.43056, 0.04028, 0, 0.66667],
    8245: [0, 0.54986, 0, 0, 0.275],
    8463: [0, 0.68889, 0, 0, 0.54028],
    8487: [0, 0.68889, 0, 0, 0.72222],
    8498: [0, 0.68889, 0, 0, 0.55556],
    8502: [0, 0.68889, 0, 0, 0.66667],
    8503: [0, 0.68889, 0, 0, 0.44445],
    8504: [0, 0.68889, 0, 0, 0.66667],
    8513: [0, 0.68889, 0, 0, 0.63889],
    8592: [-0.03598, 0.46402, 0, 0, 0.5],
    8594: [-0.03598, 0.46402, 0, 0, 0.5],
    8602: [-0.13313, 0.36687, 0, 0, 1],
    8603: [-0.13313, 0.36687, 0, 0, 1],
    8606: [0.01354, 0.52239, 0, 0, 1],
    8608: [0.01354, 0.52239, 0, 0, 1],
    8610: [0.01354, 0.52239, 0, 0, 1.11111],
    8611: [0.01354, 0.52239, 0, 0, 1.11111],
    8619: [0, 0.54986, 0, 0, 1],
    8620: [0, 0.54986, 0, 0, 1],
    8621: [-0.13313, 0.37788, 0, 0, 1.38889],
    8622: [-0.13313, 0.36687, 0, 0, 1],
    8624: [0, 0.69224, 0, 0, 0.5],
    8625: [0, 0.69224, 0, 0, 0.5],
    8630: [0, 0.43056, 0, 0, 1],
    8631: [0, 0.43056, 0, 0, 1],
    8634: [0.08198, 0.58198, 0, 0, 0.77778],
    8635: [0.08198, 0.58198, 0, 0, 0.77778],
    8638: [0.19444, 0.69224, 0, 0, 0.41667],
    8639: [0.19444, 0.69224, 0, 0, 0.41667],
    8642: [0.19444, 0.69224, 0, 0, 0.41667],
    8643: [0.19444, 0.69224, 0, 0, 0.41667],
    8644: [0.1808, 0.675, 0, 0, 1],
    8646: [0.1808, 0.675, 0, 0, 1],
    8647: [0.1808, 0.675, 0, 0, 1],
    8648: [0.19444, 0.69224, 0, 0, 0.83334],
    8649: [0.1808, 0.675, 0, 0, 1],
    8650: [0.19444, 0.69224, 0, 0, 0.83334],
    8651: [0.01354, 0.52239, 0, 0, 1],
    8652: [0.01354, 0.52239, 0, 0, 1],
    8653: [-0.13313, 0.36687, 0, 0, 1],
    8654: [-0.13313, 0.36687, 0, 0, 1],
    8655: [-0.13313, 0.36687, 0, 0, 1],
    8666: [0.13667, 0.63667, 0, 0, 1],
    8667: [0.13667, 0.63667, 0, 0, 1],
    8669: [-0.13313, 0.37788, 0, 0, 1],
    8672: [-0.064, 0.437, 0, 0, 1.334],
    8674: [-0.064, 0.437, 0, 0, 1.334],
    8705: [0, 0.825, 0, 0, 0.5],
    8708: [0, 0.68889, 0, 0, 0.55556],
    8709: [0.08167, 0.58167, 0, 0, 0.77778],
    8717: [0, 0.43056, 0, 0, 0.42917],
    8722: [-0.03598, 0.46402, 0, 0, 0.5],
    8724: [0.08198, 0.69224, 0, 0, 0.77778],
    8726: [0.08167, 0.58167, 0, 0, 0.77778],
    8733: [0, 0.69224, 0, 0, 0.77778],
    8736: [0, 0.69224, 0, 0, 0.72222],
    8737: [0, 0.69224, 0, 0, 0.72222],
    8738: [0.03517, 0.52239, 0, 0, 0.72222],
    8739: [0.08167, 0.58167, 0, 0, 0.22222],
    8740: [0.25142, 0.74111, 0, 0, 0.27778],
    8741: [0.08167, 0.58167, 0, 0, 0.38889],
    8742: [0.25142, 0.74111, 0, 0, 0.5],
    8756: [0, 0.69224, 0, 0, 0.66667],
    8757: [0, 0.69224, 0, 0, 0.66667],
    8764: [-0.13313, 0.36687, 0, 0, 0.77778],
    8765: [-0.13313, 0.37788, 0, 0, 0.77778],
    8769: [-0.13313, 0.36687, 0, 0, 0.77778],
    8770: [-0.03625, 0.46375, 0, 0, 0.77778],
    8774: [0.30274, 0.79383, 0, 0, 0.77778],
    8776: [-0.01688, 0.48312, 0, 0, 0.77778],
    8778: [0.08167, 0.58167, 0, 0, 0.77778],
    8782: [0.06062, 0.54986, 0, 0, 0.77778],
    8783: [0.06062, 0.54986, 0, 0, 0.77778],
    8785: [0.08198, 0.58198, 0, 0, 0.77778],
    8786: [0.08198, 0.58198, 0, 0, 0.77778],
    8787: [0.08198, 0.58198, 0, 0, 0.77778],
    8790: [0, 0.69224, 0, 0, 0.77778],
    8791: [0.22958, 0.72958, 0, 0, 0.77778],
    8796: [0.08198, 0.91667, 0, 0, 0.77778],
    8806: [0.25583, 0.75583, 0, 0, 0.77778],
    8807: [0.25583, 0.75583, 0, 0, 0.77778],
    8808: [0.25142, 0.75726, 0, 0, 0.77778],
    8809: [0.25142, 0.75726, 0, 0, 0.77778],
    8812: [0.25583, 0.75583, 0, 0, 0.5],
    8814: [0.20576, 0.70576, 0, 0, 0.77778],
    8815: [0.20576, 0.70576, 0, 0, 0.77778],
    8816: [0.30274, 0.79383, 0, 0, 0.77778],
    8817: [0.30274, 0.79383, 0, 0, 0.77778],
    8818: [0.22958, 0.72958, 0, 0, 0.77778],
    8819: [0.22958, 0.72958, 0, 0, 0.77778],
    8822: [0.1808, 0.675, 0, 0, 0.77778],
    8823: [0.1808, 0.675, 0, 0, 0.77778],
    8828: [0.13667, 0.63667, 0, 0, 0.77778],
    8829: [0.13667, 0.63667, 0, 0, 0.77778],
    8830: [0.22958, 0.72958, 0, 0, 0.77778],
    8831: [0.22958, 0.72958, 0, 0, 0.77778],
    8832: [0.20576, 0.70576, 0, 0, 0.77778],
    8833: [0.20576, 0.70576, 0, 0, 0.77778],
    8840: [0.30274, 0.79383, 0, 0, 0.77778],
    8841: [0.30274, 0.79383, 0, 0, 0.77778],
    8842: [0.13597, 0.63597, 0, 0, 0.77778],
    8843: [0.13597, 0.63597, 0, 0, 0.77778],
    8847: [0.03517, 0.54986, 0, 0, 0.77778],
    8848: [0.03517, 0.54986, 0, 0, 0.77778],
    8858: [0.08198, 0.58198, 0, 0, 0.77778],
    8859: [0.08198, 0.58198, 0, 0, 0.77778],
    8861: [0.08198, 0.58198, 0, 0, 0.77778],
    8862: [0, 0.675, 0, 0, 0.77778],
    8863: [0, 0.675, 0, 0, 0.77778],
    8864: [0, 0.675, 0, 0, 0.77778],
    8865: [0, 0.675, 0, 0, 0.77778],
    8872: [0, 0.69224, 0, 0, 0.61111],
    8873: [0, 0.69224, 0, 0, 0.72222],
    8874: [0, 0.69224, 0, 0, 0.88889],
    8876: [0, 0.68889, 0, 0, 0.61111],
    8877: [0, 0.68889, 0, 0, 0.61111],
    8878: [0, 0.68889, 0, 0, 0.72222],
    8879: [0, 0.68889, 0, 0, 0.72222],
    8882: [0.03517, 0.54986, 0, 0, 0.77778],
    8883: [0.03517, 0.54986, 0, 0, 0.77778],
    8884: [0.13667, 0.63667, 0, 0, 0.77778],
    8885: [0.13667, 0.63667, 0, 0, 0.77778],
    8888: [0, 0.54986, 0, 0, 1.11111],
    8890: [0.19444, 0.43056, 0, 0, 0.55556],
    8891: [0.19444, 0.69224, 0, 0, 0.61111],
    8892: [0.19444, 0.69224, 0, 0, 0.61111],
    8901: [0, 0.54986, 0, 0, 0.27778],
    8903: [0.08167, 0.58167, 0, 0, 0.77778],
    8905: [0.08167, 0.58167, 0, 0, 0.77778],
    8906: [0.08167, 0.58167, 0, 0, 0.77778],
    8907: [0, 0.69224, 0, 0, 0.77778],
    8908: [0, 0.69224, 0, 0, 0.77778],
    8909: [-0.03598, 0.46402, 0, 0, 0.77778],
    8910: [0, 0.54986, 0, 0, 0.76042],
    8911: [0, 0.54986, 0, 0, 0.76042],
    8912: [0.03517, 0.54986, 0, 0, 0.77778],
    8913: [0.03517, 0.54986, 0, 0, 0.77778],
    8914: [0, 0.54986, 0, 0, 0.66667],
    8915: [0, 0.54986, 0, 0, 0.66667],
    8916: [0, 0.69224, 0, 0, 0.66667],
    8918: [0.0391, 0.5391, 0, 0, 0.77778],
    8919: [0.0391, 0.5391, 0, 0, 0.77778],
    8920: [0.03517, 0.54986, 0, 0, 1.33334],
    8921: [0.03517, 0.54986, 0, 0, 1.33334],
    8922: [0.38569, 0.88569, 0, 0, 0.77778],
    8923: [0.38569, 0.88569, 0, 0, 0.77778],
    8926: [0.13667, 0.63667, 0, 0, 0.77778],
    8927: [0.13667, 0.63667, 0, 0, 0.77778],
    8928: [0.30274, 0.79383, 0, 0, 0.77778],
    8929: [0.30274, 0.79383, 0, 0, 0.77778],
    8934: [0.23222, 0.74111, 0, 0, 0.77778],
    8935: [0.23222, 0.74111, 0, 0, 0.77778],
    8936: [0.23222, 0.74111, 0, 0, 0.77778],
    8937: [0.23222, 0.74111, 0, 0, 0.77778],
    8938: [0.20576, 0.70576, 0, 0, 0.77778],
    8939: [0.20576, 0.70576, 0, 0, 0.77778],
    8940: [0.30274, 0.79383, 0, 0, 0.77778],
    8941: [0.30274, 0.79383, 0, 0, 0.77778],
    8994: [0.19444, 0.69224, 0, 0, 0.77778],
    8995: [0.19444, 0.69224, 0, 0, 0.77778],
    9416: [0.15559, 0.69224, 0, 0, 0.90222],
    9484: [0, 0.69224, 0, 0, 0.5],
    9488: [0, 0.69224, 0, 0, 0.5],
    9492: [0, 0.37788, 0, 0, 0.5],
    9496: [0, 0.37788, 0, 0, 0.5],
    9585: [0.19444, 0.68889, 0, 0, 0.88889],
    9586: [0.19444, 0.74111, 0, 0, 0.88889],
    9632: [0, 0.675, 0, 0, 0.77778],
    9633: [0, 0.675, 0, 0, 0.77778],
    9650: [0, 0.54986, 0, 0, 0.72222],
    9651: [0, 0.54986, 0, 0, 0.72222],
    9654: [0.03517, 0.54986, 0, 0, 0.77778],
    9660: [0, 0.54986, 0, 0, 0.72222],
    9661: [0, 0.54986, 0, 0, 0.72222],
    9664: [0.03517, 0.54986, 0, 0, 0.77778],
    9674: [0.11111, 0.69224, 0, 0, 0.66667],
    9733: [0.19444, 0.69224, 0, 0, 0.94445],
    10003: [0, 0.69224, 0, 0, 0.83334],
    10016: [0, 0.69224, 0, 0, 0.83334],
    10731: [0.11111, 0.69224, 0, 0, 0.66667],
    10846: [0.19444, 0.75583, 0, 0, 0.61111],
    10877: [0.13667, 0.63667, 0, 0, 0.77778],
    10878: [0.13667, 0.63667, 0, 0, 0.77778],
    10885: [0.25583, 0.75583, 0, 0, 0.77778],
    10886: [0.25583, 0.75583, 0, 0, 0.77778],
    10887: [0.13597, 0.63597, 0, 0, 0.77778],
    10888: [0.13597, 0.63597, 0, 0, 0.77778],
    10889: [0.26167, 0.75726, 0, 0, 0.77778],
    10890: [0.26167, 0.75726, 0, 0, 0.77778],
    10891: [0.48256, 0.98256, 0, 0, 0.77778],
    10892: [0.48256, 0.98256, 0, 0, 0.77778],
    10901: [0.13667, 0.63667, 0, 0, 0.77778],
    10902: [0.13667, 0.63667, 0, 0, 0.77778],
    10933: [0.25142, 0.75726, 0, 0, 0.77778],
    10934: [0.25142, 0.75726, 0, 0, 0.77778],
    10935: [0.26167, 0.75726, 0, 0, 0.77778],
    10936: [0.26167, 0.75726, 0, 0, 0.77778],
    10937: [0.26167, 0.75726, 0, 0, 0.77778],
    10938: [0.26167, 0.75726, 0, 0, 0.77778],
    10949: [0.25583, 0.75583, 0, 0, 0.77778],
    10950: [0.25583, 0.75583, 0, 0, 0.77778],
    10955: [0.28481, 0.79383, 0, 0, 0.77778],
    10956: [0.28481, 0.79383, 0, 0, 0.77778],
    57350: [0.08167, 0.58167, 0, 0, 0.22222],
    57351: [0.08167, 0.58167, 0, 0, 0.38889],
    57352: [0.08167, 0.58167, 0, 0, 0.77778],
    57353: [0, 0.43056, 0.04028, 0, 0.66667],
    57356: [0.25142, 0.75726, 0, 0, 0.77778],
    57357: [0.25142, 0.75726, 0, 0, 0.77778],
    57358: [0.41951, 0.91951, 0, 0, 0.77778],
    57359: [0.30274, 0.79383, 0, 0, 0.77778],
    57360: [0.30274, 0.79383, 0, 0, 0.77778],
    57361: [0.41951, 0.91951, 0, 0, 0.77778],
    57366: [0.25142, 0.75726, 0, 0, 0.77778],
    57367: [0.25142, 0.75726, 0, 0, 0.77778],
    57368: [0.25142, 0.75726, 0, 0, 0.77778],
    57369: [0.25142, 0.75726, 0, 0, 0.77778],
    57370: [0.13597, 0.63597, 0, 0, 0.77778],
    57371: [0.13597, 0.63597, 0, 0, 0.77778]
  },
  "Caligraphic-Regular": {
    32: [0, 0, 0, 0, 0.25],
    65: [0, 0.68333, 0, 0.19445, 0.79847],
    66: [0, 0.68333, 0.03041, 0.13889, 0.65681],
    67: [0, 0.68333, 0.05834, 0.13889, 0.52653],
    68: [0, 0.68333, 0.02778, 0.08334, 0.77139],
    69: [0, 0.68333, 0.08944, 0.11111, 0.52778],
    70: [0, 0.68333, 0.09931, 0.11111, 0.71875],
    71: [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],
    72: [0, 0.68333, 965e-5, 0.11111, 0.84452],
    73: [0, 0.68333, 0.07382, 0, 0.54452],
    74: [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],
    75: [0, 0.68333, 0.01445, 0.05556, 0.76195],
    76: [0, 0.68333, 0, 0.13889, 0.68972],
    77: [0, 0.68333, 0, 0.13889, 1.2009],
    78: [0, 0.68333, 0.14736, 0.08334, 0.82049],
    79: [0, 0.68333, 0.02778, 0.11111, 0.79611],
    80: [0, 0.68333, 0.08222, 0.08334, 0.69556],
    81: [0.09722, 0.68333, 0, 0.11111, 0.81667],
    82: [0, 0.68333, 0, 0.08334, 0.8475],
    83: [0, 0.68333, 0.075, 0.13889, 0.60556],
    84: [0, 0.68333, 0.25417, 0, 0.54464],
    85: [0, 0.68333, 0.09931, 0.08334, 0.62583],
    86: [0, 0.68333, 0.08222, 0, 0.61278],
    87: [0, 0.68333, 0.08222, 0.08334, 0.98778],
    88: [0, 0.68333, 0.14643, 0.13889, 0.7133],
    89: [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
    90: [0, 0.68333, 0.07944, 0.13889, 0.72473],
    160: [0, 0, 0, 0, 0.25]
  },
  "Fraktur-Regular": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69141, 0, 0, 0.29574],
    34: [0, 0.69141, 0, 0, 0.21471],
    38: [0, 0.69141, 0, 0, 0.73786],
    39: [0, 0.69141, 0, 0, 0.21201],
    40: [0.24982, 0.74947, 0, 0, 0.38865],
    41: [0.24982, 0.74947, 0, 0, 0.38865],
    42: [0, 0.62119, 0, 0, 0.27764],
    43: [0.08319, 0.58283, 0, 0, 0.75623],
    44: [0, 0.10803, 0, 0, 0.27764],
    45: [0.08319, 0.58283, 0, 0, 0.75623],
    46: [0, 0.10803, 0, 0, 0.27764],
    47: [0.24982, 0.74947, 0, 0, 0.50181],
    48: [0, 0.47534, 0, 0, 0.50181],
    49: [0, 0.47534, 0, 0, 0.50181],
    50: [0, 0.47534, 0, 0, 0.50181],
    51: [0.18906, 0.47534, 0, 0, 0.50181],
    52: [0.18906, 0.47534, 0, 0, 0.50181],
    53: [0.18906, 0.47534, 0, 0, 0.50181],
    54: [0, 0.69141, 0, 0, 0.50181],
    55: [0.18906, 0.47534, 0, 0, 0.50181],
    56: [0, 0.69141, 0, 0, 0.50181],
    57: [0.18906, 0.47534, 0, 0, 0.50181],
    58: [0, 0.47534, 0, 0, 0.21606],
    59: [0.12604, 0.47534, 0, 0, 0.21606],
    61: [-0.13099, 0.36866, 0, 0, 0.75623],
    63: [0, 0.69141, 0, 0, 0.36245],
    65: [0, 0.69141, 0, 0, 0.7176],
    66: [0, 0.69141, 0, 0, 0.88397],
    67: [0, 0.69141, 0, 0, 0.61254],
    68: [0, 0.69141, 0, 0, 0.83158],
    69: [0, 0.69141, 0, 0, 0.66278],
    70: [0.12604, 0.69141, 0, 0, 0.61119],
    71: [0, 0.69141, 0, 0, 0.78539],
    72: [0.06302, 0.69141, 0, 0, 0.7203],
    73: [0, 0.69141, 0, 0, 0.55448],
    74: [0.12604, 0.69141, 0, 0, 0.55231],
    75: [0, 0.69141, 0, 0, 0.66845],
    76: [0, 0.69141, 0, 0, 0.66602],
    77: [0, 0.69141, 0, 0, 1.04953],
    78: [0, 0.69141, 0, 0, 0.83212],
    79: [0, 0.69141, 0, 0, 0.82699],
    80: [0.18906, 0.69141, 0, 0, 0.82753],
    81: [0.03781, 0.69141, 0, 0, 0.82699],
    82: [0, 0.69141, 0, 0, 0.82807],
    83: [0, 0.69141, 0, 0, 0.82861],
    84: [0, 0.69141, 0, 0, 0.66899],
    85: [0, 0.69141, 0, 0, 0.64576],
    86: [0, 0.69141, 0, 0, 0.83131],
    87: [0, 0.69141, 0, 0, 1.04602],
    88: [0, 0.69141, 0, 0, 0.71922],
    89: [0.18906, 0.69141, 0, 0, 0.83293],
    90: [0.12604, 0.69141, 0, 0, 0.60201],
    91: [0.24982, 0.74947, 0, 0, 0.27764],
    93: [0.24982, 0.74947, 0, 0, 0.27764],
    94: [0, 0.69141, 0, 0, 0.49965],
    97: [0, 0.47534, 0, 0, 0.50046],
    98: [0, 0.69141, 0, 0, 0.51315],
    99: [0, 0.47534, 0, 0, 0.38946],
    100: [0, 0.62119, 0, 0, 0.49857],
    101: [0, 0.47534, 0, 0, 0.40053],
    102: [0.18906, 0.69141, 0, 0, 0.32626],
    103: [0.18906, 0.47534, 0, 0, 0.5037],
    104: [0.18906, 0.69141, 0, 0, 0.52126],
    105: [0, 0.69141, 0, 0, 0.27899],
    106: [0, 0.69141, 0, 0, 0.28088],
    107: [0, 0.69141, 0, 0, 0.38946],
    108: [0, 0.69141, 0, 0, 0.27953],
    109: [0, 0.47534, 0, 0, 0.76676],
    110: [0, 0.47534, 0, 0, 0.52666],
    111: [0, 0.47534, 0, 0, 0.48885],
    112: [0.18906, 0.52396, 0, 0, 0.50046],
    113: [0.18906, 0.47534, 0, 0, 0.48912],
    114: [0, 0.47534, 0, 0, 0.38919],
    115: [0, 0.47534, 0, 0, 0.44266],
    116: [0, 0.62119, 0, 0, 0.33301],
    117: [0, 0.47534, 0, 0, 0.5172],
    118: [0, 0.52396, 0, 0, 0.5118],
    119: [0, 0.52396, 0, 0, 0.77351],
    120: [0.18906, 0.47534, 0, 0, 0.38865],
    121: [0.18906, 0.47534, 0, 0, 0.49884],
    122: [0.18906, 0.47534, 0, 0, 0.39054],
    160: [0, 0, 0, 0, 0.25],
    8216: [0, 0.69141, 0, 0, 0.21471],
    8217: [0, 0.69141, 0, 0, 0.21471],
    58112: [0, 0.62119, 0, 0, 0.49749],
    58113: [0, 0.62119, 0, 0, 0.4983],
    58114: [0.18906, 0.69141, 0, 0, 0.33328],
    58115: [0.18906, 0.69141, 0, 0, 0.32923],
    58116: [0.18906, 0.47534, 0, 0, 0.50343],
    58117: [0, 0.69141, 0, 0, 0.33301],
    58118: [0, 0.62119, 0, 0, 0.33409],
    58119: [0, 0.47534, 0, 0, 0.50073]
  },
  "Main-Bold": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.35],
    34: [0, 0.69444, 0, 0, 0.60278],
    35: [0.19444, 0.69444, 0, 0, 0.95833],
    36: [0.05556, 0.75, 0, 0, 0.575],
    37: [0.05556, 0.75, 0, 0, 0.95833],
    38: [0, 0.69444, 0, 0, 0.89444],
    39: [0, 0.69444, 0, 0, 0.31944],
    40: [0.25, 0.75, 0, 0, 0.44722],
    41: [0.25, 0.75, 0, 0, 0.44722],
    42: [0, 0.75, 0, 0, 0.575],
    43: [0.13333, 0.63333, 0, 0, 0.89444],
    44: [0.19444, 0.15556, 0, 0, 0.31944],
    45: [0, 0.44444, 0, 0, 0.38333],
    46: [0, 0.15556, 0, 0, 0.31944],
    47: [0.25, 0.75, 0, 0, 0.575],
    48: [0, 0.64444, 0, 0, 0.575],
    49: [0, 0.64444, 0, 0, 0.575],
    50: [0, 0.64444, 0, 0, 0.575],
    51: [0, 0.64444, 0, 0, 0.575],
    52: [0, 0.64444, 0, 0, 0.575],
    53: [0, 0.64444, 0, 0, 0.575],
    54: [0, 0.64444, 0, 0, 0.575],
    55: [0, 0.64444, 0, 0, 0.575],
    56: [0, 0.64444, 0, 0, 0.575],
    57: [0, 0.64444, 0, 0, 0.575],
    58: [0, 0.44444, 0, 0, 0.31944],
    59: [0.19444, 0.44444, 0, 0, 0.31944],
    60: [0.08556, 0.58556, 0, 0, 0.89444],
    61: [-0.10889, 0.39111, 0, 0, 0.89444],
    62: [0.08556, 0.58556, 0, 0, 0.89444],
    63: [0, 0.69444, 0, 0, 0.54305],
    64: [0, 0.69444, 0, 0, 0.89444],
    65: [0, 0.68611, 0, 0, 0.86944],
    66: [0, 0.68611, 0, 0, 0.81805],
    67: [0, 0.68611, 0, 0, 0.83055],
    68: [0, 0.68611, 0, 0, 0.88194],
    69: [0, 0.68611, 0, 0, 0.75555],
    70: [0, 0.68611, 0, 0, 0.72361],
    71: [0, 0.68611, 0, 0, 0.90416],
    72: [0, 0.68611, 0, 0, 0.9],
    73: [0, 0.68611, 0, 0, 0.43611],
    74: [0, 0.68611, 0, 0, 0.59444],
    75: [0, 0.68611, 0, 0, 0.90138],
    76: [0, 0.68611, 0, 0, 0.69166],
    77: [0, 0.68611, 0, 0, 1.09166],
    78: [0, 0.68611, 0, 0, 0.9],
    79: [0, 0.68611, 0, 0, 0.86388],
    80: [0, 0.68611, 0, 0, 0.78611],
    81: [0.19444, 0.68611, 0, 0, 0.86388],
    82: [0, 0.68611, 0, 0, 0.8625],
    83: [0, 0.68611, 0, 0, 0.63889],
    84: [0, 0.68611, 0, 0, 0.8],
    85: [0, 0.68611, 0, 0, 0.88472],
    86: [0, 0.68611, 0.01597, 0, 0.86944],
    87: [0, 0.68611, 0.01597, 0, 1.18888],
    88: [0, 0.68611, 0, 0, 0.86944],
    89: [0, 0.68611, 0.02875, 0, 0.86944],
    90: [0, 0.68611, 0, 0, 0.70277],
    91: [0.25, 0.75, 0, 0, 0.31944],
    92: [0.25, 0.75, 0, 0, 0.575],
    93: [0.25, 0.75, 0, 0, 0.31944],
    94: [0, 0.69444, 0, 0, 0.575],
    95: [0.31, 0.13444, 0.03194, 0, 0.575],
    97: [0, 0.44444, 0, 0, 0.55902],
    98: [0, 0.69444, 0, 0, 0.63889],
    99: [0, 0.44444, 0, 0, 0.51111],
    100: [0, 0.69444, 0, 0, 0.63889],
    101: [0, 0.44444, 0, 0, 0.52708],
    102: [0, 0.69444, 0.10903, 0, 0.35139],
    103: [0.19444, 0.44444, 0.01597, 0, 0.575],
    104: [0, 0.69444, 0, 0, 0.63889],
    105: [0, 0.69444, 0, 0, 0.31944],
    106: [0.19444, 0.69444, 0, 0, 0.35139],
    107: [0, 0.69444, 0, 0, 0.60694],
    108: [0, 0.69444, 0, 0, 0.31944],
    109: [0, 0.44444, 0, 0, 0.95833],
    110: [0, 0.44444, 0, 0, 0.63889],
    111: [0, 0.44444, 0, 0, 0.575],
    112: [0.19444, 0.44444, 0, 0, 0.63889],
    113: [0.19444, 0.44444, 0, 0, 0.60694],
    114: [0, 0.44444, 0, 0, 0.47361],
    115: [0, 0.44444, 0, 0, 0.45361],
    116: [0, 0.63492, 0, 0, 0.44722],
    117: [0, 0.44444, 0, 0, 0.63889],
    118: [0, 0.44444, 0.01597, 0, 0.60694],
    119: [0, 0.44444, 0.01597, 0, 0.83055],
    120: [0, 0.44444, 0, 0, 0.60694],
    121: [0.19444, 0.44444, 0.01597, 0, 0.60694],
    122: [0, 0.44444, 0, 0, 0.51111],
    123: [0.25, 0.75, 0, 0, 0.575],
    124: [0.25, 0.75, 0, 0, 0.31944],
    125: [0.25, 0.75, 0, 0, 0.575],
    126: [0.35, 0.34444, 0, 0, 0.575],
    160: [0, 0, 0, 0, 0.25],
    163: [0, 0.69444, 0, 0, 0.86853],
    168: [0, 0.69444, 0, 0, 0.575],
    172: [0, 0.44444, 0, 0, 0.76666],
    176: [0, 0.69444, 0, 0, 0.86944],
    177: [0.13333, 0.63333, 0, 0, 0.89444],
    184: [0.17014, 0, 0, 0, 0.51111],
    198: [0, 0.68611, 0, 0, 1.04166],
    215: [0.13333, 0.63333, 0, 0, 0.89444],
    216: [0.04861, 0.73472, 0, 0, 0.89444],
    223: [0, 0.69444, 0, 0, 0.59722],
    230: [0, 0.44444, 0, 0, 0.83055],
    247: [0.13333, 0.63333, 0, 0, 0.89444],
    248: [0.09722, 0.54167, 0, 0, 0.575],
    305: [0, 0.44444, 0, 0, 0.31944],
    338: [0, 0.68611, 0, 0, 1.16944],
    339: [0, 0.44444, 0, 0, 0.89444],
    567: [0.19444, 0.44444, 0, 0, 0.35139],
    710: [0, 0.69444, 0, 0, 0.575],
    711: [0, 0.63194, 0, 0, 0.575],
    713: [0, 0.59611, 0, 0, 0.575],
    714: [0, 0.69444, 0, 0, 0.575],
    715: [0, 0.69444, 0, 0, 0.575],
    728: [0, 0.69444, 0, 0, 0.575],
    729: [0, 0.69444, 0, 0, 0.31944],
    730: [0, 0.69444, 0, 0, 0.86944],
    732: [0, 0.69444, 0, 0, 0.575],
    733: [0, 0.69444, 0, 0, 0.575],
    915: [0, 0.68611, 0, 0, 0.69166],
    916: [0, 0.68611, 0, 0, 0.95833],
    920: [0, 0.68611, 0, 0, 0.89444],
    923: [0, 0.68611, 0, 0, 0.80555],
    926: [0, 0.68611, 0, 0, 0.76666],
    928: [0, 0.68611, 0, 0, 0.9],
    931: [0, 0.68611, 0, 0, 0.83055],
    933: [0, 0.68611, 0, 0, 0.89444],
    934: [0, 0.68611, 0, 0, 0.83055],
    936: [0, 0.68611, 0, 0, 0.89444],
    937: [0, 0.68611, 0, 0, 0.83055],
    8211: [0, 0.44444, 0.03194, 0, 0.575],
    8212: [0, 0.44444, 0.03194, 0, 1.14999],
    8216: [0, 0.69444, 0, 0, 0.31944],
    8217: [0, 0.69444, 0, 0, 0.31944],
    8220: [0, 0.69444, 0, 0, 0.60278],
    8221: [0, 0.69444, 0, 0, 0.60278],
    8224: [0.19444, 0.69444, 0, 0, 0.51111],
    8225: [0.19444, 0.69444, 0, 0, 0.51111],
    8242: [0, 0.55556, 0, 0, 0.34444],
    8407: [0, 0.72444, 0.15486, 0, 0.575],
    8463: [0, 0.69444, 0, 0, 0.66759],
    8465: [0, 0.69444, 0, 0, 0.83055],
    8467: [0, 0.69444, 0, 0, 0.47361],
    8472: [0.19444, 0.44444, 0, 0, 0.74027],
    8476: [0, 0.69444, 0, 0, 0.83055],
    8501: [0, 0.69444, 0, 0, 0.70277],
    8592: [-0.10889, 0.39111, 0, 0, 1.14999],
    8593: [0.19444, 0.69444, 0, 0, 0.575],
    8594: [-0.10889, 0.39111, 0, 0, 1.14999],
    8595: [0.19444, 0.69444, 0, 0, 0.575],
    8596: [-0.10889, 0.39111, 0, 0, 1.14999],
    8597: [0.25, 0.75, 0, 0, 0.575],
    8598: [0.19444, 0.69444, 0, 0, 1.14999],
    8599: [0.19444, 0.69444, 0, 0, 1.14999],
    8600: [0.19444, 0.69444, 0, 0, 1.14999],
    8601: [0.19444, 0.69444, 0, 0, 1.14999],
    8636: [-0.10889, 0.39111, 0, 0, 1.14999],
    8637: [-0.10889, 0.39111, 0, 0, 1.14999],
    8640: [-0.10889, 0.39111, 0, 0, 1.14999],
    8641: [-0.10889, 0.39111, 0, 0, 1.14999],
    8656: [-0.10889, 0.39111, 0, 0, 1.14999],
    8657: [0.19444, 0.69444, 0, 0, 0.70277],
    8658: [-0.10889, 0.39111, 0, 0, 1.14999],
    8659: [0.19444, 0.69444, 0, 0, 0.70277],
    8660: [-0.10889, 0.39111, 0, 0, 1.14999],
    8661: [0.25, 0.75, 0, 0, 0.70277],
    8704: [0, 0.69444, 0, 0, 0.63889],
    8706: [0, 0.69444, 0.06389, 0, 0.62847],
    8707: [0, 0.69444, 0, 0, 0.63889],
    8709: [0.05556, 0.75, 0, 0, 0.575],
    8711: [0, 0.68611, 0, 0, 0.95833],
    8712: [0.08556, 0.58556, 0, 0, 0.76666],
    8715: [0.08556, 0.58556, 0, 0, 0.76666],
    8722: [0.13333, 0.63333, 0, 0, 0.89444],
    8723: [0.13333, 0.63333, 0, 0, 0.89444],
    8725: [0.25, 0.75, 0, 0, 0.575],
    8726: [0.25, 0.75, 0, 0, 0.575],
    8727: [-0.02778, 0.47222, 0, 0, 0.575],
    8728: [-0.02639, 0.47361, 0, 0, 0.575],
    8729: [-0.02639, 0.47361, 0, 0, 0.575],
    8730: [0.18, 0.82, 0, 0, 0.95833],
    8733: [0, 0.44444, 0, 0, 0.89444],
    8734: [0, 0.44444, 0, 0, 1.14999],
    8736: [0, 0.69224, 0, 0, 0.72222],
    8739: [0.25, 0.75, 0, 0, 0.31944],
    8741: [0.25, 0.75, 0, 0, 0.575],
    8743: [0, 0.55556, 0, 0, 0.76666],
    8744: [0, 0.55556, 0, 0, 0.76666],
    8745: [0, 0.55556, 0, 0, 0.76666],
    8746: [0, 0.55556, 0, 0, 0.76666],
    8747: [0.19444, 0.69444, 0.12778, 0, 0.56875],
    8764: [-0.10889, 0.39111, 0, 0, 0.89444],
    8768: [0.19444, 0.69444, 0, 0, 0.31944],
    8771: [222e-5, 0.50222, 0, 0, 0.89444],
    8773: [0.027, 0.638, 0, 0, 0.894],
    8776: [0.02444, 0.52444, 0, 0, 0.89444],
    8781: [222e-5, 0.50222, 0, 0, 0.89444],
    8801: [222e-5, 0.50222, 0, 0, 0.89444],
    8804: [0.19667, 0.69667, 0, 0, 0.89444],
    8805: [0.19667, 0.69667, 0, 0, 0.89444],
    8810: [0.08556, 0.58556, 0, 0, 1.14999],
    8811: [0.08556, 0.58556, 0, 0, 1.14999],
    8826: [0.08556, 0.58556, 0, 0, 0.89444],
    8827: [0.08556, 0.58556, 0, 0, 0.89444],
    8834: [0.08556, 0.58556, 0, 0, 0.89444],
    8835: [0.08556, 0.58556, 0, 0, 0.89444],
    8838: [0.19667, 0.69667, 0, 0, 0.89444],
    8839: [0.19667, 0.69667, 0, 0, 0.89444],
    8846: [0, 0.55556, 0, 0, 0.76666],
    8849: [0.19667, 0.69667, 0, 0, 0.89444],
    8850: [0.19667, 0.69667, 0, 0, 0.89444],
    8851: [0, 0.55556, 0, 0, 0.76666],
    8852: [0, 0.55556, 0, 0, 0.76666],
    8853: [0.13333, 0.63333, 0, 0, 0.89444],
    8854: [0.13333, 0.63333, 0, 0, 0.89444],
    8855: [0.13333, 0.63333, 0, 0, 0.89444],
    8856: [0.13333, 0.63333, 0, 0, 0.89444],
    8857: [0.13333, 0.63333, 0, 0, 0.89444],
    8866: [0, 0.69444, 0, 0, 0.70277],
    8867: [0, 0.69444, 0, 0, 0.70277],
    8868: [0, 0.69444, 0, 0, 0.89444],
    8869: [0, 0.69444, 0, 0, 0.89444],
    8900: [-0.02639, 0.47361, 0, 0, 0.575],
    8901: [-0.02639, 0.47361, 0, 0, 0.31944],
    8902: [-0.02778, 0.47222, 0, 0, 0.575],
    8968: [0.25, 0.75, 0, 0, 0.51111],
    8969: [0.25, 0.75, 0, 0, 0.51111],
    8970: [0.25, 0.75, 0, 0, 0.51111],
    8971: [0.25, 0.75, 0, 0, 0.51111],
    8994: [-0.13889, 0.36111, 0, 0, 1.14999],
    8995: [-0.13889, 0.36111, 0, 0, 1.14999],
    9651: [0.19444, 0.69444, 0, 0, 1.02222],
    9657: [-0.02778, 0.47222, 0, 0, 0.575],
    9661: [0.19444, 0.69444, 0, 0, 1.02222],
    9667: [-0.02778, 0.47222, 0, 0, 0.575],
    9711: [0.19444, 0.69444, 0, 0, 1.14999],
    9824: [0.12963, 0.69444, 0, 0, 0.89444],
    9825: [0.12963, 0.69444, 0, 0, 0.89444],
    9826: [0.12963, 0.69444, 0, 0, 0.89444],
    9827: [0.12963, 0.69444, 0, 0, 0.89444],
    9837: [0, 0.75, 0, 0, 0.44722],
    9838: [0.19444, 0.69444, 0, 0, 0.44722],
    9839: [0.19444, 0.69444, 0, 0, 0.44722],
    10216: [0.25, 0.75, 0, 0, 0.44722],
    10217: [0.25, 0.75, 0, 0, 0.44722],
    10815: [0, 0.68611, 0, 0, 0.9],
    10927: [0.19667, 0.69667, 0, 0, 0.89444],
    10928: [0.19667, 0.69667, 0, 0, 0.89444],
    57376: [0.19444, 0.69444, 0, 0, 0]
  },
  "Main-BoldItalic": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0.11417, 0, 0.38611],
    34: [0, 0.69444, 0.07939, 0, 0.62055],
    35: [0.19444, 0.69444, 0.06833, 0, 0.94444],
    37: [0.05556, 0.75, 0.12861, 0, 0.94444],
    38: [0, 0.69444, 0.08528, 0, 0.88555],
    39: [0, 0.69444, 0.12945, 0, 0.35555],
    40: [0.25, 0.75, 0.15806, 0, 0.47333],
    41: [0.25, 0.75, 0.03306, 0, 0.47333],
    42: [0, 0.75, 0.14333, 0, 0.59111],
    43: [0.10333, 0.60333, 0.03306, 0, 0.88555],
    44: [0.19444, 0.14722, 0, 0, 0.35555],
    45: [0, 0.44444, 0.02611, 0, 0.41444],
    46: [0, 0.14722, 0, 0, 0.35555],
    47: [0.25, 0.75, 0.15806, 0, 0.59111],
    48: [0, 0.64444, 0.13167, 0, 0.59111],
    49: [0, 0.64444, 0.13167, 0, 0.59111],
    50: [0, 0.64444, 0.13167, 0, 0.59111],
    51: [0, 0.64444, 0.13167, 0, 0.59111],
    52: [0.19444, 0.64444, 0.13167, 0, 0.59111],
    53: [0, 0.64444, 0.13167, 0, 0.59111],
    54: [0, 0.64444, 0.13167, 0, 0.59111],
    55: [0.19444, 0.64444, 0.13167, 0, 0.59111],
    56: [0, 0.64444, 0.13167, 0, 0.59111],
    57: [0, 0.64444, 0.13167, 0, 0.59111],
    58: [0, 0.44444, 0.06695, 0, 0.35555],
    59: [0.19444, 0.44444, 0.06695, 0, 0.35555],
    61: [-0.10889, 0.39111, 0.06833, 0, 0.88555],
    63: [0, 0.69444, 0.11472, 0, 0.59111],
    64: [0, 0.69444, 0.09208, 0, 0.88555],
    65: [0, 0.68611, 0, 0, 0.86555],
    66: [0, 0.68611, 0.0992, 0, 0.81666],
    67: [0, 0.68611, 0.14208, 0, 0.82666],
    68: [0, 0.68611, 0.09062, 0, 0.87555],
    69: [0, 0.68611, 0.11431, 0, 0.75666],
    70: [0, 0.68611, 0.12903, 0, 0.72722],
    71: [0, 0.68611, 0.07347, 0, 0.89527],
    72: [0, 0.68611, 0.17208, 0, 0.8961],
    73: [0, 0.68611, 0.15681, 0, 0.47166],
    74: [0, 0.68611, 0.145, 0, 0.61055],
    75: [0, 0.68611, 0.14208, 0, 0.89499],
    76: [0, 0.68611, 0, 0, 0.69777],
    77: [0, 0.68611, 0.17208, 0, 1.07277],
    78: [0, 0.68611, 0.17208, 0, 0.8961],
    79: [0, 0.68611, 0.09062, 0, 0.85499],
    80: [0, 0.68611, 0.0992, 0, 0.78721],
    81: [0.19444, 0.68611, 0.09062, 0, 0.85499],
    82: [0, 0.68611, 0.02559, 0, 0.85944],
    83: [0, 0.68611, 0.11264, 0, 0.64999],
    84: [0, 0.68611, 0.12903, 0, 0.7961],
    85: [0, 0.68611, 0.17208, 0, 0.88083],
    86: [0, 0.68611, 0.18625, 0, 0.86555],
    87: [0, 0.68611, 0.18625, 0, 1.15999],
    88: [0, 0.68611, 0.15681, 0, 0.86555],
    89: [0, 0.68611, 0.19803, 0, 0.86555],
    90: [0, 0.68611, 0.14208, 0, 0.70888],
    91: [0.25, 0.75, 0.1875, 0, 0.35611],
    93: [0.25, 0.75, 0.09972, 0, 0.35611],
    94: [0, 0.69444, 0.06709, 0, 0.59111],
    95: [0.31, 0.13444, 0.09811, 0, 0.59111],
    97: [0, 0.44444, 0.09426, 0, 0.59111],
    98: [0, 0.69444, 0.07861, 0, 0.53222],
    99: [0, 0.44444, 0.05222, 0, 0.53222],
    100: [0, 0.69444, 0.10861, 0, 0.59111],
    101: [0, 0.44444, 0.085, 0, 0.53222],
    102: [0.19444, 0.69444, 0.21778, 0, 0.4],
    103: [0.19444, 0.44444, 0.105, 0, 0.53222],
    104: [0, 0.69444, 0.09426, 0, 0.59111],
    105: [0, 0.69326, 0.11387, 0, 0.35555],
    106: [0.19444, 0.69326, 0.1672, 0, 0.35555],
    107: [0, 0.69444, 0.11111, 0, 0.53222],
    108: [0, 0.69444, 0.10861, 0, 0.29666],
    109: [0, 0.44444, 0.09426, 0, 0.94444],
    110: [0, 0.44444, 0.09426, 0, 0.64999],
    111: [0, 0.44444, 0.07861, 0, 0.59111],
    112: [0.19444, 0.44444, 0.07861, 0, 0.59111],
    113: [0.19444, 0.44444, 0.105, 0, 0.53222],
    114: [0, 0.44444, 0.11111, 0, 0.50167],
    115: [0, 0.44444, 0.08167, 0, 0.48694],
    116: [0, 0.63492, 0.09639, 0, 0.385],
    117: [0, 0.44444, 0.09426, 0, 0.62055],
    118: [0, 0.44444, 0.11111, 0, 0.53222],
    119: [0, 0.44444, 0.11111, 0, 0.76777],
    120: [0, 0.44444, 0.12583, 0, 0.56055],
    121: [0.19444, 0.44444, 0.105, 0, 0.56166],
    122: [0, 0.44444, 0.13889, 0, 0.49055],
    126: [0.35, 0.34444, 0.11472, 0, 0.59111],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.69444, 0.11473, 0, 0.59111],
    176: [0, 0.69444, 0, 0, 0.94888],
    184: [0.17014, 0, 0, 0, 0.53222],
    198: [0, 0.68611, 0.11431, 0, 1.02277],
    216: [0.04861, 0.73472, 0.09062, 0, 0.88555],
    223: [0.19444, 0.69444, 0.09736, 0, 0.665],
    230: [0, 0.44444, 0.085, 0, 0.82666],
    248: [0.09722, 0.54167, 0.09458, 0, 0.59111],
    305: [0, 0.44444, 0.09426, 0, 0.35555],
    338: [0, 0.68611, 0.11431, 0, 1.14054],
    339: [0, 0.44444, 0.085, 0, 0.82666],
    567: [0.19444, 0.44444, 0.04611, 0, 0.385],
    710: [0, 0.69444, 0.06709, 0, 0.59111],
    711: [0, 0.63194, 0.08271, 0, 0.59111],
    713: [0, 0.59444, 0.10444, 0, 0.59111],
    714: [0, 0.69444, 0.08528, 0, 0.59111],
    715: [0, 0.69444, 0, 0, 0.59111],
    728: [0, 0.69444, 0.10333, 0, 0.59111],
    729: [0, 0.69444, 0.12945, 0, 0.35555],
    730: [0, 0.69444, 0, 0, 0.94888],
    732: [0, 0.69444, 0.11472, 0, 0.59111],
    733: [0, 0.69444, 0.11472, 0, 0.59111],
    915: [0, 0.68611, 0.12903, 0, 0.69777],
    916: [0, 0.68611, 0, 0, 0.94444],
    920: [0, 0.68611, 0.09062, 0, 0.88555],
    923: [0, 0.68611, 0, 0, 0.80666],
    926: [0, 0.68611, 0.15092, 0, 0.76777],
    928: [0, 0.68611, 0.17208, 0, 0.8961],
    931: [0, 0.68611, 0.11431, 0, 0.82666],
    933: [0, 0.68611, 0.10778, 0, 0.88555],
    934: [0, 0.68611, 0.05632, 0, 0.82666],
    936: [0, 0.68611, 0.10778, 0, 0.88555],
    937: [0, 0.68611, 0.0992, 0, 0.82666],
    8211: [0, 0.44444, 0.09811, 0, 0.59111],
    8212: [0, 0.44444, 0.09811, 0, 1.18221],
    8216: [0, 0.69444, 0.12945, 0, 0.35555],
    8217: [0, 0.69444, 0.12945, 0, 0.35555],
    8220: [0, 0.69444, 0.16772, 0, 0.62055],
    8221: [0, 0.69444, 0.07939, 0, 0.62055]
  },
  "Main-Italic": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0.12417, 0, 0.30667],
    34: [0, 0.69444, 0.06961, 0, 0.51444],
    35: [0.19444, 0.69444, 0.06616, 0, 0.81777],
    37: [0.05556, 0.75, 0.13639, 0, 0.81777],
    38: [0, 0.69444, 0.09694, 0, 0.76666],
    39: [0, 0.69444, 0.12417, 0, 0.30667],
    40: [0.25, 0.75, 0.16194, 0, 0.40889],
    41: [0.25, 0.75, 0.03694, 0, 0.40889],
    42: [0, 0.75, 0.14917, 0, 0.51111],
    43: [0.05667, 0.56167, 0.03694, 0, 0.76666],
    44: [0.19444, 0.10556, 0, 0, 0.30667],
    45: [0, 0.43056, 0.02826, 0, 0.35778],
    46: [0, 0.10556, 0, 0, 0.30667],
    47: [0.25, 0.75, 0.16194, 0, 0.51111],
    48: [0, 0.64444, 0.13556, 0, 0.51111],
    49: [0, 0.64444, 0.13556, 0, 0.51111],
    50: [0, 0.64444, 0.13556, 0, 0.51111],
    51: [0, 0.64444, 0.13556, 0, 0.51111],
    52: [0.19444, 0.64444, 0.13556, 0, 0.51111],
    53: [0, 0.64444, 0.13556, 0, 0.51111],
    54: [0, 0.64444, 0.13556, 0, 0.51111],
    55: [0.19444, 0.64444, 0.13556, 0, 0.51111],
    56: [0, 0.64444, 0.13556, 0, 0.51111],
    57: [0, 0.64444, 0.13556, 0, 0.51111],
    58: [0, 0.43056, 0.0582, 0, 0.30667],
    59: [0.19444, 0.43056, 0.0582, 0, 0.30667],
    61: [-0.13313, 0.36687, 0.06616, 0, 0.76666],
    63: [0, 0.69444, 0.1225, 0, 0.51111],
    64: [0, 0.69444, 0.09597, 0, 0.76666],
    65: [0, 0.68333, 0, 0, 0.74333],
    66: [0, 0.68333, 0.10257, 0, 0.70389],
    67: [0, 0.68333, 0.14528, 0, 0.71555],
    68: [0, 0.68333, 0.09403, 0, 0.755],
    69: [0, 0.68333, 0.12028, 0, 0.67833],
    70: [0, 0.68333, 0.13305, 0, 0.65277],
    71: [0, 0.68333, 0.08722, 0, 0.77361],
    72: [0, 0.68333, 0.16389, 0, 0.74333],
    73: [0, 0.68333, 0.15806, 0, 0.38555],
    74: [0, 0.68333, 0.14028, 0, 0.525],
    75: [0, 0.68333, 0.14528, 0, 0.76888],
    76: [0, 0.68333, 0, 0, 0.62722],
    77: [0, 0.68333, 0.16389, 0, 0.89666],
    78: [0, 0.68333, 0.16389, 0, 0.74333],
    79: [0, 0.68333, 0.09403, 0, 0.76666],
    80: [0, 0.68333, 0.10257, 0, 0.67833],
    81: [0.19444, 0.68333, 0.09403, 0, 0.76666],
    82: [0, 0.68333, 0.03868, 0, 0.72944],
    83: [0, 0.68333, 0.11972, 0, 0.56222],
    84: [0, 0.68333, 0.13305, 0, 0.71555],
    85: [0, 0.68333, 0.16389, 0, 0.74333],
    86: [0, 0.68333, 0.18361, 0, 0.74333],
    87: [0, 0.68333, 0.18361, 0, 0.99888],
    88: [0, 0.68333, 0.15806, 0, 0.74333],
    89: [0, 0.68333, 0.19383, 0, 0.74333],
    90: [0, 0.68333, 0.14528, 0, 0.61333],
    91: [0.25, 0.75, 0.1875, 0, 0.30667],
    93: [0.25, 0.75, 0.10528, 0, 0.30667],
    94: [0, 0.69444, 0.06646, 0, 0.51111],
    95: [0.31, 0.12056, 0.09208, 0, 0.51111],
    97: [0, 0.43056, 0.07671, 0, 0.51111],
    98: [0, 0.69444, 0.06312, 0, 0.46],
    99: [0, 0.43056, 0.05653, 0, 0.46],
    100: [0, 0.69444, 0.10333, 0, 0.51111],
    101: [0, 0.43056, 0.07514, 0, 0.46],
    102: [0.19444, 0.69444, 0.21194, 0, 0.30667],
    103: [0.19444, 0.43056, 0.08847, 0, 0.46],
    104: [0, 0.69444, 0.07671, 0, 0.51111],
    105: [0, 0.65536, 0.1019, 0, 0.30667],
    106: [0.19444, 0.65536, 0.14467, 0, 0.30667],
    107: [0, 0.69444, 0.10764, 0, 0.46],
    108: [0, 0.69444, 0.10333, 0, 0.25555],
    109: [0, 0.43056, 0.07671, 0, 0.81777],
    110: [0, 0.43056, 0.07671, 0, 0.56222],
    111: [0, 0.43056, 0.06312, 0, 0.51111],
    112: [0.19444, 0.43056, 0.06312, 0, 0.51111],
    113: [0.19444, 0.43056, 0.08847, 0, 0.46],
    114: [0, 0.43056, 0.10764, 0, 0.42166],
    115: [0, 0.43056, 0.08208, 0, 0.40889],
    116: [0, 0.61508, 0.09486, 0, 0.33222],
    117: [0, 0.43056, 0.07671, 0, 0.53666],
    118: [0, 0.43056, 0.10764, 0, 0.46],
    119: [0, 0.43056, 0.10764, 0, 0.66444],
    120: [0, 0.43056, 0.12042, 0, 0.46389],
    121: [0.19444, 0.43056, 0.08847, 0, 0.48555],
    122: [0, 0.43056, 0.12292, 0, 0.40889],
    126: [0.35, 0.31786, 0.11585, 0, 0.51111],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.66786, 0.10474, 0, 0.51111],
    176: [0, 0.69444, 0, 0, 0.83129],
    184: [0.17014, 0, 0, 0, 0.46],
    198: [0, 0.68333, 0.12028, 0, 0.88277],
    216: [0.04861, 0.73194, 0.09403, 0, 0.76666],
    223: [0.19444, 0.69444, 0.10514, 0, 0.53666],
    230: [0, 0.43056, 0.07514, 0, 0.71555],
    248: [0.09722, 0.52778, 0.09194, 0, 0.51111],
    338: [0, 0.68333, 0.12028, 0, 0.98499],
    339: [0, 0.43056, 0.07514, 0, 0.71555],
    710: [0, 0.69444, 0.06646, 0, 0.51111],
    711: [0, 0.62847, 0.08295, 0, 0.51111],
    713: [0, 0.56167, 0.10333, 0, 0.51111],
    714: [0, 0.69444, 0.09694, 0, 0.51111],
    715: [0, 0.69444, 0, 0, 0.51111],
    728: [0, 0.69444, 0.10806, 0, 0.51111],
    729: [0, 0.66786, 0.11752, 0, 0.30667],
    730: [0, 0.69444, 0, 0, 0.83129],
    732: [0, 0.66786, 0.11585, 0, 0.51111],
    733: [0, 0.69444, 0.1225, 0, 0.51111],
    915: [0, 0.68333, 0.13305, 0, 0.62722],
    916: [0, 0.68333, 0, 0, 0.81777],
    920: [0, 0.68333, 0.09403, 0, 0.76666],
    923: [0, 0.68333, 0, 0, 0.69222],
    926: [0, 0.68333, 0.15294, 0, 0.66444],
    928: [0, 0.68333, 0.16389, 0, 0.74333],
    931: [0, 0.68333, 0.12028, 0, 0.71555],
    933: [0, 0.68333, 0.11111, 0, 0.76666],
    934: [0, 0.68333, 0.05986, 0, 0.71555],
    936: [0, 0.68333, 0.11111, 0, 0.76666],
    937: [0, 0.68333, 0.10257, 0, 0.71555],
    8211: [0, 0.43056, 0.09208, 0, 0.51111],
    8212: [0, 0.43056, 0.09208, 0, 1.02222],
    8216: [0, 0.69444, 0.12417, 0, 0.30667],
    8217: [0, 0.69444, 0.12417, 0, 0.30667],
    8220: [0, 0.69444, 0.1685, 0, 0.51444],
    8221: [0, 0.69444, 0.06961, 0, 0.51444],
    8463: [0, 0.68889, 0, 0, 0.54028]
  },
  "Main-Regular": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.27778],
    34: [0, 0.69444, 0, 0, 0.5],
    35: [0.19444, 0.69444, 0, 0, 0.83334],
    36: [0.05556, 0.75, 0, 0, 0.5],
    37: [0.05556, 0.75, 0, 0, 0.83334],
    38: [0, 0.69444, 0, 0, 0.77778],
    39: [0, 0.69444, 0, 0, 0.27778],
    40: [0.25, 0.75, 0, 0, 0.38889],
    41: [0.25, 0.75, 0, 0, 0.38889],
    42: [0, 0.75, 0, 0, 0.5],
    43: [0.08333, 0.58333, 0, 0, 0.77778],
    44: [0.19444, 0.10556, 0, 0, 0.27778],
    45: [0, 0.43056, 0, 0, 0.33333],
    46: [0, 0.10556, 0, 0, 0.27778],
    47: [0.25, 0.75, 0, 0, 0.5],
    48: [0, 0.64444, 0, 0, 0.5],
    49: [0, 0.64444, 0, 0, 0.5],
    50: [0, 0.64444, 0, 0, 0.5],
    51: [0, 0.64444, 0, 0, 0.5],
    52: [0, 0.64444, 0, 0, 0.5],
    53: [0, 0.64444, 0, 0, 0.5],
    54: [0, 0.64444, 0, 0, 0.5],
    55: [0, 0.64444, 0, 0, 0.5],
    56: [0, 0.64444, 0, 0, 0.5],
    57: [0, 0.64444, 0, 0, 0.5],
    58: [0, 0.43056, 0, 0, 0.27778],
    59: [0.19444, 0.43056, 0, 0, 0.27778],
    60: [0.0391, 0.5391, 0, 0, 0.77778],
    61: [-0.13313, 0.36687, 0, 0, 0.77778],
    62: [0.0391, 0.5391, 0, 0, 0.77778],
    63: [0, 0.69444, 0, 0, 0.47222],
    64: [0, 0.69444, 0, 0, 0.77778],
    65: [0, 0.68333, 0, 0, 0.75],
    66: [0, 0.68333, 0, 0, 0.70834],
    67: [0, 0.68333, 0, 0, 0.72222],
    68: [0, 0.68333, 0, 0, 0.76389],
    69: [0, 0.68333, 0, 0, 0.68056],
    70: [0, 0.68333, 0, 0, 0.65278],
    71: [0, 0.68333, 0, 0, 0.78472],
    72: [0, 0.68333, 0, 0, 0.75],
    73: [0, 0.68333, 0, 0, 0.36111],
    74: [0, 0.68333, 0, 0, 0.51389],
    75: [0, 0.68333, 0, 0, 0.77778],
    76: [0, 0.68333, 0, 0, 0.625],
    77: [0, 0.68333, 0, 0, 0.91667],
    78: [0, 0.68333, 0, 0, 0.75],
    79: [0, 0.68333, 0, 0, 0.77778],
    80: [0, 0.68333, 0, 0, 0.68056],
    81: [0.19444, 0.68333, 0, 0, 0.77778],
    82: [0, 0.68333, 0, 0, 0.73611],
    83: [0, 0.68333, 0, 0, 0.55556],
    84: [0, 0.68333, 0, 0, 0.72222],
    85: [0, 0.68333, 0, 0, 0.75],
    86: [0, 0.68333, 0.01389, 0, 0.75],
    87: [0, 0.68333, 0.01389, 0, 1.02778],
    88: [0, 0.68333, 0, 0, 0.75],
    89: [0, 0.68333, 0.025, 0, 0.75],
    90: [0, 0.68333, 0, 0, 0.61111],
    91: [0.25, 0.75, 0, 0, 0.27778],
    92: [0.25, 0.75, 0, 0, 0.5],
    93: [0.25, 0.75, 0, 0, 0.27778],
    94: [0, 0.69444, 0, 0, 0.5],
    95: [0.31, 0.12056, 0.02778, 0, 0.5],
    97: [0, 0.43056, 0, 0, 0.5],
    98: [0, 0.69444, 0, 0, 0.55556],
    99: [0, 0.43056, 0, 0, 0.44445],
    100: [0, 0.69444, 0, 0, 0.55556],
    101: [0, 0.43056, 0, 0, 0.44445],
    102: [0, 0.69444, 0.07778, 0, 0.30556],
    103: [0.19444, 0.43056, 0.01389, 0, 0.5],
    104: [0, 0.69444, 0, 0, 0.55556],
    105: [0, 0.66786, 0, 0, 0.27778],
    106: [0.19444, 0.66786, 0, 0, 0.30556],
    107: [0, 0.69444, 0, 0, 0.52778],
    108: [0, 0.69444, 0, 0, 0.27778],
    109: [0, 0.43056, 0, 0, 0.83334],
    110: [0, 0.43056, 0, 0, 0.55556],
    111: [0, 0.43056, 0, 0, 0.5],
    112: [0.19444, 0.43056, 0, 0, 0.55556],
    113: [0.19444, 0.43056, 0, 0, 0.52778],
    114: [0, 0.43056, 0, 0, 0.39167],
    115: [0, 0.43056, 0, 0, 0.39445],
    116: [0, 0.61508, 0, 0, 0.38889],
    117: [0, 0.43056, 0, 0, 0.55556],
    118: [0, 0.43056, 0.01389, 0, 0.52778],
    119: [0, 0.43056, 0.01389, 0, 0.72222],
    120: [0, 0.43056, 0, 0, 0.52778],
    121: [0.19444, 0.43056, 0.01389, 0, 0.52778],
    122: [0, 0.43056, 0, 0, 0.44445],
    123: [0.25, 0.75, 0, 0, 0.5],
    124: [0.25, 0.75, 0, 0, 0.27778],
    125: [0.25, 0.75, 0, 0, 0.5],
    126: [0.35, 0.31786, 0, 0, 0.5],
    160: [0, 0, 0, 0, 0.25],
    163: [0, 0.69444, 0, 0, 0.76909],
    167: [0.19444, 0.69444, 0, 0, 0.44445],
    168: [0, 0.66786, 0, 0, 0.5],
    172: [0, 0.43056, 0, 0, 0.66667],
    176: [0, 0.69444, 0, 0, 0.75],
    177: [0.08333, 0.58333, 0, 0, 0.77778],
    182: [0.19444, 0.69444, 0, 0, 0.61111],
    184: [0.17014, 0, 0, 0, 0.44445],
    198: [0, 0.68333, 0, 0, 0.90278],
    215: [0.08333, 0.58333, 0, 0, 0.77778],
    216: [0.04861, 0.73194, 0, 0, 0.77778],
    223: [0, 0.69444, 0, 0, 0.5],
    230: [0, 0.43056, 0, 0, 0.72222],
    247: [0.08333, 0.58333, 0, 0, 0.77778],
    248: [0.09722, 0.52778, 0, 0, 0.5],
    305: [0, 0.43056, 0, 0, 0.27778],
    338: [0, 0.68333, 0, 0, 1.01389],
    339: [0, 0.43056, 0, 0, 0.77778],
    567: [0.19444, 0.43056, 0, 0, 0.30556],
    710: [0, 0.69444, 0, 0, 0.5],
    711: [0, 0.62847, 0, 0, 0.5],
    713: [0, 0.56778, 0, 0, 0.5],
    714: [0, 0.69444, 0, 0, 0.5],
    715: [0, 0.69444, 0, 0, 0.5],
    728: [0, 0.69444, 0, 0, 0.5],
    729: [0, 0.66786, 0, 0, 0.27778],
    730: [0, 0.69444, 0, 0, 0.75],
    732: [0, 0.66786, 0, 0, 0.5],
    733: [0, 0.69444, 0, 0, 0.5],
    915: [0, 0.68333, 0, 0, 0.625],
    916: [0, 0.68333, 0, 0, 0.83334],
    920: [0, 0.68333, 0, 0, 0.77778],
    923: [0, 0.68333, 0, 0, 0.69445],
    926: [0, 0.68333, 0, 0, 0.66667],
    928: [0, 0.68333, 0, 0, 0.75],
    931: [0, 0.68333, 0, 0, 0.72222],
    933: [0, 0.68333, 0, 0, 0.77778],
    934: [0, 0.68333, 0, 0, 0.72222],
    936: [0, 0.68333, 0, 0, 0.77778],
    937: [0, 0.68333, 0, 0, 0.72222],
    8211: [0, 0.43056, 0.02778, 0, 0.5],
    8212: [0, 0.43056, 0.02778, 0, 1],
    8216: [0, 0.69444, 0, 0, 0.27778],
    8217: [0, 0.69444, 0, 0, 0.27778],
    8220: [0, 0.69444, 0, 0, 0.5],
    8221: [0, 0.69444, 0, 0, 0.5],
    8224: [0.19444, 0.69444, 0, 0, 0.44445],
    8225: [0.19444, 0.69444, 0, 0, 0.44445],
    8230: [0, 0.123, 0, 0, 1.172],
    8242: [0, 0.55556, 0, 0, 0.275],
    8407: [0, 0.71444, 0.15382, 0, 0.5],
    8463: [0, 0.68889, 0, 0, 0.54028],
    8465: [0, 0.69444, 0, 0, 0.72222],
    8467: [0, 0.69444, 0, 0.11111, 0.41667],
    8472: [0.19444, 0.43056, 0, 0.11111, 0.63646],
    8476: [0, 0.69444, 0, 0, 0.72222],
    8501: [0, 0.69444, 0, 0, 0.61111],
    8592: [-0.13313, 0.36687, 0, 0, 1],
    8593: [0.19444, 0.69444, 0, 0, 0.5],
    8594: [-0.13313, 0.36687, 0, 0, 1],
    8595: [0.19444, 0.69444, 0, 0, 0.5],
    8596: [-0.13313, 0.36687, 0, 0, 1],
    8597: [0.25, 0.75, 0, 0, 0.5],
    8598: [0.19444, 0.69444, 0, 0, 1],
    8599: [0.19444, 0.69444, 0, 0, 1],
    8600: [0.19444, 0.69444, 0, 0, 1],
    8601: [0.19444, 0.69444, 0, 0, 1],
    8614: [0.011, 0.511, 0, 0, 1],
    8617: [0.011, 0.511, 0, 0, 1.126],
    8618: [0.011, 0.511, 0, 0, 1.126],
    8636: [-0.13313, 0.36687, 0, 0, 1],
    8637: [-0.13313, 0.36687, 0, 0, 1],
    8640: [-0.13313, 0.36687, 0, 0, 1],
    8641: [-0.13313, 0.36687, 0, 0, 1],
    8652: [0.011, 0.671, 0, 0, 1],
    8656: [-0.13313, 0.36687, 0, 0, 1],
    8657: [0.19444, 0.69444, 0, 0, 0.61111],
    8658: [-0.13313, 0.36687, 0, 0, 1],
    8659: [0.19444, 0.69444, 0, 0, 0.61111],
    8660: [-0.13313, 0.36687, 0, 0, 1],
    8661: [0.25, 0.75, 0, 0, 0.61111],
    8704: [0, 0.69444, 0, 0, 0.55556],
    8706: [0, 0.69444, 0.05556, 0.08334, 0.5309],
    8707: [0, 0.69444, 0, 0, 0.55556],
    8709: [0.05556, 0.75, 0, 0, 0.5],
    8711: [0, 0.68333, 0, 0, 0.83334],
    8712: [0.0391, 0.5391, 0, 0, 0.66667],
    8715: [0.0391, 0.5391, 0, 0, 0.66667],
    8722: [0.08333, 0.58333, 0, 0, 0.77778],
    8723: [0.08333, 0.58333, 0, 0, 0.77778],
    8725: [0.25, 0.75, 0, 0, 0.5],
    8726: [0.25, 0.75, 0, 0, 0.5],
    8727: [-0.03472, 0.46528, 0, 0, 0.5],
    8728: [-0.05555, 0.44445, 0, 0, 0.5],
    8729: [-0.05555, 0.44445, 0, 0, 0.5],
    8730: [0.2, 0.8, 0, 0, 0.83334],
    8733: [0, 0.43056, 0, 0, 0.77778],
    8734: [0, 0.43056, 0, 0, 1],
    8736: [0, 0.69224, 0, 0, 0.72222],
    8739: [0.25, 0.75, 0, 0, 0.27778],
    8741: [0.25, 0.75, 0, 0, 0.5],
    8743: [0, 0.55556, 0, 0, 0.66667],
    8744: [0, 0.55556, 0, 0, 0.66667],
    8745: [0, 0.55556, 0, 0, 0.66667],
    8746: [0, 0.55556, 0, 0, 0.66667],
    8747: [0.19444, 0.69444, 0.11111, 0, 0.41667],
    8764: [-0.13313, 0.36687, 0, 0, 0.77778],
    8768: [0.19444, 0.69444, 0, 0, 0.27778],
    8771: [-0.03625, 0.46375, 0, 0, 0.77778],
    8773: [-0.022, 0.589, 0, 0, 0.778],
    8776: [-0.01688, 0.48312, 0, 0, 0.77778],
    8781: [-0.03625, 0.46375, 0, 0, 0.77778],
    8784: [-0.133, 0.673, 0, 0, 0.778],
    8801: [-0.03625, 0.46375, 0, 0, 0.77778],
    8804: [0.13597, 0.63597, 0, 0, 0.77778],
    8805: [0.13597, 0.63597, 0, 0, 0.77778],
    8810: [0.0391, 0.5391, 0, 0, 1],
    8811: [0.0391, 0.5391, 0, 0, 1],
    8826: [0.0391, 0.5391, 0, 0, 0.77778],
    8827: [0.0391, 0.5391, 0, 0, 0.77778],
    8834: [0.0391, 0.5391, 0, 0, 0.77778],
    8835: [0.0391, 0.5391, 0, 0, 0.77778],
    8838: [0.13597, 0.63597, 0, 0, 0.77778],
    8839: [0.13597, 0.63597, 0, 0, 0.77778],
    8846: [0, 0.55556, 0, 0, 0.66667],
    8849: [0.13597, 0.63597, 0, 0, 0.77778],
    8850: [0.13597, 0.63597, 0, 0, 0.77778],
    8851: [0, 0.55556, 0, 0, 0.66667],
    8852: [0, 0.55556, 0, 0, 0.66667],
    8853: [0.08333, 0.58333, 0, 0, 0.77778],
    8854: [0.08333, 0.58333, 0, 0, 0.77778],
    8855: [0.08333, 0.58333, 0, 0, 0.77778],
    8856: [0.08333, 0.58333, 0, 0, 0.77778],
    8857: [0.08333, 0.58333, 0, 0, 0.77778],
    8866: [0, 0.69444, 0, 0, 0.61111],
    8867: [0, 0.69444, 0, 0, 0.61111],
    8868: [0, 0.69444, 0, 0, 0.77778],
    8869: [0, 0.69444, 0, 0, 0.77778],
    8872: [0.249, 0.75, 0, 0, 0.867],
    8900: [-0.05555, 0.44445, 0, 0, 0.5],
    8901: [-0.05555, 0.44445, 0, 0, 0.27778],
    8902: [-0.03472, 0.46528, 0, 0, 0.5],
    8904: [5e-3, 0.505, 0, 0, 0.9],
    8942: [0.03, 0.903, 0, 0, 0.278],
    8943: [-0.19, 0.313, 0, 0, 1.172],
    8945: [-0.1, 0.823, 0, 0, 1.282],
    8968: [0.25, 0.75, 0, 0, 0.44445],
    8969: [0.25, 0.75, 0, 0, 0.44445],
    8970: [0.25, 0.75, 0, 0, 0.44445],
    8971: [0.25, 0.75, 0, 0, 0.44445],
    8994: [-0.14236, 0.35764, 0, 0, 1],
    8995: [-0.14236, 0.35764, 0, 0, 1],
    9136: [0.244, 0.744, 0, 0, 0.412],
    9137: [0.244, 0.745, 0, 0, 0.412],
    9651: [0.19444, 0.69444, 0, 0, 0.88889],
    9657: [-0.03472, 0.46528, 0, 0, 0.5],
    9661: [0.19444, 0.69444, 0, 0, 0.88889],
    9667: [-0.03472, 0.46528, 0, 0, 0.5],
    9711: [0.19444, 0.69444, 0, 0, 1],
    9824: [0.12963, 0.69444, 0, 0, 0.77778],
    9825: [0.12963, 0.69444, 0, 0, 0.77778],
    9826: [0.12963, 0.69444, 0, 0, 0.77778],
    9827: [0.12963, 0.69444, 0, 0, 0.77778],
    9837: [0, 0.75, 0, 0, 0.38889],
    9838: [0.19444, 0.69444, 0, 0, 0.38889],
    9839: [0.19444, 0.69444, 0, 0, 0.38889],
    10216: [0.25, 0.75, 0, 0, 0.38889],
    10217: [0.25, 0.75, 0, 0, 0.38889],
    10222: [0.244, 0.744, 0, 0, 0.412],
    10223: [0.244, 0.745, 0, 0, 0.412],
    10229: [0.011, 0.511, 0, 0, 1.609],
    10230: [0.011, 0.511, 0, 0, 1.638],
    10231: [0.011, 0.511, 0, 0, 1.859],
    10232: [0.024, 0.525, 0, 0, 1.609],
    10233: [0.024, 0.525, 0, 0, 1.638],
    10234: [0.024, 0.525, 0, 0, 1.858],
    10236: [0.011, 0.511, 0, 0, 1.638],
    10815: [0, 0.68333, 0, 0, 0.75],
    10927: [0.13597, 0.63597, 0, 0, 0.77778],
    10928: [0.13597, 0.63597, 0, 0, 0.77778],
    57376: [0.19444, 0.69444, 0, 0, 0]
  },
  "Math-BoldItalic": {
    32: [0, 0, 0, 0, 0.25],
    48: [0, 0.44444, 0, 0, 0.575],
    49: [0, 0.44444, 0, 0, 0.575],
    50: [0, 0.44444, 0, 0, 0.575],
    51: [0.19444, 0.44444, 0, 0, 0.575],
    52: [0.19444, 0.44444, 0, 0, 0.575],
    53: [0.19444, 0.44444, 0, 0, 0.575],
    54: [0, 0.64444, 0, 0, 0.575],
    55: [0.19444, 0.44444, 0, 0, 0.575],
    56: [0, 0.64444, 0, 0, 0.575],
    57: [0.19444, 0.44444, 0, 0, 0.575],
    65: [0, 0.68611, 0, 0, 0.86944],
    66: [0, 0.68611, 0.04835, 0, 0.8664],
    67: [0, 0.68611, 0.06979, 0, 0.81694],
    68: [0, 0.68611, 0.03194, 0, 0.93812],
    69: [0, 0.68611, 0.05451, 0, 0.81007],
    70: [0, 0.68611, 0.15972, 0, 0.68889],
    71: [0, 0.68611, 0, 0, 0.88673],
    72: [0, 0.68611, 0.08229, 0, 0.98229],
    73: [0, 0.68611, 0.07778, 0, 0.51111],
    74: [0, 0.68611, 0.10069, 0, 0.63125],
    75: [0, 0.68611, 0.06979, 0, 0.97118],
    76: [0, 0.68611, 0, 0, 0.75555],
    77: [0, 0.68611, 0.11424, 0, 1.14201],
    78: [0, 0.68611, 0.11424, 0, 0.95034],
    79: [0, 0.68611, 0.03194, 0, 0.83666],
    80: [0, 0.68611, 0.15972, 0, 0.72309],
    81: [0.19444, 0.68611, 0, 0, 0.86861],
    82: [0, 0.68611, 421e-5, 0, 0.87235],
    83: [0, 0.68611, 0.05382, 0, 0.69271],
    84: [0, 0.68611, 0.15972, 0, 0.63663],
    85: [0, 0.68611, 0.11424, 0, 0.80027],
    86: [0, 0.68611, 0.25555, 0, 0.67778],
    87: [0, 0.68611, 0.15972, 0, 1.09305],
    88: [0, 0.68611, 0.07778, 0, 0.94722],
    89: [0, 0.68611, 0.25555, 0, 0.67458],
    90: [0, 0.68611, 0.06979, 0, 0.77257],
    97: [0, 0.44444, 0, 0, 0.63287],
    98: [0, 0.69444, 0, 0, 0.52083],
    99: [0, 0.44444, 0, 0, 0.51342],
    100: [0, 0.69444, 0, 0, 0.60972],
    101: [0, 0.44444, 0, 0, 0.55361],
    102: [0.19444, 0.69444, 0.11042, 0, 0.56806],
    103: [0.19444, 0.44444, 0.03704, 0, 0.5449],
    104: [0, 0.69444, 0, 0, 0.66759],
    105: [0, 0.69326, 0, 0, 0.4048],
    106: [0.19444, 0.69326, 0.0622, 0, 0.47083],
    107: [0, 0.69444, 0.01852, 0, 0.6037],
    108: [0, 0.69444, 88e-4, 0, 0.34815],
    109: [0, 0.44444, 0, 0, 1.0324],
    110: [0, 0.44444, 0, 0, 0.71296],
    111: [0, 0.44444, 0, 0, 0.58472],
    112: [0.19444, 0.44444, 0, 0, 0.60092],
    113: [0.19444, 0.44444, 0.03704, 0, 0.54213],
    114: [0, 0.44444, 0.03194, 0, 0.5287],
    115: [0, 0.44444, 0, 0, 0.53125],
    116: [0, 0.63492, 0, 0, 0.41528],
    117: [0, 0.44444, 0, 0, 0.68102],
    118: [0, 0.44444, 0.03704, 0, 0.56666],
    119: [0, 0.44444, 0.02778, 0, 0.83148],
    120: [0, 0.44444, 0, 0, 0.65903],
    121: [0.19444, 0.44444, 0.03704, 0, 0.59028],
    122: [0, 0.44444, 0.04213, 0, 0.55509],
    160: [0, 0, 0, 0, 0.25],
    915: [0, 0.68611, 0.15972, 0, 0.65694],
    916: [0, 0.68611, 0, 0, 0.95833],
    920: [0, 0.68611, 0.03194, 0, 0.86722],
    923: [0, 0.68611, 0, 0, 0.80555],
    926: [0, 0.68611, 0.07458, 0, 0.84125],
    928: [0, 0.68611, 0.08229, 0, 0.98229],
    931: [0, 0.68611, 0.05451, 0, 0.88507],
    933: [0, 0.68611, 0.15972, 0, 0.67083],
    934: [0, 0.68611, 0, 0, 0.76666],
    936: [0, 0.68611, 0.11653, 0, 0.71402],
    937: [0, 0.68611, 0.04835, 0, 0.8789],
    945: [0, 0.44444, 0, 0, 0.76064],
    946: [0.19444, 0.69444, 0.03403, 0, 0.65972],
    947: [0.19444, 0.44444, 0.06389, 0, 0.59003],
    948: [0, 0.69444, 0.03819, 0, 0.52222],
    949: [0, 0.44444, 0, 0, 0.52882],
    950: [0.19444, 0.69444, 0.06215, 0, 0.50833],
    951: [0.19444, 0.44444, 0.03704, 0, 0.6],
    952: [0, 0.69444, 0.03194, 0, 0.5618],
    953: [0, 0.44444, 0, 0, 0.41204],
    954: [0, 0.44444, 0, 0, 0.66759],
    955: [0, 0.69444, 0, 0, 0.67083],
    956: [0.19444, 0.44444, 0, 0, 0.70787],
    957: [0, 0.44444, 0.06898, 0, 0.57685],
    958: [0.19444, 0.69444, 0.03021, 0, 0.50833],
    959: [0, 0.44444, 0, 0, 0.58472],
    960: [0, 0.44444, 0.03704, 0, 0.68241],
    961: [0.19444, 0.44444, 0, 0, 0.6118],
    962: [0.09722, 0.44444, 0.07917, 0, 0.42361],
    963: [0, 0.44444, 0.03704, 0, 0.68588],
    964: [0, 0.44444, 0.13472, 0, 0.52083],
    965: [0, 0.44444, 0.03704, 0, 0.63055],
    966: [0.19444, 0.44444, 0, 0, 0.74722],
    967: [0.19444, 0.44444, 0, 0, 0.71805],
    968: [0.19444, 0.69444, 0.03704, 0, 0.75833],
    969: [0, 0.44444, 0.03704, 0, 0.71782],
    977: [0, 0.69444, 0, 0, 0.69155],
    981: [0.19444, 0.69444, 0, 0, 0.7125],
    982: [0, 0.44444, 0.03194, 0, 0.975],
    1009: [0.19444, 0.44444, 0, 0, 0.6118],
    1013: [0, 0.44444, 0, 0, 0.48333],
    57649: [0, 0.44444, 0, 0, 0.39352],
    57911: [0.19444, 0.44444, 0, 0, 0.43889]
  },
  "Math-Italic": {
    32: [0, 0, 0, 0, 0.25],
    48: [0, 0.43056, 0, 0, 0.5],
    49: [0, 0.43056, 0, 0, 0.5],
    50: [0, 0.43056, 0, 0, 0.5],
    51: [0.19444, 0.43056, 0, 0, 0.5],
    52: [0.19444, 0.43056, 0, 0, 0.5],
    53: [0.19444, 0.43056, 0, 0, 0.5],
    54: [0, 0.64444, 0, 0, 0.5],
    55: [0.19444, 0.43056, 0, 0, 0.5],
    56: [0, 0.64444, 0, 0, 0.5],
    57: [0.19444, 0.43056, 0, 0, 0.5],
    65: [0, 0.68333, 0, 0.13889, 0.75],
    66: [0, 0.68333, 0.05017, 0.08334, 0.75851],
    67: [0, 0.68333, 0.07153, 0.08334, 0.71472],
    68: [0, 0.68333, 0.02778, 0.05556, 0.82792],
    69: [0, 0.68333, 0.05764, 0.08334, 0.7382],
    70: [0, 0.68333, 0.13889, 0.08334, 0.64306],
    71: [0, 0.68333, 0, 0.08334, 0.78625],
    72: [0, 0.68333, 0.08125, 0.05556, 0.83125],
    73: [0, 0.68333, 0.07847, 0.11111, 0.43958],
    74: [0, 0.68333, 0.09618, 0.16667, 0.55451],
    75: [0, 0.68333, 0.07153, 0.05556, 0.84931],
    76: [0, 0.68333, 0, 0.02778, 0.68056],
    77: [0, 0.68333, 0.10903, 0.08334, 0.97014],
    78: [0, 0.68333, 0.10903, 0.08334, 0.80347],
    79: [0, 0.68333, 0.02778, 0.08334, 0.76278],
    80: [0, 0.68333, 0.13889, 0.08334, 0.64201],
    81: [0.19444, 0.68333, 0, 0.08334, 0.79056],
    82: [0, 0.68333, 773e-5, 0.08334, 0.75929],
    83: [0, 0.68333, 0.05764, 0.08334, 0.6132],
    84: [0, 0.68333, 0.13889, 0.08334, 0.58438],
    85: [0, 0.68333, 0.10903, 0.02778, 0.68278],
    86: [0, 0.68333, 0.22222, 0, 0.58333],
    87: [0, 0.68333, 0.13889, 0, 0.94445],
    88: [0, 0.68333, 0.07847, 0.08334, 0.82847],
    89: [0, 0.68333, 0.22222, 0, 0.58056],
    90: [0, 0.68333, 0.07153, 0.08334, 0.68264],
    97: [0, 0.43056, 0, 0, 0.52859],
    98: [0, 0.69444, 0, 0, 0.42917],
    99: [0, 0.43056, 0, 0.05556, 0.43276],
    100: [0, 0.69444, 0, 0.16667, 0.52049],
    101: [0, 0.43056, 0, 0.05556, 0.46563],
    102: [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
    103: [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
    104: [0, 0.69444, 0, 0, 0.57616],
    105: [0, 0.65952, 0, 0, 0.34451],
    106: [0.19444, 0.65952, 0.05724, 0, 0.41181],
    107: [0, 0.69444, 0.03148, 0, 0.5206],
    108: [0, 0.69444, 0.01968, 0.08334, 0.29838],
    109: [0, 0.43056, 0, 0, 0.87801],
    110: [0, 0.43056, 0, 0, 0.60023],
    111: [0, 0.43056, 0, 0.05556, 0.48472],
    112: [0.19444, 0.43056, 0, 0.08334, 0.50313],
    113: [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
    114: [0, 0.43056, 0.02778, 0.05556, 0.45116],
    115: [0, 0.43056, 0, 0.05556, 0.46875],
    116: [0, 0.61508, 0, 0.08334, 0.36111],
    117: [0, 0.43056, 0, 0.02778, 0.57246],
    118: [0, 0.43056, 0.03588, 0.02778, 0.48472],
    119: [0, 0.43056, 0.02691, 0.08334, 0.71592],
    120: [0, 0.43056, 0, 0.02778, 0.57153],
    121: [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
    122: [0, 0.43056, 0.04398, 0.05556, 0.46505],
    160: [0, 0, 0, 0, 0.25],
    915: [0, 0.68333, 0.13889, 0.08334, 0.61528],
    916: [0, 0.68333, 0, 0.16667, 0.83334],
    920: [0, 0.68333, 0.02778, 0.08334, 0.76278],
    923: [0, 0.68333, 0, 0.16667, 0.69445],
    926: [0, 0.68333, 0.07569, 0.08334, 0.74236],
    928: [0, 0.68333, 0.08125, 0.05556, 0.83125],
    931: [0, 0.68333, 0.05764, 0.08334, 0.77986],
    933: [0, 0.68333, 0.13889, 0.05556, 0.58333],
    934: [0, 0.68333, 0, 0.08334, 0.66667],
    936: [0, 0.68333, 0.11, 0.05556, 0.61222],
    937: [0, 0.68333, 0.05017, 0.08334, 0.7724],
    945: [0, 0.43056, 37e-4, 0.02778, 0.6397],
    946: [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
    947: [0.19444, 0.43056, 0.05556, 0, 0.51773],
    948: [0, 0.69444, 0.03785, 0.05556, 0.44444],
    949: [0, 0.43056, 0, 0.08334, 0.46632],
    950: [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
    951: [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
    952: [0, 0.69444, 0.02778, 0.08334, 0.46944],
    953: [0, 0.43056, 0, 0.05556, 0.35394],
    954: [0, 0.43056, 0, 0, 0.57616],
    955: [0, 0.69444, 0, 0, 0.58334],
    956: [0.19444, 0.43056, 0, 0.02778, 0.60255],
    957: [0, 0.43056, 0.06366, 0.02778, 0.49398],
    958: [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
    959: [0, 0.43056, 0, 0.05556, 0.48472],
    960: [0, 0.43056, 0.03588, 0, 0.57003],
    961: [0.19444, 0.43056, 0, 0.08334, 0.51702],
    962: [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
    963: [0, 0.43056, 0.03588, 0, 0.57141],
    964: [0, 0.43056, 0.1132, 0.02778, 0.43715],
    965: [0, 0.43056, 0.03588, 0.02778, 0.54028],
    966: [0.19444, 0.43056, 0, 0.08334, 0.65417],
    967: [0.19444, 0.43056, 0, 0.05556, 0.62569],
    968: [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
    969: [0, 0.43056, 0.03588, 0, 0.62245],
    977: [0, 0.69444, 0, 0.08334, 0.59144],
    981: [0.19444, 0.69444, 0, 0.08334, 0.59583],
    982: [0, 0.43056, 0.02778, 0, 0.82813],
    1009: [0.19444, 0.43056, 0, 0.08334, 0.51702],
    1013: [0, 0.43056, 0, 0.05556, 0.4059],
    57649: [0, 0.43056, 0, 0.02778, 0.32246],
    57911: [0.19444, 0.43056, 0, 0.08334, 0.38403]
  },
  "SansSerif-Bold": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.36667],
    34: [0, 0.69444, 0, 0, 0.55834],
    35: [0.19444, 0.69444, 0, 0, 0.91667],
    36: [0.05556, 0.75, 0, 0, 0.55],
    37: [0.05556, 0.75, 0, 0, 1.02912],
    38: [0, 0.69444, 0, 0, 0.83056],
    39: [0, 0.69444, 0, 0, 0.30556],
    40: [0.25, 0.75, 0, 0, 0.42778],
    41: [0.25, 0.75, 0, 0, 0.42778],
    42: [0, 0.75, 0, 0, 0.55],
    43: [0.11667, 0.61667, 0, 0, 0.85556],
    44: [0.10556, 0.13056, 0, 0, 0.30556],
    45: [0, 0.45833, 0, 0, 0.36667],
    46: [0, 0.13056, 0, 0, 0.30556],
    47: [0.25, 0.75, 0, 0, 0.55],
    48: [0, 0.69444, 0, 0, 0.55],
    49: [0, 0.69444, 0, 0, 0.55],
    50: [0, 0.69444, 0, 0, 0.55],
    51: [0, 0.69444, 0, 0, 0.55],
    52: [0, 0.69444, 0, 0, 0.55],
    53: [0, 0.69444, 0, 0, 0.55],
    54: [0, 0.69444, 0, 0, 0.55],
    55: [0, 0.69444, 0, 0, 0.55],
    56: [0, 0.69444, 0, 0, 0.55],
    57: [0, 0.69444, 0, 0, 0.55],
    58: [0, 0.45833, 0, 0, 0.30556],
    59: [0.10556, 0.45833, 0, 0, 0.30556],
    61: [-0.09375, 0.40625, 0, 0, 0.85556],
    63: [0, 0.69444, 0, 0, 0.51945],
    64: [0, 0.69444, 0, 0, 0.73334],
    65: [0, 0.69444, 0, 0, 0.73334],
    66: [0, 0.69444, 0, 0, 0.73334],
    67: [0, 0.69444, 0, 0, 0.70278],
    68: [0, 0.69444, 0, 0, 0.79445],
    69: [0, 0.69444, 0, 0, 0.64167],
    70: [0, 0.69444, 0, 0, 0.61111],
    71: [0, 0.69444, 0, 0, 0.73334],
    72: [0, 0.69444, 0, 0, 0.79445],
    73: [0, 0.69444, 0, 0, 0.33056],
    74: [0, 0.69444, 0, 0, 0.51945],
    75: [0, 0.69444, 0, 0, 0.76389],
    76: [0, 0.69444, 0, 0, 0.58056],
    77: [0, 0.69444, 0, 0, 0.97778],
    78: [0, 0.69444, 0, 0, 0.79445],
    79: [0, 0.69444, 0, 0, 0.79445],
    80: [0, 0.69444, 0, 0, 0.70278],
    81: [0.10556, 0.69444, 0, 0, 0.79445],
    82: [0, 0.69444, 0, 0, 0.70278],
    83: [0, 0.69444, 0, 0, 0.61111],
    84: [0, 0.69444, 0, 0, 0.73334],
    85: [0, 0.69444, 0, 0, 0.76389],
    86: [0, 0.69444, 0.01528, 0, 0.73334],
    87: [0, 0.69444, 0.01528, 0, 1.03889],
    88: [0, 0.69444, 0, 0, 0.73334],
    89: [0, 0.69444, 0.0275, 0, 0.73334],
    90: [0, 0.69444, 0, 0, 0.67223],
    91: [0.25, 0.75, 0, 0, 0.34306],
    93: [0.25, 0.75, 0, 0, 0.34306],
    94: [0, 0.69444, 0, 0, 0.55],
    95: [0.35, 0.10833, 0.03056, 0, 0.55],
    97: [0, 0.45833, 0, 0, 0.525],
    98: [0, 0.69444, 0, 0, 0.56111],
    99: [0, 0.45833, 0, 0, 0.48889],
    100: [0, 0.69444, 0, 0, 0.56111],
    101: [0, 0.45833, 0, 0, 0.51111],
    102: [0, 0.69444, 0.07639, 0, 0.33611],
    103: [0.19444, 0.45833, 0.01528, 0, 0.55],
    104: [0, 0.69444, 0, 0, 0.56111],
    105: [0, 0.69444, 0, 0, 0.25556],
    106: [0.19444, 0.69444, 0, 0, 0.28611],
    107: [0, 0.69444, 0, 0, 0.53056],
    108: [0, 0.69444, 0, 0, 0.25556],
    109: [0, 0.45833, 0, 0, 0.86667],
    110: [0, 0.45833, 0, 0, 0.56111],
    111: [0, 0.45833, 0, 0, 0.55],
    112: [0.19444, 0.45833, 0, 0, 0.56111],
    113: [0.19444, 0.45833, 0, 0, 0.56111],
    114: [0, 0.45833, 0.01528, 0, 0.37222],
    115: [0, 0.45833, 0, 0, 0.42167],
    116: [0, 0.58929, 0, 0, 0.40417],
    117: [0, 0.45833, 0, 0, 0.56111],
    118: [0, 0.45833, 0.01528, 0, 0.5],
    119: [0, 0.45833, 0.01528, 0, 0.74445],
    120: [0, 0.45833, 0, 0, 0.5],
    121: [0.19444, 0.45833, 0.01528, 0, 0.5],
    122: [0, 0.45833, 0, 0, 0.47639],
    126: [0.35, 0.34444, 0, 0, 0.55],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.69444, 0, 0, 0.55],
    176: [0, 0.69444, 0, 0, 0.73334],
    180: [0, 0.69444, 0, 0, 0.55],
    184: [0.17014, 0, 0, 0, 0.48889],
    305: [0, 0.45833, 0, 0, 0.25556],
    567: [0.19444, 0.45833, 0, 0, 0.28611],
    710: [0, 0.69444, 0, 0, 0.55],
    711: [0, 0.63542, 0, 0, 0.55],
    713: [0, 0.63778, 0, 0, 0.55],
    728: [0, 0.69444, 0, 0, 0.55],
    729: [0, 0.69444, 0, 0, 0.30556],
    730: [0, 0.69444, 0, 0, 0.73334],
    732: [0, 0.69444, 0, 0, 0.55],
    733: [0, 0.69444, 0, 0, 0.55],
    915: [0, 0.69444, 0, 0, 0.58056],
    916: [0, 0.69444, 0, 0, 0.91667],
    920: [0, 0.69444, 0, 0, 0.85556],
    923: [0, 0.69444, 0, 0, 0.67223],
    926: [0, 0.69444, 0, 0, 0.73334],
    928: [0, 0.69444, 0, 0, 0.79445],
    931: [0, 0.69444, 0, 0, 0.79445],
    933: [0, 0.69444, 0, 0, 0.85556],
    934: [0, 0.69444, 0, 0, 0.79445],
    936: [0, 0.69444, 0, 0, 0.85556],
    937: [0, 0.69444, 0, 0, 0.79445],
    8211: [0, 0.45833, 0.03056, 0, 0.55],
    8212: [0, 0.45833, 0.03056, 0, 1.10001],
    8216: [0, 0.69444, 0, 0, 0.30556],
    8217: [0, 0.69444, 0, 0, 0.30556],
    8220: [0, 0.69444, 0, 0, 0.55834],
    8221: [0, 0.69444, 0, 0, 0.55834]
  },
  "SansSerif-Italic": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0.05733, 0, 0.31945],
    34: [0, 0.69444, 316e-5, 0, 0.5],
    35: [0.19444, 0.69444, 0.05087, 0, 0.83334],
    36: [0.05556, 0.75, 0.11156, 0, 0.5],
    37: [0.05556, 0.75, 0.03126, 0, 0.83334],
    38: [0, 0.69444, 0.03058, 0, 0.75834],
    39: [0, 0.69444, 0.07816, 0, 0.27778],
    40: [0.25, 0.75, 0.13164, 0, 0.38889],
    41: [0.25, 0.75, 0.02536, 0, 0.38889],
    42: [0, 0.75, 0.11775, 0, 0.5],
    43: [0.08333, 0.58333, 0.02536, 0, 0.77778],
    44: [0.125, 0.08333, 0, 0, 0.27778],
    45: [0, 0.44444, 0.01946, 0, 0.33333],
    46: [0, 0.08333, 0, 0, 0.27778],
    47: [0.25, 0.75, 0.13164, 0, 0.5],
    48: [0, 0.65556, 0.11156, 0, 0.5],
    49: [0, 0.65556, 0.11156, 0, 0.5],
    50: [0, 0.65556, 0.11156, 0, 0.5],
    51: [0, 0.65556, 0.11156, 0, 0.5],
    52: [0, 0.65556, 0.11156, 0, 0.5],
    53: [0, 0.65556, 0.11156, 0, 0.5],
    54: [0, 0.65556, 0.11156, 0, 0.5],
    55: [0, 0.65556, 0.11156, 0, 0.5],
    56: [0, 0.65556, 0.11156, 0, 0.5],
    57: [0, 0.65556, 0.11156, 0, 0.5],
    58: [0, 0.44444, 0.02502, 0, 0.27778],
    59: [0.125, 0.44444, 0.02502, 0, 0.27778],
    61: [-0.13, 0.37, 0.05087, 0, 0.77778],
    63: [0, 0.69444, 0.11809, 0, 0.47222],
    64: [0, 0.69444, 0.07555, 0, 0.66667],
    65: [0, 0.69444, 0, 0, 0.66667],
    66: [0, 0.69444, 0.08293, 0, 0.66667],
    67: [0, 0.69444, 0.11983, 0, 0.63889],
    68: [0, 0.69444, 0.07555, 0, 0.72223],
    69: [0, 0.69444, 0.11983, 0, 0.59722],
    70: [0, 0.69444, 0.13372, 0, 0.56945],
    71: [0, 0.69444, 0.11983, 0, 0.66667],
    72: [0, 0.69444, 0.08094, 0, 0.70834],
    73: [0, 0.69444, 0.13372, 0, 0.27778],
    74: [0, 0.69444, 0.08094, 0, 0.47222],
    75: [0, 0.69444, 0.11983, 0, 0.69445],
    76: [0, 0.69444, 0, 0, 0.54167],
    77: [0, 0.69444, 0.08094, 0, 0.875],
    78: [0, 0.69444, 0.08094, 0, 0.70834],
    79: [0, 0.69444, 0.07555, 0, 0.73611],
    80: [0, 0.69444, 0.08293, 0, 0.63889],
    81: [0.125, 0.69444, 0.07555, 0, 0.73611],
    82: [0, 0.69444, 0.08293, 0, 0.64584],
    83: [0, 0.69444, 0.09205, 0, 0.55556],
    84: [0, 0.69444, 0.13372, 0, 0.68056],
    85: [0, 0.69444, 0.08094, 0, 0.6875],
    86: [0, 0.69444, 0.1615, 0, 0.66667],
    87: [0, 0.69444, 0.1615, 0, 0.94445],
    88: [0, 0.69444, 0.13372, 0, 0.66667],
    89: [0, 0.69444, 0.17261, 0, 0.66667],
    90: [0, 0.69444, 0.11983, 0, 0.61111],
    91: [0.25, 0.75, 0.15942, 0, 0.28889],
    93: [0.25, 0.75, 0.08719, 0, 0.28889],
    94: [0, 0.69444, 0.0799, 0, 0.5],
    95: [0.35, 0.09444, 0.08616, 0, 0.5],
    97: [0, 0.44444, 981e-5, 0, 0.48056],
    98: [0, 0.69444, 0.03057, 0, 0.51667],
    99: [0, 0.44444, 0.08336, 0, 0.44445],
    100: [0, 0.69444, 0.09483, 0, 0.51667],
    101: [0, 0.44444, 0.06778, 0, 0.44445],
    102: [0, 0.69444, 0.21705, 0, 0.30556],
    103: [0.19444, 0.44444, 0.10836, 0, 0.5],
    104: [0, 0.69444, 0.01778, 0, 0.51667],
    105: [0, 0.67937, 0.09718, 0, 0.23889],
    106: [0.19444, 0.67937, 0.09162, 0, 0.26667],
    107: [0, 0.69444, 0.08336, 0, 0.48889],
    108: [0, 0.69444, 0.09483, 0, 0.23889],
    109: [0, 0.44444, 0.01778, 0, 0.79445],
    110: [0, 0.44444, 0.01778, 0, 0.51667],
    111: [0, 0.44444, 0.06613, 0, 0.5],
    112: [0.19444, 0.44444, 0.0389, 0, 0.51667],
    113: [0.19444, 0.44444, 0.04169, 0, 0.51667],
    114: [0, 0.44444, 0.10836, 0, 0.34167],
    115: [0, 0.44444, 0.0778, 0, 0.38333],
    116: [0, 0.57143, 0.07225, 0, 0.36111],
    117: [0, 0.44444, 0.04169, 0, 0.51667],
    118: [0, 0.44444, 0.10836, 0, 0.46111],
    119: [0, 0.44444, 0.10836, 0, 0.68334],
    120: [0, 0.44444, 0.09169, 0, 0.46111],
    121: [0.19444, 0.44444, 0.10836, 0, 0.46111],
    122: [0, 0.44444, 0.08752, 0, 0.43472],
    126: [0.35, 0.32659, 0.08826, 0, 0.5],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.67937, 0.06385, 0, 0.5],
    176: [0, 0.69444, 0, 0, 0.73752],
    184: [0.17014, 0, 0, 0, 0.44445],
    305: [0, 0.44444, 0.04169, 0, 0.23889],
    567: [0.19444, 0.44444, 0.04169, 0, 0.26667],
    710: [0, 0.69444, 0.0799, 0, 0.5],
    711: [0, 0.63194, 0.08432, 0, 0.5],
    713: [0, 0.60889, 0.08776, 0, 0.5],
    714: [0, 0.69444, 0.09205, 0, 0.5],
    715: [0, 0.69444, 0, 0, 0.5],
    728: [0, 0.69444, 0.09483, 0, 0.5],
    729: [0, 0.67937, 0.07774, 0, 0.27778],
    730: [0, 0.69444, 0, 0, 0.73752],
    732: [0, 0.67659, 0.08826, 0, 0.5],
    733: [0, 0.69444, 0.09205, 0, 0.5],
    915: [0, 0.69444, 0.13372, 0, 0.54167],
    916: [0, 0.69444, 0, 0, 0.83334],
    920: [0, 0.69444, 0.07555, 0, 0.77778],
    923: [0, 0.69444, 0, 0, 0.61111],
    926: [0, 0.69444, 0.12816, 0, 0.66667],
    928: [0, 0.69444, 0.08094, 0, 0.70834],
    931: [0, 0.69444, 0.11983, 0, 0.72222],
    933: [0, 0.69444, 0.09031, 0, 0.77778],
    934: [0, 0.69444, 0.04603, 0, 0.72222],
    936: [0, 0.69444, 0.09031, 0, 0.77778],
    937: [0, 0.69444, 0.08293, 0, 0.72222],
    8211: [0, 0.44444, 0.08616, 0, 0.5],
    8212: [0, 0.44444, 0.08616, 0, 1],
    8216: [0, 0.69444, 0.07816, 0, 0.27778],
    8217: [0, 0.69444, 0.07816, 0, 0.27778],
    8220: [0, 0.69444, 0.14205, 0, 0.5],
    8221: [0, 0.69444, 316e-5, 0, 0.5]
  },
  "SansSerif-Regular": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.31945],
    34: [0, 0.69444, 0, 0, 0.5],
    35: [0.19444, 0.69444, 0, 0, 0.83334],
    36: [0.05556, 0.75, 0, 0, 0.5],
    37: [0.05556, 0.75, 0, 0, 0.83334],
    38: [0, 0.69444, 0, 0, 0.75834],
    39: [0, 0.69444, 0, 0, 0.27778],
    40: [0.25, 0.75, 0, 0, 0.38889],
    41: [0.25, 0.75, 0, 0, 0.38889],
    42: [0, 0.75, 0, 0, 0.5],
    43: [0.08333, 0.58333, 0, 0, 0.77778],
    44: [0.125, 0.08333, 0, 0, 0.27778],
    45: [0, 0.44444, 0, 0, 0.33333],
    46: [0, 0.08333, 0, 0, 0.27778],
    47: [0.25, 0.75, 0, 0, 0.5],
    48: [0, 0.65556, 0, 0, 0.5],
    49: [0, 0.65556, 0, 0, 0.5],
    50: [0, 0.65556, 0, 0, 0.5],
    51: [0, 0.65556, 0, 0, 0.5],
    52: [0, 0.65556, 0, 0, 0.5],
    53: [0, 0.65556, 0, 0, 0.5],
    54: [0, 0.65556, 0, 0, 0.5],
    55: [0, 0.65556, 0, 0, 0.5],
    56: [0, 0.65556, 0, 0, 0.5],
    57: [0, 0.65556, 0, 0, 0.5],
    58: [0, 0.44444, 0, 0, 0.27778],
    59: [0.125, 0.44444, 0, 0, 0.27778],
    61: [-0.13, 0.37, 0, 0, 0.77778],
    63: [0, 0.69444, 0, 0, 0.47222],
    64: [0, 0.69444, 0, 0, 0.66667],
    65: [0, 0.69444, 0, 0, 0.66667],
    66: [0, 0.69444, 0, 0, 0.66667],
    67: [0, 0.69444, 0, 0, 0.63889],
    68: [0, 0.69444, 0, 0, 0.72223],
    69: [0, 0.69444, 0, 0, 0.59722],
    70: [0, 0.69444, 0, 0, 0.56945],
    71: [0, 0.69444, 0, 0, 0.66667],
    72: [0, 0.69444, 0, 0, 0.70834],
    73: [0, 0.69444, 0, 0, 0.27778],
    74: [0, 0.69444, 0, 0, 0.47222],
    75: [0, 0.69444, 0, 0, 0.69445],
    76: [0, 0.69444, 0, 0, 0.54167],
    77: [0, 0.69444, 0, 0, 0.875],
    78: [0, 0.69444, 0, 0, 0.70834],
    79: [0, 0.69444, 0, 0, 0.73611],
    80: [0, 0.69444, 0, 0, 0.63889],
    81: [0.125, 0.69444, 0, 0, 0.73611],
    82: [0, 0.69444, 0, 0, 0.64584],
    83: [0, 0.69444, 0, 0, 0.55556],
    84: [0, 0.69444, 0, 0, 0.68056],
    85: [0, 0.69444, 0, 0, 0.6875],
    86: [0, 0.69444, 0.01389, 0, 0.66667],
    87: [0, 0.69444, 0.01389, 0, 0.94445],
    88: [0, 0.69444, 0, 0, 0.66667],
    89: [0, 0.69444, 0.025, 0, 0.66667],
    90: [0, 0.69444, 0, 0, 0.61111],
    91: [0.25, 0.75, 0, 0, 0.28889],
    93: [0.25, 0.75, 0, 0, 0.28889],
    94: [0, 0.69444, 0, 0, 0.5],
    95: [0.35, 0.09444, 0.02778, 0, 0.5],
    97: [0, 0.44444, 0, 0, 0.48056],
    98: [0, 0.69444, 0, 0, 0.51667],
    99: [0, 0.44444, 0, 0, 0.44445],
    100: [0, 0.69444, 0, 0, 0.51667],
    101: [0, 0.44444, 0, 0, 0.44445],
    102: [0, 0.69444, 0.06944, 0, 0.30556],
    103: [0.19444, 0.44444, 0.01389, 0, 0.5],
    104: [0, 0.69444, 0, 0, 0.51667],
    105: [0, 0.67937, 0, 0, 0.23889],
    106: [0.19444, 0.67937, 0, 0, 0.26667],
    107: [0, 0.69444, 0, 0, 0.48889],
    108: [0, 0.69444, 0, 0, 0.23889],
    109: [0, 0.44444, 0, 0, 0.79445],
    110: [0, 0.44444, 0, 0, 0.51667],
    111: [0, 0.44444, 0, 0, 0.5],
    112: [0.19444, 0.44444, 0, 0, 0.51667],
    113: [0.19444, 0.44444, 0, 0, 0.51667],
    114: [0, 0.44444, 0.01389, 0, 0.34167],
    115: [0, 0.44444, 0, 0, 0.38333],
    116: [0, 0.57143, 0, 0, 0.36111],
    117: [0, 0.44444, 0, 0, 0.51667],
    118: [0, 0.44444, 0.01389, 0, 0.46111],
    119: [0, 0.44444, 0.01389, 0, 0.68334],
    120: [0, 0.44444, 0, 0, 0.46111],
    121: [0.19444, 0.44444, 0.01389, 0, 0.46111],
    122: [0, 0.44444, 0, 0, 0.43472],
    126: [0.35, 0.32659, 0, 0, 0.5],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.67937, 0, 0, 0.5],
    176: [0, 0.69444, 0, 0, 0.66667],
    184: [0.17014, 0, 0, 0, 0.44445],
    305: [0, 0.44444, 0, 0, 0.23889],
    567: [0.19444, 0.44444, 0, 0, 0.26667],
    710: [0, 0.69444, 0, 0, 0.5],
    711: [0, 0.63194, 0, 0, 0.5],
    713: [0, 0.60889, 0, 0, 0.5],
    714: [0, 0.69444, 0, 0, 0.5],
    715: [0, 0.69444, 0, 0, 0.5],
    728: [0, 0.69444, 0, 0, 0.5],
    729: [0, 0.67937, 0, 0, 0.27778],
    730: [0, 0.69444, 0, 0, 0.66667],
    732: [0, 0.67659, 0, 0, 0.5],
    733: [0, 0.69444, 0, 0, 0.5],
    915: [0, 0.69444, 0, 0, 0.54167],
    916: [0, 0.69444, 0, 0, 0.83334],
    920: [0, 0.69444, 0, 0, 0.77778],
    923: [0, 0.69444, 0, 0, 0.61111],
    926: [0, 0.69444, 0, 0, 0.66667],
    928: [0, 0.69444, 0, 0, 0.70834],
    931: [0, 0.69444, 0, 0, 0.72222],
    933: [0, 0.69444, 0, 0, 0.77778],
    934: [0, 0.69444, 0, 0, 0.72222],
    936: [0, 0.69444, 0, 0, 0.77778],
    937: [0, 0.69444, 0, 0, 0.72222],
    8211: [0, 0.44444, 0.02778, 0, 0.5],
    8212: [0, 0.44444, 0.02778, 0, 1],
    8216: [0, 0.69444, 0, 0, 0.27778],
    8217: [0, 0.69444, 0, 0, 0.27778],
    8220: [0, 0.69444, 0, 0, 0.5],
    8221: [0, 0.69444, 0, 0, 0.5]
  },
  "Script-Regular": {
    32: [0, 0, 0, 0, 0.25],
    65: [0, 0.7, 0.22925, 0, 0.80253],
    66: [0, 0.7, 0.04087, 0, 0.90757],
    67: [0, 0.7, 0.1689, 0, 0.66619],
    68: [0, 0.7, 0.09371, 0, 0.77443],
    69: [0, 0.7, 0.18583, 0, 0.56162],
    70: [0, 0.7, 0.13634, 0, 0.89544],
    71: [0, 0.7, 0.17322, 0, 0.60961],
    72: [0, 0.7, 0.29694, 0, 0.96919],
    73: [0, 0.7, 0.19189, 0, 0.80907],
    74: [0.27778, 0.7, 0.19189, 0, 1.05159],
    75: [0, 0.7, 0.31259, 0, 0.91364],
    76: [0, 0.7, 0.19189, 0, 0.87373],
    77: [0, 0.7, 0.15981, 0, 1.08031],
    78: [0, 0.7, 0.3525, 0, 0.9015],
    79: [0, 0.7, 0.08078, 0, 0.73787],
    80: [0, 0.7, 0.08078, 0, 1.01262],
    81: [0, 0.7, 0.03305, 0, 0.88282],
    82: [0, 0.7, 0.06259, 0, 0.85],
    83: [0, 0.7, 0.19189, 0, 0.86767],
    84: [0, 0.7, 0.29087, 0, 0.74697],
    85: [0, 0.7, 0.25815, 0, 0.79996],
    86: [0, 0.7, 0.27523, 0, 0.62204],
    87: [0, 0.7, 0.27523, 0, 0.80532],
    88: [0, 0.7, 0.26006, 0, 0.94445],
    89: [0, 0.7, 0.2939, 0, 0.70961],
    90: [0, 0.7, 0.24037, 0, 0.8212],
    160: [0, 0, 0, 0, 0.25]
  },
  "Size1-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [0.35001, 0.85, 0, 0, 0.45834],
    41: [0.35001, 0.85, 0, 0, 0.45834],
    47: [0.35001, 0.85, 0, 0, 0.57778],
    91: [0.35001, 0.85, 0, 0, 0.41667],
    92: [0.35001, 0.85, 0, 0, 0.57778],
    93: [0.35001, 0.85, 0, 0, 0.41667],
    123: [0.35001, 0.85, 0, 0, 0.58334],
    125: [0.35001, 0.85, 0, 0, 0.58334],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.72222, 0, 0, 0.55556],
    732: [0, 0.72222, 0, 0, 0.55556],
    770: [0, 0.72222, 0, 0, 0.55556],
    771: [0, 0.72222, 0, 0, 0.55556],
    8214: [-99e-5, 0.601, 0, 0, 0.77778],
    8593: [1e-5, 0.6, 0, 0, 0.66667],
    8595: [1e-5, 0.6, 0, 0, 0.66667],
    8657: [1e-5, 0.6, 0, 0, 0.77778],
    8659: [1e-5, 0.6, 0, 0, 0.77778],
    8719: [0.25001, 0.75, 0, 0, 0.94445],
    8720: [0.25001, 0.75, 0, 0, 0.94445],
    8721: [0.25001, 0.75, 0, 0, 1.05556],
    8730: [0.35001, 0.85, 0, 0, 1],
    8739: [-599e-5, 0.606, 0, 0, 0.33333],
    8741: [-599e-5, 0.606, 0, 0, 0.55556],
    8747: [0.30612, 0.805, 0.19445, 0, 0.47222],
    8748: [0.306, 0.805, 0.19445, 0, 0.47222],
    8749: [0.306, 0.805, 0.19445, 0, 0.47222],
    8750: [0.30612, 0.805, 0.19445, 0, 0.47222],
    8896: [0.25001, 0.75, 0, 0, 0.83334],
    8897: [0.25001, 0.75, 0, 0, 0.83334],
    8898: [0.25001, 0.75, 0, 0, 0.83334],
    8899: [0.25001, 0.75, 0, 0, 0.83334],
    8968: [0.35001, 0.85, 0, 0, 0.47222],
    8969: [0.35001, 0.85, 0, 0, 0.47222],
    8970: [0.35001, 0.85, 0, 0, 0.47222],
    8971: [0.35001, 0.85, 0, 0, 0.47222],
    9168: [-99e-5, 0.601, 0, 0, 0.66667],
    10216: [0.35001, 0.85, 0, 0, 0.47222],
    10217: [0.35001, 0.85, 0, 0, 0.47222],
    10752: [0.25001, 0.75, 0, 0, 1.11111],
    10753: [0.25001, 0.75, 0, 0, 1.11111],
    10754: [0.25001, 0.75, 0, 0, 1.11111],
    10756: [0.25001, 0.75, 0, 0, 0.83334],
    10758: [0.25001, 0.75, 0, 0, 0.83334]
  },
  "Size2-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [0.65002, 1.15, 0, 0, 0.59722],
    41: [0.65002, 1.15, 0, 0, 0.59722],
    47: [0.65002, 1.15, 0, 0, 0.81111],
    91: [0.65002, 1.15, 0, 0, 0.47222],
    92: [0.65002, 1.15, 0, 0, 0.81111],
    93: [0.65002, 1.15, 0, 0, 0.47222],
    123: [0.65002, 1.15, 0, 0, 0.66667],
    125: [0.65002, 1.15, 0, 0, 0.66667],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.75, 0, 0, 1],
    732: [0, 0.75, 0, 0, 1],
    770: [0, 0.75, 0, 0, 1],
    771: [0, 0.75, 0, 0, 1],
    8719: [0.55001, 1.05, 0, 0, 1.27778],
    8720: [0.55001, 1.05, 0, 0, 1.27778],
    8721: [0.55001, 1.05, 0, 0, 1.44445],
    8730: [0.65002, 1.15, 0, 0, 1],
    8747: [0.86225, 1.36, 0.44445, 0, 0.55556],
    8748: [0.862, 1.36, 0.44445, 0, 0.55556],
    8749: [0.862, 1.36, 0.44445, 0, 0.55556],
    8750: [0.86225, 1.36, 0.44445, 0, 0.55556],
    8896: [0.55001, 1.05, 0, 0, 1.11111],
    8897: [0.55001, 1.05, 0, 0, 1.11111],
    8898: [0.55001, 1.05, 0, 0, 1.11111],
    8899: [0.55001, 1.05, 0, 0, 1.11111],
    8968: [0.65002, 1.15, 0, 0, 0.52778],
    8969: [0.65002, 1.15, 0, 0, 0.52778],
    8970: [0.65002, 1.15, 0, 0, 0.52778],
    8971: [0.65002, 1.15, 0, 0, 0.52778],
    10216: [0.65002, 1.15, 0, 0, 0.61111],
    10217: [0.65002, 1.15, 0, 0, 0.61111],
    10752: [0.55001, 1.05, 0, 0, 1.51112],
    10753: [0.55001, 1.05, 0, 0, 1.51112],
    10754: [0.55001, 1.05, 0, 0, 1.51112],
    10756: [0.55001, 1.05, 0, 0, 1.11111],
    10758: [0.55001, 1.05, 0, 0, 1.11111]
  },
  "Size3-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [0.95003, 1.45, 0, 0, 0.73611],
    41: [0.95003, 1.45, 0, 0, 0.73611],
    47: [0.95003, 1.45, 0, 0, 1.04445],
    91: [0.95003, 1.45, 0, 0, 0.52778],
    92: [0.95003, 1.45, 0, 0, 1.04445],
    93: [0.95003, 1.45, 0, 0, 0.52778],
    123: [0.95003, 1.45, 0, 0, 0.75],
    125: [0.95003, 1.45, 0, 0, 0.75],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.75, 0, 0, 1.44445],
    732: [0, 0.75, 0, 0, 1.44445],
    770: [0, 0.75, 0, 0, 1.44445],
    771: [0, 0.75, 0, 0, 1.44445],
    8730: [0.95003, 1.45, 0, 0, 1],
    8968: [0.95003, 1.45, 0, 0, 0.58334],
    8969: [0.95003, 1.45, 0, 0, 0.58334],
    8970: [0.95003, 1.45, 0, 0, 0.58334],
    8971: [0.95003, 1.45, 0, 0, 0.58334],
    10216: [0.95003, 1.45, 0, 0, 0.75],
    10217: [0.95003, 1.45, 0, 0, 0.75]
  },
  "Size4-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [1.25003, 1.75, 0, 0, 0.79167],
    41: [1.25003, 1.75, 0, 0, 0.79167],
    47: [1.25003, 1.75, 0, 0, 1.27778],
    91: [1.25003, 1.75, 0, 0, 0.58334],
    92: [1.25003, 1.75, 0, 0, 1.27778],
    93: [1.25003, 1.75, 0, 0, 0.58334],
    123: [1.25003, 1.75, 0, 0, 0.80556],
    125: [1.25003, 1.75, 0, 0, 0.80556],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.825, 0, 0, 1.8889],
    732: [0, 0.825, 0, 0, 1.8889],
    770: [0, 0.825, 0, 0, 1.8889],
    771: [0, 0.825, 0, 0, 1.8889],
    8730: [1.25003, 1.75, 0, 0, 1],
    8968: [1.25003, 1.75, 0, 0, 0.63889],
    8969: [1.25003, 1.75, 0, 0, 0.63889],
    8970: [1.25003, 1.75, 0, 0, 0.63889],
    8971: [1.25003, 1.75, 0, 0, 0.63889],
    9115: [0.64502, 1.155, 0, 0, 0.875],
    9116: [1e-5, 0.6, 0, 0, 0.875],
    9117: [0.64502, 1.155, 0, 0, 0.875],
    9118: [0.64502, 1.155, 0, 0, 0.875],
    9119: [1e-5, 0.6, 0, 0, 0.875],
    9120: [0.64502, 1.155, 0, 0, 0.875],
    9121: [0.64502, 1.155, 0, 0, 0.66667],
    9122: [-99e-5, 0.601, 0, 0, 0.66667],
    9123: [0.64502, 1.155, 0, 0, 0.66667],
    9124: [0.64502, 1.155, 0, 0, 0.66667],
    9125: [-99e-5, 0.601, 0, 0, 0.66667],
    9126: [0.64502, 1.155, 0, 0, 0.66667],
    9127: [1e-5, 0.9, 0, 0, 0.88889],
    9128: [0.65002, 1.15, 0, 0, 0.88889],
    9129: [0.90001, 0, 0, 0, 0.88889],
    9130: [0, 0.3, 0, 0, 0.88889],
    9131: [1e-5, 0.9, 0, 0, 0.88889],
    9132: [0.65002, 1.15, 0, 0, 0.88889],
    9133: [0.90001, 0, 0, 0, 0.88889],
    9143: [0.88502, 0.915, 0, 0, 1.05556],
    10216: [1.25003, 1.75, 0, 0, 0.80556],
    10217: [1.25003, 1.75, 0, 0, 0.80556],
    57344: [-499e-5, 0.605, 0, 0, 1.05556],
    57345: [-499e-5, 0.605, 0, 0, 1.05556],
    57680: [0, 0.12, 0, 0, 0.45],
    57681: [0, 0.12, 0, 0, 0.45],
    57682: [0, 0.12, 0, 0, 0.45],
    57683: [0, 0.12, 0, 0, 0.45]
  },
  "Typewriter-Regular": {
    32: [0, 0, 0, 0, 0.525],
    33: [0, 0.61111, 0, 0, 0.525],
    34: [0, 0.61111, 0, 0, 0.525],
    35: [0, 0.61111, 0, 0, 0.525],
    36: [0.08333, 0.69444, 0, 0, 0.525],
    37: [0.08333, 0.69444, 0, 0, 0.525],
    38: [0, 0.61111, 0, 0, 0.525],
    39: [0, 0.61111, 0, 0, 0.525],
    40: [0.08333, 0.69444, 0, 0, 0.525],
    41: [0.08333, 0.69444, 0, 0, 0.525],
    42: [0, 0.52083, 0, 0, 0.525],
    43: [-0.08056, 0.53055, 0, 0, 0.525],
    44: [0.13889, 0.125, 0, 0, 0.525],
    45: [-0.08056, 0.53055, 0, 0, 0.525],
    46: [0, 0.125, 0, 0, 0.525],
    47: [0.08333, 0.69444, 0, 0, 0.525],
    48: [0, 0.61111, 0, 0, 0.525],
    49: [0, 0.61111, 0, 0, 0.525],
    50: [0, 0.61111, 0, 0, 0.525],
    51: [0, 0.61111, 0, 0, 0.525],
    52: [0, 0.61111, 0, 0, 0.525],
    53: [0, 0.61111, 0, 0, 0.525],
    54: [0, 0.61111, 0, 0, 0.525],
    55: [0, 0.61111, 0, 0, 0.525],
    56: [0, 0.61111, 0, 0, 0.525],
    57: [0, 0.61111, 0, 0, 0.525],
    58: [0, 0.43056, 0, 0, 0.525],
    59: [0.13889, 0.43056, 0, 0, 0.525],
    60: [-0.05556, 0.55556, 0, 0, 0.525],
    61: [-0.19549, 0.41562, 0, 0, 0.525],
    62: [-0.05556, 0.55556, 0, 0, 0.525],
    63: [0, 0.61111, 0, 0, 0.525],
    64: [0, 0.61111, 0, 0, 0.525],
    65: [0, 0.61111, 0, 0, 0.525],
    66: [0, 0.61111, 0, 0, 0.525],
    67: [0, 0.61111, 0, 0, 0.525],
    68: [0, 0.61111, 0, 0, 0.525],
    69: [0, 0.61111, 0, 0, 0.525],
    70: [0, 0.61111, 0, 0, 0.525],
    71: [0, 0.61111, 0, 0, 0.525],
    72: [0, 0.61111, 0, 0, 0.525],
    73: [0, 0.61111, 0, 0, 0.525],
    74: [0, 0.61111, 0, 0, 0.525],
    75: [0, 0.61111, 0, 0, 0.525],
    76: [0, 0.61111, 0, 0, 0.525],
    77: [0, 0.61111, 0, 0, 0.525],
    78: [0, 0.61111, 0, 0, 0.525],
    79: [0, 0.61111, 0, 0, 0.525],
    80: [0, 0.61111, 0, 0, 0.525],
    81: [0.13889, 0.61111, 0, 0, 0.525],
    82: [0, 0.61111, 0, 0, 0.525],
    83: [0, 0.61111, 0, 0, 0.525],
    84: [0, 0.61111, 0, 0, 0.525],
    85: [0, 0.61111, 0, 0, 0.525],
    86: [0, 0.61111, 0, 0, 0.525],
    87: [0, 0.61111, 0, 0, 0.525],
    88: [0, 0.61111, 0, 0, 0.525],
    89: [0, 0.61111, 0, 0, 0.525],
    90: [0, 0.61111, 0, 0, 0.525],
    91: [0.08333, 0.69444, 0, 0, 0.525],
    92: [0.08333, 0.69444, 0, 0, 0.525],
    93: [0.08333, 0.69444, 0, 0, 0.525],
    94: [0, 0.61111, 0, 0, 0.525],
    95: [0.09514, 0, 0, 0, 0.525],
    96: [0, 0.61111, 0, 0, 0.525],
    97: [0, 0.43056, 0, 0, 0.525],
    98: [0, 0.61111, 0, 0, 0.525],
    99: [0, 0.43056, 0, 0, 0.525],
    100: [0, 0.61111, 0, 0, 0.525],
    101: [0, 0.43056, 0, 0, 0.525],
    102: [0, 0.61111, 0, 0, 0.525],
    103: [0.22222, 0.43056, 0, 0, 0.525],
    104: [0, 0.61111, 0, 0, 0.525],
    105: [0, 0.61111, 0, 0, 0.525],
    106: [0.22222, 0.61111, 0, 0, 0.525],
    107: [0, 0.61111, 0, 0, 0.525],
    108: [0, 0.61111, 0, 0, 0.525],
    109: [0, 0.43056, 0, 0, 0.525],
    110: [0, 0.43056, 0, 0, 0.525],
    111: [0, 0.43056, 0, 0, 0.525],
    112: [0.22222, 0.43056, 0, 0, 0.525],
    113: [0.22222, 0.43056, 0, 0, 0.525],
    114: [0, 0.43056, 0, 0, 0.525],
    115: [0, 0.43056, 0, 0, 0.525],
    116: [0, 0.55358, 0, 0, 0.525],
    117: [0, 0.43056, 0, 0, 0.525],
    118: [0, 0.43056, 0, 0, 0.525],
    119: [0, 0.43056, 0, 0, 0.525],
    120: [0, 0.43056, 0, 0, 0.525],
    121: [0.22222, 0.43056, 0, 0, 0.525],
    122: [0, 0.43056, 0, 0, 0.525],
    123: [0.08333, 0.69444, 0, 0, 0.525],
    124: [0.08333, 0.69444, 0, 0, 0.525],
    125: [0.08333, 0.69444, 0, 0, 0.525],
    126: [0, 0.61111, 0, 0, 0.525],
    127: [0, 0.61111, 0, 0, 0.525],
    160: [0, 0, 0, 0, 0.525],
    176: [0, 0.61111, 0, 0, 0.525],
    184: [0.19445, 0, 0, 0, 0.525],
    305: [0, 0.43056, 0, 0, 0.525],
    567: [0.22222, 0.43056, 0, 0, 0.525],
    711: [0, 0.56597, 0, 0, 0.525],
    713: [0, 0.56555, 0, 0, 0.525],
    714: [0, 0.61111, 0, 0, 0.525],
    715: [0, 0.61111, 0, 0, 0.525],
    728: [0, 0.61111, 0, 0, 0.525],
    730: [0, 0.61111, 0, 0, 0.525],
    770: [0, 0.61111, 0, 0, 0.525],
    771: [0, 0.61111, 0, 0, 0.525],
    776: [0, 0.61111, 0, 0, 0.525],
    915: [0, 0.61111, 0, 0, 0.525],
    916: [0, 0.61111, 0, 0, 0.525],
    920: [0, 0.61111, 0, 0, 0.525],
    923: [0, 0.61111, 0, 0, 0.525],
    926: [0, 0.61111, 0, 0, 0.525],
    928: [0, 0.61111, 0, 0, 0.525],
    931: [0, 0.61111, 0, 0, 0.525],
    933: [0, 0.61111, 0, 0, 0.525],
    934: [0, 0.61111, 0, 0, 0.525],
    936: [0, 0.61111, 0, 0, 0.525],
    937: [0, 0.61111, 0, 0, 0.525],
    8216: [0, 0.61111, 0, 0, 0.525],
    8217: [0, 0.61111, 0, 0, 0.525],
    8242: [0, 0.61111, 0, 0, 0.525],
    9251: [0.11111, 0.21944, 0, 0, 0.525]
  }
}, gi = {
  slant: [0.25, 0.25, 0.25],
  // sigma1
  space: [0, 0, 0],
  // sigma2
  stretch: [0, 0, 0],
  // sigma3
  shrink: [0, 0, 0],
  // sigma4
  xHeight: [0.431, 0.431, 0.431],
  // sigma5
  quad: [1, 1.171, 1.472],
  // sigma6
  extraSpace: [0, 0, 0],
  // sigma7
  num1: [0.677, 0.732, 0.925],
  // sigma8
  num2: [0.394, 0.384, 0.387],
  // sigma9
  num3: [0.444, 0.471, 0.504],
  // sigma10
  denom1: [0.686, 0.752, 1.025],
  // sigma11
  denom2: [0.345, 0.344, 0.532],
  // sigma12
  sup1: [0.413, 0.503, 0.504],
  // sigma13
  sup2: [0.363, 0.431, 0.404],
  // sigma14
  sup3: [0.289, 0.286, 0.294],
  // sigma15
  sub1: [0.15, 0.143, 0.2],
  // sigma16
  sub2: [0.247, 0.286, 0.4],
  // sigma17
  supDrop: [0.386, 0.353, 0.494],
  // sigma18
  subDrop: [0.05, 0.071, 0.1],
  // sigma19
  delim1: [2.39, 1.7, 1.98],
  // sigma20
  delim2: [1.01, 1.157, 1.42],
  // sigma21
  axisHeight: [0.25, 0.25, 0.25],
  // sigma22
  // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;
  // they correspond to the font parameters of the extension fonts (family 3).
  // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to
  // match cmex7, we'd use cmex7.tfm values for script and scriptscript
  // values.
  defaultRuleThickness: [0.04, 0.049, 0.049],
  // xi8; cmex7: 0.049
  bigOpSpacing1: [0.111, 0.111, 0.111],
  // xi9
  bigOpSpacing2: [0.166, 0.166, 0.166],
  // xi10
  bigOpSpacing3: [0.2, 0.2, 0.2],
  // xi11
  bigOpSpacing4: [0.6, 0.611, 0.611],
  // xi12; cmex7: 0.611
  bigOpSpacing5: [0.1, 0.143, 0.143],
  // xi13; cmex7: 0.143
  // The \sqrt rule width is taken from the height of the surd character.
  // Since we use the same font at all sizes, this thickness doesn't scale.
  sqrtRuleThickness: [0.04, 0.04, 0.04],
  // This value determines how large a pt is, for metrics which are defined
  // in terms of pts.
  // This value is also used in katex.scss; if you change it make sure the
  // values match.
  ptPerEm: [10, 10, 10],
  // The space between adjacent `|` columns in an array definition. From
  // `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.
  doubleRuleSep: [0.2, 0.2, 0.2],
  // The width of separator lines in {array} environments. From
  // `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.
  arrayRuleWidth: [0.04, 0.04, 0.04],
  // Two values from LaTeX source2e:
  fboxsep: [0.3, 0.3, 0.3],
  //        3 pt / ptPerEm
  fboxrule: [0.04, 0.04, 0.04]
  // 0.4 pt / ptPerEm
}, aa = {
  // Latin-1
  Å: "A",
  Ð: "D",
  Þ: "o",
  å: "a",
  ð: "d",
  þ: "o",
  // Cyrillic
  А: "A",
  Б: "B",
  В: "B",
  Г: "F",
  Д: "A",
  Е: "E",
  Ж: "K",
  З: "3",
  И: "N",
  Й: "N",
  К: "K",
  Л: "N",
  М: "M",
  Н: "H",
  О: "O",
  П: "N",
  Р: "P",
  С: "C",
  Т: "T",
  У: "y",
  Ф: "O",
  Х: "X",
  Ц: "U",
  Ч: "h",
  Ш: "W",
  Щ: "W",
  Ъ: "B",
  Ы: "X",
  Ь: "B",
  Э: "3",
  Ю: "X",
  Я: "R",
  а: "a",
  б: "b",
  в: "a",
  г: "r",
  д: "y",
  е: "e",
  ж: "m",
  з: "e",
  и: "n",
  й: "n",
  к: "n",
  л: "n",
  м: "m",
  н: "n",
  о: "o",
  п: "n",
  р: "p",
  с: "c",
  т: "o",
  у: "y",
  ф: "b",
  х: "x",
  ц: "n",
  ч: "n",
  ш: "w",
  щ: "w",
  ъ: "a",
  ы: "m",
  ь: "a",
  э: "e",
  ю: "m",
  я: "r"
};
function Uh(i, e) {
  Wt[i] = e;
}
function dn(i, e, t) {
  if (!Wt[e])
    throw new Error("Font metrics not found for font: " + e + ".");
  var r = i.charCodeAt(0), n = Wt[e][r];
  if (!n && i[0] in aa && (r = aa[i[0]].charCodeAt(0), n = Wt[e][r]), !n && t === "text" && i0(r) && (n = Wt[e][77]), n)
    return {
      depth: n[0],
      height: n[1],
      italic: n[2],
      skew: n[3],
      width: n[4]
    };
}
var ms = {};
function Wh(i) {
  var e;
  if (i >= 5 ? e = 0 : i >= 3 ? e = 1 : e = 2, !ms[e]) {
    var t = ms[e] = {
      cssEmPerMu: gi.quad[e] / 18
    };
    for (var r in gi)
      gi.hasOwnProperty(r) && (t[r] = gi[r][e]);
  }
  return ms[e];
}
var jh = [
  // Each element contains [textsize, scriptsize, scriptscriptsize].
  // The size mappings are taken from TeX with \normalsize=10pt.
  [1, 1, 1],
  // size1: [5, 5, 5]              \tiny
  [2, 1, 1],
  // size2: [6, 5, 5]
  [3, 1, 1],
  // size3: [7, 5, 5]              \scriptsize
  [4, 2, 1],
  // size4: [8, 6, 5]              \footnotesize
  [5, 2, 1],
  // size5: [9, 6, 5]              \small
  [6, 3, 1],
  // size6: [10, 7, 5]             \normalsize
  [7, 4, 2],
  // size7: [12, 8, 6]             \large
  [8, 6, 3],
  // size8: [14.4, 10, 7]          \Large
  [9, 7, 6],
  // size9: [17.28, 12, 10]        \LARGE
  [10, 8, 7],
  // size10: [20.74, 14.4, 12]     \huge
  [11, 10, 9]
  // size11: [24.88, 20.74, 17.28] \HUGE
], oa = [
  // fontMetrics.js:getGlobalMetrics also uses size indexes, so if
  // you change size indexes, change that function.
  0.5,
  0.6,
  0.7,
  0.8,
  0.9,
  1,
  1.2,
  1.44,
  1.728,
  2.074,
  2.488
], la = function(e, t) {
  return t.size < 2 ? e : jh[e - 1][t.size - 1];
};
class sr {
  // A font family applies to a group of fonts (i.e. SansSerif), while a font
  // represents a specific font (i.e. SansSerif Bold).
  // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm
  /**
   * The base size index.
   */
  constructor(e) {
    this.style = void 0, this.color = void 0, this.size = void 0, this.textSize = void 0, this.phantom = void 0, this.font = void 0, this.fontFamily = void 0, this.fontWeight = void 0, this.fontShape = void 0, this.sizeMultiplier = void 0, this.maxSize = void 0, this.minRuleThickness = void 0, this._fontMetrics = void 0, this.style = e.style, this.color = e.color, this.size = e.size || sr.BASESIZE, this.textSize = e.textSize || this.size, this.phantom = !!e.phantom, this.font = e.font || "", this.fontFamily = e.fontFamily || "", this.fontWeight = e.fontWeight || "", this.fontShape = e.fontShape || "", this.sizeMultiplier = oa[this.size - 1], this.maxSize = e.maxSize, this.minRuleThickness = e.minRuleThickness, this._fontMetrics = void 0;
  }
  /**
   * Returns a new options object with the same properties as "this".  Properties
   * from "extension" will be copied to the new options object.
   */
  extend(e) {
    var t = {
      style: this.style,
      size: this.size,
      textSize: this.textSize,
      color: this.color,
      phantom: this.phantom,
      font: this.font,
      fontFamily: this.fontFamily,
      fontWeight: this.fontWeight,
      fontShape: this.fontShape,
      maxSize: this.maxSize,
      minRuleThickness: this.minRuleThickness
    };
    for (var r in e)
      e.hasOwnProperty(r) && (t[r] = e[r]);
    return new sr(t);
  }
  /**
   * Return an options object with the given style. If `this.style === style`,
   * returns `this`.
   */
  havingStyle(e) {
    return this.style === e ? this : this.extend({
      style: e,
      size: la(this.textSize, e)
    });
  }
  /**
   * Return an options object with a cramped version of the current style. If
   * the current style is cramped, returns `this`.
   */
  havingCrampedStyle() {
    return this.havingStyle(this.style.cramp());
  }
  /**
   * Return an options object with the given size and in at least `\textstyle`.
   * Returns `this` if appropriate.
   */
  havingSize(e) {
    return this.size === e && this.textSize === e ? this : this.extend({
      style: this.style.text(),
      size: e,
      textSize: e,
      sizeMultiplier: oa[e - 1]
    });
  }
  /**
   * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
   * changes to at least `\textstyle`.
   */
  havingBaseStyle(e) {
    e = e || this.style.text();
    var t = la(sr.BASESIZE, e);
    return this.size === t && this.textSize === sr.BASESIZE && this.style === e ? this : this.extend({
      style: e,
      size: t
    });
  }
  /**
   * Remove the effect of sizing changes such as \Huge.
   * Keep the effect of the current style, such as \scriptstyle.
   */
  havingBaseSizing() {
    var e;
    switch (this.style.id) {
      case 4:
      case 5:
        e = 3;
        break;
      case 6:
      case 7:
        e = 1;
        break;
      default:
        e = 6;
    }
    return this.extend({
      style: this.style.text(),
      size: e
    });
  }
  /**
   * Create a new options object with the given color.
   */
  withColor(e) {
    return this.extend({
      color: e
    });
  }
  /**
   * Create a new options object with "phantom" set to true.
   */
  withPhantom() {
    return this.extend({
      phantom: !0
    });
  }
  /**
   * Creates a new options object with the given math font or old text font.
   * @type {[type]}
   */
  withFont(e) {
    return this.extend({
      font: e
    });
  }
  /**
   * Create a new options objects with the given fontFamily.
   */
  withTextFontFamily(e) {
    return this.extend({
      fontFamily: e,
      font: ""
    });
  }
  /**
   * Creates a new options object with the given font weight
   */
  withTextFontWeight(e) {
    return this.extend({
      fontWeight: e,
      font: ""
    });
  }
  /**
   * Creates a new options object with the given font weight
   */
  withTextFontShape(e) {
    return this.extend({
      fontShape: e,
      font: ""
    });
  }
  /**
   * Return the CSS sizing classes required to switch from enclosing options
   * `oldOptions` to `this`. Returns an array of classes.
   */
  sizingClasses(e) {
    return e.size !== this.size ? ["sizing", "reset-size" + e.size, "size" + this.size] : [];
  }
  /**
   * Return the CSS sizing classes required to switch to the base size. Like
   * `this.havingSize(BASESIZE).sizingClasses(this)`.
   */
  baseSizingClasses() {
    return this.size !== sr.BASESIZE ? ["sizing", "reset-size" + this.size, "size" + sr.BASESIZE] : [];
  }
  /**
   * Return the font metrics for this size.
   */
  fontMetrics() {
    return this._fontMetrics || (this._fontMetrics = Wh(this.size)), this._fontMetrics;
  }
  /**
   * Gets the CSS color of the current options object
   */
  getColor() {
    return this.phantom ? "transparent" : this.color;
  }
}
sr.BASESIZE = 6;
var Ws = {
  // https://en.wikibooks.org/wiki/LaTeX/Lengths and
  // https://tex.stackexchange.com/a/8263
  pt: 1,
  // TeX point
  mm: 7227 / 2540,
  // millimeter
  cm: 7227 / 254,
  // centimeter
  in: 72.27,
  // inch
  bp: 803 / 800,
  // big (PostScript) points
  pc: 12,
  // pica
  dd: 1238 / 1157,
  // didot
  cc: 14856 / 1157,
  // cicero (12 didot)
  nd: 685 / 642,
  // new didot
  nc: 1370 / 107,
  // new cicero (12 new didot)
  sp: 1 / 65536,
  // scaled point (TeX's internal smallest unit)
  // https://tex.stackexchange.com/a/41371
  px: 803 / 800
  // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX
}, Gh = {
  ex: !0,
  em: !0,
  mu: !0
}, s0 = function(e) {
  return typeof e != "string" && (e = e.unit), e in Ws || e in Gh || e === "ex";
}, ze = function(e, t) {
  var r;
  if (e.unit in Ws)
    r = Ws[e.unit] / t.fontMetrics().ptPerEm / t.sizeMultiplier;
  else if (e.unit === "mu")
    r = t.fontMetrics().cssEmPerMu;
  else {
    var n;
    if (t.style.isTight() ? n = t.havingStyle(t.style.text()) : n = t, e.unit === "ex")
      r = n.fontMetrics().xHeight;
    else if (e.unit === "em")
      r = n.fontMetrics().quad;
    else
      throw new ie("Invalid unit: '" + e.unit + "'");
    n !== t && (r *= n.sizeMultiplier / t.sizeMultiplier);
  }
  return Math.min(e.number * r, t.maxSize);
}, le = function(e) {
  return +e.toFixed(4) + "em";
}, gr = function(e) {
  return e.filter((t) => t).join(" ");
}, n0 = function(e, t, r) {
  if (this.classes = e || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = r || {}, t) {
    t.style.isTight() && this.classes.push("mtight");
    var n = t.getColor();
    n && (this.style.color = n);
  }
}, a0 = function(e) {
  var t = document.createElement(e);
  t.className = gr(this.classes);
  for (var r in this.style)
    this.style.hasOwnProperty(r) && (t.style[r] = this.style[r]);
  for (var n in this.attributes)
    this.attributes.hasOwnProperty(n) && t.setAttribute(n, this.attributes[n]);
  for (var o = 0; o < this.children.length; o++)
    t.appendChild(this.children[o].toNode());
  return t;
}, o0 = function(e) {
  var t = "<" + e;
  this.classes.length && (t += ' class="' + _e.escape(gr(this.classes)) + '"');
  var r = "";
  for (var n in this.style)
    this.style.hasOwnProperty(n) && (r += _e.hyphenate(n) + ":" + this.style[n] + ";");
  r && (t += ' style="' + _e.escape(r) + '"');
  for (var o in this.attributes)
    this.attributes.hasOwnProperty(o) && (t += " " + o + '="' + _e.escape(this.attributes[o]) + '"');
  t += ">";
  for (var c = 0; c < this.children.length; c++)
    t += this.children[c].toMarkup();
  return t += "</" + e + ">", t;
};
class di {
  constructor(e, t, r, n) {
    this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, n0.call(this, e, r, n), this.children = t || [];
  }
  /**
   * Sets an arbitrary attribute on the span. Warning: use this wisely. Not
   * all browsers support attributes the same, and having too many custom
   * attributes is probably bad.
   */
  setAttribute(e, t) {
    this.attributes[e] = t;
  }
  hasClass(e) {
    return _e.contains(this.classes, e);
  }
  toNode() {
    return a0.call(this, "span");
  }
  toMarkup() {
    return o0.call(this, "span");
  }
}
class fn {
  constructor(e, t, r, n) {
    this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, n0.call(this, t, n), this.children = r || [], this.setAttribute("href", e);
  }
  setAttribute(e, t) {
    this.attributes[e] = t;
  }
  hasClass(e) {
    return _e.contains(this.classes, e);
  }
  toNode() {
    return a0.call(this, "a");
  }
  toMarkup() {
    return o0.call(this, "a");
  }
}
class Vh {
  constructor(e, t, r) {
    this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = t, this.src = e, this.classes = ["mord"], this.style = r;
  }
  hasClass(e) {
    return _e.contains(this.classes, e);
  }
  toNode() {
    var e = document.createElement("img");
    e.src = this.src, e.alt = this.alt, e.className = "mord";
    for (var t in this.style)
      this.style.hasOwnProperty(t) && (e.style[t] = this.style[t]);
    return e;
  }
  toMarkup() {
    var e = '<img src="' + _e.escape(this.src) + '"' + (' alt="' + _e.escape(this.alt) + '"'), t = "";
    for (var r in this.style)
      this.style.hasOwnProperty(r) && (t += _e.hyphenate(r) + ":" + this.style[r] + ";");
    return t && (e += ' style="' + _e.escape(t) + '"'), e += "'/>", e;
  }
}
var Kh = {
  î: "ı̂",
  ï: "ı̈",
  í: "ı́",
  // 'ī': '\u0131\u0304', // enable when we add Extended Latin
  ì: "ı̀"
};
class Ct {
  constructor(e, t, r, n, o, c, s, a) {
    this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = t || 0, this.depth = r || 0, this.italic = n || 0, this.skew = o || 0, this.width = c || 0, this.classes = s || [], this.style = a || {}, this.maxFontSize = 0;
    var u = Bh(this.text.charCodeAt(0));
    u && this.classes.push(u + "_fallback"), /[îïíì]/.test(this.text) && (this.text = Kh[this.text]);
  }
  hasClass(e) {
    return _e.contains(this.classes, e);
  }
  /**
   * Creates a text node or span from a symbol node. Note that a span is only
   * created if it is needed.
   */
  toNode() {
    var e = document.createTextNode(this.text), t = null;
    this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = le(this.italic)), this.classes.length > 0 && (t = t || document.createElement("span"), t.className = gr(this.classes));
    for (var r in this.style)
      this.style.hasOwnProperty(r) && (t = t || document.createElement("span"), t.style[r] = this.style[r]);
    return t ? (t.appendChild(e), t) : e;
  }
  /**
   * Creates markup for a symbol node.
   */
  toMarkup() {
    var e = !1, t = "<span";
    this.classes.length && (e = !0, t += ' class="', t += _e.escape(gr(this.classes)), t += '"');
    var r = "";
    this.italic > 0 && (r += "margin-right:" + this.italic + "em;");
    for (var n in this.style)
      this.style.hasOwnProperty(n) && (r += _e.hyphenate(n) + ":" + this.style[n] + ";");
    r && (e = !0, t += ' style="' + _e.escape(r) + '"');
    var o = _e.escape(this.text);
    return e ? (t += ">", t += o, t += "</span>", t) : o;
  }
}
class or {
  constructor(e, t) {
    this.children = void 0, this.attributes = void 0, this.children = e || [], this.attributes = t || {};
  }
  toNode() {
    var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "svg");
    for (var r in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, r) && t.setAttribute(r, this.attributes[r]);
    for (var n = 0; n < this.children.length; n++)
      t.appendChild(this.children[n].toNode());
    return t;
  }
  toMarkup() {
    var e = '<svg xmlns="http://www.w3.org/2000/svg"';
    for (var t in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + _e.escape(this.attributes[t]) + '"');
    e += ">";
    for (var r = 0; r < this.children.length; r++)
      e += this.children[r].toMarkup();
    return e += "</svg>", e;
  }
}
class vr {
  constructor(e, t) {
    this.pathName = void 0, this.alternate = void 0, this.pathName = e, this.alternate = t;
  }
  toNode() {
    var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "path");
    return this.alternate ? t.setAttribute("d", this.alternate) : t.setAttribute("d", na[this.pathName]), t;
  }
  toMarkup() {
    return this.alternate ? '<path d="' + _e.escape(this.alternate) + '"/>' : '<path d="' + _e.escape(na[this.pathName]) + '"/>';
  }
}
class js {
  constructor(e) {
    this.attributes = void 0, this.attributes = e || {};
  }
  toNode() {
    var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "line");
    for (var r in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, r) && t.setAttribute(r, this.attributes[r]);
    return t;
  }
  toMarkup() {
    var e = "<line";
    for (var t in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + _e.escape(this.attributes[t]) + '"');
    return e += "/>", e;
  }
}
function ha(i) {
  if (i instanceof Ct)
    return i;
  throw new Error("Expected symbolNode but got " + String(i) + ".");
}
function Xh(i) {
  if (i instanceof di)
    return i;
  throw new Error("Expected span<HtmlDomNode> but got " + String(i) + ".");
}
var Yh = {
  bin: 1,
  close: 1,
  inner: 1,
  open: 1,
  punct: 1,
  rel: 1
}, $h = {
  "accent-token": 1,
  mathord: 1,
  "op-token": 1,
  spacing: 1,
  textord: 1
}, Oe = {
  math: {},
  text: {}
};
function w(i, e, t, r, n, o) {
  Oe[i][n] = {
    font: e,
    group: t,
    replace: r
  }, o && r && (Oe[i][r] = Oe[i][n]);
}
var k = "math", Q = "text", A = "main", P = "ams", Ie = "accent-token", ce = "bin", it = "close", jr = "inner", ge = "mathord", We = "op-token", ft = "open", is = "punct", z = "rel", cr = "spacing", q = "textord";
w(k, A, z, "≡", "\\equiv", !0);
w(k, A, z, "≺", "\\prec", !0);
w(k, A, z, "≻", "\\succ", !0);
w(k, A, z, "∼", "\\sim", !0);
w(k, A, z, "⊥", "\\perp");
w(k, A, z, "⪯", "\\preceq", !0);
w(k, A, z, "⪰", "\\succeq", !0);
w(k, A, z, "≃", "\\simeq", !0);
w(k, A, z, "∣", "\\mid", !0);
w(k, A, z, "≪", "\\ll", !0);
w(k, A, z, "≫", "\\gg", !0);
w(k, A, z, "≍", "\\asymp", !0);
w(k, A, z, "∥", "\\parallel");
w(k, A, z, "⋈", "\\bowtie", !0);
w(k, A, z, "⌣", "\\smile", !0);
w(k, A, z, "⊑", "\\sqsubseteq", !0);
w(k, A, z, "⊒", "\\sqsupseteq", !0);
w(k, A, z, "≐", "\\doteq", !0);
w(k, A, z, "⌢", "\\frown", !0);
w(k, A, z, "∋", "\\ni", !0);
w(k, A, z, "∝", "\\propto", !0);
w(k, A, z, "⊢", "\\vdash", !0);
w(k, A, z, "⊣", "\\dashv", !0);
w(k, A, z, "∋", "\\owns");
w(k, A, is, ".", "\\ldotp");
w(k, A, is, "⋅", "\\cdotp");
w(k, A, q, "#", "\\#");
w(Q, A, q, "#", "\\#");
w(k, A, q, "&", "\\&");
w(Q, A, q, "&", "\\&");
w(k, A, q, "ℵ", "\\aleph", !0);
w(k, A, q, "∀", "\\forall", !0);
w(k, A, q, "ℏ", "\\hbar", !0);
w(k, A, q, "∃", "\\exists", !0);
w(k, A, q, "∇", "\\nabla", !0);
w(k, A, q, "♭", "\\flat", !0);
w(k, A, q, "ℓ", "\\ell", !0);
w(k, A, q, "♮", "\\natural", !0);
w(k, A, q, "♣", "\\clubsuit", !0);
w(k, A, q, "℘", "\\wp", !0);
w(k, A, q, "♯", "\\sharp", !0);
w(k, A, q, "♢", "\\diamondsuit", !0);
w(k, A, q, "ℜ", "\\Re", !0);
w(k, A, q, "♡", "\\heartsuit", !0);
w(k, A, q, "ℑ", "\\Im", !0);
w(k, A, q, "♠", "\\spadesuit", !0);
w(k, A, q, "§", "\\S", !0);
w(Q, A, q, "§", "\\S");
w(k, A, q, "¶", "\\P", !0);
w(Q, A, q, "¶", "\\P");
w(k, A, q, "†", "\\dag");
w(Q, A, q, "†", "\\dag");
w(Q, A, q, "†", "\\textdagger");
w(k, A, q, "‡", "\\ddag");
w(Q, A, q, "‡", "\\ddag");
w(Q, A, q, "‡", "\\textdaggerdbl");
w(k, A, it, "⎱", "\\rmoustache", !0);
w(k, A, ft, "⎰", "\\lmoustache", !0);
w(k, A, it, "⟯", "\\rgroup", !0);
w(k, A, ft, "⟮", "\\lgroup", !0);
w(k, A, ce, "∓", "\\mp", !0);
w(k, A, ce, "⊖", "\\ominus", !0);
w(k, A, ce, "⊎", "\\uplus", !0);
w(k, A, ce, "⊓", "\\sqcap", !0);
w(k, A, ce, "∗", "\\ast");
w(k, A, ce, "⊔", "\\sqcup", !0);
w(k, A, ce, "◯", "\\bigcirc", !0);
w(k, A, ce, "∙", "\\bullet", !0);
w(k, A, ce, "‡", "\\ddagger");
w(k, A, ce, "≀", "\\wr", !0);
w(k, A, ce, "⨿", "\\amalg");
w(k, A, ce, "&", "\\And");
w(k, A, z, "⟵", "\\longleftarrow", !0);
w(k, A, z, "⇐", "\\Leftarrow", !0);
w(k, A, z, "⟸", "\\Longleftarrow", !0);
w(k, A, z, "⟶", "\\longrightarrow", !0);
w(k, A, z, "⇒", "\\Rightarrow", !0);
w(k, A, z, "⟹", "\\Longrightarrow", !0);
w(k, A, z, "↔", "\\leftrightarrow", !0);
w(k, A, z, "⟷", "\\longleftrightarrow", !0);
w(k, A, z, "⇔", "\\Leftrightarrow", !0);
w(k, A, z, "⟺", "\\Longleftrightarrow", !0);
w(k, A, z, "↦", "\\mapsto", !0);
w(k, A, z, "⟼", "\\longmapsto", !0);
w(k, A, z, "↗", "\\nearrow", !0);
w(k, A, z, "↩", "\\hookleftarrow", !0);
w(k, A, z, "↪", "\\hookrightarrow", !0);
w(k, A, z, "↘", "\\searrow", !0);
w(k, A, z, "↼", "\\leftharpoonup", !0);
w(k, A, z, "⇀", "\\rightharpoonup", !0);
w(k, A, z, "↙", "\\swarrow", !0);
w(k, A, z, "↽", "\\leftharpoondown", !0);
w(k, A, z, "⇁", "\\rightharpoondown", !0);
w(k, A, z, "↖", "\\nwarrow", !0);
w(k, A, z, "⇌", "\\rightleftharpoons", !0);
w(k, P, z, "≮", "\\nless", !0);
w(k, P, z, "", "\\@nleqslant");
w(k, P, z, "", "\\@nleqq");
w(k, P, z, "⪇", "\\lneq", !0);
w(k, P, z, "≨", "\\lneqq", !0);
w(k, P, z, "", "\\@lvertneqq");
w(k, P, z, "⋦", "\\lnsim", !0);
w(k, P, z, "⪉", "\\lnapprox", !0);
w(k, P, z, "⊀", "\\nprec", !0);
w(k, P, z, "⋠", "\\npreceq", !0);
w(k, P, z, "⋨", "\\precnsim", !0);
w(k, P, z, "⪹", "\\precnapprox", !0);
w(k, P, z, "≁", "\\nsim", !0);
w(k, P, z, "", "\\@nshortmid");
w(k, P, z, "∤", "\\nmid", !0);
w(k, P, z, "⊬", "\\nvdash", !0);
w(k, P, z, "⊭", "\\nvDash", !0);
w(k, P, z, "⋪", "\\ntriangleleft");
w(k, P, z, "⋬", "\\ntrianglelefteq", !0);
w(k, P, z, "⊊", "\\subsetneq", !0);
w(k, P, z, "", "\\@varsubsetneq");
w(k, P, z, "⫋", "\\subsetneqq", !0);
w(k, P, z, "", "\\@varsubsetneqq");
w(k, P, z, "≯", "\\ngtr", !0);
w(k, P, z, "", "\\@ngeqslant");
w(k, P, z, "", "\\@ngeqq");
w(k, P, z, "⪈", "\\gneq", !0);
w(k, P, z, "≩", "\\gneqq", !0);
w(k, P, z, "", "\\@gvertneqq");
w(k, P, z, "⋧", "\\gnsim", !0);
w(k, P, z, "⪊", "\\gnapprox", !0);
w(k, P, z, "⊁", "\\nsucc", !0);
w(k, P, z, "⋡", "\\nsucceq", !0);
w(k, P, z, "⋩", "\\succnsim", !0);
w(k, P, z, "⪺", "\\succnapprox", !0);
w(k, P, z, "≆", "\\ncong", !0);
w(k, P, z, "", "\\@nshortparallel");
w(k, P, z, "∦", "\\nparallel", !0);
w(k, P, z, "⊯", "\\nVDash", !0);
w(k, P, z, "⋫", "\\ntriangleright");
w(k, P, z, "⋭", "\\ntrianglerighteq", !0);
w(k, P, z, "", "\\@nsupseteqq");
w(k, P, z, "⊋", "\\supsetneq", !0);
w(k, P, z, "", "\\@varsupsetneq");
w(k, P, z, "⫌", "\\supsetneqq", !0);
w(k, P, z, "", "\\@varsupsetneqq");
w(k, P, z, "⊮", "\\nVdash", !0);
w(k, P, z, "⪵", "\\precneqq", !0);
w(k, P, z, "⪶", "\\succneqq", !0);
w(k, P, z, "", "\\@nsubseteqq");
w(k, P, ce, "⊴", "\\unlhd");
w(k, P, ce, "⊵", "\\unrhd");
w(k, P, z, "↚", "\\nleftarrow", !0);
w(k, P, z, "↛", "\\nrightarrow", !0);
w(k, P, z, "⇍", "\\nLeftarrow", !0);
w(k, P, z, "⇏", "\\nRightarrow", !0);
w(k, P, z, "↮", "\\nleftrightarrow", !0);
w(k, P, z, "⇎", "\\nLeftrightarrow", !0);
w(k, P, z, "△", "\\vartriangle");
w(k, P, q, "ℏ", "\\hslash");
w(k, P, q, "▽", "\\triangledown");
w(k, P, q, "◊", "\\lozenge");
w(k, P, q, "Ⓢ", "\\circledS");
w(k, P, q, "®", "\\circledR");
w(Q, P, q, "®", "\\circledR");
w(k, P, q, "∡", "\\measuredangle", !0);
w(k, P, q, "∄", "\\nexists");
w(k, P, q, "℧", "\\mho");
w(k, P, q, "Ⅎ", "\\Finv", !0);
w(k, P, q, "⅁", "\\Game", !0);
w(k, P, q, "‵", "\\backprime");
w(k, P, q, "▲", "\\blacktriangle");
w(k, P, q, "▼", "\\blacktriangledown");
w(k, P, q, "■", "\\blacksquare");
w(k, P, q, "⧫", "\\blacklozenge");
w(k, P, q, "★", "\\bigstar");
w(k, P, q, "∢", "\\sphericalangle", !0);
w(k, P, q, "∁", "\\complement", !0);
w(k, P, q, "ð", "\\eth", !0);
w(Q, A, q, "ð", "ð");
w(k, P, q, "╱", "\\diagup");
w(k, P, q, "╲", "\\diagdown");
w(k, P, q, "□", "\\square");
w(k, P, q, "□", "\\Box");
w(k, P, q, "◊", "\\Diamond");
w(k, P, q, "¥", "\\yen", !0);
w(Q, P, q, "¥", "\\yen", !0);
w(k, P, q, "✓", "\\checkmark", !0);
w(Q, P, q, "✓", "\\checkmark");
w(k, P, q, "ℶ", "\\beth", !0);
w(k, P, q, "ℸ", "\\daleth", !0);
w(k, P, q, "ℷ", "\\gimel", !0);
w(k, P, q, "ϝ", "\\digamma", !0);
w(k, P, q, "ϰ", "\\varkappa");
w(k, P, ft, "┌", "\\@ulcorner", !0);
w(k, P, it, "┐", "\\@urcorner", !0);
w(k, P, ft, "└", "\\@llcorner", !0);
w(k, P, it, "┘", "\\@lrcorner", !0);
w(k, P, z, "≦", "\\leqq", !0);
w(k, P, z, "⩽", "\\leqslant", !0);
w(k, P, z, "⪕", "\\eqslantless", !0);
w(k, P, z, "≲", "\\lesssim", !0);
w(k, P, z, "⪅", "\\lessapprox", !0);
w(k, P, z, "≊", "\\approxeq", !0);
w(k, P, ce, "⋖", "\\lessdot");
w(k, P, z, "⋘", "\\lll", !0);
w(k, P, z, "≶", "\\lessgtr", !0);
w(k, P, z, "⋚", "\\lesseqgtr", !0);
w(k, P, z, "⪋", "\\lesseqqgtr", !0);
w(k, P, z, "≑", "\\doteqdot");
w(k, P, z, "≓", "\\risingdotseq", !0);
w(k, P, z, "≒", "\\fallingdotseq", !0);
w(k, P, z, "∽", "\\backsim", !0);
w(k, P, z, "⋍", "\\backsimeq", !0);
w(k, P, z, "⫅", "\\subseteqq", !0);
w(k, P, z, "⋐", "\\Subset", !0);
w(k, P, z, "⊏", "\\sqsubset", !0);
w(k, P, z, "≼", "\\preccurlyeq", !0);
w(k, P, z, "⋞", "\\curlyeqprec", !0);
w(k, P, z, "≾", "\\precsim", !0);
w(k, P, z, "⪷", "\\precapprox", !0);
w(k, P, z, "⊲", "\\vartriangleleft");
w(k, P, z, "⊴", "\\trianglelefteq");
w(k, P, z, "⊨", "\\vDash", !0);
w(k, P, z, "⊪", "\\Vvdash", !0);
w(k, P, z, "⌣", "\\smallsmile");
w(k, P, z, "⌢", "\\smallfrown");
w(k, P, z, "≏", "\\bumpeq", !0);
w(k, P, z, "≎", "\\Bumpeq", !0);
w(k, P, z, "≧", "\\geqq", !0);
w(k, P, z, "⩾", "\\geqslant", !0);
w(k, P, z, "⪖", "\\eqslantgtr", !0);
w(k, P, z, "≳", "\\gtrsim", !0);
w(k, P, z, "⪆", "\\gtrapprox", !0);
w(k, P, ce, "⋗", "\\gtrdot");
w(k, P, z, "⋙", "\\ggg", !0);
w(k, P, z, "≷", "\\gtrless", !0);
w(k, P, z, "⋛", "\\gtreqless", !0);
w(k, P, z, "⪌", "\\gtreqqless", !0);
w(k, P, z, "≖", "\\eqcirc", !0);
w(k, P, z, "≗", "\\circeq", !0);
w(k, P, z, "≜", "\\triangleq", !0);
w(k, P, z, "∼", "\\thicksim");
w(k, P, z, "≈", "\\thickapprox");
w(k, P, z, "⫆", "\\supseteqq", !0);
w(k, P, z, "⋑", "\\Supset", !0);
w(k, P, z, "⊐", "\\sqsupset", !0);
w(k, P, z, "≽", "\\succcurlyeq", !0);
w(k, P, z, "⋟", "\\curlyeqsucc", !0);
w(k, P, z, "≿", "\\succsim", !0);
w(k, P, z, "⪸", "\\succapprox", !0);
w(k, P, z, "⊳", "\\vartriangleright");
w(k, P, z, "⊵", "\\trianglerighteq");
w(k, P, z, "⊩", "\\Vdash", !0);
w(k, P, z, "∣", "\\shortmid");
w(k, P, z, "∥", "\\shortparallel");
w(k, P, z, "≬", "\\between", !0);
w(k, P, z, "⋔", "\\pitchfork", !0);
w(k, P, z, "∝", "\\varpropto");
w(k, P, z, "◀", "\\blacktriangleleft");
w(k, P, z, "∴", "\\therefore", !0);
w(k, P, z, "∍", "\\backepsilon");
w(k, P, z, "▶", "\\blacktriangleright");
w(k, P, z, "∵", "\\because", !0);
w(k, P, z, "⋘", "\\llless");
w(k, P, z, "⋙", "\\gggtr");
w(k, P, ce, "⊲", "\\lhd");
w(k, P, ce, "⊳", "\\rhd");
w(k, P, z, "≂", "\\eqsim", !0);
w(k, A, z, "⋈", "\\Join");
w(k, P, z, "≑", "\\Doteq", !0);
w(k, P, ce, "∔", "\\dotplus", !0);
w(k, P, ce, "∖", "\\smallsetminus");
w(k, P, ce, "⋒", "\\Cap", !0);
w(k, P, ce, "⋓", "\\Cup", !0);
w(k, P, ce, "⩞", "\\doublebarwedge", !0);
w(k, P, ce, "⊟", "\\boxminus", !0);
w(k, P, ce, "⊞", "\\boxplus", !0);
w(k, P, ce, "⋇", "\\divideontimes", !0);
w(k, P, ce, "⋉", "\\ltimes", !0);
w(k, P, ce, "⋊", "\\rtimes", !0);
w(k, P, ce, "⋋", "\\leftthreetimes", !0);
w(k, P, ce, "⋌", "\\rightthreetimes", !0);
w(k, P, ce, "⋏", "\\curlywedge", !0);
w(k, P, ce, "⋎", "\\curlyvee", !0);
w(k, P, ce, "⊝", "\\circleddash", !0);
w(k, P, ce, "⊛", "\\circledast", !0);
w(k, P, ce, "⋅", "\\centerdot");
w(k, P, ce, "⊺", "\\intercal", !0);
w(k, P, ce, "⋒", "\\doublecap");
w(k, P, ce, "⋓", "\\doublecup");
w(k, P, ce, "⊠", "\\boxtimes", !0);
w(k, P, z, "⇢", "\\dashrightarrow", !0);
w(k, P, z, "⇠", "\\dashleftarrow", !0);
w(k, P, z, "⇇", "\\leftleftarrows", !0);
w(k, P, z, "⇆", "\\leftrightarrows", !0);
w(k, P, z, "⇚", "\\Lleftarrow", !0);
w(k, P, z, "↞", "\\twoheadleftarrow", !0);
w(k, P, z, "↢", "\\leftarrowtail", !0);
w(k, P, z, "↫", "\\looparrowleft", !0);
w(k, P, z, "⇋", "\\leftrightharpoons", !0);
w(k, P, z, "↶", "\\curvearrowleft", !0);
w(k, P, z, "↺", "\\circlearrowleft", !0);
w(k, P, z, "↰", "\\Lsh", !0);
w(k, P, z, "⇈", "\\upuparrows", !0);
w(k, P, z, "↿", "\\upharpoonleft", !0);
w(k, P, z, "⇃", "\\downharpoonleft", !0);
w(k, A, z, "⊶", "\\origof", !0);
w(k, A, z, "⊷", "\\imageof", !0);
w(k, P, z, "⊸", "\\multimap", !0);
w(k, P, z, "↭", "\\leftrightsquigarrow", !0);
w(k, P, z, "⇉", "\\rightrightarrows", !0);
w(k, P, z, "⇄", "\\rightleftarrows", !0);
w(k, P, z, "↠", "\\twoheadrightarrow", !0);
w(k, P, z, "↣", "\\rightarrowtail", !0);
w(k, P, z, "↬", "\\looparrowright", !0);
w(k, P, z, "↷", "\\curvearrowright", !0);
w(k, P, z, "↻", "\\circlearrowright", !0);
w(k, P, z, "↱", "\\Rsh", !0);
w(k, P, z, "⇊", "\\downdownarrows", !0);
w(k, P, z, "↾", "\\upharpoonright", !0);
w(k, P, z, "⇂", "\\downharpoonright", !0);
w(k, P, z, "⇝", "\\rightsquigarrow", !0);
w(k, P, z, "⇝", "\\leadsto");
w(k, P, z, "⇛", "\\Rrightarrow", !0);
w(k, P, z, "↾", "\\restriction");
w(k, A, q, "‘", "`");
w(k, A, q, "$", "\\$");
w(Q, A, q, "$", "\\$");
w(Q, A, q, "$", "\\textdollar");
w(k, A, q, "%", "\\%");
w(Q, A, q, "%", "\\%");
w(k, A, q, "_", "\\_");
w(Q, A, q, "_", "\\_");
w(Q, A, q, "_", "\\textunderscore");
w(k, A, q, "∠", "\\angle", !0);
w(k, A, q, "∞", "\\infty", !0);
w(k, A, q, "′", "\\prime");
w(k, A, q, "△", "\\triangle");
w(k, A, q, "Γ", "\\Gamma", !0);
w(k, A, q, "Δ", "\\Delta", !0);
w(k, A, q, "Θ", "\\Theta", !0);
w(k, A, q, "Λ", "\\Lambda", !0);
w(k, A, q, "Ξ", "\\Xi", !0);
w(k, A, q, "Π", "\\Pi", !0);
w(k, A, q, "Σ", "\\Sigma", !0);
w(k, A, q, "Υ", "\\Upsilon", !0);
w(k, A, q, "Φ", "\\Phi", !0);
w(k, A, q, "Ψ", "\\Psi", !0);
w(k, A, q, "Ω", "\\Omega", !0);
w(k, A, q, "A", "Α");
w(k, A, q, "B", "Β");
w(k, A, q, "E", "Ε");
w(k, A, q, "Z", "Ζ");
w(k, A, q, "H", "Η");
w(k, A, q, "I", "Ι");
w(k, A, q, "K", "Κ");
w(k, A, q, "M", "Μ");
w(k, A, q, "N", "Ν");
w(k, A, q, "O", "Ο");
w(k, A, q, "P", "Ρ");
w(k, A, q, "T", "Τ");
w(k, A, q, "X", "Χ");
w(k, A, q, "¬", "\\neg", !0);
w(k, A, q, "¬", "\\lnot");
w(k, A, q, "⊤", "\\top");
w(k, A, q, "⊥", "\\bot");
w(k, A, q, "∅", "\\emptyset");
w(k, P, q, "∅", "\\varnothing");
w(k, A, ge, "α", "\\alpha", !0);
w(k, A, ge, "β", "\\beta", !0);
w(k, A, ge, "γ", "\\gamma", !0);
w(k, A, ge, "δ", "\\delta", !0);
w(k, A, ge, "ϵ", "\\epsilon", !0);
w(k, A, ge, "ζ", "\\zeta", !0);
w(k, A, ge, "η", "\\eta", !0);
w(k, A, ge, "θ", "\\theta", !0);
w(k, A, ge, "ι", "\\iota", !0);
w(k, A, ge, "κ", "\\kappa", !0);
w(k, A, ge, "λ", "\\lambda", !0);
w(k, A, ge, "μ", "\\mu", !0);
w(k, A, ge, "ν", "\\nu", !0);
w(k, A, ge, "ξ", "\\xi", !0);
w(k, A, ge, "ο", "\\omicron", !0);
w(k, A, ge, "π", "\\pi", !0);
w(k, A, ge, "ρ", "\\rho", !0);
w(k, A, ge, "σ", "\\sigma", !0);
w(k, A, ge, "τ", "\\tau", !0);
w(k, A, ge, "υ", "\\upsilon", !0);
w(k, A, ge, "ϕ", "\\phi", !0);
w(k, A, ge, "χ", "\\chi", !0);
w(k, A, ge, "ψ", "\\psi", !0);
w(k, A, ge, "ω", "\\omega", !0);
w(k, A, ge, "ε", "\\varepsilon", !0);
w(k, A, ge, "ϑ", "\\vartheta", !0);
w(k, A, ge, "ϖ", "\\varpi", !0);
w(k, A, ge, "ϱ", "\\varrho", !0);
w(k, A, ge, "ς", "\\varsigma", !0);
w(k, A, ge, "φ", "\\varphi", !0);
w(k, A, ce, "∗", "*", !0);
w(k, A, ce, "+", "+");
w(k, A, ce, "−", "-", !0);
w(k, A, ce, "⋅", "\\cdot", !0);
w(k, A, ce, "∘", "\\circ", !0);
w(k, A, ce, "÷", "\\div", !0);
w(k, A, ce, "±", "\\pm", !0);
w(k, A, ce, "×", "\\times", !0);
w(k, A, ce, "∩", "\\cap", !0);
w(k, A, ce, "∪", "\\cup", !0);
w(k, A, ce, "∖", "\\setminus", !0);
w(k, A, ce, "∧", "\\land");
w(k, A, ce, "∨", "\\lor");
w(k, A, ce, "∧", "\\wedge", !0);
w(k, A, ce, "∨", "\\vee", !0);
w(k, A, q, "√", "\\surd");
w(k, A, ft, "⟨", "\\langle", !0);
w(k, A, ft, "∣", "\\lvert");
w(k, A, ft, "∥", "\\lVert");
w(k, A, it, "?", "?");
w(k, A, it, "!", "!");
w(k, A, it, "⟩", "\\rangle", !0);
w(k, A, it, "∣", "\\rvert");
w(k, A, it, "∥", "\\rVert");
w(k, A, z, "=", "=");
w(k, A, z, ":", ":");
w(k, A, z, "≈", "\\approx", !0);
w(k, A, z, "≅", "\\cong", !0);
w(k, A, z, "≥", "\\ge");
w(k, A, z, "≥", "\\geq", !0);
w(k, A, z, "←", "\\gets");
w(k, A, z, ">", "\\gt", !0);
w(k, A, z, "∈", "\\in", !0);
w(k, A, z, "", "\\@not");
w(k, A, z, "⊂", "\\subset", !0);
w(k, A, z, "⊃", "\\supset", !0);
w(k, A, z, "⊆", "\\subseteq", !0);
w(k, A, z, "⊇", "\\supseteq", !0);
w(k, P, z, "⊈", "\\nsubseteq", !0);
w(k, P, z, "⊉", "\\nsupseteq", !0);
w(k, A, z, "⊨", "\\models");
w(k, A, z, "←", "\\leftarrow", !0);
w(k, A, z, "≤", "\\le");
w(k, A, z, "≤", "\\leq", !0);
w(k, A, z, "<", "\\lt", !0);
w(k, A, z, "→", "\\rightarrow", !0);
w(k, A, z, "→", "\\to");
w(k, P, z, "≱", "\\ngeq", !0);
w(k, P, z, "≰", "\\nleq", !0);
w(k, A, cr, " ", "\\ ");
w(k, A, cr, " ", "\\space");
w(k, A, cr, " ", "\\nobreakspace");
w(Q, A, cr, " ", "\\ ");
w(Q, A, cr, " ", " ");
w(Q, A, cr, " ", "\\space");
w(Q, A, cr, " ", "\\nobreakspace");
w(k, A, cr, null, "\\nobreak");
w(k, A, cr, null, "\\allowbreak");
w(k, A, is, ",", ",");
w(k, A, is, ";", ";");
w(k, P, ce, "⊼", "\\barwedge", !0);
w(k, P, ce, "⊻", "\\veebar", !0);
w(k, A, ce, "⊙", "\\odot", !0);
w(k, A, ce, "⊕", "\\oplus", !0);
w(k, A, ce, "⊗", "\\otimes", !0);
w(k, A, q, "∂", "\\partial", !0);
w(k, A, ce, "⊘", "\\oslash", !0);
w(k, P, ce, "⊚", "\\circledcirc", !0);
w(k, P, ce, "⊡", "\\boxdot", !0);
w(k, A, ce, "△", "\\bigtriangleup");
w(k, A, ce, "▽", "\\bigtriangledown");
w(k, A, ce, "†", "\\dagger");
w(k, A, ce, "⋄", "\\diamond");
w(k, A, ce, "⋆", "\\star");
w(k, A, ce, "◃", "\\triangleleft");
w(k, A, ce, "▹", "\\triangleright");
w(k, A, ft, "{", "\\{");
w(Q, A, q, "{", "\\{");
w(Q, A, q, "{", "\\textbraceleft");
w(k, A, it, "}", "\\}");
w(Q, A, q, "}", "\\}");
w(Q, A, q, "}", "\\textbraceright");
w(k, A, ft, "{", "\\lbrace");
w(k, A, it, "}", "\\rbrace");
w(k, A, ft, "[", "\\lbrack", !0);
w(Q, A, q, "[", "\\lbrack", !0);
w(k, A, it, "]", "\\rbrack", !0);
w(Q, A, q, "]", "\\rbrack", !0);
w(k, A, ft, "(", "\\lparen", !0);
w(k, A, it, ")", "\\rparen", !0);
w(Q, A, q, "<", "\\textless", !0);
w(Q, A, q, ">", "\\textgreater", !0);
w(k, A, ft, "⌊", "\\lfloor", !0);
w(k, A, it, "⌋", "\\rfloor", !0);
w(k, A, ft, "⌈", "\\lceil", !0);
w(k, A, it, "⌉", "\\rceil", !0);
w(k, A, q, "\\", "\\backslash");
w(k, A, q, "∣", "|");
w(k, A, q, "∣", "\\vert");
w(Q, A, q, "|", "\\textbar", !0);
w(k, A, q, "∥", "\\|");
w(k, A, q, "∥", "\\Vert");
w(Q, A, q, "∥", "\\textbardbl");
w(Q, A, q, "~", "\\textasciitilde");
w(Q, A, q, "\\", "\\textbackslash");
w(Q, A, q, "^", "\\textasciicircum");
w(k, A, z, "↑", "\\uparrow", !0);
w(k, A, z, "⇑", "\\Uparrow", !0);
w(k, A, z, "↓", "\\downarrow", !0);
w(k, A, z, "⇓", "\\Downarrow", !0);
w(k, A, z, "↕", "\\updownarrow", !0);
w(k, A, z, "⇕", "\\Updownarrow", !0);
w(k, A, We, "∐", "\\coprod");
w(k, A, We, "⋁", "\\bigvee");
w(k, A, We, "⋀", "\\bigwedge");
w(k, A, We, "⨄", "\\biguplus");
w(k, A, We, "⋂", "\\bigcap");
w(k, A, We, "⋃", "\\bigcup");
w(k, A, We, "∫", "\\int");
w(k, A, We, "∫", "\\intop");
w(k, A, We, "∬", "\\iint");
w(k, A, We, "∭", "\\iiint");
w(k, A, We, "∏", "\\prod");
w(k, A, We, "∑", "\\sum");
w(k, A, We, "⨂", "\\bigotimes");
w(k, A, We, "⨁", "\\bigoplus");
w(k, A, We, "⨀", "\\bigodot");
w(k, A, We, "∮", "\\oint");
w(k, A, We, "∯", "\\oiint");
w(k, A, We, "∰", "\\oiiint");
w(k, A, We, "⨆", "\\bigsqcup");
w(k, A, We, "∫", "\\smallint");
w(Q, A, jr, "…", "\\textellipsis");
w(k, A, jr, "…", "\\mathellipsis");
w(Q, A, jr, "…", "\\ldots", !0);
w(k, A, jr, "…", "\\ldots", !0);
w(k, A, jr, "⋯", "\\@cdots", !0);
w(k, A, jr, "⋱", "\\ddots", !0);
w(k, A, q, "⋮", "\\varvdots");
w(k, A, Ie, "ˊ", "\\acute");
w(k, A, Ie, "ˋ", "\\grave");
w(k, A, Ie, "¨", "\\ddot");
w(k, A, Ie, "~", "\\tilde");
w(k, A, Ie, "ˉ", "\\bar");
w(k, A, Ie, "˘", "\\breve");
w(k, A, Ie, "ˇ", "\\check");
w(k, A, Ie, "^", "\\hat");
w(k, A, Ie, "⃗", "\\vec");
w(k, A, Ie, "˙", "\\dot");
w(k, A, Ie, "˚", "\\mathring");
w(k, A, ge, "", "\\@imath");
w(k, A, ge, "", "\\@jmath");
w(k, A, q, "ı", "ı");
w(k, A, q, "ȷ", "ȷ");
w(Q, A, q, "ı", "\\i", !0);
w(Q, A, q, "ȷ", "\\j", !0);
w(Q, A, q, "ß", "\\ss", !0);
w(Q, A, q, "æ", "\\ae", !0);
w(Q, A, q, "œ", "\\oe", !0);
w(Q, A, q, "ø", "\\o", !0);
w(Q, A, q, "Æ", "\\AE", !0);
w(Q, A, q, "Œ", "\\OE", !0);
w(Q, A, q, "Ø", "\\O", !0);
w(Q, A, Ie, "ˊ", "\\'");
w(Q, A, Ie, "ˋ", "\\`");
w(Q, A, Ie, "ˆ", "\\^");
w(Q, A, Ie, "˜", "\\~");
w(Q, A, Ie, "ˉ", "\\=");
w(Q, A, Ie, "˘", "\\u");
w(Q, A, Ie, "˙", "\\.");
w(Q, A, Ie, "¸", "\\c");
w(Q, A, Ie, "˚", "\\r");
w(Q, A, Ie, "ˇ", "\\v");
w(Q, A, Ie, "¨", '\\"');
w(Q, A, Ie, "˝", "\\H");
w(Q, A, Ie, "◯", "\\textcircled");
var l0 = {
  "--": !0,
  "---": !0,
  "``": !0,
  "''": !0
};
w(Q, A, q, "–", "--", !0);
w(Q, A, q, "–", "\\textendash");
w(Q, A, q, "—", "---", !0);
w(Q, A, q, "—", "\\textemdash");
w(Q, A, q, "‘", "`", !0);
w(Q, A, q, "‘", "\\textquoteleft");
w(Q, A, q, "’", "'", !0);
w(Q, A, q, "’", "\\textquoteright");
w(Q, A, q, "“", "``", !0);
w(Q, A, q, "“", "\\textquotedblleft");
w(Q, A, q, "”", "''", !0);
w(Q, A, q, "”", "\\textquotedblright");
w(k, A, q, "°", "\\degree", !0);
w(Q, A, q, "°", "\\degree");
w(Q, A, q, "°", "\\textdegree", !0);
w(k, A, q, "£", "\\pounds");
w(k, A, q, "£", "\\mathsterling", !0);
w(Q, A, q, "£", "\\pounds");
w(Q, A, q, "£", "\\textsterling", !0);
w(k, P, q, "✠", "\\maltese");
w(Q, P, q, "✠", "\\maltese");
var ca = '0123456789/@."';
for (var ps = 0; ps < ca.length; ps++) {
  var ua = ca.charAt(ps);
  w(k, A, q, ua, ua);
}
var da = '0123456789!@*()-=+";:?/.,';
for (var _s = 0; _s < da.length; _s++) {
  var fa = da.charAt(_s);
  w(Q, A, q, fa, fa);
}
var Yi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (var gs = 0; gs < Yi.length; gs++) {
  var vi = Yi.charAt(gs);
  w(k, A, ge, vi, vi), w(Q, A, q, vi, vi);
}
w(k, P, q, "C", "ℂ");
w(Q, P, q, "C", "ℂ");
w(k, P, q, "H", "ℍ");
w(Q, P, q, "H", "ℍ");
w(k, P, q, "N", "ℕ");
w(Q, P, q, "N", "ℕ");
w(k, P, q, "P", "ℙ");
w(Q, P, q, "P", "ℙ");
w(k, P, q, "Q", "ℚ");
w(Q, P, q, "Q", "ℚ");
w(k, P, q, "R", "ℝ");
w(Q, P, q, "R", "ℝ");
w(k, P, q, "Z", "ℤ");
w(Q, P, q, "Z", "ℤ");
w(k, A, ge, "h", "ℎ");
w(Q, A, ge, "h", "ℎ");
var ye = "";
for (var Qe = 0; Qe < Yi.length; Qe++) {
  var qe = Yi.charAt(Qe);
  ye = String.fromCharCode(55349, 56320 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56372 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56424 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56580 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56684 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56736 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56788 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56840 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56944 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), Qe < 26 && (ye = String.fromCharCode(55349, 56632 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye), ye = String.fromCharCode(55349, 56476 + Qe), w(k, A, ge, qe, ye), w(Q, A, q, qe, ye));
}
ye = "𝕜";
w(k, A, ge, "k", ye);
w(Q, A, q, "k", ye);
for (var Sr = 0; Sr < 10; Sr++) {
  var fr = Sr.toString();
  ye = String.fromCharCode(55349, 57294 + Sr), w(k, A, ge, fr, ye), w(Q, A, q, fr, ye), ye = String.fromCharCode(55349, 57314 + Sr), w(k, A, ge, fr, ye), w(Q, A, q, fr, ye), ye = String.fromCharCode(55349, 57324 + Sr), w(k, A, ge, fr, ye), w(Q, A, q, fr, ye), ye = String.fromCharCode(55349, 57334 + Sr), w(k, A, ge, fr, ye), w(Q, A, q, fr, ye);
}
var Gs = "ÐÞþ";
for (var vs = 0; vs < Gs.length; vs++) {
  var bi = Gs.charAt(vs);
  w(k, A, ge, bi, bi), w(Q, A, q, bi, bi);
}
var wi = [
  ["mathbf", "textbf", "Main-Bold"],
  // A-Z bold upright
  ["mathbf", "textbf", "Main-Bold"],
  // a-z bold upright
  ["mathnormal", "textit", "Math-Italic"],
  // A-Z italic
  ["mathnormal", "textit", "Math-Italic"],
  // a-z italic
  ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
  // A-Z bold italic
  ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
  // a-z bold italic
  // Map fancy A-Z letters to script, not calligraphic.
  // This aligns with unicode-math and math fonts (except Cambria Math).
  ["mathscr", "textscr", "Script-Regular"],
  // A-Z script
  ["", "", ""],
  // a-z script.  No font
  ["", "", ""],
  // A-Z bold script. No font
  ["", "", ""],
  // a-z bold script. No font
  ["mathfrak", "textfrak", "Fraktur-Regular"],
  // A-Z Fraktur
  ["mathfrak", "textfrak", "Fraktur-Regular"],
  // a-z Fraktur
  ["mathbb", "textbb", "AMS-Regular"],
  // A-Z double-struck
  ["mathbb", "textbb", "AMS-Regular"],
  // k double-struck
  // Note that we are using a bold font, but font metrics for regular Fraktur.
  ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
  // A-Z bold Fraktur
  ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
  // a-z bold Fraktur
  ["mathsf", "textsf", "SansSerif-Regular"],
  // A-Z sans-serif
  ["mathsf", "textsf", "SansSerif-Regular"],
  // a-z sans-serif
  ["mathboldsf", "textboldsf", "SansSerif-Bold"],
  // A-Z bold sans-serif
  ["mathboldsf", "textboldsf", "SansSerif-Bold"],
  // a-z bold sans-serif
  ["mathitsf", "textitsf", "SansSerif-Italic"],
  // A-Z italic sans-serif
  ["mathitsf", "textitsf", "SansSerif-Italic"],
  // a-z italic sans-serif
  ["", "", ""],
  // A-Z bold italic sans. No font
  ["", "", ""],
  // a-z bold italic sans. No font
  ["mathtt", "texttt", "Typewriter-Regular"],
  // A-Z monospace
  ["mathtt", "texttt", "Typewriter-Regular"]
  // a-z monospace
], ma = [
  ["mathbf", "textbf", "Main-Bold"],
  // 0-9 bold
  ["", "", ""],
  // 0-9 double-struck. No KaTeX font.
  ["mathsf", "textsf", "SansSerif-Regular"],
  // 0-9 sans-serif
  ["mathboldsf", "textboldsf", "SansSerif-Bold"],
  // 0-9 bold sans-serif
  ["mathtt", "texttt", "Typewriter-Regular"]
  // 0-9 monospace
], Zh = function(e, t) {
  var r = e.charCodeAt(0), n = e.charCodeAt(1), o = (r - 55296) * 1024 + (n - 56320) + 65536, c = t === "math" ? 0 : 1;
  if (119808 <= o && o < 120484) {
    var s = Math.floor((o - 119808) / 26);
    return [wi[s][2], wi[s][c]];
  } else if (120782 <= o && o <= 120831) {
    var a = Math.floor((o - 120782) / 10);
    return [ma[a][2], ma[a][c]];
  } else {
    if (o === 120485 || o === 120486)
      return [wi[0][2], wi[0][c]];
    if (120486 < o && o < 120782)
      return ["", ""];
    throw new ie("Unsupported character: " + e);
  }
}, ss = function(e, t, r) {
  return Oe[r][e] && Oe[r][e].replace && (e = Oe[r][e].replace), {
    value: e,
    metrics: dn(e, t, r)
  };
}, Ot = function(e, t, r, n, o) {
  var c = ss(e, t, r), s = c.metrics;
  e = c.value;
  var a;
  if (s) {
    var u = s.italic;
    (r === "text" || n && n.font === "mathit") && (u = 0), a = new Ct(e, s.height, s.depth, u, s.skew, s.width, o);
  } else
    typeof console < "u" && console.warn("No character metrics " + ("for '" + e + "' in style '" + t + "' and mode '" + r + "'")), a = new Ct(e, 0, 0, 0, 0, 0, o);
  if (n) {
    a.maxFontSize = n.sizeMultiplier, n.style.isTight() && a.classes.push("mtight");
    var p = n.getColor();
    p && (a.style.color = p);
  }
  return a;
}, Jh = function(e, t, r, n) {
  return n === void 0 && (n = []), r.font === "boldsymbol" && ss(e, "Main-Bold", t).metrics ? Ot(e, "Main-Bold", t, r, n.concat(["mathbf"])) : e === "\\" || Oe[t][e].font === "main" ? Ot(e, "Main-Regular", t, r, n) : Ot(e, "AMS-Regular", t, r, n.concat(["amsrm"]));
}, Qh = function(e, t, r, n, o) {
  return o !== "textord" && ss(e, "Math-BoldItalic", t).metrics ? {
    fontName: "Math-BoldItalic",
    fontClass: "boldsymbol"
  } : {
    fontName: "Main-Bold",
    fontClass: "mathbf"
  };
}, ec = function(e, t, r) {
  var n = e.mode, o = e.text, c = ["mord"], s = n === "math" || n === "text" && t.font, a = s ? t.font : t.fontFamily, u = "", p = "";
  if (o.charCodeAt(0) === 55349 && ([u, p] = Zh(o, n)), u.length > 0)
    return Ot(o, u, n, t, c.concat(p));
  if (a) {
    var f, g;
    if (a === "boldsymbol") {
      var v = Qh(o, n, t, c, r);
      f = v.fontName, g = [v.fontClass];
    } else s ? (f = u0[a].fontName, g = [a]) : (f = yi(a, t.fontWeight, t.fontShape), g = [a, t.fontWeight, t.fontShape]);
    if (ss(o, f, n).metrics)
      return Ot(o, f, n, t, c.concat(g));
    if (l0.hasOwnProperty(o) && f.slice(0, 10) === "Typewriter") {
      for (var C = [], b = 0; b < o.length; b++)
        C.push(Ot(o[b], f, n, t, c.concat(g)));
      return c0(C);
    }
  }
  if (r === "mathord")
    return Ot(o, "Math-Italic", n, t, c.concat(["mathnormal"]));
  if (r === "textord") {
    var d = Oe[n][o] && Oe[n][o].font;
    if (d === "ams") {
      var m = yi("amsrm", t.fontWeight, t.fontShape);
      return Ot(o, m, n, t, c.concat("amsrm", t.fontWeight, t.fontShape));
    } else if (d === "main" || !d) {
      var h = yi("textrm", t.fontWeight, t.fontShape);
      return Ot(o, h, n, t, c.concat(t.fontWeight, t.fontShape));
    } else {
      var l = yi(d, t.fontWeight, t.fontShape);
      return Ot(o, l, n, t, c.concat(l, t.fontWeight, t.fontShape));
    }
  } else
    throw new Error("unexpected type: " + r + " in makeOrd");
}, tc = (i, e) => {
  if (gr(i.classes) !== gr(e.classes) || i.skew !== e.skew || i.maxFontSize !== e.maxFontSize)
    return !1;
  if (i.classes.length === 1) {
    var t = i.classes[0];
    if (t === "mbin" || t === "mord")
      return !1;
  }
  for (var r in i.style)
    if (i.style.hasOwnProperty(r) && i.style[r] !== e.style[r])
      return !1;
  for (var n in e.style)
    if (e.style.hasOwnProperty(n) && i.style[n] !== e.style[n])
      return !1;
  return !0;
}, rc = (i) => {
  for (var e = 0; e < i.length - 1; e++) {
    var t = i[e], r = i[e + 1];
    t instanceof Ct && r instanceof Ct && tc(t, r) && (t.text += r.text, t.height = Math.max(t.height, r.height), t.depth = Math.max(t.depth, r.depth), t.italic = r.italic, i.splice(e + 1, 1), e--);
  }
  return i;
}, mn = function(e) {
  for (var t = 0, r = 0, n = 0, o = 0; o < e.children.length; o++) {
    var c = e.children[o];
    c.height > t && (t = c.height), c.depth > r && (r = c.depth), c.maxFontSize > n && (n = c.maxFontSize);
  }
  e.height = t, e.depth = r, e.maxFontSize = n;
}, ot = function(e, t, r, n) {
  var o = new di(e, t, r, n);
  return mn(o), o;
}, h0 = (i, e, t, r) => new di(i, e, t, r), ic = function(e, t, r) {
  var n = ot([e], [], t);
  return n.height = Math.max(r || t.fontMetrics().defaultRuleThickness, t.minRuleThickness), n.style.borderBottomWidth = le(n.height), n.maxFontSize = 1, n;
}, sc = function(e, t, r, n) {
  var o = new fn(e, t, r, n);
  return mn(o), o;
}, c0 = function(e) {
  var t = new ui(e);
  return mn(t), t;
}, nc = function(e, t) {
  return e instanceof ui ? ot([], [e], t) : e;
}, ac = function(e) {
  if (e.positionType === "individualShift") {
    for (var t = e.children, r = [t[0]], n = -t[0].shift - t[0].elem.depth, o = n, c = 1; c < t.length; c++) {
      var s = -t[c].shift - o - t[c].elem.depth, a = s - (t[c - 1].elem.height + t[c - 1].elem.depth);
      o = o + s, r.push({
        type: "kern",
        size: a
      }), r.push(t[c]);
    }
    return {
      children: r,
      depth: n
    };
  }
  var u;
  if (e.positionType === "top") {
    for (var p = e.positionData, f = 0; f < e.children.length; f++) {
      var g = e.children[f];
      p -= g.type === "kern" ? g.size : g.elem.height + g.elem.depth;
    }
    u = p;
  } else if (e.positionType === "bottom")
    u = -e.positionData;
  else {
    var v = e.children[0];
    if (v.type !== "elem")
      throw new Error('First child must have type "elem".');
    if (e.positionType === "shift")
      u = -v.elem.depth - e.positionData;
    else if (e.positionType === "firstBaseline")
      u = -v.elem.depth;
    else
      throw new Error("Invalid positionType " + e.positionType + ".");
  }
  return {
    children: e.children,
    depth: u
  };
}, oc = function(e, t) {
  for (var {
    children: r,
    depth: n
  } = ac(e), o = 0, c = 0; c < r.length; c++) {
    var s = r[c];
    if (s.type === "elem") {
      var a = s.elem;
      o = Math.max(o, a.maxFontSize, a.height);
    }
  }
  o += 2;
  var u = ot(["pstrut"], []);
  u.style.height = le(o);
  for (var p = [], f = n, g = n, v = n, C = 0; C < r.length; C++) {
    var b = r[C];
    if (b.type === "kern")
      v += b.size;
    else {
      var d = b.elem, m = b.wrapperClasses || [], h = b.wrapperStyle || {}, l = ot(m, [u, d], void 0, h);
      l.style.top = le(-o - v - d.depth), b.marginLeft && (l.style.marginLeft = b.marginLeft), b.marginRight && (l.style.marginRight = b.marginRight), p.push(l), v += d.height + d.depth;
    }
    f = Math.min(f, v), g = Math.max(g, v);
  }
  var _ = ot(["vlist"], p);
  _.style.height = le(g);
  var S;
  if (f < 0) {
    var x = ot([], []), D = ot(["vlist"], [x]);
    D.style.height = le(-f);
    var y = ot(["vlist-s"], [new Ct("​")]);
    S = [ot(["vlist-r"], [_, y]), ot(["vlist-r"], [D])];
  } else
    S = [ot(["vlist-r"], [_])];
  var E = ot(["vlist-t"], S);
  return S.length === 2 && E.classes.push("vlist-t2"), E.height = g, E.depth = -f, E;
}, lc = (i, e) => {
  var t = ot(["mspace"], [], e), r = ze(i, e);
  return t.style.marginRight = le(r), t;
}, yi = function(e, t, r) {
  var n = "";
  switch (e) {
    case "amsrm":
      n = "AMS";
      break;
    case "textrm":
      n = "Main";
      break;
    case "textsf":
      n = "SansSerif";
      break;
    case "texttt":
      n = "Typewriter";
      break;
    default:
      n = e;
  }
  var o;
  return t === "textbf" && r === "textit" ? o = "BoldItalic" : t === "textbf" ? o = "Bold" : t === "textit" ? o = "Italic" : o = "Regular", n + "-" + o;
}, u0 = {
  // styles
  mathbf: {
    variant: "bold",
    fontName: "Main-Bold"
  },
  mathrm: {
    variant: "normal",
    fontName: "Main-Regular"
  },
  textit: {
    variant: "italic",
    fontName: "Main-Italic"
  },
  mathit: {
    variant: "italic",
    fontName: "Main-Italic"
  },
  mathnormal: {
    variant: "italic",
    fontName: "Math-Italic"
  },
  // "boldsymbol" is missing because they require the use of multiple fonts:
  // Math-BoldItalic and Main-Bold.  This is handled by a special case in
  // makeOrd which ends up calling boldsymbol.
  // families
  mathbb: {
    variant: "double-struck",
    fontName: "AMS-Regular"
  },
  mathcal: {
    variant: "script",
    fontName: "Caligraphic-Regular"
  },
  mathfrak: {
    variant: "fraktur",
    fontName: "Fraktur-Regular"
  },
  mathscr: {
    variant: "script",
    fontName: "Script-Regular"
  },
  mathsf: {
    variant: "sans-serif",
    fontName: "SansSerif-Regular"
  },
  mathtt: {
    variant: "monospace",
    fontName: "Typewriter-Regular"
  }
}, d0 = {
  //   path, width, height
  vec: ["vec", 0.471, 0.714],
  // values from the font glyph
  oiintSize1: ["oiintSize1", 0.957, 0.499],
  // oval to overlay the integrand
  oiintSize2: ["oiintSize2", 1.472, 0.659],
  oiiintSize1: ["oiiintSize1", 1.304, 0.499],
  oiiintSize2: ["oiiintSize2", 1.98, 0.659]
}, hc = function(e, t) {
  var [r, n, o] = d0[e], c = new vr(r), s = new or([c], {
    width: le(n),
    height: le(o),
    // Override CSS rule `.katex svg { width: 100% }`
    style: "width:" + le(n),
    viewBox: "0 0 " + 1e3 * n + " " + 1e3 * o,
    preserveAspectRatio: "xMinYMin"
  }), a = h0(["overlay"], [s], t);
  return a.height = o, a.style.height = le(o), a.style.width = le(n), a;
}, G = {
  fontMap: u0,
  makeSymbol: Ot,
  mathsym: Jh,
  makeSpan: ot,
  makeSvgSpan: h0,
  makeLineSpan: ic,
  makeAnchor: sc,
  makeFragment: c0,
  wrapFragment: nc,
  makeVList: oc,
  makeOrd: ec,
  makeGlue: lc,
  staticSvg: hc,
  svgData: d0,
  tryCombineChars: rc
}, Pe = {
  number: 3,
  unit: "mu"
}, Cr = {
  number: 4,
  unit: "mu"
}, rr = {
  number: 5,
  unit: "mu"
}, cc = {
  mord: {
    mop: Pe,
    mbin: Cr,
    mrel: rr,
    minner: Pe
  },
  mop: {
    mord: Pe,
    mop: Pe,
    mrel: rr,
    minner: Pe
  },
  mbin: {
    mord: Cr,
    mop: Cr,
    mopen: Cr,
    minner: Cr
  },
  mrel: {
    mord: rr,
    mop: rr,
    mopen: rr,
    minner: rr
  },
  mopen: {},
  mclose: {
    mop: Pe,
    mbin: Cr,
    mrel: rr,
    minner: Pe
  },
  mpunct: {
    mord: Pe,
    mop: Pe,
    mrel: rr,
    mopen: Pe,
    mclose: Pe,
    mpunct: Pe,
    minner: Pe
  },
  minner: {
    mord: Pe,
    mop: Pe,
    mbin: Cr,
    mrel: rr,
    mopen: Pe,
    mpunct: Pe,
    minner: Pe
  }
}, uc = {
  mord: {
    mop: Pe
  },
  mop: {
    mord: Pe,
    mop: Pe
  },
  mbin: {},
  mrel: {},
  mopen: {},
  mclose: {
    mop: Pe
  },
  mpunct: {},
  minner: {
    mop: Pe
  }
}, f0 = {}, $i = {}, Zi = {};
function he(i) {
  for (var {
    type: e,
    names: t,
    props: r,
    handler: n,
    htmlBuilder: o,
    mathmlBuilder: c
  } = i, s = {
    type: e,
    numArgs: r.numArgs,
    argTypes: r.argTypes,
    allowedInArgument: !!r.allowedInArgument,
    allowedInText: !!r.allowedInText,
    allowedInMath: r.allowedInMath === void 0 ? !0 : r.allowedInMath,
    numOptionalArgs: r.numOptionalArgs || 0,
    infix: !!r.infix,
    primitive: !!r.primitive,
    handler: n
  }, a = 0; a < t.length; ++a)
    f0[t[a]] = s;
  e && (o && ($i[e] = o), c && (Zi[e] = c));
}
function Ar(i) {
  var {
    type: e,
    htmlBuilder: t,
    mathmlBuilder: r
  } = i;
  he({
    type: e,
    names: [],
    props: {
      numArgs: 0
    },
    handler() {
      throw new Error("Should never be called.");
    },
    htmlBuilder: t,
    mathmlBuilder: r
  });
}
var Ji = function(e) {
  return e.type === "ordgroup" && e.body.length === 1 ? e.body[0] : e;
}, Ue = function(e) {
  return e.type === "ordgroup" ? e.body : [e];
}, lr = G.makeSpan, dc = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"], fc = ["rightmost", "mrel", "mclose", "mpunct"], mc = {
  display: ve.DISPLAY,
  text: ve.TEXT,
  script: ve.SCRIPT,
  scriptscript: ve.SCRIPTSCRIPT
}, pc = {
  mord: "mord",
  mop: "mop",
  mbin: "mbin",
  mrel: "mrel",
  mopen: "mopen",
  mclose: "mclose",
  mpunct: "mpunct",
  minner: "minner"
}, je = function(e, t, r, n) {
  n === void 0 && (n = [null, null]);
  for (var o = [], c = 0; c < e.length; c++) {
    var s = Ae(e[c], t);
    if (s instanceof ui) {
      var a = s.children;
      o.push(...a);
    } else
      o.push(s);
  }
  if (G.tryCombineChars(o), !r)
    return o;
  var u = t;
  if (e.length === 1) {
    var p = e[0];
    p.type === "sizing" ? u = t.havingSize(p.size) : p.type === "styling" && (u = t.havingStyle(mc[p.style]));
  }
  var f = lr([n[0] || "leftmost"], [], t), g = lr([n[1] || "rightmost"], [], t), v = r === "root";
  return pa(o, (C, b) => {
    var d = b.classes[0], m = C.classes[0];
    d === "mbin" && _e.contains(fc, m) ? b.classes[0] = "mord" : m === "mbin" && _e.contains(dc, d) && (C.classes[0] = "mord");
  }, {
    node: f
  }, g, v), pa(o, (C, b) => {
    var d = Vs(b), m = Vs(C), h = d && m ? C.hasClass("mtight") ? uc[d][m] : cc[d][m] : null;
    if (h)
      return G.makeGlue(h, u);
  }, {
    node: f
  }, g, v), o;
}, pa = function i(e, t, r, n, o) {
  n && e.push(n);
  for (var c = 0; c < e.length; c++) {
    var s = e[c], a = m0(s);
    if (a) {
      i(a.children, t, r, null, o);
      continue;
    }
    var u = !s.hasClass("mspace");
    if (u) {
      var p = t(s, r.node);
      p && (r.insertAfter ? r.insertAfter(p) : (e.unshift(p), c++));
    }
    u ? r.node = s : o && s.hasClass("newline") && (r.node = lr(["leftmost"])), r.insertAfter = /* @__PURE__ */ ((f) => (g) => {
      e.splice(f + 1, 0, g), c++;
    })(c);
  }
  n && e.pop();
}, m0 = function(e) {
  return e instanceof ui || e instanceof fn || e instanceof di && e.hasClass("enclosing") ? e : null;
}, _c = function i(e, t) {
  var r = m0(e);
  if (r) {
    var n = r.children;
    if (n.length) {
      if (t === "right")
        return i(n[n.length - 1], "right");
      if (t === "left")
        return i(n[0], "left");
    }
  }
  return e;
}, Vs = function(e, t) {
  return e ? (t && (e = _c(e, t)), pc[e.classes[0]] || null) : null;
}, ci = function(e, t) {
  var r = ["nulldelimiter"].concat(e.baseSizingClasses());
  return lr(t.concat(r));
}, Ae = function(e, t, r) {
  if (!e)
    return lr();
  if ($i[e.type]) {
    var n = $i[e.type](e, t);
    if (r && t.size !== r.size) {
      n = lr(t.sizingClasses(r), [n], t);
      var o = t.sizeMultiplier / r.sizeMultiplier;
      n.height *= o, n.depth *= o;
    }
    return n;
  } else
    throw new ie("Got group of unknown type: '" + e.type + "'");
};
function Si(i, e) {
  var t = lr(["base"], i, e), r = lr(["strut"]);
  return r.style.height = le(t.height + t.depth), t.depth && (r.style.verticalAlign = le(-t.depth)), t.children.unshift(r), t;
}
function Ks(i, e) {
  var t = null;
  i.length === 1 && i[0].type === "tag" && (t = i[0].tag, i = i[0].body);
  var r = je(i, e, "root"), n;
  r.length === 2 && r[1].hasClass("tag") && (n = r.pop());
  for (var o = [], c = [], s = 0; s < r.length; s++)
    if (c.push(r[s]), r[s].hasClass("mbin") || r[s].hasClass("mrel") || r[s].hasClass("allowbreak")) {
      for (var a = !1; s < r.length - 1 && r[s + 1].hasClass("mspace") && !r[s + 1].hasClass("newline"); )
        s++, c.push(r[s]), r[s].hasClass("nobreak") && (a = !0);
      a || (o.push(Si(c, e)), c = []);
    } else r[s].hasClass("newline") && (c.pop(), c.length > 0 && (o.push(Si(c, e)), c = []), o.push(r[s]));
  c.length > 0 && o.push(Si(c, e));
  var u;
  t ? (u = Si(je(t, e, !0)), u.classes = ["tag"], o.push(u)) : n && o.push(n);
  var p = lr(["katex-html"], o);
  if (p.setAttribute("aria-hidden", "true"), u) {
    var f = u.children[0];
    f.style.height = le(p.height + p.depth), p.depth && (f.style.verticalAlign = le(-p.depth));
  }
  return p;
}
function p0(i) {
  return new ui(i);
}
class vt {
  constructor(e, t, r) {
    this.type = void 0, this.attributes = void 0, this.children = void 0, this.classes = void 0, this.type = e, this.attributes = {}, this.children = t || [], this.classes = r || [];
  }
  /**
   * Sets an attribute on a MathML node. MathML depends on attributes to convey a
   * semantic content, so this is used heavily.
   */
  setAttribute(e, t) {
    this.attributes[e] = t;
  }
  /**
   * Gets an attribute on a MathML node.
   */
  getAttribute(e) {
    return this.attributes[e];
  }
  /**
   * Converts the math node into a MathML-namespaced DOM element.
   */
  toNode() {
    var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
    for (var t in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]);
    this.classes.length > 0 && (e.className = gr(this.classes));
    for (var r = 0; r < this.children.length; r++)
      e.appendChild(this.children[r].toNode());
    return e;
  }
  /**
   * Converts the math node into an HTML markup string.
   */
  toMarkup() {
    var e = "<" + this.type;
    for (var t in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += _e.escape(this.attributes[t]), e += '"');
    this.classes.length > 0 && (e += ' class ="' + _e.escape(gr(this.classes)) + '"'), e += ">";
    for (var r = 0; r < this.children.length; r++)
      e += this.children[r].toMarkup();
    return e += "</" + this.type + ">", e;
  }
  /**
   * Converts the math node into a string, similar to innerText, but escaped.
   */
  toText() {
    return this.children.map((e) => e.toText()).join("");
  }
}
class si {
  constructor(e) {
    this.text = void 0, this.text = e;
  }
  /**
   * Converts the text node into a DOM text node.
   */
  toNode() {
    return document.createTextNode(this.text);
  }
  /**
   * Converts the text node into escaped HTML markup
   * (representing the text itself).
   */
  toMarkup() {
    return _e.escape(this.toText());
  }
  /**
   * Converts the text node into a string
   * (representing the text itself).
   */
  toText() {
    return this.text;
  }
}
class gc {
  /**
   * Create a Space node with width given in CSS ems.
   */
  constructor(e) {
    this.width = void 0, this.character = void 0, this.width = e, e >= 0.05555 && e <= 0.05556 ? this.character = " " : e >= 0.1666 && e <= 0.1667 ? this.character = " " : e >= 0.2222 && e <= 0.2223 ? this.character = " " : e >= 0.2777 && e <= 0.2778 ? this.character = "  " : e >= -0.05556 && e <= -0.05555 ? this.character = " ⁣" : e >= -0.1667 && e <= -0.1666 ? this.character = " ⁣" : e >= -0.2223 && e <= -0.2222 ? this.character = " ⁣" : e >= -0.2778 && e <= -0.2777 ? this.character = " ⁣" : this.character = null;
  }
  /**
   * Converts the math node into a MathML-namespaced DOM element.
   */
  toNode() {
    if (this.character)
      return document.createTextNode(this.character);
    var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
    return e.setAttribute("width", le(this.width)), e;
  }
  /**
   * Converts the math node into an HTML markup string.
   */
  toMarkup() {
    return this.character ? "<mtext>" + this.character + "</mtext>" : '<mspace width="' + le(this.width) + '"/>';
  }
  /**
   * Converts the math node into a string, similar to innerText.
   */
  toText() {
    return this.character ? this.character : " ";
  }
}
var te = {
  MathNode: vt,
  TextNode: si,
  SpaceNode: gc,
  newDocumentFragment: p0
}, xt = function(e, t, r) {
  return Oe[t][e] && Oe[t][e].replace && e.charCodeAt(0) !== 55349 && !(l0.hasOwnProperty(e) && r && (r.fontFamily && r.fontFamily.slice(4, 6) === "tt" || r.font && r.font.slice(4, 6) === "tt")) && (e = Oe[t][e].replace), new te.TextNode(e);
}, pn = function(e) {
  return e.length === 1 ? e[0] : new te.MathNode("mrow", e);
}, _n = function(e, t) {
  if (t.fontFamily === "texttt")
    return "monospace";
  if (t.fontFamily === "textsf")
    return t.fontShape === "textit" && t.fontWeight === "textbf" ? "sans-serif-bold-italic" : t.fontShape === "textit" ? "sans-serif-italic" : t.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
  if (t.fontShape === "textit" && t.fontWeight === "textbf")
    return "bold-italic";
  if (t.fontShape === "textit")
    return "italic";
  if (t.fontWeight === "textbf")
    return "bold";
  var r = t.font;
  if (!r || r === "mathnormal")
    return null;
  var n = e.mode;
  if (r === "mathit")
    return "italic";
  if (r === "boldsymbol")
    return e.type === "textord" ? "bold" : "bold-italic";
  if (r === "mathbf")
    return "bold";
  if (r === "mathbb")
    return "double-struck";
  if (r === "mathfrak")
    return "fraktur";
  if (r === "mathscr" || r === "mathcal")
    return "script";
  if (r === "mathsf")
    return "sans-serif";
  if (r === "mathtt")
    return "monospace";
  var o = e.text;
  if (_e.contains(["\\imath", "\\jmath"], o))
    return null;
  Oe[n][o] && Oe[n][o].replace && (o = Oe[n][o].replace);
  var c = G.fontMap[r].fontName;
  return dn(o, c, n) ? G.fontMap[r].variant : null;
}, lt = function(e, t, r) {
  if (e.length === 1) {
    var n = Re(e[0], t);
    return r && n instanceof vt && n.type === "mo" && (n.setAttribute("lspace", "0em"), n.setAttribute("rspace", "0em")), [n];
  }
  for (var o = [], c, s = 0; s < e.length; s++) {
    var a = Re(e[s], t);
    if (a instanceof vt && c instanceof vt) {
      if (a.type === "mtext" && c.type === "mtext" && a.getAttribute("mathvariant") === c.getAttribute("mathvariant")) {
        c.children.push(...a.children);
        continue;
      } else if (a.type === "mn" && c.type === "mn") {
        c.children.push(...a.children);
        continue;
      } else if (a.type === "mi" && a.children.length === 1 && c.type === "mn") {
        var u = a.children[0];
        if (u instanceof si && u.text === ".") {
          c.children.push(...a.children);
          continue;
        }
      } else if (c.type === "mi" && c.children.length === 1) {
        var p = c.children[0];
        if (p instanceof si && p.text === "̸" && (a.type === "mo" || a.type === "mi" || a.type === "mn")) {
          var f = a.children[0];
          f instanceof si && f.text.length > 0 && (f.text = f.text.slice(0, 1) + "̸" + f.text.slice(1), o.pop());
        }
      }
    }
    o.push(a), c = a;
  }
  return o;
}, br = function(e, t, r) {
  return pn(lt(e, t, r));
}, Re = function(e, t) {
  if (!e)
    return new te.MathNode("mrow");
  if (Zi[e.type]) {
    var r = Zi[e.type](e, t);
    return r;
  } else
    throw new ie("Got group of unknown type: '" + e.type + "'");
};
function _a(i, e, t, r, n) {
  var o = lt(i, t), c;
  o.length === 1 && o[0] instanceof vt && _e.contains(["mrow", "mtable"], o[0].type) ? c = o[0] : c = new te.MathNode("mrow", o);
  var s = new te.MathNode("annotation", [new te.TextNode(e)]);
  s.setAttribute("encoding", "application/x-tex");
  var a = new te.MathNode("semantics", [c, s]), u = new te.MathNode("math", [a]);
  u.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"), r && u.setAttribute("display", "block");
  var p = n ? "katex" : "katex-mathml";
  return G.makeSpan([p], [u]);
}
var _0 = function(e) {
  return new sr({
    style: e.displayMode ? ve.DISPLAY : ve.TEXT,
    maxSize: e.maxSize,
    minRuleThickness: e.minRuleThickness
  });
}, g0 = function(e, t) {
  if (t.displayMode) {
    var r = ["katex-display"];
    t.leqno && r.push("leqno"), t.fleqn && r.push("fleqn"), e = G.makeSpan(r, [e]);
  }
  return e;
}, vc = function(e, t, r) {
  var n = _0(r), o;
  if (r.output === "mathml")
    return _a(e, t, n, r.displayMode, !0);
  if (r.output === "html") {
    var c = Ks(e, n);
    o = G.makeSpan(["katex"], [c]);
  } else {
    var s = _a(e, t, n, r.displayMode, !1), a = Ks(e, n);
    o = G.makeSpan(["katex"], [s, a]);
  }
  return g0(o, r);
}, bc = function(e, t, r) {
  var n = _0(r), o = Ks(e, n), c = G.makeSpan(["katex"], [o]);
  return g0(c, r);
}, wc = {
  widehat: "^",
  widecheck: "ˇ",
  widetilde: "~",
  utilde: "~",
  overleftarrow: "←",
  underleftarrow: "←",
  xleftarrow: "←",
  overrightarrow: "→",
  underrightarrow: "→",
  xrightarrow: "→",
  underbrace: "⏟",
  overbrace: "⏞",
  overgroup: "⏠",
  undergroup: "⏡",
  overleftrightarrow: "↔",
  underleftrightarrow: "↔",
  xleftrightarrow: "↔",
  Overrightarrow: "⇒",
  xRightarrow: "⇒",
  overleftharpoon: "↼",
  xleftharpoonup: "↼",
  overrightharpoon: "⇀",
  xrightharpoonup: "⇀",
  xLeftarrow: "⇐",
  xLeftrightarrow: "⇔",
  xhookleftarrow: "↩",
  xhookrightarrow: "↪",
  xmapsto: "↦",
  xrightharpoondown: "⇁",
  xleftharpoondown: "↽",
  xrightleftharpoons: "⇌",
  xleftrightharpoons: "⇋",
  xtwoheadleftarrow: "↞",
  xtwoheadrightarrow: "↠",
  xlongequal: "=",
  xtofrom: "⇄",
  xrightleftarrows: "⇄",
  xrightequilibrium: "⇌",
  // Not a perfect match.
  xleftequilibrium: "⇋",
  // None better available.
  "\\cdrightarrow": "→",
  "\\cdleftarrow": "←",
  "\\cdlongequal": "="
}, yc = function(e) {
  var t = new te.MathNode("mo", [new te.TextNode(wc[e.replace(/^\\/, "")])]);
  return t.setAttribute("stretchy", "true"), t;
}, Sc = {
  //   path(s), minWidth, height, align
  overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
  overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
  underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
  underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
  xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"],
  "\\cdrightarrow": [["rightarrow"], 3, 522, "xMaxYMin"],
  // CD minwwidth2.5pc
  xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"],
  "\\cdleftarrow": [["leftarrow"], 3, 522, "xMinYMin"],
  Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"],
  xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"],
  xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"],
  overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"],
  xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"],
  xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"],
  overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
  xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
  xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"],
  xlongequal: [["longequal"], 0.888, 334, "xMinYMin"],
  "\\cdlongequal": [["longequal"], 3, 334, "xMinYMin"],
  xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"],
  xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"],
  overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
  overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548],
  underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548],
  underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
  xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522],
  xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560],
  xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716],
  xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716],
  xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522],
  xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522],
  overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
  underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
  overgroup: [["leftgroup", "rightgroup"], 0.888, 342],
  undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342],
  xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522],
  xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528],
  // The next three arrows are from the mhchem package.
  // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the
  // document as \xrightarrow or \xrightleftharpoons. Those have
  // min-length = 1.75em, so we set min-length on these next three to match.
  xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901],
  xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716],
  xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716]
}, Cc = function(e) {
  return e.type === "ordgroup" ? e.body.length : 1;
}, xc = function(e, t) {
  function r() {
    var s = 4e5, a = e.label.slice(1);
    if (_e.contains(["widehat", "widecheck", "widetilde", "utilde"], a)) {
      var u = e, p = Cc(u.base), f, g, v;
      if (p > 5)
        a === "widehat" || a === "widecheck" ? (f = 420, s = 2364, v = 0.42, g = a + "4") : (f = 312, s = 2340, v = 0.34, g = "tilde4");
      else {
        var C = [1, 1, 2, 2, 3, 3][p];
        a === "widehat" || a === "widecheck" ? (s = [0, 1062, 2364, 2364, 2364][C], f = [0, 239, 300, 360, 420][C], v = [0, 0.24, 0.3, 0.3, 0.36, 0.42][C], g = a + C) : (s = [0, 600, 1033, 2339, 2340][C], f = [0, 260, 286, 306, 312][C], v = [0, 0.26, 0.286, 0.3, 0.306, 0.34][C], g = "tilde" + C);
      }
      var b = new vr(g), d = new or([b], {
        width: "100%",
        height: le(v),
        viewBox: "0 0 " + s + " " + f,
        preserveAspectRatio: "none"
      });
      return {
        span: G.makeSvgSpan([], [d], t),
        minWidth: 0,
        height: v
      };
    } else {
      var m = [], h = Sc[a], [l, _, S] = h, x = S / 1e3, D = l.length, y, E;
      if (D === 1) {
        var B = h[3];
        y = ["hide-tail"], E = [B];
      } else if (D === 2)
        y = ["halfarrow-left", "halfarrow-right"], E = ["xMinYMin", "xMaxYMin"];
      else if (D === 3)
        y = ["brace-left", "brace-center", "brace-right"], E = ["xMinYMin", "xMidYMin", "xMaxYMin"];
      else
        throw new Error(`Correct katexImagesData or update code here to support
                    ` + D + " children.");
      for (var O = 0; O < D; O++) {
        var N = new vr(l[O]), R = new or([N], {
          width: "400em",
          height: le(x),
          viewBox: "0 0 " + s + " " + S,
          preserveAspectRatio: E[O] + " slice"
        }), j = G.makeSvgSpan([y[O]], [R], t);
        if (D === 1)
          return {
            span: j,
            minWidth: _,
            height: x
          };
        j.style.height = le(x), m.push(j);
      }
      return {
        span: G.makeSpan(["stretchy"], m, t),
        minWidth: _,
        height: x
      };
    }
  }
  var {
    span: n,
    minWidth: o,
    height: c
  } = r();
  return n.height = c, n.style.height = le(c), o > 0 && (n.style.minWidth = le(o)), n;
}, kc = function(e, t, r, n, o) {
  var c, s = e.height + e.depth + r + n;
  if (/fbox|color|angl/.test(t)) {
    if (c = G.makeSpan(["stretchy", t], [], o), t === "fbox") {
      var a = o.color && o.getColor();
      a && (c.style.borderColor = a);
    }
  } else {
    var u = [];
    /^[bx]cancel$/.test(t) && u.push(new js({
      x1: "0",
      y1: "0",
      x2: "100%",
      y2: "100%",
      "stroke-width": "0.046em"
    })), /^x?cancel$/.test(t) && u.push(new js({
      x1: "0",
      y1: "100%",
      x2: "100%",
      y2: "0",
      "stroke-width": "0.046em"
    }));
    var p = new or(u, {
      width: "100%",
      height: le(s)
    });
    c = G.makeSvgSpan([], [p], o);
  }
  return c.height = s, c.style.height = le(s), c;
}, hr = {
  encloseSpan: kc,
  mathMLnode: yc,
  svgSpan: xc
};
function Ce(i, e) {
  if (!i || i.type !== e)
    throw new Error("Expected node of type " + e + ", but got " + (i ? "node of type " + i.type : String(i)));
  return i;
}
function gn(i) {
  var e = ns(i);
  if (!e)
    throw new Error("Expected node of symbol group type, but got " + (i ? "node of type " + i.type : String(i)));
  return e;
}
function ns(i) {
  return i && (i.type === "atom" || $h.hasOwnProperty(i.type)) ? i : null;
}
var vn = (i, e) => {
  var t, r, n;
  i && i.type === "supsub" ? (r = Ce(i.base, "accent"), t = r.base, i.base = t, n = Xh(Ae(i, e)), i.base = r) : (r = Ce(i, "accent"), t = r.base);
  var o = Ae(t, e.havingCrampedStyle()), c = r.isShifty && _e.isCharacterBox(t), s = 0;
  if (c) {
    var a = _e.getBaseElem(t), u = Ae(a, e.havingCrampedStyle());
    s = ha(u).skew;
  }
  var p = r.label === "\\c", f = p ? o.height + o.depth : Math.min(o.height, e.fontMetrics().xHeight), g;
  if (r.isStretchy)
    g = hr.svgSpan(r, e), g = G.makeVList({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: o
      }, {
        type: "elem",
        elem: g,
        wrapperClasses: ["svg-align"],
        wrapperStyle: s > 0 ? {
          width: "calc(100% - " + le(2 * s) + ")",
          marginLeft: le(2 * s)
        } : void 0
      }]
    }, e);
  else {
    var v, C;
    r.label === "\\vec" ? (v = G.staticSvg("vec", e), C = G.svgData.vec[1]) : (v = G.makeOrd({
      mode: r.mode,
      text: r.label
    }, e, "textord"), v = ha(v), v.italic = 0, C = v.width, p && (f += v.depth)), g = G.makeSpan(["accent-body"], [v]);
    var b = r.label === "\\textcircled";
    b && (g.classes.push("accent-full"), f = o.height);
    var d = s;
    b || (d -= C / 2), g.style.left = le(d), r.label === "\\textcircled" && (g.style.top = ".2em"), g = G.makeVList({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: o
      }, {
        type: "kern",
        size: -f
      }, {
        type: "elem",
        elem: g
      }]
    }, e);
  }
  var m = G.makeSpan(["mord", "accent"], [g], e);
  return n ? (n.children[0] = m, n.height = Math.max(m.height, n.height), n.classes[0] = "mord", n) : m;
}, v0 = (i, e) => {
  var t = i.isStretchy ? hr.mathMLnode(i.label) : new te.MathNode("mo", [xt(i.label, i.mode)]), r = new te.MathNode("mover", [Re(i.base, e), t]);
  return r.setAttribute("accent", "true"), r;
}, Dc = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((i) => "\\" + i).join("|"));
he({
  type: "accent",
  names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"],
  props: {
    numArgs: 1
  },
  handler: (i, e) => {
    var t = Ji(e[0]), r = !Dc.test(i.funcName), n = !r || i.funcName === "\\widehat" || i.funcName === "\\widetilde" || i.funcName === "\\widecheck";
    return {
      type: "accent",
      mode: i.parser.mode,
      label: i.funcName,
      isStretchy: r,
      isShifty: n,
      base: t
    };
  },
  htmlBuilder: vn,
  mathmlBuilder: v0
});
he({
  type: "accent",
  names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"],
  props: {
    numArgs: 1,
    allowedInText: !0,
    allowedInMath: !0,
    // unless in strict mode
    argTypes: ["primitive"]
  },
  handler: (i, e) => {
    var t = e[0], r = i.parser.mode;
    return r === "math" && (i.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + i.funcName + " works only in text mode"), r = "text"), {
      type: "accent",
      mode: r,
      label: i.funcName,
      isStretchy: !1,
      isShifty: !0,
      base: t
    };
  },
  htmlBuilder: vn,
  mathmlBuilder: v0
});
he({
  type: "accentUnder",
  names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"],
  props: {
    numArgs: 1
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0];
    return {
      type: "accentUnder",
      mode: t.mode,
      label: r,
      base: n
    };
  },
  htmlBuilder: (i, e) => {
    var t = Ae(i.base, e), r = hr.svgSpan(i, e), n = i.label === "\\utilde" ? 0.12 : 0, o = G.makeVList({
      positionType: "top",
      positionData: t.height,
      children: [{
        type: "elem",
        elem: r,
        wrapperClasses: ["svg-align"]
      }, {
        type: "kern",
        size: n
      }, {
        type: "elem",
        elem: t
      }]
    }, e);
    return G.makeSpan(["mord", "accentunder"], [o], e);
  },
  mathmlBuilder: (i, e) => {
    var t = hr.mathMLnode(i.label), r = new te.MathNode("munder", [Re(i.base, e), t]);
    return r.setAttribute("accentunder", "true"), r;
  }
});
var Ci = (i) => {
  var e = new te.MathNode("mpadded", i ? [i] : []);
  return e.setAttribute("width", "+0.6em"), e.setAttribute("lspace", "0.3em"), e;
};
he({
  type: "xArrow",
  names: [
    "\\xleftarrow",
    "\\xrightarrow",
    "\\xLeftarrow",
    "\\xRightarrow",
    "\\xleftrightarrow",
    "\\xLeftrightarrow",
    "\\xhookleftarrow",
    "\\xhookrightarrow",
    "\\xmapsto",
    "\\xrightharpoondown",
    "\\xrightharpoonup",
    "\\xleftharpoondown",
    "\\xleftharpoonup",
    "\\xrightleftharpoons",
    "\\xleftrightharpoons",
    "\\xlongequal",
    "\\xtwoheadrightarrow",
    "\\xtwoheadleftarrow",
    "\\xtofrom",
    // The next 3 functions are here to support the mhchem extension.
    // Direct use of these functions is discouraged and may break someday.
    "\\xrightleftarrows",
    "\\xrightequilibrium",
    "\\xleftequilibrium",
    // The next 3 functions are here only to support the {CD} environment.
    "\\\\cdrightarrow",
    "\\\\cdleftarrow",
    "\\\\cdlongequal"
  ],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler(i, e, t) {
    var {
      parser: r,
      funcName: n
    } = i;
    return {
      type: "xArrow",
      mode: r.mode,
      label: n,
      body: e[0],
      below: t[0]
    };
  },
  // Flow is unable to correctly infer the type of `group`, even though it's
  // unambiguously determined from the passed-in `type` above.
  htmlBuilder(i, e) {
    var t = e.style, r = e.havingStyle(t.sup()), n = G.wrapFragment(Ae(i.body, r, e), e), o = i.label.slice(0, 2) === "\\x" ? "x" : "cd";
    n.classes.push(o + "-arrow-pad");
    var c;
    i.below && (r = e.havingStyle(t.sub()), c = G.wrapFragment(Ae(i.below, r, e), e), c.classes.push(o + "-arrow-pad"));
    var s = hr.svgSpan(i, e), a = -e.fontMetrics().axisHeight + 0.5 * s.height, u = -e.fontMetrics().axisHeight - 0.5 * s.height - 0.111;
    (n.depth > 0.25 || i.label === "\\xleftequilibrium") && (u -= n.depth);
    var p;
    if (c) {
      var f = -e.fontMetrics().axisHeight + c.height + 0.5 * s.height + 0.111;
      p = G.makeVList({
        positionType: "individualShift",
        children: [{
          type: "elem",
          elem: n,
          shift: u
        }, {
          type: "elem",
          elem: s,
          shift: a
        }, {
          type: "elem",
          elem: c,
          shift: f
        }]
      }, e);
    } else
      p = G.makeVList({
        positionType: "individualShift",
        children: [{
          type: "elem",
          elem: n,
          shift: u
        }, {
          type: "elem",
          elem: s,
          shift: a
        }]
      }, e);
    return p.children[0].children[0].children[1].classes.push("svg-align"), G.makeSpan(["mrel", "x-arrow"], [p], e);
  },
  mathmlBuilder(i, e) {
    var t = hr.mathMLnode(i.label);
    t.setAttribute("minsize", i.label.charAt(0) === "x" ? "1.75em" : "3.0em");
    var r;
    if (i.body) {
      var n = Ci(Re(i.body, e));
      if (i.below) {
        var o = Ci(Re(i.below, e));
        r = new te.MathNode("munderover", [t, o, n]);
      } else
        r = new te.MathNode("mover", [t, n]);
    } else if (i.below) {
      var c = Ci(Re(i.below, e));
      r = new te.MathNode("munder", [t, c]);
    } else
      r = Ci(), r = new te.MathNode("mover", [t, r]);
    return r;
  }
});
var Ec = G.makeSpan;
function b0(i, e) {
  var t = je(i.body, e, !0);
  return Ec([i.mclass], t, e);
}
function w0(i, e) {
  var t, r = lt(i.body, e);
  return i.mclass === "minner" ? t = new te.MathNode("mpadded", r) : i.mclass === "mord" ? i.isCharacterBox ? (t = r[0], t.type = "mi") : t = new te.MathNode("mi", r) : (i.isCharacterBox ? (t = r[0], t.type = "mo") : t = new te.MathNode("mo", r), i.mclass === "mbin" ? (t.attributes.lspace = "0.22em", t.attributes.rspace = "0.22em") : i.mclass === "mpunct" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0.17em") : i.mclass === "mopen" || i.mclass === "mclose" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0em") : i.mclass === "minner" && (t.attributes.lspace = "0.0556em", t.attributes.width = "+0.1111em")), t;
}
he({
  type: "mclass",
  names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0];
    return {
      type: "mclass",
      mode: t.mode,
      mclass: "m" + r.slice(5),
      // TODO(kevinb): don't prefix with 'm'
      body: Ue(n),
      isCharacterBox: _e.isCharacterBox(n)
    };
  },
  htmlBuilder: b0,
  mathmlBuilder: w0
});
var as = (i) => {
  var e = i.type === "ordgroup" && i.body.length ? i.body[0] : i;
  return e.type === "atom" && (e.family === "bin" || e.family === "rel") ? "m" + e.family : "mord";
};
he({
  type: "mclass",
  names: ["\\@binrel"],
  props: {
    numArgs: 2
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "mclass",
      mode: t.mode,
      mclass: as(e[0]),
      body: Ue(e[1]),
      isCharacterBox: _e.isCharacterBox(e[1])
    };
  }
});
he({
  type: "mclass",
  names: ["\\stackrel", "\\overset", "\\underset"],
  props: {
    numArgs: 2
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i, n = e[1], o = e[0], c;
    r !== "\\stackrel" ? c = as(n) : c = "mrel";
    var s = {
      type: "op",
      mode: n.mode,
      limits: !0,
      alwaysHandleSupSub: !0,
      parentIsSupSub: !1,
      symbol: !1,
      suppressBaseShift: r !== "\\stackrel",
      body: Ue(n)
    }, a = {
      type: "supsub",
      mode: o.mode,
      base: s,
      sup: r === "\\underset" ? null : o,
      sub: r === "\\underset" ? o : null
    };
    return {
      type: "mclass",
      mode: t.mode,
      mclass: c,
      body: [a],
      isCharacterBox: _e.isCharacterBox(a)
    };
  },
  htmlBuilder: b0,
  mathmlBuilder: w0
});
he({
  type: "pmb",
  names: ["\\pmb"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "pmb",
      mode: t.mode,
      mclass: as(e[0]),
      body: Ue(e[0])
    };
  },
  htmlBuilder(i, e) {
    var t = je(i.body, e, !0), r = G.makeSpan([i.mclass], t, e);
    return r.style.textShadow = "0.02em 0.01em 0.04px", r;
  },
  mathmlBuilder(i, e) {
    var t = lt(i.body, e), r = new te.MathNode("mstyle", t);
    return r.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), r;
  }
});
var Ac = {
  ">": "\\\\cdrightarrow",
  "<": "\\\\cdleftarrow",
  "=": "\\\\cdlongequal",
  A: "\\uparrow",
  V: "\\downarrow",
  "|": "\\Vert",
  ".": "no arrow"
}, ga = () => ({
  type: "styling",
  body: [],
  mode: "math",
  style: "display"
}), va = (i) => i.type === "textord" && i.text === "@", Tc = (i, e) => (i.type === "mathord" || i.type === "atom") && i.text === e;
function Mc(i, e, t) {
  var r = Ac[i];
  switch (r) {
    case "\\\\cdrightarrow":
    case "\\\\cdleftarrow":
      return t.callFunction(r, [e[0]], [e[1]]);
    case "\\uparrow":
    case "\\downarrow": {
      var n = t.callFunction("\\\\cdleft", [e[0]], []), o = {
        type: "atom",
        text: r,
        mode: "math",
        family: "rel"
      }, c = t.callFunction("\\Big", [o], []), s = t.callFunction("\\\\cdright", [e[1]], []), a = {
        type: "ordgroup",
        mode: "math",
        body: [n, c, s]
      };
      return t.callFunction("\\\\cdparent", [a], []);
    }
    case "\\\\cdlongequal":
      return t.callFunction("\\\\cdlongequal", [], []);
    case "\\Vert": {
      var u = {
        type: "textord",
        text: "\\Vert",
        mode: "math"
      };
      return t.callFunction("\\Big", [u], []);
    }
    default:
      return {
        type: "textord",
        text: " ",
        mode: "math"
      };
  }
}
function Bc(i) {
  var e = [];
  for (i.gullet.beginGroup(), i.gullet.macros.set("\\cr", "\\\\\\relax"), i.gullet.beginGroup(); ; ) {
    e.push(i.parseExpression(!1, "\\\\")), i.gullet.endGroup(), i.gullet.beginGroup();
    var t = i.fetch().text;
    if (t === "&" || t === "\\\\")
      i.consume();
    else if (t === "\\end") {
      e[e.length - 1].length === 0 && e.pop();
      break;
    } else
      throw new ie("Expected \\\\ or \\cr or \\end", i.nextToken);
  }
  for (var r = [], n = [r], o = 0; o < e.length; o++) {
    for (var c = e[o], s = ga(), a = 0; a < c.length; a++)
      if (!va(c[a]))
        s.body.push(c[a]);
      else {
        r.push(s), a += 1;
        var u = gn(c[a]).text, p = new Array(2);
        if (p[0] = {
          type: "ordgroup",
          mode: "math",
          body: []
        }, p[1] = {
          type: "ordgroup",
          mode: "math",
          body: []
        }, !("=|.".indexOf(u) > -1)) if ("<>AV".indexOf(u) > -1)
          for (var f = 0; f < 2; f++) {
            for (var g = !0, v = a + 1; v < c.length; v++) {
              if (Tc(c[v], u)) {
                g = !1, a = v;
                break;
              }
              if (va(c[v]))
                throw new ie("Missing a " + u + " character to complete a CD arrow.", c[v]);
              p[f].body.push(c[v]);
            }
            if (g)
              throw new ie("Missing a " + u + " character to complete a CD arrow.", c[a]);
          }
        else
          throw new ie('Expected one of "<>AV=|." after @', c[a]);
        var C = Mc(u, p, i), b = {
          type: "styling",
          body: [C],
          mode: "math",
          style: "display"
          // CD is always displaystyle.
        };
        r.push(b), s = ga();
      }
    o % 2 === 0 ? r.push(s) : r.shift(), r = [], n.push(r);
  }
  i.gullet.endGroup(), i.gullet.endGroup();
  var d = new Array(n[0].length).fill({
    type: "align",
    align: "c",
    pregap: 0.25,
    // CD package sets \enskip between columns.
    postgap: 0.25
    // So pre and post each get half an \enskip, i.e. 0.25em.
  });
  return {
    type: "array",
    mode: "math",
    body: n,
    arraystretch: 1,
    addJot: !0,
    rowGaps: [null],
    cols: d,
    colSeparationType: "CD",
    hLinesBeforeRow: new Array(n.length + 1).fill([])
  };
}
he({
  type: "cdlabel",
  names: ["\\\\cdleft", "\\\\cdright"],
  props: {
    numArgs: 1
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i;
    return {
      type: "cdlabel",
      mode: t.mode,
      side: r.slice(4),
      label: e[0]
    };
  },
  htmlBuilder(i, e) {
    var t = e.havingStyle(e.style.sup()), r = G.wrapFragment(Ae(i.label, t, e), e);
    return r.classes.push("cd-label-" + i.side), r.style.bottom = le(0.8 - r.depth), r.height = 0, r.depth = 0, r;
  },
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mrow", [Re(i.label, e)]);
    return t = new te.MathNode("mpadded", [t]), t.setAttribute("width", "0"), i.side === "left" && t.setAttribute("lspace", "-1width"), t.setAttribute("voffset", "0.7em"), t = new te.MathNode("mstyle", [t]), t.setAttribute("displaystyle", "false"), t.setAttribute("scriptlevel", "1"), t;
  }
});
he({
  type: "cdlabelparent",
  names: ["\\\\cdparent"],
  props: {
    numArgs: 1
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "cdlabelparent",
      mode: t.mode,
      fragment: e[0]
    };
  },
  htmlBuilder(i, e) {
    var t = G.wrapFragment(Ae(i.fragment, e), e);
    return t.classes.push("cd-vert-arrow"), t;
  },
  mathmlBuilder(i, e) {
    return new te.MathNode("mrow", [Re(i.fragment, e)]);
  }
});
he({
  type: "textord",
  names: ["\\@char"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler(i, e) {
    for (var {
      parser: t
    } = i, r = Ce(e[0], "ordgroup"), n = r.body, o = "", c = 0; c < n.length; c++) {
      var s = Ce(n[c], "textord");
      o += s.text;
    }
    var a = parseInt(o), u;
    if (isNaN(a))
      throw new ie("\\@char has non-numeric argument " + o);
    if (a < 0 || a >= 1114111)
      throw new ie("\\@char with invalid code point " + o);
    return a <= 65535 ? u = String.fromCharCode(a) : (a -= 65536, u = String.fromCharCode((a >> 10) + 55296, (a & 1023) + 56320)), {
      type: "textord",
      mode: t.mode,
      text: u
    };
  }
});
var y0 = (i, e) => {
  var t = je(i.body, e.withColor(i.color), !1);
  return G.makeFragment(t);
}, S0 = (i, e) => {
  var t = lt(i.body, e.withColor(i.color)), r = new te.MathNode("mstyle", t);
  return r.setAttribute("mathcolor", i.color), r;
};
he({
  type: "color",
  names: ["\\textcolor"],
  props: {
    numArgs: 2,
    allowedInText: !0,
    argTypes: ["color", "original"]
  },
  handler(i, e) {
    var {
      parser: t
    } = i, r = Ce(e[0], "color-token").color, n = e[1];
    return {
      type: "color",
      mode: t.mode,
      color: r,
      body: Ue(n)
    };
  },
  htmlBuilder: y0,
  mathmlBuilder: S0
});
he({
  type: "color",
  names: ["\\color"],
  props: {
    numArgs: 1,
    allowedInText: !0,
    argTypes: ["color"]
  },
  handler(i, e) {
    var {
      parser: t,
      breakOnTokenText: r
    } = i, n = Ce(e[0], "color-token").color;
    t.gullet.macros.set("\\current@color", n);
    var o = t.parseExpression(!0, r);
    return {
      type: "color",
      mode: t.mode,
      color: n,
      body: o
    };
  },
  htmlBuilder: y0,
  mathmlBuilder: S0
});
he({
  type: "cr",
  names: ["\\\\"],
  props: {
    numArgs: 0,
    numOptionalArgs: 0,
    allowedInText: !0
  },
  handler(i, e, t) {
    var {
      parser: r
    } = i, n = r.gullet.future().text === "[" ? r.parseSizeGroup(!0) : null, o = !r.settings.displayMode || !r.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
    return {
      type: "cr",
      mode: r.mode,
      newLine: o,
      size: n && Ce(n, "size").value
    };
  },
  // The following builders are called only at the top level,
  // not within tabular/array environments.
  htmlBuilder(i, e) {
    var t = G.makeSpan(["mspace"], [], e);
    return i.newLine && (t.classes.push("newline"), i.size && (t.style.marginTop = le(ze(i.size, e)))), t;
  },
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mspace");
    return i.newLine && (t.setAttribute("linebreak", "newline"), i.size && t.setAttribute("height", le(ze(i.size, e)))), t;
  }
});
var Xs = {
  "\\global": "\\global",
  "\\long": "\\\\globallong",
  "\\\\globallong": "\\\\globallong",
  "\\def": "\\gdef",
  "\\gdef": "\\gdef",
  "\\edef": "\\xdef",
  "\\xdef": "\\xdef",
  "\\let": "\\\\globallet",
  "\\futurelet": "\\\\globalfuture"
}, C0 = (i) => {
  var e = i.text;
  if (/^(?:[\\{}$&#^_]|EOF)$/.test(e))
    throw new ie("Expected a control sequence", i);
  return e;
}, Fc = (i) => {
  var e = i.gullet.popToken();
  return e.text === "=" && (e = i.gullet.popToken(), e.text === " " && (e = i.gullet.popToken())), e;
}, x0 = (i, e, t, r) => {
  var n = i.gullet.macros.get(t.text);
  n == null && (t.noexpand = !0, n = {
    tokens: [t],
    numArgs: 0,
    // reproduce the same behavior in expansion
    unexpandable: !i.gullet.isExpandable(t.text)
  }), i.gullet.macros.set(e, n, r);
};
he({
  type: "internal",
  names: [
    "\\global",
    "\\long",
    "\\\\globallong"
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t
    } = i;
    e.consumeSpaces();
    var r = e.fetch();
    if (Xs[r.text])
      return (t === "\\global" || t === "\\\\globallong") && (r.text = Xs[r.text]), Ce(e.parseFunction(), "internal");
    throw new ie("Invalid token after macro prefix", r);
  }
});
he({
  type: "internal",
  names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t
    } = i, r = e.gullet.popToken(), n = r.text;
    if (/^(?:[\\{}$&#^_]|EOF)$/.test(n))
      throw new ie("Expected a control sequence", r);
    for (var o = 0, c, s = [[]]; e.gullet.future().text !== "{"; )
      if (r = e.gullet.popToken(), r.text === "#") {
        if (e.gullet.future().text === "{") {
          c = e.gullet.future(), s[o].push("{");
          break;
        }
        if (r = e.gullet.popToken(), !/^[1-9]$/.test(r.text))
          throw new ie('Invalid argument number "' + r.text + '"');
        if (parseInt(r.text) !== o + 1)
          throw new ie('Argument number "' + r.text + '" out of order');
        o++, s.push([]);
      } else {
        if (r.text === "EOF")
          throw new ie("Expected a macro definition");
        s[o].push(r.text);
      }
    var {
      tokens: a
    } = e.gullet.consumeArg();
    return c && a.unshift(c), (t === "\\edef" || t === "\\xdef") && (a = e.gullet.expandTokens(a), a.reverse()), e.gullet.macros.set(n, {
      tokens: a,
      numArgs: o,
      delimiters: s
    }, t === Xs[t]), {
      type: "internal",
      mode: e.mode
    };
  }
});
he({
  type: "internal",
  names: [
    "\\let",
    "\\\\globallet"
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t
    } = i, r = C0(e.gullet.popToken());
    e.gullet.consumeSpaces();
    var n = Fc(e);
    return x0(e, r, n, t === "\\\\globallet"), {
      type: "internal",
      mode: e.mode
    };
  }
});
he({
  type: "internal",
  names: [
    "\\futurelet",
    "\\\\globalfuture"
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t
    } = i, r = C0(e.gullet.popToken()), n = e.gullet.popToken(), o = e.gullet.popToken();
    return x0(e, r, o, t === "\\\\globalfuture"), e.gullet.pushToken(o), e.gullet.pushToken(n), {
      type: "internal",
      mode: e.mode
    };
  }
});
var ti = function(e, t, r) {
  var n = Oe.math[e] && Oe.math[e].replace, o = dn(n || e, t, r);
  if (!o)
    throw new Error("Unsupported symbol " + e + " and font size " + t + ".");
  return o;
}, bn = function(e, t, r, n) {
  var o = r.havingBaseStyle(t), c = G.makeSpan(n.concat(o.sizingClasses(r)), [e], r), s = o.sizeMultiplier / r.sizeMultiplier;
  return c.height *= s, c.depth *= s, c.maxFontSize = o.sizeMultiplier, c;
}, k0 = function(e, t, r) {
  var n = t.havingBaseStyle(r), o = (1 - t.sizeMultiplier / n.sizeMultiplier) * t.fontMetrics().axisHeight;
  e.classes.push("delimcenter"), e.style.top = le(o), e.height -= o, e.depth += o;
}, Rc = function(e, t, r, n, o, c) {
  var s = G.makeSymbol(e, "Main-Regular", o, n), a = bn(s, t, n, c);
  return r && k0(a, n, t), a;
}, Lc = function(e, t, r, n) {
  return G.makeSymbol(e, "Size" + t + "-Regular", r, n);
}, D0 = function(e, t, r, n, o, c) {
  var s = Lc(e, t, o, n), a = bn(G.makeSpan(["delimsizing", "size" + t], [s], n), ve.TEXT, n, c);
  return r && k0(a, n, ve.TEXT), a;
}, bs = function(e, t, r) {
  var n;
  t === "Size1-Regular" ? n = "delim-size1" : n = "delim-size4";
  var o = G.makeSpan(["delimsizinginner", n], [G.makeSpan([], [G.makeSymbol(e, t, r)])]);
  return {
    type: "elem",
    elem: o
  };
}, ws = function(e, t, r) {
  var n = Wt["Size4-Regular"][e.charCodeAt(0)] ? Wt["Size4-Regular"][e.charCodeAt(0)][4] : Wt["Size1-Regular"][e.charCodeAt(0)][4], o = new vr("inner", Nh(e, Math.round(1e3 * t))), c = new or([o], {
    width: le(n),
    height: le(t),
    // Override CSS rule `.katex svg { width: 100% }`
    style: "width:" + le(n),
    viewBox: "0 0 " + 1e3 * n + " " + Math.round(1e3 * t),
    preserveAspectRatio: "xMinYMin"
  }), s = G.makeSvgSpan([], [c], r);
  return s.height = t, s.style.height = le(t), s.style.width = le(n), {
    type: "elem",
    elem: s
  };
}, Ys = 8e-3, xi = {
  type: "kern",
  size: -1 * Ys
}, Oc = ["|", "\\lvert", "\\rvert", "\\vert"], Ic = ["\\|", "\\lVert", "\\rVert", "\\Vert"], E0 = function(e, t, r, n, o, c) {
  var s, a, u, p, f = "", g = 0;
  s = u = p = e, a = null;
  var v = "Size1-Regular";
  e === "\\uparrow" ? u = p = "⏐" : e === "\\Uparrow" ? u = p = "‖" : e === "\\downarrow" ? s = u = "⏐" : e === "\\Downarrow" ? s = u = "‖" : e === "\\updownarrow" ? (s = "\\uparrow", u = "⏐", p = "\\downarrow") : e === "\\Updownarrow" ? (s = "\\Uparrow", u = "‖", p = "\\Downarrow") : _e.contains(Oc, e) ? (u = "∣", f = "vert", g = 333) : _e.contains(Ic, e) ? (u = "∥", f = "doublevert", g = 556) : e === "[" || e === "\\lbrack" ? (s = "⎡", u = "⎢", p = "⎣", v = "Size4-Regular", f = "lbrack", g = 667) : e === "]" || e === "\\rbrack" ? (s = "⎤", u = "⎥", p = "⎦", v = "Size4-Regular", f = "rbrack", g = 667) : e === "\\lfloor" || e === "⌊" ? (u = s = "⎢", p = "⎣", v = "Size4-Regular", f = "lfloor", g = 667) : e === "\\lceil" || e === "⌈" ? (s = "⎡", u = p = "⎢", v = "Size4-Regular", f = "lceil", g = 667) : e === "\\rfloor" || e === "⌋" ? (u = s = "⎥", p = "⎦", v = "Size4-Regular", f = "rfloor", g = 667) : e === "\\rceil" || e === "⌉" ? (s = "⎤", u = p = "⎥", v = "Size4-Regular", f = "rceil", g = 667) : e === "(" || e === "\\lparen" ? (s = "⎛", u = "⎜", p = "⎝", v = "Size4-Regular", f = "lparen", g = 875) : e === ")" || e === "\\rparen" ? (s = "⎞", u = "⎟", p = "⎠", v = "Size4-Regular", f = "rparen", g = 875) : e === "\\{" || e === "\\lbrace" ? (s = "⎧", a = "⎨", p = "⎩", u = "⎪", v = "Size4-Regular") : e === "\\}" || e === "\\rbrace" ? (s = "⎫", a = "⎬", p = "⎭", u = "⎪", v = "Size4-Regular") : e === "\\lgroup" || e === "⟮" ? (s = "⎧", p = "⎩", u = "⎪", v = "Size4-Regular") : e === "\\rgroup" || e === "⟯" ? (s = "⎫", p = "⎭", u = "⎪", v = "Size4-Regular") : e === "\\lmoustache" || e === "⎰" ? (s = "⎧", p = "⎭", u = "⎪", v = "Size4-Regular") : (e === "\\rmoustache" || e === "⎱") && (s = "⎫", p = "⎩", u = "⎪", v = "Size4-Regular");
  var C = ti(s, v, o), b = C.height + C.depth, d = ti(u, v, o), m = d.height + d.depth, h = ti(p, v, o), l = h.height + h.depth, _ = 0, S = 1;
  if (a !== null) {
    var x = ti(a, v, o);
    _ = x.height + x.depth, S = 2;
  }
  var D = b + l + _, y = Math.max(0, Math.ceil((t - D) / (S * m))), E = D + y * S * m, B = n.fontMetrics().axisHeight;
  r && (B *= n.sizeMultiplier);
  var O = E / 2 - B, N = [];
  if (f.length > 0) {
    var R = E - b - l, j = Math.round(E * 1e3), Y = qh(f, Math.round(R * 1e3)), ee = new vr(f, Y), ne = (g / 1e3).toFixed(3) + "em", Z = (j / 1e3).toFixed(3) + "em", T = new or([ee], {
      width: ne,
      height: Z,
      viewBox: "0 0 " + g + " " + j
    }), L = G.makeSvgSpan([], [T], n);
    L.height = j / 1e3, L.style.width = ne, L.style.height = Z, N.push({
      type: "elem",
      elem: L
    });
  } else {
    if (N.push(bs(p, v, o)), N.push(xi), a === null) {
      var I = E - b - l + 2 * Ys;
      N.push(ws(u, I, n));
    } else {
      var H = (E - b - l - _) / 2 + 2 * Ys;
      N.push(ws(u, H, n)), N.push(xi), N.push(bs(a, v, o)), N.push(xi), N.push(ws(u, H, n));
    }
    N.push(xi), N.push(bs(s, v, o));
  }
  var K = n.havingBaseStyle(ve.TEXT), re = G.makeVList({
    positionType: "bottom",
    positionData: O,
    children: N
  }, K);
  return bn(G.makeSpan(["delimsizing", "mult"], [re], K), ve.TEXT, n, c);
}, ys = 80, Ss = 0.08, Cs = function(e, t, r, n, o) {
  var c = Hh(e, n, r), s = new vr(e, c), a = new or([s], {
    // Note: 1000:1 ratio of viewBox to document em width.
    width: "400em",
    height: le(t),
    viewBox: "0 0 400000 " + r,
    preserveAspectRatio: "xMinYMin slice"
  });
  return G.makeSvgSpan(["hide-tail"], [a], o);
}, Pc = function(e, t) {
  var r = t.havingBaseSizing(), n = B0("\\surd", e * r.sizeMultiplier, M0, r), o = r.sizeMultiplier, c = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), s, a = 0, u = 0, p = 0, f;
  return n.type === "small" ? (p = 1e3 + 1e3 * c + ys, e < 1 ? o = 1 : e < 1.4 && (o = 0.7), a = (1 + c + Ss) / o, u = (1 + c) / o, s = Cs("sqrtMain", a, p, c, t), s.style.minWidth = "0.853em", f = 0.833 / o) : n.type === "large" ? (p = (1e3 + ys) * ni[n.size], u = (ni[n.size] + c) / o, a = (ni[n.size] + c + Ss) / o, s = Cs("sqrtSize" + n.size, a, p, c, t), s.style.minWidth = "1.02em", f = 1 / o) : (a = e + c + Ss, u = e + c, p = Math.floor(1e3 * e + c) + ys, s = Cs("sqrtTall", a, p, c, t), s.style.minWidth = "0.742em", f = 1.056), s.height = u, s.style.height = le(a), {
    span: s,
    advanceWidth: f,
    // Calculate the actual line width.
    // This actually should depend on the chosen font -- e.g. \boldmath
    // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and
    // have thicker rules.
    ruleWidth: (t.fontMetrics().sqrtRuleThickness + c) * o
  };
}, A0 = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], zc = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], T0 = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], ni = [0, 1.2, 1.8, 2.4, 3], Hc = function(e, t, r, n, o) {
  if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), _e.contains(A0, e) || _e.contains(T0, e))
    return D0(e, t, !1, r, n, o);
  if (_e.contains(zc, e))
    return E0(e, ni[t], !1, r, n, o);
  throw new ie("Illegal delimiter: '" + e + "'");
}, Nc = [{
  type: "small",
  style: ve.SCRIPTSCRIPT
}, {
  type: "small",
  style: ve.SCRIPT
}, {
  type: "small",
  style: ve.TEXT
}, {
  type: "large",
  size: 1
}, {
  type: "large",
  size: 2
}, {
  type: "large",
  size: 3
}, {
  type: "large",
  size: 4
}], qc = [{
  type: "small",
  style: ve.SCRIPTSCRIPT
}, {
  type: "small",
  style: ve.SCRIPT
}, {
  type: "small",
  style: ve.TEXT
}, {
  type: "stack"
}], M0 = [{
  type: "small",
  style: ve.SCRIPTSCRIPT
}, {
  type: "small",
  style: ve.SCRIPT
}, {
  type: "small",
  style: ve.TEXT
}, {
  type: "large",
  size: 1
}, {
  type: "large",
  size: 2
}, {
  type: "large",
  size: 3
}, {
  type: "large",
  size: 4
}, {
  type: "stack"
}], Uc = function(e) {
  if (e.type === "small")
    return "Main-Regular";
  if (e.type === "large")
    return "Size" + e.size + "-Regular";
  if (e.type === "stack")
    return "Size4-Regular";
  throw new Error("Add support for delim type '" + e.type + "' here.");
}, B0 = function(e, t, r, n) {
  for (var o = Math.min(2, 3 - n.style.size), c = o; c < r.length && r[c].type !== "stack"; c++) {
    var s = ti(e, Uc(r[c]), "math"), a = s.height + s.depth;
    if (r[c].type === "small") {
      var u = n.havingBaseStyle(r[c].style);
      a *= u.sizeMultiplier;
    }
    if (a > t)
      return r[c];
  }
  return r[r.length - 1];
}, F0 = function(e, t, r, n, o, c) {
  e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle");
  var s;
  _e.contains(T0, e) ? s = Nc : _e.contains(A0, e) ? s = M0 : s = qc;
  var a = B0(e, t, s, n);
  return a.type === "small" ? Rc(e, a.style, r, n, o, c) : a.type === "large" ? D0(e, a.size, r, n, o, c) : E0(e, t, r, n, o, c);
}, Wc = function(e, t, r, n, o, c) {
  var s = n.fontMetrics().axisHeight * n.sizeMultiplier, a = 901, u = 5 / n.fontMetrics().ptPerEm, p = Math.max(t - s, r + s), f = Math.max(
    // In real TeX, calculations are done using integral values which are
    // 65536 per pt, or 655360 per em. So, the division here truncates in
    // TeX but doesn't here, producing different results. If we wanted to
    // exactly match TeX's calculation, we could do
    //   Math.floor(655360 * maxDistFromAxis / 500) *
    //    delimiterFactor / 655360
    // (To see the difference, compare
    //    x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
    // in TeX and KaTeX)
    p / 500 * a,
    2 * p - u
  );
  return F0(e, f, !0, n, o, c);
}, ar = {
  sqrtImage: Pc,
  sizedDelim: Hc,
  sizeToMaxHeight: ni,
  customSizedDelim: F0,
  leftRightDelim: Wc
}, ba = {
  "\\bigl": {
    mclass: "mopen",
    size: 1
  },
  "\\Bigl": {
    mclass: "mopen",
    size: 2
  },
  "\\biggl": {
    mclass: "mopen",
    size: 3
  },
  "\\Biggl": {
    mclass: "mopen",
    size: 4
  },
  "\\bigr": {
    mclass: "mclose",
    size: 1
  },
  "\\Bigr": {
    mclass: "mclose",
    size: 2
  },
  "\\biggr": {
    mclass: "mclose",
    size: 3
  },
  "\\Biggr": {
    mclass: "mclose",
    size: 4
  },
  "\\bigm": {
    mclass: "mrel",
    size: 1
  },
  "\\Bigm": {
    mclass: "mrel",
    size: 2
  },
  "\\biggm": {
    mclass: "mrel",
    size: 3
  },
  "\\Biggm": {
    mclass: "mrel",
    size: 4
  },
  "\\big": {
    mclass: "mord",
    size: 1
  },
  "\\Big": {
    mclass: "mord",
    size: 2
  },
  "\\bigg": {
    mclass: "mord",
    size: 3
  },
  "\\Bigg": {
    mclass: "mord",
    size: 4
  }
}, jc = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
function os(i, e) {
  var t = ns(i);
  if (t && _e.contains(jc, t.text))
    return t;
  throw t ? new ie("Invalid delimiter '" + t.text + "' after '" + e.funcName + "'", i) : new ie("Invalid delimiter type '" + i.type + "'", i);
}
he({
  type: "delimsizing",
  names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"],
  props: {
    numArgs: 1,
    argTypes: ["primitive"]
  },
  handler: (i, e) => {
    var t = os(e[0], i);
    return {
      type: "delimsizing",
      mode: i.parser.mode,
      size: ba[i.funcName].size,
      mclass: ba[i.funcName].mclass,
      delim: t.text
    };
  },
  htmlBuilder: (i, e) => i.delim === "." ? G.makeSpan([i.mclass]) : ar.sizedDelim(i.delim, i.size, e, i.mode, [i.mclass]),
  mathmlBuilder: (i) => {
    var e = [];
    i.delim !== "." && e.push(xt(i.delim, i.mode));
    var t = new te.MathNode("mo", e);
    i.mclass === "mopen" || i.mclass === "mclose" ? t.setAttribute("fence", "true") : t.setAttribute("fence", "false"), t.setAttribute("stretchy", "true");
    var r = le(ar.sizeToMaxHeight[i.size]);
    return t.setAttribute("minsize", r), t.setAttribute("maxsize", r), t;
  }
});
function wa(i) {
  if (!i.body)
    throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
}
he({
  type: "leftright-right",
  names: ["\\right"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (i, e) => {
    var t = i.parser.gullet.macros.get("\\current@color");
    if (t && typeof t != "string")
      throw new ie("\\current@color set to non-string in \\right");
    return {
      type: "leftright-right",
      mode: i.parser.mode,
      delim: os(e[0], i).text,
      color: t
      // undefined if not set via \color
    };
  }
});
he({
  type: "leftright",
  names: ["\\left"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (i, e) => {
    var t = os(e[0], i), r = i.parser;
    ++r.leftrightDepth;
    var n = r.parseExpression(!1);
    --r.leftrightDepth, r.expect("\\right", !1);
    var o = Ce(r.parseFunction(), "leftright-right");
    return {
      type: "leftright",
      mode: r.mode,
      body: n,
      left: t.text,
      right: o.delim,
      rightColor: o.color
    };
  },
  htmlBuilder: (i, e) => {
    wa(i);
    for (var t = je(i.body, e, !0, ["mopen", "mclose"]), r = 0, n = 0, o = !1, c = 0; c < t.length; c++)
      t[c].isMiddle ? o = !0 : (r = Math.max(t[c].height, r), n = Math.max(t[c].depth, n));
    r *= e.sizeMultiplier, n *= e.sizeMultiplier;
    var s;
    if (i.left === "." ? s = ci(e, ["mopen"]) : s = ar.leftRightDelim(i.left, r, n, e, i.mode, ["mopen"]), t.unshift(s), o)
      for (var a = 1; a < t.length; a++) {
        var u = t[a], p = u.isMiddle;
        p && (t[a] = ar.leftRightDelim(p.delim, r, n, p.options, i.mode, []));
      }
    var f;
    if (i.right === ".")
      f = ci(e, ["mclose"]);
    else {
      var g = i.rightColor ? e.withColor(i.rightColor) : e;
      f = ar.leftRightDelim(i.right, r, n, g, i.mode, ["mclose"]);
    }
    return t.push(f), G.makeSpan(["minner"], t, e);
  },
  mathmlBuilder: (i, e) => {
    wa(i);
    var t = lt(i.body, e);
    if (i.left !== ".") {
      var r = new te.MathNode("mo", [xt(i.left, i.mode)]);
      r.setAttribute("fence", "true"), t.unshift(r);
    }
    if (i.right !== ".") {
      var n = new te.MathNode("mo", [xt(i.right, i.mode)]);
      n.setAttribute("fence", "true"), i.rightColor && n.setAttribute("mathcolor", i.rightColor), t.push(n);
    }
    return pn(t);
  }
});
he({
  type: "middle",
  names: ["\\middle"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (i, e) => {
    var t = os(e[0], i);
    if (!i.parser.leftrightDepth)
      throw new ie("\\middle without preceding \\left", t);
    return {
      type: "middle",
      mode: i.parser.mode,
      delim: t.text
    };
  },
  htmlBuilder: (i, e) => {
    var t;
    if (i.delim === ".")
      t = ci(e, []);
    else {
      t = ar.sizedDelim(i.delim, 1, e, i.mode, []);
      var r = {
        delim: i.delim,
        options: e
      };
      t.isMiddle = r;
    }
    return t;
  },
  mathmlBuilder: (i, e) => {
    var t = i.delim === "\\vert" || i.delim === "|" ? xt("|", "text") : xt(i.delim, i.mode), r = new te.MathNode("mo", [t]);
    return r.setAttribute("fence", "true"), r.setAttribute("lspace", "0.05em"), r.setAttribute("rspace", "0.05em"), r;
  }
});
var wn = (i, e) => {
  var t = G.wrapFragment(Ae(i.body, e), e), r = i.label.slice(1), n = e.sizeMultiplier, o, c = 0, s = _e.isCharacterBox(i.body);
  if (r === "sout")
    o = G.makeSpan(["stretchy", "sout"]), o.height = e.fontMetrics().defaultRuleThickness / n, c = -0.5 * e.fontMetrics().xHeight;
  else if (r === "phase") {
    var a = ze({
      number: 0.6,
      unit: "pt"
    }, e), u = ze({
      number: 0.35,
      unit: "ex"
    }, e), p = e.havingBaseSizing();
    n = n / p.sizeMultiplier;
    var f = t.height + t.depth + a + u;
    t.style.paddingLeft = le(f / 2 + a);
    var g = Math.floor(1e3 * f * n), v = Ph(g), C = new or([new vr("phase", v)], {
      width: "400em",
      height: le(g / 1e3),
      viewBox: "0 0 400000 " + g,
      preserveAspectRatio: "xMinYMin slice"
    });
    o = G.makeSvgSpan(["hide-tail"], [C], e), o.style.height = le(f), c = t.depth + a + u;
  } else {
    /cancel/.test(r) ? s || t.classes.push("cancel-pad") : r === "angl" ? t.classes.push("anglpad") : t.classes.push("boxpad");
    var b = 0, d = 0, m = 0;
    /box/.test(r) ? (m = Math.max(
      e.fontMetrics().fboxrule,
      // default
      e.minRuleThickness
      // User override.
    ), b = e.fontMetrics().fboxsep + (r === "colorbox" ? 0 : m), d = b) : r === "angl" ? (m = Math.max(e.fontMetrics().defaultRuleThickness, e.minRuleThickness), b = 4 * m, d = Math.max(0, 0.25 - t.depth)) : (b = s ? 0.2 : 0, d = b), o = hr.encloseSpan(t, r, b, d, e), /fbox|boxed|fcolorbox/.test(r) ? (o.style.borderStyle = "solid", o.style.borderWidth = le(m)) : r === "angl" && m !== 0.049 && (o.style.borderTopWidth = le(m), o.style.borderRightWidth = le(m)), c = t.depth + d, i.backgroundColor && (o.style.backgroundColor = i.backgroundColor, i.borderColor && (o.style.borderColor = i.borderColor));
  }
  var h;
  if (i.backgroundColor)
    h = G.makeVList({
      positionType: "individualShift",
      children: [
        // Put the color background behind inner;
        {
          type: "elem",
          elem: o,
          shift: c
        },
        {
          type: "elem",
          elem: t,
          shift: 0
        }
      ]
    }, e);
  else {
    var l = /cancel|phase/.test(r) ? ["svg-align"] : [];
    h = G.makeVList({
      positionType: "individualShift",
      children: [
        // Write the \cancel stroke on top of inner.
        {
          type: "elem",
          elem: t,
          shift: 0
        },
        {
          type: "elem",
          elem: o,
          shift: c,
          wrapperClasses: l
        }
      ]
    }, e);
  }
  return /cancel/.test(r) && (h.height = t.height, h.depth = t.depth), /cancel/.test(r) && !s ? G.makeSpan(["mord", "cancel-lap"], [h], e) : G.makeSpan(["mord"], [h], e);
}, yn = (i, e) => {
  var t = 0, r = new te.MathNode(i.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [Re(i.body, e)]);
  switch (i.label) {
    case "\\cancel":
      r.setAttribute("notation", "updiagonalstrike");
      break;
    case "\\bcancel":
      r.setAttribute("notation", "downdiagonalstrike");
      break;
    case "\\phase":
      r.setAttribute("notation", "phasorangle");
      break;
    case "\\sout":
      r.setAttribute("notation", "horizontalstrike");
      break;
    case "\\fbox":
      r.setAttribute("notation", "box");
      break;
    case "\\angl":
      r.setAttribute("notation", "actuarial");
      break;
    case "\\fcolorbox":
    case "\\colorbox":
      if (t = e.fontMetrics().fboxsep * e.fontMetrics().ptPerEm, r.setAttribute("width", "+" + 2 * t + "pt"), r.setAttribute("height", "+" + 2 * t + "pt"), r.setAttribute("lspace", t + "pt"), r.setAttribute("voffset", t + "pt"), i.label === "\\fcolorbox") {
        var n = Math.max(
          e.fontMetrics().fboxrule,
          // default
          e.minRuleThickness
          // user override
        );
        r.setAttribute("style", "border: " + n + "em solid " + String(i.borderColor));
      }
      break;
    case "\\xcancel":
      r.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
      break;
  }
  return i.backgroundColor && r.setAttribute("mathbackground", i.backgroundColor), r;
};
he({
  type: "enclose",
  names: ["\\colorbox"],
  props: {
    numArgs: 2,
    allowedInText: !0,
    argTypes: ["color", "text"]
  },
  handler(i, e, t) {
    var {
      parser: r,
      funcName: n
    } = i, o = Ce(e[0], "color-token").color, c = e[1];
    return {
      type: "enclose",
      mode: r.mode,
      label: n,
      backgroundColor: o,
      body: c
    };
  },
  htmlBuilder: wn,
  mathmlBuilder: yn
});
he({
  type: "enclose",
  names: ["\\fcolorbox"],
  props: {
    numArgs: 3,
    allowedInText: !0,
    argTypes: ["color", "color", "text"]
  },
  handler(i, e, t) {
    var {
      parser: r,
      funcName: n
    } = i, o = Ce(e[0], "color-token").color, c = Ce(e[1], "color-token").color, s = e[2];
    return {
      type: "enclose",
      mode: r.mode,
      label: n,
      backgroundColor: c,
      borderColor: o,
      body: s
    };
  },
  htmlBuilder: wn,
  mathmlBuilder: yn
});
he({
  type: "enclose",
  names: ["\\fbox"],
  props: {
    numArgs: 1,
    argTypes: ["hbox"],
    allowedInText: !0
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "enclose",
      mode: t.mode,
      label: "\\fbox",
      body: e[0]
    };
  }
});
he({
  type: "enclose",
  names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout", "\\phase"],
  props: {
    numArgs: 1
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0];
    return {
      type: "enclose",
      mode: t.mode,
      label: r,
      body: n
    };
  },
  htmlBuilder: wn,
  mathmlBuilder: yn
});
he({
  type: "enclose",
  names: ["\\angl"],
  props: {
    numArgs: 1,
    argTypes: ["hbox"],
    allowedInText: !1
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "enclose",
      mode: t.mode,
      label: "\\angl",
      body: e[0]
    };
  }
});
var R0 = {};
function $t(i) {
  for (var {
    type: e,
    names: t,
    props: r,
    handler: n,
    htmlBuilder: o,
    mathmlBuilder: c
  } = i, s = {
    type: e,
    numArgs: r.numArgs || 0,
    allowedInText: !1,
    numOptionalArgs: 0,
    handler: n
  }, a = 0; a < t.length; ++a)
    R0[t[a]] = s;
  o && ($i[e] = o), c && (Zi[e] = c);
}
var L0 = {};
function M(i, e) {
  L0[i] = e;
}
function ya(i) {
  var e = [];
  i.consumeSpaces();
  var t = i.fetch().text;
  for (t === "\\relax" && (i.consume(), i.consumeSpaces(), t = i.fetch().text); t === "\\hline" || t === "\\hdashline"; )
    i.consume(), e.push(t === "\\hdashline"), i.consumeSpaces(), t = i.fetch().text;
  return e;
}
var ls = (i) => {
  var e = i.parser.settings;
  if (!e.displayMode)
    throw new ie("{" + i.envName + "} can be used only in display mode.");
};
function Sn(i) {
  if (i.indexOf("ed") === -1)
    return i.indexOf("*") === -1;
}
function wr(i, e, t) {
  var {
    hskipBeforeAndAfter: r,
    addJot: n,
    cols: o,
    arraystretch: c,
    colSeparationType: s,
    autoTag: a,
    singleRow: u,
    emptySingleRow: p,
    maxNumCols: f,
    leqno: g
  } = e;
  if (i.gullet.beginGroup(), u || i.gullet.macros.set("\\cr", "\\\\\\relax"), !c) {
    var v = i.gullet.expandMacroAsText("\\arraystretch");
    if (v == null)
      c = 1;
    else if (c = parseFloat(v), !c || c < 0)
      throw new ie("Invalid \\arraystretch: " + v);
  }
  i.gullet.beginGroup();
  var C = [], b = [C], d = [], m = [], h = a != null ? [] : void 0;
  function l() {
    a && i.gullet.macros.set("\\@eqnsw", "1", !0);
  }
  function _() {
    h && (i.gullet.macros.get("\\df@tag") ? (h.push(i.subparse([new St("\\df@tag")])), i.gullet.macros.set("\\df@tag", void 0, !0)) : h.push(!!a && i.gullet.macros.get("\\@eqnsw") === "1"));
  }
  for (l(), m.push(ya(i)); ; ) {
    var S = i.parseExpression(!1, u ? "\\end" : "\\\\");
    i.gullet.endGroup(), i.gullet.beginGroup(), S = {
      type: "ordgroup",
      mode: i.mode,
      body: S
    }, t && (S = {
      type: "styling",
      mode: i.mode,
      style: t,
      body: [S]
    }), C.push(S);
    var x = i.fetch().text;
    if (x === "&") {
      if (f && C.length === f) {
        if (u || s)
          throw new ie("Too many tab characters: &", i.nextToken);
        i.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
      }
      i.consume();
    } else if (x === "\\end") {
      _(), C.length === 1 && S.type === "styling" && S.body[0].body.length === 0 && (b.length > 1 || !p) && b.pop(), m.length < b.length + 1 && m.push([]);
      break;
    } else if (x === "\\\\") {
      i.consume();
      var D = void 0;
      i.gullet.future().text !== " " && (D = i.parseSizeGroup(!0)), d.push(D ? D.value : null), _(), m.push(ya(i)), C = [], b.push(C), l();
    } else
      throw new ie("Expected & or \\\\ or \\cr or \\end", i.nextToken);
  }
  return i.gullet.endGroup(), i.gullet.endGroup(), {
    type: "array",
    mode: i.mode,
    addJot: n,
    arraystretch: c,
    body: b,
    cols: o,
    rowGaps: d,
    hskipBeforeAndAfter: r,
    hLinesBeforeRow: m,
    colSeparationType: s,
    tags: h,
    leqno: g
  };
}
function Cn(i) {
  return i.slice(0, 1) === "d" ? "display" : "text";
}
var Zt = function(e, t) {
  var r, n, o = e.body.length, c = e.hLinesBeforeRow, s = 0, a = new Array(o), u = [], p = Math.max(
    // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em.
    t.fontMetrics().arrayRuleWidth,
    t.minRuleThickness
    // User override.
  ), f = 1 / t.fontMetrics().ptPerEm, g = 5 * f;
  if (e.colSeparationType && e.colSeparationType === "small") {
    var v = t.havingStyle(ve.SCRIPT).sizeMultiplier;
    g = 0.2778 * (v / t.sizeMultiplier);
  }
  var C = e.colSeparationType === "CD" ? ze({
    number: 3,
    unit: "ex"
  }, t) : 12 * f, b = 3 * f, d = e.arraystretch * C, m = 0.7 * d, h = 0.3 * d, l = 0;
  function _(Ve) {
    for (var $ = 0; $ < Ve.length; ++$)
      $ > 0 && (l += 0.25), u.push({
        pos: l,
        isDashed: Ve[$]
      });
  }
  for (_(c[0]), r = 0; r < e.body.length; ++r) {
    var S = e.body[r], x = m, D = h;
    s < S.length && (s = S.length);
    var y = new Array(S.length);
    for (n = 0; n < S.length; ++n) {
      var E = Ae(S[n], t);
      D < E.depth && (D = E.depth), x < E.height && (x = E.height), y[n] = E;
    }
    var B = e.rowGaps[r], O = 0;
    B && (O = ze(B, t), O > 0 && (O += h, D < O && (D = O), O = 0)), e.addJot && (D += b), y.height = x, y.depth = D, l += x, y.pos = l, l += D + O, a[r] = y, _(c[r + 1]);
  }
  var N = l / 2 + t.fontMetrics().axisHeight, R = e.cols || [], j = [], Y, ee, ne = [];
  if (e.tags && e.tags.some((Ve) => Ve))
    for (r = 0; r < o; ++r) {
      var Z = a[r], T = Z.pos - N, L = e.tags[r], I = void 0;
      L === !0 ? I = G.makeSpan(["eqn-num"], [], t) : L === !1 ? I = G.makeSpan([], [], t) : I = G.makeSpan([], je(L, t, !0), t), I.depth = Z.depth, I.height = Z.height, ne.push({
        type: "elem",
        elem: I,
        shift: T
      });
    }
  for (
    n = 0, ee = 0;
    // Continue while either there are more columns or more column
    // descriptions, so trailing separators don't get lost.
    n < s || ee < R.length;
    ++n, ++ee
  ) {
    for (var H = R[ee] || {}, K = !0; H.type === "separator"; ) {
      if (K || (Y = G.makeSpan(["arraycolsep"], []), Y.style.width = le(t.fontMetrics().doubleRuleSep), j.push(Y)), H.separator === "|" || H.separator === ":") {
        var re = H.separator === "|" ? "solid" : "dashed", V = G.makeSpan(["vertical-separator"], [], t);
        V.style.height = le(l), V.style.borderRightWidth = le(p), V.style.borderRightStyle = re, V.style.margin = "0 " + le(-p / 2);
        var ue = l - N;
        ue && (V.style.verticalAlign = le(-ue)), j.push(V);
      } else
        throw new ie("Invalid separator type: " + H.separator);
      ee++, H = R[ee] || {}, K = !1;
    }
    if (!(n >= s)) {
      var W = void 0;
      (n > 0 || e.hskipBeforeAndAfter) && (W = _e.deflt(H.pregap, g), W !== 0 && (Y = G.makeSpan(["arraycolsep"], []), Y.style.width = le(W), j.push(Y)));
      var F = [];
      for (r = 0; r < o; ++r) {
        var X = a[r], J = X[n];
        if (J) {
          var oe = X.pos - N;
          J.depth = X.depth, J.height = X.height, F.push({
            type: "elem",
            elem: J,
            shift: oe
          });
        }
      }
      F = G.makeVList({
        positionType: "individualShift",
        children: F
      }, t), F = G.makeSpan(["col-align-" + (H.align || "c")], [F]), j.push(F), (n < s - 1 || e.hskipBeforeAndAfter) && (W = _e.deflt(H.postgap, g), W !== 0 && (Y = G.makeSpan(["arraycolsep"], []), Y.style.width = le(W), j.push(Y)));
    }
  }
  if (a = G.makeSpan(["mtable"], j), u.length > 0) {
    for (var se = G.makeLineSpan("hline", t, p), be = G.makeLineSpan("hdashline", t, p), xe = [{
      type: "elem",
      elem: a,
      shift: 0
    }]; u.length > 0; ) {
      var De = u.pop(), Te = De.pos - N;
      De.isDashed ? xe.push({
        type: "elem",
        elem: be,
        shift: Te
      }) : xe.push({
        type: "elem",
        elem: se,
        shift: Te
      });
    }
    a = G.makeVList({
      positionType: "individualShift",
      children: xe
    }, t);
  }
  if (ne.length === 0)
    return G.makeSpan(["mord"], [a], t);
  var de = G.makeVList({
    positionType: "individualShift",
    children: ne
  }, t);
  return de = G.makeSpan(["tag"], [de], t), G.makeFragment([a, de]);
}, Gc = {
  c: "center ",
  l: "left ",
  r: "right "
}, Jt = function(e, t) {
  for (var r = [], n = new te.MathNode("mtd", [], ["mtr-glue"]), o = new te.MathNode("mtd", [], ["mml-eqn-num"]), c = 0; c < e.body.length; c++) {
    for (var s = e.body[c], a = [], u = 0; u < s.length; u++)
      a.push(new te.MathNode("mtd", [Re(s[u], t)]));
    e.tags && e.tags[c] && (a.unshift(n), a.push(n), e.leqno ? a.unshift(o) : a.push(o)), r.push(new te.MathNode("mtr", a));
  }
  var p = new te.MathNode("mtable", r), f = e.arraystretch === 0.5 ? 0.1 : 0.16 + e.arraystretch - 1 + (e.addJot ? 0.09 : 0);
  p.setAttribute("rowspacing", le(f));
  var g = "", v = "";
  if (e.cols && e.cols.length > 0) {
    var C = e.cols, b = "", d = !1, m = 0, h = C.length;
    C[0].type === "separator" && (g += "top ", m = 1), C[C.length - 1].type === "separator" && (g += "bottom ", h -= 1);
    for (var l = m; l < h; l++)
      C[l].type === "align" ? (v += Gc[C[l].align], d && (b += "none "), d = !0) : C[l].type === "separator" && d && (b += C[l].separator === "|" ? "solid " : "dashed ", d = !1);
    p.setAttribute("columnalign", v.trim()), /[sd]/.test(b) && p.setAttribute("columnlines", b.trim());
  }
  if (e.colSeparationType === "align") {
    for (var _ = e.cols || [], S = "", x = 1; x < _.length; x++)
      S += x % 2 ? "0em " : "1em ";
    p.setAttribute("columnspacing", S.trim());
  } else e.colSeparationType === "alignat" || e.colSeparationType === "gather" ? p.setAttribute("columnspacing", "0em") : e.colSeparationType === "small" ? p.setAttribute("columnspacing", "0.2778em") : e.colSeparationType === "CD" ? p.setAttribute("columnspacing", "0.5em") : p.setAttribute("columnspacing", "1em");
  var D = "", y = e.hLinesBeforeRow;
  g += y[0].length > 0 ? "left " : "", g += y[y.length - 1].length > 0 ? "right " : "";
  for (var E = 1; E < y.length - 1; E++)
    D += y[E].length === 0 ? "none " : y[E][0] ? "dashed " : "solid ";
  return /[sd]/.test(D) && p.setAttribute("rowlines", D.trim()), g !== "" && (p = new te.MathNode("menclose", [p]), p.setAttribute("notation", g.trim())), e.arraystretch && e.arraystretch < 1 && (p = new te.MathNode("mstyle", [p]), p.setAttribute("scriptlevel", "1")), p;
}, O0 = function(e, t) {
  e.envName.indexOf("ed") === -1 && ls(e);
  var r = [], n = e.envName.indexOf("at") > -1 ? "alignat" : "align", o = e.envName === "split", c = wr(e.parser, {
    cols: r,
    addJot: !0,
    autoTag: o ? void 0 : Sn(e.envName),
    emptySingleRow: !0,
    colSeparationType: n,
    maxNumCols: o ? 2 : void 0,
    leqno: e.parser.settings.leqno
  }, "display"), s, a = 0, u = {
    type: "ordgroup",
    mode: e.mode,
    body: []
  };
  if (t[0] && t[0].type === "ordgroup") {
    for (var p = "", f = 0; f < t[0].body.length; f++) {
      var g = Ce(t[0].body[f], "textord");
      p += g.text;
    }
    s = Number(p), a = s * 2;
  }
  var v = !a;
  c.body.forEach(function(m) {
    for (var h = 1; h < m.length; h += 2) {
      var l = Ce(m[h], "styling"), _ = Ce(l.body[0], "ordgroup");
      _.body.unshift(u);
    }
    if (v)
      a < m.length && (a = m.length);
    else {
      var S = m.length / 2;
      if (s < S)
        throw new ie("Too many math in a row: " + ("expected " + s + ", but got " + S), m[0]);
    }
  });
  for (var C = 0; C < a; ++C) {
    var b = "r", d = 0;
    C % 2 === 1 ? b = "l" : C > 0 && v && (d = 1), r[C] = {
      type: "align",
      align: b,
      pregap: d,
      postgap: 0
    };
  }
  return c.colSeparationType = v ? "align" : "alignat", c;
};
$t({
  type: "array",
  names: ["array", "darray"],
  props: {
    numArgs: 1
  },
  handler(i, e) {
    var t = ns(e[0]), r = t ? [e[0]] : Ce(e[0], "ordgroup").body, n = r.map(function(c) {
      var s = gn(c), a = s.text;
      if ("lcr".indexOf(a) !== -1)
        return {
          type: "align",
          align: a
        };
      if (a === "|")
        return {
          type: "separator",
          separator: "|"
        };
      if (a === ":")
        return {
          type: "separator",
          separator: ":"
        };
      throw new ie("Unknown column alignment: " + a, c);
    }), o = {
      cols: n,
      hskipBeforeAndAfter: !0,
      // \@preamble in lttab.dtx
      maxNumCols: n.length
    };
    return wr(i.parser, o, Cn(i.envName));
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"],
  props: {
    numArgs: 0
  },
  handler(i) {
    var e = {
      matrix: null,
      pmatrix: ["(", ")"],
      bmatrix: ["[", "]"],
      Bmatrix: ["\\{", "\\}"],
      vmatrix: ["|", "|"],
      Vmatrix: ["\\Vert", "\\Vert"]
    }[i.envName.replace("*", "")], t = "c", r = {
      hskipBeforeAndAfter: !1,
      cols: [{
        type: "align",
        align: t
      }]
    };
    if (i.envName.charAt(i.envName.length - 1) === "*") {
      var n = i.parser;
      if (n.consumeSpaces(), n.fetch().text === "[") {
        if (n.consume(), n.consumeSpaces(), t = n.fetch().text, "lcr".indexOf(t) === -1)
          throw new ie("Expected l or c or r", n.nextToken);
        n.consume(), n.consumeSpaces(), n.expect("]"), n.consume(), r.cols = [{
          type: "align",
          align: t
        }];
      }
    }
    var o = wr(i.parser, r, Cn(i.envName)), c = Math.max(0, ...o.body.map((s) => s.length));
    return o.cols = new Array(c).fill({
      type: "align",
      align: t
    }), e ? {
      type: "leftright",
      mode: i.mode,
      body: [o],
      left: e[0],
      right: e[1],
      rightColor: void 0
      // \right uninfluenced by \color in array
    } : o;
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["smallmatrix"],
  props: {
    numArgs: 0
  },
  handler(i) {
    var e = {
      arraystretch: 0.5
    }, t = wr(i.parser, e, "script");
    return t.colSeparationType = "small", t;
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["subarray"],
  props: {
    numArgs: 1
  },
  handler(i, e) {
    var t = ns(e[0]), r = t ? [e[0]] : Ce(e[0], "ordgroup").body, n = r.map(function(c) {
      var s = gn(c), a = s.text;
      if ("lc".indexOf(a) !== -1)
        return {
          type: "align",
          align: a
        };
      throw new ie("Unknown column alignment: " + a, c);
    });
    if (n.length > 1)
      throw new ie("{subarray} can contain only one column");
    var o = {
      cols: n,
      hskipBeforeAndAfter: !1,
      arraystretch: 0.5
    };
    if (o = wr(i.parser, o, "script"), o.body.length > 0 && o.body[0].length > 1)
      throw new ie("{subarray} can contain only one column");
    return o;
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["cases", "dcases", "rcases", "drcases"],
  props: {
    numArgs: 0
  },
  handler(i) {
    var e = {
      arraystretch: 1.2,
      cols: [{
        type: "align",
        align: "l",
        pregap: 0,
        // TODO(kevinb) get the current style.
        // For now we use the metrics for TEXT style which is what we were
        // doing before.  Before attempting to get the current style we
        // should look at TeX's behavior especially for \over and matrices.
        postgap: 1
        /* 1em quad */
      }, {
        type: "align",
        align: "l",
        pregap: 0,
        postgap: 0
      }]
    }, t = wr(i.parser, e, Cn(i.envName));
    return {
      type: "leftright",
      mode: i.mode,
      body: [t],
      left: i.envName.indexOf("r") > -1 ? "." : "\\{",
      right: i.envName.indexOf("r") > -1 ? "\\}" : ".",
      rightColor: void 0
    };
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["align", "align*", "aligned", "split"],
  props: {
    numArgs: 0
  },
  handler: O0,
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["gathered", "gather", "gather*"],
  props: {
    numArgs: 0
  },
  handler(i) {
    _e.contains(["gather", "gather*"], i.envName) && ls(i);
    var e = {
      cols: [{
        type: "align",
        align: "c"
      }],
      addJot: !0,
      colSeparationType: "gather",
      autoTag: Sn(i.envName),
      emptySingleRow: !0,
      leqno: i.parser.settings.leqno
    };
    return wr(i.parser, e, "display");
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["alignat", "alignat*", "alignedat"],
  props: {
    numArgs: 1
  },
  handler: O0,
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["equation", "equation*"],
  props: {
    numArgs: 0
  },
  handler(i) {
    ls(i);
    var e = {
      autoTag: Sn(i.envName),
      emptySingleRow: !0,
      singleRow: !0,
      maxNumCols: 1,
      leqno: i.parser.settings.leqno
    };
    return wr(i.parser, e, "display");
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
$t({
  type: "array",
  names: ["CD"],
  props: {
    numArgs: 0
  },
  handler(i) {
    return ls(i), Bc(i.parser);
  },
  htmlBuilder: Zt,
  mathmlBuilder: Jt
});
M("\\nonumber", "\\gdef\\@eqnsw{0}");
M("\\notag", "\\nonumber");
he({
  type: "text",
  // Doesn't matter what this is.
  names: ["\\hline", "\\hdashline"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    allowedInMath: !0
  },
  handler(i, e) {
    throw new ie(i.funcName + " valid only within array environment");
  }
});
var Sa = R0;
he({
  type: "environment",
  names: ["\\begin", "\\end"],
  props: {
    numArgs: 1,
    argTypes: ["text"]
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0];
    if (n.type !== "ordgroup")
      throw new ie("Invalid environment name", n);
    for (var o = "", c = 0; c < n.body.length; ++c)
      o += Ce(n.body[c], "textord").text;
    if (r === "\\begin") {
      if (!Sa.hasOwnProperty(o))
        throw new ie("No such environment: " + o, n);
      var s = Sa[o], {
        args: a,
        optArgs: u
      } = t.parseArguments("\\begin{" + o + "}", s), p = {
        mode: t.mode,
        envName: o,
        parser: t
      }, f = s.handler(p, a, u);
      t.expect("\\end", !1);
      var g = t.nextToken, v = Ce(t.parseFunction(), "environment");
      if (v.name !== o)
        throw new ie("Mismatch: \\begin{" + o + "} matched by \\end{" + v.name + "}", g);
      return f;
    }
    return {
      type: "environment",
      mode: t.mode,
      name: o,
      nameGroup: n
    };
  }
});
var I0 = (i, e) => {
  var t = i.font, r = e.withFont(t);
  return Ae(i.body, r);
}, P0 = (i, e) => {
  var t = i.font, r = e.withFont(t);
  return Re(i.body, r);
}, Ca = {
  "\\Bbb": "\\mathbb",
  "\\bold": "\\mathbf",
  "\\frak": "\\mathfrak",
  "\\bm": "\\boldsymbol"
};
he({
  type: "font",
  names: [
    // styles, except \boldsymbol defined below
    "\\mathrm",
    "\\mathit",
    "\\mathbf",
    "\\mathnormal",
    // families
    "\\mathbb",
    "\\mathcal",
    "\\mathfrak",
    "\\mathscr",
    "\\mathsf",
    "\\mathtt",
    // aliases, except \bm defined below
    "\\Bbb",
    "\\bold",
    "\\frak"
  ],
  props: {
    numArgs: 1,
    allowedInArgument: !0
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = Ji(e[0]), o = r;
    return o in Ca && (o = Ca[o]), {
      type: "font",
      mode: t.mode,
      font: o.slice(1),
      body: n
    };
  },
  htmlBuilder: I0,
  mathmlBuilder: P0
});
he({
  type: "mclass",
  names: ["\\boldsymbol", "\\bm"],
  props: {
    numArgs: 1
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i, r = e[0], n = _e.isCharacterBox(r);
    return {
      type: "mclass",
      mode: t.mode,
      mclass: as(r),
      body: [{
        type: "font",
        mode: t.mode,
        font: "boldsymbol",
        body: r
      }],
      isCharacterBox: n
    };
  }
});
he({
  type: "font",
  names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r,
      breakOnTokenText: n
    } = i, {
      mode: o
    } = t, c = t.parseExpression(!0, n), s = "math" + r.slice(1);
    return {
      type: "font",
      mode: o,
      font: s,
      body: {
        type: "ordgroup",
        mode: t.mode,
        body: c
      }
    };
  },
  htmlBuilder: I0,
  mathmlBuilder: P0
});
var z0 = (i, e) => {
  var t = e;
  return i === "display" ? t = t.id >= ve.SCRIPT.id ? t.text() : ve.DISPLAY : i === "text" && t.size === ve.DISPLAY.size ? t = ve.TEXT : i === "script" ? t = ve.SCRIPT : i === "scriptscript" && (t = ve.SCRIPTSCRIPT), t;
}, xn = (i, e) => {
  var t = z0(i.size, e.style), r = t.fracNum(), n = t.fracDen(), o;
  o = e.havingStyle(r);
  var c = Ae(i.numer, o, e);
  if (i.continued) {
    var s = 8.5 / e.fontMetrics().ptPerEm, a = 3.5 / e.fontMetrics().ptPerEm;
    c.height = c.height < s ? s : c.height, c.depth = c.depth < a ? a : c.depth;
  }
  o = e.havingStyle(n);
  var u = Ae(i.denom, o, e), p, f, g;
  i.hasBarLine ? (i.barSize ? (f = ze(i.barSize, e), p = G.makeLineSpan("frac-line", e, f)) : p = G.makeLineSpan("frac-line", e), f = p.height, g = p.height) : (p = null, f = 0, g = e.fontMetrics().defaultRuleThickness);
  var v, C, b;
  t.size === ve.DISPLAY.size || i.size === "display" ? (v = e.fontMetrics().num1, f > 0 ? C = 3 * g : C = 7 * g, b = e.fontMetrics().denom1) : (f > 0 ? (v = e.fontMetrics().num2, C = g) : (v = e.fontMetrics().num3, C = 3 * g), b = e.fontMetrics().denom2);
  var d;
  if (p) {
    var h = e.fontMetrics().axisHeight;
    v - c.depth - (h + 0.5 * f) < C && (v += C - (v - c.depth - (h + 0.5 * f))), h - 0.5 * f - (u.height - b) < C && (b += C - (h - 0.5 * f - (u.height - b)));
    var l = -(h - 0.5 * f);
    d = G.makeVList({
      positionType: "individualShift",
      children: [{
        type: "elem",
        elem: u,
        shift: b
      }, {
        type: "elem",
        elem: p,
        shift: l
      }, {
        type: "elem",
        elem: c,
        shift: -v
      }]
    }, e);
  } else {
    var m = v - c.depth - (u.height - b);
    m < C && (v += 0.5 * (C - m), b += 0.5 * (C - m)), d = G.makeVList({
      positionType: "individualShift",
      children: [{
        type: "elem",
        elem: u,
        shift: b
      }, {
        type: "elem",
        elem: c,
        shift: -v
      }]
    }, e);
  }
  o = e.havingStyle(t), d.height *= o.sizeMultiplier / e.sizeMultiplier, d.depth *= o.sizeMultiplier / e.sizeMultiplier;
  var _;
  t.size === ve.DISPLAY.size ? _ = e.fontMetrics().delim1 : t.size === ve.SCRIPTSCRIPT.size ? _ = e.havingStyle(ve.SCRIPT).fontMetrics().delim2 : _ = e.fontMetrics().delim2;
  var S, x;
  return i.leftDelim == null ? S = ci(e, ["mopen"]) : S = ar.customSizedDelim(i.leftDelim, _, !0, e.havingStyle(t), i.mode, ["mopen"]), i.continued ? x = G.makeSpan([]) : i.rightDelim == null ? x = ci(e, ["mclose"]) : x = ar.customSizedDelim(i.rightDelim, _, !0, e.havingStyle(t), i.mode, ["mclose"]), G.makeSpan(["mord"].concat(o.sizingClasses(e)), [S, G.makeSpan(["mfrac"], [d]), x], e);
}, kn = (i, e) => {
  var t = new te.MathNode("mfrac", [Re(i.numer, e), Re(i.denom, e)]);
  if (!i.hasBarLine)
    t.setAttribute("linethickness", "0px");
  else if (i.barSize) {
    var r = ze(i.barSize, e);
    t.setAttribute("linethickness", le(r));
  }
  var n = z0(i.size, e.style);
  if (n.size !== e.style.size) {
    t = new te.MathNode("mstyle", [t]);
    var o = n.size === ve.DISPLAY.size ? "true" : "false";
    t.setAttribute("displaystyle", o), t.setAttribute("scriptlevel", "0");
  }
  if (i.leftDelim != null || i.rightDelim != null) {
    var c = [];
    if (i.leftDelim != null) {
      var s = new te.MathNode("mo", [new te.TextNode(i.leftDelim.replace("\\", ""))]);
      s.setAttribute("fence", "true"), c.push(s);
    }
    if (c.push(t), i.rightDelim != null) {
      var a = new te.MathNode("mo", [new te.TextNode(i.rightDelim.replace("\\", ""))]);
      a.setAttribute("fence", "true"), c.push(a);
    }
    return pn(c);
  }
  return t;
};
he({
  type: "genfrac",
  names: [
    "\\dfrac",
    "\\frac",
    "\\tfrac",
    "\\dbinom",
    "\\binom",
    "\\tbinom",
    "\\\\atopfrac",
    // can’t be entered directly
    "\\\\bracefrac",
    "\\\\brackfrac"
    // ditto
  ],
  props: {
    numArgs: 2,
    allowedInArgument: !0
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0], o = e[1], c, s = null, a = null, u = "auto";
    switch (r) {
      case "\\dfrac":
      case "\\frac":
      case "\\tfrac":
        c = !0;
        break;
      case "\\\\atopfrac":
        c = !1;
        break;
      case "\\dbinom":
      case "\\binom":
      case "\\tbinom":
        c = !1, s = "(", a = ")";
        break;
      case "\\\\bracefrac":
        c = !1, s = "\\{", a = "\\}";
        break;
      case "\\\\brackfrac":
        c = !1, s = "[", a = "]";
        break;
      default:
        throw new Error("Unrecognized genfrac command");
    }
    switch (r) {
      case "\\dfrac":
      case "\\dbinom":
        u = "display";
        break;
      case "\\tfrac":
      case "\\tbinom":
        u = "text";
        break;
    }
    return {
      type: "genfrac",
      mode: t.mode,
      continued: !1,
      numer: n,
      denom: o,
      hasBarLine: c,
      leftDelim: s,
      rightDelim: a,
      size: u,
      barSize: null
    };
  },
  htmlBuilder: xn,
  mathmlBuilder: kn
});
he({
  type: "genfrac",
  names: ["\\cfrac"],
  props: {
    numArgs: 2
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0], o = e[1];
    return {
      type: "genfrac",
      mode: t.mode,
      continued: !0,
      numer: n,
      denom: o,
      hasBarLine: !0,
      leftDelim: null,
      rightDelim: null,
      size: "display",
      barSize: null
    };
  }
});
he({
  type: "infix",
  names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
  props: {
    numArgs: 0,
    infix: !0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t,
      token: r
    } = i, n;
    switch (t) {
      case "\\over":
        n = "\\frac";
        break;
      case "\\choose":
        n = "\\binom";
        break;
      case "\\atop":
        n = "\\\\atopfrac";
        break;
      case "\\brace":
        n = "\\\\bracefrac";
        break;
      case "\\brack":
        n = "\\\\brackfrac";
        break;
      default:
        throw new Error("Unrecognized infix genfrac command");
    }
    return {
      type: "infix",
      mode: e.mode,
      replaceWith: n,
      token: r
    };
  }
});
var xa = ["display", "text", "script", "scriptscript"], ka = function(e) {
  var t = null;
  return e.length > 0 && (t = e, t = t === "." ? null : t), t;
};
he({
  type: "genfrac",
  names: ["\\genfrac"],
  props: {
    numArgs: 6,
    allowedInArgument: !0,
    argTypes: ["math", "math", "size", "text", "math", "math"]
  },
  handler(i, e) {
    var {
      parser: t
    } = i, r = e[4], n = e[5], o = Ji(e[0]), c = o.type === "atom" && o.family === "open" ? ka(o.text) : null, s = Ji(e[1]), a = s.type === "atom" && s.family === "close" ? ka(s.text) : null, u = Ce(e[2], "size"), p, f = null;
    u.isBlank ? p = !0 : (f = u.value, p = f.number > 0);
    var g = "auto", v = e[3];
    if (v.type === "ordgroup") {
      if (v.body.length > 0) {
        var C = Ce(v.body[0], "textord");
        g = xa[Number(C.text)];
      }
    } else
      v = Ce(v, "textord"), g = xa[Number(v.text)];
    return {
      type: "genfrac",
      mode: t.mode,
      numer: r,
      denom: n,
      continued: !1,
      hasBarLine: p,
      barSize: f,
      leftDelim: c,
      rightDelim: a,
      size: g
    };
  },
  htmlBuilder: xn,
  mathmlBuilder: kn
});
he({
  type: "infix",
  names: ["\\above"],
  props: {
    numArgs: 1,
    argTypes: ["size"],
    infix: !0
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r,
      token: n
    } = i;
    return {
      type: "infix",
      mode: t.mode,
      replaceWith: "\\\\abovefrac",
      size: Ce(e[0], "size").value,
      token: n
    };
  }
});
he({
  type: "genfrac",
  names: ["\\\\abovefrac"],
  props: {
    numArgs: 3,
    argTypes: ["math", "size", "math"]
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0], o = Sh(Ce(e[1], "infix").size), c = e[2], s = o.number > 0;
    return {
      type: "genfrac",
      mode: t.mode,
      numer: n,
      denom: c,
      continued: !1,
      hasBarLine: s,
      barSize: o,
      leftDelim: null,
      rightDelim: null,
      size: "auto"
    };
  },
  htmlBuilder: xn,
  mathmlBuilder: kn
});
var H0 = (i, e) => {
  var t = e.style, r, n;
  i.type === "supsub" ? (r = i.sup ? Ae(i.sup, e.havingStyle(t.sup()), e) : Ae(i.sub, e.havingStyle(t.sub()), e), n = Ce(i.base, "horizBrace")) : n = Ce(i, "horizBrace");
  var o = Ae(n.base, e.havingBaseStyle(ve.DISPLAY)), c = hr.svgSpan(n, e), s;
  if (n.isOver ? (s = G.makeVList({
    positionType: "firstBaseline",
    children: [{
      type: "elem",
      elem: o
    }, {
      type: "kern",
      size: 0.1
    }, {
      type: "elem",
      elem: c
    }]
  }, e), s.children[0].children[0].children[1].classes.push("svg-align")) : (s = G.makeVList({
    positionType: "bottom",
    positionData: o.depth + 0.1 + c.height,
    children: [{
      type: "elem",
      elem: c
    }, {
      type: "kern",
      size: 0.1
    }, {
      type: "elem",
      elem: o
    }]
  }, e), s.children[0].children[0].children[0].classes.push("svg-align")), r) {
    var a = G.makeSpan(["mord", n.isOver ? "mover" : "munder"], [s], e);
    n.isOver ? s = G.makeVList({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: a
      }, {
        type: "kern",
        size: 0.2
      }, {
        type: "elem",
        elem: r
      }]
    }, e) : s = G.makeVList({
      positionType: "bottom",
      positionData: a.depth + 0.2 + r.height + r.depth,
      children: [{
        type: "elem",
        elem: r
      }, {
        type: "kern",
        size: 0.2
      }, {
        type: "elem",
        elem: a
      }]
    }, e);
  }
  return G.makeSpan(["mord", n.isOver ? "mover" : "munder"], [s], e);
}, Vc = (i, e) => {
  var t = hr.mathMLnode(i.label);
  return new te.MathNode(i.isOver ? "mover" : "munder", [Re(i.base, e), t]);
};
he({
  type: "horizBrace",
  names: ["\\overbrace", "\\underbrace"],
  props: {
    numArgs: 1
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i;
    return {
      type: "horizBrace",
      mode: t.mode,
      label: r,
      isOver: /^\\over/.test(r),
      base: e[0]
    };
  },
  htmlBuilder: H0,
  mathmlBuilder: Vc
});
he({
  type: "href",
  names: ["\\href"],
  props: {
    numArgs: 2,
    argTypes: ["url", "original"],
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i, r = e[1], n = Ce(e[0], "url").url;
    return t.settings.isTrusted({
      command: "\\href",
      url: n
    }) ? {
      type: "href",
      mode: t.mode,
      href: n,
      body: Ue(r)
    } : t.formatUnsupportedCmd("\\href");
  },
  htmlBuilder: (i, e) => {
    var t = je(i.body, e, !1);
    return G.makeAnchor(i.href, [], t, e);
  },
  mathmlBuilder: (i, e) => {
    var t = br(i.body, e);
    return t instanceof vt || (t = new vt("mrow", [t])), t.setAttribute("href", i.href), t;
  }
});
he({
  type: "href",
  names: ["\\url"],
  props: {
    numArgs: 1,
    argTypes: ["url"],
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i, r = Ce(e[0], "url").url;
    if (!t.settings.isTrusted({
      command: "\\url",
      url: r
    }))
      return t.formatUnsupportedCmd("\\url");
    for (var n = [], o = 0; o < r.length; o++) {
      var c = r[o];
      c === "~" && (c = "\\textasciitilde"), n.push({
        type: "textord",
        mode: "text",
        text: c
      });
    }
    var s = {
      type: "text",
      mode: t.mode,
      font: "\\texttt",
      body: n
    };
    return {
      type: "href",
      mode: t.mode,
      href: r,
      body: Ue(s)
    };
  }
});
he({
  type: "hbox",
  names: ["\\hbox"],
  props: {
    numArgs: 1,
    argTypes: ["text"],
    allowedInText: !0,
    primitive: !0
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "hbox",
      mode: t.mode,
      body: Ue(e[0])
    };
  },
  htmlBuilder(i, e) {
    var t = je(i.body, e, !1);
    return G.makeFragment(t);
  },
  mathmlBuilder(i, e) {
    return new te.MathNode("mrow", lt(i.body, e));
  }
});
he({
  type: "html",
  names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"],
  props: {
    numArgs: 2,
    argTypes: ["raw", "original"],
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r,
      token: n
    } = i, o = Ce(e[0], "raw").string, c = e[1];
    t.settings.strict && t.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
    var s, a = {};
    switch (r) {
      case "\\htmlClass":
        a.class = o, s = {
          command: "\\htmlClass",
          class: o
        };
        break;
      case "\\htmlId":
        a.id = o, s = {
          command: "\\htmlId",
          id: o
        };
        break;
      case "\\htmlStyle":
        a.style = o, s = {
          command: "\\htmlStyle",
          style: o
        };
        break;
      case "\\htmlData": {
        for (var u = o.split(","), p = 0; p < u.length; p++) {
          var f = u[p].split("=");
          if (f.length !== 2)
            throw new ie("Error parsing key-value for \\htmlData");
          a["data-" + f[0].trim()] = f[1].trim();
        }
        s = {
          command: "\\htmlData",
          attributes: a
        };
        break;
      }
      default:
        throw new Error("Unrecognized html command");
    }
    return t.settings.isTrusted(s) ? {
      type: "html",
      mode: t.mode,
      attributes: a,
      body: Ue(c)
    } : t.formatUnsupportedCmd(r);
  },
  htmlBuilder: (i, e) => {
    var t = je(i.body, e, !1), r = ["enclosing"];
    i.attributes.class && r.push(...i.attributes.class.trim().split(/\s+/));
    var n = G.makeSpan(r, t, e);
    for (var o in i.attributes)
      o !== "class" && i.attributes.hasOwnProperty(o) && n.setAttribute(o, i.attributes[o]);
    return n;
  },
  mathmlBuilder: (i, e) => br(i.body, e)
});
he({
  type: "htmlmathml",
  names: ["\\html@mathml"],
  props: {
    numArgs: 2,
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i;
    return {
      type: "htmlmathml",
      mode: t.mode,
      html: Ue(e[0]),
      mathml: Ue(e[1])
    };
  },
  htmlBuilder: (i, e) => {
    var t = je(i.html, e, !1);
    return G.makeFragment(t);
  },
  mathmlBuilder: (i, e) => br(i.mathml, e)
});
var xs = function(e) {
  if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))
    return {
      number: +e,
      unit: "bp"
    };
  var t = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);
  if (!t)
    throw new ie("Invalid size: '" + e + "' in \\includegraphics");
  var r = {
    number: +(t[1] + t[2]),
    // sign + magnitude, cast to number
    unit: t[3]
  };
  if (!s0(r))
    throw new ie("Invalid unit: '" + r.unit + "' in \\includegraphics.");
  return r;
};
he({
  type: "includegraphics",
  names: ["\\includegraphics"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    argTypes: ["raw", "url"],
    allowedInText: !1
  },
  handler: (i, e, t) => {
    var {
      parser: r
    } = i, n = {
      number: 0,
      unit: "em"
    }, o = {
      number: 0.9,
      unit: "em"
    }, c = {
      number: 0,
      unit: "em"
    }, s = "";
    if (t[0])
      for (var a = Ce(t[0], "raw").string, u = a.split(","), p = 0; p < u.length; p++) {
        var f = u[p].split("=");
        if (f.length === 2) {
          var g = f[1].trim();
          switch (f[0].trim()) {
            case "alt":
              s = g;
              break;
            case "width":
              n = xs(g);
              break;
            case "height":
              o = xs(g);
              break;
            case "totalheight":
              c = xs(g);
              break;
            default:
              throw new ie("Invalid key: '" + f[0] + "' in \\includegraphics.");
          }
        }
      }
    var v = Ce(e[0], "url").url;
    return s === "" && (s = v, s = s.replace(/^.*[\\/]/, ""), s = s.substring(0, s.lastIndexOf("."))), r.settings.isTrusted({
      command: "\\includegraphics",
      url: v
    }) ? {
      type: "includegraphics",
      mode: r.mode,
      alt: s,
      width: n,
      height: o,
      totalheight: c,
      src: v
    } : r.formatUnsupportedCmd("\\includegraphics");
  },
  htmlBuilder: (i, e) => {
    var t = ze(i.height, e), r = 0;
    i.totalheight.number > 0 && (r = ze(i.totalheight, e) - t);
    var n = 0;
    i.width.number > 0 && (n = ze(i.width, e));
    var o = {
      height: le(t + r)
    };
    n > 0 && (o.width = le(n)), r > 0 && (o.verticalAlign = le(-r));
    var c = new Vh(i.src, i.alt, o);
    return c.height = t, c.depth = r, c;
  },
  mathmlBuilder: (i, e) => {
    var t = new te.MathNode("mglyph", []);
    t.setAttribute("alt", i.alt);
    var r = ze(i.height, e), n = 0;
    if (i.totalheight.number > 0 && (n = ze(i.totalheight, e) - r, t.setAttribute("valign", le(-n))), t.setAttribute("height", le(r + n)), i.width.number > 0) {
      var o = ze(i.width, e);
      t.setAttribute("width", le(o));
    }
    return t.setAttribute("src", i.src), t;
  }
});
he({
  type: "kern",
  names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
  props: {
    numArgs: 1,
    argTypes: ["size"],
    primitive: !0,
    allowedInText: !0
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i, n = Ce(e[0], "size");
    if (t.settings.strict) {
      var o = r[1] === "m", c = n.value.unit === "mu";
      o ? (c || t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " supports only mu units, " + ("not " + n.value.unit + " units")), t.mode !== "math" && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " works only in math mode")) : c && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " doesn't support mu units");
    }
    return {
      type: "kern",
      mode: t.mode,
      dimension: n.value
    };
  },
  htmlBuilder(i, e) {
    return G.makeGlue(i.dimension, e);
  },
  mathmlBuilder(i, e) {
    var t = ze(i.dimension, e);
    return new te.SpaceNode(t);
  }
});
he({
  type: "lap",
  names: ["\\mathllap", "\\mathrlap", "\\mathclap"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0];
    return {
      type: "lap",
      mode: t.mode,
      alignment: r.slice(5),
      body: n
    };
  },
  htmlBuilder: (i, e) => {
    var t;
    i.alignment === "clap" ? (t = G.makeSpan([], [Ae(i.body, e)]), t = G.makeSpan(["inner"], [t], e)) : t = G.makeSpan(["inner"], [Ae(i.body, e)]);
    var r = G.makeSpan(["fix"], []), n = G.makeSpan([i.alignment], [t, r], e), o = G.makeSpan(["strut"]);
    return o.style.height = le(n.height + n.depth), n.depth && (o.style.verticalAlign = le(-n.depth)), n.children.unshift(o), n = G.makeSpan(["thinbox"], [n], e), G.makeSpan(["mord", "vbox"], [n], e);
  },
  mathmlBuilder: (i, e) => {
    var t = new te.MathNode("mpadded", [Re(i.body, e)]);
    if (i.alignment !== "rlap") {
      var r = i.alignment === "llap" ? "-1" : "-0.5";
      t.setAttribute("lspace", r + "width");
    }
    return t.setAttribute("width", "0px"), t;
  }
});
he({
  type: "styling",
  names: ["\\(", "$"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    allowedInMath: !1
  },
  handler(i, e) {
    var {
      funcName: t,
      parser: r
    } = i, n = r.mode;
    r.switchMode("math");
    var o = t === "\\(" ? "\\)" : "$", c = r.parseExpression(!1, o);
    return r.expect(o), r.switchMode(n), {
      type: "styling",
      mode: r.mode,
      style: "text",
      body: c
    };
  }
});
he({
  type: "text",
  // Doesn't matter what this is.
  names: ["\\)", "\\]"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    allowedInMath: !1
  },
  handler(i, e) {
    throw new ie("Mismatched " + i.funcName);
  }
});
var Da = (i, e) => {
  switch (e.style.size) {
    case ve.DISPLAY.size:
      return i.display;
    case ve.TEXT.size:
      return i.text;
    case ve.SCRIPT.size:
      return i.script;
    case ve.SCRIPTSCRIPT.size:
      return i.scriptscript;
    default:
      return i.text;
  }
};
he({
  type: "mathchoice",
  names: ["\\mathchoice"],
  props: {
    numArgs: 4,
    primitive: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i;
    return {
      type: "mathchoice",
      mode: t.mode,
      display: Ue(e[0]),
      text: Ue(e[1]),
      script: Ue(e[2]),
      scriptscript: Ue(e[3])
    };
  },
  htmlBuilder: (i, e) => {
    var t = Da(i, e), r = je(t, e, !1);
    return G.makeFragment(r);
  },
  mathmlBuilder: (i, e) => {
    var t = Da(i, e);
    return br(t, e);
  }
});
var N0 = (i, e, t, r, n, o, c) => {
  i = G.makeSpan([], [i]);
  var s = t && _e.isCharacterBox(t), a, u;
  if (e) {
    var p = Ae(e, r.havingStyle(n.sup()), r);
    u = {
      elem: p,
      kern: Math.max(r.fontMetrics().bigOpSpacing1, r.fontMetrics().bigOpSpacing3 - p.depth)
    };
  }
  if (t) {
    var f = Ae(t, r.havingStyle(n.sub()), r);
    a = {
      elem: f,
      kern: Math.max(r.fontMetrics().bigOpSpacing2, r.fontMetrics().bigOpSpacing4 - f.height)
    };
  }
  var g;
  if (u && a) {
    var v = r.fontMetrics().bigOpSpacing5 + a.elem.height + a.elem.depth + a.kern + i.depth + c;
    g = G.makeVList({
      positionType: "bottom",
      positionData: v,
      children: [{
        type: "kern",
        size: r.fontMetrics().bigOpSpacing5
      }, {
        type: "elem",
        elem: a.elem,
        marginLeft: le(-o)
      }, {
        type: "kern",
        size: a.kern
      }, {
        type: "elem",
        elem: i
      }, {
        type: "kern",
        size: u.kern
      }, {
        type: "elem",
        elem: u.elem,
        marginLeft: le(o)
      }, {
        type: "kern",
        size: r.fontMetrics().bigOpSpacing5
      }]
    }, r);
  } else if (a) {
    var C = i.height - c;
    g = G.makeVList({
      positionType: "top",
      positionData: C,
      children: [{
        type: "kern",
        size: r.fontMetrics().bigOpSpacing5
      }, {
        type: "elem",
        elem: a.elem,
        marginLeft: le(-o)
      }, {
        type: "kern",
        size: a.kern
      }, {
        type: "elem",
        elem: i
      }]
    }, r);
  } else if (u) {
    var b = i.depth + c;
    g = G.makeVList({
      positionType: "bottom",
      positionData: b,
      children: [{
        type: "elem",
        elem: i
      }, {
        type: "kern",
        size: u.kern
      }, {
        type: "elem",
        elem: u.elem,
        marginLeft: le(o)
      }, {
        type: "kern",
        size: r.fontMetrics().bigOpSpacing5
      }]
    }, r);
  } else
    return i;
  var d = [g];
  if (a && o !== 0 && !s) {
    var m = G.makeSpan(["mspace"], [], r);
    m.style.marginRight = le(o), d.unshift(m);
  }
  return G.makeSpan(["mop", "op-limits"], d, r);
}, q0 = ["\\smallint"], Gr = (i, e) => {
  var t, r, n = !1, o;
  i.type === "supsub" ? (t = i.sup, r = i.sub, o = Ce(i.base, "op"), n = !0) : o = Ce(i, "op");
  var c = e.style, s = !1;
  c.size === ve.DISPLAY.size && o.symbol && !_e.contains(q0, o.name) && (s = !0);
  var a;
  if (o.symbol) {
    var u = s ? "Size2-Regular" : "Size1-Regular", p = "";
    if ((o.name === "\\oiint" || o.name === "\\oiiint") && (p = o.name.slice(1), o.name = p === "oiint" ? "\\iint" : "\\iiint"), a = G.makeSymbol(o.name, u, "math", e, ["mop", "op-symbol", s ? "large-op" : "small-op"]), p.length > 0) {
      var f = a.italic, g = G.staticSvg(p + "Size" + (s ? "2" : "1"), e);
      a = G.makeVList({
        positionType: "individualShift",
        children: [{
          type: "elem",
          elem: a,
          shift: 0
        }, {
          type: "elem",
          elem: g,
          shift: s ? 0.08 : 0
        }]
      }, e), o.name = "\\" + p, a.classes.unshift("mop"), a.italic = f;
    }
  } else if (o.body) {
    var v = je(o.body, e, !0);
    v.length === 1 && v[0] instanceof Ct ? (a = v[0], a.classes[0] = "mop") : a = G.makeSpan(["mop"], v, e);
  } else {
    for (var C = [], b = 1; b < o.name.length; b++)
      C.push(G.mathsym(o.name[b], o.mode, e));
    a = G.makeSpan(["mop"], C, e);
  }
  var d = 0, m = 0;
  return (a instanceof Ct || o.name === "\\oiint" || o.name === "\\oiiint") && !o.suppressBaseShift && (d = (a.height - a.depth) / 2 - e.fontMetrics().axisHeight, m = a.italic), n ? N0(a, t, r, e, c, m, d) : (d && (a.style.position = "relative", a.style.top = le(d)), a);
}, fi = (i, e) => {
  var t;
  if (i.symbol)
    t = new vt("mo", [xt(i.name, i.mode)]), _e.contains(q0, i.name) && t.setAttribute("largeop", "false");
  else if (i.body)
    t = new vt("mo", lt(i.body, e));
  else {
    t = new vt("mi", [new si(i.name.slice(1))]);
    var r = new vt("mo", [xt("⁡", "text")]);
    i.parentIsSupSub ? t = new vt("mrow", [t, r]) : t = p0([t, r]);
  }
  return t;
}, Kc = {
  "∏": "\\prod",
  "∐": "\\coprod",
  "∑": "\\sum",
  "⋀": "\\bigwedge",
  "⋁": "\\bigvee",
  "⋂": "\\bigcap",
  "⋃": "\\bigcup",
  "⨀": "\\bigodot",
  "⨁": "\\bigoplus",
  "⨂": "\\bigotimes",
  "⨄": "\\biguplus",
  "⨆": "\\bigsqcup"
};
he({
  type: "op",
  names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "∏", "∐", "∑", "⋀", "⋁", "⋂", "⋃", "⨀", "⨁", "⨂", "⨄", "⨆"],
  props: {
    numArgs: 0
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = r;
    return n.length === 1 && (n = Kc[n]), {
      type: "op",
      mode: t.mode,
      limits: !0,
      parentIsSupSub: !1,
      symbol: !0,
      name: n
    };
  },
  htmlBuilder: Gr,
  mathmlBuilder: fi
});
he({
  type: "op",
  names: ["\\mathop"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i, r = e[0];
    return {
      type: "op",
      mode: t.mode,
      limits: !1,
      parentIsSupSub: !1,
      symbol: !1,
      body: Ue(r)
    };
  },
  htmlBuilder: Gr,
  mathmlBuilder: fi
});
var Xc = {
  "∫": "\\int",
  "∬": "\\iint",
  "∭": "\\iiint",
  "∮": "\\oint",
  "∯": "\\oiint",
  "∰": "\\oiiint"
};
he({
  type: "op",
  names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"],
  props: {
    numArgs: 0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t
    } = i;
    return {
      type: "op",
      mode: e.mode,
      limits: !1,
      parentIsSupSub: !1,
      symbol: !1,
      name: t
    };
  },
  htmlBuilder: Gr,
  mathmlBuilder: fi
});
he({
  type: "op",
  names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
  props: {
    numArgs: 0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t
    } = i;
    return {
      type: "op",
      mode: e.mode,
      limits: !0,
      parentIsSupSub: !1,
      symbol: !1,
      name: t
    };
  },
  htmlBuilder: Gr,
  mathmlBuilder: fi
});
he({
  type: "op",
  names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
  props: {
    numArgs: 0
  },
  handler(i) {
    var {
      parser: e,
      funcName: t
    } = i, r = t;
    return r.length === 1 && (r = Xc[r]), {
      type: "op",
      mode: e.mode,
      limits: !1,
      parentIsSupSub: !1,
      symbol: !0,
      name: r
    };
  },
  htmlBuilder: Gr,
  mathmlBuilder: fi
});
var U0 = (i, e) => {
  var t, r, n = !1, o;
  i.type === "supsub" ? (t = i.sup, r = i.sub, o = Ce(i.base, "operatorname"), n = !0) : o = Ce(i, "operatorname");
  var c;
  if (o.body.length > 0) {
    for (var s = o.body.map((f) => {
      var g = f.text;
      return typeof g == "string" ? {
        type: "textord",
        mode: f.mode,
        text: g
      } : f;
    }), a = je(s, e.withFont("mathrm"), !0), u = 0; u < a.length; u++) {
      var p = a[u];
      p instanceof Ct && (p.text = p.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
    }
    c = G.makeSpan(["mop"], a, e);
  } else
    c = G.makeSpan(["mop"], [], e);
  return n ? N0(c, t, r, e, e.style, 0, 0) : c;
}, Yc = (i, e) => {
  for (var t = lt(i.body, e.withFont("mathrm")), r = !0, n = 0; n < t.length; n++) {
    var o = t[n];
    if (!(o instanceof te.SpaceNode)) if (o instanceof te.MathNode)
      switch (o.type) {
        case "mi":
        case "mn":
        case "ms":
        case "mspace":
        case "mtext":
          break;
        case "mo": {
          var c = o.children[0];
          o.children.length === 1 && c instanceof te.TextNode ? c.text = c.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : r = !1;
          break;
        }
        default:
          r = !1;
      }
    else
      r = !1;
  }
  if (r) {
    var s = t.map((p) => p.toText()).join("");
    t = [new te.TextNode(s)];
  }
  var a = new te.MathNode("mi", t);
  a.setAttribute("mathvariant", "normal");
  var u = new te.MathNode("mo", [xt("⁡", "text")]);
  return i.parentIsSupSub ? new te.MathNode("mrow", [a, u]) : te.newDocumentFragment([a, u]);
};
he({
  type: "operatorname",
  names: ["\\operatorname@", "\\operatornamewithlimits"],
  props: {
    numArgs: 1
  },
  handler: (i, e) => {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0];
    return {
      type: "operatorname",
      mode: t.mode,
      body: Ue(n),
      alwaysHandleSupSub: r === "\\operatornamewithlimits",
      limits: !1,
      parentIsSupSub: !1
    };
  },
  htmlBuilder: U0,
  mathmlBuilder: Yc
});
M("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@");
Ar({
  type: "ordgroup",
  htmlBuilder(i, e) {
    return i.semisimple ? G.makeFragment(je(i.body, e, !1)) : G.makeSpan(["mord"], je(i.body, e, !0), e);
  },
  mathmlBuilder(i, e) {
    return br(i.body, e, !0);
  }
});
he({
  type: "overline",
  names: ["\\overline"],
  props: {
    numArgs: 1
  },
  handler(i, e) {
    var {
      parser: t
    } = i, r = e[0];
    return {
      type: "overline",
      mode: t.mode,
      body: r
    };
  },
  htmlBuilder(i, e) {
    var t = Ae(i.body, e.havingCrampedStyle()), r = G.makeLineSpan("overline-line", e), n = e.fontMetrics().defaultRuleThickness, o = G.makeVList({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: t
      }, {
        type: "kern",
        size: 3 * n
      }, {
        type: "elem",
        elem: r
      }, {
        type: "kern",
        size: n
      }]
    }, e);
    return G.makeSpan(["mord", "overline"], [o], e);
  },
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mo", [new te.TextNode("‾")]);
    t.setAttribute("stretchy", "true");
    var r = new te.MathNode("mover", [Re(i.body, e), t]);
    return r.setAttribute("accent", "true"), r;
  }
});
he({
  type: "phantom",
  names: ["\\phantom"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i, r = e[0];
    return {
      type: "phantom",
      mode: t.mode,
      body: Ue(r)
    };
  },
  htmlBuilder: (i, e) => {
    var t = je(i.body, e.withPhantom(), !1);
    return G.makeFragment(t);
  },
  mathmlBuilder: (i, e) => {
    var t = lt(i.body, e);
    return new te.MathNode("mphantom", t);
  }
});
he({
  type: "hphantom",
  names: ["\\hphantom"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i, r = e[0];
    return {
      type: "hphantom",
      mode: t.mode,
      body: r
    };
  },
  htmlBuilder: (i, e) => {
    var t = G.makeSpan([], [Ae(i.body, e.withPhantom())]);
    if (t.height = 0, t.depth = 0, t.children)
      for (var r = 0; r < t.children.length; r++)
        t.children[r].height = 0, t.children[r].depth = 0;
    return t = G.makeVList({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: t
      }]
    }, e), G.makeSpan(["mord"], [t], e);
  },
  mathmlBuilder: (i, e) => {
    var t = lt(Ue(i.body), e), r = new te.MathNode("mphantom", t), n = new te.MathNode("mpadded", [r]);
    return n.setAttribute("height", "0px"), n.setAttribute("depth", "0px"), n;
  }
});
he({
  type: "vphantom",
  names: ["\\vphantom"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      parser: t
    } = i, r = e[0];
    return {
      type: "vphantom",
      mode: t.mode,
      body: r
    };
  },
  htmlBuilder: (i, e) => {
    var t = G.makeSpan(["inner"], [Ae(i.body, e.withPhantom())]), r = G.makeSpan(["fix"], []);
    return G.makeSpan(["mord", "rlap"], [t, r], e);
  },
  mathmlBuilder: (i, e) => {
    var t = lt(Ue(i.body), e), r = new te.MathNode("mphantom", t), n = new te.MathNode("mpadded", [r]);
    return n.setAttribute("width", "0px"), n;
  }
});
he({
  type: "raisebox",
  names: ["\\raisebox"],
  props: {
    numArgs: 2,
    argTypes: ["size", "hbox"],
    allowedInText: !0
  },
  handler(i, e) {
    var {
      parser: t
    } = i, r = Ce(e[0], "size").value, n = e[1];
    return {
      type: "raisebox",
      mode: t.mode,
      dy: r,
      body: n
    };
  },
  htmlBuilder(i, e) {
    var t = Ae(i.body, e), r = ze(i.dy, e);
    return G.makeVList({
      positionType: "shift",
      positionData: -r,
      children: [{
        type: "elem",
        elem: t
      }]
    }, e);
  },
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mpadded", [Re(i.body, e)]), r = i.dy.number + i.dy.unit;
    return t.setAttribute("voffset", r), t;
  }
});
he({
  type: "internal",
  names: ["\\relax"],
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler(i) {
    var {
      parser: e
    } = i;
    return {
      type: "internal",
      mode: e.mode
    };
  }
});
he({
  type: "rule",
  names: ["\\rule"],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    argTypes: ["size", "size", "size"]
  },
  handler(i, e, t) {
    var {
      parser: r
    } = i, n = t[0], o = Ce(e[0], "size"), c = Ce(e[1], "size");
    return {
      type: "rule",
      mode: r.mode,
      shift: n && Ce(n, "size").value,
      width: o.value,
      height: c.value
    };
  },
  htmlBuilder(i, e) {
    var t = G.makeSpan(["mord", "rule"], [], e), r = ze(i.width, e), n = ze(i.height, e), o = i.shift ? ze(i.shift, e) : 0;
    return t.style.borderRightWidth = le(r), t.style.borderTopWidth = le(n), t.style.bottom = le(o), t.width = r, t.height = n + o, t.depth = -o, t.maxFontSize = n * 1.125 * e.sizeMultiplier, t;
  },
  mathmlBuilder(i, e) {
    var t = ze(i.width, e), r = ze(i.height, e), n = i.shift ? ze(i.shift, e) : 0, o = e.color && e.getColor() || "black", c = new te.MathNode("mspace");
    c.setAttribute("mathbackground", o), c.setAttribute("width", le(t)), c.setAttribute("height", le(r));
    var s = new te.MathNode("mpadded", [c]);
    return n >= 0 ? s.setAttribute("height", le(n)) : (s.setAttribute("height", le(n)), s.setAttribute("depth", le(-n))), s.setAttribute("voffset", le(n)), s;
  }
});
function W0(i, e, t) {
  for (var r = je(i, e, !1), n = e.sizeMultiplier / t.sizeMultiplier, o = 0; o < r.length; o++) {
    var c = r[o].classes.indexOf("sizing");
    c < 0 ? Array.prototype.push.apply(r[o].classes, e.sizingClasses(t)) : r[o].classes[c + 1] === "reset-size" + e.size && (r[o].classes[c + 1] = "reset-size" + t.size), r[o].height *= n, r[o].depth *= n;
  }
  return G.makeFragment(r);
}
var Ea = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"], $c = (i, e) => {
  var t = e.havingSize(i.size);
  return W0(i.body, t, e);
};
he({
  type: "sizing",
  names: Ea,
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler: (i, e) => {
    var {
      breakOnTokenText: t,
      funcName: r,
      parser: n
    } = i, o = n.parseExpression(!1, t);
    return {
      type: "sizing",
      mode: n.mode,
      // Figure out what size to use based on the list of functions above
      size: Ea.indexOf(r) + 1,
      body: o
    };
  },
  htmlBuilder: $c,
  mathmlBuilder: (i, e) => {
    var t = e.havingSize(i.size), r = lt(i.body, t), n = new te.MathNode("mstyle", r);
    return n.setAttribute("mathsize", le(t.sizeMultiplier)), n;
  }
});
he({
  type: "smash",
  names: ["\\smash"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    allowedInText: !0
  },
  handler: (i, e, t) => {
    var {
      parser: r
    } = i, n = !1, o = !1, c = t[0] && Ce(t[0], "ordgroup");
    if (c)
      for (var s = "", a = 0; a < c.body.length; ++a) {
        var u = c.body[a];
        if (s = u.text, s === "t")
          n = !0;
        else if (s === "b")
          o = !0;
        else {
          n = !1, o = !1;
          break;
        }
      }
    else
      n = !0, o = !0;
    var p = e[0];
    return {
      type: "smash",
      mode: r.mode,
      body: p,
      smashHeight: n,
      smashDepth: o
    };
  },
  htmlBuilder: (i, e) => {
    var t = G.makeSpan([], [Ae(i.body, e)]);
    if (!i.smashHeight && !i.smashDepth)
      return t;
    if (i.smashHeight && (t.height = 0, t.children))
      for (var r = 0; r < t.children.length; r++)
        t.children[r].height = 0;
    if (i.smashDepth && (t.depth = 0, t.children))
      for (var n = 0; n < t.children.length; n++)
        t.children[n].depth = 0;
    var o = G.makeVList({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: t
      }]
    }, e);
    return G.makeSpan(["mord"], [o], e);
  },
  mathmlBuilder: (i, e) => {
    var t = new te.MathNode("mpadded", [Re(i.body, e)]);
    return i.smashHeight && t.setAttribute("height", "0px"), i.smashDepth && t.setAttribute("depth", "0px"), t;
  }
});
he({
  type: "sqrt",
  names: ["\\sqrt"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler(i, e, t) {
    var {
      parser: r
    } = i, n = t[0], o = e[0];
    return {
      type: "sqrt",
      mode: r.mode,
      body: o,
      index: n
    };
  },
  htmlBuilder(i, e) {
    var t = Ae(i.body, e.havingCrampedStyle());
    t.height === 0 && (t.height = e.fontMetrics().xHeight), t = G.wrapFragment(t, e);
    var r = e.fontMetrics(), n = r.defaultRuleThickness, o = n;
    e.style.id < ve.TEXT.id && (o = e.fontMetrics().xHeight);
    var c = n + o / 4, s = t.height + t.depth + c + n, {
      span: a,
      ruleWidth: u,
      advanceWidth: p
    } = ar.sqrtImage(s, e), f = a.height - u;
    f > t.height + t.depth + c && (c = (c + f - t.height - t.depth) / 2);
    var g = a.height - t.height - c - u;
    t.style.paddingLeft = le(p);
    var v = G.makeVList({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: t,
        wrapperClasses: ["svg-align"]
      }, {
        type: "kern",
        size: -(t.height + g)
      }, {
        type: "elem",
        elem: a
      }, {
        type: "kern",
        size: u
      }]
    }, e);
    if (i.index) {
      var C = e.havingStyle(ve.SCRIPTSCRIPT), b = Ae(i.index, C, e), d = 0.6 * (v.height - v.depth), m = G.makeVList({
        positionType: "shift",
        positionData: -d,
        children: [{
          type: "elem",
          elem: b
        }]
      }, e), h = G.makeSpan(["root"], [m]);
      return G.makeSpan(["mord", "sqrt"], [h, v], e);
    } else
      return G.makeSpan(["mord", "sqrt"], [v], e);
  },
  mathmlBuilder(i, e) {
    var {
      body: t,
      index: r
    } = i;
    return r ? new te.MathNode("mroot", [Re(t, e), Re(r, e)]) : new te.MathNode("msqrt", [Re(t, e)]);
  }
});
var Aa = {
  display: ve.DISPLAY,
  text: ve.TEXT,
  script: ve.SCRIPT,
  scriptscript: ve.SCRIPTSCRIPT
};
he({
  type: "styling",
  names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(i, e) {
    var {
      breakOnTokenText: t,
      funcName: r,
      parser: n
    } = i, o = n.parseExpression(!0, t), c = r.slice(1, r.length - 5);
    return {
      type: "styling",
      mode: n.mode,
      // Figure out what style to use by pulling out the style from
      // the function name
      style: c,
      body: o
    };
  },
  htmlBuilder(i, e) {
    var t = Aa[i.style], r = e.havingStyle(t).withFont("");
    return W0(i.body, r, e);
  },
  mathmlBuilder(i, e) {
    var t = Aa[i.style], r = e.havingStyle(t), n = lt(i.body, r), o = new te.MathNode("mstyle", n), c = {
      display: ["0", "true"],
      text: ["0", "false"],
      script: ["1", "false"],
      scriptscript: ["2", "false"]
    }, s = c[i.style];
    return o.setAttribute("scriptlevel", s[0]), o.setAttribute("displaystyle", s[1]), o;
  }
});
var Zc = function(e, t) {
  var r = e.base;
  if (r)
    if (r.type === "op") {
      var n = r.limits && (t.style.size === ve.DISPLAY.size || r.alwaysHandleSupSub);
      return n ? Gr : null;
    } else if (r.type === "operatorname") {
      var o = r.alwaysHandleSupSub && (t.style.size === ve.DISPLAY.size || r.limits);
      return o ? U0 : null;
    } else {
      if (r.type === "accent")
        return _e.isCharacterBox(r.base) ? vn : null;
      if (r.type === "horizBrace") {
        var c = !e.sub;
        return c === r.isOver ? H0 : null;
      } else
        return null;
    }
  else return null;
};
Ar({
  type: "supsub",
  htmlBuilder(i, e) {
    var t = Zc(i, e);
    if (t)
      return t(i, e);
    var {
      base: r,
      sup: n,
      sub: o
    } = i, c = Ae(r, e), s, a, u = e.fontMetrics(), p = 0, f = 0, g = r && _e.isCharacterBox(r);
    if (n) {
      var v = e.havingStyle(e.style.sup());
      s = Ae(n, v, e), g || (p = c.height - v.fontMetrics().supDrop * v.sizeMultiplier / e.sizeMultiplier);
    }
    if (o) {
      var C = e.havingStyle(e.style.sub());
      a = Ae(o, C, e), g || (f = c.depth + C.fontMetrics().subDrop * C.sizeMultiplier / e.sizeMultiplier);
    }
    var b;
    e.style === ve.DISPLAY ? b = u.sup1 : e.style.cramped ? b = u.sup3 : b = u.sup2;
    var d = e.sizeMultiplier, m = le(0.5 / u.ptPerEm / d), h = null;
    if (a) {
      var l = i.base && i.base.type === "op" && i.base.name && (i.base.name === "\\oiint" || i.base.name === "\\oiiint");
      (c instanceof Ct || l) && (h = le(-c.italic));
    }
    var _;
    if (s && a) {
      p = Math.max(p, b, s.depth + 0.25 * u.xHeight), f = Math.max(f, u.sub2);
      var S = u.defaultRuleThickness, x = 4 * S;
      if (p - s.depth - (a.height - f) < x) {
        f = x - (p - s.depth) + a.height;
        var D = 0.8 * u.xHeight - (p - s.depth);
        D > 0 && (p += D, f -= D);
      }
      var y = [{
        type: "elem",
        elem: a,
        shift: f,
        marginRight: m,
        marginLeft: h
      }, {
        type: "elem",
        elem: s,
        shift: -p,
        marginRight: m
      }];
      _ = G.makeVList({
        positionType: "individualShift",
        children: y
      }, e);
    } else if (a) {
      f = Math.max(f, u.sub1, a.height - 0.8 * u.xHeight);
      var E = [{
        type: "elem",
        elem: a,
        marginLeft: h,
        marginRight: m
      }];
      _ = G.makeVList({
        positionType: "shift",
        positionData: f,
        children: E
      }, e);
    } else if (s)
      p = Math.max(p, b, s.depth + 0.25 * u.xHeight), _ = G.makeVList({
        positionType: "shift",
        positionData: -p,
        children: [{
          type: "elem",
          elem: s,
          marginRight: m
        }]
      }, e);
    else
      throw new Error("supsub must have either sup or sub.");
    var B = Vs(c, "right") || "mord";
    return G.makeSpan([B], [c, G.makeSpan(["msupsub"], [_])], e);
  },
  mathmlBuilder(i, e) {
    var t = !1, r, n;
    i.base && i.base.type === "horizBrace" && (n = !!i.sup, n === i.base.isOver && (t = !0, r = i.base.isOver)), i.base && (i.base.type === "op" || i.base.type === "operatorname") && (i.base.parentIsSupSub = !0);
    var o = [Re(i.base, e)];
    i.sub && o.push(Re(i.sub, e)), i.sup && o.push(Re(i.sup, e));
    var c;
    if (t)
      c = r ? "mover" : "munder";
    else if (i.sub)
      if (i.sup) {
        var u = i.base;
        u && u.type === "op" && u.limits && e.style === ve.DISPLAY || u && u.type === "operatorname" && u.alwaysHandleSupSub && (e.style === ve.DISPLAY || u.limits) ? c = "munderover" : c = "msubsup";
      } else {
        var a = i.base;
        a && a.type === "op" && a.limits && (e.style === ve.DISPLAY || a.alwaysHandleSupSub) || a && a.type === "operatorname" && a.alwaysHandleSupSub && (a.limits || e.style === ve.DISPLAY) ? c = "munder" : c = "msub";
      }
    else {
      var s = i.base;
      s && s.type === "op" && s.limits && (e.style === ve.DISPLAY || s.alwaysHandleSupSub) || s && s.type === "operatorname" && s.alwaysHandleSupSub && (s.limits || e.style === ve.DISPLAY) ? c = "mover" : c = "msup";
    }
    return new te.MathNode(c, o);
  }
});
Ar({
  type: "atom",
  htmlBuilder(i, e) {
    return G.mathsym(i.text, i.mode, e, ["m" + i.family]);
  },
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mo", [xt(i.text, i.mode)]);
    if (i.family === "bin") {
      var r = _n(i, e);
      r === "bold-italic" && t.setAttribute("mathvariant", r);
    } else i.family === "punct" ? t.setAttribute("separator", "true") : (i.family === "open" || i.family === "close") && t.setAttribute("stretchy", "false");
    return t;
  }
});
var j0 = {
  mi: "italic",
  mn: "normal",
  mtext: "normal"
};
Ar({
  type: "mathord",
  htmlBuilder(i, e) {
    return G.makeOrd(i, e, "mathord");
  },
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mi", [xt(i.text, i.mode, e)]), r = _n(i, e) || "italic";
    return r !== j0[t.type] && t.setAttribute("mathvariant", r), t;
  }
});
Ar({
  type: "textord",
  htmlBuilder(i, e) {
    return G.makeOrd(i, e, "textord");
  },
  mathmlBuilder(i, e) {
    var t = xt(i.text, i.mode, e), r = _n(i, e) || "normal", n;
    return i.mode === "text" ? n = new te.MathNode("mtext", [t]) : /[0-9]/.test(i.text) ? n = new te.MathNode("mn", [t]) : i.text === "\\prime" ? n = new te.MathNode("mo", [t]) : n = new te.MathNode("mi", [t]), r !== j0[n.type] && n.setAttribute("mathvariant", r), n;
  }
});
var ks = {
  "\\nobreak": "nobreak",
  "\\allowbreak": "allowbreak"
}, Ds = {
  " ": {},
  "\\ ": {},
  "~": {
    className: "nobreak"
  },
  "\\space": {},
  "\\nobreakspace": {
    className: "nobreak"
  }
};
Ar({
  type: "spacing",
  htmlBuilder(i, e) {
    if (Ds.hasOwnProperty(i.text)) {
      var t = Ds[i.text].className || "";
      if (i.mode === "text") {
        var r = G.makeOrd(i, e, "textord");
        return r.classes.push(t), r;
      } else
        return G.makeSpan(["mspace", t], [G.mathsym(i.text, i.mode, e)], e);
    } else {
      if (ks.hasOwnProperty(i.text))
        return G.makeSpan(["mspace", ks[i.text]], [], e);
      throw new ie('Unknown type of space "' + i.text + '"');
    }
  },
  mathmlBuilder(i, e) {
    var t;
    if (Ds.hasOwnProperty(i.text))
      t = new te.MathNode("mtext", [new te.TextNode(" ")]);
    else {
      if (ks.hasOwnProperty(i.text))
        return new te.MathNode("mspace");
      throw new ie('Unknown type of space "' + i.text + '"');
    }
    return t;
  }
});
var Ta = () => {
  var i = new te.MathNode("mtd", []);
  return i.setAttribute("width", "50%"), i;
};
Ar({
  type: "tag",
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mtable", [new te.MathNode("mtr", [Ta(), new te.MathNode("mtd", [br(i.body, e)]), Ta(), new te.MathNode("mtd", [br(i.tag, e)])])]);
    return t.setAttribute("width", "100%"), t;
  }
});
var Ma = {
  "\\text": void 0,
  "\\textrm": "textrm",
  "\\textsf": "textsf",
  "\\texttt": "texttt",
  "\\textnormal": "textrm"
}, Ba = {
  "\\textbf": "textbf",
  "\\textmd": "textmd"
}, Jc = {
  "\\textit": "textit",
  "\\textup": "textup"
}, Fa = (i, e) => {
  var t = i.font;
  if (t) {
    if (Ma[t])
      return e.withTextFontFamily(Ma[t]);
    if (Ba[t])
      return e.withTextFontWeight(Ba[t]);
    if (t === "\\emph")
      return e.fontShape === "textit" ? e.withTextFontShape("textup") : e.withTextFontShape("textit");
  } else return e;
  return e.withTextFontShape(Jc[t]);
};
he({
  type: "text",
  names: [
    // Font families
    "\\text",
    "\\textrm",
    "\\textsf",
    "\\texttt",
    "\\textnormal",
    // Font weights
    "\\textbf",
    "\\textmd",
    // Font Shapes
    "\\textit",
    "\\textup",
    "\\emph"
  ],
  props: {
    numArgs: 1,
    argTypes: ["text"],
    allowedInArgument: !0,
    allowedInText: !0
  },
  handler(i, e) {
    var {
      parser: t,
      funcName: r
    } = i, n = e[0];
    return {
      type: "text",
      mode: t.mode,
      body: Ue(n),
      font: r
    };
  },
  htmlBuilder(i, e) {
    var t = Fa(i, e), r = je(i.body, t, !0);
    return G.makeSpan(["mord", "text"], r, t);
  },
  mathmlBuilder(i, e) {
    var t = Fa(i, e);
    return br(i.body, t);
  }
});
he({
  type: "underline",
  names: ["\\underline"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "underline",
      mode: t.mode,
      body: e[0]
    };
  },
  htmlBuilder(i, e) {
    var t = Ae(i.body, e), r = G.makeLineSpan("underline-line", e), n = e.fontMetrics().defaultRuleThickness, o = G.makeVList({
      positionType: "top",
      positionData: t.height,
      children: [{
        type: "kern",
        size: n
      }, {
        type: "elem",
        elem: r
      }, {
        type: "kern",
        size: 3 * n
      }, {
        type: "elem",
        elem: t
      }]
    }, e);
    return G.makeSpan(["mord", "underline"], [o], e);
  },
  mathmlBuilder(i, e) {
    var t = new te.MathNode("mo", [new te.TextNode("‾")]);
    t.setAttribute("stretchy", "true");
    var r = new te.MathNode("munder", [Re(i.body, e), t]);
    return r.setAttribute("accentunder", "true"), r;
  }
});
he({
  type: "vcenter",
  names: ["\\vcenter"],
  props: {
    numArgs: 1,
    argTypes: ["original"],
    // In LaTeX, \vcenter can act only on a box.
    allowedInText: !1
  },
  handler(i, e) {
    var {
      parser: t
    } = i;
    return {
      type: "vcenter",
      mode: t.mode,
      body: e[0]
    };
  },
  htmlBuilder(i, e) {
    var t = Ae(i.body, e), r = e.fontMetrics().axisHeight, n = 0.5 * (t.height - r - (t.depth + r));
    return G.makeVList({
      positionType: "shift",
      positionData: n,
      children: [{
        type: "elem",
        elem: t
      }]
    }, e);
  },
  mathmlBuilder(i, e) {
    return new te.MathNode("mpadded", [Re(i.body, e)], ["vcenter"]);
  }
});
he({
  type: "verb",
  names: ["\\verb"],
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler(i, e, t) {
    throw new ie("\\verb ended by end of line instead of matching delimiter");
  },
  htmlBuilder(i, e) {
    for (var t = Ra(i), r = [], n = e.havingStyle(e.style.text()), o = 0; o < t.length; o++) {
      var c = t[o];
      c === "~" && (c = "\\textasciitilde"), r.push(G.makeSymbol(c, "Typewriter-Regular", i.mode, n, ["mord", "texttt"]));
    }
    return G.makeSpan(["mord", "text"].concat(n.sizingClasses(e)), G.tryCombineChars(r), n);
  },
  mathmlBuilder(i, e) {
    var t = new te.TextNode(Ra(i)), r = new te.MathNode("mtext", [t]);
    return r.setAttribute("mathvariant", "monospace"), r;
  }
});
var Ra = (i) => i.body.replace(/ /g, i.star ? "␣" : " "), pr = f0, G0 = `[ \r
	]`, Qc = "\\\\[a-zA-Z@]+", eu = "\\\\[^\uD800-\uDFFF]", tu = "(" + Qc + ")" + G0 + "*", ru = `\\\\(
|[ \r	]+
?)[ \r	]*`, $s = "[̀-ͯ]", iu = new RegExp($s + "+$"), su = "(" + G0 + "+)|" + // whitespace
(ru + "|") + // \whitespace
"([!-\\[\\]-‧‪-퟿豈-]" + // single codepoint
($s + "*") + // ...plus accents
"|[\uD800-\uDBFF][\uDC00-\uDFFF]" + // surrogate pair
($s + "*") + // ...plus accents
"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + // \verb unstarred
("|" + tu) + // \macroName + spaces
("|" + eu + ")");
class La {
  // Category codes. The lexer only supports comment characters (14) for now.
  // MacroExpander additionally distinguishes active (13).
  constructor(e, t) {
    this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(su, "g"), this.catcodes = {
      "%": 14,
      // comment character
      "~": 13
      // active character
    };
  }
  setCatcode(e, t) {
    this.catcodes[e] = t;
  }
  /**
   * This function lexes a single token.
   */
  lex() {
    var e = this.input, t = this.tokenRegex.lastIndex;
    if (t === e.length)
      return new St("EOF", new ct(this, t, t));
    var r = this.tokenRegex.exec(e);
    if (r === null || r.index !== t)
      throw new ie("Unexpected character: '" + e[t] + "'", new St(e[t], new ct(this, t, t + 1)));
    var n = r[6] || r[3] || (r[2] ? "\\ " : " ");
    if (this.catcodes[n] === 14) {
      var o = e.indexOf(`
`, this.tokenRegex.lastIndex);
      return o === -1 ? (this.tokenRegex.lastIndex = e.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = o + 1, this.lex();
    }
    return new St(n, new ct(this, t, this.tokenRegex.lastIndex));
  }
}
class nu {
  /**
   * Both arguments are optional.  The first argument is an object of
   * built-in mappings which never change.  The second argument is an object
   * of initial (global-level) mappings, which will constantly change
   * according to any global/top-level `set`s done.
   */
  constructor(e, t) {
    e === void 0 && (e = {}), t === void 0 && (t = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = t, this.builtins = e, this.undefStack = [];
  }
  /**
   * Start a new nested group, affecting future local `set`s.
   */
  beginGroup() {
    this.undefStack.push({});
  }
  /**
   * End current nested group, restoring values before the group began.
   */
  endGroup() {
    if (this.undefStack.length === 0)
      throw new ie("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");
    var e = this.undefStack.pop();
    for (var t in e)
      e.hasOwnProperty(t) && (e[t] == null ? delete this.current[t] : this.current[t] = e[t]);
  }
  /**
   * Ends all currently nested groups (if any), restoring values before the
   * groups began.  Useful in case of an error in the middle of parsing.
   */
  endGroups() {
    for (; this.undefStack.length > 0; )
      this.endGroup();
  }
  /**
   * Detect whether `name` has a definition.  Equivalent to
   * `get(name) != null`.
   */
  has(e) {
    return this.current.hasOwnProperty(e) || this.builtins.hasOwnProperty(e);
  }
  /**
   * Get the current value of a name, or `undefined` if there is no value.
   *
   * Note: Do not use `if (namespace.get(...))` to detect whether a macro
   * is defined, as the definition may be the empty string which evaluates
   * to `false` in JavaScript.  Use `if (namespace.get(...) != null)` or
   * `if (namespace.has(...))`.
   */
  get(e) {
    return this.current.hasOwnProperty(e) ? this.current[e] : this.builtins[e];
  }
  /**
   * Set the current value of a name, and optionally set it globally too.
   * Local set() sets the current value and (when appropriate) adds an undo
   * operation to the undo stack.  Global set() may change the undo
   * operation at every level, so takes time linear in their number.
   * A value of undefined means to delete existing definitions.
   */
  set(e, t, r) {
    if (r === void 0 && (r = !1), r) {
      for (var n = 0; n < this.undefStack.length; n++)
        delete this.undefStack[n][e];
      this.undefStack.length > 0 && (this.undefStack[this.undefStack.length - 1][e] = t);
    } else {
      var o = this.undefStack[this.undefStack.length - 1];
      o && !o.hasOwnProperty(e) && (o[e] = this.current[e]);
    }
    t == null ? delete this.current[e] : this.current[e] = t;
  }
}
var au = L0;
M("\\noexpand", function(i) {
  var e = i.popToken();
  return i.isExpandable(e.text) && (e.noexpand = !0, e.treatAsRelax = !0), {
    tokens: [e],
    numArgs: 0
  };
});
M("\\expandafter", function(i) {
  var e = i.popToken();
  return i.expandOnce(!0), {
    tokens: [e],
    numArgs: 0
  };
});
M("\\@firstoftwo", function(i) {
  var e = i.consumeArgs(2);
  return {
    tokens: e[0],
    numArgs: 0
  };
});
M("\\@secondoftwo", function(i) {
  var e = i.consumeArgs(2);
  return {
    tokens: e[1],
    numArgs: 0
  };
});
M("\\@ifnextchar", function(i) {
  var e = i.consumeArgs(3);
  i.consumeSpaces();
  var t = i.future();
  return e[0].length === 1 && e[0][0].text === t.text ? {
    tokens: e[1],
    numArgs: 0
  } : {
    tokens: e[2],
    numArgs: 0
  };
});
M("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}");
M("\\TextOrMath", function(i) {
  var e = i.consumeArgs(2);
  return i.mode === "text" ? {
    tokens: e[0],
    numArgs: 0
  } : {
    tokens: e[1],
    numArgs: 0
  };
});
var Oa = {
  0: 0,
  1: 1,
  2: 2,
  3: 3,
  4: 4,
  5: 5,
  6: 6,
  7: 7,
  8: 8,
  9: 9,
  a: 10,
  A: 10,
  b: 11,
  B: 11,
  c: 12,
  C: 12,
  d: 13,
  D: 13,
  e: 14,
  E: 14,
  f: 15,
  F: 15
};
M("\\char", function(i) {
  var e = i.popToken(), t, r = "";
  if (e.text === "'")
    t = 8, e = i.popToken();
  else if (e.text === '"')
    t = 16, e = i.popToken();
  else if (e.text === "`")
    if (e = i.popToken(), e.text[0] === "\\")
      r = e.text.charCodeAt(1);
    else {
      if (e.text === "EOF")
        throw new ie("\\char` missing argument");
      r = e.text.charCodeAt(0);
    }
  else
    t = 10;
  if (t) {
    if (r = Oa[e.text], r == null || r >= t)
      throw new ie("Invalid base-" + t + " digit " + e.text);
    for (var n; (n = Oa[i.future().text]) != null && n < t; )
      r *= t, r += n, i.popToken();
  }
  return "\\@char{" + r + "}";
});
var Dn = (i, e, t) => {
  var r = i.consumeArg().tokens;
  if (r.length !== 1)
    throw new ie("\\newcommand's first argument must be a macro name");
  var n = r[0].text, o = i.isDefined(n);
  if (o && !e)
    throw new ie("\\newcommand{" + n + "} attempting to redefine " + (n + "; use \\renewcommand"));
  if (!o && !t)
    throw new ie("\\renewcommand{" + n + "} when command " + n + " does not yet exist; use \\newcommand");
  var c = 0;
  if (r = i.consumeArg().tokens, r.length === 1 && r[0].text === "[") {
    for (var s = "", a = i.expandNextToken(); a.text !== "]" && a.text !== "EOF"; )
      s += a.text, a = i.expandNextToken();
    if (!s.match(/^\s*[0-9]+\s*$/))
      throw new ie("Invalid number of arguments: " + s);
    c = parseInt(s), r = i.consumeArg().tokens;
  }
  return i.macros.set(n, {
    tokens: r,
    numArgs: c
  }), "";
};
M("\\newcommand", (i) => Dn(i, !1, !0));
M("\\renewcommand", (i) => Dn(i, !0, !1));
M("\\providecommand", (i) => Dn(i, !0, !0));
M("\\message", (i) => {
  var e = i.consumeArgs(1)[0];
  return console.log(e.reverse().map((t) => t.text).join("")), "";
});
M("\\errmessage", (i) => {
  var e = i.consumeArgs(1)[0];
  return console.error(e.reverse().map((t) => t.text).join("")), "";
});
M("\\show", (i) => {
  var e = i.popToken(), t = e.text;
  return console.log(e, i.macros.get(t), pr[t], Oe.math[t], Oe.text[t]), "";
});
M("\\bgroup", "{");
M("\\egroup", "}");
M("~", "\\nobreakspace");
M("\\lq", "`");
M("\\rq", "'");
M("\\aa", "\\r a");
M("\\AA", "\\r A");
M("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}");
M("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");
M("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");
M("ℬ", "\\mathscr{B}");
M("ℰ", "\\mathscr{E}");
M("ℱ", "\\mathscr{F}");
M("ℋ", "\\mathscr{H}");
M("ℐ", "\\mathscr{I}");
M("ℒ", "\\mathscr{L}");
M("ℳ", "\\mathscr{M}");
M("ℛ", "\\mathscr{R}");
M("ℭ", "\\mathfrak{C}");
M("ℌ", "\\mathfrak{H}");
M("ℨ", "\\mathfrak{Z}");
M("\\Bbbk", "\\Bbb{k}");
M("·", "\\cdotp");
M("\\llap", "\\mathllap{\\textrm{#1}}");
M("\\rlap", "\\mathrlap{\\textrm{#1}}");
M("\\clap", "\\mathclap{\\textrm{#1}}");
M("\\mathstrut", "\\vphantom{(}");
M("\\underbar", "\\underline{\\text{#1}}");
M("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');
M("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");
M("\\ne", "\\neq");
M("≠", "\\neq");
M("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");
M("∉", "\\notin");
M("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");
M("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");
M("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");
M("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");
M("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");
M("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");
M("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");
M("⟂", "\\perp");
M("‼", "\\mathclose{!\\mkern-0.8mu!}");
M("∌", "\\notni");
M("⌜", "\\ulcorner");
M("⌝", "\\urcorner");
M("⌞", "\\llcorner");
M("⌟", "\\lrcorner");
M("©", "\\copyright");
M("®", "\\textregistered");
M("️", "\\textregistered");
M("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');
M("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');
M("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');
M("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');
M("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}");
M("⋮", "\\vdots");
M("\\varGamma", "\\mathit{\\Gamma}");
M("\\varDelta", "\\mathit{\\Delta}");
M("\\varTheta", "\\mathit{\\Theta}");
M("\\varLambda", "\\mathit{\\Lambda}");
M("\\varXi", "\\mathit{\\Xi}");
M("\\varPi", "\\mathit{\\Pi}");
M("\\varSigma", "\\mathit{\\Sigma}");
M("\\varUpsilon", "\\mathit{\\Upsilon}");
M("\\varPhi", "\\mathit{\\Phi}");
M("\\varPsi", "\\mathit{\\Psi}");
M("\\varOmega", "\\mathit{\\Omega}");
M("\\substack", "\\begin{subarray}{c}#1\\end{subarray}");
M("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");
M("\\boxed", "\\fbox{$\\displaystyle{#1}$}");
M("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
M("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
M("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
var Ia = {
  ",": "\\dotsc",
  "\\not": "\\dotsb",
  // \keybin@ checks for the following:
  "+": "\\dotsb",
  "=": "\\dotsb",
  "<": "\\dotsb",
  ">": "\\dotsb",
  "-": "\\dotsb",
  "*": "\\dotsb",
  ":": "\\dotsb",
  // Symbols whose definition starts with \DOTSB:
  "\\DOTSB": "\\dotsb",
  "\\coprod": "\\dotsb",
  "\\bigvee": "\\dotsb",
  "\\bigwedge": "\\dotsb",
  "\\biguplus": "\\dotsb",
  "\\bigcap": "\\dotsb",
  "\\bigcup": "\\dotsb",
  "\\prod": "\\dotsb",
  "\\sum": "\\dotsb",
  "\\bigotimes": "\\dotsb",
  "\\bigoplus": "\\dotsb",
  "\\bigodot": "\\dotsb",
  "\\bigsqcup": "\\dotsb",
  "\\And": "\\dotsb",
  "\\longrightarrow": "\\dotsb",
  "\\Longrightarrow": "\\dotsb",
  "\\longleftarrow": "\\dotsb",
  "\\Longleftarrow": "\\dotsb",
  "\\longleftrightarrow": "\\dotsb",
  "\\Longleftrightarrow": "\\dotsb",
  "\\mapsto": "\\dotsb",
  "\\longmapsto": "\\dotsb",
  "\\hookrightarrow": "\\dotsb",
  "\\doteq": "\\dotsb",
  // Symbols whose definition starts with \mathbin:
  "\\mathbin": "\\dotsb",
  // Symbols whose definition starts with \mathrel:
  "\\mathrel": "\\dotsb",
  "\\relbar": "\\dotsb",
  "\\Relbar": "\\dotsb",
  "\\xrightarrow": "\\dotsb",
  "\\xleftarrow": "\\dotsb",
  // Symbols whose definition starts with \DOTSI:
  "\\DOTSI": "\\dotsi",
  "\\int": "\\dotsi",
  "\\oint": "\\dotsi",
  "\\iint": "\\dotsi",
  "\\iiint": "\\dotsi",
  "\\iiiint": "\\dotsi",
  "\\idotsint": "\\dotsi",
  // Symbols whose definition starts with \DOTSX:
  "\\DOTSX": "\\dotsx"
};
M("\\dots", function(i) {
  var e = "\\dotso", t = i.expandAfterFuture().text;
  return t in Ia ? e = Ia[t] : (t.slice(0, 4) === "\\not" || t in Oe.math && _e.contains(["bin", "rel"], Oe.math[t].group)) && (e = "\\dotsb"), e;
});
var En = {
  // \rightdelim@ checks for the following:
  ")": !0,
  "]": !0,
  "\\rbrack": !0,
  "\\}": !0,
  "\\rbrace": !0,
  "\\rangle": !0,
  "\\rceil": !0,
  "\\rfloor": !0,
  "\\rgroup": !0,
  "\\rmoustache": !0,
  "\\right": !0,
  "\\bigr": !0,
  "\\biggr": !0,
  "\\Bigr": !0,
  "\\Biggr": !0,
  // \extra@ also tests for the following:
  $: !0,
  // \extrap@ checks for the following:
  ";": !0,
  ".": !0,
  ",": !0
};
M("\\dotso", function(i) {
  var e = i.future().text;
  return e in En ? "\\ldots\\," : "\\ldots";
});
M("\\dotsc", function(i) {
  var e = i.future().text;
  return e in En && e !== "," ? "\\ldots\\," : "\\ldots";
});
M("\\cdots", function(i) {
  var e = i.future().text;
  return e in En ? "\\@cdots\\," : "\\@cdots";
});
M("\\dotsb", "\\cdots");
M("\\dotsm", "\\cdots");
M("\\dotsi", "\\!\\cdots");
M("\\dotsx", "\\ldots\\,");
M("\\DOTSI", "\\relax");
M("\\DOTSB", "\\relax");
M("\\DOTSX", "\\relax");
M("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");
M("\\,", "\\tmspace+{3mu}{.1667em}");
M("\\thinspace", "\\,");
M("\\>", "\\mskip{4mu}");
M("\\:", "\\tmspace+{4mu}{.2222em}");
M("\\medspace", "\\:");
M("\\;", "\\tmspace+{5mu}{.2777em}");
M("\\thickspace", "\\;");
M("\\!", "\\tmspace-{3mu}{.1667em}");
M("\\negthinspace", "\\!");
M("\\negmedspace", "\\tmspace-{4mu}{.2222em}");
M("\\negthickspace", "\\tmspace-{5mu}{.277em}");
M("\\enspace", "\\kern.5em ");
M("\\enskip", "\\hskip.5em\\relax");
M("\\quad", "\\hskip1em\\relax");
M("\\qquad", "\\hskip2em\\relax");
M("\\tag", "\\@ifstar\\tag@literal\\tag@paren");
M("\\tag@paren", "\\tag@literal{({#1})}");
M("\\tag@literal", (i) => {
  if (i.macros.get("\\df@tag"))
    throw new ie("Multiple \\tag");
  return "\\gdef\\df@tag{\\text{#1}}";
});
M("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");
M("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");
M("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}");
M("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");
M("\\newline", "\\\\\\relax");
M("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
var V0 = le(Wt["Main-Regular"][84][1] - 0.7 * Wt["Main-Regular"][65][1]);
M("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + V0 + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}");
M("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + V0 + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}");
M("\\hspace", "\\@ifstar\\@hspacer\\@hspace");
M("\\@hspace", "\\hskip #1\\relax");
M("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax");
M("\\ordinarycolon", ":");
M("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}");
M("\\dblcolon", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');
M("\\coloneqq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');
M("\\Coloneqq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');
M("\\coloneq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');
M("\\Coloneq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');
M("\\eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');
M("\\Eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');
M("\\eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');
M("\\Eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');
M("\\colonapprox", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');
M("\\Colonapprox", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');
M("\\colonsim", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');
M("\\Colonsim", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');
M("∷", "\\dblcolon");
M("∹", "\\eqcolon");
M("≔", "\\coloneqq");
M("≕", "\\eqqcolon");
M("⩴", "\\Coloneqq");
M("\\ratio", "\\vcentcolon");
M("\\coloncolon", "\\dblcolon");
M("\\colonequals", "\\coloneqq");
M("\\coloncolonequals", "\\Coloneqq");
M("\\equalscolon", "\\eqqcolon");
M("\\equalscoloncolon", "\\Eqqcolon");
M("\\colonminus", "\\coloneq");
M("\\coloncolonminus", "\\Coloneq");
M("\\minuscolon", "\\eqcolon");
M("\\minuscoloncolon", "\\Eqcolon");
M("\\coloncolonapprox", "\\Colonapprox");
M("\\coloncolonsim", "\\Colonsim");
M("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
M("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");
M("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
M("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");
M("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");
M("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}");
M("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}");
M("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}");
M("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}");
M("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}");
M("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}");
M("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}");
M("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}");
M("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}");
M("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}");
M("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}");
M("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}");
M("\\nleqq", "\\html@mathml{\\@nleqq}{≰}");
M("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}");
M("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}");
M("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}");
M("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}");
M("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}");
M("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}");
M("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}");
M("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
M("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}");
M("\\imath", "\\html@mathml{\\@imath}{ı}");
M("\\jmath", "\\html@mathml{\\@jmath}{ȷ}");
M("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");
M("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");
M("⟦", "\\llbracket");
M("⟧", "\\rrbracket");
M("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");
M("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");
M("⦃", "\\lBrace");
M("⦄", "\\rBrace");
M("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");
M("⦵", "\\minuso");
M("\\darr", "\\downarrow");
M("\\dArr", "\\Downarrow");
M("\\Darr", "\\Downarrow");
M("\\lang", "\\langle");
M("\\rang", "\\rangle");
M("\\uarr", "\\uparrow");
M("\\uArr", "\\Uparrow");
M("\\Uarr", "\\Uparrow");
M("\\N", "\\mathbb{N}");
M("\\R", "\\mathbb{R}");
M("\\Z", "\\mathbb{Z}");
M("\\alef", "\\aleph");
M("\\alefsym", "\\aleph");
M("\\Alpha", "\\mathrm{A}");
M("\\Beta", "\\mathrm{B}");
M("\\bull", "\\bullet");
M("\\Chi", "\\mathrm{X}");
M("\\clubs", "\\clubsuit");
M("\\cnums", "\\mathbb{C}");
M("\\Complex", "\\mathbb{C}");
M("\\Dagger", "\\ddagger");
M("\\diamonds", "\\diamondsuit");
M("\\empty", "\\emptyset");
M("\\Epsilon", "\\mathrm{E}");
M("\\Eta", "\\mathrm{H}");
M("\\exist", "\\exists");
M("\\harr", "\\leftrightarrow");
M("\\hArr", "\\Leftrightarrow");
M("\\Harr", "\\Leftrightarrow");
M("\\hearts", "\\heartsuit");
M("\\image", "\\Im");
M("\\infin", "\\infty");
M("\\Iota", "\\mathrm{I}");
M("\\isin", "\\in");
M("\\Kappa", "\\mathrm{K}");
M("\\larr", "\\leftarrow");
M("\\lArr", "\\Leftarrow");
M("\\Larr", "\\Leftarrow");
M("\\lrarr", "\\leftrightarrow");
M("\\lrArr", "\\Leftrightarrow");
M("\\Lrarr", "\\Leftrightarrow");
M("\\Mu", "\\mathrm{M}");
M("\\natnums", "\\mathbb{N}");
M("\\Nu", "\\mathrm{N}");
M("\\Omicron", "\\mathrm{O}");
M("\\plusmn", "\\pm");
M("\\rarr", "\\rightarrow");
M("\\rArr", "\\Rightarrow");
M("\\Rarr", "\\Rightarrow");
M("\\real", "\\Re");
M("\\reals", "\\mathbb{R}");
M("\\Reals", "\\mathbb{R}");
M("\\Rho", "\\mathrm{P}");
M("\\sdot", "\\cdot");
M("\\sect", "\\S");
M("\\spades", "\\spadesuit");
M("\\sub", "\\subset");
M("\\sube", "\\subseteq");
M("\\supe", "\\supseteq");
M("\\Tau", "\\mathrm{T}");
M("\\thetasym", "\\vartheta");
M("\\weierp", "\\wp");
M("\\Zeta", "\\mathrm{Z}");
M("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}");
M("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}");
M("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits");
M("\\bra", "\\mathinner{\\langle{#1}|}");
M("\\ket", "\\mathinner{|{#1}\\rangle}");
M("\\braket", "\\mathinner{\\langle{#1}\\rangle}");
M("\\Bra", "\\left\\langle#1\\right|");
M("\\Ket", "\\left|#1\\right\\rangle");
var K0 = (i) => (e) => {
  var t = e.consumeArg().tokens, r = e.consumeArg().tokens, n = e.consumeArg().tokens, o = e.consumeArg().tokens, c = e.macros.get("|"), s = e.macros.get("\\|");
  e.macros.beginGroup();
  var a = (f) => (g) => {
    i && (g.macros.set("|", c), n.length && g.macros.set("\\|", s));
    var v = f;
    if (!f && n.length) {
      var C = g.future();
      C.text === "|" && (g.popToken(), v = !0);
    }
    return {
      tokens: v ? n : r,
      numArgs: 0
    };
  };
  e.macros.set("|", a(!1)), n.length && e.macros.set("\\|", a(!0));
  var u = e.consumeArg().tokens, p = e.expandTokens([
    ...o,
    ...u,
    ...t
    // reversed
  ]);
  return e.macros.endGroup(), {
    tokens: p.reverse(),
    numArgs: 0
  };
};
M("\\bra@ket", K0(!1));
M("\\bra@set", K0(!0));
M("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");
M("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");
M("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");
M("\\angln", "{\\angl n}");
M("\\blue", "\\textcolor{##6495ed}{#1}");
M("\\orange", "\\textcolor{##ffa500}{#1}");
M("\\pink", "\\textcolor{##ff00af}{#1}");
M("\\red", "\\textcolor{##df0030}{#1}");
M("\\green", "\\textcolor{##28ae7b}{#1}");
M("\\gray", "\\textcolor{gray}{#1}");
M("\\purple", "\\textcolor{##9d38bd}{#1}");
M("\\blueA", "\\textcolor{##ccfaff}{#1}");
M("\\blueB", "\\textcolor{##80f6ff}{#1}");
M("\\blueC", "\\textcolor{##63d9ea}{#1}");
M("\\blueD", "\\textcolor{##11accd}{#1}");
M("\\blueE", "\\textcolor{##0c7f99}{#1}");
M("\\tealA", "\\textcolor{##94fff5}{#1}");
M("\\tealB", "\\textcolor{##26edd5}{#1}");
M("\\tealC", "\\textcolor{##01d1c1}{#1}");
M("\\tealD", "\\textcolor{##01a995}{#1}");
M("\\tealE", "\\textcolor{##208170}{#1}");
M("\\greenA", "\\textcolor{##b6ffb0}{#1}");
M("\\greenB", "\\textcolor{##8af281}{#1}");
M("\\greenC", "\\textcolor{##74cf70}{#1}");
M("\\greenD", "\\textcolor{##1fab54}{#1}");
M("\\greenE", "\\textcolor{##0d923f}{#1}");
M("\\goldA", "\\textcolor{##ffd0a9}{#1}");
M("\\goldB", "\\textcolor{##ffbb71}{#1}");
M("\\goldC", "\\textcolor{##ff9c39}{#1}");
M("\\goldD", "\\textcolor{##e07d10}{#1}");
M("\\goldE", "\\textcolor{##a75a05}{#1}");
M("\\redA", "\\textcolor{##fca9a9}{#1}");
M("\\redB", "\\textcolor{##ff8482}{#1}");
M("\\redC", "\\textcolor{##f9685d}{#1}");
M("\\redD", "\\textcolor{##e84d39}{#1}");
M("\\redE", "\\textcolor{##bc2612}{#1}");
M("\\maroonA", "\\textcolor{##ffbde0}{#1}");
M("\\maroonB", "\\textcolor{##ff92c6}{#1}");
M("\\maroonC", "\\textcolor{##ed5fa6}{#1}");
M("\\maroonD", "\\textcolor{##ca337c}{#1}");
M("\\maroonE", "\\textcolor{##9e034e}{#1}");
M("\\purpleA", "\\textcolor{##ddd7ff}{#1}");
M("\\purpleB", "\\textcolor{##c6b9fc}{#1}");
M("\\purpleC", "\\textcolor{##aa87ff}{#1}");
M("\\purpleD", "\\textcolor{##7854ab}{#1}");
M("\\purpleE", "\\textcolor{##543b78}{#1}");
M("\\mintA", "\\textcolor{##f5f9e8}{#1}");
M("\\mintB", "\\textcolor{##edf2df}{#1}");
M("\\mintC", "\\textcolor{##e0e5cc}{#1}");
M("\\grayA", "\\textcolor{##f6f7f7}{#1}");
M("\\grayB", "\\textcolor{##f0f1f2}{#1}");
M("\\grayC", "\\textcolor{##e3e5e6}{#1}");
M("\\grayD", "\\textcolor{##d6d8da}{#1}");
M("\\grayE", "\\textcolor{##babec2}{#1}");
M("\\grayF", "\\textcolor{##888d93}{#1}");
M("\\grayG", "\\textcolor{##626569}{#1}");
M("\\grayH", "\\textcolor{##3b3e40}{#1}");
M("\\grayI", "\\textcolor{##21242c}{#1}");
M("\\kaBlue", "\\textcolor{##314453}{#1}");
M("\\kaGreen", "\\textcolor{##71B307}{#1}");
var X0 = {
  "^": !0,
  // Parser.js
  _: !0,
  // Parser.js
  "\\limits": !0,
  // Parser.js
  "\\nolimits": !0
  // Parser.js
};
class ou {
  constructor(e, t, r) {
    this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new nu(au, t.macros), this.mode = r, this.stack = [];
  }
  /**
   * Feed a new input string to the same MacroExpander
   * (with existing macros etc.).
   */
  feed(e) {
    this.lexer = new La(e, this.settings);
  }
  /**
   * Switches between "text" and "math" modes.
   */
  switchMode(e) {
    this.mode = e;
  }
  /**
   * Start a new group nesting within all namespaces.
   */
  beginGroup() {
    this.macros.beginGroup();
  }
  /**
   * End current group nesting within all namespaces.
   */
  endGroup() {
    this.macros.endGroup();
  }
  /**
   * Ends all currently nested groups (if any), restoring values before the
   * groups began.  Useful in case of an error in the middle of parsing.
   */
  endGroups() {
    this.macros.endGroups();
  }
  /**
   * Returns the topmost token on the stack, without expanding it.
   * Similar in behavior to TeX's `\futurelet`.
   */
  future() {
    return this.stack.length === 0 && this.pushToken(this.lexer.lex()), this.stack[this.stack.length - 1];
  }
  /**
   * Remove and return the next unexpanded token.
   */
  popToken() {
    return this.future(), this.stack.pop();
  }
  /**
   * Add a given token to the token stack.  In particular, this get be used
   * to put back a token returned from one of the other methods.
   */
  pushToken(e) {
    this.stack.push(e);
  }
  /**
   * Append an array of tokens to the token stack.
   */
  pushTokens(e) {
    this.stack.push(...e);
  }
  /**
   * Find an macro argument without expanding tokens and append the array of
   * tokens to the token stack. Uses Token as a container for the result.
   */
  scanArgument(e) {
    var t, r, n;
    if (e) {
      if (this.consumeSpaces(), this.future().text !== "[")
        return null;
      t = this.popToken(), {
        tokens: n,
        end: r
      } = this.consumeArg(["]"]);
    } else
      ({
        tokens: n,
        start: t,
        end: r
      } = this.consumeArg());
    return this.pushToken(new St("EOF", r.loc)), this.pushTokens(n), t.range(r, "");
  }
  /**
   * Consume all following space tokens, without expansion.
   */
  consumeSpaces() {
    for (; ; ) {
      var e = this.future();
      if (e.text === " ")
        this.stack.pop();
      else
        break;
    }
  }
  /**
   * Consume an argument from the token stream, and return the resulting array
   * of tokens and start/end token.
   */
  consumeArg(e) {
    var t = [], r = e && e.length > 0;
    r || this.consumeSpaces();
    var n = this.future(), o, c = 0, s = 0;
    do {
      if (o = this.popToken(), t.push(o), o.text === "{")
        ++c;
      else if (o.text === "}") {
        if (--c, c === -1)
          throw new ie("Extra }", o);
      } else if (o.text === "EOF")
        throw new ie("Unexpected end of input in a macro argument, expected '" + (e && r ? e[s] : "}") + "'", o);
      if (e && r)
        if ((c === 0 || c === 1 && e[s] === "{") && o.text === e[s]) {
          if (++s, s === e.length) {
            t.splice(-s, s);
            break;
          }
        } else
          s = 0;
    } while (c !== 0 || r);
    return n.text === "{" && t[t.length - 1].text === "}" && (t.pop(), t.shift()), t.reverse(), {
      tokens: t,
      start: n,
      end: o
    };
  }
  /**
   * Consume the specified number of (delimited) arguments from the token
   * stream and return the resulting array of arguments.
   */
  consumeArgs(e, t) {
    if (t) {
      if (t.length !== e + 1)
        throw new ie("The length of delimiters doesn't match the number of args!");
      for (var r = t[0], n = 0; n < r.length; n++) {
        var o = this.popToken();
        if (r[n] !== o.text)
          throw new ie("Use of the macro doesn't match its definition", o);
      }
    }
    for (var c = [], s = 0; s < e; s++)
      c.push(this.consumeArg(t && t[s + 1]).tokens);
    return c;
  }
  /**
   * Increment `expansionCount` by the specified amount.
   * Throw an error if it exceeds `maxExpand`.
   */
  countExpansion(e) {
    if (this.expansionCount += e, this.expansionCount > this.settings.maxExpand)
      throw new ie("Too many expansions: infinite loop or need to increase maxExpand setting");
  }
  /**
   * Expand the next token only once if possible.
   *
   * If the token is expanded, the resulting tokens will be pushed onto
   * the stack in reverse order, and the number of such tokens will be
   * returned.  This number might be zero or positive.
   *
   * If not, the return value is `false`, and the next token remains at the
   * top of the stack.
   *
   * In either case, the next token will be on the top of the stack,
   * or the stack will be empty (in case of empty expansion
   * and no other tokens).
   *
   * Used to implement `expandAfterFuture` and `expandNextToken`.
   *
   * If expandableOnly, only expandable tokens are expanded and
   * an undefined control sequence results in an error.
   */
  expandOnce(e) {
    var t = this.popToken(), r = t.text, n = t.noexpand ? null : this._getExpansion(r);
    if (n == null || e && n.unexpandable) {
      if (e && n == null && r[0] === "\\" && !this.isDefined(r))
        throw new ie("Undefined control sequence: " + r);
      return this.pushToken(t), !1;
    }
    this.countExpansion(1);
    var o = n.tokens, c = this.consumeArgs(n.numArgs, n.delimiters);
    if (n.numArgs) {
      o = o.slice();
      for (var s = o.length - 1; s >= 0; --s) {
        var a = o[s];
        if (a.text === "#") {
          if (s === 0)
            throw new ie("Incomplete placeholder at end of macro body", a);
          if (a = o[--s], a.text === "#")
            o.splice(s + 1, 1);
          else if (/^[1-9]$/.test(a.text))
            o.splice(s, 2, ...c[+a.text - 1]);
          else
            throw new ie("Not a valid argument number", a);
        }
      }
    }
    return this.pushTokens(o), o.length;
  }
  /**
   * Expand the next token only once (if possible), and return the resulting
   * top token on the stack (without removing anything from the stack).
   * Similar in behavior to TeX's `\expandafter\futurelet`.
   * Equivalent to expandOnce() followed by future().
   */
  expandAfterFuture() {
    return this.expandOnce(), this.future();
  }
  /**
   * Recursively expand first token, then return first non-expandable token.
   */
  expandNextToken() {
    for (; ; )
      if (this.expandOnce() === !1) {
        var e = this.stack.pop();
        return e.treatAsRelax && (e.text = "\\relax"), e;
      }
    throw new Error();
  }
  /**
   * Fully expand the given macro name and return the resulting list of
   * tokens, or return `undefined` if no such macro is defined.
   */
  expandMacro(e) {
    return this.macros.has(e) ? this.expandTokens([new St(e)]) : void 0;
  }
  /**
   * Fully expand the given token stream and return the resulting list of
   * tokens.  Note that the input tokens are in reverse order, but the
   * output tokens are in forward order.
   */
  expandTokens(e) {
    var t = [], r = this.stack.length;
    for (this.pushTokens(e); this.stack.length > r; )
      if (this.expandOnce(!0) === !1) {
        var n = this.stack.pop();
        n.treatAsRelax && (n.noexpand = !1, n.treatAsRelax = !1), t.push(n);
      }
    return this.countExpansion(t.length), t;
  }
  /**
   * Fully expand the given macro name and return the result as a string,
   * or return `undefined` if no such macro is defined.
   */
  expandMacroAsText(e) {
    var t = this.expandMacro(e);
    return t && t.map((r) => r.text).join("");
  }
  /**
   * Returns the expanded macro as a reversed array of tokens and a macro
   * argument count.  Or returns `null` if no such macro.
   */
  _getExpansion(e) {
    var t = this.macros.get(e);
    if (t == null)
      return t;
    if (e.length === 1) {
      var r = this.lexer.catcodes[e];
      if (r != null && r !== 13)
        return;
    }
    var n = typeof t == "function" ? t(this) : t;
    if (typeof n == "string") {
      var o = 0;
      if (n.indexOf("#") !== -1)
        for (var c = n.replace(/##/g, ""); c.indexOf("#" + (o + 1)) !== -1; )
          ++o;
      for (var s = new La(n, this.settings), a = [], u = s.lex(); u.text !== "EOF"; )
        a.push(u), u = s.lex();
      a.reverse();
      var p = {
        tokens: a,
        numArgs: o
      };
      return p;
    }
    return n;
  }
  /**
   * Determine whether a command is currently "defined" (has some
   * functionality), meaning that it's a macro (in the current group),
   * a function, a symbol, or one of the special commands listed in
   * `implicitCommands`.
   */
  isDefined(e) {
    return this.macros.has(e) || pr.hasOwnProperty(e) || Oe.math.hasOwnProperty(e) || Oe.text.hasOwnProperty(e) || X0.hasOwnProperty(e);
  }
  /**
   * Determine whether a command is expandable.
   */
  isExpandable(e) {
    var t = this.macros.get(e);
    return t != null ? typeof t == "string" || typeof t == "function" || !t.unexpandable : pr.hasOwnProperty(e) && !pr[e].primitive;
  }
}
var Pa = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, ki = Object.freeze({
  "₊": "+",
  "₋": "-",
  "₌": "=",
  "₍": "(",
  "₎": ")",
  "₀": "0",
  "₁": "1",
  "₂": "2",
  "₃": "3",
  "₄": "4",
  "₅": "5",
  "₆": "6",
  "₇": "7",
  "₈": "8",
  "₉": "9",
  "ₐ": "a",
  "ₑ": "e",
  "ₕ": "h",
  "ᵢ": "i",
  "ⱼ": "j",
  "ₖ": "k",
  "ₗ": "l",
  "ₘ": "m",
  "ₙ": "n",
  "ₒ": "o",
  "ₚ": "p",
  "ᵣ": "r",
  "ₛ": "s",
  "ₜ": "t",
  "ᵤ": "u",
  "ᵥ": "v",
  "ₓ": "x",
  "ᵦ": "β",
  "ᵧ": "γ",
  "ᵨ": "ρ",
  "ᵩ": "ϕ",
  "ᵪ": "χ",
  "⁺": "+",
  "⁻": "-",
  "⁼": "=",
  "⁽": "(",
  "⁾": ")",
  "⁰": "0",
  "¹": "1",
  "²": "2",
  "³": "3",
  "⁴": "4",
  "⁵": "5",
  "⁶": "6",
  "⁷": "7",
  "⁸": "8",
  "⁹": "9",
  "ᴬ": "A",
  "ᴮ": "B",
  "ᴰ": "D",
  "ᴱ": "E",
  "ᴳ": "G",
  "ᴴ": "H",
  "ᴵ": "I",
  "ᴶ": "J",
  "ᴷ": "K",
  "ᴸ": "L",
  "ᴹ": "M",
  "ᴺ": "N",
  "ᴼ": "O",
  "ᴾ": "P",
  "ᴿ": "R",
  "ᵀ": "T",
  "ᵁ": "U",
  "ⱽ": "V",
  "ᵂ": "W",
  "ᵃ": "a",
  "ᵇ": "b",
  "ᶜ": "c",
  "ᵈ": "d",
  "ᵉ": "e",
  "ᶠ": "f",
  "ᵍ": "g",
  ʰ: "h",
  "ⁱ": "i",
  ʲ: "j",
  "ᵏ": "k",
  ˡ: "l",
  "ᵐ": "m",
  ⁿ: "n",
  "ᵒ": "o",
  "ᵖ": "p",
  ʳ: "r",
  ˢ: "s",
  "ᵗ": "t",
  "ᵘ": "u",
  "ᵛ": "v",
  ʷ: "w",
  ˣ: "x",
  ʸ: "y",
  "ᶻ": "z",
  "ᵝ": "β",
  "ᵞ": "γ",
  "ᵟ": "δ",
  "ᵠ": "ϕ",
  "ᵡ": "χ",
  "ᶿ": "θ"
}), Es = {
  "́": {
    text: "\\'",
    math: "\\acute"
  },
  "̀": {
    text: "\\`",
    math: "\\grave"
  },
  "̈": {
    text: '\\"',
    math: "\\ddot"
  },
  "̃": {
    text: "\\~",
    math: "\\tilde"
  },
  "̄": {
    text: "\\=",
    math: "\\bar"
  },
  "̆": {
    text: "\\u",
    math: "\\breve"
  },
  "̌": {
    text: "\\v",
    math: "\\check"
  },
  "̂": {
    text: "\\^",
    math: "\\hat"
  },
  "̇": {
    text: "\\.",
    math: "\\dot"
  },
  "̊": {
    text: "\\r",
    math: "\\mathring"
  },
  "̋": {
    text: "\\H"
  },
  "̧": {
    text: "\\c"
  }
}, za = {
  á: "á",
  à: "à",
  ä: "ä",
  ǟ: "ǟ",
  ã: "ã",
  ā: "ā",
  ă: "ă",
  ắ: "ắ",
  ằ: "ằ",
  ẵ: "ẵ",
  ǎ: "ǎ",
  â: "â",
  ấ: "ấ",
  ầ: "ầ",
  ẫ: "ẫ",
  ȧ: "ȧ",
  ǡ: "ǡ",
  å: "å",
  ǻ: "ǻ",
  ḃ: "ḃ",
  ć: "ć",
  ḉ: "ḉ",
  č: "č",
  ĉ: "ĉ",
  ċ: "ċ",
  ç: "ç",
  ď: "ď",
  ḋ: "ḋ",
  ḑ: "ḑ",
  é: "é",
  è: "è",
  ë: "ë",
  ẽ: "ẽ",
  ē: "ē",
  ḗ: "ḗ",
  ḕ: "ḕ",
  ĕ: "ĕ",
  ḝ: "ḝ",
  ě: "ě",
  ê: "ê",
  ế: "ế",
  ề: "ề",
  ễ: "ễ",
  ė: "ė",
  ȩ: "ȩ",
  ḟ: "ḟ",
  ǵ: "ǵ",
  ḡ: "ḡ",
  ğ: "ğ",
  ǧ: "ǧ",
  ĝ: "ĝ",
  ġ: "ġ",
  ģ: "ģ",
  ḧ: "ḧ",
  ȟ: "ȟ",
  ĥ: "ĥ",
  ḣ: "ḣ",
  ḩ: "ḩ",
  í: "í",
  ì: "ì",
  ï: "ï",
  ḯ: "ḯ",
  ĩ: "ĩ",
  ī: "ī",
  ĭ: "ĭ",
  ǐ: "ǐ",
  î: "î",
  ǰ: "ǰ",
  ĵ: "ĵ",
  ḱ: "ḱ",
  ǩ: "ǩ",
  ķ: "ķ",
  ĺ: "ĺ",
  ľ: "ľ",
  ļ: "ļ",
  ḿ: "ḿ",
  ṁ: "ṁ",
  ń: "ń",
  ǹ: "ǹ",
  ñ: "ñ",
  ň: "ň",
  ṅ: "ṅ",
  ņ: "ņ",
  ó: "ó",
  ò: "ò",
  ö: "ö",
  ȫ: "ȫ",
  õ: "õ",
  ṍ: "ṍ",
  ṏ: "ṏ",
  ȭ: "ȭ",
  ō: "ō",
  ṓ: "ṓ",
  ṑ: "ṑ",
  ŏ: "ŏ",
  ǒ: "ǒ",
  ô: "ô",
  ố: "ố",
  ồ: "ồ",
  ỗ: "ỗ",
  ȯ: "ȯ",
  ȱ: "ȱ",
  ő: "ő",
  ṕ: "ṕ",
  ṗ: "ṗ",
  ŕ: "ŕ",
  ř: "ř",
  ṙ: "ṙ",
  ŗ: "ŗ",
  ś: "ś",
  ṥ: "ṥ",
  š: "š",
  ṧ: "ṧ",
  ŝ: "ŝ",
  ṡ: "ṡ",
  ş: "ş",
  ẗ: "ẗ",
  ť: "ť",
  ṫ: "ṫ",
  ţ: "ţ",
  ú: "ú",
  ù: "ù",
  ü: "ü",
  ǘ: "ǘ",
  ǜ: "ǜ",
  ǖ: "ǖ",
  ǚ: "ǚ",
  ũ: "ũ",
  ṹ: "ṹ",
  ū: "ū",
  ṻ: "ṻ",
  ŭ: "ŭ",
  ǔ: "ǔ",
  û: "û",
  ů: "ů",
  ű: "ű",
  ṽ: "ṽ",
  ẃ: "ẃ",
  ẁ: "ẁ",
  ẅ: "ẅ",
  ŵ: "ŵ",
  ẇ: "ẇ",
  ẘ: "ẘ",
  ẍ: "ẍ",
  ẋ: "ẋ",
  ý: "ý",
  ỳ: "ỳ",
  ÿ: "ÿ",
  ỹ: "ỹ",
  ȳ: "ȳ",
  ŷ: "ŷ",
  ẏ: "ẏ",
  ẙ: "ẙ",
  ź: "ź",
  ž: "ž",
  ẑ: "ẑ",
  ż: "ż",
  Á: "Á",
  À: "À",
  Ä: "Ä",
  Ǟ: "Ǟ",
  Ã: "Ã",
  Ā: "Ā",
  Ă: "Ă",
  Ắ: "Ắ",
  Ằ: "Ằ",
  Ẵ: "Ẵ",
  Ǎ: "Ǎ",
  Â: "Â",
  Ấ: "Ấ",
  Ầ: "Ầ",
  Ẫ: "Ẫ",
  Ȧ: "Ȧ",
  Ǡ: "Ǡ",
  Å: "Å",
  Ǻ: "Ǻ",
  Ḃ: "Ḃ",
  Ć: "Ć",
  Ḉ: "Ḉ",
  Č: "Č",
  Ĉ: "Ĉ",
  Ċ: "Ċ",
  Ç: "Ç",
  Ď: "Ď",
  Ḋ: "Ḋ",
  Ḑ: "Ḑ",
  É: "É",
  È: "È",
  Ë: "Ë",
  Ẽ: "Ẽ",
  Ē: "Ē",
  Ḗ: "Ḗ",
  Ḕ: "Ḕ",
  Ĕ: "Ĕ",
  Ḝ: "Ḝ",
  Ě: "Ě",
  Ê: "Ê",
  Ế: "Ế",
  Ề: "Ề",
  Ễ: "Ễ",
  Ė: "Ė",
  Ȩ: "Ȩ",
  Ḟ: "Ḟ",
  Ǵ: "Ǵ",
  Ḡ: "Ḡ",
  Ğ: "Ğ",
  Ǧ: "Ǧ",
  Ĝ: "Ĝ",
  Ġ: "Ġ",
  Ģ: "Ģ",
  Ḧ: "Ḧ",
  Ȟ: "Ȟ",
  Ĥ: "Ĥ",
  Ḣ: "Ḣ",
  Ḩ: "Ḩ",
  Í: "Í",
  Ì: "Ì",
  Ï: "Ï",
  Ḯ: "Ḯ",
  Ĩ: "Ĩ",
  Ī: "Ī",
  Ĭ: "Ĭ",
  Ǐ: "Ǐ",
  Î: "Î",
  İ: "İ",
  Ĵ: "Ĵ",
  Ḱ: "Ḱ",
  Ǩ: "Ǩ",
  Ķ: "Ķ",
  Ĺ: "Ĺ",
  Ľ: "Ľ",
  Ļ: "Ļ",
  Ḿ: "Ḿ",
  Ṁ: "Ṁ",
  Ń: "Ń",
  Ǹ: "Ǹ",
  Ñ: "Ñ",
  Ň: "Ň",
  Ṅ: "Ṅ",
  Ņ: "Ņ",
  Ó: "Ó",
  Ò: "Ò",
  Ö: "Ö",
  Ȫ: "Ȫ",
  Õ: "Õ",
  Ṍ: "Ṍ",
  Ṏ: "Ṏ",
  Ȭ: "Ȭ",
  Ō: "Ō",
  Ṓ: "Ṓ",
  Ṑ: "Ṑ",
  Ŏ: "Ŏ",
  Ǒ: "Ǒ",
  Ô: "Ô",
  Ố: "Ố",
  Ồ: "Ồ",
  Ỗ: "Ỗ",
  Ȯ: "Ȯ",
  Ȱ: "Ȱ",
  Ő: "Ő",
  Ṕ: "Ṕ",
  Ṗ: "Ṗ",
  Ŕ: "Ŕ",
  Ř: "Ř",
  Ṙ: "Ṙ",
  Ŗ: "Ŗ",
  Ś: "Ś",
  Ṥ: "Ṥ",
  Š: "Š",
  Ṧ: "Ṧ",
  Ŝ: "Ŝ",
  Ṡ: "Ṡ",
  Ş: "Ş",
  Ť: "Ť",
  Ṫ: "Ṫ",
  Ţ: "Ţ",
  Ú: "Ú",
  Ù: "Ù",
  Ü: "Ü",
  Ǘ: "Ǘ",
  Ǜ: "Ǜ",
  Ǖ: "Ǖ",
  Ǚ: "Ǚ",
  Ũ: "Ũ",
  Ṹ: "Ṹ",
  Ū: "Ū",
  Ṻ: "Ṻ",
  Ŭ: "Ŭ",
  Ǔ: "Ǔ",
  Û: "Û",
  Ů: "Ů",
  Ű: "Ű",
  Ṽ: "Ṽ",
  Ẃ: "Ẃ",
  Ẁ: "Ẁ",
  Ẅ: "Ẅ",
  Ŵ: "Ŵ",
  Ẇ: "Ẇ",
  Ẍ: "Ẍ",
  Ẋ: "Ẋ",
  Ý: "Ý",
  Ỳ: "Ỳ",
  Ÿ: "Ÿ",
  Ỹ: "Ỹ",
  Ȳ: "Ȳ",
  Ŷ: "Ŷ",
  Ẏ: "Ẏ",
  Ź: "Ź",
  Ž: "Ž",
  Ẑ: "Ẑ",
  Ż: "Ż",
  ά: "ά",
  ὰ: "ὰ",
  ᾱ: "ᾱ",
  ᾰ: "ᾰ",
  έ: "έ",
  ὲ: "ὲ",
  ή: "ή",
  ὴ: "ὴ",
  ί: "ί",
  ὶ: "ὶ",
  ϊ: "ϊ",
  ΐ: "ΐ",
  ῒ: "ῒ",
  ῑ: "ῑ",
  ῐ: "ῐ",
  ό: "ό",
  ὸ: "ὸ",
  ύ: "ύ",
  ὺ: "ὺ",
  ϋ: "ϋ",
  ΰ: "ΰ",
  ῢ: "ῢ",
  ῡ: "ῡ",
  ῠ: "ῠ",
  ώ: "ώ",
  ὼ: "ὼ",
  Ύ: "Ύ",
  Ὺ: "Ὺ",
  Ϋ: "Ϋ",
  Ῡ: "Ῡ",
  Ῠ: "Ῠ",
  Ώ: "Ώ",
  Ὼ: "Ὼ"
};
class hs {
  constructor(e, t) {
    this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new ou(e, t, this.mode), this.settings = t, this.leftrightDepth = 0;
  }
  /**
   * Checks a result to make sure it has the right type, and throws an
   * appropriate error otherwise.
   */
  expect(e, t) {
    if (t === void 0 && (t = !0), this.fetch().text !== e)
      throw new ie("Expected '" + e + "', got '" + this.fetch().text + "'", this.fetch());
    t && this.consume();
  }
  /**
   * Discards the current lookahead token, considering it consumed.
   */
  consume() {
    this.nextToken = null;
  }
  /**
   * Return the current lookahead token, or if there isn't one (at the
   * beginning, or if the previous lookahead token was consume()d),
   * fetch the next token as the new lookahead token and return it.
   */
  fetch() {
    return this.nextToken == null && (this.nextToken = this.gullet.expandNextToken()), this.nextToken;
  }
  /**
   * Switches between "text" and "math" modes.
   */
  switchMode(e) {
    this.mode = e, this.gullet.switchMode(e);
  }
  /**
   * Main parsing function, which parses an entire input.
   */
  parse() {
    this.settings.globalGroup || this.gullet.beginGroup(), this.settings.colorIsTextColor && this.gullet.macros.set("\\color", "\\textcolor");
    try {
      var e = this.parseExpression(!1);
      return this.expect("EOF"), this.settings.globalGroup || this.gullet.endGroup(), e;
    } finally {
      this.gullet.endGroups();
    }
  }
  /**
   * Fully parse a separate sequence of tokens as a separate job.
   * Tokens should be specified in reverse order, as in a MacroDefinition.
   */
  subparse(e) {
    var t = this.nextToken;
    this.consume(), this.gullet.pushToken(new St("}")), this.gullet.pushTokens(e);
    var r = this.parseExpression(!1);
    return this.expect("}"), this.nextToken = t, r;
  }
  /**
   * Parses an "expression", which is a list of atoms.
   *
   * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
   *                 happens when functions have higher precedence han infix
   *                 nodes in implicit parses.
   *
   * `breakOnTokenText`: The text of the token that the expression should end
   *                     with, or `null` if something else should end the
   *                     expression.
   */
  parseExpression(e, t) {
    for (var r = []; ; ) {
      this.mode === "math" && this.consumeSpaces();
      var n = this.fetch();
      if (hs.endOfExpression.indexOf(n.text) !== -1 || t && n.text === t || e && pr[n.text] && pr[n.text].infix)
        break;
      var o = this.parseAtom(t);
      if (o) {
        if (o.type === "internal")
          continue;
      } else break;
      r.push(o);
    }
    return this.mode === "text" && this.formLigatures(r), this.handleInfixNodes(r);
  }
  /**
   * Rewrites infix operators such as \over with corresponding commands such
   * as \frac.
   *
   * There can only be one infix operator per group.  If there's more than one
   * then the expression is ambiguous.  This can be resolved by adding {}.
   */
  handleInfixNodes(e) {
    for (var t = -1, r, n = 0; n < e.length; n++)
      if (e[n].type === "infix") {
        if (t !== -1)
          throw new ie("only one infix operator per group", e[n].token);
        t = n, r = e[n].replaceWith;
      }
    if (t !== -1 && r) {
      var o, c, s = e.slice(0, t), a = e.slice(t + 1);
      s.length === 1 && s[0].type === "ordgroup" ? o = s[0] : o = {
        type: "ordgroup",
        mode: this.mode,
        body: s
      }, a.length === 1 && a[0].type === "ordgroup" ? c = a[0] : c = {
        type: "ordgroup",
        mode: this.mode,
        body: a
      };
      var u;
      return r === "\\\\abovefrac" ? u = this.callFunction(r, [o, e[t], c], []) : u = this.callFunction(r, [o, c], []), [u];
    } else
      return e;
  }
  /**
   * Handle a subscript or superscript with nice errors.
   */
  handleSupSubscript(e) {
    var t = this.fetch(), r = t.text;
    this.consume(), this.consumeSpaces();
    var n = this.parseGroup(e);
    if (!n)
      throw new ie("Expected group after '" + r + "'", t);
    return n;
  }
  /**
   * Converts the textual input of an unsupported command into a text node
   * contained within a color node whose color is determined by errorColor
   */
  formatUnsupportedCmd(e) {
    for (var t = [], r = 0; r < e.length; r++)
      t.push({
        type: "textord",
        mode: "text",
        text: e[r]
      });
    var n = {
      type: "text",
      mode: this.mode,
      body: t
    }, o = {
      type: "color",
      mode: this.mode,
      color: this.settings.errorColor,
      body: [n]
    };
    return o;
  }
  /**
   * Parses a group with optional super/subscripts.
   */
  parseAtom(e) {
    var t = this.parseGroup("atom", e);
    if (this.mode === "text")
      return t;
    for (var r, n; ; ) {
      this.consumeSpaces();
      var o = this.fetch();
      if (o.text === "\\limits" || o.text === "\\nolimits") {
        if (t && t.type === "op") {
          var c = o.text === "\\limits";
          t.limits = c, t.alwaysHandleSupSub = !0;
        } else if (t && t.type === "operatorname")
          t.alwaysHandleSupSub && (t.limits = o.text === "\\limits");
        else
          throw new ie("Limit controls must follow a math operator", o);
        this.consume();
      } else if (o.text === "^") {
        if (r)
          throw new ie("Double superscript", o);
        r = this.handleSupSubscript("superscript");
      } else if (o.text === "_") {
        if (n)
          throw new ie("Double subscript", o);
        n = this.handleSupSubscript("subscript");
      } else if (o.text === "'") {
        if (r)
          throw new ie("Double superscript", o);
        var s = {
          type: "textord",
          mode: this.mode,
          text: "\\prime"
        }, a = [s];
        for (this.consume(); this.fetch().text === "'"; )
          a.push(s), this.consume();
        this.fetch().text === "^" && a.push(this.handleSupSubscript("superscript")), r = {
          type: "ordgroup",
          mode: this.mode,
          body: a
        };
      } else if (ki[o.text]) {
        var u = Pa.test(o.text), p = [];
        for (p.push(new St(ki[o.text])), this.consume(); ; ) {
          var f = this.fetch().text;
          if (!ki[f] || Pa.test(f) !== u)
            break;
          p.unshift(new St(ki[f])), this.consume();
        }
        var g = this.subparse(p);
        u ? n = {
          type: "ordgroup",
          mode: "math",
          body: g
        } : r = {
          type: "ordgroup",
          mode: "math",
          body: g
        };
      } else
        break;
    }
    return r || n ? {
      type: "supsub",
      mode: this.mode,
      base: t,
      sup: r,
      sub: n
    } : t;
  }
  /**
   * Parses an entire function, including its base and all of its arguments.
   */
  parseFunction(e, t) {
    var r = this.fetch(), n = r.text, o = pr[n];
    if (!o)
      return null;
    if (this.consume(), t && t !== "atom" && !o.allowedInArgument)
      throw new ie("Got function '" + n + "' with no arguments" + (t ? " as " + t : ""), r);
    if (this.mode === "text" && !o.allowedInText)
      throw new ie("Can't use function '" + n + "' in text mode", r);
    if (this.mode === "math" && o.allowedInMath === !1)
      throw new ie("Can't use function '" + n + "' in math mode", r);
    var {
      args: c,
      optArgs: s
    } = this.parseArguments(n, o);
    return this.callFunction(n, c, s, r, e);
  }
  /**
   * Call a function handler with a suitable context and arguments.
   */
  callFunction(e, t, r, n, o) {
    var c = {
      funcName: e,
      parser: this,
      token: n,
      breakOnTokenText: o
    }, s = pr[e];
    if (s && s.handler)
      return s.handler(c, t, r);
    throw new ie("No function handler for " + e);
  }
  /**
   * Parses the arguments of a function or environment
   */
  parseArguments(e, t) {
    var r = t.numArgs + t.numOptionalArgs;
    if (r === 0)
      return {
        args: [],
        optArgs: []
      };
    for (var n = [], o = [], c = 0; c < r; c++) {
      var s = t.argTypes && t.argTypes[c], a = c < t.numOptionalArgs;
      (t.primitive && s == null || // \sqrt expands into primitive if optional argument doesn't exist
      t.type === "sqrt" && c === 1 && o[0] == null) && (s = "primitive");
      var u = this.parseGroupOfType("argument to '" + e + "'", s, a);
      if (a)
        o.push(u);
      else if (u != null)
        n.push(u);
      else
        throw new ie("Null argument, please report this as a bug");
    }
    return {
      args: n,
      optArgs: o
    };
  }
  /**
   * Parses a group when the mode is changing.
   */
  parseGroupOfType(e, t, r) {
    switch (t) {
      case "color":
        return this.parseColorGroup(r);
      case "size":
        return this.parseSizeGroup(r);
      case "url":
        return this.parseUrlGroup(r);
      case "math":
      case "text":
        return this.parseArgumentGroup(r, t);
      case "hbox": {
        var n = this.parseArgumentGroup(r, "text");
        return n != null ? {
          type: "styling",
          mode: n.mode,
          body: [n],
          style: "text"
          // simulate \textstyle
        } : null;
      }
      case "raw": {
        var o = this.parseStringGroup("raw", r);
        return o != null ? {
          type: "raw",
          mode: "text",
          string: o.text
        } : null;
      }
      case "primitive": {
        if (r)
          throw new ie("A primitive argument cannot be optional");
        var c = this.parseGroup(e);
        if (c == null)
          throw new ie("Expected group as " + e, this.fetch());
        return c;
      }
      case "original":
      case null:
      case void 0:
        return this.parseArgumentGroup(r);
      default:
        throw new ie("Unknown group type as " + e, this.fetch());
    }
  }
  /**
   * Discard any space tokens, fetching the next non-space token.
   */
  consumeSpaces() {
    for (; this.fetch().text === " "; )
      this.consume();
  }
  /**
   * Parses a group, essentially returning the string formed by the
   * brace-enclosed tokens plus some position information.
   */
  parseStringGroup(e, t) {
    var r = this.gullet.scanArgument(t);
    if (r == null)
      return null;
    for (var n = "", o; (o = this.fetch()).text !== "EOF"; )
      n += o.text, this.consume();
    return this.consume(), r.text = n, r;
  }
  /**
   * Parses a regex-delimited group: the largest sequence of tokens
   * whose concatenated strings match `regex`. Returns the string
   * formed by the tokens plus some position information.
   */
  parseRegexGroup(e, t) {
    for (var r = this.fetch(), n = r, o = "", c; (c = this.fetch()).text !== "EOF" && e.test(o + c.text); )
      n = c, o += n.text, this.consume();
    if (o === "")
      throw new ie("Invalid " + t + ": '" + r.text + "'", r);
    return r.range(n, o);
  }
  /**
   * Parses a color description.
   */
  parseColorGroup(e) {
    var t = this.parseStringGroup("color", e);
    if (t == null)
      return null;
    var r = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);
    if (!r)
      throw new ie("Invalid color: '" + t.text + "'", t);
    var n = r[0];
    return /^[0-9a-f]{6}$/i.test(n) && (n = "#" + n), {
      type: "color-token",
      mode: this.mode,
      color: n
    };
  }
  /**
   * Parses a size specification, consisting of magnitude and unit.
   */
  parseSizeGroup(e) {
    var t, r = !1;
    if (this.gullet.consumeSpaces(), !e && this.gullet.future().text !== "{" ? t = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : t = this.parseStringGroup("size", e), !t)
      return null;
    !e && t.text.length === 0 && (t.text = "0pt", r = !0);
    var n = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);
    if (!n)
      throw new ie("Invalid size: '" + t.text + "'", t);
    var o = {
      number: +(n[1] + n[2]),
      // sign + magnitude, cast to number
      unit: n[3]
    };
    if (!s0(o))
      throw new ie("Invalid unit: '" + o.unit + "'", t);
    return {
      type: "size",
      mode: this.mode,
      value: o,
      isBlank: r
    };
  }
  /**
   * Parses an URL, checking escaped letters and allowed protocols,
   * and setting the catcode of % as an active character (as in \hyperref).
   */
  parseUrlGroup(e) {
    this.gullet.lexer.setCatcode("%", 13), this.gullet.lexer.setCatcode("~", 12);
    var t = this.parseStringGroup("url", e);
    if (this.gullet.lexer.setCatcode("%", 14), this.gullet.lexer.setCatcode("~", 13), t == null)
      return null;
    var r = t.text.replace(/\\([#$%&~_^{}])/g, "$1");
    return {
      type: "url",
      mode: this.mode,
      url: r
    };
  }
  /**
   * Parses an argument with the mode specified.
   */
  parseArgumentGroup(e, t) {
    var r = this.gullet.scanArgument(e);
    if (r == null)
      return null;
    var n = this.mode;
    t && this.switchMode(t), this.gullet.beginGroup();
    var o = this.parseExpression(!1, "EOF");
    this.expect("EOF"), this.gullet.endGroup();
    var c = {
      type: "ordgroup",
      mode: this.mode,
      loc: r.loc,
      body: o
    };
    return t && this.switchMode(n), c;
  }
  /**
   * Parses an ordinary group, which is either a single nucleus (like "x")
   * or an expression in braces (like "{x+y}") or an implicit group, a group
   * that starts at the current position, and ends right before a higher explicit
   * group ends, or at EOF.
   */
  parseGroup(e, t) {
    var r = this.fetch(), n = r.text, o;
    if (n === "{" || n === "\\begingroup") {
      this.consume();
      var c = n === "{" ? "}" : "\\endgroup";
      this.gullet.beginGroup();
      var s = this.parseExpression(!1, c), a = this.fetch();
      this.expect(c), this.gullet.endGroup(), o = {
        type: "ordgroup",
        mode: this.mode,
        loc: ct.range(r, a),
        body: s,
        // A group formed by \begingroup...\endgroup is a semi-simple group
        // which doesn't affect spacing in math mode, i.e., is transparent.
        // https://tex.stackexchange.com/questions/1930/when-should-one-
        // use-begingroup-instead-of-bgroup
        semisimple: n === "\\begingroup" || void 0
      };
    } else if (o = this.parseFunction(t, e) || this.parseSymbol(), o == null && n[0] === "\\" && !X0.hasOwnProperty(n)) {
      if (this.settings.throwOnError)
        throw new ie("Undefined control sequence: " + n, r);
      o = this.formatUnsupportedCmd(n), this.consume();
    }
    return o;
  }
  /**
   * Form ligature-like combinations of characters for text mode.
   * This includes inputs like "--", "---", "``" and "''".
   * The result will simply replace multiple textord nodes with a single
   * character in each value by a single textord node having multiple
   * characters in its value.  The representation is still ASCII source.
   * The group will be modified in place.
   */
  formLigatures(e) {
    for (var t = e.length - 1, r = 0; r < t; ++r) {
      var n = e[r], o = n.text;
      o === "-" && e[r + 1].text === "-" && (r + 1 < t && e[r + 2].text === "-" ? (e.splice(r, 3, {
        type: "textord",
        mode: "text",
        loc: ct.range(n, e[r + 2]),
        text: "---"
      }), t -= 2) : (e.splice(r, 2, {
        type: "textord",
        mode: "text",
        loc: ct.range(n, e[r + 1]),
        text: "--"
      }), t -= 1)), (o === "'" || o === "`") && e[r + 1].text === o && (e.splice(r, 2, {
        type: "textord",
        mode: "text",
        loc: ct.range(n, e[r + 1]),
        text: o + o
      }), t -= 1);
    }
  }
  /**
   * Parse a single symbol out of the string. Here, we handle single character
   * symbols and special functions like \verb.
   */
  parseSymbol() {
    var e = this.fetch(), t = e.text;
    if (/^\\verb[^a-zA-Z]/.test(t)) {
      this.consume();
      var r = t.slice(5), n = r.charAt(0) === "*";
      if (n && (r = r.slice(1)), r.length < 2 || r.charAt(0) !== r.slice(-1))
        throw new ie(`\\verb assertion failed --
                    please report what input caused this bug`);
      return r = r.slice(1, -1), {
        type: "verb",
        mode: "text",
        body: r,
        star: n
      };
    }
    za.hasOwnProperty(t[0]) && !Oe[this.mode][t[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Accented Unicode text character "' + t[0] + '" used in math mode', e), t = za[t[0]] + t.slice(1));
    var o = iu.exec(t);
    o && (t = t.substring(0, o.index), t === "i" ? t = "ı" : t === "j" && (t = "ȷ"));
    var c;
    if (Oe[this.mode][t]) {
      this.settings.strict && this.mode === "math" && Gs.indexOf(t) >= 0 && this.settings.reportNonstrict("unicodeTextInMathMode", 'Latin-1/Unicode text character "' + t[0] + '" used in math mode', e);
      var s = Oe[this.mode][t].group, a = ct.range(e), u;
      if (Yh.hasOwnProperty(s)) {
        var p = s;
        u = {
          type: "atom",
          mode: this.mode,
          family: p,
          loc: a,
          text: t
        };
      } else
        u = {
          type: s,
          mode: this.mode,
          loc: a,
          text: t
        };
      c = u;
    } else if (t.charCodeAt(0) >= 128)
      this.settings.strict && (i0(t.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Unicode text character "' + t[0] + '" used in math mode', e) : this.settings.reportNonstrict("unknownSymbol", 'Unrecognized Unicode character "' + t[0] + '"' + (" (" + t.charCodeAt(0) + ")"), e)), c = {
        type: "textord",
        mode: "text",
        loc: ct.range(e),
        text: t
      };
    else
      return null;
    if (this.consume(), o)
      for (var f = 0; f < o[0].length; f++) {
        var g = o[0][f];
        if (!Es[g])
          throw new ie("Unknown accent ' " + g + "'", e);
        var v = Es[g][this.mode] || Es[g].text;
        if (!v)
          throw new ie("Accent " + g + " unsupported in " + this.mode + " mode", e);
        c = {
          type: "accent",
          mode: this.mode,
          loc: ct.range(e),
          label: v,
          isStretchy: !1,
          isShifty: !0,
          // $FlowFixMe
          base: c
        };
      }
    return c;
  }
}
hs.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
var An = function(e, t) {
  if (!(typeof e == "string" || e instanceof String))
    throw new TypeError("KaTeX can only parse string typed expression");
  var r = new hs(e, t);
  delete r.gullet.macros.current["\\df@tag"];
  var n = r.parse();
  if (delete r.gullet.macros.current["\\current@color"], delete r.gullet.macros.current["\\color"], r.gullet.macros.get("\\df@tag")) {
    if (!t.displayMode)
      throw new ie("\\tag works only in display equations");
    n = [{
      type: "tag",
      mode: "text",
      body: n,
      tag: r.subparse([new St("\\df@tag")])
    }];
  }
  return n;
}, Y0 = function(e, t, r) {
  t.textContent = "";
  var n = Tn(e, r).toNode();
  t.appendChild(n);
};
typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), Y0 = function() {
  throw new ie("KaTeX doesn't work in quirks mode.");
});
var lu = function(e, t) {
  var r = Tn(e, t).toMarkup();
  return r;
}, hu = function(e, t) {
  var r = new cn(t);
  return An(e, r);
}, $0 = function(e, t, r) {
  if (r.throwOnError || !(e instanceof ie))
    throw e;
  var n = G.makeSpan(["katex-error"], [new Ct(t)]);
  return n.setAttribute("title", e.toString()), n.setAttribute("style", "color:" + r.errorColor), n;
}, Tn = function(e, t) {
  var r = new cn(t);
  try {
    var n = An(e, r);
    return vc(n, e, r);
  } catch (o) {
    return $0(o, e, r);
  }
}, cu = function(e, t) {
  var r = new cn(t);
  try {
    var n = An(e, r);
    return bc(n, e, r);
  } catch (o) {
    return $0(o, e, r);
  }
}, Ha = {
  /**
   * Current KaTeX version
   */
  version: "0.16.11",
  /**
   * Renders the given LaTeX into an HTML+MathML combination, and adds
   * it as a child to the specified DOM node.
   */
  render: Y0,
  /**
   * Renders the given LaTeX into an HTML+MathML combination string,
   * for sending to the client.
   */
  renderToString: lu,
  /**
   * KaTeX error, usually during parsing.
   */
  ParseError: ie,
  /**
   * The shema of Settings
   */
  SETTINGS_SCHEMA: Hi,
  /**
   * Parses the given LaTeX into KaTeX's internal parse tree structure,
   * without rendering to HTML or MathML.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __parse: hu,
  /**
   * Renders the given LaTeX into an HTML+MathML internal DOM tree
   * representation, without flattening that representation to a string.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __renderToDomTree: Tn,
  /**
   * Renders the given LaTeX into an HTML internal DOM tree representation,
   * without MathML and without flattening that representation to a string.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __renderToHTMLTree: cu,
  /**
   * extends internal font metrics object with a new object
   * each key in the new object represents a font name
  */
  __setFontMetrics: Uh,
  /**
   * adds a new symbol to builtin symbols table
   */
  __defineSymbol: w,
  /**
   * adds a new function to builtin function list,
   * which directly produce parse tree elements
   * and have their own html/mathml builders
   */
  __defineFunction: he,
  /**
   * adds a new macro to builtin macro list
   */
  __defineMacro: M,
  /**
   * Expose the dom tree node types, which can be useful for type checking nodes.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __domTree: {
    Span: di,
    Anchor: fn,
    SymbolNode: Ct,
    SvgNode: or,
    PathNode: vr,
    LineNode: js
  }
}, uu = function(e, t, r) {
  for (var n = r, o = 0, c = e.length; n < t.length; ) {
    var s = t[n];
    if (o <= 0 && t.slice(n, n + c) === e)
      return n;
    s === "\\" ? n++ : s === "{" ? o++ : s === "}" && o--, n++;
  }
  return -1;
}, du = function(e) {
  return e.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
}, fu = /^\\begin{/, mu = function(e, t) {
  for (var r, n = [], o = new RegExp("(" + t.map((u) => du(u.left)).join("|") + ")"); r = e.search(o), r !== -1; ) {
    r > 0 && (n.push({
      type: "text",
      data: e.slice(0, r)
    }), e = e.slice(r));
    var c = t.findIndex((u) => e.startsWith(u.left));
    if (r = uu(t[c].right, e, t[c].left.length), r === -1)
      break;
    var s = e.slice(0, r + t[c].right.length), a = fu.test(s) ? s : e.slice(t[c].left.length, r);
    n.push({
      type: "math",
      data: a,
      rawData: s,
      display: t[c].display
    }), e = e.slice(r + t[c].right.length);
  }
  return e !== "" && n.push({
    type: "text",
    data: e
  }), n;
}, pu = function(e, t) {
  var r = mu(e, t.delimiters);
  if (r.length === 1 && r[0].type === "text")
    return null;
  for (var n = document.createDocumentFragment(), o = 0; o < r.length; o++)
    if (r[o].type === "text")
      n.appendChild(document.createTextNode(r[o].data));
    else {
      var c = document.createElement("span"), s = r[o].data;
      t.displayMode = r[o].display;
      try {
        t.preProcess && (s = t.preProcess(s)), Ha.render(s, c, t);
      } catch (a) {
        if (!(a instanceof Ha.ParseError))
          throw a;
        t.errorCallback("KaTeX auto-render: Failed to parse `" + r[o].data + "` with ", a), n.appendChild(document.createTextNode(r[o].rawData));
        continue;
      }
      n.appendChild(c);
    }
  return n;
}, _u = function i(e, t) {
  for (var r = 0; r < e.childNodes.length; r++) {
    var n = e.childNodes[r];
    if (n.nodeType === 3) {
      for (var o = n.textContent, c = n.nextSibling, s = 0; c && c.nodeType === Node.TEXT_NODE; )
        o += c.textContent, c = c.nextSibling, s++;
      var a = pu(o, t);
      if (a) {
        for (var u = 0; u < s; u++)
          n.nextSibling.remove();
        r += a.childNodes.length - 1, e.replaceChild(a, n);
      } else
        r += s;
    } else n.nodeType === 1 && function() {
      var p = " " + n.className + " ", f = t.ignoredTags.indexOf(n.nodeName.toLowerCase()) === -1 && t.ignoredClasses.every((g) => p.indexOf(" " + g + " ") === -1);
      f && i(n, t);
    }();
  }
}, gu = function(e, t) {
  if (!e)
    throw new Error("No element provided to render");
  var r = {};
  for (var n in t)
    t.hasOwnProperty(n) && (r[n] = t[n]);
  r.delimiters = r.delimiters || [
    {
      left: "$$",
      right: "$$",
      display: !0
    },
    {
      left: "\\(",
      right: "\\)",
      display: !1
    },
    // LaTeX uses $…$, but it ruins the display of normal `$` in text:
    // {left: "$", right: "$", display: false},
    // $ must come after $$
    // Render AMS environments even if outside $$…$$ delimiters.
    {
      left: "\\begin{equation}",
      right: "\\end{equation}",
      display: !0
    },
    {
      left: "\\begin{align}",
      right: "\\end{align}",
      display: !0
    },
    {
      left: "\\begin{alignat}",
      right: "\\end{alignat}",
      display: !0
    },
    {
      left: "\\begin{gather}",
      right: "\\end{gather}",
      display: !0
    },
    {
      left: "\\begin{CD}",
      right: "\\end{CD}",
      display: !0
    },
    {
      left: "\\[",
      right: "\\]",
      display: !0
    }
  ], r.ignoredTags = r.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code", "option"], r.ignoredClasses = r.ignoredClasses || [], r.errorCallback = r.errorCallback || console.error, r.macros = r.macros || {}, _u(e, r);
};
function Mn() {
  return {
    async: !1,
    breaks: !1,
    extensions: null,
    gfm: !0,
    hooks: null,
    pedantic: !1,
    renderer: null,
    silent: !1,
    tokenizer: null,
    walkTokens: null
  };
}
let Tr = Mn();
function Z0(i) {
  Tr = i;
}
const J0 = /[&<>"']/, vu = new RegExp(J0.source, "g"), Q0 = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, bu = new RegExp(Q0.source, "g"), wu = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, Na = (i) => wu[i];
function ut(i, e) {
  if (e) {
    if (J0.test(i))
      return i.replace(vu, Na);
  } else if (Q0.test(i))
    return i.replace(bu, Na);
  return i;
}
const yu = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
function Su(i) {
  return i.replace(yu, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
}
const Cu = /(^|[^\[])\^/g;
function Fe(i, e) {
  let t = typeof i == "string" ? i : i.source;
  e = e || "";
  const r = {
    replace: (n, o) => {
      let c = typeof o == "string" ? o : o.source;
      return c = c.replace(Cu, "$1"), t = t.replace(n, c), r;
    },
    getRegex: () => new RegExp(t, e)
  };
  return r;
}
function qa(i) {
  try {
    i = encodeURI(i).replace(/%25/g, "%");
  } catch {
    return null;
  }
  return i;
}
const ai = { exec: () => null };
function Ua(i, e) {
  const t = i.replace(/\|/g, (o, c, s) => {
    let a = !1, u = c;
    for (; --u >= 0 && s[u] === "\\"; )
      a = !a;
    return a ? "|" : " |";
  }), r = t.split(/ \|/);
  let n = 0;
  if (r[0].trim() || r.shift(), r.length > 0 && !r[r.length - 1].trim() && r.pop(), e)
    if (r.length > e)
      r.splice(e);
    else
      for (; r.length < e; )
        r.push("");
  for (; n < r.length; n++)
    r[n] = r[n].trim().replace(/\\\|/g, "|");
  return r;
}
function Di(i, e, t) {
  const r = i.length;
  if (r === 0)
    return "";
  let n = 0;
  for (; n < r; ) {
    const o = i.charAt(r - n - 1);
    if (o === e && !t)
      n++;
    else if (o !== e && t)
      n++;
    else
      break;
  }
  return i.slice(0, r - n);
}
function xu(i, e) {
  if (i.indexOf(e[1]) === -1)
    return -1;
  let t = 0;
  for (let r = 0; r < i.length; r++)
    if (i[r] === "\\")
      r++;
    else if (i[r] === e[0])
      t++;
    else if (i[r] === e[1] && (t--, t < 0))
      return r;
  return -1;
}
function Wa(i, e, t, r) {
  const n = e.href, o = e.title ? ut(e.title) : null, c = i[1].replace(/\\([\[\]])/g, "$1");
  if (i[0].charAt(0) !== "!") {
    r.state.inLink = !0;
    const s = {
      type: "link",
      raw: t,
      href: n,
      title: o,
      text: c,
      tokens: r.inlineTokens(c)
    };
    return r.state.inLink = !1, s;
  }
  return {
    type: "image",
    raw: t,
    href: n,
    title: o,
    text: ut(c)
  };
}
function ku(i, e) {
  const t = i.match(/^(\s+)(?:```)/);
  if (t === null)
    return e;
  const r = t[1];
  return e.split(`
`).map((n) => {
    const o = n.match(/^\s+/);
    if (o === null)
      return n;
    const [c] = o;
    return c.length >= r.length ? n.slice(r.length) : n;
  }).join(`
`);
}
class Qi {
  options;
  rules;
  // set by the lexer
  lexer;
  // set by the lexer
  constructor(e) {
    this.options = e || Tr;
  }
  space(e) {
    const t = this.rules.block.newline.exec(e);
    if (t && t[0].length > 0)
      return {
        type: "space",
        raw: t[0]
      };
  }
  code(e) {
    const t = this.rules.block.code.exec(e);
    if (t) {
      const r = t[0].replace(/^ {1,4}/gm, "");
      return {
        type: "code",
        raw: t[0],
        codeBlockStyle: "indented",
        text: this.options.pedantic ? r : Di(r, `
`)
      };
    }
  }
  fences(e) {
    const t = this.rules.block.fences.exec(e);
    if (t) {
      const r = t[0], n = ku(r, t[3] || "");
      return {
        type: "code",
        raw: r,
        lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
        text: n
      };
    }
  }
  heading(e) {
    const t = this.rules.block.heading.exec(e);
    if (t) {
      let r = t[2].trim();
      if (/#$/.test(r)) {
        const n = Di(r, "#");
        (this.options.pedantic || !n || / $/.test(n)) && (r = n.trim());
      }
      return {
        type: "heading",
        raw: t[0],
        depth: t[1].length,
        text: r,
        tokens: this.lexer.inline(r)
      };
    }
  }
  hr(e) {
    const t = this.rules.block.hr.exec(e);
    if (t)
      return {
        type: "hr",
        raw: t[0]
      };
  }
  blockquote(e) {
    const t = this.rules.block.blockquote.exec(e);
    if (t) {
      let r = t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
    $1`);
      r = Di(r.replace(/^ *>[ \t]?/gm, ""), `
`);
      const n = this.lexer.state.top;
      this.lexer.state.top = !0;
      const o = this.lexer.blockTokens(r);
      return this.lexer.state.top = n, {
        type: "blockquote",
        raw: t[0],
        tokens: o,
        text: r
      };
    }
  }
  list(e) {
    let t = this.rules.block.list.exec(e);
    if (t) {
      let r = t[1].trim();
      const n = r.length > 1, o = {
        type: "list",
        raw: "",
        ordered: n,
        start: n ? +r.slice(0, -1) : "",
        loose: !1,
        items: []
      };
      r = n ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = n ? r : "[*+-]");
      const c = new RegExp(`^( {0,3}${r})((?:[	 ][^\\n]*)?(?:\\n|$))`);
      let s = "", a = "", u = !1;
      for (; e; ) {
        let p = !1;
        if (!(t = c.exec(e)) || this.rules.block.hr.test(e))
          break;
        s = t[0], e = e.substring(s.length);
        let f = t[2].split(`
`, 1)[0].replace(/^\t+/, (m) => " ".repeat(3 * m.length)), g = e.split(`
`, 1)[0], v = 0;
        this.options.pedantic ? (v = 2, a = f.trimStart()) : (v = t[2].search(/[^ ]/), v = v > 4 ? 1 : v, a = f.slice(v), v += t[1].length);
        let C = !1;
        if (!f && /^ *$/.test(g) && (s += g + `
`, e = e.substring(g.length + 1), p = !0), !p) {
          const m = new RegExp(`^ {0,${Math.min(3, v - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`), h = new RegExp(`^ {0,${Math.min(3, v - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), l = new RegExp(`^ {0,${Math.min(3, v - 1)}}(?:\`\`\`|~~~)`), _ = new RegExp(`^ {0,${Math.min(3, v - 1)}}#`);
          for (; e; ) {
            const S = e.split(`
`, 1)[0];
            if (g = S, this.options.pedantic && (g = g.replace(/^ {1,4}(?=( {4})*[^ ])/g, "  ")), l.test(g) || _.test(g) || m.test(g) || h.test(e))
              break;
            if (g.search(/[^ ]/) >= v || !g.trim())
              a += `
` + g.slice(v);
            else {
              if (C || f.search(/[^ ]/) >= 4 || l.test(f) || _.test(f) || h.test(f))
                break;
              a += `
` + g;
            }
            !C && !g.trim() && (C = !0), s += S + `
`, e = e.substring(S.length + 1), f = g.slice(v);
          }
        }
        o.loose || (u ? o.loose = !0 : /\n *\n *$/.test(s) && (u = !0));
        let b = null, d;
        this.options.gfm && (b = /^\[[ xX]\] /.exec(a), b && (d = b[0] !== "[ ] ", a = a.replace(/^\[[ xX]\] +/, ""))), o.items.push({
          type: "list_item",
          raw: s,
          task: !!b,
          checked: d,
          loose: !1,
          text: a,
          tokens: []
        }), o.raw += s;
      }
      o.items[o.items.length - 1].raw = s.trimEnd(), o.items[o.items.length - 1].text = a.trimEnd(), o.raw = o.raw.trimEnd();
      for (let p = 0; p < o.items.length; p++)
        if (this.lexer.state.top = !1, o.items[p].tokens = this.lexer.blockTokens(o.items[p].text, []), !o.loose) {
          const f = o.items[p].tokens.filter((v) => v.type === "space"), g = f.length > 0 && f.some((v) => /\n.*\n/.test(v.raw));
          o.loose = g;
        }
      if (o.loose)
        for (let p = 0; p < o.items.length; p++)
          o.items[p].loose = !0;
      return o;
    }
  }
  html(e) {
    const t = this.rules.block.html.exec(e);
    if (t)
      return {
        type: "html",
        block: !0,
        raw: t[0],
        pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
        text: t[0]
      };
  }
  def(e) {
    const t = this.rules.block.def.exec(e);
    if (t) {
      const r = t[1].toLowerCase().replace(/\s+/g, " "), n = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", o = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
      return {
        type: "def",
        tag: r,
        raw: t[0],
        href: n,
        title: o
      };
    }
  }
  table(e) {
    const t = this.rules.block.table.exec(e);
    if (!t || !/[:|]/.test(t[2]))
      return;
    const r = Ua(t[1]), n = t[2].replace(/^\||\| *$/g, "").split("|"), o = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
`) : [], c = {
      type: "table",
      raw: t[0],
      header: [],
      align: [],
      rows: []
    };
    if (r.length === n.length) {
      for (const s of n)
        /^ *-+: *$/.test(s) ? c.align.push("right") : /^ *:-+: *$/.test(s) ? c.align.push("center") : /^ *:-+ *$/.test(s) ? c.align.push("left") : c.align.push(null);
      for (const s of r)
        c.header.push({
          text: s,
          tokens: this.lexer.inline(s)
        });
      for (const s of o)
        c.rows.push(Ua(s, c.header.length).map((a) => ({
          text: a,
          tokens: this.lexer.inline(a)
        })));
      return c;
    }
  }
  lheading(e) {
    const t = this.rules.block.lheading.exec(e);
    if (t)
      return {
        type: "heading",
        raw: t[0],
        depth: t[2].charAt(0) === "=" ? 1 : 2,
        text: t[1],
        tokens: this.lexer.inline(t[1])
      };
  }
  paragraph(e) {
    const t = this.rules.block.paragraph.exec(e);
    if (t) {
      const r = t[1].charAt(t[1].length - 1) === `
` ? t[1].slice(0, -1) : t[1];
      return {
        type: "paragraph",
        raw: t[0],
        text: r,
        tokens: this.lexer.inline(r)
      };
    }
  }
  text(e) {
    const t = this.rules.block.text.exec(e);
    if (t)
      return {
        type: "text",
        raw: t[0],
        text: t[0],
        tokens: this.lexer.inline(t[0])
      };
  }
  escape(e) {
    const t = this.rules.inline.escape.exec(e);
    if (t)
      return {
        type: "escape",
        raw: t[0],
        text: ut(t[1])
      };
  }
  tag(e) {
    const t = this.rules.inline.tag.exec(e);
    if (t)
      return !this.lexer.state.inLink && /^<a /i.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && /^<\/a>/i.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
        type: "html",
        raw: t[0],
        inLink: this.lexer.state.inLink,
        inRawBlock: this.lexer.state.inRawBlock,
        block: !1,
        text: t[0]
      };
  }
  link(e) {
    const t = this.rules.inline.link.exec(e);
    if (t) {
      const r = t[2].trim();
      if (!this.options.pedantic && /^</.test(r)) {
        if (!/>$/.test(r))
          return;
        const c = Di(r.slice(0, -1), "\\");
        if ((r.length - c.length) % 2 === 0)
          return;
      } else {
        const c = xu(t[2], "()");
        if (c > -1) {
          const a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + c;
          t[2] = t[2].substring(0, c), t[0] = t[0].substring(0, a).trim(), t[3] = "";
        }
      }
      let n = t[2], o = "";
      if (this.options.pedantic) {
        const c = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);
        c && (n = c[1], o = c[3]);
      } else
        o = t[3] ? t[3].slice(1, -1) : "";
      return n = n.trim(), /^</.test(n) && (this.options.pedantic && !/>$/.test(r) ? n = n.slice(1) : n = n.slice(1, -1)), Wa(t, {
        href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
        title: o && o.replace(this.rules.inline.anyPunctuation, "$1")
      }, t[0], this.lexer);
    }
  }
  reflink(e, t) {
    let r;
    if ((r = this.rules.inline.reflink.exec(e)) || (r = this.rules.inline.nolink.exec(e))) {
      const n = (r[2] || r[1]).replace(/\s+/g, " "), o = t[n.toLowerCase()];
      if (!o) {
        const c = r[0].charAt(0);
        return {
          type: "text",
          raw: c,
          text: c
        };
      }
      return Wa(r, o, r[0], this.lexer);
    }
  }
  emStrong(e, t, r = "") {
    let n = this.rules.inline.emStrongLDelim.exec(e);
    if (!n || n[3] && r.match(/[\p{L}\p{N}]/u))
      return;
    if (!(n[1] || n[2] || "") || !r || this.rules.inline.punctuation.exec(r)) {
      const c = [...n[0]].length - 1;
      let s, a, u = c, p = 0;
      const f = n[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
      for (f.lastIndex = 0, t = t.slice(-1 * e.length + c); (n = f.exec(t)) != null; ) {
        if (s = n[1] || n[2] || n[3] || n[4] || n[5] || n[6], !s)
          continue;
        if (a = [...s].length, n[3] || n[4]) {
          u += a;
          continue;
        } else if ((n[5] || n[6]) && c % 3 && !((c + a) % 3)) {
          p += a;
          continue;
        }
        if (u -= a, u > 0)
          continue;
        a = Math.min(a, a + u + p);
        const g = [...n[0]][0].length, v = e.slice(0, c + n.index + g + a);
        if (Math.min(c, a) % 2) {
          const b = v.slice(1, -1);
          return {
            type: "em",
            raw: v,
            text: b,
            tokens: this.lexer.inlineTokens(b)
          };
        }
        const C = v.slice(2, -2);
        return {
          type: "strong",
          raw: v,
          text: C,
          tokens: this.lexer.inlineTokens(C)
        };
      }
    }
  }
  codespan(e) {
    const t = this.rules.inline.code.exec(e);
    if (t) {
      let r = t[2].replace(/\n/g, " ");
      const n = /[^ ]/.test(r), o = /^ /.test(r) && / $/.test(r);
      return n && o && (r = r.substring(1, r.length - 1)), r = ut(r, !0), {
        type: "codespan",
        raw: t[0],
        text: r
      };
    }
  }
  br(e) {
    const t = this.rules.inline.br.exec(e);
    if (t)
      return {
        type: "br",
        raw: t[0]
      };
  }
  del(e) {
    const t = this.rules.inline.del.exec(e);
    if (t)
      return {
        type: "del",
        raw: t[0],
        text: t[2],
        tokens: this.lexer.inlineTokens(t[2])
      };
  }
  autolink(e) {
    const t = this.rules.inline.autolink.exec(e);
    if (t) {
      let r, n;
      return t[2] === "@" ? (r = ut(t[1]), n = "mailto:" + r) : (r = ut(t[1]), n = r), {
        type: "link",
        raw: t[0],
        text: r,
        href: n,
        tokens: [
          {
            type: "text",
            raw: r,
            text: r
          }
        ]
      };
    }
  }
  url(e) {
    let t;
    if (t = this.rules.inline.url.exec(e)) {
      let r, n;
      if (t[2] === "@")
        r = ut(t[0]), n = "mailto:" + r;
      else {
        let o;
        do
          o = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
        while (o !== t[0]);
        r = ut(t[0]), t[1] === "www." ? n = "http://" + t[0] : n = t[0];
      }
      return {
        type: "link",
        raw: t[0],
        text: r,
        href: n,
        tokens: [
          {
            type: "text",
            raw: r,
            text: r
          }
        ]
      };
    }
  }
  inlineText(e) {
    const t = this.rules.inline.text.exec(e);
    if (t) {
      let r;
      return this.lexer.state.inRawBlock ? r = t[0] : r = ut(t[0]), {
        type: "text",
        raw: t[0],
        text: r
      };
    }
  }
}
const Du = /^(?: *(?:\n|$))+/, Eu = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Au = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, mi = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Tu = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, el = /(?:[*+-]|\d{1,9}[.)])/, tl = Fe(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, el).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), Bn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Mu = /^[^\n]+/, Fn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Bu = Fe(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Fn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Fu = Fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, el).getRegex(), cs = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Rn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ru = Fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Rn).replace("tag", cs).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), rl = Fe(Bn).replace("hr", mi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", cs).getRegex(), Lu = Fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", rl).getRegex(), Ln = {
  blockquote: Lu,
  code: Eu,
  def: Bu,
  fences: Au,
  heading: Tu,
  hr: mi,
  html: Ru,
  lheading: tl,
  list: Fu,
  newline: Du,
  paragraph: rl,
  table: ai,
  text: Mu
}, ja = Fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", mi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", cs).getRegex(), Ou = {
  ...Ln,
  table: ja,
  paragraph: Fe(Bn).replace("hr", mi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ja).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", cs).getRegex()
}, Iu = {
  ...Ln,
  html: Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Rn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
  fences: ai,
  // fences not supported
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
  paragraph: Fe(Bn).replace("hr", mi).replace("heading", ` *#{1,6} *[^
]`).replace("lheading", tl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
}, il = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, sl = /^( {2,}|\\)\n(?!\s*$)/, zu = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, pi = "\\p{P}\\p{S}", Hu = Fe(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, pi).getRegex(), Nu = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, qu = Fe(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, pi).getRegex(), Uu = Fe("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, pi).getRegex(), Wu = Fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, pi).getRegex(), ju = Fe(/\\([punct])/, "gu").replace(/punct/g, pi).getRegex(), Gu = Fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[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])?)+(?![-_])/).getRegex(), Vu = Fe(Rn).replace("(?:-->|$)", "-->").getRegex(), Ku = Fe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Vu).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), es = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Xu = Fe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", es).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), nl = Fe(/^!?\[(label)\]\[(ref)\]/).replace("label", es).replace("ref", Fn).getRegex(), al = Fe(/^!?\[(ref)\](?:\[\])?/).replace("ref", Fn).getRegex(), Yu = Fe("reflink|nolink(?!\\()", "g").replace("reflink", nl).replace("nolink", al).getRegex(), On = {
  _backpedal: ai,
  // only used for GFM url
  anyPunctuation: ju,
  autolink: Gu,
  blockSkip: Nu,
  br: sl,
  code: Pu,
  del: ai,
  emStrongLDelim: qu,
  emStrongRDelimAst: Uu,
  emStrongRDelimUnd: Wu,
  escape: il,
  link: Xu,
  nolink: al,
  punctuation: Hu,
  reflink: nl,
  reflinkSearch: Yu,
  tag: Ku,
  text: zu,
  url: ai
}, $u = {
  ...On,
  link: Fe(/^!?\[(label)\]\((.*?)\)/).replace("label", es).getRegex(),
  reflink: Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", es).getRegex()
}, Zs = {
  ...On,
  escape: Fe(il).replace("])", "~|])").getRegex(),
  url: Fe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
  del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
}, Zu = {
  ...Zs,
  br: Fe(sl).replace("{2,}", "*").getRegex(),
  text: Fe(Zs.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
}, Ei = {
  normal: Ln,
  gfm: Ou,
  pedantic: Iu
}, Xr = {
  normal: On,
  gfm: Zs,
  breaks: Zu,
  pedantic: $u
};
class jt {
  tokens;
  options;
  state;
  tokenizer;
  inlineQueue;
  constructor(e) {
    this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Tr, this.options.tokenizer = this.options.tokenizer || new Qi(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
      inLink: !1,
      inRawBlock: !1,
      top: !0
    };
    const t = {
      block: Ei.normal,
      inline: Xr.normal
    };
    this.options.pedantic ? (t.block = Ei.pedantic, t.inline = Xr.pedantic) : this.options.gfm && (t.block = Ei.gfm, this.options.breaks ? t.inline = Xr.breaks : t.inline = Xr.gfm), this.tokenizer.rules = t;
  }
  /**
   * Expose Rules
   */
  static get rules() {
    return {
      block: Ei,
      inline: Xr
    };
  }
  /**
   * Static Lex Method
   */
  static lex(e, t) {
    return new jt(t).lex(e);
  }
  /**
   * Static Lex Inline Method
   */
  static lexInline(e, t) {
    return new jt(t).inlineTokens(e);
  }
  /**
   * Preprocessing
   */
  lex(e) {
    e = e.replace(/\r\n|\r/g, `
`), this.blockTokens(e, this.tokens);
    for (let t = 0; t < this.inlineQueue.length; t++) {
      const r = this.inlineQueue[t];
      this.inlineTokens(r.src, r.tokens);
    }
    return this.inlineQueue = [], this.tokens;
  }
  blockTokens(e, t = []) {
    this.options.pedantic ? e = e.replace(/\t/g, "    ").replace(/^ +$/gm, "") : e = e.replace(/^( *)(\t+)/gm, (s, a, u) => a + "    ".repeat(u.length));
    let r, n, o, c;
    for (; e; )
      if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1))) {
        if (r = this.tokenizer.space(e)) {
          e = e.substring(r.raw.length), r.raw.length === 1 && t.length > 0 ? t[t.length - 1].raw += `
` : t.push(r);
          continue;
        }
        if (r = this.tokenizer.code(e)) {
          e = e.substring(r.raw.length), n = t[t.length - 1], n && (n.type === "paragraph" || n.type === "text") ? (n.raw += `
` + r.raw, n.text += `
` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : t.push(r);
          continue;
        }
        if (r = this.tokenizer.fences(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.heading(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.hr(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.blockquote(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.list(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.html(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.def(e)) {
          e = e.substring(r.raw.length), n = t[t.length - 1], n && (n.type === "paragraph" || n.type === "text") ? (n.raw += `
` + r.raw, n.text += `
` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
            href: r.href,
            title: r.title
          });
          continue;
        }
        if (r = this.tokenizer.table(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.lheading(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (o = e, this.options.extensions && this.options.extensions.startBlock) {
          let s = 1 / 0;
          const a = e.slice(1);
          let u;
          this.options.extensions.startBlock.forEach((p) => {
            u = p.call({ lexer: this }, a), typeof u == "number" && u >= 0 && (s = Math.min(s, u));
          }), s < 1 / 0 && s >= 0 && (o = e.substring(0, s + 1));
        }
        if (this.state.top && (r = this.tokenizer.paragraph(o))) {
          n = t[t.length - 1], c && n.type === "paragraph" ? (n.raw += `
` + r.raw, n.text += `
` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : t.push(r), c = o.length !== e.length, e = e.substring(r.raw.length);
          continue;
        }
        if (r = this.tokenizer.text(e)) {
          e = e.substring(r.raw.length), n = t[t.length - 1], n && n.type === "text" ? (n.raw += `
` + r.raw, n.text += `
` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = n.text) : t.push(r);
          continue;
        }
        if (e) {
          const s = "Infinite loop on byte: " + e.charCodeAt(0);
          if (this.options.silent) {
            console.error(s);
            break;
          } else
            throw new Error(s);
        }
      }
    return this.state.top = !0, t;
  }
  inline(e, t = []) {
    return this.inlineQueue.push({ src: e, tokens: t }), t;
  }
  /**
   * Lexing/Compiling
   */
  inlineTokens(e, t = []) {
    let r, n, o, c = e, s, a, u;
    if (this.tokens.links) {
      const p = Object.keys(this.tokens.links);
      if (p.length > 0)
        for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(c)) != null; )
          p.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (c = c.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
    }
    for (; (s = this.tokenizer.rules.inline.blockSkip.exec(c)) != null; )
      c = c.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
    for (; (s = this.tokenizer.rules.inline.anyPunctuation.exec(c)) != null; )
      c = c.slice(0, s.index) + "++" + c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
    for (; e; )
      if (a || (u = ""), a = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((p) => (r = p.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1))) {
        if (r = this.tokenizer.escape(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.tag(e)) {
          e = e.substring(r.raw.length), n = t[t.length - 1], n && r.type === "text" && n.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
          continue;
        }
        if (r = this.tokenizer.link(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.reflink(e, this.tokens.links)) {
          e = e.substring(r.raw.length), n = t[t.length - 1], n && r.type === "text" && n.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
          continue;
        }
        if (r = this.tokenizer.emStrong(e, c, u)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.codespan(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.br(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.del(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (r = this.tokenizer.autolink(e)) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (!this.state.inLink && (r = this.tokenizer.url(e))) {
          e = e.substring(r.raw.length), t.push(r);
          continue;
        }
        if (o = e, this.options.extensions && this.options.extensions.startInline) {
          let p = 1 / 0;
          const f = e.slice(1);
          let g;
          this.options.extensions.startInline.forEach((v) => {
            g = v.call({ lexer: this }, f), typeof g == "number" && g >= 0 && (p = Math.min(p, g));
          }), p < 1 / 0 && p >= 0 && (o = e.substring(0, p + 1));
        }
        if (r = this.tokenizer.inlineText(o)) {
          e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (u = r.raw.slice(-1)), a = !0, n = t[t.length - 1], n && n.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
          continue;
        }
        if (e) {
          const p = "Infinite loop on byte: " + e.charCodeAt(0);
          if (this.options.silent) {
            console.error(p);
            break;
          } else
            throw new Error(p);
        }
      }
    return t;
  }
}
class ts {
  options;
  constructor(e) {
    this.options = e || Tr;
  }
  code(e, t, r) {
    const n = (t || "").match(/^\S*/)?.[0];
    return e = e.replace(/\n$/, "") + `
`, n ? '<pre><code class="language-' + ut(n) + '">' + (r ? e : ut(e, !0)) + `</code></pre>
` : "<pre><code>" + (r ? e : ut(e, !0)) + `</code></pre>
`;
  }
  blockquote(e) {
    return `<blockquote>
${e}</blockquote>
`;
  }
  html(e, t) {
    return e;
  }
  heading(e, t, r) {
    return `<h${t}>${e}</h${t}>
`;
  }
  hr() {
    return `<hr>
`;
  }
  list(e, t, r) {
    const n = t ? "ol" : "ul", o = t && r !== 1 ? ' start="' + r + '"' : "";
    return "<" + n + o + `>
` + e + "</" + n + `>
`;
  }
  listitem(e, t, r) {
    return `<li>${e}</li>
`;
  }
  checkbox(e) {
    return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
  }
  paragraph(e) {
    return `<p>${e}</p>
`;
  }
  table(e, t) {
    return t && (t = `<tbody>${t}</tbody>`), `<table>
<thead>
` + e + `</thead>
` + t + `</table>
`;
  }
  tablerow(e) {
    return `<tr>
${e}</tr>
`;
  }
  tablecell(e, t) {
    const r = t.header ? "th" : "td";
    return (t.align ? `<${r} align="${t.align}">` : `<${r}>`) + e + `</${r}>
`;
  }
  /**
   * span level renderer
   */
  strong(e) {
    return `<strong>${e}</strong>`;
  }
  em(e) {
    return `<em>${e}</em>`;
  }
  codespan(e) {
    return `<code>${e}</code>`;
  }
  br() {
    return "<br>";
  }
  del(e) {
    return `<del>${e}</del>`;
  }
  link(e, t, r) {
    const n = qa(e);
    if (n === null)
      return r;
    e = n;
    let o = '<a href="' + e + '"';
    return t && (o += ' title="' + t + '"'), o += ">" + r + "</a>", o;
  }
  image(e, t, r) {
    const n = qa(e);
    if (n === null)
      return r;
    e = n;
    let o = `<img src="${e}" alt="${r}"`;
    return t && (o += ` title="${t}"`), o += ">", o;
  }
  text(e) {
    return e;
  }
}
class In {
  // no need for block level renderers
  strong(e) {
    return e;
  }
  em(e) {
    return e;
  }
  codespan(e) {
    return e;
  }
  del(e) {
    return e;
  }
  html(e) {
    return e;
  }
  text(e) {
    return e;
  }
  link(e, t, r) {
    return "" + r;
  }
  image(e, t, r) {
    return "" + r;
  }
  br() {
    return "";
  }
}
class Gt {
  options;
  renderer;
  textRenderer;
  constructor(e) {
    this.options = e || Tr, this.options.renderer = this.options.renderer || new ts(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new In();
  }
  /**
   * Static Parse Method
   */
  static parse(e, t) {
    return new Gt(t).parse(e);
  }
  /**
   * Static Parse Inline Method
   */
  static parseInline(e, t) {
    return new Gt(t).parseInline(e);
  }
  /**
   * Parse Loop
   */
  parse(e, t = !0) {
    let r = "";
    for (let n = 0; n < e.length; n++) {
      const o = e[n];
      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type]) {
        const c = o, s = this.options.extensions.renderers[c.type].call({ parser: this }, c);
        if (s !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(c.type)) {
          r += s || "";
          continue;
        }
      }
      switch (o.type) {
        case "space":
          continue;
        case "hr": {
          r += this.renderer.hr();
          continue;
        }
        case "heading": {
          const c = o;
          r += this.renderer.heading(this.parseInline(c.tokens), c.depth, Su(this.parseInline(c.tokens, this.textRenderer)));
          continue;
        }
        case "code": {
          const c = o;
          r += this.renderer.code(c.text, c.lang, !!c.escaped);
          continue;
        }
        case "table": {
          const c = o;
          let s = "", a = "";
          for (let p = 0; p < c.header.length; p++)
            a += this.renderer.tablecell(this.parseInline(c.header[p].tokens), { header: !0, align: c.align[p] });
          s += this.renderer.tablerow(a);
          let u = "";
          for (let p = 0; p < c.rows.length; p++) {
            const f = c.rows[p];
            a = "";
            for (let g = 0; g < f.length; g++)
              a += this.renderer.tablecell(this.parseInline(f[g].tokens), { header: !1, align: c.align[g] });
            u += this.renderer.tablerow(a);
          }
          r += this.renderer.table(s, u);
          continue;
        }
        case "blockquote": {
          const c = o, s = this.parse(c.tokens);
          r += this.renderer.blockquote(s);
          continue;
        }
        case "list": {
          const c = o, s = c.ordered, a = c.start, u = c.loose;
          let p = "";
          for (let f = 0; f < c.items.length; f++) {
            const g = c.items[f], v = g.checked, C = g.task;
            let b = "";
            if (g.task) {
              const d = this.renderer.checkbox(!!v);
              u ? g.tokens.length > 0 && g.tokens[0].type === "paragraph" ? (g.tokens[0].text = d + " " + g.tokens[0].text, g.tokens[0].tokens && g.tokens[0].tokens.length > 0 && g.tokens[0].tokens[0].type === "text" && (g.tokens[0].tokens[0].text = d + " " + g.tokens[0].tokens[0].text)) : g.tokens.unshift({
                type: "text",
                text: d + " "
              }) : b += d + " ";
            }
            b += this.parse(g.tokens, u), p += this.renderer.listitem(b, C, !!v);
          }
          r += this.renderer.list(p, s, a);
          continue;
        }
        case "html": {
          const c = o;
          r += this.renderer.html(c.text, c.block);
          continue;
        }
        case "paragraph": {
          const c = o;
          r += this.renderer.paragraph(this.parseInline(c.tokens));
          continue;
        }
        case "text": {
          let c = o, s = c.tokens ? this.parseInline(c.tokens) : c.text;
          for (; n + 1 < e.length && e[n + 1].type === "text"; )
            c = e[++n], s += `
` + (c.tokens ? this.parseInline(c.tokens) : c.text);
          r += t ? this.renderer.paragraph(s) : s;
          continue;
        }
        default: {
          const c = 'Token with "' + o.type + '" type was not found.';
          if (this.options.silent)
            return console.error(c), "";
          throw new Error(c);
        }
      }
    }
    return r;
  }
  /**
   * Parse Inline Tokens
   */
  parseInline(e, t) {
    t = t || this.renderer;
    let r = "";
    for (let n = 0; n < e.length; n++) {
      const o = e[n];
      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type]) {
        const c = this.options.extensions.renderers[o.type].call({ parser: this }, o);
        if (c !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(o.type)) {
          r += c || "";
          continue;
        }
      }
      switch (o.type) {
        case "escape": {
          const c = o;
          r += t.text(c.text);
          break;
        }
        case "html": {
          const c = o;
          r += t.html(c.text);
          break;
        }
        case "link": {
          const c = o;
          r += t.link(c.href, c.title, this.parseInline(c.tokens, t));
          break;
        }
        case "image": {
          const c = o;
          r += t.image(c.href, c.title, c.text);
          break;
        }
        case "strong": {
          const c = o;
          r += t.strong(this.parseInline(c.tokens, t));
          break;
        }
        case "em": {
          const c = o;
          r += t.em(this.parseInline(c.tokens, t));
          break;
        }
        case "codespan": {
          const c = o;
          r += t.codespan(c.text);
          break;
        }
        case "br": {
          r += t.br();
          break;
        }
        case "del": {
          const c = o;
          r += t.del(this.parseInline(c.tokens, t));
          break;
        }
        case "text": {
          const c = o;
          r += t.text(c.text);
          break;
        }
        default: {
          const c = 'Token with "' + o.type + '" type was not found.';
          if (this.options.silent)
            return console.error(c), "";
          throw new Error(c);
        }
      }
    }
    return r;
  }
}
class qi {
  options;
  constructor(e) {
    this.options = e || Tr;
  }
  static passThroughHooks = /* @__PURE__ */ new Set([
    "preprocess",
    "postprocess",
    "processAllTokens"
  ]);
  /**
   * Process markdown before marked
   */
  preprocess(e) {
    return e;
  }
  /**
   * Process HTML after marked is finished
   */
  postprocess(e) {
    return e;
  }
  /**
   * Process all tokens before walk tokens
   */
  processAllTokens(e) {
    return e;
  }
}
class ol {
  defaults = Mn();
  options = this.setOptions;
  parse = this.#e(jt.lex, Gt.parse);
  parseInline = this.#e(jt.lexInline, Gt.parseInline);
  Parser = Gt;
  Renderer = ts;
  TextRenderer = In;
  Lexer = jt;
  Tokenizer = Qi;
  Hooks = qi;
  constructor(...e) {
    this.use(...e);
  }
  /**
   * Run callback for every token
   */
  walkTokens(e, t) {
    let r = [];
    for (const n of e)
      switch (r = r.concat(t.call(this, n)), n.type) {
        case "table": {
          const o = n;
          for (const c of o.header)
            r = r.concat(this.walkTokens(c.tokens, t));
          for (const c of o.rows)
            for (const s of c)
              r = r.concat(this.walkTokens(s.tokens, t));
          break;
        }
        case "list": {
          const o = n;
          r = r.concat(this.walkTokens(o.items, t));
          break;
        }
        default: {
          const o = n;
          this.defaults.extensions?.childTokens?.[o.type] ? this.defaults.extensions.childTokens[o.type].forEach((c) => {
            const s = o[c].flat(1 / 0);
            r = r.concat(this.walkTokens(s, t));
          }) : o.tokens && (r = r.concat(this.walkTokens(o.tokens, t)));
        }
      }
    return r;
  }
  use(...e) {
    const t = this.defaults.extensions || { renderers: {}, childTokens: {} };
    return e.forEach((r) => {
      const n = { ...r };
      if (n.async = this.defaults.async || n.async || !1, r.extensions && (r.extensions.forEach((o) => {
        if (!o.name)
          throw new Error("extension name required");
        if ("renderer" in o) {
          const c = t.renderers[o.name];
          c ? t.renderers[o.name] = function(...s) {
            let a = o.renderer.apply(this, s);
            return a === !1 && (a = c.apply(this, s)), a;
          } : t.renderers[o.name] = o.renderer;
        }
        if ("tokenizer" in o) {
          if (!o.level || o.level !== "block" && o.level !== "inline")
            throw new Error("extension level must be 'block' or 'inline'");
          const c = t[o.level];
          c ? c.unshift(o.tokenizer) : t[o.level] = [o.tokenizer], o.start && (o.level === "block" ? t.startBlock ? t.startBlock.push(o.start) : t.startBlock = [o.start] : o.level === "inline" && (t.startInline ? t.startInline.push(o.start) : t.startInline = [o.start]));
        }
        "childTokens" in o && o.childTokens && (t.childTokens[o.name] = o.childTokens);
      }), n.extensions = t), r.renderer) {
        const o = this.defaults.renderer || new ts(this.defaults);
        for (const c in r.renderer) {
          if (!(c in o))
            throw new Error(`renderer '${c}' does not exist`);
          if (c === "options")
            continue;
          const s = c, a = r.renderer[s], u = o[s];
          o[s] = (...p) => {
            let f = a.apply(o, p);
            return f === !1 && (f = u.apply(o, p)), f || "";
          };
        }
        n.renderer = o;
      }
      if (r.tokenizer) {
        const o = this.defaults.tokenizer || new Qi(this.defaults);
        for (const c in r.tokenizer) {
          if (!(c in o))
            throw new Error(`tokenizer '${c}' does not exist`);
          if (["options", "rules", "lexer"].includes(c))
            continue;
          const s = c, a = r.tokenizer[s], u = o[s];
          o[s] = (...p) => {
            let f = a.apply(o, p);
            return f === !1 && (f = u.apply(o, p)), f;
          };
        }
        n.tokenizer = o;
      }
      if (r.hooks) {
        const o = this.defaults.hooks || new qi();
        for (const c in r.hooks) {
          if (!(c in o))
            throw new Error(`hook '${c}' does not exist`);
          if (c === "options")
            continue;
          const s = c, a = r.hooks[s], u = o[s];
          qi.passThroughHooks.has(c) ? o[s] = (p) => {
            if (this.defaults.async)
              return Promise.resolve(a.call(o, p)).then((g) => u.call(o, g));
            const f = a.call(o, p);
            return u.call(o, f);
          } : o[s] = (...p) => {
            let f = a.apply(o, p);
            return f === !1 && (f = u.apply(o, p)), f;
          };
        }
        n.hooks = o;
      }
      if (r.walkTokens) {
        const o = this.defaults.walkTokens, c = r.walkTokens;
        n.walkTokens = function(s) {
          let a = [];
          return a.push(c.call(this, s)), o && (a = a.concat(o.call(this, s))), a;
        };
      }
      this.defaults = { ...this.defaults, ...n };
    }), this;
  }
  setOptions(e) {
    return this.defaults = { ...this.defaults, ...e }, this;
  }
  lexer(e, t) {
    return jt.lex(e, t ?? this.defaults);
  }
  parser(e, t) {
    return Gt.parse(e, t ?? this.defaults);
  }
  #e(e, t) {
    return (r, n) => {
      const o = { ...n }, c = { ...this.defaults, ...o };
      this.defaults.async === !0 && o.async === !1 && (c.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), c.async = !0);
      const s = this.#t(!!c.silent, !!c.async);
      if (typeof r > "u" || r === null)
        return s(new Error("marked(): input parameter is undefined or null"));
      if (typeof r != "string")
        return s(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(r) + ", string expected"));
      if (c.hooks && (c.hooks.options = c), c.async)
        return Promise.resolve(c.hooks ? c.hooks.preprocess(r) : r).then((a) => e(a, c)).then((a) => c.hooks ? c.hooks.processAllTokens(a) : a).then((a) => c.walkTokens ? Promise.all(this.walkTokens(a, c.walkTokens)).then(() => a) : a).then((a) => t(a, c)).then((a) => c.hooks ? c.hooks.postprocess(a) : a).catch(s);
      try {
        c.hooks && (r = c.hooks.preprocess(r));
        let a = e(r, c);
        c.hooks && (a = c.hooks.processAllTokens(a)), c.walkTokens && this.walkTokens(a, c.walkTokens);
        let u = t(a, c);
        return c.hooks && (u = c.hooks.postprocess(u)), u;
      } catch (a) {
        return s(a);
      }
    };
  }
  #t(e, t) {
    return (r) => {
      if (r.message += `
Please report this to https://github.com/markedjs/marked.`, e) {
        const n = "<p>An error occurred:</p><pre>" + ut(r.message + "", !0) + "</pre>";
        return t ? Promise.resolve(n) : n;
      }
      if (t)
        return Promise.reject(r);
      throw r;
    };
  }
}
const Er = new ol();
function Be(i, e) {
  return Er.parse(i, e);
}
Be.options = Be.setOptions = function(i) {
  return Er.setOptions(i), Be.defaults = Er.defaults, Z0(Be.defaults), Be;
};
Be.getDefaults = Mn;
Be.defaults = Tr;
Be.use = function(...i) {
  return Er.use(...i), Be.defaults = Er.defaults, Z0(Be.defaults), Be;
};
Be.walkTokens = function(i, e) {
  return Er.walkTokens(i, e);
};
Be.parseInline = Er.parseInline;
Be.Parser = Gt;
Be.parser = Gt.parse;
Be.Renderer = ts;
Be.TextRenderer = In;
Be.Lexer = jt;
Be.lexer = jt.lex;
Be.Tokenizer = Qi;
Be.Hooks = qi;
Be.parse = Be;
Be.options;
Be.setOptions;
Be.use;
Be.walkTokens;
Be.parseInline;
Gt.parse;
jt.lex;
function Ju(i) {
  if (typeof i == "function" && (i = {
    highlight: i
  }), !i || typeof i.highlight != "function")
    throw new Error("Must provide highlight function");
  return typeof i.langPrefix != "string" && (i.langPrefix = "language-"), typeof i.emptyLangClass != "string" && (i.emptyLangClass = ""), {
    async: !!i.async,
    walkTokens(e) {
      if (e.type !== "code")
        return;
      const t = Ga(e.lang);
      if (i.async)
        return Promise.resolve(i.highlight(e.text, t, e.lang || "")).then(Va(e));
      const r = i.highlight(e.text, t, e.lang || "");
      if (r instanceof Promise)
        throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");
      Va(e)(r);
    },
    useNewRenderer: !0,
    renderer: {
      code(e, t, r) {
        typeof e == "object" && (r = e.escaped, t = e.lang, e = e.text);
        const n = Ga(t), o = n ? i.langPrefix + Xa(n) : i.emptyLangClass, c = o ? ` class="${o}"` : "";
        return e = e.replace(/\n$/, ""), `<pre><code${c}>${r ? e : Xa(e, !0)}
</code></pre>`;
      }
    }
  };
}
function Ga(i) {
  return (i || "").match(/\S*/)[0];
}
function Va(i) {
  return (e) => {
    typeof e == "string" && e !== i.text && (i.escaped = !0, i.text = e);
  };
}
const ll = /[&<>"']/, Qu = new RegExp(ll.source, "g"), hl = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, e1 = new RegExp(hl.source, "g"), t1 = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, Ka = (i) => t1[i];
function Xa(i, e) {
  if (e) {
    if (ll.test(i))
      return i.replace(Qu, Ka);
  } else if (hl.test(i))
    return i.replace(e1, Ka);
  return i;
}
const r1 = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, i1 = Object.hasOwnProperty;
class Pn {
  /**
   * Create a new slug class.
   */
  constructor() {
    this.occurrences, this.reset();
  }
  /**
   * Generate a unique slug.
  *
  * Tracks previously generated slugs: repeated calls with the same value
  * will result in different slugs.
  * Use the `slug` function to get same slugs.
   *
   * @param  {string} value
   *   String of text to slugify
   * @param  {boolean} [maintainCase=false]
   *   Keep the current case, otherwise make all lowercase
   * @return {string}
   *   A unique slug string
   */
  slug(e, t) {
    const r = this;
    let n = s1(e, t === !0);
    const o = n;
    for (; i1.call(r.occurrences, n); )
      r.occurrences[o]++, n = o + "-" + r.occurrences[o];
    return r.occurrences[n] = 0, n;
  }
  /**
   * Reset - Forget all previous slugs
   *
   * @return void
   */
  reset() {
    this.occurrences = /* @__PURE__ */ Object.create(null);
  }
}
function s1(i, e) {
  return typeof i != "string" ? "" : (e || (i = i.toLowerCase()), i.replace(r1, "").replace(/ /g, "-"));
}
let cl = new Pn(), ul = [];
function n1({ prefix: i = "", globalSlugs: e = !1 } = {}) {
  return {
    headerIds: !1,
    // prevent deprecation warning; remove this once headerIds option is removed
    hooks: {
      preprocess(t) {
        return e || a1(), t;
      }
    },
    renderer: {
      heading(t, r, n) {
        n = n.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, "");
        const o = `${i}${cl.slug(n)}`, c = { level: r, text: t, id: o };
        return ul.push(c), `<h${r} id="${o}">${t}</h${r}>
`;
      }
    }
  };
}
function a1() {
  ul = [], cl = new Pn();
}
var Ya = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, dl = { exports: {} };
(function(i) {
  var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
  /**
   * Prism: Lightweight, robust, elegant syntax highlighting
   *
   * @license MIT <https://opensource.org/licenses/MIT>
   * @author Lea Verou <https://lea.verou.me>
   * @namespace
   * @public
   */
  var t = function(r) {
    var n = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, o = 0, c = {}, s = {
      /**
       * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
       * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
       * additional languages or plugins yourself.
       *
       * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
       *
       * You obviously have to change this value before the automatic highlighting started. To do this, you can add an
       * empty Prism object into the global scope before loading the Prism script like this:
       *
       * ```js
       * window.Prism = window.Prism || {};
       * Prism.manual = true;
       * // add a new <script> to load Prism's script
       * ```
       *
       * @default false
       * @type {boolean}
       * @memberof Prism
       * @public
       */
      manual: r.Prism && r.Prism.manual,
      /**
       * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
       * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
       * own worker, you don't want it to do this.
       *
       * By setting this value to `true`, Prism will not add its own listeners to the worker.
       *
       * You obviously have to change this value before Prism executes. To do this, you can add an
       * empty Prism object into the global scope before loading the Prism script like this:
       *
       * ```js
       * window.Prism = window.Prism || {};
       * Prism.disableWorkerMessageHandler = true;
       * // Load Prism's script
       * ```
       *
       * @default false
       * @type {boolean}
       * @memberof Prism
       * @public
       */
      disableWorkerMessageHandler: r.Prism && r.Prism.disableWorkerMessageHandler,
      /**
       * A namespace for utility methods.
       *
       * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
       * change or disappear at any time.
       *
       * @namespace
       * @memberof Prism
       */
      util: {
        encode: function h(l) {
          return l instanceof a ? new a(l.type, h(l.content), l.alias) : Array.isArray(l) ? l.map(h) : l.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
        },
        /**
         * Returns the name of the type of the given value.
         *
         * @param {any} o
         * @returns {string}
         * @example
         * type(null)      === 'Null'
         * type(undefined) === 'Undefined'
         * type(123)       === 'Number'
         * type('foo')     === 'String'
         * type(true)      === 'Boolean'
         * type([1, 2])    === 'Array'
         * type({})        === 'Object'
         * type(String)    === 'Function'
         * type(/abc+/)    === 'RegExp'
         */
        type: function(h) {
          return Object.prototype.toString.call(h).slice(8, -1);
        },
        /**
         * Returns a unique number for the given object. Later calls will still return the same number.
         *
         * @param {Object} obj
         * @returns {number}
         */
        objId: function(h) {
          return h.__id || Object.defineProperty(h, "__id", { value: ++o }), h.__id;
        },
        /**
         * Creates a deep clone of the given object.
         *
         * The main intended use of this function is to clone language definitions.
         *
         * @param {T} o
         * @param {Record<number, any>} [visited]
         * @returns {T}
         * @template T
         */
        clone: function h(l, _) {
          _ = _ || {};
          var S, x;
          switch (s.util.type(l)) {
            case "Object":
              if (x = s.util.objId(l), _[x])
                return _[x];
              S = /** @type {Record<string, any>} */
              {}, _[x] = S;
              for (var D in l)
                l.hasOwnProperty(D) && (S[D] = h(l[D], _));
              return (
                /** @type {any} */
                S
              );
            case "Array":
              return x = s.util.objId(l), _[x] ? _[x] : (S = [], _[x] = S, /** @type {Array} */
              /** @type {any} */
              l.forEach(function(y, E) {
                S[E] = h(y, _);
              }), /** @type {any} */
              S);
            default:
              return l;
          }
        },
        /**
         * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
         *
         * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
         *
         * @param {Element} element
         * @returns {string}
         */
        getLanguage: function(h) {
          for (; h; ) {
            var l = n.exec(h.className);
            if (l)
              return l[1].toLowerCase();
            h = h.parentElement;
          }
          return "none";
        },
        /**
         * Sets the Prism `language-xxxx` class of the given element.
         *
         * @param {Element} element
         * @param {string} language
         * @returns {void}
         */
        setLanguage: function(h, l) {
          h.className = h.className.replace(RegExp(n, "gi"), ""), h.classList.add("language-" + l);
        },
        /**
         * Returns the script element that is currently executing.
         *
         * This does __not__ work for line script element.
         *
         * @returns {HTMLScriptElement | null}
         */
        currentScript: function() {
          if (typeof document > "u")
            return null;
          if ("currentScript" in document)
            return (
              /** @type {any} */
              document.currentScript
            );
          try {
            throw new Error();
          } catch (S) {
            var h = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(S.stack) || [])[1];
            if (h) {
              var l = document.getElementsByTagName("script");
              for (var _ in l)
                if (l[_].src == h)
                  return l[_];
            }
            return null;
          }
        },
        /**
         * Returns whether a given class is active for `element`.
         *
         * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
         * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
         * given class is just the given class with a `no-` prefix.
         *
         * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
         * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
         * ancestors have the given class or the negated version of it, then the default activation will be returned.
         *
         * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
         * version of it, the class is considered active.
         *
         * @param {Element} element
         * @param {string} className
         * @param {boolean} [defaultActivation=false]
         * @returns {boolean}
         */
        isActive: function(h, l, _) {
          for (var S = "no-" + l; h; ) {
            var x = h.classList;
            if (x.contains(l))
              return !0;
            if (x.contains(S))
              return !1;
            h = h.parentElement;
          }
          return !!_;
        }
      },
      /**
       * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
       *
       * @namespace
       * @memberof Prism
       * @public
       */
      languages: {
        /**
         * The grammar for plain, unformatted text.
         */
        plain: c,
        plaintext: c,
        text: c,
        txt: c,
        /**
         * Creates a deep copy of the language with the given id and appends the given tokens.
         *
         * If a token in `redef` also appears in the copied language, then the existing token in the copied language
         * will be overwritten at its original position.
         *
         * ## Best practices
         *
         * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
         * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
         * understand the language definition because, normally, the order of tokens matters in Prism grammars.
         *
         * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
         * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
         *
         * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
         * @param {Grammar} redef The new tokens to append.
         * @returns {Grammar} The new language created.
         * @public
         * @example
         * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
         *     // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
         *     // at its original position
         *     'comment': { ... },
         *     // CSS doesn't have a 'color' token, so this token will be appended
         *     'color': /\b(?:red|green|blue)\b/
         * });
         */
        extend: function(h, l) {
          var _ = s.util.clone(s.languages[h]);
          for (var S in l)
            _[S] = l[S];
          return _;
        },
        /**
         * Inserts tokens _before_ another token in a language definition or any other grammar.
         *
         * ## Usage
         *
         * This helper method makes it easy to modify existing languages. For example, the CSS language definition
         * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
         * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
         * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
         * this:
         *
         * ```js
         * Prism.languages.markup.style = {
         *     // token
         * };
         * ```
         *
         * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
         * before existing tokens. For the CSS example above, you would use it like this:
         *
         * ```js
         * Prism.languages.insertBefore('markup', 'cdata', {
         *     'style': {
         *         // token
         *     }
         * });
         * ```
         *
         * ## Special cases
         *
         * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
         * will be ignored.
         *
         * This behavior can be used to insert tokens after `before`:
         *
         * ```js
         * Prism.languages.insertBefore('markup', 'comment', {
         *     'comment': Prism.languages.markup.comment,
         *     // tokens after 'comment'
         * });
         * ```
         *
         * ## Limitations
         *
         * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
         * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
         * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
         * deleting properties which is necessary to insert at arbitrary positions.
         *
         * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
         * Instead, it will create a new object and replace all references to the target object with the new one. This
         * can be done without temporarily deleting properties, so the iteration order is well-defined.
         *
         * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
         * you hold the target object in a variable, then the value of the variable will not change.
         *
         * ```js
         * var oldMarkup = Prism.languages.markup;
         * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
         *
         * assert(oldMarkup !== Prism.languages.markup);
         * assert(newMarkup === Prism.languages.markup);
         * ```
         *
         * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
         * object to be modified.
         * @param {string} before The key to insert before.
         * @param {Grammar} insert An object containing the key-value pairs to be inserted.
         * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
         * object to be modified.
         *
         * Defaults to `Prism.languages`.
         * @returns {Grammar} The new grammar object.
         * @public
         */
        insertBefore: function(h, l, _, S) {
          S = S || /** @type {any} */
          s.languages;
          var x = S[h], D = {};
          for (var y in x)
            if (x.hasOwnProperty(y)) {
              if (y == l)
                for (var E in _)
                  _.hasOwnProperty(E) && (D[E] = _[E]);
              _.hasOwnProperty(y) || (D[y] = x[y]);
            }
          var B = S[h];
          return S[h] = D, s.languages.DFS(s.languages, function(O, N) {
            N === B && O != h && (this[O] = D);
          }), D;
        },
        // Traverse a language definition with Depth First Search
        DFS: function h(l, _, S, x) {
          x = x || {};
          var D = s.util.objId;
          for (var y in l)
            if (l.hasOwnProperty(y)) {
              _.call(l, y, l[y], S || y);
              var E = l[y], B = s.util.type(E);
              B === "Object" && !x[D(E)] ? (x[D(E)] = !0, h(E, _, null, x)) : B === "Array" && !x[D(E)] && (x[D(E)] = !0, h(E, _, y, x));
            }
        }
      },
      plugins: {},
      /**
       * This is the most high-level function in Prism’s API.
       * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on
       * each one of them.
       *
       * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.
       *
       * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.
       * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.
       * @memberof Prism
       * @public
       */
      highlightAll: function(h, l) {
        s.highlightAllUnder(document, h, l);
      },
      /**
       * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
       * {@link Prism.highlightElement} on each one of them.
       *
       * The following hooks will be run:
       * 1. `before-highlightall`
       * 2. `before-all-elements-highlight`
       * 3. All hooks of {@link Prism.highlightElement} for each element.
       *
       * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
       * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
       * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.
       * @memberof Prism
       * @public
       */
      highlightAllUnder: function(h, l, _) {
        var S = {
          callback: _,
          container: h,
          selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
        };
        s.hooks.run("before-highlightall", S), S.elements = Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)), s.hooks.run("before-all-elements-highlight", S);
        for (var x = 0, D; D = S.elements[x++]; )
          s.highlightElement(D, l === !0, S.callback);
      },
      /**
       * Highlights the code inside a single element.
       *
       * The following hooks will be run:
       * 1. `before-sanity-check`
       * 2. `before-highlight`
       * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
       * 4. `before-insert`
       * 5. `after-highlight`
       * 6. `complete`
       *
       * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
       * the element's language.
       *
       * @param {Element} element The element containing the code.
       * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
       * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
       * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is
       * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).
       *
       * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for
       * asynchronous highlighting to work. You can build your own bundle on the
       * [Download page](https://prismjs.com/download.html).
       * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.
       * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.
       * @memberof Prism
       * @public
       */
      highlightElement: function(h, l, _) {
        var S = s.util.getLanguage(h), x = s.languages[S];
        s.util.setLanguage(h, S);
        var D = h.parentElement;
        D && D.nodeName.toLowerCase() === "pre" && s.util.setLanguage(D, S);
        var y = h.textContent, E = {
          element: h,
          language: S,
          grammar: x,
          code: y
        };
        function B(N) {
          E.highlightedCode = N, s.hooks.run("before-insert", E), E.element.innerHTML = E.highlightedCode, s.hooks.run("after-highlight", E), s.hooks.run("complete", E), _ && _.call(E.element);
        }
        if (s.hooks.run("before-sanity-check", E), D = E.element.parentElement, D && D.nodeName.toLowerCase() === "pre" && !D.hasAttribute("tabindex") && D.setAttribute("tabindex", "0"), !E.code) {
          s.hooks.run("complete", E), _ && _.call(E.element);
          return;
        }
        if (s.hooks.run("before-highlight", E), !E.grammar) {
          B(s.util.encode(E.code));
          return;
        }
        if (l && r.Worker) {
          var O = new Worker(s.filename);
          O.onmessage = function(N) {
            B(N.data);
          }, O.postMessage(JSON.stringify({
            language: E.language,
            code: E.code,
            immediateClose: !0
          }));
        } else
          B(s.highlight(E.code, E.grammar, E.language));
      },
      /**
       * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
       * and the language definitions to use, and returns a string with the HTML produced.
       *
       * The following hooks will be run:
       * 1. `before-tokenize`
       * 2. `after-tokenize`
       * 3. `wrap`: On each {@link Token}.
       *
       * @param {string} text A string with the code to be highlighted.
       * @param {Grammar} grammar An object containing the tokens to use.
       *
       * Usually a language definition like `Prism.languages.markup`.
       * @param {string} language The name of the language definition passed to `grammar`.
       * @returns {string} The highlighted HTML.
       * @memberof Prism
       * @public
       * @example
       * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
       */
      highlight: function(h, l, _) {
        var S = {
          code: h,
          grammar: l,
          language: _
        };
        if (s.hooks.run("before-tokenize", S), !S.grammar)
          throw new Error('The language "' + S.language + '" has no grammar.');
        return S.tokens = s.tokenize(S.code, S.grammar), s.hooks.run("after-tokenize", S), a.stringify(s.util.encode(S.tokens), S.language);
      },
      /**
       * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
       * and the language definitions to use, and returns an array with the tokenized code.
       *
       * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
       *
       * This method could be useful in other contexts as well, as a very crude parser.
       *
       * @param {string} text A string with the code to be highlighted.
       * @param {Grammar} grammar An object containing the tokens to use.
       *
       * Usually a language definition like `Prism.languages.markup`.
       * @returns {TokenStream} An array of strings and tokens, a token stream.
       * @memberof Prism
       * @public
       * @example
       * let code = `var foo = 0;`;
       * let tokens = Prism.tokenize(code, Prism.languages.javascript);
       * tokens.forEach(token => {
       *     if (token instanceof Prism.Token && token.type === 'number') {
       *         console.log(`Found numeric literal: ${token.content}`);
       *     }
       * });
       */
      tokenize: function(h, l) {
        var _ = l.rest;
        if (_) {
          for (var S in _)
            l[S] = _[S];
          delete l.rest;
        }
        var x = new f();
        return g(x, x.head, h), p(h, x, l, x.head, 0), C(x);
      },
      /**
       * @namespace
       * @memberof Prism
       * @public
       */
      hooks: {
        all: {},
        /**
         * Adds the given callback to the list of callbacks for the given hook.
         *
         * The callback will be invoked when the hook it is registered for is run.
         * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
         *
         * One callback function can be registered to multiple hooks and the same hook multiple times.
         *
         * @param {string} name The name of the hook.
         * @param {HookCallback} callback The callback function which is given environment variables.
         * @public
         */
        add: function(h, l) {
          var _ = s.hooks.all;
          _[h] = _[h] || [], _[h].push(l);
        },
        /**
         * Runs a hook invoking all registered callbacks with the given environment variables.
         *
         * Callbacks will be invoked synchronously and in the order in which they were registered.
         *
         * @param {string} name The name of the hook.
         * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
         * @public
         */
        run: function(h, l) {
          var _ = s.hooks.all[h];
          if (!(!_ || !_.length))
            for (var S = 0, x; x = _[S++]; )
              x(l);
        }
      },
      Token: a
    };
    r.Prism = s;
    function a(h, l, _, S) {
      this.type = h, this.content = l, this.alias = _, this.length = (S || "").length | 0;
    }
    a.stringify = function h(l, _) {
      if (typeof l == "string")
        return l;
      if (Array.isArray(l)) {
        var S = "";
        return l.forEach(function(B) {
          S += h(B, _);
        }), S;
      }
      var x = {
        type: l.type,
        content: h(l.content, _),
        tag: "span",
        classes: ["token", l.type],
        attributes: {},
        language: _
      }, D = l.alias;
      D && (Array.isArray(D) ? Array.prototype.push.apply(x.classes, D) : x.classes.push(D)), s.hooks.run("wrap", x);
      var y = "";
      for (var E in x.attributes)
        y += " " + E + '="' + (x.attributes[E] || "").replace(/"/g, "&quot;") + '"';
      return "<" + x.tag + ' class="' + x.classes.join(" ") + '"' + y + ">" + x.content + "</" + x.tag + ">";
    };
    function u(h, l, _, S) {
      h.lastIndex = l;
      var x = h.exec(_);
      if (x && S && x[1]) {
        var D = x[1].length;
        x.index += D, x[0] = x[0].slice(D);
      }
      return x;
    }
    function p(h, l, _, S, x, D) {
      for (var y in _)
        if (!(!_.hasOwnProperty(y) || !_[y])) {
          var E = _[y];
          E = Array.isArray(E) ? E : [E];
          for (var B = 0; B < E.length; ++B) {
            if (D && D.cause == y + "," + B)
              return;
            var O = E[B], N = O.inside, R = !!O.lookbehind, j = !!O.greedy, Y = O.alias;
            if (j && !O.pattern.global) {
              var ee = O.pattern.toString().match(/[imsuy]*$/)[0];
              O.pattern = RegExp(O.pattern.source, ee + "g");
            }
            for (var ne = O.pattern || O, Z = S.next, T = x; Z !== l.tail && !(D && T >= D.reach); T += Z.value.length, Z = Z.next) {
              var L = Z.value;
              if (l.length > h.length)
                return;
              if (!(L instanceof a)) {
                var I = 1, H;
                if (j) {
                  if (H = u(ne, T, h, R), !H || H.index >= h.length)
                    break;
                  var ue = H.index, K = H.index + H[0].length, re = T;
                  for (re += Z.value.length; ue >= re; )
                    Z = Z.next, re += Z.value.length;
                  if (re -= Z.value.length, T = re, Z.value instanceof a)
                    continue;
                  for (var V = Z; V !== l.tail && (re < K || typeof V.value == "string"); V = V.next)
                    I++, re += V.value.length;
                  I--, L = h.slice(T, re), H.index -= T;
                } else if (H = u(ne, 0, L, R), !H)
                  continue;
                var ue = H.index, W = H[0], F = L.slice(0, ue), X = L.slice(ue + W.length), J = T + L.length;
                D && J > D.reach && (D.reach = J);
                var oe = Z.prev;
                F && (oe = g(l, oe, F), T += F.length), v(l, oe, I);
                var se = new a(y, N ? s.tokenize(W, N) : W, Y, W);
                if (Z = g(l, oe, se), X && g(l, Z, X), I > 1) {
                  var be = {
                    cause: y + "," + B,
                    reach: J
                  };
                  p(h, l, _, Z.prev, T, be), D && be.reach > D.reach && (D.reach = be.reach);
                }
              }
            }
          }
        }
    }
    function f() {
      var h = { value: null, prev: null, next: null }, l = { value: null, prev: h, next: null };
      h.next = l, this.head = h, this.tail = l, this.length = 0;
    }
    function g(h, l, _) {
      var S = l.next, x = { value: _, prev: l, next: S };
      return l.next = x, S.prev = x, h.length++, x;
    }
    function v(h, l, _) {
      for (var S = l.next, x = 0; x < _ && S !== h.tail; x++)
        S = S.next;
      l.next = S, S.prev = l, h.length -= x;
    }
    function C(h) {
      for (var l = [], _ = h.head.next; _ !== h.tail; )
        l.push(_.value), _ = _.next;
      return l;
    }
    if (!r.document)
      return r.addEventListener && (s.disableWorkerMessageHandler || r.addEventListener("message", function(h) {
        var l = JSON.parse(h.data), _ = l.language, S = l.code, x = l.immediateClose;
        r.postMessage(s.highlight(S, s.languages[_], _)), x && r.close();
      }, !1)), s;
    var b = s.util.currentScript();
    b && (s.filename = b.src, b.hasAttribute("data-manual") && (s.manual = !0));
    function d() {
      s.manual || s.highlightAll();
    }
    if (!s.manual) {
      var m = document.readyState;
      m === "loading" || m === "interactive" && b && b.defer ? document.addEventListener("DOMContentLoaded", d) : window.requestAnimationFrame ? window.requestAnimationFrame(d) : window.setTimeout(d, 16);
    }
    return s;
  }(e);
  i.exports && (i.exports = t), typeof Ya < "u" && (Ya.Prism = t), t.languages.markup = {
    comment: {
      pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
      greedy: !0
    },
    prolog: {
      pattern: /<\?[\s\S]+?\?>/,
      greedy: !0
    },
    doctype: {
      // https://www.w3.org/TR/xml/#NT-doctypedecl
      pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
      greedy: !0,
      inside: {
        "internal-subset": {
          pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
          lookbehind: !0,
          greedy: !0,
          inside: null
          // see below
        },
        string: {
          pattern: /"[^"]*"|'[^']*'/,
          greedy: !0
        },
        punctuation: /^<!|>$|[[\]]/,
        "doctype-tag": /^DOCTYPE/i,
        name: /[^\s<>'"]+/
      }
    },
    cdata: {
      pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
      greedy: !0
    },
    tag: {
      pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
      greedy: !0,
      inside: {
        tag: {
          pattern: /^<\/?[^\s>\/]+/,
          inside: {
            punctuation: /^<\/?/,
            namespace: /^[^\s>\/:]+:/
          }
        },
        "special-attr": [],
        "attr-value": {
          pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
          inside: {
            punctuation: [
              {
                pattern: /^=/,
                alias: "attr-equals"
              },
              {
                pattern: /^(\s*)["']|["']$/,
                lookbehind: !0
              }
            ]
          }
        },
        punctuation: /\/?>/,
        "attr-name": {
          pattern: /[^\s>\/]+/,
          inside: {
            namespace: /^[^\s>\/:]+:/
          }
        }
      }
    },
    entity: [
      {
        pattern: /&[\da-z]{1,8};/i,
        alias: "named-entity"
      },
      /&#x?[\da-f]{1,8};/i
    ]
  }, t.languages.markup.tag.inside["attr-value"].inside.entity = t.languages.markup.entity, t.languages.markup.doctype.inside["internal-subset"].inside = t.languages.markup, t.hooks.add("wrap", function(r) {
    r.type === "entity" && (r.attributes.title = r.content.replace(/&amp;/, "&"));
  }), Object.defineProperty(t.languages.markup.tag, "addInlined", {
    /**
     * Adds an inlined language to markup.
     *
     * An example of an inlined language is CSS with `<style>` tags.
     *
     * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
     * case insensitive.
     * @param {string} lang The language key.
     * @example
     * addInlined('style', 'css');
     */
    value: function(n, o) {
      var c = {};
      c["language-" + o] = {
        pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
        lookbehind: !0,
        inside: t.languages[o]
      }, c.cdata = /^<!\[CDATA\[|\]\]>$/i;
      var s = {
        "included-cdata": {
          pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
          inside: c
        }
      };
      s["language-" + o] = {
        pattern: /[\s\S]+/,
        inside: t.languages[o]
      };
      var a = {};
      a[n] = {
        pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
          return n;
        }), "i"),
        lookbehind: !0,
        greedy: !0,
        inside: s
      }, t.languages.insertBefore("markup", "cdata", a);
    }
  }), Object.defineProperty(t.languages.markup.tag, "addAttribute", {
    /**
     * Adds an pattern to highlight languages embedded in HTML attributes.
     *
     * An example of an inlined language is CSS with `style` attributes.
     *
     * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
     * case insensitive.
     * @param {string} lang The language key.
     * @example
     * addAttribute('style', 'css');
     */
    value: function(r, n) {
      t.languages.markup.tag.inside["special-attr"].push({
        pattern: RegExp(
          /(^|["'\s])/.source + "(?:" + r + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
          "i"
        ),
        lookbehind: !0,
        inside: {
          "attr-name": /^[^\s=]+/,
          "attr-value": {
            pattern: /=[\s\S]+/,
            inside: {
              value: {
                pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
                lookbehind: !0,
                alias: [n, "language-" + n],
                inside: t.languages[n]
              },
              punctuation: [
                {
                  pattern: /^=/,
                  alias: "attr-equals"
                },
                /"|'/
              ]
            }
          }
        }
      });
    }
  }), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, function(r) {
    var n = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
    r.languages.css = {
      comment: /\/\*[\s\S]*?\*\//,
      atrule: {
        pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + n.source + ")*?" + /(?:;|(?=\s*\{))/.source),
        inside: {
          rule: /^@[\w-]+/,
          "selector-function-argument": {
            pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
            lookbehind: !0,
            alias: "selector"
          },
          keyword: {
            pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
            lookbehind: !0
          }
          // See rest below
        }
      },
      url: {
        // https://drafts.csswg.org/css-values-3/#urls
        pattern: RegExp("\\burl\\((?:" + n.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
        greedy: !0,
        inside: {
          function: /^url/i,
          punctuation: /^\(|\)$/,
          string: {
            pattern: RegExp("^" + n.source + "$"),
            alias: "url"
          }
        }
      },
      selector: {
        pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + n.source + ")*(?=\\s*\\{)"),
        lookbehind: !0
      },
      string: {
        pattern: n,
        greedy: !0
      },
      property: {
        pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
        lookbehind: !0
      },
      important: /!important\b/i,
      function: {
        pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
        lookbehind: !0
      },
      punctuation: /[(){};:,]/
    }, r.languages.css.atrule.inside.rest = r.languages.css;
    var o = r.languages.markup;
    o && (o.tag.addInlined("style", "css"), o.tag.addAttribute("style", "css"));
  }(t), t.languages.clike = {
    comment: [
      {
        pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
        lookbehind: !0,
        greedy: !0
      },
      {
        pattern: /(^|[^\\:])\/\/.*/,
        lookbehind: !0,
        greedy: !0
      }
    ],
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: !0
    },
    "class-name": {
      pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
      lookbehind: !0,
      inside: {
        punctuation: /[.\\]/
      }
    },
    keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
    boolean: /\b(?:false|true)\b/,
    function: /\b\w+(?=\()/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
    punctuation: /[{}[\];(),.:]/
  }, t.languages.javascript = t.languages.extend("clike", {
    "class-name": [
      t.languages.clike["class-name"],
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
        lookbehind: !0
      }
    ],
    keyword: [
      {
        pattern: /((?:^|\})\s*)catch\b/,
        lookbehind: !0
      },
      {
        pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
        lookbehind: !0
      }
    ],
    // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
    function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
    number: {
      pattern: RegExp(
        /(^|[^\w$])/.source + "(?:" + // constant
        (/NaN|Infinity/.source + "|" + // binary integer
        /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
        /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
        /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
        /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
        /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
      ),
      lookbehind: !0
    },
    operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
  }), t.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, t.languages.insertBefore("javascript", "keyword", {
    regex: {
      pattern: RegExp(
        // lookbehind
        // eslint-disable-next-line regexp/no-dupe-characters-character-class
        /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
        // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
        // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
        // with the only syntax, so we have to define 2 different regex patterns.
        /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
        /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
        /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
      ),
      lookbehind: !0,
      greedy: !0,
      inside: {
        "regex-source": {
          pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
          lookbehind: !0,
          alias: "language-regex",
          inside: t.languages.regex
        },
        "regex-delimiter": /^\/|\/$/,
        "regex-flags": /^[a-z]+$/
      }
    },
    // This must be declared before keyword because we use "function" inside the look-forward
    "function-variable": {
      pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
      alias: "function"
    },
    parameter: [
      {
        pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
        lookbehind: !0,
        inside: t.languages.javascript
      },
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
        lookbehind: !0,
        inside: t.languages.javascript
      },
      {
        pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
        lookbehind: !0,
        inside: t.languages.javascript
      },
      {
        pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
        lookbehind: !0,
        inside: t.languages.javascript
      }
    ],
    constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
  }), t.languages.insertBefore("javascript", "string", {
    hashbang: {
      pattern: /^#!.*/,
      greedy: !0,
      alias: "comment"
    },
    "template-string": {
      pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
      greedy: !0,
      inside: {
        "template-punctuation": {
          pattern: /^`|`$/,
          alias: "string"
        },
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
          lookbehind: !0,
          inside: {
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            rest: t.languages.javascript
          }
        },
        string: /[\s\S]+/
      }
    },
    "string-property": {
      pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
      lookbehind: !0,
      greedy: !0,
      alias: "property"
    }
  }), t.languages.insertBefore("javascript", "operator", {
    "literal-property": {
      pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
      lookbehind: !0,
      alias: "property"
    }
  }), t.languages.markup && (t.languages.markup.tag.addInlined("script", "javascript"), t.languages.markup.tag.addAttribute(
    /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
    "javascript"
  )), t.languages.js = t.languages.javascript, function() {
    if (typeof t > "u" || typeof document > "u")
      return;
    Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
    var r = "Loading…", n = function(b, d) {
      return "✖ Error " + b + " while fetching file: " + d;
    }, o = "✖ Error: File does not exist or is empty", c = {
      js: "javascript",
      py: "python",
      rb: "ruby",
      ps1: "powershell",
      psm1: "powershell",
      sh: "bash",
      bat: "batch",
      h: "c",
      tex: "latex"
    }, s = "data-src-status", a = "loading", u = "loaded", p = "failed", f = "pre[data-src]:not([" + s + '="' + u + '"]):not([' + s + '="' + a + '"])';
    function g(b, d, m) {
      var h = new XMLHttpRequest();
      h.open("GET", b, !0), h.onreadystatechange = function() {
        h.readyState == 4 && (h.status < 400 && h.responseText ? d(h.responseText) : h.status >= 400 ? m(n(h.status, h.statusText)) : m(o));
      }, h.send(null);
    }
    function v(b) {
      var d = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b || "");
      if (d) {
        var m = Number(d[1]), h = d[2], l = d[3];
        return h ? l ? [m, Number(l)] : [m, void 0] : [m, m];
      }
    }
    t.hooks.add("before-highlightall", function(b) {
      b.selector += ", " + f;
    }), t.hooks.add("before-sanity-check", function(b) {
      var d = (
        /** @type {HTMLPreElement} */
        b.element
      );
      if (d.matches(f)) {
        b.code = "", d.setAttribute(s, a);
        var m = d.appendChild(document.createElement("CODE"));
        m.textContent = r;
        var h = d.getAttribute("data-src"), l = b.language;
        if (l === "none") {
          var _ = (/\.(\w+)$/.exec(h) || [, "none"])[1];
          l = c[_] || _;
        }
        t.util.setLanguage(m, l), t.util.setLanguage(d, l);
        var S = t.plugins.autoloader;
        S && S.loadLanguages(l), g(
          h,
          function(x) {
            d.setAttribute(s, u);
            var D = v(d.getAttribute("data-range"));
            if (D) {
              var y = x.split(/\r\n?|\n/g), E = D[0], B = D[1] == null ? y.length : D[1];
              E < 0 && (E += y.length), E = Math.max(0, Math.min(E - 1, y.length)), B < 0 && (B += y.length), B = Math.max(0, Math.min(B, y.length)), x = y.slice(E, B).join(`
`), d.hasAttribute("data-start") || d.setAttribute("data-start", String(E + 1));
            }
            m.textContent = x, t.highlightElement(m);
          },
          function(x) {
            d.setAttribute(s, p), m.textContent = x;
          }
        );
      }
    }), t.plugins.fileHighlight = {
      /**
       * Executes the File Highlight plugin for all matching `pre` elements under the given container.
       *
       * Note: Elements which are already loaded or currently loading will not be touched by this method.
       *
       * @param {ParentNode} [container=document]
       */
      highlight: function(d) {
        for (var m = (d || document).querySelectorAll(f), h = 0, l; l = m[h++]; )
          t.highlightElement(l);
      }
    };
    var C = !1;
    t.fileHighlight = function() {
      C || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), C = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
    };
  }();
})(dl);
var As = dl.exports;
Prism.languages.python = {
  comment: {
    pattern: /(^|[^\\])#.*/,
    lookbehind: !0,
    greedy: !0
  },
  "string-interpolation": {
    pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
    greedy: !0,
    inside: {
      interpolation: {
        // "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
        pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
        lookbehind: !0,
        inside: {
          "format-spec": {
            pattern: /(:)[^:(){}]+(?=\}$)/,
            lookbehind: !0
          },
          "conversion-option": {
            pattern: /![sra](?=[:}]$)/,
            alias: "punctuation"
          },
          rest: null
        }
      },
      string: /[\s\S]+/
    }
  },
  "triple-quoted-string": {
    pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
    greedy: !0,
    alias: "string"
  },
  string: {
    pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
    greedy: !0
  },
  function: {
    pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
    lookbehind: !0
  },
  "class-name": {
    pattern: /(\bclass\s+)\w+/i,
    lookbehind: !0
  },
  decorator: {
    pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
    lookbehind: !0,
    alias: ["annotation", "punctuation"],
    inside: {
      punctuation: /\./
    }
  },
  keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
  builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
  boolean: /\b(?:False|None|True)\b/,
  number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
  operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
  punctuation: /[{}[\];(),.:]/
};
Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python;
Prism.languages.py = Prism.languages.python;
(function(i) {
  var e = /\\(?:[^a-z()[\]]|[a-z*]+)/i, t = {
    "equation-command": {
      pattern: e,
      alias: "regex"
    }
  };
  i.languages.latex = {
    comment: /%.*/,
    // the verbatim environment prints whitespace to the document
    cdata: {
      pattern: /(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
      lookbehind: !0
    },
    /*
     * equations can be between $$ $$ or $ $ or \( \) or \[ \]
     * (all are multiline)
     */
    equation: [
      {
        pattern: /\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,
        inside: t,
        alias: "string"
      },
      {
        pattern: /(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
        lookbehind: !0,
        inside: t,
        alias: "string"
      }
    ],
    /*
     * arguments which are keywords or references are highlighted
     * as keywords
     */
    keyword: {
      pattern: /(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
      lookbehind: !0
    },
    url: {
      pattern: /(\\url\{)[^}]+(?=\})/,
      lookbehind: !0
    },
    /*
     * section or chapter headlines are highlighted as bold so that
     * they stand out more
     */
    headline: {
      pattern: /(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
      lookbehind: !0,
      alias: "class-name"
    },
    function: {
      pattern: e,
      alias: "selector"
    },
    punctuation: /[[\]{}&]/
  }, i.languages.tex = i.languages.latex, i.languages.context = i.languages.latex;
})(Prism);
(function(i) {
  var e = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", t = {
    pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
    lookbehind: !0,
    alias: "punctuation",
    // this looks reasonably well in all themes
    inside: null
    // see below
  }, r = {
    bash: t,
    environment: {
      pattern: RegExp("\\$" + e),
      alias: "constant"
    },
    variable: [
      // [0]: Arithmetic Environment
      {
        pattern: /\$?\(\([\s\S]+?\)\)/,
        greedy: !0,
        inside: {
          // If there is a $ sign at the beginning highlight $(( and )) as variable
          variable: [
            {
              pattern: /(^\$\(\([\s\S]+)\)\)/,
              lookbehind: !0
            },
            /^\$\(\(/
          ],
          number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
          // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
          operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
          // If there is no $ sign at the beginning highlight (( and )) as punctuation
          punctuation: /\(\(?|\)\)?|,|;/
        }
      },
      // [1]: Command Substitution
      {
        pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
        greedy: !0,
        inside: {
          variable: /^\$\(|^`|\)$|`$/
        }
      },
      // [2]: Brace expansion
      {
        pattern: /\$\{[^}]+\}/,
        greedy: !0,
        inside: {
          operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
          punctuation: /[\[\]]/,
          environment: {
            pattern: RegExp("(\\{)" + e),
            lookbehind: !0,
            alias: "constant"
          }
        }
      },
      /\$(?:\w+|[#?*!@$])/
    ],
    // Escape sequences from echo and printf's manuals, and escaped quotes.
    entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
  };
  i.languages.bash = {
    shebang: {
      pattern: /^#!\s*\/.*/,
      alias: "important"
    },
    comment: {
      pattern: /(^|[^"{\\$])#.*/,
      lookbehind: !0
    },
    "function-name": [
      // a) function foo {
      // b) foo() {
      // c) function foo() {
      // but not “foo {”
      {
        // a) and c)
        pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
        lookbehind: !0,
        alias: "function"
      },
      {
        // b)
        pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
        alias: "function"
      }
    ],
    // Highlight variable names as variables in for and select beginnings.
    "for-or-select": {
      pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
      alias: "variable",
      lookbehind: !0
    },
    // Highlight variable names as variables in the left-hand part
    // of assignments (“=” and “+=”).
    "assign-left": {
      pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
      inside: {
        environment: {
          pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + e),
          lookbehind: !0,
          alias: "constant"
        }
      },
      alias: "variable",
      lookbehind: !0
    },
    // Highlight parameter names as variables
    parameter: {
      pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
      alias: "variable",
      lookbehind: !0
    },
    string: [
      // Support for Here-documents https://en.wikipedia.org/wiki/Here_document
      {
        pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
        lookbehind: !0,
        greedy: !0,
        inside: r
      },
      // Here-document with quotes around the tag
      // → No expansion (so no “inside”).
      {
        pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
        lookbehind: !0,
        greedy: !0,
        inside: {
          bash: t
        }
      },
      // “Normal” string
      {
        // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
        pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
        lookbehind: !0,
        greedy: !0,
        inside: r
      },
      {
        // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
        pattern: /(^|[^$\\])'[^']*'/,
        lookbehind: !0,
        greedy: !0
      },
      {
        // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
        pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
        greedy: !0,
        inside: {
          entity: r.entity
        }
      }
    ],
    environment: {
      pattern: RegExp("\\$?" + e),
      alias: "constant"
    },
    variable: r.variable,
    function: {
      pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    keyword: {
      pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
    builtin: {
      pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
      lookbehind: !0,
      // Alias added to make those easier to distinguish from strings.
      alias: "class-name"
    },
    boolean: {
      pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    "file-descriptor": {
      pattern: /\B&\d\b/,
      alias: "important"
    },
    operator: {
      // Lots of redirections here, but not just that.
      pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
      inside: {
        "file-descriptor": {
          pattern: /^\d/,
          alias: "important"
        }
      }
    },
    punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
    number: {
      pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
      lookbehind: !0
    }
  }, t.inside = i.languages.bash;
  for (var n = [
    "comment",
    "function-name",
    "for-or-select",
    "assign-left",
    "parameter",
    "string",
    "environment",
    "function",
    "keyword",
    "builtin",
    "boolean",
    "file-descriptor",
    "operator",
    "punctuation",
    "number"
  ], o = r.variable[1].inside, c = 0; c < n.length; c++)
    o[n[c]] = i.languages.bash[n[c]];
  i.languages.sh = i.languages.bash, i.languages.shell = i.languages.bash;
})(Prism);
const o1 = '<svg class="md-link-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true" fill="currentColor"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>', l1 = `
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" color="currentColor" aria-hidden="true" aria-label="Copy" stroke-width="1.3" width="15" height="15">
  <path fill="currentColor" d="M12.728 4.545v8.182H4.545V4.545zm0 -0.909H4.545a0.909 0.909 0 0 0 -0.909 0.909v8.182a0.909 0.909 0 0 0 0.909 0.909h8.182a0.909 0.909 0 0 0 0.909 -0.909V4.545a0.909 0.909 0 0 0 -0.909 -0.909"/>
  <path fill="currentColor" d="M1.818 8.182H0.909V1.818a0.909 0.909 0 0 1 0.909 -0.909h6.364v0.909H1.818Z"/>
</svg>

`, h1 = `<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 17 17" aria-hidden="true" aria-label="Copied" fill="none" stroke="currentColor" stroke-width="1.3">
  <path d="m13.813 4.781 -7.438 7.438 -3.188 -3.188"/>
</svg>
`, $a = `<button title="copy" class="copy_code_button">
  <span class="copy-text">${l1}</span>
  <span class="check">${h1}</span>
</button>`, fl = /[&<>"']/, c1 = new RegExp(fl.source, "g"), ml = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, u1 = new RegExp(ml.source, "g"), d1 = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, Za = (i) => d1[i] || "";
function Ts(i, e) {
  if (e) {
    if (fl.test(i))
      return i.replace(c1, Za);
  } else if (ml.test(i))
    return i.replace(u1, Za);
  return i;
}
function f1(i) {
  const e = i.map((t) => ({
    start: new RegExp(t.left.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")),
    end: new RegExp(t.right.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"))
  }));
  return {
    name: "latex",
    level: "block",
    start(t) {
      for (const r of e) {
        const n = t.match(r.start);
        if (n)
          return n.index;
      }
      return -1;
    },
    tokenizer(t, r) {
      for (const n of e) {
        const o = new RegExp(
          `${n.start.source}([\\s\\S]+?)${n.end.source}`
        ).exec(t);
        if (o)
          return {
            type: "latex",
            raw: o[0],
            text: o[1].trim()
          };
      }
    },
    renderer(t) {
      return `<div class="latex-block">${t.text}</div>`;
    }
  };
}
const m1 = {
  code(i, e, t) {
    const r = (e ?? "").match(/\S*/)?.[0] ?? "";
    return i = i.replace(/\n$/, "") + `
`, r ? '<div class="code_wrap">' + $a + '<pre><code class="language-' + Ts(r) + '">' + (t ? i : Ts(i, !0)) + `</code></pre></div>
` : '<div class="code_wrap">' + $a + "<pre><code>" + (t ? i : Ts(i, !0)) + `</code></pre></div>
`;
  }
}, p1 = new Pn();
function _1({
  header_links: i,
  line_breaks: e,
  latex_delimiters: t
}) {
  const r = new ol();
  r.use(
    {
      gfm: !0,
      pedantic: !1,
      breaks: e
    },
    Ju({
      highlight: (o, c) => As.languages[c] ? As.highlight(o, As.languages[c], c) : o
    }),
    { renderer: m1 }
  ), i && (r.use(n1()), r.use({
    extensions: [
      {
        name: "heading",
        level: "block",
        renderer(o) {
          const c = o.raw.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, ""), s = "h" + p1.slug(c), a = o.depth, u = this.parser.parseInline(o.tokens);
          return `<h${a} id="${s}"><a class="md-header-anchor" href="#${s}">${o1}</a>${u}</h${a}>
`;
        }
      }
    ]
  }));
  const n = f1(t);
  return r.use({
    extensions: [n]
  }), r;
}
const Js = (i) => JSON.parse(JSON.stringify(i)), g1 = (i) => i.nodeType === 1, v1 = (i) => H1.has(i.tagName), b1 = (i) => "action" in i, w1 = (i) => i.tagName === "IFRAME", y1 = (i) => "formAction" in i, S1 = (i) => "protocol" in i, Ai = /* @__PURE__ */ (() => {
  const i = /^(?:\w+script|data):/i;
  return (e) => i.test(e);
})(), C1 = /* @__PURE__ */ (() => {
  const i = /(?:script|data):/i;
  return (e) => i.test(e);
})(), x1 = (i) => {
  const e = {};
  for (let t = 0, r = i.length; t < r; t++) {
    const n = i[t];
    for (const o in n)
      e[o] ? e[o] = e[o].concat(n[o]) : e[o] = n[o];
  }
  return e;
}, pl = (i, e) => {
  let t = i.firstChild;
  for (; t; ) {
    const r = t.nextSibling;
    g1(t) && (e(t, i), t.parentNode && pl(t, e)), t = r;
  }
}, k1 = (i, e) => {
  const t = document.createNodeIterator(i, NodeFilter.SHOW_ELEMENT);
  let r;
  for (; r = t.nextNode(); ) {
    const n = r.parentNode;
    n && e(r, n);
  }
}, D1 = (i, e) => !!globalThis.document && !!globalThis.document.createNodeIterator ? k1(i, e) : pl(i, e), _l = [
  "a",
  "abbr",
  "acronym",
  "address",
  "area",
  "article",
  "aside",
  "audio",
  "b",
  "bdi",
  "bdo",
  "bgsound",
  "big",
  "blockquote",
  "body",
  "br",
  "button",
  "canvas",
  "caption",
  "center",
  "cite",
  "code",
  "col",
  "colgroup",
  "datalist",
  "dd",
  "del",
  "details",
  "dfn",
  "dialog",
  "dir",
  "div",
  "dl",
  "dt",
  "em",
  "fieldset",
  "figcaption",
  "figure",
  "font",
  "footer",
  "form",
  "h1",
  "h2",
  "h3",
  "h4",
  "h5",
  "h6",
  "head",
  "header",
  "hgroup",
  "hr",
  "html",
  "i",
  "img",
  "input",
  "ins",
  "kbd",
  "keygen",
  "label",
  "layer",
  "legend",
  "li",
  "link",
  "listing",
  "main",
  "map",
  "mark",
  "marquee",
  "menu",
  "meta",
  "meter",
  "nav",
  "nobr",
  "ol",
  "optgroup",
  "option",
  "output",
  "p",
  "picture",
  "popup",
  "pre",
  "progress",
  "q",
  "rb",
  "rp",
  "rt",
  "rtc",
  "ruby",
  "s",
  "samp",
  "section",
  "select",
  "selectmenu",
  "small",
  "source",
  "span",
  "strike",
  "strong",
  "style",
  "sub",
  "summary",
  "sup",
  "table",
  "tbody",
  "td",
  "tfoot",
  "th",
  "thead",
  "time",
  "tr",
  "track",
  "tt",
  "u",
  "ul",
  "var",
  "video",
  "wbr"
], E1 = [
  "basefont",
  "command",
  "data",
  "iframe",
  "image",
  "plaintext",
  "portal",
  "slot",
  // 'template', //TODO: Not exactly correct to never allow this, too strict
  "textarea",
  "title",
  "xmp"
], A1 = /* @__PURE__ */ new Set([
  ..._l,
  ...E1
]), gl = [
  "svg",
  "a",
  "altglyph",
  "altglyphdef",
  "altglyphitem",
  "animatecolor",
  "animatemotion",
  "animatetransform",
  "circle",
  "clippath",
  "defs",
  "desc",
  "ellipse",
  "filter",
  "font",
  "g",
  "glyph",
  "glyphref",
  "hkern",
  "image",
  "line",
  "lineargradient",
  "marker",
  "mask",
  "metadata",
  "mpath",
  "path",
  "pattern",
  "polygon",
  "polyline",
  "radialgradient",
  "rect",
  "stop",
  "style",
  "switch",
  "symbol",
  "text",
  "textpath",
  "title",
  "tref",
  "tspan",
  "view",
  "vkern",
  /* FILTERS */
  "feBlend",
  "feColorMatrix",
  "feComponentTransfer",
  "feComposite",
  "feConvolveMatrix",
  "feDiffuseLighting",
  "feDisplacementMap",
  "feDistantLight",
  "feFlood",
  "feFuncA",
  "feFuncB",
  "feFuncG",
  "feFuncR",
  "feGaussianBlur",
  "feImage",
  "feMerge",
  "feMergeNode",
  "feMorphology",
  "feOffset",
  "fePointLight",
  "feSpecularLighting",
  "feSpotLight",
  "feTile",
  "feTurbulence"
], T1 = [
  "animate",
  "color-profile",
  "cursor",
  "discard",
  "fedropshadow",
  "font-face",
  "font-face-format",
  "font-face-name",
  "font-face-src",
  "font-face-uri",
  "foreignobject",
  "hatch",
  "hatchpath",
  "mesh",
  "meshgradient",
  "meshpatch",
  "meshrow",
  "missing-glyph",
  "script",
  "set",
  "solidcolor",
  "unknown",
  "use"
], M1 = /* @__PURE__ */ new Set([
  ...gl,
  ...T1
]), vl = [
  "math",
  "menclose",
  "merror",
  "mfenced",
  "mfrac",
  "mglyph",
  "mi",
  "mlabeledtr",
  "mmultiscripts",
  "mn",
  "mo",
  "mover",
  "mpadded",
  "mphantom",
  "mroot",
  "mrow",
  "ms",
  "mspace",
  "msqrt",
  "mstyle",
  "msub",
  "msup",
  "msubsup",
  "mtable",
  "mtd",
  "mtext",
  "mtr",
  "munder",
  "munderover"
], B1 = [
  "maction",
  "maligngroup",
  "malignmark",
  "mlongdiv",
  "mscarries",
  "mscarry",
  "msgroup",
  "mstack",
  "msline",
  "msrow",
  "semantics",
  "annotation",
  "annotation-xml",
  "mprescripts",
  "none"
], F1 = /* @__PURE__ */ new Set([
  ...vl,
  ...B1
]), R1 = [
  "abbr",
  "accept",
  "accept-charset",
  "accesskey",
  "action",
  "align",
  "alink",
  "allow",
  "allowfullscreen",
  "alt",
  "anchor",
  "archive",
  "as",
  "async",
  "autocapitalize",
  "autocomplete",
  "autocorrect",
  "autofocus",
  "autopictureinpicture",
  "autoplay",
  "axis",
  "background",
  "behavior",
  "bgcolor",
  "border",
  "bordercolor",
  "capture",
  "cellpadding",
  "cellspacing",
  "challenge",
  "char",
  "charoff",
  "charset",
  "checked",
  "cite",
  "class",
  "classid",
  "clear",
  "code",
  "codebase",
  "codetype",
  "color",
  "cols",
  "colspan",
  "compact",
  "content",
  "contenteditable",
  "controls",
  "controlslist",
  "conversiondestination",
  "coords",
  "crossorigin",
  "csp",
  "data",
  "datetime",
  "declare",
  "decoding",
  "default",
  "defer",
  "dir",
  "direction",
  "dirname",
  "disabled",
  "disablepictureinpicture",
  "disableremoteplayback",
  "disallowdocumentaccess",
  "download",
  "draggable",
  "elementtiming",
  "enctype",
  "end",
  "enterkeyhint",
  "event",
  "exportparts",
  "face",
  "for",
  "form",
  "formaction",
  "formenctype",
  "formmethod",
  "formnovalidate",
  "formtarget",
  "frame",
  "frameborder",
  "headers",
  "height",
  "hidden",
  "high",
  "href",
  "hreflang",
  "hreftranslate",
  "hspace",
  "http-equiv",
  "id",
  "imagesizes",
  "imagesrcset",
  "importance",
  "impressiondata",
  "impressionexpiry",
  "incremental",
  "inert",
  "inputmode",
  "integrity",
  "invisible",
  "ismap",
  "keytype",
  "kind",
  "label",
  "lang",
  "language",
  "latencyhint",
  "leftmargin",
  "link",
  "list",
  "loading",
  "longdesc",
  "loop",
  "low",
  "lowsrc",
  "manifest",
  "marginheight",
  "marginwidth",
  "max",
  "maxlength",
  "mayscript",
  "media",
  "method",
  "min",
  "minlength",
  "multiple",
  "muted",
  "name",
  "nohref",
  "nomodule",
  "nonce",
  "noresize",
  "noshade",
  "novalidate",
  "nowrap",
  "object",
  "open",
  "optimum",
  "part",
  "pattern",
  "ping",
  "placeholder",
  "playsinline",
  "policy",
  "poster",
  "preload",
  "pseudo",
  "readonly",
  "referrerpolicy",
  "rel",
  "reportingorigin",
  "required",
  "resources",
  "rev",
  "reversed",
  "role",
  "rows",
  "rowspan",
  "rules",
  "sandbox",
  "scheme",
  "scope",
  "scopes",
  "scrollamount",
  "scrolldelay",
  "scrolling",
  "select",
  "selected",
  "shadowroot",
  "shadowrootdelegatesfocus",
  "shape",
  "size",
  "sizes",
  "slot",
  "span",
  "spellcheck",
  "src",
  "srclang",
  "srcset",
  "standby",
  "start",
  "step",
  "style",
  "summary",
  "tabindex",
  "target",
  "text",
  "title",
  "topmargin",
  "translate",
  "truespeed",
  "trusttoken",
  "type",
  "usemap",
  "valign",
  "value",
  "valuetype",
  "version",
  "virtualkeyboardpolicy",
  "vlink",
  "vspace",
  "webkitdirectory",
  "width",
  "wrap"
], L1 = [
  "accent-height",
  "accumulate",
  "additive",
  "alignment-baseline",
  "ascent",
  "attributename",
  "attributetype",
  "azimuth",
  "basefrequency",
  "baseline-shift",
  "begin",
  "bias",
  "by",
  "class",
  "clip",
  "clippathunits",
  "clip-path",
  "clip-rule",
  "color",
  "color-interpolation",
  "color-interpolation-filters",
  "color-profile",
  "color-rendering",
  "cx",
  "cy",
  "d",
  "dx",
  "dy",
  "diffuseconstant",
  "direction",
  "display",
  "divisor",
  "dominant-baseline",
  "dur",
  "edgemode",
  "elevation",
  "end",
  "fill",
  "fill-opacity",
  "fill-rule",
  "filter",
  "filterunits",
  "flood-color",
  "flood-opacity",
  "font-family",
  "font-size",
  "font-size-adjust",
  "font-stretch",
  "font-style",
  "font-variant",
  "font-weight",
  "fx",
  "fy",
  "g1",
  "g2",
  "glyph-name",
  "glyphref",
  "gradientunits",
  "gradienttransform",
  "height",
  "href",
  "id",
  "image-rendering",
  "in",
  "in2",
  "k",
  "k1",
  "k2",
  "k3",
  "k4",
  "kerning",
  "keypoints",
  "keysplines",
  "keytimes",
  "lang",
  "lengthadjust",
  "letter-spacing",
  "kernelmatrix",
  "kernelunitlength",
  "lighting-color",
  "local",
  "marker-end",
  "marker-mid",
  "marker-start",
  "markerheight",
  "markerunits",
  "markerwidth",
  "maskcontentunits",
  "maskunits",
  "max",
  "mask",
  "media",
  "method",
  "mode",
  "min",
  "name",
  "numoctaves",
  "offset",
  "operator",
  "opacity",
  "order",
  "orient",
  "orientation",
  "origin",
  "overflow",
  "paint-order",
  "path",
  "pathlength",
  "patterncontentunits",
  "patterntransform",
  "patternunits",
  "points",
  "preservealpha",
  "preserveaspectratio",
  "primitiveunits",
  "r",
  "rx",
  "ry",
  "radius",
  "refx",
  "refy",
  "repeatcount",
  "repeatdur",
  "restart",
  "result",
  "rotate",
  "scale",
  "seed",
  "shape-rendering",
  "specularconstant",
  "specularexponent",
  "spreadmethod",
  "startoffset",
  "stddeviation",
  "stitchtiles",
  "stop-color",
  "stop-opacity",
  "stroke-dasharray",
  "stroke-dashoffset",
  "stroke-linecap",
  "stroke-linejoin",
  "stroke-miterlimit",
  "stroke-opacity",
  "stroke",
  "stroke-width",
  "style",
  "surfacescale",
  "systemlanguage",
  "tabindex",
  "targetx",
  "targety",
  "transform",
  "transform-origin",
  "text-anchor",
  "text-decoration",
  "text-rendering",
  "textlength",
  "type",
  "u1",
  "u2",
  "unicode",
  "values",
  "viewbox",
  "visibility",
  "version",
  "vert-adv-y",
  "vert-origin-x",
  "vert-origin-y",
  "width",
  "word-spacing",
  "wrap",
  "writing-mode",
  "xchannelselector",
  "ychannelselector",
  "x",
  "x1",
  "x2",
  "xmlns",
  "y",
  "y1",
  "y2",
  "z",
  "zoomandpan"
], O1 = [
  "accent",
  "accentunder",
  "align",
  "bevelled",
  "close",
  "columnsalign",
  "columnlines",
  "columnspan",
  "denomalign",
  "depth",
  "dir",
  "display",
  "displaystyle",
  "encoding",
  "fence",
  "frame",
  "height",
  "href",
  "id",
  "largeop",
  "length",
  "linethickness",
  "lspace",
  "lquote",
  "mathbackground",
  "mathcolor",
  "mathsize",
  "mathvariant",
  "maxsize",
  "minsize",
  "movablelimits",
  "notation",
  "numalign",
  "open",
  "rowalign",
  "rowlines",
  "rowspacing",
  "rowspan",
  "rspace",
  "rquote",
  "scriptlevel",
  "scriptminsize",
  "scriptsizemultiplier",
  "selection",
  "separator",
  "separators",
  "stretchy",
  "subscriptshift",
  "supscriptshift",
  "symmetric",
  "voffset",
  "width",
  "xmlns"
], zt = {
  HTML: "http://www.w3.org/1999/xhtml",
  SVG: "http://www.w3.org/2000/svg",
  MATH: "http://www.w3.org/1998/Math/MathML"
}, I1 = {
  [zt.HTML]: A1,
  [zt.SVG]: M1,
  [zt.MATH]: F1
}, P1 = {
  [zt.HTML]: "html",
  [zt.SVG]: "svg",
  [zt.MATH]: "math"
}, z1 = {
  [zt.HTML]: "",
  [zt.SVG]: "svg:",
  [zt.MATH]: "math:"
}, H1 = /* @__PURE__ */ new Set([
  "A",
  "AREA",
  "BUTTON",
  "FORM",
  "IFRAME",
  "INPUT"
]), bl = {
  allowComments: !0,
  allowCustomElements: !1,
  allowUnknownMarkup: !1,
  allowElements: [
    ..._l,
    ...gl.map((i) => `svg:${i}`),
    ...vl.map((i) => `math:${i}`)
  ],
  allowAttributes: x1([
    Object.fromEntries(R1.map((i) => [i, ["*"]])),
    Object.fromEntries(L1.map((i) => [i, ["svg:*"]])),
    Object.fromEntries(O1.map((i) => [i, ["math:*"]]))
  ])
};
var Ms = function(i, e, t, r, n) {
  if (r === "m") throw new TypeError("Private method is not writable");
  if (r === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
  if (typeof e == "function" ? i !== e || !n : !e.has(i)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return r === "a" ? n.call(i, t) : n ? n.value = t : e.set(i, t), t;
}, xr = function(i, e, t, r) {
  if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
  if (typeof e == "function" ? i !== e || !r : !e.has(i)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return t === "m" ? r : t === "a" ? r.call(i) : r ? r.value : e.get(i);
}, mr, Ui, Wi;
class wl {
  /* CONSTRUCTOR */
  constructor(e = {}) {
    mr.set(this, void 0), Ui.set(this, void 0), Wi.set(this, void 0), this.getConfiguration = () => Js(xr(this, mr, "f")), this.sanitize = (p) => {
      const f = xr(this, Ui, "f"), g = xr(this, Wi, "f");
      return D1(p, (v, C) => {
        const b = v.namespaceURI || zt.HTML, d = C.namespaceURI || zt.HTML, m = I1[b], h = P1[b], l = z1[b], _ = v.tagName.toLowerCase(), S = `${l}${_}`, D = `${l}*`;
        if (!m.has(_) || !f.has(S) || b !== d && _ !== h)
          C.removeChild(v);
        else {
          const y = v.getAttributeNames(), E = y.length;
          if (E) {
            for (let B = 0; B < E; B++) {
              const O = y[B], N = g[O];
              (!N || !N.has(D) && !N.has(S)) && v.removeAttribute(O);
            }
            if (v1(v))
              if (S1(v)) {
                const B = v.getAttribute("href");
                B && C1(B) && Ai(v.protocol) && v.removeAttribute("href");
              } else b1(v) ? Ai(v.action) && v.removeAttribute("action") : y1(v) ? Ai(v.formAction) && v.removeAttribute("formaction") : w1(v) && (Ai(v.src) && v.removeAttribute("formaction"), v.setAttribute("sandbox", "allow-scripts"));
          }
        }
      }), p;
    }, this.sanitizeFor = (p, f) => {
      throw new Error('"sanitizeFor" is not implemented yet');
    };
    const { allowComments: t, allowCustomElements: r, allowUnknownMarkup: n, blockElements: o, dropElements: c, dropAttributes: s } = e;
    if (t === !1)
      throw new Error('A false "allowComments" is not supported yet');
    if (r)
      throw new Error('A true "allowCustomElements" is not supported yet');
    if (n)
      throw new Error('A true "allowUnknownMarkup" is not supported yet');
    if (o)
      throw new Error('"blockElements" is not supported yet, use "allowElements" instead');
    if (c)
      throw new Error('"dropElements" is not supported yet, use "allowElements" instead');
    if (s)
      throw new Error('"dropAttributes" is not supported yet, use "allowAttributes" instead');
    Ms(this, mr, Js(bl), "f");
    const { allowElements: a, allowAttributes: u } = e;
    a && (xr(this, mr, "f").allowElements = e.allowElements), u && (xr(this, mr, "f").allowAttributes = e.allowAttributes), Ms(this, Ui, new Set(xr(this, mr, "f").allowElements), "f"), Ms(this, Wi, Object.fromEntries(Object.entries(xr(this, mr, "f").allowAttributes || {}).map(([p, f]) => [p, new Set(f)])), "f");
  }
}
mr = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap();
wl.getDefaultConfiguration = () => Js(bl);
const N1 = (i, e) => {
  try {
    return !!i && new URL(i).origin !== new URL(e).origin;
  } catch {
    return !1;
  }
};
function Ja(i, e) {
  const t = new wl(), r = new DOMParser().parseFromString(i, "text/html");
  return yl(r.body, "A", (n) => {
    n instanceof HTMLElement && "target" in n && N1(n.getAttribute("href"), e) && (n.setAttribute("target", "_blank"), n.setAttribute("rel", "noopener noreferrer"));
  }), t.sanitize(r).body.innerHTML;
}
function yl(i, e, t) {
  i && (i.nodeName === e || typeof e == "function") && t(i);
  const r = i?.childNodes || [];
  for (let n = 0; n < r.length; n++)
    yl(r[n], e, t);
}
const {
  HtmlTagHydration: q1,
  SvelteComponent: U1,
  attr: W1,
  binding_callbacks: j1,
  children: G1,
  claim_element: V1,
  claim_html_tag: K1,
  detach: Qa,
  element: X1,
  init: Y1,
  insert_hydration: $1,
  noop: eo,
  safe_not_equal: Z1,
  toggle_class: Ti
} = window.__gradio__svelte__internal, { afterUpdate: J1 } = window.__gradio__svelte__internal;
function Q1(i) {
  let e, t;
  return {
    c() {
      e = X1("span"), t = new q1(!1), this.h();
    },
    l(r) {
      e = V1(r, "SPAN", { class: !0 });
      var n = G1(e);
      t = K1(n, !1), n.forEach(Qa), this.h();
    },
    h() {
      t.a = null, W1(e, "class", "md svelte-1m32c2s"), Ti(
        e,
        "chatbot",
        /*chatbot*/
        i[0]
      ), Ti(
        e,
        "prose",
        /*render_markdown*/
        i[1]
      );
    },
    m(r, n) {
      $1(r, e, n), t.m(
        /*html*/
        i[3],
        e
      ), i[10](e);
    },
    p(r, [n]) {
      n & /*html*/
      8 && t.p(
        /*html*/
        r[3]
      ), n & /*chatbot*/
      1 && Ti(
        e,
        "chatbot",
        /*chatbot*/
        r[0]
      ), n & /*render_markdown*/
      2 && Ti(
        e,
        "prose",
        /*render_markdown*/
        r[1]
      );
    },
    i: eo,
    o: eo,
    d(r) {
      r && Qa(e), i[10](null);
    }
  };
}
function to(i) {
  return i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function ed(i, e, t) {
  let { chatbot: r = !0 } = e, { message: n } = e, { sanitize_html: o = !0 } = e, { latex_delimiters: c = [] } = e, { render_markdown: s = !0 } = e, { line_breaks: a = !0 } = e, { header_links: u = !1 } = e, { root: p } = e, f, g;
  const v = _1({
    header_links: u,
    line_breaks: a,
    latex_delimiters: c
  });
  function C(m) {
    let h = m;
    if (s) {
      const l = [];
      c.forEach((_, S) => {
        const x = to(_.left), D = to(_.right), y = new RegExp(`${x}([\\s\\S]+?)${D}`, "g");
        h = h.replace(y, (E, B) => (l.push(E), `%%%LATEX_BLOCK_${l.length - 1}%%%`));
      }), h = v.parse(h), h = h.replace(/%%%LATEX_BLOCK_(\d+)%%%/g, (_, S) => l[parseInt(S, 10)]);
    }
    return o && Ja && (h = Ja(h, p)), h;
  }
  async function b(m) {
    c.length > 0 && m && c.some((l) => m.includes(l.left) && m.includes(l.right)) && gu(f, {
      delimiters: c,
      throwOnError: !1
    });
  }
  J1(async () => {
    f && document.body.contains(f) ? await b(n) : console.error("Element is not in the DOM");
  });
  function d(m) {
    j1[m ? "unshift" : "push"](() => {
      f = m, t(2, f);
    });
  }
  return i.$$set = (m) => {
    "chatbot" in m && t(0, r = m.chatbot), "message" in m && t(4, n = m.message), "sanitize_html" in m && t(5, o = m.sanitize_html), "latex_delimiters" in m && t(6, c = m.latex_delimiters), "render_markdown" in m && t(1, s = m.render_markdown), "line_breaks" in m && t(7, a = m.line_breaks), "header_links" in m && t(8, u = m.header_links), "root" in m && t(9, p = m.root);
  }, i.$$.update = () => {
    i.$$.dirty & /*message*/
    16 && (n && n.trim() ? t(3, g = C(n)) : t(3, g = ""));
  }, [
    r,
    s,
    f,
    g,
    n,
    o,
    c,
    a,
    u,
    p,
    d
  ];
}
class td extends U1 {
  constructor(e) {
    super(), Y1(this, e, ed, Q1, Z1, {
      chatbot: 0,
      message: 4,
      sanitize_html: 5,
      latex_delimiters: 6,
      render_markdown: 1,
      line_breaks: 7,
      header_links: 8,
      root: 9
    });
  }
}
const {
  SvelteComponent: rd,
  attr: id,
  children: sd,
  claim_component: nd,
  claim_element: ad,
  create_component: od,
  destroy_component: ld,
  detach: ro,
  element: hd,
  init: cd,
  insert_hydration: ud,
  mount_component: dd,
  safe_not_equal: fd,
  transition_in: md,
  transition_out: pd
} = window.__gradio__svelte__internal;
function _d(i) {
  let e, t, r;
  return t = new td({
    props: {
      root: (
        /*root*/
        i[1]
      ),
      message: (
        /*info*/
        i[0]
      ),
      sanitize_html: !0
    }
  }), {
    c() {
      e = hd("div"), od(t.$$.fragment), this.h();
    },
    l(n) {
      e = ad(n, "DIV", { class: !0 });
      var o = sd(e);
      nd(t.$$.fragment, o), o.forEach(ro), this.h();
    },
    h() {
      id(e, "class", "svelte-17qq50w");
    },
    m(n, o) {
      ud(n, e, o), dd(t, e, null), r = !0;
    },
    p(n, [o]) {
      const c = {};
      o & /*root*/
      2 && (c.root = /*root*/
      n[1]), o & /*info*/
      1 && (c.message = /*info*/
      n[0]), t.$set(c);
    },
    i(n) {
      r || (md(t.$$.fragment, n), r = !0);
    },
    o(n) {
      pd(t.$$.fragment, n), r = !1;
    },
    d(n) {
      n && ro(e), ld(t);
    }
  };
}
function gd(i, e, t) {
  let { info: r } = e, { root: n } = e;
  return i.$$set = (o) => {
    "info" in o && t(0, r = o.info), "root" in o && t(1, n = o.root);
  }, [r, n];
}
class vd extends rd {
  constructor(e) {
    super(), cd(this, e, gd, _d, fd, { info: 0, root: 1 });
  }
}
const {
  SvelteComponent: bd,
  attr: io,
  check_outros: wd,
  children: yd,
  claim_component: Sd,
  claim_element: Cd,
  claim_space: xd,
  create_component: kd,
  create_slot: Dd,
  destroy_component: Ed,
  detach: Mi,
  element: Ad,
  empty: so,
  get_all_dirty_from_scope: Td,
  get_slot_changes: Md,
  group_outros: Bd,
  init: Fd,
  insert_hydration: Bs,
  mount_component: Rd,
  safe_not_equal: Ld,
  space: Od,
  toggle_class: Pr,
  transition_in: ri,
  transition_out: ji,
  update_slot_base: Id
} = window.__gradio__svelte__internal;
function no(i) {
  let e, t;
  return e = new vd({
    props: {
      root: (
        /*root*/
        i[2]
      ),
      info: (
        /*info*/
        i[1]
      )
    }
  }), {
    c() {
      kd(e.$$.fragment);
    },
    l(r) {
      Sd(e.$$.fragment, r);
    },
    m(r, n) {
      Rd(e, r, n), t = !0;
    },
    p(r, n) {
      const o = {};
      n & /*root*/
      4 && (o.root = /*root*/
      r[2]), n & /*info*/
      2 && (o.info = /*info*/
      r[1]), e.$set(o);
    },
    i(r) {
      t || (ri(e.$$.fragment, r), t = !0);
    },
    o(r) {
      ji(e.$$.fragment, r), t = !1;
    },
    d(r) {
      Ed(e, r);
    }
  };
}
function Pd(i) {
  let e, t, r, n;
  const o = (
    /*#slots*/
    i[4].default
  ), c = Dd(
    o,
    i,
    /*$$scope*/
    i[3],
    null
  );
  let s = (
    /*info*/
    i[1] && no(i)
  );
  return {
    c() {
      e = Ad("span"), c && c.c(), t = Od(), s && s.c(), r = so(), this.h();
    },
    l(a) {
      e = Cd(a, "SPAN", { "data-testid": !0, class: !0 });
      var u = yd(e);
      c && c.l(u), u.forEach(Mi), t = xd(a), s && s.l(a), r = so(), this.h();
    },
    h() {
      io(e, "data-testid", "block-info"), io(e, "class", "svelte-22c38v"), Pr(e, "sr-only", !/*show_label*/
      i[0]), Pr(e, "hide", !/*show_label*/
      i[0]), Pr(
        e,
        "has-info",
        /*info*/
        i[1] != null
      );
    },
    m(a, u) {
      Bs(a, e, u), c && c.m(e, null), Bs(a, t, u), s && s.m(a, u), Bs(a, r, u), n = !0;
    },
    p(a, [u]) {
      c && c.p && (!n || u & /*$$scope*/
      8) && Id(
        c,
        o,
        a,
        /*$$scope*/
        a[3],
        n ? Md(
          o,
          /*$$scope*/
          a[3],
          u,
          null
        ) : Td(
          /*$$scope*/
          a[3]
        ),
        null
      ), (!n || u & /*show_label*/
      1) && Pr(e, "sr-only", !/*show_label*/
      a[0]), (!n || u & /*show_label*/
      1) && Pr(e, "hide", !/*show_label*/
      a[0]), (!n || u & /*info*/
      2) && Pr(
        e,
        "has-info",
        /*info*/
        a[1] != null
      ), /*info*/
      a[1] ? s ? (s.p(a, u), u & /*info*/
      2 && ri(s, 1)) : (s = no(a), s.c(), ri(s, 1), s.m(r.parentNode, r)) : s && (Bd(), ji(s, 1, 1, () => {
        s = null;
      }), wd());
    },
    i(a) {
      n || (ri(c, a), ri(s), n = !0);
    },
    o(a) {
      ji(c, a), ji(s), n = !1;
    },
    d(a) {
      a && (Mi(e), Mi(t), Mi(r)), c && c.d(a), s && s.d(a);
    }
  };
}
function zd(i, e, t) {
  let { $$slots: r = {}, $$scope: n } = e, { show_label: o = !0 } = e, { info: c = void 0 } = e, { root: s } = e;
  return i.$$set = (a) => {
    "show_label" in a && t(0, o = a.show_label), "info" in a && t(1, c = a.info), "root" in a && t(2, s = a.root), "$$scope" in a && t(3, n = a.$$scope);
  }, [o, c, s, n, r];
}
class Hd extends bd {
  constructor(e) {
    super(), Fd(this, e, zd, Pd, Ld, { show_label: 0, info: 1, root: 2 });
  }
}
const {
  SvelteComponent: Nd,
  append_hydration: Gi,
  attr: ir,
  bubble: qd,
  check_outros: Ud,
  children: Qs,
  claim_component: Wd,
  claim_element: en,
  claim_space: ao,
  claim_text: jd,
  construct_svelte_component: oo,
  create_component: lo,
  create_slot: Gd,
  destroy_component: ho,
  detach: oi,
  element: tn,
  get_all_dirty_from_scope: Vd,
  get_slot_changes: Kd,
  group_outros: Xd,
  init: Yd,
  insert_hydration: Sl,
  listen: $d,
  mount_component: co,
  safe_not_equal: Zd,
  set_data: Jd,
  set_style: Bi,
  space: uo,
  text: Qd,
  toggle_class: at,
  transition_in: Fs,
  transition_out: Rs,
  update_slot_base: ef
} = window.__gradio__svelte__internal;
function fo(i) {
  let e, t;
  return {
    c() {
      e = tn("span"), t = Qd(
        /*label*/
        i[1]
      ), this.h();
    },
    l(r) {
      e = en(r, "SPAN", { class: !0 });
      var n = Qs(e);
      t = jd(
        n,
        /*label*/
        i[1]
      ), n.forEach(oi), this.h();
    },
    h() {
      ir(e, "class", "svelte-vk34kx");
    },
    m(r, n) {
      Sl(r, e, n), Gi(e, t);
    },
    p(r, n) {
      n & /*label*/
      2 && Jd(
        t,
        /*label*/
        r[1]
      );
    },
    d(r) {
      r && oi(e);
    }
  };
}
function tf(i) {
  let e, t, r, n, o, c, s, a, u = (
    /*show_label*/
    i[2] && fo(i)
  );
  var p = (
    /*Icon*/
    i[0]
  );
  function f(C, b) {
    return {};
  }
  p && (n = oo(p, f()));
  const g = (
    /*#slots*/
    i[14].default
  ), v = Gd(
    g,
    i,
    /*$$scope*/
    i[13],
    null
  );
  return {
    c() {
      e = tn("button"), u && u.c(), t = uo(), r = tn("div"), n && lo(n.$$.fragment), o = uo(), v && v.c(), this.h();
    },
    l(C) {
      e = en(C, "BUTTON", {
        "aria-label": !0,
        "aria-haspopup": !0,
        title: !0,
        class: !0
      });
      var b = Qs(e);
      u && u.l(b), t = ao(b), r = en(b, "DIV", { class: !0 });
      var d = Qs(r);
      n && Wd(n.$$.fragment, d), o = ao(d), v && v.l(d), d.forEach(oi), b.forEach(oi), this.h();
    },
    h() {
      ir(r, "class", "svelte-vk34kx"), at(
        r,
        "small",
        /*size*/
        i[4] === "small"
      ), at(
        r,
        "large",
        /*size*/
        i[4] === "large"
      ), at(
        r,
        "medium",
        /*size*/
        i[4] === "medium"
      ), e.disabled = /*disabled*/
      i[7], ir(
        e,
        "aria-label",
        /*label*/
        i[1]
      ), ir(
        e,
        "aria-haspopup",
        /*hasPopup*/
        i[8]
      ), ir(
        e,
        "title",
        /*label*/
        i[1]
      ), ir(e, "class", "svelte-vk34kx"), at(
        e,
        "pending",
        /*pending*/
        i[3]
      ), at(
        e,
        "padded",
        /*padded*/
        i[5]
      ), at(
        e,
        "highlight",
        /*highlight*/
        i[6]
      ), at(
        e,
        "transparent",
        /*transparent*/
        i[9]
      ), Bi(e, "color", !/*disabled*/
      i[7] && /*_color*/
      i[11] ? (
        /*_color*/
        i[11]
      ) : "var(--block-label-text-color)"), Bi(e, "--bg-color", /*disabled*/
      i[7] ? "auto" : (
        /*background*/
        i[10]
      ));
    },
    m(C, b) {
      Sl(C, e, b), u && u.m(e, null), Gi(e, t), Gi(e, r), n && co(n, r, null), Gi(r, o), v && v.m(r, null), c = !0, s || (a = $d(
        e,
        "click",
        /*click_handler*/
        i[15]
      ), s = !0);
    },
    p(C, [b]) {
      if (/*show_label*/
      C[2] ? u ? u.p(C, b) : (u = fo(C), u.c(), u.m(e, t)) : u && (u.d(1), u = null), b & /*Icon*/
      1 && p !== (p = /*Icon*/
      C[0])) {
        if (n) {
          Xd();
          const d = n;
          Rs(d.$$.fragment, 1, 0, () => {
            ho(d, 1);
          }), Ud();
        }
        p ? (n = oo(p, f()), lo(n.$$.fragment), Fs(n.$$.fragment, 1), co(n, r, o)) : n = null;
      }
      v && v.p && (!c || b & /*$$scope*/
      8192) && ef(
        v,
        g,
        C,
        /*$$scope*/
        C[13],
        c ? Kd(
          g,
          /*$$scope*/
          C[13],
          b,
          null
        ) : Vd(
          /*$$scope*/
          C[13]
        ),
        null
      ), (!c || b & /*size*/
      16) && at(
        r,
        "small",
        /*size*/
        C[4] === "small"
      ), (!c || b & /*size*/
      16) && at(
        r,
        "large",
        /*size*/
        C[4] === "large"
      ), (!c || b & /*size*/
      16) && at(
        r,
        "medium",
        /*size*/
        C[4] === "medium"
      ), (!c || b & /*disabled*/
      128) && (e.disabled = /*disabled*/
      C[7]), (!c || b & /*label*/
      2) && ir(
        e,
        "aria-label",
        /*label*/
        C[1]
      ), (!c || b & /*hasPopup*/
      256) && ir(
        e,
        "aria-haspopup",
        /*hasPopup*/
        C[8]
      ), (!c || b & /*label*/
      2) && ir(
        e,
        "title",
        /*label*/
        C[1]
      ), (!c || b & /*pending*/
      8) && at(
        e,
        "pending",
        /*pending*/
        C[3]
      ), (!c || b & /*padded*/
      32) && at(
        e,
        "padded",
        /*padded*/
        C[5]
      ), (!c || b & /*highlight*/
      64) && at(
        e,
        "highlight",
        /*highlight*/
        C[6]
      ), (!c || b & /*transparent*/
      512) && at(
        e,
        "transparent",
        /*transparent*/
        C[9]
      ), b & /*disabled, _color*/
      2176 && Bi(e, "color", !/*disabled*/
      C[7] && /*_color*/
      C[11] ? (
        /*_color*/
        C[11]
      ) : "var(--block-label-text-color)"), b & /*disabled, background*/
      1152 && Bi(e, "--bg-color", /*disabled*/
      C[7] ? "auto" : (
        /*background*/
        C[10]
      ));
    },
    i(C) {
      c || (n && Fs(n.$$.fragment, C), Fs(v, C), c = !0);
    },
    o(C) {
      n && Rs(n.$$.fragment, C), Rs(v, C), c = !1;
    },
    d(C) {
      C && oi(e), u && u.d(), n && ho(n), v && v.d(C), s = !1, a();
    }
  };
}
function rf(i, e, t) {
  let r, { $$slots: n = {}, $$scope: o } = e, { Icon: c } = e, { label: s = "" } = e, { show_label: a = !1 } = e, { pending: u = !1 } = e, { size: p = "small" } = e, { padded: f = !0 } = e, { highlight: g = !1 } = e, { disabled: v = !1 } = e, { hasPopup: C = !1 } = e, { color: b = "var(--block-label-text-color)" } = e, { transparent: d = !1 } = e, { background: m = "var(--block-background-fill)" } = e;
  function h(l) {
    qd.call(this, i, l);
  }
  return i.$$set = (l) => {
    "Icon" in l && t(0, c = l.Icon), "label" in l && t(1, s = l.label), "show_label" in l && t(2, a = l.show_label), "pending" in l && t(3, u = l.pending), "size" in l && t(4, p = l.size), "padded" in l && t(5, f = l.padded), "highlight" in l && t(6, g = l.highlight), "disabled" in l && t(7, v = l.disabled), "hasPopup" in l && t(8, C = l.hasPopup), "color" in l && t(12, b = l.color), "transparent" in l && t(9, d = l.transparent), "background" in l && t(10, m = l.background), "$$scope" in l && t(13, o = l.$$scope);
  }, i.$$.update = () => {
    i.$$.dirty & /*highlight, color*/
    4160 && t(11, r = g ? "var(--color-accent)" : b);
  }, [
    c,
    s,
    a,
    u,
    p,
    f,
    g,
    v,
    C,
    d,
    m,
    r,
    b,
    o,
    n,
    h
  ];
}
class sf extends Nd {
  constructor(e) {
    super(), Yd(this, e, rf, tf, Zd, {
      Icon: 0,
      label: 1,
      show_label: 2,
      pending: 3,
      size: 4,
      padded: 5,
      highlight: 6,
      disabled: 7,
      hasPopup: 8,
      color: 12,
      transparent: 9,
      background: 10
    });
  }
}
const {
  SvelteComponent: nf,
  append_hydration: Ls,
  attr: Mt,
  children: Fi,
  claim_svg_element: Ri,
  detach: Yr,
  init: af,
  insert_hydration: of,
  noop: Os,
  safe_not_equal: lf,
  set_style: qt,
  svg_element: Li
} = window.__gradio__svelte__internal;
function hf(i) {
  let e, t, r, n;
  return {
    c() {
      e = Li("svg"), t = Li("g"), r = Li("path"), n = Li("path"), this.h();
    },
    l(o) {
      e = Ri(o, "svg", {
        width: !0,
        height: !0,
        viewBox: !0,
        version: !0,
        xmlns: !0,
        "xmlns:xlink": !0,
        "xml:space": !0,
        stroke: !0,
        style: !0
      });
      var c = Fi(e);
      t = Ri(c, "g", { transform: !0 });
      var s = Fi(t);
      r = Ri(s, "path", { d: !0, style: !0 }), Fi(r).forEach(Yr), s.forEach(Yr), n = Ri(c, "path", { d: !0, style: !0 }), Fi(n).forEach(Yr), c.forEach(Yr), this.h();
    },
    h() {
      Mt(r, "d", "M18,6L6.087,17.913"), qt(r, "fill", "none"), qt(r, "fill-rule", "nonzero"), qt(r, "stroke-width", "2px"), Mt(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Mt(n, "d", "M4.364,4.364L19.636,19.636"), qt(n, "fill", "none"), qt(n, "fill-rule", "nonzero"), qt(n, "stroke-width", "2px"), Mt(e, "width", "100%"), Mt(e, "height", "100%"), Mt(e, "viewBox", "0 0 24 24"), Mt(e, "version", "1.1"), Mt(e, "xmlns", "http://www.w3.org/2000/svg"), Mt(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Mt(e, "xml:space", "preserve"), Mt(e, "stroke", "currentColor"), qt(e, "fill-rule", "evenodd"), qt(e, "clip-rule", "evenodd"), qt(e, "stroke-linecap", "round"), qt(e, "stroke-linejoin", "round");
    },
    m(o, c) {
      of(o, e, c), Ls(e, t), Ls(t, r), Ls(e, n);
    },
    p: Os,
    i: Os,
    o: Os,
    d(o) {
      o && Yr(e);
    }
  };
}
class cf extends nf {
  constructor(e) {
    super(), af(this, e, null, hf, lf, {});
  }
}
const uf = [
  { color: "red", primary: 600, secondary: 100 },
  { color: "green", primary: 600, secondary: 100 },
  { color: "blue", primary: 600, secondary: 100 },
  { color: "yellow", primary: 500, secondary: 100 },
  { color: "purple", primary: 600, secondary: 100 },
  { color: "teal", primary: 600, secondary: 100 },
  { color: "orange", primary: 600, secondary: 100 },
  { color: "cyan", primary: 600, secondary: 100 },
  { color: "lime", primary: 500, secondary: 100 },
  { color: "pink", primary: 600, secondary: 100 }
], mo = {
  inherit: "inherit",
  current: "currentColor",
  transparent: "transparent",
  black: "#000",
  white: "#fff",
  slate: {
    50: "#f8fafc",
    100: "#f1f5f9",
    200: "#e2e8f0",
    300: "#cbd5e1",
    400: "#94a3b8",
    500: "#64748b",
    600: "#475569",
    700: "#334155",
    800: "#1e293b",
    900: "#0f172a",
    950: "#020617"
  },
  gray: {
    50: "#f9fafb",
    100: "#f3f4f6",
    200: "#e5e7eb",
    300: "#d1d5db",
    400: "#9ca3af",
    500: "#6b7280",
    600: "#4b5563",
    700: "#374151",
    800: "#1f2937",
    900: "#111827",
    950: "#030712"
  },
  zinc: {
    50: "#fafafa",
    100: "#f4f4f5",
    200: "#e4e4e7",
    300: "#d4d4d8",
    400: "#a1a1aa",
    500: "#71717a",
    600: "#52525b",
    700: "#3f3f46",
    800: "#27272a",
    900: "#18181b",
    950: "#09090b"
  },
  neutral: {
    50: "#fafafa",
    100: "#f5f5f5",
    200: "#e5e5e5",
    300: "#d4d4d4",
    400: "#a3a3a3",
    500: "#737373",
    600: "#525252",
    700: "#404040",
    800: "#262626",
    900: "#171717",
    950: "#0a0a0a"
  },
  stone: {
    50: "#fafaf9",
    100: "#f5f5f4",
    200: "#e7e5e4",
    300: "#d6d3d1",
    400: "#a8a29e",
    500: "#78716c",
    600: "#57534e",
    700: "#44403c",
    800: "#292524",
    900: "#1c1917",
    950: "#0c0a09"
  },
  red: {
    50: "#fef2f2",
    100: "#fee2e2",
    200: "#fecaca",
    300: "#fca5a5",
    400: "#f87171",
    500: "#ef4444",
    600: "#dc2626",
    700: "#b91c1c",
    800: "#991b1b",
    900: "#7f1d1d",
    950: "#450a0a"
  },
  orange: {
    50: "#fff7ed",
    100: "#ffedd5",
    200: "#fed7aa",
    300: "#fdba74",
    400: "#fb923c",
    500: "#f97316",
    600: "#ea580c",
    700: "#c2410c",
    800: "#9a3412",
    900: "#7c2d12",
    950: "#431407"
  },
  amber: {
    50: "#fffbeb",
    100: "#fef3c7",
    200: "#fde68a",
    300: "#fcd34d",
    400: "#fbbf24",
    500: "#f59e0b",
    600: "#d97706",
    700: "#b45309",
    800: "#92400e",
    900: "#78350f",
    950: "#451a03"
  },
  yellow: {
    50: "#fefce8",
    100: "#fef9c3",
    200: "#fef08a",
    300: "#fde047",
    400: "#facc15",
    500: "#eab308",
    600: "#ca8a04",
    700: "#a16207",
    800: "#854d0e",
    900: "#713f12",
    950: "#422006"
  },
  lime: {
    50: "#f7fee7",
    100: "#ecfccb",
    200: "#d9f99d",
    300: "#bef264",
    400: "#a3e635",
    500: "#84cc16",
    600: "#65a30d",
    700: "#4d7c0f",
    800: "#3f6212",
    900: "#365314",
    950: "#1a2e05"
  },
  green: {
    50: "#f0fdf4",
    100: "#dcfce7",
    200: "#bbf7d0",
    300: "#86efac",
    400: "#4ade80",
    500: "#22c55e",
    600: "#16a34a",
    700: "#15803d",
    800: "#166534",
    900: "#14532d",
    950: "#052e16"
  },
  emerald: {
    50: "#ecfdf5",
    100: "#d1fae5",
    200: "#a7f3d0",
    300: "#6ee7b7",
    400: "#34d399",
    500: "#10b981",
    600: "#059669",
    700: "#047857",
    800: "#065f46",
    900: "#064e3b",
    950: "#022c22"
  },
  teal: {
    50: "#f0fdfa",
    100: "#ccfbf1",
    200: "#99f6e4",
    300: "#5eead4",
    400: "#2dd4bf",
    500: "#14b8a6",
    600: "#0d9488",
    700: "#0f766e",
    800: "#115e59",
    900: "#134e4a",
    950: "#042f2e"
  },
  cyan: {
    50: "#ecfeff",
    100: "#cffafe",
    200: "#a5f3fc",
    300: "#67e8f9",
    400: "#22d3ee",
    500: "#06b6d4",
    600: "#0891b2",
    700: "#0e7490",
    800: "#155e75",
    900: "#164e63",
    950: "#083344"
  },
  sky: {
    50: "#f0f9ff",
    100: "#e0f2fe",
    200: "#bae6fd",
    300: "#7dd3fc",
    400: "#38bdf8",
    500: "#0ea5e9",
    600: "#0284c7",
    700: "#0369a1",
    800: "#075985",
    900: "#0c4a6e",
    950: "#082f49"
  },
  blue: {
    50: "#eff6ff",
    100: "#dbeafe",
    200: "#bfdbfe",
    300: "#93c5fd",
    400: "#60a5fa",
    500: "#3b82f6",
    600: "#2563eb",
    700: "#1d4ed8",
    800: "#1e40af",
    900: "#1e3a8a",
    950: "#172554"
  },
  indigo: {
    50: "#eef2ff",
    100: "#e0e7ff",
    200: "#c7d2fe",
    300: "#a5b4fc",
    400: "#818cf8",
    500: "#6366f1",
    600: "#4f46e5",
    700: "#4338ca",
    800: "#3730a3",
    900: "#312e81",
    950: "#1e1b4b"
  },
  violet: {
    50: "#f5f3ff",
    100: "#ede9fe",
    200: "#ddd6fe",
    300: "#c4b5fd",
    400: "#a78bfa",
    500: "#8b5cf6",
    600: "#7c3aed",
    700: "#6d28d9",
    800: "#5b21b6",
    900: "#4c1d95",
    950: "#2e1065"
  },
  purple: {
    50: "#faf5ff",
    100: "#f3e8ff",
    200: "#e9d5ff",
    300: "#d8b4fe",
    400: "#c084fc",
    500: "#a855f7",
    600: "#9333ea",
    700: "#7e22ce",
    800: "#6b21a8",
    900: "#581c87",
    950: "#3b0764"
  },
  fuchsia: {
    50: "#fdf4ff",
    100: "#fae8ff",
    200: "#f5d0fe",
    300: "#f0abfc",
    400: "#e879f9",
    500: "#d946ef",
    600: "#c026d3",
    700: "#a21caf",
    800: "#86198f",
    900: "#701a75",
    950: "#4a044e"
  },
  pink: {
    50: "#fdf2f8",
    100: "#fce7f3",
    200: "#fbcfe8",
    300: "#f9a8d4",
    400: "#f472b6",
    500: "#ec4899",
    600: "#db2777",
    700: "#be185d",
    800: "#9d174d",
    900: "#831843",
    950: "#500724"
  },
  rose: {
    50: "#fff1f2",
    100: "#ffe4e6",
    200: "#fecdd3",
    300: "#fda4af",
    400: "#fb7185",
    500: "#f43f5e",
    600: "#e11d48",
    700: "#be123c",
    800: "#9f1239",
    900: "#881337",
    950: "#4c0519"
  }
};
uf.reduce(
  (i, { color: e, primary: t, secondary: r }) => ({
    ...i,
    [e]: {
      primary: mo[e][t],
      secondary: mo[e][r]
    }
  }),
  {}
);
function Hr(i) {
  let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0;
  for (; i > 1e3 && t < e.length - 1; )
    i /= 1e3, t++;
  let r = e[t];
  return (Number.isInteger(i) ? i : i.toFixed(1)) + r;
}
function Vi() {
}
function df(i, e) {
  return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
}
const Cl = typeof window < "u";
let po = Cl ? () => window.performance.now() : () => Date.now(), xl = Cl ? (i) => requestAnimationFrame(i) : Vi;
const Ur = /* @__PURE__ */ new Set();
function kl(i) {
  Ur.forEach((e) => {
    e.c(i) || (Ur.delete(e), e.f());
  }), Ur.size !== 0 && xl(kl);
}
function ff(i) {
  let e;
  return Ur.size === 0 && xl(kl), {
    promise: new Promise((t) => {
      Ur.add(e = { c: i, f: t });
    }),
    abort() {
      Ur.delete(e);
    }
  };
}
const zr = [];
function mf(i, e = Vi) {
  let t;
  const r = /* @__PURE__ */ new Set();
  function n(s) {
    if (df(i, s) && (i = s, t)) {
      const a = !zr.length;
      for (const u of r)
        u[1](), zr.push(u, i);
      if (a) {
        for (let u = 0; u < zr.length; u += 2)
          zr[u][0](zr[u + 1]);
        zr.length = 0;
      }
    }
  }
  function o(s) {
    n(s(i));
  }
  function c(s, a = Vi) {
    const u = [s, a];
    return r.add(u), r.size === 1 && (t = e(n, o) || Vi), s(i), () => {
      r.delete(u), r.size === 0 && t && (t(), t = null);
    };
  }
  return { set: n, update: o, subscribe: c };
}
function _o(i) {
  return Object.prototype.toString.call(i) === "[object Date]";
}
function rn(i, e, t, r) {
  if (typeof t == "number" || _o(t)) {
    const n = r - t, o = (t - e) / (i.dt || 1 / 60), c = i.opts.stiffness * n, s = i.opts.damping * o, a = (c - s) * i.inv_mass, u = (o + a) * i.dt;
    return Math.abs(u) < i.opts.precision && Math.abs(n) < i.opts.precision ? r : (i.settled = !1, _o(t) ? new Date(t.getTime() + u) : t + u);
  } else {
    if (Array.isArray(t))
      return t.map(
        (n, o) => rn(i, e[o], t[o], r[o])
      );
    if (typeof t == "object") {
      const n = {};
      for (const o in t)
        n[o] = rn(i, e[o], t[o], r[o]);
      return n;
    } else
      throw new Error(`Cannot spring ${typeof t} values`);
  }
}
function go(i, e = {}) {
  const t = mf(i), { stiffness: r = 0.15, damping: n = 0.8, precision: o = 0.01 } = e;
  let c, s, a, u = i, p = i, f = 1, g = 0, v = !1;
  function C(d, m = {}) {
    p = d;
    const h = a = {};
    return i == null || m.hard || b.stiffness >= 1 && b.damping >= 1 ? (v = !0, c = po(), u = d, t.set(i = p), Promise.resolve()) : (m.soft && (g = 1 / ((m.soft === !0 ? 0.5 : +m.soft) * 60), f = 0), s || (c = po(), v = !1, s = ff((l) => {
      if (v)
        return v = !1, s = null, !1;
      f = Math.min(f + g, 1);
      const _ = {
        inv_mass: f,
        opts: b,
        settled: !0,
        dt: (l - c) * 60 / 1e3
      }, S = rn(_, u, i, p);
      return c = l, u = i, t.set(i = S), _.settled && (s = null), !_.settled;
    })), new Promise((l) => {
      s.promise.then(() => {
        h === a && l();
      });
    }));
  }
  const b = {
    set: C,
    update: (d, m) => C(d(p, i), m),
    subscribe: t.subscribe,
    stiffness: r,
    damping: n,
    precision: o
  };
  return b;
}
const {
  SvelteComponent: pf,
  append_hydration: Bt,
  attr: Ee,
  children: _t,
  claim_element: _f,
  claim_svg_element: Ft,
  component_subscribe: vo,
  detach: ht,
  element: gf,
  init: vf,
  insert_hydration: bf,
  noop: bo,
  safe_not_equal: wf,
  set_style: Oi,
  svg_element: Rt,
  toggle_class: wo
} = window.__gradio__svelte__internal, { onMount: yf } = window.__gradio__svelte__internal;
function Sf(i) {
  let e, t, r, n, o, c, s, a, u, p, f, g;
  return {
    c() {
      e = gf("div"), t = Rt("svg"), r = Rt("g"), n = Rt("path"), o = Rt("path"), c = Rt("path"), s = Rt("path"), a = Rt("g"), u = Rt("path"), p = Rt("path"), f = Rt("path"), g = Rt("path"), this.h();
    },
    l(v) {
      e = _f(v, "DIV", { class: !0 });
      var C = _t(e);
      t = Ft(C, "svg", {
        viewBox: !0,
        fill: !0,
        xmlns: !0,
        class: !0
      });
      var b = _t(t);
      r = Ft(b, "g", { style: !0 });
      var d = _t(r);
      n = Ft(d, "path", {
        d: !0,
        fill: !0,
        "fill-opacity": !0,
        class: !0
      }), _t(n).forEach(ht), o = Ft(d, "path", { d: !0, fill: !0, class: !0 }), _t(o).forEach(ht), c = Ft(d, "path", {
        d: !0,
        fill: !0,
        "fill-opacity": !0,
        class: !0
      }), _t(c).forEach(ht), s = Ft(d, "path", { d: !0, fill: !0, class: !0 }), _t(s).forEach(ht), d.forEach(ht), a = Ft(b, "g", { style: !0 });
      var m = _t(a);
      u = Ft(m, "path", {
        d: !0,
        fill: !0,
        "fill-opacity": !0,
        class: !0
      }), _t(u).forEach(ht), p = Ft(m, "path", { d: !0, fill: !0, class: !0 }), _t(p).forEach(ht), f = Ft(m, "path", {
        d: !0,
        fill: !0,
        "fill-opacity": !0,
        class: !0
      }), _t(f).forEach(ht), g = Ft(m, "path", { d: !0, fill: !0, class: !0 }), _t(g).forEach(ht), m.forEach(ht), b.forEach(ht), C.forEach(ht), this.h();
    },
    h() {
      Ee(n, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), Ee(n, "fill", "#FF7C00"), Ee(n, "fill-opacity", "0.4"), Ee(n, "class", "svelte-43sxxs"), Ee(o, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), Ee(o, "fill", "#FF7C00"), Ee(o, "class", "svelte-43sxxs"), Ee(c, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), Ee(c, "fill", "#FF7C00"), Ee(c, "fill-opacity", "0.4"), Ee(c, "class", "svelte-43sxxs"), Ee(s, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), Ee(s, "fill", "#FF7C00"), Ee(s, "class", "svelte-43sxxs"), Oi(r, "transform", "translate(" + /*$top*/
      i[1][0] + "px, " + /*$top*/
      i[1][1] + "px)"), Ee(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), Ee(u, "fill", "#FF7C00"), Ee(u, "fill-opacity", "0.4"), Ee(u, "class", "svelte-43sxxs"), Ee(p, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), Ee(p, "fill", "#FF7C00"), Ee(p, "class", "svelte-43sxxs"), Ee(f, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), Ee(f, "fill", "#FF7C00"), Ee(f, "fill-opacity", "0.4"), Ee(f, "class", "svelte-43sxxs"), Ee(g, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), Ee(g, "fill", "#FF7C00"), Ee(g, "class", "svelte-43sxxs"), Oi(a, "transform", "translate(" + /*$bottom*/
      i[2][0] + "px, " + /*$bottom*/
      i[2][1] + "px)"), Ee(t, "viewBox", "-1200 -1200 3000 3000"), Ee(t, "fill", "none"), Ee(t, "xmlns", "http://www.w3.org/2000/svg"), Ee(t, "class", "svelte-43sxxs"), Ee(e, "class", "svelte-43sxxs"), wo(
        e,
        "margin",
        /*margin*/
        i[0]
      );
    },
    m(v, C) {
      bf(v, e, C), Bt(e, t), Bt(t, r), Bt(r, n), Bt(r, o), Bt(r, c), Bt(r, s), Bt(t, a), Bt(a, u), Bt(a, p), Bt(a, f), Bt(a, g);
    },
    p(v, [C]) {
      C & /*$top*/
      2 && Oi(r, "transform", "translate(" + /*$top*/
      v[1][0] + "px, " + /*$top*/
      v[1][1] + "px)"), C & /*$bottom*/
      4 && Oi(a, "transform", "translate(" + /*$bottom*/
      v[2][0] + "px, " + /*$bottom*/
      v[2][1] + "px)"), C & /*margin*/
      1 && wo(
        e,
        "margin",
        /*margin*/
        v[0]
      );
    },
    i: bo,
    o: bo,
    d(v) {
      v && ht(e);
    }
  };
}
function Cf(i, e, t) {
  let r, n, { margin: o = !0 } = e;
  const c = go([0, 0]);
  vo(i, c, (g) => t(1, r = g));
  const s = go([0, 0]);
  vo(i, s, (g) => t(2, n = g));
  let a;
  async function u() {
    await Promise.all([c.set([125, 140]), s.set([-125, -140])]), await Promise.all([c.set([-125, 140]), s.set([125, -140])]), await Promise.all([c.set([-125, 0]), s.set([125, -0])]), await Promise.all([c.set([125, 0]), s.set([-125, 0])]);
  }
  async function p() {
    await u(), a || p();
  }
  async function f() {
    await Promise.all([c.set([125, 0]), s.set([-125, 0])]), p();
  }
  return yf(() => (f(), () => a = !0)), i.$$set = (g) => {
    "margin" in g && t(0, o = g.margin);
  }, [o, r, n, c, s];
}
class xf extends pf {
  constructor(e) {
    super(), vf(this, e, Cf, Sf, wf, { margin: 0 });
  }
}
const {
  SvelteComponent: kf,
  append_hydration: Dr,
  attr: Pt,
  binding_callbacks: yo,
  check_outros: sn,
  children: Vt,
  claim_component: Dl,
  claim_element: Kt,
  claim_space: wt,
  claim_text: He,
  create_component: El,
  create_slot: Al,
  destroy_component: Tl,
  destroy_each: Ml,
  detach: pe,
  element: Xt,
  empty: kt,
  ensure_array_like: rs,
  get_all_dirty_from_scope: Bl,
  get_slot_changes: Fl,
  group_outros: nn,
  init: Df,
  insert_hydration: Se,
  mount_component: Rl,
  noop: an,
  safe_not_equal: Ef,
  set_data: Dt,
  set_style: _r,
  space: yt,
  text: Ne,
  toggle_class: gt,
  transition_in: It,
  transition_out: Yt,
  update_slot_base: Ll
} = window.__gradio__svelte__internal, { tick: Af } = window.__gradio__svelte__internal, { onDestroy: Tf } = window.__gradio__svelte__internal, { createEventDispatcher: Mf } = window.__gradio__svelte__internal, Bf = (i) => ({}), So = (i) => ({}), Ff = (i) => ({}), Co = (i) => ({});
function xo(i, e, t) {
  const r = i.slice();
  return r[40] = e[t], r[42] = t, r;
}
function ko(i, e, t) {
  const r = i.slice();
  return r[40] = e[t], r;
}
function Rf(i) {
  let e, t, r, n, o = (
    /*i18n*/
    i[1]("common.error") + ""
  ), c, s, a;
  t = new sf({
    props: {
      Icon: cf,
      label: (
        /*i18n*/
        i[1]("common.clear")
      ),
      disabled: !1
    }
  }), t.$on(
    "click",
    /*click_handler*/
    i[32]
  );
  const u = (
    /*#slots*/
    i[30].error
  ), p = Al(
    u,
    i,
    /*$$scope*/
    i[29],
    So
  );
  return {
    c() {
      e = Xt("div"), El(t.$$.fragment), r = yt(), n = Xt("span"), c = Ne(o), s = yt(), p && p.c(), this.h();
    },
    l(f) {
      e = Kt(f, "DIV", { class: !0 });
      var g = Vt(e);
      Dl(t.$$.fragment, g), g.forEach(pe), r = wt(f), n = Kt(f, "SPAN", { class: !0 });
      var v = Vt(n);
      c = He(v, o), v.forEach(pe), s = wt(f), p && p.l(f), this.h();
    },
    h() {
      Pt(e, "class", "clear-status svelte-17v219f"), Pt(n, "class", "error svelte-17v219f");
    },
    m(f, g) {
      Se(f, e, g), Rl(t, e, null), Se(f, r, g), Se(f, n, g), Dr(n, c), Se(f, s, g), p && p.m(f, g), a = !0;
    },
    p(f, g) {
      const v = {};
      g[0] & /*i18n*/
      2 && (v.label = /*i18n*/
      f[1]("common.clear")), t.$set(v), (!a || g[0] & /*i18n*/
      2) && o !== (o = /*i18n*/
      f[1]("common.error") + "") && Dt(c, o), p && p.p && (!a || g[0] & /*$$scope*/
      536870912) && Ll(
        p,
        u,
        f,
        /*$$scope*/
        f[29],
        a ? Fl(
          u,
          /*$$scope*/
          f[29],
          g,
          Bf
        ) : Bl(
          /*$$scope*/
          f[29]
        ),
        So
      );
    },
    i(f) {
      a || (It(t.$$.fragment, f), It(p, f), a = !0);
    },
    o(f) {
      Yt(t.$$.fragment, f), Yt(p, f), a = !1;
    },
    d(f) {
      f && (pe(e), pe(r), pe(n), pe(s)), Tl(t), p && p.d(f);
    }
  };
}
function Lf(i) {
  let e, t, r, n, o, c, s, a, u, p = (
    /*variant*/
    i[8] === "default" && /*show_eta_bar*/
    i[18] && /*show_progress*/
    i[6] === "full" && Do(i)
  );
  function f(l, _) {
    if (
      /*progress*/
      l[7]
    ) return Pf;
    if (
      /*queue_position*/
      l[2] !== null && /*queue_size*/
      l[3] !== void 0 && /*queue_position*/
      l[2] >= 0
    ) return If;
    if (
      /*queue_position*/
      l[2] === 0
    ) return Of;
  }
  let g = f(i), v = g && g(i), C = (
    /*timer*/
    i[5] && To(i)
  );
  const b = [qf, Nf], d = [];
  function m(l, _) {
    return (
      /*last_progress_level*/
      l[15] != null ? 0 : (
        /*show_progress*/
        l[6] === "full" ? 1 : -1
      )
    );
  }
  ~(o = m(i)) && (c = d[o] = b[o](i));
  let h = !/*timer*/
  i[5] && Io(i);
  return {
    c() {
      p && p.c(), e = yt(), t = Xt("div"), v && v.c(), r = yt(), C && C.c(), n = yt(), c && c.c(), s = yt(), h && h.c(), a = kt(), this.h();
    },
    l(l) {
      p && p.l(l), e = wt(l), t = Kt(l, "DIV", { class: !0 });
      var _ = Vt(t);
      v && v.l(_), r = wt(_), C && C.l(_), _.forEach(pe), n = wt(l), c && c.l(l), s = wt(l), h && h.l(l), a = kt(), this.h();
    },
    h() {
      Pt(t, "class", "progress-text svelte-17v219f"), gt(
        t,
        "meta-text-center",
        /*variant*/
        i[8] === "center"
      ), gt(
        t,
        "meta-text",
        /*variant*/
        i[8] === "default"
      );
    },
    m(l, _) {
      p && p.m(l, _), Se(l, e, _), Se(l, t, _), v && v.m(t, null), Dr(t, r), C && C.m(t, null), Se(l, n, _), ~o && d[o].m(l, _), Se(l, s, _), h && h.m(l, _), Se(l, a, _), u = !0;
    },
    p(l, _) {
      /*variant*/
      l[8] === "default" && /*show_eta_bar*/
      l[18] && /*show_progress*/
      l[6] === "full" ? p ? p.p(l, _) : (p = Do(l), p.c(), p.m(e.parentNode, e)) : p && (p.d(1), p = null), g === (g = f(l)) && v ? v.p(l, _) : (v && v.d(1), v = g && g(l), v && (v.c(), v.m(t, r))), /*timer*/
      l[5] ? C ? C.p(l, _) : (C = To(l), C.c(), C.m(t, null)) : C && (C.d(1), C = null), (!u || _[0] & /*variant*/
      256) && gt(
        t,
        "meta-text-center",
        /*variant*/
        l[8] === "center"
      ), (!u || _[0] & /*variant*/
      256) && gt(
        t,
        "meta-text",
        /*variant*/
        l[8] === "default"
      );
      let S = o;
      o = m(l), o === S ? ~o && d[o].p(l, _) : (c && (nn(), Yt(d[S], 1, 1, () => {
        d[S] = null;
      }), sn()), ~o ? (c = d[o], c ? c.p(l, _) : (c = d[o] = b[o](l), c.c()), It(c, 1), c.m(s.parentNode, s)) : c = null), /*timer*/
      l[5] ? h && (nn(), Yt(h, 1, 1, () => {
        h = null;
      }), sn()) : h ? (h.p(l, _), _[0] & /*timer*/
      32 && It(h, 1)) : (h = Io(l), h.c(), It(h, 1), h.m(a.parentNode, a));
    },
    i(l) {
      u || (It(c), It(h), u = !0);
    },
    o(l) {
      Yt(c), Yt(h), u = !1;
    },
    d(l) {
      l && (pe(e), pe(t), pe(n), pe(s), pe(a)), p && p.d(l), v && v.d(), C && C.d(), ~o && d[o].d(l), h && h.d(l);
    }
  };
}
function Do(i) {
  let e, t = `translateX(${/*eta_level*/
  (i[17] || 0) * 100 - 100}%)`;
  return {
    c() {
      e = Xt("div"), this.h();
    },
    l(r) {
      e = Kt(r, "DIV", { class: !0 }), Vt(e).forEach(pe), this.h();
    },
    h() {
      Pt(e, "class", "eta-bar svelte-17v219f"), _r(e, "transform", t);
    },
    m(r, n) {
      Se(r, e, n);
    },
    p(r, n) {
      n[0] & /*eta_level*/
      131072 && t !== (t = `translateX(${/*eta_level*/
      (r[17] || 0) * 100 - 100}%)`) && _r(e, "transform", t);
    },
    d(r) {
      r && pe(e);
    }
  };
}
function Of(i) {
  let e;
  return {
    c() {
      e = Ne("processing |");
    },
    l(t) {
      e = He(t, "processing |");
    },
    m(t, r) {
      Se(t, e, r);
    },
    p: an,
    d(t) {
      t && pe(e);
    }
  };
}
function If(i) {
  let e, t = (
    /*queue_position*/
    i[2] + 1 + ""
  ), r, n, o, c;
  return {
    c() {
      e = Ne("queue: "), r = Ne(t), n = Ne("/"), o = Ne(
        /*queue_size*/
        i[3]
      ), c = Ne(" |");
    },
    l(s) {
      e = He(s, "queue: "), r = He(s, t), n = He(s, "/"), o = He(
        s,
        /*queue_size*/
        i[3]
      ), c = He(s, " |");
    },
    m(s, a) {
      Se(s, e, a), Se(s, r, a), Se(s, n, a), Se(s, o, a), Se(s, c, a);
    },
    p(s, a) {
      a[0] & /*queue_position*/
      4 && t !== (t = /*queue_position*/
      s[2] + 1 + "") && Dt(r, t), a[0] & /*queue_size*/
      8 && Dt(
        o,
        /*queue_size*/
        s[3]
      );
    },
    d(s) {
      s && (pe(e), pe(r), pe(n), pe(o), pe(c));
    }
  };
}
function Pf(i) {
  let e, t = rs(
    /*progress*/
    i[7]
  ), r = [];
  for (let n = 0; n < t.length; n += 1)
    r[n] = Ao(ko(i, t, n));
  return {
    c() {
      for (let n = 0; n < r.length; n += 1)
        r[n].c();
      e = kt();
    },
    l(n) {
      for (let o = 0; o < r.length; o += 1)
        r[o].l(n);
      e = kt();
    },
    m(n, o) {
      for (let c = 0; c < r.length; c += 1)
        r[c] && r[c].m(n, o);
      Se(n, e, o);
    },
    p(n, o) {
      if (o[0] & /*progress*/
      128) {
        t = rs(
          /*progress*/
          n[7]
        );
        let c;
        for (c = 0; c < t.length; c += 1) {
          const s = ko(n, t, c);
          r[c] ? r[c].p(s, o) : (r[c] = Ao(s), r[c].c(), r[c].m(e.parentNode, e));
        }
        for (; c < r.length; c += 1)
          r[c].d(1);
        r.length = t.length;
      }
    },
    d(n) {
      n && pe(e), Ml(r, n);
    }
  };
}
function Eo(i) {
  let e, t = (
    /*p*/
    i[40].unit + ""
  ), r, n, o = " ", c;
  function s(p, f) {
    return (
      /*p*/
      p[40].length != null ? Hf : zf
    );
  }
  let a = s(i), u = a(i);
  return {
    c() {
      u.c(), e = yt(), r = Ne(t), n = Ne(" | "), c = Ne(o);
    },
    l(p) {
      u.l(p), e = wt(p), r = He(p, t), n = He(p, " | "), c = He(p, o);
    },
    m(p, f) {
      u.m(p, f), Se(p, e, f), Se(p, r, f), Se(p, n, f), Se(p, c, f);
    },
    p(p, f) {
      a === (a = s(p)) && u ? u.p(p, f) : (u.d(1), u = a(p), u && (u.c(), u.m(e.parentNode, e))), f[0] & /*progress*/
      128 && t !== (t = /*p*/
      p[40].unit + "") && Dt(r, t);
    },
    d(p) {
      p && (pe(e), pe(r), pe(n), pe(c)), u.d(p);
    }
  };
}
function zf(i) {
  let e = Hr(
    /*p*/
    i[40].index || 0
  ) + "", t;
  return {
    c() {
      t = Ne(e);
    },
    l(r) {
      t = He(r, e);
    },
    m(r, n) {
      Se(r, t, n);
    },
    p(r, n) {
      n[0] & /*progress*/
      128 && e !== (e = Hr(
        /*p*/
        r[40].index || 0
      ) + "") && Dt(t, e);
    },
    d(r) {
      r && pe(t);
    }
  };
}
function Hf(i) {
  let e = Hr(
    /*p*/
    i[40].index || 0
  ) + "", t, r, n = Hr(
    /*p*/
    i[40].length
  ) + "", o;
  return {
    c() {
      t = Ne(e), r = Ne("/"), o = Ne(n);
    },
    l(c) {
      t = He(c, e), r = He(c, "/"), o = He(c, n);
    },
    m(c, s) {
      Se(c, t, s), Se(c, r, s), Se(c, o, s);
    },
    p(c, s) {
      s[0] & /*progress*/
      128 && e !== (e = Hr(
        /*p*/
        c[40].index || 0
      ) + "") && Dt(t, e), s[0] & /*progress*/
      128 && n !== (n = Hr(
        /*p*/
        c[40].length
      ) + "") && Dt(o, n);
    },
    d(c) {
      c && (pe(t), pe(r), pe(o));
    }
  };
}
function Ao(i) {
  let e, t = (
    /*p*/
    i[40].index != null && Eo(i)
  );
  return {
    c() {
      t && t.c(), e = kt();
    },
    l(r) {
      t && t.l(r), e = kt();
    },
    m(r, n) {
      t && t.m(r, n), Se(r, e, n);
    },
    p(r, n) {
      /*p*/
      r[40].index != null ? t ? t.p(r, n) : (t = Eo(r), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
    },
    d(r) {
      r && pe(e), t && t.d(r);
    }
  };
}
function To(i) {
  let e, t = (
    /*eta*/
    i[0] ? `/${/*formatted_eta*/
    i[19]}` : ""
  ), r, n;
  return {
    c() {
      e = Ne(
        /*formatted_timer*/
        i[20]
      ), r = Ne(t), n = Ne("s");
    },
    l(o) {
      e = He(
        o,
        /*formatted_timer*/
        i[20]
      ), r = He(o, t), n = He(o, "s");
    },
    m(o, c) {
      Se(o, e, c), Se(o, r, c), Se(o, n, c);
    },
    p(o, c) {
      c[0] & /*formatted_timer*/
      1048576 && Dt(
        e,
        /*formatted_timer*/
        o[20]
      ), c[0] & /*eta, formatted_eta*/
      524289 && t !== (t = /*eta*/
      o[0] ? `/${/*formatted_eta*/
      o[19]}` : "") && Dt(r, t);
    },
    d(o) {
      o && (pe(e), pe(r), pe(n));
    }
  };
}
function Nf(i) {
  let e, t;
  return e = new xf({
    props: { margin: (
      /*variant*/
      i[8] === "default"
    ) }
  }), {
    c() {
      El(e.$$.fragment);
    },
    l(r) {
      Dl(e.$$.fragment, r);
    },
    m(r, n) {
      Rl(e, r, n), t = !0;
    },
    p(r, n) {
      const o = {};
      n[0] & /*variant*/
      256 && (o.margin = /*variant*/
      r[8] === "default"), e.$set(o);
    },
    i(r) {
      t || (It(e.$$.fragment, r), t = !0);
    },
    o(r) {
      Yt(e.$$.fragment, r), t = !1;
    },
    d(r) {
      Tl(e, r);
    }
  };
}
function qf(i) {
  let e, t, r, n, o, c = `${/*last_progress_level*/
  i[15] * 100}%`, s = (
    /*progress*/
    i[7] != null && Mo(i)
  );
  return {
    c() {
      e = Xt("div"), t = Xt("div"), s && s.c(), r = yt(), n = Xt("div"), o = Xt("div"), this.h();
    },
    l(a) {
      e = Kt(a, "DIV", { class: !0 });
      var u = Vt(e);
      t = Kt(u, "DIV", { class: !0 });
      var p = Vt(t);
      s && s.l(p), p.forEach(pe), r = wt(u), n = Kt(u, "DIV", { class: !0 });
      var f = Vt(n);
      o = Kt(f, "DIV", { class: !0 }), Vt(o).forEach(pe), f.forEach(pe), u.forEach(pe), this.h();
    },
    h() {
      Pt(t, "class", "progress-level-inner svelte-17v219f"), Pt(o, "class", "progress-bar svelte-17v219f"), _r(o, "width", c), Pt(n, "class", "progress-bar-wrap svelte-17v219f"), Pt(e, "class", "progress-level svelte-17v219f");
    },
    m(a, u) {
      Se(a, e, u), Dr(e, t), s && s.m(t, null), Dr(e, r), Dr(e, n), Dr(n, o), i[31](o);
    },
    p(a, u) {
      /*progress*/
      a[7] != null ? s ? s.p(a, u) : (s = Mo(a), s.c(), s.m(t, null)) : s && (s.d(1), s = null), u[0] & /*last_progress_level*/
      32768 && c !== (c = `${/*last_progress_level*/
      a[15] * 100}%`) && _r(o, "width", c);
    },
    i: an,
    o: an,
    d(a) {
      a && pe(e), s && s.d(), i[31](null);
    }
  };
}
function Mo(i) {
  let e, t = rs(
    /*progress*/
    i[7]
  ), r = [];
  for (let n = 0; n < t.length; n += 1)
    r[n] = Oo(xo(i, t, n));
  return {
    c() {
      for (let n = 0; n < r.length; n += 1)
        r[n].c();
      e = kt();
    },
    l(n) {
      for (let o = 0; o < r.length; o += 1)
        r[o].l(n);
      e = kt();
    },
    m(n, o) {
      for (let c = 0; c < r.length; c += 1)
        r[c] && r[c].m(n, o);
      Se(n, e, o);
    },
    p(n, o) {
      if (o[0] & /*progress_level, progress*/
      16512) {
        t = rs(
          /*progress*/
          n[7]
        );
        let c;
        for (c = 0; c < t.length; c += 1) {
          const s = xo(n, t, c);
          r[c] ? r[c].p(s, o) : (r[c] = Oo(s), r[c].c(), r[c].m(e.parentNode, e));
        }
        for (; c < r.length; c += 1)
          r[c].d(1);
        r.length = t.length;
      }
    },
    d(n) {
      n && pe(e), Ml(r, n);
    }
  };
}
function Bo(i) {
  let e, t, r, n, o = (
    /*i*/
    i[42] !== 0 && Uf()
  ), c = (
    /*p*/
    i[40].desc != null && Fo(i)
  ), s = (
    /*p*/
    i[40].desc != null && /*progress_level*/
    i[14] && /*progress_level*/
    i[14][
      /*i*/
      i[42]
    ] != null && Ro()
  ), a = (
    /*progress_level*/
    i[14] != null && Lo(i)
  );
  return {
    c() {
      o && o.c(), e = yt(), c && c.c(), t = yt(), s && s.c(), r = yt(), a && a.c(), n = kt();
    },
    l(u) {
      o && o.l(u), e = wt(u), c && c.l(u), t = wt(u), s && s.l(u), r = wt(u), a && a.l(u), n = kt();
    },
    m(u, p) {
      o && o.m(u, p), Se(u, e, p), c && c.m(u, p), Se(u, t, p), s && s.m(u, p), Se(u, r, p), a && a.m(u, p), Se(u, n, p);
    },
    p(u, p) {
      /*p*/
      u[40].desc != null ? c ? c.p(u, p) : (c = Fo(u), c.c(), c.m(t.parentNode, t)) : c && (c.d(1), c = null), /*p*/
      u[40].desc != null && /*progress_level*/
      u[14] && /*progress_level*/
      u[14][
        /*i*/
        u[42]
      ] != null ? s || (s = Ro(), s.c(), s.m(r.parentNode, r)) : s && (s.d(1), s = null), /*progress_level*/
      u[14] != null ? a ? a.p(u, p) : (a = Lo(u), a.c(), a.m(n.parentNode, n)) : a && (a.d(1), a = null);
    },
    d(u) {
      u && (pe(e), pe(t), pe(r), pe(n)), o && o.d(u), c && c.d(u), s && s.d(u), a && a.d(u);
    }
  };
}
function Uf(i) {
  let e;
  return {
    c() {
      e = Ne(" /");
    },
    l(t) {
      e = He(t, " /");
    },
    m(t, r) {
      Se(t, e, r);
    },
    d(t) {
      t && pe(e);
    }
  };
}
function Fo(i) {
  let e = (
    /*p*/
    i[40].desc + ""
  ), t;
  return {
    c() {
      t = Ne(e);
    },
    l(r) {
      t = He(r, e);
    },
    m(r, n) {
      Se(r, t, n);
    },
    p(r, n) {
      n[0] & /*progress*/
      128 && e !== (e = /*p*/
      r[40].desc + "") && Dt(t, e);
    },
    d(r) {
      r && pe(t);
    }
  };
}
function Ro(i) {
  let e;
  return {
    c() {
      e = Ne("-");
    },
    l(t) {
      e = He(t, "-");
    },
    m(t, r) {
      Se(t, e, r);
    },
    d(t) {
      t && pe(e);
    }
  };
}
function Lo(i) {
  let e = (100 * /*progress_level*/
  (i[14][
    /*i*/
    i[42]
  ] || 0)).toFixed(1) + "", t, r;
  return {
    c() {
      t = Ne(e), r = Ne("%");
    },
    l(n) {
      t = He(n, e), r = He(n, "%");
    },
    m(n, o) {
      Se(n, t, o), Se(n, r, o);
    },
    p(n, o) {
      o[0] & /*progress_level*/
      16384 && e !== (e = (100 * /*progress_level*/
      (n[14][
        /*i*/
        n[42]
      ] || 0)).toFixed(1) + "") && Dt(t, e);
    },
    d(n) {
      n && (pe(t), pe(r));
    }
  };
}
function Oo(i) {
  let e, t = (
    /*p*/
    (i[40].desc != null || /*progress_level*/
    i[14] && /*progress_level*/
    i[14][
      /*i*/
      i[42]
    ] != null) && Bo(i)
  );
  return {
    c() {
      t && t.c(), e = kt();
    },
    l(r) {
      t && t.l(r), e = kt();
    },
    m(r, n) {
      t && t.m(r, n), Se(r, e, n);
    },
    p(r, n) {
      /*p*/
      r[40].desc != null || /*progress_level*/
      r[14] && /*progress_level*/
      r[14][
        /*i*/
        r[42]
      ] != null ? t ? t.p(r, n) : (t = Bo(r), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
    },
    d(r) {
      r && pe(e), t && t.d(r);
    }
  };
}
function Io(i) {
  let e, t, r, n;
  const o = (
    /*#slots*/
    i[30]["additional-loading-text"]
  ), c = Al(
    o,
    i,
    /*$$scope*/
    i[29],
    Co
  );
  return {
    c() {
      e = Xt("p"), t = Ne(
        /*loading_text*/
        i[9]
      ), r = yt(), c && c.c(), this.h();
    },
    l(s) {
      e = Kt(s, "P", { class: !0 });
      var a = Vt(e);
      t = He(
        a,
        /*loading_text*/
        i[9]
      ), a.forEach(pe), r = wt(s), c && c.l(s), this.h();
    },
    h() {
      Pt(e, "class", "loading svelte-17v219f");
    },
    m(s, a) {
      Se(s, e, a), Dr(e, t), Se(s, r, a), c && c.m(s, a), n = !0;
    },
    p(s, a) {
      (!n || a[0] & /*loading_text*/
      512) && Dt(
        t,
        /*loading_text*/
        s[9]
      ), c && c.p && (!n || a[0] & /*$$scope*/
      536870912) && Ll(
        c,
        o,
        s,
        /*$$scope*/
        s[29],
        n ? Fl(
          o,
          /*$$scope*/
          s[29],
          a,
          Ff
        ) : Bl(
          /*$$scope*/
          s[29]
        ),
        Co
      );
    },
    i(s) {
      n || (It(c, s), n = !0);
    },
    o(s) {
      Yt(c, s), n = !1;
    },
    d(s) {
      s && (pe(e), pe(r)), c && c.d(s);
    }
  };
}
function Wf(i) {
  let e, t, r, n, o;
  const c = [Lf, Rf], s = [];
  function a(u, p) {
    return (
      /*status*/
      u[4] === "pending" ? 0 : (
        /*status*/
        u[4] === "error" ? 1 : -1
      )
    );
  }
  return ~(t = a(i)) && (r = s[t] = c[t](i)), {
    c() {
      e = Xt("div"), r && r.c(), this.h();
    },
    l(u) {
      e = Kt(u, "DIV", { class: !0 });
      var p = Vt(e);
      r && r.l(p), p.forEach(pe), this.h();
    },
    h() {
      Pt(e, "class", n = "wrap " + /*variant*/
      i[8] + " " + /*show_progress*/
      i[6] + " svelte-17v219f"), gt(e, "hide", !/*status*/
      i[4] || /*status*/
      i[4] === "complete" || /*show_progress*/
      i[6] === "hidden" || /*status*/
      i[4] == "streaming"), gt(
        e,
        "translucent",
        /*variant*/
        i[8] === "center" && /*status*/
        (i[4] === "pending" || /*status*/
        i[4] === "error") || /*translucent*/
        i[11] || /*show_progress*/
        i[6] === "minimal"
      ), gt(
        e,
        "generating",
        /*status*/
        i[4] === "generating" && /*show_progress*/
        i[6] === "full"
      ), gt(
        e,
        "border",
        /*border*/
        i[12]
      ), _r(
        e,
        "position",
        /*absolute*/
        i[10] ? "absolute" : "static"
      ), _r(
        e,
        "padding",
        /*absolute*/
        i[10] ? "0" : "var(--size-8) 0"
      );
    },
    m(u, p) {
      Se(u, e, p), ~t && s[t].m(e, null), i[33](e), o = !0;
    },
    p(u, p) {
      let f = t;
      t = a(u), t === f ? ~t && s[t].p(u, p) : (r && (nn(), Yt(s[f], 1, 1, () => {
        s[f] = null;
      }), sn()), ~t ? (r = s[t], r ? r.p(u, p) : (r = s[t] = c[t](u), r.c()), It(r, 1), r.m(e, null)) : r = null), (!o || p[0] & /*variant, show_progress*/
      320 && n !== (n = "wrap " + /*variant*/
      u[8] + " " + /*show_progress*/
      u[6] + " svelte-17v219f")) && Pt(e, "class", n), (!o || p[0] & /*variant, show_progress, status, show_progress*/
      336) && gt(e, "hide", !/*status*/
      u[4] || /*status*/
      u[4] === "complete" || /*show_progress*/
      u[6] === "hidden" || /*status*/
      u[4] == "streaming"), (!o || p[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
      2384) && gt(
        e,
        "translucent",
        /*variant*/
        u[8] === "center" && /*status*/
        (u[4] === "pending" || /*status*/
        u[4] === "error") || /*translucent*/
        u[11] || /*show_progress*/
        u[6] === "minimal"
      ), (!o || p[0] & /*variant, show_progress, status, show_progress*/
      336) && gt(
        e,
        "generating",
        /*status*/
        u[4] === "generating" && /*show_progress*/
        u[6] === "full"
      ), (!o || p[0] & /*variant, show_progress, border*/
      4416) && gt(
        e,
        "border",
        /*border*/
        u[12]
      ), p[0] & /*absolute*/
      1024 && _r(
        e,
        "position",
        /*absolute*/
        u[10] ? "absolute" : "static"
      ), p[0] & /*absolute*/
      1024 && _r(
        e,
        "padding",
        /*absolute*/
        u[10] ? "0" : "var(--size-8) 0"
      );
    },
    i(u) {
      o || (It(r), o = !0);
    },
    o(u) {
      Yt(r), o = !1;
    },
    d(u) {
      u && pe(e), ~t && s[t].d(), i[33](null);
    }
  };
}
let Ii = [], Is = !1;
const jf = typeof window < "u", Ol = jf ? window.requestAnimationFrame : (i) => {
};
async function Gf(i, e = !0) {
  if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && e !== !0)) {
    if (Ii.push(i), !Is) Is = !0;
    else return;
    await Af(), Ol(() => {
      let t = [0, 0];
      for (let r = 0; r < Ii.length; r++) {
        const o = Ii[r].getBoundingClientRect();
        (r === 0 || o.top + window.scrollY <= t[0]) && (t[0] = o.top + window.scrollY, t[1] = r);
      }
      window.scrollTo({ top: t[0] - 20, behavior: "smooth" }), Is = !1, Ii = [];
    });
  }
}
function Vf(i, e, t) {
  let r, { $$slots: n = {}, $$scope: o } = e;
  const c = Mf();
  let { i18n: s } = e, { eta: a = null } = e, { queue_position: u } = e, { queue_size: p } = e, { status: f } = e, { scroll_to_output: g = !1 } = e, { timer: v = !0 } = e, { show_progress: C = "full" } = e, { message: b = null } = e, { progress: d = null } = e, { variant: m = "default" } = e, { loading_text: h = "Loading..." } = e, { absolute: l = !0 } = e, { translucent: _ = !1 } = e, { border: S = !1 } = e, { autoscroll: x } = e, D, y = !1, E = 0, B = 0, O = null, N = null, R = 0, j = null, Y, ee = null, ne = !0;
  const Z = () => {
    t(0, a = t(27, O = t(19, I = null))), t(25, E = performance.now()), t(26, B = 0), y = !0, T();
  };
  function T() {
    Ol(() => {
      t(26, B = (performance.now() - E) / 1e3), y && T();
    });
  }
  function L() {
    t(26, B = 0), t(0, a = t(27, O = t(19, I = null))), y && (y = !1);
  }
  Tf(() => {
    y && L();
  });
  let I = null;
  function H(V) {
    yo[V ? "unshift" : "push"](() => {
      ee = V, t(16, ee), t(7, d), t(14, j), t(15, Y);
    });
  }
  const K = () => {
    c("clear_status");
  };
  function re(V) {
    yo[V ? "unshift" : "push"](() => {
      D = V, t(13, D);
    });
  }
  return i.$$set = (V) => {
    "i18n" in V && t(1, s = V.i18n), "eta" in V && t(0, a = V.eta), "queue_position" in V && t(2, u = V.queue_position), "queue_size" in V && t(3, p = V.queue_size), "status" in V && t(4, f = V.status), "scroll_to_output" in V && t(22, g = V.scroll_to_output), "timer" in V && t(5, v = V.timer), "show_progress" in V && t(6, C = V.show_progress), "message" in V && t(23, b = V.message), "progress" in V && t(7, d = V.progress), "variant" in V && t(8, m = V.variant), "loading_text" in V && t(9, h = V.loading_text), "absolute" in V && t(10, l = V.absolute), "translucent" in V && t(11, _ = V.translucent), "border" in V && t(12, S = V.border), "autoscroll" in V && t(24, x = V.autoscroll), "$$scope" in V && t(29, o = V.$$scope);
  }, i.$$.update = () => {
    i.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
    436207617 && (a === null && t(0, a = O), a != null && O !== a && (t(28, N = (performance.now() - E) / 1e3 + a), t(19, I = N.toFixed(1)), t(27, O = a))), i.$$.dirty[0] & /*eta_from_start, timer_diff*/
    335544320 && t(17, R = N === null || N <= 0 || !B ? null : Math.min(B / N, 1)), i.$$.dirty[0] & /*progress*/
    128 && d != null && t(18, ne = !1), i.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
    114816 && (d != null ? t(14, j = d.map((V) => {
      if (V.index != null && V.length != null)
        return V.index / V.length;
      if (V.progress != null)
        return V.progress;
    })) : t(14, j = null), j ? (t(15, Y = j[j.length - 1]), ee && (Y === 0 ? t(16, ee.style.transition = "0", ee) : t(16, ee.style.transition = "150ms", ee))) : t(15, Y = void 0)), i.$$.dirty[0] & /*status*/
    16 && (f === "pending" ? Z() : L()), i.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
    20979728 && D && g && (f === "pending" || f === "complete") && Gf(D, x), i.$$.dirty[0] & /*status, message*/
    8388624, i.$$.dirty[0] & /*timer_diff*/
    67108864 && t(20, r = B.toFixed(1));
  }, [
    a,
    s,
    u,
    p,
    f,
    v,
    C,
    d,
    m,
    h,
    l,
    _,
    S,
    D,
    j,
    Y,
    ee,
    R,
    ne,
    I,
    r,
    c,
    g,
    b,
    x,
    E,
    B,
    O,
    N,
    o,
    n,
    H,
    K,
    re
  ];
}
class Kf extends kf {
  constructor(e) {
    super(), Df(
      this,
      e,
      Vf,
      Wf,
      Ef,
      {
        i18n: 1,
        eta: 0,
        queue_position: 2,
        queue_size: 3,
        status: 4,
        scroll_to_output: 22,
        timer: 5,
        show_progress: 6,
        message: 23,
        progress: 7,
        variant: 8,
        loading_text: 9,
        absolute: 10,
        translucent: 11,
        border: 12,
        autoscroll: 24
      },
      null,
      [-1, -1]
    );
  }
}
/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */
const {
  entries: Il,
  setPrototypeOf: Po,
  isFrozen: Xf,
  getPrototypeOf: Yf,
  getOwnPropertyDescriptor: $f
} = Object;
let {
  freeze: rt,
  seal: Et,
  create: Pl
} = Object, {
  apply: on,
  construct: ln
} = typeof Reflect < "u" && Reflect;
rt || (rt = function(e) {
  return e;
});
Et || (Et = function(e) {
  return e;
});
on || (on = function(e, t, r) {
  return e.apply(t, r);
});
ln || (ln = function(e, t) {
  return new e(...t);
});
const Pi = dt(Array.prototype.forEach), zo = dt(Array.prototype.pop), $r = dt(Array.prototype.push), Ki = dt(String.prototype.toLowerCase), Ps = dt(String.prototype.toString), Ho = dt(String.prototype.match), Zr = dt(String.prototype.replace), Zf = dt(String.prototype.indexOf), Jf = dt(String.prototype.trim), Lt = dt(Object.prototype.hasOwnProperty), et = dt(RegExp.prototype.test), Jr = Qf(TypeError);
function dt(i) {
  return function(e) {
    for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
      r[n - 1] = arguments[n];
    return on(i, e, r);
  };
}
function Qf(i) {
  return function() {
    for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
      t[r] = arguments[r];
    return ln(i, t);
  };
}
function ke(i, e) {
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ki;
  Po && Po(i, null);
  let r = e.length;
  for (; r--; ) {
    let n = e[r];
    if (typeof n == "string") {
      const o = t(n);
      o !== n && (Xf(e) || (e[r] = o), n = o);
    }
    i[n] = !0;
  }
  return i;
}
function em(i) {
  for (let e = 0; e < i.length; e++)
    Lt(i, e) || (i[e] = null);
  return i;
}
function kr(i) {
  const e = Pl(null);
  for (const [t, r] of Il(i))
    Lt(i, t) && (Array.isArray(r) ? e[t] = em(r) : r && typeof r == "object" && r.constructor === Object ? e[t] = kr(r) : e[t] = r);
  return e;
}
function Qr(i, e) {
  for (; i !== null; ) {
    const r = $f(i, e);
    if (r) {
      if (r.get)
        return dt(r.get);
      if (typeof r.value == "function")
        return dt(r.value);
    }
    i = Yf(i);
  }
  function t() {
    return null;
  }
  return t;
}
const No = rt(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), zs = rt(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Hs = rt(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), tm = rt(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ns = rt(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), rm = rt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), qo = rt(["#text"]), Uo = rt(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), qs = rt(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Wo = rt(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), zi = rt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), im = Et(/\{\{[\w\W]*|[\w\W]*\}\}/gm), sm = Et(/<%[\w\W]*|[\w\W]*%>/gm), nm = Et(/\${[\w\W]*}/gm), am = Et(/^data-[\-\w.\u00B7-\uFFFF]/), om = Et(/^aria-[\-\w]+$/), zl = Et(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), lm = Et(/^(?:\w+script|data):/i), hm = Et(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), Hl = Et(/^html$/i), cm = Et(/^[a-z][.\w]*(-[.\w]+)+$/i);
var jo = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  MUSTACHE_EXPR: im,
  ERB_EXPR: sm,
  TMPLIT_EXPR: nm,
  DATA_ATTR: am,
  ARIA_ATTR: om,
  IS_ALLOWED_URI: zl,
  IS_SCRIPT_OR_DATA: lm,
  ATTR_WHITESPACE: hm,
  DOCTYPE_NAME: Hl,
  CUSTOM_ELEMENT: cm
});
const ei = {
  element: 1,
  attribute: 2,
  text: 3,
  cdataSection: 4,
  entityReference: 5,
  // Deprecated
  entityNode: 6,
  // Deprecated
  progressingInstruction: 7,
  comment: 8,
  document: 9,
  documentType: 10,
  documentFragment: 11,
  notation: 12
  // Deprecated
}, um = function() {
  return typeof window > "u" ? null : window;
}, dm = function(e, t) {
  if (typeof e != "object" || typeof e.createPolicy != "function")
    return null;
  let r = null;
  const n = "data-tt-policy-suffix";
  t && t.hasAttribute(n) && (r = t.getAttribute(n));
  const o = "dompurify" + (r ? "#" + r : "");
  try {
    return e.createPolicy(o, {
      createHTML(c) {
        return c;
      },
      createScriptURL(c) {
        return c;
      }
    });
  } catch {
    return console.warn("TrustedTypes policy " + o + " could not be created."), null;
  }
};
function Nl() {
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : um();
  const e = (me) => Nl(me);
  if (e.version = "3.1.7", e.removed = [], !i || !i.document || i.document.nodeType !== ei.document)
    return e.isSupported = !1, e;
  let {
    document: t
  } = i;
  const r = t, n = r.currentScript, {
    DocumentFragment: o,
    HTMLTemplateElement: c,
    Node: s,
    Element: a,
    NodeFilter: u,
    NamedNodeMap: p = i.NamedNodeMap || i.MozNamedAttrMap,
    HTMLFormElement: f,
    DOMParser: g,
    trustedTypes: v
  } = i, C = a.prototype, b = Qr(C, "cloneNode"), d = Qr(C, "remove"), m = Qr(C, "nextSibling"), h = Qr(C, "childNodes"), l = Qr(C, "parentNode");
  if (typeof c == "function") {
    const me = t.createElement("template");
    me.content && me.content.ownerDocument && (t = me.content.ownerDocument);
  }
  let _, S = "";
  const {
    implementation: x,
    createNodeIterator: D,
    createDocumentFragment: y,
    getElementsByTagName: E
  } = t, {
    importNode: B
  } = r;
  let O = {};
  e.isSupported = typeof Il == "function" && typeof l == "function" && x && x.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: N,
    ERB_EXPR: R,
    TMPLIT_EXPR: j,
    DATA_ATTR: Y,
    ARIA_ATTR: ee,
    IS_SCRIPT_OR_DATA: ne,
    ATTR_WHITESPACE: Z,
    CUSTOM_ELEMENT: T
  } = jo;
  let {
    IS_ALLOWED_URI: L
  } = jo, I = null;
  const H = ke({}, [...No, ...zs, ...Hs, ...Ns, ...qo]);
  let K = null;
  const re = ke({}, [...Uo, ...qs, ...Wo, ...zi]);
  let V = Object.seal(Pl(null, {
    tagNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    attributeNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    allowCustomizedBuiltInElements: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: !1
    }
  })), ue = null, W = null, F = !0, X = !0, J = !1, oe = !0, se = !1, be = !0, xe = !1, De = !1, Te = !1, de = !1, Ve = !1, $ = !1, Qt = !0, Mr = !1;
  const Br = "user-content-";
  let $e = !0, At = !1, Ke = {}, mt = null;
  const Fr = ke({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
  let Tt = null;
  const yr = ke({}, ["audio", "video", "img", "source", "image", "track"]);
  let pt = null;
  const ur = ke({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Me = "http://www.w3.org/1998/Math/MathML", Rr = "http://www.w3.org/2000/svg", er = "http://www.w3.org/1999/xhtml";
  let Lr = er, us = !1, ds = null;
  const jl = ke({}, [Me, Rr, er], Ps);
  let Vr = null;
  const Gl = ["application/xhtml+xml", "text/html"], Vl = "text/html";
  let Ge = null, Or = null;
  const Kl = t.createElement("form"), Un = function(U) {
    return U instanceof RegExp || U instanceof Function;
  }, fs = function() {
    let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    if (!(Or && Or === U)) {
      if ((!U || typeof U != "object") && (U = {}), U = kr(U), Vr = // eslint-disable-next-line unicorn/prefer-includes
      Gl.indexOf(U.PARSER_MEDIA_TYPE) === -1 ? Vl : U.PARSER_MEDIA_TYPE, Ge = Vr === "application/xhtml+xml" ? Ps : Ki, I = Lt(U, "ALLOWED_TAGS") ? ke({}, U.ALLOWED_TAGS, Ge) : H, K = Lt(U, "ALLOWED_ATTR") ? ke({}, U.ALLOWED_ATTR, Ge) : re, ds = Lt(U, "ALLOWED_NAMESPACES") ? ke({}, U.ALLOWED_NAMESPACES, Ps) : jl, pt = Lt(U, "ADD_URI_SAFE_ATTR") ? ke(
        kr(ur),
        // eslint-disable-line indent
        U.ADD_URI_SAFE_ATTR,
        // eslint-disable-line indent
        Ge
        // eslint-disable-line indent
      ) : ur, Tt = Lt(U, "ADD_DATA_URI_TAGS") ? ke(
        kr(yr),
        // eslint-disable-line indent
        U.ADD_DATA_URI_TAGS,
        // eslint-disable-line indent
        Ge
        // eslint-disable-line indent
      ) : yr, mt = Lt(U, "FORBID_CONTENTS") ? ke({}, U.FORBID_CONTENTS, Ge) : Fr, ue = Lt(U, "FORBID_TAGS") ? ke({}, U.FORBID_TAGS, Ge) : {}, W = Lt(U, "FORBID_ATTR") ? ke({}, U.FORBID_ATTR, Ge) : {}, Ke = Lt(U, "USE_PROFILES") ? U.USE_PROFILES : !1, F = U.ALLOW_ARIA_ATTR !== !1, X = U.ALLOW_DATA_ATTR !== !1, J = U.ALLOW_UNKNOWN_PROTOCOLS || !1, oe = U.ALLOW_SELF_CLOSE_IN_ATTR !== !1, se = U.SAFE_FOR_TEMPLATES || !1, be = U.SAFE_FOR_XML !== !1, xe = U.WHOLE_DOCUMENT || !1, de = U.RETURN_DOM || !1, Ve = U.RETURN_DOM_FRAGMENT || !1, $ = U.RETURN_TRUSTED_TYPE || !1, Te = U.FORCE_BODY || !1, Qt = U.SANITIZE_DOM !== !1, Mr = U.SANITIZE_NAMED_PROPS || !1, $e = U.KEEP_CONTENT !== !1, At = U.IN_PLACE || !1, L = U.ALLOWED_URI_REGEXP || zl, Lr = U.NAMESPACE || er, V = U.CUSTOM_ELEMENT_HANDLING || {}, U.CUSTOM_ELEMENT_HANDLING && Un(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (V.tagNameCheck = U.CUSTOM_ELEMENT_HANDLING.tagNameCheck), U.CUSTOM_ELEMENT_HANDLING && Un(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (V.attributeNameCheck = U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), U.CUSTOM_ELEMENT_HANDLING && typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (V.allowCustomizedBuiltInElements = U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), se && (X = !1), Ve && (de = !0), Ke && (I = ke({}, qo), K = [], Ke.html === !0 && (ke(I, No), ke(K, Uo)), Ke.svg === !0 && (ke(I, zs), ke(K, qs), ke(K, zi)), Ke.svgFilters === !0 && (ke(I, Hs), ke(K, qs), ke(K, zi)), Ke.mathMl === !0 && (ke(I, Ns), ke(K, Wo), ke(K, zi))), U.ADD_TAGS && (I === H && (I = kr(I)), ke(I, U.ADD_TAGS, Ge)), U.ADD_ATTR && (K === re && (K = kr(K)), ke(K, U.ADD_ATTR, Ge)), U.ADD_URI_SAFE_ATTR && ke(pt, U.ADD_URI_SAFE_ATTR, Ge), U.FORBID_CONTENTS && (mt === Fr && (mt = kr(mt)), ke(mt, U.FORBID_CONTENTS, Ge)), $e && (I["#text"] = !0), xe && ke(I, ["html", "head", "body"]), I.table && (ke(I, ["tbody"]), delete ue.tbody), U.TRUSTED_TYPES_POLICY) {
        if (typeof U.TRUSTED_TYPES_POLICY.createHTML != "function")
          throw Jr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
        if (typeof U.TRUSTED_TYPES_POLICY.createScriptURL != "function")
          throw Jr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
        _ = U.TRUSTED_TYPES_POLICY, S = _.createHTML("");
      } else
        _ === void 0 && (_ = dm(v, n)), _ !== null && typeof S == "string" && (S = _.createHTML(""));
      rt && rt(U), Or = U;
    }
  }, Wn = ke({}, ["mi", "mo", "mn", "ms", "mtext"]), jn = ke({}, ["annotation-xml"]), Xl = ke({}, ["title", "style", "font", "a", "script"]), Gn = ke({}, [...zs, ...Hs, ...tm]), Vn = ke({}, [...Ns, ...rm]), Yl = function(U) {
    let ae = l(U);
    (!ae || !ae.tagName) && (ae = {
      namespaceURI: Lr,
      tagName: "template"
    });
    const fe = Ki(U.tagName), Le = Ki(ae.tagName);
    return ds[U.namespaceURI] ? U.namespaceURI === Rr ? ae.namespaceURI === er ? fe === "svg" : ae.namespaceURI === Me ? fe === "svg" && (Le === "annotation-xml" || Wn[Le]) : !!Gn[fe] : U.namespaceURI === Me ? ae.namespaceURI === er ? fe === "math" : ae.namespaceURI === Rr ? fe === "math" && jn[Le] : !!Vn[fe] : U.namespaceURI === er ? ae.namespaceURI === Rr && !jn[Le] || ae.namespaceURI === Me && !Wn[Le] ? !1 : !Vn[fe] && (Xl[fe] || !Gn[fe]) : !!(Vr === "application/xhtml+xml" && ds[U.namespaceURI]) : !1;
  }, Ht = function(U) {
    $r(e.removed, {
      element: U
    });
    try {
      l(U).removeChild(U);
    } catch {
      d(U);
    }
  }, _i = function(U, ae) {
    try {
      $r(e.removed, {
        attribute: ae.getAttributeNode(U),
        from: ae
      });
    } catch {
      $r(e.removed, {
        attribute: null,
        from: ae
      });
    }
    if (ae.removeAttribute(U), U === "is" && !K[U])
      if (de || Ve)
        try {
          Ht(ae);
        } catch {
        }
      else
        try {
          ae.setAttribute(U, "");
        } catch {
        }
  }, Kn = function(U) {
    let ae = null, fe = null;
    if (Te)
      U = "<remove></remove>" + U;
    else {
      const Xe = Ho(U, /^[\r\n\t ]+/);
      fe = Xe && Xe[0];
    }
    Vr === "application/xhtml+xml" && Lr === er && (U = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + U + "</body></html>");
    const Le = _ ? _.createHTML(U) : U;
    if (Lr === er)
      try {
        ae = new g().parseFromString(Le, Vr);
      } catch {
      }
    if (!ae || !ae.documentElement) {
      ae = x.createDocument(Lr, "template", null);
      try {
        ae.documentElement.innerHTML = us ? S : Le;
      } catch {
      }
    }
    const Ze = ae.body || ae.documentElement;
    return U && fe && Ze.insertBefore(t.createTextNode(fe), Ze.childNodes[0] || null), Lr === er ? E.call(ae, xe ? "html" : "body")[0] : xe ? ae.documentElement : Ze;
  }, Xn = function(U) {
    return D.call(
      U.ownerDocument || U,
      U,
      // eslint-disable-next-line no-bitwise
      u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION,
      null
    );
  }, Yn = function(U) {
    return U instanceof f && (typeof U.nodeName != "string" || typeof U.textContent != "string" || typeof U.removeChild != "function" || !(U.attributes instanceof p) || typeof U.removeAttribute != "function" || typeof U.setAttribute != "function" || typeof U.namespaceURI != "string" || typeof U.insertBefore != "function" || typeof U.hasChildNodes != "function");
  }, $n = function(U) {
    return typeof s == "function" && U instanceof s;
  }, tr = function(U, ae, fe) {
    O[U] && Pi(O[U], (Le) => {
      Le.call(e, ae, fe, Or);
    });
  }, Zn = function(U) {
    let ae = null;
    if (tr("beforeSanitizeElements", U, null), Yn(U))
      return Ht(U), !0;
    const fe = Ge(U.nodeName);
    if (tr("uponSanitizeElement", U, {
      tagName: fe,
      allowedTags: I
    }), U.hasChildNodes() && !$n(U.firstElementChild) && et(/<[/\w]/g, U.innerHTML) && et(/<[/\w]/g, U.textContent) || U.nodeType === ei.progressingInstruction || be && U.nodeType === ei.comment && et(/<[/\w]/g, U.data))
      return Ht(U), !0;
    if (!I[fe] || ue[fe]) {
      if (!ue[fe] && Qn(fe) && (V.tagNameCheck instanceof RegExp && et(V.tagNameCheck, fe) || V.tagNameCheck instanceof Function && V.tagNameCheck(fe)))
        return !1;
      if ($e && !mt[fe]) {
        const Le = l(U) || U.parentNode, Ze = h(U) || U.childNodes;
        if (Ze && Le) {
          const Xe = Ze.length;
          for (let st = Xe - 1; st >= 0; --st) {
            const Nt = b(Ze[st], !0);
            Nt.__removalCount = (U.__removalCount || 0) + 1, Le.insertBefore(Nt, m(U));
          }
        }
      }
      return Ht(U), !0;
    }
    return U instanceof a && !Yl(U) || (fe === "noscript" || fe === "noembed" || fe === "noframes") && et(/<\/no(script|embed|frames)/i, U.innerHTML) ? (Ht(U), !0) : (se && U.nodeType === ei.text && (ae = U.textContent, Pi([N, R, j], (Le) => {
      ae = Zr(ae, Le, " ");
    }), U.textContent !== ae && ($r(e.removed, {
      element: U.cloneNode()
    }), U.textContent = ae)), tr("afterSanitizeElements", U, null), !1);
  }, Jn = function(U, ae, fe) {
    if (Qt && (ae === "id" || ae === "name") && (fe in t || fe in Kl))
      return !1;
    if (!(X && !W[ae] && et(Y, ae))) {
      if (!(F && et(ee, ae))) {
        if (!K[ae] || W[ae]) {
          if (
            // First condition does a very basic check if a) it's basically a valid custom element tagname AND
            // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
            !(Qn(U) && (V.tagNameCheck instanceof RegExp && et(V.tagNameCheck, U) || V.tagNameCheck instanceof Function && V.tagNameCheck(U)) && (V.attributeNameCheck instanceof RegExp && et(V.attributeNameCheck, ae) || V.attributeNameCheck instanceof Function && V.attributeNameCheck(ae)) || // Alternative, second condition checks if it's an `is`-attribute, AND
            // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            ae === "is" && V.allowCustomizedBuiltInElements && (V.tagNameCheck instanceof RegExp && et(V.tagNameCheck, fe) || V.tagNameCheck instanceof Function && V.tagNameCheck(fe)))
          ) return !1;
        } else if (!pt[ae]) {
          if (!et(L, Zr(fe, Z, ""))) {
            if (!((ae === "src" || ae === "xlink:href" || ae === "href") && U !== "script" && Zf(fe, "data:") === 0 && Tt[U])) {
              if (!(J && !et(ne, Zr(fe, Z, "")))) {
                if (fe)
                  return !1;
              }
            }
          }
        }
      }
    }
    return !0;
  }, Qn = function(U) {
    return U !== "annotation-xml" && Ho(U, T);
  }, ea = function(U) {
    tr("beforeSanitizeAttributes", U, null);
    const {
      attributes: ae
    } = U;
    if (!ae)
      return;
    const fe = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: K
    };
    let Le = ae.length;
    for (; Le--; ) {
      const Ze = ae[Le], {
        name: Xe,
        namespaceURI: st,
        value: Nt
      } = Ze, Kr = Ge(Xe);
      let Je = Xe === "value" ? Nt : Jf(Nt);
      if (fe.attrName = Kr, fe.attrValue = Je, fe.keepAttr = !0, fe.forceKeepAttr = void 0, tr("uponSanitizeAttribute", U, fe), Je = fe.attrValue, fe.forceKeepAttr || (_i(Xe, U), !fe.keepAttr))
        continue;
      if (!oe && et(/\/>/i, Je)) {
        _i(Xe, U);
        continue;
      }
      se && Pi([N, R, j], (ra) => {
        Je = Zr(Je, ra, " ");
      });
      const ta = Ge(U.nodeName);
      if (Jn(ta, Kr, Je)) {
        if (Mr && (Kr === "id" || Kr === "name") && (_i(Xe, U), Je = Br + Je), be && et(/((--!?|])>)|<\/(style|title)/i, Je)) {
          _i(Xe, U);
          continue;
        }
        if (_ && typeof v == "object" && typeof v.getAttributeType == "function" && !st)
          switch (v.getAttributeType(ta, Kr)) {
            case "TrustedHTML": {
              Je = _.createHTML(Je);
              break;
            }
            case "TrustedScriptURL": {
              Je = _.createScriptURL(Je);
              break;
            }
          }
        try {
          st ? U.setAttributeNS(st, Xe, Je) : U.setAttribute(Xe, Je), Yn(U) ? Ht(U) : zo(e.removed);
        } catch {
        }
      }
    }
    tr("afterSanitizeAttributes", U, null);
  }, $l = function me(U) {
    let ae = null;
    const fe = Xn(U);
    for (tr("beforeSanitizeShadowDOM", U, null); ae = fe.nextNode(); )
      tr("uponSanitizeShadowNode", ae, null), !Zn(ae) && (ae.content instanceof o && me(ae.content), ea(ae));
    tr("afterSanitizeShadowDOM", U, null);
  };
  return e.sanitize = function(me) {
    let U = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ae = null, fe = null, Le = null, Ze = null;
    if (us = !me, us && (me = "<!-->"), typeof me != "string" && !$n(me))
      if (typeof me.toString == "function") {
        if (me = me.toString(), typeof me != "string")
          throw Jr("dirty is not a string, aborting");
      } else
        throw Jr("toString is not a function");
    if (!e.isSupported)
      return me;
    if (De || fs(U), e.removed = [], typeof me == "string" && (At = !1), At) {
      if (me.nodeName) {
        const Nt = Ge(me.nodeName);
        if (!I[Nt] || ue[Nt])
          throw Jr("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (me instanceof s)
      ae = Kn("<!---->"), fe = ae.ownerDocument.importNode(me, !0), fe.nodeType === ei.element && fe.nodeName === "BODY" || fe.nodeName === "HTML" ? ae = fe : ae.appendChild(fe);
    else {
      if (!de && !se && !xe && // eslint-disable-next-line unicorn/prefer-includes
      me.indexOf("<") === -1)
        return _ && $ ? _.createHTML(me) : me;
      if (ae = Kn(me), !ae)
        return de ? null : $ ? S : "";
    }
    ae && Te && Ht(ae.firstChild);
    const Xe = Xn(At ? me : ae);
    for (; Le = Xe.nextNode(); )
      Zn(Le) || (Le.content instanceof o && $l(Le.content), ea(Le));
    if (At)
      return me;
    if (de) {
      if (Ve)
        for (Ze = y.call(ae.ownerDocument); ae.firstChild; )
          Ze.appendChild(ae.firstChild);
      else
        Ze = ae;
      return (K.shadowroot || K.shadowrootmode) && (Ze = B.call(r, Ze, !0)), Ze;
    }
    let st = xe ? ae.outerHTML : ae.innerHTML;
    return xe && I["!doctype"] && ae.ownerDocument && ae.ownerDocument.doctype && ae.ownerDocument.doctype.name && et(Hl, ae.ownerDocument.doctype.name) && (st = "<!DOCTYPE " + ae.ownerDocument.doctype.name + `>
` + st), se && Pi([N, R, j], (Nt) => {
      st = Zr(st, Nt, " ");
    }), _ && $ ? _.createHTML(st) : st;
  }, e.setConfig = function() {
    let me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    fs(me), De = !0;
  }, e.clearConfig = function() {
    Or = null, De = !1;
  }, e.isValidAttribute = function(me, U, ae) {
    Or || fs({});
    const fe = Ge(me), Le = Ge(U);
    return Jn(fe, Le, ae);
  }, e.addHook = function(me, U) {
    typeof U == "function" && (O[me] = O[me] || [], $r(O[me], U));
  }, e.removeHook = function(me) {
    if (O[me])
      return zo(O[me]);
  }, e.removeHooks = function(me) {
    O[me] && (O[me] = []);
  }, e.removeAllHooks = function() {
    O = {};
  }, e;
}
Nl();
var ql = { exports: {} };
(function(i, e) {
  (function(t, r) {
    i.exports = r();
  })(globalThis, () => (() => {
    var t = { 4567: function(c, s, a) {
      var u = this && this.__decorate || function(h, l, _, S) {
        var x, D = arguments.length, y = D < 3 ? l : S === null ? S = Object.getOwnPropertyDescriptor(l, _) : S;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") y = Reflect.decorate(h, l, _, S);
        else for (var E = h.length - 1; E >= 0; E--) (x = h[E]) && (y = (D < 3 ? x(y) : D > 3 ? x(l, _, y) : x(l, _)) || y);
        return D > 3 && y && Object.defineProperty(l, _, y), y;
      }, p = this && this.__param || function(h, l) {
        return function(_, S) {
          l(_, S, h);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.AccessibilityManager = void 0;
      const f = a(9042), g = a(9924), v = a(844), C = a(4725), b = a(2585), d = a(3656);
      let m = s.AccessibilityManager = class extends v.Disposable {
        constructor(h, l, _, S) {
          super(), this._terminal = h, this._coreBrowserService = _, this._renderService = S, this._rowColumns = /* @__PURE__ */ new WeakMap(), this._liveRegionLineCount = 0, this._charsToConsume = [], this._charsToAnnounce = "", this._accessibilityContainer = this._coreBrowserService.mainDocument.createElement("div"), this._accessibilityContainer.classList.add("xterm-accessibility"), this._rowContainer = this._coreBrowserService.mainDocument.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
          for (let x = 0; x < this._terminal.rows; x++) this._rowElements[x] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[x]);
          if (this._topBoundaryFocusListener = (x) => this._handleBoundaryFocus(x, 0), this._bottomBoundaryFocusListener = (x) => this._handleBoundaryFocus(x, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions(), this._accessibilityContainer.appendChild(this._rowContainer), this._liveRegion = this._coreBrowserService.mainDocument.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityContainer.appendChild(this._liveRegion), this._liveRegionDebouncer = this.register(new g.TimeBasedDebouncer(this._renderRows.bind(this))), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
          this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityContainer), this.register(this._terminal.onResize((x) => this._handleResize(x.rows))), this.register(this._terminal.onRender((x) => this._refreshRows(x.start, x.end))), this.register(this._terminal.onScroll(() => this._refreshRows())), this.register(this._terminal.onA11yChar((x) => this._handleChar(x))), this.register(this._terminal.onLineFeed(() => this._handleChar(`
`))), this.register(this._terminal.onA11yTab((x) => this._handleTab(x))), this.register(this._terminal.onKey((x) => this._handleKey(x.key))), this.register(this._terminal.onBlur(() => this._clearLiveRegion())), this.register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions())), this.register((0, d.addDisposableDomListener)(document, "selectionchange", () => this._handleSelectionChange())), this.register(this._coreBrowserService.onDprChange(() => this._refreshRowsDimensions())), this._refreshRows(), this.register((0, v.toDisposable)(() => {
            this._accessibilityContainer.remove(), this._rowElements.length = 0;
          }));
        }
        _handleTab(h) {
          for (let l = 0; l < h; l++) this._handleChar(" ");
        }
        _handleChar(h) {
          this._liveRegionLineCount < 21 && (this._charsToConsume.length > 0 ? this._charsToConsume.shift() !== h && (this._charsToAnnounce += h) : this._charsToAnnounce += h, h === `
` && (this._liveRegionLineCount++, this._liveRegionLineCount === 21 && (this._liveRegion.textContent += f.tooMuchOutput)));
        }
        _clearLiveRegion() {
          this._liveRegion.textContent = "", this._liveRegionLineCount = 0;
        }
        _handleKey(h) {
          this._clearLiveRegion(), /\p{Control}/u.test(h) || this._charsToConsume.push(h);
        }
        _refreshRows(h, l) {
          this._liveRegionDebouncer.refresh(h, l, this._terminal.rows);
        }
        _renderRows(h, l) {
          const _ = this._terminal.buffer, S = _.lines.length.toString();
          for (let x = h; x <= l; x++) {
            const D = _.lines.get(_.ydisp + x), y = [], E = D?.translateToString(!0, void 0, void 0, y) || "", B = (_.ydisp + x + 1).toString(), O = this._rowElements[x];
            O && (E.length === 0 ? (O.innerText = " ", this._rowColumns.set(O, [0, 1])) : (O.textContent = E, this._rowColumns.set(O, y)), O.setAttribute("aria-posinset", B), O.setAttribute("aria-setsize", S));
          }
          this._announceCharacters();
        }
        _announceCharacters() {
          this._charsToAnnounce.length !== 0 && (this._liveRegion.textContent += this._charsToAnnounce, this._charsToAnnounce = "");
        }
        _handleBoundaryFocus(h, l) {
          const _ = h.target, S = this._rowElements[l === 0 ? 1 : this._rowElements.length - 2];
          if (_.getAttribute("aria-posinset") === (l === 0 ? "1" : `${this._terminal.buffer.lines.length}`) || h.relatedTarget !== S) return;
          let x, D;
          if (l === 0 ? (x = _, D = this._rowElements.pop(), this._rowContainer.removeChild(D)) : (x = this._rowElements.shift(), D = _, this._rowContainer.removeChild(x)), x.removeEventListener("focus", this._topBoundaryFocusListener), D.removeEventListener("focus", this._bottomBoundaryFocusListener), l === 0) {
            const y = this._createAccessibilityTreeNode();
            this._rowElements.unshift(y), this._rowContainer.insertAdjacentElement("afterbegin", y);
          } else {
            const y = this._createAccessibilityTreeNode();
            this._rowElements.push(y), this._rowContainer.appendChild(y);
          }
          this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._terminal.scrollLines(l === 0 ? -1 : 1), this._rowElements[l === 0 ? 1 : this._rowElements.length - 2].focus(), h.preventDefault(), h.stopImmediatePropagation();
        }
        _handleSelectionChange() {
          if (this._rowElements.length === 0) return;
          const h = document.getSelection();
          if (!h) return;
          if (h.isCollapsed) return void (this._rowContainer.contains(h.anchorNode) && this._terminal.clearSelection());
          if (!h.anchorNode || !h.focusNode) return void console.error("anchorNode and/or focusNode are null");
          let l = { node: h.anchorNode, offset: h.anchorOffset }, _ = { node: h.focusNode, offset: h.focusOffset };
          if ((l.node.compareDocumentPosition(_.node) & Node.DOCUMENT_POSITION_PRECEDING || l.node === _.node && l.offset > _.offset) && ([l, _] = [_, l]), l.node.compareDocumentPosition(this._rowElements[0]) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_FOLLOWING) && (l = { node: this._rowElements[0].childNodes[0], offset: 0 }), !this._rowContainer.contains(l.node)) return;
          const S = this._rowElements.slice(-1)[0];
          if (_.node.compareDocumentPosition(S) & (Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_PRECEDING) && (_ = { node: S, offset: S.textContent?.length ?? 0 }), !this._rowContainer.contains(_.node)) return;
          const x = ({ node: E, offset: B }) => {
            const O = E instanceof Text ? E.parentNode : E;
            let N = parseInt(O?.getAttribute("aria-posinset"), 10) - 1;
            if (isNaN(N)) return console.warn("row is invalid. Race condition?"), null;
            const R = this._rowColumns.get(O);
            if (!R) return console.warn("columns is null. Race condition?"), null;
            let j = B < R.length ? R[B] : R.slice(-1)[0] + 1;
            return j >= this._terminal.cols && (++N, j = 0), { row: N, column: j };
          }, D = x(l), y = x(_);
          if (D && y) {
            if (D.row > y.row || D.row === y.row && D.column >= y.column) throw new Error("invalid range");
            this._terminal.select(D.column, D.row, (y.row - D.row) * this._terminal.cols - D.column + y.column);
          }
        }
        _handleResize(h) {
          this._rowElements[this._rowElements.length - 1].removeEventListener("focus", this._bottomBoundaryFocusListener);
          for (let l = this._rowContainer.children.length; l < this._terminal.rows; l++) this._rowElements[l] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[l]);
          for (; this._rowElements.length > h; ) this._rowContainer.removeChild(this._rowElements.pop());
          this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions();
        }
        _createAccessibilityTreeNode() {
          const h = this._coreBrowserService.mainDocument.createElement("div");
          return h.setAttribute("role", "listitem"), h.tabIndex = -1, this._refreshRowDimensions(h), h;
        }
        _refreshRowsDimensions() {
          if (this._renderService.dimensions.css.cell.height) {
            this._accessibilityContainer.style.width = `${this._renderService.dimensions.css.canvas.width}px`, this._rowElements.length !== this._terminal.rows && this._handleResize(this._terminal.rows);
            for (let h = 0; h < this._terminal.rows; h++) this._refreshRowDimensions(this._rowElements[h]);
          }
        }
        _refreshRowDimensions(h) {
          h.style.height = `${this._renderService.dimensions.css.cell.height}px`;
        }
      };
      s.AccessibilityManager = m = u([p(1, b.IInstantiationService), p(2, C.ICoreBrowserService), p(3, C.IRenderService)], m);
    }, 3614: (c, s) => {
      function a(g) {
        return g.replace(/\r?\n/g, "\r");
      }
      function u(g, v) {
        return v ? "\x1B[200~" + g + "\x1B[201~" : g;
      }
      function p(g, v, C, b) {
        g = u(g = a(g), C.decPrivateModes.bracketedPasteMode && b.rawOptions.ignoreBracketedPasteMode !== !0), C.triggerDataEvent(g, !0), v.value = "";
      }
      function f(g, v, C) {
        const b = C.getBoundingClientRect(), d = g.clientX - b.left - 10, m = g.clientY - b.top - 10;
        v.style.width = "20px", v.style.height = "20px", v.style.left = `${d}px`, v.style.top = `${m}px`, v.style.zIndex = "1000", v.focus();
      }
      Object.defineProperty(s, "__esModule", { value: !0 }), s.rightClickHandler = s.moveTextAreaUnderMouseCursor = s.paste = s.handlePasteEvent = s.copyHandler = s.bracketTextForPaste = s.prepareTextForTerminal = void 0, s.prepareTextForTerminal = a, s.bracketTextForPaste = u, s.copyHandler = function(g, v) {
        g.clipboardData && g.clipboardData.setData("text/plain", v.selectionText), g.preventDefault();
      }, s.handlePasteEvent = function(g, v, C, b) {
        g.stopPropagation(), g.clipboardData && p(g.clipboardData.getData("text/plain"), v, C, b);
      }, s.paste = p, s.moveTextAreaUnderMouseCursor = f, s.rightClickHandler = function(g, v, C, b, d) {
        f(g, v, C), d && b.rightClickSelect(g), v.value = b.selectionText, v.select();
      };
    }, 7239: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.ColorContrastCache = void 0;
      const u = a(1505);
      s.ColorContrastCache = class {
        constructor() {
          this._color = new u.TwoKeyMap(), this._css = new u.TwoKeyMap();
        }
        setCss(p, f, g) {
          this._css.set(p, f, g);
        }
        getCss(p, f) {
          return this._css.get(p, f);
        }
        setColor(p, f, g) {
          this._color.set(p, f, g);
        }
        getColor(p, f) {
          return this._color.get(p, f);
        }
        clear() {
          this._color.clear(), this._css.clear();
        }
      };
    }, 3656: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.addDisposableDomListener = void 0, s.addDisposableDomListener = function(a, u, p, f) {
        a.addEventListener(u, p, f);
        let g = !1;
        return { dispose: () => {
          g || (g = !0, a.removeEventListener(u, p, f));
        } };
      };
    }, 3551: function(c, s, a) {
      var u = this && this.__decorate || function(m, h, l, _) {
        var S, x = arguments.length, D = x < 3 ? h : _ === null ? _ = Object.getOwnPropertyDescriptor(h, l) : _;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") D = Reflect.decorate(m, h, l, _);
        else for (var y = m.length - 1; y >= 0; y--) (S = m[y]) && (D = (x < 3 ? S(D) : x > 3 ? S(h, l, D) : S(h, l)) || D);
        return x > 3 && D && Object.defineProperty(h, l, D), D;
      }, p = this && this.__param || function(m, h) {
        return function(l, _) {
          h(l, _, m);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.Linkifier = void 0;
      const f = a(3656), g = a(8460), v = a(844), C = a(2585), b = a(4725);
      let d = s.Linkifier = class extends v.Disposable {
        get currentLink() {
          return this._currentLink;
        }
        constructor(m, h, l, _, S) {
          super(), this._element = m, this._mouseService = h, this._renderService = l, this._bufferService = _, this._linkProviderService = S, this._linkCacheDisposables = [], this._isMouseOut = !0, this._wasResized = !1, this._activeLine = -1, this._onShowLinkUnderline = this.register(new g.EventEmitter()), this.onShowLinkUnderline = this._onShowLinkUnderline.event, this._onHideLinkUnderline = this.register(new g.EventEmitter()), this.onHideLinkUnderline = this._onHideLinkUnderline.event, this.register((0, v.getDisposeArrayDisposable)(this._linkCacheDisposables)), this.register((0, v.toDisposable)(() => {
            this._lastMouseEvent = void 0, this._activeProviderReplies?.clear();
          })), this.register(this._bufferService.onResize(() => {
            this._clearCurrentLink(), this._wasResized = !0;
          })), this.register((0, f.addDisposableDomListener)(this._element, "mouseleave", () => {
            this._isMouseOut = !0, this._clearCurrentLink();
          })), this.register((0, f.addDisposableDomListener)(this._element, "mousemove", this._handleMouseMove.bind(this))), this.register((0, f.addDisposableDomListener)(this._element, "mousedown", this._handleMouseDown.bind(this))), this.register((0, f.addDisposableDomListener)(this._element, "mouseup", this._handleMouseUp.bind(this)));
        }
        _handleMouseMove(m) {
          this._lastMouseEvent = m;
          const h = this._positionFromMouseEvent(m, this._element, this._mouseService);
          if (!h) return;
          this._isMouseOut = !1;
          const l = m.composedPath();
          for (let _ = 0; _ < l.length; _++) {
            const S = l[_];
            if (S.classList.contains("xterm")) break;
            if (S.classList.contains("xterm-hover")) return;
          }
          this._lastBufferCell && h.x === this._lastBufferCell.x && h.y === this._lastBufferCell.y || (this._handleHover(h), this._lastBufferCell = h);
        }
        _handleHover(m) {
          if (this._activeLine !== m.y || this._wasResized) return this._clearCurrentLink(), this._askForLink(m, !1), void (this._wasResized = !1);
          this._currentLink && this._linkAtPosition(this._currentLink.link, m) || (this._clearCurrentLink(), this._askForLink(m, !0));
        }
        _askForLink(m, h) {
          this._activeProviderReplies && h || (this._activeProviderReplies?.forEach((_) => {
            _?.forEach((S) => {
              S.link.dispose && S.link.dispose();
            });
          }), this._activeProviderReplies = /* @__PURE__ */ new Map(), this._activeLine = m.y);
          let l = !1;
          for (const [_, S] of this._linkProviderService.linkProviders.entries()) h ? this._activeProviderReplies?.get(_) && (l = this._checkLinkProviderResult(_, m, l)) : S.provideLinks(m.y, (x) => {
            if (this._isMouseOut) return;
            const D = x?.map((y) => ({ link: y }));
            this._activeProviderReplies?.set(_, D), l = this._checkLinkProviderResult(_, m, l), this._activeProviderReplies?.size === this._linkProviderService.linkProviders.length && this._removeIntersectingLinks(m.y, this._activeProviderReplies);
          });
        }
        _removeIntersectingLinks(m, h) {
          const l = /* @__PURE__ */ new Set();
          for (let _ = 0; _ < h.size; _++) {
            const S = h.get(_);
            if (S) for (let x = 0; x < S.length; x++) {
              const D = S[x], y = D.link.range.start.y < m ? 0 : D.link.range.start.x, E = D.link.range.end.y > m ? this._bufferService.cols : D.link.range.end.x;
              for (let B = y; B <= E; B++) {
                if (l.has(B)) {
                  S.splice(x--, 1);
                  break;
                }
                l.add(B);
              }
            }
          }
        }
        _checkLinkProviderResult(m, h, l) {
          if (!this._activeProviderReplies) return l;
          const _ = this._activeProviderReplies.get(m);
          let S = !1;
          for (let x = 0; x < m; x++) this._activeProviderReplies.has(x) && !this._activeProviderReplies.get(x) || (S = !0);
          if (!S && _) {
            const x = _.find((D) => this._linkAtPosition(D.link, h));
            x && (l = !0, this._handleNewLink(x));
          }
          if (this._activeProviderReplies.size === this._linkProviderService.linkProviders.length && !l) for (let x = 0; x < this._activeProviderReplies.size; x++) {
            const D = this._activeProviderReplies.get(x)?.find((y) => this._linkAtPosition(y.link, h));
            if (D) {
              l = !0, this._handleNewLink(D);
              break;
            }
          }
          return l;
        }
        _handleMouseDown() {
          this._mouseDownLink = this._currentLink;
        }
        _handleMouseUp(m) {
          if (!this._currentLink) return;
          const h = this._positionFromMouseEvent(m, this._element, this._mouseService);
          h && this._mouseDownLink === this._currentLink && this._linkAtPosition(this._currentLink.link, h) && this._currentLink.link.activate(m, this._currentLink.link.text);
        }
        _clearCurrentLink(m, h) {
          this._currentLink && this._lastMouseEvent && (!m || !h || this._currentLink.link.range.start.y >= m && this._currentLink.link.range.end.y <= h) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, (0, v.disposeArray)(this._linkCacheDisposables));
        }
        _handleNewLink(m) {
          if (!this._lastMouseEvent) return;
          const h = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
          h && this._linkAtPosition(m.link, h) && (this._currentLink = m, this._currentLink.state = { decorations: { underline: m.link.decorations === void 0 || m.link.decorations.underline, pointerCursor: m.link.decorations === void 0 || m.link.decorations.pointerCursor }, isHovered: !0 }, this._linkHover(this._element, m.link, this._lastMouseEvent), m.link.decorations = {}, Object.defineProperties(m.link.decorations, { pointerCursor: { get: () => this._currentLink?.state?.decorations.pointerCursor, set: (l) => {
            this._currentLink?.state && this._currentLink.state.decorations.pointerCursor !== l && (this._currentLink.state.decorations.pointerCursor = l, this._currentLink.state.isHovered && this._element.classList.toggle("xterm-cursor-pointer", l));
          } }, underline: { get: () => this._currentLink?.state?.decorations.underline, set: (l) => {
            this._currentLink?.state && this._currentLink?.state?.decorations.underline !== l && (this._currentLink.state.decorations.underline = l, this._currentLink.state.isHovered && this._fireUnderlineEvent(m.link, l));
          } } }), this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l) => {
            if (!this._currentLink) return;
            const _ = l.start === 0 ? 0 : l.start + 1 + this._bufferService.buffer.ydisp, S = this._bufferService.buffer.ydisp + 1 + l.end;
            if (this._currentLink.link.range.start.y >= _ && this._currentLink.link.range.end.y <= S && (this._clearCurrentLink(_, S), this._lastMouseEvent)) {
              const x = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
              x && this._askForLink(x, !1);
            }
          })));
        }
        _linkHover(m, h, l) {
          this._currentLink?.state && (this._currentLink.state.isHovered = !0, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(h, !0), this._currentLink.state.decorations.pointerCursor && m.classList.add("xterm-cursor-pointer")), h.hover && h.hover(l, h.text);
        }
        _fireUnderlineEvent(m, h) {
          const l = m.range, _ = this._bufferService.buffer.ydisp, S = this._createLinkUnderlineEvent(l.start.x - 1, l.start.y - _ - 1, l.end.x, l.end.y - _ - 1, void 0);
          (h ? this._onShowLinkUnderline : this._onHideLinkUnderline).fire(S);
        }
        _linkLeave(m, h, l) {
          this._currentLink?.state && (this._currentLink.state.isHovered = !1, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(h, !1), this._currentLink.state.decorations.pointerCursor && m.classList.remove("xterm-cursor-pointer")), h.leave && h.leave(l, h.text);
        }
        _linkAtPosition(m, h) {
          const l = m.range.start.y * this._bufferService.cols + m.range.start.x, _ = m.range.end.y * this._bufferService.cols + m.range.end.x, S = h.y * this._bufferService.cols + h.x;
          return l <= S && S <= _;
        }
        _positionFromMouseEvent(m, h, l) {
          const _ = l.getCoords(m, h, this._bufferService.cols, this._bufferService.rows);
          if (_) return { x: _[0], y: _[1] + this._bufferService.buffer.ydisp };
        }
        _createLinkUnderlineEvent(m, h, l, _, S) {
          return { x1: m, y1: h, x2: l, y2: _, cols: this._bufferService.cols, fg: S };
        }
      };
      s.Linkifier = d = u([p(1, b.IMouseService), p(2, b.IRenderService), p(3, C.IBufferService), p(4, b.ILinkProviderService)], d);
    }, 9042: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.tooMuchOutput = s.promptLabel = void 0, s.promptLabel = "Terminal input", s.tooMuchOutput = "Too much output to announce, navigate to rows manually to read";
    }, 3730: function(c, s, a) {
      var u = this && this.__decorate || function(b, d, m, h) {
        var l, _ = arguments.length, S = _ < 3 ? d : h === null ? h = Object.getOwnPropertyDescriptor(d, m) : h;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") S = Reflect.decorate(b, d, m, h);
        else for (var x = b.length - 1; x >= 0; x--) (l = b[x]) && (S = (_ < 3 ? l(S) : _ > 3 ? l(d, m, S) : l(d, m)) || S);
        return _ > 3 && S && Object.defineProperty(d, m, S), S;
      }, p = this && this.__param || function(b, d) {
        return function(m, h) {
          d(m, h, b);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.OscLinkProvider = void 0;
      const f = a(511), g = a(2585);
      let v = s.OscLinkProvider = class {
        constructor(b, d, m) {
          this._bufferService = b, this._optionsService = d, this._oscLinkService = m;
        }
        provideLinks(b, d) {
          const m = this._bufferService.buffer.lines.get(b - 1);
          if (!m) return void d(void 0);
          const h = [], l = this._optionsService.rawOptions.linkHandler, _ = new f.CellData(), S = m.getTrimmedLength();
          let x = -1, D = -1, y = !1;
          for (let E = 0; E < S; E++) if (D !== -1 || m.hasContent(E)) {
            if (m.loadCell(E, _), _.hasExtendedAttrs() && _.extended.urlId) {
              if (D === -1) {
                D = E, x = _.extended.urlId;
                continue;
              }
              y = _.extended.urlId !== x;
            } else D !== -1 && (y = !0);
            if (y || D !== -1 && E === S - 1) {
              const B = this._oscLinkService.getLinkData(x)?.uri;
              if (B) {
                const O = { start: { x: D + 1, y: b }, end: { x: E + (y || E !== S - 1 ? 0 : 1), y: b } };
                let N = !1;
                if (!l?.allowNonHttpProtocols) try {
                  const R = new URL(B);
                  ["http:", "https:"].includes(R.protocol) || (N = !0);
                } catch {
                  N = !0;
                }
                N || h.push({ text: B, range: O, activate: (R, j) => l ? l.activate(R, j, O) : C(0, j), hover: (R, j) => l?.hover?.(R, j, O), leave: (R, j) => l?.leave?.(R, j, O) });
              }
              y = !1, _.hasExtendedAttrs() && _.extended.urlId ? (D = E, x = _.extended.urlId) : (D = -1, x = -1);
            }
          }
          d(h);
        }
      };
      function C(b, d) {
        if (confirm(`Do you want to navigate to ${d}?

WARNING: This link could potentially be dangerous`)) {
          const m = window.open();
          if (m) {
            try {
              m.opener = null;
            } catch {
            }
            m.location.href = d;
          } else console.warn("Opening link blocked as opener could not be cleared");
        }
      }
      s.OscLinkProvider = v = u([p(0, g.IBufferService), p(1, g.IOptionsService), p(2, g.IOscLinkService)], v);
    }, 6193: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.RenderDebouncer = void 0, s.RenderDebouncer = class {
        constructor(a, u) {
          this._renderCallback = a, this._coreBrowserService = u, this._refreshCallbacks = [];
        }
        dispose() {
          this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
        }
        addRefreshCallback(a) {
          return this._refreshCallbacks.push(a), this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh())), this._animationFrame;
        }
        refresh(a, u, p) {
          this._rowCount = p, a = a !== void 0 ? a : 0, u = u !== void 0 ? u : this._rowCount - 1, this._rowStart = this._rowStart !== void 0 ? Math.min(this._rowStart, a) : a, this._rowEnd = this._rowEnd !== void 0 ? Math.max(this._rowEnd, u) : u, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh()));
        }
        _innerRefresh() {
          if (this._animationFrame = void 0, this._rowStart === void 0 || this._rowEnd === void 0 || this._rowCount === void 0) return void this._runRefreshCallbacks();
          const a = Math.max(this._rowStart, 0), u = Math.min(this._rowEnd, this._rowCount - 1);
          this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(a, u), this._runRefreshCallbacks();
        }
        _runRefreshCallbacks() {
          for (const a of this._refreshCallbacks) a(0);
          this._refreshCallbacks = [];
        }
      };
    }, 3236: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.Terminal = void 0;
      const u = a(3614), p = a(3656), f = a(3551), g = a(9042), v = a(3730), C = a(1680), b = a(3107), d = a(5744), m = a(2950), h = a(1296), l = a(428), _ = a(4269), S = a(5114), x = a(8934), D = a(3230), y = a(9312), E = a(4725), B = a(6731), O = a(8055), N = a(8969), R = a(8460), j = a(844), Y = a(6114), ee = a(8437), ne = a(2584), Z = a(7399), T = a(5941), L = a(9074), I = a(2585), H = a(5435), K = a(4567), re = a(779);
      class V extends N.CoreTerminal {
        get onFocus() {
          return this._onFocus.event;
        }
        get onBlur() {
          return this._onBlur.event;
        }
        get onA11yChar() {
          return this._onA11yCharEmitter.event;
        }
        get onA11yTab() {
          return this._onA11yTabEmitter.event;
        }
        get onWillOpen() {
          return this._onWillOpen.event;
        }
        constructor(W = {}) {
          super(W), this.browser = Y, this._keyDownHandled = !1, this._keyDownSeen = !1, this._keyPressHandled = !1, this._unprocessedDeadKey = !1, this._accessibilityManager = this.register(new j.MutableDisposable()), this._onCursorMove = this.register(new R.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onKey = this.register(new R.EventEmitter()), this.onKey = this._onKey.event, this._onRender = this.register(new R.EventEmitter()), this.onRender = this._onRender.event, this._onSelectionChange = this.register(new R.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this.register(new R.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onBell = this.register(new R.EventEmitter()), this.onBell = this._onBell.event, this._onFocus = this.register(new R.EventEmitter()), this._onBlur = this.register(new R.EventEmitter()), this._onA11yCharEmitter = this.register(new R.EventEmitter()), this._onA11yTabEmitter = this.register(new R.EventEmitter()), this._onWillOpen = this.register(new R.EventEmitter()), this._setup(), this._decorationService = this._instantiationService.createInstance(L.DecorationService), this._instantiationService.setService(I.IDecorationService, this._decorationService), this._linkProviderService = this._instantiationService.createInstance(re.LinkProviderService), this._instantiationService.setService(E.ILinkProviderService, this._linkProviderService), this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(v.OscLinkProvider)), this.register(this._inputHandler.onRequestBell(() => this._onBell.fire())), this.register(this._inputHandler.onRequestRefreshRows((F, X) => this.refresh(F, X))), this.register(this._inputHandler.onRequestSendFocus(() => this._reportFocus())), this.register(this._inputHandler.onRequestReset(() => this.reset())), this.register(this._inputHandler.onRequestWindowsOptionsReport((F) => this._reportWindowsOptions(F))), this.register(this._inputHandler.onColor((F) => this._handleColorEvent(F))), this.register((0, R.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, R.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, R.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, R.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this.register(this._bufferService.onResize((F) => this._afterResize(F.cols, F.rows))), this.register((0, j.toDisposable)(() => {
            this._customKeyEventHandler = void 0, this.element?.parentNode?.removeChild(this.element);
          }));
        }
        _handleColorEvent(W) {
          if (this._themeService) for (const F of W) {
            let X, J = "";
            switch (F.index) {
              case 256:
                X = "foreground", J = "10";
                break;
              case 257:
                X = "background", J = "11";
                break;
              case 258:
                X = "cursor", J = "12";
                break;
              default:
                X = "ansi", J = "4;" + F.index;
            }
            switch (F.type) {
              case 0:
                const oe = O.color.toColorRGB(X === "ansi" ? this._themeService.colors.ansi[F.index] : this._themeService.colors[X]);
                this.coreService.triggerDataEvent(`${ne.C0.ESC}]${J};${(0, T.toRgbString)(oe)}${ne.C1_ESCAPED.ST}`);
                break;
              case 1:
                if (X === "ansi") this._themeService.modifyColors((se) => se.ansi[F.index] = O.channels.toColor(...F.color));
                else {
                  const se = X;
                  this._themeService.modifyColors((be) => be[se] = O.channels.toColor(...F.color));
                }
                break;
              case 2:
                this._themeService.restoreColor(F.index);
            }
          }
        }
        _setup() {
          super._setup(), this._customKeyEventHandler = void 0;
        }
        get buffer() {
          return this.buffers.active;
        }
        focus() {
          this.textarea && this.textarea.focus({ preventScroll: !0 });
        }
        _handleScreenReaderModeOptionChange(W) {
          W ? !this._accessibilityManager.value && this._renderService && (this._accessibilityManager.value = this._instantiationService.createInstance(K.AccessibilityManager, this)) : this._accessibilityManager.clear();
        }
        _handleTextAreaFocus(W) {
          this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(ne.C0.ESC + "[I"), this.element.classList.add("focus"), this._showCursor(), this._onFocus.fire();
        }
        blur() {
          return this.textarea?.blur();
        }
        _handleTextAreaBlur() {
          this.textarea.value = "", this.refresh(this.buffer.y, this.buffer.y), this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(ne.C0.ESC + "[O"), this.element.classList.remove("focus"), this._onBlur.fire();
        }
        _syncTextArea() {
          if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper.isComposing || !this._renderService) return;
          const W = this.buffer.ybase + this.buffer.y, F = this.buffer.lines.get(W);
          if (!F) return;
          const X = Math.min(this.buffer.x, this.cols - 1), J = this._renderService.dimensions.css.cell.height, oe = F.getWidth(X), se = this._renderService.dimensions.css.cell.width * oe, be = this.buffer.y * this._renderService.dimensions.css.cell.height, xe = X * this._renderService.dimensions.css.cell.width;
          this.textarea.style.left = xe + "px", this.textarea.style.top = be + "px", this.textarea.style.width = se + "px", this.textarea.style.height = J + "px", this.textarea.style.lineHeight = J + "px", this.textarea.style.zIndex = "-5";
        }
        _initGlobal() {
          this._bindKeys(), this.register((0, p.addDisposableDomListener)(this.element, "copy", (F) => {
            this.hasSelection() && (0, u.copyHandler)(F, this._selectionService);
          }));
          const W = (F) => (0, u.handlePasteEvent)(F, this.textarea, this.coreService, this.optionsService);
          this.register((0, p.addDisposableDomListener)(this.textarea, "paste", W)), this.register((0, p.addDisposableDomListener)(this.element, "paste", W)), Y.isFirefox ? this.register((0, p.addDisposableDomListener)(this.element, "mousedown", (F) => {
            F.button === 2 && (0, u.rightClickHandler)(F, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
          })) : this.register((0, p.addDisposableDomListener)(this.element, "contextmenu", (F) => {
            (0, u.rightClickHandler)(F, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
          })), Y.isLinux && this.register((0, p.addDisposableDomListener)(this.element, "auxclick", (F) => {
            F.button === 1 && (0, u.moveTextAreaUnderMouseCursor)(F, this.textarea, this.screenElement);
          }));
        }
        _bindKeys() {
          this.register((0, p.addDisposableDomListener)(this.textarea, "keyup", (W) => this._keyUp(W), !0)), this.register((0, p.addDisposableDomListener)(this.textarea, "keydown", (W) => this._keyDown(W), !0)), this.register((0, p.addDisposableDomListener)(this.textarea, "keypress", (W) => this._keyPress(W), !0)), this.register((0, p.addDisposableDomListener)(this.textarea, "compositionstart", () => this._compositionHelper.compositionstart())), this.register((0, p.addDisposableDomListener)(this.textarea, "compositionupdate", (W) => this._compositionHelper.compositionupdate(W))), this.register((0, p.addDisposableDomListener)(this.textarea, "compositionend", () => this._compositionHelper.compositionend())), this.register((0, p.addDisposableDomListener)(this.textarea, "input", (W) => this._inputEvent(W), !0)), this.register(this.onRender(() => this._compositionHelper.updateCompositionElements()));
        }
        open(W) {
          if (!W) throw new Error("Terminal requires a parent element.");
          if (W.isConnected || this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"), this.element?.ownerDocument.defaultView && this._coreBrowserService) return void (this.element.ownerDocument.defaultView !== this._coreBrowserService.window && (this._coreBrowserService.window = this.element.ownerDocument.defaultView));
          this._document = W.ownerDocument, this.options.documentOverride && this.options.documentOverride instanceof Document && (this._document = this.optionsService.rawOptions.documentOverride), this.element = this._document.createElement("div"), this.element.dir = "ltr", this.element.classList.add("terminal"), this.element.classList.add("xterm"), W.appendChild(this.element);
          const F = this._document.createDocumentFragment();
          this._viewportElement = this._document.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), F.appendChild(this._viewportElement), this._viewportScrollArea = this._document.createElement("div"), this._viewportScrollArea.classList.add("xterm-scroll-area"), this._viewportElement.appendChild(this._viewportScrollArea), this.screenElement = this._document.createElement("div"), this.screenElement.classList.add("xterm-screen"), this.register((0, p.addDisposableDomListener)(this.screenElement, "mousemove", (X) => this.updateCursorStyle(X))), this._helperContainer = this._document.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), F.appendChild(this.screenElement), this.textarea = this._document.createElement("textarea"), this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", g.promptLabel), Y.isChromeOS || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._coreBrowserService = this.register(this._instantiationService.createInstance(S.CoreBrowserService, this.textarea, W.ownerDocument.defaultView ?? window, this._document ?? typeof window < "u" ? window.document : null)), this._instantiationService.setService(E.ICoreBrowserService, this._coreBrowserService), this.register((0, p.addDisposableDomListener)(this.textarea, "focus", (X) => this._handleTextAreaFocus(X))), this.register((0, p.addDisposableDomListener)(this.textarea, "blur", () => this._handleTextAreaBlur())), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(l.CharSizeService, this._document, this._helperContainer), this._instantiationService.setService(E.ICharSizeService, this._charSizeService), this._themeService = this._instantiationService.createInstance(B.ThemeService), this._instantiationService.setService(E.IThemeService, this._themeService), this._characterJoinerService = this._instantiationService.createInstance(_.CharacterJoinerService), this._instantiationService.setService(E.ICharacterJoinerService, this._characterJoinerService), this._renderService = this.register(this._instantiationService.createInstance(D.RenderService, this.rows, this.screenElement)), this._instantiationService.setService(E.IRenderService, this._renderService), this.register(this._renderService.onRenderedViewportChange((X) => this._onRender.fire(X))), this.onResize((X) => this._renderService.resize(X.cols, X.rows)), this._compositionView = this._document.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(m.CompositionHelper, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this._mouseService = this._instantiationService.createInstance(x.MouseService), this._instantiationService.setService(E.IMouseService, this._mouseService), this.linkifier = this.register(this._instantiationService.createInstance(f.Linkifier, this.screenElement)), this.element.appendChild(F);
          try {
            this._onWillOpen.fire(this.element);
          } catch {
          }
          this._renderService.hasRenderer() || this._renderService.setRenderer(this._createRenderer()), this.viewport = this._instantiationService.createInstance(C.Viewport, this._viewportElement, this._viewportScrollArea), this.viewport.onRequestScrollLines((X) => this.scrollLines(X.amount, X.suppressScrollEvent, 1)), this.register(this._inputHandler.onRequestSyncScrollBar(() => this.viewport.syncScrollArea())), this.register(this.viewport), this.register(this.onCursorMove(() => {
            this._renderService.handleCursorMove(), this._syncTextArea();
          })), this.register(this.onResize(() => this._renderService.handleResize(this.cols, this.rows))), this.register(this.onBlur(() => this._renderService.handleBlur())), this.register(this.onFocus(() => this._renderService.handleFocus())), this.register(this._renderService.onDimensionsChange(() => this.viewport.syncScrollArea())), this._selectionService = this.register(this._instantiationService.createInstance(y.SelectionService, this.element, this.screenElement, this.linkifier)), this._instantiationService.setService(E.ISelectionService, this._selectionService), this.register(this._selectionService.onRequestScrollLines((X) => this.scrollLines(X.amount, X.suppressScrollEvent))), this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire())), this.register(this._selectionService.onRequestRedraw((X) => this._renderService.handleSelectionChanged(X.start, X.end, X.columnSelectMode))), this.register(this._selectionService.onLinuxMouseSelection((X) => {
            this.textarea.value = X, this.textarea.focus(), this.textarea.select();
          })), this.register(this._onScroll.event((X) => {
            this.viewport.syncScrollArea(), this._selectionService.refresh();
          })), this.register((0, p.addDisposableDomListener)(this._viewportElement, "scroll", () => this._selectionService.refresh())), this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer, this.screenElement)), this.register((0, p.addDisposableDomListener)(this.element, "mousedown", (X) => this._selectionService.handleMouseDown(X))), this.coreMouseService.areMouseEventsActive ? (this._selectionService.disable(), this.element.classList.add("enable-mouse-events")) : this._selectionService.enable(), this.options.screenReaderMode && (this._accessibilityManager.value = this._instantiationService.createInstance(K.AccessibilityManager, this)), this.register(this.optionsService.onSpecificOptionChange("screenReaderMode", (X) => this._handleScreenReaderModeOptionChange(X))), this.options.overviewRulerWidth && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(d.OverviewRulerRenderer, this._viewportElement, this.screenElement))), this.optionsService.onSpecificOptionChange("overviewRulerWidth", (X) => {
            !this._overviewRulerRenderer && X && this._viewportElement && this.screenElement && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(d.OverviewRulerRenderer, this._viewportElement, this.screenElement)));
          }), this._charSizeService.measure(), this.refresh(0, this.rows - 1), this._initGlobal(), this.bindMouse();
        }
        _createRenderer() {
          return this._instantiationService.createInstance(h.DomRenderer, this, this._document, this.element, this.screenElement, this._viewportElement, this._helperContainer, this.linkifier);
        }
        bindMouse() {
          const W = this, F = this.element;
          function X(se) {
            const be = W._mouseService.getMouseReportCoords(se, W.screenElement);
            if (!be) return !1;
            let xe, De;
            switch (se.overrideType || se.type) {
              case "mousemove":
                De = 32, se.buttons === void 0 ? (xe = 3, se.button !== void 0 && (xe = se.button < 3 ? se.button : 3)) : xe = 1 & se.buttons ? 0 : 4 & se.buttons ? 1 : 2 & se.buttons ? 2 : 3;
                break;
              case "mouseup":
                De = 0, xe = se.button < 3 ? se.button : 3;
                break;
              case "mousedown":
                De = 1, xe = se.button < 3 ? se.button : 3;
                break;
              case "wheel":
                if (W._customWheelEventHandler && W._customWheelEventHandler(se) === !1 || W.viewport.getLinesScrolled(se) === 0) return !1;
                De = se.deltaY < 0 ? 0 : 1, xe = 4;
                break;
              default:
                return !1;
            }
            return !(De === void 0 || xe === void 0 || xe > 4) && W.coreMouseService.triggerMouseEvent({ col: be.col, row: be.row, x: be.x, y: be.y, button: xe, action: De, ctrl: se.ctrlKey, alt: se.altKey, shift: se.shiftKey });
          }
          const J = { mouseup: null, wheel: null, mousedrag: null, mousemove: null }, oe = { mouseup: (se) => (X(se), se.buttons || (this._document.removeEventListener("mouseup", J.mouseup), J.mousedrag && this._document.removeEventListener("mousemove", J.mousedrag)), this.cancel(se)), wheel: (se) => (X(se), this.cancel(se, !0)), mousedrag: (se) => {
            se.buttons && X(se);
          }, mousemove: (se) => {
            se.buttons || X(se);
          } };
          this.register(this.coreMouseService.onProtocolChange((se) => {
            se ? (this.optionsService.rawOptions.logLevel === "debug" && this._logService.debug("Binding to mouse events:", this.coreMouseService.explainEvents(se)), this.element.classList.add("enable-mouse-events"), this._selectionService.disable()) : (this._logService.debug("Unbinding from mouse events."), this.element.classList.remove("enable-mouse-events"), this._selectionService.enable()), 8 & se ? J.mousemove || (F.addEventListener("mousemove", oe.mousemove), J.mousemove = oe.mousemove) : (F.removeEventListener("mousemove", J.mousemove), J.mousemove = null), 16 & se ? J.wheel || (F.addEventListener("wheel", oe.wheel, { passive: !1 }), J.wheel = oe.wheel) : (F.removeEventListener("wheel", J.wheel), J.wheel = null), 2 & se ? J.mouseup || (J.mouseup = oe.mouseup) : (this._document.removeEventListener("mouseup", J.mouseup), J.mouseup = null), 4 & se ? J.mousedrag || (J.mousedrag = oe.mousedrag) : (this._document.removeEventListener("mousemove", J.mousedrag), J.mousedrag = null);
          })), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this.register((0, p.addDisposableDomListener)(F, "mousedown", (se) => {
            if (se.preventDefault(), this.focus(), this.coreMouseService.areMouseEventsActive && !this._selectionService.shouldForceSelection(se)) return X(se), J.mouseup && this._document.addEventListener("mouseup", J.mouseup), J.mousedrag && this._document.addEventListener("mousemove", J.mousedrag), this.cancel(se);
          })), this.register((0, p.addDisposableDomListener)(F, "wheel", (se) => {
            if (!J.wheel) {
              if (this._customWheelEventHandler && this._customWheelEventHandler(se) === !1) return !1;
              if (!this.buffer.hasScrollback) {
                const be = this.viewport.getLinesScrolled(se);
                if (be === 0) return;
                const xe = ne.C0.ESC + (this.coreService.decPrivateModes.applicationCursorKeys ? "O" : "[") + (se.deltaY < 0 ? "A" : "B");
                let De = "";
                for (let Te = 0; Te < Math.abs(be); Te++) De += xe;
                return this.coreService.triggerDataEvent(De, !0), this.cancel(se, !0);
              }
              return this.viewport.handleWheel(se) ? this.cancel(se) : void 0;
            }
          }, { passive: !1 })), this.register((0, p.addDisposableDomListener)(F, "touchstart", (se) => {
            if (!this.coreMouseService.areMouseEventsActive) return this.viewport.handleTouchStart(se), this.cancel(se);
          }, { passive: !0 })), this.register((0, p.addDisposableDomListener)(F, "touchmove", (se) => {
            if (!this.coreMouseService.areMouseEventsActive) return this.viewport.handleTouchMove(se) ? void 0 : this.cancel(se);
          }, { passive: !1 }));
        }
        refresh(W, F) {
          this._renderService?.refreshRows(W, F);
        }
        updateCursorStyle(W) {
          this._selectionService?.shouldColumnSelect(W) ? this.element.classList.add("column-select") : this.element.classList.remove("column-select");
        }
        _showCursor() {
          this.coreService.isCursorInitialized || (this.coreService.isCursorInitialized = !0, this.refresh(this.buffer.y, this.buffer.y));
        }
        scrollLines(W, F, X = 0) {
          X === 1 ? (super.scrollLines(W, F, X), this.refresh(0, this.rows - 1)) : this.viewport?.scrollLines(W);
        }
        paste(W) {
          (0, u.paste)(W, this.textarea, this.coreService, this.optionsService);
        }
        attachCustomKeyEventHandler(W) {
          this._customKeyEventHandler = W;
        }
        attachCustomWheelEventHandler(W) {
          this._customWheelEventHandler = W;
        }
        registerLinkProvider(W) {
          return this._linkProviderService.registerLinkProvider(W);
        }
        registerCharacterJoiner(W) {
          if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
          const F = this._characterJoinerService.register(W);
          return this.refresh(0, this.rows - 1), F;
        }
        deregisterCharacterJoiner(W) {
          if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
          this._characterJoinerService.deregister(W) && this.refresh(0, this.rows - 1);
        }
        get markers() {
          return this.buffer.markers;
        }
        registerMarker(W) {
          return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + W);
        }
        registerDecoration(W) {
          return this._decorationService.registerDecoration(W);
        }
        hasSelection() {
          return !!this._selectionService && this._selectionService.hasSelection;
        }
        select(W, F, X) {
          this._selectionService.setSelection(W, F, X);
        }
        getSelection() {
          return this._selectionService ? this._selectionService.selectionText : "";
        }
        getSelectionPosition() {
          if (this._selectionService && this._selectionService.hasSelection) return { start: { x: this._selectionService.selectionStart[0], y: this._selectionService.selectionStart[1] }, end: { x: this._selectionService.selectionEnd[0], y: this._selectionService.selectionEnd[1] } };
        }
        clearSelection() {
          this._selectionService?.clearSelection();
        }
        selectAll() {
          this._selectionService?.selectAll();
        }
        selectLines(W, F) {
          this._selectionService?.selectLines(W, F);
        }
        _keyDown(W) {
          if (this._keyDownHandled = !1, this._keyDownSeen = !0, this._customKeyEventHandler && this._customKeyEventHandler(W) === !1) return !1;
          const F = this.browser.isMac && this.options.macOptionIsMeta && W.altKey;
          if (!F && !this._compositionHelper.keydown(W)) return this.options.scrollOnUserInput && this.buffer.ybase !== this.buffer.ydisp && this.scrollToBottom(), !1;
          F || W.key !== "Dead" && W.key !== "AltGraph" || (this._unprocessedDeadKey = !0);
          const X = (0, Z.evaluateKeyboardEvent)(W, this.coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta);
          if (this.updateCursorStyle(W), X.type === 3 || X.type === 2) {
            const J = this.rows - 1;
            return this.scrollLines(X.type === 2 ? -J : J), this.cancel(W, !0);
          }
          return X.type === 1 && this.selectAll(), !!this._isThirdLevelShift(this.browser, W) || (X.cancel && this.cancel(W, !0), !X.key || !!(W.key && !W.ctrlKey && !W.altKey && !W.metaKey && W.key.length === 1 && W.key.charCodeAt(0) >= 65 && W.key.charCodeAt(0) <= 90) || (this._unprocessedDeadKey ? (this._unprocessedDeadKey = !1, !0) : (X.key !== ne.C0.ETX && X.key !== ne.C0.CR || (this.textarea.value = ""), this._onKey.fire({ key: X.key, domEvent: W }), this._showCursor(), this.coreService.triggerDataEvent(X.key, !0), !this.optionsService.rawOptions.screenReaderMode || W.altKey || W.ctrlKey ? this.cancel(W, !0) : void (this._keyDownHandled = !0))));
        }
        _isThirdLevelShift(W, F) {
          const X = W.isMac && !this.options.macOptionIsMeta && F.altKey && !F.ctrlKey && !F.metaKey || W.isWindows && F.altKey && F.ctrlKey && !F.metaKey || W.isWindows && F.getModifierState("AltGraph");
          return F.type === "keypress" ? X : X && (!F.keyCode || F.keyCode > 47);
        }
        _keyUp(W) {
          this._keyDownSeen = !1, this._customKeyEventHandler && this._customKeyEventHandler(W) === !1 || (function(F) {
            return F.keyCode === 16 || F.keyCode === 17 || F.keyCode === 18;
          }(W) || this.focus(), this.updateCursorStyle(W), this._keyPressHandled = !1);
        }
        _keyPress(W) {
          let F;
          if (this._keyPressHandled = !1, this._keyDownHandled || this._customKeyEventHandler && this._customKeyEventHandler(W) === !1) return !1;
          if (this.cancel(W), W.charCode) F = W.charCode;
          else if (W.which === null || W.which === void 0) F = W.keyCode;
          else {
            if (W.which === 0 || W.charCode === 0) return !1;
            F = W.which;
          }
          return !(!F || (W.altKey || W.ctrlKey || W.metaKey) && !this._isThirdLevelShift(this.browser, W) || (F = String.fromCharCode(F), this._onKey.fire({ key: F, domEvent: W }), this._showCursor(), this.coreService.triggerDataEvent(F, !0), this._keyPressHandled = !0, this._unprocessedDeadKey = !1, 0));
        }
        _inputEvent(W) {
          if (W.data && W.inputType === "insertText" && (!W.composed || !this._keyDownSeen) && !this.optionsService.rawOptions.screenReaderMode) {
            if (this._keyPressHandled) return !1;
            this._unprocessedDeadKey = !1;
            const F = W.data;
            return this.coreService.triggerDataEvent(F, !0), this.cancel(W), !0;
          }
          return !1;
        }
        resize(W, F) {
          W !== this.cols || F !== this.rows ? super.resize(W, F) : this._charSizeService && !this._charSizeService.hasValidSize && this._charSizeService.measure();
        }
        _afterResize(W, F) {
          this._charSizeService?.measure(), this.viewport?.syncScrollArea(!0);
        }
        clear() {
          if (this.buffer.ybase !== 0 || this.buffer.y !== 0) {
            this.buffer.clearAllMarkers(), this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)), this.buffer.lines.length = 1, this.buffer.ydisp = 0, this.buffer.ybase = 0, this.buffer.y = 0;
            for (let W = 1; W < this.rows; W++) this.buffer.lines.push(this.buffer.getBlankLine(ee.DEFAULT_ATTR_DATA));
            this._onScroll.fire({ position: this.buffer.ydisp, source: 0 }), this.viewport?.reset(), this.refresh(0, this.rows - 1);
          }
        }
        reset() {
          this.options.rows = this.rows, this.options.cols = this.cols;
          const W = this._customKeyEventHandler;
          this._setup(), super.reset(), this._selectionService?.reset(), this._decorationService.reset(), this.viewport?.reset(), this._customKeyEventHandler = W, this.refresh(0, this.rows - 1);
        }
        clearTextureAtlas() {
          this._renderService?.clearTextureAtlas();
        }
        _reportFocus() {
          this.element?.classList.contains("focus") ? this.coreService.triggerDataEvent(ne.C0.ESC + "[I") : this.coreService.triggerDataEvent(ne.C0.ESC + "[O");
        }
        _reportWindowsOptions(W) {
          if (this._renderService) switch (W) {
            case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:
              const F = this._renderService.dimensions.css.canvas.width.toFixed(0), X = this._renderService.dimensions.css.canvas.height.toFixed(0);
              this.coreService.triggerDataEvent(`${ne.C0.ESC}[4;${X};${F}t`);
              break;
            case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:
              const J = this._renderService.dimensions.css.cell.width.toFixed(0), oe = this._renderService.dimensions.css.cell.height.toFixed(0);
              this.coreService.triggerDataEvent(`${ne.C0.ESC}[6;${oe};${J}t`);
          }
        }
        cancel(W, F) {
          if (this.options.cancelEvents || F) return W.preventDefault(), W.stopPropagation(), !1;
        }
      }
      s.Terminal = V;
    }, 9924: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.TimeBasedDebouncer = void 0, s.TimeBasedDebouncer = class {
        constructor(a, u = 1e3) {
          this._renderCallback = a, this._debounceThresholdMS = u, this._lastRefreshMs = 0, this._additionalRefreshRequested = !1;
        }
        dispose() {
          this._refreshTimeoutID && clearTimeout(this._refreshTimeoutID);
        }
        refresh(a, u, p) {
          this._rowCount = p, a = a !== void 0 ? a : 0, u = u !== void 0 ? u : this._rowCount - 1, this._rowStart = this._rowStart !== void 0 ? Math.min(this._rowStart, a) : a, this._rowEnd = this._rowEnd !== void 0 ? Math.max(this._rowEnd, u) : u;
          const f = Date.now();
          if (f - this._lastRefreshMs >= this._debounceThresholdMS) this._lastRefreshMs = f, this._innerRefresh();
          else if (!this._additionalRefreshRequested) {
            const g = f - this._lastRefreshMs, v = this._debounceThresholdMS - g;
            this._additionalRefreshRequested = !0, this._refreshTimeoutID = window.setTimeout(() => {
              this._lastRefreshMs = Date.now(), this._innerRefresh(), this._additionalRefreshRequested = !1, this._refreshTimeoutID = void 0;
            }, v);
          }
        }
        _innerRefresh() {
          if (this._rowStart === void 0 || this._rowEnd === void 0 || this._rowCount === void 0) return;
          const a = Math.max(this._rowStart, 0), u = Math.min(this._rowEnd, this._rowCount - 1);
          this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(a, u);
        }
      };
    }, 1680: function(c, s, a) {
      var u = this && this.__decorate || function(m, h, l, _) {
        var S, x = arguments.length, D = x < 3 ? h : _ === null ? _ = Object.getOwnPropertyDescriptor(h, l) : _;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") D = Reflect.decorate(m, h, l, _);
        else for (var y = m.length - 1; y >= 0; y--) (S = m[y]) && (D = (x < 3 ? S(D) : x > 3 ? S(h, l, D) : S(h, l)) || D);
        return x > 3 && D && Object.defineProperty(h, l, D), D;
      }, p = this && this.__param || function(m, h) {
        return function(l, _) {
          h(l, _, m);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.Viewport = void 0;
      const f = a(3656), g = a(4725), v = a(8460), C = a(844), b = a(2585);
      let d = s.Viewport = class extends C.Disposable {
        constructor(m, h, l, _, S, x, D, y) {
          super(), this._viewportElement = m, this._scrollArea = h, this._bufferService = l, this._optionsService = _, this._charSizeService = S, this._renderService = x, this._coreBrowserService = D, this.scrollBarWidth = 0, this._currentRowHeight = 0, this._currentDeviceCellHeight = 0, this._lastRecordedBufferLength = 0, this._lastRecordedViewportHeight = 0, this._lastRecordedBufferHeight = 0, this._lastTouchY = 0, this._lastScrollTop = 0, this._wheelPartialScroll = 0, this._refreshAnimationFrame = null, this._ignoreNextScrollEvent = !1, this._smoothScrollState = { startTime: 0, origin: -1, target: -1 }, this._onRequestScrollLines = this.register(new v.EventEmitter()), this.onRequestScrollLines = this._onRequestScrollLines.event, this.scrollBarWidth = this._viewportElement.offsetWidth - this._scrollArea.offsetWidth || 15, this.register((0, f.addDisposableDomListener)(this._viewportElement, "scroll", this._handleScroll.bind(this))), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate((E) => this._activeBuffer = E.activeBuffer)), this._renderDimensions = this._renderService.dimensions, this.register(this._renderService.onDimensionsChange((E) => this._renderDimensions = E)), this._handleThemeChange(y.colors), this.register(y.onChangeColors((E) => this._handleThemeChange(E))), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.syncScrollArea())), setTimeout(() => this.syncScrollArea());
        }
        _handleThemeChange(m) {
          this._viewportElement.style.backgroundColor = m.background.css;
        }
        reset() {
          this._currentRowHeight = 0, this._currentDeviceCellHeight = 0, this._lastRecordedBufferLength = 0, this._lastRecordedViewportHeight = 0, this._lastRecordedBufferHeight = 0, this._lastTouchY = 0, this._lastScrollTop = 0, this._coreBrowserService.window.requestAnimationFrame(() => this.syncScrollArea());
        }
        _refresh(m) {
          if (m) return this._innerRefresh(), void (this._refreshAnimationFrame !== null && this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));
          this._refreshAnimationFrame === null && (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh()));
        }
        _innerRefresh() {
          if (this._charSizeService.height > 0) {
            this._currentRowHeight = this._renderDimensions.device.cell.height / this._coreBrowserService.dpr, this._currentDeviceCellHeight = this._renderDimensions.device.cell.height, this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
            const h = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderDimensions.css.canvas.height);
            this._lastRecordedBufferHeight !== h && (this._lastRecordedBufferHeight = h, this._scrollArea.style.height = this._lastRecordedBufferHeight + "px");
          }
          const m = this._bufferService.buffer.ydisp * this._currentRowHeight;
          this._viewportElement.scrollTop !== m && (this._ignoreNextScrollEvent = !0, this._viewportElement.scrollTop = m), this._refreshAnimationFrame = null;
        }
        syncScrollArea(m = !1) {
          if (this._lastRecordedBufferLength !== this._bufferService.buffer.lines.length) return this._lastRecordedBufferLength = this._bufferService.buffer.lines.length, void this._refresh(m);
          this._lastRecordedViewportHeight === this._renderService.dimensions.css.canvas.height && this._lastScrollTop === this._activeBuffer.ydisp * this._currentRowHeight && this._renderDimensions.device.cell.height === this._currentDeviceCellHeight || this._refresh(m);
        }
        _handleScroll(m) {
          if (this._lastScrollTop = this._viewportElement.scrollTop, !this._viewportElement.offsetParent) return;
          if (this._ignoreNextScrollEvent) return this._ignoreNextScrollEvent = !1, void this._onRequestScrollLines.fire({ amount: 0, suppressScrollEvent: !0 });
          const h = Math.round(this._lastScrollTop / this._currentRowHeight) - this._bufferService.buffer.ydisp;
          this._onRequestScrollLines.fire({ amount: h, suppressScrollEvent: !0 });
        }
        _smoothScroll() {
          if (this._isDisposed || this._smoothScrollState.origin === -1 || this._smoothScrollState.target === -1) return;
          const m = this._smoothScrollPercent();
          this._viewportElement.scrollTop = this._smoothScrollState.origin + Math.round(m * (this._smoothScrollState.target - this._smoothScrollState.origin)), m < 1 ? this._coreBrowserService.window.requestAnimationFrame(() => this._smoothScroll()) : this._clearSmoothScrollState();
        }
        _smoothScrollPercent() {
          return this._optionsService.rawOptions.smoothScrollDuration && this._smoothScrollState.startTime ? Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollDuration, 1), 0) : 1;
        }
        _clearSmoothScrollState() {
          this._smoothScrollState.startTime = 0, this._smoothScrollState.origin = -1, this._smoothScrollState.target = -1;
        }
        _bubbleScroll(m, h) {
          const l = this._viewportElement.scrollTop + this._lastRecordedViewportHeight;
          return !(h < 0 && this._viewportElement.scrollTop !== 0 || h > 0 && l < this._lastRecordedBufferHeight) || (m.cancelable && m.preventDefault(), !1);
        }
        handleWheel(m) {
          const h = this._getPixelsScrolled(m);
          return h !== 0 && (this._optionsService.rawOptions.smoothScrollDuration ? (this._smoothScrollState.startTime = Date.now(), this._smoothScrollPercent() < 1 ? (this._smoothScrollState.origin = this._viewportElement.scrollTop, this._smoothScrollState.target === -1 ? this._smoothScrollState.target = this._viewportElement.scrollTop + h : this._smoothScrollState.target += h, this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0), this._smoothScroll()) : this._clearSmoothScrollState()) : this._viewportElement.scrollTop += h, this._bubbleScroll(m, h));
        }
        scrollLines(m) {
          if (m !== 0) if (this._optionsService.rawOptions.smoothScrollDuration) {
            const h = m * this._currentRowHeight;
            this._smoothScrollState.startTime = Date.now(), this._smoothScrollPercent() < 1 ? (this._smoothScrollState.origin = this._viewportElement.scrollTop, this._smoothScrollState.target = this._smoothScrollState.origin + h, this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0), this._smoothScroll()) : this._clearSmoothScrollState();
          } else this._onRequestScrollLines.fire({ amount: m, suppressScrollEvent: !1 });
        }
        _getPixelsScrolled(m) {
          if (m.deltaY === 0 || m.shiftKey) return 0;
          let h = this._applyScrollModifier(m.deltaY, m);
          return m.deltaMode === WheelEvent.DOM_DELTA_LINE ? h *= this._currentRowHeight : m.deltaMode === WheelEvent.DOM_DELTA_PAGE && (h *= this._currentRowHeight * this._bufferService.rows), h;
        }
        getBufferElements(m, h) {
          let l, _ = "";
          const S = [], x = h ?? this._bufferService.buffer.lines.length, D = this._bufferService.buffer.lines;
          for (let y = m; y < x; y++) {
            const E = D.get(y);
            if (!E) continue;
            const B = D.get(y + 1)?.isWrapped;
            if (_ += E.translateToString(!B), !B || y === D.length - 1) {
              const O = document.createElement("div");
              O.textContent = _, S.push(O), _.length > 0 && (l = O), _ = "";
            }
          }
          return { bufferElements: S, cursorElement: l };
        }
        getLinesScrolled(m) {
          if (m.deltaY === 0 || m.shiftKey) return 0;
          let h = this._applyScrollModifier(m.deltaY, m);
          return m.deltaMode === WheelEvent.DOM_DELTA_PIXEL ? (h /= this._currentRowHeight + 0, this._wheelPartialScroll += h, h = Math.floor(Math.abs(this._wheelPartialScroll)) * (this._wheelPartialScroll > 0 ? 1 : -1), this._wheelPartialScroll %= 1) : m.deltaMode === WheelEvent.DOM_DELTA_PAGE && (h *= this._bufferService.rows), h;
        }
        _applyScrollModifier(m, h) {
          const l = this._optionsService.rawOptions.fastScrollModifier;
          return l === "alt" && h.altKey || l === "ctrl" && h.ctrlKey || l === "shift" && h.shiftKey ? m * this._optionsService.rawOptions.fastScrollSensitivity * this._optionsService.rawOptions.scrollSensitivity : m * this._optionsService.rawOptions.scrollSensitivity;
        }
        handleTouchStart(m) {
          this._lastTouchY = m.touches[0].pageY;
        }
        handleTouchMove(m) {
          const h = this._lastTouchY - m.touches[0].pageY;
          return this._lastTouchY = m.touches[0].pageY, h !== 0 && (this._viewportElement.scrollTop += h, this._bubbleScroll(m, h));
        }
      };
      s.Viewport = d = u([p(2, b.IBufferService), p(3, b.IOptionsService), p(4, g.ICharSizeService), p(5, g.IRenderService), p(6, g.ICoreBrowserService), p(7, g.IThemeService)], d);
    }, 3107: function(c, s, a) {
      var u = this && this.__decorate || function(b, d, m, h) {
        var l, _ = arguments.length, S = _ < 3 ? d : h === null ? h = Object.getOwnPropertyDescriptor(d, m) : h;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") S = Reflect.decorate(b, d, m, h);
        else for (var x = b.length - 1; x >= 0; x--) (l = b[x]) && (S = (_ < 3 ? l(S) : _ > 3 ? l(d, m, S) : l(d, m)) || S);
        return _ > 3 && S && Object.defineProperty(d, m, S), S;
      }, p = this && this.__param || function(b, d) {
        return function(m, h) {
          d(m, h, b);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.BufferDecorationRenderer = void 0;
      const f = a(4725), g = a(844), v = a(2585);
      let C = s.BufferDecorationRenderer = class extends g.Disposable {
        constructor(b, d, m, h, l) {
          super(), this._screenElement = b, this._bufferService = d, this._coreBrowserService = m, this._decorationService = h, this._renderService = l, this._decorationElements = /* @__PURE__ */ new Map(), this._altBufferIsActive = !1, this._dimensionsChanged = !1, this._container = document.createElement("div"), this._container.classList.add("xterm-decoration-container"), this._screenElement.appendChild(this._container), this.register(this._renderService.onRenderedViewportChange(() => this._doRefreshDecorations())), this.register(this._renderService.onDimensionsChange(() => {
            this._dimensionsChanged = !0, this._queueRefresh();
          })), this.register(this._coreBrowserService.onDprChange(() => this._queueRefresh())), this.register(this._bufferService.buffers.onBufferActivate(() => {
            this._altBufferIsActive = this._bufferService.buffer === this._bufferService.buffers.alt;
          })), this.register(this._decorationService.onDecorationRegistered(() => this._queueRefresh())), this.register(this._decorationService.onDecorationRemoved((_) => this._removeDecoration(_))), this.register((0, g.toDisposable)(() => {
            this._container.remove(), this._decorationElements.clear();
          }));
        }
        _queueRefresh() {
          this._animationFrame === void 0 && (this._animationFrame = this._renderService.addRefreshCallback(() => {
            this._doRefreshDecorations(), this._animationFrame = void 0;
          }));
        }
        _doRefreshDecorations() {
          for (const b of this._decorationService.decorations) this._renderDecoration(b);
          this._dimensionsChanged = !1;
        }
        _renderDecoration(b) {
          this._refreshStyle(b), this._dimensionsChanged && this._refreshXPosition(b);
        }
        _createElement(b) {
          const d = this._coreBrowserService.mainDocument.createElement("div");
          d.classList.add("xterm-decoration"), d.classList.toggle("xterm-decoration-top-layer", b?.options?.layer === "top"), d.style.width = `${Math.round((b.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`, d.style.height = (b.options.height || 1) * this._renderService.dimensions.css.cell.height + "px", d.style.top = (b.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height + "px", d.style.lineHeight = `${this._renderService.dimensions.css.cell.height}px`;
          const m = b.options.x ?? 0;
          return m && m > this._bufferService.cols && (d.style.display = "none"), this._refreshXPosition(b, d), d;
        }
        _refreshStyle(b) {
          const d = b.marker.line - this._bufferService.buffers.active.ydisp;
          if (d < 0 || d >= this._bufferService.rows) b.element && (b.element.style.display = "none", b.onRenderEmitter.fire(b.element));
          else {
            let m = this._decorationElements.get(b);
            m || (m = this._createElement(b), b.element = m, this._decorationElements.set(b, m), this._container.appendChild(m), b.onDispose(() => {
              this._decorationElements.delete(b), m.remove();
            })), m.style.top = d * this._renderService.dimensions.css.cell.height + "px", m.style.display = this._altBufferIsActive ? "none" : "block", b.onRenderEmitter.fire(m);
          }
        }
        _refreshXPosition(b, d = b.element) {
          if (!d) return;
          const m = b.options.x ?? 0;
          (b.options.anchor || "left") === "right" ? d.style.right = m ? m * this._renderService.dimensions.css.cell.width + "px" : "" : d.style.left = m ? m * this._renderService.dimensions.css.cell.width + "px" : "";
        }
        _removeDecoration(b) {
          this._decorationElements.get(b)?.remove(), this._decorationElements.delete(b), b.dispose();
        }
      };
      s.BufferDecorationRenderer = C = u([p(1, v.IBufferService), p(2, f.ICoreBrowserService), p(3, v.IDecorationService), p(4, f.IRenderService)], C);
    }, 5871: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.ColorZoneStore = void 0, s.ColorZoneStore = class {
        constructor() {
          this._zones = [], this._zonePool = [], this._zonePoolIndex = 0, this._linePadding = { full: 0, left: 0, center: 0, right: 0 };
        }
        get zones() {
          return this._zonePool.length = Math.min(this._zonePool.length, this._zones.length), this._zones;
        }
        clear() {
          this._zones.length = 0, this._zonePoolIndex = 0;
        }
        addDecoration(a) {
          if (a.options.overviewRulerOptions) {
            for (const u of this._zones) if (u.color === a.options.overviewRulerOptions.color && u.position === a.options.overviewRulerOptions.position) {
              if (this._lineIntersectsZone(u, a.marker.line)) return;
              if (this._lineAdjacentToZone(u, a.marker.line, a.options.overviewRulerOptions.position)) return void this._addLineToZone(u, a.marker.line);
            }
            if (this._zonePoolIndex < this._zonePool.length) return this._zonePool[this._zonePoolIndex].color = a.options.overviewRulerOptions.color, this._zonePool[this._zonePoolIndex].position = a.options.overviewRulerOptions.position, this._zonePool[this._zonePoolIndex].startBufferLine = a.marker.line, this._zonePool[this._zonePoolIndex].endBufferLine = a.marker.line, void this._zones.push(this._zonePool[this._zonePoolIndex++]);
            this._zones.push({ color: a.options.overviewRulerOptions.color, position: a.options.overviewRulerOptions.position, startBufferLine: a.marker.line, endBufferLine: a.marker.line }), this._zonePool.push(this._zones[this._zones.length - 1]), this._zonePoolIndex++;
          }
        }
        setPadding(a) {
          this._linePadding = a;
        }
        _lineIntersectsZone(a, u) {
          return u >= a.startBufferLine && u <= a.endBufferLine;
        }
        _lineAdjacentToZone(a, u, p) {
          return u >= a.startBufferLine - this._linePadding[p || "full"] && u <= a.endBufferLine + this._linePadding[p || "full"];
        }
        _addLineToZone(a, u) {
          a.startBufferLine = Math.min(a.startBufferLine, u), a.endBufferLine = Math.max(a.endBufferLine, u);
        }
      };
    }, 5744: function(c, s, a) {
      var u = this && this.__decorate || function(l, _, S, x) {
        var D, y = arguments.length, E = y < 3 ? _ : x === null ? x = Object.getOwnPropertyDescriptor(_, S) : x;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") E = Reflect.decorate(l, _, S, x);
        else for (var B = l.length - 1; B >= 0; B--) (D = l[B]) && (E = (y < 3 ? D(E) : y > 3 ? D(_, S, E) : D(_, S)) || E);
        return y > 3 && E && Object.defineProperty(_, S, E), E;
      }, p = this && this.__param || function(l, _) {
        return function(S, x) {
          _(S, x, l);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.OverviewRulerRenderer = void 0;
      const f = a(5871), g = a(4725), v = a(844), C = a(2585), b = { full: 0, left: 0, center: 0, right: 0 }, d = { full: 0, left: 0, center: 0, right: 0 }, m = { full: 0, left: 0, center: 0, right: 0 };
      let h = s.OverviewRulerRenderer = class extends v.Disposable {
        get _width() {
          return this._optionsService.options.overviewRulerWidth || 0;
        }
        constructor(l, _, S, x, D, y, E) {
          super(), this._viewportElement = l, this._screenElement = _, this._bufferService = S, this._decorationService = x, this._renderService = D, this._optionsService = y, this._coreBrowserService = E, this._colorZoneStore = new f.ColorZoneStore(), this._shouldUpdateDimensions = !0, this._shouldUpdateAnchor = !0, this._lastKnownBufferLength = 0, this._canvas = this._coreBrowserService.mainDocument.createElement("canvas"), this._canvas.classList.add("xterm-decoration-overview-ruler"), this._refreshCanvasDimensions(), this._viewportElement.parentElement?.insertBefore(this._canvas, this._viewportElement);
          const B = this._canvas.getContext("2d");
          if (!B) throw new Error("Ctx cannot be null");
          this._ctx = B, this._registerDecorationListeners(), this._registerBufferChangeListeners(), this._registerDimensionChangeListeners(), this.register((0, v.toDisposable)(() => {
            this._canvas?.remove();
          }));
        }
        _registerDecorationListeners() {
          this.register(this._decorationService.onDecorationRegistered(() => this._queueRefresh(void 0, !0))), this.register(this._decorationService.onDecorationRemoved(() => this._queueRefresh(void 0, !0)));
        }
        _registerBufferChangeListeners() {
          this.register(this._renderService.onRenderedViewportChange(() => this._queueRefresh())), this.register(this._bufferService.buffers.onBufferActivate(() => {
            this._canvas.style.display = this._bufferService.buffer === this._bufferService.buffers.alt ? "none" : "block";
          })), this.register(this._bufferService.onScroll(() => {
            this._lastKnownBufferLength !== this._bufferService.buffers.normal.lines.length && (this._refreshDrawHeightConstants(), this._refreshColorZonePadding());
          }));
        }
        _registerDimensionChangeListeners() {
          this.register(this._renderService.onRender(() => {
            this._containerHeight && this._containerHeight === this._screenElement.clientHeight || (this._queueRefresh(!0), this._containerHeight = this._screenElement.clientHeight);
          })), this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth", () => this._queueRefresh(!0))), this.register(this._coreBrowserService.onDprChange(() => this._queueRefresh(!0))), this._queueRefresh(!0);
        }
        _refreshDrawConstants() {
          const l = Math.floor(this._canvas.width / 3), _ = Math.ceil(this._canvas.width / 3);
          d.full = this._canvas.width, d.left = l, d.center = _, d.right = l, this._refreshDrawHeightConstants(), m.full = 0, m.left = 0, m.center = d.left, m.right = d.left + d.center;
        }
        _refreshDrawHeightConstants() {
          b.full = Math.round(2 * this._coreBrowserService.dpr);
          const l = this._canvas.height / this._bufferService.buffer.lines.length, _ = Math.round(Math.max(Math.min(l, 12), 6) * this._coreBrowserService.dpr);
          b.left = _, b.center = _, b.right = _;
        }
        _refreshColorZonePadding() {
          this._colorZoneStore.setPadding({ full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * b.full), left: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * b.left), center: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * b.center), right: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * b.right) }), this._lastKnownBufferLength = this._bufferService.buffers.normal.lines.length;
        }
        _refreshCanvasDimensions() {
          this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this._coreBrowserService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowserService.dpr), this._refreshDrawConstants(), this._refreshColorZonePadding();
        }
        _refreshDecorations() {
          this._shouldUpdateDimensions && this._refreshCanvasDimensions(), this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height), this._colorZoneStore.clear();
          for (const _ of this._decorationService.decorations) this._colorZoneStore.addDecoration(_);
          this._ctx.lineWidth = 1;
          const l = this._colorZoneStore.zones;
          for (const _ of l) _.position !== "full" && this._renderColorZone(_);
          for (const _ of l) _.position === "full" && this._renderColorZone(_);
          this._shouldUpdateDimensions = !1, this._shouldUpdateAnchor = !1;
        }
        _renderColorZone(l) {
          this._ctx.fillStyle = l.color, this._ctx.fillRect(m[l.position || "full"], Math.round((this._canvas.height - 1) * (l.startBufferLine / this._bufferService.buffers.active.lines.length) - b[l.position || "full"] / 2), d[l.position || "full"], Math.round((this._canvas.height - 1) * ((l.endBufferLine - l.startBufferLine) / this._bufferService.buffers.active.lines.length) + b[l.position || "full"]));
        }
        _queueRefresh(l, _) {
          this._shouldUpdateDimensions = l || this._shouldUpdateDimensions, this._shouldUpdateAnchor = _ || this._shouldUpdateAnchor, this._animationFrame === void 0 && (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
            this._refreshDecorations(), this._animationFrame = void 0;
          }));
        }
      };
      s.OverviewRulerRenderer = h = u([p(2, C.IBufferService), p(3, C.IDecorationService), p(4, g.IRenderService), p(5, C.IOptionsService), p(6, g.ICoreBrowserService)], h);
    }, 2950: function(c, s, a) {
      var u = this && this.__decorate || function(b, d, m, h) {
        var l, _ = arguments.length, S = _ < 3 ? d : h === null ? h = Object.getOwnPropertyDescriptor(d, m) : h;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") S = Reflect.decorate(b, d, m, h);
        else for (var x = b.length - 1; x >= 0; x--) (l = b[x]) && (S = (_ < 3 ? l(S) : _ > 3 ? l(d, m, S) : l(d, m)) || S);
        return _ > 3 && S && Object.defineProperty(d, m, S), S;
      }, p = this && this.__param || function(b, d) {
        return function(m, h) {
          d(m, h, b);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CompositionHelper = void 0;
      const f = a(4725), g = a(2585), v = a(2584);
      let C = s.CompositionHelper = class {
        get isComposing() {
          return this._isComposing;
        }
        constructor(b, d, m, h, l, _) {
          this._textarea = b, this._compositionView = d, this._bufferService = m, this._optionsService = h, this._coreService = l, this._renderService = _, this._isComposing = !1, this._isSendingComposition = !1, this._compositionPosition = { start: 0, end: 0 }, this._dataAlreadySent = "";
        }
        compositionstart() {
          this._isComposing = !0, this._compositionPosition.start = this._textarea.value.length, this._compositionView.textContent = "", this._dataAlreadySent = "", this._compositionView.classList.add("active");
        }
        compositionupdate(b) {
          this._compositionView.textContent = b.data, this.updateCompositionElements(), setTimeout(() => {
            this._compositionPosition.end = this._textarea.value.length;
          }, 0);
        }
        compositionend() {
          this._finalizeComposition(!0);
        }
        keydown(b) {
          if (this._isComposing || this._isSendingComposition) {
            if (b.keyCode === 229 || b.keyCode === 16 || b.keyCode === 17 || b.keyCode === 18) return !1;
            this._finalizeComposition(!1);
          }
          return b.keyCode !== 229 || (this._handleAnyTextareaChanges(), !1);
        }
        _finalizeComposition(b) {
          if (this._compositionView.classList.remove("active"), this._isComposing = !1, b) {
            const d = { start: this._compositionPosition.start, end: this._compositionPosition.end };
            this._isSendingComposition = !0, setTimeout(() => {
              if (this._isSendingComposition) {
                let m;
                this._isSendingComposition = !1, d.start += this._dataAlreadySent.length, m = this._isComposing ? this._textarea.value.substring(d.start, d.end) : this._textarea.value.substring(d.start), m.length > 0 && this._coreService.triggerDataEvent(m, !0);
              }
            }, 0);
          } else {
            this._isSendingComposition = !1;
            const d = this._textarea.value.substring(this._compositionPosition.start, this._compositionPosition.end);
            this._coreService.triggerDataEvent(d, !0);
          }
        }
        _handleAnyTextareaChanges() {
          const b = this._textarea.value;
          setTimeout(() => {
            if (!this._isComposing) {
              const d = this._textarea.value, m = d.replace(b, "");
              this._dataAlreadySent = m, d.length > b.length ? this._coreService.triggerDataEvent(m, !0) : d.length < b.length ? this._coreService.triggerDataEvent(`${v.C0.DEL}`, !0) : d.length === b.length && d !== b && this._coreService.triggerDataEvent(d, !0);
            }
          }, 0);
        }
        updateCompositionElements(b) {
          if (this._isComposing) {
            if (this._bufferService.buffer.isCursorInViewport) {
              const d = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1), m = this._renderService.dimensions.css.cell.height, h = this._bufferService.buffer.y * this._renderService.dimensions.css.cell.height, l = d * this._renderService.dimensions.css.cell.width;
              this._compositionView.style.left = l + "px", this._compositionView.style.top = h + "px", this._compositionView.style.height = m + "px", this._compositionView.style.lineHeight = m + "px", this._compositionView.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._compositionView.style.fontSize = this._optionsService.rawOptions.fontSize + "px";
              const _ = this._compositionView.getBoundingClientRect();
              this._textarea.style.left = l + "px", this._textarea.style.top = h + "px", this._textarea.style.width = Math.max(_.width, 1) + "px", this._textarea.style.height = Math.max(_.height, 1) + "px", this._textarea.style.lineHeight = _.height + "px";
            }
            b || setTimeout(() => this.updateCompositionElements(!0), 0);
          }
        }
      };
      s.CompositionHelper = C = u([p(2, g.IBufferService), p(3, g.IOptionsService), p(4, g.ICoreService), p(5, f.IRenderService)], C);
    }, 9806: (c, s) => {
      function a(u, p, f) {
        const g = f.getBoundingClientRect(), v = u.getComputedStyle(f), C = parseInt(v.getPropertyValue("padding-left")), b = parseInt(v.getPropertyValue("padding-top"));
        return [p.clientX - g.left - C, p.clientY - g.top - b];
      }
      Object.defineProperty(s, "__esModule", { value: !0 }), s.getCoords = s.getCoordsRelativeToElement = void 0, s.getCoordsRelativeToElement = a, s.getCoords = function(u, p, f, g, v, C, b, d, m) {
        if (!C) return;
        const h = a(u, p, f);
        return h ? (h[0] = Math.ceil((h[0] + (m ? b / 2 : 0)) / b), h[1] = Math.ceil(h[1] / d), h[0] = Math.min(Math.max(h[0], 1), g + (m ? 1 : 0)), h[1] = Math.min(Math.max(h[1], 1), v), h) : void 0;
      };
    }, 9504: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.moveToCellSequence = void 0;
      const u = a(2584);
      function p(d, m, h, l) {
        const _ = d - f(d, h), S = m - f(m, h), x = Math.abs(_ - S) - function(D, y, E) {
          let B = 0;
          const O = D - f(D, E), N = y - f(y, E);
          for (let R = 0; R < Math.abs(O - N); R++) {
            const j = g(D, y) === "A" ? -1 : 1;
            E.buffer.lines.get(O + j * R)?.isWrapped && B++;
          }
          return B;
        }(d, m, h);
        return b(x, C(g(d, m), l));
      }
      function f(d, m) {
        let h = 0, l = m.buffer.lines.get(d), _ = l?.isWrapped;
        for (; _ && d >= 0 && d < m.rows; ) h++, l = m.buffer.lines.get(--d), _ = l?.isWrapped;
        return h;
      }
      function g(d, m) {
        return d > m ? "A" : "B";
      }
      function v(d, m, h, l, _, S) {
        let x = d, D = m, y = "";
        for (; x !== h || D !== l; ) x += _ ? 1 : -1, _ && x > S.cols - 1 ? (y += S.buffer.translateBufferLineToString(D, !1, d, x), x = 0, d = 0, D++) : !_ && x < 0 && (y += S.buffer.translateBufferLineToString(D, !1, 0, d + 1), x = S.cols - 1, d = x, D--);
        return y + S.buffer.translateBufferLineToString(D, !1, d, x);
      }
      function C(d, m) {
        const h = m ? "O" : "[";
        return u.C0.ESC + h + d;
      }
      function b(d, m) {
        d = Math.floor(d);
        let h = "";
        for (let l = 0; l < d; l++) h += m;
        return h;
      }
      s.moveToCellSequence = function(d, m, h, l) {
        const _ = h.buffer.x, S = h.buffer.y;
        if (!h.buffer.hasScrollback) return function(y, E, B, O, N, R) {
          return p(E, O, N, R).length === 0 ? "" : b(v(y, E, y, E - f(E, N), !1, N).length, C("D", R));
        }(_, S, 0, m, h, l) + p(S, m, h, l) + function(y, E, B, O, N, R) {
          let j;
          j = p(E, O, N, R).length > 0 ? O - f(O, N) : E;
          const Y = O, ee = function(ne, Z, T, L, I, H) {
            let K;
            return K = p(T, L, I, H).length > 0 ? L - f(L, I) : Z, ne < T && K <= L || ne >= T && K < L ? "C" : "D";
          }(y, E, B, O, N, R);
          return b(v(y, j, B, Y, ee === "C", N).length, C(ee, R));
        }(_, S, d, m, h, l);
        let x;
        if (S === m) return x = _ > d ? "D" : "C", b(Math.abs(_ - d), C(x, l));
        x = S > m ? "D" : "C";
        const D = Math.abs(S - m);
        return b(function(y, E) {
          return E.cols - y;
        }(S > m ? d : _, h) + (D - 1) * h.cols + 1 + ((S > m ? _ : d) - 1), C(x, l));
      };
    }, 1296: function(c, s, a) {
      var u = this && this.__decorate || function(R, j, Y, ee) {
        var ne, Z = arguments.length, T = Z < 3 ? j : ee === null ? ee = Object.getOwnPropertyDescriptor(j, Y) : ee;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") T = Reflect.decorate(R, j, Y, ee);
        else for (var L = R.length - 1; L >= 0; L--) (ne = R[L]) && (T = (Z < 3 ? ne(T) : Z > 3 ? ne(j, Y, T) : ne(j, Y)) || T);
        return Z > 3 && T && Object.defineProperty(j, Y, T), T;
      }, p = this && this.__param || function(R, j) {
        return function(Y, ee) {
          j(Y, ee, R);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.DomRenderer = void 0;
      const f = a(3787), g = a(2550), v = a(2223), C = a(6171), b = a(6052), d = a(4725), m = a(8055), h = a(8460), l = a(844), _ = a(2585), S = "xterm-dom-renderer-owner-", x = "xterm-rows", D = "xterm-fg-", y = "xterm-bg-", E = "xterm-focus", B = "xterm-selection";
      let O = 1, N = s.DomRenderer = class extends l.Disposable {
        constructor(R, j, Y, ee, ne, Z, T, L, I, H, K, re, V) {
          super(), this._terminal = R, this._document = j, this._element = Y, this._screenElement = ee, this._viewportElement = ne, this._helperContainer = Z, this._linkifier2 = T, this._charSizeService = I, this._optionsService = H, this._bufferService = K, this._coreBrowserService = re, this._themeService = V, this._terminalClass = O++, this._rowElements = [], this._selectionRenderModel = (0, b.createSelectionRenderModel)(), this.onRequestRedraw = this.register(new h.EventEmitter()).event, this._rowContainer = this._document.createElement("div"), this._rowContainer.classList.add(x), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = this._document.createElement("div"), this._selectionContainer.classList.add(B), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = (0, C.createRenderDimensions)(), this._updateDimensions(), this.register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this.register(this._themeService.onChangeColors((ue) => this._injectCss(ue))), this._injectCss(this._themeService.colors), this._rowFactory = L.createInstance(f.DomRendererRowFactory, document), this._element.classList.add(S + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this.register(this._linkifier2.onShowLinkUnderline((ue) => this._handleLinkHover(ue))), this.register(this._linkifier2.onHideLinkUnderline((ue) => this._handleLinkLeave(ue))), this.register((0, l.toDisposable)(() => {
            this._element.classList.remove(S + this._terminalClass), this._rowContainer.remove(), this._selectionContainer.remove(), this._widthCache.dispose(), this._themeStyleElement.remove(), this._dimensionsStyleElement.remove();
          })), this._widthCache = new g.WidthCache(this._document, this._helperContainer), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
        }
        _updateDimensions() {
          const R = this._coreBrowserService.dpr;
          this.dimensions.device.char.width = this._charSizeService.width * R, this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * R), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.left = 0, this.dimensions.device.char.top = 0, this.dimensions.device.canvas.width = this.dimensions.device.cell.width * this._bufferService.cols, this.dimensions.device.canvas.height = this.dimensions.device.cell.height * this._bufferService.rows, this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / R), this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / R), this.dimensions.css.cell.width = this.dimensions.css.canvas.width / this._bufferService.cols, this.dimensions.css.cell.height = this.dimensions.css.canvas.height / this._bufferService.rows;
          for (const Y of this._rowElements) Y.style.width = `${this.dimensions.css.canvas.width}px`, Y.style.height = `${this.dimensions.css.cell.height}px`, Y.style.lineHeight = `${this.dimensions.css.cell.height}px`, Y.style.overflow = "hidden";
          this._dimensionsStyleElement || (this._dimensionsStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._dimensionsStyleElement));
          const j = `${this._terminalSelector} .${x} span { display: inline-block; height: 100%; vertical-align: top;}`;
          this._dimensionsStyleElement.textContent = j, this._selectionContainer.style.height = this._viewportElement.style.height, this._screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._screenElement.style.height = `${this.dimensions.css.canvas.height}px`;
        }
        _injectCss(R) {
          this._themeStyleElement || (this._themeStyleElement = this._document.createElement("style"), this._screenElement.appendChild(this._themeStyleElement));
          let j = `${this._terminalSelector} .${x} { color: ${R.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;
          j += `${this._terminalSelector} .${x} .xterm-dim { color: ${m.color.multiplyOpacity(R.foreground, 0.5).css};}`, j += `${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;
          const Y = `blink_underline_${this._terminalClass}`, ee = `blink_bar_${this._terminalClass}`, ne = `blink_block_${this._terminalClass}`;
          j += `@keyframes ${Y} { 50% {  border-bottom-style: hidden; }}`, j += `@keyframes ${ee} { 50% {  box-shadow: none; }}`, j += `@keyframes ${ne} { 0% {  background-color: ${R.cursor.css};  color: ${R.cursorAccent.css}; } 50% {  background-color: inherit;  color: ${R.cursor.css}; }}`, j += `${this._terminalSelector} .${x}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${x}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${x}.${E} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block { background-color: ${R.cursor.css}; color: ${R.cursorAccent.css};}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${R.cursor.css} !important; color: ${R.cursorAccent.css} !important;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${R.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${R.cursor.css} inset;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${R.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`, j += `${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${R.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${R.selectionInactiveBackgroundOpaque.css};}`;
          for (const [Z, T] of R.ansi.entries()) j += `${this._terminalSelector} .${D}${Z} { color: ${T.css}; }${this._terminalSelector} .${D}${Z}.xterm-dim { color: ${m.color.multiplyOpacity(T, 0.5).css}; }${this._terminalSelector} .${y}${Z} { background-color: ${T.css}; }`;
          j += `${this._terminalSelector} .${D}${v.INVERTED_DEFAULT_COLOR} { color: ${m.color.opaque(R.background).css}; }${this._terminalSelector} .${D}${v.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${m.color.multiplyOpacity(m.color.opaque(R.background), 0.5).css}; }${this._terminalSelector} .${y}${v.INVERTED_DEFAULT_COLOR} { background-color: ${R.foreground.css}; }`, this._themeStyleElement.textContent = j;
        }
        _setDefaultSpacing() {
          const R = this.dimensions.css.cell.width - this._widthCache.get("W", !1, !1);
          this._rowContainer.style.letterSpacing = `${R}px`, this._rowFactory.defaultSpacing = R;
        }
        handleDevicePixelRatioChange() {
          this._updateDimensions(), this._widthCache.clear(), this._setDefaultSpacing();
        }
        _refreshRowElements(R, j) {
          for (let Y = this._rowElements.length; Y <= j; Y++) {
            const ee = this._document.createElement("div");
            this._rowContainer.appendChild(ee), this._rowElements.push(ee);
          }
          for (; this._rowElements.length > j; ) this._rowContainer.removeChild(this._rowElements.pop());
        }
        handleResize(R, j) {
          this._refreshRowElements(R, j), this._updateDimensions(), this.handleSelectionChanged(this._selectionRenderModel.selectionStart, this._selectionRenderModel.selectionEnd, this._selectionRenderModel.columnSelectMode);
        }
        handleCharSizeChanged() {
          this._updateDimensions(), this._widthCache.clear(), this._setDefaultSpacing();
        }
        handleBlur() {
          this._rowContainer.classList.remove(E), this.renderRows(0, this._bufferService.rows - 1);
        }
        handleFocus() {
          this._rowContainer.classList.add(E), this.renderRows(this._bufferService.buffer.y, this._bufferService.buffer.y);
        }
        handleSelectionChanged(R, j, Y) {
          if (this._selectionContainer.replaceChildren(), this._rowFactory.handleSelectionChanged(R, j, Y), this.renderRows(0, this._bufferService.rows - 1), !R || !j) return;
          this._selectionRenderModel.update(this._terminal, R, j, Y);
          const ee = this._selectionRenderModel.viewportStartRow, ne = this._selectionRenderModel.viewportEndRow, Z = this._selectionRenderModel.viewportCappedStartRow, T = this._selectionRenderModel.viewportCappedEndRow;
          if (Z >= this._bufferService.rows || T < 0) return;
          const L = this._document.createDocumentFragment();
          if (Y) {
            const I = R[0] > j[0];
            L.appendChild(this._createSelectionElement(Z, I ? j[0] : R[0], I ? R[0] : j[0], T - Z + 1));
          } else {
            const I = ee === Z ? R[0] : 0, H = Z === ne ? j[0] : this._bufferService.cols;
            L.appendChild(this._createSelectionElement(Z, I, H));
            const K = T - Z - 1;
            if (L.appendChild(this._createSelectionElement(Z + 1, 0, this._bufferService.cols, K)), Z !== T) {
              const re = ne === T ? j[0] : this._bufferService.cols;
              L.appendChild(this._createSelectionElement(T, 0, re));
            }
          }
          this._selectionContainer.appendChild(L);
        }
        _createSelectionElement(R, j, Y, ee = 1) {
          const ne = this._document.createElement("div"), Z = j * this.dimensions.css.cell.width;
          let T = this.dimensions.css.cell.width * (Y - j);
          return Z + T > this.dimensions.css.canvas.width && (T = this.dimensions.css.canvas.width - Z), ne.style.height = ee * this.dimensions.css.cell.height + "px", ne.style.top = R * this.dimensions.css.cell.height + "px", ne.style.left = `${Z}px`, ne.style.width = `${T}px`, ne;
        }
        handleCursorMove() {
        }
        _handleOptionsChanged() {
          this._updateDimensions(), this._injectCss(this._themeService.colors), this._widthCache.setFont(this._optionsService.rawOptions.fontFamily, this._optionsService.rawOptions.fontSize, this._optionsService.rawOptions.fontWeight, this._optionsService.rawOptions.fontWeightBold), this._setDefaultSpacing();
        }
        clear() {
          for (const R of this._rowElements) R.replaceChildren();
        }
        renderRows(R, j) {
          const Y = this._bufferService.buffer, ee = Y.ybase + Y.y, ne = Math.min(Y.x, this._bufferService.cols - 1), Z = this._optionsService.rawOptions.cursorBlink, T = this._optionsService.rawOptions.cursorStyle, L = this._optionsService.rawOptions.cursorInactiveStyle;
          for (let I = R; I <= j; I++) {
            const H = I + Y.ydisp, K = this._rowElements[I], re = Y.lines.get(H);
            if (!K || !re) break;
            K.replaceChildren(...this._rowFactory.createRow(re, H, H === ee, T, L, ne, Z, this.dimensions.css.cell.width, this._widthCache, -1, -1));
          }
        }
        get _terminalSelector() {
          return `.${S}${this._terminalClass}`;
        }
        _handleLinkHover(R) {
          this._setCellUnderline(R.x1, R.x2, R.y1, R.y2, R.cols, !0);
        }
        _handleLinkLeave(R) {
          this._setCellUnderline(R.x1, R.x2, R.y1, R.y2, R.cols, !1);
        }
        _setCellUnderline(R, j, Y, ee, ne, Z) {
          Y < 0 && (R = 0), ee < 0 && (j = 0);
          const T = this._bufferService.rows - 1;
          Y = Math.max(Math.min(Y, T), 0), ee = Math.max(Math.min(ee, T), 0), ne = Math.min(ne, this._bufferService.cols);
          const L = this._bufferService.buffer, I = L.ybase + L.y, H = Math.min(L.x, ne - 1), K = this._optionsService.rawOptions.cursorBlink, re = this._optionsService.rawOptions.cursorStyle, V = this._optionsService.rawOptions.cursorInactiveStyle;
          for (let ue = Y; ue <= ee; ++ue) {
            const W = ue + L.ydisp, F = this._rowElements[ue], X = L.lines.get(W);
            if (!F || !X) break;
            F.replaceChildren(...this._rowFactory.createRow(X, W, W === I, re, V, H, K, this.dimensions.css.cell.width, this._widthCache, Z ? ue === Y ? R : 0 : -1, Z ? (ue === ee ? j : ne) - 1 : -1));
          }
        }
      };
      s.DomRenderer = N = u([p(7, _.IInstantiationService), p(8, d.ICharSizeService), p(9, _.IOptionsService), p(10, _.IBufferService), p(11, d.ICoreBrowserService), p(12, d.IThemeService)], N);
    }, 3787: function(c, s, a) {
      var u = this && this.__decorate || function(x, D, y, E) {
        var B, O = arguments.length, N = O < 3 ? D : E === null ? E = Object.getOwnPropertyDescriptor(D, y) : E;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") N = Reflect.decorate(x, D, y, E);
        else for (var R = x.length - 1; R >= 0; R--) (B = x[R]) && (N = (O < 3 ? B(N) : O > 3 ? B(D, y, N) : B(D, y)) || N);
        return O > 3 && N && Object.defineProperty(D, y, N), N;
      }, p = this && this.__param || function(x, D) {
        return function(y, E) {
          D(y, E, x);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.DomRendererRowFactory = void 0;
      const f = a(2223), g = a(643), v = a(511), C = a(2585), b = a(8055), d = a(4725), m = a(4269), h = a(6171), l = a(3734);
      let _ = s.DomRendererRowFactory = class {
        constructor(x, D, y, E, B, O, N) {
          this._document = x, this._characterJoinerService = D, this._optionsService = y, this._coreBrowserService = E, this._coreService = B, this._decorationService = O, this._themeService = N, this._workCell = new v.CellData(), this._columnSelectMode = !1, this.defaultSpacing = 0;
        }
        handleSelectionChanged(x, D, y) {
          this._selectionStart = x, this._selectionEnd = D, this._columnSelectMode = y;
        }
        createRow(x, D, y, E, B, O, N, R, j, Y, ee) {
          const ne = [], Z = this._characterJoinerService.getJoinedCharacters(D), T = this._themeService.colors;
          let L, I = x.getNoBgTrimmedLength();
          y && I < O + 1 && (I = O + 1);
          let H = 0, K = "", re = 0, V = 0, ue = 0, W = !1, F = 0, X = !1, J = 0;
          const oe = [], se = Y !== -1 && ee !== -1;
          for (let be = 0; be < I; be++) {
            x.loadCell(be, this._workCell);
            let xe = this._workCell.getWidth();
            if (xe === 0) continue;
            let De = !1, Te = be, de = this._workCell;
            if (Z.length > 0 && be === Z[0][0]) {
              De = !0;
              const Me = Z.shift();
              de = new m.JoinedCellData(this._workCell, x.translateToString(!0, Me[0], Me[1]), Me[1] - Me[0]), Te = Me[1] - 1, xe = de.getWidth();
            }
            const Ve = this._isCellInSelection(be, D), $ = y && be === O, Qt = se && be >= Y && be <= ee;
            let Mr = !1;
            this._decorationService.forEachDecorationAtCell(be, D, void 0, (Me) => {
              Mr = !0;
            });
            let Br = de.getChars() || g.WHITESPACE_CELL_CHAR;
            if (Br === " " && (de.isUnderline() || de.isOverline()) && (Br = " "), J = xe * R - j.get(Br, de.isBold(), de.isItalic()), L) {
              if (H && (Ve && X || !Ve && !X && de.bg === re) && (Ve && X && T.selectionForeground || de.fg === V) && de.extended.ext === ue && Qt === W && J === F && !$ && !De && !Mr) {
                de.isInvisible() ? K += g.WHITESPACE_CELL_CHAR : K += Br, H++;
                continue;
              }
              H && (L.textContent = K), L = this._document.createElement("span"), H = 0, K = "";
            } else L = this._document.createElement("span");
            if (re = de.bg, V = de.fg, ue = de.extended.ext, W = Qt, F = J, X = Ve, De && O >= be && O <= Te && (O = be), !this._coreService.isCursorHidden && $ && this._coreService.isCursorInitialized) {
              if (oe.push("xterm-cursor"), this._coreBrowserService.isFocused) N && oe.push("xterm-cursor-blink"), oe.push(E === "bar" ? "xterm-cursor-bar" : E === "underline" ? "xterm-cursor-underline" : "xterm-cursor-block");
              else if (B) switch (B) {
                case "outline":
                  oe.push("xterm-cursor-outline");
                  break;
                case "block":
                  oe.push("xterm-cursor-block");
                  break;
                case "bar":
                  oe.push("xterm-cursor-bar");
                  break;
                case "underline":
                  oe.push("xterm-cursor-underline");
              }
            }
            if (de.isBold() && oe.push("xterm-bold"), de.isItalic() && oe.push("xterm-italic"), de.isDim() && oe.push("xterm-dim"), K = de.isInvisible() ? g.WHITESPACE_CELL_CHAR : de.getChars() || g.WHITESPACE_CELL_CHAR, de.isUnderline() && (oe.push(`xterm-underline-${de.extended.underlineStyle}`), K === " " && (K = " "), !de.isUnderlineColorDefault())) if (de.isUnderlineColorRGB()) L.style.textDecorationColor = `rgb(${l.AttributeData.toColorRGB(de.getUnderlineColor()).join(",")})`;
            else {
              let Me = de.getUnderlineColor();
              this._optionsService.rawOptions.drawBoldTextInBrightColors && de.isBold() && Me < 8 && (Me += 8), L.style.textDecorationColor = T.ansi[Me].css;
            }
            de.isOverline() && (oe.push("xterm-overline"), K === " " && (K = " ")), de.isStrikethrough() && oe.push("xterm-strikethrough"), Qt && (L.style.textDecoration = "underline");
            let $e = de.getFgColor(), At = de.getFgColorMode(), Ke = de.getBgColor(), mt = de.getBgColorMode();
            const Fr = !!de.isInverse();
            if (Fr) {
              const Me = $e;
              $e = Ke, Ke = Me;
              const Rr = At;
              At = mt, mt = Rr;
            }
            let Tt, yr, pt, ur = !1;
            switch (this._decorationService.forEachDecorationAtCell(be, D, void 0, (Me) => {
              Me.options.layer !== "top" && ur || (Me.backgroundColorRGB && (mt = 50331648, Ke = Me.backgroundColorRGB.rgba >> 8 & 16777215, Tt = Me.backgroundColorRGB), Me.foregroundColorRGB && (At = 50331648, $e = Me.foregroundColorRGB.rgba >> 8 & 16777215, yr = Me.foregroundColorRGB), ur = Me.options.layer === "top");
            }), !ur && Ve && (Tt = this._coreBrowserService.isFocused ? T.selectionBackgroundOpaque : T.selectionInactiveBackgroundOpaque, Ke = Tt.rgba >> 8 & 16777215, mt = 50331648, ur = !0, T.selectionForeground && (At = 50331648, $e = T.selectionForeground.rgba >> 8 & 16777215, yr = T.selectionForeground)), ur && oe.push("xterm-decoration-top"), mt) {
              case 16777216:
              case 33554432:
                pt = T.ansi[Ke], oe.push(`xterm-bg-${Ke}`);
                break;
              case 50331648:
                pt = b.channels.toColor(Ke >> 16, Ke >> 8 & 255, 255 & Ke), this._addStyle(L, `background-color:#${S((Ke >>> 0).toString(16), "0", 6)}`);
                break;
              default:
                Fr ? (pt = T.foreground, oe.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)) : pt = T.background;
            }
            switch (Tt || de.isDim() && (Tt = b.color.multiplyOpacity(pt, 0.5)), At) {
              case 16777216:
              case 33554432:
                de.isBold() && $e < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors && ($e += 8), this._applyMinimumContrast(L, pt, T.ansi[$e], de, Tt, void 0) || oe.push(`xterm-fg-${$e}`);
                break;
              case 50331648:
                const Me = b.channels.toColor($e >> 16 & 255, $e >> 8 & 255, 255 & $e);
                this._applyMinimumContrast(L, pt, Me, de, Tt, yr) || this._addStyle(L, `color:#${S($e.toString(16), "0", 6)}`);
                break;
              default:
                this._applyMinimumContrast(L, pt, T.foreground, de, Tt, yr) || Fr && oe.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`);
            }
            oe.length && (L.className = oe.join(" "), oe.length = 0), $ || De || Mr ? L.textContent = K : H++, J !== this.defaultSpacing && (L.style.letterSpacing = `${J}px`), ne.push(L), be = Te;
          }
          return L && H && (L.textContent = K), ne;
        }
        _applyMinimumContrast(x, D, y, E, B, O) {
          if (this._optionsService.rawOptions.minimumContrastRatio === 1 || (0, h.treatGlyphAsBackgroundColor)(E.getCode())) return !1;
          const N = this._getContrastCache(E);
          let R;
          if (B || O || (R = N.getColor(D.rgba, y.rgba)), R === void 0) {
            const j = this._optionsService.rawOptions.minimumContrastRatio / (E.isDim() ? 2 : 1);
            R = b.color.ensureContrastRatio(B || D, O || y, j), N.setColor((B || D).rgba, (O || y).rgba, R ?? null);
          }
          return !!R && (this._addStyle(x, `color:${R.css}`), !0);
        }
        _getContrastCache(x) {
          return x.isDim() ? this._themeService.colors.halfContrastCache : this._themeService.colors.contrastCache;
        }
        _addStyle(x, D) {
          x.setAttribute("style", `${x.getAttribute("style") || ""}${D};`);
        }
        _isCellInSelection(x, D) {
          const y = this._selectionStart, E = this._selectionEnd;
          return !(!y || !E) && (this._columnSelectMode ? y[0] <= E[0] ? x >= y[0] && D >= y[1] && x < E[0] && D <= E[1] : x < y[0] && D >= y[1] && x >= E[0] && D <= E[1] : D > y[1] && D < E[1] || y[1] === E[1] && D === y[1] && x >= y[0] && x < E[0] || y[1] < E[1] && D === E[1] && x < E[0] || y[1] < E[1] && D === y[1] && x >= y[0]);
        }
      };
      function S(x, D, y) {
        for (; x.length < y; ) x = D + x;
        return x;
      }
      s.DomRendererRowFactory = _ = u([p(1, d.ICharacterJoinerService), p(2, C.IOptionsService), p(3, d.ICoreBrowserService), p(4, C.ICoreService), p(5, C.IDecorationService), p(6, d.IThemeService)], _);
    }, 2550: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.WidthCache = void 0, s.WidthCache = class {
        constructor(a, u) {
          this._flat = new Float32Array(256), this._font = "", this._fontSize = 0, this._weight = "normal", this._weightBold = "bold", this._measureElements = [], this._container = a.createElement("div"), this._container.classList.add("xterm-width-cache-measure-container"), this._container.setAttribute("aria-hidden", "true"), this._container.style.whiteSpace = "pre", this._container.style.fontKerning = "none";
          const p = a.createElement("span");
          p.classList.add("xterm-char-measure-element");
          const f = a.createElement("span");
          f.classList.add("xterm-char-measure-element"), f.style.fontWeight = "bold";
          const g = a.createElement("span");
          g.classList.add("xterm-char-measure-element"), g.style.fontStyle = "italic";
          const v = a.createElement("span");
          v.classList.add("xterm-char-measure-element"), v.style.fontWeight = "bold", v.style.fontStyle = "italic", this._measureElements = [p, f, g, v], this._container.appendChild(p), this._container.appendChild(f), this._container.appendChild(g), this._container.appendChild(v), u.appendChild(this._container), this.clear();
        }
        dispose() {
          this._container.remove(), this._measureElements.length = 0, this._holey = void 0;
        }
        clear() {
          this._flat.fill(-9999), this._holey = /* @__PURE__ */ new Map();
        }
        setFont(a, u, p, f) {
          a === this._font && u === this._fontSize && p === this._weight && f === this._weightBold || (this._font = a, this._fontSize = u, this._weight = p, this._weightBold = f, this._container.style.fontFamily = this._font, this._container.style.fontSize = `${this._fontSize}px`, this._measureElements[0].style.fontWeight = `${p}`, this._measureElements[1].style.fontWeight = `${f}`, this._measureElements[2].style.fontWeight = `${p}`, this._measureElements[3].style.fontWeight = `${f}`, this.clear());
        }
        get(a, u, p) {
          let f = 0;
          if (!u && !p && a.length === 1 && (f = a.charCodeAt(0)) < 256) {
            if (this._flat[f] !== -9999) return this._flat[f];
            const C = this._measure(a, 0);
            return C > 0 && (this._flat[f] = C), C;
          }
          let g = a;
          u && (g += "B"), p && (g += "I");
          let v = this._holey.get(g);
          if (v === void 0) {
            let C = 0;
            u && (C |= 1), p && (C |= 2), v = this._measure(a, C), v > 0 && this._holey.set(g, v);
          }
          return v;
        }
        _measure(a, u) {
          const p = this._measureElements[u];
          return p.textContent = a.repeat(32), p.offsetWidth / 32;
        }
      };
    }, 2223: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.TEXT_BASELINE = s.DIM_OPACITY = s.INVERTED_DEFAULT_COLOR = void 0;
      const u = a(6114);
      s.INVERTED_DEFAULT_COLOR = 257, s.DIM_OPACITY = 0.5, s.TEXT_BASELINE = u.isFirefox || u.isLegacyEdge ? "bottom" : "ideographic";
    }, 6171: (c, s) => {
      function a(p) {
        return 57508 <= p && p <= 57558;
      }
      function u(p) {
        return p >= 128512 && p <= 128591 || p >= 127744 && p <= 128511 || p >= 128640 && p <= 128767 || p >= 9728 && p <= 9983 || p >= 9984 && p <= 10175 || p >= 65024 && p <= 65039 || p >= 129280 && p <= 129535 || p >= 127462 && p <= 127487;
      }
      Object.defineProperty(s, "__esModule", { value: !0 }), s.computeNextVariantOffset = s.createRenderDimensions = s.treatGlyphAsBackgroundColor = s.allowRescaling = s.isEmoji = s.isRestrictedPowerlineGlyph = s.isPowerlineGlyph = s.throwIfFalsy = void 0, s.throwIfFalsy = function(p) {
        if (!p) throw new Error("value must not be falsy");
        return p;
      }, s.isPowerlineGlyph = a, s.isRestrictedPowerlineGlyph = function(p) {
        return 57520 <= p && p <= 57527;
      }, s.isEmoji = u, s.allowRescaling = function(p, f, g, v) {
        return f === 1 && g > Math.ceil(1.5 * v) && p !== void 0 && p > 255 && !u(p) && !a(p) && !function(C) {
          return 57344 <= C && C <= 63743;
        }(p);
      }, s.treatGlyphAsBackgroundColor = function(p) {
        return a(p) || function(f) {
          return 9472 <= f && f <= 9631;
        }(p);
      }, s.createRenderDimensions = function() {
        return { css: { canvas: { width: 0, height: 0 }, cell: { width: 0, height: 0 } }, device: { canvas: { width: 0, height: 0 }, cell: { width: 0, height: 0 }, char: { width: 0, height: 0, left: 0, top: 0 } } };
      }, s.computeNextVariantOffset = function(p, f, g = 0) {
        return (p - (2 * Math.round(f) - g)) % (2 * Math.round(f));
      };
    }, 6052: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.createSelectionRenderModel = void 0;
      class a {
        constructor() {
          this.clear();
        }
        clear() {
          this.hasSelection = !1, this.columnSelectMode = !1, this.viewportStartRow = 0, this.viewportEndRow = 0, this.viewportCappedStartRow = 0, this.viewportCappedEndRow = 0, this.startCol = 0, this.endCol = 0, this.selectionStart = void 0, this.selectionEnd = void 0;
        }
        update(p, f, g, v = !1) {
          if (this.selectionStart = f, this.selectionEnd = g, !f || !g || f[0] === g[0] && f[1] === g[1]) return void this.clear();
          const C = p.buffers.active.ydisp, b = f[1] - C, d = g[1] - C, m = Math.max(b, 0), h = Math.min(d, p.rows - 1);
          m >= p.rows || h < 0 ? this.clear() : (this.hasSelection = !0, this.columnSelectMode = v, this.viewportStartRow = b, this.viewportEndRow = d, this.viewportCappedStartRow = m, this.viewportCappedEndRow = h, this.startCol = f[0], this.endCol = g[0]);
        }
        isCellSelected(p, f, g) {
          return !!this.hasSelection && (g -= p.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? f >= this.startCol && g >= this.viewportCappedStartRow && f < this.endCol && g <= this.viewportCappedEndRow : f < this.startCol && g >= this.viewportCappedStartRow && f >= this.endCol && g <= this.viewportCappedEndRow : g > this.viewportStartRow && g < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && g === this.viewportStartRow && f >= this.startCol && f < this.endCol || this.viewportStartRow < this.viewportEndRow && g === this.viewportEndRow && f < this.endCol || this.viewportStartRow < this.viewportEndRow && g === this.viewportStartRow && f >= this.startCol);
        }
      }
      s.createSelectionRenderModel = function() {
        return new a();
      };
    }, 456: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.SelectionModel = void 0, s.SelectionModel = class {
        constructor(a) {
          this._bufferService = a, this.isSelectAllActive = !1, this.selectionStartLength = 0;
        }
        clearSelection() {
          this.selectionStart = void 0, this.selectionEnd = void 0, this.isSelectAllActive = !1, this.selectionStartLength = 0;
        }
        get finalSelectionStart() {
          return this.isSelectAllActive ? [0, 0] : this.selectionEnd && this.selectionStart && this.areSelectionValuesReversed() ? this.selectionEnd : this.selectionStart;
        }
        get finalSelectionEnd() {
          if (this.isSelectAllActive) return [this._bufferService.cols, this._bufferService.buffer.ybase + this._bufferService.rows - 1];
          if (this.selectionStart) {
            if (!this.selectionEnd || this.areSelectionValuesReversed()) {
              const a = this.selectionStart[0] + this.selectionStartLength;
              return a > this._bufferService.cols ? a % this._bufferService.cols == 0 ? [this._bufferService.cols, this.selectionStart[1] + Math.floor(a / this._bufferService.cols) - 1] : [a % this._bufferService.cols, this.selectionStart[1] + Math.floor(a / this._bufferService.cols)] : [a, this.selectionStart[1]];
            }
            if (this.selectionStartLength && this.selectionEnd[1] === this.selectionStart[1]) {
              const a = this.selectionStart[0] + this.selectionStartLength;
              return a > this._bufferService.cols ? [a % this._bufferService.cols, this.selectionStart[1] + Math.floor(a / this._bufferService.cols)] : [Math.max(a, this.selectionEnd[0]), this.selectionEnd[1]];
            }
            return this.selectionEnd;
          }
        }
        areSelectionValuesReversed() {
          const a = this.selectionStart, u = this.selectionEnd;
          return !(!a || !u) && (a[1] > u[1] || a[1] === u[1] && a[0] > u[0]);
        }
        handleTrim(a) {
          return this.selectionStart && (this.selectionStart[1] -= a), this.selectionEnd && (this.selectionEnd[1] -= a), this.selectionEnd && this.selectionEnd[1] < 0 ? (this.clearSelection(), !0) : (this.selectionStart && this.selectionStart[1] < 0 && (this.selectionStart[1] = 0), !1);
        }
      };
    }, 428: function(c, s, a) {
      var u = this && this.__decorate || function(h, l, _, S) {
        var x, D = arguments.length, y = D < 3 ? l : S === null ? S = Object.getOwnPropertyDescriptor(l, _) : S;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") y = Reflect.decorate(h, l, _, S);
        else for (var E = h.length - 1; E >= 0; E--) (x = h[E]) && (y = (D < 3 ? x(y) : D > 3 ? x(l, _, y) : x(l, _)) || y);
        return D > 3 && y && Object.defineProperty(l, _, y), y;
      }, p = this && this.__param || function(h, l) {
        return function(_, S) {
          l(_, S, h);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CharSizeService = void 0;
      const f = a(2585), g = a(8460), v = a(844);
      let C = s.CharSizeService = class extends v.Disposable {
        get hasValidSize() {
          return this.width > 0 && this.height > 0;
        }
        constructor(h, l, _) {
          super(), this._optionsService = _, this.width = 0, this.height = 0, this._onCharSizeChange = this.register(new g.EventEmitter()), this.onCharSizeChange = this._onCharSizeChange.event;
          try {
            this._measureStrategy = this.register(new m(this._optionsService));
          } catch {
            this._measureStrategy = this.register(new d(h, l, this._optionsService));
          }
          this.register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], () => this.measure()));
        }
        measure() {
          const h = this._measureStrategy.measure();
          h.width === this.width && h.height === this.height || (this.width = h.width, this.height = h.height, this._onCharSizeChange.fire());
        }
      };
      s.CharSizeService = C = u([p(2, f.IOptionsService)], C);
      class b extends v.Disposable {
        constructor() {
          super(...arguments), this._result = { width: 0, height: 0 };
        }
        _validateAndSet(l, _) {
          l !== void 0 && l > 0 && _ !== void 0 && _ > 0 && (this._result.width = l, this._result.height = _);
        }
      }
      class d extends b {
        constructor(l, _, S) {
          super(), this._document = l, this._parentElement = _, this._optionsService = S, this._measureElement = this._document.createElement("span"), this._measureElement.classList.add("xterm-char-measure-element"), this._measureElement.textContent = "W".repeat(32), this._measureElement.setAttribute("aria-hidden", "true"), this._measureElement.style.whiteSpace = "pre", this._measureElement.style.fontKerning = "none", this._parentElement.appendChild(this._measureElement);
        }
        measure() {
          return this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`, this._validateAndSet(Number(this._measureElement.offsetWidth) / 32, Number(this._measureElement.offsetHeight)), this._result;
        }
      }
      class m extends b {
        constructor(l) {
          super(), this._optionsService = l, this._canvas = new OffscreenCanvas(100, 100), this._ctx = this._canvas.getContext("2d");
          const _ = this._ctx.measureText("W");
          if (!("width" in _ && "fontBoundingBoxAscent" in _ && "fontBoundingBoxDescent" in _)) throw new Error("Required font metrics not supported");
        }
        measure() {
          this._ctx.font = `${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;
          const l = this._ctx.measureText("W");
          return this._validateAndSet(l.width, l.fontBoundingBoxAscent + l.fontBoundingBoxDescent), this._result;
        }
      }
    }, 4269: function(c, s, a) {
      var u = this && this.__decorate || function(m, h, l, _) {
        var S, x = arguments.length, D = x < 3 ? h : _ === null ? _ = Object.getOwnPropertyDescriptor(h, l) : _;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") D = Reflect.decorate(m, h, l, _);
        else for (var y = m.length - 1; y >= 0; y--) (S = m[y]) && (D = (x < 3 ? S(D) : x > 3 ? S(h, l, D) : S(h, l)) || D);
        return x > 3 && D && Object.defineProperty(h, l, D), D;
      }, p = this && this.__param || function(m, h) {
        return function(l, _) {
          h(l, _, m);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CharacterJoinerService = s.JoinedCellData = void 0;
      const f = a(3734), g = a(643), v = a(511), C = a(2585);
      class b extends f.AttributeData {
        constructor(h, l, _) {
          super(), this.content = 0, this.combinedData = "", this.fg = h.fg, this.bg = h.bg, this.combinedData = l, this._width = _;
        }
        isCombined() {
          return 2097152;
        }
        getWidth() {
          return this._width;
        }
        getChars() {
          return this.combinedData;
        }
        getCode() {
          return 2097151;
        }
        setFromCharData(h) {
          throw new Error("not implemented");
        }
        getAsCharData() {
          return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
        }
      }
      s.JoinedCellData = b;
      let d = s.CharacterJoinerService = class Ul {
        constructor(h) {
          this._bufferService = h, this._characterJoiners = [], this._nextCharacterJoinerId = 0, this._workCell = new v.CellData();
        }
        register(h) {
          const l = { id: this._nextCharacterJoinerId++, handler: h };
          return this._characterJoiners.push(l), l.id;
        }
        deregister(h) {
          for (let l = 0; l < this._characterJoiners.length; l++) if (this._characterJoiners[l].id === h) return this._characterJoiners.splice(l, 1), !0;
          return !1;
        }
        getJoinedCharacters(h) {
          if (this._characterJoiners.length === 0) return [];
          const l = this._bufferService.buffer.lines.get(h);
          if (!l || l.length === 0) return [];
          const _ = [], S = l.translateToString(!0);
          let x = 0, D = 0, y = 0, E = l.getFg(0), B = l.getBg(0);
          for (let O = 0; O < l.getTrimmedLength(); O++) if (l.loadCell(O, this._workCell), this._workCell.getWidth() !== 0) {
            if (this._workCell.fg !== E || this._workCell.bg !== B) {
              if (O - x > 1) {
                const N = this._getJoinedRanges(S, y, D, l, x);
                for (let R = 0; R < N.length; R++) _.push(N[R]);
              }
              x = O, y = D, E = this._workCell.fg, B = this._workCell.bg;
            }
            D += this._workCell.getChars().length || g.WHITESPACE_CELL_CHAR.length;
          }
          if (this._bufferService.cols - x > 1) {
            const O = this._getJoinedRanges(S, y, D, l, x);
            for (let N = 0; N < O.length; N++) _.push(O[N]);
          }
          return _;
        }
        _getJoinedRanges(h, l, _, S, x) {
          const D = h.substring(l, _);
          let y = [];
          try {
            y = this._characterJoiners[0].handler(D);
          } catch (E) {
            console.error(E);
          }
          for (let E = 1; E < this._characterJoiners.length; E++) try {
            const B = this._characterJoiners[E].handler(D);
            for (let O = 0; O < B.length; O++) Ul._mergeRanges(y, B[O]);
          } catch (B) {
            console.error(B);
          }
          return this._stringRangesToCellRanges(y, S, x), y;
        }
        _stringRangesToCellRanges(h, l, _) {
          let S = 0, x = !1, D = 0, y = h[S];
          if (y) {
            for (let E = _; E < this._bufferService.cols; E++) {
              const B = l.getWidth(E), O = l.getString(E).length || g.WHITESPACE_CELL_CHAR.length;
              if (B !== 0) {
                if (!x && y[0] <= D && (y[0] = E, x = !0), y[1] <= D) {
                  if (y[1] = E, y = h[++S], !y) break;
                  y[0] <= D ? (y[0] = E, x = !0) : x = !1;
                }
                D += O;
              }
            }
            y && (y[1] = this._bufferService.cols);
          }
        }
        static _mergeRanges(h, l) {
          let _ = !1;
          for (let S = 0; S < h.length; S++) {
            const x = h[S];
            if (_) {
              if (l[1] <= x[0]) return h[S - 1][1] = l[1], h;
              if (l[1] <= x[1]) return h[S - 1][1] = Math.max(l[1], x[1]), h.splice(S, 1), h;
              h.splice(S, 1), S--;
            } else {
              if (l[1] <= x[0]) return h.splice(S, 0, l), h;
              if (l[1] <= x[1]) return x[0] = Math.min(l[0], x[0]), h;
              l[0] < x[1] && (x[0] = Math.min(l[0], x[0]), _ = !0);
            }
          }
          return _ ? h[h.length - 1][1] = l[1] : h.push(l), h;
        }
      };
      s.CharacterJoinerService = d = u([p(0, C.IBufferService)], d);
    }, 5114: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CoreBrowserService = void 0;
      const u = a(844), p = a(8460), f = a(3656);
      class g extends u.Disposable {
        constructor(b, d, m) {
          super(), this._textarea = b, this._window = d, this.mainDocument = m, this._isFocused = !1, this._cachedIsFocused = void 0, this._screenDprMonitor = new v(this._window), this._onDprChange = this.register(new p.EventEmitter()), this.onDprChange = this._onDprChange.event, this._onWindowChange = this.register(new p.EventEmitter()), this.onWindowChange = this._onWindowChange.event, this.register(this.onWindowChange((h) => this._screenDprMonitor.setWindow(h))), this.register((0, p.forwardEvent)(this._screenDprMonitor.onDprChange, this._onDprChange)), this._textarea.addEventListener("focus", () => this._isFocused = !0), this._textarea.addEventListener("blur", () => this._isFocused = !1);
        }
        get window() {
          return this._window;
        }
        set window(b) {
          this._window !== b && (this._window = b, this._onWindowChange.fire(this._window));
        }
        get dpr() {
          return this.window.devicePixelRatio;
        }
        get isFocused() {
          return this._cachedIsFocused === void 0 && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask(() => this._cachedIsFocused = void 0)), this._cachedIsFocused;
        }
      }
      s.CoreBrowserService = g;
      class v extends u.Disposable {
        constructor(b) {
          super(), this._parentWindow = b, this._windowResizeListener = this.register(new u.MutableDisposable()), this._onDprChange = this.register(new p.EventEmitter()), this.onDprChange = this._onDprChange.event, this._outerListener = () => this._setDprAndFireIfDiffers(), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._updateDpr(), this._setWindowResizeListener(), this.register((0, u.toDisposable)(() => this.clearListener()));
        }
        setWindow(b) {
          this._parentWindow = b, this._setWindowResizeListener(), this._setDprAndFireIfDiffers();
        }
        _setWindowResizeListener() {
          this._windowResizeListener.value = (0, f.addDisposableDomListener)(this._parentWindow, "resize", () => this._setDprAndFireIfDiffers());
        }
        _setDprAndFireIfDiffers() {
          this._parentWindow.devicePixelRatio !== this._currentDevicePixelRatio && this._onDprChange.fire(this._parentWindow.devicePixelRatio), this._updateDpr();
        }
        _updateDpr() {
          this._outerListener && (this._resolutionMediaMatchList?.removeListener(this._outerListener), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._resolutionMediaMatchList = this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`), this._resolutionMediaMatchList.addListener(this._outerListener));
        }
        clearListener() {
          this._resolutionMediaMatchList && this._outerListener && (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._outerListener = void 0);
        }
      }
    }, 779: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.LinkProviderService = void 0;
      const u = a(844);
      class p extends u.Disposable {
        constructor() {
          super(), this.linkProviders = [], this.register((0, u.toDisposable)(() => this.linkProviders.length = 0));
        }
        registerLinkProvider(g) {
          return this.linkProviders.push(g), { dispose: () => {
            const v = this.linkProviders.indexOf(g);
            v !== -1 && this.linkProviders.splice(v, 1);
          } };
        }
      }
      s.LinkProviderService = p;
    }, 8934: function(c, s, a) {
      var u = this && this.__decorate || function(C, b, d, m) {
        var h, l = arguments.length, _ = l < 3 ? b : m === null ? m = Object.getOwnPropertyDescriptor(b, d) : m;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") _ = Reflect.decorate(C, b, d, m);
        else for (var S = C.length - 1; S >= 0; S--) (h = C[S]) && (_ = (l < 3 ? h(_) : l > 3 ? h(b, d, _) : h(b, d)) || _);
        return l > 3 && _ && Object.defineProperty(b, d, _), _;
      }, p = this && this.__param || function(C, b) {
        return function(d, m) {
          b(d, m, C);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.MouseService = void 0;
      const f = a(4725), g = a(9806);
      let v = s.MouseService = class {
        constructor(C, b) {
          this._renderService = C, this._charSizeService = b;
        }
        getCoords(C, b, d, m, h) {
          return (0, g.getCoords)(window, C, b, d, m, this._charSizeService.hasValidSize, this._renderService.dimensions.css.cell.width, this._renderService.dimensions.css.cell.height, h);
        }
        getMouseReportCoords(C, b) {
          const d = (0, g.getCoordsRelativeToElement)(window, C, b);
          if (this._charSizeService.hasValidSize) return d[0] = Math.min(Math.max(d[0], 0), this._renderService.dimensions.css.canvas.width - 1), d[1] = Math.min(Math.max(d[1], 0), this._renderService.dimensions.css.canvas.height - 1), { col: Math.floor(d[0] / this._renderService.dimensions.css.cell.width), row: Math.floor(d[1] / this._renderService.dimensions.css.cell.height), x: Math.floor(d[0]), y: Math.floor(d[1]) };
        }
      };
      s.MouseService = v = u([p(0, f.IRenderService), p(1, f.ICharSizeService)], v);
    }, 3230: function(c, s, a) {
      var u = this && this.__decorate || function(h, l, _, S) {
        var x, D = arguments.length, y = D < 3 ? l : S === null ? S = Object.getOwnPropertyDescriptor(l, _) : S;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") y = Reflect.decorate(h, l, _, S);
        else for (var E = h.length - 1; E >= 0; E--) (x = h[E]) && (y = (D < 3 ? x(y) : D > 3 ? x(l, _, y) : x(l, _)) || y);
        return D > 3 && y && Object.defineProperty(l, _, y), y;
      }, p = this && this.__param || function(h, l) {
        return function(_, S) {
          l(_, S, h);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.RenderService = void 0;
      const f = a(6193), g = a(4725), v = a(8460), C = a(844), b = a(7226), d = a(2585);
      let m = s.RenderService = class extends C.Disposable {
        get dimensions() {
          return this._renderer.value.dimensions;
        }
        constructor(h, l, _, S, x, D, y, E) {
          super(), this._rowCount = h, this._charSizeService = S, this._renderer = this.register(new C.MutableDisposable()), this._pausedResizeTask = new b.DebouncedIdleTask(), this._observerDisposable = this.register(new C.MutableDisposable()), this._isPaused = !1, this._needsFullRefresh = !1, this._isNextRenderRedrawOnly = !0, this._needsSelectionRefresh = !1, this._canvasWidth = 0, this._canvasHeight = 0, this._selectionState = { start: void 0, end: void 0, columnSelectMode: !1 }, this._onDimensionsChange = this.register(new v.EventEmitter()), this.onDimensionsChange = this._onDimensionsChange.event, this._onRenderedViewportChange = this.register(new v.EventEmitter()), this.onRenderedViewportChange = this._onRenderedViewportChange.event, this._onRender = this.register(new v.EventEmitter()), this.onRender = this._onRender.event, this._onRefreshRequest = this.register(new v.EventEmitter()), this.onRefreshRequest = this._onRefreshRequest.event, this._renderDebouncer = new f.RenderDebouncer((B, O) => this._renderRows(B, O), y), this.register(this._renderDebouncer), this.register(y.onDprChange(() => this.handleDevicePixelRatioChange())), this.register(D.onResize(() => this._fullRefresh())), this.register(D.buffers.onBufferActivate(() => this._renderer.value?.clear())), this.register(_.onOptionChange(() => this._handleOptionsChanged())), this.register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged())), this.register(x.onDecorationRegistered(() => this._fullRefresh())), this.register(x.onDecorationRemoved(() => this._fullRefresh())), this.register(_.onMultipleOptionChange(["customGlyphs", "drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio", "rescaleOverlappingGlyphs"], () => {
            this.clear(), this.handleResize(D.cols, D.rows), this._fullRefresh();
          })), this.register(_.onMultipleOptionChange(["cursorBlink", "cursorStyle"], () => this.refreshRows(D.buffer.y, D.buffer.y, !0))), this.register(E.onChangeColors(() => this._fullRefresh())), this._registerIntersectionObserver(y.window, l), this.register(y.onWindowChange((B) => this._registerIntersectionObserver(B, l)));
        }
        _registerIntersectionObserver(h, l) {
          if ("IntersectionObserver" in h) {
            const _ = new h.IntersectionObserver((S) => this._handleIntersectionChange(S[S.length - 1]), { threshold: 0 });
            _.observe(l), this._observerDisposable.value = (0, C.toDisposable)(() => _.disconnect());
          }
        }
        _handleIntersectionChange(h) {
          this._isPaused = h.isIntersecting === void 0 ? h.intersectionRatio === 0 : !h.isIntersecting, this._isPaused || this._charSizeService.hasValidSize || this._charSizeService.measure(), !this._isPaused && this._needsFullRefresh && (this._pausedResizeTask.flush(), this.refreshRows(0, this._rowCount - 1), this._needsFullRefresh = !1);
        }
        refreshRows(h, l, _ = !1) {
          this._isPaused ? this._needsFullRefresh = !0 : (_ || (this._isNextRenderRedrawOnly = !1), this._renderDebouncer.refresh(h, l, this._rowCount));
        }
        _renderRows(h, l) {
          this._renderer.value && (h = Math.min(h, this._rowCount - 1), l = Math.min(l, this._rowCount - 1), this._renderer.value.renderRows(h, l), this._needsSelectionRefresh && (this._renderer.value.handleSelectionChanged(this._selectionState.start, this._selectionState.end, this._selectionState.columnSelectMode), this._needsSelectionRefresh = !1), this._isNextRenderRedrawOnly || this._onRenderedViewportChange.fire({ start: h, end: l }), this._onRender.fire({ start: h, end: l }), this._isNextRenderRedrawOnly = !0);
        }
        resize(h, l) {
          this._rowCount = l, this._fireOnCanvasResize();
        }
        _handleOptionsChanged() {
          this._renderer.value && (this.refreshRows(0, this._rowCount - 1), this._fireOnCanvasResize());
        }
        _fireOnCanvasResize() {
          this._renderer.value && (this._renderer.value.dimensions.css.canvas.width === this._canvasWidth && this._renderer.value.dimensions.css.canvas.height === this._canvasHeight || this._onDimensionsChange.fire(this._renderer.value.dimensions));
        }
        hasRenderer() {
          return !!this._renderer.value;
        }
        setRenderer(h) {
          this._renderer.value = h, this._renderer.value && (this._renderer.value.onRequestRedraw((l) => this.refreshRows(l.start, l.end, !0)), this._needsSelectionRefresh = !0, this._fullRefresh());
        }
        addRefreshCallback(h) {
          return this._renderDebouncer.addRefreshCallback(h);
        }
        _fullRefresh() {
          this._isPaused ? this._needsFullRefresh = !0 : this.refreshRows(0, this._rowCount - 1);
        }
        clearTextureAtlas() {
          this._renderer.value && (this._renderer.value.clearTextureAtlas?.(), this._fullRefresh());
        }
        handleDevicePixelRatioChange() {
          this._charSizeService.measure(), this._renderer.value && (this._renderer.value.handleDevicePixelRatioChange(), this.refreshRows(0, this._rowCount - 1));
        }
        handleResize(h, l) {
          this._renderer.value && (this._isPaused ? this._pausedResizeTask.set(() => this._renderer.value?.handleResize(h, l)) : this._renderer.value.handleResize(h, l), this._fullRefresh());
        }
        handleCharSizeChanged() {
          this._renderer.value?.handleCharSizeChanged();
        }
        handleBlur() {
          this._renderer.value?.handleBlur();
        }
        handleFocus() {
          this._renderer.value?.handleFocus();
        }
        handleSelectionChanged(h, l, _) {
          this._selectionState.start = h, this._selectionState.end = l, this._selectionState.columnSelectMode = _, this._renderer.value?.handleSelectionChanged(h, l, _);
        }
        handleCursorMove() {
          this._renderer.value?.handleCursorMove();
        }
        clear() {
          this._renderer.value?.clear();
        }
      };
      s.RenderService = m = u([p(2, d.IOptionsService), p(3, g.ICharSizeService), p(4, d.IDecorationService), p(5, d.IBufferService), p(6, g.ICoreBrowserService), p(7, g.IThemeService)], m);
    }, 9312: function(c, s, a) {
      var u = this && this.__decorate || function(y, E, B, O) {
        var N, R = arguments.length, j = R < 3 ? E : O === null ? O = Object.getOwnPropertyDescriptor(E, B) : O;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") j = Reflect.decorate(y, E, B, O);
        else for (var Y = y.length - 1; Y >= 0; Y--) (N = y[Y]) && (j = (R < 3 ? N(j) : R > 3 ? N(E, B, j) : N(E, B)) || j);
        return R > 3 && j && Object.defineProperty(E, B, j), j;
      }, p = this && this.__param || function(y, E) {
        return function(B, O) {
          E(B, O, y);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.SelectionService = void 0;
      const f = a(9806), g = a(9504), v = a(456), C = a(4725), b = a(8460), d = a(844), m = a(6114), h = a(4841), l = a(511), _ = a(2585), S = " ", x = new RegExp(S, "g");
      let D = s.SelectionService = class extends d.Disposable {
        constructor(y, E, B, O, N, R, j, Y, ee) {
          super(), this._element = y, this._screenElement = E, this._linkifier = B, this._bufferService = O, this._coreService = N, this._mouseService = R, this._optionsService = j, this._renderService = Y, this._coreBrowserService = ee, this._dragScrollAmount = 0, this._enabled = !0, this._workCell = new l.CellData(), this._mouseDownTimeStamp = 0, this._oldHasSelection = !1, this._oldSelectionStart = void 0, this._oldSelectionEnd = void 0, this._onLinuxMouseSelection = this.register(new b.EventEmitter()), this.onLinuxMouseSelection = this._onLinuxMouseSelection.event, this._onRedrawRequest = this.register(new b.EventEmitter()), this.onRequestRedraw = this._onRedrawRequest.event, this._onSelectionChange = this.register(new b.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onRequestScrollLines = this.register(new b.EventEmitter()), this.onRequestScrollLines = this._onRequestScrollLines.event, this._mouseMoveListener = (ne) => this._handleMouseMove(ne), this._mouseUpListener = (ne) => this._handleMouseUp(ne), this._coreService.onUserInput(() => {
            this.hasSelection && this.clearSelection();
          }), this._trimListener = this._bufferService.buffer.lines.onTrim((ne) => this._handleTrim(ne)), this.register(this._bufferService.buffers.onBufferActivate((ne) => this._handleBufferActivate(ne))), this.enable(), this._model = new v.SelectionModel(this._bufferService), this._activeSelectionMode = 0, this.register((0, d.toDisposable)(() => {
            this._removeMouseDownListeners();
          }));
        }
        reset() {
          this.clearSelection();
        }
        disable() {
          this.clearSelection(), this._enabled = !1;
        }
        enable() {
          this._enabled = !0;
        }
        get selectionStart() {
          return this._model.finalSelectionStart;
        }
        get selectionEnd() {
          return this._model.finalSelectionEnd;
        }
        get hasSelection() {
          const y = this._model.finalSelectionStart, E = this._model.finalSelectionEnd;
          return !(!y || !E || y[0] === E[0] && y[1] === E[1]);
        }
        get selectionText() {
          const y = this._model.finalSelectionStart, E = this._model.finalSelectionEnd;
          if (!y || !E) return "";
          const B = this._bufferService.buffer, O = [];
          if (this._activeSelectionMode === 3) {
            if (y[0] === E[0]) return "";
            const N = y[0] < E[0] ? y[0] : E[0], R = y[0] < E[0] ? E[0] : y[0];
            for (let j = y[1]; j <= E[1]; j++) {
              const Y = B.translateBufferLineToString(j, !0, N, R);
              O.push(Y);
            }
          } else {
            const N = y[1] === E[1] ? E[0] : void 0;
            O.push(B.translateBufferLineToString(y[1], !0, y[0], N));
            for (let R = y[1] + 1; R <= E[1] - 1; R++) {
              const j = B.lines.get(R), Y = B.translateBufferLineToString(R, !0);
              j?.isWrapped ? O[O.length - 1] += Y : O.push(Y);
            }
            if (y[1] !== E[1]) {
              const R = B.lines.get(E[1]), j = B.translateBufferLineToString(E[1], !0, 0, E[0]);
              R && R.isWrapped ? O[O.length - 1] += j : O.push(j);
            }
          }
          return O.map((N) => N.replace(x, " ")).join(m.isWindows ? `\r
` : `
`);
        }
        clearSelection() {
          this._model.clearSelection(), this._removeMouseDownListeners(), this.refresh(), this._onSelectionChange.fire();
        }
        refresh(y) {
          this._refreshAnimationFrame || (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._refresh())), m.isLinux && y && this.selectionText.length && this._onLinuxMouseSelection.fire(this.selectionText);
        }
        _refresh() {
          this._refreshAnimationFrame = void 0, this._onRedrawRequest.fire({ start: this._model.finalSelectionStart, end: this._model.finalSelectionEnd, columnSelectMode: this._activeSelectionMode === 3 });
        }
        _isClickInSelection(y) {
          const E = this._getMouseBufferCoords(y), B = this._model.finalSelectionStart, O = this._model.finalSelectionEnd;
          return !!(B && O && E) && this._areCoordsInSelection(E, B, O);
        }
        isCellInSelection(y, E) {
          const B = this._model.finalSelectionStart, O = this._model.finalSelectionEnd;
          return !(!B || !O) && this._areCoordsInSelection([y, E], B, O);
        }
        _areCoordsInSelection(y, E, B) {
          return y[1] > E[1] && y[1] < B[1] || E[1] === B[1] && y[1] === E[1] && y[0] >= E[0] && y[0] < B[0] || E[1] < B[1] && y[1] === B[1] && y[0] < B[0] || E[1] < B[1] && y[1] === E[1] && y[0] >= E[0];
        }
        _selectWordAtCursor(y, E) {
          const B = this._linkifier.currentLink?.link?.range;
          if (B) return this._model.selectionStart = [B.start.x - 1, B.start.y - 1], this._model.selectionStartLength = (0, h.getRangeLength)(B, this._bufferService.cols), this._model.selectionEnd = void 0, !0;
          const O = this._getMouseBufferCoords(y);
          return !!O && (this._selectWordAt(O, E), this._model.selectionEnd = void 0, !0);
        }
        selectAll() {
          this._model.isSelectAllActive = !0, this.refresh(), this._onSelectionChange.fire();
        }
        selectLines(y, E) {
          this._model.clearSelection(), y = Math.max(y, 0), E = Math.min(E, this._bufferService.buffer.lines.length - 1), this._model.selectionStart = [0, y], this._model.selectionEnd = [this._bufferService.cols, E], this.refresh(), this._onSelectionChange.fire();
        }
        _handleTrim(y) {
          this._model.handleTrim(y) && this.refresh();
        }
        _getMouseBufferCoords(y) {
          const E = this._mouseService.getCoords(y, this._screenElement, this._bufferService.cols, this._bufferService.rows, !0);
          if (E) return E[0]--, E[1]--, E[1] += this._bufferService.buffer.ydisp, E;
        }
        _getMouseEventScrollAmount(y) {
          let E = (0, f.getCoordsRelativeToElement)(this._coreBrowserService.window, y, this._screenElement)[1];
          const B = this._renderService.dimensions.css.canvas.height;
          return E >= 0 && E <= B ? 0 : (E > B && (E -= B), E = Math.min(Math.max(E, -50), 50), E /= 50, E / Math.abs(E) + Math.round(14 * E));
        }
        shouldForceSelection(y) {
          return m.isMac ? y.altKey && this._optionsService.rawOptions.macOptionClickForcesSelection : y.shiftKey;
        }
        handleMouseDown(y) {
          if (this._mouseDownTimeStamp = y.timeStamp, (y.button !== 2 || !this.hasSelection) && y.button === 0) {
            if (!this._enabled) {
              if (!this.shouldForceSelection(y)) return;
              y.stopPropagation();
            }
            y.preventDefault(), this._dragScrollAmount = 0, this._enabled && y.shiftKey ? this._handleIncrementalClick(y) : y.detail === 1 ? this._handleSingleClick(y) : y.detail === 2 ? this._handleDoubleClick(y) : y.detail === 3 && this._handleTripleClick(y), this._addMouseDownListeners(), this.refresh(!0);
          }
        }
        _addMouseDownListeners() {
          this._screenElement.ownerDocument && (this._screenElement.ownerDocument.addEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.addEventListener("mouseup", this._mouseUpListener)), this._dragScrollIntervalTimer = this._coreBrowserService.window.setInterval(() => this._dragScroll(), 50);
        }
        _removeMouseDownListeners() {
          this._screenElement.ownerDocument && (this._screenElement.ownerDocument.removeEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.removeEventListener("mouseup", this._mouseUpListener)), this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer), this._dragScrollIntervalTimer = void 0;
        }
        _handleIncrementalClick(y) {
          this._model.selectionStart && (this._model.selectionEnd = this._getMouseBufferCoords(y));
        }
        _handleSingleClick(y) {
          if (this._model.selectionStartLength = 0, this._model.isSelectAllActive = !1, this._activeSelectionMode = this.shouldColumnSelect(y) ? 3 : 0, this._model.selectionStart = this._getMouseBufferCoords(y), !this._model.selectionStart) return;
          this._model.selectionEnd = void 0;
          const E = this._bufferService.buffer.lines.get(this._model.selectionStart[1]);
          E && E.length !== this._model.selectionStart[0] && E.hasWidth(this._model.selectionStart[0]) === 0 && this._model.selectionStart[0]++;
        }
        _handleDoubleClick(y) {
          this._selectWordAtCursor(y, !0) && (this._activeSelectionMode = 1);
        }
        _handleTripleClick(y) {
          const E = this._getMouseBufferCoords(y);
          E && (this._activeSelectionMode = 2, this._selectLineAt(E[1]));
        }
        shouldColumnSelect(y) {
          return y.altKey && !(m.isMac && this._optionsService.rawOptions.macOptionClickForcesSelection);
        }
        _handleMouseMove(y) {
          if (y.stopImmediatePropagation(), !this._model.selectionStart) return;
          const E = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;
          if (this._model.selectionEnd = this._getMouseBufferCoords(y), !this._model.selectionEnd) return void this.refresh(!0);
          this._activeSelectionMode === 2 ? this._model.selectionEnd[1] < this._model.selectionStart[1] ? this._model.selectionEnd[0] = 0 : this._model.selectionEnd[0] = this._bufferService.cols : this._activeSelectionMode === 1 && this._selectToWordAt(this._model.selectionEnd), this._dragScrollAmount = this._getMouseEventScrollAmount(y), this._activeSelectionMode !== 3 && (this._dragScrollAmount > 0 ? this._model.selectionEnd[0] = this._bufferService.cols : this._dragScrollAmount < 0 && (this._model.selectionEnd[0] = 0));
          const B = this._bufferService.buffer;
          if (this._model.selectionEnd[1] < B.lines.length) {
            const O = B.lines.get(this._model.selectionEnd[1]);
            O && O.hasWidth(this._model.selectionEnd[0]) === 0 && this._model.selectionEnd[0] < this._bufferService.cols && this._model.selectionEnd[0]++;
          }
          E && E[0] === this._model.selectionEnd[0] && E[1] === this._model.selectionEnd[1] || this.refresh(!0);
        }
        _dragScroll() {
          if (this._model.selectionEnd && this._model.selectionStart && this._dragScrollAmount) {
            this._onRequestScrollLines.fire({ amount: this._dragScrollAmount, suppressScrollEvent: !1 });
            const y = this._bufferService.buffer;
            this._dragScrollAmount > 0 ? (this._activeSelectionMode !== 3 && (this._model.selectionEnd[0] = this._bufferService.cols), this._model.selectionEnd[1] = Math.min(y.ydisp + this._bufferService.rows, y.lines.length - 1)) : (this._activeSelectionMode !== 3 && (this._model.selectionEnd[0] = 0), this._model.selectionEnd[1] = y.ydisp), this.refresh();
          }
        }
        _handleMouseUp(y) {
          const E = y.timeStamp - this._mouseDownTimeStamp;
          if (this._removeMouseDownListeners(), this.selectionText.length <= 1 && E < 500 && y.altKey && this._optionsService.rawOptions.altClickMovesCursor) {
            if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
              const B = this._mouseService.getCoords(y, this._element, this._bufferService.cols, this._bufferService.rows, !1);
              if (B && B[0] !== void 0 && B[1] !== void 0) {
                const O = (0, g.moveToCellSequence)(B[0] - 1, B[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
                this._coreService.triggerDataEvent(O, !0);
              }
            }
          } else this._fireEventIfSelectionChanged();
        }
        _fireEventIfSelectionChanged() {
          const y = this._model.finalSelectionStart, E = this._model.finalSelectionEnd, B = !(!y || !E || y[0] === E[0] && y[1] === E[1]);
          B ? y && E && (this._oldSelectionStart && this._oldSelectionEnd && y[0] === this._oldSelectionStart[0] && y[1] === this._oldSelectionStart[1] && E[0] === this._oldSelectionEnd[0] && E[1] === this._oldSelectionEnd[1] || this._fireOnSelectionChange(y, E, B)) : this._oldHasSelection && this._fireOnSelectionChange(y, E, B);
        }
        _fireOnSelectionChange(y, E, B) {
          this._oldSelectionStart = y, this._oldSelectionEnd = E, this._oldHasSelection = B, this._onSelectionChange.fire();
        }
        _handleBufferActivate(y) {
          this.clearSelection(), this._trimListener.dispose(), this._trimListener = y.activeBuffer.lines.onTrim((E) => this._handleTrim(E));
        }
        _convertViewportColToCharacterIndex(y, E) {
          let B = E;
          for (let O = 0; E >= O; O++) {
            const N = y.loadCell(O, this._workCell).getChars().length;
            this._workCell.getWidth() === 0 ? B-- : N > 1 && E !== O && (B += N - 1);
          }
          return B;
        }
        setSelection(y, E, B) {
          this._model.clearSelection(), this._removeMouseDownListeners(), this._model.selectionStart = [y, E], this._model.selectionStartLength = B, this.refresh(), this._fireEventIfSelectionChanged();
        }
        rightClickSelect(y) {
          this._isClickInSelection(y) || (this._selectWordAtCursor(y, !1) && this.refresh(!0), this._fireEventIfSelectionChanged());
        }
        _getWordAt(y, E, B = !0, O = !0) {
          if (y[0] >= this._bufferService.cols) return;
          const N = this._bufferService.buffer, R = N.lines.get(y[1]);
          if (!R) return;
          const j = N.translateBufferLineToString(y[1], !1);
          let Y = this._convertViewportColToCharacterIndex(R, y[0]), ee = Y;
          const ne = y[0] - Y;
          let Z = 0, T = 0, L = 0, I = 0;
          if (j.charAt(Y) === " ") {
            for (; Y > 0 && j.charAt(Y - 1) === " "; ) Y--;
            for (; ee < j.length && j.charAt(ee + 1) === " "; ) ee++;
          } else {
            let re = y[0], V = y[0];
            R.getWidth(re) === 0 && (Z++, re--), R.getWidth(V) === 2 && (T++, V++);
            const ue = R.getString(V).length;
            for (ue > 1 && (I += ue - 1, ee += ue - 1); re > 0 && Y > 0 && !this._isCharWordSeparator(R.loadCell(re - 1, this._workCell)); ) {
              R.loadCell(re - 1, this._workCell);
              const W = this._workCell.getChars().length;
              this._workCell.getWidth() === 0 ? (Z++, re--) : W > 1 && (L += W - 1, Y -= W - 1), Y--, re--;
            }
            for (; V < R.length && ee + 1 < j.length && !this._isCharWordSeparator(R.loadCell(V + 1, this._workCell)); ) {
              R.loadCell(V + 1, this._workCell);
              const W = this._workCell.getChars().length;
              this._workCell.getWidth() === 2 ? (T++, V++) : W > 1 && (I += W - 1, ee += W - 1), ee++, V++;
            }
          }
          ee++;
          let H = Y + ne - Z + L, K = Math.min(this._bufferService.cols, ee - Y + Z + T - L - I);
          if (E || j.slice(Y, ee).trim() !== "") {
            if (B && H === 0 && R.getCodePoint(0) !== 32) {
              const re = N.lines.get(y[1] - 1);
              if (re && R.isWrapped && re.getCodePoint(this._bufferService.cols - 1) !== 32) {
                const V = this._getWordAt([this._bufferService.cols - 1, y[1] - 1], !1, !0, !1);
                if (V) {
                  const ue = this._bufferService.cols - V.start;
                  H -= ue, K += ue;
                }
              }
            }
            if (O && H + K === this._bufferService.cols && R.getCodePoint(this._bufferService.cols - 1) !== 32) {
              const re = N.lines.get(y[1] + 1);
              if (re?.isWrapped && re.getCodePoint(0) !== 32) {
                const V = this._getWordAt([0, y[1] + 1], !1, !1, !0);
                V && (K += V.length);
              }
            }
            return { start: H, length: K };
          }
        }
        _selectWordAt(y, E) {
          const B = this._getWordAt(y, E);
          if (B) {
            for (; B.start < 0; ) B.start += this._bufferService.cols, y[1]--;
            this._model.selectionStart = [B.start, y[1]], this._model.selectionStartLength = B.length;
          }
        }
        _selectToWordAt(y) {
          const E = this._getWordAt(y, !0);
          if (E) {
            let B = y[1];
            for (; E.start < 0; ) E.start += this._bufferService.cols, B--;
            if (!this._model.areSelectionValuesReversed()) for (; E.start + E.length > this._bufferService.cols; ) E.length -= this._bufferService.cols, B++;
            this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? E.start : E.start + E.length, B];
          }
        }
        _isCharWordSeparator(y) {
          return y.getWidth() !== 0 && this._optionsService.rawOptions.wordSeparator.indexOf(y.getChars()) >= 0;
        }
        _selectLineAt(y) {
          const E = this._bufferService.buffer.getWrappedRangeForLine(y), B = { start: { x: 0, y: E.first }, end: { x: this._bufferService.cols - 1, y: E.last } };
          this._model.selectionStart = [0, E.first], this._model.selectionEnd = void 0, this._model.selectionStartLength = (0, h.getRangeLength)(B, this._bufferService.cols);
        }
      };
      s.SelectionService = D = u([p(3, _.IBufferService), p(4, _.ICoreService), p(5, C.IMouseService), p(6, _.IOptionsService), p(7, C.IRenderService), p(8, C.ICoreBrowserService)], D);
    }, 4725: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.ILinkProviderService = s.IThemeService = s.ICharacterJoinerService = s.ISelectionService = s.IRenderService = s.IMouseService = s.ICoreBrowserService = s.ICharSizeService = void 0;
      const u = a(8343);
      s.ICharSizeService = (0, u.createDecorator)("CharSizeService"), s.ICoreBrowserService = (0, u.createDecorator)("CoreBrowserService"), s.IMouseService = (0, u.createDecorator)("MouseService"), s.IRenderService = (0, u.createDecorator)("RenderService"), s.ISelectionService = (0, u.createDecorator)("SelectionService"), s.ICharacterJoinerService = (0, u.createDecorator)("CharacterJoinerService"), s.IThemeService = (0, u.createDecorator)("ThemeService"), s.ILinkProviderService = (0, u.createDecorator)("LinkProviderService");
    }, 6731: function(c, s, a) {
      var u = this && this.__decorate || function(D, y, E, B) {
        var O, N = arguments.length, R = N < 3 ? y : B === null ? B = Object.getOwnPropertyDescriptor(y, E) : B;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") R = Reflect.decorate(D, y, E, B);
        else for (var j = D.length - 1; j >= 0; j--) (O = D[j]) && (R = (N < 3 ? O(R) : N > 3 ? O(y, E, R) : O(y, E)) || R);
        return N > 3 && R && Object.defineProperty(y, E, R), R;
      }, p = this && this.__param || function(D, y) {
        return function(E, B) {
          y(E, B, D);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.ThemeService = s.DEFAULT_ANSI_COLORS = void 0;
      const f = a(7239), g = a(8055), v = a(8460), C = a(844), b = a(2585), d = g.css.toColor("#ffffff"), m = g.css.toColor("#000000"), h = g.css.toColor("#ffffff"), l = g.css.toColor("#000000"), _ = { css: "rgba(255, 255, 255, 0.3)", rgba: 4294967117 };
      s.DEFAULT_ANSI_COLORS = Object.freeze((() => {
        const D = [g.css.toColor("#2e3436"), g.css.toColor("#cc0000"), g.css.toColor("#4e9a06"), g.css.toColor("#c4a000"), g.css.toColor("#3465a4"), g.css.toColor("#75507b"), g.css.toColor("#06989a"), g.css.toColor("#d3d7cf"), g.css.toColor("#555753"), g.css.toColor("#ef2929"), g.css.toColor("#8ae234"), g.css.toColor("#fce94f"), g.css.toColor("#729fcf"), g.css.toColor("#ad7fa8"), g.css.toColor("#34e2e2"), g.css.toColor("#eeeeec")], y = [0, 95, 135, 175, 215, 255];
        for (let E = 0; E < 216; E++) {
          const B = y[E / 36 % 6 | 0], O = y[E / 6 % 6 | 0], N = y[E % 6];
          D.push({ css: g.channels.toCss(B, O, N), rgba: g.channels.toRgba(B, O, N) });
        }
        for (let E = 0; E < 24; E++) {
          const B = 8 + 10 * E;
          D.push({ css: g.channels.toCss(B, B, B), rgba: g.channels.toRgba(B, B, B) });
        }
        return D;
      })());
      let S = s.ThemeService = class extends C.Disposable {
        get colors() {
          return this._colors;
        }
        constructor(D) {
          super(), this._optionsService = D, this._contrastCache = new f.ColorContrastCache(), this._halfContrastCache = new f.ColorContrastCache(), this._onChangeColors = this.register(new v.EventEmitter()), this.onChangeColors = this._onChangeColors.event, this._colors = { foreground: d, background: m, cursor: h, cursorAccent: l, selectionForeground: void 0, selectionBackgroundTransparent: _, selectionBackgroundOpaque: g.color.blend(m, _), selectionInactiveBackgroundTransparent: _, selectionInactiveBackgroundOpaque: g.color.blend(m, _), ansi: s.DEFAULT_ANSI_COLORS.slice(), contrastCache: this._contrastCache, halfContrastCache: this._halfContrastCache }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this.register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme)));
        }
        _setTheme(D = {}) {
          const y = this._colors;
          if (y.foreground = x(D.foreground, d), y.background = x(D.background, m), y.cursor = x(D.cursor, h), y.cursorAccent = x(D.cursorAccent, l), y.selectionBackgroundTransparent = x(D.selectionBackground, _), y.selectionBackgroundOpaque = g.color.blend(y.background, y.selectionBackgroundTransparent), y.selectionInactiveBackgroundTransparent = x(D.selectionInactiveBackground, y.selectionBackgroundTransparent), y.selectionInactiveBackgroundOpaque = g.color.blend(y.background, y.selectionInactiveBackgroundTransparent), y.selectionForeground = D.selectionForeground ? x(D.selectionForeground, g.NULL_COLOR) : void 0, y.selectionForeground === g.NULL_COLOR && (y.selectionForeground = void 0), g.color.isOpaque(y.selectionBackgroundTransparent) && (y.selectionBackgroundTransparent = g.color.opacity(y.selectionBackgroundTransparent, 0.3)), g.color.isOpaque(y.selectionInactiveBackgroundTransparent) && (y.selectionInactiveBackgroundTransparent = g.color.opacity(y.selectionInactiveBackgroundTransparent, 0.3)), y.ansi = s.DEFAULT_ANSI_COLORS.slice(), y.ansi[0] = x(D.black, s.DEFAULT_ANSI_COLORS[0]), y.ansi[1] = x(D.red, s.DEFAULT_ANSI_COLORS[1]), y.ansi[2] = x(D.green, s.DEFAULT_ANSI_COLORS[2]), y.ansi[3] = x(D.yellow, s.DEFAULT_ANSI_COLORS[3]), y.ansi[4] = x(D.blue, s.DEFAULT_ANSI_COLORS[4]), y.ansi[5] = x(D.magenta, s.DEFAULT_ANSI_COLORS[5]), y.ansi[6] = x(D.cyan, s.DEFAULT_ANSI_COLORS[6]), y.ansi[7] = x(D.white, s.DEFAULT_ANSI_COLORS[7]), y.ansi[8] = x(D.brightBlack, s.DEFAULT_ANSI_COLORS[8]), y.ansi[9] = x(D.brightRed, s.DEFAULT_ANSI_COLORS[9]), y.ansi[10] = x(D.brightGreen, s.DEFAULT_ANSI_COLORS[10]), y.ansi[11] = x(D.brightYellow, s.DEFAULT_ANSI_COLORS[11]), y.ansi[12] = x(D.brightBlue, s.DEFAULT_ANSI_COLORS[12]), y.ansi[13] = x(D.brightMagenta, s.DEFAULT_ANSI_COLORS[13]), y.ansi[14] = x(D.brightCyan, s.DEFAULT_ANSI_COLORS[14]), y.ansi[15] = x(D.brightWhite, s.DEFAULT_ANSI_COLORS[15]), D.extendedAnsi) {
            const E = Math.min(y.ansi.length - 16, D.extendedAnsi.length);
            for (let B = 0; B < E; B++) y.ansi[B + 16] = x(D.extendedAnsi[B], s.DEFAULT_ANSI_COLORS[B + 16]);
          }
          this._contrastCache.clear(), this._halfContrastCache.clear(), this._updateRestoreColors(), this._onChangeColors.fire(this.colors);
        }
        restoreColor(D) {
          this._restoreColor(D), this._onChangeColors.fire(this.colors);
        }
        _restoreColor(D) {
          if (D !== void 0) switch (D) {
            case 256:
              this._colors.foreground = this._restoreColors.foreground;
              break;
            case 257:
              this._colors.background = this._restoreColors.background;
              break;
            case 258:
              this._colors.cursor = this._restoreColors.cursor;
              break;
            default:
              this._colors.ansi[D] = this._restoreColors.ansi[D];
          }
          else for (let y = 0; y < this._restoreColors.ansi.length; ++y) this._colors.ansi[y] = this._restoreColors.ansi[y];
        }
        modifyColors(D) {
          D(this._colors), this._onChangeColors.fire(this.colors);
        }
        _updateRestoreColors() {
          this._restoreColors = { foreground: this._colors.foreground, background: this._colors.background, cursor: this._colors.cursor, ansi: this._colors.ansi.slice() };
        }
      };
      function x(D, y) {
        if (D !== void 0) try {
          return g.css.toColor(D);
        } catch {
        }
        return y;
      }
      s.ThemeService = S = u([p(0, b.IOptionsService)], S);
    }, 6349: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CircularList = void 0;
      const u = a(8460), p = a(844);
      class f extends p.Disposable {
        constructor(v) {
          super(), this._maxLength = v, this.onDeleteEmitter = this.register(new u.EventEmitter()), this.onDelete = this.onDeleteEmitter.event, this.onInsertEmitter = this.register(new u.EventEmitter()), this.onInsert = this.onInsertEmitter.event, this.onTrimEmitter = this.register(new u.EventEmitter()), this.onTrim = this.onTrimEmitter.event, this._array = new Array(this._maxLength), this._startIndex = 0, this._length = 0;
        }
        get maxLength() {
          return this._maxLength;
        }
        set maxLength(v) {
          if (this._maxLength === v) return;
          const C = new Array(v);
          for (let b = 0; b < Math.min(v, this.length); b++) C[b] = this._array[this._getCyclicIndex(b)];
          this._array = C, this._maxLength = v, this._startIndex = 0;
        }
        get length() {
          return this._length;
        }
        set length(v) {
          if (v > this._length) for (let C = this._length; C < v; C++) this._array[C] = void 0;
          this._length = v;
        }
        get(v) {
          return this._array[this._getCyclicIndex(v)];
        }
        set(v, C) {
          this._array[this._getCyclicIndex(v)] = C;
        }
        push(v) {
          this._array[this._getCyclicIndex(this._length)] = v, this._length === this._maxLength ? (this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1)) : this._length++;
        }
        recycle() {
          if (this._length !== this._maxLength) throw new Error("Can only recycle when the buffer is full");
          return this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1), this._array[this._getCyclicIndex(this._length - 1)];
        }
        get isFull() {
          return this._length === this._maxLength;
        }
        pop() {
          return this._array[this._getCyclicIndex(this._length-- - 1)];
        }
        splice(v, C, ...b) {
          if (C) {
            for (let d = v; d < this._length - C; d++) this._array[this._getCyclicIndex(d)] = this._array[this._getCyclicIndex(d + C)];
            this._length -= C, this.onDeleteEmitter.fire({ index: v, amount: C });
          }
          for (let d = this._length - 1; d >= v; d--) this._array[this._getCyclicIndex(d + b.length)] = this._array[this._getCyclicIndex(d)];
          for (let d = 0; d < b.length; d++) this._array[this._getCyclicIndex(v + d)] = b[d];
          if (b.length && this.onInsertEmitter.fire({ index: v, amount: b.length }), this._length + b.length > this._maxLength) {
            const d = this._length + b.length - this._maxLength;
            this._startIndex += d, this._length = this._maxLength, this.onTrimEmitter.fire(d);
          } else this._length += b.length;
        }
        trimStart(v) {
          v > this._length && (v = this._length), this._startIndex += v, this._length -= v, this.onTrimEmitter.fire(v);
        }
        shiftElements(v, C, b) {
          if (!(C <= 0)) {
            if (v < 0 || v >= this._length) throw new Error("start argument out of range");
            if (v + b < 0) throw new Error("Cannot shift elements in list beyond index 0");
            if (b > 0) {
              for (let m = C - 1; m >= 0; m--) this.set(v + m + b, this.get(v + m));
              const d = v + C + b - this._length;
              if (d > 0) for (this._length += d; this._length > this._maxLength; ) this._length--, this._startIndex++, this.onTrimEmitter.fire(1);
            } else for (let d = 0; d < C; d++) this.set(v + d + b, this.get(v + d));
          }
        }
        _getCyclicIndex(v) {
          return (this._startIndex + v) % this._maxLength;
        }
      }
      s.CircularList = f;
    }, 1439: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.clone = void 0, s.clone = function a(u, p = 5) {
        if (typeof u != "object") return u;
        const f = Array.isArray(u) ? [] : {};
        for (const g in u) f[g] = p <= 1 ? u[g] : u[g] && a(u[g], p - 1);
        return f;
      };
    }, 8055: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.contrastRatio = s.toPaddedHex = s.rgba = s.rgb = s.css = s.color = s.channels = s.NULL_COLOR = void 0;
      let a = 0, u = 0, p = 0, f = 0;
      var g, v, C, b, d;
      function m(l) {
        const _ = l.toString(16);
        return _.length < 2 ? "0" + _ : _;
      }
      function h(l, _) {
        return l < _ ? (_ + 0.05) / (l + 0.05) : (l + 0.05) / (_ + 0.05);
      }
      s.NULL_COLOR = { css: "#00000000", rgba: 0 }, function(l) {
        l.toCss = function(_, S, x, D) {
          return D !== void 0 ? `#${m(_)}${m(S)}${m(x)}${m(D)}` : `#${m(_)}${m(S)}${m(x)}`;
        }, l.toRgba = function(_, S, x, D = 255) {
          return (_ << 24 | S << 16 | x << 8 | D) >>> 0;
        }, l.toColor = function(_, S, x, D) {
          return { css: l.toCss(_, S, x, D), rgba: l.toRgba(_, S, x, D) };
        };
      }(g || (s.channels = g = {})), function(l) {
        function _(S, x) {
          return f = Math.round(255 * x), [a, u, p] = d.toChannels(S.rgba), { css: g.toCss(a, u, p, f), rgba: g.toRgba(a, u, p, f) };
        }
        l.blend = function(S, x) {
          if (f = (255 & x.rgba) / 255, f === 1) return { css: x.css, rgba: x.rgba };
          const D = x.rgba >> 24 & 255, y = x.rgba >> 16 & 255, E = x.rgba >> 8 & 255, B = S.rgba >> 24 & 255, O = S.rgba >> 16 & 255, N = S.rgba >> 8 & 255;
          return a = B + Math.round((D - B) * f), u = O + Math.round((y - O) * f), p = N + Math.round((E - N) * f), { css: g.toCss(a, u, p), rgba: g.toRgba(a, u, p) };
        }, l.isOpaque = function(S) {
          return (255 & S.rgba) == 255;
        }, l.ensureContrastRatio = function(S, x, D) {
          const y = d.ensureContrastRatio(S.rgba, x.rgba, D);
          if (y) return g.toColor(y >> 24 & 255, y >> 16 & 255, y >> 8 & 255);
        }, l.opaque = function(S) {
          const x = (255 | S.rgba) >>> 0;
          return [a, u, p] = d.toChannels(x), { css: g.toCss(a, u, p), rgba: x };
        }, l.opacity = _, l.multiplyOpacity = function(S, x) {
          return f = 255 & S.rgba, _(S, f * x / 255);
        }, l.toColorRGB = function(S) {
          return [S.rgba >> 24 & 255, S.rgba >> 16 & 255, S.rgba >> 8 & 255];
        };
      }(v || (s.color = v = {})), function(l) {
        let _, S;
        try {
          const x = document.createElement("canvas");
          x.width = 1, x.height = 1;
          const D = x.getContext("2d", { willReadFrequently: !0 });
          D && (_ = D, _.globalCompositeOperation = "copy", S = _.createLinearGradient(0, 0, 1, 1));
        } catch {
        }
        l.toColor = function(x) {
          if (x.match(/#[\da-f]{3,8}/i)) switch (x.length) {
            case 4:
              return a = parseInt(x.slice(1, 2).repeat(2), 16), u = parseInt(x.slice(2, 3).repeat(2), 16), p = parseInt(x.slice(3, 4).repeat(2), 16), g.toColor(a, u, p);
            case 5:
              return a = parseInt(x.slice(1, 2).repeat(2), 16), u = parseInt(x.slice(2, 3).repeat(2), 16), p = parseInt(x.slice(3, 4).repeat(2), 16), f = parseInt(x.slice(4, 5).repeat(2), 16), g.toColor(a, u, p, f);
            case 7:
              return { css: x, rgba: (parseInt(x.slice(1), 16) << 8 | 255) >>> 0 };
            case 9:
              return { css: x, rgba: parseInt(x.slice(1), 16) >>> 0 };
          }
          const D = x.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
          if (D) return a = parseInt(D[1]), u = parseInt(D[2]), p = parseInt(D[3]), f = Math.round(255 * (D[5] === void 0 ? 1 : parseFloat(D[5]))), g.toColor(a, u, p, f);
          if (!_ || !S) throw new Error("css.toColor: Unsupported css format");
          if (_.fillStyle = S, _.fillStyle = x, typeof _.fillStyle != "string") throw new Error("css.toColor: Unsupported css format");
          if (_.fillRect(0, 0, 1, 1), [a, u, p, f] = _.getImageData(0, 0, 1, 1).data, f !== 255) throw new Error("css.toColor: Unsupported css format");
          return { rgba: g.toRgba(a, u, p, f), css: x };
        };
      }(C || (s.css = C = {})), function(l) {
        function _(S, x, D) {
          const y = S / 255, E = x / 255, B = D / 255;
          return 0.2126 * (y <= 0.03928 ? y / 12.92 : Math.pow((y + 0.055) / 1.055, 2.4)) + 0.7152 * (E <= 0.03928 ? E / 12.92 : Math.pow((E + 0.055) / 1.055, 2.4)) + 0.0722 * (B <= 0.03928 ? B / 12.92 : Math.pow((B + 0.055) / 1.055, 2.4));
        }
        l.relativeLuminance = function(S) {
          return _(S >> 16 & 255, S >> 8 & 255, 255 & S);
        }, l.relativeLuminance2 = _;
      }(b || (s.rgb = b = {})), function(l) {
        function _(x, D, y) {
          const E = x >> 24 & 255, B = x >> 16 & 255, O = x >> 8 & 255;
          let N = D >> 24 & 255, R = D >> 16 & 255, j = D >> 8 & 255, Y = h(b.relativeLuminance2(N, R, j), b.relativeLuminance2(E, B, O));
          for (; Y < y && (N > 0 || R > 0 || j > 0); ) N -= Math.max(0, Math.ceil(0.1 * N)), R -= Math.max(0, Math.ceil(0.1 * R)), j -= Math.max(0, Math.ceil(0.1 * j)), Y = h(b.relativeLuminance2(N, R, j), b.relativeLuminance2(E, B, O));
          return (N << 24 | R << 16 | j << 8 | 255) >>> 0;
        }
        function S(x, D, y) {
          const E = x >> 24 & 255, B = x >> 16 & 255, O = x >> 8 & 255;
          let N = D >> 24 & 255, R = D >> 16 & 255, j = D >> 8 & 255, Y = h(b.relativeLuminance2(N, R, j), b.relativeLuminance2(E, B, O));
          for (; Y < y && (N < 255 || R < 255 || j < 255); ) N = Math.min(255, N + Math.ceil(0.1 * (255 - N))), R = Math.min(255, R + Math.ceil(0.1 * (255 - R))), j = Math.min(255, j + Math.ceil(0.1 * (255 - j))), Y = h(b.relativeLuminance2(N, R, j), b.relativeLuminance2(E, B, O));
          return (N << 24 | R << 16 | j << 8 | 255) >>> 0;
        }
        l.blend = function(x, D) {
          if (f = (255 & D) / 255, f === 1) return D;
          const y = D >> 24 & 255, E = D >> 16 & 255, B = D >> 8 & 255, O = x >> 24 & 255, N = x >> 16 & 255, R = x >> 8 & 255;
          return a = O + Math.round((y - O) * f), u = N + Math.round((E - N) * f), p = R + Math.round((B - R) * f), g.toRgba(a, u, p);
        }, l.ensureContrastRatio = function(x, D, y) {
          const E = b.relativeLuminance(x >> 8), B = b.relativeLuminance(D >> 8);
          if (h(E, B) < y) {
            if (B < E) {
              const R = _(x, D, y), j = h(E, b.relativeLuminance(R >> 8));
              if (j < y) {
                const Y = S(x, D, y);
                return j > h(E, b.relativeLuminance(Y >> 8)) ? R : Y;
              }
              return R;
            }
            const O = S(x, D, y), N = h(E, b.relativeLuminance(O >> 8));
            if (N < y) {
              const R = _(x, D, y);
              return N > h(E, b.relativeLuminance(R >> 8)) ? O : R;
            }
            return O;
          }
        }, l.reduceLuminance = _, l.increaseLuminance = S, l.toChannels = function(x) {
          return [x >> 24 & 255, x >> 16 & 255, x >> 8 & 255, 255 & x];
        };
      }(d || (s.rgba = d = {})), s.toPaddedHex = m, s.contrastRatio = h;
    }, 8969: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CoreTerminal = void 0;
      const u = a(844), p = a(2585), f = a(4348), g = a(7866), v = a(744), C = a(7302), b = a(6975), d = a(8460), m = a(1753), h = a(1480), l = a(7994), _ = a(9282), S = a(5435), x = a(5981), D = a(2660);
      let y = !1;
      class E extends u.Disposable {
        get onScroll() {
          return this._onScrollApi || (this._onScrollApi = this.register(new d.EventEmitter()), this._onScroll.event((O) => {
            this._onScrollApi?.fire(O.position);
          })), this._onScrollApi.event;
        }
        get cols() {
          return this._bufferService.cols;
        }
        get rows() {
          return this._bufferService.rows;
        }
        get buffers() {
          return this._bufferService.buffers;
        }
        get options() {
          return this.optionsService.options;
        }
        set options(O) {
          for (const N in O) this.optionsService.options[N] = O[N];
        }
        constructor(O) {
          super(), this._windowsWrappingHeuristics = this.register(new u.MutableDisposable()), this._onBinary = this.register(new d.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new d.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new d.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new d.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new d.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new d.EventEmitter()), this._instantiationService = new f.InstantiationService(), this.optionsService = this.register(new C.OptionsService(O)), this._instantiationService.setService(p.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(v.BufferService)), this._instantiationService.setService(p.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(g.LogService)), this._instantiationService.setService(p.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(b.CoreService)), this._instantiationService.setService(p.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(m.CoreMouseService)), this._instantiationService.setService(p.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(h.UnicodeService)), this._instantiationService.setService(p.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(l.CharsetService), this._instantiationService.setService(p.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(D.OscLinkService), this._instantiationService.setService(p.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new S.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, d.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, d.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, d.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, d.forwardEvent)(this.coreService.onBinary, this._onBinary)), this.register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom())), this.register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this.register(this.optionsService.onMultipleOptionChange(["windowsMode", "windowsPty"], () => this._handleWindowsPtyOptionChange())), this.register(this._bufferService.onScroll((N) => {
            this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
          })), this.register(this._inputHandler.onScroll((N) => {
            this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
          })), this._writeBuffer = this.register(new x.WriteBuffer((N, R) => this._inputHandler.parse(N, R))), this.register((0, d.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed));
        }
        write(O, N) {
          this._writeBuffer.write(O, N);
        }
        writeSync(O, N) {
          this._logService.logLevel <= p.LogLevelEnum.WARN && !y && (this._logService.warn("writeSync is unreliable and will be removed soon."), y = !0), this._writeBuffer.writeSync(O, N);
        }
        input(O, N = !0) {
          this.coreService.triggerDataEvent(O, N);
        }
        resize(O, N) {
          isNaN(O) || isNaN(N) || (O = Math.max(O, v.MINIMUM_COLS), N = Math.max(N, v.MINIMUM_ROWS), this._bufferService.resize(O, N));
        }
        scroll(O, N = !1) {
          this._bufferService.scroll(O, N);
        }
        scrollLines(O, N, R) {
          this._bufferService.scrollLines(O, N, R);
        }
        scrollPages(O) {
          this.scrollLines(O * (this.rows - 1));
        }
        scrollToTop() {
          this.scrollLines(-this._bufferService.buffer.ydisp);
        }
        scrollToBottom() {
          this.scrollLines(this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
        }
        scrollToLine(O) {
          const N = O - this._bufferService.buffer.ydisp;
          N !== 0 && this.scrollLines(N);
        }
        registerEscHandler(O, N) {
          return this._inputHandler.registerEscHandler(O, N);
        }
        registerDcsHandler(O, N) {
          return this._inputHandler.registerDcsHandler(O, N);
        }
        registerCsiHandler(O, N) {
          return this._inputHandler.registerCsiHandler(O, N);
        }
        registerOscHandler(O, N) {
          return this._inputHandler.registerOscHandler(O, N);
        }
        _setup() {
          this._handleWindowsPtyOptionChange();
        }
        reset() {
          this._inputHandler.reset(), this._bufferService.reset(), this._charsetService.reset(), this.coreService.reset(), this.coreMouseService.reset();
        }
        _handleWindowsPtyOptionChange() {
          let O = !1;
          const N = this.optionsService.rawOptions.windowsPty;
          N && N.buildNumber !== void 0 && N.buildNumber !== void 0 ? O = N.backend === "conpty" && N.buildNumber < 21376 : this.optionsService.rawOptions.windowsMode && (O = !0), O ? this._enableWindowsWrappingHeuristics() : this._windowsWrappingHeuristics.clear();
        }
        _enableWindowsWrappingHeuristics() {
          if (!this._windowsWrappingHeuristics.value) {
            const O = [];
            O.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null, this._bufferService))), O.push(this.registerCsiHandler({ final: "H" }, () => ((0, _.updateWindowsModeWrappedState)(this._bufferService), !1))), this._windowsWrappingHeuristics.value = (0, u.toDisposable)(() => {
              for (const N of O) N.dispose();
            });
          }
        }
      }
      s.CoreTerminal = E;
    }, 8460: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.runAndSubscribe = s.forwardEvent = s.EventEmitter = void 0, s.EventEmitter = class {
        constructor() {
          this._listeners = [], this._disposed = !1;
        }
        get event() {
          return this._event || (this._event = (a) => (this._listeners.push(a), { dispose: () => {
            if (!this._disposed) {
              for (let u = 0; u < this._listeners.length; u++) if (this._listeners[u] === a) return void this._listeners.splice(u, 1);
            }
          } })), this._event;
        }
        fire(a, u) {
          const p = [];
          for (let f = 0; f < this._listeners.length; f++) p.push(this._listeners[f]);
          for (let f = 0; f < p.length; f++) p[f].call(void 0, a, u);
        }
        dispose() {
          this.clearListeners(), this._disposed = !0;
        }
        clearListeners() {
          this._listeners && (this._listeners.length = 0);
        }
      }, s.forwardEvent = function(a, u) {
        return a((p) => u.fire(p));
      }, s.runAndSubscribe = function(a, u) {
        return u(void 0), a((p) => u(p));
      };
    }, 5435: function(c, s, a) {
      var u = this && this.__decorate || function(Z, T, L, I) {
        var H, K = arguments.length, re = K < 3 ? T : I === null ? I = Object.getOwnPropertyDescriptor(T, L) : I;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") re = Reflect.decorate(Z, T, L, I);
        else for (var V = Z.length - 1; V >= 0; V--) (H = Z[V]) && (re = (K < 3 ? H(re) : K > 3 ? H(T, L, re) : H(T, L)) || re);
        return K > 3 && re && Object.defineProperty(T, L, re), re;
      }, p = this && this.__param || function(Z, T) {
        return function(L, I) {
          T(L, I, Z);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.InputHandler = s.WindowsOptionsReportType = void 0;
      const f = a(2584), g = a(7116), v = a(2015), C = a(844), b = a(482), d = a(8437), m = a(8460), h = a(643), l = a(511), _ = a(3734), S = a(2585), x = a(1480), D = a(6242), y = a(6351), E = a(5941), B = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, O = 131072;
      function N(Z, T) {
        if (Z > 24) return T.setWinLines || !1;
        switch (Z) {
          case 1:
            return !!T.restoreWin;
          case 2:
            return !!T.minimizeWin;
          case 3:
            return !!T.setWinPosition;
          case 4:
            return !!T.setWinSizePixels;
          case 5:
            return !!T.raiseWin;
          case 6:
            return !!T.lowerWin;
          case 7:
            return !!T.refreshWin;
          case 8:
            return !!T.setWinSizeChars;
          case 9:
            return !!T.maximizeWin;
          case 10:
            return !!T.fullscreenWin;
          case 11:
            return !!T.getWinState;
          case 13:
            return !!T.getWinPosition;
          case 14:
            return !!T.getWinSizePixels;
          case 15:
            return !!T.getScreenSizePixels;
          case 16:
            return !!T.getCellSizePixels;
          case 18:
            return !!T.getWinSizeChars;
          case 19:
            return !!T.getScreenSizeChars;
          case 20:
            return !!T.getIconTitle;
          case 21:
            return !!T.getWinTitle;
          case 22:
            return !!T.pushTitle;
          case 23:
            return !!T.popTitle;
          case 24:
            return !!T.setWinLines;
        }
        return !1;
      }
      var R;
      (function(Z) {
        Z[Z.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", Z[Z.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
      })(R || (s.WindowsOptionsReportType = R = {}));
      let j = 0;
      class Y extends C.Disposable {
        getAttrData() {
          return this._curAttrData;
        }
        constructor(T, L, I, H, K, re, V, ue, W = new v.EscapeSequenceParser()) {
          super(), this._bufferService = T, this._charsetService = L, this._coreService = I, this._logService = H, this._optionsService = K, this._oscLinkService = re, this._coreMouseService = V, this._unicodeService = ue, this._parser = W, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new b.StringToUtf32(), this._utf8Decoder = new b.Utf8ToUtf32(), this._workCell = new l.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = d.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = d.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new m.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new m.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new m.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new m.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new m.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new m.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new m.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new m.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new m.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new m.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new m.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new m.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new m.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: !1, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new ee(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate((F) => this._activeBuffer = F.activeBuffer)), this._parser.setCsiHandlerFallback((F, X) => {
            this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(F), params: X.toArray() });
          }), this._parser.setEscHandlerFallback((F) => {
            this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(F) });
          }), this._parser.setExecuteHandlerFallback((F) => {
            this._logService.debug("Unknown EXECUTE code: ", { code: F });
          }), this._parser.setOscHandlerFallback((F, X, J) => {
            this._logService.debug("Unknown OSC code: ", { identifier: F, action: X, data: J });
          }), this._parser.setDcsHandlerFallback((F, X, J) => {
            X === "HOOK" && (J = J.toArray()), this._logService.debug("Unknown DCS code: ", { identifier: this._parser.identToString(F), action: X, payload: J });
          }), this._parser.setPrintHandler((F, X, J) => this.print(F, X, J)), this._parser.registerCsiHandler({ final: "@" }, (F) => this.insertChars(F)), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, (F) => this.scrollLeft(F)), this._parser.registerCsiHandler({ final: "A" }, (F) => this.cursorUp(F)), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, (F) => this.scrollRight(F)), this._parser.registerCsiHandler({ final: "B" }, (F) => this.cursorDown(F)), this._parser.registerCsiHandler({ final: "C" }, (F) => this.cursorForward(F)), this._parser.registerCsiHandler({ final: "D" }, (F) => this.cursorBackward(F)), this._parser.registerCsiHandler({ final: "E" }, (F) => this.cursorNextLine(F)), this._parser.registerCsiHandler({ final: "F" }, (F) => this.cursorPrecedingLine(F)), this._parser.registerCsiHandler({ final: "G" }, (F) => this.cursorCharAbsolute(F)), this._parser.registerCsiHandler({ final: "H" }, (F) => this.cursorPosition(F)), this._parser.registerCsiHandler({ final: "I" }, (F) => this.cursorForwardTab(F)), this._parser.registerCsiHandler({ final: "J" }, (F) => this.eraseInDisplay(F, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, (F) => this.eraseInDisplay(F, !0)), this._parser.registerCsiHandler({ final: "K" }, (F) => this.eraseInLine(F, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, (F) => this.eraseInLine(F, !0)), this._parser.registerCsiHandler({ final: "L" }, (F) => this.insertLines(F)), this._parser.registerCsiHandler({ final: "M" }, (F) => this.deleteLines(F)), this._parser.registerCsiHandler({ final: "P" }, (F) => this.deleteChars(F)), this._parser.registerCsiHandler({ final: "S" }, (F) => this.scrollUp(F)), this._parser.registerCsiHandler({ final: "T" }, (F) => this.scrollDown(F)), this._parser.registerCsiHandler({ final: "X" }, (F) => this.eraseChars(F)), this._parser.registerCsiHandler({ final: "Z" }, (F) => this.cursorBackwardTab(F)), this._parser.registerCsiHandler({ final: "`" }, (F) => this.charPosAbsolute(F)), this._parser.registerCsiHandler({ final: "a" }, (F) => this.hPositionRelative(F)), this._parser.registerCsiHandler({ final: "b" }, (F) => this.repeatPrecedingCharacter(F)), this._parser.registerCsiHandler({ final: "c" }, (F) => this.sendDeviceAttributesPrimary(F)), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, (F) => this.sendDeviceAttributesSecondary(F)), this._parser.registerCsiHandler({ final: "d" }, (F) => this.linePosAbsolute(F)), this._parser.registerCsiHandler({ final: "e" }, (F) => this.vPositionRelative(F)), this._parser.registerCsiHandler({ final: "f" }, (F) => this.hVPosition(F)), this._parser.registerCsiHandler({ final: "g" }, (F) => this.tabClear(F)), this._parser.registerCsiHandler({ final: "h" }, (F) => this.setMode(F)), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, (F) => this.setModePrivate(F)), this._parser.registerCsiHandler({ final: "l" }, (F) => this.resetMode(F)), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, (F) => this.resetModePrivate(F)), this._parser.registerCsiHandler({ final: "m" }, (F) => this.charAttributes(F)), this._parser.registerCsiHandler({ final: "n" }, (F) => this.deviceStatus(F)), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, (F) => this.deviceStatusPrivate(F)), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, (F) => this.softReset(F)), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, (F) => this.setCursorStyle(F)), this._parser.registerCsiHandler({ final: "r" }, (F) => this.setScrollRegion(F)), this._parser.registerCsiHandler({ final: "s" }, (F) => this.saveCursor(F)), this._parser.registerCsiHandler({ final: "t" }, (F) => this.windowOptions(F)), this._parser.registerCsiHandler({ final: "u" }, (F) => this.restoreCursor(F)), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, (F) => this.insertColumns(F)), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, (F) => this.deleteColumns(F)), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, (F) => this.selectProtected(F)), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, (F) => this.requestMode(F, !0)), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, (F) => this.requestMode(F, !1)), this._parser.setExecuteHandler(f.C0.BEL, () => this.bell()), this._parser.setExecuteHandler(f.C0.LF, () => this.lineFeed()), this._parser.setExecuteHandler(f.C0.VT, () => this.lineFeed()), this._parser.setExecuteHandler(f.C0.FF, () => this.lineFeed()), this._parser.setExecuteHandler(f.C0.CR, () => this.carriageReturn()), this._parser.setExecuteHandler(f.C0.BS, () => this.backspace()), this._parser.setExecuteHandler(f.C0.HT, () => this.tab()), this._parser.setExecuteHandler(f.C0.SO, () => this.shiftOut()), this._parser.setExecuteHandler(f.C0.SI, () => this.shiftIn()), this._parser.setExecuteHandler(f.C1.IND, () => this.index()), this._parser.setExecuteHandler(f.C1.NEL, () => this.nextLine()), this._parser.setExecuteHandler(f.C1.HTS, () => this.tabSet()), this._parser.registerOscHandler(0, new D.OscHandler((F) => (this.setTitle(F), this.setIconName(F), !0))), this._parser.registerOscHandler(1, new D.OscHandler((F) => this.setIconName(F))), this._parser.registerOscHandler(2, new D.OscHandler((F) => this.setTitle(F))), this._parser.registerOscHandler(4, new D.OscHandler((F) => this.setOrReportIndexedColor(F))), this._parser.registerOscHandler(8, new D.OscHandler((F) => this.setHyperlink(F))), this._parser.registerOscHandler(10, new D.OscHandler((F) => this.setOrReportFgColor(F))), this._parser.registerOscHandler(11, new D.OscHandler((F) => this.setOrReportBgColor(F))), this._parser.registerOscHandler(12, new D.OscHandler((F) => this.setOrReportCursorColor(F))), this._parser.registerOscHandler(104, new D.OscHandler((F) => this.restoreIndexedColor(F))), this._parser.registerOscHandler(110, new D.OscHandler((F) => this.restoreFgColor(F))), this._parser.registerOscHandler(111, new D.OscHandler((F) => this.restoreBgColor(F))), this._parser.registerOscHandler(112, new D.OscHandler((F) => this.restoreCursorColor(F))), this._parser.registerEscHandler({ final: "7" }, () => this.saveCursor()), this._parser.registerEscHandler({ final: "8" }, () => this.restoreCursor()), this._parser.registerEscHandler({ final: "D" }, () => this.index()), this._parser.registerEscHandler({ final: "E" }, () => this.nextLine()), this._parser.registerEscHandler({ final: "H" }, () => this.tabSet()), this._parser.registerEscHandler({ final: "M" }, () => this.reverseIndex()), this._parser.registerEscHandler({ final: "=" }, () => this.keypadApplicationMode()), this._parser.registerEscHandler({ final: ">" }, () => this.keypadNumericMode()), this._parser.registerEscHandler({ final: "c" }, () => this.fullReset()), this._parser.registerEscHandler({ final: "n" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "o" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "|" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "}" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "~" }, () => this.setgLevel(1)), this._parser.registerEscHandler({ intermediates: "%", final: "@" }, () => this.selectDefaultCharset()), this._parser.registerEscHandler({ intermediates: "%", final: "G" }, () => this.selectDefaultCharset());
          for (const F in g.CHARSETS) this._parser.registerEscHandler({ intermediates: "(", final: F }, () => this.selectCharset("(" + F)), this._parser.registerEscHandler({ intermediates: ")", final: F }, () => this.selectCharset(")" + F)), this._parser.registerEscHandler({ intermediates: "*", final: F }, () => this.selectCharset("*" + F)), this._parser.registerEscHandler({ intermediates: "+", final: F }, () => this.selectCharset("+" + F)), this._parser.registerEscHandler({ intermediates: "-", final: F }, () => this.selectCharset("-" + F)), this._parser.registerEscHandler({ intermediates: ".", final: F }, () => this.selectCharset("." + F)), this._parser.registerEscHandler({ intermediates: "/", final: F }, () => this.selectCharset("/" + F));
          this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((F) => (this._logService.error("Parsing error: ", F), F)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new y.DcsHandler((F, X) => this.requestStatusString(F, X)));
        }
        _preserveStack(T, L, I, H) {
          this._parseStack.paused = !0, this._parseStack.cursorStartX = T, this._parseStack.cursorStartY = L, this._parseStack.decodedLength = I, this._parseStack.position = H;
        }
        _logSlowResolvingAsync(T) {
          this._logService.logLevel <= S.LogLevelEnum.WARN && Promise.race([T, new Promise((L, I) => setTimeout(() => I("#SLOW_TIMEOUT"), 5e3))]).catch((L) => {
            if (L !== "#SLOW_TIMEOUT") throw L;
            console.warn("async parser handler taking longer than 5000 ms");
          });
        }
        _getCurrentLinkId() {
          return this._curAttrData.extended.urlId;
        }
        parse(T, L) {
          let I, H = this._activeBuffer.x, K = this._activeBuffer.y, re = 0;
          const V = this._parseStack.paused;
          if (V) {
            if (I = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, L)) return this._logSlowResolvingAsync(I), I;
            H = this._parseStack.cursorStartX, K = this._parseStack.cursorStartY, this._parseStack.paused = !1, T.length > O && (re = this._parseStack.position + O);
          }
          if (this._logService.logLevel <= S.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + (typeof T == "string" ? ` "${T}"` : ` "${Array.prototype.map.call(T, (F) => String.fromCharCode(F)).join("")}"`), typeof T == "string" ? T.split("").map((F) => F.charCodeAt(0)) : T), this._parseBuffer.length < T.length && this._parseBuffer.length < O && (this._parseBuffer = new Uint32Array(Math.min(T.length, O))), V || this._dirtyRowTracker.clearRange(), T.length > O) for (let F = re; F < T.length; F += O) {
            const X = F + O < T.length ? F + O : T.length, J = typeof T == "string" ? this._stringDecoder.decode(T.substring(F, X), this._parseBuffer) : this._utf8Decoder.decode(T.subarray(F, X), this._parseBuffer);
            if (I = this._parser.parse(this._parseBuffer, J)) return this._preserveStack(H, K, J, F), this._logSlowResolvingAsync(I), I;
          }
          else if (!V) {
            const F = typeof T == "string" ? this._stringDecoder.decode(T, this._parseBuffer) : this._utf8Decoder.decode(T, this._parseBuffer);
            if (I = this._parser.parse(this._parseBuffer, F)) return this._preserveStack(H, K, F, 0), this._logSlowResolvingAsync(I), I;
          }
          this._activeBuffer.x === H && this._activeBuffer.y === K || this._onCursorMove.fire();
          const ue = this._dirtyRowTracker.end + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp), W = this._dirtyRowTracker.start + (this._bufferService.buffer.ybase - this._bufferService.buffer.ydisp);
          W < this._bufferService.rows && this._onRequestRefreshRows.fire(Math.min(W, this._bufferService.rows - 1), Math.min(ue, this._bufferService.rows - 1));
        }
        print(T, L, I) {
          let H, K;
          const re = this._charsetService.charset, V = this._optionsService.rawOptions.screenReaderMode, ue = this._bufferService.cols, W = this._coreService.decPrivateModes.wraparound, F = this._coreService.modes.insertMode, X = this._curAttrData;
          let J = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
          this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && I - L > 0 && J.getWidth(this._activeBuffer.x - 1) === 2 && J.setCellFromCodepoint(this._activeBuffer.x - 1, 0, 1, X);
          let oe = this._parser.precedingJoinState;
          for (let se = L; se < I; ++se) {
            if (H = T[se], H < 127 && re) {
              const Te = re[String.fromCharCode(H)];
              Te && (H = Te.charCodeAt(0));
            }
            const be = this._unicodeService.charProperties(H, oe);
            K = x.UnicodeService.extractWidth(be);
            const xe = x.UnicodeService.extractShouldJoin(be), De = xe ? x.UnicodeService.extractWidth(oe) : 0;
            if (oe = be, V && this._onA11yChar.fire((0, b.stringFromCodePoint)(H)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), this._activeBuffer.x + K - De > ue) {
              if (W) {
                const Te = J;
                let de = this._activeBuffer.x - De;
                for (this._activeBuffer.x = De, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), J = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y), De > 0 && J instanceof d.BufferLine && J.copyCellsFrom(Te, de, 0, De, !1); de < ue; ) Te.setCellFromCodepoint(de++, 0, 1, X);
              } else if (this._activeBuffer.x = ue - 1, K === 2) continue;
            }
            if (xe && this._activeBuffer.x) {
              const Te = J.getWidth(this._activeBuffer.x - 1) ? 1 : 2;
              J.addCodepointToCell(this._activeBuffer.x - Te, H, K);
              for (let de = K - De; --de >= 0; ) J.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, X);
            } else if (F && (J.insertCells(this._activeBuffer.x, K - De, this._activeBuffer.getNullCell(X)), J.getWidth(ue - 1) === 2 && J.setCellFromCodepoint(ue - 1, h.NULL_CELL_CODE, h.NULL_CELL_WIDTH, X)), J.setCellFromCodepoint(this._activeBuffer.x++, H, K, X), K > 0) for (; --K; ) J.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, X);
          }
          this._parser.precedingJoinState = oe, this._activeBuffer.x < ue && I - L > 0 && J.getWidth(this._activeBuffer.x) === 0 && !J.hasContent(this._activeBuffer.x) && J.setCellFromCodepoint(this._activeBuffer.x, 0, 1, X), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
        }
        registerCsiHandler(T, L) {
          return T.final !== "t" || T.prefix || T.intermediates ? this._parser.registerCsiHandler(T, L) : this._parser.registerCsiHandler(T, (I) => !N(I.params[0], this._optionsService.rawOptions.windowOptions) || L(I));
        }
        registerDcsHandler(T, L) {
          return this._parser.registerDcsHandler(T, new y.DcsHandler(L));
        }
        registerEscHandler(T, L) {
          return this._parser.registerEscHandler(T, L);
        }
        registerOscHandler(T, L) {
          return this._parser.registerOscHandler(T, new D.OscHandler(L));
        }
        bell() {
          return this._onRequestBell.fire(), !0;
        }
        lineFeed() {
          return this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._optionsService.rawOptions.convertEol && (this._activeBuffer.x = 0), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows ? this._activeBuffer.y = this._bufferService.rows - 1 : this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !1, this._activeBuffer.x >= this._bufferService.cols && this._activeBuffer.x--, this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._onLineFeed.fire(), !0;
        }
        carriageReturn() {
          return this._activeBuffer.x = 0, !0;
        }
        backspace() {
          if (!this._coreService.decPrivateModes.reverseWraparound) return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, !0;
          if (this._restrictCursor(this._bufferService.cols), this._activeBuffer.x > 0) this._activeBuffer.x--;
          else if (this._activeBuffer.x === 0 && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)?.isWrapped) {
            this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !1, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
            const T = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            T.hasWidth(this._activeBuffer.x) && !T.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
          }
          return this._restrictCursor(), !0;
        }
        tab() {
          if (this._activeBuffer.x >= this._bufferService.cols) return !0;
          const T = this._activeBuffer.x;
          return this._activeBuffer.x = this._activeBuffer.nextStop(), this._optionsService.rawOptions.screenReaderMode && this._onA11yTab.fire(this._activeBuffer.x - T), !0;
        }
        shiftOut() {
          return this._charsetService.setgLevel(1), !0;
        }
        shiftIn() {
          return this._charsetService.setgLevel(0), !0;
        }
        _restrictCursor(T = this._bufferService.cols - 1) {
          this._activeBuffer.x = Math.min(T, Math.max(0, this._activeBuffer.x)), this._activeBuffer.y = this._coreService.decPrivateModes.origin ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y)), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
        }
        _setCursor(T, L) {
          this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = T, this._activeBuffer.y = this._activeBuffer.scrollTop + L) : (this._activeBuffer.x = T, this._activeBuffer.y = L), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
        }
        _moveCursor(T, L) {
          this._restrictCursor(), this._setCursor(this._activeBuffer.x + T, this._activeBuffer.y + L);
        }
        cursorUp(T) {
          const L = this._activeBuffer.y - this._activeBuffer.scrollTop;
          return L >= 0 ? this._moveCursor(0, -Math.min(L, T.params[0] || 1)) : this._moveCursor(0, -(T.params[0] || 1)), !0;
        }
        cursorDown(T) {
          const L = this._activeBuffer.scrollBottom - this._activeBuffer.y;
          return L >= 0 ? this._moveCursor(0, Math.min(L, T.params[0] || 1)) : this._moveCursor(0, T.params[0] || 1), !0;
        }
        cursorForward(T) {
          return this._moveCursor(T.params[0] || 1, 0), !0;
        }
        cursorBackward(T) {
          return this._moveCursor(-(T.params[0] || 1), 0), !0;
        }
        cursorNextLine(T) {
          return this.cursorDown(T), this._activeBuffer.x = 0, !0;
        }
        cursorPrecedingLine(T) {
          return this.cursorUp(T), this._activeBuffer.x = 0, !0;
        }
        cursorCharAbsolute(T) {
          return this._setCursor((T.params[0] || 1) - 1, this._activeBuffer.y), !0;
        }
        cursorPosition(T) {
          return this._setCursor(T.length >= 2 ? (T.params[1] || 1) - 1 : 0, (T.params[0] || 1) - 1), !0;
        }
        charPosAbsolute(T) {
          return this._setCursor((T.params[0] || 1) - 1, this._activeBuffer.y), !0;
        }
        hPositionRelative(T) {
          return this._moveCursor(T.params[0] || 1, 0), !0;
        }
        linePosAbsolute(T) {
          return this._setCursor(this._activeBuffer.x, (T.params[0] || 1) - 1), !0;
        }
        vPositionRelative(T) {
          return this._moveCursor(0, T.params[0] || 1), !0;
        }
        hVPosition(T) {
          return this.cursorPosition(T), !0;
        }
        tabClear(T) {
          const L = T.params[0];
          return L === 0 ? delete this._activeBuffer.tabs[this._activeBuffer.x] : L === 3 && (this._activeBuffer.tabs = {}), !0;
        }
        cursorForwardTab(T) {
          if (this._activeBuffer.x >= this._bufferService.cols) return !0;
          let L = T.params[0] || 1;
          for (; L--; ) this._activeBuffer.x = this._activeBuffer.nextStop();
          return !0;
        }
        cursorBackwardTab(T) {
          if (this._activeBuffer.x >= this._bufferService.cols) return !0;
          let L = T.params[0] || 1;
          for (; L--; ) this._activeBuffer.x = this._activeBuffer.prevStop();
          return !0;
        }
        selectProtected(T) {
          const L = T.params[0];
          return L === 1 && (this._curAttrData.bg |= 536870912), L !== 2 && L !== 0 || (this._curAttrData.bg &= -536870913), !0;
        }
        _eraseInBufferLine(T, L, I, H = !1, K = !1) {
          const re = this._activeBuffer.lines.get(this._activeBuffer.ybase + T);
          re.replaceCells(L, I, this._activeBuffer.getNullCell(this._eraseAttrData()), K), H && (re.isWrapped = !1);
        }
        _resetBufferLine(T, L = !1) {
          const I = this._activeBuffer.lines.get(this._activeBuffer.ybase + T);
          I && (I.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), L), this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + T), I.isWrapped = !1);
        }
        eraseInDisplay(T, L = !1) {
          let I;
          switch (this._restrictCursor(this._bufferService.cols), T.params[0]) {
            case 0:
              for (I = this._activeBuffer.y, this._dirtyRowTracker.markDirty(I), this._eraseInBufferLine(I++, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0, L); I < this._bufferService.rows; I++) this._resetBufferLine(I, L);
              this._dirtyRowTracker.markDirty(I);
              break;
            case 1:
              for (I = this._activeBuffer.y, this._dirtyRowTracker.markDirty(I), this._eraseInBufferLine(I, 0, this._activeBuffer.x + 1, !0, L), this._activeBuffer.x + 1 >= this._bufferService.cols && (this._activeBuffer.lines.get(I + 1).isWrapped = !1); I--; ) this._resetBufferLine(I, L);
              this._dirtyRowTracker.markDirty(0);
              break;
            case 2:
              for (I = this._bufferService.rows, this._dirtyRowTracker.markDirty(I - 1); I--; ) this._resetBufferLine(I, L);
              this._dirtyRowTracker.markDirty(0);
              break;
            case 3:
              const H = this._activeBuffer.lines.length - this._bufferService.rows;
              H > 0 && (this._activeBuffer.lines.trimStart(H), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - H, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - H, 0), this._onScroll.fire(0));
          }
          return !0;
        }
        eraseInLine(T, L = !1) {
          switch (this._restrictCursor(this._bufferService.cols), T.params[0]) {
            case 0:
              this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0, L);
              break;
            case 1:
              this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, !1, L);
              break;
            case 2:
              this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, !0, L);
          }
          return this._dirtyRowTracker.markDirty(this._activeBuffer.y), !0;
        }
        insertLines(T) {
          this._restrictCursor();
          let L = T.params[0] || 1;
          if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
          const I = this._activeBuffer.ybase + this._activeBuffer.y, H = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, K = this._bufferService.rows - 1 + this._activeBuffer.ybase - H + 1;
          for (; L--; ) this._activeBuffer.lines.splice(K - 1, 1), this._activeBuffer.lines.splice(I, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
        }
        deleteLines(T) {
          this._restrictCursor();
          let L = T.params[0] || 1;
          if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
          const I = this._activeBuffer.ybase + this._activeBuffer.y;
          let H;
          for (H = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, H = this._bufferService.rows - 1 + this._activeBuffer.ybase - H; L--; ) this._activeBuffer.lines.splice(I, 1), this._activeBuffer.lines.splice(H, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
        }
        insertChars(T) {
          this._restrictCursor();
          const L = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
          return L && (L.insertCells(this._activeBuffer.x, T.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
        }
        deleteChars(T) {
          this._restrictCursor();
          const L = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
          return L && (L.deleteCells(this._activeBuffer.x, T.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
        }
        scrollUp(T) {
          let L = T.params[0] || 1;
          for (; L--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
        }
        scrollDown(T) {
          let L = T.params[0] || 1;
          for (; L--; ) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(d.DEFAULT_ATTR_DATA));
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
        }
        scrollLeft(T) {
          if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
          const L = T.params[0] || 1;
          for (let I = this._activeBuffer.scrollTop; I <= this._activeBuffer.scrollBottom; ++I) {
            const H = this._activeBuffer.lines.get(this._activeBuffer.ybase + I);
            H.deleteCells(0, L, this._activeBuffer.getNullCell(this._eraseAttrData())), H.isWrapped = !1;
          }
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
        }
        scrollRight(T) {
          if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
          const L = T.params[0] || 1;
          for (let I = this._activeBuffer.scrollTop; I <= this._activeBuffer.scrollBottom; ++I) {
            const H = this._activeBuffer.lines.get(this._activeBuffer.ybase + I);
            H.insertCells(0, L, this._activeBuffer.getNullCell(this._eraseAttrData())), H.isWrapped = !1;
          }
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
        }
        insertColumns(T) {
          if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
          const L = T.params[0] || 1;
          for (let I = this._activeBuffer.scrollTop; I <= this._activeBuffer.scrollBottom; ++I) {
            const H = this._activeBuffer.lines.get(this._activeBuffer.ybase + I);
            H.insertCells(this._activeBuffer.x, L, this._activeBuffer.getNullCell(this._eraseAttrData())), H.isWrapped = !1;
          }
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
        }
        deleteColumns(T) {
          if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
          const L = T.params[0] || 1;
          for (let I = this._activeBuffer.scrollTop; I <= this._activeBuffer.scrollBottom; ++I) {
            const H = this._activeBuffer.lines.get(this._activeBuffer.ybase + I);
            H.deleteCells(this._activeBuffer.x, L, this._activeBuffer.getNullCell(this._eraseAttrData())), H.isWrapped = !1;
          }
          return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
        }
        eraseChars(T) {
          this._restrictCursor();
          const L = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
          return L && (L.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (T.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData())), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
        }
        repeatPrecedingCharacter(T) {
          const L = this._parser.precedingJoinState;
          if (!L) return !0;
          const I = T.params[0] || 1, H = x.UnicodeService.extractWidth(L), K = this._activeBuffer.x - H, re = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).getString(K), V = new Uint32Array(re.length * I);
          let ue = 0;
          for (let F = 0; F < re.length; ) {
            const X = re.codePointAt(F) || 0;
            V[ue++] = X, F += X > 65535 ? 2 : 1;
          }
          let W = ue;
          for (let F = 1; F < I; ++F) V.copyWithin(W, 0, ue), W += ue;
          return this.print(V, 0, W), !0;
        }
        sendDeviceAttributesPrimary(T) {
          return T.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(f.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(f.C0.ESC + "[?6c")), !0;
        }
        sendDeviceAttributesSecondary(T) {
          return T.params[0] > 0 || (this._is("xterm") ? this._coreService.triggerDataEvent(f.C0.ESC + "[>0;276;0c") : this._is("rxvt-unicode") ? this._coreService.triggerDataEvent(f.C0.ESC + "[>85;95;0c") : this._is("linux") ? this._coreService.triggerDataEvent(T.params[0] + "c") : this._is("screen") && this._coreService.triggerDataEvent(f.C0.ESC + "[>83;40003;0c")), !0;
        }
        _is(T) {
          return (this._optionsService.rawOptions.termName + "").indexOf(T) === 0;
        }
        setMode(T) {
          for (let L = 0; L < T.length; L++) switch (T.params[L]) {
            case 4:
              this._coreService.modes.insertMode = !0;
              break;
            case 20:
              this._optionsService.options.convertEol = !0;
          }
          return !0;
        }
        setModePrivate(T) {
          for (let L = 0; L < T.length; L++) switch (T.params[L]) {
            case 1:
              this._coreService.decPrivateModes.applicationCursorKeys = !0;
              break;
            case 2:
              this._charsetService.setgCharset(0, g.DEFAULT_CHARSET), this._charsetService.setgCharset(1, g.DEFAULT_CHARSET), this._charsetService.setgCharset(2, g.DEFAULT_CHARSET), this._charsetService.setgCharset(3, g.DEFAULT_CHARSET);
              break;
            case 3:
              this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(132, this._bufferService.rows), this._onRequestReset.fire());
              break;
            case 6:
              this._coreService.decPrivateModes.origin = !0, this._setCursor(0, 0);
              break;
            case 7:
              this._coreService.decPrivateModes.wraparound = !0;
              break;
            case 12:
              this._optionsService.options.cursorBlink = !0;
              break;
            case 45:
              this._coreService.decPrivateModes.reverseWraparound = !0;
              break;
            case 66:
              this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = !0, this._onRequestSyncScrollBar.fire();
              break;
            case 9:
              this._coreMouseService.activeProtocol = "X10";
              break;
            case 1e3:
              this._coreMouseService.activeProtocol = "VT200";
              break;
            case 1002:
              this._coreMouseService.activeProtocol = "DRAG";
              break;
            case 1003:
              this._coreMouseService.activeProtocol = "ANY";
              break;
            case 1004:
              this._coreService.decPrivateModes.sendFocus = !0, this._onRequestSendFocus.fire();
              break;
            case 1005:
              this._logService.debug("DECSET 1005 not supported (see #2507)");
              break;
            case 1006:
              this._coreMouseService.activeEncoding = "SGR";
              break;
            case 1015:
              this._logService.debug("DECSET 1015 not supported (see #2507)");
              break;
            case 1016:
              this._coreMouseService.activeEncoding = "SGR_PIXELS";
              break;
            case 25:
              this._coreService.isCursorHidden = !1;
              break;
            case 1048:
              this.saveCursor();
              break;
            case 1049:
              this.saveCursor();
            case 47:
            case 1047:
              this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()), this._coreService.isCursorInitialized = !0, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
              break;
            case 2004:
              this._coreService.decPrivateModes.bracketedPasteMode = !0;
          }
          return !0;
        }
        resetMode(T) {
          for (let L = 0; L < T.length; L++) switch (T.params[L]) {
            case 4:
              this._coreService.modes.insertMode = !1;
              break;
            case 20:
              this._optionsService.options.convertEol = !1;
          }
          return !0;
        }
        resetModePrivate(T) {
          for (let L = 0; L < T.length; L++) switch (T.params[L]) {
            case 1:
              this._coreService.decPrivateModes.applicationCursorKeys = !1;
              break;
            case 3:
              this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(80, this._bufferService.rows), this._onRequestReset.fire());
              break;
            case 6:
              this._coreService.decPrivateModes.origin = !1, this._setCursor(0, 0);
              break;
            case 7:
              this._coreService.decPrivateModes.wraparound = !1;
              break;
            case 12:
              this._optionsService.options.cursorBlink = !1;
              break;
            case 45:
              this._coreService.decPrivateModes.reverseWraparound = !1;
              break;
            case 66:
              this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = !1, this._onRequestSyncScrollBar.fire();
              break;
            case 9:
            case 1e3:
            case 1002:
            case 1003:
              this._coreMouseService.activeProtocol = "NONE";
              break;
            case 1004:
              this._coreService.decPrivateModes.sendFocus = !1;
              break;
            case 1005:
              this._logService.debug("DECRST 1005 not supported (see #2507)");
              break;
            case 1006:
            case 1016:
              this._coreMouseService.activeEncoding = "DEFAULT";
              break;
            case 1015:
              this._logService.debug("DECRST 1015 not supported (see #2507)");
              break;
            case 25:
              this._coreService.isCursorHidden = !0;
              break;
            case 1048:
              this.restoreCursor();
              break;
            case 1049:
            case 47:
            case 1047:
              this._bufferService.buffers.activateNormalBuffer(), T.params[L] === 1049 && this.restoreCursor(), this._coreService.isCursorInitialized = !0, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
              break;
            case 2004:
              this._coreService.decPrivateModes.bracketedPasteMode = !1;
          }
          return !0;
        }
        requestMode(T, L) {
          const I = this._coreService.decPrivateModes, { activeProtocol: H, activeEncoding: K } = this._coreMouseService, re = this._coreService, { buffers: V, cols: ue } = this._bufferService, { active: W, alt: F } = V, X = this._optionsService.rawOptions, J = (xe) => xe ? 1 : 2, oe = T.params[0];
          return se = oe, be = L ? oe === 2 ? 4 : oe === 4 ? J(re.modes.insertMode) : oe === 12 ? 3 : oe === 20 ? J(X.convertEol) : 0 : oe === 1 ? J(I.applicationCursorKeys) : oe === 3 ? X.windowOptions.setWinLines ? ue === 80 ? 2 : ue === 132 ? 1 : 0 : 0 : oe === 6 ? J(I.origin) : oe === 7 ? J(I.wraparound) : oe === 8 ? 3 : oe === 9 ? J(H === "X10") : oe === 12 ? J(X.cursorBlink) : oe === 25 ? J(!re.isCursorHidden) : oe === 45 ? J(I.reverseWraparound) : oe === 66 ? J(I.applicationKeypad) : oe === 67 ? 4 : oe === 1e3 ? J(H === "VT200") : oe === 1002 ? J(H === "DRAG") : oe === 1003 ? J(H === "ANY") : oe === 1004 ? J(I.sendFocus) : oe === 1005 ? 4 : oe === 1006 ? J(K === "SGR") : oe === 1015 ? 4 : oe === 1016 ? J(K === "SGR_PIXELS") : oe === 1048 ? 1 : oe === 47 || oe === 1047 || oe === 1049 ? J(W === F) : oe === 2004 ? J(I.bracketedPasteMode) : 0, re.triggerDataEvent(`${f.C0.ESC}[${L ? "" : "?"}${se};${be}$y`), !0;
          var se, be;
        }
        _updateAttrColor(T, L, I, H, K) {
          return L === 2 ? (T |= 50331648, T &= -16777216, T |= _.AttributeData.fromColorRGB([I, H, K])) : L === 5 && (T &= -50331904, T |= 33554432 | 255 & I), T;
        }
        _extractColor(T, L, I) {
          const H = [0, 0, -1, 0, 0, 0];
          let K = 0, re = 0;
          do {
            if (H[re + K] = T.params[L + re], T.hasSubParams(L + re)) {
              const V = T.getSubParams(L + re);
              let ue = 0;
              do
                H[1] === 5 && (K = 1), H[re + ue + 1 + K] = V[ue];
              while (++ue < V.length && ue + re + 1 + K < H.length);
              break;
            }
            if (H[1] === 5 && re + K >= 2 || H[1] === 2 && re + K >= 5) break;
            H[1] && (K = 1);
          } while (++re + L < T.length && re + K < H.length);
          for (let V = 2; V < H.length; ++V) H[V] === -1 && (H[V] = 0);
          switch (H[0]) {
            case 38:
              I.fg = this._updateAttrColor(I.fg, H[1], H[3], H[4], H[5]);
              break;
            case 48:
              I.bg = this._updateAttrColor(I.bg, H[1], H[3], H[4], H[5]);
              break;
            case 58:
              I.extended = I.extended.clone(), I.extended.underlineColor = this._updateAttrColor(I.extended.underlineColor, H[1], H[3], H[4], H[5]);
          }
          return re;
        }
        _processUnderline(T, L) {
          L.extended = L.extended.clone(), (!~T || T > 5) && (T = 1), L.extended.underlineStyle = T, L.fg |= 268435456, T === 0 && (L.fg &= -268435457), L.updateExtended();
        }
        _processSGR0(T) {
          T.fg = d.DEFAULT_ATTR_DATA.fg, T.bg = d.DEFAULT_ATTR_DATA.bg, T.extended = T.extended.clone(), T.extended.underlineStyle = 0, T.extended.underlineColor &= -67108864, T.updateExtended();
        }
        charAttributes(T) {
          if (T.length === 1 && T.params[0] === 0) return this._processSGR0(this._curAttrData), !0;
          const L = T.length;
          let I;
          const H = this._curAttrData;
          for (let K = 0; K < L; K++) I = T.params[K], I >= 30 && I <= 37 ? (H.fg &= -50331904, H.fg |= 16777216 | I - 30) : I >= 40 && I <= 47 ? (H.bg &= -50331904, H.bg |= 16777216 | I - 40) : I >= 90 && I <= 97 ? (H.fg &= -50331904, H.fg |= 16777224 | I - 90) : I >= 100 && I <= 107 ? (H.bg &= -50331904, H.bg |= 16777224 | I - 100) : I === 0 ? this._processSGR0(H) : I === 1 ? H.fg |= 134217728 : I === 3 ? H.bg |= 67108864 : I === 4 ? (H.fg |= 268435456, this._processUnderline(T.hasSubParams(K) ? T.getSubParams(K)[0] : 1, H)) : I === 5 ? H.fg |= 536870912 : I === 7 ? H.fg |= 67108864 : I === 8 ? H.fg |= 1073741824 : I === 9 ? H.fg |= 2147483648 : I === 2 ? H.bg |= 134217728 : I === 21 ? this._processUnderline(2, H) : I === 22 ? (H.fg &= -134217729, H.bg &= -134217729) : I === 23 ? H.bg &= -67108865 : I === 24 ? (H.fg &= -268435457, this._processUnderline(0, H)) : I === 25 ? H.fg &= -536870913 : I === 27 ? H.fg &= -67108865 : I === 28 ? H.fg &= -1073741825 : I === 29 ? H.fg &= 2147483647 : I === 39 ? (H.fg &= -67108864, H.fg |= 16777215 & d.DEFAULT_ATTR_DATA.fg) : I === 49 ? (H.bg &= -67108864, H.bg |= 16777215 & d.DEFAULT_ATTR_DATA.bg) : I === 38 || I === 48 || I === 58 ? K += this._extractColor(T, K, H) : I === 53 ? H.bg |= 1073741824 : I === 55 ? H.bg &= -1073741825 : I === 59 ? (H.extended = H.extended.clone(), H.extended.underlineColor = -1, H.updateExtended()) : I === 100 ? (H.fg &= -67108864, H.fg |= 16777215 & d.DEFAULT_ATTR_DATA.fg, H.bg &= -67108864, H.bg |= 16777215 & d.DEFAULT_ATTR_DATA.bg) : this._logService.debug("Unknown SGR attribute: %d.", I);
          return !0;
        }
        deviceStatus(T) {
          switch (T.params[0]) {
            case 5:
              this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);
              break;
            case 6:
              const L = this._activeBuffer.y + 1, I = this._activeBuffer.x + 1;
              this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${I}R`);
          }
          return !0;
        }
        deviceStatusPrivate(T) {
          if (T.params[0] === 6) {
            const L = this._activeBuffer.y + 1, I = this._activeBuffer.x + 1;
            this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${I}R`);
          }
          return !0;
        }
        softReset(T) {
          return this._coreService.isCursorHidden = !1, this._onRequestSyncScrollBar.fire(), this._activeBuffer.scrollTop = 0, this._activeBuffer.scrollBottom = this._bufferService.rows - 1, this._curAttrData = d.DEFAULT_ATTR_DATA.clone(), this._coreService.reset(), this._charsetService.reset(), this._activeBuffer.savedX = 0, this._activeBuffer.savedY = this._activeBuffer.ybase, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, this._coreService.decPrivateModes.origin = !1, !0;
        }
        setCursorStyle(T) {
          const L = T.params[0] || 1;
          switch (L) {
            case 1:
            case 2:
              this._optionsService.options.cursorStyle = "block";
              break;
            case 3:
            case 4:
              this._optionsService.options.cursorStyle = "underline";
              break;
            case 5:
            case 6:
              this._optionsService.options.cursorStyle = "bar";
          }
          const I = L % 2 == 1;
          return this._optionsService.options.cursorBlink = I, !0;
        }
        setScrollRegion(T) {
          const L = T.params[0] || 1;
          let I;
          return (T.length < 2 || (I = T.params[1]) > this._bufferService.rows || I === 0) && (I = this._bufferService.rows), I > L && (this._activeBuffer.scrollTop = L - 1, this._activeBuffer.scrollBottom = I - 1, this._setCursor(0, 0)), !0;
        }
        windowOptions(T) {
          if (!N(T.params[0], this._optionsService.rawOptions.windowOptions)) return !0;
          const L = T.length > 1 ? T.params[1] : 0;
          switch (T.params[0]) {
            case 14:
              L !== 2 && this._onRequestWindowsOptionsReport.fire(R.GET_WIN_SIZE_PIXELS);
              break;
            case 16:
              this._onRequestWindowsOptionsReport.fire(R.GET_CELL_SIZE_PIXELS);
              break;
            case 18:
              this._bufferService && this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
              break;
            case 22:
              L !== 0 && L !== 2 || (this._windowTitleStack.push(this._windowTitle), this._windowTitleStack.length > 10 && this._windowTitleStack.shift()), L !== 0 && L !== 1 || (this._iconNameStack.push(this._iconName), this._iconNameStack.length > 10 && this._iconNameStack.shift());
              break;
            case 23:
              L !== 0 && L !== 2 || this._windowTitleStack.length && this.setTitle(this._windowTitleStack.pop()), L !== 0 && L !== 1 || this._iconNameStack.length && this.setIconName(this._iconNameStack.pop());
          }
          return !0;
        }
        saveCursor(T) {
          return this._activeBuffer.savedX = this._activeBuffer.x, this._activeBuffer.savedY = this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, !0;
        }
        restoreCursor(T) {
          return this._activeBuffer.x = this._activeBuffer.savedX || 0, this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0), this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg, this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg, this._charsetService.charset = this._savedCharset, this._activeBuffer.savedCharset && (this._charsetService.charset = this._activeBuffer.savedCharset), this._restrictCursor(), !0;
        }
        setTitle(T) {
          return this._windowTitle = T, this._onTitleChange.fire(T), !0;
        }
        setIconName(T) {
          return this._iconName = T, !0;
        }
        setOrReportIndexedColor(T) {
          const L = [], I = T.split(";");
          for (; I.length > 1; ) {
            const H = I.shift(), K = I.shift();
            if (/^\d+$/.exec(H)) {
              const re = parseInt(H);
              if (ne(re)) if (K === "?") L.push({ type: 0, index: re });
              else {
                const V = (0, E.parseColor)(K);
                V && L.push({ type: 1, index: re, color: V });
              }
            }
          }
          return L.length && this._onColor.fire(L), !0;
        }
        setHyperlink(T) {
          const L = T.split(";");
          return !(L.length < 2) && (L[1] ? this._createHyperlink(L[0], L[1]) : !L[0] && this._finishHyperlink());
        }
        _createHyperlink(T, L) {
          this._getCurrentLinkId() && this._finishHyperlink();
          const I = T.split(":");
          let H;
          const K = I.findIndex((re) => re.startsWith("id="));
          return K !== -1 && (H = I[K].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id: H, uri: L }), this._curAttrData.updateExtended(), !0;
        }
        _finishHyperlink() {
          return this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = 0, this._curAttrData.updateExtended(), !0;
        }
        _setOrReportSpecialColor(T, L) {
          const I = T.split(";");
          for (let H = 0; H < I.length && !(L >= this._specialColors.length); ++H, ++L) if (I[H] === "?") this._onColor.fire([{ type: 0, index: this._specialColors[L] }]);
          else {
            const K = (0, E.parseColor)(I[H]);
            K && this._onColor.fire([{ type: 1, index: this._specialColors[L], color: K }]);
          }
          return !0;
        }
        setOrReportFgColor(T) {
          return this._setOrReportSpecialColor(T, 0);
        }
        setOrReportBgColor(T) {
          return this._setOrReportSpecialColor(T, 1);
        }
        setOrReportCursorColor(T) {
          return this._setOrReportSpecialColor(T, 2);
        }
        restoreIndexedColor(T) {
          if (!T) return this._onColor.fire([{ type: 2 }]), !0;
          const L = [], I = T.split(";");
          for (let H = 0; H < I.length; ++H) if (/^\d+$/.exec(I[H])) {
            const K = parseInt(I[H]);
            ne(K) && L.push({ type: 2, index: K });
          }
          return L.length && this._onColor.fire(L), !0;
        }
        restoreFgColor(T) {
          return this._onColor.fire([{ type: 2, index: 256 }]), !0;
        }
        restoreBgColor(T) {
          return this._onColor.fire([{ type: 2, index: 257 }]), !0;
        }
        restoreCursorColor(T) {
          return this._onColor.fire([{ type: 2, index: 258 }]), !0;
        }
        nextLine() {
          return this._activeBuffer.x = 0, this.index(), !0;
        }
        keypadApplicationMode() {
          return this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = !0, this._onRequestSyncScrollBar.fire(), !0;
        }
        keypadNumericMode() {
          return this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = !1, this._onRequestSyncScrollBar.fire(), !0;
        }
        selectDefaultCharset() {
          return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, g.DEFAULT_CHARSET), !0;
        }
        selectCharset(T) {
          return T.length !== 2 ? (this.selectDefaultCharset(), !0) : (T[0] === "/" || this._charsetService.setgCharset(B[T[0]], g.CHARSETS[T[1]] || g.DEFAULT_CHARSET), !0);
        }
        index() {
          return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), !0;
        }
        tabSet() {
          return this._activeBuffer.tabs[this._activeBuffer.x] = !0, !0;
        }
        reverseIndex() {
          if (this._restrictCursor(), this._activeBuffer.y === this._activeBuffer.scrollTop) {
            const T = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;
            this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, T, 1), this._activeBuffer.lines.set(this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.getBlankLine(this._eraseAttrData())), this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
          } else this._activeBuffer.y--, this._restrictCursor();
          return !0;
        }
        fullReset() {
          return this._parser.reset(), this._onRequestReset.fire(), !0;
        }
        reset() {
          this._curAttrData = d.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = d.DEFAULT_ATTR_DATA.clone();
        }
        _eraseAttrData() {
          return this._eraseAttrDataInternal.bg &= -67108864, this._eraseAttrDataInternal.bg |= 67108863 & this._curAttrData.bg, this._eraseAttrDataInternal;
        }
        setgLevel(T) {
          return this._charsetService.setgLevel(T), !0;
        }
        screenAlignmentPattern() {
          const T = new l.CellData();
          T.content = 4194373, T.fg = this._curAttrData.fg, T.bg = this._curAttrData.bg, this._setCursor(0, 0);
          for (let L = 0; L < this._bufferService.rows; ++L) {
            const I = this._activeBuffer.ybase + this._activeBuffer.y + L, H = this._activeBuffer.lines.get(I);
            H && (H.fill(T), H.isWrapped = !1);
          }
          return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), !0;
        }
        requestStatusString(T, L) {
          const I = this._bufferService.buffer, H = this._optionsService.rawOptions;
          return ((K) => (this._coreService.triggerDataEvent(`${f.C0.ESC}${K}${f.C0.ESC}\\`), !0))(T === '"q' ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : T === '"p' ? 'P1$r61;1"p' : T === "r" ? `P1$r${I.scrollTop + 1};${I.scrollBottom + 1}r` : T === "m" ? "P1$r0m" : T === " q" ? `P1$r${{ block: 2, underline: 4, bar: 6 }[H.cursorStyle] - (H.cursorBlink ? 1 : 0)} q` : "P0$r");
        }
        markRangeDirty(T, L) {
          this._dirtyRowTracker.markRangeDirty(T, L);
        }
      }
      s.InputHandler = Y;
      let ee = class {
        constructor(Z) {
          this._bufferService = Z, this.clearRange();
        }
        clearRange() {
          this.start = this._bufferService.buffer.y, this.end = this._bufferService.buffer.y;
        }
        markDirty(Z) {
          Z < this.start ? this.start = Z : Z > this.end && (this.end = Z);
        }
        markRangeDirty(Z, T) {
          Z > T && (j = Z, Z = T, T = j), Z < this.start && (this.start = Z), T > this.end && (this.end = T);
        }
        markAllDirty() {
          this.markRangeDirty(0, this._bufferService.rows - 1);
        }
      };
      function ne(Z) {
        return 0 <= Z && Z < 256;
      }
      ee = u([p(0, S.IBufferService)], ee);
    }, 844: (c, s) => {
      function a(u) {
        for (const p of u) p.dispose();
        u.length = 0;
      }
      Object.defineProperty(s, "__esModule", { value: !0 }), s.getDisposeArrayDisposable = s.disposeArray = s.toDisposable = s.MutableDisposable = s.Disposable = void 0, s.Disposable = class {
        constructor() {
          this._disposables = [], this._isDisposed = !1;
        }
        dispose() {
          this._isDisposed = !0;
          for (const u of this._disposables) u.dispose();
          this._disposables.length = 0;
        }
        register(u) {
          return this._disposables.push(u), u;
        }
        unregister(u) {
          const p = this._disposables.indexOf(u);
          p !== -1 && this._disposables.splice(p, 1);
        }
      }, s.MutableDisposable = class {
        constructor() {
          this._isDisposed = !1;
        }
        get value() {
          return this._isDisposed ? void 0 : this._value;
        }
        set value(u) {
          this._isDisposed || u === this._value || (this._value?.dispose(), this._value = u);
        }
        clear() {
          this.value = void 0;
        }
        dispose() {
          this._isDisposed = !0, this._value?.dispose(), this._value = void 0;
        }
      }, s.toDisposable = function(u) {
        return { dispose: u };
      }, s.disposeArray = a, s.getDisposeArrayDisposable = function(u) {
        return { dispose: () => a(u) };
      };
    }, 1505: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.FourKeyMap = s.TwoKeyMap = void 0;
      class a {
        constructor() {
          this._data = {};
        }
        set(p, f, g) {
          this._data[p] || (this._data[p] = {}), this._data[p][f] = g;
        }
        get(p, f) {
          return this._data[p] ? this._data[p][f] : void 0;
        }
        clear() {
          this._data = {};
        }
      }
      s.TwoKeyMap = a, s.FourKeyMap = class {
        constructor() {
          this._data = new a();
        }
        set(u, p, f, g, v) {
          this._data.get(u, p) || this._data.set(u, p, new a()), this._data.get(u, p).set(f, g, v);
        }
        get(u, p, f, g) {
          return this._data.get(u, p)?.get(f, g);
        }
        clear() {
          this._data.clear();
        }
      };
    }, 6114: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.isChromeOS = s.isLinux = s.isWindows = s.isIphone = s.isIpad = s.isMac = s.getSafariVersion = s.isSafari = s.isLegacyEdge = s.isFirefox = s.isNode = void 0, s.isNode = typeof process < "u" && "title" in process;
      const a = s.isNode ? "node" : navigator.userAgent, u = s.isNode ? "node" : navigator.platform;
      s.isFirefox = a.includes("Firefox"), s.isLegacyEdge = a.includes("Edge"), s.isSafari = /^((?!chrome|android).)*safari/i.test(a), s.getSafariVersion = function() {
        if (!s.isSafari) return 0;
        const p = a.match(/Version\/(\d+)/);
        return p === null || p.length < 2 ? 0 : parseInt(p[1]);
      }, s.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(u), s.isIpad = u === "iPad", s.isIphone = u === "iPhone", s.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(u), s.isLinux = u.indexOf("Linux") >= 0, s.isChromeOS = /\bCrOS\b/.test(a);
    }, 6106: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.SortedList = void 0;
      let a = 0;
      s.SortedList = class {
        constructor(u) {
          this._getKey = u, this._array = [];
        }
        clear() {
          this._array.length = 0;
        }
        insert(u) {
          this._array.length !== 0 ? (a = this._search(this._getKey(u)), this._array.splice(a, 0, u)) : this._array.push(u);
        }
        delete(u) {
          if (this._array.length === 0) return !1;
          const p = this._getKey(u);
          if (p === void 0 || (a = this._search(p), a === -1) || this._getKey(this._array[a]) !== p) return !1;
          do
            if (this._array[a] === u) return this._array.splice(a, 1), !0;
          while (++a < this._array.length && this._getKey(this._array[a]) === p);
          return !1;
        }
        *getKeyIterator(u) {
          if (this._array.length !== 0 && (a = this._search(u), !(a < 0 || a >= this._array.length) && this._getKey(this._array[a]) === u)) do
            yield this._array[a];
          while (++a < this._array.length && this._getKey(this._array[a]) === u);
        }
        forEachByKey(u, p) {
          if (this._array.length !== 0 && (a = this._search(u), !(a < 0 || a >= this._array.length) && this._getKey(this._array[a]) === u)) do
            p(this._array[a]);
          while (++a < this._array.length && this._getKey(this._array[a]) === u);
        }
        values() {
          return [...this._array].values();
        }
        _search(u) {
          let p = 0, f = this._array.length - 1;
          for (; f >= p; ) {
            let g = p + f >> 1;
            const v = this._getKey(this._array[g]);
            if (v > u) f = g - 1;
            else {
              if (!(v < u)) {
                for (; g > 0 && this._getKey(this._array[g - 1]) === u; ) g--;
                return g;
              }
              p = g + 1;
            }
          }
          return p;
        }
      };
    }, 7226: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.DebouncedIdleTask = s.IdleTaskQueue = s.PriorityTaskQueue = void 0;
      const u = a(6114);
      class p {
        constructor() {
          this._tasks = [], this._i = 0;
        }
        enqueue(v) {
          this._tasks.push(v), this._start();
        }
        flush() {
          for (; this._i < this._tasks.length; ) this._tasks[this._i]() || this._i++;
          this.clear();
        }
        clear() {
          this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
        }
        _start() {
          this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
        }
        _process(v) {
          this._idleCallback = void 0;
          let C = 0, b = 0, d = v.timeRemaining(), m = 0;
          for (; this._i < this._tasks.length; ) {
            if (C = Date.now(), this._tasks[this._i]() || this._i++, C = Math.max(1, Date.now() - C), b = Math.max(C, b), m = v.timeRemaining(), 1.5 * b > m) return d - C < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d - C))}ms`), void this._start();
            d = m;
          }
          this.clear();
        }
      }
      class f extends p {
        _requestCallback(v) {
          return setTimeout(() => v(this._createDeadline(16)));
        }
        _cancelCallback(v) {
          clearTimeout(v);
        }
        _createDeadline(v) {
          const C = Date.now() + v;
          return { timeRemaining: () => Math.max(0, C - Date.now()) };
        }
      }
      s.PriorityTaskQueue = f, s.IdleTaskQueue = !u.isNode && "requestIdleCallback" in window ? class extends p {
        _requestCallback(g) {
          return requestIdleCallback(g);
        }
        _cancelCallback(g) {
          cancelIdleCallback(g);
        }
      } : f, s.DebouncedIdleTask = class {
        constructor() {
          this._queue = new s.IdleTaskQueue();
        }
        set(g) {
          this._queue.clear(), this._queue.enqueue(g);
        }
        flush() {
          this._queue.flush();
        }
      };
    }, 9282: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.updateWindowsModeWrappedState = void 0;
      const u = a(643);
      s.updateWindowsModeWrappedState = function(p) {
        const f = p.buffer.lines.get(p.buffer.ybase + p.buffer.y - 1), g = f?.get(p.cols - 1), v = p.buffer.lines.get(p.buffer.ybase + p.buffer.y);
        v && g && (v.isWrapped = g[u.CHAR_DATA_CODE_INDEX] !== u.NULL_CELL_CODE && g[u.CHAR_DATA_CODE_INDEX] !== u.WHITESPACE_CELL_CODE);
      };
    }, 3734: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.ExtendedAttrs = s.AttributeData = void 0;
      class a {
        constructor() {
          this.fg = 0, this.bg = 0, this.extended = new u();
        }
        static toColorRGB(f) {
          return [f >>> 16 & 255, f >>> 8 & 255, 255 & f];
        }
        static fromColorRGB(f) {
          return (255 & f[0]) << 16 | (255 & f[1]) << 8 | 255 & f[2];
        }
        clone() {
          const f = new a();
          return f.fg = this.fg, f.bg = this.bg, f.extended = this.extended.clone(), f;
        }
        isInverse() {
          return 67108864 & this.fg;
        }
        isBold() {
          return 134217728 & this.fg;
        }
        isUnderline() {
          return this.hasExtendedAttrs() && this.extended.underlineStyle !== 0 ? 1 : 268435456 & this.fg;
        }
        isBlink() {
          return 536870912 & this.fg;
        }
        isInvisible() {
          return 1073741824 & this.fg;
        }
        isItalic() {
          return 67108864 & this.bg;
        }
        isDim() {
          return 134217728 & this.bg;
        }
        isStrikethrough() {
          return 2147483648 & this.fg;
        }
        isProtected() {
          return 536870912 & this.bg;
        }
        isOverline() {
          return 1073741824 & this.bg;
        }
        getFgColorMode() {
          return 50331648 & this.fg;
        }
        getBgColorMode() {
          return 50331648 & this.bg;
        }
        isFgRGB() {
          return (50331648 & this.fg) == 50331648;
        }
        isBgRGB() {
          return (50331648 & this.bg) == 50331648;
        }
        isFgPalette() {
          return (50331648 & this.fg) == 16777216 || (50331648 & this.fg) == 33554432;
        }
        isBgPalette() {
          return (50331648 & this.bg) == 16777216 || (50331648 & this.bg) == 33554432;
        }
        isFgDefault() {
          return (50331648 & this.fg) == 0;
        }
        isBgDefault() {
          return (50331648 & this.bg) == 0;
        }
        isAttributeDefault() {
          return this.fg === 0 && this.bg === 0;
        }
        getFgColor() {
          switch (50331648 & this.fg) {
            case 16777216:
            case 33554432:
              return 255 & this.fg;
            case 50331648:
              return 16777215 & this.fg;
            default:
              return -1;
          }
        }
        getBgColor() {
          switch (50331648 & this.bg) {
            case 16777216:
            case 33554432:
              return 255 & this.bg;
            case 50331648:
              return 16777215 & this.bg;
            default:
              return -1;
          }
        }
        hasExtendedAttrs() {
          return 268435456 & this.bg;
        }
        updateExtended() {
          this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
        }
        getUnderlineColor() {
          if (268435456 & this.bg && ~this.extended.underlineColor) switch (50331648 & this.extended.underlineColor) {
            case 16777216:
            case 33554432:
              return 255 & this.extended.underlineColor;
            case 50331648:
              return 16777215 & this.extended.underlineColor;
            default:
              return this.getFgColor();
          }
          return this.getFgColor();
        }
        getUnderlineColorMode() {
          return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
        }
        isUnderlineColorRGB() {
          return 268435456 & this.bg && ~this.extended.underlineColor ? (50331648 & this.extended.underlineColor) == 50331648 : this.isFgRGB();
        }
        isUnderlineColorPalette() {
          return 268435456 & this.bg && ~this.extended.underlineColor ? (50331648 & this.extended.underlineColor) == 16777216 || (50331648 & this.extended.underlineColor) == 33554432 : this.isFgPalette();
        }
        isUnderlineColorDefault() {
          return 268435456 & this.bg && ~this.extended.underlineColor ? (50331648 & this.extended.underlineColor) == 0 : this.isFgDefault();
        }
        getUnderlineStyle() {
          return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
        }
        getUnderlineVariantOffset() {
          return this.extended.underlineVariantOffset;
        }
      }
      s.AttributeData = a;
      class u {
        get ext() {
          return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
        }
        set ext(f) {
          this._ext = f;
        }
        get underlineStyle() {
          return this._urlId ? 5 : (469762048 & this._ext) >> 26;
        }
        set underlineStyle(f) {
          this._ext &= -469762049, this._ext |= f << 26 & 469762048;
        }
        get underlineColor() {
          return 67108863 & this._ext;
        }
        set underlineColor(f) {
          this._ext &= -67108864, this._ext |= 67108863 & f;
        }
        get urlId() {
          return this._urlId;
        }
        set urlId(f) {
          this._urlId = f;
        }
        get underlineVariantOffset() {
          const f = (3758096384 & this._ext) >> 29;
          return f < 0 ? 4294967288 ^ f : f;
        }
        set underlineVariantOffset(f) {
          this._ext &= 536870911, this._ext |= f << 29 & 3758096384;
        }
        constructor(f = 0, g = 0) {
          this._ext = 0, this._urlId = 0, this._ext = f, this._urlId = g;
        }
        clone() {
          return new u(this._ext, this._urlId);
        }
        isEmpty() {
          return this.underlineStyle === 0 && this._urlId === 0;
        }
      }
      s.ExtendedAttrs = u;
    }, 9092: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.Buffer = s.MAX_BUFFER_SIZE = void 0;
      const u = a(6349), p = a(7226), f = a(3734), g = a(8437), v = a(4634), C = a(511), b = a(643), d = a(4863), m = a(7116);
      s.MAX_BUFFER_SIZE = 4294967295, s.Buffer = class {
        constructor(h, l, _) {
          this._hasScrollback = h, this._optionsService = l, this._bufferService = _, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = g.DEFAULT_ATTR_DATA.clone(), this.savedCharset = m.DEFAULT_CHARSET, this.markers = [], this._nullCell = C.CellData.fromCharData([0, b.NULL_CELL_CHAR, b.NULL_CELL_WIDTH, b.NULL_CELL_CODE]), this._whitespaceCell = C.CellData.fromCharData([0, b.WHITESPACE_CELL_CHAR, b.WHITESPACE_CELL_WIDTH, b.WHITESPACE_CELL_CODE]), this._isClearing = !1, this._memoryCleanupQueue = new p.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new u.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
        }
        getNullCell(h) {
          return h ? (this._nullCell.fg = h.fg, this._nullCell.bg = h.bg, this._nullCell.extended = h.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new f.ExtendedAttrs()), this._nullCell;
        }
        getWhitespaceCell(h) {
          return h ? (this._whitespaceCell.fg = h.fg, this._whitespaceCell.bg = h.bg, this._whitespaceCell.extended = h.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new f.ExtendedAttrs()), this._whitespaceCell;
        }
        getBlankLine(h, l) {
          return new g.BufferLine(this._bufferService.cols, this.getNullCell(h), l);
        }
        get hasScrollback() {
          return this._hasScrollback && this.lines.maxLength > this._rows;
        }
        get isCursorInViewport() {
          const h = this.ybase + this.y - this.ydisp;
          return h >= 0 && h < this._rows;
        }
        _getCorrectBufferLength(h) {
          if (!this._hasScrollback) return h;
          const l = h + this._optionsService.rawOptions.scrollback;
          return l > s.MAX_BUFFER_SIZE ? s.MAX_BUFFER_SIZE : l;
        }
        fillViewportRows(h) {
          if (this.lines.length === 0) {
            h === void 0 && (h = g.DEFAULT_ATTR_DATA);
            let l = this._rows;
            for (; l--; ) this.lines.push(this.getBlankLine(h));
          }
        }
        clear() {
          this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new u.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
        }
        resize(h, l) {
          const _ = this.getNullCell(g.DEFAULT_ATTR_DATA);
          let S = 0;
          const x = this._getCorrectBufferLength(l);
          if (x > this.lines.maxLength && (this.lines.maxLength = x), this.lines.length > 0) {
            if (this._cols < h) for (let y = 0; y < this.lines.length; y++) S += +this.lines.get(y).resize(h, _);
            let D = 0;
            if (this._rows < l) for (let y = this._rows; y < l; y++) this.lines.length < l + this.ybase && (this._optionsService.rawOptions.windowsMode || this._optionsService.rawOptions.windowsPty.backend !== void 0 || this._optionsService.rawOptions.windowsPty.buildNumber !== void 0 ? this.lines.push(new g.BufferLine(h, _)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + D + 1 ? (this.ybase--, D++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new g.BufferLine(h, _)));
            else for (let y = this._rows; y > l; y--) this.lines.length > l + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
            if (x < this.lines.maxLength) {
              const y = this.lines.length - x;
              y > 0 && (this.lines.trimStart(y), this.ybase = Math.max(this.ybase - y, 0), this.ydisp = Math.max(this.ydisp - y, 0), this.savedY = Math.max(this.savedY - y, 0)), this.lines.maxLength = x;
            }
            this.x = Math.min(this.x, h - 1), this.y = Math.min(this.y, l - 1), D && (this.y += D), this.savedX = Math.min(this.savedX, h - 1), this.scrollTop = 0;
          }
          if (this.scrollBottom = l - 1, this._isReflowEnabled && (this._reflow(h, l), this._cols > h)) for (let D = 0; D < this.lines.length; D++) S += +this.lines.get(D).resize(h, _);
          this._cols = h, this._rows = l, this._memoryCleanupQueue.clear(), S > 0.1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue(() => this._batchedMemoryCleanup()));
        }
        _batchedMemoryCleanup() {
          let h = !0;
          this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0, h = !1);
          let l = 0;
          for (; this._memoryCleanupPosition < this.lines.length; ) if (l += this.lines.get(this._memoryCleanupPosition++).cleanupMemory(), l > 100) return !0;
          return h;
        }
        get _isReflowEnabled() {
          const h = this._optionsService.rawOptions.windowsPty;
          return h && h.buildNumber ? this._hasScrollback && h.backend === "conpty" && h.buildNumber >= 21376 : this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
        }
        _reflow(h, l) {
          this._cols !== h && (h > this._cols ? this._reflowLarger(h, l) : this._reflowSmaller(h, l));
        }
        _reflowLarger(h, l) {
          const _ = (0, v.reflowLargerGetLinesToRemove)(this.lines, this._cols, h, this.ybase + this.y, this.getNullCell(g.DEFAULT_ATTR_DATA));
          if (_.length > 0) {
            const S = (0, v.reflowLargerCreateNewLayout)(this.lines, _);
            (0, v.reflowLargerApplyNewLayout)(this.lines, S.layout), this._reflowLargerAdjustViewport(h, l, S.countRemoved);
          }
        }
        _reflowLargerAdjustViewport(h, l, _) {
          const S = this.getNullCell(g.DEFAULT_ATTR_DATA);
          let x = _;
          for (; x-- > 0; ) this.ybase === 0 ? (this.y > 0 && this.y--, this.lines.length < l && this.lines.push(new g.BufferLine(h, S))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
          this.savedY = Math.max(this.savedY - _, 0);
        }
        _reflowSmaller(h, l) {
          const _ = this.getNullCell(g.DEFAULT_ATTR_DATA), S = [];
          let x = 0;
          for (let D = this.lines.length - 1; D >= 0; D--) {
            let y = this.lines.get(D);
            if (!y || !y.isWrapped && y.getTrimmedLength() <= h) continue;
            const E = [y];
            for (; y.isWrapped && D > 0; ) y = this.lines.get(--D), E.unshift(y);
            const B = this.ybase + this.y;
            if (B >= D && B < D + E.length) continue;
            const O = E[E.length - 1].getTrimmedLength(), N = (0, v.reflowSmallerGetNewLineLengths)(E, this._cols, h), R = N.length - E.length;
            let j;
            j = this.ybase === 0 && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + R) : Math.max(0, this.lines.length - this.lines.maxLength + R);
            const Y = [];
            for (let I = 0; I < R; I++) {
              const H = this.getBlankLine(g.DEFAULT_ATTR_DATA, !0);
              Y.push(H);
            }
            Y.length > 0 && (S.push({ start: D + E.length + x, newLines: Y }), x += Y.length), E.push(...Y);
            let ee = N.length - 1, ne = N[ee];
            ne === 0 && (ee--, ne = N[ee]);
            let Z = E.length - R - 1, T = O;
            for (; Z >= 0; ) {
              const I = Math.min(T, ne);
              if (E[ee] === void 0) break;
              if (E[ee].copyCellsFrom(E[Z], T - I, ne - I, I, !0), ne -= I, ne === 0 && (ee--, ne = N[ee]), T -= I, T === 0) {
                Z--;
                const H = Math.max(Z, 0);
                T = (0, v.getWrappedLineTrimmedLength)(E, H, this._cols);
              }
            }
            for (let I = 0; I < E.length; I++) N[I] < h && E[I].setCell(N[I], _);
            let L = R - j;
            for (; L-- > 0; ) this.ybase === 0 ? this.y < l - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + x) - l && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
            this.savedY = Math.min(this.savedY + R, this.ybase + l - 1);
          }
          if (S.length > 0) {
            const D = [], y = [];
            for (let ee = 0; ee < this.lines.length; ee++) y.push(this.lines.get(ee));
            const E = this.lines.length;
            let B = E - 1, O = 0, N = S[O];
            this.lines.length = Math.min(this.lines.maxLength, this.lines.length + x);
            let R = 0;
            for (let ee = Math.min(this.lines.maxLength - 1, E + x - 1); ee >= 0; ee--) if (N && N.start > B + R) {
              for (let ne = N.newLines.length - 1; ne >= 0; ne--) this.lines.set(ee--, N.newLines[ne]);
              ee++, D.push({ index: B + 1, amount: N.newLines.length }), R += N.newLines.length, N = S[++O];
            } else this.lines.set(ee, y[B--]);
            let j = 0;
            for (let ee = D.length - 1; ee >= 0; ee--) D[ee].index += j, this.lines.onInsertEmitter.fire(D[ee]), j += D[ee].amount;
            const Y = Math.max(0, E + x - this.lines.maxLength);
            Y > 0 && this.lines.onTrimEmitter.fire(Y);
          }
        }
        translateBufferLineToString(h, l, _ = 0, S) {
          const x = this.lines.get(h);
          return x ? x.translateToString(l, _, S) : "";
        }
        getWrappedRangeForLine(h) {
          let l = h, _ = h;
          for (; l > 0 && this.lines.get(l).isWrapped; ) l--;
          for (; _ + 1 < this.lines.length && this.lines.get(_ + 1).isWrapped; ) _++;
          return { first: l, last: _ };
        }
        setupTabStops(h) {
          for (h != null ? this.tabs[h] || (h = this.prevStop(h)) : (this.tabs = {}, h = 0); h < this._cols; h += this._optionsService.rawOptions.tabStopWidth) this.tabs[h] = !0;
        }
        prevStop(h) {
          for (h == null && (h = this.x); !this.tabs[--h] && h > 0; ) ;
          return h >= this._cols ? this._cols - 1 : h < 0 ? 0 : h;
        }
        nextStop(h) {
          for (h == null && (h = this.x); !this.tabs[++h] && h < this._cols; ) ;
          return h >= this._cols ? this._cols - 1 : h < 0 ? 0 : h;
        }
        clearMarkers(h) {
          this._isClearing = !0;
          for (let l = 0; l < this.markers.length; l++) this.markers[l].line === h && (this.markers[l].dispose(), this.markers.splice(l--, 1));
          this._isClearing = !1;
        }
        clearAllMarkers() {
          this._isClearing = !0;
          for (let h = 0; h < this.markers.length; h++) this.markers[h].dispose(), this.markers.splice(h--, 1);
          this._isClearing = !1;
        }
        addMarker(h) {
          const l = new d.Marker(h);
          return this.markers.push(l), l.register(this.lines.onTrim((_) => {
            l.line -= _, l.line < 0 && l.dispose();
          })), l.register(this.lines.onInsert((_) => {
            l.line >= _.index && (l.line += _.amount);
          })), l.register(this.lines.onDelete((_) => {
            l.line >= _.index && l.line < _.index + _.amount && l.dispose(), l.line > _.index && (l.line -= _.amount);
          })), l.register(l.onDispose(() => this._removeMarker(l))), l;
        }
        _removeMarker(h) {
          this._isClearing || this.markers.splice(this.markers.indexOf(h), 1);
        }
      };
    }, 8437: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.BufferLine = s.DEFAULT_ATTR_DATA = void 0;
      const u = a(3734), p = a(511), f = a(643), g = a(482);
      s.DEFAULT_ATTR_DATA = Object.freeze(new u.AttributeData());
      let v = 0;
      class C {
        constructor(d, m, h = !1) {
          this.isWrapped = h, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * d);
          const l = m || p.CellData.fromCharData([0, f.NULL_CELL_CHAR, f.NULL_CELL_WIDTH, f.NULL_CELL_CODE]);
          for (let _ = 0; _ < d; ++_) this.setCell(_, l);
          this.length = d;
        }
        get(d) {
          const m = this._data[3 * d + 0], h = 2097151 & m;
          return [this._data[3 * d + 1], 2097152 & m ? this._combined[d] : h ? (0, g.stringFromCodePoint)(h) : "", m >> 22, 2097152 & m ? this._combined[d].charCodeAt(this._combined[d].length - 1) : h];
        }
        set(d, m) {
          this._data[3 * d + 1] = m[f.CHAR_DATA_ATTR_INDEX], m[f.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[d] = m[1], this._data[3 * d + 0] = 2097152 | d | m[f.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * d + 0] = m[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | m[f.CHAR_DATA_WIDTH_INDEX] << 22;
        }
        getWidth(d) {
          return this._data[3 * d + 0] >> 22;
        }
        hasWidth(d) {
          return 12582912 & this._data[3 * d + 0];
        }
        getFg(d) {
          return this._data[3 * d + 1];
        }
        getBg(d) {
          return this._data[3 * d + 2];
        }
        hasContent(d) {
          return 4194303 & this._data[3 * d + 0];
        }
        getCodePoint(d) {
          const m = this._data[3 * d + 0];
          return 2097152 & m ? this._combined[d].charCodeAt(this._combined[d].length - 1) : 2097151 & m;
        }
        isCombined(d) {
          return 2097152 & this._data[3 * d + 0];
        }
        getString(d) {
          const m = this._data[3 * d + 0];
          return 2097152 & m ? this._combined[d] : 2097151 & m ? (0, g.stringFromCodePoint)(2097151 & m) : "";
        }
        isProtected(d) {
          return 536870912 & this._data[3 * d + 2];
        }
        loadCell(d, m) {
          return v = 3 * d, m.content = this._data[v + 0], m.fg = this._data[v + 1], m.bg = this._data[v + 2], 2097152 & m.content && (m.combinedData = this._combined[d]), 268435456 & m.bg && (m.extended = this._extendedAttrs[d]), m;
        }
        setCell(d, m) {
          2097152 & m.content && (this._combined[d] = m.combinedData), 268435456 & m.bg && (this._extendedAttrs[d] = m.extended), this._data[3 * d + 0] = m.content, this._data[3 * d + 1] = m.fg, this._data[3 * d + 2] = m.bg;
        }
        setCellFromCodepoint(d, m, h, l) {
          268435456 & l.bg && (this._extendedAttrs[d] = l.extended), this._data[3 * d + 0] = m | h << 22, this._data[3 * d + 1] = l.fg, this._data[3 * d + 2] = l.bg;
        }
        addCodepointToCell(d, m, h) {
          let l = this._data[3 * d + 0];
          2097152 & l ? this._combined[d] += (0, g.stringFromCodePoint)(m) : 2097151 & l ? (this._combined[d] = (0, g.stringFromCodePoint)(2097151 & l) + (0, g.stringFromCodePoint)(m), l &= -2097152, l |= 2097152) : l = m | 4194304, h && (l &= -12582913, l |= h << 22), this._data[3 * d + 0] = l;
        }
        insertCells(d, m, h) {
          if ((d %= this.length) && this.getWidth(d - 1) === 2 && this.setCellFromCodepoint(d - 1, 0, 1, h), m < this.length - d) {
            const l = new p.CellData();
            for (let _ = this.length - d - m - 1; _ >= 0; --_) this.setCell(d + m + _, this.loadCell(d + _, l));
            for (let _ = 0; _ < m; ++_) this.setCell(d + _, h);
          } else for (let l = d; l < this.length; ++l) this.setCell(l, h);
          this.getWidth(this.length - 1) === 2 && this.setCellFromCodepoint(this.length - 1, 0, 1, h);
        }
        deleteCells(d, m, h) {
          if (d %= this.length, m < this.length - d) {
            const l = new p.CellData();
            for (let _ = 0; _ < this.length - d - m; ++_) this.setCell(d + _, this.loadCell(d + m + _, l));
            for (let _ = this.length - m; _ < this.length; ++_) this.setCell(_, h);
          } else for (let l = d; l < this.length; ++l) this.setCell(l, h);
          d && this.getWidth(d - 1) === 2 && this.setCellFromCodepoint(d - 1, 0, 1, h), this.getWidth(d) !== 0 || this.hasContent(d) || this.setCellFromCodepoint(d, 0, 1, h);
        }
        replaceCells(d, m, h, l = !1) {
          if (l) for (d && this.getWidth(d - 1) === 2 && !this.isProtected(d - 1) && this.setCellFromCodepoint(d - 1, 0, 1, h), m < this.length && this.getWidth(m - 1) === 2 && !this.isProtected(m) && this.setCellFromCodepoint(m, 0, 1, h); d < m && d < this.length; ) this.isProtected(d) || this.setCell(d, h), d++;
          else for (d && this.getWidth(d - 1) === 2 && this.setCellFromCodepoint(d - 1, 0, 1, h), m < this.length && this.getWidth(m - 1) === 2 && this.setCellFromCodepoint(m, 0, 1, h); d < m && d < this.length; ) this.setCell(d++, h);
        }
        resize(d, m) {
          if (d === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
          const h = 3 * d;
          if (d > this.length) {
            if (this._data.buffer.byteLength >= 4 * h) this._data = new Uint32Array(this._data.buffer, 0, h);
            else {
              const l = new Uint32Array(h);
              l.set(this._data), this._data = l;
            }
            for (let l = this.length; l < d; ++l) this.setCell(l, m);
          } else {
            this._data = this._data.subarray(0, h);
            const l = Object.keys(this._combined);
            for (let S = 0; S < l.length; S++) {
              const x = parseInt(l[S], 10);
              x >= d && delete this._combined[x];
            }
            const _ = Object.keys(this._extendedAttrs);
            for (let S = 0; S < _.length; S++) {
              const x = parseInt(_[S], 10);
              x >= d && delete this._extendedAttrs[x];
            }
          }
          return this.length = d, 4 * h * 2 < this._data.buffer.byteLength;
        }
        cleanupMemory() {
          if (4 * this._data.length * 2 < this._data.buffer.byteLength) {
            const d = new Uint32Array(this._data.length);
            return d.set(this._data), this._data = d, 1;
          }
          return 0;
        }
        fill(d, m = !1) {
          if (m) for (let h = 0; h < this.length; ++h) this.isProtected(h) || this.setCell(h, d);
          else {
            this._combined = {}, this._extendedAttrs = {};
            for (let h = 0; h < this.length; ++h) this.setCell(h, d);
          }
        }
        copyFrom(d) {
          this.length !== d.length ? this._data = new Uint32Array(d._data) : this._data.set(d._data), this.length = d.length, this._combined = {};
          for (const m in d._combined) this._combined[m] = d._combined[m];
          this._extendedAttrs = {};
          for (const m in d._extendedAttrs) this._extendedAttrs[m] = d._extendedAttrs[m];
          this.isWrapped = d.isWrapped;
        }
        clone() {
          const d = new C(0);
          d._data = new Uint32Array(this._data), d.length = this.length;
          for (const m in this._combined) d._combined[m] = this._combined[m];
          for (const m in this._extendedAttrs) d._extendedAttrs[m] = this._extendedAttrs[m];
          return d.isWrapped = this.isWrapped, d;
        }
        getTrimmedLength() {
          for (let d = this.length - 1; d >= 0; --d) if (4194303 & this._data[3 * d + 0]) return d + (this._data[3 * d + 0] >> 22);
          return 0;
        }
        getNoBgTrimmedLength() {
          for (let d = this.length - 1; d >= 0; --d) if (4194303 & this._data[3 * d + 0] || 50331648 & this._data[3 * d + 2]) return d + (this._data[3 * d + 0] >> 22);
          return 0;
        }
        copyCellsFrom(d, m, h, l, _) {
          const S = d._data;
          if (_) for (let D = l - 1; D >= 0; D--) {
            for (let y = 0; y < 3; y++) this._data[3 * (h + D) + y] = S[3 * (m + D) + y];
            268435456 & S[3 * (m + D) + 2] && (this._extendedAttrs[h + D] = d._extendedAttrs[m + D]);
          }
          else for (let D = 0; D < l; D++) {
            for (let y = 0; y < 3; y++) this._data[3 * (h + D) + y] = S[3 * (m + D) + y];
            268435456 & S[3 * (m + D) + 2] && (this._extendedAttrs[h + D] = d._extendedAttrs[m + D]);
          }
          const x = Object.keys(d._combined);
          for (let D = 0; D < x.length; D++) {
            const y = parseInt(x[D], 10);
            y >= m && (this._combined[y - m + h] = d._combined[y]);
          }
        }
        translateToString(d, m, h, l) {
          m = m ?? 0, h = h ?? this.length, d && (h = Math.min(h, this.getTrimmedLength())), l && (l.length = 0);
          let _ = "";
          for (; m < h; ) {
            const S = this._data[3 * m + 0], x = 2097151 & S, D = 2097152 & S ? this._combined[m] : x ? (0, g.stringFromCodePoint)(x) : f.WHITESPACE_CELL_CHAR;
            if (_ += D, l) for (let y = 0; y < D.length; ++y) l.push(m);
            m += S >> 22 || 1;
          }
          return l && l.push(m), _;
        }
      }
      s.BufferLine = C;
    }, 4841: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.getRangeLength = void 0, s.getRangeLength = function(a, u) {
        if (a.start.y > a.end.y) throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);
        return u * (a.end.y - a.start.y) + (a.end.x - a.start.x + 1);
      };
    }, 4634: (c, s) => {
      function a(u, p, f) {
        if (p === u.length - 1) return u[p].getTrimmedLength();
        const g = !u[p].hasContent(f - 1) && u[p].getWidth(f - 1) === 1, v = u[p + 1].getWidth(0) === 2;
        return g && v ? f - 1 : f;
      }
      Object.defineProperty(s, "__esModule", { value: !0 }), s.getWrappedLineTrimmedLength = s.reflowSmallerGetNewLineLengths = s.reflowLargerApplyNewLayout = s.reflowLargerCreateNewLayout = s.reflowLargerGetLinesToRemove = void 0, s.reflowLargerGetLinesToRemove = function(u, p, f, g, v) {
        const C = [];
        for (let b = 0; b < u.length - 1; b++) {
          let d = b, m = u.get(++d);
          if (!m.isWrapped) continue;
          const h = [u.get(b)];
          for (; d < u.length && m.isWrapped; ) h.push(m), m = u.get(++d);
          if (g >= b && g < d) {
            b += h.length - 1;
            continue;
          }
          let l = 0, _ = a(h, l, p), S = 1, x = 0;
          for (; S < h.length; ) {
            const y = a(h, S, p), E = y - x, B = f - _, O = Math.min(E, B);
            h[l].copyCellsFrom(h[S], x, _, O, !1), _ += O, _ === f && (l++, _ = 0), x += O, x === y && (S++, x = 0), _ === 0 && l !== 0 && h[l - 1].getWidth(f - 1) === 2 && (h[l].copyCellsFrom(h[l - 1], f - 1, _++, 1, !1), h[l - 1].setCell(f - 1, v));
          }
          h[l].replaceCells(_, f, v);
          let D = 0;
          for (let y = h.length - 1; y > 0 && (y > l || h[y].getTrimmedLength() === 0); y--) D++;
          D > 0 && (C.push(b + h.length - D), C.push(D)), b += h.length - 1;
        }
        return C;
      }, s.reflowLargerCreateNewLayout = function(u, p) {
        const f = [];
        let g = 0, v = p[g], C = 0;
        for (let b = 0; b < u.length; b++) if (v === b) {
          const d = p[++g];
          u.onDeleteEmitter.fire({ index: b - C, amount: d }), b += d - 1, C += d, v = p[++g];
        } else f.push(b);
        return { layout: f, countRemoved: C };
      }, s.reflowLargerApplyNewLayout = function(u, p) {
        const f = [];
        for (let g = 0; g < p.length; g++) f.push(u.get(p[g]));
        for (let g = 0; g < f.length; g++) u.set(g, f[g]);
        u.length = p.length;
      }, s.reflowSmallerGetNewLineLengths = function(u, p, f) {
        const g = [], v = u.map((m, h) => a(u, h, p)).reduce((m, h) => m + h);
        let C = 0, b = 0, d = 0;
        for (; d < v; ) {
          if (v - d < f) {
            g.push(v - d);
            break;
          }
          C += f;
          const m = a(u, b, p);
          C > m && (C -= m, b++);
          const h = u[b].getWidth(C - 1) === 2;
          h && C--;
          const l = h ? f - 1 : f;
          g.push(l), d += l;
        }
        return g;
      }, s.getWrappedLineTrimmedLength = a;
    }, 5295: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.BufferSet = void 0;
      const u = a(8460), p = a(844), f = a(9092);
      class g extends p.Disposable {
        constructor(C, b) {
          super(), this._optionsService = C, this._bufferService = b, this._onBufferActivate = this.register(new u.EventEmitter()), this.onBufferActivate = this._onBufferActivate.event, this.reset(), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.resize(this._bufferService.cols, this._bufferService.rows))), this.register(this._optionsService.onSpecificOptionChange("tabStopWidth", () => this.setupTabStops()));
        }
        reset() {
          this._normal = new f.Buffer(!0, this._optionsService, this._bufferService), this._normal.fillViewportRows(), this._alt = new f.Buffer(!1, this._optionsService, this._bufferService), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }), this.setupTabStops();
        }
        get alt() {
          return this._alt;
        }
        get active() {
          return this._activeBuffer;
        }
        get normal() {
          return this._normal;
        }
        activateNormalBuffer() {
          this._activeBuffer !== this._normal && (this._normal.x = this._alt.x, this._normal.y = this._alt.y, this._alt.clearAllMarkers(), this._alt.clear(), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }));
        }
        activateAltBuffer(C) {
          this._activeBuffer !== this._alt && (this._alt.fillViewportRows(C), this._alt.x = this._normal.x, this._alt.y = this._normal.y, this._activeBuffer = this._alt, this._onBufferActivate.fire({ activeBuffer: this._alt, inactiveBuffer: this._normal }));
        }
        resize(C, b) {
          this._normal.resize(C, b), this._alt.resize(C, b), this.setupTabStops(C);
        }
        setupTabStops(C) {
          this._normal.setupTabStops(C), this._alt.setupTabStops(C);
        }
      }
      s.BufferSet = g;
    }, 511: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CellData = void 0;
      const u = a(482), p = a(643), f = a(3734);
      class g extends f.AttributeData {
        constructor() {
          super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new f.ExtendedAttrs(), this.combinedData = "";
        }
        static fromCharData(C) {
          const b = new g();
          return b.setFromCharData(C), b;
        }
        isCombined() {
          return 2097152 & this.content;
        }
        getWidth() {
          return this.content >> 22;
        }
        getChars() {
          return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, u.stringFromCodePoint)(2097151 & this.content) : "";
        }
        getCode() {
          return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
        }
        setFromCharData(C) {
          this.fg = C[p.CHAR_DATA_ATTR_INDEX], this.bg = 0;
          let b = !1;
          if (C[p.CHAR_DATA_CHAR_INDEX].length > 2) b = !0;
          else if (C[p.CHAR_DATA_CHAR_INDEX].length === 2) {
            const d = C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
            if (55296 <= d && d <= 56319) {
              const m = C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
              56320 <= m && m <= 57343 ? this.content = 1024 * (d - 55296) + m - 56320 + 65536 | C[p.CHAR_DATA_WIDTH_INDEX] << 22 : b = !0;
            } else b = !0;
          } else this.content = C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | C[p.CHAR_DATA_WIDTH_INDEX] << 22;
          b && (this.combinedData = C[p.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | C[p.CHAR_DATA_WIDTH_INDEX] << 22);
        }
        getAsCharData() {
          return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
        }
      }
      s.CellData = g;
    }, 643: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.WHITESPACE_CELL_CODE = s.WHITESPACE_CELL_WIDTH = s.WHITESPACE_CELL_CHAR = s.NULL_CELL_CODE = s.NULL_CELL_WIDTH = s.NULL_CELL_CHAR = s.CHAR_DATA_CODE_INDEX = s.CHAR_DATA_WIDTH_INDEX = s.CHAR_DATA_CHAR_INDEX = s.CHAR_DATA_ATTR_INDEX = s.DEFAULT_EXT = s.DEFAULT_ATTR = s.DEFAULT_COLOR = void 0, s.DEFAULT_COLOR = 0, s.DEFAULT_ATTR = 256 | s.DEFAULT_COLOR << 9, s.DEFAULT_EXT = 0, s.CHAR_DATA_ATTR_INDEX = 0, s.CHAR_DATA_CHAR_INDEX = 1, s.CHAR_DATA_WIDTH_INDEX = 2, s.CHAR_DATA_CODE_INDEX = 3, s.NULL_CELL_CHAR = "", s.NULL_CELL_WIDTH = 1, s.NULL_CELL_CODE = 0, s.WHITESPACE_CELL_CHAR = " ", s.WHITESPACE_CELL_WIDTH = 1, s.WHITESPACE_CELL_CODE = 32;
    }, 4863: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.Marker = void 0;
      const u = a(8460), p = a(844);
      class f {
        get id() {
          return this._id;
        }
        constructor(v) {
          this.line = v, this.isDisposed = !1, this._disposables = [], this._id = f._nextId++, this._onDispose = this.register(new u.EventEmitter()), this.onDispose = this._onDispose.event;
        }
        dispose() {
          this.isDisposed || (this.isDisposed = !0, this.line = -1, this._onDispose.fire(), (0, p.disposeArray)(this._disposables), this._disposables.length = 0);
        }
        register(v) {
          return this._disposables.push(v), v;
        }
      }
      s.Marker = f, f._nextId = 1;
    }, 7116: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.DEFAULT_CHARSET = s.CHARSETS = void 0, s.CHARSETS = {}, s.DEFAULT_CHARSET = s.CHARSETS.B, s.CHARSETS[0] = { "`": "◆", a: "▒", b: "␉", c: "␌", d: "␍", e: "␊", f: "°", g: "±", h: "␤", i: "␋", j: "┘", k: "┐", l: "┌", m: "└", n: "┼", o: "⎺", p: "⎻", q: "─", r: "⎼", s: "⎽", t: "├", u: "┤", v: "┴", w: "┬", x: "│", y: "≤", z: "≥", "{": "π", "|": "≠", "}": "£", "~": "·" }, s.CHARSETS.A = { "#": "£" }, s.CHARSETS.B = void 0, s.CHARSETS[4] = { "#": "£", "@": "¾", "[": "ij", "\\": "½", "]": "|", "{": "¨", "|": "f", "}": "¼", "~": "´" }, s.CHARSETS.C = s.CHARSETS[5] = { "[": "Ä", "\\": "Ö", "]": "Å", "^": "Ü", "`": "é", "{": "ä", "|": "ö", "}": "å", "~": "ü" }, s.CHARSETS.R = { "#": "£", "@": "à", "[": "°", "\\": "ç", "]": "§", "{": "é", "|": "ù", "}": "è", "~": "¨" }, s.CHARSETS.Q = { "@": "à", "[": "â", "\\": "ç", "]": "ê", "^": "î", "`": "ô", "{": "é", "|": "ù", "}": "è", "~": "û" }, s.CHARSETS.K = { "@": "§", "[": "Ä", "\\": "Ö", "]": "Ü", "{": "ä", "|": "ö", "}": "ü", "~": "ß" }, s.CHARSETS.Y = { "#": "£", "@": "§", "[": "°", "\\": "ç", "]": "é", "`": "ù", "{": "à", "|": "ò", "}": "è", "~": "ì" }, s.CHARSETS.E = s.CHARSETS[6] = { "@": "Ä", "[": "Æ", "\\": "Ø", "]": "Å", "^": "Ü", "`": "ä", "{": "æ", "|": "ø", "}": "å", "~": "ü" }, s.CHARSETS.Z = { "#": "£", "@": "§", "[": "¡", "\\": "Ñ", "]": "¿", "{": "°", "|": "ñ", "}": "ç" }, s.CHARSETS.H = s.CHARSETS[7] = { "@": "É", "[": "Ä", "\\": "Ö", "]": "Å", "^": "Ü", "`": "é", "{": "ä", "|": "ö", "}": "å", "~": "ü" }, s.CHARSETS["="] = { "#": "ù", "@": "à", "[": "é", "\\": "ç", "]": "ê", "^": "î", _: "è", "`": "ô", "{": "ä", "|": "ö", "}": "ü", "~": "û" };
    }, 2584: (c, s) => {
      var a, u, p;
      Object.defineProperty(s, "__esModule", { value: !0 }), s.C1_ESCAPED = s.C1 = s.C0 = void 0, function(f) {
        f.NUL = "\0", f.SOH = "", f.STX = "", f.ETX = "", f.EOT = "", f.ENQ = "", f.ACK = "", f.BEL = "\x07", f.BS = "\b", f.HT = "	", f.LF = `
`, f.VT = "\v", f.FF = "\f", f.CR = "\r", f.SO = "", f.SI = "", f.DLE = "", f.DC1 = "", f.DC2 = "", f.DC3 = "", f.DC4 = "", f.NAK = "", f.SYN = "", f.ETB = "", f.CAN = "", f.EM = "", f.SUB = "", f.ESC = "\x1B", f.FS = "", f.GS = "", f.RS = "", f.US = "", f.SP = " ", f.DEL = "";
      }(a || (s.C0 = a = {})), function(f) {
        f.PAD = "", f.HOP = "", f.BPH = "", f.NBH = "", f.IND = "", f.NEL = "", f.SSA = "", f.ESA = "", f.HTS = "", f.HTJ = "", f.VTS = "", f.PLD = "", f.PLU = "", f.RI = "", f.SS2 = "", f.SS3 = "", f.DCS = "", f.PU1 = "", f.PU2 = "", f.STS = "", f.CCH = "", f.MW = "", f.SPA = "", f.EPA = "", f.SOS = "", f.SGCI = "", f.SCI = "", f.CSI = "", f.ST = "", f.OSC = "", f.PM = "", f.APC = "";
      }(u || (s.C1 = u = {})), function(f) {
        f.ST = `${a.ESC}\\`;
      }(p || (s.C1_ESCAPED = p = {}));
    }, 7399: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.evaluateKeyboardEvent = void 0;
      const u = a(2584), p = { 48: ["0", ")"], 49: ["1", "!"], 50: ["2", "@"], 51: ["3", "#"], 52: ["4", "$"], 53: ["5", "%"], 54: ["6", "^"], 55: ["7", "&"], 56: ["8", "*"], 57: ["9", "("], 186: [";", ":"], 187: ["=", "+"], 188: [",", "<"], 189: ["-", "_"], 190: [".", ">"], 191: ["/", "?"], 192: ["`", "~"], 219: ["[", "{"], 220: ["\\", "|"], 221: ["]", "}"], 222: ["'", '"'] };
      s.evaluateKeyboardEvent = function(f, g, v, C) {
        const b = { type: 0, cancel: !1, key: void 0 }, d = (f.shiftKey ? 1 : 0) | (f.altKey ? 2 : 0) | (f.ctrlKey ? 4 : 0) | (f.metaKey ? 8 : 0);
        switch (f.keyCode) {
          case 0:
            f.key === "UIKeyInputUpArrow" ? b.key = g ? u.C0.ESC + "OA" : u.C0.ESC + "[A" : f.key === "UIKeyInputLeftArrow" ? b.key = g ? u.C0.ESC + "OD" : u.C0.ESC + "[D" : f.key === "UIKeyInputRightArrow" ? b.key = g ? u.C0.ESC + "OC" : u.C0.ESC + "[C" : f.key === "UIKeyInputDownArrow" && (b.key = g ? u.C0.ESC + "OB" : u.C0.ESC + "[B");
            break;
          case 8:
            b.key = f.ctrlKey ? "\b" : u.C0.DEL, f.altKey && (b.key = u.C0.ESC + b.key);
            break;
          case 9:
            if (f.shiftKey) {
              b.key = u.C0.ESC + "[Z";
              break;
            }
            b.key = u.C0.HT, b.cancel = !0;
            break;
          case 13:
            b.key = f.altKey ? u.C0.ESC + u.C0.CR : u.C0.CR, b.cancel = !0;
            break;
          case 27:
            b.key = u.C0.ESC, f.altKey && (b.key = u.C0.ESC + u.C0.ESC), b.cancel = !0;
            break;
          case 37:
            if (f.metaKey) break;
            d ? (b.key = u.C0.ESC + "[1;" + (d + 1) + "D", b.key === u.C0.ESC + "[1;3D" && (b.key = u.C0.ESC + (v ? "b" : "[1;5D"))) : b.key = g ? u.C0.ESC + "OD" : u.C0.ESC + "[D";
            break;
          case 39:
            if (f.metaKey) break;
            d ? (b.key = u.C0.ESC + "[1;" + (d + 1) + "C", b.key === u.C0.ESC + "[1;3C" && (b.key = u.C0.ESC + (v ? "f" : "[1;5C"))) : b.key = g ? u.C0.ESC + "OC" : u.C0.ESC + "[C";
            break;
          case 38:
            if (f.metaKey) break;
            d ? (b.key = u.C0.ESC + "[1;" + (d + 1) + "A", v || b.key !== u.C0.ESC + "[1;3A" || (b.key = u.C0.ESC + "[1;5A")) : b.key = g ? u.C0.ESC + "OA" : u.C0.ESC + "[A";
            break;
          case 40:
            if (f.metaKey) break;
            d ? (b.key = u.C0.ESC + "[1;" + (d + 1) + "B", v || b.key !== u.C0.ESC + "[1;3B" || (b.key = u.C0.ESC + "[1;5B")) : b.key = g ? u.C0.ESC + "OB" : u.C0.ESC + "[B";
            break;
          case 45:
            f.shiftKey || f.ctrlKey || (b.key = u.C0.ESC + "[2~");
            break;
          case 46:
            b.key = d ? u.C0.ESC + "[3;" + (d + 1) + "~" : u.C0.ESC + "[3~";
            break;
          case 36:
            b.key = d ? u.C0.ESC + "[1;" + (d + 1) + "H" : g ? u.C0.ESC + "OH" : u.C0.ESC + "[H";
            break;
          case 35:
            b.key = d ? u.C0.ESC + "[1;" + (d + 1) + "F" : g ? u.C0.ESC + "OF" : u.C0.ESC + "[F";
            break;
          case 33:
            f.shiftKey ? b.type = 2 : f.ctrlKey ? b.key = u.C0.ESC + "[5;" + (d + 1) + "~" : b.key = u.C0.ESC + "[5~";
            break;
          case 34:
            f.shiftKey ? b.type = 3 : f.ctrlKey ? b.key = u.C0.ESC + "[6;" + (d + 1) + "~" : b.key = u.C0.ESC + "[6~";
            break;
          case 112:
            b.key = d ? u.C0.ESC + "[1;" + (d + 1) + "P" : u.C0.ESC + "OP";
            break;
          case 113:
            b.key = d ? u.C0.ESC + "[1;" + (d + 1) + "Q" : u.C0.ESC + "OQ";
            break;
          case 114:
            b.key = d ? u.C0.ESC + "[1;" + (d + 1) + "R" : u.C0.ESC + "OR";
            break;
          case 115:
            b.key = d ? u.C0.ESC + "[1;" + (d + 1) + "S" : u.C0.ESC + "OS";
            break;
          case 116:
            b.key = d ? u.C0.ESC + "[15;" + (d + 1) + "~" : u.C0.ESC + "[15~";
            break;
          case 117:
            b.key = d ? u.C0.ESC + "[17;" + (d + 1) + "~" : u.C0.ESC + "[17~";
            break;
          case 118:
            b.key = d ? u.C0.ESC + "[18;" + (d + 1) + "~" : u.C0.ESC + "[18~";
            break;
          case 119:
            b.key = d ? u.C0.ESC + "[19;" + (d + 1) + "~" : u.C0.ESC + "[19~";
            break;
          case 120:
            b.key = d ? u.C0.ESC + "[20;" + (d + 1) + "~" : u.C0.ESC + "[20~";
            break;
          case 121:
            b.key = d ? u.C0.ESC + "[21;" + (d + 1) + "~" : u.C0.ESC + "[21~";
            break;
          case 122:
            b.key = d ? u.C0.ESC + "[23;" + (d + 1) + "~" : u.C0.ESC + "[23~";
            break;
          case 123:
            b.key = d ? u.C0.ESC + "[24;" + (d + 1) + "~" : u.C0.ESC + "[24~";
            break;
          default:
            if (!f.ctrlKey || f.shiftKey || f.altKey || f.metaKey) if (v && !C || !f.altKey || f.metaKey) !v || f.altKey || f.ctrlKey || f.shiftKey || !f.metaKey ? f.key && !f.ctrlKey && !f.altKey && !f.metaKey && f.keyCode >= 48 && f.key.length === 1 ? b.key = f.key : f.key && f.ctrlKey && (f.key === "_" && (b.key = u.C0.US), f.key === "@" && (b.key = u.C0.NUL)) : f.keyCode === 65 && (b.type = 1);
            else {
              const m = p[f.keyCode], h = m?.[f.shiftKey ? 1 : 0];
              if (h) b.key = u.C0.ESC + h;
              else if (f.keyCode >= 65 && f.keyCode <= 90) {
                const l = f.ctrlKey ? f.keyCode - 64 : f.keyCode + 32;
                let _ = String.fromCharCode(l);
                f.shiftKey && (_ = _.toUpperCase()), b.key = u.C0.ESC + _;
              } else if (f.keyCode === 32) b.key = u.C0.ESC + (f.ctrlKey ? u.C0.NUL : " ");
              else if (f.key === "Dead" && f.code.startsWith("Key")) {
                let l = f.code.slice(3, 4);
                f.shiftKey || (l = l.toLowerCase()), b.key = u.C0.ESC + l, b.cancel = !0;
              }
            }
            else f.keyCode >= 65 && f.keyCode <= 90 ? b.key = String.fromCharCode(f.keyCode - 64) : f.keyCode === 32 ? b.key = u.C0.NUL : f.keyCode >= 51 && f.keyCode <= 55 ? b.key = String.fromCharCode(f.keyCode - 51 + 27) : f.keyCode === 56 ? b.key = u.C0.DEL : f.keyCode === 219 ? b.key = u.C0.ESC : f.keyCode === 220 ? b.key = u.C0.FS : f.keyCode === 221 && (b.key = u.C0.GS);
        }
        return b;
      };
    }, 482: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.Utf8ToUtf32 = s.StringToUtf32 = s.utf32ToString = s.stringFromCodePoint = void 0, s.stringFromCodePoint = function(a) {
        return a > 65535 ? (a -= 65536, String.fromCharCode(55296 + (a >> 10)) + String.fromCharCode(a % 1024 + 56320)) : String.fromCharCode(a);
      }, s.utf32ToString = function(a, u = 0, p = a.length) {
        let f = "";
        for (let g = u; g < p; ++g) {
          let v = a[g];
          v > 65535 ? (v -= 65536, f += String.fromCharCode(55296 + (v >> 10)) + String.fromCharCode(v % 1024 + 56320)) : f += String.fromCharCode(v);
        }
        return f;
      }, s.StringToUtf32 = class {
        constructor() {
          this._interim = 0;
        }
        clear() {
          this._interim = 0;
        }
        decode(a, u) {
          const p = a.length;
          if (!p) return 0;
          let f = 0, g = 0;
          if (this._interim) {
            const v = a.charCodeAt(g++);
            56320 <= v && v <= 57343 ? u[f++] = 1024 * (this._interim - 55296) + v - 56320 + 65536 : (u[f++] = this._interim, u[f++] = v), this._interim = 0;
          }
          for (let v = g; v < p; ++v) {
            const C = a.charCodeAt(v);
            if (55296 <= C && C <= 56319) {
              if (++v >= p) return this._interim = C, f;
              const b = a.charCodeAt(v);
              56320 <= b && b <= 57343 ? u[f++] = 1024 * (C - 55296) + b - 56320 + 65536 : (u[f++] = C, u[f++] = b);
            } else C !== 65279 && (u[f++] = C);
          }
          return f;
        }
      }, s.Utf8ToUtf32 = class {
        constructor() {
          this.interim = new Uint8Array(3);
        }
        clear() {
          this.interim.fill(0);
        }
        decode(a, u) {
          const p = a.length;
          if (!p) return 0;
          let f, g, v, C, b = 0, d = 0, m = 0;
          if (this.interim[0]) {
            let _ = !1, S = this.interim[0];
            S &= (224 & S) == 192 ? 31 : (240 & S) == 224 ? 15 : 7;
            let x, D = 0;
            for (; (x = 63 & this.interim[++D]) && D < 4; ) S <<= 6, S |= x;
            const y = (224 & this.interim[0]) == 192 ? 2 : (240 & this.interim[0]) == 224 ? 3 : 4, E = y - D;
            for (; m < E; ) {
              if (m >= p) return 0;
              if (x = a[m++], (192 & x) != 128) {
                m--, _ = !0;
                break;
              }
              this.interim[D++] = x, S <<= 6, S |= 63 & x;
            }
            _ || (y === 2 ? S < 128 ? m-- : u[b++] = S : y === 3 ? S < 2048 || S >= 55296 && S <= 57343 || S === 65279 || (u[b++] = S) : S < 65536 || S > 1114111 || (u[b++] = S)), this.interim.fill(0);
          }
          const h = p - 4;
          let l = m;
          for (; l < p; ) {
            for (; !(!(l < h) || 128 & (f = a[l]) || 128 & (g = a[l + 1]) || 128 & (v = a[l + 2]) || 128 & (C = a[l + 3])); ) u[b++] = f, u[b++] = g, u[b++] = v, u[b++] = C, l += 4;
            if (f = a[l++], f < 128) u[b++] = f;
            else if ((224 & f) == 192) {
              if (l >= p) return this.interim[0] = f, b;
              if (g = a[l++], (192 & g) != 128) {
                l--;
                continue;
              }
              if (d = (31 & f) << 6 | 63 & g, d < 128) {
                l--;
                continue;
              }
              u[b++] = d;
            } else if ((240 & f) == 224) {
              if (l >= p) return this.interim[0] = f, b;
              if (g = a[l++], (192 & g) != 128) {
                l--;
                continue;
              }
              if (l >= p) return this.interim[0] = f, this.interim[1] = g, b;
              if (v = a[l++], (192 & v) != 128) {
                l--;
                continue;
              }
              if (d = (15 & f) << 12 | (63 & g) << 6 | 63 & v, d < 2048 || d >= 55296 && d <= 57343 || d === 65279) continue;
              u[b++] = d;
            } else if ((248 & f) == 240) {
              if (l >= p) return this.interim[0] = f, b;
              if (g = a[l++], (192 & g) != 128) {
                l--;
                continue;
              }
              if (l >= p) return this.interim[0] = f, this.interim[1] = g, b;
              if (v = a[l++], (192 & v) != 128) {
                l--;
                continue;
              }
              if (l >= p) return this.interim[0] = f, this.interim[1] = g, this.interim[2] = v, b;
              if (C = a[l++], (192 & C) != 128) {
                l--;
                continue;
              }
              if (d = (7 & f) << 18 | (63 & g) << 12 | (63 & v) << 6 | 63 & C, d < 65536 || d > 1114111) continue;
              u[b++] = d;
            }
          }
          return b;
        }
      };
    }, 225: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.UnicodeV6 = void 0;
      const u = a(1480), p = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]], f = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
      let g;
      s.UnicodeV6 = class {
        constructor() {
          if (this.version = "6", !g) {
            g = new Uint8Array(65536), g.fill(1), g[0] = 0, g.fill(0, 1, 32), g.fill(0, 127, 160), g.fill(2, 4352, 4448), g[9001] = 2, g[9002] = 2, g.fill(2, 11904, 42192), g[12351] = 1, g.fill(2, 44032, 55204), g.fill(2, 63744, 64256), g.fill(2, 65040, 65050), g.fill(2, 65072, 65136), g.fill(2, 65280, 65377), g.fill(2, 65504, 65511);
            for (let v = 0; v < p.length; ++v) g.fill(0, p[v][0], p[v][1] + 1);
          }
        }
        wcwidth(v) {
          return v < 32 ? 0 : v < 127 ? 1 : v < 65536 ? g[v] : function(C, b) {
            let d, m = 0, h = b.length - 1;
            if (C < b[0][0] || C > b[h][1]) return !1;
            for (; h >= m; ) if (d = m + h >> 1, C > b[d][1]) m = d + 1;
            else {
              if (!(C < b[d][0])) return !0;
              h = d - 1;
            }
            return !1;
          }(v, f) ? 0 : v >= 131072 && v <= 196605 || v >= 196608 && v <= 262141 ? 2 : 1;
        }
        charProperties(v, C) {
          let b = this.wcwidth(v), d = b === 0 && C !== 0;
          if (d) {
            const m = u.UnicodeService.extractWidth(C);
            m === 0 ? d = !1 : m > b && (b = m);
          }
          return u.UnicodeService.createPropertyValue(0, b, d);
        }
      };
    }, 5981: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.WriteBuffer = void 0;
      const u = a(8460), p = a(844);
      class f extends p.Disposable {
        constructor(v) {
          super(), this._action = v, this._writeBuffer = [], this._callbacks = [], this._pendingData = 0, this._bufferOffset = 0, this._isSyncWriting = !1, this._syncCalls = 0, this._didUserInput = !1, this._onWriteParsed = this.register(new u.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event;
        }
        handleUserInput() {
          this._didUserInput = !0;
        }
        writeSync(v, C) {
          if (C !== void 0 && this._syncCalls > C) return void (this._syncCalls = 0);
          if (this._pendingData += v.length, this._writeBuffer.push(v), this._callbacks.push(void 0), this._syncCalls++, this._isSyncWriting) return;
          let b;
          for (this._isSyncWriting = !0; b = this._writeBuffer.shift(); ) {
            this._action(b);
            const d = this._callbacks.shift();
            d && d();
          }
          this._pendingData = 0, this._bufferOffset = 2147483647, this._isSyncWriting = !1, this._syncCalls = 0;
        }
        write(v, C) {
          if (this._pendingData > 5e7) throw new Error("write data discarded, use flow control to avoid losing data");
          if (!this._writeBuffer.length) {
            if (this._bufferOffset = 0, this._didUserInput) return this._didUserInput = !1, this._pendingData += v.length, this._writeBuffer.push(v), this._callbacks.push(C), void this._innerWrite();
            setTimeout(() => this._innerWrite());
          }
          this._pendingData += v.length, this._writeBuffer.push(v), this._callbacks.push(C);
        }
        _innerWrite(v = 0, C = !0) {
          const b = v || Date.now();
          for (; this._writeBuffer.length > this._bufferOffset; ) {
            const d = this._writeBuffer[this._bufferOffset], m = this._action(d, C);
            if (m) {
              const l = (_) => Date.now() - b >= 12 ? setTimeout(() => this._innerWrite(0, _)) : this._innerWrite(b, _);
              return void m.catch((_) => (queueMicrotask(() => {
                throw _;
              }), Promise.resolve(!1))).then(l);
            }
            const h = this._callbacks[this._bufferOffset];
            if (h && h(), this._bufferOffset++, this._pendingData -= d.length, Date.now() - b >= 12) break;
          }
          this._writeBuffer.length > this._bufferOffset ? (this._bufferOffset > 50 && (this._writeBuffer = this._writeBuffer.slice(this._bufferOffset), this._callbacks = this._callbacks.slice(this._bufferOffset), this._bufferOffset = 0), setTimeout(() => this._innerWrite())) : (this._writeBuffer.length = 0, this._callbacks.length = 0, this._pendingData = 0, this._bufferOffset = 0), this._onWriteParsed.fire();
        }
      }
      s.WriteBuffer = f;
    }, 5941: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.toRgbString = s.parseColor = void 0;
      const a = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/, u = /^[\da-f]+$/;
      function p(f, g) {
        const v = f.toString(16), C = v.length < 2 ? "0" + v : v;
        switch (g) {
          case 4:
            return v[0];
          case 8:
            return C;
          case 12:
            return (C + C).slice(0, 3);
          default:
            return C + C;
        }
      }
      s.parseColor = function(f) {
        if (!f) return;
        let g = f.toLowerCase();
        if (g.indexOf("rgb:") === 0) {
          g = g.slice(4);
          const v = a.exec(g);
          if (v) {
            const C = v[1] ? 15 : v[4] ? 255 : v[7] ? 4095 : 65535;
            return [Math.round(parseInt(v[1] || v[4] || v[7] || v[10], 16) / C * 255), Math.round(parseInt(v[2] || v[5] || v[8] || v[11], 16) / C * 255), Math.round(parseInt(v[3] || v[6] || v[9] || v[12], 16) / C * 255)];
          }
        } else if (g.indexOf("#") === 0 && (g = g.slice(1), u.exec(g) && [3, 6, 9, 12].includes(g.length))) {
          const v = g.length / 3, C = [0, 0, 0];
          for (let b = 0; b < 3; ++b) {
            const d = parseInt(g.slice(v * b, v * b + v), 16);
            C[b] = v === 1 ? d << 4 : v === 2 ? d : v === 3 ? d >> 4 : d >> 8;
          }
          return C;
        }
      }, s.toRgbString = function(f, g = 16) {
        const [v, C, b] = f;
        return `rgb:${p(v, g)}/${p(C, g)}/${p(b, g)}`;
      };
    }, 5770: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.PAYLOAD_LIMIT = void 0, s.PAYLOAD_LIMIT = 1e7;
    }, 6351: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.DcsHandler = s.DcsParser = void 0;
      const u = a(482), p = a(8742), f = a(5770), g = [];
      s.DcsParser = class {
        constructor() {
          this._handlers = /* @__PURE__ */ Object.create(null), this._active = g, this._ident = 0, this._handlerFb = () => {
          }, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
        }
        dispose() {
          this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
          }, this._active = g;
        }
        registerHandler(C, b) {
          this._handlers[C] === void 0 && (this._handlers[C] = []);
          const d = this._handlers[C];
          return d.push(b), { dispose: () => {
            const m = d.indexOf(b);
            m !== -1 && d.splice(m, 1);
          } };
        }
        clearHandler(C) {
          this._handlers[C] && delete this._handlers[C];
        }
        setHandlerFallback(C) {
          this._handlerFb = C;
        }
        reset() {
          if (this._active.length) for (let C = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; C >= 0; --C) this._active[C].unhook(!1);
          this._stack.paused = !1, this._active = g, this._ident = 0;
        }
        hook(C, b) {
          if (this.reset(), this._ident = C, this._active = this._handlers[C] || g, this._active.length) for (let d = this._active.length - 1; d >= 0; d--) this._active[d].hook(b);
          else this._handlerFb(this._ident, "HOOK", b);
        }
        put(C, b, d) {
          if (this._active.length) for (let m = this._active.length - 1; m >= 0; m--) this._active[m].put(C, b, d);
          else this._handlerFb(this._ident, "PUT", (0, u.utf32ToString)(C, b, d));
        }
        unhook(C, b = !0) {
          if (this._active.length) {
            let d = !1, m = this._active.length - 1, h = !1;
            if (this._stack.paused && (m = this._stack.loopPosition - 1, d = b, h = this._stack.fallThrough, this._stack.paused = !1), !h && d === !1) {
              for (; m >= 0 && (d = this._active[m].unhook(C), d !== !0); m--) if (d instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = m, this._stack.fallThrough = !1, d;
              m--;
            }
            for (; m >= 0; m--) if (d = this._active[m].unhook(!1), d instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = m, this._stack.fallThrough = !0, d;
          } else this._handlerFb(this._ident, "UNHOOK", C);
          this._active = g, this._ident = 0;
        }
      };
      const v = new p.Params();
      v.addParam(0), s.DcsHandler = class {
        constructor(C) {
          this._handler = C, this._data = "", this._params = v, this._hitLimit = !1;
        }
        hook(C) {
          this._params = C.length > 1 || C.params[0] ? C.clone() : v, this._data = "", this._hitLimit = !1;
        }
        put(C, b, d) {
          this._hitLimit || (this._data += (0, u.utf32ToString)(C, b, d), this._data.length > f.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
        }
        unhook(C) {
          let b = !1;
          if (this._hitLimit) b = !1;
          else if (C && (b = this._handler(this._data, this._params), b instanceof Promise)) return b.then((d) => (this._params = v, this._data = "", this._hitLimit = !1, d));
          return this._params = v, this._data = "", this._hitLimit = !1, b;
        }
      };
    }, 2015: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.EscapeSequenceParser = s.VT500_TRANSITION_TABLE = s.TransitionTable = void 0;
      const u = a(844), p = a(8742), f = a(6242), g = a(6351);
      class v {
        constructor(m) {
          this.table = new Uint8Array(m);
        }
        setDefault(m, h) {
          this.table.fill(m << 4 | h);
        }
        add(m, h, l, _) {
          this.table[h << 8 | m] = l << 4 | _;
        }
        addMany(m, h, l, _) {
          for (let S = 0; S < m.length; S++) this.table[h << 8 | m[S]] = l << 4 | _;
        }
      }
      s.TransitionTable = v;
      const C = 160;
      s.VT500_TRANSITION_TABLE = function() {
        const d = new v(4095), m = Array.apply(null, Array(256)).map((D, y) => y), h = (D, y) => m.slice(D, y), l = h(32, 127), _ = h(0, 24);
        _.push(25), _.push.apply(_, h(28, 32));
        const S = h(0, 14);
        let x;
        for (x in d.setDefault(1, 0), d.addMany(l, 0, 2, 0), S) d.addMany([24, 26, 153, 154], x, 3, 0), d.addMany(h(128, 144), x, 3, 0), d.addMany(h(144, 152), x, 3, 0), d.add(156, x, 0, 0), d.add(27, x, 11, 1), d.add(157, x, 4, 8), d.addMany([152, 158, 159], x, 0, 7), d.add(155, x, 11, 3), d.add(144, x, 11, 9);
        return d.addMany(_, 0, 3, 0), d.addMany(_, 1, 3, 1), d.add(127, 1, 0, 1), d.addMany(_, 8, 0, 8), d.addMany(_, 3, 3, 3), d.add(127, 3, 0, 3), d.addMany(_, 4, 3, 4), d.add(127, 4, 0, 4), d.addMany(_, 6, 3, 6), d.addMany(_, 5, 3, 5), d.add(127, 5, 0, 5), d.addMany(_, 2, 3, 2), d.add(127, 2, 0, 2), d.add(93, 1, 4, 8), d.addMany(l, 8, 5, 8), d.add(127, 8, 5, 8), d.addMany([156, 27, 24, 26, 7], 8, 6, 0), d.addMany(h(28, 32), 8, 0, 8), d.addMany([88, 94, 95], 1, 0, 7), d.addMany(l, 7, 0, 7), d.addMany(_, 7, 0, 7), d.add(156, 7, 0, 0), d.add(127, 7, 0, 7), d.add(91, 1, 11, 3), d.addMany(h(64, 127), 3, 7, 0), d.addMany(h(48, 60), 3, 8, 4), d.addMany([60, 61, 62, 63], 3, 9, 4), d.addMany(h(48, 60), 4, 8, 4), d.addMany(h(64, 127), 4, 7, 0), d.addMany([60, 61, 62, 63], 4, 0, 6), d.addMany(h(32, 64), 6, 0, 6), d.add(127, 6, 0, 6), d.addMany(h(64, 127), 6, 0, 0), d.addMany(h(32, 48), 3, 9, 5), d.addMany(h(32, 48), 5, 9, 5), d.addMany(h(48, 64), 5, 0, 6), d.addMany(h(64, 127), 5, 7, 0), d.addMany(h(32, 48), 4, 9, 5), d.addMany(h(32, 48), 1, 9, 2), d.addMany(h(32, 48), 2, 9, 2), d.addMany(h(48, 127), 2, 10, 0), d.addMany(h(48, 80), 1, 10, 0), d.addMany(h(81, 88), 1, 10, 0), d.addMany([89, 90, 92], 1, 10, 0), d.addMany(h(96, 127), 1, 10, 0), d.add(80, 1, 11, 9), d.addMany(_, 9, 0, 9), d.add(127, 9, 0, 9), d.addMany(h(28, 32), 9, 0, 9), d.addMany(h(32, 48), 9, 9, 12), d.addMany(h(48, 60), 9, 8, 10), d.addMany([60, 61, 62, 63], 9, 9, 10), d.addMany(_, 11, 0, 11), d.addMany(h(32, 128), 11, 0, 11), d.addMany(h(28, 32), 11, 0, 11), d.addMany(_, 10, 0, 10), d.add(127, 10, 0, 10), d.addMany(h(28, 32), 10, 0, 10), d.addMany(h(48, 60), 10, 8, 10), d.addMany([60, 61, 62, 63], 10, 0, 11), d.addMany(h(32, 48), 10, 9, 12), d.addMany(_, 12, 0, 12), d.add(127, 12, 0, 12), d.addMany(h(28, 32), 12, 0, 12), d.addMany(h(32, 48), 12, 9, 12), d.addMany(h(48, 64), 12, 0, 11), d.addMany(h(64, 127), 12, 12, 13), d.addMany(h(64, 127), 10, 12, 13), d.addMany(h(64, 127), 9, 12, 13), d.addMany(_, 13, 13, 13), d.addMany(l, 13, 13, 13), d.add(127, 13, 0, 13), d.addMany([27, 156, 24, 26], 13, 14, 0), d.add(C, 0, 2, 0), d.add(C, 8, 5, 8), d.add(C, 6, 0, 6), d.add(C, 11, 0, 11), d.add(C, 13, 13, 13), d;
      }();
      class b extends u.Disposable {
        constructor(m = s.VT500_TRANSITION_TABLE) {
          super(), this._transitions = m, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new p.Params(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._printHandlerFb = (h, l, _) => {
          }, this._executeHandlerFb = (h) => {
          }, this._csiHandlerFb = (h, l) => {
          }, this._escHandlerFb = (h) => {
          }, this._errorHandlerFb = (h) => h, this._printHandler = this._printHandlerFb, this._executeHandlers = /* @__PURE__ */ Object.create(null), this._csiHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null), this.register((0, u.toDisposable)(() => {
            this._csiHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null);
          })), this._oscParser = this.register(new f.OscParser()), this._dcsParser = this.register(new g.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, () => !0);
        }
        _identifier(m, h = [64, 126]) {
          let l = 0;
          if (m.prefix) {
            if (m.prefix.length > 1) throw new Error("only one byte as prefix supported");
            if (l = m.prefix.charCodeAt(0), l && 60 > l || l > 63) throw new Error("prefix must be in range 0x3c .. 0x3f");
          }
          if (m.intermediates) {
            if (m.intermediates.length > 2) throw new Error("only two bytes as intermediates are supported");
            for (let S = 0; S < m.intermediates.length; ++S) {
              const x = m.intermediates.charCodeAt(S);
              if (32 > x || x > 47) throw new Error("intermediate must be in range 0x20 .. 0x2f");
              l <<= 8, l |= x;
            }
          }
          if (m.final.length !== 1) throw new Error("final must be a single byte");
          const _ = m.final.charCodeAt(0);
          if (h[0] > _ || _ > h[1]) throw new Error(`final must be in range ${h[0]} .. ${h[1]}`);
          return l <<= 8, l |= _, l;
        }
        identToString(m) {
          const h = [];
          for (; m; ) h.push(String.fromCharCode(255 & m)), m >>= 8;
          return h.reverse().join("");
        }
        setPrintHandler(m) {
          this._printHandler = m;
        }
        clearPrintHandler() {
          this._printHandler = this._printHandlerFb;
        }
        registerEscHandler(m, h) {
          const l = this._identifier(m, [48, 126]);
          this._escHandlers[l] === void 0 && (this._escHandlers[l] = []);
          const _ = this._escHandlers[l];
          return _.push(h), { dispose: () => {
            const S = _.indexOf(h);
            S !== -1 && _.splice(S, 1);
          } };
        }
        clearEscHandler(m) {
          this._escHandlers[this._identifier(m, [48, 126])] && delete this._escHandlers[this._identifier(m, [48, 126])];
        }
        setEscHandlerFallback(m) {
          this._escHandlerFb = m;
        }
        setExecuteHandler(m, h) {
          this._executeHandlers[m.charCodeAt(0)] = h;
        }
        clearExecuteHandler(m) {
          this._executeHandlers[m.charCodeAt(0)] && delete this._executeHandlers[m.charCodeAt(0)];
        }
        setExecuteHandlerFallback(m) {
          this._executeHandlerFb = m;
        }
        registerCsiHandler(m, h) {
          const l = this._identifier(m);
          this._csiHandlers[l] === void 0 && (this._csiHandlers[l] = []);
          const _ = this._csiHandlers[l];
          return _.push(h), { dispose: () => {
            const S = _.indexOf(h);
            S !== -1 && _.splice(S, 1);
          } };
        }
        clearCsiHandler(m) {
          this._csiHandlers[this._identifier(m)] && delete this._csiHandlers[this._identifier(m)];
        }
        setCsiHandlerFallback(m) {
          this._csiHandlerFb = m;
        }
        registerDcsHandler(m, h) {
          return this._dcsParser.registerHandler(this._identifier(m), h);
        }
        clearDcsHandler(m) {
          this._dcsParser.clearHandler(this._identifier(m));
        }
        setDcsHandlerFallback(m) {
          this._dcsParser.setHandlerFallback(m);
        }
        registerOscHandler(m, h) {
          return this._oscParser.registerHandler(m, h);
        }
        clearOscHandler(m) {
          this._oscParser.clearHandler(m);
        }
        setOscHandlerFallback(m) {
          this._oscParser.setHandlerFallback(m);
        }
        setErrorHandler(m) {
          this._errorHandler = m;
        }
        clearErrorHandler() {
          this._errorHandler = this._errorHandlerFb;
        }
        reset() {
          this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0, this._parseStack.state !== 0 && (this._parseStack.state = 2, this._parseStack.handlers = []);
        }
        _preserveStack(m, h, l, _, S) {
          this._parseStack.state = m, this._parseStack.handlers = h, this._parseStack.handlerPos = l, this._parseStack.transition = _, this._parseStack.chunkPos = S;
        }
        parse(m, h, l) {
          let _, S = 0, x = 0, D = 0;
          if (this._parseStack.state) if (this._parseStack.state === 2) this._parseStack.state = 0, D = this._parseStack.chunkPos + 1;
          else {
            if (l === void 0 || this._parseStack.state === 1) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
            const y = this._parseStack.handlers;
            let E = this._parseStack.handlerPos - 1;
            switch (this._parseStack.state) {
              case 3:
                if (l === !1 && E > -1) {
                  for (; E >= 0 && (_ = y[E](this._params), _ !== !0); E--) if (_ instanceof Promise) return this._parseStack.handlerPos = E, _;
                }
                this._parseStack.handlers = [];
                break;
              case 4:
                if (l === !1 && E > -1) {
                  for (; E >= 0 && (_ = y[E](), _ !== !0); E--) if (_ instanceof Promise) return this._parseStack.handlerPos = E, _;
                }
                this._parseStack.handlers = [];
                break;
              case 6:
                if (S = m[this._parseStack.chunkPos], _ = this._dcsParser.unhook(S !== 24 && S !== 26, l), _) return _;
                S === 27 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
                break;
              case 5:
                if (S = m[this._parseStack.chunkPos], _ = this._oscParser.end(S !== 24 && S !== 26, l), _) return _;
                S === 27 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
            }
            this._parseStack.state = 0, D = this._parseStack.chunkPos + 1, this.precedingJoinState = 0, this.currentState = 15 & this._parseStack.transition;
          }
          for (let y = D; y < h; ++y) {
            switch (S = m[y], x = this._transitions.table[this.currentState << 8 | (S < 160 ? S : C)], x >> 4) {
              case 2:
                for (let R = y + 1; ; ++R) {
                  if (R >= h || (S = m[R]) < 32 || S > 126 && S < C) {
                    this._printHandler(m, y, R), y = R - 1;
                    break;
                  }
                  if (++R >= h || (S = m[R]) < 32 || S > 126 && S < C) {
                    this._printHandler(m, y, R), y = R - 1;
                    break;
                  }
                  if (++R >= h || (S = m[R]) < 32 || S > 126 && S < C) {
                    this._printHandler(m, y, R), y = R - 1;
                    break;
                  }
                  if (++R >= h || (S = m[R]) < 32 || S > 126 && S < C) {
                    this._printHandler(m, y, R), y = R - 1;
                    break;
                  }
                }
                break;
              case 3:
                this._executeHandlers[S] ? this._executeHandlers[S]() : this._executeHandlerFb(S), this.precedingJoinState = 0;
                break;
              case 0:
                break;
              case 1:
                if (this._errorHandler({ position: y, code: S, currentState: this.currentState, collect: this._collect, params: this._params, abort: !1 }).abort) return;
                break;
              case 7:
                const E = this._csiHandlers[this._collect << 8 | S];
                let B = E ? E.length - 1 : -1;
                for (; B >= 0 && (_ = E[B](this._params), _ !== !0); B--) if (_ instanceof Promise) return this._preserveStack(3, E, B, x, y), _;
                B < 0 && this._csiHandlerFb(this._collect << 8 | S, this._params), this.precedingJoinState = 0;
                break;
              case 8:
                do
                  switch (S) {
                    case 59:
                      this._params.addParam(0);
                      break;
                    case 58:
                      this._params.addSubParam(-1);
                      break;
                    default:
                      this._params.addDigit(S - 48);
                  }
                while (++y < h && (S = m[y]) > 47 && S < 60);
                y--;
                break;
              case 9:
                this._collect <<= 8, this._collect |= S;
                break;
              case 10:
                const O = this._escHandlers[this._collect << 8 | S];
                let N = O ? O.length - 1 : -1;
                for (; N >= 0 && (_ = O[N](), _ !== !0); N--) if (_ instanceof Promise) return this._preserveStack(4, O, N, x, y), _;
                N < 0 && this._escHandlerFb(this._collect << 8 | S), this.precedingJoinState = 0;
                break;
              case 11:
                this._params.reset(), this._params.addParam(0), this._collect = 0;
                break;
              case 12:
                this._dcsParser.hook(this._collect << 8 | S, this._params);
                break;
              case 13:
                for (let R = y + 1; ; ++R) if (R >= h || (S = m[R]) === 24 || S === 26 || S === 27 || S > 127 && S < C) {
                  this._dcsParser.put(m, y, R), y = R - 1;
                  break;
                }
                break;
              case 14:
                if (_ = this._dcsParser.unhook(S !== 24 && S !== 26), _) return this._preserveStack(6, [], 0, x, y), _;
                S === 27 && (x |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
                break;
              case 4:
                this._oscParser.start();
                break;
              case 5:
                for (let R = y + 1; ; R++) if (R >= h || (S = m[R]) < 32 || S > 127 && S < C) {
                  this._oscParser.put(m, y, R), y = R - 1;
                  break;
                }
                break;
              case 6:
                if (_ = this._oscParser.end(S !== 24 && S !== 26), _) return this._preserveStack(5, [], 0, x, y), _;
                S === 27 && (x |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingJoinState = 0;
            }
            this.currentState = 15 & x;
          }
        }
      }
      s.EscapeSequenceParser = b;
    }, 6242: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.OscHandler = s.OscParser = void 0;
      const u = a(5770), p = a(482), f = [];
      s.OscParser = class {
        constructor() {
          this._state = 0, this._active = f, this._id = -1, this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
          }, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
        }
        registerHandler(g, v) {
          this._handlers[g] === void 0 && (this._handlers[g] = []);
          const C = this._handlers[g];
          return C.push(v), { dispose: () => {
            const b = C.indexOf(v);
            b !== -1 && C.splice(b, 1);
          } };
        }
        clearHandler(g) {
          this._handlers[g] && delete this._handlers[g];
        }
        setHandlerFallback(g) {
          this._handlerFb = g;
        }
        dispose() {
          this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
          }, this._active = f;
        }
        reset() {
          if (this._state === 2) for (let g = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; g >= 0; --g) this._active[g].end(!1);
          this._stack.paused = !1, this._active = f, this._id = -1, this._state = 0;
        }
        _start() {
          if (this._active = this._handlers[this._id] || f, this._active.length) for (let g = this._active.length - 1; g >= 0; g--) this._active[g].start();
          else this._handlerFb(this._id, "START");
        }
        _put(g, v, C) {
          if (this._active.length) for (let b = this._active.length - 1; b >= 0; b--) this._active[b].put(g, v, C);
          else this._handlerFb(this._id, "PUT", (0, p.utf32ToString)(g, v, C));
        }
        start() {
          this.reset(), this._state = 1;
        }
        put(g, v, C) {
          if (this._state !== 3) {
            if (this._state === 1) for (; v < C; ) {
              const b = g[v++];
              if (b === 59) {
                this._state = 2, this._start();
                break;
              }
              if (b < 48 || 57 < b) return void (this._state = 3);
              this._id === -1 && (this._id = 0), this._id = 10 * this._id + b - 48;
            }
            this._state === 2 && C - v > 0 && this._put(g, v, C);
          }
        }
        end(g, v = !0) {
          if (this._state !== 0) {
            if (this._state !== 3) if (this._state === 1 && this._start(), this._active.length) {
              let C = !1, b = this._active.length - 1, d = !1;
              if (this._stack.paused && (b = this._stack.loopPosition - 1, C = v, d = this._stack.fallThrough, this._stack.paused = !1), !d && C === !1) {
                for (; b >= 0 && (C = this._active[b].end(g), C !== !0); b--) if (C instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = b, this._stack.fallThrough = !1, C;
                b--;
              }
              for (; b >= 0; b--) if (C = this._active[b].end(!1), C instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = b, this._stack.fallThrough = !0, C;
            } else this._handlerFb(this._id, "END", g);
            this._active = f, this._id = -1, this._state = 0;
          }
        }
      }, s.OscHandler = class {
        constructor(g) {
          this._handler = g, this._data = "", this._hitLimit = !1;
        }
        start() {
          this._data = "", this._hitLimit = !1;
        }
        put(g, v, C) {
          this._hitLimit || (this._data += (0, p.utf32ToString)(g, v, C), this._data.length > u.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
        }
        end(g) {
          let v = !1;
          if (this._hitLimit) v = !1;
          else if (g && (v = this._handler(this._data), v instanceof Promise)) return v.then((C) => (this._data = "", this._hitLimit = !1, C));
          return this._data = "", this._hitLimit = !1, v;
        }
      };
    }, 8742: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.Params = void 0;
      const a = 2147483647;
      class u {
        static fromArray(f) {
          const g = new u();
          if (!f.length) return g;
          for (let v = Array.isArray(f[0]) ? 1 : 0; v < f.length; ++v) {
            const C = f[v];
            if (Array.isArray(C)) for (let b = 0; b < C.length; ++b) g.addSubParam(C[b]);
            else g.addParam(C);
          }
          return g;
        }
        constructor(f = 32, g = 32) {
          if (this.maxLength = f, this.maxSubParamsLength = g, g > 256) throw new Error("maxSubParamsLength must not be greater than 256");
          this.params = new Int32Array(f), this.length = 0, this._subParams = new Int32Array(g), this._subParamsLength = 0, this._subParamsIdx = new Uint16Array(f), this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
        }
        clone() {
          const f = new u(this.maxLength, this.maxSubParamsLength);
          return f.params.set(this.params), f.length = this.length, f._subParams.set(this._subParams), f._subParamsLength = this._subParamsLength, f._subParamsIdx.set(this._subParamsIdx), f._rejectDigits = this._rejectDigits, f._rejectSubDigits = this._rejectSubDigits, f._digitIsSub = this._digitIsSub, f;
        }
        toArray() {
          const f = [];
          for (let g = 0; g < this.length; ++g) {
            f.push(this.params[g]);
            const v = this._subParamsIdx[g] >> 8, C = 255 & this._subParamsIdx[g];
            C - v > 0 && f.push(Array.prototype.slice.call(this._subParams, v, C));
          }
          return f;
        }
        reset() {
          this.length = 0, this._subParamsLength = 0, this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
        }
        addParam(f) {
          if (this._digitIsSub = !1, this.length >= this.maxLength) this._rejectDigits = !0;
          else {
            if (f < -1) throw new Error("values lesser than -1 are not allowed");
            this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength, this.params[this.length++] = f > a ? a : f;
          }
        }
        addSubParam(f) {
          if (this._digitIsSub = !0, this.length) if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) this._rejectSubDigits = !0;
          else {
            if (f < -1) throw new Error("values lesser than -1 are not allowed");
            this._subParams[this._subParamsLength++] = f > a ? a : f, this._subParamsIdx[this.length - 1]++;
          }
        }
        hasSubParams(f) {
          return (255 & this._subParamsIdx[f]) - (this._subParamsIdx[f] >> 8) > 0;
        }
        getSubParams(f) {
          const g = this._subParamsIdx[f] >> 8, v = 255 & this._subParamsIdx[f];
          return v - g > 0 ? this._subParams.subarray(g, v) : null;
        }
        getSubParamsAll() {
          const f = {};
          for (let g = 0; g < this.length; ++g) {
            const v = this._subParamsIdx[g] >> 8, C = 255 & this._subParamsIdx[g];
            C - v > 0 && (f[g] = this._subParams.slice(v, C));
          }
          return f;
        }
        addDigit(f) {
          let g;
          if (this._rejectDigits || !(g = this._digitIsSub ? this._subParamsLength : this.length) || this._digitIsSub && this._rejectSubDigits) return;
          const v = this._digitIsSub ? this._subParams : this.params, C = v[g - 1];
          v[g - 1] = ~C ? Math.min(10 * C + f, a) : f;
        }
      }
      s.Params = u;
    }, 5741: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.AddonManager = void 0, s.AddonManager = class {
        constructor() {
          this._addons = [];
        }
        dispose() {
          for (let a = this._addons.length - 1; a >= 0; a--) this._addons[a].instance.dispose();
        }
        loadAddon(a, u) {
          const p = { instance: u, dispose: u.dispose, isDisposed: !1 };
          this._addons.push(p), u.dispose = () => this._wrappedAddonDispose(p), u.activate(a);
        }
        _wrappedAddonDispose(a) {
          if (a.isDisposed) return;
          let u = -1;
          for (let p = 0; p < this._addons.length; p++) if (this._addons[p] === a) {
            u = p;
            break;
          }
          if (u === -1) throw new Error("Could not dispose an addon that has not been loaded");
          a.isDisposed = !0, a.dispose.apply(a.instance), this._addons.splice(u, 1);
        }
      };
    }, 8771: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.BufferApiView = void 0;
      const u = a(3785), p = a(511);
      s.BufferApiView = class {
        constructor(f, g) {
          this._buffer = f, this.type = g;
        }
        init(f) {
          return this._buffer = f, this;
        }
        get cursorY() {
          return this._buffer.y;
        }
        get cursorX() {
          return this._buffer.x;
        }
        get viewportY() {
          return this._buffer.ydisp;
        }
        get baseY() {
          return this._buffer.ybase;
        }
        get length() {
          return this._buffer.lines.length;
        }
        getLine(f) {
          const g = this._buffer.lines.get(f);
          if (g) return new u.BufferLineApiView(g);
        }
        getNullCell() {
          return new p.CellData();
        }
      };
    }, 3785: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.BufferLineApiView = void 0;
      const u = a(511);
      s.BufferLineApiView = class {
        constructor(p) {
          this._line = p;
        }
        get isWrapped() {
          return this._line.isWrapped;
        }
        get length() {
          return this._line.length;
        }
        getCell(p, f) {
          if (!(p < 0 || p >= this._line.length)) return f ? (this._line.loadCell(p, f), f) : this._line.loadCell(p, new u.CellData());
        }
        translateToString(p, f, g) {
          return this._line.translateToString(p, f, g);
        }
      };
    }, 8285: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.BufferNamespaceApi = void 0;
      const u = a(8771), p = a(8460), f = a(844);
      class g extends f.Disposable {
        constructor(C) {
          super(), this._core = C, this._onBufferChange = this.register(new p.EventEmitter()), this.onBufferChange = this._onBufferChange.event, this._normal = new u.BufferApiView(this._core.buffers.normal, "normal"), this._alternate = new u.BufferApiView(this._core.buffers.alt, "alternate"), this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active));
        }
        get active() {
          if (this._core.buffers.active === this._core.buffers.normal) return this.normal;
          if (this._core.buffers.active === this._core.buffers.alt) return this.alternate;
          throw new Error("Active buffer is neither normal nor alternate");
        }
        get normal() {
          return this._normal.init(this._core.buffers.normal);
        }
        get alternate() {
          return this._alternate.init(this._core.buffers.alt);
        }
      }
      s.BufferNamespaceApi = g;
    }, 7975: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.ParserApi = void 0, s.ParserApi = class {
        constructor(a) {
          this._core = a;
        }
        registerCsiHandler(a, u) {
          return this._core.registerCsiHandler(a, (p) => u(p.toArray()));
        }
        addCsiHandler(a, u) {
          return this.registerCsiHandler(a, u);
        }
        registerDcsHandler(a, u) {
          return this._core.registerDcsHandler(a, (p, f) => u(p, f.toArray()));
        }
        addDcsHandler(a, u) {
          return this.registerDcsHandler(a, u);
        }
        registerEscHandler(a, u) {
          return this._core.registerEscHandler(a, u);
        }
        addEscHandler(a, u) {
          return this.registerEscHandler(a, u);
        }
        registerOscHandler(a, u) {
          return this._core.registerOscHandler(a, u);
        }
        addOscHandler(a, u) {
          return this.registerOscHandler(a, u);
        }
      };
    }, 7090: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.UnicodeApi = void 0, s.UnicodeApi = class {
        constructor(a) {
          this._core = a;
        }
        register(a) {
          this._core.unicodeService.register(a);
        }
        get versions() {
          return this._core.unicodeService.versions;
        }
        get activeVersion() {
          return this._core.unicodeService.activeVersion;
        }
        set activeVersion(a) {
          this._core.unicodeService.activeVersion = a;
        }
      };
    }, 744: function(c, s, a) {
      var u = this && this.__decorate || function(d, m, h, l) {
        var _, S = arguments.length, x = S < 3 ? m : l === null ? l = Object.getOwnPropertyDescriptor(m, h) : l;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") x = Reflect.decorate(d, m, h, l);
        else for (var D = d.length - 1; D >= 0; D--) (_ = d[D]) && (x = (S < 3 ? _(x) : S > 3 ? _(m, h, x) : _(m, h)) || x);
        return S > 3 && x && Object.defineProperty(m, h, x), x;
      }, p = this && this.__param || function(d, m) {
        return function(h, l) {
          m(h, l, d);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.BufferService = s.MINIMUM_ROWS = s.MINIMUM_COLS = void 0;
      const f = a(8460), g = a(844), v = a(5295), C = a(2585);
      s.MINIMUM_COLS = 2, s.MINIMUM_ROWS = 1;
      let b = s.BufferService = class extends g.Disposable {
        get buffer() {
          return this.buffers.active;
        }
        constructor(d) {
          super(), this.isUserScrolling = !1, this._onResize = this.register(new f.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new f.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(d.rawOptions.cols || 0, s.MINIMUM_COLS), this.rows = Math.max(d.rawOptions.rows || 0, s.MINIMUM_ROWS), this.buffers = this.register(new v.BufferSet(d, this));
        }
        resize(d, m) {
          this.cols = d, this.rows = m, this.buffers.resize(d, m), this._onResize.fire({ cols: d, rows: m });
        }
        reset() {
          this.buffers.reset(), this.isUserScrolling = !1;
        }
        scroll(d, m = !1) {
          const h = this.buffer;
          let l;
          l = this._cachedBlankLine, l && l.length === this.cols && l.getFg(0) === d.fg && l.getBg(0) === d.bg || (l = h.getBlankLine(d, m), this._cachedBlankLine = l), l.isWrapped = m;
          const _ = h.ybase + h.scrollTop, S = h.ybase + h.scrollBottom;
          if (h.scrollTop === 0) {
            const x = h.lines.isFull;
            S === h.lines.length - 1 ? x ? h.lines.recycle().copyFrom(l) : h.lines.push(l.clone()) : h.lines.splice(S + 1, 0, l.clone()), x ? this.isUserScrolling && (h.ydisp = Math.max(h.ydisp - 1, 0)) : (h.ybase++, this.isUserScrolling || h.ydisp++);
          } else {
            const x = S - _ + 1;
            h.lines.shiftElements(_ + 1, x - 1, -1), h.lines.set(S, l.clone());
          }
          this.isUserScrolling || (h.ydisp = h.ybase), this._onScroll.fire(h.ydisp);
        }
        scrollLines(d, m, h) {
          const l = this.buffer;
          if (d < 0) {
            if (l.ydisp === 0) return;
            this.isUserScrolling = !0;
          } else d + l.ydisp >= l.ybase && (this.isUserScrolling = !1);
          const _ = l.ydisp;
          l.ydisp = Math.max(Math.min(l.ydisp + d, l.ybase), 0), _ !== l.ydisp && (m || this._onScroll.fire(l.ydisp));
        }
      };
      s.BufferService = b = u([p(0, C.IOptionsService)], b);
    }, 7994: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CharsetService = void 0, s.CharsetService = class {
        constructor() {
          this.glevel = 0, this._charsets = [];
        }
        reset() {
          this.charset = void 0, this._charsets = [], this.glevel = 0;
        }
        setgLevel(a) {
          this.glevel = a, this.charset = this._charsets[a];
        }
        setgCharset(a, u) {
          this._charsets[a] = u, this.glevel === a && (this.charset = u);
        }
      };
    }, 1753: function(c, s, a) {
      var u = this && this.__decorate || function(l, _, S, x) {
        var D, y = arguments.length, E = y < 3 ? _ : x === null ? x = Object.getOwnPropertyDescriptor(_, S) : x;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") E = Reflect.decorate(l, _, S, x);
        else for (var B = l.length - 1; B >= 0; B--) (D = l[B]) && (E = (y < 3 ? D(E) : y > 3 ? D(_, S, E) : D(_, S)) || E);
        return y > 3 && E && Object.defineProperty(_, S, E), E;
      }, p = this && this.__param || function(l, _) {
        return function(S, x) {
          _(S, x, l);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CoreMouseService = void 0;
      const f = a(2585), g = a(8460), v = a(844), C = { NONE: { events: 0, restrict: () => !1 }, X10: { events: 1, restrict: (l) => l.button !== 4 && l.action === 1 && (l.ctrl = !1, l.alt = !1, l.shift = !1, !0) }, VT200: { events: 19, restrict: (l) => l.action !== 32 }, DRAG: { events: 23, restrict: (l) => l.action !== 32 || l.button !== 3 }, ANY: { events: 31, restrict: (l) => !0 } };
      function b(l, _) {
        let S = (l.ctrl ? 16 : 0) | (l.shift ? 4 : 0) | (l.alt ? 8 : 0);
        return l.button === 4 ? (S |= 64, S |= l.action) : (S |= 3 & l.button, 4 & l.button && (S |= 64), 8 & l.button && (S |= 128), l.action === 32 ? S |= 32 : l.action !== 0 || _ || (S |= 3)), S;
      }
      const d = String.fromCharCode, m = { DEFAULT: (l) => {
        const _ = [b(l, !1) + 32, l.col + 32, l.row + 32];
        return _[0] > 255 || _[1] > 255 || _[2] > 255 ? "" : `\x1B[M${d(_[0])}${d(_[1])}${d(_[2])}`;
      }, SGR: (l) => {
        const _ = l.action === 0 && l.button !== 4 ? "m" : "M";
        return `\x1B[<${b(l, !0)};${l.col};${l.row}${_}`;
      }, SGR_PIXELS: (l) => {
        const _ = l.action === 0 && l.button !== 4 ? "m" : "M";
        return `\x1B[<${b(l, !0)};${l.x};${l.y}${_}`;
      } };
      let h = s.CoreMouseService = class extends v.Disposable {
        constructor(l, _) {
          super(), this._bufferService = l, this._coreService = _, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new g.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
          for (const S of Object.keys(C)) this.addProtocol(S, C[S]);
          for (const S of Object.keys(m)) this.addEncoding(S, m[S]);
          this.reset();
        }
        addProtocol(l, _) {
          this._protocols[l] = _;
        }
        addEncoding(l, _) {
          this._encodings[l] = _;
        }
        get activeProtocol() {
          return this._activeProtocol;
        }
        get areMouseEventsActive() {
          return this._protocols[this._activeProtocol].events !== 0;
        }
        set activeProtocol(l) {
          if (!this._protocols[l]) throw new Error(`unknown protocol "${l}"`);
          this._activeProtocol = l, this._onProtocolChange.fire(this._protocols[l].events);
        }
        get activeEncoding() {
          return this._activeEncoding;
        }
        set activeEncoding(l) {
          if (!this._encodings[l]) throw new Error(`unknown encoding "${l}"`);
          this._activeEncoding = l;
        }
        reset() {
          this.activeProtocol = "NONE", this.activeEncoding = "DEFAULT", this._lastEvent = null;
        }
        triggerMouseEvent(l) {
          if (l.col < 0 || l.col >= this._bufferService.cols || l.row < 0 || l.row >= this._bufferService.rows || l.button === 4 && l.action === 32 || l.button === 3 && l.action !== 32 || l.button !== 4 && (l.action === 2 || l.action === 3) || (l.col++, l.row++, l.action === 32 && this._lastEvent && this._equalEvents(this._lastEvent, l, this._activeEncoding === "SGR_PIXELS")) || !this._protocols[this._activeProtocol].restrict(l)) return !1;
          const _ = this._encodings[this._activeEncoding](l);
          return _ && (this._activeEncoding === "DEFAULT" ? this._coreService.triggerBinaryEvent(_) : this._coreService.triggerDataEvent(_, !0)), this._lastEvent = l, !0;
        }
        explainEvents(l) {
          return { down: !!(1 & l), up: !!(2 & l), drag: !!(4 & l), move: !!(8 & l), wheel: !!(16 & l) };
        }
        _equalEvents(l, _, S) {
          if (S) {
            if (l.x !== _.x || l.y !== _.y) return !1;
          } else if (l.col !== _.col || l.row !== _.row) return !1;
          return l.button === _.button && l.action === _.action && l.ctrl === _.ctrl && l.alt === _.alt && l.shift === _.shift;
        }
      };
      s.CoreMouseService = h = u([p(0, f.IBufferService), p(1, f.ICoreService)], h);
    }, 6975: function(c, s, a) {
      var u = this && this.__decorate || function(h, l, _, S) {
        var x, D = arguments.length, y = D < 3 ? l : S === null ? S = Object.getOwnPropertyDescriptor(l, _) : S;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") y = Reflect.decorate(h, l, _, S);
        else for (var E = h.length - 1; E >= 0; E--) (x = h[E]) && (y = (D < 3 ? x(y) : D > 3 ? x(l, _, y) : x(l, _)) || y);
        return D > 3 && y && Object.defineProperty(l, _, y), y;
      }, p = this && this.__param || function(h, l) {
        return function(_, S) {
          l(_, S, h);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.CoreService = void 0;
      const f = a(1439), g = a(8460), v = a(844), C = a(2585), b = Object.freeze({ insertMode: !1 }), d = Object.freeze({ applicationCursorKeys: !1, applicationKeypad: !1, bracketedPasteMode: !1, origin: !1, reverseWraparound: !1, sendFocus: !1, wraparound: !0 });
      let m = s.CoreService = class extends v.Disposable {
        constructor(h, l, _) {
          super(), this._bufferService = h, this._logService = l, this._optionsService = _, this.isCursorInitialized = !1, this.isCursorHidden = !1, this._onData = this.register(new g.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new g.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new g.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new g.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, f.clone)(b), this.decPrivateModes = (0, f.clone)(d);
        }
        reset() {
          this.modes = (0, f.clone)(b), this.decPrivateModes = (0, f.clone)(d);
        }
        triggerDataEvent(h, l = !1) {
          if (this._optionsService.rawOptions.disableStdin) return;
          const _ = this._bufferService.buffer;
          l && this._optionsService.rawOptions.scrollOnUserInput && _.ybase !== _.ydisp && this._onRequestScrollToBottom.fire(), l && this._onUserInput.fire(), this._logService.debug(`sending data "${h}"`, () => h.split("").map((S) => S.charCodeAt(0))), this._onData.fire(h);
        }
        triggerBinaryEvent(h) {
          this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${h}"`, () => h.split("").map((l) => l.charCodeAt(0))), this._onBinary.fire(h));
        }
      };
      s.CoreService = m = u([p(0, C.IBufferService), p(1, C.ILogService), p(2, C.IOptionsService)], m);
    }, 9074: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.DecorationService = void 0;
      const u = a(8055), p = a(8460), f = a(844), g = a(6106);
      let v = 0, C = 0;
      class b extends f.Disposable {
        get decorations() {
          return this._decorations.values();
        }
        constructor() {
          super(), this._decorations = new g.SortedList((h) => h?.marker.line), this._onDecorationRegistered = this.register(new p.EventEmitter()), this.onDecorationRegistered = this._onDecorationRegistered.event, this._onDecorationRemoved = this.register(new p.EventEmitter()), this.onDecorationRemoved = this._onDecorationRemoved.event, this.register((0, f.toDisposable)(() => this.reset()));
        }
        registerDecoration(h) {
          if (h.marker.isDisposed) return;
          const l = new d(h);
          if (l) {
            const _ = l.marker.onDispose(() => l.dispose());
            l.onDispose(() => {
              l && (this._decorations.delete(l) && this._onDecorationRemoved.fire(l), _.dispose());
            }), this._decorations.insert(l), this._onDecorationRegistered.fire(l);
          }
          return l;
        }
        reset() {
          for (const h of this._decorations.values()) h.dispose();
          this._decorations.clear();
        }
        *getDecorationsAtCell(h, l, _) {
          let S = 0, x = 0;
          for (const D of this._decorations.getKeyIterator(l)) S = D.options.x ?? 0, x = S + (D.options.width ?? 1), h >= S && h < x && (!_ || (D.options.layer ?? "bottom") === _) && (yield D);
        }
        forEachDecorationAtCell(h, l, _, S) {
          this._decorations.forEachByKey(l, (x) => {
            v = x.options.x ?? 0, C = v + (x.options.width ?? 1), h >= v && h < C && (!_ || (x.options.layer ?? "bottom") === _) && S(x);
          });
        }
      }
      s.DecorationService = b;
      class d extends f.Disposable {
        get isDisposed() {
          return this._isDisposed;
        }
        get backgroundColorRGB() {
          return this._cachedBg === null && (this.options.backgroundColor ? this._cachedBg = u.css.toColor(this.options.backgroundColor) : this._cachedBg = void 0), this._cachedBg;
        }
        get foregroundColorRGB() {
          return this._cachedFg === null && (this.options.foregroundColor ? this._cachedFg = u.css.toColor(this.options.foregroundColor) : this._cachedFg = void 0), this._cachedFg;
        }
        constructor(h) {
          super(), this.options = h, this.onRenderEmitter = this.register(new p.EventEmitter()), this.onRender = this.onRenderEmitter.event, this._onDispose = this.register(new p.EventEmitter()), this.onDispose = this._onDispose.event, this._cachedBg = null, this._cachedFg = null, this.marker = h.marker, this.options.overviewRulerOptions && !this.options.overviewRulerOptions.position && (this.options.overviewRulerOptions.position = "full");
        }
        dispose() {
          this._onDispose.fire(), super.dispose();
        }
      }
    }, 4348: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.InstantiationService = s.ServiceCollection = void 0;
      const u = a(2585), p = a(8343);
      class f {
        constructor(...v) {
          this._entries = /* @__PURE__ */ new Map();
          for (const [C, b] of v) this.set(C, b);
        }
        set(v, C) {
          const b = this._entries.get(v);
          return this._entries.set(v, C), b;
        }
        forEach(v) {
          for (const [C, b] of this._entries.entries()) v(C, b);
        }
        has(v) {
          return this._entries.has(v);
        }
        get(v) {
          return this._entries.get(v);
        }
      }
      s.ServiceCollection = f, s.InstantiationService = class {
        constructor() {
          this._services = new f(), this._services.set(u.IInstantiationService, this);
        }
        setService(g, v) {
          this._services.set(g, v);
        }
        getService(g) {
          return this._services.get(g);
        }
        createInstance(g, ...v) {
          const C = (0, p.getServiceDependencies)(g).sort((m, h) => m.index - h.index), b = [];
          for (const m of C) {
            const h = this._services.get(m.id);
            if (!h) throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${m.id}.`);
            b.push(h);
          }
          const d = C.length > 0 ? C[0].index : v.length;
          if (v.length !== d) throw new Error(`[createInstance] First service dependency of ${g.name} at position ${d + 1} conflicts with ${v.length} static arguments`);
          return new g(...v, ...b);
        }
      };
    }, 7866: function(c, s, a) {
      var u = this && this.__decorate || function(d, m, h, l) {
        var _, S = arguments.length, x = S < 3 ? m : l === null ? l = Object.getOwnPropertyDescriptor(m, h) : l;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") x = Reflect.decorate(d, m, h, l);
        else for (var D = d.length - 1; D >= 0; D--) (_ = d[D]) && (x = (S < 3 ? _(x) : S > 3 ? _(m, h, x) : _(m, h)) || x);
        return S > 3 && x && Object.defineProperty(m, h, x), x;
      }, p = this && this.__param || function(d, m) {
        return function(h, l) {
          m(h, l, d);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.traceCall = s.setTraceLogger = s.LogService = void 0;
      const f = a(844), g = a(2585), v = { trace: g.LogLevelEnum.TRACE, debug: g.LogLevelEnum.DEBUG, info: g.LogLevelEnum.INFO, warn: g.LogLevelEnum.WARN, error: g.LogLevelEnum.ERROR, off: g.LogLevelEnum.OFF };
      let C, b = s.LogService = class extends f.Disposable {
        get logLevel() {
          return this._logLevel;
        }
        constructor(d) {
          super(), this._optionsService = d, this._logLevel = g.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel())), C = this;
        }
        _updateLogLevel() {
          this._logLevel = v[this._optionsService.rawOptions.logLevel];
        }
        _evalLazyOptionalParams(d) {
          for (let m = 0; m < d.length; m++) typeof d[m] == "function" && (d[m] = d[m]());
        }
        _log(d, m, h) {
          this._evalLazyOptionalParams(h), d.call(console, (this._optionsService.options.logger ? "" : "xterm.js: ") + m, ...h);
        }
        trace(d, ...m) {
          this._logLevel <= g.LogLevelEnum.TRACE && this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger) ?? console.log, d, m);
        }
        debug(d, ...m) {
          this._logLevel <= g.LogLevelEnum.DEBUG && this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger) ?? console.log, d, m);
        }
        info(d, ...m) {
          this._logLevel <= g.LogLevelEnum.INFO && this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger) ?? console.info, d, m);
        }
        warn(d, ...m) {
          this._logLevel <= g.LogLevelEnum.WARN && this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger) ?? console.warn, d, m);
        }
        error(d, ...m) {
          this._logLevel <= g.LogLevelEnum.ERROR && this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger) ?? console.error, d, m);
        }
      };
      s.LogService = b = u([p(0, g.IOptionsService)], b), s.setTraceLogger = function(d) {
        C = d;
      }, s.traceCall = function(d, m, h) {
        if (typeof h.value != "function") throw new Error("not supported");
        const l = h.value;
        h.value = function(..._) {
          if (C.logLevel !== g.LogLevelEnum.TRACE) return l.apply(this, _);
          C.trace(`GlyphRenderer#${l.name}(${_.map((x) => JSON.stringify(x)).join(", ")})`);
          const S = l.apply(this, _);
          return C.trace(`GlyphRenderer#${l.name} return`, S), S;
        };
      };
    }, 7302: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.OptionsService = s.DEFAULT_OPTIONS = void 0;
      const u = a(8460), p = a(844), f = a(6114);
      s.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: !1, cursorStyle: "block", cursorWidth: 1, cursorInactiveStyle: "outline", customGlyphs: !0, drawBoldTextInBrightColors: !0, documentOverride: null, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", ignoreBracketedPasteMode: !1, lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", logger: null, scrollback: 1e3, scrollOnUserInput: !0, scrollSensitivity: 1, screenReaderMode: !1, smoothScrollDuration: 0, macOptionIsMeta: !1, macOptionClickForcesSelection: !1, minimumContrastRatio: 1, disableStdin: !1, allowProposedApi: !1, allowTransparency: !1, tabStopWidth: 8, theme: {}, rescaleOverlappingGlyphs: !1, rightClickSelectsWord: f.isMac, windowOptions: {}, windowsMode: !1, windowsPty: {}, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: !0, convertEol: !1, termName: "xterm", cancelEvents: !1, overviewRulerWidth: 0 };
      const g = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
      class v extends p.Disposable {
        constructor(b) {
          super(), this._onOptionChange = this.register(new u.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
          const d = { ...s.DEFAULT_OPTIONS };
          for (const m in b) if (m in d) try {
            const h = b[m];
            d[m] = this._sanitizeAndValidateOption(m, h);
          } catch (h) {
            console.error(h);
          }
          this.rawOptions = d, this.options = { ...d }, this._setupOptions(), this.register((0, p.toDisposable)(() => {
            this.rawOptions.linkHandler = null, this.rawOptions.documentOverride = null;
          }));
        }
        onSpecificOptionChange(b, d) {
          return this.onOptionChange((m) => {
            m === b && d(this.rawOptions[b]);
          });
        }
        onMultipleOptionChange(b, d) {
          return this.onOptionChange((m) => {
            b.indexOf(m) !== -1 && d();
          });
        }
        _setupOptions() {
          const b = (m) => {
            if (!(m in s.DEFAULT_OPTIONS)) throw new Error(`No option with key "${m}"`);
            return this.rawOptions[m];
          }, d = (m, h) => {
            if (!(m in s.DEFAULT_OPTIONS)) throw new Error(`No option with key "${m}"`);
            h = this._sanitizeAndValidateOption(m, h), this.rawOptions[m] !== h && (this.rawOptions[m] = h, this._onOptionChange.fire(m));
          };
          for (const m in this.rawOptions) {
            const h = { get: b.bind(this, m), set: d.bind(this, m) };
            Object.defineProperty(this.options, m, h);
          }
        }
        _sanitizeAndValidateOption(b, d) {
          switch (b) {
            case "cursorStyle":
              if (d || (d = s.DEFAULT_OPTIONS[b]), !/* @__PURE__ */ function(m) {
                return m === "block" || m === "underline" || m === "bar";
              }(d)) throw new Error(`"${d}" is not a valid value for ${b}`);
              break;
            case "wordSeparator":
              d || (d = s.DEFAULT_OPTIONS[b]);
              break;
            case "fontWeight":
            case "fontWeightBold":
              if (typeof d == "number" && 1 <= d && d <= 1e3) break;
              d = g.includes(d) ? d : s.DEFAULT_OPTIONS[b];
              break;
            case "cursorWidth":
              d = Math.floor(d);
            case "lineHeight":
            case "tabStopWidth":
              if (d < 1) throw new Error(`${b} cannot be less than 1, value: ${d}`);
              break;
            case "minimumContrastRatio":
              d = Math.max(1, Math.min(21, Math.round(10 * d) / 10));
              break;
            case "scrollback":
              if ((d = Math.min(d, 4294967295)) < 0) throw new Error(`${b} cannot be less than 0, value: ${d}`);
              break;
            case "fastScrollSensitivity":
            case "scrollSensitivity":
              if (d <= 0) throw new Error(`${b} cannot be less than or equal to 0, value: ${d}`);
              break;
            case "rows":
            case "cols":
              if (!d && d !== 0) throw new Error(`${b} must be numeric, value: ${d}`);
              break;
            case "windowsPty":
              d = d ?? {};
          }
          return d;
        }
      }
      s.OptionsService = v;
    }, 2660: function(c, s, a) {
      var u = this && this.__decorate || function(v, C, b, d) {
        var m, h = arguments.length, l = h < 3 ? C : d === null ? d = Object.getOwnPropertyDescriptor(C, b) : d;
        if (typeof Reflect == "object" && typeof Reflect.decorate == "function") l = Reflect.decorate(v, C, b, d);
        else for (var _ = v.length - 1; _ >= 0; _--) (m = v[_]) && (l = (h < 3 ? m(l) : h > 3 ? m(C, b, l) : m(C, b)) || l);
        return h > 3 && l && Object.defineProperty(C, b, l), l;
      }, p = this && this.__param || function(v, C) {
        return function(b, d) {
          C(b, d, v);
        };
      };
      Object.defineProperty(s, "__esModule", { value: !0 }), s.OscLinkService = void 0;
      const f = a(2585);
      let g = s.OscLinkService = class {
        constructor(v) {
          this._bufferService = v, this._nextId = 1, this._entriesWithId = /* @__PURE__ */ new Map(), this._dataByLinkId = /* @__PURE__ */ new Map();
        }
        registerLink(v) {
          const C = this._bufferService.buffer;
          if (v.id === void 0) {
            const _ = C.addMarker(C.ybase + C.y), S = { data: v, id: this._nextId++, lines: [_] };
            return _.onDispose(() => this._removeMarkerFromLink(S, _)), this._dataByLinkId.set(S.id, S), S.id;
          }
          const b = v, d = this._getEntryIdKey(b), m = this._entriesWithId.get(d);
          if (m) return this.addLineToLink(m.id, C.ybase + C.y), m.id;
          const h = C.addMarker(C.ybase + C.y), l = { id: this._nextId++, key: this._getEntryIdKey(b), data: b, lines: [h] };
          return h.onDispose(() => this._removeMarkerFromLink(l, h)), this._entriesWithId.set(l.key, l), this._dataByLinkId.set(l.id, l), l.id;
        }
        addLineToLink(v, C) {
          const b = this._dataByLinkId.get(v);
          if (b && b.lines.every((d) => d.line !== C)) {
            const d = this._bufferService.buffer.addMarker(C);
            b.lines.push(d), d.onDispose(() => this._removeMarkerFromLink(b, d));
          }
        }
        getLinkData(v) {
          return this._dataByLinkId.get(v)?.data;
        }
        _getEntryIdKey(v) {
          return `${v.id};;${v.uri}`;
        }
        _removeMarkerFromLink(v, C) {
          const b = v.lines.indexOf(C);
          b !== -1 && (v.lines.splice(b, 1), v.lines.length === 0 && (v.data.id !== void 0 && this._entriesWithId.delete(v.key), this._dataByLinkId.delete(v.id)));
        }
      };
      s.OscLinkService = g = u([p(0, f.IBufferService)], g);
    }, 8343: (c, s) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.createDecorator = s.getServiceDependencies = s.serviceRegistry = void 0;
      const a = "di$target", u = "di$dependencies";
      s.serviceRegistry = /* @__PURE__ */ new Map(), s.getServiceDependencies = function(p) {
        return p[u] || [];
      }, s.createDecorator = function(p) {
        if (s.serviceRegistry.has(p)) return s.serviceRegistry.get(p);
        const f = function(g, v, C) {
          if (arguments.length !== 3) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
          (function(b, d, m) {
            d[a] === d ? d[u].push({ id: b, index: m }) : (d[u] = [{ id: b, index: m }], d[a] = d);
          })(f, g, C);
        };
        return f.toString = () => p, s.serviceRegistry.set(p, f), f;
      };
    }, 2585: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.IDecorationService = s.IUnicodeService = s.IOscLinkService = s.IOptionsService = s.ILogService = s.LogLevelEnum = s.IInstantiationService = s.ICharsetService = s.ICoreService = s.ICoreMouseService = s.IBufferService = void 0;
      const u = a(8343);
      var p;
      s.IBufferService = (0, u.createDecorator)("BufferService"), s.ICoreMouseService = (0, u.createDecorator)("CoreMouseService"), s.ICoreService = (0, u.createDecorator)("CoreService"), s.ICharsetService = (0, u.createDecorator)("CharsetService"), s.IInstantiationService = (0, u.createDecorator)("InstantiationService"), function(f) {
        f[f.TRACE = 0] = "TRACE", f[f.DEBUG = 1] = "DEBUG", f[f.INFO = 2] = "INFO", f[f.WARN = 3] = "WARN", f[f.ERROR = 4] = "ERROR", f[f.OFF = 5] = "OFF";
      }(p || (s.LogLevelEnum = p = {})), s.ILogService = (0, u.createDecorator)("LogService"), s.IOptionsService = (0, u.createDecorator)("OptionsService"), s.IOscLinkService = (0, u.createDecorator)("OscLinkService"), s.IUnicodeService = (0, u.createDecorator)("UnicodeService"), s.IDecorationService = (0, u.createDecorator)("DecorationService");
    }, 1480: (c, s, a) => {
      Object.defineProperty(s, "__esModule", { value: !0 }), s.UnicodeService = void 0;
      const u = a(8460), p = a(225);
      class f {
        static extractShouldJoin(v) {
          return (1 & v) != 0;
        }
        static extractWidth(v) {
          return v >> 1 & 3;
        }
        static extractCharKind(v) {
          return v >> 3;
        }
        static createPropertyValue(v, C, b = !1) {
          return (16777215 & v) << 3 | (3 & C) << 1 | (b ? 1 : 0);
        }
        constructor() {
          this._providers = /* @__PURE__ */ Object.create(null), this._active = "", this._onChange = new u.EventEmitter(), this.onChange = this._onChange.event;
          const v = new p.UnicodeV6();
          this.register(v), this._active = v.version, this._activeProvider = v;
        }
        dispose() {
          this._onChange.dispose();
        }
        get versions() {
          return Object.keys(this._providers);
        }
        get activeVersion() {
          return this._active;
        }
        set activeVersion(v) {
          if (!this._providers[v]) throw new Error(`unknown Unicode version "${v}"`);
          this._active = v, this._activeProvider = this._providers[v], this._onChange.fire(v);
        }
        register(v) {
          this._providers[v.version] = v;
        }
        wcwidth(v) {
          return this._activeProvider.wcwidth(v);
        }
        getStringCellWidth(v) {
          let C = 0, b = 0;
          const d = v.length;
          for (let m = 0; m < d; ++m) {
            let h = v.charCodeAt(m);
            if (55296 <= h && h <= 56319) {
              if (++m >= d) return C + this.wcwidth(h);
              const S = v.charCodeAt(m);
              56320 <= S && S <= 57343 ? h = 1024 * (h - 55296) + S - 56320 + 65536 : C += this.wcwidth(S);
            }
            const l = this.charProperties(h, b);
            let _ = f.extractWidth(l);
            f.extractShouldJoin(l) && (_ -= f.extractWidth(b)), C += _, b = l;
          }
          return C;
        }
        charProperties(v, C) {
          return this._activeProvider.charProperties(v, C);
        }
      }
      s.UnicodeService = f;
    } }, r = {};
    function n(c) {
      var s = r[c];
      if (s !== void 0) return s.exports;
      var a = r[c] = { exports: {} };
      return t[c].call(a.exports, a, a.exports, n), a.exports;
    }
    var o = {};
    return (() => {
      var c = o;
      Object.defineProperty(c, "__esModule", { value: !0 }), c.Terminal = void 0;
      const s = n(9042), a = n(3236), u = n(844), p = n(5741), f = n(8285), g = n(7975), v = n(7090), C = ["cols", "rows"];
      class b extends u.Disposable {
        constructor(m) {
          super(), this._core = this.register(new a.Terminal(m)), this._addonManager = this.register(new p.AddonManager()), this._publicOptions = { ...this._core.options };
          const h = (_) => this._core.options[_], l = (_, S) => {
            this._checkReadonlyOptions(_), this._core.options[_] = S;
          };
          for (const _ in this._core.options) {
            const S = { get: h.bind(this, _), set: l.bind(this, _) };
            Object.defineProperty(this._publicOptions, _, S);
          }
        }
        _checkReadonlyOptions(m) {
          if (C.includes(m)) throw new Error(`Option "${m}" can only be set in the constructor`);
        }
        _checkProposedApi() {
          if (!this._core.optionsService.rawOptions.allowProposedApi) throw new Error("You must set the allowProposedApi option to true to use proposed API");
        }
        get onBell() {
          return this._core.onBell;
        }
        get onBinary() {
          return this._core.onBinary;
        }
        get onCursorMove() {
          return this._core.onCursorMove;
        }
        get onData() {
          return this._core.onData;
        }
        get onKey() {
          return this._core.onKey;
        }
        get onLineFeed() {
          return this._core.onLineFeed;
        }
        get onRender() {
          return this._core.onRender;
        }
        get onResize() {
          return this._core.onResize;
        }
        get onScroll() {
          return this._core.onScroll;
        }
        get onSelectionChange() {
          return this._core.onSelectionChange;
        }
        get onTitleChange() {
          return this._core.onTitleChange;
        }
        get onWriteParsed() {
          return this._core.onWriteParsed;
        }
        get element() {
          return this._core.element;
        }
        get parser() {
          return this._parser || (this._parser = new g.ParserApi(this._core)), this._parser;
        }
        get unicode() {
          return this._checkProposedApi(), new v.UnicodeApi(this._core);
        }
        get textarea() {
          return this._core.textarea;
        }
        get rows() {
          return this._core.rows;
        }
        get cols() {
          return this._core.cols;
        }
        get buffer() {
          return this._buffer || (this._buffer = this.register(new f.BufferNamespaceApi(this._core))), this._buffer;
        }
        get markers() {
          return this._checkProposedApi(), this._core.markers;
        }
        get modes() {
          const m = this._core.coreService.decPrivateModes;
          let h = "none";
          switch (this._core.coreMouseService.activeProtocol) {
            case "X10":
              h = "x10";
              break;
            case "VT200":
              h = "vt200";
              break;
            case "DRAG":
              h = "drag";
              break;
            case "ANY":
              h = "any";
          }
          return { applicationCursorKeysMode: m.applicationCursorKeys, applicationKeypadMode: m.applicationKeypad, bracketedPasteMode: m.bracketedPasteMode, insertMode: this._core.coreService.modes.insertMode, mouseTrackingMode: h, originMode: m.origin, reverseWraparoundMode: m.reverseWraparound, sendFocusMode: m.sendFocus, wraparoundMode: m.wraparound };
        }
        get options() {
          return this._publicOptions;
        }
        set options(m) {
          for (const h in m) this._publicOptions[h] = m[h];
        }
        blur() {
          this._core.blur();
        }
        focus() {
          this._core.focus();
        }
        input(m, h = !0) {
          this._core.input(m, h);
        }
        resize(m, h) {
          this._verifyIntegers(m, h), this._core.resize(m, h);
        }
        open(m) {
          this._core.open(m);
        }
        attachCustomKeyEventHandler(m) {
          this._core.attachCustomKeyEventHandler(m);
        }
        attachCustomWheelEventHandler(m) {
          this._core.attachCustomWheelEventHandler(m);
        }
        registerLinkProvider(m) {
          return this._core.registerLinkProvider(m);
        }
        registerCharacterJoiner(m) {
          return this._checkProposedApi(), this._core.registerCharacterJoiner(m);
        }
        deregisterCharacterJoiner(m) {
          this._checkProposedApi(), this._core.deregisterCharacterJoiner(m);
        }
        registerMarker(m = 0) {
          return this._verifyIntegers(m), this._core.registerMarker(m);
        }
        registerDecoration(m) {
          return this._checkProposedApi(), this._verifyPositiveIntegers(m.x ?? 0, m.width ?? 0, m.height ?? 0), this._core.registerDecoration(m);
        }
        hasSelection() {
          return this._core.hasSelection();
        }
        select(m, h, l) {
          this._verifyIntegers(m, h, l), this._core.select(m, h, l);
        }
        getSelection() {
          return this._core.getSelection();
        }
        getSelectionPosition() {
          return this._core.getSelectionPosition();
        }
        clearSelection() {
          this._core.clearSelection();
        }
        selectAll() {
          this._core.selectAll();
        }
        selectLines(m, h) {
          this._verifyIntegers(m, h), this._core.selectLines(m, h);
        }
        dispose() {
          super.dispose();
        }
        scrollLines(m) {
          this._verifyIntegers(m), this._core.scrollLines(m);
        }
        scrollPages(m) {
          this._verifyIntegers(m), this._core.scrollPages(m);
        }
        scrollToTop() {
          this._core.scrollToTop();
        }
        scrollToBottom() {
          this._core.scrollToBottom();
        }
        scrollToLine(m) {
          this._verifyIntegers(m), this._core.scrollToLine(m);
        }
        clear() {
          this._core.clear();
        }
        write(m, h) {
          this._core.write(m, h);
        }
        writeln(m, h) {
          this._core.write(m), this._core.write(`\r
`, h);
        }
        paste(m) {
          this._core.paste(m);
        }
        refresh(m, h) {
          this._verifyIntegers(m, h), this._core.refresh(m, h);
        }
        reset() {
          this._core.reset();
        }
        clearTextureAtlas() {
          this._core.clearTextureAtlas();
        }
        loadAddon(m) {
          this._addonManager.loadAddon(this, m);
        }
        static get strings() {
          return s;
        }
        _verifyIntegers(...m) {
          for (const h of m) if (h === 1 / 0 || isNaN(h) || h % 1 != 0) throw new Error("This API only accepts integers");
        }
        _verifyPositiveIntegers(...m) {
          for (const h of m) if (h && (h === 1 / 0 || isNaN(h) || h % 1 != 0 || h < 0)) throw new Error("This API only accepts positive integers");
        }
      }
      c.Terminal = b;
    })(), o;
  })());
})(ql);
var fm = ql.exports, Wl = { exports: {} };
(function(i, e) {
  (function(t, r) {
    i.exports = r();
  })(self, () => (() => {
    var t = {};
    return (() => {
      var r = t;
      Object.defineProperty(r, "__esModule", { value: !0 }), r.FitAddon = void 0, r.FitAddon = class {
        activate(n) {
          this._terminal = n;
        }
        dispose() {
        }
        fit() {
          const n = this.proposeDimensions();
          if (!n || !this._terminal || isNaN(n.cols) || isNaN(n.rows)) return;
          const o = this._terminal._core;
          this._terminal.rows === n.rows && this._terminal.cols === n.cols || (o._renderService.clear(), this._terminal.resize(n.cols, n.rows));
        }
        proposeDimensions() {
          if (!this._terminal || !this._terminal.element || !this._terminal.element.parentElement) return;
          const n = this._terminal._core, o = n._renderService.dimensions;
          if (o.css.cell.width === 0 || o.css.cell.height === 0) return;
          const c = this._terminal.options.scrollback === 0 ? 0 : n.viewport.scrollBarWidth, s = window.getComputedStyle(this._terminal.element.parentElement), a = parseInt(s.getPropertyValue("height")), u = Math.max(0, parseInt(s.getPropertyValue("width"))), p = window.getComputedStyle(this._terminal.element), f = a - (parseInt(p.getPropertyValue("padding-top")) + parseInt(p.getPropertyValue("padding-bottom"))), g = u - (parseInt(p.getPropertyValue("padding-right")) + parseInt(p.getPropertyValue("padding-left"))) - c;
          return { cols: Math.max(2, Math.floor(g / o.css.cell.width)), rows: Math.max(1, Math.floor(f / o.css.cell.height)) };
        }
      };
    })(), t;
  })());
})(Wl);
var mm = Wl.exports;
const {
  SvelteComponent: pm,
  append_hydration: Go,
  assign: _m,
  attr: Vo,
  binding_callbacks: gm,
  check_outros: vm,
  children: Ko,
  claim_component: zn,
  claim_element: Xo,
  claim_space: Yo,
  claim_text: bm,
  create_component: Hn,
  destroy_component: Nn,
  detach: ii,
  element: $o,
  flush: we,
  get_spread_object: wm,
  get_spread_update: ym,
  group_outros: Sm,
  init: Cm,
  insert_hydration: hn,
  mount_component: qn,
  safe_not_equal: xm,
  set_data: km,
  set_style: Zo,
  space: Jo,
  text: Dm,
  transition_in: Nr,
  transition_out: li
} = window.__gradio__svelte__internal, { onMount: Em } = window.__gradio__svelte__internal;
function Qo(i) {
  let e, t;
  const r = [
    { autoscroll: (
      /*gradio*/
      i[0].autoscroll
    ) },
    { i18n: (
      /*gradio*/
      i[0].i18n
    ) },
    /*loading_status*/
    i[10]
  ];
  let n = {};
  for (let o = 0; o < r.length; o += 1)
    n = _m(n, r[o]);
  return e = new Kf({ props: n }), {
    c() {
      Hn(e.$$.fragment);
    },
    l(o) {
      zn(e.$$.fragment, o);
    },
    m(o, c) {
      qn(e, o, c), t = !0;
    },
    p(o, c) {
      const s = c[0] & /*gradio, loading_status*/
      1025 ? ym(r, [
        c[0] & /*gradio*/
        1 && { autoscroll: (
          /*gradio*/
          o[0].autoscroll
        ) },
        c[0] & /*gradio*/
        1 && { i18n: (
          /*gradio*/
          o[0].i18n
        ) },
        c[0] & /*loading_status*/
        1024 && wm(
          /*loading_status*/
          o[10]
        )
      ]) : {};
      e.$set(s);
    },
    i(o) {
      t || (Nr(e.$$.fragment, o), t = !0);
    },
    o(o) {
      li(e.$$.fragment, o), t = !1;
    },
    d(o) {
      Nn(e, o);
    }
  };
}
function Am(i) {
  let e;
  return {
    c() {
      e = Dm(
        /*label*/
        i[2]
      );
    },
    l(t) {
      e = bm(
        t,
        /*label*/
        i[2]
      );
    },
    m(t, r) {
      hn(t, e, r);
    },
    p(t, r) {
      r[0] & /*label*/
      4 && km(
        e,
        /*label*/
        t[2]
      );
    },
    d(t) {
      t && ii(e);
    }
  };
}
function Tm(i) {
  let e, t, r, n, o, c, s = (
    /*loading_status*/
    i[10] && Qo(i)
  );
  return r = new Hd({
    props: {
      show_label: (
        /*show_label*/
        i[7]
      ),
      info: void 0,
      $$slots: { default: [Am] },
      $$scope: { ctx: i }
    }
  }), {
    c() {
      s && s.c(), e = Jo(), t = $o("div"), Hn(r.$$.fragment), n = Jo(), o = $o("div"), this.h();
    },
    l(a) {
      s && s.l(a), e = Yo(a), t = Xo(a, "DIV", { style: !0, class: !0 });
      var u = Ko(t);
      zn(r.$$.fragment, u), n = Yo(u), o = Xo(u, "DIV", { style: !0, class: !0 }), Ko(o).forEach(ii), u.forEach(ii), this.h();
    },
    h() {
      Zo(o, "height", "calc(100% - 10px)"), Vo(o, "class", "svelte-1jxdgz3"), Zo(t, "height", "100%"), Vo(t, "class", "svelte-1jxdgz3");
    },
    m(a, u) {
      s && s.m(a, u), hn(a, e, u), hn(a, t, u), qn(r, t, null), Go(t, n), Go(t, o), i[50](o), c = !0;
    },
    p(a, u) {
      /*loading_status*/
      a[10] ? s ? (s.p(a, u), u[0] & /*loading_status*/
      1024 && Nr(s, 1)) : (s = Qo(a), s.c(), Nr(s, 1), s.m(e.parentNode, e)) : s && (Sm(), li(s, 1, 1, () => {
        s = null;
      }), vm());
      const p = {};
      u[0] & /*show_label*/
      128 && (p.show_label = /*show_label*/
      a[7]), u[0] & /*label*/
      4 | u[1] & /*$$scope*/
      2097152 && (p.$$scope = { dirty: u, ctx: a }), r.$set(p);
    },
    i(a) {
      c || (Nr(s), Nr(r.$$.fragment, a), c = !0);
    },
    o(a) {
      li(s), li(r.$$.fragment, a), c = !1;
    },
    d(a) {
      a && (ii(e), ii(t)), s && s.d(a), Nn(r), i[50](null);
    }
  };
}
function Mm(i) {
  let e, t;
  return e = new fh({
    props: {
      visible: (
        /*visible*/
        i[6]
      ),
      elem_id: (
        /*elem_id*/
        i[4]
      ),
      scale: (
        /*scale*/
        i[8]
      ),
      min_width: (
        /*min_width*/
        i[9]
      ),
      height: (
        /*height*/
        i[1]
      ),
      elem_classes: [
        .../*elem_classes*/
        i[5],
        /*dark*/
        i[3] ? "dark" : ""
      ],
      allow_overflow: !1,
      padding: !0,
      $$slots: { default: [Tm] },
      $$scope: { ctx: i }
    }
  }), {
    c() {
      Hn(e.$$.fragment);
    },
    l(r) {
      zn(e.$$.fragment, r);
    },
    m(r, n) {
      qn(e, r, n), t = !0;
    },
    p(r, n) {
      const o = {};
      n[0] & /*visible*/
      64 && (o.visible = /*visible*/
      r[6]), n[0] & /*elem_id*/
      16 && (o.elem_id = /*elem_id*/
      r[4]), n[0] & /*scale*/
      256 && (o.scale = /*scale*/
      r[8]), n[0] & /*min_width*/
      512 && (o.min_width = /*min_width*/
      r[9]), n[0] & /*height*/
      2 && (o.height = /*height*/
      r[1]), n[0] & /*elem_classes, dark*/
      40 && (o.elem_classes = [
        .../*elem_classes*/
        r[5],
        /*dark*/
        r[3] ? "dark" : ""
      ]), n[0] & /*termNode, show_label, label, gradio, loading_status*/
      3205 | n[1] & /*$$scope*/
      2097152 && (o.$$scope = { dirty: n, ctx: r }), e.$set(o);
    },
    i(r) {
      t || (Nr(e.$$.fragment, r), t = !0);
    },
    o(r) {
      li(e.$$.fragment, r), t = !1;
    },
    d(r) {
      Nn(e, r);
    }
  };
}
function Bm(i, e, t) {
  let r, { gradio: n } = e, { height: o = 240 } = e, { log_file: c = "" } = e, { label: s = `log of ${c}` } = e, { dark: a = !1 } = e, { elem_id: u = "" } = e, { elem_classes: p = ["terminal-block"] } = e, { visible: f = !0 } = e, { value: g = "" } = e, { show_label: v } = e, { scale: C = null } = e, { min_width: b = void 0 } = e, { loading_status: d = void 0 } = e, { xterm_allow_proposed_api: m } = e, { xterm_allow_transparency: h } = e, { xterm_alt_click_moves_cursor: l } = e, { xterm_convert_eol: _ } = e, { xterm_cursor_blink: S } = e, { xterm_cursor_inactive_style: x } = e, { xterm_cursor_style: D } = e, { xterm_cursor_width: y } = e, { xterm_custom_glyphs: E } = e, { xterm_disable_stdin: B } = e, { xterm_document_override: O } = e, { xterm_draw_bold_text_in_bright_colors: N } = e, { xterm_fast_scroll_modifier: R } = e, { xterm_fast_scroll_sensitivity: j } = e, { xterm_font_family: Y } = e, { xterm_font_size: ee } = e, { xterm_font_weight: ne } = e, { xterm_font_weight_bold: Z } = e, { xterm_ignore_bracketed_paste_mode: T } = e, { xterm_letter_spacing: L } = e, { xterm_line_height: I } = e, { xterm_log_level: H } = e, { xterm_mac_option_click_forces_selection: K } = e, { xterm_mac_option_is_meta: re } = e, { xterm_minimum_contrast_ratio: V } = e, { xterm_overview_ruler_width: ue } = e, { xterm_rescale_overlapping_glyphs: W } = e, { xterm_right_click_selects_word: F } = e, { xterm_screen_reader_mode: X } = e, { xterm_scroll_on_user_input: J } = e, { xterm_scroll_sensitivity: oe } = e, { xterm_scrollback: se } = e, { xterm_smooth_scroll_duration: be } = e, { xterm_tab_stop_width: xe } = e, { xterm_windows_mode: De } = e, Te, de;
  Em(() => {
    t(49, Te = new fm.Terminal({
      theme: r,
      allowProposedApi: m,
      allowTransparency: h,
      altClickMovesCursor: l,
      convertEol: _,
      cursorBlink: S,
      cursorInactiveStyle: x,
      cursorStyle: D,
      cursorWidth: y,
      customGlyphs: E,
      disableStdin: B,
      documentOverride: O,
      drawBoldTextInBrightColors: N,
      fastScrollModifier: R,
      fastScrollSensitivity: j,
      fontFamily: Y,
      fontSize: ee,
      fontWeight: ne,
      fontWeightBold: Z,
      ignoreBracketedPasteMode: T,
      letterSpacing: L,
      lineHeight: I,
      logLevel: H,
      macOptionClickForcesSelection: K,
      macOptionIsMeta: re,
      minimumContrastRatio: V,
      overviewRulerWidth: ue,
      rescaleOverlappingGlyphs: W,
      rightClickSelectsWord: F,
      screenReaderMode: X,
      scrollOnUserInput: J,
      scrollSensitivity: oe,
      smoothScrollDuration: be,
      tabStopWidth: xe,
      scrollback: se,
      windowsMode: De
    })), Te.open(de);
    const $ = new mm.FitAddon();
    Te.loadAddon($);
    const Qt = () => {
      $.fit();
    };
    return setTimeout(
      () => {
        $.fit();
      },
      300
    ), window.addEventListener("resize", Qt), () => {
      window.removeEventListener("resize", Qt);
    };
  });
  function Ve($) {
    gm[$ ? "unshift" : "push"](() => {
      de = $, t(11, de);
    });
  }
  return i.$$set = ($) => {
    "gradio" in $ && t(0, n = $.gradio), "height" in $ && t(1, o = $.height), "log_file" in $ && t(12, c = $.log_file), "label" in $ && t(2, s = $.label), "dark" in $ && t(3, a = $.dark), "elem_id" in $ && t(4, u = $.elem_id), "elem_classes" in $ && t(5, p = $.elem_classes), "visible" in $ && t(6, f = $.visible), "value" in $ && t(13, g = $.value), "show_label" in $ && t(7, v = $.show_label), "scale" in $ && t(8, C = $.scale), "min_width" in $ && t(9, b = $.min_width), "loading_status" in $ && t(10, d = $.loading_status), "xterm_allow_proposed_api" in $ && t(14, m = $.xterm_allow_proposed_api), "xterm_allow_transparency" in $ && t(15, h = $.xterm_allow_transparency), "xterm_alt_click_moves_cursor" in $ && t(16, l = $.xterm_alt_click_moves_cursor), "xterm_convert_eol" in $ && t(17, _ = $.xterm_convert_eol), "xterm_cursor_blink" in $ && t(18, S = $.xterm_cursor_blink), "xterm_cursor_inactive_style" in $ && t(19, x = $.xterm_cursor_inactive_style), "xterm_cursor_style" in $ && t(20, D = $.xterm_cursor_style), "xterm_cursor_width" in $ && t(21, y = $.xterm_cursor_width), "xterm_custom_glyphs" in $ && t(22, E = $.xterm_custom_glyphs), "xterm_disable_stdin" in $ && t(23, B = $.xterm_disable_stdin), "xterm_document_override" in $ && t(24, O = $.xterm_document_override), "xterm_draw_bold_text_in_bright_colors" in $ && t(25, N = $.xterm_draw_bold_text_in_bright_colors), "xterm_fast_scroll_modifier" in $ && t(26, R = $.xterm_fast_scroll_modifier), "xterm_fast_scroll_sensitivity" in $ && t(27, j = $.xterm_fast_scroll_sensitivity), "xterm_font_family" in $ && t(28, Y = $.xterm_font_family), "xterm_font_size" in $ && t(29, ee = $.xterm_font_size), "xterm_font_weight" in $ && t(30, ne = $.xterm_font_weight), "xterm_font_weight_bold" in $ && t(31, Z = $.xterm_font_weight_bold), "xterm_ignore_bracketed_paste_mode" in $ && t(32, T = $.xterm_ignore_bracketed_paste_mode), "xterm_letter_spacing" in $ && t(33, L = $.xterm_letter_spacing), "xterm_line_height" in $ && t(34, I = $.xterm_line_height), "xterm_log_level" in $ && t(35, H = $.xterm_log_level), "xterm_mac_option_click_forces_selection" in $ && t(36, K = $.xterm_mac_option_click_forces_selection), "xterm_mac_option_is_meta" in $ && t(37, re = $.xterm_mac_option_is_meta), "xterm_minimum_contrast_ratio" in $ && t(38, V = $.xterm_minimum_contrast_ratio), "xterm_overview_ruler_width" in $ && t(39, ue = $.xterm_overview_ruler_width), "xterm_rescale_overlapping_glyphs" in $ && t(40, W = $.xterm_rescale_overlapping_glyphs), "xterm_right_click_selects_word" in $ && t(41, F = $.xterm_right_click_selects_word), "xterm_screen_reader_mode" in $ && t(42, X = $.xterm_screen_reader_mode), "xterm_scroll_on_user_input" in $ && t(43, J = $.xterm_scroll_on_user_input), "xterm_scroll_sensitivity" in $ && t(44, oe = $.xterm_scroll_sensitivity), "xterm_scrollback" in $ && t(45, se = $.xterm_scrollback), "xterm_smooth_scroll_duration" in $ && t(46, be = $.xterm_smooth_scroll_duration), "xterm_tab_stop_width" in $ && t(47, xe = $.xterm_tab_stop_width), "xterm_windows_mode" in $ && t(48, De = $.xterm_windows_mode);
  }, i.$$.update = () => {
    i.$$.dirty[0] & /*dark*/
    8 && (r = a ? {
      foreground: "white",
      background: "#1F2937"
    } : {
      foreground: "#1F2937",
      background: "white",
      selectionBackground: "#e5e7eb"
    }), i.$$.dirty[0] & /*value*/
    8192 | i.$$.dirty[1] & /*term*/
    262144 && Te && g && g.trim() !== "" && Te.write(g.replace(/\n/g, `
\r`));
  }, [
    n,
    o,
    s,
    a,
    u,
    p,
    f,
    v,
    C,
    b,
    d,
    de,
    c,
    g,
    m,
    h,
    l,
    _,
    S,
    x,
    D,
    y,
    E,
    B,
    O,
    N,
    R,
    j,
    Y,
    ee,
    ne,
    Z,
    T,
    L,
    I,
    H,
    K,
    re,
    V,
    ue,
    W,
    F,
    X,
    J,
    oe,
    se,
    be,
    xe,
    De,
    Te,
    Ve
  ];
}
class Fm extends pm {
  constructor(e) {
    super(), Cm(
      this,
      e,
      Bm,
      Mm,
      xm,
      {
        gradio: 0,
        height: 1,
        log_file: 12,
        label: 2,
        dark: 3,
        elem_id: 4,
        elem_classes: 5,
        visible: 6,
        value: 13,
        show_label: 7,
        scale: 8,
        min_width: 9,
        loading_status: 10,
        xterm_allow_proposed_api: 14,
        xterm_allow_transparency: 15,
        xterm_alt_click_moves_cursor: 16,
        xterm_convert_eol: 17,
        xterm_cursor_blink: 18,
        xterm_cursor_inactive_style: 19,
        xterm_cursor_style: 20,
        xterm_cursor_width: 21,
        xterm_custom_glyphs: 22,
        xterm_disable_stdin: 23,
        xterm_document_override: 24,
        xterm_draw_bold_text_in_bright_colors: 25,
        xterm_fast_scroll_modifier: 26,
        xterm_fast_scroll_sensitivity: 27,
        xterm_font_family: 28,
        xterm_font_size: 29,
        xterm_font_weight: 30,
        xterm_font_weight_bold: 31,
        xterm_ignore_bracketed_paste_mode: 32,
        xterm_letter_spacing: 33,
        xterm_line_height: 34,
        xterm_log_level: 35,
        xterm_mac_option_click_forces_selection: 36,
        xterm_mac_option_is_meta: 37,
        xterm_minimum_contrast_ratio: 38,
        xterm_overview_ruler_width: 39,
        xterm_rescale_overlapping_glyphs: 40,
        xterm_right_click_selects_word: 41,
        xterm_screen_reader_mode: 42,
        xterm_scroll_on_user_input: 43,
        xterm_scroll_sensitivity: 44,
        xterm_scrollback: 45,
        xterm_smooth_scroll_duration: 46,
        xterm_tab_stop_width: 47,
        xterm_windows_mode: 48
      },
      null,
      [-1, -1]
    );
  }
  get gradio() {
    return this.$$.ctx[0];
  }
  set gradio(e) {
    this.$$set({ gradio: e }), we();
  }
  get height() {
    return this.$$.ctx[1];
  }
  set height(e) {
    this.$$set({ height: e }), we();
  }
  get log_file() {
    return this.$$.ctx[12];
  }
  set log_file(e) {
    this.$$set({ log_file: e }), we();
  }
  get label() {
    return this.$$.ctx[2];
  }
  set label(e) {
    this.$$set({ label: e }), we();
  }
  get dark() {
    return this.$$.ctx[3];
  }
  set dark(e) {
    this.$$set({ dark: e }), we();
  }
  get elem_id() {
    return this.$$.ctx[4];
  }
  set elem_id(e) {
    this.$$set({ elem_id: e }), we();
  }
  get elem_classes() {
    return this.$$.ctx[5];
  }
  set elem_classes(e) {
    this.$$set({ elem_classes: e }), we();
  }
  get visible() {
    return this.$$.ctx[6];
  }
  set visible(e) {
    this.$$set({ visible: e }), we();
  }
  get value() {
    return this.$$.ctx[13];
  }
  set value(e) {
    this.$$set({ value: e }), we();
  }
  get show_label() {
    return this.$$.ctx[7];
  }
  set show_label(e) {
    this.$$set({ show_label: e }), we();
  }
  get scale() {
    return this.$$.ctx[8];
  }
  set scale(e) {
    this.$$set({ scale: e }), we();
  }
  get min_width() {
    return this.$$.ctx[9];
  }
  set min_width(e) {
    this.$$set({ min_width: e }), we();
  }
  get loading_status() {
    return this.$$.ctx[10];
  }
  set loading_status(e) {
    this.$$set({ loading_status: e }), we();
  }
  get xterm_allow_proposed_api() {
    return this.$$.ctx[14];
  }
  set xterm_allow_proposed_api(e) {
    this.$$set({ xterm_allow_proposed_api: e }), we();
  }
  get xterm_allow_transparency() {
    return this.$$.ctx[15];
  }
  set xterm_allow_transparency(e) {
    this.$$set({ xterm_allow_transparency: e }), we();
  }
  get xterm_alt_click_moves_cursor() {
    return this.$$.ctx[16];
  }
  set xterm_alt_click_moves_cursor(e) {
    this.$$set({ xterm_alt_click_moves_cursor: e }), we();
  }
  get xterm_convert_eol() {
    return this.$$.ctx[17];
  }
  set xterm_convert_eol(e) {
    this.$$set({ xterm_convert_eol: e }), we();
  }
  get xterm_cursor_blink() {
    return this.$$.ctx[18];
  }
  set xterm_cursor_blink(e) {
    this.$$set({ xterm_cursor_blink: e }), we();
  }
  get xterm_cursor_inactive_style() {
    return this.$$.ctx[19];
  }
  set xterm_cursor_inactive_style(e) {
    this.$$set({ xterm_cursor_inactive_style: e }), we();
  }
  get xterm_cursor_style() {
    return this.$$.ctx[20];
  }
  set xterm_cursor_style(e) {
    this.$$set({ xterm_cursor_style: e }), we();
  }
  get xterm_cursor_width() {
    return this.$$.ctx[21];
  }
  set xterm_cursor_width(e) {
    this.$$set({ xterm_cursor_width: e }), we();
  }
  get xterm_custom_glyphs() {
    return this.$$.ctx[22];
  }
  set xterm_custom_glyphs(e) {
    this.$$set({ xterm_custom_glyphs: e }), we();
  }
  get xterm_disable_stdin() {
    return this.$$.ctx[23];
  }
  set xterm_disable_stdin(e) {
    this.$$set({ xterm_disable_stdin: e }), we();
  }
  get xterm_document_override() {
    return this.$$.ctx[24];
  }
  set xterm_document_override(e) {
    this.$$set({ xterm_document_override: e }), we();
  }
  get xterm_draw_bold_text_in_bright_colors() {
    return this.$$.ctx[25];
  }
  set xterm_draw_bold_text_in_bright_colors(e) {
    this.$$set({ xterm_draw_bold_text_in_bright_colors: e }), we();
  }
  get xterm_fast_scroll_modifier() {
    return this.$$.ctx[26];
  }
  set xterm_fast_scroll_modifier(e) {
    this.$$set({ xterm_fast_scroll_modifier: e }), we();
  }
  get xterm_fast_scroll_sensitivity() {
    return this.$$.ctx[27];
  }
  set xterm_fast_scroll_sensitivity(e) {
    this.$$set({ xterm_fast_scroll_sensitivity: e }), we();
  }
  get xterm_font_family() {
    return this.$$.ctx[28];
  }
  set xterm_font_family(e) {
    this.$$set({ xterm_font_family: e }), we();
  }
  get xterm_font_size() {
    return this.$$.ctx[29];
  }
  set xterm_font_size(e) {
    this.$$set({ xterm_font_size: e }), we();
  }
  get xterm_font_weight() {
    return this.$$.ctx[30];
  }
  set xterm_font_weight(e) {
    this.$$set({ xterm_font_weight: e }), we();
  }
  get xterm_font_weight_bold() {
    return this.$$.ctx[31];
  }
  set xterm_font_weight_bold(e) {
    this.$$set({ xterm_font_weight_bold: e }), we();
  }
  get xterm_ignore_bracketed_paste_mode() {
    return this.$$.ctx[32];
  }
  set xterm_ignore_bracketed_paste_mode(e) {
    this.$$set({ xterm_ignore_bracketed_paste_mode: e }), we();
  }
  get xterm_letter_spacing() {
    return this.$$.ctx[33];
  }
  set xterm_letter_spacing(e) {
    this.$$set({ xterm_letter_spacing: e }), we();
  }
  get xterm_line_height() {
    return this.$$.ctx[34];
  }
  set xterm_line_height(e) {
    this.$$set({ xterm_line_height: e }), we();
  }
  get xterm_log_level() {
    return this.$$.ctx[35];
  }
  set xterm_log_level(e) {
    this.$$set({ xterm_log_level: e }), we();
  }
  get xterm_mac_option_click_forces_selection() {
    return this.$$.ctx[36];
  }
  set xterm_mac_option_click_forces_selection(e) {
    this.$$set({ xterm_mac_option_click_forces_selection: e }), we();
  }
  get xterm_mac_option_is_meta() {
    return this.$$.ctx[37];
  }
  set xterm_mac_option_is_meta(e) {
    this.$$set({ xterm_mac_option_is_meta: e }), we();
  }
  get xterm_minimum_contrast_ratio() {
    return this.$$.ctx[38];
  }
  set xterm_minimum_contrast_ratio(e) {
    this.$$set({ xterm_minimum_contrast_ratio: e }), we();
  }
  get xterm_overview_ruler_width() {
    return this.$$.ctx[39];
  }
  set xterm_overview_ruler_width(e) {
    this.$$set({ xterm_overview_ruler_width: e }), we();
  }
  get xterm_rescale_overlapping_glyphs() {
    return this.$$.ctx[40];
  }
  set xterm_rescale_overlapping_glyphs(e) {
    this.$$set({ xterm_rescale_overlapping_glyphs: e }), we();
  }
  get xterm_right_click_selects_word() {
    return this.$$.ctx[41];
  }
  set xterm_right_click_selects_word(e) {
    this.$$set({ xterm_right_click_selects_word: e }), we();
  }
  get xterm_screen_reader_mode() {
    return this.$$.ctx[42];
  }
  set xterm_screen_reader_mode(e) {
    this.$$set({ xterm_screen_reader_mode: e }), we();
  }
  get xterm_scroll_on_user_input() {
    return this.$$.ctx[43];
  }
  set xterm_scroll_on_user_input(e) {
    this.$$set({ xterm_scroll_on_user_input: e }), we();
  }
  get xterm_scroll_sensitivity() {
    return this.$$.ctx[44];
  }
  set xterm_scroll_sensitivity(e) {
    this.$$set({ xterm_scroll_sensitivity: e }), we();
  }
  get xterm_scrollback() {
    return this.$$.ctx[45];
  }
  set xterm_scrollback(e) {
    this.$$set({ xterm_scrollback: e }), we();
  }
  get xterm_smooth_scroll_duration() {
    return this.$$.ctx[46];
  }
  set xterm_smooth_scroll_duration(e) {
    this.$$set({ xterm_smooth_scroll_duration: e }), we();
  }
  get xterm_tab_stop_width() {
    return this.$$.ctx[47];
  }
  set xterm_tab_stop_width(e) {
    this.$$set({ xterm_tab_stop_width: e }), we();
  }
  get xterm_windows_mode() {
    return this.$$.ctx[48];
  }
  set xterm_windows_mode(e) {
    this.$$set({ xterm_windows_mode: e }), we();
  }
}
export {
  Fm as default
};
