var _d = Object.defineProperty;
var bd = (t, e, n) => e in t ? _d(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var yt = (t, e, n) => (bd(t, typeof e != "symbol" ? e + "" : e, n), n), wd = (t, e, n) => {
  if (!e.has(t))
    throw TypeError("Cannot " + n);
};
var Bl = (t, e, n) => {
  if (e.has(t))
    throw TypeError("Cannot add the same private member more than once");
  e instanceof WeakSet ? e.add(t) : e.set(t, n);
};
var Ps = (t, e, n) => (wd(t, e, "access private method"), n);
const {
  SvelteComponent: yd,
  assign: vd,
  create_slot: kd,
  detach: Dd,
  element: Ad,
  get_all_dirty_from_scope: Sd,
  get_slot_changes: Ed,
  get_spread_update: xd,
  init: Td,
  insert: Fd,
  safe_not_equal: Cd,
  set_dynamic_element_data: Tu,
  set_style: pn,
  toggle_class: Vn,
  transition_in: Df,
  transition_out: Af,
  update_slot_base: Md
} = window.__gradio__svelte__internal;
function Bd(t) {
  let e, n, r;
  const l = (
    /*#slots*/
    t[18].default
  ), o = kd(
    l,
    t,
    /*$$scope*/
    t[17],
    null
  );
  let u = [
    { "data-testid": (
      /*test_id*/
      t[7]
    ) },
    { id: (
      /*elem_id*/
      t[2]
    ) },
    {
      class: n = "block " + /*elem_classes*/
      t[3].join(" ") + " svelte-nl1om8"
    }
  ], c = {};
  for (let h = 0; h < u.length; h += 1)
    c = vd(c, u[h]);
  return {
    c() {
      e = Ad(
        /*tag*/
        t[14]
      ), o && o.c(), Tu(
        /*tag*/
        t[14]
      )(e, c), Vn(
        e,
        "hidden",
        /*visible*/
        t[10] === !1
      ), Vn(
        e,
        "padded",
        /*padding*/
        t[6]
      ), Vn(
        e,
        "border_focus",
        /*border_mode*/
        t[5] === "focus"
      ), Vn(
        e,
        "border_contrast",
        /*border_mode*/
        t[5] === "contrast"
      ), Vn(e, "hide-container", !/*explicit_call*/
      t[8] && !/*container*/
      t[9]), pn(
        e,
        "height",
        /*get_dimension*/
        t[15](
          /*height*/
          t[0]
        )
      ), pn(e, "width", typeof /*width*/
      t[1] == "number" ? `calc(min(${/*width*/
      t[1]}px, 100%))` : (
        /*get_dimension*/
        t[15](
          /*width*/
          t[1]
        )
      )), pn(
        e,
        "border-style",
        /*variant*/
        t[4]
      ), pn(
        e,
        "overflow",
        /*allow_overflow*/
        t[11] ? "visible" : "hidden"
      ), pn(
        e,
        "flex-grow",
        /*scale*/
        t[12]
      ), pn(e, "min-width", `calc(min(${/*min_width*/
      t[13]}px, 100%))`), pn(e, "border-width", "var(--block-border-width)");
    },
    m(h, p) {
      Fd(h, e, p), o && o.m(e, null), r = !0;
    },
    p(h, p) {
      o && o.p && (!r || p & /*$$scope*/
      131072) && Md(
        o,
        l,
        h,
        /*$$scope*/
        h[17],
        r ? Ed(
          l,
          /*$$scope*/
          h[17],
          p,
          null
        ) : Sd(
          /*$$scope*/
          h[17]
        ),
        null
      ), Tu(
        /*tag*/
        h[14]
      )(e, c = xd(u, [
        (!r || p & /*test_id*/
        128) && { "data-testid": (
          /*test_id*/
          h[7]
        ) },
        (!r || p & /*elem_id*/
        4) && { id: (
          /*elem_id*/
          h[2]
        ) },
        (!r || p & /*elem_classes*/
        8 && n !== (n = "block " + /*elem_classes*/
        h[3].join(" ") + " svelte-nl1om8")) && { class: n }
      ])), Vn(
        e,
        "hidden",
        /*visible*/
        h[10] === !1
      ), Vn(
        e,
        "padded",
        /*padding*/
        h[6]
      ), Vn(
        e,
        "border_focus",
        /*border_mode*/
        h[5] === "focus"
      ), Vn(
        e,
        "border_contrast",
        /*border_mode*/
        h[5] === "contrast"
      ), Vn(e, "hide-container", !/*explicit_call*/
      h[8] && !/*container*/
      h[9]), p & /*height*/
      1 && pn(
        e,
        "height",
        /*get_dimension*/
        h[15](
          /*height*/
          h[0]
        )
      ), p & /*width*/
      2 && pn(e, "width", typeof /*width*/
      h[1] == "number" ? `calc(min(${/*width*/
      h[1]}px, 100%))` : (
        /*get_dimension*/
        h[15](
          /*width*/
          h[1]
        )
      )), p & /*variant*/
      16 && pn(
        e,
        "border-style",
        /*variant*/
        h[4]
      ), p & /*allow_overflow*/
      2048 && pn(
        e,
        "overflow",
        /*allow_overflow*/
        h[11] ? "visible" : "hidden"
      ), p & /*scale*/
      4096 && pn(
        e,
        "flex-grow",
        /*scale*/
        h[12]
      ), p & /*min_width*/
      8192 && pn(e, "min-width", `calc(min(${/*min_width*/
      h[13]}px, 100%))`);
    },
    i(h) {
      r || (Df(o, h), r = !0);
    },
    o(h) {
      Af(o, h), r = !1;
    },
    d(h) {
      h && Dd(e), o && o.d(h);
    }
  };
}
function Nd(t) {
  let e, n = (
    /*tag*/
    t[14] && Bd(t)
  );
  return {
    c() {
      n && n.c();
    },
    m(r, l) {
      n && n.m(r, l), e = !0;
    },
    p(r, [l]) {
      /*tag*/
      r[14] && n.p(r, l);
    },
    i(r) {
      e || (Df(n, r), e = !0);
    },
    o(r) {
      Af(n, r), e = !1;
    },
    d(r) {
      n && n.d(r);
    }
  };
}
function zd(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { height: o = void 0 } = e, { width: u = void 0 } = e, { elem_id: c = "" } = e, { elem_classes: h = [] } = e, { variant: p = "solid" } = e, { border_mode: _ = "base" } = e, { padding: v = !0 } = e, { type: k = "normal" } = e, { test_id: E = void 0 } = e, { explicit_call: z = !1 } = e, { container: H = !0 } = e, { visible: U = !0 } = e, { allow_overflow: N = !0 } = e, { scale: M = null } = e, { min_width: A = 0 } = e, x = k === "fieldset" ? "fieldset" : "div";
  const C = (O) => {
    if (O !== void 0) {
      if (typeof O == "number")
        return O + "px";
      if (typeof O == "string")
        return O;
    }
  };
  return t.$$set = (O) => {
    "height" in O && n(0, o = O.height), "width" in O && n(1, u = O.width), "elem_id" in O && n(2, c = O.elem_id), "elem_classes" in O && n(3, h = O.elem_classes), "variant" in O && n(4, p = O.variant), "border_mode" in O && n(5, _ = O.border_mode), "padding" in O && n(6, v = O.padding), "type" in O && n(16, k = O.type), "test_id" in O && n(7, E = O.test_id), "explicit_call" in O && n(8, z = O.explicit_call), "container" in O && n(9, H = O.container), "visible" in O && n(10, U = O.visible), "allow_overflow" in O && n(11, N = O.allow_overflow), "scale" in O && n(12, M = O.scale), "min_width" in O && n(13, A = O.min_width), "$$scope" in O && n(17, l = O.$$scope);
  }, [
    o,
    u,
    c,
    h,
    p,
    _,
    v,
    E,
    z,
    H,
    U,
    N,
    M,
    A,
    x,
    C,
    k,
    l,
    r
  ];
}
class ms extends yd {
  constructor(e) {
    super(), Td(this, e, zd, Nd, Cd, {
      height: 0,
      width: 1,
      elem_id: 2,
      elem_classes: 3,
      variant: 4,
      border_mode: 5,
      padding: 6,
      type: 16,
      test_id: 7,
      explicit_call: 8,
      container: 9,
      visible: 10,
      allow_overflow: 11,
      scale: 12,
      min_width: 13
    });
  }
}
const {
  SvelteComponent: Rd,
  attr: Od,
  create_slot: Id,
  detach: Ld,
  element: Hd,
  get_all_dirty_from_scope: Pd,
  get_slot_changes: qd,
  init: Ud,
  insert: Gd,
  safe_not_equal: jd,
  transition_in: Vd,
  transition_out: Wd,
  update_slot_base: Xd
} = window.__gradio__svelte__internal;
function Yd(t) {
  let e, n;
  const r = (
    /*#slots*/
    t[1].default
  ), l = Id(
    r,
    t,
    /*$$scope*/
    t[0],
    null
  );
  return {
    c() {
      e = Hd("div"), l && l.c(), Od(e, "class", "svelte-1hnfib2");
    },
    m(o, u) {
      Gd(o, e, u), l && l.m(e, null), n = !0;
    },
    p(o, [u]) {
      l && l.p && (!n || u & /*$$scope*/
      1) && Xd(
        l,
        r,
        o,
        /*$$scope*/
        o[0],
        n ? qd(
          r,
          /*$$scope*/
          o[0],
          u,
          null
        ) : Pd(
          /*$$scope*/
          o[0]
        ),
        null
      );
    },
    i(o) {
      n || (Vd(l, o), n = !0);
    },
    o(o) {
      Wd(l, o), n = !1;
    },
    d(o) {
      o && Ld(e), l && l.d(o);
    }
  };
}
function Zd(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e;
  return t.$$set = (o) => {
    "$$scope" in o && n(0, l = o.$$scope);
  }, [l, r];
}
let Jd = class extends Rd {
  constructor(e) {
    super(), Ud(this, e, Zd, Yd, jd, {});
  }
};
const {
  SvelteComponent: Qd,
  attr: Fu,
  check_outros: Kd,
  create_component: $d,
  create_slot: em,
  destroy_component: tm,
  detach: oi,
  element: nm,
  empty: rm,
  get_all_dirty_from_scope: sm,
  get_slot_changes: im,
  group_outros: lm,
  init: am,
  insert: ui,
  mount_component: om,
  safe_not_equal: um,
  set_data: cm,
  space: fm,
  text: hm,
  toggle_class: or,
  transition_in: Yr,
  transition_out: ci,
  update_slot_base: dm
} = window.__gradio__svelte__internal;
function Cu(t) {
  let e, n;
  return e = new Jd({
    props: {
      $$slots: { default: [mm] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      $d(e.$$.fragment);
    },
    m(r, l) {
      om(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l & /*$$scope, info*/
      10 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (Yr(e.$$.fragment, r), n = !0);
    },
    o(r) {
      ci(e.$$.fragment, r), n = !1;
    },
    d(r) {
      tm(e, r);
    }
  };
}
function mm(t) {
  let e;
  return {
    c() {
      e = hm(
        /*info*/
        t[1]
      );
    },
    m(n, r) {
      ui(n, e, r);
    },
    p(n, r) {
      r & /*info*/
      2 && cm(
        e,
        /*info*/
        n[1]
      );
    },
    d(n) {
      n && oi(e);
    }
  };
}
function pm(t) {
  let e, n, r, l;
  const o = (
    /*#slots*/
    t[2].default
  ), u = em(
    o,
    t,
    /*$$scope*/
    t[3],
    null
  );
  let c = (
    /*info*/
    t[1] && Cu(t)
  );
  return {
    c() {
      e = nm("span"), u && u.c(), n = fm(), c && c.c(), r = rm(), Fu(e, "data-testid", "block-info"), Fu(e, "class", "svelte-22c38v"), or(e, "sr-only", !/*show_label*/
      t[0]), or(e, "hide", !/*show_label*/
      t[0]), or(
        e,
        "has-info",
        /*info*/
        t[1] != null
      );
    },
    m(h, p) {
      ui(h, e, p), u && u.m(e, null), ui(h, n, p), c && c.m(h, p), ui(h, r, p), l = !0;
    },
    p(h, [p]) {
      u && u.p && (!l || p & /*$$scope*/
      8) && dm(
        u,
        o,
        h,
        /*$$scope*/
        h[3],
        l ? im(
          o,
          /*$$scope*/
          h[3],
          p,
          null
        ) : sm(
          /*$$scope*/
          h[3]
        ),
        null
      ), (!l || p & /*show_label*/
      1) && or(e, "sr-only", !/*show_label*/
      h[0]), (!l || p & /*show_label*/
      1) && or(e, "hide", !/*show_label*/
      h[0]), (!l || p & /*info*/
      2) && or(
        e,
        "has-info",
        /*info*/
        h[1] != null
      ), /*info*/
      h[1] ? c ? (c.p(h, p), p & /*info*/
      2 && Yr(c, 1)) : (c = Cu(h), c.c(), Yr(c, 1), c.m(r.parentNode, r)) : c && (lm(), ci(c, 1, 1, () => {
        c = null;
      }), Kd());
    },
    i(h) {
      l || (Yr(u, h), Yr(c), l = !0);
    },
    o(h) {
      ci(u, h), ci(c), l = !1;
    },
    d(h) {
      h && (oi(e), oi(n), oi(r)), u && u.d(h), c && c.d(h);
    }
  };
}
function gm(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { show_label: o = !0 } = e, { info: u = void 0 } = e;
  return t.$$set = (c) => {
    "show_label" in c && n(0, o = c.show_label), "info" in c && n(1, u = c.info), "$$scope" in c && n(3, l = c.$$scope);
  }, [o, u, r, l];
}
let Ga = class extends Qd {
  constructor(e) {
    super(), am(this, e, gm, pm, um, { show_label: 0, info: 1 });
  }
};
const _m = [
  { 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 }
], Mu = {
  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"
  }
};
_m.reduce(
  (t, { color: e, primary: n, secondary: r }) => ({
    ...t,
    [e]: {
      primary: Mu[e][n],
      secondary: Mu[e][r]
    }
  }),
  {}
);
function bm(t) {
  let e, n = t[0], r = 1;
  for (; r < t.length; ) {
    const l = t[r], o = t[r + 1];
    if (r += 2, (l === "optionalAccess" || l === "optionalCall") && n == null)
      return;
    l === "access" || l === "optionalAccess" ? (e = n, n = o(n)) : (l === "call" || l === "optionalCall") && (n = o((...u) => n.call(e, ...u)), e = void 0);
  }
  return n;
}
function wm(t) {
  t.addEventListener("click", e);
  async function e(n) {
    const r = n.composedPath(), [l] = r.filter(
      (o) => bm([o, "optionalAccess", (u) => u.tagName]) === "BUTTON" && o.classList.contains("copy_code_button")
    );
    if (l) {
      let o = function(p) {
        p.style.opacity = "1", setTimeout(() => {
          p.style.opacity = "0";
        }, 2e3);
      };
      n.stopImmediatePropagation();
      const u = l.parentElement.innerText.trim(), c = Array.from(
        l.children
      )[1];
      await ym(u) && o(c);
    }
  }
  return {
    destroy() {
      t.removeEventListener("click", e);
    }
  };
}
async function ym(t) {
  let e = !1;
  if ("clipboard" in navigator)
    await navigator.clipboard.writeText(t), e = !0;
  else {
    const n = document.createElement("textarea");
    n.value = t, n.style.position = "absolute", n.style.left = "-999999px", document.body.prepend(n), n.select();
    try {
      document.execCommand("copy"), e = !0;
    } catch (r) {
      console.error(r), e = !1;
    } finally {
      n.remove();
    }
  }
  return e;
}
var Bu = {}, Nl = {}, zl = 34, Lr = 10, Rl = 13;
function Sf(t) {
  return new Function("d", "return {" + t.map(function(e, n) {
    return JSON.stringify(e) + ": d[" + n + '] || ""';
  }).join(",") + "}");
}
function vm(t, e) {
  var n = Sf(t);
  return function(r, l) {
    return e(n(r), l, t);
  };
}
function Nu(t) {
  var e = /* @__PURE__ */ Object.create(null), n = [];
  return t.forEach(function(r) {
    for (var l in r)
      l in e || n.push(e[l] = l);
  }), n;
}
function on(t, e) {
  var n = t + "", r = n.length;
  return r < e ? new Array(e - r + 1).join(0) + n : n;
}
function km(t) {
  return t < 0 ? "-" + on(-t, 6) : t > 9999 ? "+" + on(t, 6) : on(t, 4);
}
function Dm(t) {
  var e = t.getUTCHours(), n = t.getUTCMinutes(), r = t.getUTCSeconds(), l = t.getUTCMilliseconds();
  return isNaN(t) ? "Invalid Date" : km(t.getUTCFullYear()) + "-" + on(t.getUTCMonth() + 1, 2) + "-" + on(t.getUTCDate(), 2) + (l ? "T" + on(e, 2) + ":" + on(n, 2) + ":" + on(r, 2) + "." + on(l, 3) + "Z" : r ? "T" + on(e, 2) + ":" + on(n, 2) + ":" + on(r, 2) + "Z" : n || e ? "T" + on(e, 2) + ":" + on(n, 2) + "Z" : "");
}
function Am(t) {
  var e = new RegExp('["' + t + `
\r]`), n = t.charCodeAt(0);
  function r(v, k) {
    var E, z, H = l(v, function(U, N) {
      if (E)
        return E(U, N - 1);
      z = U, E = k ? vm(U, k) : Sf(U);
    });
    return H.columns = z || [], H;
  }
  function l(v, k) {
    var E = [], z = v.length, H = 0, U = 0, N, M = z <= 0, A = !1;
    v.charCodeAt(z - 1) === Lr && --z, v.charCodeAt(z - 1) === Rl && --z;
    function x() {
      if (M)
        return Nl;
      if (A)
        return A = !1, Bu;
      var O, q = H, R;
      if (v.charCodeAt(q) === zl) {
        for (; H++ < z && v.charCodeAt(H) !== zl || v.charCodeAt(++H) === zl; )
          ;
        return (O = H) >= z ? M = !0 : (R = v.charCodeAt(H++)) === Lr ? A = !0 : R === Rl && (A = !0, v.charCodeAt(H) === Lr && ++H), v.slice(q + 1, O - 1).replace(/""/g, '"');
      }
      for (; H < z; ) {
        if ((R = v.charCodeAt(O = H++)) === Lr)
          A = !0;
        else if (R === Rl)
          A = !0, v.charCodeAt(H) === Lr && ++H;
        else if (R !== n)
          continue;
        return v.slice(q, O);
      }
      return M = !0, v.slice(q, z);
    }
    for (; (N = x()) !== Nl; ) {
      for (var C = []; N !== Bu && N !== Nl; )
        C.push(N), N = x();
      k && (C = k(C, U++)) == null || E.push(C);
    }
    return E;
  }
  function o(v, k) {
    return v.map(function(E) {
      return k.map(function(z) {
        return _(E[z]);
      }).join(t);
    });
  }
  function u(v, k) {
    return k == null && (k = Nu(v)), [k.map(_).join(t)].concat(o(v, k)).join(`
`);
  }
  function c(v, k) {
    return k == null && (k = Nu(v)), o(v, k).join(`
`);
  }
  function h(v) {
    return v.map(p).join(`
`);
  }
  function p(v) {
    return v.map(_).join(t);
  }
  function _(v) {
    return v == null ? "" : v instanceof Date ? Dm(v) : e.test(v += "") ? '"' + v.replace(/"/g, '""') + '"' : v;
  }
  return {
    parse: r,
    parseRows: l,
    format: u,
    formatBody: c,
    formatRows: h,
    formatRow: p,
    formatValue: _
  };
}
var zu = Object.prototype.hasOwnProperty;
function Fn(t, e) {
  var n, r;
  if (t === e)
    return !0;
  if (t && e && (n = t.constructor) === e.constructor) {
    if (n === Date)
      return t.getTime() === e.getTime();
    if (n === RegExp)
      return t.toString() === e.toString();
    if (n === Array) {
      if ((r = t.length) === e.length)
        for (; r-- && Fn(t[r], e[r]); )
          ;
      return r === -1;
    }
    if (!n || typeof t == "object") {
      r = 0;
      for (n in t)
        if (zu.call(t, n) && ++r && !zu.call(e, n) || !(n in e) || !Fn(t[n], e[n]))
          return !1;
      return Object.keys(e).length === r;
    }
  }
  return t !== t && e !== e;
}
var Ol = new Intl.Collator(0, { numeric: 1 }).compare;
function Ru(t, e, n) {
  return t = t.split("."), e = e.split("."), Ol(t[0], e[0]) || Ol(t[1], e[1]) || (e[2] = e.slice(2).join("."), n = /[.-]/.test(t[2] = t.slice(2).join(".")), n == /[.-]/.test(e[2]) ? Ol(t[2], e[2]) : n ? -1 : 1);
}
function Ef(t, e, n) {
  return e.startsWith("http://") || e.startsWith("https://") ? n ? t : e : t + e;
}
function Il(t) {
  if (t.startsWith("http")) {
    const { protocol: e, host: n } = new URL(t);
    return n.endsWith("hf.space") ? {
      ws_protocol: "wss",
      host: n,
      http_protocol: e
    } : {
      ws_protocol: e === "https:" ? "wss" : "ws",
      http_protocol: e,
      host: n
    };
  } else if (t.startsWith("file:"))
    return {
      ws_protocol: "ws",
      http_protocol: "http:",
      host: "lite.local"
      // Special fake hostname only used for this case. This matches the hostname allowed in `is_self_host()` in `js/wasm/network/host.ts`.
    };
  return {
    ws_protocol: "wss",
    http_protocol: "https:",
    host: t
  };
}
const xf = /^[^\/]*\/[^\/]*$/, Sm = /.*hf\.space\/{0,1}$/;
async function Em(t, e) {
  const n = {};
  e && (n.Authorization = `Bearer ${e}`);
  const r = t.trim();
  if (xf.test(r))
    try {
      const l = await fetch(
        `https://huggingface.co/api/spaces/${r}/host`,
        { headers: n }
      );
      if (l.status !== 200)
        throw new Error("Space metadata could not be loaded.");
      const o = (await l.json()).host;
      return {
        space_id: t,
        ...Il(o)
      };
    } catch (l) {
      throw new Error("Space metadata could not be loaded." + l.message);
    }
  if (Sm.test(r)) {
    const { ws_protocol: l, http_protocol: o, host: u } = Il(r);
    return {
      space_id: u.replace(".hf.space", ""),
      ws_protocol: l,
      http_protocol: o,
      host: u
    };
  }
  return {
    space_id: !1,
    ...Il(r)
  };
}
function xm(t) {
  let e = {};
  return t.forEach(({ api_name: n }, r) => {
    n && (e[n] = r);
  }), e;
}
const Tm = /^(?=[^]*\b[dD]iscussions{0,1}\b)(?=[^]*\b[dD]isabled\b)[^]*$/;
async function Ou(t) {
  try {
    const n = (await fetch(
      `https://huggingface.co/api/spaces/${t}/discussions`,
      {
        method: "HEAD"
      }
    )).headers.get("x-error-message");
    return !(n && Tm.test(n));
  } catch {
    return !1;
  }
}
function Fm(t, e, n, r) {
  if (e.length === 0) {
    if (n === "replace")
      return r;
    if (n === "append")
      return t + r;
    throw new Error(`Unsupported action: ${n}`);
  }
  let l = t;
  for (let u = 0; u < e.length - 1; u++)
    l = l[e[u]];
  const o = e[e.length - 1];
  switch (n) {
    case "replace":
      l[o] = r;
      break;
    case "append":
      l[o] += r;
      break;
    case "add":
      Array.isArray(l) ? l.splice(Number(o), 0, r) : l[o] = r;
      break;
    case "delete":
      Array.isArray(l) ? l.splice(Number(o), 1) : delete l[o];
      break;
    default:
      throw new Error(`Unknown action: ${n}`);
  }
  return t;
}
function Cm(t, e) {
  return e.forEach(([n, r, l]) => {
    t = Fm(t, r, n, l);
  }), t;
}
async function Mm(t, e, n, r = zm) {
  let l = (Array.isArray(t) ? t : [t]).map(
    (o) => o.blob
  );
  return await Promise.all(
    await r(e, l, void 0, n).then(
      async (o) => {
        if (o.error)
          throw new Error(o.error);
        return o.files ? o.files.map((u, c) => new ja({
          ...t[c],
          path: u,
          url: e + "/file=" + u
        })) : [];
      }
    )
  );
}
async function Bm(t, e) {
  return t.map(
    (n, r) => new ja({
      path: n.name,
      orig_name: n.name,
      blob: n,
      size: n.size,
      mime_type: n.type,
      is_stream: e
    })
  );
}
class ja {
  constructor({
    path: e,
    url: n,
    orig_name: r,
    size: l,
    blob: o,
    is_stream: u,
    mime_type: c,
    alt_text: h
  }) {
    this.meta = { _type: "gradio.FileData" }, this.path = e, this.url = n, this.orig_name = r, this.size = l, this.blob = n ? void 0 : o, this.is_stream = u, this.mime_type = c, this.alt_text = h;
  }
}
const Tf = "This application is too busy. Keep trying!", H0 = "Connection errored out.";
let Ff;
function Nm(t, e) {
  return { post_data: n, upload_files: r, client: l, handle_blob: o };
  async function n(u, c, h) {
    const p = { "Content-Type": "application/json" };
    h && (p.Authorization = `Bearer ${h}`);
    try {
      var _ = await t(u, {
        method: "POST",
        body: JSON.stringify(c),
        headers: p
      });
    } catch {
      return [{ error: H0 }, 500];
    }
    let v, k;
    try {
      v = await _.json(), k = _.status;
    } catch (E) {
      v = { error: `Could not parse server response: ${E}` }, k = 500;
    }
    return [v, k];
  }
  async function r(u, c, h, p) {
    const _ = {};
    h && (_.Authorization = `Bearer ${h}`);
    const v = 1e3, k = [];
    for (let z = 0; z < c.length; z += v) {
      const H = c.slice(z, z + v), U = new FormData();
      H.forEach((M) => {
        U.append("files", M);
      });
      try {
        const M = p ? `${u}/upload?upload_id=${p}` : `${u}/upload`;
        var E = await t(M, {
          method: "POST",
          body: U,
          headers: _
        });
      } catch {
        return { error: H0 };
      }
      const N = await E.json();
      k.push(...N);
    }
    return { files: k };
  }
  async function l(u, c = {}) {
    return new Promise(async (h) => {
      const { status_callback: p, hf_token: _ } = c, v = {
        predict: Ce,
        submit: De,
        view_api: Ne,
        component_server: se
      };
      if ((typeof window > "u" || !("WebSocket" in window)) && !global.Websocket) {
        const de = await import("./wrapper-6f348d45-19fa94bf.js");
        Ff = (await import("./__vite-browser-external-2447137e.js")).Blob, global.WebSocket = de.WebSocket;
      }
      const { ws_protocol: k, http_protocol: E, host: z, space_id: H } = await Em(u, _), U = Math.random().toString(36).substring(2), N = {};
      let M = !1, A = {}, x = {}, C = null;
      const O = {}, q = /* @__PURE__ */ new Set();
      let R, J = {}, ne = !1;
      _ && H && (ne = await Om(H, _));
      async function ie(de) {
        if (R = de, window.location.protocol === "https:" && (R.root = R.root.replace("http://", "https://")), J = xm((de == null ? void 0 : de.dependencies) || []), R.auth_required)
          return {
            config: R,
            ...v
          };
        try {
          te = await Ne(R);
        } catch (Q) {
          console.error(`Could not get api details: ${Q.message}`);
        }
        return {
          config: R,
          ...v
        };
      }
      let te;
      async function Se(de) {
        if (p && p(de), de.status === "running")
          try {
            R = await Pu(
              t,
              `${E}//${z}`,
              _
            );
            const Q = await ie(R);
            h(Q);
          } catch (Q) {
            console.error(Q), p && p({
              status: "error",
              message: "Could not load this space.",
              load_status: "error",
              detail: "NOT_FOUND"
            });
          }
      }
      try {
        R = await Pu(
          t,
          `${E}//${z}`,
          _
        );
        const de = await ie(R), Q = new EventSource(
          `${R.root}/heartbeat/${U}`
        );
        h(de);
      } catch (de) {
        console.error(de), H ? ua(
          H,
          xf.test(H) ? "space_name" : "subdomain",
          Se
        ) : p && p({
          status: "error",
          message: "Could not load this space.",
          load_status: "error",
          detail: "NOT_FOUND"
        });
      }
      function Ce(de, Q, me) {
        let V = !1, $ = !1, we;
        if (typeof de == "number")
          we = R.dependencies[de];
        else {
          const ye = de.replace(/^\//, "");
          we = R.dependencies[J[ye]];
        }
        if (we.types.continuous)
          throw new Error(
            "Cannot call predict on this function as it may run forever. Use submit instead"
          );
        return new Promise((ye, K) => {
          const Ee = De(de, Q, me);
          let Ae;
          Ee.on("data", (Je) => {
            $ && (Ee.destroy(), ye(Je)), V = !0, Ae = Je;
          }).on("status", (Je) => {
            Je.stage === "error" && K(Je), Je.stage === "complete" && ($ = !0, V && (Ee.destroy(), ye(Ae)));
          });
        });
      }
      function De(de, Q, me, V = null) {
        let $, we;
        if (typeof de == "number")
          $ = de, we = te.unnamed_endpoints[$];
        else {
          const We = de.replace(/^\//, "");
          $ = J[We], we = te.named_endpoints[de.trim()];
        }
        if (typeof $ != "number")
          throw new Error(
            "There is no endpoint matching that name of fn_index matching that number."
          );
        let ye, K, Ee = R.protocol ?? "ws";
        const Ae = typeof de == "number" ? "/predict" : de;
        let Je, Ie = null, Ve = !1;
        const qe = {};
        let It = "";
        typeof window < "u" && (It = new URLSearchParams(window.location.search).toString()), o(`${R.root}`, Q, we, _).then(
          (We) => {
            if (Je = {
              data: We || [],
              event_data: me,
              fn_index: $,
              trigger_id: V
            }, Im($, R))
              _e({
                type: "status",
                endpoint: Ae,
                stage: "pending",
                queue: !1,
                fn_index: $,
                time: /* @__PURE__ */ new Date()
              }), n(
                `${R.root}/run${Ae.startsWith("/") ? Ae : `/${Ae}`}${It ? "?" + It : ""}`,
                {
                  ...Je,
                  session_hash: U
                },
                _
              ).then(([Te, Me]) => {
                const ze = Te.data;
                Me == 200 ? (_e({
                  type: "data",
                  endpoint: Ae,
                  fn_index: $,
                  data: ze,
                  time: /* @__PURE__ */ new Date()
                }), _e({
                  type: "status",
                  endpoint: Ae,
                  fn_index: $,
                  stage: "complete",
                  eta: Te.average_duration,
                  queue: !1,
                  time: /* @__PURE__ */ new Date()
                })) : _e({
                  type: "status",
                  stage: "error",
                  endpoint: Ae,
                  fn_index: $,
                  message: Te.error,
                  queue: !1,
                  time: /* @__PURE__ */ new Date()
                });
              }).catch((Te) => {
                _e({
                  type: "status",
                  stage: "error",
                  message: Te.message,
                  endpoint: Ae,
                  fn_index: $,
                  queue: !1,
                  time: /* @__PURE__ */ new Date()
                });
              });
            else if (Ee == "ws") {
              _e({
                type: "status",
                stage: "pending",
                queue: !0,
                endpoint: Ae,
                fn_index: $,
                time: /* @__PURE__ */ new Date()
              });
              let Te = new URL(`${k}://${Ef(
                z,
                R.path,
                !0
              )}
							/queue/join${It ? "?" + It : ""}`);
              ne && Te.searchParams.set("__sign", ne), ye = new WebSocket(Te), ye.onclose = (Me) => {
                Me.wasClean || _e({
                  type: "status",
                  stage: "error",
                  broken: !0,
                  message: H0,
                  queue: !0,
                  endpoint: Ae,
                  fn_index: $,
                  time: /* @__PURE__ */ new Date()
                });
              }, ye.onmessage = function(Me) {
                const ze = JSON.parse(Me.data), { type: Qe, status: Oe, data: Ue } = Ll(
                  ze,
                  N[$]
                );
                if (Qe === "update" && Oe && !Ve)
                  _e({
                    type: "status",
                    endpoint: Ae,
                    fn_index: $,
                    time: /* @__PURE__ */ new Date(),
                    ...Oe
                  }), Oe.stage === "error" && ye.close();
                else if (Qe === "hash") {
                  ye.send(JSON.stringify({ fn_index: $, session_hash: U }));
                  return;
                } else
                  Qe === "data" ? ye.send(JSON.stringify({ ...Je, session_hash: U })) : Qe === "complete" ? Ve = Oe : Qe === "log" ? _e({
                    type: "log",
                    log: Ue.log,
                    level: Ue.level,
                    endpoint: Ae,
                    fn_index: $
                  }) : Qe === "generating" && _e({
                    type: "status",
                    time: /* @__PURE__ */ new Date(),
                    ...Oe,
                    stage: Oe == null ? void 0 : Oe.stage,
                    queue: !0,
                    endpoint: Ae,
                    fn_index: $
                  });
                Ue && (_e({
                  type: "data",
                  time: /* @__PURE__ */ new Date(),
                  data: Ue.data,
                  endpoint: Ae,
                  fn_index: $
                }), Ve && (_e({
                  type: "status",
                  time: /* @__PURE__ */ new Date(),
                  ...Ve,
                  stage: Oe == null ? void 0 : Oe.stage,
                  queue: !0,
                  endpoint: Ae,
                  fn_index: $
                }), ye.close()));
              }, Ru(R.version || "2.0.0", "3.6") < 0 && addEventListener(
                "open",
                () => ye.send(JSON.stringify({ hash: U }))
              );
            } else if (Ee == "sse") {
              _e({
                type: "status",
                stage: "pending",
                queue: !0,
                endpoint: Ae,
                fn_index: $,
                time: /* @__PURE__ */ new Date()
              });
              var Re = new URLSearchParams({
                fn_index: $.toString(),
                session_hash: U
              }).toString();
              let Te = new URL(
                `${R.root}/queue/join?${It ? It + "&" : ""}${Re}`
              );
              K = e(Te), K.onmessage = async function(Me) {
                const ze = JSON.parse(Me.data), { type: Qe, status: Oe, data: Ue } = Ll(
                  ze,
                  N[$]
                );
                if (Qe === "update" && Oe && !Ve)
                  _e({
                    type: "status",
                    endpoint: Ae,
                    fn_index: $,
                    time: /* @__PURE__ */ new Date(),
                    ...Oe
                  }), Oe.stage === "error" && K.close();
                else if (Qe === "data") {
                  Ie = ze.event_id;
                  let [ht, vn] = await n(
                    `${R.root}/queue/data`,
                    {
                      ...Je,
                      session_hash: U,
                      event_id: Ie
                    },
                    _
                  );
                  vn !== 200 && (_e({
                    type: "status",
                    stage: "error",
                    message: H0,
                    queue: !0,
                    endpoint: Ae,
                    fn_index: $,
                    time: /* @__PURE__ */ new Date()
                  }), K.close());
                } else
                  Qe === "complete" ? Ve = Oe : Qe === "log" ? _e({
                    type: "log",
                    log: Ue.log,
                    level: Ue.level,
                    endpoint: Ae,
                    fn_index: $
                  }) : Qe === "generating" && _e({
                    type: "status",
                    time: /* @__PURE__ */ new Date(),
                    ...Oe,
                    stage: Oe == null ? void 0 : Oe.stage,
                    queue: !0,
                    endpoint: Ae,
                    fn_index: $
                  });
                Ue && (_e({
                  type: "data",
                  time: /* @__PURE__ */ new Date(),
                  data: Ue.data,
                  endpoint: Ae,
                  fn_index: $
                }), Ve && (_e({
                  type: "status",
                  time: /* @__PURE__ */ new Date(),
                  ...Ve,
                  stage: Oe == null ? void 0 : Oe.stage,
                  queue: !0,
                  endpoint: Ae,
                  fn_index: $
                }), K.close()));
              };
            } else
              (Ee == "sse_v1" || Ee == "sse_v2" || Ee == "sse_v2.1" || Ee == "sse_v3") && (_e({
                type: "status",
                stage: "pending",
                queue: !0,
                endpoint: Ae,
                fn_index: $,
                time: /* @__PURE__ */ new Date()
              }), n(
                `${R.root}/queue/join?${It}`,
                {
                  ...Je,
                  session_hash: U
                },
                _
              ).then(([Te, Me]) => {
                if (Me === 503)
                  _e({
                    type: "status",
                    stage: "error",
                    message: Tf,
                    queue: !0,
                    endpoint: Ae,
                    fn_index: $,
                    time: /* @__PURE__ */ new Date()
                  });
                else if (Me !== 200)
                  _e({
                    type: "status",
                    stage: "error",
                    message: H0,
                    queue: !0,
                    endpoint: Ae,
                    fn_index: $,
                    time: /* @__PURE__ */ new Date()
                  });
                else {
                  Ie = Te.event_id;
                  let ze = async function(Qe) {
                    try {
                      const { type: Oe, status: Ue, data: ht } = Ll(
                        Qe,
                        N[$]
                      );
                      if (Oe == "heartbeat")
                        return;
                      if (Oe === "update" && Ue && !Ve)
                        _e({
                          type: "status",
                          endpoint: Ae,
                          fn_index: $,
                          time: /* @__PURE__ */ new Date(),
                          ...Ue
                        });
                      else if (Oe === "complete")
                        Ve = Ue;
                      else if (Oe == "unexpected_error")
                        console.error("Unexpected error", Ue == null ? void 0 : Ue.message), _e({
                          type: "status",
                          stage: "error",
                          message: (Ue == null ? void 0 : Ue.message) || "An Unexpected Error Occurred!",
                          queue: !0,
                          endpoint: Ae,
                          fn_index: $,
                          time: /* @__PURE__ */ new Date()
                        });
                      else if (Oe === "log") {
                        _e({
                          type: "log",
                          log: ht.log,
                          level: ht.level,
                          endpoint: Ae,
                          fn_index: $
                        });
                        return;
                      } else
                        Oe === "generating" && (_e({
                          type: "status",
                          time: /* @__PURE__ */ new Date(),
                          ...Ue,
                          stage: Ue == null ? void 0 : Ue.stage,
                          queue: !0,
                          endpoint: Ae,
                          fn_index: $
                        }), ht && ["sse_v2", "sse_v2.1", "sse_v3"].includes(Ee) && ee(Ie, ht));
                      ht && (_e({
                        type: "data",
                        time: /* @__PURE__ */ new Date(),
                        data: ht.data,
                        endpoint: Ae,
                        fn_index: $
                      }), Ve && _e({
                        type: "status",
                        time: /* @__PURE__ */ new Date(),
                        ...Ve,
                        stage: Ue == null ? void 0 : Ue.stage,
                        queue: !0,
                        endpoint: Ae,
                        fn_index: $
                      })), ((Ue == null ? void 0 : Ue.stage) === "complete" || (Ue == null ? void 0 : Ue.stage) === "error") && (O[Ie] && delete O[Ie], Ie in x && delete x[Ie]);
                    } catch (Oe) {
                      console.error("Unexpected client exception", Oe), _e({
                        type: "status",
                        stage: "error",
                        message: "An Unexpected Error Occurred!",
                        queue: !0,
                        endpoint: Ae,
                        fn_index: $,
                        time: /* @__PURE__ */ new Date()
                      }), ["sse_v2", "sse_v2.1"].includes(Ee) && he();
                    }
                  };
                  Ie in A && (A[Ie].forEach(
                    (Qe) => ze(Qe)
                  ), delete A[Ie]), O[Ie] = ze, q.add(Ie), M || ce();
                }
              }));
          }
        );
        function ee(We, Re) {
          !x[We] ? (x[We] = [], Re.data.forEach((Me, ze) => {
            x[We][ze] = Me;
          })) : Re.data.forEach((Me, ze) => {
            let Qe = Cm(
              x[We][ze],
              Me
            );
            x[We][ze] = Qe, Re.data[ze] = Qe;
          });
        }
        function _e(We) {
          const Te = qe[We.type] || [];
          Te == null || Te.forEach((Me) => Me(We));
        }
        function it(We, Re) {
          const Te = qe, Me = Te[We] || [];
          return Te[We] = Me, Me == null || Me.push(Re), { on: it, off: at, cancel: Fe, destroy: gt };
        }
        function at(We, Re) {
          const Te = qe;
          let Me = Te[We] || [];
          return Me = Me == null ? void 0 : Me.filter((ze) => ze !== Re), Te[We] = Me, { on: it, off: at, cancel: Fe, destroy: gt };
        }
        async function Fe() {
          const We = {
            stage: "complete",
            queue: !1,
            time: /* @__PURE__ */ new Date()
          };
          Ve = We, _e({
            ...We,
            type: "status",
            endpoint: Ae,
            fn_index: $
          });
          let Re = {};
          Ee === "ws" ? (ye && ye.readyState === 0 ? ye.addEventListener("open", () => {
            ye.close();
          }) : ye.close(), Re = { fn_index: $, session_hash: U }) : (K.close(), Re = { event_id: Ie });
          try {
            await t(`${R.root}/reset`, {
              headers: { "Content-Type": "application/json" },
              method: "POST",
              body: JSON.stringify(Re)
            });
          } catch {
            console.warn(
              "The `/reset` endpoint could not be called. Subsequent endpoint results may be unreliable."
            );
          }
        }
        function gt() {
          for (const We in qe)
            qe[We].forEach((Re) => {
              at(We, Re);
            });
        }
        return {
          on: it,
          off: at,
          cancel: Fe,
          destroy: gt
        };
      }
      function ce() {
        M = !0;
        let de = new URLSearchParams({
          session_hash: U
        }).toString(), Q = new URL(`${R.root}/queue/data?${de}`);
        C = e(Q), C.onmessage = async function(me) {
          let V = JSON.parse(me.data);
          if (V.msg === "close_stream") {
            he();
            return;
          }
          const $ = V.event_id;
          if (!$)
            await Promise.all(
              Object.keys(O).map(
                (we) => O[we](V)
              )
            );
          else if (O[$]) {
            V.msg === "process_completed" && ["sse", "sse_v1", "sse_v2", "sse_v2.1"].includes(R.protocol) && (q.delete($), q.size === 0 && he());
            let we = O[$];
            window.setTimeout(we, 0, V);
          } else
            A[$] || (A[$] = []), A[$].push(V);
        }, C.onerror = async function(me) {
          await Promise.all(
            Object.keys(O).map(
              (V) => O[V]({
                msg: "unexpected_error",
                message: H0
              })
            )
          ), he();
        };
      }
      function he() {
        M = !1, C == null || C.close();
      }
      async function se(de, Q, me) {
        var V;
        const $ = { "Content-Type": "application/json" };
        _ && ($.Authorization = `Bearer ${_}`);
        let we, ye = R.components.find(
          (Ae) => Ae.id === de
        );
        (V = ye == null ? void 0 : ye.props) != null && V.root_url ? we = ye.props.root_url : we = R.root;
        const K = await t(
          `${we}/component_server/`,
          {
            method: "POST",
            body: JSON.stringify({
              data: me,
              component_id: de,
              fn_name: Q,
              session_hash: U
            }),
            headers: $
          }
        );
        if (!K.ok)
          throw new Error(
            "Could not connect to component server: " + K.statusText
          );
        return await K.json();
      }
      async function Ne(de) {
        if (te)
          return te;
        const Q = { "Content-Type": "application/json" };
        _ && (Q.Authorization = `Bearer ${_}`);
        let me;
        if (Ru(de.version || "2.0.0", "3.30") < 0 ? me = await t(
          "https://gradio-space-api-fetcher-v2.hf.space/api",
          {
            method: "POST",
            body: JSON.stringify({
              serialize: !1,
              config: JSON.stringify(de)
            }),
            headers: Q
          }
        ) : me = await t(`${de.root}/info`, {
          headers: Q
        }), !me.ok)
          throw new Error(H0);
        let V = await me.json();
        return "api" in V && (V = V.api), V.named_endpoints["/predict"] && !V.unnamed_endpoints[0] && (V.unnamed_endpoints[0] = V.named_endpoints["/predict"]), Rm(V, de, J);
      }
    });
  }
  async function o(u, c, h, p) {
    const _ = await oa(
      c,
      void 0,
      [],
      !0,
      h
    );
    return Promise.all(
      _.map(async ({ path: v, blob: k, type: E }) => {
        if (k) {
          const z = (await r(u, [k], p)).files[0];
          return { path: v, file_url: z, type: E, name: k == null ? void 0 : k.name };
        }
        return { path: v, type: E };
      })
    ).then((v) => (v.forEach(({ path: k, file_url: E, type: z, name: H }) => {
      if (z === "Gallery")
        Hu(c, E, k);
      else if (E) {
        const U = new ja({ path: E, orig_name: H });
        Hu(c, U, k);
      }
    }), c));
  }
}
const { post_data: j_, upload_files: zm, client: V_, handle_blob: W_ } = Nm(
  fetch,
  (...t) => new EventSource(...t)
);
function Iu(t, e, n, r) {
  switch (t.type) {
    case "string":
      return "string";
    case "boolean":
      return "boolean";
    case "number":
      return "number";
  }
  if (n === "JSONSerializable" || n === "StringSerializable")
    return "any";
  if (n === "ListStringSerializable")
    return "string[]";
  if (e === "Image")
    return r === "parameter" ? "Blob | File | Buffer" : "string";
  if (n === "FileSerializable")
    return (t == null ? void 0 : t.type) === "array" ? r === "parameter" ? "(Blob | File | Buffer)[]" : "{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}[]" : r === "parameter" ? "Blob | File | Buffer" : "{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}";
  if (n === "GallerySerializable")
    return r === "parameter" ? "[(Blob | File | Buffer), (string | null)][]" : "[{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}, (string | null))][]";
}
function Lu(t, e) {
  return e === "GallerySerializable" ? "array of [file, label] tuples" : e === "ListStringSerializable" ? "array of strings" : e === "FileSerializable" ? "array of files or single file" : t.description;
}
function Rm(t, e, n) {
  const r = {
    named_endpoints: {},
    unnamed_endpoints: {}
  };
  for (const l in t) {
    const o = t[l];
    for (const u in o) {
      const c = e.dependencies[u] ? u : n[u.replace("/", "")], h = o[u];
      r[l][u] = {}, r[l][u].parameters = {}, r[l][u].returns = {}, r[l][u].type = e.dependencies[c].types, r[l][u].parameters = h.parameters.map(
        ({ label: p, component: _, type: v, serializer: k }) => ({
          label: p,
          component: _,
          type: Iu(v, _, k, "parameter"),
          description: Lu(v, k)
        })
      ), r[l][u].returns = h.returns.map(
        ({ label: p, component: _, type: v, serializer: k }) => ({
          label: p,
          component: _,
          type: Iu(v, _, k, "return"),
          description: Lu(v, k)
        })
      );
    }
  }
  return r;
}
async function Om(t, e) {
  try {
    return (await (await fetch(`https://huggingface.co/api/spaces/${t}/jwt`, {
      headers: {
        Authorization: `Bearer ${e}`
      }
    })).json()).token || !1;
  } catch (n) {
    return console.error(n), !1;
  }
}
function Hu(t, e, n) {
  for (; n.length > 1; )
    t = t[n.shift()];
  t[n.shift()] = e;
}
async function oa(t, e = void 0, n = [], r = !1, l = void 0) {
  if (Array.isArray(t)) {
    let o = [];
    return await Promise.all(
      t.map(async (u, c) => {
        var h;
        let p = n.slice();
        p.push(c);
        const _ = await oa(
          t[c],
          r ? ((h = l == null ? void 0 : l.parameters[c]) == null ? void 0 : h.component) || void 0 : e,
          p,
          !1,
          l
        );
        o = o.concat(_);
      })
    ), o;
  } else {
    if (globalThis.Buffer && t instanceof globalThis.Buffer)
      return [
        {
          path: n,
          blob: e === "Image" ? !1 : new Ff([t]),
          type: e
        }
      ];
    if (typeof t == "object") {
      let o = [];
      for (let u in t)
        if (t.hasOwnProperty(u)) {
          let c = n.slice();
          c.push(u), o = o.concat(
            await oa(
              t[u],
              void 0,
              c,
              !1,
              l
            )
          );
        }
      return o;
    }
  }
  return [];
}
function Im(t, e) {
  var n, r, l, o;
  return !(((r = (n = e == null ? void 0 : e.dependencies) == null ? void 0 : n[t]) == null ? void 0 : r.queue) === null ? e.enable_queue : (o = (l = e == null ? void 0 : e.dependencies) == null ? void 0 : l[t]) != null && o.queue) || !1;
}
async function Pu(t, e, n) {
  const r = {};
  if (n && (r.Authorization = `Bearer ${n}`), typeof window < "u" && window.gradio_config && location.origin !== "http://localhost:9876" && !window.gradio_config.dev_mode) {
    const l = window.gradio_config.root, o = window.gradio_config;
    return o.root = Ef(e, o.root, !1), { ...o, path: l };
  } else if (e) {
    let l = await t(`${e}/config`, {
      headers: r
    });
    if (l.status === 200) {
      const o = await l.json();
      return o.path = o.path ?? "", o.root = e, o;
    }
    throw new Error("Could not get config.");
  }
  throw new Error("No config or app endpoint found");
}
async function ua(t, e, n) {
  let r = e === "subdomain" ? `https://huggingface.co/api/spaces/by-subdomain/${t}` : `https://huggingface.co/api/spaces/${t}`, l, o;
  try {
    if (l = await fetch(r), o = l.status, o !== 200)
      throw new Error();
    l = await l.json();
  } catch {
    n({
      status: "error",
      load_status: "error",
      message: "Could not get space status",
      detail: "NOT_FOUND"
    });
    return;
  }
  if (!l || o !== 200)
    return;
  const {
    runtime: { stage: u },
    id: c
  } = l;
  switch (u) {
    case "STOPPED":
    case "SLEEPING":
      n({
        status: "sleeping",
        load_status: "pending",
        message: "Space is asleep. Waking it up...",
        detail: u
      }), setTimeout(() => {
        ua(t, e, n);
      }, 1e3);
      break;
    case "PAUSED":
      n({
        status: "paused",
        load_status: "error",
        message: "This space has been paused by the author. If you would like to try this demo, consider duplicating the space.",
        detail: u,
        discussions_enabled: await Ou(c)
      });
      break;
    case "RUNNING":
    case "RUNNING_BUILDING":
      n({
        status: "running",
        load_status: "complete",
        message: "",
        detail: u
      });
      break;
    case "BUILDING":
      n({
        status: "building",
        load_status: "pending",
        message: "Space is building...",
        detail: u
      }), setTimeout(() => {
        ua(t, e, n);
      }, 1e3);
      break;
    default:
      n({
        status: "space_error",
        load_status: "error",
        message: "This space is experiencing an issue.",
        detail: u,
        discussions_enabled: await Ou(c)
      });
      break;
  }
}
function Ll(t, e) {
  switch (t.msg) {
    case "send_data":
      return { type: "data" };
    case "send_hash":
      return { type: "hash" };
    case "queue_full":
      return {
        type: "update",
        status: {
          queue: !0,
          message: Tf,
          stage: "error",
          code: t.code,
          success: t.success
        }
      };
    case "heartbeat":
      return {
        type: "heartbeat"
      };
    case "unexpected_error":
      return {
        type: "unexpected_error",
        status: {
          queue: !0,
          message: t.message,
          stage: "error",
          success: !1
        }
      };
    case "estimation":
      return {
        type: "update",
        status: {
          queue: !0,
          stage: e || "pending",
          code: t.code,
          size: t.queue_size,
          position: t.rank,
          eta: t.rank_eta,
          success: t.success
        }
      };
    case "progress":
      return {
        type: "update",
        status: {
          queue: !0,
          stage: "pending",
          code: t.code,
          progress_data: t.progress_data,
          success: t.success
        }
      };
    case "log":
      return { type: "log", data: t };
    case "process_generating":
      return {
        type: "generating",
        status: {
          queue: !0,
          message: t.success ? null : t.output.error,
          stage: t.success ? "generating" : "error",
          code: t.code,
          progress_data: t.progress_data,
          eta: t.average_duration
        },
        data: t.success ? t.output : null
      };
    case "process_completed":
      return "error" in t.output ? {
        type: "update",
        status: {
          queue: !0,
          message: t.output.error,
          stage: "error",
          code: t.code,
          success: t.success
        }
      } : {
        type: "complete",
        status: {
          queue: !0,
          message: t.success ? void 0 : t.output.error,
          stage: t.success ? "complete" : "error",
          code: t.code,
          progress_data: t.progress_data
        },
        data: t.success ? t.output : null
      };
    case "process_starts":
      return {
        type: "update",
        status: {
          queue: !0,
          stage: "pending",
          code: t.code,
          size: t.rank,
          position: 0,
          success: t.success,
          eta: t.eta
        }
      };
  }
  return { type: "none", status: { stage: "error", queue: !0 } };
}
function Z0() {
}
function Lm(t) {
  return t();
}
function Hm(t) {
  t.forEach(Lm);
}
function Pm(t) {
  return typeof t == "function";
}
function qm(t, e) {
  return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
}
function Um(t, ...e) {
  if (t == null) {
    for (const r of e)
      r(void 0);
    return Z0;
  }
  const n = t.subscribe(...e);
  return n.unsubscribe ? () => n.unsubscribe() : n;
}
function qu(t) {
  const e = typeof t == "string" && t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
  return e ? [parseFloat(e[1]), e[2] || "px"] : [
    /** @type {number} */
    t,
    "px"
  ];
}
const Cf = typeof window < "u";
let Uu = Cf ? () => window.performance.now() : () => Date.now(), Mf = Cf ? (t) => requestAnimationFrame(t) : Z0;
const vr = /* @__PURE__ */ new Set();
function Bf(t) {
  vr.forEach((e) => {
    e.c(t) || (vr.delete(e), e.f());
  }), vr.size !== 0 && Mf(Bf);
}
function Gm(t) {
  let e;
  return vr.size === 0 && Mf(Bf), {
    promise: new Promise((n) => {
      vr.add(e = { c: t, f: n });
    }),
    abort() {
      vr.delete(e);
    }
  };
}
function jm(t) {
  const e = t - 1;
  return e * e * e + 1;
}
function Gu(t, { delay: e = 0, duration: n = 400, easing: r = jm, x: l = 0, y: o = 0, opacity: u = 0 } = {}) {
  const c = getComputedStyle(t), h = +c.opacity, p = c.transform === "none" ? "" : c.transform, _ = h * (1 - u), [v, k] = qu(l), [E, z] = qu(o);
  return {
    delay: e,
    duration: n,
    easing: r,
    css: (H, U) => `
			transform: ${p} translate(${(1 - H) * v}${k}, ${(1 - H) * E}${z});
			opacity: ${h - _ * U}`
  };
}
const ur = [];
function Vm(t, e) {
  return {
    subscribe: ps(t, e).subscribe
  };
}
function ps(t, e = Z0) {
  let n;
  const r = /* @__PURE__ */ new Set();
  function l(c) {
    if (qm(t, c) && (t = c, n)) {
      const h = !ur.length;
      for (const p of r)
        p[1](), ur.push(p, t);
      if (h) {
        for (let p = 0; p < ur.length; p += 2)
          ur[p][0](ur[p + 1]);
        ur.length = 0;
      }
    }
  }
  function o(c) {
    l(c(t));
  }
  function u(c, h = Z0) {
    const p = [c, h];
    return r.add(p), r.size === 1 && (n = e(l, o) || Z0), c(t), () => {
      r.delete(p), r.size === 0 && n && (n(), n = null);
    };
  }
  return { set: l, update: o, subscribe: u };
}
function Tr(t, e, n) {
  const r = !Array.isArray(t), l = r ? [t] : t;
  if (!l.every(Boolean))
    throw new Error("derived() expects stores as input, got a falsy value");
  const o = e.length < 2;
  return Vm(n, (u, c) => {
    let h = !1;
    const p = [];
    let _ = 0, v = Z0;
    const k = () => {
      if (_)
        return;
      v();
      const z = e(r ? p[0] : p, u, c);
      o ? u(z) : v = Pm(z) ? z : Z0;
    }, E = l.map(
      (z, H) => Um(
        z,
        (U) => {
          p[H] = U, _ &= ~(1 << H), h && k();
        },
        () => {
          _ |= 1 << H;
        }
      )
    );
    return h = !0, k(), function() {
      Hm(E), v(), h = !1;
    };
  });
}
function ju(t) {
  return Object.prototype.toString.call(t) === "[object Date]";
}
function ca(t, e, n, r) {
  if (typeof n == "number" || ju(n)) {
    const l = r - n, o = (n - e) / (t.dt || 1 / 60), u = t.opts.stiffness * l, c = t.opts.damping * o, h = (u - c) * t.inv_mass, p = (o + h) * t.dt;
    return Math.abs(p) < t.opts.precision && Math.abs(l) < t.opts.precision ? r : (t.settled = !1, ju(n) ? new Date(n.getTime() + p) : n + p);
  } else {
    if (Array.isArray(n))
      return n.map(
        (l, o) => ca(t, e[o], n[o], r[o])
      );
    if (typeof n == "object") {
      const l = {};
      for (const o in n)
        l[o] = ca(t, e[o], n[o], r[o]);
      return l;
    } else
      throw new Error(`Cannot spring ${typeof n} values`);
  }
}
function Vu(t, e = {}) {
  const n = ps(t), { stiffness: r = 0.15, damping: l = 0.8, precision: o = 0.01 } = e;
  let u, c, h, p = t, _ = t, v = 1, k = 0, E = !1;
  function z(U, N = {}) {
    _ = U;
    const M = h = {};
    return t == null || N.hard || H.stiffness >= 1 && H.damping >= 1 ? (E = !0, u = Uu(), p = U, n.set(t = _), Promise.resolve()) : (N.soft && (k = 1 / ((N.soft === !0 ? 0.5 : +N.soft) * 60), v = 0), c || (u = Uu(), E = !1, c = Gm((A) => {
      if (E)
        return E = !1, c = null, !1;
      v = Math.min(v + k, 1);
      const x = {
        inv_mass: v,
        opts: H,
        settled: !0,
        dt: (A - u) * 60 / 1e3
      }, C = ca(x, p, t, _);
      return u = A, p = t, n.set(t = C), x.settled && (c = null), !x.settled;
    })), new Promise((A) => {
      c.promise.then(() => {
        M === h && A();
      });
    }));
  }
  const H = {
    set: z,
    update: (U, N) => z(U(_, t), N),
    subscribe: n.subscribe,
    stiffness: r,
    damping: l,
    precision: o
  };
  return H;
}
var yi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Va(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var Wm = function(e) {
  return Xm(e) && !Ym(e);
};
function Xm(t) {
  return !!t && typeof t == "object";
}
function Ym(t) {
  var e = Object.prototype.toString.call(t);
  return e === "[object RegExp]" || e === "[object Date]" || Qm(t);
}
var Zm = typeof Symbol == "function" && Symbol.for, Jm = Zm ? Symbol.for("react.element") : 60103;
function Qm(t) {
  return t.$$typeof === Jm;
}
function Km(t) {
  return Array.isArray(t) ? [] : {};
}
function is(t, e) {
  return e.clone !== !1 && e.isMergeableObject(t) ? kr(Km(t), t, e) : t;
}
function $m(t, e, n) {
  return t.concat(e).map(function(r) {
    return is(r, n);
  });
}
function e2(t, e) {
  if (!e.customMerge)
    return kr;
  var n = e.customMerge(t);
  return typeof n == "function" ? n : kr;
}
function t2(t) {
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) {
    return Object.propertyIsEnumerable.call(t, e);
  }) : [];
}
function Wu(t) {
  return Object.keys(t).concat(t2(t));
}
function Nf(t, e) {
  try {
    return e in t;
  } catch {
    return !1;
  }
}
function n2(t, e) {
  return Nf(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e));
}
function r2(t, e, n) {
  var r = {};
  return n.isMergeableObject(t) && Wu(t).forEach(function(l) {
    r[l] = is(t[l], n);
  }), Wu(e).forEach(function(l) {
    n2(t, l) || (Nf(t, l) && n.isMergeableObject(e[l]) ? r[l] = e2(l, n)(t[l], e[l], n) : r[l] = is(e[l], n));
  }), r;
}
function kr(t, e, n) {
  n = n || {}, n.arrayMerge = n.arrayMerge || $m, n.isMergeableObject = n.isMergeableObject || Wm, n.cloneUnlessOtherwiseSpecified = is;
  var r = Array.isArray(e), l = Array.isArray(t), o = r === l;
  return o ? r ? n.arrayMerge(t, e, n) : r2(t, e, n) : is(e, n);
}
kr.all = function(e, n) {
  if (!Array.isArray(e))
    throw new Error("first argument should be an array");
  return e.reduce(function(r, l) {
    return kr(r, l, n);
  }, {});
};
var s2 = kr, i2 = s2;
const l2 = /* @__PURE__ */ Va(i2);
var fa = function(t, e) {
  return fa = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
    n.__proto__ = r;
  } || function(n, r) {
    for (var l in r)
      Object.prototype.hasOwnProperty.call(r, l) && (n[l] = r[l]);
  }, fa(t, e);
};
function Gi(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  fa(t, e);
  function n() {
    this.constructor = t;
  }
  t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
}
var ot = function() {
  return ot = Object.assign || function(e) {
    for (var n, r = 1, l = arguments.length; r < l; r++) {
      n = arguments[r];
      for (var o in n)
        Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, ot.apply(this, arguments);
};
function Hl(t, e, n) {
  if (n || arguments.length === 2)
    for (var r = 0, l = e.length, o; r < l; r++)
      (o || !(r in e)) && (o || (o = Array.prototype.slice.call(e, 0, r)), o[r] = e[r]);
  return t.concat(o || Array.prototype.slice.call(e));
}
var Ze;
(function(t) {
  t[t.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", t[t.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", t[t.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", t[t.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", t[t.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", t[t.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", t[t.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", t[t.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", t[t.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", t[t.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", t[t.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", t[t.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", t[t.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", t[t.INVALID_TAG = 23] = "INVALID_TAG", t[t.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", t[t.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", t[t.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
})(Ze || (Ze = {}));
var St;
(function(t) {
  t[t.literal = 0] = "literal", t[t.argument = 1] = "argument", t[t.number = 2] = "number", t[t.date = 3] = "date", t[t.time = 4] = "time", t[t.select = 5] = "select", t[t.plural = 6] = "plural", t[t.pound = 7] = "pound", t[t.tag = 8] = "tag";
})(St || (St = {}));
var Dr;
(function(t) {
  t[t.number = 0] = "number", t[t.dateTime = 1] = "dateTime";
})(Dr || (Dr = {}));
function Xu(t) {
  return t.type === St.literal;
}
function a2(t) {
  return t.type === St.argument;
}
function zf(t) {
  return t.type === St.number;
}
function Rf(t) {
  return t.type === St.date;
}
function Of(t) {
  return t.type === St.time;
}
function If(t) {
  return t.type === St.select;
}
function Lf(t) {
  return t.type === St.plural;
}
function o2(t) {
  return t.type === St.pound;
}
function Hf(t) {
  return t.type === St.tag;
}
function Pf(t) {
  return !!(t && typeof t == "object" && t.type === Dr.number);
}
function ha(t) {
  return !!(t && typeof t == "object" && t.type === Dr.dateTime);
}
var qf = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, u2 = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
function c2(t) {
  var e = {};
  return t.replace(u2, function(n) {
    var r = n.length;
    switch (n[0]) {
      case "G":
        e.era = r === 4 ? "long" : r === 5 ? "narrow" : "short";
        break;
      case "y":
        e.year = r === 2 ? "2-digit" : "numeric";
        break;
      case "Y":
      case "u":
      case "U":
      case "r":
        throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
      case "q":
      case "Q":
        throw new RangeError("`q/Q` (quarter) patterns are not supported");
      case "M":
      case "L":
        e.month = ["numeric", "2-digit", "short", "long", "narrow"][r - 1];
        break;
      case "w":
      case "W":
        throw new RangeError("`w/W` (week) patterns are not supported");
      case "d":
        e.day = ["numeric", "2-digit"][r - 1];
        break;
      case "D":
      case "F":
      case "g":
        throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
      case "E":
        e.weekday = r === 4 ? "short" : r === 5 ? "narrow" : "short";
        break;
      case "e":
        if (r < 4)
          throw new RangeError("`e..eee` (weekday) patterns are not supported");
        e.weekday = ["short", "long", "narrow", "short"][r - 4];
        break;
      case "c":
        if (r < 4)
          throw new RangeError("`c..ccc` (weekday) patterns are not supported");
        e.weekday = ["short", "long", "narrow", "short"][r - 4];
        break;
      case "a":
        e.hour12 = !0;
        break;
      case "b":
      case "B":
        throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
      case "h":
        e.hourCycle = "h12", e.hour = ["numeric", "2-digit"][r - 1];
        break;
      case "H":
        e.hourCycle = "h23", e.hour = ["numeric", "2-digit"][r - 1];
        break;
      case "K":
        e.hourCycle = "h11", e.hour = ["numeric", "2-digit"][r - 1];
        break;
      case "k":
        e.hourCycle = "h24", e.hour = ["numeric", "2-digit"][r - 1];
        break;
      case "j":
      case "J":
      case "C":
        throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
      case "m":
        e.minute = ["numeric", "2-digit"][r - 1];
        break;
      case "s":
        e.second = ["numeric", "2-digit"][r - 1];
        break;
      case "S":
      case "A":
        throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
      case "z":
        e.timeZoneName = r < 4 ? "short" : "long";
        break;
      case "Z":
      case "O":
      case "v":
      case "V":
      case "X":
      case "x":
        throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
    }
    return "";
  }), e;
}
var f2 = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
function h2(t) {
  if (t.length === 0)
    throw new Error("Number skeleton cannot be empty");
  for (var e = t.split(f2).filter(function(k) {
    return k.length > 0;
  }), n = [], r = 0, l = e; r < l.length; r++) {
    var o = l[r], u = o.split("/");
    if (u.length === 0)
      throw new Error("Invalid number skeleton");
    for (var c = u[0], h = u.slice(1), p = 0, _ = h; p < _.length; p++) {
      var v = _[p];
      if (v.length === 0)
        throw new Error("Invalid number skeleton");
    }
    n.push({ stem: c, options: h });
  }
  return n;
}
function d2(t) {
  return t.replace(/^(.*?)-/, "");
}
var Yu = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Uf = /^(@+)?(\+|#+)?[rs]?$/g, m2 = /(\*)(0+)|(#+)(0+)|(0+)/g, Gf = /^(0+)$/;
function Zu(t) {
  var e = {};
  return t[t.length - 1] === "r" ? e.roundingPriority = "morePrecision" : t[t.length - 1] === "s" && (e.roundingPriority = "lessPrecision"), t.replace(Uf, function(n, r, l) {
    return typeof l != "string" ? (e.minimumSignificantDigits = r.length, e.maximumSignificantDigits = r.length) : l === "+" ? e.minimumSignificantDigits = r.length : r[0] === "#" ? e.maximumSignificantDigits = r.length : (e.minimumSignificantDigits = r.length, e.maximumSignificantDigits = r.length + (typeof l == "string" ? l.length : 0)), "";
  }), e;
}
function jf(t) {
  switch (t) {
    case "sign-auto":
      return {
        signDisplay: "auto"
      };
    case "sign-accounting":
    case "()":
      return {
        currencySign: "accounting"
      };
    case "sign-always":
    case "+!":
      return {
        signDisplay: "always"
      };
    case "sign-accounting-always":
    case "()!":
      return {
        signDisplay: "always",
        currencySign: "accounting"
      };
    case "sign-except-zero":
    case "+?":
      return {
        signDisplay: "exceptZero"
      };
    case "sign-accounting-except-zero":
    case "()?":
      return {
        signDisplay: "exceptZero",
        currencySign: "accounting"
      };
    case "sign-never":
    case "+_":
      return {
        signDisplay: "never"
      };
  }
}
function p2(t) {
  var e;
  if (t[0] === "E" && t[1] === "E" ? (e = {
    notation: "engineering"
  }, t = t.slice(2)) : t[0] === "E" && (e = {
    notation: "scientific"
  }, t = t.slice(1)), e) {
    var n = t.slice(0, 2);
    if (n === "+!" ? (e.signDisplay = "always", t = t.slice(2)) : n === "+?" && (e.signDisplay = "exceptZero", t = t.slice(2)), !Gf.test(t))
      throw new Error("Malformed concise eng/scientific notation");
    e.minimumIntegerDigits = t.length;
  }
  return e;
}
function Ju(t) {
  var e = {}, n = jf(t);
  return n || e;
}
function g2(t) {
  for (var e = {}, n = 0, r = t; n < r.length; n++) {
    var l = r[n];
    switch (l.stem) {
      case "percent":
      case "%":
        e.style = "percent";
        continue;
      case "%x100":
        e.style = "percent", e.scale = 100;
        continue;
      case "currency":
        e.style = "currency", e.currency = l.options[0];
        continue;
      case "group-off":
      case ",_":
        e.useGrouping = !1;
        continue;
      case "precision-integer":
      case ".":
        e.maximumFractionDigits = 0;
        continue;
      case "measure-unit":
      case "unit":
        e.style = "unit", e.unit = d2(l.options[0]);
        continue;
      case "compact-short":
      case "K":
        e.notation = "compact", e.compactDisplay = "short";
        continue;
      case "compact-long":
      case "KK":
        e.notation = "compact", e.compactDisplay = "long";
        continue;
      case "scientific":
        e = ot(ot(ot({}, e), { notation: "scientific" }), l.options.reduce(function(h, p) {
          return ot(ot({}, h), Ju(p));
        }, {}));
        continue;
      case "engineering":
        e = ot(ot(ot({}, e), { notation: "engineering" }), l.options.reduce(function(h, p) {
          return ot(ot({}, h), Ju(p));
        }, {}));
        continue;
      case "notation-simple":
        e.notation = "standard";
        continue;
      case "unit-width-narrow":
        e.currencyDisplay = "narrowSymbol", e.unitDisplay = "narrow";
        continue;
      case "unit-width-short":
        e.currencyDisplay = "code", e.unitDisplay = "short";
        continue;
      case "unit-width-full-name":
        e.currencyDisplay = "name", e.unitDisplay = "long";
        continue;
      case "unit-width-iso-code":
        e.currencyDisplay = "symbol";
        continue;
      case "scale":
        e.scale = parseFloat(l.options[0]);
        continue;
      case "integer-width":
        if (l.options.length > 1)
          throw new RangeError("integer-width stems only accept a single optional option");
        l.options[0].replace(m2, function(h, p, _, v, k, E) {
          if (p)
            e.minimumIntegerDigits = _.length;
          else {
            if (v && k)
              throw new Error("We currently do not support maximum integer digits");
            if (E)
              throw new Error("We currently do not support exact integer digits");
          }
          return "";
        });
        continue;
    }
    if (Gf.test(l.stem)) {
      e.minimumIntegerDigits = l.stem.length;
      continue;
    }
    if (Yu.test(l.stem)) {
      if (l.options.length > 1)
        throw new RangeError("Fraction-precision stems only accept a single optional option");
      l.stem.replace(Yu, function(h, p, _, v, k, E) {
        return _ === "*" ? e.minimumFractionDigits = p.length : v && v[0] === "#" ? e.maximumFractionDigits = v.length : k && E ? (e.minimumFractionDigits = k.length, e.maximumFractionDigits = k.length + E.length) : (e.minimumFractionDigits = p.length, e.maximumFractionDigits = p.length), "";
      });
      var o = l.options[0];
      o === "w" ? e = ot(ot({}, e), { trailingZeroDisplay: "stripIfInteger" }) : o && (e = ot(ot({}, e), Zu(o)));
      continue;
    }
    if (Uf.test(l.stem)) {
      e = ot(ot({}, e), Zu(l.stem));
      continue;
    }
    var u = jf(l.stem);
    u && (e = ot(ot({}, e), u));
    var c = p2(l.stem);
    c && (e = ot(ot({}, e), c));
  }
  return e;
}
var qs = {
  AX: [
    "H"
  ],
  BQ: [
    "H"
  ],
  CP: [
    "H"
  ],
  CZ: [
    "H"
  ],
  DK: [
    "H"
  ],
  FI: [
    "H"
  ],
  ID: [
    "H"
  ],
  IS: [
    "H"
  ],
  ML: [
    "H"
  ],
  NE: [
    "H"
  ],
  RU: [
    "H"
  ],
  SE: [
    "H"
  ],
  SJ: [
    "H"
  ],
  SK: [
    "H"
  ],
  AS: [
    "h",
    "H"
  ],
  BT: [
    "h",
    "H"
  ],
  DJ: [
    "h",
    "H"
  ],
  ER: [
    "h",
    "H"
  ],
  GH: [
    "h",
    "H"
  ],
  IN: [
    "h",
    "H"
  ],
  LS: [
    "h",
    "H"
  ],
  PG: [
    "h",
    "H"
  ],
  PW: [
    "h",
    "H"
  ],
  SO: [
    "h",
    "H"
  ],
  TO: [
    "h",
    "H"
  ],
  VU: [
    "h",
    "H"
  ],
  WS: [
    "h",
    "H"
  ],
  "001": [
    "H",
    "h"
  ],
  AL: [
    "h",
    "H",
    "hB"
  ],
  TD: [
    "h",
    "H",
    "hB"
  ],
  "ca-ES": [
    "H",
    "h",
    "hB"
  ],
  CF: [
    "H",
    "h",
    "hB"
  ],
  CM: [
    "H",
    "h",
    "hB"
  ],
  "fr-CA": [
    "H",
    "h",
    "hB"
  ],
  "gl-ES": [
    "H",
    "h",
    "hB"
  ],
  "it-CH": [
    "H",
    "h",
    "hB"
  ],
  "it-IT": [
    "H",
    "h",
    "hB"
  ],
  LU: [
    "H",
    "h",
    "hB"
  ],
  NP: [
    "H",
    "h",
    "hB"
  ],
  PF: [
    "H",
    "h",
    "hB"
  ],
  SC: [
    "H",
    "h",
    "hB"
  ],
  SM: [
    "H",
    "h",
    "hB"
  ],
  SN: [
    "H",
    "h",
    "hB"
  ],
  TF: [
    "H",
    "h",
    "hB"
  ],
  VA: [
    "H",
    "h",
    "hB"
  ],
  CY: [
    "h",
    "H",
    "hb",
    "hB"
  ],
  GR: [
    "h",
    "H",
    "hb",
    "hB"
  ],
  CO: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  DO: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  KP: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  KR: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  NA: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  PA: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  PR: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  VE: [
    "h",
    "H",
    "hB",
    "hb"
  ],
  AC: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  AI: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  BW: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  BZ: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  CC: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  CK: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  CX: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  DG: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  FK: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  GB: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  GG: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  GI: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  IE: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  IM: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  IO: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  JE: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  LT: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  MK: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  MN: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  MS: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  NF: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  NG: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  NR: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  NU: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  PN: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  SH: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  SX: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  TA: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  ZA: [
    "H",
    "h",
    "hb",
    "hB"
  ],
  "af-ZA": [
    "H",
    "h",
    "hB",
    "hb"
  ],
  AR: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  CL: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  CR: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  CU: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  EA: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  "es-BO": [
    "H",
    "h",
    "hB",
    "hb"
  ],
  "es-BR": [
    "H",
    "h",
    "hB",
    "hb"
  ],
  "es-EC": [
    "H",
    "h",
    "hB",
    "hb"
  ],
  "es-ES": [
    "H",
    "h",
    "hB",
    "hb"
  ],
  "es-GQ": [
    "H",
    "h",
    "hB",
    "hb"
  ],
  "es-PE": [
    "H",
    "h",
    "hB",
    "hb"
  ],
  GT: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  HN: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  IC: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  KG: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  KM: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  LK: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  MA: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  MX: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  NI: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  PY: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  SV: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  UY: [
    "H",
    "h",
    "hB",
    "hb"
  ],
  JP: [
    "H",
    "h",
    "K"
  ],
  AD: [
    "H",
    "hB"
  ],
  AM: [
    "H",
    "hB"
  ],
  AO: [
    "H",
    "hB"
  ],
  AT: [
    "H",
    "hB"
  ],
  AW: [
    "H",
    "hB"
  ],
  BE: [
    "H",
    "hB"
  ],
  BF: [
    "H",
    "hB"
  ],
  BJ: [
    "H",
    "hB"
  ],
  BL: [
    "H",
    "hB"
  ],
  BR: [
    "H",
    "hB"
  ],
  CG: [
    "H",
    "hB"
  ],
  CI: [
    "H",
    "hB"
  ],
  CV: [
    "H",
    "hB"
  ],
  DE: [
    "H",
    "hB"
  ],
  EE: [
    "H",
    "hB"
  ],
  FR: [
    "H",
    "hB"
  ],
  GA: [
    "H",
    "hB"
  ],
  GF: [
    "H",
    "hB"
  ],
  GN: [
    "H",
    "hB"
  ],
  GP: [
    "H",
    "hB"
  ],
  GW: [
    "H",
    "hB"
  ],
  HR: [
    "H",
    "hB"
  ],
  IL: [
    "H",
    "hB"
  ],
  IT: [
    "H",
    "hB"
  ],
  KZ: [
    "H",
    "hB"
  ],
  MC: [
    "H",
    "hB"
  ],
  MD: [
    "H",
    "hB"
  ],
  MF: [
    "H",
    "hB"
  ],
  MQ: [
    "H",
    "hB"
  ],
  MZ: [
    "H",
    "hB"
  ],
  NC: [
    "H",
    "hB"
  ],
  NL: [
    "H",
    "hB"
  ],
  PM: [
    "H",
    "hB"
  ],
  PT: [
    "H",
    "hB"
  ],
  RE: [
    "H",
    "hB"
  ],
  RO: [
    "H",
    "hB"
  ],
  SI: [
    "H",
    "hB"
  ],
  SR: [
    "H",
    "hB"
  ],
  ST: [
    "H",
    "hB"
  ],
  TG: [
    "H",
    "hB"
  ],
  TR: [
    "H",
    "hB"
  ],
  WF: [
    "H",
    "hB"
  ],
  YT: [
    "H",
    "hB"
  ],
  BD: [
    "h",
    "hB",
    "H"
  ],
  PK: [
    "h",
    "hB",
    "H"
  ],
  AZ: [
    "H",
    "hB",
    "h"
  ],
  BA: [
    "H",
    "hB",
    "h"
  ],
  BG: [
    "H",
    "hB",
    "h"
  ],
  CH: [
    "H",
    "hB",
    "h"
  ],
  GE: [
    "H",
    "hB",
    "h"
  ],
  LI: [
    "H",
    "hB",
    "h"
  ],
  ME: [
    "H",
    "hB",
    "h"
  ],
  RS: [
    "H",
    "hB",
    "h"
  ],
  UA: [
    "H",
    "hB",
    "h"
  ],
  UZ: [
    "H",
    "hB",
    "h"
  ],
  XK: [
    "H",
    "hB",
    "h"
  ],
  AG: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  AU: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  BB: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  BM: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  BS: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  CA: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  DM: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  "en-001": [
    "h",
    "hb",
    "H",
    "hB"
  ],
  FJ: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  FM: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  GD: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  GM: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  GU: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  GY: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  JM: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  KI: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  KN: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  KY: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  LC: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  LR: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  MH: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  MP: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  MW: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  NZ: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  SB: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  SG: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  SL: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  SS: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  SZ: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  TC: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  TT: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  UM: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  US: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  VC: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  VG: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  VI: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  ZM: [
    "h",
    "hb",
    "H",
    "hB"
  ],
  BO: [
    "H",
    "hB",
    "h",
    "hb"
  ],
  EC: [
    "H",
    "hB",
    "h",
    "hb"
  ],
  ES: [
    "H",
    "hB",
    "h",
    "hb"
  ],
  GQ: [
    "H",
    "hB",
    "h",
    "hb"
  ],
  PE: [
    "H",
    "hB",
    "h",
    "hb"
  ],
  AE: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  "ar-001": [
    "h",
    "hB",
    "hb",
    "H"
  ],
  BH: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  DZ: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  EG: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  EH: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  HK: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  IQ: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  JO: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  KW: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  LB: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  LY: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  MO: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  MR: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  OM: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  PH: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  PS: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  QA: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  SA: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  SD: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  SY: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  TN: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  YE: [
    "h",
    "hB",
    "hb",
    "H"
  ],
  AF: [
    "H",
    "hb",
    "hB",
    "h"
  ],
  LA: [
    "H",
    "hb",
    "hB",
    "h"
  ],
  CN: [
    "H",
    "hB",
    "hb",
    "h"
  ],
  LV: [
    "H",
    "hB",
    "hb",
    "h"
  ],
  TL: [
    "H",
    "hB",
    "hb",
    "h"
  ],
  "zu-ZA": [
    "H",
    "hB",
    "hb",
    "h"
  ],
  CD: [
    "hB",
    "H"
  ],
  IR: [
    "hB",
    "H"
  ],
  "hi-IN": [
    "hB",
    "h",
    "H"
  ],
  "kn-IN": [
    "hB",
    "h",
    "H"
  ],
  "ml-IN": [
    "hB",
    "h",
    "H"
  ],
  "te-IN": [
    "hB",
    "h",
    "H"
  ],
  KH: [
    "hB",
    "h",
    "H",
    "hb"
  ],
  "ta-IN": [
    "hB",
    "h",
    "hb",
    "H"
  ],
  BN: [
    "hb",
    "hB",
    "h",
    "H"
  ],
  MY: [
    "hb",
    "hB",
    "h",
    "H"
  ],
  ET: [
    "hB",
    "hb",
    "h",
    "H"
  ],
  "gu-IN": [
    "hB",
    "hb",
    "h",
    "H"
  ],
  "mr-IN": [
    "hB",
    "hb",
    "h",
    "H"
  ],
  "pa-IN": [
    "hB",
    "hb",
    "h",
    "H"
  ],
  TW: [
    "hB",
    "hb",
    "h",
    "H"
  ],
  KE: [
    "hB",
    "hb",
    "H",
    "h"
  ],
  MM: [
    "hB",
    "hb",
    "H",
    "h"
  ],
  TZ: [
    "hB",
    "hb",
    "H",
    "h"
  ],
  UG: [
    "hB",
    "hb",
    "H",
    "h"
  ]
};
function _2(t, e) {
  for (var n = "", r = 0; r < t.length; r++) {
    var l = t.charAt(r);
    if (l === "j") {
      for (var o = 0; r + 1 < t.length && t.charAt(r + 1) === l; )
        o++, r++;
      var u = 1 + (o & 1), c = o < 2 ? 1 : 3 + (o >> 1), h = "a", p = b2(e);
      for ((p == "H" || p == "k") && (c = 0); c-- > 0; )
        n += h;
      for (; u-- > 0; )
        n = p + n;
    } else
      l === "J" ? n += "H" : n += l;
  }
  return n;
}
function b2(t) {
  var e = t.hourCycle;
  if (e === void 0 && // @ts-ignore hourCycle(s) is not identified yet
  t.hourCycles && // @ts-ignore
  t.hourCycles.length && (e = t.hourCycles[0]), e)
    switch (e) {
      case "h24":
        return "k";
      case "h23":
        return "H";
      case "h12":
        return "h";
      case "h11":
        return "K";
      default:
        throw new Error("Invalid hourCycle");
    }
  var n = t.language, r;
  n !== "root" && (r = t.maximize().region);
  var l = qs[r || ""] || qs[n || ""] || qs["".concat(n, "-001")] || qs["001"];
  return l[0];
}
var Pl, w2 = new RegExp("^".concat(qf.source, "*")), y2 = new RegExp("".concat(qf.source, "*$"));
function $e(t, e) {
  return { start: t, end: e };
}
var v2 = !!String.prototype.startsWith, k2 = !!String.fromCodePoint, D2 = !!Object.fromEntries, A2 = !!String.prototype.codePointAt, S2 = !!String.prototype.trimStart, E2 = !!String.prototype.trimEnd, x2 = !!Number.isSafeInteger, T2 = x2 ? Number.isSafeInteger : function(t) {
  return typeof t == "number" && isFinite(t) && Math.floor(t) === t && Math.abs(t) <= 9007199254740991;
}, da = !0;
try {
  var F2 = Wf("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
  da = ((Pl = F2.exec("a")) === null || Pl === void 0 ? void 0 : Pl[0]) === "a";
} catch {
  da = !1;
}
var Qu = v2 ? (
  // Native
  function(e, n, r) {
    return e.startsWith(n, r);
  }
) : (
  // For IE11
  function(e, n, r) {
    return e.slice(r, r + n.length) === n;
  }
), ma = k2 ? String.fromCodePoint : (
  // IE11
  function() {
    for (var e = [], n = 0; n < arguments.length; n++)
      e[n] = arguments[n];
    for (var r = "", l = e.length, o = 0, u; l > o; ) {
      if (u = e[o++], u > 1114111)
        throw RangeError(u + " is not a valid code point");
      r += u < 65536 ? String.fromCharCode(u) : String.fromCharCode(((u -= 65536) >> 10) + 55296, u % 1024 + 56320);
    }
    return r;
  }
), Ku = (
  // native
  D2 ? Object.fromEntries : (
    // Ponyfill
    function(e) {
      for (var n = {}, r = 0, l = e; r < l.length; r++) {
        var o = l[r], u = o[0], c = o[1];
        n[u] = c;
      }
      return n;
    }
  )
), Vf = A2 ? (
  // Native
  function(e, n) {
    return e.codePointAt(n);
  }
) : (
  // IE 11
  function(e, n) {
    var r = e.length;
    if (!(n < 0 || n >= r)) {
      var l = e.charCodeAt(n), o;
      return l < 55296 || l > 56319 || n + 1 === r || (o = e.charCodeAt(n + 1)) < 56320 || o > 57343 ? l : (l - 55296 << 10) + (o - 56320) + 65536;
    }
  }
), C2 = S2 ? (
  // Native
  function(e) {
    return e.trimStart();
  }
) : (
  // Ponyfill
  function(e) {
    return e.replace(w2, "");
  }
), M2 = E2 ? (
  // Native
  function(e) {
    return e.trimEnd();
  }
) : (
  // Ponyfill
  function(e) {
    return e.replace(y2, "");
  }
);
function Wf(t, e) {
  return new RegExp(t, e);
}
var pa;
if (da) {
  var $u = Wf("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
  pa = function(e, n) {
    var r;
    $u.lastIndex = n;
    var l = $u.exec(e);
    return (r = l[1]) !== null && r !== void 0 ? r : "";
  };
} else
  pa = function(e, n) {
    for (var r = []; ; ) {
      var l = Vf(e, n);
      if (l === void 0 || Xf(l) || R2(l))
        break;
      r.push(l), n += l >= 65536 ? 2 : 1;
    }
    return ma.apply(void 0, r);
  };
var B2 = (
  /** @class */
  function() {
    function t(e, n) {
      n === void 0 && (n = {}), this.message = e, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!n.ignoreTag, this.locale = n.locale, this.requiresOtherClause = !!n.requiresOtherClause, this.shouldParseSkeletons = !!n.shouldParseSkeletons;
    }
    return t.prototype.parse = function() {
      if (this.offset() !== 0)
        throw Error("parser can only be used once");
      return this.parseMessage(0, "", !1);
    }, t.prototype.parseMessage = function(e, n, r) {
      for (var l = []; !this.isEOF(); ) {
        var o = this.char();
        if (o === 123) {
          var u = this.parseArgument(e, r);
          if (u.err)
            return u;
          l.push(u.val);
        } else {
          if (o === 125 && e > 0)
            break;
          if (o === 35 && (n === "plural" || n === "selectordinal")) {
            var c = this.clonePosition();
            this.bump(), l.push({
              type: St.pound,
              location: $e(c, this.clonePosition())
            });
          } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
            if (r)
              break;
            return this.error(Ze.UNMATCHED_CLOSING_TAG, $e(this.clonePosition(), this.clonePosition()));
          } else if (o === 60 && !this.ignoreTag && ga(this.peek() || 0)) {
            var u = this.parseTag(e, n);
            if (u.err)
              return u;
            l.push(u.val);
          } else {
            var u = this.parseLiteral(e, n);
            if (u.err)
              return u;
            l.push(u.val);
          }
        }
      }
      return { val: l, err: null };
    }, t.prototype.parseTag = function(e, n) {
      var r = this.clonePosition();
      this.bump();
      var l = this.parseTagName();
      if (this.bumpSpace(), this.bumpIf("/>"))
        return {
          val: {
            type: St.literal,
            value: "<".concat(l, "/>"),
            location: $e(r, this.clonePosition())
          },
          err: null
        };
      if (this.bumpIf(">")) {
        var o = this.parseMessage(e + 1, n, !0);
        if (o.err)
          return o;
        var u = o.val, c = this.clonePosition();
        if (this.bumpIf("</")) {
          if (this.isEOF() || !ga(this.char()))
            return this.error(Ze.INVALID_TAG, $e(c, this.clonePosition()));
          var h = this.clonePosition(), p = this.parseTagName();
          return l !== p ? this.error(Ze.UNMATCHED_CLOSING_TAG, $e(h, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
            val: {
              type: St.tag,
              value: l,
              children: u,
              location: $e(r, this.clonePosition())
            },
            err: null
          } : this.error(Ze.INVALID_TAG, $e(c, this.clonePosition())));
        } else
          return this.error(Ze.UNCLOSED_TAG, $e(r, this.clonePosition()));
      } else
        return this.error(Ze.INVALID_TAG, $e(r, this.clonePosition()));
    }, t.prototype.parseTagName = function() {
      var e = this.offset();
      for (this.bump(); !this.isEOF() && z2(this.char()); )
        this.bump();
      return this.message.slice(e, this.offset());
    }, t.prototype.parseLiteral = function(e, n) {
      for (var r = this.clonePosition(), l = ""; ; ) {
        var o = this.tryParseQuote(n);
        if (o) {
          l += o;
          continue;
        }
        var u = this.tryParseUnquoted(e, n);
        if (u) {
          l += u;
          continue;
        }
        var c = this.tryParseLeftAngleBracket();
        if (c) {
          l += c;
          continue;
        }
        break;
      }
      var h = $e(r, this.clonePosition());
      return {
        val: { type: St.literal, value: l, location: h },
        err: null
      };
    }, t.prototype.tryParseLeftAngleBracket = function() {
      return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
      !N2(this.peek() || 0)) ? (this.bump(), "<") : null;
    }, t.prototype.tryParseQuote = function(e) {
      if (this.isEOF() || this.char() !== 39)
        return null;
      switch (this.peek()) {
        case 39:
          return this.bump(), this.bump(), "'";
        case 123:
        case 60:
        case 62:
        case 125:
          break;
        case 35:
          if (e === "plural" || e === "selectordinal")
            break;
          return null;
        default:
          return null;
      }
      this.bump();
      var n = [this.char()];
      for (this.bump(); !this.isEOF(); ) {
        var r = this.char();
        if (r === 39)
          if (this.peek() === 39)
            n.push(39), this.bump();
          else {
            this.bump();
            break;
          }
        else
          n.push(r);
        this.bump();
      }
      return ma.apply(void 0, n);
    }, t.prototype.tryParseUnquoted = function(e, n) {
      if (this.isEOF())
        return null;
      var r = this.char();
      return r === 60 || r === 123 || r === 35 && (n === "plural" || n === "selectordinal") || r === 125 && e > 0 ? null : (this.bump(), ma(r));
    }, t.prototype.parseArgument = function(e, n) {
      var r = this.clonePosition();
      if (this.bump(), this.bumpSpace(), this.isEOF())
        return this.error(Ze.EXPECT_ARGUMENT_CLOSING_BRACE, $e(r, this.clonePosition()));
      if (this.char() === 125)
        return this.bump(), this.error(Ze.EMPTY_ARGUMENT, $e(r, this.clonePosition()));
      var l = this.parseIdentifierIfPossible().value;
      if (!l)
        return this.error(Ze.MALFORMED_ARGUMENT, $e(r, this.clonePosition()));
      if (this.bumpSpace(), this.isEOF())
        return this.error(Ze.EXPECT_ARGUMENT_CLOSING_BRACE, $e(r, this.clonePosition()));
      switch (this.char()) {
        case 125:
          return this.bump(), {
            val: {
              type: St.argument,
              // value does not include the opening and closing braces.
              value: l,
              location: $e(r, this.clonePosition())
            },
            err: null
          };
        case 44:
          return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(Ze.EXPECT_ARGUMENT_CLOSING_BRACE, $e(r, this.clonePosition())) : this.parseArgumentOptions(e, n, l, r);
        default:
          return this.error(Ze.MALFORMED_ARGUMENT, $e(r, this.clonePosition()));
      }
    }, t.prototype.parseIdentifierIfPossible = function() {
      var e = this.clonePosition(), n = this.offset(), r = pa(this.message, n), l = n + r.length;
      this.bumpTo(l);
      var o = this.clonePosition(), u = $e(e, o);
      return { value: r, location: u };
    }, t.prototype.parseArgumentOptions = function(e, n, r, l) {
      var o, u = this.clonePosition(), c = this.parseIdentifierIfPossible().value, h = this.clonePosition();
      switch (c) {
        case "":
          return this.error(Ze.EXPECT_ARGUMENT_TYPE, $e(u, h));
        case "number":
        case "date":
        case "time": {
          this.bumpSpace();
          var p = null;
          if (this.bumpIf(",")) {
            this.bumpSpace();
            var _ = this.clonePosition(), v = this.parseSimpleArgStyleIfPossible();
            if (v.err)
              return v;
            var k = M2(v.val);
            if (k.length === 0)
              return this.error(Ze.EXPECT_ARGUMENT_STYLE, $e(this.clonePosition(), this.clonePosition()));
            var E = $e(_, this.clonePosition());
            p = { style: k, styleLocation: E };
          }
          var z = this.tryParseArgumentClose(l);
          if (z.err)
            return z;
          var H = $e(l, this.clonePosition());
          if (p && Qu(p == null ? void 0 : p.style, "::", 0)) {
            var U = C2(p.style.slice(2));
            if (c === "number") {
              var v = this.parseNumberSkeletonFromString(U, p.styleLocation);
              return v.err ? v : {
                val: { type: St.number, value: r, location: H, style: v.val },
                err: null
              };
            } else {
              if (U.length === 0)
                return this.error(Ze.EXPECT_DATE_TIME_SKELETON, H);
              var N = U;
              this.locale && (N = _2(U, this.locale));
              var k = {
                type: Dr.dateTime,
                pattern: N,
                location: p.styleLocation,
                parsedOptions: this.shouldParseSkeletons ? c2(N) : {}
              }, M = c === "date" ? St.date : St.time;
              return {
                val: { type: M, value: r, location: H, style: k },
                err: null
              };
            }
          }
          return {
            val: {
              type: c === "number" ? St.number : c === "date" ? St.date : St.time,
              value: r,
              location: H,
              style: (o = p == null ? void 0 : p.style) !== null && o !== void 0 ? o : null
            },
            err: null
          };
        }
        case "plural":
        case "selectordinal":
        case "select": {
          var A = this.clonePosition();
          if (this.bumpSpace(), !this.bumpIf(","))
            return this.error(Ze.EXPECT_SELECT_ARGUMENT_OPTIONS, $e(A, ot({}, A)));
          this.bumpSpace();
          var x = this.parseIdentifierIfPossible(), C = 0;
          if (c !== "select" && x.value === "offset") {
            if (!this.bumpIf(":"))
              return this.error(Ze.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, $e(this.clonePosition(), this.clonePosition()));
            this.bumpSpace();
            var v = this.tryParseDecimalInteger(Ze.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, Ze.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
            if (v.err)
              return v;
            this.bumpSpace(), x = this.parseIdentifierIfPossible(), C = v.val;
          }
          var O = this.tryParsePluralOrSelectOptions(e, c, n, x);
          if (O.err)
            return O;
          var z = this.tryParseArgumentClose(l);
          if (z.err)
            return z;
          var q = $e(l, this.clonePosition());
          return c === "select" ? {
            val: {
              type: St.select,
              value: r,
              options: Ku(O.val),
              location: q
            },
            err: null
          } : {
            val: {
              type: St.plural,
              value: r,
              options: Ku(O.val),
              offset: C,
              pluralType: c === "plural" ? "cardinal" : "ordinal",
              location: q
            },
            err: null
          };
        }
        default:
          return this.error(Ze.INVALID_ARGUMENT_TYPE, $e(u, h));
      }
    }, t.prototype.tryParseArgumentClose = function(e) {
      return this.isEOF() || this.char() !== 125 ? this.error(Ze.EXPECT_ARGUMENT_CLOSING_BRACE, $e(e, this.clonePosition())) : (this.bump(), { val: !0, err: null });
    }, t.prototype.parseSimpleArgStyleIfPossible = function() {
      for (var e = 0, n = this.clonePosition(); !this.isEOF(); ) {
        var r = this.char();
        switch (r) {
          case 39: {
            this.bump();
            var l = this.clonePosition();
            if (!this.bumpUntil("'"))
              return this.error(Ze.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, $e(l, this.clonePosition()));
            this.bump();
            break;
          }
          case 123: {
            e += 1, this.bump();
            break;
          }
          case 125: {
            if (e > 0)
              e -= 1;
            else
              return {
                val: this.message.slice(n.offset, this.offset()),
                err: null
              };
            break;
          }
          default:
            this.bump();
            break;
        }
      }
      return {
        val: this.message.slice(n.offset, this.offset()),
        err: null
      };
    }, t.prototype.parseNumberSkeletonFromString = function(e, n) {
      var r = [];
      try {
        r = h2(e);
      } catch {
        return this.error(Ze.INVALID_NUMBER_SKELETON, n);
      }
      return {
        val: {
          type: Dr.number,
          tokens: r,
          location: n,
          parsedOptions: this.shouldParseSkeletons ? g2(r) : {}
        },
        err: null
      };
    }, t.prototype.tryParsePluralOrSelectOptions = function(e, n, r, l) {
      for (var o, u = !1, c = [], h = /* @__PURE__ */ new Set(), p = l.value, _ = l.location; ; ) {
        if (p.length === 0) {
          var v = this.clonePosition();
          if (n !== "select" && this.bumpIf("=")) {
            var k = this.tryParseDecimalInteger(Ze.EXPECT_PLURAL_ARGUMENT_SELECTOR, Ze.INVALID_PLURAL_ARGUMENT_SELECTOR);
            if (k.err)
              return k;
            _ = $e(v, this.clonePosition()), p = this.message.slice(v.offset, this.offset());
          } else
            break;
        }
        if (h.has(p))
          return this.error(n === "select" ? Ze.DUPLICATE_SELECT_ARGUMENT_SELECTOR : Ze.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, _);
        p === "other" && (u = !0), this.bumpSpace();
        var E = this.clonePosition();
        if (!this.bumpIf("{"))
          return this.error(n === "select" ? Ze.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : Ze.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, $e(this.clonePosition(), this.clonePosition()));
        var z = this.parseMessage(e + 1, n, r);
        if (z.err)
          return z;
        var H = this.tryParseArgumentClose(E);
        if (H.err)
          return H;
        c.push([
          p,
          {
            value: z.val,
            location: $e(E, this.clonePosition())
          }
        ]), h.add(p), this.bumpSpace(), o = this.parseIdentifierIfPossible(), p = o.value, _ = o.location;
      }
      return c.length === 0 ? this.error(n === "select" ? Ze.EXPECT_SELECT_ARGUMENT_SELECTOR : Ze.EXPECT_PLURAL_ARGUMENT_SELECTOR, $e(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !u ? this.error(Ze.MISSING_OTHER_CLAUSE, $e(this.clonePosition(), this.clonePosition())) : { val: c, err: null };
    }, t.prototype.tryParseDecimalInteger = function(e, n) {
      var r = 1, l = this.clonePosition();
      this.bumpIf("+") || this.bumpIf("-") && (r = -1);
      for (var o = !1, u = 0; !this.isEOF(); ) {
        var c = this.char();
        if (c >= 48 && c <= 57)
          o = !0, u = u * 10 + (c - 48), this.bump();
        else
          break;
      }
      var h = $e(l, this.clonePosition());
      return o ? (u *= r, T2(u) ? { val: u, err: null } : this.error(n, h)) : this.error(e, h);
    }, t.prototype.offset = function() {
      return this.position.offset;
    }, t.prototype.isEOF = function() {
      return this.offset() === this.message.length;
    }, t.prototype.clonePosition = function() {
      return {
        offset: this.position.offset,
        line: this.position.line,
        column: this.position.column
      };
    }, t.prototype.char = function() {
      var e = this.position.offset;
      if (e >= this.message.length)
        throw Error("out of bound");
      var n = Vf(this.message, e);
      if (n === void 0)
        throw Error("Offset ".concat(e, " is at invalid UTF-16 code unit boundary"));
      return n;
    }, t.prototype.error = function(e, n) {
      return {
        val: null,
        err: {
          kind: e,
          message: this.message,
          location: n
        }
      };
    }, t.prototype.bump = function() {
      if (!this.isEOF()) {
        var e = this.char();
        e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2);
      }
    }, t.prototype.bumpIf = function(e) {
      if (Qu(this.message, e, this.offset())) {
        for (var n = 0; n < e.length; n++)
          this.bump();
        return !0;
      }
      return !1;
    }, t.prototype.bumpUntil = function(e) {
      var n = this.offset(), r = this.message.indexOf(e, n);
      return r >= 0 ? (this.bumpTo(r), !0) : (this.bumpTo(this.message.length), !1);
    }, t.prototype.bumpTo = function(e) {
      if (this.offset() > e)
        throw Error("targetOffset ".concat(e, " must be greater than or equal to the current offset ").concat(this.offset()));
      for (e = Math.min(e, this.message.length); ; ) {
        var n = this.offset();
        if (n === e)
          break;
        if (n > e)
          throw Error("targetOffset ".concat(e, " is at invalid UTF-16 code unit boundary"));
        if (this.bump(), this.isEOF())
          break;
      }
    }, t.prototype.bumpSpace = function() {
      for (; !this.isEOF() && Xf(this.char()); )
        this.bump();
    }, t.prototype.peek = function() {
      if (this.isEOF())
        return null;
      var e = this.char(), n = this.offset(), r = this.message.charCodeAt(n + (e >= 65536 ? 2 : 1));
      return r ?? null;
    }, t;
  }()
);
function ga(t) {
  return t >= 97 && t <= 122 || t >= 65 && t <= 90;
}
function N2(t) {
  return ga(t) || t === 47;
}
function z2(t) {
  return t === 45 || t === 46 || t >= 48 && t <= 57 || t === 95 || t >= 97 && t <= 122 || t >= 65 && t <= 90 || t == 183 || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 893 || t >= 895 && t <= 8191 || t >= 8204 && t <= 8205 || t >= 8255 && t <= 8256 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039;
}
function Xf(t) {
  return t >= 9 && t <= 13 || t === 32 || t === 133 || t >= 8206 && t <= 8207 || t === 8232 || t === 8233;
}
function R2(t) {
  return t >= 33 && t <= 35 || t === 36 || t >= 37 && t <= 39 || t === 40 || t === 41 || t === 42 || t === 43 || t === 44 || t === 45 || t >= 46 && t <= 47 || t >= 58 && t <= 59 || t >= 60 && t <= 62 || t >= 63 && t <= 64 || t === 91 || t === 92 || t === 93 || t === 94 || t === 96 || t === 123 || t === 124 || t === 125 || t === 126 || t === 161 || t >= 162 && t <= 165 || t === 166 || t === 167 || t === 169 || t === 171 || t === 172 || t === 174 || t === 176 || t === 177 || t === 182 || t === 187 || t === 191 || t === 215 || t === 247 || t >= 8208 && t <= 8213 || t >= 8214 && t <= 8215 || t === 8216 || t === 8217 || t === 8218 || t >= 8219 && t <= 8220 || t === 8221 || t === 8222 || t === 8223 || t >= 8224 && t <= 8231 || t >= 8240 && t <= 8248 || t === 8249 || t === 8250 || t >= 8251 && t <= 8254 || t >= 8257 && t <= 8259 || t === 8260 || t === 8261 || t === 8262 || t >= 8263 && t <= 8273 || t === 8274 || t === 8275 || t >= 8277 && t <= 8286 || t >= 8592 && t <= 8596 || t >= 8597 && t <= 8601 || t >= 8602 && t <= 8603 || t >= 8604 && t <= 8607 || t === 8608 || t >= 8609 && t <= 8610 || t === 8611 || t >= 8612 && t <= 8613 || t === 8614 || t >= 8615 && t <= 8621 || t === 8622 || t >= 8623 && t <= 8653 || t >= 8654 && t <= 8655 || t >= 8656 && t <= 8657 || t === 8658 || t === 8659 || t === 8660 || t >= 8661 && t <= 8691 || t >= 8692 && t <= 8959 || t >= 8960 && t <= 8967 || t === 8968 || t === 8969 || t === 8970 || t === 8971 || t >= 8972 && t <= 8991 || t >= 8992 && t <= 8993 || t >= 8994 && t <= 9e3 || t === 9001 || t === 9002 || t >= 9003 && t <= 9083 || t === 9084 || t >= 9085 && t <= 9114 || t >= 9115 && t <= 9139 || t >= 9140 && t <= 9179 || t >= 9180 && t <= 9185 || t >= 9186 && t <= 9254 || t >= 9255 && t <= 9279 || t >= 9280 && t <= 9290 || t >= 9291 && t <= 9311 || t >= 9472 && t <= 9654 || t === 9655 || t >= 9656 && t <= 9664 || t === 9665 || t >= 9666 && t <= 9719 || t >= 9720 && t <= 9727 || t >= 9728 && t <= 9838 || t === 9839 || t >= 9840 && t <= 10087 || t === 10088 || t === 10089 || t === 10090 || t === 10091 || t === 10092 || t === 10093 || t === 10094 || t === 10095 || t === 10096 || t === 10097 || t === 10098 || t === 10099 || t === 10100 || t === 10101 || t >= 10132 && t <= 10175 || t >= 10176 && t <= 10180 || t === 10181 || t === 10182 || t >= 10183 && t <= 10213 || t === 10214 || t === 10215 || t === 10216 || t === 10217 || t === 10218 || t === 10219 || t === 10220 || t === 10221 || t === 10222 || t === 10223 || t >= 10224 && t <= 10239 || t >= 10240 && t <= 10495 || t >= 10496 && t <= 10626 || t === 10627 || t === 10628 || t === 10629 || t === 10630 || t === 10631 || t === 10632 || t === 10633 || t === 10634 || t === 10635 || t === 10636 || t === 10637 || t === 10638 || t === 10639 || t === 10640 || t === 10641 || t === 10642 || t === 10643 || t === 10644 || t === 10645 || t === 10646 || t === 10647 || t === 10648 || t >= 10649 && t <= 10711 || t === 10712 || t === 10713 || t === 10714 || t === 10715 || t >= 10716 && t <= 10747 || t === 10748 || t === 10749 || t >= 10750 && t <= 11007 || t >= 11008 && t <= 11055 || t >= 11056 && t <= 11076 || t >= 11077 && t <= 11078 || t >= 11079 && t <= 11084 || t >= 11085 && t <= 11123 || t >= 11124 && t <= 11125 || t >= 11126 && t <= 11157 || t === 11158 || t >= 11159 && t <= 11263 || t >= 11776 && t <= 11777 || t === 11778 || t === 11779 || t === 11780 || t === 11781 || t >= 11782 && t <= 11784 || t === 11785 || t === 11786 || t === 11787 || t === 11788 || t === 11789 || t >= 11790 && t <= 11798 || t === 11799 || t >= 11800 && t <= 11801 || t === 11802 || t === 11803 || t === 11804 || t === 11805 || t >= 11806 && t <= 11807 || t === 11808 || t === 11809 || t === 11810 || t === 11811 || t === 11812 || t === 11813 || t === 11814 || t === 11815 || t === 11816 || t === 11817 || t >= 11818 && t <= 11822 || t === 11823 || t >= 11824 && t <= 11833 || t >= 11834 && t <= 11835 || t >= 11836 && t <= 11839 || t === 11840 || t === 11841 || t === 11842 || t >= 11843 && t <= 11855 || t >= 11856 && t <= 11857 || t === 11858 || t >= 11859 && t <= 11903 || t >= 12289 && t <= 12291 || t === 12296 || t === 12297 || t === 12298 || t === 12299 || t === 12300 || t === 12301 || t === 12302 || t === 12303 || t === 12304 || t === 12305 || t >= 12306 && t <= 12307 || t === 12308 || t === 12309 || t === 12310 || t === 12311 || t === 12312 || t === 12313 || t === 12314 || t === 12315 || t === 12316 || t === 12317 || t >= 12318 && t <= 12319 || t === 12320 || t === 12336 || t === 64830 || t === 64831 || t >= 65093 && t <= 65094;
}
function _a(t) {
  t.forEach(function(e) {
    if (delete e.location, If(e) || Lf(e))
      for (var n in e.options)
        delete e.options[n].location, _a(e.options[n].value);
    else
      zf(e) && Pf(e.style) || (Rf(e) || Of(e)) && ha(e.style) ? delete e.style.location : Hf(e) && _a(e.children);
  });
}
function O2(t, e) {
  e === void 0 && (e = {}), e = ot({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, e);
  var n = new B2(t, e).parse();
  if (n.err) {
    var r = SyntaxError(Ze[n.err.kind]);
    throw r.location = n.err.location, r.originalMessage = n.err.message, r;
  }
  return e != null && e.captureLocation || _a(n.val), n.val;
}
function ql(t, e) {
  var n = e && e.cache ? e.cache : U2, r = e && e.serializer ? e.serializer : q2, l = e && e.strategy ? e.strategy : L2;
  return l(t, {
    cache: n,
    serializer: r
  });
}
function I2(t) {
  return t == null || typeof t == "number" || typeof t == "boolean";
}
function Yf(t, e, n, r) {
  var l = I2(r) ? r : n(r), o = e.get(l);
  return typeof o > "u" && (o = t.call(this, r), e.set(l, o)), o;
}
function Zf(t, e, n) {
  var r = Array.prototype.slice.call(arguments, 3), l = n(r), o = e.get(l);
  return typeof o > "u" && (o = t.apply(this, r), e.set(l, o)), o;
}
function Wa(t, e, n, r, l) {
  return n.bind(e, t, r, l);
}
function L2(t, e) {
  var n = t.length === 1 ? Yf : Zf;
  return Wa(t, this, n, e.cache.create(), e.serializer);
}
function H2(t, e) {
  return Wa(t, this, Zf, e.cache.create(), e.serializer);
}
function P2(t, e) {
  return Wa(t, this, Yf, e.cache.create(), e.serializer);
}
var q2 = function() {
  return JSON.stringify(arguments);
};
function Xa() {
  this.cache = /* @__PURE__ */ Object.create(null);
}
Xa.prototype.get = function(t) {
  return this.cache[t];
};
Xa.prototype.set = function(t, e) {
  this.cache[t] = e;
};
var U2 = {
  create: function() {
    return new Xa();
  }
}, Ul = {
  variadic: H2,
  monadic: P2
}, Ar;
(function(t) {
  t.MISSING_VALUE = "MISSING_VALUE", t.INVALID_VALUE = "INVALID_VALUE", t.MISSING_INTL_API = "MISSING_INTL_API";
})(Ar || (Ar = {}));
var ji = (
  /** @class */
  function(t) {
    Gi(e, t);
    function e(n, r, l) {
      var o = t.call(this, n) || this;
      return o.code = r, o.originalMessage = l, o;
    }
    return e.prototype.toString = function() {
      return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
    }, e;
  }(Error)
), ec = (
  /** @class */
  function(t) {
    Gi(e, t);
    function e(n, r, l, o) {
      return t.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(l).join('", "'), '"'), Ar.INVALID_VALUE, o) || this;
    }
    return e;
  }(ji)
), G2 = (
  /** @class */
  function(t) {
    Gi(e, t);
    function e(n, r, l) {
      return t.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), Ar.INVALID_VALUE, l) || this;
    }
    return e;
  }(ji)
), j2 = (
  /** @class */
  function(t) {
    Gi(e, t);
    function e(n, r) {
      return t.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), Ar.MISSING_VALUE, r) || this;
    }
    return e;
  }(ji)
), $t;
(function(t) {
  t[t.literal = 0] = "literal", t[t.object = 1] = "object";
})($t || ($t = {}));
function V2(t) {
  return t.length < 2 ? t : t.reduce(function(e, n) {
    var r = e[e.length - 1];
    return !r || r.type !== $t.literal || n.type !== $t.literal ? e.push(n) : r.value += n.value, e;
  }, []);
}
function W2(t) {
  return typeof t == "function";
}
function fi(t, e, n, r, l, o, u) {
  if (t.length === 1 && Xu(t[0]))
    return [
      {
        type: $t.literal,
        value: t[0].value
      }
    ];
  for (var c = [], h = 0, p = t; h < p.length; h++) {
    var _ = p[h];
    if (Xu(_)) {
      c.push({
        type: $t.literal,
        value: _.value
      });
      continue;
    }
    if (o2(_)) {
      typeof o == "number" && c.push({
        type: $t.literal,
        value: n.getNumberFormat(e).format(o)
      });
      continue;
    }
    var v = _.value;
    if (!(l && v in l))
      throw new j2(v, u);
    var k = l[v];
    if (a2(_)) {
      (!k || typeof k == "string" || typeof k == "number") && (k = typeof k == "string" || typeof k == "number" ? String(k) : ""), c.push({
        type: typeof k == "string" ? $t.literal : $t.object,
        value: k
      });
      continue;
    }
    if (Rf(_)) {
      var E = typeof _.style == "string" ? r.date[_.style] : ha(_.style) ? _.style.parsedOptions : void 0;
      c.push({
        type: $t.literal,
        value: n.getDateTimeFormat(e, E).format(k)
      });
      continue;
    }
    if (Of(_)) {
      var E = typeof _.style == "string" ? r.time[_.style] : ha(_.style) ? _.style.parsedOptions : r.time.medium;
      c.push({
        type: $t.literal,
        value: n.getDateTimeFormat(e, E).format(k)
      });
      continue;
    }
    if (zf(_)) {
      var E = typeof _.style == "string" ? r.number[_.style] : Pf(_.style) ? _.style.parsedOptions : void 0;
      E && E.scale && (k = k * (E.scale || 1)), c.push({
        type: $t.literal,
        value: n.getNumberFormat(e, E).format(k)
      });
      continue;
    }
    if (Hf(_)) {
      var z = _.children, H = _.value, U = l[H];
      if (!W2(U))
        throw new G2(H, "function", u);
      var N = fi(z, e, n, r, l, o), M = U(N.map(function(C) {
        return C.value;
      }));
      Array.isArray(M) || (M = [M]), c.push.apply(c, M.map(function(C) {
        return {
          type: typeof C == "string" ? $t.literal : $t.object,
          value: C
        };
      }));
    }
    if (If(_)) {
      var A = _.options[k] || _.options.other;
      if (!A)
        throw new ec(_.value, k, Object.keys(_.options), u);
      c.push.apply(c, fi(A.value, e, n, r, l));
      continue;
    }
    if (Lf(_)) {
      var A = _.options["=".concat(k)];
      if (!A) {
        if (!Intl.PluralRules)
          throw new ji(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`, Ar.MISSING_INTL_API, u);
        var x = n.getPluralRules(e, { type: _.pluralType }).select(k - (_.offset || 0));
        A = _.options[x] || _.options.other;
      }
      if (!A)
        throw new ec(_.value, k, Object.keys(_.options), u);
      c.push.apply(c, fi(A.value, e, n, r, l, k - (_.offset || 0)));
      continue;
    }
  }
  return V2(c);
}
function X2(t, e) {
  return e ? ot(ot(ot({}, t || {}), e || {}), Object.keys(t).reduce(function(n, r) {
    return n[r] = ot(ot({}, t[r]), e[r] || {}), n;
  }, {})) : t;
}
function Y2(t, e) {
  return e ? Object.keys(t).reduce(function(n, r) {
    return n[r] = X2(t[r], e[r]), n;
  }, ot({}, t)) : t;
}
function Gl(t) {
  return {
    create: function() {
      return {
        get: function(e) {
          return t[e];
        },
        set: function(e, n) {
          t[e] = n;
        }
      };
    }
  };
}
function Z2(t) {
  return t === void 0 && (t = {
    number: {},
    dateTime: {},
    pluralRules: {}
  }), {
    getNumberFormat: ql(function() {
      for (var e, n = [], r = 0; r < arguments.length; r++)
        n[r] = arguments[r];
      return new ((e = Intl.NumberFormat).bind.apply(e, Hl([void 0], n, !1)))();
    }, {
      cache: Gl(t.number),
      strategy: Ul.variadic
    }),
    getDateTimeFormat: ql(function() {
      for (var e, n = [], r = 0; r < arguments.length; r++)
        n[r] = arguments[r];
      return new ((e = Intl.DateTimeFormat).bind.apply(e, Hl([void 0], n, !1)))();
    }, {
      cache: Gl(t.dateTime),
      strategy: Ul.variadic
    }),
    getPluralRules: ql(function() {
      for (var e, n = [], r = 0; r < arguments.length; r++)
        n[r] = arguments[r];
      return new ((e = Intl.PluralRules).bind.apply(e, Hl([void 0], n, !1)))();
    }, {
      cache: Gl(t.pluralRules),
      strategy: Ul.variadic
    })
  };
}
var J2 = (
  /** @class */
  function() {
    function t(e, n, r, l) {
      var o = this;
      if (n === void 0 && (n = t.defaultLocale), this.formatterCache = {
        number: {},
        dateTime: {},
        pluralRules: {}
      }, this.format = function(u) {
        var c = o.formatToParts(u);
        if (c.length === 1)
          return c[0].value;
        var h = c.reduce(function(p, _) {
          return !p.length || _.type !== $t.literal || typeof p[p.length - 1] != "string" ? p.push(_.value) : p[p.length - 1] += _.value, p;
        }, []);
        return h.length <= 1 ? h[0] || "" : h;
      }, this.formatToParts = function(u) {
        return fi(o.ast, o.locales, o.formatters, o.formats, u, void 0, o.message);
      }, this.resolvedOptions = function() {
        return {
          locale: o.resolvedLocale.toString()
        };
      }, this.getAst = function() {
        return o.ast;
      }, this.locales = n, this.resolvedLocale = t.resolveLocale(n), typeof e == "string") {
        if (this.message = e, !t.__parse)
          throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
        this.ast = t.__parse(e, {
          ignoreTag: l == null ? void 0 : l.ignoreTag,
          locale: this.resolvedLocale
        });
      } else
        this.ast = e;
      if (!Array.isArray(this.ast))
        throw new TypeError("A message must be provided as a String or AST.");
      this.formats = Y2(t.formats, r), this.formatters = l && l.formatters || Z2(this.formatterCache);
    }
    return Object.defineProperty(t, "defaultLocale", {
      get: function() {
        return t.memoizedDefaultLocale || (t.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), t.memoizedDefaultLocale;
      },
      enumerable: !1,
      configurable: !0
    }), t.memoizedDefaultLocale = null, t.resolveLocale = function(e) {
      var n = Intl.NumberFormat.supportedLocalesOf(e);
      return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof e == "string" ? e : e[0]);
    }, t.__parse = O2, t.formats = {
      number: {
        integer: {
          maximumFractionDigits: 0
        },
        currency: {
          style: "currency"
        },
        percent: {
          style: "percent"
        }
      },
      date: {
        short: {
          month: "numeric",
          day: "numeric",
          year: "2-digit"
        },
        medium: {
          month: "short",
          day: "numeric",
          year: "numeric"
        },
        long: {
          month: "long",
          day: "numeric",
          year: "numeric"
        },
        full: {
          weekday: "long",
          month: "long",
          day: "numeric",
          year: "numeric"
        }
      },
      time: {
        short: {
          hour: "numeric",
          minute: "numeric"
        },
        medium: {
          hour: "numeric",
          minute: "numeric",
          second: "numeric"
        },
        long: {
          hour: "numeric",
          minute: "numeric",
          second: "numeric",
          timeZoneName: "short"
        },
        full: {
          hour: "numeric",
          minute: "numeric",
          second: "numeric",
          timeZoneName: "short"
        }
      }
    }, t;
  }()
);
function Q2(t, e) {
  if (e == null)
    return;
  if (e in t)
    return t[e];
  const n = e.split(".");
  let r = t;
  for (let l = 0; l < n.length; l++)
    if (typeof r == "object") {
      if (l > 0) {
        const o = n.slice(l, n.length).join(".");
        if (o in r) {
          r = r[o];
          break;
        }
      }
      r = r[n[l]];
    } else
      r = void 0;
  return r;
}
const k0 = {}, K2 = (t, e, n) => n && (e in k0 || (k0[e] = {}), t in k0[e] || (k0[e][t] = n), n), Jf = (t, e) => {
  if (e == null)
    return;
  if (e in k0 && t in k0[e])
    return k0[e][t];
  const n = Vi(e);
  for (let r = 0; r < n.length; r++) {
    const l = n[r], o = e3(l, t);
    if (o)
      return K2(t, e, o);
  }
};
let Ya;
const gs = ps({});
function $2(t) {
  return Ya[t] || null;
}
function Qf(t) {
  return t in Ya;
}
function e3(t, e) {
  if (!Qf(t))
    return null;
  const n = $2(t);
  return Q2(n, e);
}
function t3(t) {
  if (t == null)
    return;
  const e = Vi(t);
  for (let n = 0; n < e.length; n++) {
    const r = e[n];
    if (Qf(r))
      return r;
  }
}
function n3(t, ...e) {
  delete k0[t], gs.update((n) => (n[t] = l2.all([n[t] || {}, ...e]), n));
}
Tr(
  [gs],
  ([t]) => Object.keys(t)
);
gs.subscribe((t) => Ya = t);
const hi = {};
function r3(t, e) {
  hi[t].delete(e), hi[t].size === 0 && delete hi[t];
}
function Kf(t) {
  return hi[t];
}
function s3(t) {
  return Vi(t).map((e) => {
    const n = Kf(e);
    return [e, n ? [...n] : []];
  }).filter(([, e]) => e.length > 0);
}
function ba(t) {
  return t == null ? !1 : Vi(t).some(
    (e) => {
      var n;
      return (n = Kf(e)) == null ? void 0 : n.size;
    }
  );
}
function i3(t, e) {
  return Promise.all(
    e.map((r) => (r3(t, r), r().then((l) => l.default || l)))
  ).then((r) => n3(t, ...r));
}
const Hr = {};
function $f(t) {
  if (!ba(t))
    return t in Hr ? Hr[t] : Promise.resolve();
  const e = s3(t);
  return Hr[t] = Promise.all(
    e.map(
      ([n, r]) => i3(n, r)
    )
  ).then(() => {
    if (ba(t))
      return $f(t);
    delete Hr[t];
  }), Hr[t];
}
const l3 = {
  number: {
    scientific: { notation: "scientific" },
    engineering: { notation: "engineering" },
    compactLong: { notation: "compact", compactDisplay: "long" },
    compactShort: { notation: "compact", compactDisplay: "short" }
  },
  date: {
    short: { month: "numeric", day: "numeric", year: "2-digit" },
    medium: { month: "short", day: "numeric", year: "numeric" },
    long: { month: "long", day: "numeric", year: "numeric" },
    full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
  },
  time: {
    short: { hour: "numeric", minute: "numeric" },
    medium: { hour: "numeric", minute: "numeric", second: "numeric" },
    long: {
      hour: "numeric",
      minute: "numeric",
      second: "numeric",
      timeZoneName: "short"
    },
    full: {
      hour: "numeric",
      minute: "numeric",
      second: "numeric",
      timeZoneName: "short"
    }
  }
}, a3 = {
  fallbackLocale: null,
  loadingDelay: 200,
  formats: l3,
  warnOnMissingMessages: !0,
  handleMissingMessage: void 0,
  ignoreTag: !0
}, o3 = a3;
function Sr() {
  return o3;
}
const jl = ps(!1);
var u3 = Object.defineProperty, c3 = Object.defineProperties, f3 = Object.getOwnPropertyDescriptors, tc = Object.getOwnPropertySymbols, h3 = Object.prototype.hasOwnProperty, d3 = Object.prototype.propertyIsEnumerable, nc = (t, e, n) => e in t ? u3(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, m3 = (t, e) => {
  for (var n in e || (e = {}))
    h3.call(e, n) && nc(t, n, e[n]);
  if (tc)
    for (var n of tc(e))
      d3.call(e, n) && nc(t, n, e[n]);
  return t;
}, p3 = (t, e) => c3(t, f3(e));
let wa;
const vi = ps(null);
function rc(t) {
  return t.split("-").map((e, n, r) => r.slice(0, n + 1).join("-")).reverse();
}
function Vi(t, e = Sr().fallbackLocale) {
  const n = rc(t);
  return e ? [.../* @__PURE__ */ new Set([...n, ...rc(e)])] : n;
}
function K0() {
  return wa ?? void 0;
}
vi.subscribe((t) => {
  wa = t ?? void 0, typeof window < "u" && t != null && document.documentElement.setAttribute("lang", t);
});
const g3 = (t) => {
  if (t && t3(t) && ba(t)) {
    const { loadingDelay: e } = Sr();
    let n;
    return typeof window < "u" && K0() != null && e ? n = window.setTimeout(
      () => jl.set(!0),
      e
    ) : jl.set(!0), $f(t).then(() => {
      vi.set(t);
    }).finally(() => {
      clearTimeout(n), jl.set(!1);
    });
  }
  return vi.set(t);
}, _s = p3(m3({}, vi), {
  set: g3
}), Wi = (t) => {
  const e = /* @__PURE__ */ Object.create(null);
  return (r) => {
    const l = JSON.stringify(r);
    return l in e ? e[l] : e[l] = t(r);
  };
};
var _3 = Object.defineProperty, ki = Object.getOwnPropertySymbols, eh = Object.prototype.hasOwnProperty, th = Object.prototype.propertyIsEnumerable, sc = (t, e, n) => e in t ? _3(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Za = (t, e) => {
  for (var n in e || (e = {}))
    eh.call(e, n) && sc(t, n, e[n]);
  if (ki)
    for (var n of ki(e))
      th.call(e, n) && sc(t, n, e[n]);
  return t;
}, Fr = (t, e) => {
  var n = {};
  for (var r in t)
    eh.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && ki)
    for (var r of ki(t))
      e.indexOf(r) < 0 && th.call(t, r) && (n[r] = t[r]);
  return n;
};
const ls = (t, e) => {
  const { formats: n } = Sr();
  if (t in n && e in n[t])
    return n[t][e];
  throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`);
}, b3 = Wi(
  (t) => {
    var e = t, { locale: n, format: r } = e, l = Fr(e, ["locale", "format"]);
    if (n == null)
      throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
    return r && (l = ls("number", r)), new Intl.NumberFormat(n, l);
  }
), w3 = Wi(
  (t) => {
    var e = t, { locale: n, format: r } = e, l = Fr(e, ["locale", "format"]);
    if (n == null)
      throw new Error('[svelte-i18n] A "locale" must be set to format dates');
    return r ? l = ls("date", r) : Object.keys(l).length === 0 && (l = ls("date", "short")), new Intl.DateTimeFormat(n, l);
  }
), y3 = Wi(
  (t) => {
    var e = t, { locale: n, format: r } = e, l = Fr(e, ["locale", "format"]);
    if (n == null)
      throw new Error(
        '[svelte-i18n] A "locale" must be set to format time values'
      );
    return r ? l = ls("time", r) : Object.keys(l).length === 0 && (l = ls("time", "short")), new Intl.DateTimeFormat(n, l);
  }
), v3 = (t = {}) => {
  var e = t, {
    locale: n = K0()
  } = e, r = Fr(e, [
    "locale"
  ]);
  return b3(Za({ locale: n }, r));
}, k3 = (t = {}) => {
  var e = t, {
    locale: n = K0()
  } = e, r = Fr(e, [
    "locale"
  ]);
  return w3(Za({ locale: n }, r));
}, D3 = (t = {}) => {
  var e = t, {
    locale: n = K0()
  } = e, r = Fr(e, [
    "locale"
  ]);
  return y3(Za({ locale: n }, r));
}, A3 = Wi(
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  (t, e = K0()) => new J2(t, e, Sr().formats, {
    ignoreTag: Sr().ignoreTag
  })
), S3 = (t, e = {}) => {
  var n, r, l, o;
  let u = e;
  typeof t == "object" && (u = t, t = u.id);
  const {
    values: c,
    locale: h = K0(),
    default: p
  } = u;
  if (h == null)
    throw new Error(
      "[svelte-i18n] Cannot format a message without first setting the initial locale."
    );
  let _ = Jf(t, h);
  if (!_)
    _ = (o = (l = (r = (n = Sr()).handleMissingMessage) == null ? void 0 : r.call(n, { locale: h, id: t, defaultValue: p })) != null ? l : p) != null ? o : t;
  else if (typeof _ != "string")
    return console.warn(
      `[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof _}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
    ), _;
  if (!c)
    return _;
  let v = _;
  try {
    v = A3(_, h).format(c);
  } catch (k) {
    k instanceof Error && console.warn(
      `[svelte-i18n] Message "${t}" has syntax error:`,
      k.message
    );
  }
  return v;
}, E3 = (t, e) => D3(e).format(t), x3 = (t, e) => k3(e).format(t), T3 = (t, e) => v3(e).format(t), F3 = (t, e = K0()) => Jf(t, e);
Tr([_s, gs], () => S3);
Tr([_s], () => E3);
Tr([_s], () => x3);
Tr([_s], () => T3);
Tr([_s, gs], () => F3);
const {
  SvelteComponent: C3,
  append: cn,
  attr: V0,
  detach: nh,
  element: W0,
  init: M3,
  insert: rh,
  noop: ic,
  safe_not_equal: B3,
  set_data: Di,
  set_style: Vl,
  space: ya,
  text: pr,
  toggle_class: lc
} = window.__gradio__svelte__internal, { onMount: N3, createEventDispatcher: z3, getContext: R3 } = window.__gradio__svelte__internal;
function ac(t) {
  let e, n, r, l, o = Zr(
    /*file_to_display*/
    t[2]
  ) + "", u, c, h, p, _ = (
    /*file_to_display*/
    t[2].orig_name + ""
  ), v;
  return {
    c() {
      e = W0("div"), n = W0("span"), r = W0("div"), l = W0("progress"), u = pr(o), h = ya(), p = W0("span"), v = pr(_), Vl(l, "visibility", "hidden"), Vl(l, "height", "0"), Vl(l, "width", "0"), l.value = c = Zr(
        /*file_to_display*/
        t[2]
      ), V0(l, "max", "100"), V0(l, "class", "svelte-cr2edf"), V0(r, "class", "progress-bar svelte-cr2edf"), V0(p, "class", "file-name svelte-cr2edf"), V0(e, "class", "file svelte-cr2edf");
    },
    m(k, E) {
      rh(k, e, E), cn(e, n), cn(n, r), cn(r, l), cn(l, u), cn(e, h), cn(e, p), cn(p, v);
    },
    p(k, E) {
      E & /*file_to_display*/
      4 && o !== (o = Zr(
        /*file_to_display*/
        k[2]
      ) + "") && Di(u, o), E & /*file_to_display*/
      4 && c !== (c = Zr(
        /*file_to_display*/
        k[2]
      )) && (l.value = c), E & /*file_to_display*/
      4 && _ !== (_ = /*file_to_display*/
      k[2].orig_name + "") && Di(v, _);
    },
    d(k) {
      k && nh(e);
    }
  };
}
function O3(t) {
  let e, n, r, l = (
    /*files_with_progress*/
    t[0].length + ""
  ), o, u, c = (
    /*files_with_progress*/
    t[0].length > 1 ? "files" : "file"
  ), h, p, _, v = (
    /*file_to_display*/
    t[2] && ac(t)
  );
  return {
    c() {
      e = W0("div"), n = W0("span"), r = pr("Uploading "), o = pr(l), u = ya(), h = pr(c), p = pr("..."), _ = ya(), v && v.c(), V0(n, "class", "uploading svelte-cr2edf"), V0(e, "class", "wrap svelte-cr2edf"), lc(
        e,
        "progress",
        /*progress*/
        t[1]
      );
    },
    m(k, E) {
      rh(k, e, E), cn(e, n), cn(n, r), cn(n, o), cn(n, u), cn(n, h), cn(n, p), cn(e, _), v && v.m(e, null);
    },
    p(k, [E]) {
      E & /*files_with_progress*/
      1 && l !== (l = /*files_with_progress*/
      k[0].length + "") && Di(o, l), E & /*files_with_progress*/
      1 && c !== (c = /*files_with_progress*/
      k[0].length > 1 ? "files" : "file") && Di(h, c), /*file_to_display*/
      k[2] ? v ? v.p(k, E) : (v = ac(k), v.c(), v.m(e, null)) : v && (v.d(1), v = null), E & /*progress*/
      2 && lc(
        e,
        "progress",
        /*progress*/
        k[1]
      );
    },
    i: ic,
    o: ic,
    d(k) {
      k && nh(e), v && v.d();
    }
  };
}
function Zr(t) {
  return t.progress * 100 / (t.size || 0) || 0;
}
function I3(t) {
  let e = 0;
  return t.forEach((n) => {
    e += Zr(n);
  }), document.documentElement.style.setProperty("--upload-progress-width", (e / t.length).toFixed(2) + "%"), e / t.length;
}
function L3(t, e, n) {
  let { upload_id: r } = e, { root: l } = e, { files: o } = e, u, c = !1, h, p, _ = o.map((z) => ({ ...z, progress: 0 }));
  const v = z3();
  function k(z, H) {
    n(0, _ = _.map((U) => (U.orig_name === z && (U.progress += H), U)));
  }
  const E = R3("EventSource_factory");
  return N3(() => {
    u = E(new URL(`${l}/upload_progress?upload_id=${r}`)), u.onmessage = async function(z) {
      const H = JSON.parse(z.data);
      c || n(1, c = !0), H.msg === "done" ? (u.close(), v("done")) : (n(6, h = H), k(H.orig_name, H.chunk_size));
    };
  }), t.$$set = (z) => {
    "upload_id" in z && n(3, r = z.upload_id), "root" in z && n(4, l = z.root), "files" in z && n(5, o = z.files);
  }, t.$$.update = () => {
    t.$$.dirty & /*files_with_progress*/
    1 && I3(_), t.$$.dirty & /*current_file_upload, files_with_progress*/
    65 && n(2, p = h || _[0]);
  }, [
    _,
    c,
    p,
    r,
    l,
    o,
    h
  ];
}
class H3 extends C3 {
  constructor(e) {
    super(), M3(this, e, L3, O3, B3, { upload_id: 3, root: 4, files: 5 });
  }
}
const {
  SvelteComponent: P3,
  append: oc,
  attr: Xt,
  binding_callbacks: q3,
  bubble: P0,
  check_outros: sh,
  create_component: U3,
  create_slot: ih,
  destroy_component: G3,
  detach: Xi,
  element: va,
  empty: lh,
  get_all_dirty_from_scope: ah,
  get_slot_changes: oh,
  group_outros: uh,
  init: j3,
  insert: Yi,
  listen: gn,
  mount_component: V3,
  prevent_default: q0,
  run_all: W3,
  safe_not_equal: X3,
  set_style: ch,
  space: Y3,
  stop_propagation: U0,
  toggle_class: Ut,
  transition_in: E0,
  transition_out: J0,
  update_slot_base: fh
} = window.__gradio__svelte__internal, { createEventDispatcher: Z3, tick: J3, getContext: Q3 } = window.__gradio__svelte__internal;
function K3(t) {
  let e, n, r, l, o, u, c, h, p, _, v;
  const k = (
    /*#slots*/
    t[22].default
  ), E = ih(
    k,
    t,
    /*$$scope*/
    t[21],
    null
  );
  return {
    c() {
      e = va("button"), E && E.c(), n = Y3(), r = va("input"), Xt(r, "aria-label", "file upload"), Xt(r, "data-testid", "file-upload"), Xt(r, "type", "file"), Xt(r, "accept", l = /*accept_file_types*/
      t[14] || void 0), r.multiple = o = /*file_count*/
      t[6] === "multiple" || void 0, Xt(r, "webkitdirectory", u = /*file_count*/
      t[6] === "directory" || void 0), Xt(r, "mozdirectory", c = /*file_count*/
      t[6] === "directory" || void 0), Xt(r, "class", "svelte-1s26xmt"), Xt(e, "tabindex", h = /*hidden*/
      t[9] ? -1 : 0), Xt(e, "class", "svelte-1s26xmt"), Ut(
        e,
        "hidden",
        /*hidden*/
        t[9]
      ), Ut(
        e,
        "center",
        /*center*/
        t[4]
      ), Ut(
        e,
        "boundedheight",
        /*boundedheight*/
        t[3]
      ), Ut(
        e,
        "flex",
        /*flex*/
        t[5]
      ), Ut(
        e,
        "disable_click",
        /*disable_click*/
        t[7]
      ), ch(e, "height", "100%");
    },
    m(z, H) {
      Yi(z, e, H), E && E.m(e, null), oc(e, n), oc(e, r), t[30](r), p = !0, _ || (v = [
        gn(
          r,
          "change",
          /*load_files_from_upload*/
          t[16]
        ),
        gn(e, "drag", U0(q0(
          /*drag_handler*/
          t[23]
        ))),
        gn(e, "dragstart", U0(q0(
          /*dragstart_handler*/
          t[24]
        ))),
        gn(e, "dragend", U0(q0(
          /*dragend_handler*/
          t[25]
        ))),
        gn(e, "dragover", U0(q0(
          /*dragover_handler*/
          t[26]
        ))),
        gn(e, "dragenter", U0(q0(
          /*dragenter_handler*/
          t[27]
        ))),
        gn(e, "dragleave", U0(q0(
          /*dragleave_handler*/
          t[28]
        ))),
        gn(e, "drop", U0(q0(
          /*drop_handler*/
          t[29]
        ))),
        gn(
          e,
          "click",
          /*open_file_upload*/
          t[11]
        ),
        gn(
          e,
          "drop",
          /*loadFilesFromDrop*/
          t[17]
        ),
        gn(
          e,
          "dragenter",
          /*updateDragging*/
          t[15]
        ),
        gn(
          e,
          "dragleave",
          /*updateDragging*/
          t[15]
        )
      ], _ = !0);
    },
    p(z, H) {
      E && E.p && (!p || H[0] & /*$$scope*/
      2097152) && fh(
        E,
        k,
        z,
        /*$$scope*/
        z[21],
        p ? oh(
          k,
          /*$$scope*/
          z[21],
          H,
          null
        ) : ah(
          /*$$scope*/
          z[21]
        ),
        null
      ), (!p || H[0] & /*accept_file_types*/
      16384 && l !== (l = /*accept_file_types*/
      z[14] || void 0)) && Xt(r, "accept", l), (!p || H[0] & /*file_count*/
      64 && o !== (o = /*file_count*/
      z[6] === "multiple" || void 0)) && (r.multiple = o), (!p || H[0] & /*file_count*/
      64 && u !== (u = /*file_count*/
      z[6] === "directory" || void 0)) && Xt(r, "webkitdirectory", u), (!p || H[0] & /*file_count*/
      64 && c !== (c = /*file_count*/
      z[6] === "directory" || void 0)) && Xt(r, "mozdirectory", c), (!p || H[0] & /*hidden*/
      512 && h !== (h = /*hidden*/
      z[9] ? -1 : 0)) && Xt(e, "tabindex", h), (!p || H[0] & /*hidden*/
      512) && Ut(
        e,
        "hidden",
        /*hidden*/
        z[9]
      ), (!p || H[0] & /*center*/
      16) && Ut(
        e,
        "center",
        /*center*/
        z[4]
      ), (!p || H[0] & /*boundedheight*/
      8) && Ut(
        e,
        "boundedheight",
        /*boundedheight*/
        z[3]
      ), (!p || H[0] & /*flex*/
      32) && Ut(
        e,
        "flex",
        /*flex*/
        z[5]
      ), (!p || H[0] & /*disable_click*/
      128) && Ut(
        e,
        "disable_click",
        /*disable_click*/
        z[7]
      );
    },
    i(z) {
      p || (E0(E, z), p = !0);
    },
    o(z) {
      J0(E, z), p = !1;
    },
    d(z) {
      z && Xi(e), E && E.d(z), t[30](null), _ = !1, W3(v);
    }
  };
}
function $3(t) {
  let e, n, r = !/*hidden*/
  t[9] && uc(t);
  return {
    c() {
      r && r.c(), e = lh();
    },
    m(l, o) {
      r && r.m(l, o), Yi(l, e, o), n = !0;
    },
    p(l, o) {
      /*hidden*/
      l[9] ? r && (uh(), J0(r, 1, 1, () => {
        r = null;
      }), sh()) : r ? (r.p(l, o), o[0] & /*hidden*/
      512 && E0(r, 1)) : (r = uc(l), r.c(), E0(r, 1), r.m(e.parentNode, e));
    },
    i(l) {
      n || (E0(r), n = !0);
    },
    o(l) {
      J0(r), n = !1;
    },
    d(l) {
      l && Xi(e), r && r.d(l);
    }
  };
}
function ep(t) {
  let e, n, r, l, o;
  const u = (
    /*#slots*/
    t[22].default
  ), c = ih(
    u,
    t,
    /*$$scope*/
    t[21],
    null
  );
  return {
    c() {
      e = va("button"), c && c.c(), Xt(e, "tabindex", n = /*hidden*/
      t[9] ? -1 : 0), Xt(e, "class", "svelte-1s26xmt"), Ut(
        e,
        "hidden",
        /*hidden*/
        t[9]
      ), Ut(
        e,
        "center",
        /*center*/
        t[4]
      ), Ut(
        e,
        "boundedheight",
        /*boundedheight*/
        t[3]
      ), Ut(
        e,
        "flex",
        /*flex*/
        t[5]
      ), ch(e, "height", "100%");
    },
    m(h, p) {
      Yi(h, e, p), c && c.m(e, null), r = !0, l || (o = gn(
        e,
        "click",
        /*paste_clipboard*/
        t[10]
      ), l = !0);
    },
    p(h, p) {
      c && c.p && (!r || p[0] & /*$$scope*/
      2097152) && fh(
        c,
        u,
        h,
        /*$$scope*/
        h[21],
        r ? oh(
          u,
          /*$$scope*/
          h[21],
          p,
          null
        ) : ah(
          /*$$scope*/
          h[21]
        ),
        null
      ), (!r || p[0] & /*hidden*/
      512 && n !== (n = /*hidden*/
      h[9] ? -1 : 0)) && Xt(e, "tabindex", n), (!r || p[0] & /*hidden*/
      512) && Ut(
        e,
        "hidden",
        /*hidden*/
        h[9]
      ), (!r || p[0] & /*center*/
      16) && Ut(
        e,
        "center",
        /*center*/
        h[4]
      ), (!r || p[0] & /*boundedheight*/
      8) && Ut(
        e,
        "boundedheight",
        /*boundedheight*/
        h[3]
      ), (!r || p[0] & /*flex*/
      32) && Ut(
        e,
        "flex",
        /*flex*/
        h[5]
      );
    },
    i(h) {
      r || (E0(c, h), r = !0);
    },
    o(h) {
      J0(c, h), r = !1;
    },
    d(h) {
      h && Xi(e), c && c.d(h), l = !1, o();
    }
  };
}
function uc(t) {
  let e, n;
  return e = new H3({
    props: {
      root: (
        /*root*/
        t[8]
      ),
      upload_id: (
        /*upload_id*/
        t[12]
      ),
      files: (
        /*file_data*/
        t[13]
      )
    }
  }), {
    c() {
      U3(e.$$.fragment);
    },
    m(r, l) {
      V3(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*root*/
      256 && (o.root = /*root*/
      r[8]), l[0] & /*upload_id*/
      4096 && (o.upload_id = /*upload_id*/
      r[12]), l[0] & /*file_data*/
      8192 && (o.files = /*file_data*/
      r[13]), e.$set(o);
    },
    i(r) {
      n || (E0(e.$$.fragment, r), n = !0);
    },
    o(r) {
      J0(e.$$.fragment, r), n = !1;
    },
    d(r) {
      G3(e, r);
    }
  };
}
function tp(t) {
  let e, n, r, l;
  const o = [ep, $3, K3], u = [];
  function c(h, p) {
    return (
      /*filetype*/
      h[0] === "clipboard" ? 0 : (
        /*uploading*/
        h[1] && !/*hidden_upload*/
        h[2] ? 1 : 2
      )
    );
  }
  return e = c(t), n = u[e] = o[e](t), {
    c() {
      n.c(), r = lh();
    },
    m(h, p) {
      u[e].m(h, p), Yi(h, r, p), l = !0;
    },
    p(h, p) {
      let _ = e;
      e = c(h), e === _ ? u[e].p(h, p) : (uh(), J0(u[_], 1, 1, () => {
        u[_] = null;
      }), sh(), n = u[e], n ? n.p(h, p) : (n = u[e] = o[e](h), n.c()), E0(n, 1), n.m(r.parentNode, r));
    },
    i(h) {
      l || (E0(n), l = !0);
    },
    o(h) {
      J0(n), l = !1;
    },
    d(h) {
      h && Xi(r), u[e].d(h);
    }
  };
}
function cc(t) {
  let e, n = t[0], r = 1;
  for (; r < t.length; ) {
    const l = t[r], o = t[r + 1];
    if (r += 2, (l === "optionalAccess" || l === "optionalCall") && n == null)
      return;
    l === "access" || l === "optionalAccess" ? (e = n, n = o(n)) : (l === "call" || l === "optionalCall") && (n = o((...u) => n.call(e, ...u)), e = void 0);
  }
  return n;
}
function np(t, e, n) {
  if (!t || t === "*" || t === "file/*" || Array.isArray(t) && t.some((l) => l === "*" || l === "file/*"))
    return !0;
  let r;
  if (typeof t == "string")
    r = t.split(",").map((l) => l.trim());
  else if (Array.isArray(t))
    r = t;
  else
    return !1;
  return r.includes(e) || r.some((l) => {
    const [o] = l.split("/").map((u) => u.trim());
    return l.endsWith("/*") && n.startsWith(o + "/");
  });
}
function rp(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { filetype: o = null } = e, { dragging: u = !1 } = e, { boundedheight: c = !0 } = e, { center: h = !0 } = e, { flex: p = !0 } = e, { file_count: _ = "single" } = e, { disable_click: v = !1 } = e, { root: k } = e, { hidden: E = !1 } = e, { format: z = "file" } = e, { uploading: H = !1 } = e, { hidden_upload: U = null } = e, N, M, A;
  const x = Q3("upload_files"), C = Z3(), O = ["image", "video", "audio", "text", "file"], q = (V) => V.startsWith(".") || V.endsWith("/*") ? V : O.includes(V) ? V + "/*" : "." + V;
  function R() {
    n(18, u = !u);
  }
  function J() {
    navigator.clipboard.read().then(async (V) => {
      for (let $ = 0; $ < V.length; $++) {
        const we = V[$].types.find((ye) => ye.startsWith("image/"));
        if (we) {
          V[$].getType(we).then(async (ye) => {
            const K = new File([ye], `clipboard.${we.replace("image/", "")}`);
            await te([K]);
          });
          break;
        }
      }
    });
  }
  function ne() {
    v || U && (n(2, U.value = "", U), U.click());
  }
  async function ie(V) {
    await J3(), n(12, N = Math.random().toString(36).substring(2, 15)), n(1, H = !0);
    const $ = await Mm(V, k, N, x);
    return C("load", _ === "single" ? cc([$, "optionalAccess", (we) => we[0]]) : $), n(1, H = !1), $ || [];
  }
  async function te(V) {
    if (!V.length)
      return;
    let $ = V.map((we) => new File([we], we.name, { type: we.type }));
    return n(13, M = await Bm($)), await ie(M);
  }
  async function Se(V) {
    const $ = V.target;
    if ($.files)
      if (z != "blob")
        await te(Array.from($.files));
      else {
        if (_ === "single") {
          C("load", $.files[0]);
          return;
        }
        C("load", $.files);
      }
  }
  async function Ce(V) {
    if (n(18, u = !1), !cc([V, "access", (we) => we.dataTransfer, "optionalAccess", (we) => we.files]))
      return;
    const $ = Array.from(V.dataTransfer.files).filter((we) => {
      const ye = "." + we.name.split(".").pop();
      return ye && np(A, ye, we.type) || (ye && Array.isArray(o) ? o.includes(ye) : ye === o) ? !0 : (C("error", `Invalid file type only ${o} allowed.`), !1);
    });
    await te($);
  }
  function De(V) {
    P0.call(this, t, V);
  }
  function ce(V) {
    P0.call(this, t, V);
  }
  function he(V) {
    P0.call(this, t, V);
  }
  function se(V) {
    P0.call(this, t, V);
  }
  function Ne(V) {
    P0.call(this, t, V);
  }
  function de(V) {
    P0.call(this, t, V);
  }
  function Q(V) {
    P0.call(this, t, V);
  }
  function me(V) {
    q3[V ? "unshift" : "push"](() => {
      U = V, n(2, U);
    });
  }
  return t.$$set = (V) => {
    "filetype" in V && n(0, o = V.filetype), "dragging" in V && n(18, u = V.dragging), "boundedheight" in V && n(3, c = V.boundedheight), "center" in V && n(4, h = V.center), "flex" in V && n(5, p = V.flex), "file_count" in V && n(6, _ = V.file_count), "disable_click" in V && n(7, v = V.disable_click), "root" in V && n(8, k = V.root), "hidden" in V && n(9, E = V.hidden), "format" in V && n(19, z = V.format), "uploading" in V && n(1, H = V.uploading), "hidden_upload" in V && n(2, U = V.hidden_upload), "$$scope" in V && n(21, l = V.$$scope);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*filetype*/
    1 && (o == null ? n(14, A = null) : typeof o == "string" ? n(14, A = q(o)) : (n(0, o = o.map(q)), n(14, A = o.join(", "))));
  }, [
    o,
    H,
    U,
    c,
    h,
    p,
    _,
    v,
    k,
    E,
    J,
    ne,
    N,
    M,
    A,
    R,
    Se,
    Ce,
    u,
    z,
    te,
    l,
    r,
    De,
    ce,
    he,
    se,
    Ne,
    de,
    Q,
    me
  ];
}
class sp extends P3 {
  constructor(e) {
    super(), j3(
      this,
      e,
      rp,
      tp,
      X3,
      {
        filetype: 0,
        dragging: 18,
        boundedheight: 3,
        center: 4,
        flex: 5,
        file_count: 6,
        disable_click: 7,
        root: 8,
        hidden: 9,
        format: 19,
        uploading: 1,
        hidden_upload: 2,
        paste_clipboard: 10,
        open_file_upload: 11,
        load_files: 20
      },
      null,
      [-1, -1]
    );
  }
  get paste_clipboard() {
    return this.$$.ctx[10];
  }
  get open_file_upload() {
    return this.$$.ctx[11];
  }
  get load_files() {
    return this.$$.ctx[20];
  }
}
const {
  SvelteComponent: ip,
  append: hh,
  attr: Bt,
  bubble: lp,
  check_outros: ap,
  create_slot: dh,
  detach: bs,
  element: Zi,
  empty: op,
  get_all_dirty_from_scope: mh,
  get_slot_changes: ph,
  group_outros: up,
  init: cp,
  insert: ws,
  listen: fp,
  safe_not_equal: hp,
  set_style: un,
  space: gh,
  src_url_equal: Ai,
  toggle_class: gr,
  transition_in: Si,
  transition_out: Ei,
  update_slot_base: _h
} = window.__gradio__svelte__internal;
function dp(t) {
  let e, n, r, l, o, u, c = (
    /*icon*/
    t[7] && fc(t)
  );
  const h = (
    /*#slots*/
    t[12].default
  ), p = dh(
    h,
    t,
    /*$$scope*/
    t[11],
    null
  );
  return {
    c() {
      e = Zi("button"), c && c.c(), n = gh(), p && p.c(), Bt(e, "class", r = /*size*/
      t[4] + " " + /*variant*/
      t[3] + " " + /*elem_classes*/
      t[1].join(" ") + " svelte-8huxfn"), Bt(
        e,
        "id",
        /*elem_id*/
        t[0]
      ), e.disabled = /*disabled*/
      t[8], gr(e, "hidden", !/*visible*/
      t[2]), un(
        e,
        "flex-grow",
        /*scale*/
        t[9]
      ), un(
        e,
        "width",
        /*scale*/
        t[9] === 0 ? "fit-content" : null
      ), un(e, "min-width", typeof /*min_width*/
      t[10] == "number" ? `calc(min(${/*min_width*/
      t[10]}px, 100%))` : null);
    },
    m(_, v) {
      ws(_, e, v), c && c.m(e, null), hh(e, n), p && p.m(e, null), l = !0, o || (u = fp(
        e,
        "click",
        /*click_handler*/
        t[13]
      ), o = !0);
    },
    p(_, v) {
      /*icon*/
      _[7] ? c ? c.p(_, v) : (c = fc(_), c.c(), c.m(e, n)) : c && (c.d(1), c = null), p && p.p && (!l || v & /*$$scope*/
      2048) && _h(
        p,
        h,
        _,
        /*$$scope*/
        _[11],
        l ? ph(
          h,
          /*$$scope*/
          _[11],
          v,
          null
        ) : mh(
          /*$$scope*/
          _[11]
        ),
        null
      ), (!l || v & /*size, variant, elem_classes*/
      26 && r !== (r = /*size*/
      _[4] + " " + /*variant*/
      _[3] + " " + /*elem_classes*/
      _[1].join(" ") + " svelte-8huxfn")) && Bt(e, "class", r), (!l || v & /*elem_id*/
      1) && Bt(
        e,
        "id",
        /*elem_id*/
        _[0]
      ), (!l || v & /*disabled*/
      256) && (e.disabled = /*disabled*/
      _[8]), (!l || v & /*size, variant, elem_classes, visible*/
      30) && gr(e, "hidden", !/*visible*/
      _[2]), v & /*scale*/
      512 && un(
        e,
        "flex-grow",
        /*scale*/
        _[9]
      ), v & /*scale*/
      512 && un(
        e,
        "width",
        /*scale*/
        _[9] === 0 ? "fit-content" : null
      ), v & /*min_width*/
      1024 && un(e, "min-width", typeof /*min_width*/
      _[10] == "number" ? `calc(min(${/*min_width*/
      _[10]}px, 100%))` : null);
    },
    i(_) {
      l || (Si(p, _), l = !0);
    },
    o(_) {
      Ei(p, _), l = !1;
    },
    d(_) {
      _ && bs(e), c && c.d(), p && p.d(_), o = !1, u();
    }
  };
}
function mp(t) {
  let e, n, r, l, o = (
    /*icon*/
    t[7] && hc(t)
  );
  const u = (
    /*#slots*/
    t[12].default
  ), c = dh(
    u,
    t,
    /*$$scope*/
    t[11],
    null
  );
  return {
    c() {
      e = Zi("a"), o && o.c(), n = gh(), c && c.c(), Bt(
        e,
        "href",
        /*link*/
        t[6]
      ), Bt(e, "rel", "noopener noreferrer"), Bt(
        e,
        "aria-disabled",
        /*disabled*/
        t[8]
      ), Bt(e, "class", r = /*size*/
      t[4] + " " + /*variant*/
      t[3] + " " + /*elem_classes*/
      t[1].join(" ") + " svelte-8huxfn"), Bt(
        e,
        "id",
        /*elem_id*/
        t[0]
      ), gr(e, "hidden", !/*visible*/
      t[2]), gr(
        e,
        "disabled",
        /*disabled*/
        t[8]
      ), un(
        e,
        "flex-grow",
        /*scale*/
        t[9]
      ), un(
        e,
        "pointer-events",
        /*disabled*/
        t[8] ? "none" : null
      ), un(
        e,
        "width",
        /*scale*/
        t[9] === 0 ? "fit-content" : null
      ), un(e, "min-width", typeof /*min_width*/
      t[10] == "number" ? `calc(min(${/*min_width*/
      t[10]}px, 100%))` : null);
    },
    m(h, p) {
      ws(h, e, p), o && o.m(e, null), hh(e, n), c && c.m(e, null), l = !0;
    },
    p(h, p) {
      /*icon*/
      h[7] ? o ? o.p(h, p) : (o = hc(h), o.c(), o.m(e, n)) : o && (o.d(1), o = null), c && c.p && (!l || p & /*$$scope*/
      2048) && _h(
        c,
        u,
        h,
        /*$$scope*/
        h[11],
        l ? ph(
          u,
          /*$$scope*/
          h[11],
          p,
          null
        ) : mh(
          /*$$scope*/
          h[11]
        ),
        null
      ), (!l || p & /*link*/
      64) && Bt(
        e,
        "href",
        /*link*/
        h[6]
      ), (!l || p & /*disabled*/
      256) && Bt(
        e,
        "aria-disabled",
        /*disabled*/
        h[8]
      ), (!l || p & /*size, variant, elem_classes*/
      26 && r !== (r = /*size*/
      h[4] + " " + /*variant*/
      h[3] + " " + /*elem_classes*/
      h[1].join(" ") + " svelte-8huxfn")) && Bt(e, "class", r), (!l || p & /*elem_id*/
      1) && Bt(
        e,
        "id",
        /*elem_id*/
        h[0]
      ), (!l || p & /*size, variant, elem_classes, visible*/
      30) && gr(e, "hidden", !/*visible*/
      h[2]), (!l || p & /*size, variant, elem_classes, disabled*/
      282) && gr(
        e,
        "disabled",
        /*disabled*/
        h[8]
      ), p & /*scale*/
      512 && un(
        e,
        "flex-grow",
        /*scale*/
        h[9]
      ), p & /*disabled*/
      256 && un(
        e,
        "pointer-events",
        /*disabled*/
        h[8] ? "none" : null
      ), p & /*scale*/
      512 && un(
        e,
        "width",
        /*scale*/
        h[9] === 0 ? "fit-content" : null
      ), p & /*min_width*/
      1024 && un(e, "min-width", typeof /*min_width*/
      h[10] == "number" ? `calc(min(${/*min_width*/
      h[10]}px, 100%))` : null);
    },
    i(h) {
      l || (Si(c, h), l = !0);
    },
    o(h) {
      Ei(c, h), l = !1;
    },
    d(h) {
      h && bs(e), o && o.d(), c && c.d(h);
    }
  };
}
function fc(t) {
  let e, n, r;
  return {
    c() {
      e = Zi("img"), Bt(e, "class", "button-icon svelte-8huxfn"), Ai(e.src, n = /*icon*/
      t[7].url) || Bt(e, "src", n), Bt(e, "alt", r = `${/*value*/
      t[5]} icon`);
    },
    m(l, o) {
      ws(l, e, o);
    },
    p(l, o) {
      o & /*icon*/
      128 && !Ai(e.src, n = /*icon*/
      l[7].url) && Bt(e, "src", n), o & /*value*/
      32 && r !== (r = `${/*value*/
      l[5]} icon`) && Bt(e, "alt", r);
    },
    d(l) {
      l && bs(e);
    }
  };
}
function hc(t) {
  let e, n, r;
  return {
    c() {
      e = Zi("img"), Bt(e, "class", "button-icon svelte-8huxfn"), Ai(e.src, n = /*icon*/
      t[7].url) || Bt(e, "src", n), Bt(e, "alt", r = `${/*value*/
      t[5]} icon`);
    },
    m(l, o) {
      ws(l, e, o);
    },
    p(l, o) {
      o & /*icon*/
      128 && !Ai(e.src, n = /*icon*/
      l[7].url) && Bt(e, "src", n), o & /*value*/
      32 && r !== (r = `${/*value*/
      l[5]} icon`) && Bt(e, "alt", r);
    },
    d(l) {
      l && bs(e);
    }
  };
}
function pp(t) {
  let e, n, r, l;
  const o = [mp, dp], u = [];
  function c(h, p) {
    return (
      /*link*/
      h[6] && /*link*/
      h[6].length > 0 ? 0 : 1
    );
  }
  return e = c(t), n = u[e] = o[e](t), {
    c() {
      n.c(), r = op();
    },
    m(h, p) {
      u[e].m(h, p), ws(h, r, p), l = !0;
    },
    p(h, [p]) {
      let _ = e;
      e = c(h), e === _ ? u[e].p(h, p) : (up(), Ei(u[_], 1, 1, () => {
        u[_] = null;
      }), ap(), n = u[e], n ? n.p(h, p) : (n = u[e] = o[e](h), n.c()), Si(n, 1), n.m(r.parentNode, r));
    },
    i(h) {
      l || (Si(n), l = !0);
    },
    o(h) {
      Ei(n), l = !1;
    },
    d(h) {
      h && bs(r), u[e].d(h);
    }
  };
}
function gp(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { elem_id: o = "" } = e, { elem_classes: u = [] } = e, { visible: c = !0 } = e, { variant: h = "secondary" } = e, { size: p = "lg" } = e, { value: _ = null } = e, { link: v = null } = e, { icon: k = null } = e, { disabled: E = !1 } = e, { scale: z = null } = e, { min_width: H = void 0 } = e;
  function U(N) {
    lp.call(this, t, N);
  }
  return t.$$set = (N) => {
    "elem_id" in N && n(0, o = N.elem_id), "elem_classes" in N && n(1, u = N.elem_classes), "visible" in N && n(2, c = N.visible), "variant" in N && n(3, h = N.variant), "size" in N && n(4, p = N.size), "value" in N && n(5, _ = N.value), "link" in N && n(6, v = N.link), "icon" in N && n(7, k = N.icon), "disabled" in N && n(8, E = N.disabled), "scale" in N && n(9, z = N.scale), "min_width" in N && n(10, H = N.min_width), "$$scope" in N && n(11, l = N.$$scope);
  }, [
    o,
    u,
    c,
    h,
    p,
    _,
    v,
    k,
    E,
    z,
    H,
    l,
    r,
    U
  ];
}
class bh extends ip {
  constructor(e) {
    super(), cp(this, e, gp, pp, hp, {
      elem_id: 0,
      elem_classes: 1,
      visible: 2,
      variant: 3,
      size: 4,
      value: 5,
      link: 6,
      icon: 7,
      disabled: 8,
      scale: 9,
      min_width: 10
    });
  }
}
/*! @license DOMPurify 3.1.0 | (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.0/LICENSE */
const {
  entries: wh,
  setPrototypeOf: dc,
  isFrozen: _p,
  getPrototypeOf: bp,
  getOwnPropertyDescriptor: wp
} = Object;
let {
  freeze: en,
  seal: Cn,
  create: yh
} = Object, {
  apply: ka,
  construct: Da
} = typeof Reflect < "u" && Reflect;
en || (en = function(e) {
  return e;
});
Cn || (Cn = function(e) {
  return e;
});
ka || (ka = function(e, n, r) {
  return e.apply(n, r);
});
Da || (Da = function(e, n) {
  return new e(...n);
});
const Us = yn(Array.prototype.forEach), mc = yn(Array.prototype.pop), Pr = yn(Array.prototype.push), di = yn(String.prototype.toLowerCase), Wl = yn(String.prototype.toString), pc = yn(String.prototype.match), qr = yn(String.prototype.replace), yp = yn(String.prototype.indexOf), vp = yn(String.prototype.trim), On = yn(Object.prototype.hasOwnProperty), ln = yn(RegExp.prototype.test), Ur = kp(TypeError);
function yn(t) {
  return function(e) {
    for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), l = 1; l < n; l++)
      r[l - 1] = arguments[l];
    return ka(t, e, r);
  };
}
function kp(t) {
  return function() {
    for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
      n[r] = arguments[r];
    return Da(t, n);
  };
}
function je(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : di;
  dc && dc(t, null);
  let r = e.length;
  for (; r--; ) {
    let l = e[r];
    if (typeof l == "string") {
      const o = n(l);
      o !== l && (_p(e) || (e[r] = o), l = o);
    }
    t[l] = !0;
  }
  return t;
}
function Dp(t) {
  for (let e = 0; e < t.length; e++)
    On(t, e) || (t[e] = null);
  return t;
}
function j0(t) {
  const e = yh(null);
  for (const [n, r] of wh(t))
    On(t, n) && (Array.isArray(r) ? e[n] = Dp(r) : r && typeof r == "object" && r.constructor === Object ? e[n] = j0(r) : e[n] = r);
  return e;
}
function Gs(t, e) {
  for (; t !== null; ) {
    const r = wp(t, e);
    if (r) {
      if (r.get)
        return yn(r.get);
      if (typeof r.value == "function")
        return yn(r.value);
    }
    t = bp(t);
  }
  function n() {
    return null;
  }
  return n;
}
const gc = en(["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"]), Xl = en(["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"]), Yl = en(["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"]), Ap = en(["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"]), Zl = en(["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"]), Sp = en(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), _c = en(["#text"]), bc = en(["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", "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"]), Jl = en(["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", "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"]), wc = en(["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"]), js = en(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ep = Cn(/\{\{[\w\W]*|[\w\W]*\}\}/gm), xp = Cn(/<%[\w\W]*|[\w\W]*%>/gm), Tp = Cn(/\${[\w\W]*}/gm), Fp = Cn(/^data-[\-\w.\u00B7-\uFFFF]/), Cp = Cn(/^aria-[\-\w]+$/), vh = Cn(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), Mp = Cn(/^(?:\w+script|data):/i), Bp = Cn(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), kh = Cn(/^html$/i), Np = Cn(/^[a-z][.\w]*(-[.\w]+)+$/i);
var yc = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  MUSTACHE_EXPR: Ep,
  ERB_EXPR: xp,
  TMPLIT_EXPR: Tp,
  DATA_ATTR: Fp,
  ARIA_ATTR: Cp,
  IS_ALLOWED_URI: vh,
  IS_SCRIPT_OR_DATA: Mp,
  ATTR_WHITESPACE: Bp,
  DOCTYPE_NAME: kh,
  CUSTOM_ELEMENT: Np
});
const zp = function() {
  return typeof window > "u" ? null : window;
}, Rp = function(e, n) {
  if (typeof e != "object" || typeof e.createPolicy != "function")
    return null;
  let r = null;
  const l = "data-tt-policy-suffix";
  n && n.hasAttribute(l) && (r = n.getAttribute(l));
  const o = "dompurify" + (r ? "#" + r : "");
  try {
    return e.createPolicy(o, {
      createHTML(u) {
        return u;
      },
      createScriptURL(u) {
        return u;
      }
    });
  } catch {
    return console.warn("TrustedTypes policy " + o + " could not be created."), null;
  }
};
function Dh() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : zp();
  const e = (ue) => Dh(ue);
  if (e.version = "3.1.0", e.removed = [], !t || !t.document || t.document.nodeType !== 9)
    return e.isSupported = !1, e;
  let {
    document: n
  } = t;
  const r = n, l = r.currentScript, {
    DocumentFragment: o,
    HTMLTemplateElement: u,
    Node: c,
    Element: h,
    NodeFilter: p,
    NamedNodeMap: _ = t.NamedNodeMap || t.MozNamedAttrMap,
    HTMLFormElement: v,
    DOMParser: k,
    trustedTypes: E
  } = t, z = h.prototype, H = Gs(z, "cloneNode"), U = Gs(z, "nextSibling"), N = Gs(z, "childNodes"), M = Gs(z, "parentNode");
  if (typeof u == "function") {
    const ue = n.createElement("template");
    ue.content && ue.content.ownerDocument && (n = ue.content.ownerDocument);
  }
  let A, x = "";
  const {
    implementation: C,
    createNodeIterator: O,
    createDocumentFragment: q,
    getElementsByTagName: R
  } = n, {
    importNode: J
  } = r;
  let ne = {};
  e.isSupported = typeof wh == "function" && typeof M == "function" && C && C.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: ie,
    ERB_EXPR: te,
    TMPLIT_EXPR: Se,
    DATA_ATTR: Ce,
    ARIA_ATTR: De,
    IS_SCRIPT_OR_DATA: ce,
    ATTR_WHITESPACE: he,
    CUSTOM_ELEMENT: se
  } = yc;
  let {
    IS_ALLOWED_URI: Ne
  } = yc, de = null;
  const Q = je({}, [...gc, ...Xl, ...Yl, ...Zl, ..._c]);
  let me = null;
  const V = je({}, [...bc, ...Jl, ...wc, ...js]);
  let $ = Object.seal(yh(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
    }
  })), we = null, ye = null, K = !0, Ee = !0, Ae = !1, Je = !0, Ie = !1, Ve = !0, qe = !1, It = !1, ee = !1, _e = !1, it = !1, at = !1, Fe = !0, gt = !1;
  const We = "user-content-";
  let Re = !0, Te = !1, Me = {}, ze = null;
  const Qe = je({}, ["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 Oe = null;
  const Ue = je({}, ["audio", "video", "img", "source", "image", "track"]);
  let ht = null;
  const vn = je({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), hn = "http://www.w3.org/1998/Math/MathML", h0 = "http://www.w3.org/2000/svg", tn = "http://www.w3.org/1999/xhtml";
  let st = tn, oe = !1, nn = null;
  const er = je({}, [hn, h0, tn], Wl);
  let Ln = null;
  const tr = ["application/xhtml+xml", "text/html"], t0 = "text/html";
  let kt = null, Hn = null;
  const Mr = n.createElement("form"), Gt = function(G) {
    return G instanceof RegExp || G instanceof Function;
  }, Qt = function() {
    let G = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    if (!(Hn && Hn === G)) {
      if ((!G || typeof G != "object") && (G = {}), G = j0(G), Ln = // eslint-disable-next-line unicorn/prefer-includes
      tr.indexOf(G.PARSER_MEDIA_TYPE) === -1 ? t0 : G.PARSER_MEDIA_TYPE, kt = Ln === "application/xhtml+xml" ? Wl : di, de = On(G, "ALLOWED_TAGS") ? je({}, G.ALLOWED_TAGS, kt) : Q, me = On(G, "ALLOWED_ATTR") ? je({}, G.ALLOWED_ATTR, kt) : V, nn = On(G, "ALLOWED_NAMESPACES") ? je({}, G.ALLOWED_NAMESPACES, Wl) : er, ht = On(G, "ADD_URI_SAFE_ATTR") ? je(
        j0(vn),
        // eslint-disable-line indent
        G.ADD_URI_SAFE_ATTR,
        // eslint-disable-line indent
        kt
        // eslint-disable-line indent
      ) : vn, Oe = On(G, "ADD_DATA_URI_TAGS") ? je(
        j0(Ue),
        // eslint-disable-line indent
        G.ADD_DATA_URI_TAGS,
        // eslint-disable-line indent
        kt
        // eslint-disable-line indent
      ) : Ue, ze = On(G, "FORBID_CONTENTS") ? je({}, G.FORBID_CONTENTS, kt) : Qe, we = On(G, "FORBID_TAGS") ? je({}, G.FORBID_TAGS, kt) : {}, ye = On(G, "FORBID_ATTR") ? je({}, G.FORBID_ATTR, kt) : {}, Me = On(G, "USE_PROFILES") ? G.USE_PROFILES : !1, K = G.ALLOW_ARIA_ATTR !== !1, Ee = G.ALLOW_DATA_ATTR !== !1, Ae = G.ALLOW_UNKNOWN_PROTOCOLS || !1, Je = G.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ie = G.SAFE_FOR_TEMPLATES || !1, Ve = G.SAFE_FOR_XML !== !1, qe = G.WHOLE_DOCUMENT || !1, _e = G.RETURN_DOM || !1, it = G.RETURN_DOM_FRAGMENT || !1, at = G.RETURN_TRUSTED_TYPE || !1, ee = G.FORCE_BODY || !1, Fe = G.SANITIZE_DOM !== !1, gt = G.SANITIZE_NAMED_PROPS || !1, Re = G.KEEP_CONTENT !== !1, Te = G.IN_PLACE || !1, Ne = G.ALLOWED_URI_REGEXP || vh, st = G.NAMESPACE || tn, $ = G.CUSTOM_ELEMENT_HANDLING || {}, G.CUSTOM_ELEMENT_HANDLING && Gt(G.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = G.CUSTOM_ELEMENT_HANDLING.tagNameCheck), G.CUSTOM_ELEMENT_HANDLING && Gt(G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), G.CUSTOM_ELEMENT_HANDLING && typeof G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ie && (Ee = !1), it && (_e = !0), Me && (de = je({}, _c), me = [], Me.html === !0 && (je(de, gc), je(me, bc)), Me.svg === !0 && (je(de, Xl), je(me, Jl), je(me, js)), Me.svgFilters === !0 && (je(de, Yl), je(me, Jl), je(me, js)), Me.mathMl === !0 && (je(de, Zl), je(me, wc), je(me, js))), G.ADD_TAGS && (de === Q && (de = j0(de)), je(de, G.ADD_TAGS, kt)), G.ADD_ATTR && (me === V && (me = j0(me)), je(me, G.ADD_ATTR, kt)), G.ADD_URI_SAFE_ATTR && je(ht, G.ADD_URI_SAFE_ATTR, kt), G.FORBID_CONTENTS && (ze === Qe && (ze = j0(ze)), je(ze, G.FORBID_CONTENTS, kt)), Re && (de["#text"] = !0), qe && je(de, ["html", "head", "body"]), de.table && (je(de, ["tbody"]), delete we.tbody), G.TRUSTED_TYPES_POLICY) {
        if (typeof G.TRUSTED_TYPES_POLICY.createHTML != "function")
          throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
        if (typeof G.TRUSTED_TYPES_POLICY.createScriptURL != "function")
          throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
        A = G.TRUSTED_TYPES_POLICY, x = A.createHTML("");
      } else
        A === void 0 && (A = Rp(E, l)), A !== null && typeof x == "string" && (x = A.createHTML(""));
      en && en(G), Hn = G;
    }
  }, dn = je({}, ["mi", "mo", "mn", "ms", "mtext"]), d0 = je({}, ["foreignobject", "desc", "title", "annotation-xml"]), nr = je({}, ["title", "style", "font", "a", "script"]), rr = je({}, [...Xl, ...Yl, ...Ap]), sr = je({}, [...Zl, ...Sp]), Br = function(G) {
    let ae = M(G);
    (!ae || !ae.tagName) && (ae = {
      namespaceURI: st,
      tagName: "template"
    });
    const T = di(G.tagName), Xe = di(ae.tagName);
    return nn[G.namespaceURI] ? G.namespaceURI === h0 ? ae.namespaceURI === tn ? T === "svg" : ae.namespaceURI === hn ? T === "svg" && (Xe === "annotation-xml" || dn[Xe]) : !!rr[T] : G.namespaceURI === hn ? ae.namespaceURI === tn ? T === "math" : ae.namespaceURI === h0 ? T === "math" && d0[Xe] : !!sr[T] : G.namespaceURI === tn ? ae.namespaceURI === h0 && !d0[Xe] || ae.namespaceURI === hn && !dn[Xe] ? !1 : !sr[T] && (nr[T] || !rr[T]) : !!(Ln === "application/xhtml+xml" && nn[G.namespaceURI]) : !1;
  }, Wt = function(G) {
    Pr(e.removed, {
      element: G
    });
    try {
      G.parentNode.removeChild(G);
    } catch {
      G.remove();
    }
  }, P = function(G, ae) {
    try {
      Pr(e.removed, {
        attribute: ae.getAttributeNode(G),
        from: ae
      });
    } catch {
      Pr(e.removed, {
        attribute: null,
        from: ae
      });
    }
    if (ae.removeAttribute(G), G === "is" && !me[G])
      if (_e || it)
        try {
          Wt(ae);
        } catch {
        }
      else
        try {
          ae.setAttribute(G, "");
        } catch {
        }
  }, d = function(G) {
    let ae = null, T = null;
    if (ee)
      G = "<remove></remove>" + G;
    else {
      const Lt = pc(G, /^[\r\n\t ]+/);
      T = Lt && Lt[0];
    }
    Ln === "application/xhtml+xml" && st === tn && (G = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + G + "</body></html>");
    const Xe = A ? A.createHTML(G) : G;
    if (st === tn)
      try {
        ae = new k().parseFromString(Xe, Ln);
      } catch {
      }
    if (!ae || !ae.documentElement) {
      ae = C.createDocument(st, "template", null);
      try {
        ae.documentElement.innerHTML = oe ? x : Xe;
      } catch {
      }
    }
    const L = ae.body || ae.documentElement;
    return G && T && L.insertBefore(n.createTextNode(T), L.childNodes[0] || null), st === tn ? R.call(ae, qe ? "html" : "body")[0] : qe ? ae.documentElement : L;
  }, g = function(G) {
    return O.call(
      G.ownerDocument || G,
      G,
      // eslint-disable-next-line no-bitwise
      p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION,
      null
    );
  }, Y = function(G) {
    return G instanceof v && (typeof G.nodeName != "string" || typeof G.textContent != "string" || typeof G.removeChild != "function" || !(G.attributes instanceof _) || typeof G.removeAttribute != "function" || typeof G.setAttribute != "function" || typeof G.namespaceURI != "string" || typeof G.insertBefore != "function" || typeof G.hasChildNodes != "function");
  }, y = function(G) {
    return typeof c == "function" && G instanceof c;
  }, B = function(G, ae, T) {
    ne[G] && Us(ne[G], (Xe) => {
      Xe.call(e, ae, T, Hn);
    });
  }, Be = function(G) {
    let ae = null;
    if (B("beforeSanitizeElements", G, null), Y(G))
      return Wt(G), !0;
    const T = kt(G.nodeName);
    if (B("uponSanitizeElement", G, {
      tagName: T,
      allowedTags: de
    }), G.hasChildNodes() && !y(G.firstElementChild) && ln(/<[/\w]/g, G.innerHTML) && ln(/<[/\w]/g, G.textContent) || G.nodeType === 7 || Ve && G.nodeType === 8 && ln(/<[/\w]/g, G.data))
      return Wt(G), !0;
    if (!de[T] || we[T]) {
      if (!we[T] && bt(T) && ($.tagNameCheck instanceof RegExp && ln($.tagNameCheck, T) || $.tagNameCheck instanceof Function && $.tagNameCheck(T)))
        return !1;
      if (Re && !ze[T]) {
        const Xe = M(G) || G.parentNode, L = N(G) || G.childNodes;
        if (L && Xe) {
          const Lt = L.length;
          for (let jt = Lt - 1; jt >= 0; --jt)
            Xe.insertBefore(H(L[jt], !0), U(G));
        }
      }
      return Wt(G), !0;
    }
    return G instanceof h && !Br(G) || (T === "noscript" || T === "noembed" || T === "noframes") && ln(/<\/no(script|embed|frames)/i, G.innerHTML) ? (Wt(G), !0) : (Ie && G.nodeType === 3 && (ae = G.textContent, Us([ie, te, Se], (Xe) => {
      ae = qr(ae, Xe, " ");
    }), G.textContent !== ae && (Pr(e.removed, {
      element: G.cloneNode()
    }), G.textContent = ae)), B("afterSanitizeElements", G, null), !1);
  }, fe = function(G, ae, T) {
    if (Fe && (ae === "id" || ae === "name") && (T in n || T in Mr))
      return !1;
    if (!(Ee && !ye[ae] && ln(Ce, ae))) {
      if (!(K && ln(De, ae))) {
        if (!me[ae] || ye[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
            !(bt(G) && ($.tagNameCheck instanceof RegExp && ln($.tagNameCheck, G) || $.tagNameCheck instanceof Function && $.tagNameCheck(G)) && ($.attributeNameCheck instanceof RegExp && ln($.attributeNameCheck, ae) || $.attributeNameCheck instanceof Function && $.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" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && ln($.tagNameCheck, T) || $.tagNameCheck instanceof Function && $.tagNameCheck(T)))
          )
            return !1;
        } else if (!ht[ae]) {
          if (!ln(Ne, qr(T, he, ""))) {
            if (!((ae === "src" || ae === "xlink:href" || ae === "href") && G !== "script" && yp(T, "data:") === 0 && Oe[G])) {
              if (!(Ae && !ln(ce, qr(T, he, "")))) {
                if (T)
                  return !1;
              }
            }
          }
        }
      }
    }
    return !0;
  }, bt = function(G) {
    return G !== "annotation-xml" && pc(G, se);
  }, kn = function(G) {
    B("beforeSanitizeAttributes", G, null);
    const {
      attributes: ae
    } = G;
    if (!ae)
      return;
    const T = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: me
    };
    let Xe = ae.length;
    for (; Xe--; ) {
      const L = ae[Xe], {
        name: Lt,
        namespaceURI: jt,
        value: Pn
      } = L, qn = kt(Lt);
      let ke = Lt === "value" ? Pn : vp(Pn);
      if (T.attrName = qn, T.attrValue = ke, T.keepAttr = !0, T.forceKeepAttr = void 0, B("uponSanitizeAttribute", G, T), ke = T.attrValue, T.forceKeepAttr || (P(Lt, G), !T.keepAttr))
        continue;
      if (!Je && ln(/\/>/i, ke)) {
        P(Lt, G);
        continue;
      }
      Ie && Us([ie, te, Se], (O0) => {
        ke = qr(ke, O0, " ");
      });
      const ir = kt(G.nodeName);
      if (fe(ir, qn, ke)) {
        if (gt && (qn === "id" || qn === "name") && (P(Lt, G), ke = We + ke), A && typeof E == "object" && typeof E.getAttributeType == "function" && !jt)
          switch (E.getAttributeType(ir, qn)) {
            case "TrustedHTML": {
              ke = A.createHTML(ke);
              break;
            }
            case "TrustedScriptURL": {
              ke = A.createScriptURL(ke);
              break;
            }
          }
        try {
          jt ? G.setAttributeNS(jt, Lt, ke) : G.setAttribute(Lt, ke), mc(e.removed);
        } catch {
        }
      }
    }
    B("afterSanitizeAttributes", G, null);
  }, ve = function ue(G) {
    let ae = null;
    const T = g(G);
    for (B("beforeSanitizeShadowDOM", G, null); ae = T.nextNode(); )
      B("uponSanitizeShadowNode", ae, null), !Be(ae) && (ae.content instanceof o && ue(ae.content), kn(ae));
    B("afterSanitizeShadowDOM", G, null);
  };
  return e.sanitize = function(ue) {
    let G = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ae = null, T = null, Xe = null, L = null;
    if (oe = !ue, oe && (ue = "<!-->"), typeof ue != "string" && !y(ue))
      if (typeof ue.toString == "function") {
        if (ue = ue.toString(), typeof ue != "string")
          throw Ur("dirty is not a string, aborting");
      } else
        throw Ur("toString is not a function");
    if (!e.isSupported)
      return ue;
    if (It || Qt(G), e.removed = [], typeof ue == "string" && (Te = !1), Te) {
      if (ue.nodeName) {
        const Pn = kt(ue.nodeName);
        if (!de[Pn] || we[Pn])
          throw Ur("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (ue instanceof c)
      ae = d("<!---->"), T = ae.ownerDocument.importNode(ue, !0), T.nodeType === 1 && T.nodeName === "BODY" || T.nodeName === "HTML" ? ae = T : ae.appendChild(T);
    else {
      if (!_e && !Ie && !qe && // eslint-disable-next-line unicorn/prefer-includes
      ue.indexOf("<") === -1)
        return A && at ? A.createHTML(ue) : ue;
      if (ae = d(ue), !ae)
        return _e ? null : at ? x : "";
    }
    ae && ee && Wt(ae.firstChild);
    const Lt = g(Te ? ue : ae);
    for (; Xe = Lt.nextNode(); )
      Be(Xe) || (Xe.content instanceof o && ve(Xe.content), kn(Xe));
    if (Te)
      return ue;
    if (_e) {
      if (it)
        for (L = q.call(ae.ownerDocument); ae.firstChild; )
          L.appendChild(ae.firstChild);
      else
        L = ae;
      return (me.shadowroot || me.shadowrootmode) && (L = J.call(r, L, !0)), L;
    }
    let jt = qe ? ae.outerHTML : ae.innerHTML;
    return qe && de["!doctype"] && ae.ownerDocument && ae.ownerDocument.doctype && ae.ownerDocument.doctype.name && ln(kh, ae.ownerDocument.doctype.name) && (jt = "<!DOCTYPE " + ae.ownerDocument.doctype.name + `>
` + jt), Ie && Us([ie, te, Se], (Pn) => {
      jt = qr(jt, Pn, " ");
    }), A && at ? A.createHTML(jt) : jt;
  }, e.setConfig = function() {
    let ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    Qt(ue), It = !0;
  }, e.clearConfig = function() {
    Hn = null, It = !1;
  }, e.isValidAttribute = function(ue, G, ae) {
    Hn || Qt({});
    const T = kt(ue), Xe = kt(G);
    return fe(T, Xe, ae);
  }, e.addHook = function(ue, G) {
    typeof G == "function" && (ne[ue] = ne[ue] || [], Pr(ne[ue], G));
  }, e.removeHook = function(ue) {
    if (ne[ue])
      return mc(ne[ue]);
  }, e.removeHooks = function(ue) {
    ne[ue] && (ne[ue] = []);
  }, e.removeAllHooks = function() {
    ne = {};
  }, e;
}
var vc = Dh(), Ah = { exports: {} }, Ql = { exports: {} }, kc;
function Op() {
  return kc || (kc = 1, function(t, e) {
    (function(r, l) {
      t.exports = l();
    })(typeof self < "u" ? self : yi, function() {
      return (
        /******/
        function() {
          var n = {};
          (function() {
            n.d = function(i, s) {
              for (var a in s)
                n.o(s, a) && !n.o(i, a) && Object.defineProperty(i, a, { enumerable: !0, get: s[a] });
            };
          })(), function() {
            n.o = function(i, s) {
              return Object.prototype.hasOwnProperty.call(i, s);
            };
          }();
          var r = {};
          n.d(r, {
            default: function() {
              return (
                /* binding */
                md
              );
            }
          });
          class l {
            // 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(s, a) {
              this.name = void 0, this.position = void 0, this.length = void 0, this.rawMessage = void 0;
              let f = "KaTeX parse error: " + s, m, b;
              const w = a && a.loc;
              if (w && w.start <= w.end) {
                const F = w.lexer.input;
                m = w.start, b = w.end, m === F.length ? f += " at end of input: " : f += " at position " + (m + 1) + ": ";
                const I = F.slice(m, b).replace(/[^]/g, "$&̲");
                let j;
                m > 15 ? j = "…" + F.slice(m - 15, m) : j = F.slice(0, m);
                let W;
                b + 15 < F.length ? W = F.slice(b, b + 15) + "…" : W = F.slice(b), f += j + I + W;
              }
              const D = new Error(f);
              return D.name = "ParseError", D.__proto__ = l.prototype, D.position = m, m != null && b != null && (D.length = b - m), D.rawMessage = s, D;
            }
          }
          l.prototype.__proto__ = Error.prototype;
          var o = l;
          const u = function(i, s) {
            return i.indexOf(s) !== -1;
          }, c = function(i, s) {
            return i === void 0 ? s : i;
          }, h = /([A-Z])/g, p = function(i) {
            return i.replace(h, "-$1").toLowerCase();
          }, _ = {
            "&": "&amp;",
            ">": "&gt;",
            "<": "&lt;",
            '"': "&quot;",
            "'": "&#x27;"
          }, v = /[&><"']/g;
          function k(i) {
            return String(i).replace(v, (s) => _[s]);
          }
          const E = function(i) {
            return i.type === "ordgroup" || i.type === "color" ? i.body.length === 1 ? E(i.body[0]) : i : i.type === "font" ? E(i.body) : i;
          }, z = function(i) {
            const s = E(i);
            return s.type === "mathord" || s.type === "textord" || s.type === "atom";
          }, H = function(i) {
            if (!i)
              throw new Error("Expected non-null, but got " + String(i));
            return i;
          };
          var N = {
            contains: u,
            deflt: c,
            escape: k,
            hyphenate: p,
            getBaseElem: E,
            isCharacterBox: z,
            protocolFromUrl: function(i) {
              const s = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(i);
              return s ? s[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(s[1]) ? null : s[1].toLowerCase() : "_relative";
            }
          };
          const M = {
            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, s) => (s.push(i), s)
            },
            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 A(i) {
            if (i.default)
              return i.default;
            const s = i.type, a = Array.isArray(s) ? s[0] : s;
            if (typeof a != "string")
              return a.enum[0];
            switch (a) {
              case "boolean":
                return !1;
              case "string":
                return "";
              case "number":
                return 0;
              case "object":
                return {};
            }
          }
          class x {
            constructor(s) {
              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, s = s || {};
              for (const a in M)
                if (M.hasOwnProperty(a)) {
                  const f = M[a];
                  this[a] = s[a] !== void 0 ? f.processor ? f.processor(s[a]) : s[a] : A(f);
                }
            }
            /**
             * Report nonstrict (non-LaTeX-compatible) input.
             * Can safely not be called if `this.strict` is false in JavaScript.
             */
            reportNonstrict(s, a, f) {
              let m = this.strict;
              if (typeof m == "function" && (m = m(s, a, f)), !(!m || m === "ignore")) {
                if (m === !0 || m === "error")
                  throw new o("LaTeX-incompatible input and strict mode is set to 'error': " + (a + " [" + s + "]"), f);
                m === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (a + " [" + s + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + m + "': " + a + " [" + s + "]"));
              }
            }
            /**
             * 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(s, a, f) {
              let m = this.strict;
              if (typeof m == "function")
                try {
                  m = m(s, a, f);
                } catch {
                  m = "error";
                }
              return !m || m === "ignore" ? !1 : m === !0 || m === "error" ? !0 : m === "warn" ? (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (a + " [" + s + "]")), !1) : (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + m + "': " + a + " [" + s + "]")), !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(s) {
              if (s.url && !s.protocol) {
                const f = N.protocolFromUrl(s.url);
                if (f == null)
                  return !1;
                s.protocol = f;
              }
              return !!(typeof this.trust == "function" ? this.trust(s) : this.trust);
            }
          }
          class C {
            constructor(s, a, f) {
              this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = s, this.size = a, this.cramped = f;
            }
            /**
             * Get the style of a superscript given a base in the current style.
             */
            sup() {
              return Ce[De[this.id]];
            }
            /**
             * Get the style of a subscript given a base in the current style.
             */
            sub() {
              return Ce[ce[this.id]];
            }
            /**
             * Get the style of a fraction numerator given the fraction in the current
             * style.
             */
            fracNum() {
              return Ce[he[this.id]];
            }
            /**
             * Get the style of a fraction denominator given the fraction in the current
             * style.
             */
            fracDen() {
              return Ce[se[this.id]];
            }
            /**
             * Get the cramped version of a style (in particular, cramping a cramped style
             * doesn't change the style).
             */
            cramp() {
              return Ce[Ne[this.id]];
            }
            /**
             * Get a text or display version of this style.
             */
            text() {
              return Ce[de[this.id]];
            }
            /**
             * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
             */
            isTight() {
              return this.size >= 2;
            }
          }
          const O = 0, q = 1, R = 2, J = 3, ne = 4, ie = 5, te = 6, Se = 7, Ce = [new C(O, 0, !1), new C(q, 0, !0), new C(R, 1, !1), new C(J, 1, !0), new C(ne, 2, !1), new C(ie, 2, !0), new C(te, 3, !1), new C(Se, 3, !0)], De = [ne, ie, ne, ie, te, Se, te, Se], ce = [ie, ie, ie, ie, Se, Se, Se, Se], he = [R, J, ne, ie, te, Se, te, Se], se = [J, J, ie, ie, Se, Se, Se, Se], Ne = [q, q, J, J, ie, ie, Se, Se], de = [O, q, R, J, R, J, R, J];
          var Q = {
            DISPLAY: Ce[O],
            TEXT: Ce[R],
            SCRIPT: Ce[ne],
            SCRIPTSCRIPT: Ce[te]
          };
          const me = [{
            // 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 V(i) {
            for (let s = 0; s < me.length; s++) {
              const a = me[s];
              for (let f = 0; f < a.blocks.length; f++) {
                const m = a.blocks[f];
                if (i >= m[0] && i <= m[1])
                  return a.name;
              }
            }
            return null;
          }
          const $ = [];
          me.forEach((i) => i.blocks.forEach((s) => $.push(...s)));
          function we(i) {
            for (let s = 0; s < $.length; s += 2)
              if (i >= $[s] && i <= $[s + 1])
                return !0;
            return !1;
          }
          const ye = 80, K = function(i, s) {
            return "M95," + (622 + i + s) + `
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` + i / 2.075 + " -" + i + `
c5.3,-9.3,12,-14,20,-14
H400000v` + (40 + i) + `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 + i) + " " + s + "h400000v" + (40 + i) + "h-400000z";
          }, Ee = function(i, s) {
            return "M263," + (601 + i + s) + `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` + i / 2.084 + " -" + i + `
c4.7,-7.3,11,-11,19,-11
H40000v` + (40 + i) + `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 + i) + " " + s + "h400000v" + (40 + i) + "h-400000z";
          }, Ae = function(i, s) {
            return "M983 " + (10 + i + s) + `
l` + i / 3.13 + " -" + i + `
c4,-6.7,10,-10,18,-10 H400000v` + (40 + i) + `
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 + i) + " " + s + "h400000v" + (40 + i) + "h-400000z";
          }, Je = function(i, s) {
            return "M424," + (2398 + i + s) + `
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` + i / 4.223 + " -" + i + `c4,-6.7,10,-10,18,-10 H400000
v` + (40 + i) + `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 + i) + " " + s + `
h400000v` + (40 + i) + "h-400000z";
          }, Ie = function(i, s) {
            return "M473," + (2713 + i + s) + `
c339.3,-1799.3,509.3,-2700,510,-2702 l` + i / 5.298 + " -" + i + `
c3.3,-7.3,9.3,-11,18,-11 H400000v` + (40 + i) + `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 + i) + " " + s + "h400000v" + (40 + i) + "H1017.7z";
          }, Ve = function(i) {
            const s = i / 2;
            return "M400000 " + i + " H0 L" + s + " 0 l65 45 L145 " + (i - 80) + " H400000z";
          }, qe = function(i, s, a) {
            const f = a - 54 - s - i;
            return "M702 " + (i + s) + "H400000" + (40 + i) + `
H742v` + f + `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 ` + s + "H400000v" + (40 + i) + "H742z";
          }, It = function(i, s, a) {
            s = 1e3 * s;
            let f = "";
            switch (i) {
              case "sqrtMain":
                f = K(s, ye);
                break;
              case "sqrtSize1":
                f = Ee(s, ye);
                break;
              case "sqrtSize2":
                f = Ae(s, ye);
                break;
              case "sqrtSize3":
                f = Je(s, ye);
                break;
              case "sqrtSize4":
                f = Ie(s, ye);
                break;
              case "sqrtTall":
                f = qe(s, ye, a);
            }
            return f;
          }, ee = function(i, s) {
            switch (i) {
              case "⎜":
                return "M291 0 H417 V" + s + " H291z M291 0 H417 V" + s + " H291z";
              case "∣":
                return "M145 0 H188 V" + s + " H145z M145 0 H188 V" + s + " H145z";
              case "∥":
                return "M145 0 H188 V" + s + " H145z M145 0 H188 V" + s + " H145z" + ("M367 0 H410 V" + s + " H367z M367 0 H410 V" + s + " H367z");
              case "⎟":
                return "M457 0 H583 V" + s + " H457z M457 0 H583 V" + s + " H457z";
              case "⎢":
                return "M319 0 H403 V" + s + " H319z M319 0 H403 V" + s + " H319z";
              case "⎥":
                return "M263 0 H347 V" + s + " H263z M263 0 H347 V" + s + " H263z";
              case "⎪":
                return "M384 0 H504 V" + s + " H384z M384 0 H504 V" + s + " H384z";
              case "⏐":
                return "M312 0 H355 V" + s + " H312z M312 0 H355 V" + s + " H312z";
              case "‖":
                return "M257 0 H300 V" + s + " H257z M257 0 H300 V" + s + " H257z" + ("M478 0 H521 V" + s + " H478z M478 0 H521 V" + s + " H478z");
              default:
                return "";
            }
          }, _e = {
            // 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`
          }, it = function(i, s) {
            switch (i) {
              case "lbrack":
                return "M403 1759 V84 H666 V0 H319 V1759 v" + s + ` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v` + s + " v1759 h84z";
              case "rbrack":
                return "M347 1759 V0 H0 V84 H263 V1759 v" + s + ` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v` + s + " v1759 h84z";
              case "vert":
                return "M145 15 v585 v" + s + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -s + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + s + " v585 h43z";
              case "doublevert":
                return "M145 15 v585 v" + s + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -s + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + s + ` v585 h43z
M367 15 v585 v` + s + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -s + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v` + s + " v585 h43z";
              case "lfloor":
                return "M319 602 V0 H403 V602 v" + s + ` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v` + s + " v1715 H319z";
              case "rfloor":
                return "M319 602 V0 H403 V602 v" + s + ` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v` + s + " v1715 H319z";
              case "lceil":
                return "M403 1759 V84 H666 V0 H319 V1759 v" + s + ` v602 h84z
M403 1759 V0 H319 V1759 v` + s + " v602 h84z";
              case "rceil":
                return "M347 1759 V0 H0 V84 H263 V1759 v" + s + ` v602 h84z
M347 1759 V0 h-84 V1759 v` + s + " 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,` + (s + 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,-` + (s + 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,` + (s + 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,-` + (s + 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 at {
            // HtmlDomNode
            // Never used; needed for satisfying interface.
            constructor(s) {
              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 = s, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
            }
            hasClass(s) {
              return N.contains(this.classes, s);
            }
            /** Convert the fragment into a node. */
            toNode() {
              const s = document.createDocumentFragment();
              for (let a = 0; a < this.children.length; a++)
                s.appendChild(this.children[a].toNode());
              return s;
            }
            /** Convert the fragment into HTML markup. */
            toMarkup() {
              let s = "";
              for (let a = 0; a < this.children.length; a++)
                s += this.children[a].toMarkup();
              return s;
            }
            /**
             * Converts the math node into a string, similar to innerText. Applies to
             * MathDomNode's only.
             */
            toText() {
              const s = (a) => a.toText();
              return this.children.map(s).join("");
            }
          }
          var Fe = {
            "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]
            }
          };
          const gt = {
            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.less; 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
          }, We = {
            // 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 Re(i, s) {
            Fe[i] = s;
          }
          function Te(i, s, a) {
            if (!Fe[s])
              throw new Error("Font metrics not found for font: " + s + ".");
            let f = i.charCodeAt(0), m = Fe[s][f];
            if (!m && i[0] in We && (f = We[i[0]].charCodeAt(0), m = Fe[s][f]), !m && a === "text" && we(f) && (m = Fe[s][77]), m)
              return {
                depth: m[0],
                height: m[1],
                italic: m[2],
                skew: m[3],
                width: m[4]
              };
          }
          const Me = {};
          function ze(i) {
            let s;
            if (i >= 5 ? s = 0 : i >= 3 ? s = 1 : s = 2, !Me[s]) {
              const a = Me[s] = {
                cssEmPerMu: gt.quad[s] / 18
              };
              for (const f in gt)
                gt.hasOwnProperty(f) && (a[f] = gt[f][s]);
            }
            return Me[s];
          }
          const Qe = [
            // 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
          ], Oe = [
            // 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
          ], Ue = function(i, s) {
            return s.size < 2 ? i : Qe[i - 1][s.size - 1];
          };
          class ht {
            // 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(s) {
              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 = s.style, this.color = s.color, this.size = s.size || ht.BASESIZE, this.textSize = s.textSize || this.size, this.phantom = !!s.phantom, this.font = s.font || "", this.fontFamily = s.fontFamily || "", this.fontWeight = s.fontWeight || "", this.fontShape = s.fontShape || "", this.sizeMultiplier = Oe[this.size - 1], this.maxSize = s.maxSize, this.minRuleThickness = s.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(s) {
              const a = {
                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 (const f in s)
                s.hasOwnProperty(f) && (a[f] = s[f]);
              return new ht(a);
            }
            /**
             * Return an options object with the given style. If `this.style === style`,
             * returns `this`.
             */
            havingStyle(s) {
              return this.style === s ? this : this.extend({
                style: s,
                size: Ue(this.textSize, s)
              });
            }
            /**
             * 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(s) {
              return this.size === s && this.textSize === s ? this : this.extend({
                style: this.style.text(),
                size: s,
                textSize: s,
                sizeMultiplier: Oe[s - 1]
              });
            }
            /**
             * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
             * changes to at least `\textstyle`.
             */
            havingBaseStyle(s) {
              s = s || this.style.text();
              const a = Ue(ht.BASESIZE, s);
              return this.size === a && this.textSize === ht.BASESIZE && this.style === s ? this : this.extend({
                style: s,
                size: a
              });
            }
            /**
             * Remove the effect of sizing changes such as \Huge.
             * Keep the effect of the current style, such as \scriptstyle.
             */
            havingBaseSizing() {
              let s;
              switch (this.style.id) {
                case 4:
                case 5:
                  s = 3;
                  break;
                case 6:
                case 7:
                  s = 1;
                  break;
                default:
                  s = 6;
              }
              return this.extend({
                style: this.style.text(),
                size: s
              });
            }
            /**
             * Create a new options object with the given color.
             */
            withColor(s) {
              return this.extend({
                color: s
              });
            }
            /**
             * 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(s) {
              return this.extend({
                font: s
              });
            }
            /**
             * Create a new options objects with the given fontFamily.
             */
            withTextFontFamily(s) {
              return this.extend({
                fontFamily: s,
                font: ""
              });
            }
            /**
             * Creates a new options object with the given font weight
             */
            withTextFontWeight(s) {
              return this.extend({
                fontWeight: s,
                font: ""
              });
            }
            /**
             * Creates a new options object with the given font weight
             */
            withTextFontShape(s) {
              return this.extend({
                fontShape: s,
                font: ""
              });
            }
            /**
             * Return the CSS sizing classes required to switch from enclosing options
             * `oldOptions` to `this`. Returns an array of classes.
             */
            sizingClasses(s) {
              return s.size !== this.size ? ["sizing", "reset-size" + s.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 !== ht.BASESIZE ? ["sizing", "reset-size" + this.size, "size" + ht.BASESIZE] : [];
            }
            /**
             * Return the font metrics for this size.
             */
            fontMetrics() {
              return this._fontMetrics || (this._fontMetrics = ze(this.size)), this._fontMetrics;
            }
            /**
             * Gets the CSS color of the current options object
             */
            getColor() {
              return this.phantom ? "transparent" : this.color;
            }
          }
          ht.BASESIZE = 6;
          var vn = ht;
          const hn = {
            // 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
          }, h0 = {
            ex: !0,
            em: !0,
            mu: !0
          }, tn = function(i) {
            return typeof i != "string" && (i = i.unit), i in hn || i in h0 || i === "ex";
          }, st = function(i, s) {
            let a;
            if (i.unit in hn)
              a = hn[i.unit] / s.fontMetrics().ptPerEm / s.sizeMultiplier;
            else if (i.unit === "mu")
              a = s.fontMetrics().cssEmPerMu;
            else {
              let f;
              if (s.style.isTight() ? f = s.havingStyle(s.style.text()) : f = s, i.unit === "ex")
                a = f.fontMetrics().xHeight;
              else if (i.unit === "em")
                a = f.fontMetrics().quad;
              else
                throw new o("Invalid unit: '" + i.unit + "'");
              f !== s && (a *= f.sizeMultiplier / s.sizeMultiplier);
            }
            return Math.min(i.number * a, s.maxSize);
          }, oe = function(i) {
            return +i.toFixed(4) + "em";
          }, nn = function(i) {
            return i.filter((s) => s).join(" ");
          }, er = function(i, s, a) {
            if (this.classes = i || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = a || {}, s) {
              s.style.isTight() && this.classes.push("mtight");
              const f = s.getColor();
              f && (this.style.color = f);
            }
          }, Ln = function(i) {
            const s = document.createElement(i);
            s.className = nn(this.classes);
            for (const a in this.style)
              this.style.hasOwnProperty(a) && (s.style[a] = this.style[a]);
            for (const a in this.attributes)
              this.attributes.hasOwnProperty(a) && s.setAttribute(a, this.attributes[a]);
            for (let a = 0; a < this.children.length; a++)
              s.appendChild(this.children[a].toNode());
            return s;
          }, tr = function(i) {
            let s = "<" + i;
            this.classes.length && (s += ' class="' + N.escape(nn(this.classes)) + '"');
            let a = "";
            for (const f in this.style)
              this.style.hasOwnProperty(f) && (a += N.hyphenate(f) + ":" + this.style[f] + ";");
            a && (s += ' style="' + N.escape(a) + '"');
            for (const f in this.attributes)
              this.attributes.hasOwnProperty(f) && (s += " " + f + '="' + N.escape(this.attributes[f]) + '"');
            s += ">";
            for (let f = 0; f < this.children.length; f++)
              s += this.children[f].toMarkup();
            return s += "</" + i + ">", s;
          };
          class t0 {
            constructor(s, a, f, m) {
              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, er.call(this, s, f, m), this.children = a || [];
            }
            /**
             * 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(s, a) {
              this.attributes[s] = a;
            }
            hasClass(s) {
              return N.contains(this.classes, s);
            }
            toNode() {
              return Ln.call(this, "span");
            }
            toMarkup() {
              return tr.call(this, "span");
            }
          }
          class kt {
            constructor(s, a, f, m) {
              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, er.call(this, a, m), this.children = f || [], this.setAttribute("href", s);
            }
            setAttribute(s, a) {
              this.attributes[s] = a;
            }
            hasClass(s) {
              return N.contains(this.classes, s);
            }
            toNode() {
              return Ln.call(this, "a");
            }
            toMarkup() {
              return tr.call(this, "a");
            }
          }
          class Hn {
            constructor(s, a, f) {
              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 = a, this.src = s, this.classes = ["mord"], this.style = f;
            }
            hasClass(s) {
              return N.contains(this.classes, s);
            }
            toNode() {
              const s = document.createElement("img");
              s.src = this.src, s.alt = this.alt, s.className = "mord";
              for (const a in this.style)
                this.style.hasOwnProperty(a) && (s.style[a] = this.style[a]);
              return s;
            }
            toMarkup() {
              let s = '<img src="' + N.escape(this.src) + '"' + (' alt="' + N.escape(this.alt) + '"'), a = "";
              for (const f in this.style)
                this.style.hasOwnProperty(f) && (a += N.hyphenate(f) + ":" + this.style[f] + ";");
              return a && (s += ' style="' + N.escape(a) + '"'), s += "'/>", s;
            }
          }
          const Mr = {
            î: "ı̂",
            ï: "ı̈",
            í: "ı́",
            // 'ī': '\u0131\u0304', // enable when we add Extended Latin
            ì: "ı̀"
          };
          class Gt {
            constructor(s, a, f, m, b, w, D, F) {
              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 = s, this.height = a || 0, this.depth = f || 0, this.italic = m || 0, this.skew = b || 0, this.width = w || 0, this.classes = D || [], this.style = F || {}, this.maxFontSize = 0;
              const I = V(this.text.charCodeAt(0));
              I && this.classes.push(I + "_fallback"), /[îïíì]/.test(this.text) && (this.text = Mr[this.text]);
            }
            hasClass(s) {
              return N.contains(this.classes, s);
            }
            /**
             * Creates a text node or span from a symbol node. Note that a span is only
             * created if it is needed.
             */
            toNode() {
              const s = document.createTextNode(this.text);
              let a = null;
              this.italic > 0 && (a = document.createElement("span"), a.style.marginRight = oe(this.italic)), this.classes.length > 0 && (a = a || document.createElement("span"), a.className = nn(this.classes));
              for (const f in this.style)
                this.style.hasOwnProperty(f) && (a = a || document.createElement("span"), a.style[f] = this.style[f]);
              return a ? (a.appendChild(s), a) : s;
            }
            /**
             * Creates markup for a symbol node.
             */
            toMarkup() {
              let s = !1, a = "<span";
              this.classes.length && (s = !0, a += ' class="', a += N.escape(nn(this.classes)), a += '"');
              let f = "";
              this.italic > 0 && (f += "margin-right:" + this.italic + "em;");
              for (const b in this.style)
                this.style.hasOwnProperty(b) && (f += N.hyphenate(b) + ":" + this.style[b] + ";");
              f && (s = !0, a += ' style="' + N.escape(f) + '"');
              const m = N.escape(this.text);
              return s ? (a += ">", a += m, a += "</span>", a) : m;
            }
          }
          class Qt {
            constructor(s, a) {
              this.children = void 0, this.attributes = void 0, this.children = s || [], this.attributes = a || {};
            }
            toNode() {
              const a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
              for (const f in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, f) && a.setAttribute(f, this.attributes[f]);
              for (let f = 0; f < this.children.length; f++)
                a.appendChild(this.children[f].toNode());
              return a;
            }
            toMarkup() {
              let s = '<svg xmlns="http://www.w3.org/2000/svg"';
              for (const a in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, a) && (s += " " + a + '="' + N.escape(this.attributes[a]) + '"');
              s += ">";
              for (let a = 0; a < this.children.length; a++)
                s += this.children[a].toMarkup();
              return s += "</svg>", s;
            }
          }
          class dn {
            constructor(s, a) {
              this.pathName = void 0, this.alternate = void 0, this.pathName = s, this.alternate = a;
            }
            toNode() {
              const a = document.createElementNS("http://www.w3.org/2000/svg", "path");
              return this.alternate ? a.setAttribute("d", this.alternate) : a.setAttribute("d", _e[this.pathName]), a;
            }
            toMarkup() {
              return this.alternate ? '<path d="' + N.escape(this.alternate) + '"/>' : '<path d="' + N.escape(_e[this.pathName]) + '"/>';
            }
          }
          class d0 {
            constructor(s) {
              this.attributes = void 0, this.attributes = s || {};
            }
            toNode() {
              const a = document.createElementNS("http://www.w3.org/2000/svg", "line");
              for (const f in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, f) && a.setAttribute(f, this.attributes[f]);
              return a;
            }
            toMarkup() {
              let s = "<line";
              for (const a in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, a) && (s += " " + a + '="' + N.escape(this.attributes[a]) + '"');
              return s += "/>", s;
            }
          }
          function nr(i) {
            if (i instanceof Gt)
              return i;
            throw new Error("Expected symbolNode but got " + String(i) + ".");
          }
          function rr(i) {
            if (i instanceof t0)
              return i;
            throw new Error("Expected span<HtmlDomNode> but got " + String(i) + ".");
          }
          const sr = {
            bin: 1,
            close: 1,
            inner: 1,
            open: 1,
            punct: 1,
            rel: 1
          }, Br = {
            "accent-token": 1,
            mathord: 1,
            "op-token": 1,
            spacing: 1,
            textord: 1
          }, Wt = {
            math: {},
            text: {}
          };
          var P = Wt;
          function d(i, s, a, f, m, b) {
            Wt[i][m] = {
              font: s,
              group: a,
              replace: f
            }, b && f && (Wt[i][f] = Wt[i][m]);
          }
          const g = "math", Y = "text", y = "main", B = "ams", Be = "accent-token", fe = "bin", bt = "close", kn = "inner", ve = "mathord", ue = "op-token", G = "open", ae = "punct", T = "rel", Xe = "spacing", L = "textord";
          d(g, y, T, "≡", "\\equiv", !0), d(g, y, T, "≺", "\\prec", !0), d(g, y, T, "≻", "\\succ", !0), d(g, y, T, "∼", "\\sim", !0), d(g, y, T, "⊥", "\\perp"), d(g, y, T, "⪯", "\\preceq", !0), d(g, y, T, "⪰", "\\succeq", !0), d(g, y, T, "≃", "\\simeq", !0), d(g, y, T, "∣", "\\mid", !0), d(g, y, T, "≪", "\\ll", !0), d(g, y, T, "≫", "\\gg", !0), d(g, y, T, "≍", "\\asymp", !0), d(g, y, T, "∥", "\\parallel"), d(g, y, T, "⋈", "\\bowtie", !0), d(g, y, T, "⌣", "\\smile", !0), d(g, y, T, "⊑", "\\sqsubseteq", !0), d(g, y, T, "⊒", "\\sqsupseteq", !0), d(g, y, T, "≐", "\\doteq", !0), d(g, y, T, "⌢", "\\frown", !0), d(g, y, T, "∋", "\\ni", !0), d(g, y, T, "∝", "\\propto", !0), d(g, y, T, "⊢", "\\vdash", !0), d(g, y, T, "⊣", "\\dashv", !0), d(g, y, T, "∋", "\\owns"), d(g, y, ae, ".", "\\ldotp"), d(g, y, ae, "⋅", "\\cdotp"), d(g, y, L, "#", "\\#"), d(Y, y, L, "#", "\\#"), d(g, y, L, "&", "\\&"), d(Y, y, L, "&", "\\&"), d(g, y, L, "ℵ", "\\aleph", !0), d(g, y, L, "∀", "\\forall", !0), d(g, y, L, "ℏ", "\\hbar", !0), d(g, y, L, "∃", "\\exists", !0), d(g, y, L, "∇", "\\nabla", !0), d(g, y, L, "♭", "\\flat", !0), d(g, y, L, "ℓ", "\\ell", !0), d(g, y, L, "♮", "\\natural", !0), d(g, y, L, "♣", "\\clubsuit", !0), d(g, y, L, "℘", "\\wp", !0), d(g, y, L, "♯", "\\sharp", !0), d(g, y, L, "♢", "\\diamondsuit", !0), d(g, y, L, "ℜ", "\\Re", !0), d(g, y, L, "♡", "\\heartsuit", !0), d(g, y, L, "ℑ", "\\Im", !0), d(g, y, L, "♠", "\\spadesuit", !0), d(g, y, L, "§", "\\S", !0), d(Y, y, L, "§", "\\S"), d(g, y, L, "¶", "\\P", !0), d(Y, y, L, "¶", "\\P"), d(g, y, L, "†", "\\dag"), d(Y, y, L, "†", "\\dag"), d(Y, y, L, "†", "\\textdagger"), d(g, y, L, "‡", "\\ddag"), d(Y, y, L, "‡", "\\ddag"), d(Y, y, L, "‡", "\\textdaggerdbl"), d(g, y, bt, "⎱", "\\rmoustache", !0), d(g, y, G, "⎰", "\\lmoustache", !0), d(g, y, bt, "⟯", "\\rgroup", !0), d(g, y, G, "⟮", "\\lgroup", !0), d(g, y, fe, "∓", "\\mp", !0), d(g, y, fe, "⊖", "\\ominus", !0), d(g, y, fe, "⊎", "\\uplus", !0), d(g, y, fe, "⊓", "\\sqcap", !0), d(g, y, fe, "∗", "\\ast"), d(g, y, fe, "⊔", "\\sqcup", !0), d(g, y, fe, "◯", "\\bigcirc", !0), d(g, y, fe, "∙", "\\bullet", !0), d(g, y, fe, "‡", "\\ddagger"), d(g, y, fe, "≀", "\\wr", !0), d(g, y, fe, "⨿", "\\amalg"), d(g, y, fe, "&", "\\And"), d(g, y, T, "⟵", "\\longleftarrow", !0), d(g, y, T, "⇐", "\\Leftarrow", !0), d(g, y, T, "⟸", "\\Longleftarrow", !0), d(g, y, T, "⟶", "\\longrightarrow", !0), d(g, y, T, "⇒", "\\Rightarrow", !0), d(g, y, T, "⟹", "\\Longrightarrow", !0), d(g, y, T, "↔", "\\leftrightarrow", !0), d(g, y, T, "⟷", "\\longleftrightarrow", !0), d(g, y, T, "⇔", "\\Leftrightarrow", !0), d(g, y, T, "⟺", "\\Longleftrightarrow", !0), d(g, y, T, "↦", "\\mapsto", !0), d(g, y, T, "⟼", "\\longmapsto", !0), d(g, y, T, "↗", "\\nearrow", !0), d(g, y, T, "↩", "\\hookleftarrow", !0), d(g, y, T, "↪", "\\hookrightarrow", !0), d(g, y, T, "↘", "\\searrow", !0), d(g, y, T, "↼", "\\leftharpoonup", !0), d(g, y, T, "⇀", "\\rightharpoonup", !0), d(g, y, T, "↙", "\\swarrow", !0), d(g, y, T, "↽", "\\leftharpoondown", !0), d(g, y, T, "⇁", "\\rightharpoondown", !0), d(g, y, T, "↖", "\\nwarrow", !0), d(g, y, T, "⇌", "\\rightleftharpoons", !0), d(g, B, T, "≮", "\\nless", !0), d(g, B, T, "", "\\@nleqslant"), d(g, B, T, "", "\\@nleqq"), d(g, B, T, "⪇", "\\lneq", !0), d(g, B, T, "≨", "\\lneqq", !0), d(g, B, T, "", "\\@lvertneqq"), d(g, B, T, "⋦", "\\lnsim", !0), d(g, B, T, "⪉", "\\lnapprox", !0), d(g, B, T, "⊀", "\\nprec", !0), d(g, B, T, "⋠", "\\npreceq", !0), d(g, B, T, "⋨", "\\precnsim", !0), d(g, B, T, "⪹", "\\precnapprox", !0), d(g, B, T, "≁", "\\nsim", !0), d(g, B, T, "", "\\@nshortmid"), d(g, B, T, "∤", "\\nmid", !0), d(g, B, T, "⊬", "\\nvdash", !0), d(g, B, T, "⊭", "\\nvDash", !0), d(g, B, T, "⋪", "\\ntriangleleft"), d(g, B, T, "⋬", "\\ntrianglelefteq", !0), d(g, B, T, "⊊", "\\subsetneq", !0), d(g, B, T, "", "\\@varsubsetneq"), d(g, B, T, "⫋", "\\subsetneqq", !0), d(g, B, T, "", "\\@varsubsetneqq"), d(g, B, T, "≯", "\\ngtr", !0), d(g, B, T, "", "\\@ngeqslant"), d(g, B, T, "", "\\@ngeqq"), d(g, B, T, "⪈", "\\gneq", !0), d(g, B, T, "≩", "\\gneqq", !0), d(g, B, T, "", "\\@gvertneqq"), d(g, B, T, "⋧", "\\gnsim", !0), d(g, B, T, "⪊", "\\gnapprox", !0), d(g, B, T, "⊁", "\\nsucc", !0), d(g, B, T, "⋡", "\\nsucceq", !0), d(g, B, T, "⋩", "\\succnsim", !0), d(g, B, T, "⪺", "\\succnapprox", !0), d(g, B, T, "≆", "\\ncong", !0), d(g, B, T, "", "\\@nshortparallel"), d(g, B, T, "∦", "\\nparallel", !0), d(g, B, T, "⊯", "\\nVDash", !0), d(g, B, T, "⋫", "\\ntriangleright"), d(g, B, T, "⋭", "\\ntrianglerighteq", !0), d(g, B, T, "", "\\@nsupseteqq"), d(g, B, T, "⊋", "\\supsetneq", !0), d(g, B, T, "", "\\@varsupsetneq"), d(g, B, T, "⫌", "\\supsetneqq", !0), d(g, B, T, "", "\\@varsupsetneqq"), d(g, B, T, "⊮", "\\nVdash", !0), d(g, B, T, "⪵", "\\precneqq", !0), d(g, B, T, "⪶", "\\succneqq", !0), d(g, B, T, "", "\\@nsubseteqq"), d(g, B, fe, "⊴", "\\unlhd"), d(g, B, fe, "⊵", "\\unrhd"), d(g, B, T, "↚", "\\nleftarrow", !0), d(g, B, T, "↛", "\\nrightarrow", !0), d(g, B, T, "⇍", "\\nLeftarrow", !0), d(g, B, T, "⇏", "\\nRightarrow", !0), d(g, B, T, "↮", "\\nleftrightarrow", !0), d(g, B, T, "⇎", "\\nLeftrightarrow", !0), d(g, B, T, "△", "\\vartriangle"), d(g, B, L, "ℏ", "\\hslash"), d(g, B, L, "▽", "\\triangledown"), d(g, B, L, "◊", "\\lozenge"), d(g, B, L, "Ⓢ", "\\circledS"), d(g, B, L, "®", "\\circledR"), d(Y, B, L, "®", "\\circledR"), d(g, B, L, "∡", "\\measuredangle", !0), d(g, B, L, "∄", "\\nexists"), d(g, B, L, "℧", "\\mho"), d(g, B, L, "Ⅎ", "\\Finv", !0), d(g, B, L, "⅁", "\\Game", !0), d(g, B, L, "‵", "\\backprime"), d(g, B, L, "▲", "\\blacktriangle"), d(g, B, L, "▼", "\\blacktriangledown"), d(g, B, L, "■", "\\blacksquare"), d(g, B, L, "⧫", "\\blacklozenge"), d(g, B, L, "★", "\\bigstar"), d(g, B, L, "∢", "\\sphericalangle", !0), d(g, B, L, "∁", "\\complement", !0), d(g, B, L, "ð", "\\eth", !0), d(Y, y, L, "ð", "ð"), d(g, B, L, "╱", "\\diagup"), d(g, B, L, "╲", "\\diagdown"), d(g, B, L, "□", "\\square"), d(g, B, L, "□", "\\Box"), d(g, B, L, "◊", "\\Diamond"), d(g, B, L, "¥", "\\yen", !0), d(Y, B, L, "¥", "\\yen", !0), d(g, B, L, "✓", "\\checkmark", !0), d(Y, B, L, "✓", "\\checkmark"), d(g, B, L, "ℶ", "\\beth", !0), d(g, B, L, "ℸ", "\\daleth", !0), d(g, B, L, "ℷ", "\\gimel", !0), d(g, B, L, "ϝ", "\\digamma", !0), d(g, B, L, "ϰ", "\\varkappa"), d(g, B, G, "┌", "\\@ulcorner", !0), d(g, B, bt, "┐", "\\@urcorner", !0), d(g, B, G, "└", "\\@llcorner", !0), d(g, B, bt, "┘", "\\@lrcorner", !0), d(g, B, T, "≦", "\\leqq", !0), d(g, B, T, "⩽", "\\leqslant", !0), d(g, B, T, "⪕", "\\eqslantless", !0), d(g, B, T, "≲", "\\lesssim", !0), d(g, B, T, "⪅", "\\lessapprox", !0), d(g, B, T, "≊", "\\approxeq", !0), d(g, B, fe, "⋖", "\\lessdot"), d(g, B, T, "⋘", "\\lll", !0), d(g, B, T, "≶", "\\lessgtr", !0), d(g, B, T, "⋚", "\\lesseqgtr", !0), d(g, B, T, "⪋", "\\lesseqqgtr", !0), d(g, B, T, "≑", "\\doteqdot"), d(g, B, T, "≓", "\\risingdotseq", !0), d(g, B, T, "≒", "\\fallingdotseq", !0), d(g, B, T, "∽", "\\backsim", !0), d(g, B, T, "⋍", "\\backsimeq", !0), d(g, B, T, "⫅", "\\subseteqq", !0), d(g, B, T, "⋐", "\\Subset", !0), d(g, B, T, "⊏", "\\sqsubset", !0), d(g, B, T, "≼", "\\preccurlyeq", !0), d(g, B, T, "⋞", "\\curlyeqprec", !0), d(g, B, T, "≾", "\\precsim", !0), d(g, B, T, "⪷", "\\precapprox", !0), d(g, B, T, "⊲", "\\vartriangleleft"), d(g, B, T, "⊴", "\\trianglelefteq"), d(g, B, T, "⊨", "\\vDash", !0), d(g, B, T, "⊪", "\\Vvdash", !0), d(g, B, T, "⌣", "\\smallsmile"), d(g, B, T, "⌢", "\\smallfrown"), d(g, B, T, "≏", "\\bumpeq", !0), d(g, B, T, "≎", "\\Bumpeq", !0), d(g, B, T, "≧", "\\geqq", !0), d(g, B, T, "⩾", "\\geqslant", !0), d(g, B, T, "⪖", "\\eqslantgtr", !0), d(g, B, T, "≳", "\\gtrsim", !0), d(g, B, T, "⪆", "\\gtrapprox", !0), d(g, B, fe, "⋗", "\\gtrdot"), d(g, B, T, "⋙", "\\ggg", !0), d(g, B, T, "≷", "\\gtrless", !0), d(g, B, T, "⋛", "\\gtreqless", !0), d(g, B, T, "⪌", "\\gtreqqless", !0), d(g, B, T, "≖", "\\eqcirc", !0), d(g, B, T, "≗", "\\circeq", !0), d(g, B, T, "≜", "\\triangleq", !0), d(g, B, T, "∼", "\\thicksim"), d(g, B, T, "≈", "\\thickapprox"), d(g, B, T, "⫆", "\\supseteqq", !0), d(g, B, T, "⋑", "\\Supset", !0), d(g, B, T, "⊐", "\\sqsupset", !0), d(g, B, T, "≽", "\\succcurlyeq", !0), d(g, B, T, "⋟", "\\curlyeqsucc", !0), d(g, B, T, "≿", "\\succsim", !0), d(g, B, T, "⪸", "\\succapprox", !0), d(g, B, T, "⊳", "\\vartriangleright"), d(g, B, T, "⊵", "\\trianglerighteq"), d(g, B, T, "⊩", "\\Vdash", !0), d(g, B, T, "∣", "\\shortmid"), d(g, B, T, "∥", "\\shortparallel"), d(g, B, T, "≬", "\\between", !0), d(g, B, T, "⋔", "\\pitchfork", !0), d(g, B, T, "∝", "\\varpropto"), d(g, B, T, "◀", "\\blacktriangleleft"), d(g, B, T, "∴", "\\therefore", !0), d(g, B, T, "∍", "\\backepsilon"), d(g, B, T, "▶", "\\blacktriangleright"), d(g, B, T, "∵", "\\because", !0), d(g, B, T, "⋘", "\\llless"), d(g, B, T, "⋙", "\\gggtr"), d(g, B, fe, "⊲", "\\lhd"), d(g, B, fe, "⊳", "\\rhd"), d(g, B, T, "≂", "\\eqsim", !0), d(g, y, T, "⋈", "\\Join"), d(g, B, T, "≑", "\\Doteq", !0), d(g, B, fe, "∔", "\\dotplus", !0), d(g, B, fe, "∖", "\\smallsetminus"), d(g, B, fe, "⋒", "\\Cap", !0), d(g, B, fe, "⋓", "\\Cup", !0), d(g, B, fe, "⩞", "\\doublebarwedge", !0), d(g, B, fe, "⊟", "\\boxminus", !0), d(g, B, fe, "⊞", "\\boxplus", !0), d(g, B, fe, "⋇", "\\divideontimes", !0), d(g, B, fe, "⋉", "\\ltimes", !0), d(g, B, fe, "⋊", "\\rtimes", !0), d(g, B, fe, "⋋", "\\leftthreetimes", !0), d(g, B, fe, "⋌", "\\rightthreetimes", !0), d(g, B, fe, "⋏", "\\curlywedge", !0), d(g, B, fe, "⋎", "\\curlyvee", !0), d(g, B, fe, "⊝", "\\circleddash", !0), d(g, B, fe, "⊛", "\\circledast", !0), d(g, B, fe, "⋅", "\\centerdot"), d(g, B, fe, "⊺", "\\intercal", !0), d(g, B, fe, "⋒", "\\doublecap"), d(g, B, fe, "⋓", "\\doublecup"), d(g, B, fe, "⊠", "\\boxtimes", !0), d(g, B, T, "⇢", "\\dashrightarrow", !0), d(g, B, T, "⇠", "\\dashleftarrow", !0), d(g, B, T, "⇇", "\\leftleftarrows", !0), d(g, B, T, "⇆", "\\leftrightarrows", !0), d(g, B, T, "⇚", "\\Lleftarrow", !0), d(g, B, T, "↞", "\\twoheadleftarrow", !0), d(g, B, T, "↢", "\\leftarrowtail", !0), d(g, B, T, "↫", "\\looparrowleft", !0), d(g, B, T, "⇋", "\\leftrightharpoons", !0), d(g, B, T, "↶", "\\curvearrowleft", !0), d(g, B, T, "↺", "\\circlearrowleft", !0), d(g, B, T, "↰", "\\Lsh", !0), d(g, B, T, "⇈", "\\upuparrows", !0), d(g, B, T, "↿", "\\upharpoonleft", !0), d(g, B, T, "⇃", "\\downharpoonleft", !0), d(g, y, T, "⊶", "\\origof", !0), d(g, y, T, "⊷", "\\imageof", !0), d(g, B, T, "⊸", "\\multimap", !0), d(g, B, T, "↭", "\\leftrightsquigarrow", !0), d(g, B, T, "⇉", "\\rightrightarrows", !0), d(g, B, T, "⇄", "\\rightleftarrows", !0), d(g, B, T, "↠", "\\twoheadrightarrow", !0), d(g, B, T, "↣", "\\rightarrowtail", !0), d(g, B, T, "↬", "\\looparrowright", !0), d(g, B, T, "↷", "\\curvearrowright", !0), d(g, B, T, "↻", "\\circlearrowright", !0), d(g, B, T, "↱", "\\Rsh", !0), d(g, B, T, "⇊", "\\downdownarrows", !0), d(g, B, T, "↾", "\\upharpoonright", !0), d(g, B, T, "⇂", "\\downharpoonright", !0), d(g, B, T, "⇝", "\\rightsquigarrow", !0), d(g, B, T, "⇝", "\\leadsto"), d(g, B, T, "⇛", "\\Rrightarrow", !0), d(g, B, T, "↾", "\\restriction"), d(g, y, L, "‘", "`"), d(g, y, L, "$", "\\$"), d(Y, y, L, "$", "\\$"), d(Y, y, L, "$", "\\textdollar"), d(g, y, L, "%", "\\%"), d(Y, y, L, "%", "\\%"), d(g, y, L, "_", "\\_"), d(Y, y, L, "_", "\\_"), d(Y, y, L, "_", "\\textunderscore"), d(g, y, L, "∠", "\\angle", !0), d(g, y, L, "∞", "\\infty", !0), d(g, y, L, "′", "\\prime"), d(g, y, L, "△", "\\triangle"), d(g, y, L, "Γ", "\\Gamma", !0), d(g, y, L, "Δ", "\\Delta", !0), d(g, y, L, "Θ", "\\Theta", !0), d(g, y, L, "Λ", "\\Lambda", !0), d(g, y, L, "Ξ", "\\Xi", !0), d(g, y, L, "Π", "\\Pi", !0), d(g, y, L, "Σ", "\\Sigma", !0), d(g, y, L, "Υ", "\\Upsilon", !0), d(g, y, L, "Φ", "\\Phi", !0), d(g, y, L, "Ψ", "\\Psi", !0), d(g, y, L, "Ω", "\\Omega", !0), d(g, y, L, "A", "Α"), d(g, y, L, "B", "Β"), d(g, y, L, "E", "Ε"), d(g, y, L, "Z", "Ζ"), d(g, y, L, "H", "Η"), d(g, y, L, "I", "Ι"), d(g, y, L, "K", "Κ"), d(g, y, L, "M", "Μ"), d(g, y, L, "N", "Ν"), d(g, y, L, "O", "Ο"), d(g, y, L, "P", "Ρ"), d(g, y, L, "T", "Τ"), d(g, y, L, "X", "Χ"), d(g, y, L, "¬", "\\neg", !0), d(g, y, L, "¬", "\\lnot"), d(g, y, L, "⊤", "\\top"), d(g, y, L, "⊥", "\\bot"), d(g, y, L, "∅", "\\emptyset"), d(g, B, L, "∅", "\\varnothing"), d(g, y, ve, "α", "\\alpha", !0), d(g, y, ve, "β", "\\beta", !0), d(g, y, ve, "γ", "\\gamma", !0), d(g, y, ve, "δ", "\\delta", !0), d(g, y, ve, "ϵ", "\\epsilon", !0), d(g, y, ve, "ζ", "\\zeta", !0), d(g, y, ve, "η", "\\eta", !0), d(g, y, ve, "θ", "\\theta", !0), d(g, y, ve, "ι", "\\iota", !0), d(g, y, ve, "κ", "\\kappa", !0), d(g, y, ve, "λ", "\\lambda", !0), d(g, y, ve, "μ", "\\mu", !0), d(g, y, ve, "ν", "\\nu", !0), d(g, y, ve, "ξ", "\\xi", !0), d(g, y, ve, "ο", "\\omicron", !0), d(g, y, ve, "π", "\\pi", !0), d(g, y, ve, "ρ", "\\rho", !0), d(g, y, ve, "σ", "\\sigma", !0), d(g, y, ve, "τ", "\\tau", !0), d(g, y, ve, "υ", "\\upsilon", !0), d(g, y, ve, "ϕ", "\\phi", !0), d(g, y, ve, "χ", "\\chi", !0), d(g, y, ve, "ψ", "\\psi", !0), d(g, y, ve, "ω", "\\omega", !0), d(g, y, ve, "ε", "\\varepsilon", !0), d(g, y, ve, "ϑ", "\\vartheta", !0), d(g, y, ve, "ϖ", "\\varpi", !0), d(g, y, ve, "ϱ", "\\varrho", !0), d(g, y, ve, "ς", "\\varsigma", !0), d(g, y, ve, "φ", "\\varphi", !0), d(g, y, fe, "∗", "*", !0), d(g, y, fe, "+", "+"), d(g, y, fe, "−", "-", !0), d(g, y, fe, "⋅", "\\cdot", !0), d(g, y, fe, "∘", "\\circ", !0), d(g, y, fe, "÷", "\\div", !0), d(g, y, fe, "±", "\\pm", !0), d(g, y, fe, "×", "\\times", !0), d(g, y, fe, "∩", "\\cap", !0), d(g, y, fe, "∪", "\\cup", !0), d(g, y, fe, "∖", "\\setminus", !0), d(g, y, fe, "∧", "\\land"), d(g, y, fe, "∨", "\\lor"), d(g, y, fe, "∧", "\\wedge", !0), d(g, y, fe, "∨", "\\vee", !0), d(g, y, L, "√", "\\surd"), d(g, y, G, "⟨", "\\langle", !0), d(g, y, G, "∣", "\\lvert"), d(g, y, G, "∥", "\\lVert"), d(g, y, bt, "?", "?"), d(g, y, bt, "!", "!"), d(g, y, bt, "⟩", "\\rangle", !0), d(g, y, bt, "∣", "\\rvert"), d(g, y, bt, "∥", "\\rVert"), d(g, y, T, "=", "="), d(g, y, T, ":", ":"), d(g, y, T, "≈", "\\approx", !0), d(g, y, T, "≅", "\\cong", !0), d(g, y, T, "≥", "\\ge"), d(g, y, T, "≥", "\\geq", !0), d(g, y, T, "←", "\\gets"), d(g, y, T, ">", "\\gt", !0), d(g, y, T, "∈", "\\in", !0), d(g, y, T, "", "\\@not"), d(g, y, T, "⊂", "\\subset", !0), d(g, y, T, "⊃", "\\supset", !0), d(g, y, T, "⊆", "\\subseteq", !0), d(g, y, T, "⊇", "\\supseteq", !0), d(g, B, T, "⊈", "\\nsubseteq", !0), d(g, B, T, "⊉", "\\nsupseteq", !0), d(g, y, T, "⊨", "\\models"), d(g, y, T, "←", "\\leftarrow", !0), d(g, y, T, "≤", "\\le"), d(g, y, T, "≤", "\\leq", !0), d(g, y, T, "<", "\\lt", !0), d(g, y, T, "→", "\\rightarrow", !0), d(g, y, T, "→", "\\to"), d(g, B, T, "≱", "\\ngeq", !0), d(g, B, T, "≰", "\\nleq", !0), d(g, y, Xe, " ", "\\ "), d(g, y, Xe, " ", "\\space"), d(g, y, Xe, " ", "\\nobreakspace"), d(Y, y, Xe, " ", "\\ "), d(Y, y, Xe, " ", " "), d(Y, y, Xe, " ", "\\space"), d(Y, y, Xe, " ", "\\nobreakspace"), d(g, y, Xe, null, "\\nobreak"), d(g, y, Xe, null, "\\allowbreak"), d(g, y, ae, ",", ","), d(g, y, ae, ";", ";"), d(g, B, fe, "⊼", "\\barwedge", !0), d(g, B, fe, "⊻", "\\veebar", !0), d(g, y, fe, "⊙", "\\odot", !0), d(g, y, fe, "⊕", "\\oplus", !0), d(g, y, fe, "⊗", "\\otimes", !0), d(g, y, L, "∂", "\\partial", !0), d(g, y, fe, "⊘", "\\oslash", !0), d(g, B, fe, "⊚", "\\circledcirc", !0), d(g, B, fe, "⊡", "\\boxdot", !0), d(g, y, fe, "△", "\\bigtriangleup"), d(g, y, fe, "▽", "\\bigtriangledown"), d(g, y, fe, "†", "\\dagger"), d(g, y, fe, "⋄", "\\diamond"), d(g, y, fe, "⋆", "\\star"), d(g, y, fe, "◃", "\\triangleleft"), d(g, y, fe, "▹", "\\triangleright"), d(g, y, G, "{", "\\{"), d(Y, y, L, "{", "\\{"), d(Y, y, L, "{", "\\textbraceleft"), d(g, y, bt, "}", "\\}"), d(Y, y, L, "}", "\\}"), d(Y, y, L, "}", "\\textbraceright"), d(g, y, G, "{", "\\lbrace"), d(g, y, bt, "}", "\\rbrace"), d(g, y, G, "[", "\\lbrack", !0), d(Y, y, L, "[", "\\lbrack", !0), d(g, y, bt, "]", "\\rbrack", !0), d(Y, y, L, "]", "\\rbrack", !0), d(g, y, G, "(", "\\lparen", !0), d(g, y, bt, ")", "\\rparen", !0), d(Y, y, L, "<", "\\textless", !0), d(Y, y, L, ">", "\\textgreater", !0), d(g, y, G, "⌊", "\\lfloor", !0), d(g, y, bt, "⌋", "\\rfloor", !0), d(g, y, G, "⌈", "\\lceil", !0), d(g, y, bt, "⌉", "\\rceil", !0), d(g, y, L, "\\", "\\backslash"), d(g, y, L, "∣", "|"), d(g, y, L, "∣", "\\vert"), d(Y, y, L, "|", "\\textbar", !0), d(g, y, L, "∥", "\\|"), d(g, y, L, "∥", "\\Vert"), d(Y, y, L, "∥", "\\textbardbl"), d(Y, y, L, "~", "\\textasciitilde"), d(Y, y, L, "\\", "\\textbackslash"), d(Y, y, L, "^", "\\textasciicircum"), d(g, y, T, "↑", "\\uparrow", !0), d(g, y, T, "⇑", "\\Uparrow", !0), d(g, y, T, "↓", "\\downarrow", !0), d(g, y, T, "⇓", "\\Downarrow", !0), d(g, y, T, "↕", "\\updownarrow", !0), d(g, y, T, "⇕", "\\Updownarrow", !0), d(g, y, ue, "∐", "\\coprod"), d(g, y, ue, "⋁", "\\bigvee"), d(g, y, ue, "⋀", "\\bigwedge"), d(g, y, ue, "⨄", "\\biguplus"), d(g, y, ue, "⋂", "\\bigcap"), d(g, y, ue, "⋃", "\\bigcup"), d(g, y, ue, "∫", "\\int"), d(g, y, ue, "∫", "\\intop"), d(g, y, ue, "∬", "\\iint"), d(g, y, ue, "∭", "\\iiint"), d(g, y, ue, "∏", "\\prod"), d(g, y, ue, "∑", "\\sum"), d(g, y, ue, "⨂", "\\bigotimes"), d(g, y, ue, "⨁", "\\bigoplus"), d(g, y, ue, "⨀", "\\bigodot"), d(g, y, ue, "∮", "\\oint"), d(g, y, ue, "∯", "\\oiint"), d(g, y, ue, "∰", "\\oiiint"), d(g, y, ue, "⨆", "\\bigsqcup"), d(g, y, ue, "∫", "\\smallint"), d(Y, y, kn, "…", "\\textellipsis"), d(g, y, kn, "…", "\\mathellipsis"), d(Y, y, kn, "…", "\\ldots", !0), d(g, y, kn, "…", "\\ldots", !0), d(g, y, kn, "⋯", "\\@cdots", !0), d(g, y, kn, "⋱", "\\ddots", !0), d(g, y, L, "⋮", "\\varvdots"), d(g, y, Be, "ˊ", "\\acute"), d(g, y, Be, "ˋ", "\\grave"), d(g, y, Be, "¨", "\\ddot"), d(g, y, Be, "~", "\\tilde"), d(g, y, Be, "ˉ", "\\bar"), d(g, y, Be, "˘", "\\breve"), d(g, y, Be, "ˇ", "\\check"), d(g, y, Be, "^", "\\hat"), d(g, y, Be, "⃗", "\\vec"), d(g, y, Be, "˙", "\\dot"), d(g, y, Be, "˚", "\\mathring"), d(g, y, ve, "", "\\@imath"), d(g, y, ve, "", "\\@jmath"), d(g, y, L, "ı", "ı"), d(g, y, L, "ȷ", "ȷ"), d(Y, y, L, "ı", "\\i", !0), d(Y, y, L, "ȷ", "\\j", !0), d(Y, y, L, "ß", "\\ss", !0), d(Y, y, L, "æ", "\\ae", !0), d(Y, y, L, "œ", "\\oe", !0), d(Y, y, L, "ø", "\\o", !0), d(Y, y, L, "Æ", "\\AE", !0), d(Y, y, L, "Œ", "\\OE", !0), d(Y, y, L, "Ø", "\\O", !0), d(Y, y, Be, "ˊ", "\\'"), d(Y, y, Be, "ˋ", "\\`"), d(Y, y, Be, "ˆ", "\\^"), d(Y, y, Be, "˜", "\\~"), d(Y, y, Be, "ˉ", "\\="), d(Y, y, Be, "˘", "\\u"), d(Y, y, Be, "˙", "\\."), d(Y, y, Be, "¸", "\\c"), d(Y, y, Be, "˚", "\\r"), d(Y, y, Be, "ˇ", "\\v"), d(Y, y, Be, "¨", '\\"'), d(Y, y, Be, "˝", "\\H"), d(Y, y, Be, "◯", "\\textcircled");
          const Lt = {
            "--": !0,
            "---": !0,
            "``": !0,
            "''": !0
          };
          d(Y, y, L, "–", "--", !0), d(Y, y, L, "–", "\\textendash"), d(Y, y, L, "—", "---", !0), d(Y, y, L, "—", "\\textemdash"), d(Y, y, L, "‘", "`", !0), d(Y, y, L, "‘", "\\textquoteleft"), d(Y, y, L, "’", "'", !0), d(Y, y, L, "’", "\\textquoteright"), d(Y, y, L, "“", "``", !0), d(Y, y, L, "“", "\\textquotedblleft"), d(Y, y, L, "”", "''", !0), d(Y, y, L, "”", "\\textquotedblright"), d(g, y, L, "°", "\\degree", !0), d(Y, y, L, "°", "\\degree"), d(Y, y, L, "°", "\\textdegree", !0), d(g, y, L, "£", "\\pounds"), d(g, y, L, "£", "\\mathsterling", !0), d(Y, y, L, "£", "\\pounds"), d(Y, y, L, "£", "\\textsterling", !0), d(g, B, L, "✠", "\\maltese"), d(Y, B, L, "✠", "\\maltese");
          const jt = '0123456789/@."';
          for (let i = 0; i < jt.length; i++) {
            const s = jt.charAt(i);
            d(g, y, L, s, s);
          }
          const Pn = '0123456789!@*()-=+";:?/.,';
          for (let i = 0; i < Pn.length; i++) {
            const s = Pn.charAt(i);
            d(Y, y, L, s, s);
          }
          const qn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
          for (let i = 0; i < qn.length; i++) {
            const s = qn.charAt(i);
            d(g, y, ve, s, s), d(Y, y, L, s, s);
          }
          d(g, B, L, "C", "ℂ"), d(Y, B, L, "C", "ℂ"), d(g, B, L, "H", "ℍ"), d(Y, B, L, "H", "ℍ"), d(g, B, L, "N", "ℕ"), d(Y, B, L, "N", "ℕ"), d(g, B, L, "P", "ℙ"), d(Y, B, L, "P", "ℙ"), d(g, B, L, "Q", "ℚ"), d(Y, B, L, "Q", "ℚ"), d(g, B, L, "R", "ℝ"), d(Y, B, L, "R", "ℝ"), d(g, B, L, "Z", "ℤ"), d(Y, B, L, "Z", "ℤ"), d(g, y, ve, "h", "ℎ"), d(Y, y, ve, "h", "ℎ");
          let ke = "";
          for (let i = 0; i < qn.length; i++) {
            const s = qn.charAt(i);
            ke = String.fromCharCode(55349, 56320 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56372 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56424 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56580 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56684 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56736 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56788 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56840 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56944 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), i < 26 && (ke = String.fromCharCode(55349, 56632 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 56476 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke));
          }
          ke = "𝕜", d(g, y, ve, "k", ke), d(Y, y, L, "k", ke);
          for (let i = 0; i < 10; i++) {
            const s = i.toString();
            ke = String.fromCharCode(55349, 57294 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 57314 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 57324 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke), ke = String.fromCharCode(55349, 57334 + i), d(g, y, ve, s, ke), d(Y, y, L, s, ke);
          }
          const ir = "ÐÞþ";
          for (let i = 0; i < ir.length; i++) {
            const s = ir.charAt(i);
            d(g, y, ve, s, s), d(Y, y, L, s, s);
          }
          const O0 = [
            ["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
          ], mo = [
            ["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
          ], o4 = function(i, s) {
            const a = i.charCodeAt(0), f = i.charCodeAt(1), m = (a - 55296) * 1024 + (f - 56320) + 65536, b = s === "math" ? 0 : 1;
            if (119808 <= m && m < 120484) {
              const w = Math.floor((m - 119808) / 26);
              return [O0[w][2], O0[w][b]];
            } else if (120782 <= m && m <= 120831) {
              const w = Math.floor((m - 120782) / 10);
              return [mo[w][2], mo[w][b]];
            } else {
              if (m === 120485 || m === 120486)
                return [O0[0][2], O0[0][b]];
              if (120486 < m && m < 120782)
                return ["", ""];
              throw new o("Unsupported character: " + i);
            }
          }, Ss = function(i, s, a) {
            return P[a][i] && P[a][i].replace && (i = P[a][i].replace), {
              value: i,
              metrics: Te(i, s, a)
            };
          }, Bn = function(i, s, a, f, m) {
            const b = Ss(i, s, a), w = b.metrics;
            i = b.value;
            let D;
            if (w) {
              let F = w.italic;
              (a === "text" || f && f.font === "mathit") && (F = 0), D = new Gt(i, w.height, w.depth, F, w.skew, w.width, m);
            } else
              typeof console < "u" && console.warn("No character metrics " + ("for '" + i + "' in style '" + s + "' and mode '" + a + "'")), D = new Gt(i, 0, 0, 0, 0, 0, m);
            if (f) {
              D.maxFontSize = f.sizeMultiplier, f.style.isTight() && D.classes.push("mtight");
              const F = f.getColor();
              F && (D.style.color = F);
            }
            return D;
          }, u4 = function(i, s, a, f) {
            return f === void 0 && (f = []), a.font === "boldsymbol" && Ss(i, "Main-Bold", s).metrics ? Bn(i, "Main-Bold", s, a, f.concat(["mathbf"])) : i === "\\" || P[s][i].font === "main" ? Bn(i, "Main-Regular", s, a, f) : Bn(i, "AMS-Regular", s, a, f.concat(["amsrm"]));
          }, c4 = function(i, s, a, f, m) {
            return m !== "textord" && Ss(i, "Math-BoldItalic", s).metrics ? {
              fontName: "Math-BoldItalic",
              fontClass: "boldsymbol"
            } : {
              fontName: "Main-Bold",
              fontClass: "mathbf"
            };
          }, f4 = function(i, s, a) {
            const f = i.mode, m = i.text, b = ["mord"], w = f === "math" || f === "text" && s.font, D = w ? s.font : s.fontFamily;
            let F = "", I = "";
            if (m.charCodeAt(0) === 55349 && ([F, I] = o4(m, f)), F.length > 0)
              return Bn(m, F, f, s, b.concat(I));
            if (D) {
              let j, W;
              if (D === "boldsymbol") {
                const Z = c4(m, f, s, b, a);
                j = Z.fontName, W = [Z.fontClass];
              } else
                w ? (j = _o[D].fontName, W = [D]) : (j = Es(D, s.fontWeight, s.fontShape), W = [D, s.fontWeight, s.fontShape]);
              if (Ss(m, j, f).metrics)
                return Bn(m, j, f, s, b.concat(W));
              if (Lt.hasOwnProperty(m) && j.slice(0, 10) === "Typewriter") {
                const Z = [];
                for (let re = 0; re < m.length; re++)
                  Z.push(Bn(m[re], j, f, s, b.concat(W)));
                return go(Z);
              }
            }
            if (a === "mathord")
              return Bn(m, "Math-Italic", f, s, b.concat(["mathnormal"]));
            if (a === "textord") {
              const j = P[f][m] && P[f][m].font;
              if (j === "ams") {
                const W = Es("amsrm", s.fontWeight, s.fontShape);
                return Bn(m, W, f, s, b.concat("amsrm", s.fontWeight, s.fontShape));
              } else if (j === "main" || !j) {
                const W = Es("textrm", s.fontWeight, s.fontShape);
                return Bn(m, W, f, s, b.concat(s.fontWeight, s.fontShape));
              } else {
                const W = Es(j, s.fontWeight, s.fontShape);
                return Bn(m, W, f, s, b.concat(W, s.fontWeight, s.fontShape));
              }
            } else
              throw new Error("unexpected type: " + a + " in makeOrd");
          }, h4 = (i, s) => {
            if (nn(i.classes) !== nn(s.classes) || i.skew !== s.skew || i.maxFontSize !== s.maxFontSize)
              return !1;
            if (i.classes.length === 1) {
              const a = i.classes[0];
              if (a === "mbin" || a === "mord")
                return !1;
            }
            for (const a in i.style)
              if (i.style.hasOwnProperty(a) && i.style[a] !== s.style[a])
                return !1;
            for (const a in s.style)
              if (s.style.hasOwnProperty(a) && i.style[a] !== s.style[a])
                return !1;
            return !0;
          }, d4 = (i) => {
            for (let s = 0; s < i.length - 1; s++) {
              const a = i[s], f = i[s + 1];
              a instanceof Gt && f instanceof Gt && h4(a, f) && (a.text += f.text, a.height = Math.max(a.height, f.height), a.depth = Math.max(a.depth, f.depth), a.italic = f.italic, i.splice(s + 1, 1), s--);
            }
            return i;
          }, el = function(i) {
            let s = 0, a = 0, f = 0;
            for (let m = 0; m < i.children.length; m++) {
              const b = i.children[m];
              b.height > s && (s = b.height), b.depth > a && (a = b.depth), b.maxFontSize > f && (f = b.maxFontSize);
            }
            i.height = s, i.depth = a, i.maxFontSize = f;
          }, rn = function(i, s, a, f) {
            const m = new t0(i, s, a, f);
            return el(m), m;
          }, po = (i, s, a, f) => new t0(i, s, a, f), m4 = function(i, s, a) {
            const f = rn([i], [], s);
            return f.height = Math.max(a || s.fontMetrics().defaultRuleThickness, s.minRuleThickness), f.style.borderBottomWidth = oe(f.height), f.maxFontSize = 1, f;
          }, p4 = function(i, s, a, f) {
            const m = new kt(i, s, a, f);
            return el(m), m;
          }, go = function(i) {
            const s = new at(i);
            return el(s), s;
          }, g4 = function(i, s) {
            return i instanceof at ? rn([], [i], s) : i;
          }, _4 = function(i) {
            if (i.positionType === "individualShift") {
              const a = i.children, f = [a[0]], m = -a[0].shift - a[0].elem.depth;
              let b = m;
              for (let w = 1; w < a.length; w++) {
                const D = -a[w].shift - b - a[w].elem.depth, F = D - (a[w - 1].elem.height + a[w - 1].elem.depth);
                b = b + D, f.push({
                  type: "kern",
                  size: F
                }), f.push(a[w]);
              }
              return {
                children: f,
                depth: m
              };
            }
            let s;
            if (i.positionType === "top") {
              let a = i.positionData;
              for (let f = 0; f < i.children.length; f++) {
                const m = i.children[f];
                a -= m.type === "kern" ? m.size : m.elem.height + m.elem.depth;
              }
              s = a;
            } else if (i.positionType === "bottom")
              s = -i.positionData;
            else {
              const a = i.children[0];
              if (a.type !== "elem")
                throw new Error('First child must have type "elem".');
              if (i.positionType === "shift")
                s = -a.elem.depth - i.positionData;
              else if (i.positionType === "firstBaseline")
                s = -a.elem.depth;
              else
                throw new Error("Invalid positionType " + i.positionType + ".");
            }
            return {
              children: i.children,
              depth: s
            };
          }, b4 = function(i, s) {
            const {
              children: a,
              depth: f
            } = _4(i);
            let m = 0;
            for (let re = 0; re < a.length; re++) {
              const be = a[re];
              if (be.type === "elem") {
                const xe = be.elem;
                m = Math.max(m, xe.maxFontSize, xe.height);
              }
            }
            m += 2;
            const b = rn(["pstrut"], []);
            b.style.height = oe(m);
            const w = [];
            let D = f, F = f, I = f;
            for (let re = 0; re < a.length; re++) {
              const be = a[re];
              if (be.type === "kern")
                I += be.size;
              else {
                const xe = be.elem, Ye = be.wrapperClasses || [], Ge = be.wrapperStyle || {}, Ke = rn(Ye, [b, xe], void 0, Ge);
                Ke.style.top = oe(-m - I - xe.depth), be.marginLeft && (Ke.style.marginLeft = be.marginLeft), be.marginRight && (Ke.style.marginRight = be.marginRight), w.push(Ke), I += xe.height + xe.depth;
              }
              D = Math.min(D, I), F = Math.max(F, I);
            }
            const j = rn(["vlist"], w);
            j.style.height = oe(F);
            let W;
            if (D < 0) {
              const re = rn([], []), be = rn(["vlist"], [re]);
              be.style.height = oe(-D);
              const xe = rn(["vlist-s"], [new Gt("​")]);
              W = [rn(["vlist-r"], [j, xe]), rn(["vlist-r"], [be])];
            } else
              W = [rn(["vlist-r"], [j])];
            const Z = rn(["vlist-t"], W);
            return W.length === 2 && Z.classes.push("vlist-t2"), Z.height = F, Z.depth = -D, Z;
          }, w4 = (i, s) => {
            const a = rn(["mspace"], [], s), f = st(i, s);
            return a.style.marginRight = oe(f), a;
          }, Es = function(i, s, a) {
            let f = "";
            switch (i) {
              case "amsrm":
                f = "AMS";
                break;
              case "textrm":
                f = "Main";
                break;
              case "textsf":
                f = "SansSerif";
                break;
              case "texttt":
                f = "Typewriter";
                break;
              default:
                f = i;
            }
            let m;
            return s === "textbf" && a === "textit" ? m = "BoldItalic" : s === "textbf" ? m = "Bold" : s === "textit" ? m = "Italic" : m = "Regular", f + "-" + m;
          }, _o = {
            // 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"
            }
          }, bo = {
            //   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]
          };
          var X = {
            fontMap: _o,
            makeSymbol: Bn,
            mathsym: u4,
            makeSpan: rn,
            makeSvgSpan: po,
            makeLineSpan: m4,
            makeAnchor: p4,
            makeFragment: go,
            wrapFragment: g4,
            makeVList: b4,
            makeOrd: f4,
            makeGlue: w4,
            staticSvg: function(i, s) {
              const [a, f, m] = bo[i], b = new dn(a), w = new Qt([b], {
                width: oe(f),
                height: oe(m),
                // Override CSS rule `.katex svg { width: 100% }`
                style: "width:" + oe(f),
                viewBox: "0 0 " + 1e3 * f + " " + 1e3 * m,
                preserveAspectRatio: "xMinYMin"
              }), D = po(["overlay"], [w], s);
              return D.height = m, D.style.height = oe(m), D.style.width = oe(f), D;
            },
            svgData: bo,
            tryCombineChars: d4
          };
          const Ct = {
            number: 3,
            unit: "mu"
          }, I0 = {
            number: 4,
            unit: "mu"
          }, n0 = {
            number: 5,
            unit: "mu"
          }, y4 = {
            mord: {
              mop: Ct,
              mbin: I0,
              mrel: n0,
              minner: Ct
            },
            mop: {
              mord: Ct,
              mop: Ct,
              mrel: n0,
              minner: Ct
            },
            mbin: {
              mord: I0,
              mop: I0,
              mopen: I0,
              minner: I0
            },
            mrel: {
              mord: n0,
              mop: n0,
              mopen: n0,
              minner: n0
            },
            mopen: {},
            mclose: {
              mop: Ct,
              mbin: I0,
              mrel: n0,
              minner: Ct
            },
            mpunct: {
              mord: Ct,
              mop: Ct,
              mrel: n0,
              mopen: Ct,
              mclose: Ct,
              mpunct: Ct,
              minner: Ct
            },
            minner: {
              mord: Ct,
              mop: Ct,
              mbin: I0,
              mrel: n0,
              mopen: Ct,
              mpunct: Ct,
              minner: Ct
            }
          }, v4 = {
            mord: {
              mop: Ct
            },
            mop: {
              mord: Ct,
              mop: Ct
            },
            mbin: {},
            mrel: {},
            mopen: {},
            mclose: {
              mop: Ct
            },
            mpunct: {},
            minner: {
              mop: Ct
            }
          }, wo = {}, xs = {}, Ts = {};
          function ge(i) {
            let {
              type: s,
              names: a,
              props: f,
              handler: m,
              htmlBuilder: b,
              mathmlBuilder: w
            } = i;
            const D = {
              type: s,
              numArgs: f.numArgs,
              argTypes: f.argTypes,
              allowedInArgument: !!f.allowedInArgument,
              allowedInText: !!f.allowedInText,
              allowedInMath: f.allowedInMath === void 0 ? !0 : f.allowedInMath,
              numOptionalArgs: f.numOptionalArgs || 0,
              infix: !!f.infix,
              primitive: !!f.primitive,
              handler: m
            };
            for (let F = 0; F < a.length; ++F)
              wo[a[F]] = D;
            s && (b && (xs[s] = b), w && (Ts[s] = w));
          }
          function L0(i) {
            let {
              type: s,
              htmlBuilder: a,
              mathmlBuilder: f
            } = i;
            ge({
              type: s,
              names: [],
              props: {
                numArgs: 0
              },
              handler() {
                throw new Error("Should never be called.");
              },
              htmlBuilder: a,
              mathmlBuilder: f
            });
          }
          const Fs = function(i) {
            return i.type === "ordgroup" && i.body.length === 1 ? i.body[0] : i;
          }, Ot = function(i) {
            return i.type === "ordgroup" ? i.body : [i];
          }, r0 = X.makeSpan, k4 = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"], D4 = ["rightmost", "mrel", "mclose", "mpunct"], A4 = {
            display: Q.DISPLAY,
            text: Q.TEXT,
            script: Q.SCRIPT,
            scriptscript: Q.SCRIPTSCRIPT
          }, S4 = {
            mord: "mord",
            mop: "mop",
            mbin: "mbin",
            mrel: "mrel",
            mopen: "mopen",
            mclose: "mclose",
            mpunct: "mpunct",
            minner: "minner"
          }, Ht = function(i, s, a, f) {
            f === void 0 && (f = [null, null]);
            const m = [];
            for (let I = 0; I < i.length; I++) {
              const j = et(i[I], s);
              if (j instanceof at) {
                const W = j.children;
                m.push(...W);
              } else
                m.push(j);
            }
            if (X.tryCombineChars(m), !a)
              return m;
            let b = s;
            if (i.length === 1) {
              const I = i[0];
              I.type === "sizing" ? b = s.havingSize(I.size) : I.type === "styling" && (b = s.havingStyle(A4[I.style]));
            }
            const w = r0([f[0] || "leftmost"], [], s), D = r0([f[1] || "rightmost"], [], s), F = a === "root";
            return tl(m, (I, j) => {
              const W = j.classes[0], Z = I.classes[0];
              W === "mbin" && N.contains(D4, Z) ? j.classes[0] = "mord" : Z === "mbin" && N.contains(k4, W) && (I.classes[0] = "mord");
            }, {
              node: w
            }, D, F), tl(m, (I, j) => {
              const W = rl(j), Z = rl(I), re = W && Z ? I.hasClass("mtight") ? v4[W][Z] : y4[W][Z] : null;
              if (re)
                return X.makeGlue(re, b);
            }, {
              node: w
            }, D, F), m;
          }, tl = function(i, s, a, f, m) {
            f && i.push(f);
            let b = 0;
            for (; b < i.length; b++) {
              const w = i[b], D = yo(w);
              if (D) {
                tl(D.children, s, a, null, m);
                continue;
              }
              const F = !w.hasClass("mspace");
              if (F) {
                const I = s(w, a.node);
                I && (a.insertAfter ? a.insertAfter(I) : (i.unshift(I), b++));
              }
              F ? a.node = w : m && w.hasClass("newline") && (a.node = r0(["leftmost"])), a.insertAfter = /* @__PURE__ */ ((I) => (j) => {
                i.splice(I + 1, 0, j), b++;
              })(b);
            }
            f && i.pop();
          }, yo = function(i) {
            return i instanceof at || i instanceof kt || i instanceof t0 && i.hasClass("enclosing") ? i : null;
          }, nl = function(i, s) {
            const a = yo(i);
            if (a) {
              const f = a.children;
              if (f.length) {
                if (s === "right")
                  return nl(f[f.length - 1], "right");
                if (s === "left")
                  return nl(f[0], "left");
              }
            }
            return i;
          }, rl = function(i, s) {
            return i ? (s && (i = nl(i, s)), S4[i.classes[0]] || null) : null;
          }, Nr = function(i, s) {
            const a = ["nulldelimiter"].concat(i.baseSizingClasses());
            return r0(s.concat(a));
          }, et = function(i, s, a) {
            if (!i)
              return r0();
            if (xs[i.type]) {
              let f = xs[i.type](i, s);
              if (a && s.size !== a.size) {
                f = r0(s.sizingClasses(a), [f], s);
                const m = s.sizeMultiplier / a.sizeMultiplier;
                f.height *= m, f.depth *= m;
              }
              return f;
            } else
              throw new o("Got group of unknown type: '" + i.type + "'");
          };
          function Cs(i, s) {
            const a = r0(["base"], i, s), f = r0(["strut"]);
            return f.style.height = oe(a.height + a.depth), a.depth && (f.style.verticalAlign = oe(-a.depth)), a.children.unshift(f), a;
          }
          function sl(i, s) {
            let a = null;
            i.length === 1 && i[0].type === "tag" && (a = i[0].tag, i = i[0].body);
            const f = Ht(i, s, "root");
            let m;
            f.length === 2 && f[1].hasClass("tag") && (m = f.pop());
            const b = [];
            let w = [];
            for (let I = 0; I < f.length; I++)
              if (w.push(f[I]), f[I].hasClass("mbin") || f[I].hasClass("mrel") || f[I].hasClass("allowbreak")) {
                let j = !1;
                for (; I < f.length - 1 && f[I + 1].hasClass("mspace") && !f[I + 1].hasClass("newline"); )
                  I++, w.push(f[I]), f[I].hasClass("nobreak") && (j = !0);
                j || (b.push(Cs(w, s)), w = []);
              } else
                f[I].hasClass("newline") && (w.pop(), w.length > 0 && (b.push(Cs(w, s)), w = []), b.push(f[I]));
            w.length > 0 && b.push(Cs(w, s));
            let D;
            a ? (D = Cs(Ht(a, s, !0)), D.classes = ["tag"], b.push(D)) : m && b.push(m);
            const F = r0(["katex-html"], b);
            if (F.setAttribute("aria-hidden", "true"), D) {
              const I = D.children[0];
              I.style.height = oe(F.height + F.depth), F.depth && (I.style.verticalAlign = oe(-F.depth));
            }
            return F;
          }
          function vo(i) {
            return new at(i);
          }
          class Dn {
            constructor(s, a, f) {
              this.type = void 0, this.attributes = void 0, this.children = void 0, this.classes = void 0, this.type = s, this.attributes = {}, this.children = a || [], this.classes = f || [];
            }
            /**
             * Sets an attribute on a MathML node. MathML depends on attributes to convey a
             * semantic content, so this is used heavily.
             */
            setAttribute(s, a) {
              this.attributes[s] = a;
            }
            /**
             * Gets an attribute on a MathML node.
             */
            getAttribute(s) {
              return this.attributes[s];
            }
            /**
             * Converts the math node into a MathML-namespaced DOM element.
             */
            toNode() {
              const s = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
              for (const a in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, a) && s.setAttribute(a, this.attributes[a]);
              this.classes.length > 0 && (s.className = nn(this.classes));
              for (let a = 0; a < this.children.length; a++)
                s.appendChild(this.children[a].toNode());
              return s;
            }
            /**
             * Converts the math node into an HTML markup string.
             */
            toMarkup() {
              let s = "<" + this.type;
              for (const a in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, a) && (s += " " + a + '="', s += N.escape(this.attributes[a]), s += '"');
              this.classes.length > 0 && (s += ' class ="' + N.escape(nn(this.classes)) + '"'), s += ">";
              for (let a = 0; a < this.children.length; a++)
                s += this.children[a].toMarkup();
              return s += "</" + this.type + ">", s;
            }
            /**
             * Converts the math node into a string, similar to innerText, but escaped.
             */
            toText() {
              return this.children.map((s) => s.toText()).join("");
            }
          }
          class zr {
            constructor(s) {
              this.text = void 0, this.text = s;
            }
            /**
             * 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 N.escape(this.toText());
            }
            /**
             * Converts the text node into a string
             * (representing the text itself).
             */
            toText() {
              return this.text;
            }
          }
          class E4 {
            /**
             * Create a Space node with width given in CSS ems.
             */
            constructor(s) {
              this.width = void 0, this.character = void 0, this.width = s, s >= 0.05555 && s <= 0.05556 ? this.character = " " : s >= 0.1666 && s <= 0.1667 ? this.character = " " : s >= 0.2222 && s <= 0.2223 ? this.character = " " : s >= 0.2777 && s <= 0.2778 ? this.character = "  " : s >= -0.05556 && s <= -0.05555 ? this.character = " ⁣" : s >= -0.1667 && s <= -0.1666 ? this.character = " ⁣" : s >= -0.2223 && s <= -0.2222 ? this.character = " ⁣" : s >= -0.2778 && s <= -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);
              {
                const s = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
                return s.setAttribute("width", oe(this.width)), s;
              }
            }
            /**
             * Converts the math node into an HTML markup string.
             */
            toMarkup() {
              return this.character ? "<mtext>" + this.character + "</mtext>" : '<mspace width="' + oe(this.width) + '"/>';
            }
            /**
             * Converts the math node into a string, similar to innerText.
             */
            toText() {
              return this.character ? this.character : " ";
            }
          }
          var le = {
            MathNode: Dn,
            TextNode: zr,
            SpaceNode: E4,
            newDocumentFragment: vo
          };
          const An = function(i, s, a) {
            return P[s][i] && P[s][i].replace && i.charCodeAt(0) !== 55349 && !(Lt.hasOwnProperty(i) && a && (a.fontFamily && a.fontFamily.slice(4, 6) === "tt" || a.font && a.font.slice(4, 6) === "tt")) && (i = P[s][i].replace), new le.TextNode(i);
          }, il = function(i) {
            return i.length === 1 ? i[0] : new le.MathNode("mrow", i);
          }, ll = function(i, s) {
            if (s.fontFamily === "texttt")
              return "monospace";
            if (s.fontFamily === "textsf")
              return s.fontShape === "textit" && s.fontWeight === "textbf" ? "sans-serif-bold-italic" : s.fontShape === "textit" ? "sans-serif-italic" : s.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
            if (s.fontShape === "textit" && s.fontWeight === "textbf")
              return "bold-italic";
            if (s.fontShape === "textit")
              return "italic";
            if (s.fontWeight === "textbf")
              return "bold";
            const a = s.font;
            if (!a || a === "mathnormal")
              return null;
            const f = i.mode;
            if (a === "mathit")
              return "italic";
            if (a === "boldsymbol")
              return i.type === "textord" ? "bold" : "bold-italic";
            if (a === "mathbf")
              return "bold";
            if (a === "mathbb")
              return "double-struck";
            if (a === "mathfrak")
              return "fraktur";
            if (a === "mathscr" || a === "mathcal")
              return "script";
            if (a === "mathsf")
              return "sans-serif";
            if (a === "mathtt")
              return "monospace";
            let m = i.text;
            if (N.contains(["\\imath", "\\jmath"], m))
              return null;
            P[f][m] && P[f][m].replace && (m = P[f][m].replace);
            const b = X.fontMap[a].fontName;
            return Te(m, b, f) ? X.fontMap[a].variant : null;
          }, sn = function(i, s, a) {
            if (i.length === 1) {
              const b = dt(i[0], s);
              return a && b instanceof Dn && b.type === "mo" && (b.setAttribute("lspace", "0em"), b.setAttribute("rspace", "0em")), [b];
            }
            const f = [];
            let m;
            for (let b = 0; b < i.length; b++) {
              const w = dt(i[b], s);
              if (w instanceof Dn && m instanceof Dn) {
                if (w.type === "mtext" && m.type === "mtext" && w.getAttribute("mathvariant") === m.getAttribute("mathvariant")) {
                  m.children.push(...w.children);
                  continue;
                } else if (w.type === "mn" && m.type === "mn") {
                  m.children.push(...w.children);
                  continue;
                } else if (w.type === "mi" && w.children.length === 1 && m.type === "mn") {
                  const D = w.children[0];
                  if (D instanceof zr && D.text === ".") {
                    m.children.push(...w.children);
                    continue;
                  }
                } else if (m.type === "mi" && m.children.length === 1) {
                  const D = m.children[0];
                  if (D instanceof zr && D.text === "̸" && (w.type === "mo" || w.type === "mi" || w.type === "mn")) {
                    const F = w.children[0];
                    F instanceof zr && F.text.length > 0 && (F.text = F.text.slice(0, 1) + "̸" + F.text.slice(1), f.pop());
                  }
                }
              }
              f.push(w), m = w;
            }
            return f;
          }, m0 = function(i, s, a) {
            return il(sn(i, s, a));
          }, dt = function(i, s) {
            if (!i)
              return new le.MathNode("mrow");
            if (Ts[i.type])
              return Ts[i.type](i, s);
            throw new o("Got group of unknown type: '" + i.type + "'");
          };
          function ko(i, s, a, f, m) {
            const b = sn(i, a);
            let w;
            b.length === 1 && b[0] instanceof Dn && N.contains(["mrow", "mtable"], b[0].type) ? w = b[0] : w = new le.MathNode("mrow", b);
            const D = new le.MathNode("annotation", [new le.TextNode(s)]);
            D.setAttribute("encoding", "application/x-tex");
            const F = new le.MathNode("semantics", [w, D]), I = new le.MathNode("math", [F]);
            I.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"), f && I.setAttribute("display", "block");
            const j = m ? "katex" : "katex-mathml";
            return X.makeSpan([j], [I]);
          }
          const Do = function(i) {
            return new vn({
              style: i.displayMode ? Q.DISPLAY : Q.TEXT,
              maxSize: i.maxSize,
              minRuleThickness: i.minRuleThickness
            });
          }, Ao = function(i, s) {
            if (s.displayMode) {
              const a = ["katex-display"];
              s.leqno && a.push("leqno"), s.fleqn && a.push("fleqn"), i = X.makeSpan(a, [i]);
            }
            return i;
          }, x4 = function(i, s, a) {
            const f = Do(a);
            let m;
            if (a.output === "mathml")
              return ko(i, s, f, a.displayMode, !0);
            if (a.output === "html") {
              const b = sl(i, f);
              m = X.makeSpan(["katex"], [b]);
            } else {
              const b = ko(i, s, f, a.displayMode, !1), w = sl(i, f);
              m = X.makeSpan(["katex"], [b, w]);
            }
            return Ao(m, a);
          }, T4 = function(i, s, a) {
            const f = Do(a), m = sl(i, f), b = X.makeSpan(["katex"], [m]);
            return Ao(b, a);
          }, F4 = {
            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": "="
          }, C4 = function(i) {
            const s = new le.MathNode("mo", [new le.TextNode(F4[i.replace(/^\\/, "")])]);
            return s.setAttribute("stretchy", "true"), s;
          }, M4 = {
            //   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]
          }, B4 = function(i) {
            return i.type === "ordgroup" ? i.body.length : 1;
          };
          var s0 = {
            encloseSpan: function(i, s, a, f, m) {
              let b;
              const w = i.height + i.depth + a + f;
              if (/fbox|color|angl/.test(s)) {
                if (b = X.makeSpan(["stretchy", s], [], m), s === "fbox") {
                  const D = m.color && m.getColor();
                  D && (b.style.borderColor = D);
                }
              } else {
                const D = [];
                /^[bx]cancel$/.test(s) && D.push(new d0({
                  x1: "0",
                  y1: "0",
                  x2: "100%",
                  y2: "100%",
                  "stroke-width": "0.046em"
                })), /^x?cancel$/.test(s) && D.push(new d0({
                  x1: "0",
                  y1: "100%",
                  x2: "100%",
                  y2: "0",
                  "stroke-width": "0.046em"
                }));
                const F = new Qt(D, {
                  width: "100%",
                  height: oe(w)
                });
                b = X.makeSvgSpan([], [F], m);
              }
              return b.height = w, b.style.height = oe(w), b;
            },
            mathMLnode: C4,
            svgSpan: function(i, s) {
              function a() {
                let w = 4e5;
                const D = i.label.slice(1);
                if (N.contains(["widehat", "widecheck", "widetilde", "utilde"], D)) {
                  const I = B4(i.base);
                  let j, W, Z;
                  if (I > 5)
                    D === "widehat" || D === "widecheck" ? (j = 420, w = 2364, Z = 0.42, W = D + "4") : (j = 312, w = 2340, Z = 0.34, W = "tilde4");
                  else {
                    const xe = [1, 1, 2, 2, 3, 3][I];
                    D === "widehat" || D === "widecheck" ? (w = [0, 1062, 2364, 2364, 2364][xe], j = [0, 239, 300, 360, 420][xe], Z = [0, 0.24, 0.3, 0.3, 0.36, 0.42][xe], W = D + xe) : (w = [0, 600, 1033, 2339, 2340][xe], j = [0, 260, 286, 306, 312][xe], Z = [0, 0.26, 0.286, 0.3, 0.306, 0.34][xe], W = "tilde" + xe);
                  }
                  const re = new dn(W), be = new Qt([re], {
                    width: "100%",
                    height: oe(Z),
                    viewBox: "0 0 " + w + " " + j,
                    preserveAspectRatio: "none"
                  });
                  return {
                    span: X.makeSvgSpan([], [be], s),
                    minWidth: 0,
                    height: Z
                  };
                } else {
                  const F = [], I = M4[D], [j, W, Z] = I, re = Z / 1e3, be = j.length;
                  let xe, Ye;
                  if (be === 1) {
                    const Ge = I[3];
                    xe = ["hide-tail"], Ye = [Ge];
                  } else if (be === 2)
                    xe = ["halfarrow-left", "halfarrow-right"], Ye = ["xMinYMin", "xMaxYMin"];
                  else if (be === 3)
                    xe = ["brace-left", "brace-center", "brace-right"], Ye = ["xMinYMin", "xMidYMin", "xMaxYMin"];
                  else
                    throw new Error(`Correct katexImagesData or update code here to support
                    ` + be + " children.");
                  for (let Ge = 0; Ge < be; Ge++) {
                    const Ke = new dn(j[Ge]), lt = new Qt([Ke], {
                      width: "400em",
                      height: oe(re),
                      viewBox: "0 0 " + w + " " + Z,
                      preserveAspectRatio: Ye[Ge] + " slice"
                    }), _t = X.makeSvgSpan([xe[Ge]], [lt], s);
                    if (be === 1)
                      return {
                        span: _t,
                        minWidth: W,
                        height: re
                      };
                    _t.style.height = oe(re), F.push(_t);
                  }
                  return {
                    span: X.makeSpan(["stretchy"], F, s),
                    minWidth: W,
                    height: re
                  };
                }
              }
              const {
                span: f,
                minWidth: m,
                height: b
              } = a();
              return f.height = b, f.style.height = oe(b), m > 0 && (f.style.minWidth = oe(m)), f;
            }
          };
          function Le(i, s) {
            if (!i || i.type !== s)
              throw new Error("Expected node of type " + s + ", but got " + (i ? "node of type " + i.type : String(i)));
            return i;
          }
          function al(i) {
            const s = Ms(i);
            if (!s)
              throw new Error("Expected node of symbol group type, but got " + (i ? "node of type " + i.type : String(i)));
            return s;
          }
          function Ms(i) {
            return i && (i.type === "atom" || Br.hasOwnProperty(i.type)) ? i : null;
          }
          const ol = (i, s) => {
            let a, f, m;
            i && i.type === "supsub" ? (f = Le(i.base, "accent"), a = f.base, i.base = a, m = rr(et(i, s)), i.base = f) : (f = Le(i, "accent"), a = f.base);
            const b = et(a, s.havingCrampedStyle()), w = f.isShifty && N.isCharacterBox(a);
            let D = 0;
            if (w) {
              const Z = N.getBaseElem(a), re = et(Z, s.havingCrampedStyle());
              D = nr(re).skew;
            }
            const F = f.label === "\\c";
            let I = F ? b.height + b.depth : Math.min(b.height, s.fontMetrics().xHeight), j;
            if (f.isStretchy)
              j = s0.svgSpan(f, s), j = X.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: b
                }, {
                  type: "elem",
                  elem: j,
                  wrapperClasses: ["svg-align"],
                  wrapperStyle: D > 0 ? {
                    width: "calc(100% - " + oe(2 * D) + ")",
                    marginLeft: oe(2 * D)
                  } : void 0
                }]
              }, s);
            else {
              let Z, re;
              f.label === "\\vec" ? (Z = X.staticSvg("vec", s), re = X.svgData.vec[1]) : (Z = X.makeOrd({
                mode: f.mode,
                text: f.label
              }, s, "textord"), Z = nr(Z), Z.italic = 0, re = Z.width, F && (I += Z.depth)), j = X.makeSpan(["accent-body"], [Z]);
              const be = f.label === "\\textcircled";
              be && (j.classes.push("accent-full"), I = b.height);
              let xe = D;
              be || (xe -= re / 2), j.style.left = oe(xe), f.label === "\\textcircled" && (j.style.top = ".2em"), j = X.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: b
                }, {
                  type: "kern",
                  size: -I
                }, {
                  type: "elem",
                  elem: j
                }]
              }, s);
            }
            const W = X.makeSpan(["mord", "accent"], [j], s);
            return m ? (m.children[0] = W, m.height = Math.max(W.height, m.height), m.classes[0] = "mord", m) : W;
          }, So = (i, s) => {
            const a = i.isStretchy ? s0.mathMLnode(i.label) : new le.MathNode("mo", [An(i.label, i.mode)]), f = new le.MathNode("mover", [dt(i.base, s), a]);
            return f.setAttribute("accent", "true"), f;
          }, N4 = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((i) => "\\" + i).join("|"));
          ge({
            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, s) => {
              const a = Fs(s[0]), f = !N4.test(i.funcName), m = !f || i.funcName === "\\widehat" || i.funcName === "\\widetilde" || i.funcName === "\\widecheck";
              return {
                type: "accent",
                mode: i.parser.mode,
                label: i.funcName,
                isStretchy: f,
                isShifty: m,
                base: a
              };
            },
            htmlBuilder: ol,
            mathmlBuilder: So
          }), ge({
            type: "accent",
            names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"],
            props: {
              numArgs: 1,
              allowedInText: !0,
              allowedInMath: !0,
              // unless in strict mode
              argTypes: ["primitive"]
            },
            handler: (i, s) => {
              const a = s[0];
              let f = i.parser.mode;
              return f === "math" && (i.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + i.funcName + " works only in text mode"), f = "text"), {
                type: "accent",
                mode: f,
                label: i.funcName,
                isStretchy: !1,
                isShifty: !0,
                base: a
              };
            },
            htmlBuilder: ol,
            mathmlBuilder: So
          }), ge({
            type: "accentUnder",
            names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"],
            props: {
              numArgs: 1
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0];
              return {
                type: "accentUnder",
                mode: a.mode,
                label: f,
                base: m
              };
            },
            htmlBuilder: (i, s) => {
              const a = et(i.base, s), f = s0.svgSpan(i, s), m = i.label === "\\utilde" ? 0.12 : 0, b = X.makeVList({
                positionType: "top",
                positionData: a.height,
                children: [{
                  type: "elem",
                  elem: f,
                  wrapperClasses: ["svg-align"]
                }, {
                  type: "kern",
                  size: m
                }, {
                  type: "elem",
                  elem: a
                }]
              }, s);
              return X.makeSpan(["mord", "accentunder"], [b], s);
            },
            mathmlBuilder: (i, s) => {
              const a = s0.mathMLnode(i.label), f = new le.MathNode("munder", [dt(i.base, s), a]);
              return f.setAttribute("accentunder", "true"), f;
            }
          });
          const Bs = (i) => {
            const s = new le.MathNode("mpadded", i ? [i] : []);
            return s.setAttribute("width", "+0.6em"), s.setAttribute("lspace", "0.3em"), s;
          };
          ge({
            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, s, a) {
              let {
                parser: f,
                funcName: m
              } = i;
              return {
                type: "xArrow",
                mode: f.mode,
                label: m,
                body: s[0],
                below: a[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, s) {
              const a = s.style;
              let f = s.havingStyle(a.sup());
              const m = X.wrapFragment(et(i.body, f, s), s), b = i.label.slice(0, 2) === "\\x" ? "x" : "cd";
              m.classes.push(b + "-arrow-pad");
              let w;
              i.below && (f = s.havingStyle(a.sub()), w = X.wrapFragment(et(i.below, f, s), s), w.classes.push(b + "-arrow-pad"));
              const D = s0.svgSpan(i, s), F = -s.fontMetrics().axisHeight + 0.5 * D.height;
              let I = -s.fontMetrics().axisHeight - 0.5 * D.height - 0.111;
              (m.depth > 0.25 || i.label === "\\xleftequilibrium") && (I -= m.depth);
              let j;
              if (w) {
                const W = -s.fontMetrics().axisHeight + w.height + 0.5 * D.height + 0.111;
                j = X.makeVList({
                  positionType: "individualShift",
                  children: [{
                    type: "elem",
                    elem: m,
                    shift: I
                  }, {
                    type: "elem",
                    elem: D,
                    shift: F
                  }, {
                    type: "elem",
                    elem: w,
                    shift: W
                  }]
                }, s);
              } else
                j = X.makeVList({
                  positionType: "individualShift",
                  children: [{
                    type: "elem",
                    elem: m,
                    shift: I
                  }, {
                    type: "elem",
                    elem: D,
                    shift: F
                  }]
                }, s);
              return j.children[0].children[0].children[1].classes.push("svg-align"), X.makeSpan(["mrel", "x-arrow"], [j], s);
            },
            mathmlBuilder(i, s) {
              const a = s0.mathMLnode(i.label);
              a.setAttribute("minsize", i.label.charAt(0) === "x" ? "1.75em" : "3.0em");
              let f;
              if (i.body) {
                const m = Bs(dt(i.body, s));
                if (i.below) {
                  const b = Bs(dt(i.below, s));
                  f = new le.MathNode("munderover", [a, b, m]);
                } else
                  f = new le.MathNode("mover", [a, m]);
              } else if (i.below) {
                const m = Bs(dt(i.below, s));
                f = new le.MathNode("munder", [a, m]);
              } else
                f = Bs(), f = new le.MathNode("mover", [a, f]);
              return f;
            }
          });
          const z4 = X.makeSpan;
          function Eo(i, s) {
            const a = Ht(i.body, s, !0);
            return z4([i.mclass], a, s);
          }
          function xo(i, s) {
            let a;
            const f = sn(i.body, s);
            return i.mclass === "minner" ? a = new le.MathNode("mpadded", f) : i.mclass === "mord" ? i.isCharacterBox ? (a = f[0], a.type = "mi") : a = new le.MathNode("mi", f) : (i.isCharacterBox ? (a = f[0], a.type = "mo") : a = new le.MathNode("mo", f), i.mclass === "mbin" ? (a.attributes.lspace = "0.22em", a.attributes.rspace = "0.22em") : i.mclass === "mpunct" ? (a.attributes.lspace = "0em", a.attributes.rspace = "0.17em") : i.mclass === "mopen" || i.mclass === "mclose" ? (a.attributes.lspace = "0em", a.attributes.rspace = "0em") : i.mclass === "minner" && (a.attributes.lspace = "0.0556em", a.attributes.width = "+0.1111em")), a;
          }
          ge({
            type: "mclass",
            names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0];
              return {
                type: "mclass",
                mode: a.mode,
                mclass: "m" + f.slice(5),
                // TODO(kevinb): don't prefix with 'm'
                body: Ot(m),
                isCharacterBox: N.isCharacterBox(m)
              };
            },
            htmlBuilder: Eo,
            mathmlBuilder: xo
          });
          const Ns = (i) => {
            const s = i.type === "ordgroup" && i.body.length ? i.body[0] : i;
            return s.type === "atom" && (s.family === "bin" || s.family === "rel") ? "m" + s.family : "mord";
          };
          ge({
            type: "mclass",
            names: ["\\@binrel"],
            props: {
              numArgs: 2
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "mclass",
                mode: a.mode,
                mclass: Ns(s[0]),
                body: Ot(s[1]),
                isCharacterBox: N.isCharacterBox(s[1])
              };
            }
          }), ge({
            type: "mclass",
            names: ["\\stackrel", "\\overset", "\\underset"],
            props: {
              numArgs: 2
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[1], b = s[0];
              let w;
              f !== "\\stackrel" ? w = Ns(m) : w = "mrel";
              const D = {
                type: "op",
                mode: m.mode,
                limits: !0,
                alwaysHandleSupSub: !0,
                parentIsSupSub: !1,
                symbol: !1,
                suppressBaseShift: f !== "\\stackrel",
                body: Ot(m)
              }, F = {
                type: "supsub",
                mode: b.mode,
                base: D,
                sup: f === "\\underset" ? null : b,
                sub: f === "\\underset" ? b : null
              };
              return {
                type: "mclass",
                mode: a.mode,
                mclass: w,
                body: [F],
                isCharacterBox: N.isCharacterBox(F)
              };
            },
            htmlBuilder: Eo,
            mathmlBuilder: xo
          }), ge({
            type: "pmb",
            names: ["\\pmb"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "pmb",
                mode: a.mode,
                mclass: Ns(s[0]),
                body: Ot(s[0])
              };
            },
            htmlBuilder(i, s) {
              const a = Ht(i.body, s, !0), f = X.makeSpan([i.mclass], a, s);
              return f.style.textShadow = "0.02em 0.01em 0.04px", f;
            },
            mathmlBuilder(i, s) {
              const a = sn(i.body, s), f = new le.MathNode("mstyle", a);
              return f.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), f;
            }
          });
          const R4 = {
            ">": "\\\\cdrightarrow",
            "<": "\\\\cdleftarrow",
            "=": "\\\\cdlongequal",
            A: "\\uparrow",
            V: "\\downarrow",
            "|": "\\Vert",
            ".": "no arrow"
          }, To = () => ({
            type: "styling",
            body: [],
            mode: "math",
            style: "display"
          }), Fo = (i) => i.type === "textord" && i.text === "@", O4 = (i, s) => (i.type === "mathord" || i.type === "atom") && i.text === s;
          function I4(i, s, a) {
            const f = R4[i];
            switch (f) {
              case "\\\\cdrightarrow":
              case "\\\\cdleftarrow":
                return a.callFunction(f, [s[0]], [s[1]]);
              case "\\uparrow":
              case "\\downarrow": {
                const m = a.callFunction("\\\\cdleft", [s[0]], []), b = {
                  type: "atom",
                  text: f,
                  mode: "math",
                  family: "rel"
                }, w = a.callFunction("\\Big", [b], []), D = a.callFunction("\\\\cdright", [s[1]], []), F = {
                  type: "ordgroup",
                  mode: "math",
                  body: [m, w, D]
                };
                return a.callFunction("\\\\cdparent", [F], []);
              }
              case "\\\\cdlongequal":
                return a.callFunction("\\\\cdlongequal", [], []);
              case "\\Vert": {
                const m = {
                  type: "textord",
                  text: "\\Vert",
                  mode: "math"
                };
                return a.callFunction("\\Big", [m], []);
              }
              default:
                return {
                  type: "textord",
                  text: " ",
                  mode: "math"
                };
            }
          }
          function L4(i) {
            const s = [];
            for (i.gullet.beginGroup(), i.gullet.macros.set("\\cr", "\\\\\\relax"), i.gullet.beginGroup(); ; ) {
              s.push(i.parseExpression(!1, "\\\\")), i.gullet.endGroup(), i.gullet.beginGroup();
              const b = i.fetch().text;
              if (b === "&" || b === "\\\\")
                i.consume();
              else if (b === "\\end") {
                s[s.length - 1].length === 0 && s.pop();
                break;
              } else
                throw new o("Expected \\\\ or \\cr or \\end", i.nextToken);
            }
            let a = [];
            const f = [a];
            for (let b = 0; b < s.length; b++) {
              const w = s[b];
              let D = To();
              for (let F = 0; F < w.length; F++)
                if (!Fo(w[F]))
                  D.body.push(w[F]);
                else {
                  a.push(D), F += 1;
                  const I = al(w[F]).text, j = new Array(2);
                  if (j[0] = {
                    type: "ordgroup",
                    mode: "math",
                    body: []
                  }, j[1] = {
                    type: "ordgroup",
                    mode: "math",
                    body: []
                  }, !("=|.".indexOf(I) > -1))
                    if ("<>AV".indexOf(I) > -1)
                      for (let re = 0; re < 2; re++) {
                        let be = !0;
                        for (let xe = F + 1; xe < w.length; xe++) {
                          if (O4(w[xe], I)) {
                            be = !1, F = xe;
                            break;
                          }
                          if (Fo(w[xe]))
                            throw new o("Missing a " + I + " character to complete a CD arrow.", w[xe]);
                          j[re].body.push(w[xe]);
                        }
                        if (be)
                          throw new o("Missing a " + I + " character to complete a CD arrow.", w[F]);
                      }
                    else
                      throw new o('Expected one of "<>AV=|." after @', w[F]);
                  const Z = {
                    type: "styling",
                    body: [I4(I, j, i)],
                    mode: "math",
                    style: "display"
                    // CD is always displaystyle.
                  };
                  a.push(Z), D = To();
                }
              b % 2 === 0 ? a.push(D) : a.shift(), a = [], f.push(a);
            }
            i.gullet.endGroup(), i.gullet.endGroup();
            const m = new Array(f[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: f,
              arraystretch: 1,
              addJot: !0,
              rowGaps: [null],
              cols: m,
              colSeparationType: "CD",
              hLinesBeforeRow: new Array(f.length + 1).fill([])
            };
          }
          ge({
            type: "cdlabel",
            names: ["\\\\cdleft", "\\\\cdright"],
            props: {
              numArgs: 1
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              return {
                type: "cdlabel",
                mode: a.mode,
                side: f.slice(4),
                label: s[0]
              };
            },
            htmlBuilder(i, s) {
              const a = s.havingStyle(s.style.sup()), f = X.wrapFragment(et(i.label, a, s), s);
              return f.classes.push("cd-label-" + i.side), f.style.bottom = oe(0.8 - f.depth), f.height = 0, f.depth = 0, f;
            },
            mathmlBuilder(i, s) {
              let a = new le.MathNode("mrow", [dt(i.label, s)]);
              return a = new le.MathNode("mpadded", [a]), a.setAttribute("width", "0"), i.side === "left" && a.setAttribute("lspace", "-1width"), a.setAttribute("voffset", "0.7em"), a = new le.MathNode("mstyle", [a]), a.setAttribute("displaystyle", "false"), a.setAttribute("scriptlevel", "1"), a;
            }
          }), ge({
            type: "cdlabelparent",
            names: ["\\\\cdparent"],
            props: {
              numArgs: 1
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "cdlabelparent",
                mode: a.mode,
                fragment: s[0]
              };
            },
            htmlBuilder(i, s) {
              const a = X.wrapFragment(et(i.fragment, s), s);
              return a.classes.push("cd-vert-arrow"), a;
            },
            mathmlBuilder(i, s) {
              return new le.MathNode("mrow", [dt(i.fragment, s)]);
            }
          }), ge({
            type: "textord",
            names: ["\\@char"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              const m = Le(s[0], "ordgroup").body;
              let b = "";
              for (let F = 0; F < m.length; F++) {
                const I = Le(m[F], "textord");
                b += I.text;
              }
              let w = parseInt(b), D;
              if (isNaN(w))
                throw new o("\\@char has non-numeric argument " + b);
              if (w < 0 || w >= 1114111)
                throw new o("\\@char with invalid code point " + b);
              return w <= 65535 ? D = String.fromCharCode(w) : (w -= 65536, D = String.fromCharCode((w >> 10) + 55296, (w & 1023) + 56320)), {
                type: "textord",
                mode: a.mode,
                text: D
              };
            }
          });
          const Co = (i, s) => {
            const a = Ht(i.body, s.withColor(i.color), !1);
            return X.makeFragment(a);
          }, Mo = (i, s) => {
            const a = sn(i.body, s.withColor(i.color)), f = new le.MathNode("mstyle", a);
            return f.setAttribute("mathcolor", i.color), f;
          };
          ge({
            type: "color",
            names: ["\\textcolor"],
            props: {
              numArgs: 2,
              allowedInText: !0,
              argTypes: ["color", "original"]
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              const f = Le(s[0], "color-token").color, m = s[1];
              return {
                type: "color",
                mode: a.mode,
                color: f,
                body: Ot(m)
              };
            },
            htmlBuilder: Co,
            mathmlBuilder: Mo
          }), ge({
            type: "color",
            names: ["\\color"],
            props: {
              numArgs: 1,
              allowedInText: !0,
              argTypes: ["color"]
            },
            handler(i, s) {
              let {
                parser: a,
                breakOnTokenText: f
              } = i;
              const m = Le(s[0], "color-token").color;
              a.gullet.macros.set("\\current@color", m);
              const b = a.parseExpression(!0, f);
              return {
                type: "color",
                mode: a.mode,
                color: m,
                body: b
              };
            },
            htmlBuilder: Co,
            mathmlBuilder: Mo
          }), ge({
            type: "cr",
            names: ["\\\\"],
            props: {
              numArgs: 0,
              numOptionalArgs: 0,
              allowedInText: !0
            },
            handler(i, s, a) {
              let {
                parser: f
              } = i;
              const m = f.gullet.future().text === "[" ? f.parseSizeGroup(!0) : null, b = !f.settings.displayMode || !f.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
              return {
                type: "cr",
                mode: f.mode,
                newLine: b,
                size: m && Le(m, "size").value
              };
            },
            // The following builders are called only at the top level,
            // not within tabular/array environments.
            htmlBuilder(i, s) {
              const a = X.makeSpan(["mspace"], [], s);
              return i.newLine && (a.classes.push("newline"), i.size && (a.style.marginTop = oe(st(i.size, s)))), a;
            },
            mathmlBuilder(i, s) {
              const a = new le.MathNode("mspace");
              return i.newLine && (a.setAttribute("linebreak", "newline"), i.size && a.setAttribute("height", oe(st(i.size, s)))), a;
            }
          });
          const ul = {
            "\\global": "\\global",
            "\\long": "\\\\globallong",
            "\\\\globallong": "\\\\globallong",
            "\\def": "\\gdef",
            "\\gdef": "\\gdef",
            "\\edef": "\\xdef",
            "\\xdef": "\\xdef",
            "\\let": "\\\\globallet",
            "\\futurelet": "\\\\globalfuture"
          }, Bo = (i) => {
            const s = i.text;
            if (/^(?:[\\{}$&#^_]|EOF)$/.test(s))
              throw new o("Expected a control sequence", i);
            return s;
          }, H4 = (i) => {
            let s = i.gullet.popToken();
            return s.text === "=" && (s = i.gullet.popToken(), s.text === " " && (s = i.gullet.popToken())), s;
          }, No = (i, s, a, f) => {
            let m = i.gullet.macros.get(a.text);
            m == null && (a.noexpand = !0, m = {
              tokens: [a],
              numArgs: 0,
              // reproduce the same behavior in expansion
              unexpandable: !i.gullet.isExpandable(a.text)
            }), i.gullet.macros.set(s, m, f);
          };
          ge({
            type: "internal",
            names: [
              "\\global",
              "\\long",
              "\\\\globallong"
              // can’t be entered directly
            ],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler(i) {
              let {
                parser: s,
                funcName: a
              } = i;
              s.consumeSpaces();
              const f = s.fetch();
              if (ul[f.text])
                return (a === "\\global" || a === "\\\\globallong") && (f.text = ul[f.text]), Le(s.parseFunction(), "internal");
              throw new o("Invalid token after macro prefix", f);
            }
          }), ge({
            type: "internal",
            names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(i) {
              let {
                parser: s,
                funcName: a
              } = i, f = s.gullet.popToken();
              const m = f.text;
              if (/^(?:[\\{}$&#^_]|EOF)$/.test(m))
                throw new o("Expected a control sequence", f);
              let b = 0, w;
              const D = [[]];
              for (; s.gullet.future().text !== "{"; )
                if (f = s.gullet.popToken(), f.text === "#") {
                  if (s.gullet.future().text === "{") {
                    w = s.gullet.future(), D[b].push("{");
                    break;
                  }
                  if (f = s.gullet.popToken(), !/^[1-9]$/.test(f.text))
                    throw new o('Invalid argument number "' + f.text + '"');
                  if (parseInt(f.text) !== b + 1)
                    throw new o('Argument number "' + f.text + '" out of order');
                  b++, D.push([]);
                } else {
                  if (f.text === "EOF")
                    throw new o("Expected a macro definition");
                  D[b].push(f.text);
                }
              let {
                tokens: F
              } = s.gullet.consumeArg();
              return w && F.unshift(w), (a === "\\edef" || a === "\\xdef") && (F = s.gullet.expandTokens(F), F.reverse()), s.gullet.macros.set(m, {
                tokens: F,
                numArgs: b,
                delimiters: D
              }, a === ul[a]), {
                type: "internal",
                mode: s.mode
              };
            }
          }), ge({
            type: "internal",
            names: [
              "\\let",
              "\\\\globallet"
              // can’t be entered directly
            ],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(i) {
              let {
                parser: s,
                funcName: a
              } = i;
              const f = Bo(s.gullet.popToken());
              s.gullet.consumeSpaces();
              const m = H4(s);
              return No(s, f, m, a === "\\\\globallet"), {
                type: "internal",
                mode: s.mode
              };
            }
          }), ge({
            type: "internal",
            names: [
              "\\futurelet",
              "\\\\globalfuture"
              // can’t be entered directly
            ],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(i) {
              let {
                parser: s,
                funcName: a
              } = i;
              const f = Bo(s.gullet.popToken()), m = s.gullet.popToken(), b = s.gullet.popToken();
              return No(s, f, b, a === "\\\\globalfuture"), s.gullet.pushToken(b), s.gullet.pushToken(m), {
                type: "internal",
                mode: s.mode
              };
            }
          });
          const Rr = function(i, s, a) {
            const f = P.math[i] && P.math[i].replace, m = Te(f || i, s, a);
            if (!m)
              throw new Error("Unsupported symbol " + i + " and font size " + s + ".");
            return m;
          }, cl = function(i, s, a, f) {
            const m = a.havingBaseStyle(s), b = X.makeSpan(f.concat(m.sizingClasses(a)), [i], a), w = m.sizeMultiplier / a.sizeMultiplier;
            return b.height *= w, b.depth *= w, b.maxFontSize = m.sizeMultiplier, b;
          }, zo = function(i, s, a) {
            const f = s.havingBaseStyle(a), m = (1 - s.sizeMultiplier / f.sizeMultiplier) * s.fontMetrics().axisHeight;
            i.classes.push("delimcenter"), i.style.top = oe(m), i.height -= m, i.depth += m;
          }, P4 = function(i, s, a, f, m, b) {
            const w = X.makeSymbol(i, "Main-Regular", m, f), D = cl(w, s, f, b);
            return a && zo(D, f, s), D;
          }, q4 = function(i, s, a, f) {
            return X.makeSymbol(i, "Size" + s + "-Regular", a, f);
          }, Ro = function(i, s, a, f, m, b) {
            const w = q4(i, s, m, f), D = cl(X.makeSpan(["delimsizing", "size" + s], [w], f), Q.TEXT, f, b);
            return a && zo(D, f, Q.TEXT), D;
          }, fl = function(i, s, a) {
            let f;
            return s === "Size1-Regular" ? f = "delim-size1" : f = "delim-size4", {
              type: "elem",
              elem: X.makeSpan(["delimsizinginner", f], [X.makeSpan([], [X.makeSymbol(i, s, a)])])
            };
          }, hl = function(i, s, a) {
            const f = Fe["Size4-Regular"][i.charCodeAt(0)] ? Fe["Size4-Regular"][i.charCodeAt(0)][4] : Fe["Size1-Regular"][i.charCodeAt(0)][4], m = new dn("inner", ee(i, Math.round(1e3 * s))), b = new Qt([m], {
              width: oe(f),
              height: oe(s),
              // Override CSS rule `.katex svg { width: 100% }`
              style: "width:" + oe(f),
              viewBox: "0 0 " + 1e3 * f + " " + Math.round(1e3 * s),
              preserveAspectRatio: "xMinYMin"
            }), w = X.makeSvgSpan([], [b], a);
            return w.height = s, w.style.height = oe(s), w.style.width = oe(f), {
              type: "elem",
              elem: w
            };
          }, dl = 8e-3, zs = {
            type: "kern",
            size: -1 * dl
          }, U4 = ["|", "\\lvert", "\\rvert", "\\vert"], G4 = ["\\|", "\\lVert", "\\rVert", "\\Vert"], Oo = function(i, s, a, f, m, b) {
            let w, D, F, I, j = "", W = 0;
            w = F = I = i, D = null;
            let Z = "Size1-Regular";
            i === "\\uparrow" ? F = I = "⏐" : i === "\\Uparrow" ? F = I = "‖" : i === "\\downarrow" ? w = F = "⏐" : i === "\\Downarrow" ? w = F = "‖" : i === "\\updownarrow" ? (w = "\\uparrow", F = "⏐", I = "\\downarrow") : i === "\\Updownarrow" ? (w = "\\Uparrow", F = "‖", I = "\\Downarrow") : N.contains(U4, i) ? (F = "∣", j = "vert", W = 333) : N.contains(G4, i) ? (F = "∥", j = "doublevert", W = 556) : i === "[" || i === "\\lbrack" ? (w = "⎡", F = "⎢", I = "⎣", Z = "Size4-Regular", j = "lbrack", W = 667) : i === "]" || i === "\\rbrack" ? (w = "⎤", F = "⎥", I = "⎦", Z = "Size4-Regular", j = "rbrack", W = 667) : i === "\\lfloor" || i === "⌊" ? (F = w = "⎢", I = "⎣", Z = "Size4-Regular", j = "lfloor", W = 667) : i === "\\lceil" || i === "⌈" ? (w = "⎡", F = I = "⎢", Z = "Size4-Regular", j = "lceil", W = 667) : i === "\\rfloor" || i === "⌋" ? (F = w = "⎥", I = "⎦", Z = "Size4-Regular", j = "rfloor", W = 667) : i === "\\rceil" || i === "⌉" ? (w = "⎤", F = I = "⎥", Z = "Size4-Regular", j = "rceil", W = 667) : i === "(" || i === "\\lparen" ? (w = "⎛", F = "⎜", I = "⎝", Z = "Size4-Regular", j = "lparen", W = 875) : i === ")" || i === "\\rparen" ? (w = "⎞", F = "⎟", I = "⎠", Z = "Size4-Regular", j = "rparen", W = 875) : i === "\\{" || i === "\\lbrace" ? (w = "⎧", D = "⎨", I = "⎩", F = "⎪", Z = "Size4-Regular") : i === "\\}" || i === "\\rbrace" ? (w = "⎫", D = "⎬", I = "⎭", F = "⎪", Z = "Size4-Regular") : i === "\\lgroup" || i === "⟮" ? (w = "⎧", I = "⎩", F = "⎪", Z = "Size4-Regular") : i === "\\rgroup" || i === "⟯" ? (w = "⎫", I = "⎭", F = "⎪", Z = "Size4-Regular") : i === "\\lmoustache" || i === "⎰" ? (w = "⎧", I = "⎭", F = "⎪", Z = "Size4-Regular") : (i === "\\rmoustache" || i === "⎱") && (w = "⎫", I = "⎩", F = "⎪", Z = "Size4-Regular");
            const re = Rr(w, Z, m), be = re.height + re.depth, xe = Rr(F, Z, m), Ye = xe.height + xe.depth, Ge = Rr(I, Z, m), Ke = Ge.height + Ge.depth;
            let lt = 0, _t = 1;
            if (D !== null) {
              const zt = Rr(D, Z, m);
              lt = zt.height + zt.depth, _t = 2;
            }
            const Kt = be + Ke + lt, Pt = Math.max(0, Math.ceil((s - Kt) / (_t * Ye))), En = Kt + Pt * _t * Ye;
            let ar = f.fontMetrics().axisHeight;
            a && (ar *= f.sizeMultiplier);
            const tt = En / 2 - ar, ut = [];
            if (j.length > 0) {
              const zt = En - be - Ke, Mt = Math.round(En * 1e3), xn = it(j, Math.round(zt * 1e3)), pd = new dn(j, xn), Eu = (W / 1e3).toFixed(3) + "em", xu = (Mt / 1e3).toFixed(3) + "em", gd = new Qt([pd], {
                width: Eu,
                height: xu,
                viewBox: "0 0 " + W + " " + Mt
              }), Hs = X.makeSvgSpan([], [gd], f);
              Hs.height = Mt / 1e3, Hs.style.width = Eu, Hs.style.height = xu, ut.push({
                type: "elem",
                elem: Hs
              });
            } else {
              if (ut.push(fl(I, Z, m)), ut.push(zs), D === null) {
                const zt = En - be - Ke + 2 * dl;
                ut.push(hl(F, zt, f));
              } else {
                const zt = (En - be - Ke - lt) / 2 + 2 * dl;
                ut.push(hl(F, zt, f)), ut.push(zs), ut.push(fl(D, Z, m)), ut.push(zs), ut.push(hl(F, zt, f));
              }
              ut.push(zs), ut.push(fl(w, Z, m));
            }
            const wt = f.havingBaseStyle(Q.TEXT), Dt = X.makeVList({
              positionType: "bottom",
              positionData: tt,
              children: ut
            }, wt);
            return cl(X.makeSpan(["delimsizing", "mult"], [Dt], wt), Q.TEXT, f, b);
          }, ml = 80, pl = 0.08, gl = function(i, s, a, f, m) {
            const b = It(i, f, a), w = new dn(i, b), D = new Qt([w], {
              // Note: 1000:1 ratio of viewBox to document em width.
              width: "400em",
              height: oe(s),
              viewBox: "0 0 400000 " + a,
              preserveAspectRatio: "xMinYMin slice"
            });
            return X.makeSvgSpan(["hide-tail"], [D], m);
          }, j4 = function(i, s) {
            const a = s.havingBaseSizing(), f = Po("\\surd", i * a.sizeMultiplier, Ho, a);
            let m = a.sizeMultiplier;
            const b = Math.max(0, s.minRuleThickness - s.fontMetrics().sqrtRuleThickness);
            let w, D = 0, F = 0, I = 0, j;
            return f.type === "small" ? (I = 1e3 + 1e3 * b + ml, i < 1 ? m = 1 : i < 1.4 && (m = 0.7), D = (1 + b + pl) / m, F = (1 + b) / m, w = gl("sqrtMain", D, I, b, s), w.style.minWidth = "0.853em", j = 0.833 / m) : f.type === "large" ? (I = (1e3 + ml) * Or[f.size], F = (Or[f.size] + b) / m, D = (Or[f.size] + b + pl) / m, w = gl("sqrtSize" + f.size, D, I, b, s), w.style.minWidth = "1.02em", j = 1 / m) : (D = i + b + pl, F = i + b, I = Math.floor(1e3 * i + b) + ml, w = gl("sqrtTall", D, I, b, s), w.style.minWidth = "0.742em", j = 1.056), w.height = F, w.style.height = oe(D), {
              span: w,
              advanceWidth: j,
              // 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: (s.fontMetrics().sqrtRuleThickness + b) * m
            };
          }, Io = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], V4 = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], Lo = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], Or = [0, 1.2, 1.8, 2.4, 3], W4 = function(i, s, a, f, m) {
            if (i === "<" || i === "\\lt" || i === "⟨" ? i = "\\langle" : (i === ">" || i === "\\gt" || i === "⟩") && (i = "\\rangle"), N.contains(Io, i) || N.contains(Lo, i))
              return Ro(i, s, !1, a, f, m);
            if (N.contains(V4, i))
              return Oo(i, Or[s], !1, a, f, m);
            throw new o("Illegal delimiter: '" + i + "'");
          }, X4 = [{
            type: "small",
            style: Q.SCRIPTSCRIPT
          }, {
            type: "small",
            style: Q.SCRIPT
          }, {
            type: "small",
            style: Q.TEXT
          }, {
            type: "large",
            size: 1
          }, {
            type: "large",
            size: 2
          }, {
            type: "large",
            size: 3
          }, {
            type: "large",
            size: 4
          }], Y4 = [{
            type: "small",
            style: Q.SCRIPTSCRIPT
          }, {
            type: "small",
            style: Q.SCRIPT
          }, {
            type: "small",
            style: Q.TEXT
          }, {
            type: "stack"
          }], Ho = [{
            type: "small",
            style: Q.SCRIPTSCRIPT
          }, {
            type: "small",
            style: Q.SCRIPT
          }, {
            type: "small",
            style: Q.TEXT
          }, {
            type: "large",
            size: 1
          }, {
            type: "large",
            size: 2
          }, {
            type: "large",
            size: 3
          }, {
            type: "large",
            size: 4
          }, {
            type: "stack"
          }], Z4 = function(i) {
            if (i.type === "small")
              return "Main-Regular";
            if (i.type === "large")
              return "Size" + i.size + "-Regular";
            if (i.type === "stack")
              return "Size4-Regular";
            throw new Error("Add support for delim type '" + i.type + "' here.");
          }, Po = function(i, s, a, f) {
            const m = Math.min(2, 3 - f.style.size);
            for (let b = m; b < a.length && a[b].type !== "stack"; b++) {
              const w = Rr(i, Z4(a[b]), "math");
              let D = w.height + w.depth;
              if (a[b].type === "small") {
                const F = f.havingBaseStyle(a[b].style);
                D *= F.sizeMultiplier;
              }
              if (D > s)
                return a[b];
            }
            return a[a.length - 1];
          }, qo = function(i, s, a, f, m, b) {
            i === "<" || i === "\\lt" || i === "⟨" ? i = "\\langle" : (i === ">" || i === "\\gt" || i === "⟩") && (i = "\\rangle");
            let w;
            N.contains(Lo, i) ? w = X4 : N.contains(Io, i) ? w = Ho : w = Y4;
            const D = Po(i, s, w, f);
            return D.type === "small" ? P4(i, D.style, a, f, m, b) : D.type === "large" ? Ro(i, D.size, a, f, m, b) : Oo(i, s, a, f, m, b);
          };
          var i0 = {
            sqrtImage: j4,
            sizedDelim: W4,
            sizeToMaxHeight: Or,
            customSizedDelim: qo,
            leftRightDelim: function(i, s, a, f, m, b) {
              const w = f.fontMetrics().axisHeight * f.sizeMultiplier, D = 901, F = 5 / f.fontMetrics().ptPerEm, I = Math.max(s - w, a + w), j = 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)
                I / 500 * D,
                2 * I - F
              );
              return qo(i, j, !0, f, m, b);
            }
          };
          const Uo = {
            "\\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
            }
          }, J4 = ["(", "\\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 Rs(i, s) {
            const a = Ms(i);
            if (a && N.contains(J4, a.text))
              return a;
            throw a ? new o("Invalid delimiter '" + a.text + "' after '" + s.funcName + "'", i) : new o("Invalid delimiter type '" + i.type + "'", i);
          }
          ge({
            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, s) => {
              const a = Rs(s[0], i);
              return {
                type: "delimsizing",
                mode: i.parser.mode,
                size: Uo[i.funcName].size,
                mclass: Uo[i.funcName].mclass,
                delim: a.text
              };
            },
            htmlBuilder: (i, s) => i.delim === "." ? X.makeSpan([i.mclass]) : i0.sizedDelim(i.delim, i.size, s, i.mode, [i.mclass]),
            mathmlBuilder: (i) => {
              const s = [];
              i.delim !== "." && s.push(An(i.delim, i.mode));
              const a = new le.MathNode("mo", s);
              i.mclass === "mopen" || i.mclass === "mclose" ? a.setAttribute("fence", "true") : a.setAttribute("fence", "false"), a.setAttribute("stretchy", "true");
              const f = oe(i0.sizeToMaxHeight[i.size]);
              return a.setAttribute("minsize", f), a.setAttribute("maxsize", f), a;
            }
          });
          function Go(i) {
            if (!i.body)
              throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
          }
          ge({
            type: "leftright-right",
            names: ["\\right"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (i, s) => {
              const a = i.parser.gullet.macros.get("\\current@color");
              if (a && typeof a != "string")
                throw new o("\\current@color set to non-string in \\right");
              return {
                type: "leftright-right",
                mode: i.parser.mode,
                delim: Rs(s[0], i).text,
                color: a
                // undefined if not set via \color
              };
            }
          }), ge({
            type: "leftright",
            names: ["\\left"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (i, s) => {
              const a = Rs(s[0], i), f = i.parser;
              ++f.leftrightDepth;
              const m = f.parseExpression(!1);
              --f.leftrightDepth, f.expect("\\right", !1);
              const b = Le(f.parseFunction(), "leftright-right");
              return {
                type: "leftright",
                mode: f.mode,
                body: m,
                left: a.text,
                right: b.delim,
                rightColor: b.color
              };
            },
            htmlBuilder: (i, s) => {
              Go(i);
              const a = Ht(i.body, s, !0, ["mopen", "mclose"]);
              let f = 0, m = 0, b = !1;
              for (let F = 0; F < a.length; F++)
                a[F].isMiddle ? b = !0 : (f = Math.max(a[F].height, f), m = Math.max(a[F].depth, m));
              f *= s.sizeMultiplier, m *= s.sizeMultiplier;
              let w;
              if (i.left === "." ? w = Nr(s, ["mopen"]) : w = i0.leftRightDelim(i.left, f, m, s, i.mode, ["mopen"]), a.unshift(w), b)
                for (let F = 1; F < a.length; F++) {
                  const j = a[F].isMiddle;
                  j && (a[F] = i0.leftRightDelim(j.delim, f, m, j.options, i.mode, []));
                }
              let D;
              if (i.right === ".")
                D = Nr(s, ["mclose"]);
              else {
                const F = i.rightColor ? s.withColor(i.rightColor) : s;
                D = i0.leftRightDelim(i.right, f, m, F, i.mode, ["mclose"]);
              }
              return a.push(D), X.makeSpan(["minner"], a, s);
            },
            mathmlBuilder: (i, s) => {
              Go(i);
              const a = sn(i.body, s);
              if (i.left !== ".") {
                const f = new le.MathNode("mo", [An(i.left, i.mode)]);
                f.setAttribute("fence", "true"), a.unshift(f);
              }
              if (i.right !== ".") {
                const f = new le.MathNode("mo", [An(i.right, i.mode)]);
                f.setAttribute("fence", "true"), i.rightColor && f.setAttribute("mathcolor", i.rightColor), a.push(f);
              }
              return il(a);
            }
          }), ge({
            type: "middle",
            names: ["\\middle"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (i, s) => {
              const a = Rs(s[0], i);
              if (!i.parser.leftrightDepth)
                throw new o("\\middle without preceding \\left", a);
              return {
                type: "middle",
                mode: i.parser.mode,
                delim: a.text
              };
            },
            htmlBuilder: (i, s) => {
              let a;
              if (i.delim === ".")
                a = Nr(s, []);
              else {
                a = i0.sizedDelim(i.delim, 1, s, i.mode, []);
                const f = {
                  delim: i.delim,
                  options: s
                };
                a.isMiddle = f;
              }
              return a;
            },
            mathmlBuilder: (i, s) => {
              const a = i.delim === "\\vert" || i.delim === "|" ? An("|", "text") : An(i.delim, i.mode), f = new le.MathNode("mo", [a]);
              return f.setAttribute("fence", "true"), f.setAttribute("lspace", "0.05em"), f.setAttribute("rspace", "0.05em"), f;
            }
          });
          const _l = (i, s) => {
            const a = X.wrapFragment(et(i.body, s), s), f = i.label.slice(1);
            let m = s.sizeMultiplier, b, w = 0;
            const D = N.isCharacterBox(i.body);
            if (f === "sout")
              b = X.makeSpan(["stretchy", "sout"]), b.height = s.fontMetrics().defaultRuleThickness / m, w = -0.5 * s.fontMetrics().xHeight;
            else if (f === "phase") {
              const I = st({
                number: 0.6,
                unit: "pt"
              }, s), j = st({
                number: 0.35,
                unit: "ex"
              }, s), W = s.havingBaseSizing();
              m = m / W.sizeMultiplier;
              const Z = a.height + a.depth + I + j;
              a.style.paddingLeft = oe(Z / 2 + I);
              const re = Math.floor(1e3 * Z * m), be = Ve(re), xe = new Qt([new dn("phase", be)], {
                width: "400em",
                height: oe(re / 1e3),
                viewBox: "0 0 400000 " + re,
                preserveAspectRatio: "xMinYMin slice"
              });
              b = X.makeSvgSpan(["hide-tail"], [xe], s), b.style.height = oe(Z), w = a.depth + I + j;
            } else {
              /cancel/.test(f) ? D || a.classes.push("cancel-pad") : f === "angl" ? a.classes.push("anglpad") : a.classes.push("boxpad");
              let I = 0, j = 0, W = 0;
              /box/.test(f) ? (W = Math.max(
                s.fontMetrics().fboxrule,
                // default
                s.minRuleThickness
                // User override.
              ), I = s.fontMetrics().fboxsep + (f === "colorbox" ? 0 : W), j = I) : f === "angl" ? (W = Math.max(s.fontMetrics().defaultRuleThickness, s.minRuleThickness), I = 4 * W, j = Math.max(0, 0.25 - a.depth)) : (I = D ? 0.2 : 0, j = I), b = s0.encloseSpan(a, f, I, j, s), /fbox|boxed|fcolorbox/.test(f) ? (b.style.borderStyle = "solid", b.style.borderWidth = oe(W)) : f === "angl" && W !== 0.049 && (b.style.borderTopWidth = oe(W), b.style.borderRightWidth = oe(W)), w = a.depth + j, i.backgroundColor && (b.style.backgroundColor = i.backgroundColor, i.borderColor && (b.style.borderColor = i.borderColor));
            }
            let F;
            if (i.backgroundColor)
              F = X.makeVList({
                positionType: "individualShift",
                children: [
                  // Put the color background behind inner;
                  {
                    type: "elem",
                    elem: b,
                    shift: w
                  },
                  {
                    type: "elem",
                    elem: a,
                    shift: 0
                  }
                ]
              }, s);
            else {
              const I = /cancel|phase/.test(f) ? ["svg-align"] : [];
              F = X.makeVList({
                positionType: "individualShift",
                children: [
                  // Write the \cancel stroke on top of inner.
                  {
                    type: "elem",
                    elem: a,
                    shift: 0
                  },
                  {
                    type: "elem",
                    elem: b,
                    shift: w,
                    wrapperClasses: I
                  }
                ]
              }, s);
            }
            return /cancel/.test(f) && (F.height = a.height, F.depth = a.depth), /cancel/.test(f) && !D ? X.makeSpan(["mord", "cancel-lap"], [F], s) : X.makeSpan(["mord"], [F], s);
          }, bl = (i, s) => {
            let a = 0;
            const f = new le.MathNode(i.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [dt(i.body, s)]);
            switch (i.label) {
              case "\\cancel":
                f.setAttribute("notation", "updiagonalstrike");
                break;
              case "\\bcancel":
                f.setAttribute("notation", "downdiagonalstrike");
                break;
              case "\\phase":
                f.setAttribute("notation", "phasorangle");
                break;
              case "\\sout":
                f.setAttribute("notation", "horizontalstrike");
                break;
              case "\\fbox":
                f.setAttribute("notation", "box");
                break;
              case "\\angl":
                f.setAttribute("notation", "actuarial");
                break;
              case "\\fcolorbox":
              case "\\colorbox":
                if (a = s.fontMetrics().fboxsep * s.fontMetrics().ptPerEm, f.setAttribute("width", "+" + 2 * a + "pt"), f.setAttribute("height", "+" + 2 * a + "pt"), f.setAttribute("lspace", a + "pt"), f.setAttribute("voffset", a + "pt"), i.label === "\\fcolorbox") {
                  const m = Math.max(
                    s.fontMetrics().fboxrule,
                    // default
                    s.minRuleThickness
                    // user override
                  );
                  f.setAttribute("style", "border: " + m + "em solid " + String(i.borderColor));
                }
                break;
              case "\\xcancel":
                f.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
                break;
            }
            return i.backgroundColor && f.setAttribute("mathbackground", i.backgroundColor), f;
          };
          ge({
            type: "enclose",
            names: ["\\colorbox"],
            props: {
              numArgs: 2,
              allowedInText: !0,
              argTypes: ["color", "text"]
            },
            handler(i, s, a) {
              let {
                parser: f,
                funcName: m
              } = i;
              const b = Le(s[0], "color-token").color, w = s[1];
              return {
                type: "enclose",
                mode: f.mode,
                label: m,
                backgroundColor: b,
                body: w
              };
            },
            htmlBuilder: _l,
            mathmlBuilder: bl
          }), ge({
            type: "enclose",
            names: ["\\fcolorbox"],
            props: {
              numArgs: 3,
              allowedInText: !0,
              argTypes: ["color", "color", "text"]
            },
            handler(i, s, a) {
              let {
                parser: f,
                funcName: m
              } = i;
              const b = Le(s[0], "color-token").color, w = Le(s[1], "color-token").color, D = s[2];
              return {
                type: "enclose",
                mode: f.mode,
                label: m,
                backgroundColor: w,
                borderColor: b,
                body: D
              };
            },
            htmlBuilder: _l,
            mathmlBuilder: bl
          }), ge({
            type: "enclose",
            names: ["\\fbox"],
            props: {
              numArgs: 1,
              argTypes: ["hbox"],
              allowedInText: !0
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "enclose",
                mode: a.mode,
                label: "\\fbox",
                body: s[0]
              };
            }
          }), ge({
            type: "enclose",
            names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout", "\\phase"],
            props: {
              numArgs: 1
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0];
              return {
                type: "enclose",
                mode: a.mode,
                label: f,
                body: m
              };
            },
            htmlBuilder: _l,
            mathmlBuilder: bl
          }), ge({
            type: "enclose",
            names: ["\\angl"],
            props: {
              numArgs: 1,
              argTypes: ["hbox"],
              allowedInText: !1
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "enclose",
                mode: a.mode,
                label: "\\angl",
                body: s[0]
              };
            }
          });
          const jo = {};
          function Un(i) {
            let {
              type: s,
              names: a,
              props: f,
              handler: m,
              htmlBuilder: b,
              mathmlBuilder: w
            } = i;
            const D = {
              type: s,
              numArgs: f.numArgs || 0,
              allowedInText: !1,
              numOptionalArgs: 0,
              handler: m
            };
            for (let F = 0; F < a.length; ++F)
              jo[a[F]] = D;
            b && (xs[s] = b), w && (Ts[s] = w);
          }
          const Vo = {};
          function S(i, s) {
            Vo[i] = s;
          }
          class mn {
            // 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(s, a, f) {
              this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = s, this.start = a, this.end = f;
            }
            /**
             * 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(s, a) {
              return a ? !s || !s.loc || !a.loc || s.loc.lexer !== a.loc.lexer ? null : new mn(s.loc.lexer, s.loc.start, a.loc.end) : s && s.loc;
            }
          }
          class Sn {
            // don't expand the token
            // used in \noexpand
            constructor(s, a) {
              this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = s, this.loc = a;
            }
            /**
             * Given a pair of tokens (this and endToken), compute a `Token` encompassing
             * the whole input range enclosed by these two.
             */
            range(s, a) {
              return new Sn(a, mn.range(this, s));
            }
          }
          function Wo(i) {
            const s = [];
            i.consumeSpaces();
            let a = i.fetch().text;
            for (a === "\\relax" && (i.consume(), i.consumeSpaces(), a = i.fetch().text); a === "\\hline" || a === "\\hdashline"; )
              i.consume(), s.push(a === "\\hdashline"), i.consumeSpaces(), a = i.fetch().text;
            return s;
          }
          const Os = (i) => {
            if (!i.parser.settings.displayMode)
              throw new o("{" + i.envName + "} can be used only in display mode.");
          };
          function wl(i) {
            if (i.indexOf("ed") === -1)
              return i.indexOf("*") === -1;
          }
          function p0(i, s, a) {
            let {
              hskipBeforeAndAfter: f,
              addJot: m,
              cols: b,
              arraystretch: w,
              colSeparationType: D,
              autoTag: F,
              singleRow: I,
              emptySingleRow: j,
              maxNumCols: W,
              leqno: Z
            } = s;
            if (i.gullet.beginGroup(), I || i.gullet.macros.set("\\cr", "\\\\\\relax"), !w) {
              const _t = i.gullet.expandMacroAsText("\\arraystretch");
              if (_t == null)
                w = 1;
              else if (w = parseFloat(_t), !w || w < 0)
                throw new o("Invalid \\arraystretch: " + _t);
            }
            i.gullet.beginGroup();
            let re = [];
            const be = [re], xe = [], Ye = [], Ge = F != null ? [] : void 0;
            function Ke() {
              F && i.gullet.macros.set("\\@eqnsw", "1", !0);
            }
            function lt() {
              Ge && (i.gullet.macros.get("\\df@tag") ? (Ge.push(i.subparse([new Sn("\\df@tag")])), i.gullet.macros.set("\\df@tag", void 0, !0)) : Ge.push(!!F && i.gullet.macros.get("\\@eqnsw") === "1"));
            }
            for (Ke(), Ye.push(Wo(i)); ; ) {
              let _t = i.parseExpression(!1, I ? "\\end" : "\\\\");
              i.gullet.endGroup(), i.gullet.beginGroup(), _t = {
                type: "ordgroup",
                mode: i.mode,
                body: _t
              }, a && (_t = {
                type: "styling",
                mode: i.mode,
                style: a,
                body: [_t]
              }), re.push(_t);
              const Kt = i.fetch().text;
              if (Kt === "&") {
                if (W && re.length === W) {
                  if (I || D)
                    throw new o("Too many tab characters: &", i.nextToken);
                  i.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
                }
                i.consume();
              } else if (Kt === "\\end") {
                lt(), re.length === 1 && _t.type === "styling" && _t.body[0].body.length === 0 && (be.length > 1 || !j) && be.pop(), Ye.length < be.length + 1 && Ye.push([]);
                break;
              } else if (Kt === "\\\\") {
                i.consume();
                let Pt;
                i.gullet.future().text !== " " && (Pt = i.parseSizeGroup(!0)), xe.push(Pt ? Pt.value : null), lt(), Ye.push(Wo(i)), re = [], be.push(re), Ke();
              } else
                throw new o("Expected & or \\\\ or \\cr or \\end", i.nextToken);
            }
            return i.gullet.endGroup(), i.gullet.endGroup(), {
              type: "array",
              mode: i.mode,
              addJot: m,
              arraystretch: w,
              body: be,
              cols: b,
              rowGaps: xe,
              hskipBeforeAndAfter: f,
              hLinesBeforeRow: Ye,
              colSeparationType: D,
              tags: Ge,
              leqno: Z
            };
          }
          function yl(i) {
            return i.slice(0, 1) === "d" ? "display" : "text";
          }
          const Gn = function(i, s) {
            let a, f;
            const m = i.body.length, b = i.hLinesBeforeRow;
            let w = 0, D = new Array(m);
            const F = [], I = Math.max(
              // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em.
              s.fontMetrics().arrayRuleWidth,
              s.minRuleThickness
              // User override.
            ), j = 1 / s.fontMetrics().ptPerEm;
            let W = 5 * j;
            i.colSeparationType && i.colSeparationType === "small" && (W = 0.2778 * (s.havingStyle(Q.SCRIPT).sizeMultiplier / s.sizeMultiplier));
            const Z = i.colSeparationType === "CD" ? st({
              number: 3,
              unit: "ex"
            }, s) : 12 * j, re = 3 * j, be = i.arraystretch * Z, xe = 0.7 * be, Ye = 0.3 * be;
            let Ge = 0;
            function Ke(tt) {
              for (let ut = 0; ut < tt.length; ++ut)
                ut > 0 && (Ge += 0.25), F.push({
                  pos: Ge,
                  isDashed: tt[ut]
                });
            }
            for (Ke(b[0]), a = 0; a < i.body.length; ++a) {
              const tt = i.body[a];
              let ut = xe, wt = Ye;
              w < tt.length && (w = tt.length);
              const Dt = new Array(tt.length);
              for (f = 0; f < tt.length; ++f) {
                const xn = et(tt[f], s);
                wt < xn.depth && (wt = xn.depth), ut < xn.height && (ut = xn.height), Dt[f] = xn;
              }
              const zt = i.rowGaps[a];
              let Mt = 0;
              zt && (Mt = st(zt, s), Mt > 0 && (Mt += Ye, wt < Mt && (wt = Mt), Mt = 0)), i.addJot && (wt += re), Dt.height = ut, Dt.depth = wt, Ge += ut, Dt.pos = Ge, Ge += wt + Mt, D[a] = Dt, Ke(b[a + 1]);
            }
            const lt = Ge / 2 + s.fontMetrics().axisHeight, _t = i.cols || [], Kt = [];
            let Pt, En;
            const ar = [];
            if (i.tags && i.tags.some((tt) => tt))
              for (a = 0; a < m; ++a) {
                const tt = D[a], ut = tt.pos - lt, wt = i.tags[a];
                let Dt;
                wt === !0 ? Dt = X.makeSpan(["eqn-num"], [], s) : wt === !1 ? Dt = X.makeSpan([], [], s) : Dt = X.makeSpan([], Ht(wt, s, !0), s), Dt.depth = tt.depth, Dt.height = tt.height, ar.push({
                  type: "elem",
                  elem: Dt,
                  shift: ut
                });
              }
            for (
              f = 0, En = 0;
              // Continue while either there are more columns or more column
              // descriptions, so trailing separators don't get lost.
              f < w || En < _t.length;
              ++f, ++En
            ) {
              let tt = _t[En] || {}, ut = !0;
              for (; tt.type === "separator"; ) {
                if (ut || (Pt = X.makeSpan(["arraycolsep"], []), Pt.style.width = oe(s.fontMetrics().doubleRuleSep), Kt.push(Pt)), tt.separator === "|" || tt.separator === ":") {
                  const zt = tt.separator === "|" ? "solid" : "dashed", Mt = X.makeSpan(["vertical-separator"], [], s);
                  Mt.style.height = oe(Ge), Mt.style.borderRightWidth = oe(I), Mt.style.borderRightStyle = zt, Mt.style.margin = "0 " + oe(-I / 2);
                  const xn = Ge - lt;
                  xn && (Mt.style.verticalAlign = oe(-xn)), Kt.push(Mt);
                } else
                  throw new o("Invalid separator type: " + tt.separator);
                En++, tt = _t[En] || {}, ut = !1;
              }
              if (f >= w)
                continue;
              let wt;
              (f > 0 || i.hskipBeforeAndAfter) && (wt = N.deflt(tt.pregap, W), wt !== 0 && (Pt = X.makeSpan(["arraycolsep"], []), Pt.style.width = oe(wt), Kt.push(Pt)));
              let Dt = [];
              for (a = 0; a < m; ++a) {
                const zt = D[a], Mt = zt[f];
                if (!Mt)
                  continue;
                const xn = zt.pos - lt;
                Mt.depth = zt.depth, Mt.height = zt.height, Dt.push({
                  type: "elem",
                  elem: Mt,
                  shift: xn
                });
              }
              Dt = X.makeVList({
                positionType: "individualShift",
                children: Dt
              }, s), Dt = X.makeSpan(["col-align-" + (tt.align || "c")], [Dt]), Kt.push(Dt), (f < w - 1 || i.hskipBeforeAndAfter) && (wt = N.deflt(tt.postgap, W), wt !== 0 && (Pt = X.makeSpan(["arraycolsep"], []), Pt.style.width = oe(wt), Kt.push(Pt)));
            }
            if (D = X.makeSpan(["mtable"], Kt), F.length > 0) {
              const tt = X.makeLineSpan("hline", s, I), ut = X.makeLineSpan("hdashline", s, I), wt = [{
                type: "elem",
                elem: D,
                shift: 0
              }];
              for (; F.length > 0; ) {
                const Dt = F.pop(), zt = Dt.pos - lt;
                Dt.isDashed ? wt.push({
                  type: "elem",
                  elem: ut,
                  shift: zt
                }) : wt.push({
                  type: "elem",
                  elem: tt,
                  shift: zt
                });
              }
              D = X.makeVList({
                positionType: "individualShift",
                children: wt
              }, s);
            }
            if (ar.length === 0)
              return X.makeSpan(["mord"], [D], s);
            {
              let tt = X.makeVList({
                positionType: "individualShift",
                children: ar
              }, s);
              return tt = X.makeSpan(["tag"], [tt], s), X.makeFragment([D, tt]);
            }
          }, Q4 = {
            c: "center ",
            l: "left ",
            r: "right "
          }, jn = function(i, s) {
            const a = [], f = new le.MathNode("mtd", [], ["mtr-glue"]), m = new le.MathNode("mtd", [], ["mml-eqn-num"]);
            for (let W = 0; W < i.body.length; W++) {
              const Z = i.body[W], re = [];
              for (let be = 0; be < Z.length; be++)
                re.push(new le.MathNode("mtd", [dt(Z[be], s)]));
              i.tags && i.tags[W] && (re.unshift(f), re.push(f), i.leqno ? re.unshift(m) : re.push(m)), a.push(new le.MathNode("mtr", re));
            }
            let b = new le.MathNode("mtable", a);
            const w = i.arraystretch === 0.5 ? 0.1 : 0.16 + i.arraystretch - 1 + (i.addJot ? 0.09 : 0);
            b.setAttribute("rowspacing", oe(w));
            let D = "", F = "";
            if (i.cols && i.cols.length > 0) {
              const W = i.cols;
              let Z = "", re = !1, be = 0, xe = W.length;
              W[0].type === "separator" && (D += "top ", be = 1), W[W.length - 1].type === "separator" && (D += "bottom ", xe -= 1);
              for (let Ye = be; Ye < xe; Ye++)
                W[Ye].type === "align" ? (F += Q4[W[Ye].align], re && (Z += "none "), re = !0) : W[Ye].type === "separator" && re && (Z += W[Ye].separator === "|" ? "solid " : "dashed ", re = !1);
              b.setAttribute("columnalign", F.trim()), /[sd]/.test(Z) && b.setAttribute("columnlines", Z.trim());
            }
            if (i.colSeparationType === "align") {
              const W = i.cols || [];
              let Z = "";
              for (let re = 1; re < W.length; re++)
                Z += re % 2 ? "0em " : "1em ";
              b.setAttribute("columnspacing", Z.trim());
            } else
              i.colSeparationType === "alignat" || i.colSeparationType === "gather" ? b.setAttribute("columnspacing", "0em") : i.colSeparationType === "small" ? b.setAttribute("columnspacing", "0.2778em") : i.colSeparationType === "CD" ? b.setAttribute("columnspacing", "0.5em") : b.setAttribute("columnspacing", "1em");
            let I = "";
            const j = i.hLinesBeforeRow;
            D += j[0].length > 0 ? "left " : "", D += j[j.length - 1].length > 0 ? "right " : "";
            for (let W = 1; W < j.length - 1; W++)
              I += j[W].length === 0 ? "none " : j[W][0] ? "dashed " : "solid ";
            return /[sd]/.test(I) && b.setAttribute("rowlines", I.trim()), D !== "" && (b = new le.MathNode("menclose", [b]), b.setAttribute("notation", D.trim())), i.arraystretch && i.arraystretch < 1 && (b = new le.MathNode("mstyle", [b]), b.setAttribute("scriptlevel", "1")), b;
          }, Xo = function(i, s) {
            i.envName.indexOf("ed") === -1 && Os(i);
            const a = [], f = i.envName.indexOf("at") > -1 ? "alignat" : "align", m = i.envName === "split", b = p0(i.parser, {
              cols: a,
              addJot: !0,
              autoTag: m ? void 0 : wl(i.envName),
              emptySingleRow: !0,
              colSeparationType: f,
              maxNumCols: m ? 2 : void 0,
              leqno: i.parser.settings.leqno
            }, "display");
            let w, D = 0;
            const F = {
              type: "ordgroup",
              mode: i.mode,
              body: []
            };
            if (s[0] && s[0].type === "ordgroup") {
              let j = "";
              for (let W = 0; W < s[0].body.length; W++) {
                const Z = Le(s[0].body[W], "textord");
                j += Z.text;
              }
              w = Number(j), D = w * 2;
            }
            const I = !D;
            b.body.forEach(function(j) {
              for (let W = 1; W < j.length; W += 2) {
                const Z = Le(j[W], "styling");
                Le(Z.body[0], "ordgroup").body.unshift(F);
              }
              if (I)
                D < j.length && (D = j.length);
              else {
                const W = j.length / 2;
                if (w < W)
                  throw new o("Too many math in a row: " + ("expected " + w + ", but got " + W), j[0]);
              }
            });
            for (let j = 0; j < D; ++j) {
              let W = "r", Z = 0;
              j % 2 === 1 ? W = "l" : j > 0 && I && (Z = 1), a[j] = {
                type: "align",
                align: W,
                pregap: Z,
                postgap: 0
              };
            }
            return b.colSeparationType = I ? "align" : "alignat", b;
          };
          Un({
            type: "array",
            names: ["array", "darray"],
            props: {
              numArgs: 1
            },
            handler(i, s) {
              const m = (Ms(s[0]) ? [s[0]] : Le(s[0], "ordgroup").body).map(function(w) {
                const F = al(w).text;
                if ("lcr".indexOf(F) !== -1)
                  return {
                    type: "align",
                    align: F
                  };
                if (F === "|")
                  return {
                    type: "separator",
                    separator: "|"
                  };
                if (F === ":")
                  return {
                    type: "separator",
                    separator: ":"
                  };
                throw new o("Unknown column alignment: " + F, w);
              }), b = {
                cols: m,
                hskipBeforeAndAfter: !0,
                // \@preamble in lttab.dtx
                maxNumCols: m.length
              };
              return p0(i.parser, b, yl(i.envName));
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"],
            props: {
              numArgs: 0
            },
            handler(i) {
              const s = {
                matrix: null,
                pmatrix: ["(", ")"],
                bmatrix: ["[", "]"],
                Bmatrix: ["\\{", "\\}"],
                vmatrix: ["|", "|"],
                Vmatrix: ["\\Vert", "\\Vert"]
              }[i.envName.replace("*", "")];
              let a = "c";
              const f = {
                hskipBeforeAndAfter: !1,
                cols: [{
                  type: "align",
                  align: a
                }]
              };
              if (i.envName.charAt(i.envName.length - 1) === "*") {
                const w = i.parser;
                if (w.consumeSpaces(), w.fetch().text === "[") {
                  if (w.consume(), w.consumeSpaces(), a = w.fetch().text, "lcr".indexOf(a) === -1)
                    throw new o("Expected l or c or r", w.nextToken);
                  w.consume(), w.consumeSpaces(), w.expect("]"), w.consume(), f.cols = [{
                    type: "align",
                    align: a
                  }];
                }
              }
              const m = p0(i.parser, f, yl(i.envName)), b = Math.max(0, ...m.body.map((w) => w.length));
              return m.cols = new Array(b).fill({
                type: "align",
                align: a
              }), s ? {
                type: "leftright",
                mode: i.mode,
                body: [m],
                left: s[0],
                right: s[1],
                rightColor: void 0
                // \right uninfluenced by \color in array
              } : m;
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["smallmatrix"],
            props: {
              numArgs: 0
            },
            handler(i) {
              const s = {
                arraystretch: 0.5
              }, a = p0(i.parser, s, "script");
              return a.colSeparationType = "small", a;
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["subarray"],
            props: {
              numArgs: 1
            },
            handler(i, s) {
              const m = (Ms(s[0]) ? [s[0]] : Le(s[0], "ordgroup").body).map(function(w) {
                const F = al(w).text;
                if ("lc".indexOf(F) !== -1)
                  return {
                    type: "align",
                    align: F
                  };
                throw new o("Unknown column alignment: " + F, w);
              });
              if (m.length > 1)
                throw new o("{subarray} can contain only one column");
              let b = {
                cols: m,
                hskipBeforeAndAfter: !1,
                arraystretch: 0.5
              };
              if (b = p0(i.parser, b, "script"), b.body.length > 0 && b.body[0].length > 1)
                throw new o("{subarray} can contain only one column");
              return b;
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["cases", "dcases", "rcases", "drcases"],
            props: {
              numArgs: 0
            },
            handler(i) {
              const s = {
                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
                }]
              }, a = p0(i.parser, s, yl(i.envName));
              return {
                type: "leftright",
                mode: i.mode,
                body: [a],
                left: i.envName.indexOf("r") > -1 ? "." : "\\{",
                right: i.envName.indexOf("r") > -1 ? "\\}" : ".",
                rightColor: void 0
              };
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["align", "align*", "aligned", "split"],
            props: {
              numArgs: 0
            },
            handler: Xo,
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["gathered", "gather", "gather*"],
            props: {
              numArgs: 0
            },
            handler(i) {
              N.contains(["gather", "gather*"], i.envName) && Os(i);
              const s = {
                cols: [{
                  type: "align",
                  align: "c"
                }],
                addJot: !0,
                colSeparationType: "gather",
                autoTag: wl(i.envName),
                emptySingleRow: !0,
                leqno: i.parser.settings.leqno
              };
              return p0(i.parser, s, "display");
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["alignat", "alignat*", "alignedat"],
            props: {
              numArgs: 1
            },
            handler: Xo,
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["equation", "equation*"],
            props: {
              numArgs: 0
            },
            handler(i) {
              Os(i);
              const s = {
                autoTag: wl(i.envName),
                emptySingleRow: !0,
                singleRow: !0,
                maxNumCols: 1,
                leqno: i.parser.settings.leqno
              };
              return p0(i.parser, s, "display");
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), Un({
            type: "array",
            names: ["CD"],
            props: {
              numArgs: 0
            },
            handler(i) {
              return Os(i), L4(i.parser);
            },
            htmlBuilder: Gn,
            mathmlBuilder: jn
          }), S("\\nonumber", "\\gdef\\@eqnsw{0}"), S("\\notag", "\\nonumber"), ge({
            type: "text",
            // Doesn't matter what this is.
            names: ["\\hline", "\\hdashline"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              allowedInMath: !0
            },
            handler(i, s) {
              throw new o(i.funcName + " valid only within array environment");
            }
          });
          var Yo = jo;
          ge({
            type: "environment",
            names: ["\\begin", "\\end"],
            props: {
              numArgs: 1,
              argTypes: ["text"]
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0];
              if (m.type !== "ordgroup")
                throw new o("Invalid environment name", m);
              let b = "";
              for (let w = 0; w < m.body.length; ++w)
                b += Le(m.body[w], "textord").text;
              if (f === "\\begin") {
                if (!Yo.hasOwnProperty(b))
                  throw new o("No such environment: " + b, m);
                const w = Yo[b], {
                  args: D,
                  optArgs: F
                } = a.parseArguments("\\begin{" + b + "}", w), I = {
                  mode: a.mode,
                  envName: b,
                  parser: a
                }, j = w.handler(I, D, F);
                a.expect("\\end", !1);
                const W = a.nextToken, Z = Le(a.parseFunction(), "environment");
                if (Z.name !== b)
                  throw new o("Mismatch: \\begin{" + b + "} matched by \\end{" + Z.name + "}", W);
                return j;
              }
              return {
                type: "environment",
                mode: a.mode,
                name: b,
                nameGroup: m
              };
            }
          });
          const Zo = (i, s) => {
            const a = i.font, f = s.withFont(a);
            return et(i.body, f);
          }, Jo = (i, s) => {
            const a = i.font, f = s.withFont(a);
            return dt(i.body, f);
          }, Qo = {
            "\\Bbb": "\\mathbb",
            "\\bold": "\\mathbf",
            "\\frak": "\\mathfrak",
            "\\bm": "\\boldsymbol"
          };
          ge({
            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, s) => {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = Fs(s[0]);
              let b = f;
              return b in Qo && (b = Qo[b]), {
                type: "font",
                mode: a.mode,
                font: b.slice(1),
                body: m
              };
            },
            htmlBuilder: Zo,
            mathmlBuilder: Jo
          }), ge({
            type: "mclass",
            names: ["\\boldsymbol", "\\bm"],
            props: {
              numArgs: 1
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              const f = s[0], m = N.isCharacterBox(f);
              return {
                type: "mclass",
                mode: a.mode,
                mclass: Ns(f),
                body: [{
                  type: "font",
                  mode: a.mode,
                  font: "boldsymbol",
                  body: f
                }],
                isCharacterBox: m
              };
            }
          }), ge({
            type: "font",
            names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f,
                breakOnTokenText: m
              } = i;
              const {
                mode: b
              } = a, w = a.parseExpression(!0, m), D = "math" + f.slice(1);
              return {
                type: "font",
                mode: b,
                font: D,
                body: {
                  type: "ordgroup",
                  mode: a.mode,
                  body: w
                }
              };
            },
            htmlBuilder: Zo,
            mathmlBuilder: Jo
          });
          const Ko = (i, s) => {
            let a = s;
            return i === "display" ? a = a.id >= Q.SCRIPT.id ? a.text() : Q.DISPLAY : i === "text" && a.size === Q.DISPLAY.size ? a = Q.TEXT : i === "script" ? a = Q.SCRIPT : i === "scriptscript" && (a = Q.SCRIPTSCRIPT), a;
          }, vl = (i, s) => {
            const a = Ko(i.size, s.style), f = a.fracNum(), m = a.fracDen();
            let b;
            b = s.havingStyle(f);
            const w = et(i.numer, b, s);
            if (i.continued) {
              const Ke = 8.5 / s.fontMetrics().ptPerEm, lt = 3.5 / s.fontMetrics().ptPerEm;
              w.height = w.height < Ke ? Ke : w.height, w.depth = w.depth < lt ? lt : w.depth;
            }
            b = s.havingStyle(m);
            const D = et(i.denom, b, s);
            let F, I, j;
            i.hasBarLine ? (i.barSize ? (I = st(i.barSize, s), F = X.makeLineSpan("frac-line", s, I)) : F = X.makeLineSpan("frac-line", s), I = F.height, j = F.height) : (F = null, I = 0, j = s.fontMetrics().defaultRuleThickness);
            let W, Z, re;
            a.size === Q.DISPLAY.size || i.size === "display" ? (W = s.fontMetrics().num1, I > 0 ? Z = 3 * j : Z = 7 * j, re = s.fontMetrics().denom1) : (I > 0 ? (W = s.fontMetrics().num2, Z = j) : (W = s.fontMetrics().num3, Z = 3 * j), re = s.fontMetrics().denom2);
            let be;
            if (F) {
              const Ke = s.fontMetrics().axisHeight;
              W - w.depth - (Ke + 0.5 * I) < Z && (W += Z - (W - w.depth - (Ke + 0.5 * I))), Ke - 0.5 * I - (D.height - re) < Z && (re += Z - (Ke - 0.5 * I - (D.height - re)));
              const lt = -(Ke - 0.5 * I);
              be = X.makeVList({
                positionType: "individualShift",
                children: [{
                  type: "elem",
                  elem: D,
                  shift: re
                }, {
                  type: "elem",
                  elem: F,
                  shift: lt
                }, {
                  type: "elem",
                  elem: w,
                  shift: -W
                }]
              }, s);
            } else {
              const Ke = W - w.depth - (D.height - re);
              Ke < Z && (W += 0.5 * (Z - Ke), re += 0.5 * (Z - Ke)), be = X.makeVList({
                positionType: "individualShift",
                children: [{
                  type: "elem",
                  elem: D,
                  shift: re
                }, {
                  type: "elem",
                  elem: w,
                  shift: -W
                }]
              }, s);
            }
            b = s.havingStyle(a), be.height *= b.sizeMultiplier / s.sizeMultiplier, be.depth *= b.sizeMultiplier / s.sizeMultiplier;
            let xe;
            a.size === Q.DISPLAY.size ? xe = s.fontMetrics().delim1 : a.size === Q.SCRIPTSCRIPT.size ? xe = s.havingStyle(Q.SCRIPT).fontMetrics().delim2 : xe = s.fontMetrics().delim2;
            let Ye, Ge;
            return i.leftDelim == null ? Ye = Nr(s, ["mopen"]) : Ye = i0.customSizedDelim(i.leftDelim, xe, !0, s.havingStyle(a), i.mode, ["mopen"]), i.continued ? Ge = X.makeSpan([]) : i.rightDelim == null ? Ge = Nr(s, ["mclose"]) : Ge = i0.customSizedDelim(i.rightDelim, xe, !0, s.havingStyle(a), i.mode, ["mclose"]), X.makeSpan(["mord"].concat(b.sizingClasses(s)), [Ye, X.makeSpan(["mfrac"], [be]), Ge], s);
          }, kl = (i, s) => {
            let a = new le.MathNode("mfrac", [dt(i.numer, s), dt(i.denom, s)]);
            if (!i.hasBarLine)
              a.setAttribute("linethickness", "0px");
            else if (i.barSize) {
              const m = st(i.barSize, s);
              a.setAttribute("linethickness", oe(m));
            }
            const f = Ko(i.size, s.style);
            if (f.size !== s.style.size) {
              a = new le.MathNode("mstyle", [a]);
              const m = f.size === Q.DISPLAY.size ? "true" : "false";
              a.setAttribute("displaystyle", m), a.setAttribute("scriptlevel", "0");
            }
            if (i.leftDelim != null || i.rightDelim != null) {
              const m = [];
              if (i.leftDelim != null) {
                const b = new le.MathNode("mo", [new le.TextNode(i.leftDelim.replace("\\", ""))]);
                b.setAttribute("fence", "true"), m.push(b);
              }
              if (m.push(a), i.rightDelim != null) {
                const b = new le.MathNode("mo", [new le.TextNode(i.rightDelim.replace("\\", ""))]);
                b.setAttribute("fence", "true"), m.push(b);
              }
              return il(m);
            }
            return a;
          };
          ge({
            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, s) => {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0], b = s[1];
              let w, D = null, F = null, I = "auto";
              switch (f) {
                case "\\dfrac":
                case "\\frac":
                case "\\tfrac":
                  w = !0;
                  break;
                case "\\\\atopfrac":
                  w = !1;
                  break;
                case "\\dbinom":
                case "\\binom":
                case "\\tbinom":
                  w = !1, D = "(", F = ")";
                  break;
                case "\\\\bracefrac":
                  w = !1, D = "\\{", F = "\\}";
                  break;
                case "\\\\brackfrac":
                  w = !1, D = "[", F = "]";
                  break;
                default:
                  throw new Error("Unrecognized genfrac command");
              }
              switch (f) {
                case "\\dfrac":
                case "\\dbinom":
                  I = "display";
                  break;
                case "\\tfrac":
                case "\\tbinom":
                  I = "text";
                  break;
              }
              return {
                type: "genfrac",
                mode: a.mode,
                continued: !1,
                numer: m,
                denom: b,
                hasBarLine: w,
                leftDelim: D,
                rightDelim: F,
                size: I,
                barSize: null
              };
            },
            htmlBuilder: vl,
            mathmlBuilder: kl
          }), ge({
            type: "genfrac",
            names: ["\\cfrac"],
            props: {
              numArgs: 2
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0], b = s[1];
              return {
                type: "genfrac",
                mode: a.mode,
                continued: !0,
                numer: m,
                denom: b,
                hasBarLine: !0,
                leftDelim: null,
                rightDelim: null,
                size: "display",
                barSize: null
              };
            }
          }), ge({
            type: "infix",
            names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
            props: {
              numArgs: 0,
              infix: !0
            },
            handler(i) {
              let {
                parser: s,
                funcName: a,
                token: f
              } = i, m;
              switch (a) {
                case "\\over":
                  m = "\\frac";
                  break;
                case "\\choose":
                  m = "\\binom";
                  break;
                case "\\atop":
                  m = "\\\\atopfrac";
                  break;
                case "\\brace":
                  m = "\\\\bracefrac";
                  break;
                case "\\brack":
                  m = "\\\\brackfrac";
                  break;
                default:
                  throw new Error("Unrecognized infix genfrac command");
              }
              return {
                type: "infix",
                mode: s.mode,
                replaceWith: m,
                token: f
              };
            }
          });
          const $o = ["display", "text", "script", "scriptscript"], eu = function(i) {
            let s = null;
            return i.length > 0 && (s = i, s = s === "." ? null : s), s;
          };
          ge({
            type: "genfrac",
            names: ["\\genfrac"],
            props: {
              numArgs: 6,
              allowedInArgument: !0,
              argTypes: ["math", "math", "size", "text", "math", "math"]
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              const f = s[4], m = s[5], b = Fs(s[0]), w = b.type === "atom" && b.family === "open" ? eu(b.text) : null, D = Fs(s[1]), F = D.type === "atom" && D.family === "close" ? eu(D.text) : null, I = Le(s[2], "size");
              let j, W = null;
              I.isBlank ? j = !0 : (W = I.value, j = W.number > 0);
              let Z = "auto", re = s[3];
              if (re.type === "ordgroup") {
                if (re.body.length > 0) {
                  const be = Le(re.body[0], "textord");
                  Z = $o[Number(be.text)];
                }
              } else
                re = Le(re, "textord"), Z = $o[Number(re.text)];
              return {
                type: "genfrac",
                mode: a.mode,
                numer: f,
                denom: m,
                continued: !1,
                hasBarLine: j,
                barSize: W,
                leftDelim: w,
                rightDelim: F,
                size: Z
              };
            },
            htmlBuilder: vl,
            mathmlBuilder: kl
          }), ge({
            type: "infix",
            names: ["\\above"],
            props: {
              numArgs: 1,
              argTypes: ["size"],
              infix: !0
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f,
                token: m
              } = i;
              return {
                type: "infix",
                mode: a.mode,
                replaceWith: "\\\\abovefrac",
                size: Le(s[0], "size").value,
                token: m
              };
            }
          }), ge({
            type: "genfrac",
            names: ["\\\\abovefrac"],
            props: {
              numArgs: 3,
              argTypes: ["math", "size", "math"]
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0], b = H(Le(s[1], "infix").size), w = s[2], D = b.number > 0;
              return {
                type: "genfrac",
                mode: a.mode,
                numer: m,
                denom: w,
                continued: !1,
                hasBarLine: D,
                barSize: b,
                leftDelim: null,
                rightDelim: null,
                size: "auto"
              };
            },
            htmlBuilder: vl,
            mathmlBuilder: kl
          });
          const tu = (i, s) => {
            const a = s.style;
            let f, m;
            i.type === "supsub" ? (f = i.sup ? et(i.sup, s.havingStyle(a.sup()), s) : et(i.sub, s.havingStyle(a.sub()), s), m = Le(i.base, "horizBrace")) : m = Le(i, "horizBrace");
            const b = et(m.base, s.havingBaseStyle(Q.DISPLAY)), w = s0.svgSpan(m, s);
            let D;
            if (m.isOver ? (D = X.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: b
              }, {
                type: "kern",
                size: 0.1
              }, {
                type: "elem",
                elem: w
              }]
            }, s), D.children[0].children[0].children[1].classes.push("svg-align")) : (D = X.makeVList({
              positionType: "bottom",
              positionData: b.depth + 0.1 + w.height,
              children: [{
                type: "elem",
                elem: w
              }, {
                type: "kern",
                size: 0.1
              }, {
                type: "elem",
                elem: b
              }]
            }, s), D.children[0].children[0].children[0].classes.push("svg-align")), f) {
              const F = X.makeSpan(["mord", m.isOver ? "mover" : "munder"], [D], s);
              m.isOver ? D = X.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: F
                }, {
                  type: "kern",
                  size: 0.2
                }, {
                  type: "elem",
                  elem: f
                }]
              }, s) : D = X.makeVList({
                positionType: "bottom",
                positionData: F.depth + 0.2 + f.height + f.depth,
                children: [{
                  type: "elem",
                  elem: f
                }, {
                  type: "kern",
                  size: 0.2
                }, {
                  type: "elem",
                  elem: F
                }]
              }, s);
            }
            return X.makeSpan(["mord", m.isOver ? "mover" : "munder"], [D], s);
          };
          ge({
            type: "horizBrace",
            names: ["\\overbrace", "\\underbrace"],
            props: {
              numArgs: 1
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              return {
                type: "horizBrace",
                mode: a.mode,
                label: f,
                isOver: /^\\over/.test(f),
                base: s[0]
              };
            },
            htmlBuilder: tu,
            mathmlBuilder: (i, s) => {
              const a = s0.mathMLnode(i.label);
              return new le.MathNode(i.isOver ? "mover" : "munder", [dt(i.base, s), a]);
            }
          }), ge({
            type: "href",
            names: ["\\href"],
            props: {
              numArgs: 2,
              argTypes: ["url", "original"],
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              const f = s[1], m = Le(s[0], "url").url;
              return a.settings.isTrusted({
                command: "\\href",
                url: m
              }) ? {
                type: "href",
                mode: a.mode,
                href: m,
                body: Ot(f)
              } : a.formatUnsupportedCmd("\\href");
            },
            htmlBuilder: (i, s) => {
              const a = Ht(i.body, s, !1);
              return X.makeAnchor(i.href, [], a, s);
            },
            mathmlBuilder: (i, s) => {
              let a = m0(i.body, s);
              return a instanceof Dn || (a = new Dn("mrow", [a])), a.setAttribute("href", i.href), a;
            }
          }), ge({
            type: "href",
            names: ["\\url"],
            props: {
              numArgs: 1,
              argTypes: ["url"],
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              const f = Le(s[0], "url").url;
              if (!a.settings.isTrusted({
                command: "\\url",
                url: f
              }))
                return a.formatUnsupportedCmd("\\url");
              const m = [];
              for (let w = 0; w < f.length; w++) {
                let D = f[w];
                D === "~" && (D = "\\textasciitilde"), m.push({
                  type: "textord",
                  mode: "text",
                  text: D
                });
              }
              const b = {
                type: "text",
                mode: a.mode,
                font: "\\texttt",
                body: m
              };
              return {
                type: "href",
                mode: a.mode,
                href: f,
                body: Ot(b)
              };
            }
          }), ge({
            type: "hbox",
            names: ["\\hbox"],
            props: {
              numArgs: 1,
              argTypes: ["text"],
              allowedInText: !0,
              primitive: !0
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "hbox",
                mode: a.mode,
                body: Ot(s[0])
              };
            },
            htmlBuilder(i, s) {
              const a = Ht(i.body, s, !1);
              return X.makeFragment(a);
            },
            mathmlBuilder(i, s) {
              return new le.MathNode("mrow", sn(i.body, s));
            }
          }), ge({
            type: "html",
            names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"],
            props: {
              numArgs: 2,
              argTypes: ["raw", "original"],
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f,
                token: m
              } = i;
              const b = Le(s[0], "raw").string, w = s[1];
              a.settings.strict && a.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
              let D;
              const F = {};
              switch (f) {
                case "\\htmlClass":
                  F.class = b, D = {
                    command: "\\htmlClass",
                    class: b
                  };
                  break;
                case "\\htmlId":
                  F.id = b, D = {
                    command: "\\htmlId",
                    id: b
                  };
                  break;
                case "\\htmlStyle":
                  F.style = b, D = {
                    command: "\\htmlStyle",
                    style: b
                  };
                  break;
                case "\\htmlData": {
                  const I = b.split(",");
                  for (let j = 0; j < I.length; j++) {
                    const W = I[j].split("=");
                    if (W.length !== 2)
                      throw new o("Error parsing key-value for \\htmlData");
                    F["data-" + W[0].trim()] = W[1].trim();
                  }
                  D = {
                    command: "\\htmlData",
                    attributes: F
                  };
                  break;
                }
                default:
                  throw new Error("Unrecognized html command");
              }
              return a.settings.isTrusted(D) ? {
                type: "html",
                mode: a.mode,
                attributes: F,
                body: Ot(w)
              } : a.formatUnsupportedCmd(f);
            },
            htmlBuilder: (i, s) => {
              const a = Ht(i.body, s, !1), f = ["enclosing"];
              i.attributes.class && f.push(...i.attributes.class.trim().split(/\s+/));
              const m = X.makeSpan(f, a, s);
              for (const b in i.attributes)
                b !== "class" && i.attributes.hasOwnProperty(b) && m.setAttribute(b, i.attributes[b]);
              return m;
            },
            mathmlBuilder: (i, s) => m0(i.body, s)
          }), ge({
            type: "htmlmathml",
            names: ["\\html@mathml"],
            props: {
              numArgs: 2,
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              return {
                type: "htmlmathml",
                mode: a.mode,
                html: Ot(s[0]),
                mathml: Ot(s[1])
              };
            },
            htmlBuilder: (i, s) => {
              const a = Ht(i.html, s, !1);
              return X.makeFragment(a);
            },
            mathmlBuilder: (i, s) => m0(i.mathml, s)
          });
          const Dl = function(i) {
            if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(i))
              return {
                number: +i,
                unit: "bp"
              };
            {
              const s = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(i);
              if (!s)
                throw new o("Invalid size: '" + i + "' in \\includegraphics");
              const a = {
                number: +(s[1] + s[2]),
                // sign + magnitude, cast to number
                unit: s[3]
              };
              if (!tn(a))
                throw new o("Invalid unit: '" + a.unit + "' in \\includegraphics.");
              return a;
            }
          };
          ge({
            type: "includegraphics",
            names: ["\\includegraphics"],
            props: {
              numArgs: 1,
              numOptionalArgs: 1,
              argTypes: ["raw", "url"],
              allowedInText: !1
            },
            handler: (i, s, a) => {
              let {
                parser: f
              } = i, m = {
                number: 0,
                unit: "em"
              }, b = {
                number: 0.9,
                unit: "em"
              }, w = {
                number: 0,
                unit: "em"
              }, D = "";
              if (a[0]) {
                const j = Le(a[0], "raw").string.split(",");
                for (let W = 0; W < j.length; W++) {
                  const Z = j[W].split("=");
                  if (Z.length === 2) {
                    const re = Z[1].trim();
                    switch (Z[0].trim()) {
                      case "alt":
                        D = re;
                        break;
                      case "width":
                        m = Dl(re);
                        break;
                      case "height":
                        b = Dl(re);
                        break;
                      case "totalheight":
                        w = Dl(re);
                        break;
                      default:
                        throw new o("Invalid key: '" + Z[0] + "' in \\includegraphics.");
                    }
                  }
                }
              }
              const F = Le(s[0], "url").url;
              return D === "" && (D = F, D = D.replace(/^.*[\\/]/, ""), D = D.substring(0, D.lastIndexOf("."))), f.settings.isTrusted({
                command: "\\includegraphics",
                url: F
              }) ? {
                type: "includegraphics",
                mode: f.mode,
                alt: D,
                width: m,
                height: b,
                totalheight: w,
                src: F
              } : f.formatUnsupportedCmd("\\includegraphics");
            },
            htmlBuilder: (i, s) => {
              const a = st(i.height, s);
              let f = 0;
              i.totalheight.number > 0 && (f = st(i.totalheight, s) - a);
              let m = 0;
              i.width.number > 0 && (m = st(i.width, s));
              const b = {
                height: oe(a + f)
              };
              m > 0 && (b.width = oe(m)), f > 0 && (b.verticalAlign = oe(-f));
              const w = new Hn(i.src, i.alt, b);
              return w.height = a, w.depth = f, w;
            },
            mathmlBuilder: (i, s) => {
              const a = new le.MathNode("mglyph", []);
              a.setAttribute("alt", i.alt);
              const f = st(i.height, s);
              let m = 0;
              if (i.totalheight.number > 0 && (m = st(i.totalheight, s) - f, a.setAttribute("valign", oe(-m))), a.setAttribute("height", oe(f + m)), i.width.number > 0) {
                const b = st(i.width, s);
                a.setAttribute("width", oe(b));
              }
              return a.setAttribute("src", i.src), a;
            }
          }), ge({
            type: "kern",
            names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
            props: {
              numArgs: 1,
              argTypes: ["size"],
              primitive: !0,
              allowedInText: !0
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = Le(s[0], "size");
              if (a.settings.strict) {
                const b = f[1] === "m", w = m.value.unit === "mu";
                b ? (w || a.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + f + " supports only mu units, " + ("not " + m.value.unit + " units")), a.mode !== "math" && a.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + f + " works only in math mode")) : w && a.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + f + " doesn't support mu units");
              }
              return {
                type: "kern",
                mode: a.mode,
                dimension: m.value
              };
            },
            htmlBuilder(i, s) {
              return X.makeGlue(i.dimension, s);
            },
            mathmlBuilder(i, s) {
              const a = st(i.dimension, s);
              return new le.SpaceNode(a);
            }
          }), ge({
            type: "lap",
            names: ["\\mathllap", "\\mathrlap", "\\mathclap"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0];
              return {
                type: "lap",
                mode: a.mode,
                alignment: f.slice(5),
                body: m
              };
            },
            htmlBuilder: (i, s) => {
              let a;
              i.alignment === "clap" ? (a = X.makeSpan([], [et(i.body, s)]), a = X.makeSpan(["inner"], [a], s)) : a = X.makeSpan(["inner"], [et(i.body, s)]);
              const f = X.makeSpan(["fix"], []);
              let m = X.makeSpan([i.alignment], [a, f], s);
              const b = X.makeSpan(["strut"]);
              return b.style.height = oe(m.height + m.depth), m.depth && (b.style.verticalAlign = oe(-m.depth)), m.children.unshift(b), m = X.makeSpan(["thinbox"], [m], s), X.makeSpan(["mord", "vbox"], [m], s);
            },
            mathmlBuilder: (i, s) => {
              const a = new le.MathNode("mpadded", [dt(i.body, s)]);
              if (i.alignment !== "rlap") {
                const f = i.alignment === "llap" ? "-1" : "-0.5";
                a.setAttribute("lspace", f + "width");
              }
              return a.setAttribute("width", "0px"), a;
            }
          }), ge({
            type: "styling",
            names: ["\\(", "$"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              allowedInMath: !1
            },
            handler(i, s) {
              let {
                funcName: a,
                parser: f
              } = i;
              const m = f.mode;
              f.switchMode("math");
              const b = a === "\\(" ? "\\)" : "$", w = f.parseExpression(!1, b);
              return f.expect(b), f.switchMode(m), {
                type: "styling",
                mode: f.mode,
                style: "text",
                body: w
              };
            }
          }), ge({
            type: "text",
            // Doesn't matter what this is.
            names: ["\\)", "\\]"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              allowedInMath: !1
            },
            handler(i, s) {
              throw new o("Mismatched " + i.funcName);
            }
          });
          const nu = (i, s) => {
            switch (s.style.size) {
              case Q.DISPLAY.size:
                return i.display;
              case Q.TEXT.size:
                return i.text;
              case Q.SCRIPT.size:
                return i.script;
              case Q.SCRIPTSCRIPT.size:
                return i.scriptscript;
              default:
                return i.text;
            }
          };
          ge({
            type: "mathchoice",
            names: ["\\mathchoice"],
            props: {
              numArgs: 4,
              primitive: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              return {
                type: "mathchoice",
                mode: a.mode,
                display: Ot(s[0]),
                text: Ot(s[1]),
                script: Ot(s[2]),
                scriptscript: Ot(s[3])
              };
            },
            htmlBuilder: (i, s) => {
              const a = nu(i, s), f = Ht(a, s, !1);
              return X.makeFragment(f);
            },
            mathmlBuilder: (i, s) => {
              const a = nu(i, s);
              return m0(a, s);
            }
          });
          const ru = (i, s, a, f, m, b, w) => {
            i = X.makeSpan([], [i]);
            const D = a && N.isCharacterBox(a);
            let F, I;
            if (s) {
              const Z = et(s, f.havingStyle(m.sup()), f);
              I = {
                elem: Z,
                kern: Math.max(f.fontMetrics().bigOpSpacing1, f.fontMetrics().bigOpSpacing3 - Z.depth)
              };
            }
            if (a) {
              const Z = et(a, f.havingStyle(m.sub()), f);
              F = {
                elem: Z,
                kern: Math.max(f.fontMetrics().bigOpSpacing2, f.fontMetrics().bigOpSpacing4 - Z.height)
              };
            }
            let j;
            if (I && F) {
              const Z = f.fontMetrics().bigOpSpacing5 + F.elem.height + F.elem.depth + F.kern + i.depth + w;
              j = X.makeVList({
                positionType: "bottom",
                positionData: Z,
                children: [{
                  type: "kern",
                  size: f.fontMetrics().bigOpSpacing5
                }, {
                  type: "elem",
                  elem: F.elem,
                  marginLeft: oe(-b)
                }, {
                  type: "kern",
                  size: F.kern
                }, {
                  type: "elem",
                  elem: i
                }, {
                  type: "kern",
                  size: I.kern
                }, {
                  type: "elem",
                  elem: I.elem,
                  marginLeft: oe(b)
                }, {
                  type: "kern",
                  size: f.fontMetrics().bigOpSpacing5
                }]
              }, f);
            } else if (F) {
              const Z = i.height - w;
              j = X.makeVList({
                positionType: "top",
                positionData: Z,
                children: [{
                  type: "kern",
                  size: f.fontMetrics().bigOpSpacing5
                }, {
                  type: "elem",
                  elem: F.elem,
                  marginLeft: oe(-b)
                }, {
                  type: "kern",
                  size: F.kern
                }, {
                  type: "elem",
                  elem: i
                }]
              }, f);
            } else if (I) {
              const Z = i.depth + w;
              j = X.makeVList({
                positionType: "bottom",
                positionData: Z,
                children: [{
                  type: "elem",
                  elem: i
                }, {
                  type: "kern",
                  size: I.kern
                }, {
                  type: "elem",
                  elem: I.elem,
                  marginLeft: oe(b)
                }, {
                  type: "kern",
                  size: f.fontMetrics().bigOpSpacing5
                }]
              }, f);
            } else
              return i;
            const W = [j];
            if (F && b !== 0 && !D) {
              const Z = X.makeSpan(["mspace"], [], f);
              Z.style.marginRight = oe(b), W.unshift(Z);
            }
            return X.makeSpan(["mop", "op-limits"], W, f);
          }, su = ["\\smallint"], lr = (i, s) => {
            let a, f, m = !1, b;
            i.type === "supsub" ? (a = i.sup, f = i.sub, b = Le(i.base, "op"), m = !0) : b = Le(i, "op");
            const w = s.style;
            let D = !1;
            w.size === Q.DISPLAY.size && b.symbol && !N.contains(su, b.name) && (D = !0);
            let F;
            if (b.symbol) {
              const W = D ? "Size2-Regular" : "Size1-Regular";
              let Z = "";
              if ((b.name === "\\oiint" || b.name === "\\oiiint") && (Z = b.name.slice(1), b.name = Z === "oiint" ? "\\iint" : "\\iiint"), F = X.makeSymbol(b.name, W, "math", s, ["mop", "op-symbol", D ? "large-op" : "small-op"]), Z.length > 0) {
                const re = F.italic, be = X.staticSvg(Z + "Size" + (D ? "2" : "1"), s);
                F = X.makeVList({
                  positionType: "individualShift",
                  children: [{
                    type: "elem",
                    elem: F,
                    shift: 0
                  }, {
                    type: "elem",
                    elem: be,
                    shift: D ? 0.08 : 0
                  }]
                }, s), b.name = "\\" + Z, F.classes.unshift("mop"), F.italic = re;
              }
            } else if (b.body) {
              const W = Ht(b.body, s, !0);
              W.length === 1 && W[0] instanceof Gt ? (F = W[0], F.classes[0] = "mop") : F = X.makeSpan(["mop"], W, s);
            } else {
              const W = [];
              for (let Z = 1; Z < b.name.length; Z++)
                W.push(X.mathsym(b.name[Z], b.mode, s));
              F = X.makeSpan(["mop"], W, s);
            }
            let I = 0, j = 0;
            return (F instanceof Gt || b.name === "\\oiint" || b.name === "\\oiiint") && !b.suppressBaseShift && (I = (F.height - F.depth) / 2 - s.fontMetrics().axisHeight, j = F.italic), m ? ru(F, a, f, s, w, j, I) : (I && (F.style.position = "relative", F.style.top = oe(I)), F);
          }, Ir = (i, s) => {
            let a;
            if (i.symbol)
              a = new Dn("mo", [An(i.name, i.mode)]), N.contains(su, i.name) && a.setAttribute("largeop", "false");
            else if (i.body)
              a = new Dn("mo", sn(i.body, s));
            else {
              a = new Dn("mi", [new zr(i.name.slice(1))]);
              const f = new Dn("mo", [An("⁡", "text")]);
              i.parentIsSupSub ? a = new Dn("mrow", [a, f]) : a = vo([a, f]);
            }
            return a;
          }, K4 = {
            "∏": "\\prod",
            "∐": "\\coprod",
            "∑": "\\sum",
            "⋀": "\\bigwedge",
            "⋁": "\\bigvee",
            "⋂": "\\bigcap",
            "⋃": "\\bigcup",
            "⨀": "\\bigodot",
            "⨁": "\\bigoplus",
            "⨂": "\\bigotimes",
            "⨄": "\\biguplus",
            "⨆": "\\bigsqcup"
          };
          ge({
            type: "op",
            names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "∏", "∐", "∑", "⋀", "⋁", "⋂", "⋃", "⨀", "⨁", "⨂", "⨄", "⨆"],
            props: {
              numArgs: 0
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f
              } = i, m = f;
              return m.length === 1 && (m = K4[m]), {
                type: "op",
                mode: a.mode,
                limits: !0,
                parentIsSupSub: !1,
                symbol: !0,
                name: m
              };
            },
            htmlBuilder: lr,
            mathmlBuilder: Ir
          }), ge({
            type: "op",
            names: ["\\mathop"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              const f = s[0];
              return {
                type: "op",
                mode: a.mode,
                limits: !1,
                parentIsSupSub: !1,
                symbol: !1,
                body: Ot(f)
              };
            },
            htmlBuilder: lr,
            mathmlBuilder: Ir
          });
          const $4 = {
            "∫": "\\int",
            "∬": "\\iint",
            "∭": "\\iiint",
            "∮": "\\oint",
            "∯": "\\oiint",
            "∰": "\\oiiint"
          };
          ge({
            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) {
              let {
                parser: s,
                funcName: a
              } = i;
              return {
                type: "op",
                mode: s.mode,
                limits: !1,
                parentIsSupSub: !1,
                symbol: !1,
                name: a
              };
            },
            htmlBuilder: lr,
            mathmlBuilder: Ir
          }), ge({
            type: "op",
            names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
            props: {
              numArgs: 0
            },
            handler(i) {
              let {
                parser: s,
                funcName: a
              } = i;
              return {
                type: "op",
                mode: s.mode,
                limits: !0,
                parentIsSupSub: !1,
                symbol: !1,
                name: a
              };
            },
            htmlBuilder: lr,
            mathmlBuilder: Ir
          }), ge({
            type: "op",
            names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
            props: {
              numArgs: 0
            },
            handler(i) {
              let {
                parser: s,
                funcName: a
              } = i, f = a;
              return f.length === 1 && (f = $4[f]), {
                type: "op",
                mode: s.mode,
                limits: !1,
                parentIsSupSub: !1,
                symbol: !0,
                name: f
              };
            },
            htmlBuilder: lr,
            mathmlBuilder: Ir
          });
          const iu = (i, s) => {
            let a, f, m = !1, b;
            i.type === "supsub" ? (a = i.sup, f = i.sub, b = Le(i.base, "operatorname"), m = !0) : b = Le(i, "operatorname");
            let w;
            if (b.body.length > 0) {
              const D = b.body.map((I) => {
                const j = I.text;
                return typeof j == "string" ? {
                  type: "textord",
                  mode: I.mode,
                  text: j
                } : I;
              }), F = Ht(D, s.withFont("mathrm"), !0);
              for (let I = 0; I < F.length; I++) {
                const j = F[I];
                j instanceof Gt && (j.text = j.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
              }
              w = X.makeSpan(["mop"], F, s);
            } else
              w = X.makeSpan(["mop"], [], s);
            return m ? ru(w, a, f, s, s.style, 0, 0) : w;
          };
          ge({
            type: "operatorname",
            names: ["\\operatorname@", "\\operatornamewithlimits"],
            props: {
              numArgs: 1
            },
            handler: (i, s) => {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0];
              return {
                type: "operatorname",
                mode: a.mode,
                body: Ot(m),
                alwaysHandleSupSub: f === "\\operatornamewithlimits",
                limits: !1,
                parentIsSupSub: !1
              };
            },
            htmlBuilder: iu,
            mathmlBuilder: (i, s) => {
              let a = sn(i.body, s.withFont("mathrm")), f = !0;
              for (let w = 0; w < a.length; w++) {
                const D = a[w];
                if (!(D instanceof le.SpaceNode))
                  if (D instanceof le.MathNode)
                    switch (D.type) {
                      case "mi":
                      case "mn":
                      case "ms":
                      case "mspace":
                      case "mtext":
                        break;
                      case "mo": {
                        const F = D.children[0];
                        D.children.length === 1 && F instanceof le.TextNode ? F.text = F.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : f = !1;
                        break;
                      }
                      default:
                        f = !1;
                    }
                  else
                    f = !1;
              }
              if (f) {
                const w = a.map((D) => D.toText()).join("");
                a = [new le.TextNode(w)];
              }
              const m = new le.MathNode("mi", a);
              m.setAttribute("mathvariant", "normal");
              const b = new le.MathNode("mo", [An("⁡", "text")]);
              return i.parentIsSupSub ? new le.MathNode("mrow", [m, b]) : le.newDocumentFragment([m, b]);
            }
          }), S("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@"), L0({
            type: "ordgroup",
            htmlBuilder(i, s) {
              return i.semisimple ? X.makeFragment(Ht(i.body, s, !1)) : X.makeSpan(["mord"], Ht(i.body, s, !0), s);
            },
            mathmlBuilder(i, s) {
              return m0(i.body, s, !0);
            }
          }), ge({
            type: "overline",
            names: ["\\overline"],
            props: {
              numArgs: 1
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              const f = s[0];
              return {
                type: "overline",
                mode: a.mode,
                body: f
              };
            },
            htmlBuilder(i, s) {
              const a = et(i.body, s.havingCrampedStyle()), f = X.makeLineSpan("overline-line", s), m = s.fontMetrics().defaultRuleThickness, b = X.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: a
                }, {
                  type: "kern",
                  size: 3 * m
                }, {
                  type: "elem",
                  elem: f
                }, {
                  type: "kern",
                  size: m
                }]
              }, s);
              return X.makeSpan(["mord", "overline"], [b], s);
            },
            mathmlBuilder(i, s) {
              const a = new le.MathNode("mo", [new le.TextNode("‾")]);
              a.setAttribute("stretchy", "true");
              const f = new le.MathNode("mover", [dt(i.body, s), a]);
              return f.setAttribute("accent", "true"), f;
            }
          }), ge({
            type: "phantom",
            names: ["\\phantom"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              const f = s[0];
              return {
                type: "phantom",
                mode: a.mode,
                body: Ot(f)
              };
            },
            htmlBuilder: (i, s) => {
              const a = Ht(i.body, s.withPhantom(), !1);
              return X.makeFragment(a);
            },
            mathmlBuilder: (i, s) => {
              const a = sn(i.body, s);
              return new le.MathNode("mphantom", a);
            }
          }), ge({
            type: "hphantom",
            names: ["\\hphantom"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              const f = s[0];
              return {
                type: "hphantom",
                mode: a.mode,
                body: f
              };
            },
            htmlBuilder: (i, s) => {
              let a = X.makeSpan([], [et(i.body, s.withPhantom())]);
              if (a.height = 0, a.depth = 0, a.children)
                for (let f = 0; f < a.children.length; f++)
                  a.children[f].height = 0, a.children[f].depth = 0;
              return a = X.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: a
                }]
              }, s), X.makeSpan(["mord"], [a], s);
            },
            mathmlBuilder: (i, s) => {
              const a = sn(Ot(i.body), s), f = new le.MathNode("mphantom", a), m = new le.MathNode("mpadded", [f]);
              return m.setAttribute("height", "0px"), m.setAttribute("depth", "0px"), m;
            }
          }), ge({
            type: "vphantom",
            names: ["\\vphantom"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                parser: a
              } = i;
              const f = s[0];
              return {
                type: "vphantom",
                mode: a.mode,
                body: f
              };
            },
            htmlBuilder: (i, s) => {
              const a = X.makeSpan(["inner"], [et(i.body, s.withPhantom())]), f = X.makeSpan(["fix"], []);
              return X.makeSpan(["mord", "rlap"], [a, f], s);
            },
            mathmlBuilder: (i, s) => {
              const a = sn(Ot(i.body), s), f = new le.MathNode("mphantom", a), m = new le.MathNode("mpadded", [f]);
              return m.setAttribute("width", "0px"), m;
            }
          }), ge({
            type: "raisebox",
            names: ["\\raisebox"],
            props: {
              numArgs: 2,
              argTypes: ["size", "hbox"],
              allowedInText: !0
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              const f = Le(s[0], "size").value, m = s[1];
              return {
                type: "raisebox",
                mode: a.mode,
                dy: f,
                body: m
              };
            },
            htmlBuilder(i, s) {
              const a = et(i.body, s), f = st(i.dy, s);
              return X.makeVList({
                positionType: "shift",
                positionData: -f,
                children: [{
                  type: "elem",
                  elem: a
                }]
              }, s);
            },
            mathmlBuilder(i, s) {
              const a = new le.MathNode("mpadded", [dt(i.body, s)]), f = i.dy.number + i.dy.unit;
              return a.setAttribute("voffset", f), a;
            }
          }), ge({
            type: "internal",
            names: ["\\relax"],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler(i) {
              let {
                parser: s
              } = i;
              return {
                type: "internal",
                mode: s.mode
              };
            }
          }), ge({
            type: "rule",
            names: ["\\rule"],
            props: {
              numArgs: 2,
              numOptionalArgs: 1,
              argTypes: ["size", "size", "size"]
            },
            handler(i, s, a) {
              let {
                parser: f
              } = i;
              const m = a[0], b = Le(s[0], "size"), w = Le(s[1], "size");
              return {
                type: "rule",
                mode: f.mode,
                shift: m && Le(m, "size").value,
                width: b.value,
                height: w.value
              };
            },
            htmlBuilder(i, s) {
              const a = X.makeSpan(["mord", "rule"], [], s), f = st(i.width, s), m = st(i.height, s), b = i.shift ? st(i.shift, s) : 0;
              return a.style.borderRightWidth = oe(f), a.style.borderTopWidth = oe(m), a.style.bottom = oe(b), a.width = f, a.height = m + b, a.depth = -b, a.maxFontSize = m * 1.125 * s.sizeMultiplier, a;
            },
            mathmlBuilder(i, s) {
              const a = st(i.width, s), f = st(i.height, s), m = i.shift ? st(i.shift, s) : 0, b = s.color && s.getColor() || "black", w = new le.MathNode("mspace");
              w.setAttribute("mathbackground", b), w.setAttribute("width", oe(a)), w.setAttribute("height", oe(f));
              const D = new le.MathNode("mpadded", [w]);
              return m >= 0 ? D.setAttribute("height", oe(m)) : (D.setAttribute("height", oe(m)), D.setAttribute("depth", oe(-m))), D.setAttribute("voffset", oe(m)), D;
            }
          });
          function lu(i, s, a) {
            const f = Ht(i, s, !1), m = s.sizeMultiplier / a.sizeMultiplier;
            for (let b = 0; b < f.length; b++) {
              const w = f[b].classes.indexOf("sizing");
              w < 0 ? Array.prototype.push.apply(f[b].classes, s.sizingClasses(a)) : f[b].classes[w + 1] === "reset-size" + s.size && (f[b].classes[w + 1] = "reset-size" + a.size), f[b].height *= m, f[b].depth *= m;
            }
            return X.makeFragment(f);
          }
          const au = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"];
          ge({
            type: "sizing",
            names: au,
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler: (i, s) => {
              let {
                breakOnTokenText: a,
                funcName: f,
                parser: m
              } = i;
              const b = m.parseExpression(!1, a);
              return {
                type: "sizing",
                mode: m.mode,
                // Figure out what size to use based on the list of functions above
                size: au.indexOf(f) + 1,
                body: b
              };
            },
            htmlBuilder: (i, s) => {
              const a = s.havingSize(i.size);
              return lu(i.body, a, s);
            },
            mathmlBuilder: (i, s) => {
              const a = s.havingSize(i.size), f = sn(i.body, a), m = new le.MathNode("mstyle", f);
              return m.setAttribute("mathsize", oe(a.sizeMultiplier)), m;
            }
          }), ge({
            type: "smash",
            names: ["\\smash"],
            props: {
              numArgs: 1,
              numOptionalArgs: 1,
              allowedInText: !0
            },
            handler: (i, s, a) => {
              let {
                parser: f
              } = i, m = !1, b = !1;
              const w = a[0] && Le(a[0], "ordgroup");
              if (w) {
                let F = "";
                for (let I = 0; I < w.body.length; ++I)
                  if (F = w.body[I].text, F === "t")
                    m = !0;
                  else if (F === "b")
                    b = !0;
                  else {
                    m = !1, b = !1;
                    break;
                  }
              } else
                m = !0, b = !0;
              const D = s[0];
              return {
                type: "smash",
                mode: f.mode,
                body: D,
                smashHeight: m,
                smashDepth: b
              };
            },
            htmlBuilder: (i, s) => {
              const a = X.makeSpan([], [et(i.body, s)]);
              if (!i.smashHeight && !i.smashDepth)
                return a;
              if (i.smashHeight && (a.height = 0, a.children))
                for (let m = 0; m < a.children.length; m++)
                  a.children[m].height = 0;
              if (i.smashDepth && (a.depth = 0, a.children))
                for (let m = 0; m < a.children.length; m++)
                  a.children[m].depth = 0;
              const f = X.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: a
                }]
              }, s);
              return X.makeSpan(["mord"], [f], s);
            },
            mathmlBuilder: (i, s) => {
              const a = new le.MathNode("mpadded", [dt(i.body, s)]);
              return i.smashHeight && a.setAttribute("height", "0px"), i.smashDepth && a.setAttribute("depth", "0px"), a;
            }
          }), ge({
            type: "sqrt",
            names: ["\\sqrt"],
            props: {
              numArgs: 1,
              numOptionalArgs: 1
            },
            handler(i, s, a) {
              let {
                parser: f
              } = i;
              const m = a[0], b = s[0];
              return {
                type: "sqrt",
                mode: f.mode,
                body: b,
                index: m
              };
            },
            htmlBuilder(i, s) {
              let a = et(i.body, s.havingCrampedStyle());
              a.height === 0 && (a.height = s.fontMetrics().xHeight), a = X.wrapFragment(a, s);
              const m = s.fontMetrics().defaultRuleThickness;
              let b = m;
              s.style.id < Q.TEXT.id && (b = s.fontMetrics().xHeight);
              let w = m + b / 4;
              const D = a.height + a.depth + w + m, {
                span: F,
                ruleWidth: I,
                advanceWidth: j
              } = i0.sqrtImage(D, s), W = F.height - I;
              W > a.height + a.depth + w && (w = (w + W - a.height - a.depth) / 2);
              const Z = F.height - a.height - w - I;
              a.style.paddingLeft = oe(j);
              const re = X.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: a,
                  wrapperClasses: ["svg-align"]
                }, {
                  type: "kern",
                  size: -(a.height + Z)
                }, {
                  type: "elem",
                  elem: F
                }, {
                  type: "kern",
                  size: I
                }]
              }, s);
              if (i.index) {
                const be = s.havingStyle(Q.SCRIPTSCRIPT), xe = et(i.index, be, s), Ye = 0.6 * (re.height - re.depth), Ge = X.makeVList({
                  positionType: "shift",
                  positionData: -Ye,
                  children: [{
                    type: "elem",
                    elem: xe
                  }]
                }, s), Ke = X.makeSpan(["root"], [Ge]);
                return X.makeSpan(["mord", "sqrt"], [Ke, re], s);
              } else
                return X.makeSpan(["mord", "sqrt"], [re], s);
            },
            mathmlBuilder(i, s) {
              const {
                body: a,
                index: f
              } = i;
              return f ? new le.MathNode("mroot", [dt(a, s), dt(f, s)]) : new le.MathNode("msqrt", [dt(a, s)]);
            }
          });
          const ou = {
            display: Q.DISPLAY,
            text: Q.TEXT,
            script: Q.SCRIPT,
            scriptscript: Q.SCRIPTSCRIPT
          };
          ge({
            type: "styling",
            names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(i, s) {
              let {
                breakOnTokenText: a,
                funcName: f,
                parser: m
              } = i;
              const b = m.parseExpression(!0, a), w = f.slice(1, f.length - 5);
              return {
                type: "styling",
                mode: m.mode,
                // Figure out what style to use by pulling out the style from
                // the function name
                style: w,
                body: b
              };
            },
            htmlBuilder(i, s) {
              const a = ou[i.style], f = s.havingStyle(a).withFont("");
              return lu(i.body, f, s);
            },
            mathmlBuilder(i, s) {
              const a = ou[i.style], f = s.havingStyle(a), m = sn(i.body, f), b = new le.MathNode("mstyle", m), D = {
                display: ["0", "true"],
                text: ["0", "false"],
                script: ["1", "false"],
                scriptscript: ["2", "false"]
              }[i.style];
              return b.setAttribute("scriptlevel", D[0]), b.setAttribute("displaystyle", D[1]), b;
            }
          });
          const ed = function(i, s) {
            const a = i.base;
            return a ? a.type === "op" ? a.limits && (s.style.size === Q.DISPLAY.size || a.alwaysHandleSupSub) ? lr : null : a.type === "operatorname" ? a.alwaysHandleSupSub && (s.style.size === Q.DISPLAY.size || a.limits) ? iu : null : a.type === "accent" ? N.isCharacterBox(a.base) ? ol : null : a.type === "horizBrace" && !i.sub === a.isOver ? tu : null : null;
          };
          L0({
            type: "supsub",
            htmlBuilder(i, s) {
              const a = ed(i, s);
              if (a)
                return a(i, s);
              const {
                base: f,
                sup: m,
                sub: b
              } = i, w = et(f, s);
              let D, F;
              const I = s.fontMetrics();
              let j = 0, W = 0;
              const Z = f && N.isCharacterBox(f);
              if (m) {
                const lt = s.havingStyle(s.style.sup());
                D = et(m, lt, s), Z || (j = w.height - lt.fontMetrics().supDrop * lt.sizeMultiplier / s.sizeMultiplier);
              }
              if (b) {
                const lt = s.havingStyle(s.style.sub());
                F = et(b, lt, s), Z || (W = w.depth + lt.fontMetrics().subDrop * lt.sizeMultiplier / s.sizeMultiplier);
              }
              let re;
              s.style === Q.DISPLAY ? re = I.sup1 : s.style.cramped ? re = I.sup3 : re = I.sup2;
              const be = s.sizeMultiplier, xe = oe(0.5 / I.ptPerEm / be);
              let Ye = null;
              if (F) {
                const lt = i.base && i.base.type === "op" && i.base.name && (i.base.name === "\\oiint" || i.base.name === "\\oiiint");
                (w instanceof Gt || lt) && (Ye = oe(-w.italic));
              }
              let Ge;
              if (D && F) {
                j = Math.max(j, re, D.depth + 0.25 * I.xHeight), W = Math.max(W, I.sub2);
                const _t = 4 * I.defaultRuleThickness;
                if (j - D.depth - (F.height - W) < _t) {
                  W = _t - (j - D.depth) + F.height;
                  const Pt = 0.8 * I.xHeight - (j - D.depth);
                  Pt > 0 && (j += Pt, W -= Pt);
                }
                const Kt = [{
                  type: "elem",
                  elem: F,
                  shift: W,
                  marginRight: xe,
                  marginLeft: Ye
                }, {
                  type: "elem",
                  elem: D,
                  shift: -j,
                  marginRight: xe
                }];
                Ge = X.makeVList({
                  positionType: "individualShift",
                  children: Kt
                }, s);
              } else if (F) {
                W = Math.max(W, I.sub1, F.height - 0.8 * I.xHeight);
                const lt = [{
                  type: "elem",
                  elem: F,
                  marginLeft: Ye,
                  marginRight: xe
                }];
                Ge = X.makeVList({
                  positionType: "shift",
                  positionData: W,
                  children: lt
                }, s);
              } else if (D)
                j = Math.max(j, re, D.depth + 0.25 * I.xHeight), Ge = X.makeVList({
                  positionType: "shift",
                  positionData: -j,
                  children: [{
                    type: "elem",
                    elem: D,
                    marginRight: xe
                  }]
                }, s);
              else
                throw new Error("supsub must have either sup or sub.");
              const Ke = rl(w, "right") || "mord";
              return X.makeSpan([Ke], [w, X.makeSpan(["msupsub"], [Ge])], s);
            },
            mathmlBuilder(i, s) {
              let a = !1, f, m;
              i.base && i.base.type === "horizBrace" && (m = !!i.sup, m === i.base.isOver && (a = !0, f = i.base.isOver)), i.base && (i.base.type === "op" || i.base.type === "operatorname") && (i.base.parentIsSupSub = !0);
              const b = [dt(i.base, s)];
              i.sub && b.push(dt(i.sub, s)), i.sup && b.push(dt(i.sup, s));
              let w;
              if (a)
                w = f ? "mover" : "munder";
              else if (i.sub)
                if (i.sup) {
                  const D = i.base;
                  D && D.type === "op" && D.limits && s.style === Q.DISPLAY || D && D.type === "operatorname" && D.alwaysHandleSupSub && (s.style === Q.DISPLAY || D.limits) ? w = "munderover" : w = "msubsup";
                } else {
                  const D = i.base;
                  D && D.type === "op" && D.limits && (s.style === Q.DISPLAY || D.alwaysHandleSupSub) || D && D.type === "operatorname" && D.alwaysHandleSupSub && (D.limits || s.style === Q.DISPLAY) ? w = "munder" : w = "msub";
                }
              else {
                const D = i.base;
                D && D.type === "op" && D.limits && (s.style === Q.DISPLAY || D.alwaysHandleSupSub) || D && D.type === "operatorname" && D.alwaysHandleSupSub && (D.limits || s.style === Q.DISPLAY) ? w = "mover" : w = "msup";
              }
              return new le.MathNode(w, b);
            }
          }), L0({
            type: "atom",
            htmlBuilder(i, s) {
              return X.mathsym(i.text, i.mode, s, ["m" + i.family]);
            },
            mathmlBuilder(i, s) {
              const a = new le.MathNode("mo", [An(i.text, i.mode)]);
              if (i.family === "bin") {
                const f = ll(i, s);
                f === "bold-italic" && a.setAttribute("mathvariant", f);
              } else
                i.family === "punct" ? a.setAttribute("separator", "true") : (i.family === "open" || i.family === "close") && a.setAttribute("stretchy", "false");
              return a;
            }
          });
          const uu = {
            mi: "italic",
            mn: "normal",
            mtext: "normal"
          };
          L0({
            type: "mathord",
            htmlBuilder(i, s) {
              return X.makeOrd(i, s, "mathord");
            },
            mathmlBuilder(i, s) {
              const a = new le.MathNode("mi", [An(i.text, i.mode, s)]), f = ll(i, s) || "italic";
              return f !== uu[a.type] && a.setAttribute("mathvariant", f), a;
            }
          }), L0({
            type: "textord",
            htmlBuilder(i, s) {
              return X.makeOrd(i, s, "textord");
            },
            mathmlBuilder(i, s) {
              const a = An(i.text, i.mode, s), f = ll(i, s) || "normal";
              let m;
              return i.mode === "text" ? m = new le.MathNode("mtext", [a]) : /[0-9]/.test(i.text) ? m = new le.MathNode("mn", [a]) : i.text === "\\prime" ? m = new le.MathNode("mo", [a]) : m = new le.MathNode("mi", [a]), f !== uu[m.type] && m.setAttribute("mathvariant", f), m;
            }
          });
          const Al = {
            "\\nobreak": "nobreak",
            "\\allowbreak": "allowbreak"
          }, Sl = {
            " ": {},
            "\\ ": {},
            "~": {
              className: "nobreak"
            },
            "\\space": {},
            "\\nobreakspace": {
              className: "nobreak"
            }
          };
          L0({
            type: "spacing",
            htmlBuilder(i, s) {
              if (Sl.hasOwnProperty(i.text)) {
                const a = Sl[i.text].className || "";
                if (i.mode === "text") {
                  const f = X.makeOrd(i, s, "textord");
                  return f.classes.push(a), f;
                } else
                  return X.makeSpan(["mspace", a], [X.mathsym(i.text, i.mode, s)], s);
              } else {
                if (Al.hasOwnProperty(i.text))
                  return X.makeSpan(["mspace", Al[i.text]], [], s);
                throw new o('Unknown type of space "' + i.text + '"');
              }
            },
            mathmlBuilder(i, s) {
              let a;
              if (Sl.hasOwnProperty(i.text))
                a = new le.MathNode("mtext", [new le.TextNode(" ")]);
              else {
                if (Al.hasOwnProperty(i.text))
                  return new le.MathNode("mspace");
                throw new o('Unknown type of space "' + i.text + '"');
              }
              return a;
            }
          });
          const cu = () => {
            const i = new le.MathNode("mtd", []);
            return i.setAttribute("width", "50%"), i;
          };
          L0({
            type: "tag",
            mathmlBuilder(i, s) {
              const a = new le.MathNode("mtable", [new le.MathNode("mtr", [cu(), new le.MathNode("mtd", [m0(i.body, s)]), cu(), new le.MathNode("mtd", [m0(i.tag, s)])])]);
              return a.setAttribute("width", "100%"), a;
            }
          });
          const fu = {
            "\\text": void 0,
            "\\textrm": "textrm",
            "\\textsf": "textsf",
            "\\texttt": "texttt",
            "\\textnormal": "textrm"
          }, hu = {
            "\\textbf": "textbf",
            "\\textmd": "textmd"
          }, td = {
            "\\textit": "textit",
            "\\textup": "textup"
          }, du = (i, s) => {
            const a = i.font;
            return a ? fu[a] ? s.withTextFontFamily(fu[a]) : hu[a] ? s.withTextFontWeight(hu[a]) : s.withTextFontShape(td[a]) : s;
          };
          ge({
            type: "text",
            names: [
              // Font families
              "\\text",
              "\\textrm",
              "\\textsf",
              "\\texttt",
              "\\textnormal",
              // Font weights
              "\\textbf",
              "\\textmd",
              // Font Shapes
              "\\textit",
              "\\textup"
            ],
            props: {
              numArgs: 1,
              argTypes: ["text"],
              allowedInArgument: !0,
              allowedInText: !0
            },
            handler(i, s) {
              let {
                parser: a,
                funcName: f
              } = i;
              const m = s[0];
              return {
                type: "text",
                mode: a.mode,
                body: Ot(m),
                font: f
              };
            },
            htmlBuilder(i, s) {
              const a = du(i, s), f = Ht(i.body, a, !0);
              return X.makeSpan(["mord", "text"], f, a);
            },
            mathmlBuilder(i, s) {
              const a = du(i, s);
              return m0(i.body, a);
            }
          }), ge({
            type: "underline",
            names: ["\\underline"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "underline",
                mode: a.mode,
                body: s[0]
              };
            },
            htmlBuilder(i, s) {
              const a = et(i.body, s), f = X.makeLineSpan("underline-line", s), m = s.fontMetrics().defaultRuleThickness, b = X.makeVList({
                positionType: "top",
                positionData: a.height,
                children: [{
                  type: "kern",
                  size: m
                }, {
                  type: "elem",
                  elem: f
                }, {
                  type: "kern",
                  size: 3 * m
                }, {
                  type: "elem",
                  elem: a
                }]
              }, s);
              return X.makeSpan(["mord", "underline"], [b], s);
            },
            mathmlBuilder(i, s) {
              const a = new le.MathNode("mo", [new le.TextNode("‾")]);
              a.setAttribute("stretchy", "true");
              const f = new le.MathNode("munder", [dt(i.body, s), a]);
              return f.setAttribute("accentunder", "true"), f;
            }
          }), ge({
            type: "vcenter",
            names: ["\\vcenter"],
            props: {
              numArgs: 1,
              argTypes: ["original"],
              // In LaTeX, \vcenter can act only on a box.
              allowedInText: !1
            },
            handler(i, s) {
              let {
                parser: a
              } = i;
              return {
                type: "vcenter",
                mode: a.mode,
                body: s[0]
              };
            },
            htmlBuilder(i, s) {
              const a = et(i.body, s), f = s.fontMetrics().axisHeight, m = 0.5 * (a.height - f - (a.depth + f));
              return X.makeVList({
                positionType: "shift",
                positionData: m,
                children: [{
                  type: "elem",
                  elem: a
                }]
              }, s);
            },
            mathmlBuilder(i, s) {
              return new le.MathNode("mpadded", [dt(i.body, s)], ["vcenter"]);
            }
          }), ge({
            type: "verb",
            names: ["\\verb"],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler(i, s, a) {
              throw new o("\\verb ended by end of line instead of matching delimiter");
            },
            htmlBuilder(i, s) {
              const a = mu(i), f = [], m = s.havingStyle(s.style.text());
              for (let b = 0; b < a.length; b++) {
                let w = a[b];
                w === "~" && (w = "\\textasciitilde"), f.push(X.makeSymbol(w, "Typewriter-Regular", i.mode, m, ["mord", "texttt"]));
              }
              return X.makeSpan(["mord", "text"].concat(m.sizingClasses(s)), X.tryCombineChars(f), m);
            },
            mathmlBuilder(i, s) {
              const a = new le.TextNode(mu(i)), f = new le.MathNode("mtext", [a]);
              return f.setAttribute("mathvariant", "monospace"), f;
            }
          });
          const mu = (i) => i.body.replace(/ /g, i.star ? "␣" : " ");
          var g0 = wo;
          const pu = `[ \r
	]`, nd = "\\\\[a-zA-Z@]+", rd = "\\\\[^\uD800-\uDFFF]", sd = "(" + nd + ")" + pu + "*", id = `\\\\(
|[ \r	]+
?)[ \r	]*`, El = "[̀-ͯ]", ld = new RegExp(El + "+$"), ad = "(" + pu + "+)|" + // whitespace
          (id + "|") + // \whitespace
          "([!-\\[\\]-‧‪-퟿豈-]" + // single codepoint
          (El + "*") + // ...plus accents
          "|[\uD800-\uDBFF][\uDC00-\uDFFF]" + // surrogate pair
          (El + "*") + // ...plus accents
          "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + // \verb unstarred
          ("|" + sd) + // \macroName + spaces
          ("|" + rd + ")");
          class gu {
            // Category codes. The lexer only supports comment characters (14) for now.
            // MacroExpander additionally distinguishes active (13).
            constructor(s, a) {
              this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = s, this.settings = a, this.tokenRegex = new RegExp(ad, "g"), this.catcodes = {
                "%": 14,
                // comment character
                "~": 13
                // active character
              };
            }
            setCatcode(s, a) {
              this.catcodes[s] = a;
            }
            /**
             * This function lexes a single token.
             */
            lex() {
              const s = this.input, a = this.tokenRegex.lastIndex;
              if (a === s.length)
                return new Sn("EOF", new mn(this, a, a));
              const f = this.tokenRegex.exec(s);
              if (f === null || f.index !== a)
                throw new o("Unexpected character: '" + s[a] + "'", new Sn(s[a], new mn(this, a, a + 1)));
              const m = f[6] || f[3] || (f[2] ? "\\ " : " ");
              if (this.catcodes[m] === 14) {
                const b = s.indexOf(`
`, this.tokenRegex.lastIndex);
                return b === -1 ? (this.tokenRegex.lastIndex = s.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 = b + 1, this.lex();
              }
              return new Sn(m, new mn(this, a, this.tokenRegex.lastIndex));
            }
          }
          class od {
            /**
             * 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(s, a) {
              s === void 0 && (s = {}), a === void 0 && (a = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = a, this.builtins = s, 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 o("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");
              const s = this.undefStack.pop();
              for (const a in s)
                s.hasOwnProperty(a) && (s[a] == null ? delete this.current[a] : this.current[a] = s[a]);
            }
            /**
             * 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(s) {
              return this.current.hasOwnProperty(s) || this.builtins.hasOwnProperty(s);
            }
            /**
             * 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(s) {
              return this.current.hasOwnProperty(s) ? this.current[s] : this.builtins[s];
            }
            /**
             * 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(s, a, f) {
              if (f === void 0 && (f = !1), f) {
                for (let m = 0; m < this.undefStack.length; m++)
                  delete this.undefStack[m][s];
                this.undefStack.length > 0 && (this.undefStack[this.undefStack.length - 1][s] = a);
              } else {
                const m = this.undefStack[this.undefStack.length - 1];
                m && !m.hasOwnProperty(s) && (m[s] = this.current[s]);
              }
              a == null ? delete this.current[s] : this.current[s] = a;
            }
          }
          var ud = Vo;
          S("\\noexpand", function(i) {
            const s = i.popToken();
            return i.isExpandable(s.text) && (s.noexpand = !0, s.treatAsRelax = !0), {
              tokens: [s],
              numArgs: 0
            };
          }), S("\\expandafter", function(i) {
            const s = i.popToken();
            return i.expandOnce(!0), {
              tokens: [s],
              numArgs: 0
            };
          }), S("\\@firstoftwo", function(i) {
            return {
              tokens: i.consumeArgs(2)[0],
              numArgs: 0
            };
          }), S("\\@secondoftwo", function(i) {
            return {
              tokens: i.consumeArgs(2)[1],
              numArgs: 0
            };
          }), S("\\@ifnextchar", function(i) {
            const s = i.consumeArgs(3);
            i.consumeSpaces();
            const a = i.future();
            return s[0].length === 1 && s[0][0].text === a.text ? {
              tokens: s[1],
              numArgs: 0
            } : {
              tokens: s[2],
              numArgs: 0
            };
          }), S("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}"), S("\\TextOrMath", function(i) {
            const s = i.consumeArgs(2);
            return i.mode === "text" ? {
              tokens: s[0],
              numArgs: 0
            } : {
              tokens: s[1],
              numArgs: 0
            };
          });
          const _u = {
            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
          };
          S("\\char", function(i) {
            let s = i.popToken(), a, f = "";
            if (s.text === "'")
              a = 8, s = i.popToken();
            else if (s.text === '"')
              a = 16, s = i.popToken();
            else if (s.text === "`")
              if (s = i.popToken(), s.text[0] === "\\")
                f = s.text.charCodeAt(1);
              else {
                if (s.text === "EOF")
                  throw new o("\\char` missing argument");
                f = s.text.charCodeAt(0);
              }
            else
              a = 10;
            if (a) {
              if (f = _u[s.text], f == null || f >= a)
                throw new o("Invalid base-" + a + " digit " + s.text);
              let m;
              for (; (m = _u[i.future().text]) != null && m < a; )
                f *= a, f += m, i.popToken();
            }
            return "\\@char{" + f + "}";
          });
          const xl = (i, s, a) => {
            let f = i.consumeArg().tokens;
            if (f.length !== 1)
              throw new o("\\newcommand's first argument must be a macro name");
            const m = f[0].text, b = i.isDefined(m);
            if (b && !s)
              throw new o("\\newcommand{" + m + "} attempting to redefine " + (m + "; use \\renewcommand"));
            if (!b && !a)
              throw new o("\\renewcommand{" + m + "} when command " + m + " does not yet exist; use \\newcommand");
            let w = 0;
            if (f = i.consumeArg().tokens, f.length === 1 && f[0].text === "[") {
              let D = "", F = i.expandNextToken();
              for (; F.text !== "]" && F.text !== "EOF"; )
                D += F.text, F = i.expandNextToken();
              if (!D.match(/^\s*[0-9]+\s*$/))
                throw new o("Invalid number of arguments: " + D);
              w = parseInt(D), f = i.consumeArg().tokens;
            }
            return i.macros.set(m, {
              tokens: f,
              numArgs: w
            }), "";
          };
          S("\\newcommand", (i) => xl(i, !1, !0)), S("\\renewcommand", (i) => xl(i, !0, !1)), S("\\providecommand", (i) => xl(i, !0, !0)), S("\\message", (i) => {
            const s = i.consumeArgs(1)[0];
            return console.log(s.reverse().map((a) => a.text).join("")), "";
          }), S("\\errmessage", (i) => {
            const s = i.consumeArgs(1)[0];
            return console.error(s.reverse().map((a) => a.text).join("")), "";
          }), S("\\show", (i) => {
            const s = i.popToken(), a = s.text;
            return console.log(s, i.macros.get(a), g0[a], P.math[a], P.text[a]), "";
          }), S("\\bgroup", "{"), S("\\egroup", "}"), S("~", "\\nobreakspace"), S("\\lq", "`"), S("\\rq", "'"), S("\\aa", "\\r a"), S("\\AA", "\\r A"), S("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), S("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), S("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), S("ℬ", "\\mathscr{B}"), S("ℰ", "\\mathscr{E}"), S("ℱ", "\\mathscr{F}"), S("ℋ", "\\mathscr{H}"), S("ℐ", "\\mathscr{I}"), S("ℒ", "\\mathscr{L}"), S("ℳ", "\\mathscr{M}"), S("ℛ", "\\mathscr{R}"), S("ℭ", "\\mathfrak{C}"), S("ℌ", "\\mathfrak{H}"), S("ℨ", "\\mathfrak{Z}"), S("\\Bbbk", "\\Bbb{k}"), S("·", "\\cdotp"), S("\\llap", "\\mathllap{\\textrm{#1}}"), S("\\rlap", "\\mathrlap{\\textrm{#1}}"), S("\\clap", "\\mathclap{\\textrm{#1}}"), S("\\mathstrut", "\\vphantom{(}"), S("\\underbar", "\\underline{\\text{#1}}"), S("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'), S("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), S("\\ne", "\\neq"), S("≠", "\\neq"), S("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), S("∉", "\\notin"), S("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), S("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), S("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), S("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), S("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), S("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), S("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), S("⟂", "\\perp"), S("‼", "\\mathclose{!\\mkern-0.8mu!}"), S("∌", "\\notni"), S("⌜", "\\ulcorner"), S("⌝", "\\urcorner"), S("⌞", "\\llcorner"), S("⌟", "\\lrcorner"), S("©", "\\copyright"), S("®", "\\textregistered"), S("️", "\\textregistered"), S("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'), S("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'), S("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'), S("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'), S("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}"), S("⋮", "\\vdots"), S("\\varGamma", "\\mathit{\\Gamma}"), S("\\varDelta", "\\mathit{\\Delta}"), S("\\varTheta", "\\mathit{\\Theta}"), S("\\varLambda", "\\mathit{\\Lambda}"), S("\\varXi", "\\mathit{\\Xi}"), S("\\varPi", "\\mathit{\\Pi}"), S("\\varSigma", "\\mathit{\\Sigma}"), S("\\varUpsilon", "\\mathit{\\Upsilon}"), S("\\varPhi", "\\mathit{\\Phi}"), S("\\varPsi", "\\mathit{\\Psi}"), S("\\varOmega", "\\mathit{\\Omega}"), S("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), S("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), S("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), S("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), S("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), S("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
          const bu = {
            ",": "\\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"
          };
          S("\\dots", function(i) {
            let s = "\\dotso";
            const a = i.expandAfterFuture().text;
            return a in bu ? s = bu[a] : (a.slice(0, 4) === "\\not" || a in P.math && N.contains(["bin", "rel"], P.math[a].group)) && (s = "\\dotsb"), s;
          });
          const Tl = {
            // \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
          };
          S("\\dotso", function(i) {
            return i.future().text in Tl ? "\\ldots\\," : "\\ldots";
          }), S("\\dotsc", function(i) {
            const s = i.future().text;
            return s in Tl && s !== "," ? "\\ldots\\," : "\\ldots";
          }), S("\\cdots", function(i) {
            return i.future().text in Tl ? "\\@cdots\\," : "\\@cdots";
          }), S("\\dotsb", "\\cdots"), S("\\dotsm", "\\cdots"), S("\\dotsi", "\\!\\cdots"), S("\\dotsx", "\\ldots\\,"), S("\\DOTSI", "\\relax"), S("\\DOTSB", "\\relax"), S("\\DOTSX", "\\relax"), S("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), S("\\,", "\\tmspace+{3mu}{.1667em}"), S("\\thinspace", "\\,"), S("\\>", "\\mskip{4mu}"), S("\\:", "\\tmspace+{4mu}{.2222em}"), S("\\medspace", "\\:"), S("\\;", "\\tmspace+{5mu}{.2777em}"), S("\\thickspace", "\\;"), S("\\!", "\\tmspace-{3mu}{.1667em}"), S("\\negthinspace", "\\!"), S("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), S("\\negthickspace", "\\tmspace-{5mu}{.277em}"), S("\\enspace", "\\kern.5em "), S("\\enskip", "\\hskip.5em\\relax"), S("\\quad", "\\hskip1em\\relax"), S("\\qquad", "\\hskip2em\\relax"), S("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), S("\\tag@paren", "\\tag@literal{({#1})}"), S("\\tag@literal", (i) => {
            if (i.macros.get("\\df@tag"))
              throw new o("Multiple \\tag");
            return "\\gdef\\df@tag{\\text{#1}}";
          }), S("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"), S("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"), S("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"), S("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"), S("\\newline", "\\\\\\relax"), S("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
          const wu = oe(Fe["Main-Regular"][84][1] - 0.7 * Fe["Main-Regular"][65][1]);
          S("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + wu + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), S("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + wu + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), S("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), S("\\@hspace", "\\hskip #1\\relax"), S("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), S("\\ordinarycolon", ":"), S("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), S("\\dblcolon", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'), S("\\coloneqq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'), S("\\Coloneqq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'), S("\\coloneq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'), S("\\Coloneq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'), S("\\eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'), S("\\Eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'), S("\\eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'), S("\\Eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'), S("\\colonapprox", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'), S("\\Colonapprox", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'), S("\\colonsim", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'), S("\\Colonsim", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'), S("∷", "\\dblcolon"), S("∹", "\\eqcolon"), S("≔", "\\coloneqq"), S("≕", "\\eqqcolon"), S("⩴", "\\Coloneqq"), S("\\ratio", "\\vcentcolon"), S("\\coloncolon", "\\dblcolon"), S("\\colonequals", "\\coloneqq"), S("\\coloncolonequals", "\\Coloneqq"), S("\\equalscolon", "\\eqqcolon"), S("\\equalscoloncolon", "\\Eqqcolon"), S("\\colonminus", "\\coloneq"), S("\\coloncolonminus", "\\Coloneq"), S("\\minuscolon", "\\eqcolon"), S("\\minuscoloncolon", "\\Eqcolon"), S("\\coloncolonapprox", "\\Colonapprox"), S("\\coloncolonsim", "\\Colonsim"), S("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), S("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), S("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), S("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), S("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), S("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), S("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), S("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), S("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), S("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), S("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), S("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), S("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), S("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), S("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), S("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), S("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), S("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), S("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), S("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), S("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), S("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), S("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), S("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), S("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), S("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), S("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), S("\\imath", "\\html@mathml{\\@imath}{ı}"), S("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), S("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), S("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), S("⟦", "\\llbracket"), S("⟧", "\\rrbracket"), S("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), S("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), S("⦃", "\\lBrace"), S("⦄", "\\rBrace"), S("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), S("⦵", "\\minuso"), S("\\darr", "\\downarrow"), S("\\dArr", "\\Downarrow"), S("\\Darr", "\\Downarrow"), S("\\lang", "\\langle"), S("\\rang", "\\rangle"), S("\\uarr", "\\uparrow"), S("\\uArr", "\\Uparrow"), S("\\Uarr", "\\Uparrow"), S("\\N", "\\mathbb{N}"), S("\\R", "\\mathbb{R}"), S("\\Z", "\\mathbb{Z}"), S("\\alef", "\\aleph"), S("\\alefsym", "\\aleph"), S("\\Alpha", "\\mathrm{A}"), S("\\Beta", "\\mathrm{B}"), S("\\bull", "\\bullet"), S("\\Chi", "\\mathrm{X}"), S("\\clubs", "\\clubsuit"), S("\\cnums", "\\mathbb{C}"), S("\\Complex", "\\mathbb{C}"), S("\\Dagger", "\\ddagger"), S("\\diamonds", "\\diamondsuit"), S("\\empty", "\\emptyset"), S("\\Epsilon", "\\mathrm{E}"), S("\\Eta", "\\mathrm{H}"), S("\\exist", "\\exists"), S("\\harr", "\\leftrightarrow"), S("\\hArr", "\\Leftrightarrow"), S("\\Harr", "\\Leftrightarrow"), S("\\hearts", "\\heartsuit"), S("\\image", "\\Im"), S("\\infin", "\\infty"), S("\\Iota", "\\mathrm{I}"), S("\\isin", "\\in"), S("\\Kappa", "\\mathrm{K}"), S("\\larr", "\\leftarrow"), S("\\lArr", "\\Leftarrow"), S("\\Larr", "\\Leftarrow"), S("\\lrarr", "\\leftrightarrow"), S("\\lrArr", "\\Leftrightarrow"), S("\\Lrarr", "\\Leftrightarrow"), S("\\Mu", "\\mathrm{M}"), S("\\natnums", "\\mathbb{N}"), S("\\Nu", "\\mathrm{N}"), S("\\Omicron", "\\mathrm{O}"), S("\\plusmn", "\\pm"), S("\\rarr", "\\rightarrow"), S("\\rArr", "\\Rightarrow"), S("\\Rarr", "\\Rightarrow"), S("\\real", "\\Re"), S("\\reals", "\\mathbb{R}"), S("\\Reals", "\\mathbb{R}"), S("\\Rho", "\\mathrm{P}"), S("\\sdot", "\\cdot"), S("\\sect", "\\S"), S("\\spades", "\\spadesuit"), S("\\sub", "\\subset"), S("\\sube", "\\subseteq"), S("\\supe", "\\supseteq"), S("\\Tau", "\\mathrm{T}"), S("\\thetasym", "\\vartheta"), S("\\weierp", "\\wp"), S("\\Zeta", "\\mathrm{Z}"), S("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), S("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), S("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), S("\\bra", "\\mathinner{\\langle{#1}|}"), S("\\ket", "\\mathinner{|{#1}\\rangle}"), S("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), S("\\Bra", "\\left\\langle#1\\right|"), S("\\Ket", "\\left|#1\\right\\rangle");
          const yu = (i) => (s) => {
            const a = s.consumeArg().tokens, f = s.consumeArg().tokens, m = s.consumeArg().tokens, b = s.consumeArg().tokens, w = s.macros.get("|"), D = s.macros.get("\\|");
            s.macros.beginGroup();
            const F = (W) => (Z) => {
              i && (Z.macros.set("|", w), m.length && Z.macros.set("\\|", D));
              let re = W;
              return !W && m.length && Z.future().text === "|" && (Z.popToken(), re = !0), {
                tokens: re ? m : f,
                numArgs: 0
              };
            };
            s.macros.set("|", F(!1)), m.length && s.macros.set("\\|", F(!0));
            const I = s.consumeArg().tokens, j = s.expandTokens([
              ...b,
              ...I,
              ...a
              // reversed
            ]);
            return s.macros.endGroup(), {
              tokens: j.reverse(),
              numArgs: 0
            };
          };
          S("\\bra@ket", yu(!1)), S("\\bra@set", yu(!0)), S("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), S("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), S("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), S("\\angln", "{\\angl n}"), S("\\blue", "\\textcolor{##6495ed}{#1}"), S("\\orange", "\\textcolor{##ffa500}{#1}"), S("\\pink", "\\textcolor{##ff00af}{#1}"), S("\\red", "\\textcolor{##df0030}{#1}"), S("\\green", "\\textcolor{##28ae7b}{#1}"), S("\\gray", "\\textcolor{gray}{#1}"), S("\\purple", "\\textcolor{##9d38bd}{#1}"), S("\\blueA", "\\textcolor{##ccfaff}{#1}"), S("\\blueB", "\\textcolor{##80f6ff}{#1}"), S("\\blueC", "\\textcolor{##63d9ea}{#1}"), S("\\blueD", "\\textcolor{##11accd}{#1}"), S("\\blueE", "\\textcolor{##0c7f99}{#1}"), S("\\tealA", "\\textcolor{##94fff5}{#1}"), S("\\tealB", "\\textcolor{##26edd5}{#1}"), S("\\tealC", "\\textcolor{##01d1c1}{#1}"), S("\\tealD", "\\textcolor{##01a995}{#1}"), S("\\tealE", "\\textcolor{##208170}{#1}"), S("\\greenA", "\\textcolor{##b6ffb0}{#1}"), S("\\greenB", "\\textcolor{##8af281}{#1}"), S("\\greenC", "\\textcolor{##74cf70}{#1}"), S("\\greenD", "\\textcolor{##1fab54}{#1}"), S("\\greenE", "\\textcolor{##0d923f}{#1}"), S("\\goldA", "\\textcolor{##ffd0a9}{#1}"), S("\\goldB", "\\textcolor{##ffbb71}{#1}"), S("\\goldC", "\\textcolor{##ff9c39}{#1}"), S("\\goldD", "\\textcolor{##e07d10}{#1}"), S("\\goldE", "\\textcolor{##a75a05}{#1}"), S("\\redA", "\\textcolor{##fca9a9}{#1}"), S("\\redB", "\\textcolor{##ff8482}{#1}"), S("\\redC", "\\textcolor{##f9685d}{#1}"), S("\\redD", "\\textcolor{##e84d39}{#1}"), S("\\redE", "\\textcolor{##bc2612}{#1}"), S("\\maroonA", "\\textcolor{##ffbde0}{#1}"), S("\\maroonB", "\\textcolor{##ff92c6}{#1}"), S("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), S("\\maroonD", "\\textcolor{##ca337c}{#1}"), S("\\maroonE", "\\textcolor{##9e034e}{#1}"), S("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), S("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), S("\\purpleC", "\\textcolor{##aa87ff}{#1}"), S("\\purpleD", "\\textcolor{##7854ab}{#1}"), S("\\purpleE", "\\textcolor{##543b78}{#1}"), S("\\mintA", "\\textcolor{##f5f9e8}{#1}"), S("\\mintB", "\\textcolor{##edf2df}{#1}"), S("\\mintC", "\\textcolor{##e0e5cc}{#1}"), S("\\grayA", "\\textcolor{##f6f7f7}{#1}"), S("\\grayB", "\\textcolor{##f0f1f2}{#1}"), S("\\grayC", "\\textcolor{##e3e5e6}{#1}"), S("\\grayD", "\\textcolor{##d6d8da}{#1}"), S("\\grayE", "\\textcolor{##babec2}{#1}"), S("\\grayF", "\\textcolor{##888d93}{#1}"), S("\\grayG", "\\textcolor{##626569}{#1}"), S("\\grayH", "\\textcolor{##3b3e40}{#1}"), S("\\grayI", "\\textcolor{##21242c}{#1}"), S("\\kaBlue", "\\textcolor{##314453}{#1}"), S("\\kaGreen", "\\textcolor{##71B307}{#1}");
          const vu = {
            "^": !0,
            // Parser.js
            _: !0,
            // Parser.js
            "\\limits": !0,
            // Parser.js
            "\\nolimits": !0
            // Parser.js
          };
          class cd {
            constructor(s, a, f) {
              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 = a, this.expansionCount = 0, this.feed(s), this.macros = new od(ud, a.macros), this.mode = f, this.stack = [];
            }
            /**
             * Feed a new input string to the same MacroExpander
             * (with existing macros etc.).
             */
            feed(s) {
              this.lexer = new gu(s, this.settings);
            }
            /**
             * Switches between "text" and "math" modes.
             */
            switchMode(s) {
              this.mode = s;
            }
            /**
             * 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(s) {
              this.stack.push(s);
            }
            /**
             * Append an array of tokens to the token stack.
             */
            pushTokens(s) {
              this.stack.push(...s);
            }
            /**
             * 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(s) {
              let a, f, m;
              if (s) {
                if (this.consumeSpaces(), this.future().text !== "[")
                  return null;
                a = this.popToken(), {
                  tokens: m,
                  end: f
                } = this.consumeArg(["]"]);
              } else
                ({
                  tokens: m,
                  start: a,
                  end: f
                } = this.consumeArg());
              return this.pushToken(new Sn("EOF", f.loc)), this.pushTokens(m), a.range(f, "");
            }
            /**
             * Consume all following space tokens, without expansion.
             */
            consumeSpaces() {
              for (; this.future().text === " "; )
                this.stack.pop();
            }
            /**
             * Consume an argument from the token stream, and return the resulting array
             * of tokens and start/end token.
             */
            consumeArg(s) {
              const a = [], f = s && s.length > 0;
              f || this.consumeSpaces();
              const m = this.future();
              let b, w = 0, D = 0;
              do {
                if (b = this.popToken(), a.push(b), b.text === "{")
                  ++w;
                else if (b.text === "}") {
                  if (--w, w === -1)
                    throw new o("Extra }", b);
                } else if (b.text === "EOF")
                  throw new o("Unexpected end of input in a macro argument, expected '" + (s && f ? s[D] : "}") + "'", b);
                if (s && f)
                  if ((w === 0 || w === 1 && s[D] === "{") && b.text === s[D]) {
                    if (++D, D === s.length) {
                      a.splice(-D, D);
                      break;
                    }
                  } else
                    D = 0;
              } while (w !== 0 || f);
              return m.text === "{" && a[a.length - 1].text === "}" && (a.pop(), a.shift()), a.reverse(), {
                tokens: a,
                start: m,
                end: b
              };
            }
            /**
             * Consume the specified number of (delimited) arguments from the token
             * stream and return the resulting array of arguments.
             */
            consumeArgs(s, a) {
              if (a) {
                if (a.length !== s + 1)
                  throw new o("The length of delimiters doesn't match the number of args!");
                const m = a[0];
                for (let b = 0; b < m.length; b++) {
                  const w = this.popToken();
                  if (m[b] !== w.text)
                    throw new o("Use of the macro doesn't match its definition", w);
                }
              }
              const f = [];
              for (let m = 0; m < s; m++)
                f.push(this.consumeArg(a && a[m + 1]).tokens);
              return f;
            }
            /**
             * Increment `expansionCount` by the specified amount.
             * Throw an error if it exceeds `maxExpand`.
             */
            countExpansion(s) {
              if (this.expansionCount += s, this.expansionCount > this.settings.maxExpand)
                throw new o("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(s) {
              const a = this.popToken(), f = a.text, m = a.noexpand ? null : this._getExpansion(f);
              if (m == null || s && m.unexpandable) {
                if (s && m == null && f[0] === "\\" && !this.isDefined(f))
                  throw new o("Undefined control sequence: " + f);
                return this.pushToken(a), !1;
              }
              this.countExpansion(1);
              let b = m.tokens;
              const w = this.consumeArgs(m.numArgs, m.delimiters);
              if (m.numArgs) {
                b = b.slice();
                for (let D = b.length - 1; D >= 0; --D) {
                  let F = b[D];
                  if (F.text === "#") {
                    if (D === 0)
                      throw new o("Incomplete placeholder at end of macro body", F);
                    if (F = b[--D], F.text === "#")
                      b.splice(D + 1, 1);
                    else if (/^[1-9]$/.test(F.text))
                      b.splice(D, 2, ...w[+F.text - 1]);
                    else
                      throw new o("Not a valid argument number", F);
                  }
                }
              }
              return this.pushTokens(b), b.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) {
                  const s = this.stack.pop();
                  return s.treatAsRelax && (s.text = "\\relax"), s;
                }
              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(s) {
              return this.macros.has(s) ? this.expandTokens([new Sn(s)]) : 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(s) {
              const a = [], f = this.stack.length;
              for (this.pushTokens(s); this.stack.length > f; )
                if (this.expandOnce(!0) === !1) {
                  const m = this.stack.pop();
                  m.treatAsRelax && (m.noexpand = !1, m.treatAsRelax = !1), a.push(m);
                }
              return this.countExpansion(a.length), a;
            }
            /**
             * Fully expand the given macro name and return the result as a string,
             * or return `undefined` if no such macro is defined.
             */
            expandMacroAsText(s) {
              const a = this.expandMacro(s);
              return a && a.map((f) => f.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(s) {
              const a = this.macros.get(s);
              if (a == null)
                return a;
              if (s.length === 1) {
                const m = this.lexer.catcodes[s];
                if (m != null && m !== 13)
                  return;
              }
              const f = typeof a == "function" ? a(this) : a;
              if (typeof f == "string") {
                let m = 0;
                if (f.indexOf("#") !== -1) {
                  const I = f.replace(/##/g, "");
                  for (; I.indexOf("#" + (m + 1)) !== -1; )
                    ++m;
                }
                const b = new gu(f, this.settings), w = [];
                let D = b.lex();
                for (; D.text !== "EOF"; )
                  w.push(D), D = b.lex();
                return w.reverse(), {
                  tokens: w,
                  numArgs: m
                };
              }
              return f;
            }
            /**
             * 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(s) {
              return this.macros.has(s) || g0.hasOwnProperty(s) || P.math.hasOwnProperty(s) || P.text.hasOwnProperty(s) || vu.hasOwnProperty(s);
            }
            /**
             * Determine whether a command is expandable.
             */
            isExpandable(s) {
              const a = this.macros.get(s);
              return a != null ? typeof a == "string" || typeof a == "function" || !a.unexpandable : g0.hasOwnProperty(s) && !g0[s].primitive;
            }
          }
          const ku = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, Is = 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",
            "ᵝ": "β",
            "ᵞ": "γ",
            "ᵟ": "δ",
            "ᵠ": "ϕ",
            "ᵡ": "χ",
            "ᶿ": "θ"
          }), Fl = {
            "́": {
              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"
            }
          }, Du = {
            á: "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 Ls {
            constructor(s, a) {
              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 cd(s, a, this.mode), this.settings = a, this.leftrightDepth = 0;
            }
            /**
             * Checks a result to make sure it has the right type, and throws an
             * appropriate error otherwise.
             */
            expect(s, a) {
              if (a === void 0 && (a = !0), this.fetch().text !== s)
                throw new o("Expected '" + s + "', got '" + this.fetch().text + "'", this.fetch());
              a && 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(s) {
              this.mode = s, this.gullet.switchMode(s);
            }
            /**
             * 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 {
                const s = this.parseExpression(!1);
                return this.expect("EOF"), this.settings.globalGroup || this.gullet.endGroup(), s;
              } 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(s) {
              const a = this.nextToken;
              this.consume(), this.gullet.pushToken(new Sn("}")), this.gullet.pushTokens(s);
              const f = this.parseExpression(!1);
              return this.expect("}"), this.nextToken = a, f;
            }
            /**
             * 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(s, a) {
              const f = [];
              for (; ; ) {
                this.mode === "math" && this.consumeSpaces();
                const m = this.fetch();
                if (Ls.endOfExpression.indexOf(m.text) !== -1 || a && m.text === a || s && g0[m.text] && g0[m.text].infix)
                  break;
                const b = this.parseAtom(a);
                if (b) {
                  if (b.type === "internal")
                    continue;
                } else
                  break;
                f.push(b);
              }
              return this.mode === "text" && this.formLigatures(f), this.handleInfixNodes(f);
            }
            /**
             * 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(s) {
              let a = -1, f;
              for (let m = 0; m < s.length; m++)
                if (s[m].type === "infix") {
                  if (a !== -1)
                    throw new o("only one infix operator per group", s[m].token);
                  a = m, f = s[m].replaceWith;
                }
              if (a !== -1 && f) {
                let m, b;
                const w = s.slice(0, a), D = s.slice(a + 1);
                w.length === 1 && w[0].type === "ordgroup" ? m = w[0] : m = {
                  type: "ordgroup",
                  mode: this.mode,
                  body: w
                }, D.length === 1 && D[0].type === "ordgroup" ? b = D[0] : b = {
                  type: "ordgroup",
                  mode: this.mode,
                  body: D
                };
                let F;
                return f === "\\\\abovefrac" ? F = this.callFunction(f, [m, s[a], b], []) : F = this.callFunction(f, [m, b], []), [F];
              } else
                return s;
            }
            /**
             * Handle a subscript or superscript with nice errors.
             */
            handleSupSubscript(s) {
              const a = this.fetch(), f = a.text;
              this.consume(), this.consumeSpaces();
              const m = this.parseGroup(s);
              if (!m)
                throw new o("Expected group after '" + f + "'", a);
              return m;
            }
            /**
             * Converts the textual input of an unsupported command into a text node
             * contained within a color node whose color is determined by errorColor
             */
            formatUnsupportedCmd(s) {
              const a = [];
              for (let b = 0; b < s.length; b++)
                a.push({
                  type: "textord",
                  mode: "text",
                  text: s[b]
                });
              const f = {
                type: "text",
                mode: this.mode,
                body: a
              };
              return {
                type: "color",
                mode: this.mode,
                color: this.settings.errorColor,
                body: [f]
              };
            }
            /**
             * Parses a group with optional super/subscripts.
             */
            parseAtom(s) {
              const a = this.parseGroup("atom", s);
              if (this.mode === "text")
                return a;
              let f, m;
              for (; ; ) {
                this.consumeSpaces();
                const b = this.fetch();
                if (b.text === "\\limits" || b.text === "\\nolimits") {
                  if (a && a.type === "op") {
                    const w = b.text === "\\limits";
                    a.limits = w, a.alwaysHandleSupSub = !0;
                  } else if (a && a.type === "operatorname")
                    a.alwaysHandleSupSub && (a.limits = b.text === "\\limits");
                  else
                    throw new o("Limit controls must follow a math operator", b);
                  this.consume();
                } else if (b.text === "^") {
                  if (f)
                    throw new o("Double superscript", b);
                  f = this.handleSupSubscript("superscript");
                } else if (b.text === "_") {
                  if (m)
                    throw new o("Double subscript", b);
                  m = this.handleSupSubscript("subscript");
                } else if (b.text === "'") {
                  if (f)
                    throw new o("Double superscript", b);
                  const w = {
                    type: "textord",
                    mode: this.mode,
                    text: "\\prime"
                  }, D = [w];
                  for (this.consume(); this.fetch().text === "'"; )
                    D.push(w), this.consume();
                  this.fetch().text === "^" && D.push(this.handleSupSubscript("superscript")), f = {
                    type: "ordgroup",
                    mode: this.mode,
                    body: D
                  };
                } else if (Is[b.text]) {
                  const w = ku.test(b.text), D = [];
                  for (D.push(new Sn(Is[b.text])), this.consume(); ; ) {
                    const I = this.fetch().text;
                    if (!Is[I] || ku.test(I) !== w)
                      break;
                    D.unshift(new Sn(Is[I])), this.consume();
                  }
                  const F = this.subparse(D);
                  w ? m = {
                    type: "ordgroup",
                    mode: "math",
                    body: F
                  } : f = {
                    type: "ordgroup",
                    mode: "math",
                    body: F
                  };
                } else
                  break;
              }
              return f || m ? {
                type: "supsub",
                mode: this.mode,
                base: a,
                sup: f,
                sub: m
              } : a;
            }
            /**
             * Parses an entire function, including its base and all of its arguments.
             */
            parseFunction(s, a) {
              const f = this.fetch(), m = f.text, b = g0[m];
              if (!b)
                return null;
              if (this.consume(), a && a !== "atom" && !b.allowedInArgument)
                throw new o("Got function '" + m + "' with no arguments" + (a ? " as " + a : ""), f);
              if (this.mode === "text" && !b.allowedInText)
                throw new o("Can't use function '" + m + "' in text mode", f);
              if (this.mode === "math" && b.allowedInMath === !1)
                throw new o("Can't use function '" + m + "' in math mode", f);
              const {
                args: w,
                optArgs: D
              } = this.parseArguments(m, b);
              return this.callFunction(m, w, D, f, s);
            }
            /**
             * Call a function handler with a suitable context and arguments.
             */
            callFunction(s, a, f, m, b) {
              const w = {
                funcName: s,
                parser: this,
                token: m,
                breakOnTokenText: b
              }, D = g0[s];
              if (D && D.handler)
                return D.handler(w, a, f);
              throw new o("No function handler for " + s);
            }
            /**
             * Parses the arguments of a function or environment
             */
            parseArguments(s, a) {
              const f = a.numArgs + a.numOptionalArgs;
              if (f === 0)
                return {
                  args: [],
                  optArgs: []
                };
              const m = [], b = [];
              for (let w = 0; w < f; w++) {
                let D = a.argTypes && a.argTypes[w];
                const F = w < a.numOptionalArgs;
                (a.primitive && D == null || // \sqrt expands into primitive if optional argument doesn't exist
                a.type === "sqrt" && w === 1 && b[0] == null) && (D = "primitive");
                const I = this.parseGroupOfType("argument to '" + s + "'", D, F);
                if (F)
                  b.push(I);
                else if (I != null)
                  m.push(I);
                else
                  throw new o("Null argument, please report this as a bug");
              }
              return {
                args: m,
                optArgs: b
              };
            }
            /**
             * Parses a group when the mode is changing.
             */
            parseGroupOfType(s, a, f) {
              switch (a) {
                case "color":
                  return this.parseColorGroup(f);
                case "size":
                  return this.parseSizeGroup(f);
                case "url":
                  return this.parseUrlGroup(f);
                case "math":
                case "text":
                  return this.parseArgumentGroup(f, a);
                case "hbox": {
                  const m = this.parseArgumentGroup(f, "text");
                  return m != null ? {
                    type: "styling",
                    mode: m.mode,
                    body: [m],
                    style: "text"
                    // simulate \textstyle
                  } : null;
                }
                case "raw": {
                  const m = this.parseStringGroup("raw", f);
                  return m != null ? {
                    type: "raw",
                    mode: "text",
                    string: m.text
                  } : null;
                }
                case "primitive": {
                  if (f)
                    throw new o("A primitive argument cannot be optional");
                  const m = this.parseGroup(s);
                  if (m == null)
                    throw new o("Expected group as " + s, this.fetch());
                  return m;
                }
                case "original":
                case null:
                case void 0:
                  return this.parseArgumentGroup(f);
                default:
                  throw new o("Unknown group type as " + s, 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(s, a) {
              const f = this.gullet.scanArgument(a);
              if (f == null)
                return null;
              let m = "", b;
              for (; (b = this.fetch()).text !== "EOF"; )
                m += b.text, this.consume();
              return this.consume(), f.text = m, f;
            }
            /**
             * 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(s, a) {
              const f = this.fetch();
              let m = f, b = "", w;
              for (; (w = this.fetch()).text !== "EOF" && s.test(b + w.text); )
                m = w, b += m.text, this.consume();
              if (b === "")
                throw new o("Invalid " + a + ": '" + f.text + "'", f);
              return f.range(m, b);
            }
            /**
             * Parses a color description.
             */
            parseColorGroup(s) {
              const a = this.parseStringGroup("color", s);
              if (a == null)
                return null;
              const f = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(a.text);
              if (!f)
                throw new o("Invalid color: '" + a.text + "'", a);
              let m = f[0];
              return /^[0-9a-f]{6}$/i.test(m) && (m = "#" + m), {
                type: "color-token",
                mode: this.mode,
                color: m
              };
            }
            /**
             * Parses a size specification, consisting of magnitude and unit.
             */
            parseSizeGroup(s) {
              let a, f = !1;
              if (this.gullet.consumeSpaces(), !s && this.gullet.future().text !== "{" ? a = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : a = this.parseStringGroup("size", s), !a)
                return null;
              !s && a.text.length === 0 && (a.text = "0pt", f = !0);
              const m = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(a.text);
              if (!m)
                throw new o("Invalid size: '" + a.text + "'", a);
              const b = {
                number: +(m[1] + m[2]),
                // sign + magnitude, cast to number
                unit: m[3]
              };
              if (!tn(b))
                throw new o("Invalid unit: '" + b.unit + "'", a);
              return {
                type: "size",
                mode: this.mode,
                value: b,
                isBlank: f
              };
            }
            /**
             * Parses an URL, checking escaped letters and allowed protocols,
             * and setting the catcode of % as an active character (as in \hyperref).
             */
            parseUrlGroup(s) {
              this.gullet.lexer.setCatcode("%", 13), this.gullet.lexer.setCatcode("~", 12);
              const a = this.parseStringGroup("url", s);
              if (this.gullet.lexer.setCatcode("%", 14), this.gullet.lexer.setCatcode("~", 13), a == null)
                return null;
              const f = a.text.replace(/\\([#$%&~_^{}])/g, "$1");
              return {
                type: "url",
                mode: this.mode,
                url: f
              };
            }
            /**
             * Parses an argument with the mode specified.
             */
            parseArgumentGroup(s, a) {
              const f = this.gullet.scanArgument(s);
              if (f == null)
                return null;
              const m = this.mode;
              a && this.switchMode(a), this.gullet.beginGroup();
              const b = this.parseExpression(!1, "EOF");
              this.expect("EOF"), this.gullet.endGroup();
              const w = {
                type: "ordgroup",
                mode: this.mode,
                loc: f.loc,
                body: b
              };
              return a && this.switchMode(m), w;
            }
            /**
             * 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(s, a) {
              const f = this.fetch(), m = f.text;
              let b;
              if (m === "{" || m === "\\begingroup") {
                this.consume();
                const w = m === "{" ? "}" : "\\endgroup";
                this.gullet.beginGroup();
                const D = this.parseExpression(!1, w), F = this.fetch();
                this.expect(w), this.gullet.endGroup(), b = {
                  type: "ordgroup",
                  mode: this.mode,
                  loc: mn.range(f, F),
                  body: D,
                  // 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: m === "\\begingroup" || void 0
                };
              } else if (b = this.parseFunction(a, s) || this.parseSymbol(), b == null && m[0] === "\\" && !vu.hasOwnProperty(m)) {
                if (this.settings.throwOnError)
                  throw new o("Undefined control sequence: " + m, f);
                b = this.formatUnsupportedCmd(m), this.consume();
              }
              return b;
            }
            /**
             * 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(s) {
              let a = s.length - 1;
              for (let f = 0; f < a; ++f) {
                const m = s[f], b = m.text;
                b === "-" && s[f + 1].text === "-" && (f + 1 < a && s[f + 2].text === "-" ? (s.splice(f, 3, {
                  type: "textord",
                  mode: "text",
                  loc: mn.range(m, s[f + 2]),
                  text: "---"
                }), a -= 2) : (s.splice(f, 2, {
                  type: "textord",
                  mode: "text",
                  loc: mn.range(m, s[f + 1]),
                  text: "--"
                }), a -= 1)), (b === "'" || b === "`") && s[f + 1].text === b && (s.splice(f, 2, {
                  type: "textord",
                  mode: "text",
                  loc: mn.range(m, s[f + 1]),
                  text: b + b
                }), a -= 1);
              }
            }
            /**
             * Parse a single symbol out of the string. Here, we handle single character
             * symbols and special functions like \verb.
             */
            parseSymbol() {
              const s = this.fetch();
              let a = s.text;
              if (/^\\verb[^a-zA-Z]/.test(a)) {
                this.consume();
                let b = a.slice(5);
                const w = b.charAt(0) === "*";
                if (w && (b = b.slice(1)), b.length < 2 || b.charAt(0) !== b.slice(-1))
                  throw new o(`\\verb assertion failed --
                    please report what input caused this bug`);
                return b = b.slice(1, -1), {
                  type: "verb",
                  mode: "text",
                  body: b,
                  star: w
                };
              }
              Du.hasOwnProperty(a[0]) && !P[this.mode][a[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Accented Unicode text character "' + a[0] + '" used in math mode', s), a = Du[a[0]] + a.slice(1));
              const f = ld.exec(a);
              f && (a = a.substring(0, f.index), a === "i" ? a = "ı" : a === "j" && (a = "ȷ"));
              let m;
              if (P[this.mode][a]) {
                this.settings.strict && this.mode === "math" && ir.indexOf(a) >= 0 && this.settings.reportNonstrict("unicodeTextInMathMode", 'Latin-1/Unicode text character "' + a[0] + '" used in math mode', s);
                const b = P[this.mode][a].group, w = mn.range(s);
                let D;
                if (sr.hasOwnProperty(b)) {
                  const F = b;
                  D = {
                    type: "atom",
                    mode: this.mode,
                    family: F,
                    loc: w,
                    text: a
                  };
                } else
                  D = {
                    type: b,
                    mode: this.mode,
                    loc: w,
                    text: a
                  };
                m = D;
              } else if (a.charCodeAt(0) >= 128)
                this.settings.strict && (we(a.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Unicode text character "' + a[0] + '" used in math mode', s) : this.settings.reportNonstrict("unknownSymbol", 'Unrecognized Unicode character "' + a[0] + '"' + (" (" + a.charCodeAt(0) + ")"), s)), m = {
                  type: "textord",
                  mode: "text",
                  loc: mn.range(s),
                  text: a
                };
              else
                return null;
              if (this.consume(), f)
                for (let b = 0; b < f[0].length; b++) {
                  const w = f[0][b];
                  if (!Fl[w])
                    throw new o("Unknown accent ' " + w + "'", s);
                  const D = Fl[w][this.mode] || Fl[w].text;
                  if (!D)
                    throw new o("Accent " + w + " unsupported in " + this.mode + " mode", s);
                  m = {
                    type: "accent",
                    mode: this.mode,
                    loc: mn.range(s),
                    label: D,
                    isStretchy: !1,
                    isShifty: !0,
                    // $FlowFixMe
                    base: m
                  };
                }
              return m;
            }
          }
          Ls.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
          var Cl = function(i, s) {
            if (!(typeof i == "string" || i instanceof String))
              throw new TypeError("KaTeX can only parse string typed expression");
            const a = new Ls(i, s);
            delete a.gullet.macros.current["\\df@tag"];
            let f = a.parse();
            if (delete a.gullet.macros.current["\\current@color"], delete a.gullet.macros.current["\\color"], a.gullet.macros.get("\\df@tag")) {
              if (!s.displayMode)
                throw new o("\\tag works only in display equations");
              f = [{
                type: "tag",
                mode: "text",
                body: f,
                tag: a.subparse([new Sn("\\df@tag")])
              }];
            }
            return f;
          };
          let Au = function(i, s, a) {
            s.textContent = "";
            const f = Ml(i, a).toNode();
            s.appendChild(f);
          };
          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."), Au = function() {
            throw new o("KaTeX doesn't work in quirks mode.");
          });
          const fd = function(i, s) {
            return Ml(i, s).toMarkup();
          }, hd = function(i, s) {
            const a = new x(s);
            return Cl(i, a);
          }, Su = function(i, s, a) {
            if (a.throwOnError || !(i instanceof o))
              throw i;
            const f = X.makeSpan(["katex-error"], [new Gt(s)]);
            return f.setAttribute("title", i.toString()), f.setAttribute("style", "color:" + a.errorColor), f;
          }, Ml = function(i, s) {
            const a = new x(s);
            try {
              const f = Cl(i, a);
              return x4(f, i, a);
            } catch (f) {
              return Su(f, i, a);
            }
          };
          var dd = {
            /**
             * Current KaTeX version
             */
            version: "0.16.10",
            /**
             * Renders the given LaTeX into an HTML+MathML combination, and adds
             * it as a child to the specified DOM node.
             */
            render: Au,
            /**
             * Renders the given LaTeX into an HTML+MathML combination string,
             * for sending to the client.
             */
            renderToString: fd,
            /**
             * KaTeX error, usually during parsing.
             */
            ParseError: o,
            /**
             * The shema of Settings
             */
            SETTINGS_SCHEMA: M,
            /**
             * 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: hd,
            /**
             * 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: Ml,
            /**
             * 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: function(i, s) {
              const a = new x(s);
              try {
                const f = Cl(i, a);
                return T4(f, i, a);
              } catch (f) {
                return Su(f, i, a);
              }
            },
            /**
             * extends internal font metrics object with a new object
             * each key in the new object represents a font name
            */
            __setFontMetrics: Re,
            /**
             * adds a new symbol to builtin symbols table
             */
            __defineSymbol: d,
            /**
             * adds a new function to builtin function list,
             * which directly produce parse tree elements
             * and have their own html/mathml builders
             */
            __defineFunction: ge,
            /**
             * adds a new macro to builtin macro list
             */
            __defineMacro: S,
            /**
             * 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: t0,
              Anchor: kt,
              SymbolNode: Gt,
              SvgNode: Qt,
              PathNode: dn,
              LineNode: d0
            }
          }, md = dd;
          return r = r.default, r;
        }()
      );
    });
  }(Ql)), Ql.exports;
}
(function(t, e) {
  (function(r, l) {
    t.exports = l(Op());
  })(typeof self < "u" ? self : yi, function(n) {
    return (
      /******/
      function() {
        var r = {
          /***/
          771: (
            /***/
            function(c) {
              c.exports = n;
            }
          )
          /******/
        }, l = {};
        function o(c) {
          var h = l[c];
          if (h !== void 0)
            return h.exports;
          var p = l[c] = {
            /******/
            // no module.id needed
            /******/
            // no module.loaded needed
            /******/
            exports: {}
            /******/
          };
          return r[c](p, p.exports, o), p.exports;
        }
        (function() {
          o.n = function(c) {
            var h = c && c.__esModule ? (
              /******/
              function() {
                return c.default;
              }
            ) : (
              /******/
              function() {
                return c;
              }
            );
            return o.d(h, { a: h }), h;
          };
        })(), function() {
          o.d = function(c, h) {
            for (var p in h)
              o.o(h, p) && !o.o(c, p) && Object.defineProperty(c, p, { enumerable: !0, get: h[p] });
          };
        }(), function() {
          o.o = function(c, h) {
            return Object.prototype.hasOwnProperty.call(c, h);
          };
        }();
        var u = {};
        return function() {
          o.d(u, {
            default: function() {
              return (
                /* binding */
                N
              );
            }
          });
          var c = o(771), h = /* @__PURE__ */ o.n(c);
          const p = function(M, A, x) {
            let C = x, O = 0;
            const q = M.length;
            for (; C < A.length; ) {
              const R = A[C];
              if (O <= 0 && A.slice(C, C + q) === M)
                return C;
              R === "\\" ? C++ : R === "{" ? O++ : R === "}" && O--, C++;
            }
            return -1;
          }, _ = function(M) {
            return M.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
          }, v = /^\\begin{/;
          var E = function(M, A) {
            let x;
            const C = [], O = new RegExp("(" + A.map((q) => _(q.left)).join("|") + ")");
            for (; x = M.search(O), x !== -1; ) {
              x > 0 && (C.push({
                type: "text",
                data: M.slice(0, x)
              }), M = M.slice(x));
              const q = A.findIndex((ne) => M.startsWith(ne.left));
              if (x = p(A[q].right, M, A[q].left.length), x === -1)
                break;
              const R = M.slice(0, x + A[q].right.length), J = v.test(R) ? R : M.slice(A[q].left.length, x);
              C.push({
                type: "math",
                data: J,
                rawData: R,
                display: A[q].display
              }), M = M.slice(x + A[q].right.length);
            }
            return M !== "" && C.push({
              type: "text",
              data: M
            }), C;
          };
          const z = function(M, A) {
            const x = E(M, A.delimiters);
            if (x.length === 1 && x[0].type === "text")
              return null;
            const C = document.createDocumentFragment();
            for (let O = 0; O < x.length; O++)
              if (x[O].type === "text")
                C.appendChild(document.createTextNode(x[O].data));
              else {
                const q = document.createElement("span");
                let R = x[O].data;
                A.displayMode = x[O].display;
                try {
                  A.preProcess && (R = A.preProcess(R)), h().render(R, q, A);
                } catch (J) {
                  if (!(J instanceof h().ParseError))
                    throw J;
                  A.errorCallback("KaTeX auto-render: Failed to parse `" + x[O].data + "` with ", J), C.appendChild(document.createTextNode(x[O].rawData));
                  continue;
                }
                C.appendChild(q);
              }
            return C;
          }, H = function(M, A) {
            for (let x = 0; x < M.childNodes.length; x++) {
              const C = M.childNodes[x];
              if (C.nodeType === 3) {
                let O = C.textContent, q = C.nextSibling, R = 0;
                for (; q && q.nodeType === Node.TEXT_NODE; )
                  O += q.textContent, q = q.nextSibling, R++;
                const J = z(O, A);
                if (J) {
                  for (let ne = 0; ne < R; ne++)
                    C.nextSibling.remove();
                  x += J.childNodes.length - 1, M.replaceChild(J, C);
                } else
                  x += R;
              } else if (C.nodeType === 1) {
                const O = " " + C.className + " ";
                A.ignoredTags.indexOf(C.nodeName.toLowerCase()) === -1 && A.ignoredClasses.every((R) => O.indexOf(" " + R + " ") === -1) && H(C, A);
              }
            }
          };
          var N = function(M, A) {
            if (!M)
              throw new Error("No element provided to render");
            const x = {};
            for (const C in A)
              A.hasOwnProperty(C) && (x[C] = A[C]);
            x.delimiters = x.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
              }
            ], x.ignoredTags = x.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code", "option"], x.ignoredClasses = x.ignoredClasses || [], x.errorCallback = x.errorCallback || console.error, x.macros = x.macros || {}, H(M, x);
          };
        }(), u = u.default, u;
      }()
    );
  });
})(Ah);
var Ip = Ah.exports;
const Lp = /* @__PURE__ */ Va(Ip);
function Ja() {
  return {
    async: !1,
    breaks: !1,
    extensions: null,
    gfm: !0,
    hooks: null,
    pedantic: !1,
    renderer: null,
    silent: !1,
    tokenizer: null,
    walkTokens: null
  };
}
let $0 = Ja();
function Sh(t) {
  $0 = t;
}
const Eh = /[&<>"']/, Hp = new RegExp(Eh.source, "g"), xh = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Pp = new RegExp(xh.source, "g"), qp = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, Dc = (t) => qp[t];
function bn(t, e) {
  if (e) {
    if (Eh.test(t))
      return t.replace(Hp, Dc);
  } else if (xh.test(t))
    return t.replace(Pp, Dc);
  return t;
}
const Up = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
function Gp(t) {
  return t.replace(Up, (e, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
}
const jp = /(^|[^\[])\^/g;
function ft(t, e) {
  let n = typeof t == "string" ? t : t.source;
  e = e || "";
  const r = {
    replace: (l, o) => {
      let u = typeof o == "string" ? o : o.source;
      return u = u.replace(jp, "$1"), n = n.replace(l, u), r;
    },
    getRegex: () => new RegExp(n, e)
  };
  return r;
}
function Ac(t) {
  try {
    t = encodeURI(t).replace(/%25/g, "%");
  } catch {
    return null;
  }
  return t;
}
const Qr = { exec: () => null };
function Sc(t, e) {
  const n = t.replace(/\|/g, (o, u, c) => {
    let h = !1, p = u;
    for (; --p >= 0 && c[p] === "\\"; )
      h = !h;
    return h ? "|" : " |";
  }), r = n.split(/ \|/);
  let l = 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 (; l < r.length; l++)
    r[l] = r[l].trim().replace(/\\\|/g, "|");
  return r;
}
function Vs(t, e, n) {
  const r = t.length;
  if (r === 0)
    return "";
  let l = 0;
  for (; l < r; ) {
    const o = t.charAt(r - l - 1);
    if (o === e && !n)
      l++;
    else if (o !== e && n)
      l++;
    else
      break;
  }
  return t.slice(0, r - l);
}
function Vp(t, e) {
  if (t.indexOf(e[1]) === -1)
    return -1;
  let n = 0;
  for (let r = 0; r < t.length; r++)
    if (t[r] === "\\")
      r++;
    else if (t[r] === e[0])
      n++;
    else if (t[r] === e[1] && (n--, n < 0))
      return r;
  return -1;
}
function Ec(t, e, n, r) {
  const l = e.href, o = e.title ? bn(e.title) : null, u = t[1].replace(/\\([\[\]])/g, "$1");
  if (t[0].charAt(0) !== "!") {
    r.state.inLink = !0;
    const c = {
      type: "link",
      raw: n,
      href: l,
      title: o,
      text: u,
      tokens: r.inlineTokens(u)
    };
    return r.state.inLink = !1, c;
  }
  return {
    type: "image",
    raw: n,
    href: l,
    title: o,
    text: bn(u)
  };
}
function Wp(t, e) {
  const n = t.match(/^(\s+)(?:```)/);
  if (n === null)
    return e;
  const r = n[1];
  return e.split(`
`).map((l) => {
    const o = l.match(/^\s+/);
    if (o === null)
      return l;
    const [u] = o;
    return u.length >= r.length ? l.slice(r.length) : l;
  }).join(`
`);
}
class xi {
  // set by the lexer
  constructor(e) {
    yt(this, "options");
    yt(this, "rules");
    // set by the lexer
    yt(this, "lexer");
    this.options = e || $0;
  }
  space(e) {
    const n = this.rules.block.newline.exec(e);
    if (n && n[0].length > 0)
      return {
        type: "space",
        raw: n[0]
      };
  }
  code(e) {
    const n = this.rules.block.code.exec(e);
    if (n) {
      const r = n[0].replace(/^ {1,4}/gm, "");
      return {
        type: "code",
        raw: n[0],
        codeBlockStyle: "indented",
        text: this.options.pedantic ? r : Vs(r, `
`)
      };
    }
  }
  fences(e) {
    const n = this.rules.block.fences.exec(e);
    if (n) {
      const r = n[0], l = Wp(r, n[3] || "");
      return {
        type: "code",
        raw: r,
        lang: n[2] ? n[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : n[2],
        text: l
      };
    }
  }
  heading(e) {
    const n = this.rules.block.heading.exec(e);
    if (n) {
      let r = n[2].trim();
      if (/#$/.test(r)) {
        const l = Vs(r, "#");
        (this.options.pedantic || !l || / $/.test(l)) && (r = l.trim());
      }
      return {
        type: "heading",
        raw: n[0],
        depth: n[1].length,
        text: r,
        tokens: this.lexer.inline(r)
      };
    }
  }
  hr(e) {
    const n = this.rules.block.hr.exec(e);
    if (n)
      return {
        type: "hr",
        raw: n[0]
      };
  }
  blockquote(e) {
    const n = this.rules.block.blockquote.exec(e);
    if (n) {
      const r = Vs(n[0].replace(/^ *>[ \t]?/gm, ""), `
`), l = this.lexer.state.top;
      this.lexer.state.top = !0;
      const o = this.lexer.blockTokens(r);
      return this.lexer.state.top = l, {
        type: "blockquote",
        raw: n[0],
        tokens: o,
        text: r
      };
    }
  }
  list(e) {
    let n = this.rules.block.list.exec(e);
    if (n) {
      let r = n[1].trim();
      const l = r.length > 1, o = {
        type: "list",
        raw: "",
        ordered: l,
        start: l ? +r.slice(0, -1) : "",
        loose: !1,
        items: []
      };
      r = l ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = l ? r : "[*+-]");
      const u = new RegExp(`^( {0,3}${r})((?:[	 ][^\\n]*)?(?:\\n|$))`);
      let c = "", h = "", p = !1;
      for (; e; ) {
        let _ = !1;
        if (!(n = u.exec(e)) || this.rules.block.hr.test(e))
          break;
        c = n[0], e = e.substring(c.length);
        let v = n[2].split(`
`, 1)[0].replace(/^\t+/, (N) => " ".repeat(3 * N.length)), k = e.split(`
`, 1)[0], E = 0;
        this.options.pedantic ? (E = 2, h = v.trimStart()) : (E = n[2].search(/[^ ]/), E = E > 4 ? 1 : E, h = v.slice(E), E += n[1].length);
        let z = !1;
        if (!v && /^ *$/.test(k) && (c += k + `
`, e = e.substring(k.length + 1), _ = !0), !_) {
          const N = new RegExp(`^ {0,${Math.min(3, E - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`), M = new RegExp(`^ {0,${Math.min(3, E - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), A = new RegExp(`^ {0,${Math.min(3, E - 1)}}(?:\`\`\`|~~~)`), x = new RegExp(`^ {0,${Math.min(3, E - 1)}}#`);
          for (; e; ) {
            const C = e.split(`
`, 1)[0];
            if (k = C, this.options.pedantic && (k = k.replace(/^ {1,4}(?=( {4})*[^ ])/g, "  ")), A.test(k) || x.test(k) || N.test(k) || M.test(e))
              break;
            if (k.search(/[^ ]/) >= E || !k.trim())
              h += `
` + k.slice(E);
            else {
              if (z || v.search(/[^ ]/) >= 4 || A.test(v) || x.test(v) || M.test(v))
                break;
              h += `
` + k;
            }
            !z && !k.trim() && (z = !0), c += C + `
`, e = e.substring(C.length + 1), v = k.slice(E);
          }
        }
        o.loose || (p ? o.loose = !0 : /\n *\n *$/.test(c) && (p = !0));
        let H = null, U;
        this.options.gfm && (H = /^\[[ xX]\] /.exec(h), H && (U = H[0] !== "[ ] ", h = h.replace(/^\[[ xX]\] +/, ""))), o.items.push({
          type: "list_item",
          raw: c,
          task: !!H,
          checked: U,
          loose: !1,
          text: h,
          tokens: []
        }), o.raw += c;
      }
      o.items[o.items.length - 1].raw = c.trimEnd(), o.items[o.items.length - 1].text = h.trimEnd(), o.raw = o.raw.trimEnd();
      for (let _ = 0; _ < o.items.length; _++)
        if (this.lexer.state.top = !1, o.items[_].tokens = this.lexer.blockTokens(o.items[_].text, []), !o.loose) {
          const v = o.items[_].tokens.filter((E) => E.type === "space"), k = v.length > 0 && v.some((E) => /\n.*\n/.test(E.raw));
          o.loose = k;
        }
      if (o.loose)
        for (let _ = 0; _ < o.items.length; _++)
          o.items[_].loose = !0;
      return o;
    }
  }
  html(e) {
    const n = this.rules.block.html.exec(e);
    if (n)
      return {
        type: "html",
        block: !0,
        raw: n[0],
        pre: n[1] === "pre" || n[1] === "script" || n[1] === "style",
        text: n[0]
      };
  }
  def(e) {
    const n = this.rules.block.def.exec(e);
    if (n) {
      const r = n[1].toLowerCase().replace(/\s+/g, " "), l = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", o = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : n[3];
      return {
        type: "def",
        tag: r,
        raw: n[0],
        href: l,
        title: o
      };
    }
  }
  table(e) {
    const n = this.rules.block.table.exec(e);
    if (!n || !/[:|]/.test(n[2]))
      return;
    const r = Sc(n[1]), l = n[2].replace(/^\||\| *$/g, "").split("|"), o = n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(`
`) : [], u = {
      type: "table",
      raw: n[0],
      header: [],
      align: [],
      rows: []
    };
    if (r.length === l.length) {
      for (const c of l)
        /^ *-+: *$/.test(c) ? u.align.push("right") : /^ *:-+: *$/.test(c) ? u.align.push("center") : /^ *:-+ *$/.test(c) ? u.align.push("left") : u.align.push(null);
      for (const c of r)
        u.header.push({
          text: c,
          tokens: this.lexer.inline(c)
        });
      for (const c of o)
        u.rows.push(Sc(c, u.header.length).map((h) => ({
          text: h,
          tokens: this.lexer.inline(h)
        })));
      return u;
    }
  }
  lheading(e) {
    const n = this.rules.block.lheading.exec(e);
    if (n)
      return {
        type: "heading",
        raw: n[0],
        depth: n[2].charAt(0) === "=" ? 1 : 2,
        text: n[1],
        tokens: this.lexer.inline(n[1])
      };
  }
  paragraph(e) {
    const n = this.rules.block.paragraph.exec(e);
    if (n) {
      const r = n[1].charAt(n[1].length - 1) === `
` ? n[1].slice(0, -1) : n[1];
      return {
        type: "paragraph",
        raw: n[0],
        text: r,
        tokens: this.lexer.inline(r)
      };
    }
  }
  text(e) {
    const n = this.rules.block.text.exec(e);
    if (n)
      return {
        type: "text",
        raw: n[0],
        text: n[0],
        tokens: this.lexer.inline(n[0])
      };
  }
  escape(e) {
    const n = this.rules.inline.escape.exec(e);
    if (n)
      return {
        type: "escape",
        raw: n[0],
        text: bn(n[1])
      };
  }
  tag(e) {
    const n = this.rules.inline.tag.exec(e);
    if (n)
      return !this.lexer.state.inLink && /^<a /i.test(n[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && /^<\/a>/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), {
        type: "html",
        raw: n[0],
        inLink: this.lexer.state.inLink,
        inRawBlock: this.lexer.state.inRawBlock,
        block: !1,
        text: n[0]
      };
  }
  link(e) {
    const n = this.rules.inline.link.exec(e);
    if (n) {
      const r = n[2].trim();
      if (!this.options.pedantic && /^</.test(r)) {
        if (!/>$/.test(r))
          return;
        const u = Vs(r.slice(0, -1), "\\");
        if ((r.length - u.length) % 2 === 0)
          return;
      } else {
        const u = Vp(n[2], "()");
        if (u > -1) {
          const h = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + u;
          n[2] = n[2].substring(0, u), n[0] = n[0].substring(0, h).trim(), n[3] = "";
        }
      }
      let l = n[2], o = "";
      if (this.options.pedantic) {
        const u = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);
        u && (l = u[1], o = u[3]);
      } else
        o = n[3] ? n[3].slice(1, -1) : "";
      return l = l.trim(), /^</.test(l) && (this.options.pedantic && !/>$/.test(r) ? l = l.slice(1) : l = l.slice(1, -1)), Ec(n, {
        href: l && l.replace(this.rules.inline.anyPunctuation, "$1"),
        title: o && o.replace(this.rules.inline.anyPunctuation, "$1")
      }, n[0], this.lexer);
    }
  }
  reflink(e, n) {
    let r;
    if ((r = this.rules.inline.reflink.exec(e)) || (r = this.rules.inline.nolink.exec(e))) {
      const l = (r[2] || r[1]).replace(/\s+/g, " "), o = n[l.toLowerCase()];
      if (!o) {
        const u = r[0].charAt(0);
        return {
          type: "text",
          raw: u,
          text: u
        };
      }
      return Ec(r, o, r[0], this.lexer);
    }
  }
  emStrong(e, n, r = "") {
    let l = this.rules.inline.emStrongLDelim.exec(e);
    if (!l || l[3] && r.match(/[\p{L}\p{N}]/u))
      return;
    if (!(l[1] || l[2] || "") || !r || this.rules.inline.punctuation.exec(r)) {
      const u = [...l[0]].length - 1;
      let c, h, p = u, _ = 0;
      const v = l[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
      for (v.lastIndex = 0, n = n.slice(-1 * e.length + u); (l = v.exec(n)) != null; ) {
        if (c = l[1] || l[2] || l[3] || l[4] || l[5] || l[6], !c)
          continue;
        if (h = [...c].length, l[3] || l[4]) {
          p += h;
          continue;
        } else if ((l[5] || l[6]) && u % 3 && !((u + h) % 3)) {
          _ += h;
          continue;
        }
        if (p -= h, p > 0)
          continue;
        h = Math.min(h, h + p + _);
        const k = [...l[0]][0].length, E = e.slice(0, u + l.index + k + h);
        if (Math.min(u, h) % 2) {
          const H = E.slice(1, -1);
          return {
            type: "em",
            raw: E,
            text: H,
            tokens: this.lexer.inlineTokens(H)
          };
        }
        const z = E.slice(2, -2);
        return {
          type: "strong",
          raw: E,
          text: z,
          tokens: this.lexer.inlineTokens(z)
        };
      }
    }
  }
  codespan(e) {
    const n = this.rules.inline.code.exec(e);
    if (n) {
      let r = n[2].replace(/\n/g, " ");
      const l = /[^ ]/.test(r), o = /^ /.test(r) && / $/.test(r);
      return l && o && (r = r.substring(1, r.length - 1)), r = bn(r, !0), {
        type: "codespan",
        raw: n[0],
        text: r
      };
    }
  }
  br(e) {
    const n = this.rules.inline.br.exec(e);
    if (n)
      return {
        type: "br",
        raw: n[0]
      };
  }
  del(e) {
    const n = this.rules.inline.del.exec(e);
    if (n)
      return {
        type: "del",
        raw: n[0],
        text: n[2],
        tokens: this.lexer.inlineTokens(n[2])
      };
  }
  autolink(e) {
    const n = this.rules.inline.autolink.exec(e);
    if (n) {
      let r, l;
      return n[2] === "@" ? (r = bn(n[1]), l = "mailto:" + r) : (r = bn(n[1]), l = r), {
        type: "link",
        raw: n[0],
        text: r,
        href: l,
        tokens: [
          {
            type: "text",
            raw: r,
            text: r
          }
        ]
      };
    }
  }
  url(e) {
    var r;
    let n;
    if (n = this.rules.inline.url.exec(e)) {
      let l, o;
      if (n[2] === "@")
        l = bn(n[0]), o = "mailto:" + l;
      else {
        let u;
        do
          u = n[0], n[0] = ((r = this.rules.inline._backpedal.exec(n[0])) == null ? void 0 : r[0]) ?? "";
        while (u !== n[0]);
        l = bn(n[0]), n[1] === "www." ? o = "http://" + n[0] : o = n[0];
      }
      return {
        type: "link",
        raw: n[0],
        text: l,
        href: o,
        tokens: [
          {
            type: "text",
            raw: l,
            text: l
          }
        ]
      };
    }
  }
  inlineText(e) {
    const n = this.rules.inline.text.exec(e);
    if (n) {
      let r;
      return this.lexer.state.inRawBlock ? r = n[0] : r = bn(n[0]), {
        type: "text",
        raw: n[0],
        text: r
      };
    }
  }
}
const Xp = /^(?: *(?:\n|$))+/, Yp = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, Zp = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ys = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Jp = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Th = /(?:[*+-]|\d{1,9}[.)])/, Fh = ft(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Th).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(), Qa = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Qp = /^[^\n]+/, Ka = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Kp = ft(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Ka).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $p = ft(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Th).getRegex(), Ji = "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", $a = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, e5 = ft("^ {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", $a).replace("tag", Ji).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ch = ft(Qa).replace("hr", ys).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", Ji).getRegex(), t5 = ft(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ch).getRegex(), eo = {
  blockquote: t5,
  code: Yp,
  def: Kp,
  fences: Zp,
  heading: Jp,
  hr: ys,
  html: e5,
  lheading: Fh,
  list: $p,
  newline: Xp,
  paragraph: Ch,
  table: Qr,
  text: Qp
}, xc = ft("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ys).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", Ji).getRegex(), n5 = {
  ...eo,
  table: xc,
  paragraph: ft(Qa).replace("hr", ys).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", xc).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", Ji).getRegex()
}, r5 = {
  ...eo,
  html: ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", $a).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: Qr,
  // fences not supported
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
  paragraph: ft(Qa).replace("hr", ys).replace("heading", ` *#{1,6} *[^
]`).replace("lheading", Fh).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
}, Mh = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, s5 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Bh = /^( {2,}|\\)\n(?!\s*$)/, i5 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, vs = "\\p{P}\\p{S}", l5 = ft(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, vs).getRegex(), a5 = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, o5 = ft(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, vs).getRegex(), u5 = ft("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, vs).getRegex(), c5 = ft("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, vs).getRegex(), f5 = ft(/\\([punct])/, "gu").replace(/punct/g, vs).getRegex(), h5 = ft(/^<(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(), d5 = ft($a).replace("(?:-->|$)", "-->").getRegex(), m5 = ft("^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", d5).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ti = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, p5 = ft(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Ti).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Nh = ft(/^!?\[(label)\]\[(ref)\]/).replace("label", Ti).replace("ref", Ka).getRegex(), zh = ft(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ka).getRegex(), g5 = ft("reflink|nolink(?!\\()", "g").replace("reflink", Nh).replace("nolink", zh).getRegex(), to = {
  _backpedal: Qr,
  // only used for GFM url
  anyPunctuation: f5,
  autolink: h5,
  blockSkip: a5,
  br: Bh,
  code: s5,
  del: Qr,
  emStrongLDelim: o5,
  emStrongRDelimAst: u5,
  emStrongRDelimUnd: c5,
  escape: Mh,
  link: p5,
  nolink: zh,
  punctuation: l5,
  reflink: Nh,
  reflinkSearch: g5,
  tag: m5,
  text: i5,
  url: Qr
}, _5 = {
  ...to,
  link: ft(/^!?\[(label)\]\((.*?)\)/).replace("label", Ti).getRegex(),
  reflink: ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ti).getRegex()
}, Aa = {
  ...to,
  escape: ft(Mh).replace("])", "~|])").getRegex(),
  url: ft(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/
}, b5 = {
  ...Aa,
  br: ft(Bh).replace("{2,}", "*").getRegex(),
  text: ft(Aa.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
}, Ws = {
  normal: eo,
  gfm: n5,
  pedantic: r5
}, Gr = {
  normal: to,
  gfm: Aa,
  breaks: b5,
  pedantic: _5
};
class Qn {
  constructor(e) {
    yt(this, "tokens");
    yt(this, "options");
    yt(this, "state");
    yt(this, "tokenizer");
    yt(this, "inlineQueue");
    this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || $0, this.options.tokenizer = this.options.tokenizer || new xi(), 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 n = {
      block: Ws.normal,
      inline: Gr.normal
    };
    this.options.pedantic ? (n.block = Ws.pedantic, n.inline = Gr.pedantic) : this.options.gfm && (n.block = Ws.gfm, this.options.breaks ? n.inline = Gr.breaks : n.inline = Gr.gfm), this.tokenizer.rules = n;
  }
  /**
   * Expose Rules
   */
  static get rules() {
    return {
      block: Ws,
      inline: Gr
    };
  }
  /**
   * Static Lex Method
   */
  static lex(e, n) {
    return new Qn(n).lex(e);
  }
  /**
   * Static Lex Inline Method
   */
  static lexInline(e, n) {
    return new Qn(n).inlineTokens(e);
  }
  /**
   * Preprocessing
   */
  lex(e) {
    e = e.replace(/\r\n|\r/g, `
`), this.blockTokens(e, this.tokens);
    for (let n = 0; n < this.inlineQueue.length; n++) {
      const r = this.inlineQueue[n];
      this.inlineTokens(r.src, r.tokens);
    }
    return this.inlineQueue = [], this.tokens;
  }
  blockTokens(e, n = []) {
    this.options.pedantic ? e = e.replace(/\t/g, "    ").replace(/^ +$/gm, "") : e = e.replace(/^( *)(\t+)/gm, (c, h, p) => h + "    ".repeat(p.length));
    let r, l, o, u;
    for (; e; )
      if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((c) => (r = c.call({ lexer: this }, e, n)) ? (e = e.substring(r.raw.length), n.push(r), !0) : !1))) {
        if (r = this.tokenizer.space(e)) {
          e = e.substring(r.raw.length), r.raw.length === 1 && n.length > 0 ? n[n.length - 1].raw += `
` : n.push(r);
          continue;
        }
        if (r = this.tokenizer.code(e)) {
          e = e.substring(r.raw.length), l = n[n.length - 1], l && (l.type === "paragraph" || l.type === "text") ? (l.raw += `
` + r.raw, l.text += `
` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = l.text) : n.push(r);
          continue;
        }
        if (r = this.tokenizer.fences(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.heading(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.hr(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.blockquote(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.list(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.html(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.def(e)) {
          e = e.substring(r.raw.length), l = n[n.length - 1], l && (l.type === "paragraph" || l.type === "text") ? (l.raw += `
` + r.raw, l.text += `
` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = l.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), n.push(r);
          continue;
        }
        if (r = this.tokenizer.lheading(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (o = e, this.options.extensions && this.options.extensions.startBlock) {
          let c = 1 / 0;
          const h = e.slice(1);
          let p;
          this.options.extensions.startBlock.forEach((_) => {
            p = _.call({ lexer: this }, h), typeof p == "number" && p >= 0 && (c = Math.min(c, p));
          }), c < 1 / 0 && c >= 0 && (o = e.substring(0, c + 1));
        }
        if (this.state.top && (r = this.tokenizer.paragraph(o))) {
          l = n[n.length - 1], u && l.type === "paragraph" ? (l.raw += `
` + r.raw, l.text += `
` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = l.text) : n.push(r), u = o.length !== e.length, e = e.substring(r.raw.length);
          continue;
        }
        if (r = this.tokenizer.text(e)) {
          e = e.substring(r.raw.length), l = n[n.length - 1], l && l.type === "text" ? (l.raw += `
` + r.raw, l.text += `
` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = l.text) : n.push(r);
          continue;
        }
        if (e) {
          const c = "Infinite loop on byte: " + e.charCodeAt(0);
          if (this.options.silent) {
            console.error(c);
            break;
          } else
            throw new Error(c);
        }
      }
    return this.state.top = !0, n;
  }
  inline(e, n = []) {
    return this.inlineQueue.push({ src: e, tokens: n }), n;
  }
  /**
   * Lexing/Compiling
   */
  inlineTokens(e, n = []) {
    let r, l, o, u = e, c, h, p;
    if (this.tokens.links) {
      const _ = Object.keys(this.tokens.links);
      if (_.length > 0)
        for (; (c = this.tokenizer.rules.inline.reflinkSearch.exec(u)) != null; )
          _.includes(c[0].slice(c[0].lastIndexOf("[") + 1, -1)) && (u = u.slice(0, c.index) + "[" + "a".repeat(c[0].length - 2) + "]" + u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
    }
    for (; (c = this.tokenizer.rules.inline.blockSkip.exec(u)) != null; )
      u = u.slice(0, c.index) + "[" + "a".repeat(c[0].length - 2) + "]" + u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
    for (; (c = this.tokenizer.rules.inline.anyPunctuation.exec(u)) != null; )
      u = u.slice(0, c.index) + "++" + u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
    for (; e; )
      if (h || (p = ""), h = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((_) => (r = _.call({ lexer: this }, e, n)) ? (e = e.substring(r.raw.length), n.push(r), !0) : !1))) {
        if (r = this.tokenizer.escape(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.tag(e)) {
          e = e.substring(r.raw.length), l = n[n.length - 1], l && r.type === "text" && l.type === "text" ? (l.raw += r.raw, l.text += r.text) : n.push(r);
          continue;
        }
        if (r = this.tokenizer.link(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.reflink(e, this.tokens.links)) {
          e = e.substring(r.raw.length), l = n[n.length - 1], l && r.type === "text" && l.type === "text" ? (l.raw += r.raw, l.text += r.text) : n.push(r);
          continue;
        }
        if (r = this.tokenizer.emStrong(e, u, p)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.codespan(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.br(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.del(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (r = this.tokenizer.autolink(e)) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (!this.state.inLink && (r = this.tokenizer.url(e))) {
          e = e.substring(r.raw.length), n.push(r);
          continue;
        }
        if (o = e, this.options.extensions && this.options.extensions.startInline) {
          let _ = 1 / 0;
          const v = e.slice(1);
          let k;
          this.options.extensions.startInline.forEach((E) => {
            k = E.call({ lexer: this }, v), typeof k == "number" && k >= 0 && (_ = Math.min(_, k));
          }), _ < 1 / 0 && _ >= 0 && (o = e.substring(0, _ + 1));
        }
        if (r = this.tokenizer.inlineText(o)) {
          e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (p = r.raw.slice(-1)), h = !0, l = n[n.length - 1], l && l.type === "text" ? (l.raw += r.raw, l.text += r.text) : n.push(r);
          continue;
        }
        if (e) {
          const _ = "Infinite loop on byte: " + e.charCodeAt(0);
          if (this.options.silent) {
            console.error(_);
            break;
          } else
            throw new Error(_);
        }
      }
    return n;
  }
}
class Fi {
  constructor(e) {
    yt(this, "options");
    this.options = e || $0;
  }
  code(e, n, r) {
    var o;
    const l = (o = (n || "").match(/^\S*/)) == null ? void 0 : o[0];
    return e = e.replace(/\n$/, "") + `
`, l ? '<pre><code class="language-' + bn(l) + '">' + (r ? e : bn(e, !0)) + `</code></pre>
` : "<pre><code>" + (r ? e : bn(e, !0)) + `</code></pre>
`;
  }
  blockquote(e) {
    return `<blockquote>
${e}</blockquote>
`;
  }
  html(e, n) {
    return e;
  }
  heading(e, n, r) {
    return `<h${n}>${e}</h${n}>
`;
  }
  hr() {
    return `<hr>
`;
  }
  list(e, n, r) {
    const l = n ? "ol" : "ul", o = n && r !== 1 ? ' start="' + r + '"' : "";
    return "<" + l + o + `>
` + e + "</" + l + `>
`;
  }
  listitem(e, n, r) {
    return `<li>${e}</li>
`;
  }
  checkbox(e) {
    return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
  }
  paragraph(e) {
    return `<p>${e}</p>
`;
  }
  table(e, n) {
    return n && (n = `<tbody>${n}</tbody>`), `<table>
<thead>
` + e + `</thead>
` + n + `</table>
`;
  }
  tablerow(e) {
    return `<tr>
${e}</tr>
`;
  }
  tablecell(e, n) {
    const r = n.header ? "th" : "td";
    return (n.align ? `<${r} align="${n.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, n, r) {
    const l = Ac(e);
    if (l === null)
      return r;
    e = l;
    let o = '<a href="' + e + '"';
    return n && (o += ' title="' + n + '"'), o += ">" + r + "</a>", o;
  }
  image(e, n, r) {
    const l = Ac(e);
    if (l === null)
      return r;
    e = l;
    let o = `<img src="${e}" alt="${r}"`;
    return n && (o += ` title="${n}"`), o += ">", o;
  }
  text(e) {
    return e;
  }
}
class no {
  // 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, n, r) {
    return "" + r;
  }
  image(e, n, r) {
    return "" + r;
  }
  br() {
    return "";
  }
}
class Kn {
  constructor(e) {
    yt(this, "options");
    yt(this, "renderer");
    yt(this, "textRenderer");
    this.options = e || $0, this.options.renderer = this.options.renderer || new Fi(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new no();
  }
  /**
   * Static Parse Method
   */
  static parse(e, n) {
    return new Kn(n).parse(e);
  }
  /**
   * Static Parse Inline Method
   */
  static parseInline(e, n) {
    return new Kn(n).parseInline(e);
  }
  /**
   * Parse Loop
   */
  parse(e, n = !0) {
    let r = "";
    for (let l = 0; l < e.length; l++) {
      const o = e[l];
      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type]) {
        const u = o, c = this.options.extensions.renderers[u.type].call({ parser: this }, u);
        if (c !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(u.type)) {
          r += c || "";
          continue;
        }
      }
      switch (o.type) {
        case "space":
          continue;
        case "hr": {
          r += this.renderer.hr();
          continue;
        }
        case "heading": {
          const u = o;
          r += this.renderer.heading(this.parseInline(u.tokens), u.depth, Gp(this.parseInline(u.tokens, this.textRenderer)));
          continue;
        }
        case "code": {
          const u = o;
          r += this.renderer.code(u.text, u.lang, !!u.escaped);
          continue;
        }
        case "table": {
          const u = o;
          let c = "", h = "";
          for (let _ = 0; _ < u.header.length; _++)
            h += this.renderer.tablecell(this.parseInline(u.header[_].tokens), { header: !0, align: u.align[_] });
          c += this.renderer.tablerow(h);
          let p = "";
          for (let _ = 0; _ < u.rows.length; _++) {
            const v = u.rows[_];
            h = "";
            for (let k = 0; k < v.length; k++)
              h += this.renderer.tablecell(this.parseInline(v[k].tokens), { header: !1, align: u.align[k] });
            p += this.renderer.tablerow(h);
          }
          r += this.renderer.table(c, p);
          continue;
        }
        case "blockquote": {
          const u = o, c = this.parse(u.tokens);
          r += this.renderer.blockquote(c);
          continue;
        }
        case "list": {
          const u = o, c = u.ordered, h = u.start, p = u.loose;
          let _ = "";
          for (let v = 0; v < u.items.length; v++) {
            const k = u.items[v], E = k.checked, z = k.task;
            let H = "";
            if (k.task) {
              const U = this.renderer.checkbox(!!E);
              p ? k.tokens.length > 0 && k.tokens[0].type === "paragraph" ? (k.tokens[0].text = U + " " + k.tokens[0].text, k.tokens[0].tokens && k.tokens[0].tokens.length > 0 && k.tokens[0].tokens[0].type === "text" && (k.tokens[0].tokens[0].text = U + " " + k.tokens[0].tokens[0].text)) : k.tokens.unshift({
                type: "text",
                text: U + " "
              }) : H += U + " ";
            }
            H += this.parse(k.tokens, p), _ += this.renderer.listitem(H, z, !!E);
          }
          r += this.renderer.list(_, c, h);
          continue;
        }
        case "html": {
          const u = o;
          r += this.renderer.html(u.text, u.block);
          continue;
        }
        case "paragraph": {
          const u = o;
          r += this.renderer.paragraph(this.parseInline(u.tokens));
          continue;
        }
        case "text": {
          let u = o, c = u.tokens ? this.parseInline(u.tokens) : u.text;
          for (; l + 1 < e.length && e[l + 1].type === "text"; )
            u = e[++l], c += `
` + (u.tokens ? this.parseInline(u.tokens) : u.text);
          r += n ? this.renderer.paragraph(c) : c;
          continue;
        }
        default: {
          const u = 'Token with "' + o.type + '" type was not found.';
          if (this.options.silent)
            return console.error(u), "";
          throw new Error(u);
        }
      }
    }
    return r;
  }
  /**
   * Parse Inline Tokens
   */
  parseInline(e, n) {
    n = n || this.renderer;
    let r = "";
    for (let l = 0; l < e.length; l++) {
      const o = e[l];
      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[o.type]) {
        const u = this.options.extensions.renderers[o.type].call({ parser: this }, o);
        if (u !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(o.type)) {
          r += u || "";
          continue;
        }
      }
      switch (o.type) {
        case "escape": {
          const u = o;
          r += n.text(u.text);
          break;
        }
        case "html": {
          const u = o;
          r += n.html(u.text);
          break;
        }
        case "link": {
          const u = o;
          r += n.link(u.href, u.title, this.parseInline(u.tokens, n));
          break;
        }
        case "image": {
          const u = o;
          r += n.image(u.href, u.title, u.text);
          break;
        }
        case "strong": {
          const u = o;
          r += n.strong(this.parseInline(u.tokens, n));
          break;
        }
        case "em": {
          const u = o;
          r += n.em(this.parseInline(u.tokens, n));
          break;
        }
        case "codespan": {
          const u = o;
          r += n.codespan(u.text);
          break;
        }
        case "br": {
          r += n.br();
          break;
        }
        case "del": {
          const u = o;
          r += n.del(this.parseInline(u.tokens, n));
          break;
        }
        case "text": {
          const u = o;
          r += n.text(u.text);
          break;
        }
        default: {
          const u = 'Token with "' + o.type + '" type was not found.';
          if (this.options.silent)
            return console.error(u), "";
          throw new Error(u);
        }
      }
    }
    return r;
  }
}
class Kr {
  constructor(e) {
    yt(this, "options");
    this.options = e || $0;
  }
  /**
   * 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;
  }
}
yt(Kr, "passThroughHooks", /* @__PURE__ */ new Set([
  "preprocess",
  "postprocess",
  "processAllTokens"
]));
var ds, Sa, Ui, Oh;
class Rh {
  constructor(...e) {
    Bl(this, ds);
    Bl(this, Ui);
    yt(this, "defaults", Ja());
    yt(this, "options", this.setOptions);
    yt(this, "parse", Ps(this, ds, Sa).call(this, Qn.lex, Kn.parse));
    yt(this, "parseInline", Ps(this, ds, Sa).call(this, Qn.lexInline, Kn.parseInline));
    yt(this, "Parser", Kn);
    yt(this, "Renderer", Fi);
    yt(this, "TextRenderer", no);
    yt(this, "Lexer", Qn);
    yt(this, "Tokenizer", xi);
    yt(this, "Hooks", Kr);
    this.use(...e);
  }
  /**
   * Run callback for every token
   */
  walkTokens(e, n) {
    var l, o;
    let r = [];
    for (const u of e)
      switch (r = r.concat(n.call(this, u)), u.type) {
        case "table": {
          const c = u;
          for (const h of c.header)
            r = r.concat(this.walkTokens(h.tokens, n));
          for (const h of c.rows)
            for (const p of h)
              r = r.concat(this.walkTokens(p.tokens, n));
          break;
        }
        case "list": {
          const c = u;
          r = r.concat(this.walkTokens(c.items, n));
          break;
        }
        default: {
          const c = u;
          (o = (l = this.defaults.extensions) == null ? void 0 : l.childTokens) != null && o[c.type] ? this.defaults.extensions.childTokens[c.type].forEach((h) => {
            const p = c[h].flat(1 / 0);
            r = r.concat(this.walkTokens(p, n));
          }) : c.tokens && (r = r.concat(this.walkTokens(c.tokens, n)));
        }
      }
    return r;
  }
  use(...e) {
    const n = this.defaults.extensions || { renderers: {}, childTokens: {} };
    return e.forEach((r) => {
      const l = { ...r };
      if (l.async = this.defaults.async || l.async || !1, r.extensions && (r.extensions.forEach((o) => {
        if (!o.name)
          throw new Error("extension name required");
        if ("renderer" in o) {
          const u = n.renderers[o.name];
          u ? n.renderers[o.name] = function(...c) {
            let h = o.renderer.apply(this, c);
            return h === !1 && (h = u.apply(this, c)), h;
          } : n.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 u = n[o.level];
          u ? u.unshift(o.tokenizer) : n[o.level] = [o.tokenizer], o.start && (o.level === "block" ? n.startBlock ? n.startBlock.push(o.start) : n.startBlock = [o.start] : o.level === "inline" && (n.startInline ? n.startInline.push(o.start) : n.startInline = [o.start]));
        }
        "childTokens" in o && o.childTokens && (n.childTokens[o.name] = o.childTokens);
      }), l.extensions = n), r.renderer) {
        const o = this.defaults.renderer || new Fi(this.defaults);
        for (const u in r.renderer) {
          if (!(u in o))
            throw new Error(`renderer '${u}' does not exist`);
          if (u === "options")
            continue;
          const c = u, h = r.renderer[c], p = o[c];
          o[c] = (..._) => {
            let v = h.apply(o, _);
            return v === !1 && (v = p.apply(o, _)), v || "";
          };
        }
        l.renderer = o;
      }
      if (r.tokenizer) {
        const o = this.defaults.tokenizer || new xi(this.defaults);
        for (const u in r.tokenizer) {
          if (!(u in o))
            throw new Error(`tokenizer '${u}' does not exist`);
          if (["options", "rules", "lexer"].includes(u))
            continue;
          const c = u, h = r.tokenizer[c], p = o[c];
          o[c] = (..._) => {
            let v = h.apply(o, _);
            return v === !1 && (v = p.apply(o, _)), v;
          };
        }
        l.tokenizer = o;
      }
      if (r.hooks) {
        const o = this.defaults.hooks || new Kr();
        for (const u in r.hooks) {
          if (!(u in o))
            throw new Error(`hook '${u}' does not exist`);
          if (u === "options")
            continue;
          const c = u, h = r.hooks[c], p = o[c];
          Kr.passThroughHooks.has(u) ? o[c] = (_) => {
            if (this.defaults.async)
              return Promise.resolve(h.call(o, _)).then((k) => p.call(o, k));
            const v = h.call(o, _);
            return p.call(o, v);
          } : o[c] = (..._) => {
            let v = h.apply(o, _);
            return v === !1 && (v = p.apply(o, _)), v;
          };
        }
        l.hooks = o;
      }
      if (r.walkTokens) {
        const o = this.defaults.walkTokens, u = r.walkTokens;
        l.walkTokens = function(c) {
          let h = [];
          return h.push(u.call(this, c)), o && (h = h.concat(o.call(this, c))), h;
        };
      }
      this.defaults = { ...this.defaults, ...l };
    }), this;
  }
  setOptions(e) {
    return this.defaults = { ...this.defaults, ...e }, this;
  }
  lexer(e, n) {
    return Qn.lex(e, n ?? this.defaults);
  }
  parser(e, n) {
    return Kn.parse(e, n ?? this.defaults);
  }
}
ds = new WeakSet(), Sa = function(e, n) {
  return (r, l) => {
    const o = { ...l }, u = { ...this.defaults, ...o };
    this.defaults.async === !0 && o.async === !1 && (u.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), u.async = !0);
    const c = Ps(this, Ui, Oh).call(this, !!u.silent, !!u.async);
    if (typeof r > "u" || r === null)
      return c(new Error("marked(): input parameter is undefined or null"));
    if (typeof r != "string")
      return c(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(r) + ", string expected"));
    if (u.hooks && (u.hooks.options = u), u.async)
      return Promise.resolve(u.hooks ? u.hooks.preprocess(r) : r).then((h) => e(h, u)).then((h) => u.hooks ? u.hooks.processAllTokens(h) : h).then((h) => u.walkTokens ? Promise.all(this.walkTokens(h, u.walkTokens)).then(() => h) : h).then((h) => n(h, u)).then((h) => u.hooks ? u.hooks.postprocess(h) : h).catch(c);
    try {
      u.hooks && (r = u.hooks.preprocess(r));
      let h = e(r, u);
      u.hooks && (h = u.hooks.processAllTokens(h)), u.walkTokens && this.walkTokens(h, u.walkTokens);
      let p = n(h, u);
      return u.hooks && (p = u.hooks.postprocess(p)), p;
    } catch (h) {
      return c(h);
    }
  };
}, Ui = new WeakSet(), Oh = function(e, n) {
  return (r) => {
    if (r.message += `
Please report this to https://github.com/markedjs/marked.`, e) {
      const l = "<p>An error occurred:</p><pre>" + bn(r.message + "", !0) + "</pre>";
      return n ? Promise.resolve(l) : l;
    }
    if (n)
      return Promise.reject(r);
    throw r;
  };
};
const Q0 = new Rh();
function ct(t, e) {
  return Q0.parse(t, e);
}
ct.options = ct.setOptions = function(t) {
  return Q0.setOptions(t), ct.defaults = Q0.defaults, Sh(ct.defaults), ct;
};
ct.getDefaults = Ja;
ct.defaults = $0;
ct.use = function(...t) {
  return Q0.use(...t), ct.defaults = Q0.defaults, Sh(ct.defaults), ct;
};
ct.walkTokens = function(t, e) {
  return Q0.walkTokens(t, e);
};
ct.parseInline = Q0.parseInline;
ct.Parser = Kn;
ct.parser = Kn.parse;
ct.Renderer = Fi;
ct.TextRenderer = no;
ct.Lexer = Qn;
ct.lexer = Qn.lex;
ct.Tokenizer = xi;
ct.Hooks = Kr;
ct.parse = ct;
ct.options;
ct.setOptions;
ct.use;
ct.walkTokens;
ct.parseInline;
Kn.parse;
Qn.lex;
function w5(t) {
  if (typeof t == "function" && (t = {
    highlight: t
  }), !t || typeof t.highlight != "function")
    throw new Error("Must provide highlight function");
  return typeof t.langPrefix != "string" && (t.langPrefix = "language-"), {
    async: !!t.async,
    walkTokens(e) {
      if (e.type !== "code")
        return;
      const n = Tc(e.lang);
      if (t.async)
        return Promise.resolve(t.highlight(e.text, n, e.lang || "")).then(Fc(e));
      const r = t.highlight(e.text, n, 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.");
      Fc(e)(r);
    },
    renderer: {
      code(e, n, r) {
        const l = Tc(n), o = l ? ` class="${t.langPrefix}${Mc(l)}"` : "";
        return e = e.replace(/\n$/, ""), `<pre><code${o}>${r ? e : Mc(e, !0)}
</code></pre>`;
      }
    }
  };
}
function Tc(t) {
  return (t || "").match(/\S*/)[0];
}
function Fc(t) {
  return (e) => {
    typeof e == "string" && e !== t.text && (t.escaped = !0, t.text = e);
  };
}
const Ih = /[&<>"']/, y5 = new RegExp(Ih.source, "g"), Lh = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, v5 = new RegExp(Lh.source, "g"), k5 = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, Cc = (t) => k5[t];
function Mc(t, e) {
  if (e) {
    if (Ih.test(t))
      return t.replace(y5, Cc);
  } else if (Lh.test(t))
    return t.replace(v5, Cc);
  return t;
}
const D5 = /[\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, A5 = Object.hasOwnProperty;
class Hh {
  /**
   * 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, n) {
    const r = this;
    let l = S5(e, n === !0);
    const o = l;
    for (; A5.call(r.occurrences, l); )
      r.occurrences[o]++, l = o + "-" + r.occurrences[o];
    return r.occurrences[l] = 0, l;
  }
  /**
   * Reset - Forget all previous slugs
   *
   * @return void
   */
  reset() {
    this.occurrences = /* @__PURE__ */ Object.create(null);
  }
}
function S5(t, e) {
  return typeof t != "string" ? "" : (e || (t = t.toLowerCase()), t.replace(D5, "").replace(/ /g, "-"));
}
let Bc, Nc = [];
function E5({ prefix: t = "" } = {}) {
  return {
    headerIds: !1,
    // prevent deprecation warning; remove this once headerIds option is removed
    hooks: {
      preprocess(e) {
        return Nc = [], Bc = new Hh(), e;
      }
    },
    renderer: {
      heading(e, n, r) {
        r = r.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, "");
        const l = `${t}${Bc.slug(r)}`, o = { level: n, text: e, id: l };
        return Nc.push(o), `<h${n} id="${l}">${e}</h${n}>
`;
      }
    }
  };
}
var Ph = { exports: {} };
(function(t) {
  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 n = function(r) {
    var l = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, o = 0, u = {}, c = {
      /**
       * 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 M(A) {
          return A instanceof h ? new h(A.type, M(A.content), A.alias) : Array.isArray(A) ? A.map(M) : A.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(M) {
          return Object.prototype.toString.call(M).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(M) {
          return M.__id || Object.defineProperty(M, "__id", { value: ++o }), M.__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 M(A, x) {
          x = x || {};
          var C, O;
          switch (c.util.type(A)) {
            case "Object":
              if (O = c.util.objId(A), x[O])
                return x[O];
              C = /** @type {Record<string, any>} */
              {}, x[O] = C;
              for (var q in A)
                A.hasOwnProperty(q) && (C[q] = M(A[q], x));
              return (
                /** @type {any} */
                C
              );
            case "Array":
              return O = c.util.objId(A), x[O] ? x[O] : (C = [], x[O] = C, /** @type {Array} */
              /** @type {any} */
              A.forEach(function(R, J) {
                C[J] = M(R, x);
              }), /** @type {any} */
              C);
            default:
              return A;
          }
        },
        /**
         * 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(M) {
          for (; M; ) {
            var A = l.exec(M.className);
            if (A)
              return A[1].toLowerCase();
            M = M.parentElement;
          }
          return "none";
        },
        /**
         * Sets the Prism `language-xxxx` class of the given element.
         *
         * @param {Element} element
         * @param {string} language
         * @returns {void}
         */
        setLanguage: function(M, A) {
          M.className = M.className.replace(RegExp(l, "gi"), ""), M.classList.add("language-" + A);
        },
        /**
         * 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 && 1 < 2)
            return (
              /** @type {any} */
              document.currentScript
            );
          try {
            throw new Error();
          } catch (C) {
            var M = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(C.stack) || [])[1];
            if (M) {
              var A = document.getElementsByTagName("script");
              for (var x in A)
                if (A[x].src == M)
                  return A[x];
            }
            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(M, A, x) {
          for (var C = "no-" + A; M; ) {
            var O = M.classList;
            if (O.contains(A))
              return !0;
            if (O.contains(C))
              return !1;
            M = M.parentElement;
          }
          return !!x;
        }
      },
      /**
       * 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: u,
        plaintext: u,
        text: u,
        txt: u,
        /**
         * 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(M, A) {
          var x = c.util.clone(c.languages[M]);
          for (var C in A)
            x[C] = A[C];
          return x;
        },
        /**
         * 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(M, A, x, C) {
          C = C || /** @type {any} */
          c.languages;
          var O = C[M], q = {};
          for (var R in O)
            if (O.hasOwnProperty(R)) {
              if (R == A)
                for (var J in x)
                  x.hasOwnProperty(J) && (q[J] = x[J]);
              x.hasOwnProperty(R) || (q[R] = O[R]);
            }
          var ne = C[M];
          return C[M] = q, c.languages.DFS(c.languages, function(ie, te) {
            te === ne && ie != M && (this[ie] = q);
          }), q;
        },
        // Traverse a language definition with Depth First Search
        DFS: function M(A, x, C, O) {
          O = O || {};
          var q = c.util.objId;
          for (var R in A)
            if (A.hasOwnProperty(R)) {
              x.call(A, R, A[R], C || R);
              var J = A[R], ne = c.util.type(J);
              ne === "Object" && !O[q(J)] ? (O[q(J)] = !0, M(J, x, null, O)) : ne === "Array" && !O[q(J)] && (O[q(J)] = !0, M(J, x, R, O));
            }
        }
      },
      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(M, A) {
        c.highlightAllUnder(document, M, A);
      },
      /**
       * 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(M, A, x) {
        var C = {
          callback: x,
          container: M,
          selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
        };
        c.hooks.run("before-highlightall", C), C.elements = Array.prototype.slice.apply(C.container.querySelectorAll(C.selector)), c.hooks.run("before-all-elements-highlight", C);
        for (var O = 0, q; q = C.elements[O++]; )
          c.highlightElement(q, A === !0, C.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(M, A, x) {
        var C = c.util.getLanguage(M), O = c.languages[C];
        c.util.setLanguage(M, C);
        var q = M.parentElement;
        q && q.nodeName.toLowerCase() === "pre" && c.util.setLanguage(q, C);
        var R = M.textContent, J = {
          element: M,
          language: C,
          grammar: O,
          code: R
        };
        function ne(te) {
          J.highlightedCode = te, c.hooks.run("before-insert", J), J.element.innerHTML = J.highlightedCode, c.hooks.run("after-highlight", J), c.hooks.run("complete", J), x && x.call(J.element);
        }
        if (c.hooks.run("before-sanity-check", J), q = J.element.parentElement, q && q.nodeName.toLowerCase() === "pre" && !q.hasAttribute("tabindex") && q.setAttribute("tabindex", "0"), !J.code) {
          c.hooks.run("complete", J), x && x.call(J.element);
          return;
        }
        if (c.hooks.run("before-highlight", J), !J.grammar) {
          ne(c.util.encode(J.code));
          return;
        }
        if (A && r.Worker) {
          var ie = new Worker(c.filename);
          ie.onmessage = function(te) {
            ne(te.data);
          }, ie.postMessage(JSON.stringify({
            language: J.language,
            code: J.code,
            immediateClose: !0
          }));
        } else
          ne(c.highlight(J.code, J.grammar, J.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(M, A, x) {
        var C = {
          code: M,
          grammar: A,
          language: x
        };
        if (c.hooks.run("before-tokenize", C), !C.grammar)
          throw new Error('The language "' + C.language + '" has no grammar.');
        return C.tokens = c.tokenize(C.code, C.grammar), c.hooks.run("after-tokenize", C), h.stringify(c.util.encode(C.tokens), C.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(M, A) {
        var x = A.rest;
        if (x) {
          for (var C in x)
            A[C] = x[C];
          delete A.rest;
        }
        var O = new v();
        return k(O, O.head, M), _(M, O, A, O.head, 0), z(O);
      },
      /**
       * @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(M, A) {
          var x = c.hooks.all;
          x[M] = x[M] || [], x[M].push(A);
        },
        /**
         * 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(M, A) {
          var x = c.hooks.all[M];
          if (!(!x || !x.length))
            for (var C = 0, O; O = x[C++]; )
              O(A);
        }
      },
      Token: h
    };
    r.Prism = c;
    function h(M, A, x, C) {
      this.type = M, this.content = A, this.alias = x, this.length = (C || "").length | 0;
    }
    h.stringify = function M(A, x) {
      if (typeof A == "string")
        return A;
      if (Array.isArray(A)) {
        var C = "";
        return A.forEach(function(ne) {
          C += M(ne, x);
        }), C;
      }
      var O = {
        type: A.type,
        content: M(A.content, x),
        tag: "span",
        classes: ["token", A.type],
        attributes: {},
        language: x
      }, q = A.alias;
      q && (Array.isArray(q) ? Array.prototype.push.apply(O.classes, q) : O.classes.push(q)), c.hooks.run("wrap", O);
      var R = "";
      for (var J in O.attributes)
        R += " " + J + '="' + (O.attributes[J] || "").replace(/"/g, "&quot;") + '"';
      return "<" + O.tag + ' class="' + O.classes.join(" ") + '"' + R + ">" + O.content + "</" + O.tag + ">";
    };
    function p(M, A, x, C) {
      M.lastIndex = A;
      var O = M.exec(x);
      if (O && C && O[1]) {
        var q = O[1].length;
        O.index += q, O[0] = O[0].slice(q);
      }
      return O;
    }
    function _(M, A, x, C, O, q) {
      for (var R in x)
        if (!(!x.hasOwnProperty(R) || !x[R])) {
          var J = x[R];
          J = Array.isArray(J) ? J : [J];
          for (var ne = 0; ne < J.length; ++ne) {
            if (q && q.cause == R + "," + ne)
              return;
            var ie = J[ne], te = ie.inside, Se = !!ie.lookbehind, Ce = !!ie.greedy, De = ie.alias;
            if (Ce && !ie.pattern.global) {
              var ce = ie.pattern.toString().match(/[imsuy]*$/)[0];
              ie.pattern = RegExp(ie.pattern.source, ce + "g");
            }
            for (var he = ie.pattern || ie, se = C.next, Ne = O; se !== A.tail && !(q && Ne >= q.reach); Ne += se.value.length, se = se.next) {
              var de = se.value;
              if (A.length > M.length)
                return;
              if (!(de instanceof h)) {
                var Q = 1, me;
                if (Ce) {
                  if (me = p(he, Ne, M, Se), !me || me.index >= M.length)
                    break;
                  var ye = me.index, V = me.index + me[0].length, $ = Ne;
                  for ($ += se.value.length; ye >= $; )
                    se = se.next, $ += se.value.length;
                  if ($ -= se.value.length, Ne = $, se.value instanceof h)
                    continue;
                  for (var we = se; we !== A.tail && ($ < V || typeof we.value == "string"); we = we.next)
                    Q++, $ += we.value.length;
                  Q--, de = M.slice(Ne, $), me.index -= Ne;
                } else if (me = p(he, 0, de, Se), !me)
                  continue;
                var ye = me.index, K = me[0], Ee = de.slice(0, ye), Ae = de.slice(ye + K.length), Je = Ne + de.length;
                q && Je > q.reach && (q.reach = Je);
                var Ie = se.prev;
                Ee && (Ie = k(A, Ie, Ee), Ne += Ee.length), E(A, Ie, Q);
                var Ve = new h(R, te ? c.tokenize(K, te) : K, De, K);
                if (se = k(A, Ie, Ve), Ae && k(A, se, Ae), Q > 1) {
                  var qe = {
                    cause: R + "," + ne,
                    reach: Je
                  };
                  _(M, A, x, se.prev, Ne, qe), q && qe.reach > q.reach && (q.reach = qe.reach);
                }
              }
            }
          }
        }
    }
    function v() {
      var M = { value: null, prev: null, next: null }, A = { value: null, prev: M, next: null };
      M.next = A, this.head = M, this.tail = A, this.length = 0;
    }
    function k(M, A, x) {
      var C = A.next, O = { value: x, prev: A, next: C };
      return A.next = O, C.prev = O, M.length++, O;
    }
    function E(M, A, x) {
      for (var C = A.next, O = 0; O < x && C !== M.tail; O++)
        C = C.next;
      A.next = C, C.prev = A, M.length -= O;
    }
    function z(M) {
      for (var A = [], x = M.head.next; x !== M.tail; )
        A.push(x.value), x = x.next;
      return A;
    }
    if (!r.document)
      return r.addEventListener && (c.disableWorkerMessageHandler || r.addEventListener("message", function(M) {
        var A = JSON.parse(M.data), x = A.language, C = A.code, O = A.immediateClose;
        r.postMessage(c.highlight(C, c.languages[x], x)), O && r.close();
      }, !1)), c;
    var H = c.util.currentScript();
    H && (c.filename = H.src, H.hasAttribute("data-manual") && (c.manual = !0));
    function U() {
      c.manual || c.highlightAll();
    }
    if (!c.manual) {
      var N = document.readyState;
      N === "loading" || N === "interactive" && H && H.defer ? document.addEventListener("DOMContentLoaded", U) : window.requestAnimationFrame ? window.requestAnimationFrame(U) : window.setTimeout(U, 16);
    }
    return c;
  }(e);
  t.exports && (t.exports = n), typeof yi < "u" && (yi.Prism = n), n.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
    ]
  }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(r) {
    r.type === "entity" && (r.attributes.title = r.content.replace(/&amp;/, "&"));
  }), Object.defineProperty(n.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(l, o) {
      var u = {};
      u["language-" + o] = {
        pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
        lookbehind: !0,
        inside: n.languages[o]
      }, u.cdata = /^<!\[CDATA\[|\]\]>$/i;
      var c = {
        "included-cdata": {
          pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
          inside: u
        }
      };
      c["language-" + o] = {
        pattern: /[\s\S]+/,
        inside: n.languages[o]
      };
      var h = {};
      h[l] = {
        pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
          return l;
        }), "i"),
        lookbehind: !0,
        greedy: !0,
        inside: c
      }, n.languages.insertBefore("markup", "cdata", h);
    }
  }), Object.defineProperty(n.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, l) {
      n.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: [l, "language-" + l],
                inside: n.languages[l]
              },
              punctuation: [
                {
                  pattern: /^=/,
                  alias: "attr-equals"
                },
                /"|'/
              ]
            }
          }
        }
      });
    }
  }), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(r) {
    var l = /(?:"(?:\\(?:\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 + "|" + l.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\\((?:" + l.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
        greedy: !0,
        inside: {
          function: /^url/i,
          punctuation: /^\(|\)$/,
          string: {
            pattern: RegExp("^" + l.source + "$"),
            alias: "url"
          }
        }
      },
      selector: {
        pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + l.source + ")*(?=\\s*\\{)"),
        lookbehind: !0
      },
      string: {
        pattern: l,
        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"));
  }(n), n.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: /[{}[\];(),.:]/
  }, n.languages.javascript = n.languages.extend("clike", {
    "class-name": [
      n.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}|\?\?=?|\?\.?|[~:]/
  }), n.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, n.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: n.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: n.languages.javascript
      },
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
        lookbehind: !0,
        inside: n.languages.javascript
      },
      {
        pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
        lookbehind: !0,
        inside: n.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: n.languages.javascript
      }
    ],
    constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
  }), n.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: n.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"
    }
  }), n.languages.insertBefore("javascript", "operator", {
    "literal-property": {
      pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
      lookbehind: !0,
      alias: "property"
    }
  }), n.languages.markup && (n.languages.markup.tag.addInlined("script", "javascript"), n.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"
  )), n.languages.js = n.languages.javascript, function() {
    if (typeof n > "u" || typeof document > "u")
      return;
    Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
    var r = "Loading…", l = function(H, U) {
      return "✖ Error " + H + " while fetching file: " + U;
    }, o = "✖ Error: File does not exist or is empty", u = {
      js: "javascript",
      py: "python",
      rb: "ruby",
      ps1: "powershell",
      psm1: "powershell",
      sh: "bash",
      bat: "batch",
      h: "c",
      tex: "latex"
    }, c = "data-src-status", h = "loading", p = "loaded", _ = "failed", v = "pre[data-src]:not([" + c + '="' + p + '"]):not([' + c + '="' + h + '"])';
    function k(H, U, N) {
      var M = new XMLHttpRequest();
      M.open("GET", H, !0), M.onreadystatechange = function() {
        M.readyState == 4 && (M.status < 400 && M.responseText ? U(M.responseText) : M.status >= 400 ? N(l(M.status, M.statusText)) : N(o));
      }, M.send(null);
    }
    function E(H) {
      var U = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(H || "");
      if (U) {
        var N = Number(U[1]), M = U[2], A = U[3];
        return M ? A ? [N, Number(A)] : [N, void 0] : [N, N];
      }
    }
    n.hooks.add("before-highlightall", function(H) {
      H.selector += ", " + v;
    }), n.hooks.add("before-sanity-check", function(H) {
      var U = (
        /** @type {HTMLPreElement} */
        H.element
      );
      if (U.matches(v)) {
        H.code = "", U.setAttribute(c, h);
        var N = U.appendChild(document.createElement("CODE"));
        N.textContent = r;
        var M = U.getAttribute("data-src"), A = H.language;
        if (A === "none") {
          var x = (/\.(\w+)$/.exec(M) || [, "none"])[1];
          A = u[x] || x;
        }
        n.util.setLanguage(N, A), n.util.setLanguage(U, A);
        var C = n.plugins.autoloader;
        C && C.loadLanguages(A), k(
          M,
          function(O) {
            U.setAttribute(c, p);
            var q = E(U.getAttribute("data-range"));
            if (q) {
              var R = O.split(/\r\n?|\n/g), J = q[0], ne = q[1] == null ? R.length : q[1];
              J < 0 && (J += R.length), J = Math.max(0, Math.min(J - 1, R.length)), ne < 0 && (ne += R.length), ne = Math.max(0, Math.min(ne, R.length)), O = R.slice(J, ne).join(`
`), U.hasAttribute("data-start") || U.setAttribute("data-start", String(J + 1));
            }
            N.textContent = O, n.highlightElement(N);
          },
          function(O) {
            U.setAttribute(c, _), N.textContent = O;
          }
        );
      }
    }), n.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(U) {
        for (var N = (U || document).querySelectorAll(v), M = 0, A; A = N[M++]; )
          n.highlightElement(A);
      }
    };
    var z = !1;
    n.fileHighlight = function() {
      z || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), z = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
    };
  }();
})(Ph);
var x5 = Ph.exports;
const Kl = /* @__PURE__ */ Va(x5);
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(t) {
  var e = /\\(?:[^a-z()[\]]|[a-z*]+)/i, n = {
    "equation-command": {
      pattern: e,
      alias: "regex"
    }
  };
  t.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: n,
        alias: "string"
      },
      {
        pattern: /(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
        lookbehind: !0,
        inside: n,
        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: /[[\]{}&]/
  }, t.languages.tex = t.languages.latex, t.languages.context = t.languages.latex;
})(Prism);
(function(t) {
  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", n = {
    pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
    lookbehind: !0,
    alias: "punctuation",
    // this looks reasonably well in all themes
    inside: null
    // see below
  }, r = {
    bash: n,
    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})/
  };
  t.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: n
        }
      },
      // “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
    }
  }, n.inside = t.languages.bash;
  for (var l = [
    "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, u = 0; u < l.length; u++)
    o[l[u]] = t.languages.bash[l[u]];
  t.languages.sh = t.languages.bash, t.languages.shell = t.languages.bash;
})(Prism);
function zc(t, e) {
  return t ?? e();
}
function T5(t) {
  let e, n = t[0], r = 1;
  for (; r < t.length; ) {
    const l = t[r], o = t[r + 1];
    if (r += 2, (l === "optionalAccess" || l === "optionalCall") && n == null)
      return;
    l === "access" || l === "optionalAccess" ? (e = n, n = o(n)) : (l === "call" || l === "optionalCall") && (n = o((...u) => n.call(e, ...u)), e = void 0);
  }
  return n;
}
const F5 = '<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>', C5 = `<svg
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
viewBox="0 0 32 32"
><path
  fill="currentColor"
  d="M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z"
/><path fill="currentColor" d="M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z" /></svg>`, M5 = `<svg
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`, Rc = `<button title="copy" class="copy_code_button">
<span class="copy-text">${C5}</span>
<span class="check">${M5}</span>
</button>`, qh = /[&<>"']/, B5 = new RegExp(qh.source, "g"), Uh = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, N5 = new RegExp(Uh.source, "g"), z5 = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, Oc = (t) => z5[t] || "";
function $l(t, e) {
  if (e) {
    if (qh.test(t))
      return t.replace(B5, Oc);
  } else if (Uh.test(t))
    return t.replace(N5, Oc);
  return t;
}
const R5 = {
  code(t, e, n) {
    const r = zc(T5([zc(e, () => ""), "access", (l) => l.match, "call", (l) => l(/\S*/), "optionalAccess", (l) => l[0]]), () => "");
    return t = t.replace(/\n$/, "") + `
`, r ? '<div class="code_wrap">' + Rc + '<pre><code class="language-' + $l(r) + '">' + (n ? t : $l(t, !0)) + `</code></pre></div>
` : '<div class="code_wrap">' + Rc + "<pre><code>" + (n ? t : $l(t, !0)) + `</code></pre></div>
`;
  }
}, O5 = new Hh();
function I5({
  header_links: t,
  line_breaks: e
}) {
  const n = new Rh();
  return n.use(
    {
      gfm: !0,
      pedantic: !1,
      breaks: e
    },
    w5({
      highlight: (r, l) => Kl.languages[l] ? Kl.highlight(r, Kl.languages[l], l) : r
    }),
    { renderer: R5 }
  ), t && (n.use(E5()), n.use({
    extensions: [
      {
        name: "heading",
        level: "block",
        renderer(r) {
          const l = r.raw.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, ""), o = "h" + O5.slug(l), u = r.depth, c = this.parser.parseInline(r.tokens);
          return `<h${u} id="${o}"><a class="md-header-anchor" href="#${o}">${F5}</a>${c}</h${u}>
`;
        }
      }
    ]
  })), n;
}
const {
  HtmlTag: L5,
  SvelteComponent: H5,
  attr: P5,
  binding_callbacks: q5,
  detach: ro,
  element: U5,
  empty: G5,
  init: j5,
  insert: so,
  noop: Ic,
  safe_not_equal: V5,
  set_data: W5,
  text: X5,
  toggle_class: Xs
} = window.__gradio__svelte__internal, { afterUpdate: Y5, createEventDispatcher: X_ } = window.__gradio__svelte__internal;
function Z5(t) {
  let e;
  return {
    c() {
      e = X5(
        /*html*/
        t[3]
      );
    },
    m(n, r) {
      so(n, e, r);
    },
    p(n, r) {
      r & /*html*/
      8 && W5(
        e,
        /*html*/
        n[3]
      );
    },
    d(n) {
      n && ro(e);
    }
  };
}
function J5(t) {
  let e, n;
  return {
    c() {
      e = new L5(!1), n = G5(), e.a = n;
    },
    m(r, l) {
      e.m(
        /*html*/
        t[3],
        r,
        l
      ), so(r, n, l);
    },
    p(r, l) {
      l & /*html*/
      8 && e.p(
        /*html*/
        r[3]
      );
    },
    d(r) {
      r && (ro(n), e.d());
    }
  };
}
function Q5(t) {
  let e;
  function n(o, u) {
    return (
      /*render_markdown*/
      o[1] ? J5 : Z5
    );
  }
  let r = n(t), l = r(t);
  return {
    c() {
      e = U5("span"), l.c(), P5(e, "class", "md svelte-jhaueu"), Xs(
        e,
        "chatbot",
        /*chatbot*/
        t[0]
      ), Xs(
        e,
        "prose",
        /*render_markdown*/
        t[1]
      );
    },
    m(o, u) {
      so(o, e, u), l.m(e, null), t[9](e);
    },
    p(o, [u]) {
      r === (r = n(o)) && l ? l.p(o, u) : (l.d(1), l = r(o), l && (l.c(), l.m(e, null))), u & /*chatbot*/
      1 && Xs(
        e,
        "chatbot",
        /*chatbot*/
        o[0]
      ), u & /*render_markdown*/
      2 && Xs(
        e,
        "prose",
        /*render_markdown*/
        o[1]
      );
    },
    i: Ic,
    o: Ic,
    d(o) {
      o && ro(e), l.d(), t[9](null);
    }
  };
}
function K5(t, e, n) {
  let { chatbot: r = !0 } = e, { message: l } = e, { sanitize_html: o = !0 } = e, { latex_delimiters: u = [] } = e, { render_markdown: c = !0 } = e, { line_breaks: h = !0 } = e, { header_links: p = !1 } = e, _, v;
  const k = I5({ header_links: p, line_breaks: h }), E = (N) => {
    try {
      return !!N && new URL(N, location.href).origin !== location.origin;
    } catch {
      return !1;
    }
  };
  vc.addHook("afterSanitizeAttributes", function(N) {
    "target" in N && E(N.getAttribute("href")) && (N.setAttribute("target", "_blank"), N.setAttribute("rel", "noopener noreferrer"));
  });
  function z(N) {
    return c && (N = k.parse(N)), o && (N = vc.sanitize(N)), N;
  }
  async function H(N) {
    u.length > 0 && N && u.some((A) => N.includes(A.left) && N.includes(A.right)) && Lp(_, {
      delimiters: u,
      throwOnError: !1
    });
  }
  Y5(() => H(l));
  function U(N) {
    q5[N ? "unshift" : "push"](() => {
      _ = N, n(2, _);
    });
  }
  return t.$$set = (N) => {
    "chatbot" in N && n(0, r = N.chatbot), "message" in N && n(4, l = N.message), "sanitize_html" in N && n(5, o = N.sanitize_html), "latex_delimiters" in N && n(6, u = N.latex_delimiters), "render_markdown" in N && n(1, c = N.render_markdown), "line_breaks" in N && n(7, h = N.line_breaks), "header_links" in N && n(8, p = N.header_links);
  }, t.$$.update = () => {
    t.$$.dirty & /*message*/
    16 && (l && l.trim() ? n(3, v = z(l)) : n(3, v = ""));
  }, [
    r,
    c,
    _,
    v,
    l,
    o,
    u,
    h,
    p,
    U
  ];
}
class $5 extends H5 {
  constructor(e) {
    super(), j5(this, e, K5, Q5, V5, {
      chatbot: 0,
      message: 4,
      sanitize_html: 5,
      latex_delimiters: 6,
      render_markdown: 1,
      line_breaks: 7,
      header_links: 8
    });
  }
}
function _r(t) {
  let e = ["", "k", "M", "G", "T", "P", "E", "Z"], n = 0;
  for (; t > 1e3 && n < e.length - 1; )
    t /= 1e3, n++;
  let r = e[n];
  return (Number.isInteger(t) ? t : t.toFixed(1)) + r;
}
const {
  SvelteComponent: e6,
  append: Nn,
  attr: nt,
  component_subscribe: Lc,
  detach: t6,
  element: n6,
  init: r6,
  insert: s6,
  noop: Hc,
  safe_not_equal: i6,
  set_style: Ys,
  svg_element: zn,
  toggle_class: Pc
} = window.__gradio__svelte__internal, { onMount: l6 } = window.__gradio__svelte__internal;
function a6(t) {
  let e, n, r, l, o, u, c, h, p, _, v, k;
  return {
    c() {
      e = n6("div"), n = zn("svg"), r = zn("g"), l = zn("path"), o = zn("path"), u = zn("path"), c = zn("path"), h = zn("g"), p = zn("path"), _ = zn("path"), v = zn("path"), k = zn("path"), nt(l, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), nt(l, "fill", "#FF7C00"), nt(l, "fill-opacity", "0.4"), nt(l, "class", "svelte-43sxxs"), nt(o, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), nt(o, "fill", "#FF7C00"), nt(o, "class", "svelte-43sxxs"), nt(u, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), nt(u, "fill", "#FF7C00"), nt(u, "fill-opacity", "0.4"), nt(u, "class", "svelte-43sxxs"), nt(c, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), nt(c, "fill", "#FF7C00"), nt(c, "class", "svelte-43sxxs"), Ys(r, "transform", "translate(" + /*$top*/
      t[1][0] + "px, " + /*$top*/
      t[1][1] + "px)"), nt(p, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), nt(p, "fill", "#FF7C00"), nt(p, "fill-opacity", "0.4"), nt(p, "class", "svelte-43sxxs"), nt(_, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), nt(_, "fill", "#FF7C00"), nt(_, "class", "svelte-43sxxs"), nt(v, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), nt(v, "fill", "#FF7C00"), nt(v, "fill-opacity", "0.4"), nt(v, "class", "svelte-43sxxs"), nt(k, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), nt(k, "fill", "#FF7C00"), nt(k, "class", "svelte-43sxxs"), Ys(h, "transform", "translate(" + /*$bottom*/
      t[2][0] + "px, " + /*$bottom*/
      t[2][1] + "px)"), nt(n, "viewBox", "-1200 -1200 3000 3000"), nt(n, "fill", "none"), nt(n, "xmlns", "http://www.w3.org/2000/svg"), nt(n, "class", "svelte-43sxxs"), nt(e, "class", "svelte-43sxxs"), Pc(
        e,
        "margin",
        /*margin*/
        t[0]
      );
    },
    m(E, z) {
      s6(E, e, z), Nn(e, n), Nn(n, r), Nn(r, l), Nn(r, o), Nn(r, u), Nn(r, c), Nn(n, h), Nn(h, p), Nn(h, _), Nn(h, v), Nn(h, k);
    },
    p(E, [z]) {
      z & /*$top*/
      2 && Ys(r, "transform", "translate(" + /*$top*/
      E[1][0] + "px, " + /*$top*/
      E[1][1] + "px)"), z & /*$bottom*/
      4 && Ys(h, "transform", "translate(" + /*$bottom*/
      E[2][0] + "px, " + /*$bottom*/
      E[2][1] + "px)"), z & /*margin*/
      1 && Pc(
        e,
        "margin",
        /*margin*/
        E[0]
      );
    },
    i: Hc,
    o: Hc,
    d(E) {
      E && t6(e);
    }
  };
}
function o6(t, e, n) {
  let r, l, { margin: o = !0 } = e;
  const u = Vu([0, 0]);
  Lc(t, u, (k) => n(1, r = k));
  const c = Vu([0, 0]);
  Lc(t, c, (k) => n(2, l = k));
  let h;
  async function p() {
    await Promise.all([u.set([125, 140]), c.set([-125, -140])]), await Promise.all([u.set([-125, 140]), c.set([125, -140])]), await Promise.all([u.set([-125, 0]), c.set([125, -0])]), await Promise.all([u.set([125, 0]), c.set([-125, 0])]);
  }
  async function _() {
    await p(), h || _();
  }
  async function v() {
    await Promise.all([u.set([125, 0]), c.set([-125, 0])]), _();
  }
  return l6(() => (v(), () => h = !0)), t.$$set = (k) => {
    "margin" in k && n(0, o = k.margin);
  }, [o, r, l, u, c];
}
class u6 extends e6 {
  constructor(e) {
    super(), r6(this, e, o6, a6, i6, { margin: 0 });
  }
}
const {
  SvelteComponent: c6,
  append: Y0,
  attr: $n,
  binding_callbacks: qc,
  check_outros: Gh,
  create_component: f6,
  create_slot: h6,
  destroy_component: d6,
  destroy_each: jh,
  detach: He,
  element: a0,
  empty: Cr,
  ensure_array_like: Ci,
  get_all_dirty_from_scope: m6,
  get_slot_changes: p6,
  group_outros: Vh,
  init: g6,
  insert: Pe,
  mount_component: _6,
  noop: Ea,
  safe_not_equal: b6,
  set_data: Mn,
  set_style: D0,
  space: e0,
  text: Nt,
  toggle_class: Tn,
  transition_in: Er,
  transition_out: xr,
  update_slot_base: w6
} = window.__gradio__svelte__internal, { tick: y6 } = window.__gradio__svelte__internal, { onDestroy: v6 } = window.__gradio__svelte__internal, k6 = (t) => ({}), Uc = (t) => ({});
function Gc(t, e, n) {
  const r = t.slice();
  return r[38] = e[n], r[40] = n, r;
}
function jc(t, e, n) {
  const r = t.slice();
  return r[38] = e[n], r;
}
function D6(t) {
  let e, n = (
    /*i18n*/
    t[1]("common.error") + ""
  ), r, l, o;
  const u = (
    /*#slots*/
    t[29].error
  ), c = h6(
    u,
    t,
    /*$$scope*/
    t[28],
    Uc
  );
  return {
    c() {
      e = a0("span"), r = Nt(n), l = e0(), c && c.c(), $n(e, "class", "error svelte-1yserjw");
    },
    m(h, p) {
      Pe(h, e, p), Y0(e, r), Pe(h, l, p), c && c.m(h, p), o = !0;
    },
    p(h, p) {
      (!o || p[0] & /*i18n*/
      2) && n !== (n = /*i18n*/
      h[1]("common.error") + "") && Mn(r, n), c && c.p && (!o || p[0] & /*$$scope*/
      268435456) && w6(
        c,
        u,
        h,
        /*$$scope*/
        h[28],
        o ? p6(
          u,
          /*$$scope*/
          h[28],
          p,
          k6
        ) : m6(
          /*$$scope*/
          h[28]
        ),
        Uc
      );
    },
    i(h) {
      o || (Er(c, h), o = !0);
    },
    o(h) {
      xr(c, h), o = !1;
    },
    d(h) {
      h && (He(e), He(l)), c && c.d(h);
    }
  };
}
function A6(t) {
  let e, n, r, l, o, u, c, h, p, _ = (
    /*variant*/
    t[8] === "default" && /*show_eta_bar*/
    t[18] && /*show_progress*/
    t[6] === "full" && Vc(t)
  );
  function v(A, x) {
    if (
      /*progress*/
      A[7]
    )
      return x6;
    if (
      /*queue_position*/
      A[2] !== null && /*queue_size*/
      A[3] !== void 0 && /*queue_position*/
      A[2] >= 0
    )
      return E6;
    if (
      /*queue_position*/
      A[2] === 0
    )
      return S6;
  }
  let k = v(t), E = k && k(t), z = (
    /*timer*/
    t[5] && Yc(t)
  );
  const H = [M6, C6], U = [];
  function N(A, x) {
    return (
      /*last_progress_level*/
      A[15] != null ? 0 : (
        /*show_progress*/
        A[6] === "full" ? 1 : -1
      )
    );
  }
  ~(o = N(t)) && (u = U[o] = H[o](t));
  let M = !/*timer*/
  t[5] && t1(t);
  return {
    c() {
      _ && _.c(), e = e0(), n = a0("div"), E && E.c(), r = e0(), z && z.c(), l = e0(), u && u.c(), c = e0(), M && M.c(), h = Cr(), $n(n, "class", "progress-text svelte-1yserjw"), Tn(
        n,
        "meta-text-center",
        /*variant*/
        t[8] === "center"
      ), Tn(
        n,
        "meta-text",
        /*variant*/
        t[8] === "default"
      );
    },
    m(A, x) {
      _ && _.m(A, x), Pe(A, e, x), Pe(A, n, x), E && E.m(n, null), Y0(n, r), z && z.m(n, null), Pe(A, l, x), ~o && U[o].m(A, x), Pe(A, c, x), M && M.m(A, x), Pe(A, h, x), p = !0;
    },
    p(A, x) {
      /*variant*/
      A[8] === "default" && /*show_eta_bar*/
      A[18] && /*show_progress*/
      A[6] === "full" ? _ ? _.p(A, x) : (_ = Vc(A), _.c(), _.m(e.parentNode, e)) : _ && (_.d(1), _ = null), k === (k = v(A)) && E ? E.p(A, x) : (E && E.d(1), E = k && k(A), E && (E.c(), E.m(n, r))), /*timer*/
      A[5] ? z ? z.p(A, x) : (z = Yc(A), z.c(), z.m(n, null)) : z && (z.d(1), z = null), (!p || x[0] & /*variant*/
      256) && Tn(
        n,
        "meta-text-center",
        /*variant*/
        A[8] === "center"
      ), (!p || x[0] & /*variant*/
      256) && Tn(
        n,
        "meta-text",
        /*variant*/
        A[8] === "default"
      );
      let C = o;
      o = N(A), o === C ? ~o && U[o].p(A, x) : (u && (Vh(), xr(U[C], 1, 1, () => {
        U[C] = null;
      }), Gh()), ~o ? (u = U[o], u ? u.p(A, x) : (u = U[o] = H[o](A), u.c()), Er(u, 1), u.m(c.parentNode, c)) : u = null), /*timer*/
      A[5] ? M && (M.d(1), M = null) : M ? M.p(A, x) : (M = t1(A), M.c(), M.m(h.parentNode, h));
    },
    i(A) {
      p || (Er(u), p = !0);
    },
    o(A) {
      xr(u), p = !1;
    },
    d(A) {
      A && (He(e), He(n), He(l), He(c), He(h)), _ && _.d(A), E && E.d(), z && z.d(), ~o && U[o].d(A), M && M.d(A);
    }
  };
}
function Vc(t) {
  let e, n = `translateX(${/*eta_level*/
  (t[17] || 0) * 100 - 100}%)`;
  return {
    c() {
      e = a0("div"), $n(e, "class", "eta-bar svelte-1yserjw"), D0(e, "transform", n);
    },
    m(r, l) {
      Pe(r, e, l);
    },
    p(r, l) {
      l[0] & /*eta_level*/
      131072 && n !== (n = `translateX(${/*eta_level*/
      (r[17] || 0) * 100 - 100}%)`) && D0(e, "transform", n);
    },
    d(r) {
      r && He(e);
    }
  };
}
function S6(t) {
  let e;
  return {
    c() {
      e = Nt("processing |");
    },
    m(n, r) {
      Pe(n, e, r);
    },
    p: Ea,
    d(n) {
      n && He(e);
    }
  };
}
function E6(t) {
  let e, n = (
    /*queue_position*/
    t[2] + 1 + ""
  ), r, l, o, u;
  return {
    c() {
      e = Nt("queue: "), r = Nt(n), l = Nt("/"), o = Nt(
        /*queue_size*/
        t[3]
      ), u = Nt(" |");
    },
    m(c, h) {
      Pe(c, e, h), Pe(c, r, h), Pe(c, l, h), Pe(c, o, h), Pe(c, u, h);
    },
    p(c, h) {
      h[0] & /*queue_position*/
      4 && n !== (n = /*queue_position*/
      c[2] + 1 + "") && Mn(r, n), h[0] & /*queue_size*/
      8 && Mn(
        o,
        /*queue_size*/
        c[3]
      );
    },
    d(c) {
      c && (He(e), He(r), He(l), He(o), He(u));
    }
  };
}
function x6(t) {
  let e, n = Ci(
    /*progress*/
    t[7]
  ), r = [];
  for (let l = 0; l < n.length; l += 1)
    r[l] = Xc(jc(t, n, l));
  return {
    c() {
      for (let l = 0; l < r.length; l += 1)
        r[l].c();
      e = Cr();
    },
    m(l, o) {
      for (let u = 0; u < r.length; u += 1)
        r[u] && r[u].m(l, o);
      Pe(l, e, o);
    },
    p(l, o) {
      if (o[0] & /*progress*/
      128) {
        n = Ci(
          /*progress*/
          l[7]
        );
        let u;
        for (u = 0; u < n.length; u += 1) {
          const c = jc(l, n, u);
          r[u] ? r[u].p(c, o) : (r[u] = Xc(c), r[u].c(), r[u].m(e.parentNode, e));
        }
        for (; u < r.length; u += 1)
          r[u].d(1);
        r.length = n.length;
      }
    },
    d(l) {
      l && He(e), jh(r, l);
    }
  };
}
function Wc(t) {
  let e, n = (
    /*p*/
    t[38].unit + ""
  ), r, l, o = " ", u;
  function c(_, v) {
    return (
      /*p*/
      _[38].length != null ? F6 : T6
    );
  }
  let h = c(t), p = h(t);
  return {
    c() {
      p.c(), e = e0(), r = Nt(n), l = Nt(" | "), u = Nt(o);
    },
    m(_, v) {
      p.m(_, v), Pe(_, e, v), Pe(_, r, v), Pe(_, l, v), Pe(_, u, v);
    },
    p(_, v) {
      h === (h = c(_)) && p ? p.p(_, v) : (p.d(1), p = h(_), p && (p.c(), p.m(e.parentNode, e))), v[0] & /*progress*/
      128 && n !== (n = /*p*/
      _[38].unit + "") && Mn(r, n);
    },
    d(_) {
      _ && (He(e), He(r), He(l), He(u)), p.d(_);
    }
  };
}
function T6(t) {
  let e = _r(
    /*p*/
    t[38].index || 0
  ) + "", n;
  return {
    c() {
      n = Nt(e);
    },
    m(r, l) {
      Pe(r, n, l);
    },
    p(r, l) {
      l[0] & /*progress*/
      128 && e !== (e = _r(
        /*p*/
        r[38].index || 0
      ) + "") && Mn(n, e);
    },
    d(r) {
      r && He(n);
    }
  };
}
function F6(t) {
  let e = _r(
    /*p*/
    t[38].index || 0
  ) + "", n, r, l = _r(
    /*p*/
    t[38].length
  ) + "", o;
  return {
    c() {
      n = Nt(e), r = Nt("/"), o = Nt(l);
    },
    m(u, c) {
      Pe(u, n, c), Pe(u, r, c), Pe(u, o, c);
    },
    p(u, c) {
      c[0] & /*progress*/
      128 && e !== (e = _r(
        /*p*/
        u[38].index || 0
      ) + "") && Mn(n, e), c[0] & /*progress*/
      128 && l !== (l = _r(
        /*p*/
        u[38].length
      ) + "") && Mn(o, l);
    },
    d(u) {
      u && (He(n), He(r), He(o));
    }
  };
}
function Xc(t) {
  let e, n = (
    /*p*/
    t[38].index != null && Wc(t)
  );
  return {
    c() {
      n && n.c(), e = Cr();
    },
    m(r, l) {
      n && n.m(r, l), Pe(r, e, l);
    },
    p(r, l) {
      /*p*/
      r[38].index != null ? n ? n.p(r, l) : (n = Wc(r), n.c(), n.m(e.parentNode, e)) : n && (n.d(1), n = null);
    },
    d(r) {
      r && He(e), n && n.d(r);
    }
  };
}
function Yc(t) {
  let e, n = (
    /*eta*/
    t[0] ? `/${/*formatted_eta*/
    t[19]}` : ""
  ), r, l;
  return {
    c() {
      e = Nt(
        /*formatted_timer*/
        t[20]
      ), r = Nt(n), l = Nt("s");
    },
    m(o, u) {
      Pe(o, e, u), Pe(o, r, u), Pe(o, l, u);
    },
    p(o, u) {
      u[0] & /*formatted_timer*/
      1048576 && Mn(
        e,
        /*formatted_timer*/
        o[20]
      ), u[0] & /*eta, formatted_eta*/
      524289 && n !== (n = /*eta*/
      o[0] ? `/${/*formatted_eta*/
      o[19]}` : "") && Mn(r, n);
    },
    d(o) {
      o && (He(e), He(r), He(l));
    }
  };
}
function C6(t) {
  let e, n;
  return e = new u6({
    props: { margin: (
      /*variant*/
      t[8] === "default"
    ) }
  }), {
    c() {
      f6(e.$$.fragment);
    },
    m(r, l) {
      _6(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*variant*/
      256 && (o.margin = /*variant*/
      r[8] === "default"), e.$set(o);
    },
    i(r) {
      n || (Er(e.$$.fragment, r), n = !0);
    },
    o(r) {
      xr(e.$$.fragment, r), n = !1;
    },
    d(r) {
      d6(e, r);
    }
  };
}
function M6(t) {
  let e, n, r, l, o, u = `${/*last_progress_level*/
  t[15] * 100}%`, c = (
    /*progress*/
    t[7] != null && Zc(t)
  );
  return {
    c() {
      e = a0("div"), n = a0("div"), c && c.c(), r = e0(), l = a0("div"), o = a0("div"), $n(n, "class", "progress-level-inner svelte-1yserjw"), $n(o, "class", "progress-bar svelte-1yserjw"), D0(o, "width", u), $n(l, "class", "progress-bar-wrap svelte-1yserjw"), $n(e, "class", "progress-level svelte-1yserjw");
    },
    m(h, p) {
      Pe(h, e, p), Y0(e, n), c && c.m(n, null), Y0(e, r), Y0(e, l), Y0(l, o), t[30](o);
    },
    p(h, p) {
      /*progress*/
      h[7] != null ? c ? c.p(h, p) : (c = Zc(h), c.c(), c.m(n, null)) : c && (c.d(1), c = null), p[0] & /*last_progress_level*/
      32768 && u !== (u = `${/*last_progress_level*/
      h[15] * 100}%`) && D0(o, "width", u);
    },
    i: Ea,
    o: Ea,
    d(h) {
      h && He(e), c && c.d(), t[30](null);
    }
  };
}
function Zc(t) {
  let e, n = Ci(
    /*progress*/
    t[7]
  ), r = [];
  for (let l = 0; l < n.length; l += 1)
    r[l] = e1(Gc(t, n, l));
  return {
    c() {
      for (let l = 0; l < r.length; l += 1)
        r[l].c();
      e = Cr();
    },
    m(l, o) {
      for (let u = 0; u < r.length; u += 1)
        r[u] && r[u].m(l, o);
      Pe(l, e, o);
    },
    p(l, o) {
      if (o[0] & /*progress_level, progress*/
      16512) {
        n = Ci(
          /*progress*/
          l[7]
        );
        let u;
        for (u = 0; u < n.length; u += 1) {
          const c = Gc(l, n, u);
          r[u] ? r[u].p(c, o) : (r[u] = e1(c), r[u].c(), r[u].m(e.parentNode, e));
        }
        for (; u < r.length; u += 1)
          r[u].d(1);
        r.length = n.length;
      }
    },
    d(l) {
      l && He(e), jh(r, l);
    }
  };
}
function Jc(t) {
  let e, n, r, l, o = (
    /*i*/
    t[40] !== 0 && B6()
  ), u = (
    /*p*/
    t[38].desc != null && Qc(t)
  ), c = (
    /*p*/
    t[38].desc != null && /*progress_level*/
    t[14] && /*progress_level*/
    t[14][
      /*i*/
      t[40]
    ] != null && Kc()
  ), h = (
    /*progress_level*/
    t[14] != null && $c(t)
  );
  return {
    c() {
      o && o.c(), e = e0(), u && u.c(), n = e0(), c && c.c(), r = e0(), h && h.c(), l = Cr();
    },
    m(p, _) {
      o && o.m(p, _), Pe(p, e, _), u && u.m(p, _), Pe(p, n, _), c && c.m(p, _), Pe(p, r, _), h && h.m(p, _), Pe(p, l, _);
    },
    p(p, _) {
      /*p*/
      p[38].desc != null ? u ? u.p(p, _) : (u = Qc(p), u.c(), u.m(n.parentNode, n)) : u && (u.d(1), u = null), /*p*/
      p[38].desc != null && /*progress_level*/
      p[14] && /*progress_level*/
      p[14][
        /*i*/
        p[40]
      ] != null ? c || (c = Kc(), c.c(), c.m(r.parentNode, r)) : c && (c.d(1), c = null), /*progress_level*/
      p[14] != null ? h ? h.p(p, _) : (h = $c(p), h.c(), h.m(l.parentNode, l)) : h && (h.d(1), h = null);
    },
    d(p) {
      p && (He(e), He(n), He(r), He(l)), o && o.d(p), u && u.d(p), c && c.d(p), h && h.d(p);
    }
  };
}
function B6(t) {
  let e;
  return {
    c() {
      e = Nt(" /");
    },
    m(n, r) {
      Pe(n, e, r);
    },
    d(n) {
      n && He(e);
    }
  };
}
function Qc(t) {
  let e = (
    /*p*/
    t[38].desc + ""
  ), n;
  return {
    c() {
      n = Nt(e);
    },
    m(r, l) {
      Pe(r, n, l);
    },
    p(r, l) {
      l[0] & /*progress*/
      128 && e !== (e = /*p*/
      r[38].desc + "") && Mn(n, e);
    },
    d(r) {
      r && He(n);
    }
  };
}
function Kc(t) {
  let e;
  return {
    c() {
      e = Nt("-");
    },
    m(n, r) {
      Pe(n, e, r);
    },
    d(n) {
      n && He(e);
    }
  };
}
function $c(t) {
  let e = (100 * /*progress_level*/
  (t[14][
    /*i*/
    t[40]
  ] || 0)).toFixed(1) + "", n, r;
  return {
    c() {
      n = Nt(e), r = Nt("%");
    },
    m(l, o) {
      Pe(l, n, o), Pe(l, r, o);
    },
    p(l, o) {
      o[0] & /*progress_level*/
      16384 && e !== (e = (100 * /*progress_level*/
      (l[14][
        /*i*/
        l[40]
      ] || 0)).toFixed(1) + "") && Mn(n, e);
    },
    d(l) {
      l && (He(n), He(r));
    }
  };
}
function e1(t) {
  let e, n = (
    /*p*/
    (t[38].desc != null || /*progress_level*/
    t[14] && /*progress_level*/
    t[14][
      /*i*/
      t[40]
    ] != null) && Jc(t)
  );
  return {
    c() {
      n && n.c(), e = Cr();
    },
    m(r, l) {
      n && n.m(r, l), Pe(r, e, l);
    },
    p(r, l) {
      /*p*/
      r[38].desc != null || /*progress_level*/
      r[14] && /*progress_level*/
      r[14][
        /*i*/
        r[40]
      ] != null ? n ? n.p(r, l) : (n = Jc(r), n.c(), n.m(e.parentNode, e)) : n && (n.d(1), n = null);
    },
    d(r) {
      r && He(e), n && n.d(r);
    }
  };
}
function t1(t) {
  let e, n;
  return {
    c() {
      e = a0("p"), n = Nt(
        /*loading_text*/
        t[9]
      ), $n(e, "class", "loading svelte-1yserjw");
    },
    m(r, l) {
      Pe(r, e, l), Y0(e, n);
    },
    p(r, l) {
      l[0] & /*loading_text*/
      512 && Mn(
        n,
        /*loading_text*/
        r[9]
      );
    },
    d(r) {
      r && He(e);
    }
  };
}
function N6(t) {
  let e, n, r, l, o;
  const u = [A6, D6], c = [];
  function h(p, _) {
    return (
      /*status*/
      p[4] === "pending" ? 0 : (
        /*status*/
        p[4] === "error" ? 1 : -1
      )
    );
  }
  return ~(n = h(t)) && (r = c[n] = u[n](t)), {
    c() {
      e = a0("div"), r && r.c(), $n(e, "class", l = "wrap " + /*variant*/
      t[8] + " " + /*show_progress*/
      t[6] + " svelte-1yserjw"), Tn(e, "hide", !/*status*/
      t[4] || /*status*/
      t[4] === "complete" || /*show_progress*/
      t[6] === "hidden"), Tn(
        e,
        "translucent",
        /*variant*/
        t[8] === "center" && /*status*/
        (t[4] === "pending" || /*status*/
        t[4] === "error") || /*translucent*/
        t[11] || /*show_progress*/
        t[6] === "minimal"
      ), Tn(
        e,
        "generating",
        /*status*/
        t[4] === "generating"
      ), Tn(
        e,
        "border",
        /*border*/
        t[12]
      ), D0(
        e,
        "position",
        /*absolute*/
        t[10] ? "absolute" : "static"
      ), D0(
        e,
        "padding",
        /*absolute*/
        t[10] ? "0" : "var(--size-8) 0"
      );
    },
    m(p, _) {
      Pe(p, e, _), ~n && c[n].m(e, null), t[31](e), o = !0;
    },
    p(p, _) {
      let v = n;
      n = h(p), n === v ? ~n && c[n].p(p, _) : (r && (Vh(), xr(c[v], 1, 1, () => {
        c[v] = null;
      }), Gh()), ~n ? (r = c[n], r ? r.p(p, _) : (r = c[n] = u[n](p), r.c()), Er(r, 1), r.m(e, null)) : r = null), (!o || _[0] & /*variant, show_progress*/
      320 && l !== (l = "wrap " + /*variant*/
      p[8] + " " + /*show_progress*/
      p[6] + " svelte-1yserjw")) && $n(e, "class", l), (!o || _[0] & /*variant, show_progress, status, show_progress*/
      336) && Tn(e, "hide", !/*status*/
      p[4] || /*status*/
      p[4] === "complete" || /*show_progress*/
      p[6] === "hidden"), (!o || _[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
      2384) && Tn(
        e,
        "translucent",
        /*variant*/
        p[8] === "center" && /*status*/
        (p[4] === "pending" || /*status*/
        p[4] === "error") || /*translucent*/
        p[11] || /*show_progress*/
        p[6] === "minimal"
      ), (!o || _[0] & /*variant, show_progress, status*/
      336) && Tn(
        e,
        "generating",
        /*status*/
        p[4] === "generating"
      ), (!o || _[0] & /*variant, show_progress, border*/
      4416) && Tn(
        e,
        "border",
        /*border*/
        p[12]
      ), _[0] & /*absolute*/
      1024 && D0(
        e,
        "position",
        /*absolute*/
        p[10] ? "absolute" : "static"
      ), _[0] & /*absolute*/
      1024 && D0(
        e,
        "padding",
        /*absolute*/
        p[10] ? "0" : "var(--size-8) 0"
      );
    },
    i(p) {
      o || (Er(r), o = !0);
    },
    o(p) {
      xr(r), o = !1;
    },
    d(p) {
      p && He(e), ~n && c[n].d(), t[31](null);
    }
  };
}
let Zs = [], ea = !1;
async function z6(t, e = !0) {
  if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && e !== !0)) {
    if (Zs.push(t), !ea)
      ea = !0;
    else
      return;
    await y6(), requestAnimationFrame(() => {
      let n = [0, 0];
      for (let r = 0; r < Zs.length; r++) {
        const o = Zs[r].getBoundingClientRect();
        (r === 0 || o.top + window.scrollY <= n[0]) && (n[0] = o.top + window.scrollY, n[1] = r);
      }
      window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), ea = !1, Zs = [];
    });
  }
}
function R6(t, e, n) {
  let r, { $$slots: l = {}, $$scope: o } = e, { i18n: u } = e, { eta: c = null } = e, { queue_position: h } = e, { queue_size: p } = e, { status: _ } = e, { scroll_to_output: v = !1 } = e, { timer: k = !0 } = e, { show_progress: E = "full" } = e, { message: z = null } = e, { progress: H = null } = e, { variant: U = "default" } = e, { loading_text: N = "Loading..." } = e, { absolute: M = !0 } = e, { translucent: A = !1 } = e, { border: x = !1 } = e, { autoscroll: C } = e, O, q = !1, R = 0, J = 0, ne = null, ie = null, te = 0, Se = null, Ce, De = null, ce = !0;
  const he = () => {
    n(0, c = n(26, ne = n(19, de = null))), n(24, R = performance.now()), n(25, J = 0), q = !0, se();
  };
  function se() {
    requestAnimationFrame(() => {
      n(25, J = (performance.now() - R) / 1e3), q && se();
    });
  }
  function Ne() {
    n(25, J = 0), n(0, c = n(26, ne = n(19, de = null))), q && (q = !1);
  }
  v6(() => {
    q && Ne();
  });
  let de = null;
  function Q(V) {
    qc[V ? "unshift" : "push"](() => {
      De = V, n(16, De), n(7, H), n(14, Se), n(15, Ce);
    });
  }
  function me(V) {
    qc[V ? "unshift" : "push"](() => {
      O = V, n(13, O);
    });
  }
  return t.$$set = (V) => {
    "i18n" in V && n(1, u = V.i18n), "eta" in V && n(0, c = V.eta), "queue_position" in V && n(2, h = V.queue_position), "queue_size" in V && n(3, p = V.queue_size), "status" in V && n(4, _ = V.status), "scroll_to_output" in V && n(21, v = V.scroll_to_output), "timer" in V && n(5, k = V.timer), "show_progress" in V && n(6, E = V.show_progress), "message" in V && n(22, z = V.message), "progress" in V && n(7, H = V.progress), "variant" in V && n(8, U = V.variant), "loading_text" in V && n(9, N = V.loading_text), "absolute" in V && n(10, M = V.absolute), "translucent" in V && n(11, A = V.translucent), "border" in V && n(12, x = V.border), "autoscroll" in V && n(23, C = V.autoscroll), "$$scope" in V && n(28, o = V.$$scope);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
    218103809 && (c === null && n(0, c = ne), c != null && ne !== c && (n(27, ie = (performance.now() - R) / 1e3 + c), n(19, de = ie.toFixed(1)), n(26, ne = c))), t.$$.dirty[0] & /*eta_from_start, timer_diff*/
    167772160 && n(17, te = ie === null || ie <= 0 || !J ? null : Math.min(J / ie, 1)), t.$$.dirty[0] & /*progress*/
    128 && H != null && n(18, ce = !1), t.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
    114816 && (H != null ? n(14, Se = H.map((V) => {
      if (V.index != null && V.length != null)
        return V.index / V.length;
      if (V.progress != null)
        return V.progress;
    })) : n(14, Se = null), Se ? (n(15, Ce = Se[Se.length - 1]), De && (Ce === 0 ? n(16, De.style.transition = "0", De) : n(16, De.style.transition = "150ms", De))) : n(15, Ce = void 0)), t.$$.dirty[0] & /*status*/
    16 && (_ === "pending" ? he() : Ne()), t.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
    10493968 && O && v && (_ === "pending" || _ === "complete") && z6(O, C), t.$$.dirty[0] & /*status, message*/
    4194320, t.$$.dirty[0] & /*timer_diff*/
    33554432 && n(20, r = J.toFixed(1));
  }, [
    c,
    u,
    h,
    p,
    _,
    k,
    E,
    H,
    U,
    N,
    M,
    A,
    x,
    O,
    Se,
    Ce,
    De,
    te,
    ce,
    de,
    r,
    v,
    z,
    C,
    R,
    J,
    ne,
    ie,
    o,
    l,
    Q,
    me
  ];
}
class io extends c6 {
  constructor(e) {
    super(), g6(
      this,
      e,
      R6,
      N6,
      b6,
      {
        i18n: 1,
        eta: 0,
        queue_position: 2,
        queue_size: 3,
        status: 4,
        scroll_to_output: 21,
        timer: 5,
        show_progress: 6,
        message: 22,
        progress: 7,
        variant: 8,
        loading_text: 9,
        absolute: 10,
        translucent: 11,
        border: 12,
        autoscroll: 23
      },
      null,
      [-1, -1]
    );
  }
}
const {
  HtmlTag: O6,
  SvelteComponent: I6,
  action_destroyer: L6,
  attr: v0,
  binding_callbacks: H6,
  bubble: ta,
  check_outros: P6,
  create_component: q6,
  destroy_component: U6,
  detach: as,
  element: Wh,
  empty: G6,
  group_outros: j6,
  init: V6,
  insert: os,
  listen: $r,
  mount_component: W6,
  noop: Mi,
  prevent_default: X6,
  run_all: Xh,
  safe_not_equal: Y6,
  set_data: Z6,
  set_input_value: n1,
  space: J6,
  text: Q6,
  toggle_class: Bi,
  transition_in: xa,
  transition_out: Ta
} = window.__gradio__svelte__internal, { createEventDispatcher: K6 } = window.__gradio__svelte__internal;
function r1(t) {
  let e, n, r;
  return {
    c() {
      e = Wh("input"), v0(e, "role", "textbox"), v0(e, "tabindex", "-1"), v0(e, "class", "svelte-1q554zi"), Bi(
        e,
        "header",
        /*header*/
        t[5]
      );
    },
    m(l, o) {
      os(l, e, o), t[18](e), n1(
        e,
        /*_value*/
        t[10]
      ), n || (r = [
        $r(
          e,
          "input",
          /*input_input_handler*/
          t[19]
        ),
        $r(
          e,
          "blur",
          /*handle_blur*/
          t[12]
        ),
        L6(
          /*use_focus*/
          t[11].call(null, e)
        ),
        $r(
          e,
          "keydown",
          /*keydown_handler*/
          t[17]
        )
      ], n = !0);
    },
    p(l, o) {
      o & /*_value*/
      1024 && e.value !== /*_value*/
      l[10] && n1(
        e,
        /*_value*/
        l[10]
      ), o & /*header*/
      32 && Bi(
        e,
        "header",
        /*header*/
        l[5]
      );
    },
    d(l) {
      l && as(e), t[18](null), n = !1, Xh(r);
    }
  };
}
function $6(t) {
  let e = (
    /*editable*/
    (t[9] ? (
      /*value*/
      t[0]
    ) : (
      /*display_value*/
      t[3] || /*value*/
      t[0]
    )) + ""
  ), n;
  return {
    c() {
      n = Q6(e);
    },
    m(r, l) {
      os(r, n, l);
    },
    p(r, l) {
      l & /*editable, value, display_value*/
      521 && e !== (e = /*editable*/
      (r[9] ? (
        /*value*/
        r[0]
      ) : (
        /*display_value*/
        r[3] || /*value*/
        r[0]
      )) + "") && Z6(n, e);
    },
    i: Mi,
    o: Mi,
    d(r) {
      r && as(n);
    }
  };
}
function e7(t) {
  let e, n;
  return e = new $5({
    props: {
      message: (
        /*value*/
        t[0].toLocaleString()
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        t[7]
      ),
      line_breaks: (
        /*line_breaks*/
        t[8]
      ),
      chatbot: !1
    }
  }), {
    c() {
      q6(e.$$.fragment);
    },
    m(r, l) {
      W6(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l & /*value*/
      1 && (o.message = /*value*/
      r[0].toLocaleString()), l & /*latex_delimiters*/
      128 && (o.latex_delimiters = /*latex_delimiters*/
      r[7]), l & /*line_breaks*/
      256 && (o.line_breaks = /*line_breaks*/
      r[8]), e.$set(o);
    },
    i(r) {
      n || (xa(e.$$.fragment, r), n = !0);
    },
    o(r) {
      Ta(e.$$.fragment, r), n = !1;
    },
    d(r) {
      U6(e, r);
    }
  };
}
function t7(t) {
  let e, n;
  return {
    c() {
      e = new O6(!1), n = G6(), e.a = n;
    },
    m(r, l) {
      e.m(
        /*value*/
        t[0],
        r,
        l
      ), os(r, n, l);
    },
    p(r, l) {
      l & /*value*/
      1 && e.p(
        /*value*/
        r[0]
      );
    },
    i: Mi,
    o: Mi,
    d(r) {
      r && (as(n), e.d());
    }
  };
}
function n7(t) {
  let e, n, r, l, o, u, c, h = (
    /*edit*/
    t[2] && r1(t)
  );
  const p = [t7, e7, $6], _ = [];
  function v(k, E) {
    return (
      /*datatype*/
      k[6] === "html" ? 0 : (
        /*datatype*/
        k[6] === "markdown" ? 1 : 2
      )
    );
  }
  return r = v(t), l = _[r] = p[r](t), {
    c() {
      h && h.c(), e = J6(), n = Wh("span"), l.c(), v0(n, "tabindex", "-1"), v0(n, "role", "button"), v0(
        n,
        "style",
        /*styling*/
        t[4]
      ), v0(n, "class", "svelte-1q554zi"), Bi(
        n,
        "edit",
        /*edit*/
        t[2]
      );
    },
    m(k, E) {
      h && h.m(k, E), os(k, e, E), os(k, n, E), _[r].m(n, null), o = !0, u || (c = [
        $r(
          n,
          "dblclick",
          /*dblclick_handler*/
          t[15]
        ),
        $r(n, "focus", X6(
          /*focus_handler*/
          t[16]
        ))
      ], u = !0);
    },
    p(k, [E]) {
      /*edit*/
      k[2] ? h ? h.p(k, E) : (h = r1(k), h.c(), h.m(e.parentNode, e)) : h && (h.d(1), h = null);
      let z = r;
      r = v(k), r === z ? _[r].p(k, E) : (j6(), Ta(_[z], 1, 1, () => {
        _[z] = null;
      }), P6(), l = _[r], l ? l.p(k, E) : (l = _[r] = p[r](k), l.c()), xa(l, 1), l.m(n, null)), (!o || E & /*styling*/
      16) && v0(
        n,
        "style",
        /*styling*/
        k[4]
      ), (!o || E & /*edit*/
      4) && Bi(
        n,
        "edit",
        /*edit*/
        k[2]
      );
    },
    i(k) {
      o || (xa(l), o = !0);
    },
    o(k) {
      Ta(l), o = !1;
    },
    d(k) {
      k && (as(e), as(n)), h && h.d(k), _[r].d(), u = !1, Xh(c);
    }
  };
}
function r7(t, e, n) {
  let r, { edit: l } = e, { value: o = "" } = e, { display_value: u = null } = e, { styling: c = "" } = e, { header: h = !1 } = e, { datatype: p = "str" } = e, { latex_delimiters: _ } = e, { clear_on_focus: v = !1 } = e, { select_on_focus: k = !1 } = e, { line_breaks: E = !0 } = e, { editable: z = !0 } = e;
  const H = K6();
  let { el: U } = e;
  function N(R) {
    return v && n(10, r = ""), k && R.select(), R.focus(), {};
  }
  function M({ currentTarget: R }) {
    n(0, o = R.value), H("blur");
  }
  function A(R) {
    ta.call(this, t, R);
  }
  function x(R) {
    ta.call(this, t, R);
  }
  function C(R) {
    ta.call(this, t, R);
  }
  function O(R) {
    H6[R ? "unshift" : "push"](() => {
      U = R, n(1, U);
    });
  }
  function q() {
    r = this.value, n(10, r), n(0, o);
  }
  return t.$$set = (R) => {
    "edit" in R && n(2, l = R.edit), "value" in R && n(0, o = R.value), "display_value" in R && n(3, u = R.display_value), "styling" in R && n(4, c = R.styling), "header" in R && n(5, h = R.header), "datatype" in R && n(6, p = R.datatype), "latex_delimiters" in R && n(7, _ = R.latex_delimiters), "clear_on_focus" in R && n(13, v = R.clear_on_focus), "select_on_focus" in R && n(14, k = R.select_on_focus), "line_breaks" in R && n(8, E = R.line_breaks), "editable" in R && n(9, z = R.editable), "el" in R && n(1, U = R.el);
  }, t.$$.update = () => {
    t.$$.dirty & /*value*/
    1 && n(10, r = o);
  }, [
    o,
    U,
    l,
    u,
    c,
    h,
    p,
    _,
    E,
    z,
    r,
    N,
    M,
    v,
    k,
    A,
    x,
    C,
    O,
    q
  ];
}
class Qi extends I6 {
  constructor(e) {
    super(), V6(this, e, r7, n7, Y6, {
      edit: 2,
      value: 0,
      display_value: 3,
      styling: 4,
      header: 5,
      datatype: 6,
      latex_delimiters: 7,
      clear_on_focus: 13,
      select_on_focus: 14,
      line_breaks: 8,
      editable: 9,
      el: 1
    });
  }
}
const {
  ResizeObserverSingleton: s7,
  SvelteComponent: i7,
  add_iframe_resize_listener: s1,
  add_render_callback: i1,
  append: cr,
  attr: Js,
  binding_callbacks: l1,
  check_outros: Yh,
  create_slot: Fa,
  detach: Ki,
  element: jr,
  empty: Zh,
  ensure_array_like: a1,
  get_all_dirty_from_scope: Ca,
  get_slot_changes: Ma,
  group_outros: Jh,
  init: l7,
  insert: $i,
  listen: a7,
  outro_and_destroy_block: o7,
  resize_observer_content_box: u7,
  safe_not_equal: c7,
  set_style: Rn,
  space: o1,
  text: f7,
  transition_in: X0,
  transition_out: br,
  update_keyed_each: h7,
  update_slot_base: Ba
} = window.__gradio__svelte__internal, { onMount: d7, tick: Qs } = window.__gradio__svelte__internal, m7 = (t) => ({}), u1 = (t) => ({});
function c1(t, e, n) {
  const r = t.slice();
  return r[34] = e[n], r;
}
const p7 = (t) => ({
  item: t[0] & /*visible*/
  256,
  index: t[0] & /*visible*/
  256
}), f1 = (t) => ({
  item: (
    /*item*/
    t[34].data
  ),
  index: (
    /*item*/
    t[34].index
  )
}), g7 = (t) => ({}), h1 = (t) => ({});
function d1(t) {
  let e = [], n = /* @__PURE__ */ new Map(), r, l, o = a1(
    /*visible*/
    t[8]
  );
  const u = (c) => (
    /*item*/
    c[34].data[0].id
  );
  for (let c = 0; c < o.length; c += 1) {
    let h = c1(t, o, c), p = u(h);
    n.set(p, e[c] = m1(p, h));
  }
  return {
    c() {
      for (let c = 0; c < e.length; c += 1)
        e[c].c();
      r = Zh();
    },
    m(c, h) {
      for (let p = 0; p < e.length; p += 1)
        e[p] && e[p].m(c, h);
      $i(c, r, h), l = !0;
    },
    p(c, h) {
      h[0] & /*$$scope, visible*/
      1048832 && (o = a1(
        /*visible*/
        c[8]
      ), Jh(), e = h7(e, h, u, 1, c, o, n, r.parentNode, o7, m1, r, c1), Yh());
    },
    i(c) {
      if (!l) {
        for (let h = 0; h < o.length; h += 1)
          X0(e[h]);
        l = !0;
      }
    },
    o(c) {
      for (let h = 0; h < e.length; h += 1)
        br(e[h]);
      l = !1;
    },
    d(c) {
      c && Ki(r);
      for (let h = 0; h < e.length; h += 1)
        e[h].d(c);
    }
  };
}
function _7(t) {
  let e;
  return {
    c() {
      e = f7(`Missing Table Row
					`);
    },
    m(n, r) {
      $i(n, e, r);
    },
    d(n) {
      n && Ki(e);
    }
  };
}
function m1(t, e) {
  let n, r;
  const l = (
    /*#slots*/
    e[21].tbody
  ), o = Fa(
    l,
    e,
    /*$$scope*/
    e[20],
    f1
  ), u = o || _7();
  return {
    key: t,
    first: null,
    c() {
      n = Zh(), u && u.c(), this.first = n;
    },
    m(c, h) {
      $i(c, n, h), u && u.m(c, h), r = !0;
    },
    p(c, h) {
      e = c, o && o.p && (!r || h[0] & /*$$scope, visible*/
      1048832) && Ba(
        o,
        l,
        e,
        /*$$scope*/
        e[20],
        r ? Ma(
          l,
          /*$$scope*/
          e[20],
          h,
          p7
        ) : Ca(
          /*$$scope*/
          e[20]
        ),
        f1
      );
    },
    i(c) {
      r || (X0(u, c), r = !0);
    },
    o(c) {
      br(u, c), r = !1;
    },
    d(c) {
      c && Ki(n), u && u.d(c);
    }
  };
}
function b7(t) {
  let e, n, r, l, o, u, c, h, p, _, v, k, E;
  const z = (
    /*#slots*/
    t[21].thead
  ), H = Fa(
    z,
    t,
    /*$$scope*/
    t[20],
    h1
  );
  let U = (
    /*visible*/
    t[8].length && /*visible*/
    t[8][0].data.length && d1(t)
  );
  const N = (
    /*#slots*/
    t[21].tfoot
  ), M = Fa(
    N,
    t,
    /*$$scope*/
    t[20],
    u1
  );
  return {
    c() {
      e = jr("svelte-virtual-table-viewport"), n = jr("table"), r = jr("thead"), H && H.c(), o = o1(), u = jr("tbody"), U && U.c(), c = o1(), h = jr("tfoot"), M && M.c(), Js(r, "class", "thead svelte-a3kl9v"), i1(() => (
        /*thead_elementresize_handler*/
        t[22].call(r)
      )), Js(u, "class", "tbody svelte-a3kl9v"), Js(h, "class", "tfoot svelte-a3kl9v"), i1(() => (
        /*tfoot_elementresize_handler*/
        t[24].call(h)
      )), Js(n, "class", "table svelte-a3kl9v"), Rn(n, "height", w7), Rn(
        n,
        "--bw-svt-p-top",
        /*top*/
        t[6] + "px"
      ), Rn(
        n,
        "--bw-svt-p-bottom",
        /*bottom*/
        t[2] + "px"
      ), Rn(
        n,
        "--bw-svt-head-height",
        /*head_height*/
        t[4] + "px"
      ), Rn(
        n,
        "--bw-svt-foot-height",
        /*foot_height*/
        t[5] + "px"
      ), Rn(
        n,
        "--bw-svt-avg-row-height",
        /*average_height*/
        t[1] + "px"
      );
    },
    m(A, x) {
      $i(A, e, x), cr(e, n), cr(n, r), H && H.m(r, null), l = s1(
        r,
        /*thead_elementresize_handler*/
        t[22].bind(r)
      ), cr(n, o), cr(n, u), U && U.m(u, null), t[23](u), cr(n, c), cr(n, h), M && M.m(h, null), p = s1(
        h,
        /*tfoot_elementresize_handler*/
        t[24].bind(h)
      ), t[25](n), _ = u7.observe(
        n,
        /*table_elementresizecontentbox_handler*/
        t[26].bind(n)
      ), v = !0, k || (E = a7(
        n,
        "scroll",
        /*handle_scroll*/
        t[9]
      ), k = !0);
    },
    p(A, x) {
      H && H.p && (!v || x[0] & /*$$scope*/
      1048576) && Ba(
        H,
        z,
        A,
        /*$$scope*/
        A[20],
        v ? Ma(
          z,
          /*$$scope*/
          A[20],
          x,
          g7
        ) : Ca(
          /*$$scope*/
          A[20]
        ),
        h1
      ), /*visible*/
      A[8].length && /*visible*/
      A[8][0].data.length ? U ? (U.p(A, x), x[0] & /*visible*/
      256 && X0(U, 1)) : (U = d1(A), U.c(), X0(U, 1), U.m(u, null)) : U && (Jh(), br(U, 1, 1, () => {
        U = null;
      }), Yh()), M && M.p && (!v || x[0] & /*$$scope*/
      1048576) && Ba(
        M,
        N,
        A,
        /*$$scope*/
        A[20],
        v ? Ma(
          N,
          /*$$scope*/
          A[20],
          x,
          m7
        ) : Ca(
          /*$$scope*/
          A[20]
        ),
        u1
      ), (!v || x[0] & /*top*/
      64) && Rn(
        n,
        "--bw-svt-p-top",
        /*top*/
        A[6] + "px"
      ), (!v || x[0] & /*bottom*/
      4) && Rn(
        n,
        "--bw-svt-p-bottom",
        /*bottom*/
        A[2] + "px"
      ), (!v || x[0] & /*head_height*/
      16) && Rn(
        n,
        "--bw-svt-head-height",
        /*head_height*/
        A[4] + "px"
      ), (!v || x[0] & /*foot_height*/
      32) && Rn(
        n,
        "--bw-svt-foot-height",
        /*foot_height*/
        A[5] + "px"
      ), (!v || x[0] & /*average_height*/
      2) && Rn(
        n,
        "--bw-svt-avg-row-height",
        /*average_height*/
        A[1] + "px"
      );
    },
    i(A) {
      v || (X0(H, A), X0(U), X0(M, A), v = !0);
    },
    o(A) {
      br(H, A), br(U), br(M, A), v = !1;
    },
    d(A) {
      A && Ki(e), H && H.d(A), l(), U && U.d(), t[23](null), M && M.d(A), p(), t[25](null), _(), k = !1, E();
    }
  };
}
let w7 = "100%";
function p1(t) {
  let e, n = t[0], r = 1;
  for (; r < t.length; ) {
    const l = t[r], o = t[r + 1];
    if (r += 2, (l === "optionalAccess" || l === "optionalCall") && n == null)
      return;
    l === "access" || l === "optionalAccess" ? (e = n, n = o(n)) : (l === "call" || l === "optionalCall") && (n = o((...u) => n.call(e, ...u)), e = void 0);
  }
  return n;
}
function y7(t, e) {
  if (!t)
    return 0;
  const n = getComputedStyle(t);
  return parseInt(n.getPropertyValue(e));
}
function v7(t, e, n) {
  let r, { $$slots: l = {}, $$scope: o } = e, { items: u = [] } = e, { max_height: c } = e, { actual_height: h } = e, { table_scrollbar_width: p } = e, { start: _ = 0 } = e, { end: v = 0 } = e, { selected: k } = e, E, z = 0, H, U = 0, N = 0, M = [], A, x, C = 0, O, q = 0, R = [], J, ne = 0;
  async function ie(Q) {
    if (q === 0)
      return;
    const { scrollTop: me } = O;
    n(13, p = O.offsetWidth - O.clientWidth), ne = C - (me - U);
    let V = _;
    for (; ne < c && V < Q.length; ) {
      let K = x[V - _];
      K || (n(11, v = V + 1), await Qs(), K = x[V - _]);
      let Ee = p1([
        K,
        "optionalAccess",
        (Je) => Je.getBoundingClientRect,
        "call",
        (Je) => Je(),
        "access",
        (Je) => Je.height
      ]);
      Ee || (Ee = E);
      const Ae = M[V] = Ee;
      ne += Ae, V += 1;
    }
    n(11, v = V);
    const $ = Q.length - v, we = O.offsetHeight - O.clientHeight;
    we > 0 && (ne += we);
    let ye = M.filter((K) => typeof K == "number");
    n(1, E = ye.reduce((K, Ee) => K + Ee, 0) / ye.length), n(2, z = $ * E), M.length = Q.length, await Qs(), c ? ne < c ? n(12, h = ne + 2) : n(12, h = c) : n(12, h = ne + 1), await Qs();
  }
  async function te(Q) {
    requestAnimationFrame(async () => {
      if (typeof Q != "number")
        return;
      const me = typeof Q != "number" ? !1 : Se(Q);
      me !== !0 && (me === "back" && await De(Q, { behavior: "instant" }), me === "forwards" && await De(Q, { behavior: "instant" }, !0));
    });
  }
  function Se(Q) {
    const me = x && x[Q - _];
    if (!me && Q < _)
      return "back";
    if (!me && Q >= v - 1)
      return "forwards";
    const { top: V } = O.getBoundingClientRect(), { top: $, bottom: we } = me.getBoundingClientRect();
    return $ - V < 37 ? "back" : we - V > q ? "forwards" : !0;
  }
  async function Ce(Q) {
    const me = O.scrollTop;
    x = H.children;
    const V = r.length < _, $ = y7(x[1], "border-top-width"), we = 0;
    V && await De(r.length - 1, { behavior: "auto" });
    let ye = 0;
    for (let Ve = 0; Ve < x.length; Ve += 1)
      M[_ + Ve] = x[Ve].getBoundingClientRect().height;
    let K = 0, Ee = U + $ / 2, Ae = [];
    for (; K < r.length; ) {
      const Ve = M[K] || E;
      if (Ae[K] = Ve, Ee + Ve + we > me) {
        ye = K, n(6, C = Ee - (U + $ / 2));
        break;
      }
      Ee += Ve, K += 1;
    }
    for (ye = Math.max(0, ye); K < r.length; ) {
      const Ve = M[K] || E;
      if (Ee += Ve, K += 1, Ee > me + q)
        break;
    }
    n(10, _ = ye), n(11, v = K);
    const Je = r.length - v;
    v === 0 && n(11, v = 10), n(1, E = (Ee - U) / v);
    let Ie = Je * E;
    for (; K < r.length; )
      K += 1, M[K] = E;
    n(2, z = Ie), isFinite(z) || n(2, z = 2e5);
  }
  async function De(Q, me, V = !1) {
    await Qs();
    const $ = E;
    let we = Q * $;
    V && (we = we - q + $ + U);
    const ye = O.offsetHeight - O.clientHeight;
    ye > 0 && (we += ye);
    const K = {
      top: we,
      behavior: "smooth",
      ...me
    };
    O.scrollTo(K);
  }
  d7(() => {
    x = H.children, n(18, A = !0), ie(u);
  });
  function ce() {
    U = this.offsetHeight, n(4, U);
  }
  function he(Q) {
    l1[Q ? "unshift" : "push"](() => {
      H = Q, n(3, H);
    });
  }
  function se() {
    N = this.offsetHeight, n(5, N);
  }
  function Ne(Q) {
    l1[Q ? "unshift" : "push"](() => {
      O = Q, n(7, O);
    });
  }
  function de() {
    var Q;
    J = (Q = s7.entries.get(this)) == null ? void 0 : Q.contentRect, n(0, J);
  }
  return t.$$set = (Q) => {
    "items" in Q && n(14, u = Q.items), "max_height" in Q && n(15, c = Q.max_height), "actual_height" in Q && n(12, h = Q.actual_height), "table_scrollbar_width" in Q && n(13, p = Q.table_scrollbar_width), "start" in Q && n(10, _ = Q.start), "end" in Q && n(11, v = Q.end), "selected" in Q && n(16, k = Q.selected), "$$scope" in Q && n(20, o = Q.$$scope);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*viewport_box*/
    1 && (q = p1([J, "optionalAccess", (Q) => Q.height]) || 0), t.$$.dirty[0] & /*items*/
    16384 && n(19, r = u), t.$$.dirty[0] & /*mounted, sortedItems*/
    786432 && A && requestAnimationFrame(() => ie(r)), t.$$.dirty[0] & /*selected*/
    65536 && te(k), t.$$.dirty[0] & /*sortedItems, start, end*/
    527360 && n(8, R = r.slice(_, v).map((Q, me) => ({ index: me + _, data: Q })));
  }, [
    J,
    E,
    z,
    H,
    U,
    N,
    C,
    O,
    R,
    Ce,
    _,
    v,
    h,
    p,
    u,
    c,
    k,
    De,
    A,
    r,
    o,
    l,
    ce,
    he,
    se,
    Ne,
    de
  ];
}
class k7 extends i7 {
  constructor(e) {
    super(), l7(
      this,
      e,
      v7,
      b7,
      c7,
      {
        items: 14,
        max_height: 15,
        actual_height: 12,
        table_scrollbar_width: 13,
        start: 10,
        end: 11,
        selected: 16,
        scroll_to_index: 17
      },
      null,
      [-1, -1]
    );
  }
  get scroll_to_index() {
    return this.$$.ctx[17];
  }
}
const {
  ResizeObserverSingleton: D7,
  SvelteComponent: A7,
  action_destroyer: S7,
  add_flush_callback: x0,
  append: rt,
  attr: pe,
  bind: T0,
  binding_callbacks: In,
  check_outros: o0,
  create_component: N0,
  destroy_component: z0,
  detach: Tt,
  element: vt,
  empty: us,
  ensure_array_like: A0,
  group_outros: u0,
  init: E7,
  insert: Ft,
  listen: S0,
  mount_component: R0,
  outro_and_destroy_block: Ni,
  resize_observer_content_box: x7,
  run_all: Qh,
  safe_not_equal: T7,
  set_data: ks,
  set_style: F0,
  space: fn,
  svg_element: C0,
  text: Ds,
  toggle_class: Et,
  transition_in: mt,
  transition_out: Rt,
  update_keyed_each: zi
} = window.__gradio__svelte__internal, { createEventDispatcher: F7, tick: Ks, onMount: C7 } = window.__gradio__svelte__internal;
function g1(t, e, n) {
  const r = t.slice();
  return r[89] = e[n].value, r[90] = e[n].id, r[93] = e, r[94] = n, r;
}
function _1(t, e, n) {
  const r = t.slice();
  return r[89] = e[n].value, r[90] = e[n].id, r[91] = e, r[92] = n, r;
}
function b1(t, e, n) {
  const r = t.slice();
  return r[89] = e[n].value, r[90] = e[n].id, r[95] = e, r[92] = n, r;
}
function w1(t, e, n) {
  const r = t.slice();
  return r[89] = e[n].value, r[90] = e[n].id, r[94] = n, r;
}
function y1(t) {
  let e, n;
  return {
    c() {
      e = vt("p"), n = Ds(
        /*label*/
        t[1]
      ), pe(e, "class", "svelte-13e3mz4");
    },
    m(r, l) {
      Ft(r, e, l), rt(e, n);
    },
    p(r, l) {
      l[0] & /*label*/
      2 && ks(
        n,
        /*label*/
        r[1]
      );
    },
    d(r) {
      r && Tt(e);
    }
  };
}
function v1(t) {
  let e, n;
  return {
    c() {
      e = vt("caption"), n = Ds(
        /*label*/
        t[1]
      ), pe(e, "class", "sr-only");
    },
    m(r, l) {
      Ft(r, e, l), rt(e, n);
    },
    p(r, l) {
      l[0] & /*label*/
      2 && ks(
        n,
        /*label*/
        r[1]
      );
    },
    d(r) {
      r && Tt(e);
    }
  };
}
function k1(t, e) {
  let n, r, l, o, u, c, h, p, _, v, k;
  return l = new Qi({
    props: {
      value: (
        /*value*/
        e[89]
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        e[5]
      ),
      line_breaks: (
        /*line_breaks*/
        e[11]
      ),
      header: !0,
      edit: !1,
      el: null
    }
  }), {
    key: t,
    first: null,
    c() {
      n = vt("th"), r = vt("div"), N0(l.$$.fragment), o = fn(), u = vt("div"), c = C0("svg"), h = C0("path"), _ = fn(), pe(h, "d", "M4.49999 0L8.3971 6.75H0.602875L4.49999 0Z"), pe(c, "width", "1em"), pe(c, "height", "1em"), pe(c, "viewBox", "0 0 9 7"), pe(c, "fill", "none"), pe(c, "xmlns", "http://www.w3.org/2000/svg"), pe(c, "class", "svelte-13e3mz4"), pe(u, "class", p = "sort-button " + /*sort_direction*/
      e[18] + " svelte-13e3mz4"), Et(
        u,
        "sorted",
        /*sort_by*/
        e[19] === /*i*/
        e[94]
      ), Et(
        u,
        "des",
        /*sort_by*/
        e[19] === /*i*/
        e[94] && /*sort_direction*/
        e[18] === "des"
      ), pe(r, "class", "cell-wrap svelte-13e3mz4"), pe(n, "aria-sort", v = /*get_sort_status*/
      e[36](
        /*value*/
        e[89],
        /*sort_by*/
        e[19],
        /*sort_direction*/
        e[18]
      )), pe(n, "class", "svelte-13e3mz4"), Et(
        n,
        "editing",
        /*header_edit*/
        e[26] === /*i*/
        e[94]
      ), F0(
        n,
        "width",
        /*column_widths*/
        e[12].length ? (
          /*column_widths*/
          e[12][
            /*i*/
            e[94]
          ]
        ) : void 0
      ), this.first = n;
    },
    m(E, z) {
      Ft(E, n, z), rt(n, r), R0(l, r, null), rt(r, o), rt(r, u), rt(u, c), rt(c, h), rt(n, _), k = !0;
    },
    p(E, z) {
      e = E;
      const H = {};
      z[0] & /*_headers*/
      16777216 && (H.value = /*value*/
      e[89]), z[0] & /*latex_delimiters*/
      32 && (H.latex_delimiters = /*latex_delimiters*/
      e[5]), z[0] & /*line_breaks*/
      2048 && (H.line_breaks = /*line_breaks*/
      e[11]), l.$set(H), (!k || z[0] & /*sort_direction*/
      262144 && p !== (p = "sort-button " + /*sort_direction*/
      e[18] + " svelte-13e3mz4")) && pe(u, "class", p), (!k || z[0] & /*sort_direction, sort_by, _headers*/
      17563648) && Et(
        u,
        "sorted",
        /*sort_by*/
        e[19] === /*i*/
        e[94]
      ), (!k || z[0] & /*sort_direction, sort_by, _headers, sort_direction*/
      17563648) && Et(
        u,
        "des",
        /*sort_by*/
        e[19] === /*i*/
        e[94] && /*sort_direction*/
        e[18] === "des"
      ), (!k || z[0] & /*_headers, sort_by, sort_direction*/
      17563648 && v !== (v = /*get_sort_status*/
      e[36](
        /*value*/
        e[89],
        /*sort_by*/
        e[19],
        /*sort_direction*/
        e[18]
      ))) && pe(n, "aria-sort", v), (!k || z[0] & /*header_edit, _headers*/
      83886080) && Et(
        n,
        "editing",
        /*header_edit*/
        e[26] === /*i*/
        e[94]
      ), z[0] & /*column_widths, _headers*/
      16781312 && F0(
        n,
        "width",
        /*column_widths*/
        e[12].length ? (
          /*column_widths*/
          e[12][
            /*i*/
            e[94]
          ]
        ) : void 0
      );
    },
    i(E) {
      k || (mt(l.$$.fragment, E), k = !0);
    },
    o(E) {
      Rt(l.$$.fragment, E), k = !1;
    },
    d(E) {
      E && Tt(n), z0(l);
    }
  };
}
function D1(t, e) {
  let n, r, l, o, u = (
    /*j*/
    e[92]
  ), c;
  l = new Qi({
    props: {
      value: (
        /*value*/
        e[89]
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        e[5]
      ),
      line_breaks: (
        /*line_breaks*/
        e[11]
      ),
      datatype: Array.isArray(
        /*datatype*/
        e[0]
      ) ? (
        /*datatype*/
        e[0][
          /*j*/
          e[92]
        ]
      ) : (
        /*datatype*/
        e[0]
      ),
      edit: !1,
      el: null
    }
  });
  const h = () => (
    /*td_binding*/
    e[53](n, u)
  ), p = () => (
    /*td_binding*/
    e[53](null, u)
  );
  return {
    key: t,
    first: null,
    c() {
      n = vt("td"), r = vt("div"), N0(l.$$.fragment), o = fn(), pe(r, "class", "cell-wrap svelte-13e3mz4"), pe(n, "tabindex", "-1"), pe(n, "class", "svelte-13e3mz4"), this.first = n;
    },
    m(_, v) {
      Ft(_, n, v), rt(n, r), R0(l, r, null), rt(n, o), h(), c = !0;
    },
    p(_, v) {
      e = _;
      const k = {};
      v[1] & /*max*/
      16 && (k.value = /*value*/
      e[89]), v[0] & /*latex_delimiters*/
      32 && (k.latex_delimiters = /*latex_delimiters*/
      e[5]), v[0] & /*line_breaks*/
      2048 && (k.line_breaks = /*line_breaks*/
      e[11]), v[0] & /*datatype*/
      1 | v[1] & /*max*/
      16 && (k.datatype = Array.isArray(
        /*datatype*/
        e[0]
      ) ? (
        /*datatype*/
        e[0][
          /*j*/
          e[92]
        ]
      ) : (
        /*datatype*/
        e[0]
      )), l.$set(k), u !== /*j*/
      e[92] && (p(), u = /*j*/
      e[92], h());
    },
    i(_) {
      c || (mt(l.$$.fragment, _), c = !0);
    },
    o(_) {
      Rt(l.$$.fragment, _), c = !1;
    },
    d(_) {
      _ && Tt(n), z0(l), p();
    }
  };
}
function A1(t) {
  let e, n;
  return {
    c() {
      e = vt("caption"), n = Ds(
        /*label*/
        t[1]
      ), pe(e, "class", "sr-only");
    },
    m(r, l) {
      Ft(r, e, l), rt(e, n);
    },
    p(r, l) {
      l[0] & /*label*/
      2 && ks(
        n,
        /*label*/
        r[1]
      );
    },
    d(r) {
      r && Tt(e);
    }
  };
}
function M7(t) {
  let e, n = (
    /*label*/
    t[1] && /*label*/
    t[1].length !== 0 && A1(t)
  );
  return {
    c() {
      n && n.c(), e = us();
    },
    m(r, l) {
      n && n.m(r, l), Ft(r, e, l);
    },
    p(r, l) {
      /*label*/
      r[1] && /*label*/
      r[1].length !== 0 ? n ? n.p(r, l) : (n = A1(r), n.c(), n.m(e.parentNode, e)) : n && (n.d(1), n = null);
    },
    d(r) {
      r && Tt(e), n && n.d(r);
    }
  };
}
function S1(t) {
  let e, n, r, l, o, u, c, h, p, _, v, k, E, z, H;
  function U(C) {
    t[62](
      C,
      /*i*/
      t[94]
    );
  }
  function N(C) {
    t[63](
      C,
      /*id*/
      t[90]
    );
  }
  function M() {
    return (
      /*dblclick_handler_1*/
      t[64](
        /*i*/
        t[94]
      )
    );
  }
  let A = {
    latex_delimiters: (
      /*latex_delimiters*/
      t[5]
    ),
    line_breaks: (
      /*line_breaks*/
      t[11]
    ),
    edit: (
      /*header_edit*/
      t[26] === /*i*/
      t[94]
    ),
    select_on_focus: (
      /*select_on_focus*/
      t[27]
    ),
    header: !0
  };
  /*_headers*/
  t[24][
    /*i*/
    t[94]
  ].value !== void 0 && (A.value = /*_headers*/
  t[24][
    /*i*/
    t[94]
  ].value), /*els*/
  t[23][
    /*id*/
    t[90]
  ].input !== void 0 && (A.el = /*els*/
  t[23][
    /*id*/
    t[90]
  ].input), r = new Qi({ props: A }), In.push(() => T0(r, "value", U)), In.push(() => T0(r, "el", N)), r.$on(
    "keydown",
    /*end_header_edit*/
    t[42]
  ), r.$on("dblclick", M);
  function x() {
    return (
      /*click_handler_1*/
      t[65](
        /*i*/
        t[94]
      )
    );
  }
  return {
    c() {
      e = vt("th"), n = vt("div"), N0(r.$$.fragment), u = fn(), c = vt("div"), h = C0("svg"), p = C0("path"), v = fn(), pe(p, "d", "M4.49999 0L8.3971 6.75H0.602875L4.49999 0Z"), pe(h, "width", "1em"), pe(h, "height", "1em"), pe(h, "viewBox", "0 0 9 7"), pe(h, "fill", "none"), pe(h, "xmlns", "http://www.w3.org/2000/svg"), pe(h, "class", "svelte-13e3mz4"), pe(c, "class", _ = "sort-button " + /*sort_direction*/
      t[18] + " svelte-13e3mz4"), Et(
        c,
        "sorted",
        /*sort_by*/
        t[19] === /*i*/
        t[94]
      ), Et(
        c,
        "des",
        /*sort_by*/
        t[19] === /*i*/
        t[94] && /*sort_direction*/
        t[18] === "des"
      ), pe(n, "class", "cell-wrap svelte-13e3mz4"), pe(e, "aria-sort", k = /*get_sort_status*/
      t[36](
        /*value*/
        t[89],
        /*sort_by*/
        t[19],
        /*sort_direction*/
        t[18]
      )), F0(e, "width", "var(--cell-width-" + /*i*/
      t[94] + ")"), pe(e, "class", "svelte-13e3mz4"), Et(
        e,
        "focus",
        /*header_edit*/
        t[26] === /*i*/
        t[94] || /*selected_header*/
        t[28] === /*i*/
        t[94]
      );
    },
    m(C, O) {
      Ft(C, e, O), rt(e, n), R0(r, n, null), rt(n, u), rt(n, c), rt(c, h), rt(h, p), rt(e, v), E = !0, z || (H = S0(c, "click", x), z = !0);
    },
    p(C, O) {
      t = C;
      const q = {};
      O[0] & /*latex_delimiters*/
      32 && (q.latex_delimiters = /*latex_delimiters*/
      t[5]), O[0] & /*line_breaks*/
      2048 && (q.line_breaks = /*line_breaks*/
      t[11]), O[0] & /*header_edit, _headers*/
      83886080 && (q.edit = /*header_edit*/
      t[26] === /*i*/
      t[94]), O[0] & /*select_on_focus*/
      134217728 && (q.select_on_focus = /*select_on_focus*/
      t[27]), !l && O[0] & /*_headers*/
      16777216 && (l = !0, q.value = /*_headers*/
      t[24][
        /*i*/
        t[94]
      ].value, x0(() => l = !1)), !o && O[0] & /*els, _headers*/
      25165824 && (o = !0, q.el = /*els*/
      t[23][
        /*id*/
        t[90]
      ].input, x0(() => o = !1)), r.$set(q), (!E || O[0] & /*sort_direction*/
      262144 && _ !== (_ = "sort-button " + /*sort_direction*/
      t[18] + " svelte-13e3mz4")) && pe(c, "class", _), (!E || O[0] & /*sort_direction, sort_by, _headers*/
      17563648) && Et(
        c,
        "sorted",
        /*sort_by*/
        t[19] === /*i*/
        t[94]
      ), (!E || O[0] & /*sort_direction, sort_by, _headers, sort_direction*/
      17563648) && Et(
        c,
        "des",
        /*sort_by*/
        t[19] === /*i*/
        t[94] && /*sort_direction*/
        t[18] === "des"
      ), (!E || O[0] & /*_headers, sort_by, sort_direction*/
      17563648 && k !== (k = /*get_sort_status*/
      t[36](
        /*value*/
        t[89],
        /*sort_by*/
        t[19],
        /*sort_direction*/
        t[18]
      ))) && pe(e, "aria-sort", k), (!E || O[0] & /*_headers*/
      16777216) && F0(e, "width", "var(--cell-width-" + /*i*/
      t[94] + ")"), (!E || O[0] & /*header_edit, _headers, selected_header*/
      352321536) && Et(
        e,
        "focus",
        /*header_edit*/
        t[26] === /*i*/
        t[94] || /*selected_header*/
        t[28] === /*i*/
        t[94]
      );
    },
    i(C) {
      E || (mt(r.$$.fragment, C), E = !0);
    },
    o(C) {
      Rt(r.$$.fragment, C), E = !1;
    },
    d(C) {
      C && Tt(e), z0(r), z = !1, H();
    }
  };
}
function E1(t, e) {
  let n, r = !/*hide_columns*/
  e[13].includes(
    /*value*/
    e[89]
  ), l, o, u = r && S1(e);
  return {
    key: t,
    first: null,
    c() {
      n = us(), u && u.c(), l = us(), this.first = n;
    },
    m(c, h) {
      Ft(c, n, h), u && u.m(c, h), Ft(c, l, h), o = !0;
    },
    p(c, h) {
      e = c, h[0] & /*hide_columns, _headers*/
      16785408 && (r = !/*hide_columns*/
      e[13].includes(
        /*value*/
        e[89]
      )), r ? u ? (u.p(e, h), h[0] & /*hide_columns, _headers*/
      16785408 && mt(u, 1)) : (u = S1(e), u.c(), mt(u, 1), u.m(l.parentNode, l)) : u && (u0(), Rt(u, 1, 1, () => {
        u = null;
      }), o0());
    },
    i(c) {
      o || (mt(u), o = !0);
    },
    o(c) {
      Rt(u), o = !1;
    },
    d(c) {
      c && (Tt(n), Tt(l)), u && u.d(c);
    }
  };
}
function B7(t) {
  let e, n = [], r = /* @__PURE__ */ new Map(), l, o = A0(
    /*_headers*/
    t[24]
  );
  const u = (c) => (
    /*id*/
    c[90]
  );
  for (let c = 0; c < o.length; c += 1) {
    let h = g1(t, o, c), p = u(h);
    r.set(p, n[c] = E1(p, h));
  }
  return {
    c() {
      e = vt("tr");
      for (let c = 0; c < n.length; c += 1)
        n[c].c();
      pe(e, "slot", "thead"), pe(e, "class", "svelte-13e3mz4");
    },
    m(c, h) {
      Ft(c, e, h);
      for (let p = 0; p < n.length; p += 1)
        n[p] && n[p].m(e, null);
      l = !0;
    },
    p(c, h) {
      h[0] & /*_headers, sort_by, sort_direction, header_edit, selected_header, latex_delimiters, line_breaks, select_on_focus, els, hide_columns*/
      495724576 | h[1] & /*get_sort_status, handle_sort, end_header_edit, edit_header*/
      3616 && (o = A0(
        /*_headers*/
        c[24]
      ), u0(), n = zi(n, h, u, 1, c, o, r, e, Ni, E1, null, g1), o0());
    },
    i(c) {
      if (!l) {
        for (let h = 0; h < o.length; h += 1)
          mt(n[h]);
        l = !0;
      }
    },
    o(c) {
      for (let h = 0; h < n.length; h += 1)
        Rt(n[h]);
      l = !1;
    },
    d(c) {
      c && Tt(e);
      for (let h = 0; h < n.length; h += 1)
        n[h].d();
    }
  };
}
function x1(t) {
  var M, A;
  let e, n, r, l, o, u, c, h = `var(--cell-width-${/*j*/
  t[92]})`, p, _, v;
  function k(x) {
    t[56](
      x,
      /*index*/
      t[87],
      /*j*/
      t[92]
    );
  }
  function E(x) {
    t[57](
      x,
      /*id*/
      t[90]
    );
  }
  let z = {
    display_value: (
      /*display_value*/
      (A = (M = t[14]) == null ? void 0 : M[
        /*index*/
        t[87]
      ]) == null ? void 0 : A[
        /*j*/
        t[92]
      ]
    ),
    latex_delimiters: (
      /*latex_delimiters*/
      t[5]
    ),
    line_breaks: (
      /*line_breaks*/
      t[11]
    ),
    editable: (
      /*editable*/
      t[6]
    ),
    edit: Fn(
      /*editing*/
      t[22],
      [
        /*index*/
        t[87],
        /*j*/
        t[92]
      ]
    ),
    datatype: Array.isArray(
      /*datatype*/
      t[0]
    ) ? (
      /*datatype*/
      t[0][
        /*j*/
        t[92]
      ]
    ) : (
      /*datatype*/
      t[0]
    ),
    clear_on_focus: (
      /*clear_on_focus*/
      t[25]
    )
  };
  /*data*/
  t[17][
    /*index*/
    t[87]
  ][
    /*j*/
    t[92]
  ].value !== void 0 && (z.value = /*data*/
  t[17][
    /*index*/
    t[87]
  ][
    /*j*/
    t[92]
  ].value), /*els*/
  t[23][
    /*id*/
    t[90]
  ].input !== void 0 && (z.el = /*els*/
  t[23][
    /*id*/
    t[90]
  ].input), r = new Qi({ props: z }), In.push(() => T0(r, "value", k)), In.push(() => T0(r, "el", E)), r.$on(
    "blur",
    /*blur_handler*/
    t[58]
  );
  function H() {
    return (
      /*touchstart_handler*/
      t[59](
        /*index*/
        t[87],
        /*j*/
        t[92]
      )
    );
  }
  function U() {
    return (
      /*click_handler*/
      t[60](
        /*index*/
        t[87],
        /*j*/
        t[92]
      )
    );
  }
  function N() {
    return (
      /*dblclick_handler*/
      t[61](
        /*index*/
        t[87],
        /*j*/
        t[92]
      )
    );
  }
  return {
    c() {
      var x, C;
      e = vt("td"), n = vt("div"), N0(r.$$.fragment), u = fn(), pe(n, "class", "cell-wrap svelte-13e3mz4"), pe(e, "tabindex", "0"), pe(e, "style", c = /*styling*/
      ((C = (x = t[15]) == null ? void 0 : x[
        /*index*/
        t[87]
      ]) == null ? void 0 : C[
        /*j*/
        t[92]
      ]) || ""), pe(e, "class", "svelte-13e3mz4"), Et(e, "focus", Fn(
        /*selected*/
        t[16],
        [
          /*index*/
          t[87],
          /*j*/
          t[92]
        ]
      )), F0(e, "width", h);
    },
    m(x, C) {
      Ft(x, e, C), rt(e, n), R0(r, n, null), rt(e, u), p = !0, _ || (v = [
        S0(e, "touchstart", H, { passive: !0 }),
        S0(e, "click", U),
        S0(e, "dblclick", N)
      ], _ = !0);
    },
    p(x, C) {
      var R, J, ne, ie;
      t = x;
      const O = {};
      C[0] & /*display_value*/
      16384 | C[2] & /*index, item*/
      100663296 && (O.display_value = /*display_value*/
      (J = (R = t[14]) == null ? void 0 : R[
        /*index*/
        t[87]
      ]) == null ? void 0 : J[
        /*j*/
        t[92]
      ]), C[0] & /*latex_delimiters*/
      32 && (O.latex_delimiters = /*latex_delimiters*/
      t[5]), C[0] & /*line_breaks*/
      2048 && (O.line_breaks = /*line_breaks*/
      t[11]), C[0] & /*editable*/
      64 && (O.editable = /*editable*/
      t[6]), C[0] & /*editing*/
      4194304 | C[2] & /*index, item*/
      100663296 && (O.edit = Fn(
        /*editing*/
        t[22],
        [
          /*index*/
          t[87],
          /*j*/
          t[92]
        ]
      )), C[0] & /*datatype*/
      1 | C[2] & /*item*/
      67108864 && (O.datatype = Array.isArray(
        /*datatype*/
        t[0]
      ) ? (
        /*datatype*/
        t[0][
          /*j*/
          t[92]
        ]
      ) : (
        /*datatype*/
        t[0]
      )), C[0] & /*clear_on_focus*/
      33554432 && (O.clear_on_focus = /*clear_on_focus*/
      t[25]), !l && C[0] & /*data*/
      131072 | C[2] & /*index, item*/
      100663296 && (l = !0, O.value = /*data*/
      t[17][
        /*index*/
        t[87]
      ][
        /*j*/
        t[92]
      ].value, x0(() => l = !1)), !o && C[0] & /*els*/
      8388608 | C[2] & /*item*/
      67108864 && (o = !0, O.el = /*els*/
      t[23][
        /*id*/
        t[90]
      ].input, x0(() => o = !1)), r.$set(O), (!p || C[0] & /*styling*/
      32768 | C[2] & /*index, item*/
      100663296 && c !== (c = /*styling*/
      ((ie = (ne = t[15]) == null ? void 0 : ne[
        /*index*/
        t[87]
      ]) == null ? void 0 : ie[
        /*j*/
        t[92]
      ]) || "")) && pe(e, "style", c), (!p || C[0] & /*selected*/
      65536 | C[2] & /*index, item*/
      100663296) && Et(e, "focus", Fn(
        /*selected*/
        t[16],
        [
          /*index*/
          t[87],
          /*j*/
          t[92]
        ]
      ));
      const q = C[0] & /*styling*/
      32768 | C[2] & /*index, item*/
      100663296;
      (C[0] & /*styling*/
      32768 | C[2] & /*item, index*/
      100663296 && h !== (h = `var(--cell-width-${/*j*/
      t[92]})`) || q) && F0(e, "width", h);
    },
    i(x) {
      p || (mt(r.$$.fragment, x), p = !0);
    },
    o(x) {
      Rt(r.$$.fragment, x), p = !1;
    },
    d(x) {
      x && Tt(e), z0(r), _ = !1, Qh(v);
    }
  };
}
function T1(t, e) {
  let n, r = !/*hide_columns*/
  e[13].includes(
    /*_headers*/
    e[24][
      /*j*/
      e[92]
    ].value
  ), l, o, u = r && x1(e);
  return {
    key: t,
    first: null,
    c() {
      n = us(), u && u.c(), l = us(), this.first = n;
    },
    m(c, h) {
      Ft(c, n, h), u && u.m(c, h), Ft(c, l, h), o = !0;
    },
    p(c, h) {
      e = c, h[0] & /*hide_columns, _headers*/
      16785408 | h[2] & /*item*/
      67108864 && (r = !/*hide_columns*/
      e[13].includes(
        /*_headers*/
        e[24][
          /*j*/
          e[92]
        ].value
      )), r ? u ? (u.p(e, h), h[0] & /*hide_columns, _headers*/
      16785408 | h[2] & /*item*/
      67108864 && mt(u, 1)) : (u = x1(e), u.c(), mt(u, 1), u.m(l.parentNode, l)) : u && (u0(), Rt(u, 1, 1, () => {
        u = null;
      }), o0());
    },
    i(c) {
      o || (mt(u), o = !0);
    },
    o(c) {
      Rt(u), o = !1;
    },
    d(c) {
      c && (Tt(n), Tt(l)), u && u.d(c);
    }
  };
}
function N7(t) {
  let e, n = [], r = /* @__PURE__ */ new Map(), l, o = A0(
    /*item*/
    t[88]
  );
  const u = (c) => (
    /*id*/
    c[90]
  );
  for (let c = 0; c < o.length; c += 1) {
    let h = _1(t, o, c), p = u(h);
    r.set(p, n[c] = T1(p, h));
  }
  return {
    c() {
      e = vt("tr");
      for (let c = 0; c < n.length; c += 1)
        n[c].c();
      pe(e, "slot", "tbody"), pe(e, "class", "svelte-13e3mz4"), Et(
        e,
        "row_odd",
        /*index*/
        t[87] % 2 === 0
      );
    },
    m(c, h) {
      Ft(c, e, h);
      for (let p = 0; p < n.length; p += 1)
        n[p] && n[p].m(e, null);
      l = !0;
    },
    p(c, h) {
      h[0] & /*styling, selected, display_value, latex_delimiters, line_breaks, editable, editing, datatype, clear_on_focus, data, els, parent, hide_columns, _headers*/
      1136912481 | h[1] & /*start_edit, handle_cell_click*/
      320 | h[2] & /*index, item*/
      100663296 && (o = A0(
        /*item*/
        c[88]
      ), u0(), n = zi(n, h, u, 1, c, o, r, e, Ni, T1, null, _1), o0()), (!l || h[2] & /*index*/
      33554432) && Et(
        e,
        "row_odd",
        /*index*/
        c[87] % 2 === 0
      );
    },
    i(c) {
      if (!l) {
        for (let h = 0; h < o.length; h += 1)
          mt(n[h]);
        l = !0;
      }
    },
    o(c) {
      for (let h = 0; h < n.length; h += 1)
        Rt(n[h]);
      l = !1;
    },
    d(c) {
      c && Tt(e);
      for (let h = 0; h < n.length; h += 1)
        n[h].d();
    }
  };
}
function z7(t) {
  let e, n, r, l, o;
  function u(_) {
    t[66](_);
  }
  function c(_) {
    t[67](_);
  }
  function h(_) {
    t[68](_);
  }
  let p = {
    max_height: (
      /*height*/
      t[10]
    ),
    selected: (
      /*selected_index*/
      t[34]
    ),
    $$slots: {
      tbody: [
        N7,
        ({ index: _, item: v }) => ({ 87: _, 88: v }),
        ({ index: _, item: v }) => [0, 0, (_ ? 33554432 : 0) | (v ? 67108864 : 0)]
      ],
      thead: [B7],
      default: [M7]
    },
    $$scope: { ctx: t }
  };
  return (
    /*data*/
    t[17] !== void 0 && (p.items = /*data*/
    t[17]), /*table_height*/
    t[32] !== void 0 && (p.actual_height = /*table_height*/
    t[32]), /*scrollbar_width*/
    t[33] !== void 0 && (p.table_scrollbar_width = /*scrollbar_width*/
    t[33]), e = new k7({ props: p }), In.push(() => T0(e, "items", u)), In.push(() => T0(e, "actual_height", c)), In.push(() => T0(e, "table_scrollbar_width", h)), {
      c() {
        N0(e.$$.fragment);
      },
      m(_, v) {
        R0(e, _, v), o = !0;
      },
      p(_, v) {
        const k = {};
        v[0] & /*height*/
        1024 && (k.max_height = /*height*/
        _[10]), v[1] & /*selected_index*/
        8 && (k.selected = /*selected_index*/
        _[34]), v[0] & /*styling, selected, display_value, latex_delimiters, line_breaks, editable, editing, datatype, clear_on_focus, data, els, parent, hide_columns, _headers, sort_by, sort_direction, header_edit, selected_header, select_on_focus, label*/
        1607460963 | v[2] & /*index, item*/
        100663296 | v[3] & /*$$scope*/
        16 && (k.$$scope = { dirty: v, ctx: _ }), !n && v[0] & /*data*/
        131072 && (n = !0, k.items = /*data*/
        _[17], x0(() => n = !1)), !r && v[1] & /*table_height*/
        2 && (r = !0, k.actual_height = /*table_height*/
        _[32], x0(() => r = !1)), !l && v[1] & /*scrollbar_width*/
        4 && (l = !0, k.table_scrollbar_width = /*scrollbar_width*/
        _[33], x0(() => l = !1)), e.$set(k);
      },
      i(_) {
        o || (mt(e.$$.fragment, _), o = !0);
      },
      o(_) {
        Rt(e.$$.fragment, _), o = !1;
      },
      d(_) {
        z0(e, _);
      }
    }
  );
}
function F1(t) {
  let e, n, r, l = (
    /*row_count*/
    t[4][1] === "dynamic" && C1(t)
  ), o = (
    /*col_count*/
    t[3][1] === "dynamic" && M1(t)
  );
  return {
    c() {
      e = vt("div"), l && l.c(), n = fn(), o && o.c(), pe(e, "class", "controls-wrap svelte-13e3mz4");
    },
    m(u, c) {
      Ft(u, e, c), l && l.m(e, null), rt(e, n), o && o.m(e, null), r = !0;
    },
    p(u, c) {
      /*row_count*/
      u[4][1] === "dynamic" ? l ? (l.p(u, c), c[0] & /*row_count*/
      16 && mt(l, 1)) : (l = C1(u), l.c(), mt(l, 1), l.m(e, n)) : l && (u0(), Rt(l, 1, 1, () => {
        l = null;
      }), o0()), /*col_count*/
      u[3][1] === "dynamic" ? o ? (o.p(u, c), c[0] & /*col_count*/
      8 && mt(o, 1)) : (o = M1(u), o.c(), mt(o, 1), o.m(e, null)) : o && (u0(), Rt(o, 1, 1, () => {
        o = null;
      }), o0());
    },
    i(u) {
      r || (mt(l), mt(o), r = !0);
    },
    o(u) {
      Rt(l), Rt(o), r = !1;
    },
    d(u) {
      u && Tt(e), l && l.d(), o && o.d();
    }
  };
}
function C1(t) {
  let e, n, r;
  return n = new bh({
    props: {
      variant: "secondary",
      size: "sm",
      $$slots: { default: [R7] },
      $$scope: { ctx: t }
    }
  }), n.$on(
    "click",
    /*click_handler_2*/
    t[73]
  ), {
    c() {
      e = vt("span"), N0(n.$$.fragment), pe(e, "class", "button-wrap svelte-13e3mz4");
    },
    m(l, o) {
      Ft(l, e, o), R0(n, e, null), r = !0;
    },
    p(l, o) {
      const u = {};
      o[0] & /*i18n*/
      512 | o[3] & /*$$scope*/
      16 && (u.$$scope = { dirty: o, ctx: l }), n.$set(u);
    },
    i(l) {
      r || (mt(n.$$.fragment, l), r = !0);
    },
    o(l) {
      Rt(n.$$.fragment, l), r = !1;
    },
    d(l) {
      l && Tt(e), z0(n);
    }
  };
}
function R7(t) {
  let e, n, r, l = (
    /*i18n*/
    t[9]("dataframe.new_row") + ""
  ), o;
  return {
    c() {
      e = C0("svg"), n = C0("path"), r = fn(), o = Ds(l), pe(n, "fill", "currentColor"), pe(n, "d", "M24.59 16.59L17 24.17V4h-2v20.17l-7.59-7.58L6 18l10 10l10-10l-1.41-1.41z"), pe(e, "xmlns", "http://www.w3.org/2000/svg"), pe(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), pe(e, "aria-hidden", "true"), pe(e, "role", "img"), pe(e, "width", "1em"), pe(e, "height", "1em"), pe(e, "preserveAspectRatio", "xMidYMid meet"), pe(e, "viewBox", "0 0 32 32"), pe(e, "class", "svelte-13e3mz4");
    },
    m(u, c) {
      Ft(u, e, c), rt(e, n), Ft(u, r, c), Ft(u, o, c);
    },
    p(u, c) {
      c[0] & /*i18n*/
      512 && l !== (l = /*i18n*/
      u[9]("dataframe.new_row") + "") && ks(o, l);
    },
    d(u) {
      u && (Tt(e), Tt(r), Tt(o));
    }
  };
}
function M1(t) {
  let e, n, r;
  return n = new bh({
    props: {
      variant: "secondary",
      size: "sm",
      $$slots: { default: [O7] },
      $$scope: { ctx: t }
    }
  }), n.$on(
    "click",
    /*click_handler_3*/
    t[74]
  ), {
    c() {
      e = vt("span"), N0(n.$$.fragment), pe(e, "class", "button-wrap svelte-13e3mz4");
    },
    m(l, o) {
      Ft(l, e, o), R0(n, e, null), r = !0;
    },
    p(l, o) {
      const u = {};
      o[0] & /*i18n*/
      512 | o[3] & /*$$scope*/
      16 && (u.$$scope = { dirty: o, ctx: l }), n.$set(u);
    },
    i(l) {
      r || (mt(n.$$.fragment, l), r = !0);
    },
    o(l) {
      Rt(n.$$.fragment, l), r = !1;
    },
    d(l) {
      l && Tt(e), z0(n);
    }
  };
}
function O7(t) {
  let e, n, r, l = (
    /*i18n*/
    t[9]("dataframe.new_column") + ""
  ), o;
  return {
    c() {
      e = C0("svg"), n = C0("path"), r = fn(), o = Ds(l), pe(n, "fill", "currentColor"), pe(n, "d", "m18 6l-1.43 1.393L24.15 15H4v2h20.15l-7.58 7.573L18 26l10-10L18 6z"), pe(e, "xmlns", "http://www.w3.org/2000/svg"), pe(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), pe(e, "aria-hidden", "true"), pe(e, "role", "img"), pe(e, "width", "1em"), pe(e, "height", "1em"), pe(e, "preserveAspectRatio", "xMidYMid meet"), pe(e, "viewBox", "0 0 32 32"), pe(e, "class", "svelte-13e3mz4");
    },
    m(u, c) {
      Ft(u, e, c), rt(e, n), Ft(u, r, c), Ft(u, o, c);
    },
    p(u, c) {
      c[0] & /*i18n*/
      512 && l !== (l = /*i18n*/
      u[9]("dataframe.new_column") + "") && ks(o, l);
    },
    d(u) {
      u && (Tt(e), Tt(r), Tt(o));
    }
  };
}
function I7(t) {
  let e, n, r, l, o, u, c, h = [], p = /* @__PURE__ */ new Map(), _, v, k, E = [], z = /* @__PURE__ */ new Map(), H, U, N, M, A, x, C, O, q = (
    /*label*/
    t[1] && /*label*/
    t[1].length !== 0 && /*show_label*/
    t[2] && y1(t)
  ), R = (
    /*label*/
    t[1] && /*label*/
    t[1].length !== 0 && v1(t)
  ), J = A0(
    /*_headers*/
    t[24]
  );
  const ne = (ce) => (
    /*id*/
    ce[90]
  );
  for (let ce = 0; ce < J.length; ce += 1) {
    let he = w1(t, J, ce), se = ne(he);
    p.set(se, h[ce] = k1(se, he));
  }
  let ie = A0(
    /*max*/
    t[35]
  );
  const te = (ce) => (
    /*id*/
    ce[90]
  );
  for (let ce = 0; ce < ie.length; ce += 1) {
    let he = b1(t, ie, ce), se = te(he);
    z.set(se, E[ce] = D1(se, he));
  }
  function Se(ce) {
    t[69](ce);
  }
  let Ce = {
    flex: !1,
    center: !1,
    boundedheight: !1,
    disable_click: !0,
    root: (
      /*root*/
      t[8]
    ),
    $$slots: { default: [z7] },
    $$scope: { ctx: t }
  };
  /*dragging*/
  t[29] !== void 0 && (Ce.dragging = /*dragging*/
  t[29]), N = new sp({ props: Ce }), In.push(() => T0(N, "dragging", Se)), N.$on(
    "load",
    /*load_handler*/
    t[70]
  );
  let De = (
    /*editable*/
    t[6] && F1(t)
  );
  return {
    c() {
      e = vt("div"), q && q.c(), n = fn(), r = vt("div"), l = vt("table"), R && R.c(), o = fn(), u = vt("thead"), c = vt("tr");
      for (let ce = 0; ce < h.length; ce += 1)
        h[ce].c();
      _ = fn(), v = vt("tbody"), k = vt("tr");
      for (let ce = 0; ce < E.length; ce += 1)
        E[ce].c();
      U = fn(), N0(N.$$.fragment), A = fn(), De && De.c(), pe(c, "class", "svelte-13e3mz4"), pe(u, "class", "svelte-13e3mz4"), pe(k, "class", "svelte-13e3mz4"), pe(l, "class", "svelte-13e3mz4"), Et(
        l,
        "fixed-layout",
        /*column_widths*/
        t[12].length != 0
      ), pe(r, "class", "table-wrap svelte-13e3mz4"), F0(
        r,
        "height",
        /*table_height*/
        t[32] + "px"
      ), pe(r, "role", "grid"), pe(r, "tabindex", "0"), Et(
        r,
        "dragging",
        /*dragging*/
        t[29]
      ), Et(r, "no-wrap", !/*wrap*/
      t[7]), pe(e, "class", "svelte-13e3mz4"), Et(
        e,
        "label",
        /*label*/
        t[1] && /*label*/
        t[1].length !== 0
      );
    },
    m(ce, he) {
      Ft(ce, e, he), q && q.m(e, null), rt(e, n), rt(e, r), rt(r, l), R && R.m(l, null), rt(l, o), rt(l, u), rt(u, c);
      for (let se = 0; se < h.length; se += 1)
        h[se] && h[se].m(c, null);
      rt(l, _), rt(l, v), rt(v, k);
      for (let se = 0; se < E.length; se += 1)
        E[se] && E[se].m(k, null);
      H = x7.observe(
        l,
        /*table_1_elementresizecontentbox_handler*/
        t[54].bind(l)
      ), t[55](l), rt(r, U), R0(N, r, null), t[71](r), rt(e, A), De && De.m(e, null), x = !0, C || (O = [
        S0(
          window,
          "click",
          /*handle_click_outside*/
          t[45]
        ),
        S0(
          window,
          "touchstart",
          /*handle_click_outside*/
          t[45]
        ),
        S0(
          window,
          "resize",
          /*resize_handler*/
          t[52]
        ),
        S0(
          r,
          "keydown",
          /*keydown_handler*/
          t[72]
        ),
        S7(wm.call(null, e))
      ], C = !0);
    },
    p(ce, he) {
      /*label*/
      ce[1] && /*label*/
      ce[1].length !== 0 && /*show_label*/
      ce[2] ? q ? q.p(ce, he) : (q = y1(ce), q.c(), q.m(e, n)) : q && (q.d(1), q = null), /*label*/
      ce[1] && /*label*/
      ce[1].length !== 0 ? R ? R.p(ce, he) : (R = v1(ce), R.c(), R.m(l, o)) : R && (R.d(1), R = null), he[0] & /*_headers, sort_by, sort_direction, header_edit, column_widths, latex_delimiters, line_breaks*/
      84678688 | he[1] & /*get_sort_status*/
      32 && (J = A0(
        /*_headers*/
        ce[24]
      ), u0(), h = zi(h, he, ne, 1, ce, J, p, c, Ni, k1, null, w1), o0()), he[0] & /*cells, latex_delimiters, line_breaks, datatype*/
      1050657 | he[1] & /*max*/
      16 && (ie = A0(
        /*max*/
        ce[35]
      ), u0(), E = zi(E, he, te, 1, ce, ie, z, k, Ni, D1, null, b1), o0()), (!x || he[0] & /*column_widths*/
      4096) && Et(
        l,
        "fixed-layout",
        /*column_widths*/
        ce[12].length != 0
      );
      const se = {};
      he[0] & /*root*/
      256 && (se.root = /*root*/
      ce[8]), he[0] & /*height, data, styling, selected, display_value, latex_delimiters, line_breaks, editable, editing, datatype, clear_on_focus, els, parent, hide_columns, _headers, sort_by, sort_direction, header_edit, selected_header, select_on_focus, label*/
      1607461987 | he[1] & /*selected_index, table_height, scrollbar_width*/
      14 | he[3] & /*$$scope*/
      16 && (se.$$scope = { dirty: he, ctx: ce }), !M && he[0] & /*dragging*/
      536870912 && (M = !0, se.dragging = /*dragging*/
      ce[29], x0(() => M = !1)), N.$set(se), (!x || he[1] & /*table_height*/
      2) && F0(
        r,
        "height",
        /*table_height*/
        ce[32] + "px"
      ), (!x || he[0] & /*dragging*/
      536870912) && Et(
        r,
        "dragging",
        /*dragging*/
        ce[29]
      ), (!x || he[0] & /*wrap*/
      128) && Et(r, "no-wrap", !/*wrap*/
      ce[7]), /*editable*/
      ce[6] ? De ? (De.p(ce, he), he[0] & /*editable*/
      64 && mt(De, 1)) : (De = F1(ce), De.c(), mt(De, 1), De.m(e, null)) : De && (u0(), Rt(De, 1, 1, () => {
        De = null;
      }), o0()), (!x || he[0] & /*label*/
      2) && Et(
        e,
        "label",
        /*label*/
        ce[1] && /*label*/
        ce[1].length !== 0
      );
    },
    i(ce) {
      if (!x) {
        for (let he = 0; he < J.length; he += 1)
          mt(h[he]);
        for (let he = 0; he < ie.length; he += 1)
          mt(E[he]);
        mt(N.$$.fragment, ce), mt(De), x = !0;
      }
    },
    o(ce) {
      for (let he = 0; he < h.length; he += 1)
        Rt(h[he]);
      for (let he = 0; he < E.length; he += 1)
        Rt(E[he]);
      Rt(N.$$.fragment, ce), Rt(De), x = !1;
    },
    d(ce) {
      ce && Tt(e), q && q.d(), R && R.d();
      for (let he = 0; he < h.length; he += 1)
        h[he].d();
      for (let he = 0; he < E.length; he += 1)
        E[he].d();
      H(), t[55](null), z0(N), t[71](null), De && De.d(), C = !1, Qh(O);
    }
  };
}
function B1(t, e) {
  return t ?? e();
}
function fr(t) {
  let e, n = t[0], r = 1;
  for (; r < t.length; ) {
    const l = t[r], o = t[r + 1];
    if (r += 2, (l === "optionalAccess" || l === "optionalCall") && n == null)
      return;
    l === "access" || l === "optionalAccess" ? (e = n, n = o(n)) : (l === "call" || l === "optionalCall") && (n = o((...u) => n.call(e, ...u)), e = void 0);
  }
  return n;
}
function Vr() {
  return Math.random().toString(36).substring(2, 15);
}
function L7(t, e) {
  return e.filter(n);
  function n(r) {
    var l = -1;
    return t.split(`
`).every(o);
    function o(u) {
      if (!u)
        return !0;
      var c = u.split(r).length;
      return l < 0 && (l = c), l === c && c > 1;
    }
  }
}
function H7(t) {
  const e = atob(t.split(",")[1]), n = t.split(",")[0].split(":")[1].split(";")[0], r = new ArrayBuffer(e.length), l = new Uint8Array(r);
  for (let o = 0; o < e.length; o++)
    l[o] = e.charCodeAt(o);
  return new Blob([r], { type: n });
}
function P7(t, e, n) {
  let r, l, { datatype: o } = e, { label: u = null } = e, { show_label: c = !0 } = e, { headers: h = [] } = e, { values: p = [] } = e, { col_count: _ } = e, { row_count: v } = e, { latex_delimiters: k } = e, { editable: E = !0 } = e, { wrap: z = !1 } = e, { root: H } = e, { i18n: U } = e, { height: N = 500 } = e, { line_breaks: M = !0 } = e, { column_widths: A = [] } = e, { hide_columns: x = [] } = e, C = !1, { display_value: O = null } = e, { styling: q = null } = e, R;
  const J = F7();
  let ne = !1;
  const ie = (P, d) => fr([
    se,
    "optionalAccess",
    (g) => g[P],
    "optionalAccess",
    (g) => g[d],
    "optionalAccess",
    (g) => g.value
  ]);
  let te = {};
  function Se(P) {
    let d = P || [];
    if (_[1] === "fixed" && d.length < _[0]) {
      const g = Array(_[0] - d.length).fill("").map((Y, y) => `${y + d.length}`);
      d = d.concat(g);
    }
    return !d || d.length === 0 ? Array(_[0]).fill(0).map((g, Y) => {
      const y = Vr();
      return n(23, te[y] = { cell: null, input: null }, te), { id: y, value: JSON.stringify(Y + 1) };
    }) : d.map((g, Y) => {
      const y = Vr();
      return n(23, te[y] = { cell: null, input: null }, te), {
        id: y,
        value: B1(g, () => "")
      };
    });
  }
  function Ce(P) {
    const d = P.length;
    return Array(v[1] === "fixed" || d < v[0] ? v[0] : d).fill(0).map((g, Y) => Array(_[1] === "fixed" ? _[0] : d > 0 ? P[0].length : h.length).fill(0).map((y, B) => {
      const Be = Vr();
      return n(23, te[Be] = te[Be] || { input: null, cell: null }, te), {
        value: B1(fr([P, "optionalAccess", (bt) => bt[Y], "optionalAccess", (bt) => bt[B]]), () => ""),
        id: Be
      };
    }));
  }
  let De = Se(h), ce;
  function he() {
    n(24, De = Se(h)), n(50, ce = h.slice()), de();
  }
  let se = [[]], Ne;
  async function de() {
    J("change", {
      data: se.map((P) => P.map(({ value: d }) => d)),
      headers: De.map((P) => P.value),
      metadata: E ? null : { display_value: O, styling: q }
    });
  }
  function Q(P, d, g) {
    if (!d)
      return "none";
    if (h[d] === P) {
      if (g === "asc")
        return "ascending";
      if (g === "des")
        return "descending";
    }
    return "none";
  }
  function me(P) {
    return se.reduce(
      (d, g, Y) => {
        const y = g.reduce((B, Be, fe) => P === Be.id ? fe : B, -1);
        return y === -1 ? d : [Y, y];
      },
      [-1, -1]
    );
  }
  async function V(P, d) {
    !E || Fn(ne, [P, d]) || n(22, ne = [P, d]);
  }
  function $(P, d) {
    const g = {
      ArrowRight: [0, 1],
      ArrowLeft: [0, -1],
      ArrowDown: [1, 0],
      ArrowUp: [-1, 0]
    }[P], Y = d[0] + g[0], y = d[1] + g[1];
    if (Y < 0 && y <= 0)
      n(28, qe = y), n(16, C = !1);
    else {
      const B = fr([se, "access", (Be) => Be[Y], "optionalAccess", (Be) => Be[y]]);
      n(16, C = B ? [Y, y] : C);
    }
  }
  let we = !1;
  async function ye(P) {
    if (qe !== !1 && Ie === !1)
      switch (P.key) {
        case "ArrowDown":
          n(16, C = [0, qe]), n(28, qe = !1);
          return;
        case "ArrowLeft":
          n(28, qe = qe > 0 ? qe - 1 : qe);
          return;
        case "ArrowRight":
          n(28, qe = qe < De.length - 1 ? qe + 1 : qe);
          return;
        case "Escape":
          P.preventDefault(), n(28, qe = !1);
          break;
        case "Enter":
          P.preventDefault();
          break;
      }
    if (!C)
      return;
    const [d, g] = C;
    switch (P.key) {
      case "ArrowRight":
      case "ArrowLeft":
      case "ArrowDown":
      case "ArrowUp":
        if (ne)
          break;
        P.preventDefault(), $(P.key, [d, g]);
        break;
      case "Escape":
        if (!E)
          break;
        P.preventDefault(), n(22, ne = !1);
        break;
      case "Enter":
        if (!E)
          break;
        P.preventDefault(), P.shiftKey ? (_e(d), await Ks(), n(16, C = [d + 1, g])) : Fn(ne, [d, g]) ? (n(22, ne = !1), await Ks(), n(16, C = [d, g])) : n(22, ne = [d, g]);
        break;
      case "Backspace":
        if (!E)
          break;
        ne || (P.preventDefault(), n(17, se[d][g].value = "", se));
        break;
      case "Delete":
        if (!E)
          break;
        ne || (P.preventDefault(), n(17, se[d][g].value = "", se));
        break;
      case "Tab":
        let Y = P.shiftKey ? -1 : 1, y = se[d][g + Y], B = fr([
          se,
          "optionalAccess",
          (Be) => Be[d + Y],
          "optionalAccess",
          (Be) => Be[Y > 0 ? 0 : De.length - 1]
        ]);
        (y || B) && (P.preventDefault(), n(16, C = y ? [d, g + Y] : [d + Y, Y > 0 ? 0 : De.length - 1])), n(22, ne = !1);
        break;
      default:
        if (!E)
          break;
        (!ne || ne && Fn(ne, [d, g])) && P.key.length === 1 && (n(25, we = !0), n(22, ne = [d, g]));
    }
  }
  async function K(P, d) {
    Fn(ne, [P, d]) || (n(26, Ie = !1), n(28, qe = !1), n(22, ne = !1), n(16, C = [P, d]), await Ks(), Te.focus());
  }
  let Ee, Ae;
  function Je(P) {
    typeof Ae != "number" || Ae !== P ? (n(18, Ee = "asc"), n(19, Ae = P)) : Ee === "asc" ? n(18, Ee = "des") : Ee === "des" && n(18, Ee = "asc");
  }
  let Ie, Ve = !1, qe = !1;
  async function It(P, d = !1) {
    !E || _[1] !== "dynamic" || Ie === P || (n(16, C = !1), n(28, qe = P), n(26, Ie = P), n(27, Ve = d));
  }
  function ee(P) {
    if (E)
      switch (P.key) {
        case "Escape":
        case "Enter":
        case "Tab":
          P.preventDefault(), n(16, C = !1), n(28, qe = Ie), n(26, Ie = !1), Te.focus();
          break;
      }
  }
  async function _e(P) {
    if (Te.focus(), v[1] === "dynamic") {
      if (se.length === 0) {
        n(49, p = [Array(h.length).fill("")]);
        return;
      }
      se.splice(P ? P + 1 : se.length, 0, Array(se[0].length).fill(0).map((d, g) => {
        const Y = Vr();
        return n(23, te[Y] = { cell: null, input: null }, te), { id: Y, value: "" };
      })), n(17, se), n(49, p), n(51, Ne), n(16, C = [P ? P + 1 : se.length - 1, 0]);
    }
  }
  async function it() {
    if (Te.focus(), _[1] === "dynamic") {
      for (let P = 0; P < se.length; P++) {
        const d = Vr();
        n(23, te[d] = { cell: null, input: null }, te), se[P].push({ id: d, value: "" });
      }
      h.push(`Header ${h.length + 1}`), n(17, se), n(49, p), n(51, Ne), n(48, h), await Ks(), requestAnimationFrame(() => {
        It(h.length - 1, !0);
        const P = Te.querySelectorAll("tbody")[1].offsetWidth;
        Te.querySelectorAll("table")[1].scrollTo({ left: P });
      });
    }
  }
  function at(P) {
    P.stopImmediatePropagation();
    const [d] = P.composedPath();
    Te.contains(d) || (n(22, ne = !1), n(26, Ie = !1), n(28, qe = !1), n(16, C = !1));
  }
  function Fe(P) {
    const d = new FileReader();
    function g(Y) {
      if (!fr([
        Y,
        "optionalAccess",
        (fe) => fe.target,
        "optionalAccess",
        (fe) => fe.result
      ]) || typeof Y.target.result != "string")
        return;
      const [y] = L7(Y.target.result, [",", "	"]), [B, ...Be] = Am(y).parseRows(Y.target.result);
      n(24, De = Se(_[1] === "fixed" ? B.slice(0, _[0]) : B)), n(49, p = Be), d.removeEventListener("loadend", g);
    }
    d.addEventListener("loadend", g), d.readAsText(P);
  }
  let gt = !1;
  function We(P) {
    let d = P[0].slice();
    for (let g = 0; g < P.length; g++)
      for (let Y = 0; Y < P[g].length; Y++)
        `${d[Y].value}`.length < `${P[g][Y].value}`.length && (d[Y] = P[g][Y]);
    return d;
  }
  let Re = [], Te, Me;
  function ze() {
    const P = Re.map((d, g) => fr([d, "optionalAccess", (Y) => Y.clientWidth]) || 0);
    if (P.length !== 0)
      for (let d = 0; d < P.length; d++)
        Te.style.setProperty(`--cell-width-${d}`, `${P[d] - Oe / P.length}px`);
  }
  let Qe = N, Oe = 0;
  function Ue(P, d, g, Y, y) {
    let B = null;
    if (C && C[0] in se && C[1] in se[C[0]] && (B = se[C[0]][C[1]].id), typeof Y != "number" || !y)
      return;
    const Be = [...Array(P.length).keys()];
    if (y === "asc")
      Be.sort((ve, ue) => P[ve][Y].value < P[ue][Y].value ? -1 : 1);
    else if (y === "des")
      Be.sort((ve, ue) => P[ve][Y].value > P[ue][Y].value ? -1 : 1);
    else
      return;
    const fe = [...P], bt = d ? [...d] : null, kn = g ? [...g] : null;
    if (Be.forEach((ve, ue) => {
      P[ue] = fe[ve], d && bt && (d[ue] = bt[ve]), g && kn && (g[ue] = kn[ve]);
    }), n(17, se), n(49, p), n(51, Ne), B) {
      const [ve, ue] = me(B);
      n(16, C = [ve, ue]);
    }
  }
  let ht = !1;
  C7(() => {
    const P = new IntersectionObserver((d, g) => {
      d.forEach((Y) => {
        Y.isIntersecting && !ht && (ze(), n(17, se), n(49, p), n(51, Ne)), ht = Y.isIntersecting;
      });
    });
    return P.observe(Te), () => {
      P.disconnect();
    };
  });
  const vn = () => ze();
  function hn(P, d) {
    In[P ? "unshift" : "push"](() => {
      Re[d] = P, n(20, Re);
    });
  }
  function h0() {
    var P;
    R = (P = D7.entries.get(this)) == null ? void 0 : P.contentRect, n(21, R);
  }
  function tn(P) {
    In[P ? "unshift" : "push"](() => {
      Me = P, n(31, Me);
    });
  }
  function st(P, d, g) {
    t.$$.not_equal(se[d][g].value, P) && (se[d][g].value = P, n(17, se), n(49, p), n(51, Ne));
  }
  function oe(P, d) {
    t.$$.not_equal(te[d].input, P) && (te[d].input = P, n(23, te));
  }
  const nn = () => (n(25, we = !1), Te.focus()), er = (P, d) => V(P, d), Ln = (P, d) => K(P, d), tr = (P, d) => V(P, d);
  function t0(P, d) {
    t.$$.not_equal(De[d].value, P) && (De[d].value = P, n(24, De));
  }
  function kt(P, d) {
    t.$$.not_equal(te[d].input, P) && (te[d].input = P, n(23, te));
  }
  const Hn = (P) => It(P), Mr = (P) => Je(P);
  function Gt(P) {
    se = P, n(17, se), n(49, p), n(51, Ne);
  }
  function Qt(P) {
    Qe = P, n(32, Qe);
  }
  function dn(P) {
    Oe = P, n(33, Oe);
  }
  function d0(P) {
    gt = P, n(29, gt);
  }
  const nr = (P) => Fe(H7(P.detail.data));
  function rr(P) {
    In[P ? "unshift" : "push"](() => {
      Te = P, n(30, Te);
    });
  }
  const sr = (P) => ye(P), Br = (P) => (P.stopPropagation(), _e()), Wt = (P) => (P.stopPropagation(), it());
  return t.$$set = (P) => {
    "datatype" in P && n(0, o = P.datatype), "label" in P && n(1, u = P.label), "show_label" in P && n(2, c = P.show_label), "headers" in P && n(48, h = P.headers), "values" in P && n(49, p = P.values), "col_count" in P && n(3, _ = P.col_count), "row_count" in P && n(4, v = P.row_count), "latex_delimiters" in P && n(5, k = P.latex_delimiters), "editable" in P && n(6, E = P.editable), "wrap" in P && n(7, z = P.wrap), "root" in P && n(8, H = P.root), "i18n" in P && n(9, U = P.i18n), "height" in P && n(10, N = P.height), "line_breaks" in P && n(11, M = P.line_breaks), "column_widths" in P && n(12, A = P.column_widths), "hide_columns" in P && n(13, x = P.hide_columns), "display_value" in P && n(14, O = P.display_value), "styling" in P && n(15, q = P.styling);
  }, t.$$.update = () => {
    if (t.$$.dirty[0] & /*selected*/
    65536 && C !== !1) {
      const [P, d] = C;
      !isNaN(P) && !isNaN(d) && J("select", {
        index: [P, d],
        value: ie(P, d)
      });
    }
    t.$$.dirty[1] & /*headers, old_headers*/
    655360 && (Fn(h, ce) || he()), t.$$.dirty[1] & /*values, old_val*/
    1310720 && (Fn(p, Ne) || (n(17, se = Ce(p)), n(51, Ne = p))), t.$$.dirty[0] & /*data*/
    131072 && se && de(), t.$$.dirty[0] & /*data*/
    131072 && n(35, r = We(se)), t.$$.dirty[0] & /*cells*/
    1048576 && Re[0] && ze(), t.$$.dirty[0] & /*data, display_value, styling, sort_by, sort_direction*/
    966656 && Ue(se, O, q, Ae, Ee), t.$$.dirty[0] & /*selected*/
    65536 && n(34, l = !!C && C[0]);
  }, [
    o,
    u,
    c,
    _,
    v,
    k,
    E,
    z,
    H,
    U,
    N,
    M,
    A,
    x,
    O,
    q,
    C,
    se,
    Ee,
    Ae,
    Re,
    R,
    ne,
    te,
    De,
    we,
    Ie,
    Ve,
    qe,
    gt,
    Te,
    Me,
    Qe,
    Oe,
    l,
    r,
    Q,
    V,
    ye,
    K,
    Je,
    It,
    ee,
    _e,
    it,
    at,
    Fe,
    ze,
    h,
    p,
    ce,
    Ne,
    vn,
    hn,
    h0,
    tn,
    st,
    oe,
    nn,
    er,
    Ln,
    tr,
    t0,
    kt,
    Hn,
    Mr,
    Gt,
    Qt,
    dn,
    d0,
    nr,
    rr,
    sr,
    Br,
    Wt
  ];
}
class q7 extends A7 {
  constructor(e) {
    super(), E7(
      this,
      e,
      P7,
      I7,
      T7,
      {
        datatype: 0,
        label: 1,
        show_label: 2,
        headers: 48,
        values: 49,
        col_count: 3,
        row_count: 4,
        latex_delimiters: 5,
        editable: 6,
        wrap: 7,
        root: 8,
        i18n: 9,
        height: 10,
        line_breaks: 11,
        column_widths: 12,
        hide_columns: 13,
        display_value: 14,
        styling: 15
      },
      null,
      [-1, -1, -1, -1]
    );
  }
}
const {
  SvelteComponent: U7,
  attr: $s,
  create_slot: G7,
  detach: j7,
  element: V7,
  get_all_dirty_from_scope: W7,
  get_slot_changes: X7,
  init: Y7,
  insert: Z7,
  null_to_empty: N1,
  safe_not_equal: J7,
  toggle_class: Wn,
  transition_in: Q7,
  transition_out: K7,
  update_slot_base: $7
} = window.__gradio__svelte__internal;
function eg(t) {
  let e, n, r;
  const l = (
    /*#slots*/
    t[6].default
  ), o = G7(
    l,
    t,
    /*$$scope*/
    t[5],
    null
  );
  return {
    c() {
      e = V7("div"), o && o.c(), $s(
        e,
        "id",
        /*elem_id*/
        t[1]
      ), $s(e, "class", n = N1(
        /*elem_classes*/
        t[2].join(" ")
      ) + " svelte-iibkxk"), Wn(
        e,
        "compact",
        /*variant*/
        t[4] === "compact"
      ), Wn(
        e,
        "panel",
        /*variant*/
        t[4] === "panel"
      ), Wn(
        e,
        "unequal-height",
        /*equal_height*/
        t[0] === !1
      ), Wn(
        e,
        "stretch",
        /*equal_height*/
        t[0]
      ), Wn(e, "hide", !/*visible*/
      t[3]);
    },
    m(u, c) {
      Z7(u, e, c), o && o.m(e, null), r = !0;
    },
    p(u, [c]) {
      o && o.p && (!r || c & /*$$scope*/
      32) && $7(
        o,
        l,
        u,
        /*$$scope*/
        u[5],
        r ? X7(
          l,
          /*$$scope*/
          u[5],
          c,
          null
        ) : W7(
          /*$$scope*/
          u[5]
        ),
        null
      ), (!r || c & /*elem_id*/
      2) && $s(
        e,
        "id",
        /*elem_id*/
        u[1]
      ), (!r || c & /*elem_classes*/
      4 && n !== (n = N1(
        /*elem_classes*/
        u[2].join(" ")
      ) + " svelte-iibkxk")) && $s(e, "class", n), (!r || c & /*elem_classes, variant*/
      20) && Wn(
        e,
        "compact",
        /*variant*/
        u[4] === "compact"
      ), (!r || c & /*elem_classes, variant*/
      20) && Wn(
        e,
        "panel",
        /*variant*/
        u[4] === "panel"
      ), (!r || c & /*elem_classes, equal_height*/
      5) && Wn(
        e,
        "unequal-height",
        /*equal_height*/
        u[0] === !1
      ), (!r || c & /*elem_classes, equal_height*/
      5) && Wn(
        e,
        "stretch",
        /*equal_height*/
        u[0]
      ), (!r || c & /*elem_classes, visible*/
      12) && Wn(e, "hide", !/*visible*/
      u[3]);
    },
    i(u) {
      r || (Q7(o, u), r = !0);
    },
    o(u) {
      K7(o, u), r = !1;
    },
    d(u) {
      u && j7(e), o && o.d(u);
    }
  };
}
function tg(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { equal_height: o = !0 } = e, { elem_id: u } = e, { elem_classes: c = [] } = e, { visible: h = !0 } = e, { variant: p = "default" } = e;
  return t.$$set = (_) => {
    "equal_height" in _ && n(0, o = _.equal_height), "elem_id" in _ && n(1, u = _.elem_id), "elem_classes" in _ && n(2, c = _.elem_classes), "visible" in _ && n(3, h = _.visible), "variant" in _ && n(4, p = _.variant), "$$scope" in _ && n(5, l = _.$$scope);
  }, [o, u, c, h, p, l, r];
}
let Ri = class extends U7 {
  constructor(e) {
    super(), Y7(this, e, tg, eg, J7, {
      equal_height: 0,
      elem_id: 1,
      elem_classes: 2,
      visible: 3,
      variant: 4
    });
  }
};
const {
  SvelteComponent: ng,
  attr: ei,
  create_slot: rg,
  detach: sg,
  element: ig,
  get_all_dirty_from_scope: lg,
  get_slot_changes: ag,
  init: og,
  insert: ug,
  null_to_empty: z1,
  safe_not_equal: cg,
  set_style: ti,
  toggle_class: _0,
  transition_in: fg,
  transition_out: hg,
  update_slot_base: dg
} = window.__gradio__svelte__internal;
function mg(t) {
  let e, n, r = `calc(min(${/*min_width*/
  t[2]}px, 100%))`, l;
  const o = (
    /*#slots*/
    t[8].default
  ), u = rg(
    o,
    t,
    /*$$scope*/
    t[7],
    null
  );
  return {
    c() {
      e = ig("div"), u && u.c(), ei(
        e,
        "id",
        /*elem_id*/
        t[3]
      ), ei(e, "class", n = z1(
        /*elem_classes*/
        t[4].join(" ")
      ) + " svelte-1m1obck"), _0(
        e,
        "gap",
        /*gap*/
        t[1]
      ), _0(
        e,
        "compact",
        /*variant*/
        t[6] === "compact"
      ), _0(
        e,
        "panel",
        /*variant*/
        t[6] === "panel"
      ), _0(e, "hide", !/*visible*/
      t[5]), ti(
        e,
        "flex-grow",
        /*scale*/
        t[0]
      ), ti(e, "min-width", r);
    },
    m(c, h) {
      ug(c, e, h), u && u.m(e, null), l = !0;
    },
    p(c, [h]) {
      u && u.p && (!l || h & /*$$scope*/
      128) && dg(
        u,
        o,
        c,
        /*$$scope*/
        c[7],
        l ? ag(
          o,
          /*$$scope*/
          c[7],
          h,
          null
        ) : lg(
          /*$$scope*/
          c[7]
        ),
        null
      ), (!l || h & /*elem_id*/
      8) && ei(
        e,
        "id",
        /*elem_id*/
        c[3]
      ), (!l || h & /*elem_classes*/
      16 && n !== (n = z1(
        /*elem_classes*/
        c[4].join(" ")
      ) + " svelte-1m1obck")) && ei(e, "class", n), (!l || h & /*elem_classes, gap*/
      18) && _0(
        e,
        "gap",
        /*gap*/
        c[1]
      ), (!l || h & /*elem_classes, variant*/
      80) && _0(
        e,
        "compact",
        /*variant*/
        c[6] === "compact"
      ), (!l || h & /*elem_classes, variant*/
      80) && _0(
        e,
        "panel",
        /*variant*/
        c[6] === "panel"
      ), (!l || h & /*elem_classes, visible*/
      48) && _0(e, "hide", !/*visible*/
      c[5]), h & /*scale*/
      1 && ti(
        e,
        "flex-grow",
        /*scale*/
        c[0]
      ), h & /*min_width*/
      4 && r !== (r = `calc(min(${/*min_width*/
      c[2]}px, 100%))`) && ti(e, "min-width", r);
    },
    i(c) {
      l || (fg(u, c), l = !0);
    },
    o(c) {
      hg(u, c), l = !1;
    },
    d(c) {
      c && sg(e), u && u.d(c);
    }
  };
}
function pg(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { scale: o = null } = e, { gap: u = !0 } = e, { min_width: c = 0 } = e, { elem_id: h = "" } = e, { elem_classes: p = [] } = e, { visible: _ = !0 } = e, { variant: v = "default" } = e;
  return t.$$set = (k) => {
    "scale" in k && n(0, o = k.scale), "gap" in k && n(1, u = k.gap), "min_width" in k && n(2, c = k.min_width), "elem_id" in k && n(3, h = k.elem_id), "elem_classes" in k && n(4, p = k.elem_classes), "visible" in k && n(5, _ = k.visible), "variant" in k && n(6, v = k.variant), "$$scope" in k && n(7, l = k.$$scope);
  }, [o, u, c, h, p, _, v, l, r];
}
let R1 = class extends ng {
  constructor(e) {
    super(), og(this, e, pg, mg, cg, {
      scale: 0,
      gap: 1,
      min_width: 2,
      elem_id: 3,
      elem_classes: 4,
      visible: 5,
      variant: 6
    });
  }
};
const {
  SvelteComponent: gg,
  append: Wr,
  assign: _g,
  attr: Yn,
  create_component: Na,
  destroy_component: za,
  destroy_each: bg,
  detach: es,
  element: mi,
  ensure_array_like: O1,
  get_spread_object: wg,
  get_spread_update: yg,
  init: vg,
  insert: ts,
  listen: na,
  mount_component: Ra,
  not_equal: kg,
  run_all: Dg,
  set_data: Kh,
  space: Oi,
  text: $h,
  toggle_class: ni,
  transition_in: Oa,
  transition_out: Ia
} = window.__gradio__svelte__internal, { createEventDispatcher: Ag } = window.__gradio__svelte__internal;
function I1(t, e, n) {
  const r = t.slice();
  return r[21] = e[n][0], r[22] = e[n][1], r[24] = n, r;
}
function Sg(t) {
  let e;
  return {
    c() {
      e = $h(
        /*label*/
        t[9]
      );
    },
    m(n, r) {
      ts(n, e, r);
    },
    p(n, r) {
      r & /*label*/
      512 && Kh(
        e,
        /*label*/
        n[9]
      );
    },
    d(n) {
      n && es(e);
    }
  };
}
function L1(t) {
  let e, n, r, l, o, u, c, h = (
    /*display_value*/
    t[21] + ""
  ), p, _, v, k;
  function E() {
    return (
      /*change_handler*/
      t[17](
        /*internal_value*/
        t[22]
      )
    );
  }
  function z(...U) {
    return (
      /*input_handler*/
      t[18](
        /*i*/
        t[24],
        /*internal_value*/
        t[22],
        ...U
      )
    );
  }
  function H(...U) {
    return (
      /*keydown_handler*/
      t[19](
        /*internal_value*/
        t[22],
        /*i*/
        t[24],
        ...U
      )
    );
  }
  return {
    c() {
      var U, N;
      e = mi("label"), n = mi("input"), u = Oi(), c = mi("span"), p = $h(h), _ = Oi(), n.disabled = /*disabled*/
      t[13], n.checked = r = /*value*/
      t[0].includes(
        /*internal_value*/
        t[22]
      ), Yn(n, "type", "checkbox"), Yn(n, "name", l = /*internal_value*/
      (U = t[22]) == null ? void 0 : U.toString()), Yn(n, "title", o = /*internal_value*/
      (N = t[22]) == null ? void 0 : N.toString()), Yn(n, "class", "svelte-efgmq2"), Yn(c, "class", "ml-2 svelte-efgmq2"), Yn(e, "class", "svelte-efgmq2"), ni(
        e,
        "disabled",
        /*disabled*/
        t[13]
      ), ni(
        e,
        "selected",
        /*value*/
        t[0].includes(
          /*internal_value*/
          t[22]
        )
      );
    },
    m(U, N) {
      ts(U, e, N), Wr(e, n), Wr(e, u), Wr(e, c), Wr(c, p), Wr(e, _), v || (k = [
        na(n, "change", E),
        na(n, "input", z),
        na(n, "keydown", H)
      ], v = !0);
    },
    p(U, N) {
      var M, A;
      t = U, N & /*disabled*/
      8192 && (n.disabled = /*disabled*/
      t[13]), N & /*value, choices*/
      33 && r !== (r = /*value*/
      t[0].includes(
        /*internal_value*/
        t[22]
      )) && (n.checked = r), N & /*choices*/
      32 && l !== (l = /*internal_value*/
      (M = t[22]) == null ? void 0 : M.toString()) && Yn(n, "name", l), N & /*choices*/
      32 && o !== (o = /*internal_value*/
      (A = t[22]) == null ? void 0 : A.toString()) && Yn(n, "title", o), N & /*choices*/
      32 && h !== (h = /*display_value*/
      t[21] + "") && Kh(p, h), N & /*disabled*/
      8192 && ni(
        e,
        "disabled",
        /*disabled*/
        t[13]
      ), N & /*value, choices*/
      33 && ni(
        e,
        "selected",
        /*value*/
        t[0].includes(
          /*internal_value*/
          t[22]
        )
      );
    },
    d(U) {
      U && es(e), v = !1, Dg(k);
    }
  };
}
function Eg(t) {
  let e, n, r, l, o, u;
  const c = [
    { autoscroll: (
      /*gradio*/
      t[1].autoscroll
    ) },
    { i18n: (
      /*gradio*/
      t[1].i18n
    ) },
    /*loading_status*/
    t[12]
  ];
  let h = {};
  for (let v = 0; v < c.length; v += 1)
    h = _g(h, c[v]);
  e = new io({ props: h }), r = new Ga({
    props: {
      show_label: (
        /*show_label*/
        t[11]
      ),
      info: (
        /*info*/
        t[10]
      ),
      $$slots: { default: [Sg] },
      $$scope: { ctx: t }
    }
  });
  let p = O1(
    /*choices*/
    t[5]
  ), _ = [];
  for (let v = 0; v < p.length; v += 1)
    _[v] = L1(I1(t, p, v));
  return {
    c() {
      Na(e.$$.fragment), n = Oi(), Na(r.$$.fragment), l = Oi(), o = mi("div");
      for (let v = 0; v < _.length; v += 1)
        _[v].c();
      Yn(o, "class", "wrap svelte-efgmq2"), Yn(o, "data-testid", "checkbox-group");
    },
    m(v, k) {
      Ra(e, v, k), ts(v, n, k), Ra(r, v, k), ts(v, l, k), ts(v, o, k);
      for (let E = 0; E < _.length; E += 1)
        _[E] && _[E].m(o, null);
      u = !0;
    },
    p(v, k) {
      const E = k & /*gradio, loading_status*/
      4098 ? yg(c, [
        k & /*gradio*/
        2 && { autoscroll: (
          /*gradio*/
          v[1].autoscroll
        ) },
        k & /*gradio*/
        2 && { i18n: (
          /*gradio*/
          v[1].i18n
        ) },
        k & /*loading_status*/
        4096 && wg(
          /*loading_status*/
          v[12]
        )
      ]) : {};
      e.$set(E);
      const z = {};
      if (k & /*show_label*/
      2048 && (z.show_label = /*show_label*/
      v[11]), k & /*info*/
      1024 && (z.info = /*info*/
      v[10]), k & /*$$scope, label*/
      33554944 && (z.$$scope = { dirty: k, ctx: v }), r.$set(z), k & /*disabled, value, choices, toggle_choice, gradio*/
      24611) {
        p = O1(
          /*choices*/
          v[5]
        );
        let H;
        for (H = 0; H < p.length; H += 1) {
          const U = I1(v, p, H);
          _[H] ? _[H].p(U, k) : (_[H] = L1(U), _[H].c(), _[H].m(o, null));
        }
        for (; H < _.length; H += 1)
          _[H].d(1);
        _.length = p.length;
      }
    },
    i(v) {
      u || (Oa(e.$$.fragment, v), Oa(r.$$.fragment, v), u = !0);
    },
    o(v) {
      Ia(e.$$.fragment, v), Ia(r.$$.fragment, v), u = !1;
    },
    d(v) {
      v && (es(n), es(l), es(o)), za(e, v), za(r, v), bg(_, v);
    }
  };
}
function xg(t) {
  let e, n;
  return e = new ms({
    props: {
      visible: (
        /*visible*/
        t[4]
      ),
      elem_id: (
        /*elem_id*/
        t[2]
      ),
      elem_classes: (
        /*elem_classes*/
        t[3]
      ),
      type: "fieldset",
      container: (
        /*container*/
        t[6]
      ),
      scale: (
        /*scale*/
        t[7]
      ),
      min_width: (
        /*min_width*/
        t[8]
      ),
      $$slots: { default: [Eg] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Na(e.$$.fragment);
    },
    m(r, l) {
      Ra(e, r, l), n = !0;
    },
    p(r, [l]) {
      const o = {};
      l & /*visible*/
      16 && (o.visible = /*visible*/
      r[4]), l & /*elem_id*/
      4 && (o.elem_id = /*elem_id*/
      r[2]), l & /*elem_classes*/
      8 && (o.elem_classes = /*elem_classes*/
      r[3]), l & /*container*/
      64 && (o.container = /*container*/
      r[6]), l & /*scale*/
      128 && (o.scale = /*scale*/
      r[7]), l & /*min_width*/
      256 && (o.min_width = /*min_width*/
      r[8]), l & /*$$scope, choices, disabled, value, gradio, show_label, info, label, loading_status*/
      33570339 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (Oa(e.$$.fragment, r), n = !0);
    },
    o(r) {
      Ia(e.$$.fragment, r), n = !1;
    },
    d(r) {
      za(e, r);
    }
  };
}
function Tg(t, e, n) {
  let r;
  const l = Ag();
  let { gradio: o } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { visible: h = !0 } = e, { value: p = [] } = e, { choices: _ } = e, { container: v = !0 } = e, { scale: k = null } = e, { min_width: E = void 0 } = e, { label: z = o.i18n("checkbox.checkbox_group") } = e, { info: H = void 0 } = e, { show_label: U = !0 } = e, { loading_status: N } = e, { interactive: M = !0 } = e, { old_value: A = p.slice() } = e;
  function x(R) {
    p.includes(R) ? n(0, p = p.filter((J) => J !== R)) : n(0, p = [...p, R]), l("input", p);
  }
  const C = (R) => x(R), O = (R, J, ne) => o.dispatch("select", {
    index: R,
    value: J,
    selected: ne.currentTarget.checked
  }), q = (R, J, ne) => {
    ne.key === "Enter" && (x(R), o.dispatch("select", {
      index: J,
      value: R,
      selected: !p.includes(R)
    }));
  };
  return t.$$set = (R) => {
    "gradio" in R && n(1, o = R.gradio), "elem_id" in R && n(2, u = R.elem_id), "elem_classes" in R && n(3, c = R.elem_classes), "visible" in R && n(4, h = R.visible), "value" in R && n(0, p = R.value), "choices" in R && n(5, _ = R.choices), "container" in R && n(6, v = R.container), "scale" in R && n(7, k = R.scale), "min_width" in R && n(8, E = R.min_width), "label" in R && n(9, z = R.label), "info" in R && n(10, H = R.info), "show_label" in R && n(11, U = R.show_label), "loading_status" in R && n(12, N = R.loading_status), "interactive" in R && n(16, M = R.interactive), "old_value" in R && n(15, A = R.old_value);
  }, t.$$.update = () => {
    t.$$.dirty & /*interactive*/
    65536 && n(13, r = !M), t.$$.dirty & /*old_value, value*/
    32769 && JSON.stringify(A) !== JSON.stringify(p) && (n(15, A = p), l("change", p));
  }, [
    p,
    o,
    u,
    c,
    h,
    _,
    v,
    k,
    E,
    z,
    H,
    U,
    N,
    r,
    x,
    A,
    M,
    C,
    O,
    q
  ];
}
class e4 extends gg {
  constructor(e) {
    super(), vg(this, e, Tg, xg, kg, {
      gradio: 1,
      elem_id: 2,
      elem_classes: 3,
      visible: 4,
      value: 0,
      choices: 5,
      container: 6,
      scale: 7,
      min_width: 8,
      label: 9,
      info: 10,
      show_label: 11,
      loading_status: 12,
      interactive: 16,
      old_value: 15
    });
  }
}
const {
  SvelteComponent: Fg,
  append: H1,
  assign: Cg,
  attr: b0,
  binding_callbacks: Mg,
  check_outros: Bg,
  create_component: lo,
  destroy_component: ao,
  detach: La,
  element: P1,
  flush: an,
  get_spread_object: Ng,
  get_spread_update: zg,
  group_outros: Rg,
  init: Og,
  insert: Ha,
  listen: q1,
  mount_component: oo,
  run_all: Ig,
  safe_not_equal: Lg,
  set_data: Hg,
  set_input_value: U1,
  space: G1,
  text: Pg,
  toggle_class: qg,
  transition_in: wr,
  transition_out: ns
} = window.__gradio__svelte__internal, { tick: Ug, createEventDispatcher: Gg } = window.__gradio__svelte__internal;
function j1(t) {
  let e, n;
  const r = [
    { autoscroll: (
      /*gradio*/
      t[1].autoscroll
    ) },
    { i18n: (
      /*gradio*/
      t[1].i18n
    ) },
    /*loading_status*/
    t[10]
  ];
  let l = {};
  for (let o = 0; o < r.length; o += 1)
    l = Cg(l, r[o]);
  return e = new io({ props: l }), {
    c() {
      lo(e.$$.fragment);
    },
    m(o, u) {
      oo(e, o, u), n = !0;
    },
    p(o, u) {
      const c = u & /*gradio, loading_status*/
      1026 ? zg(r, [
        u & /*gradio*/
        2 && { autoscroll: (
          /*gradio*/
          o[1].autoscroll
        ) },
        u & /*gradio*/
        2 && { i18n: (
          /*gradio*/
          o[1].i18n
        ) },
        u & /*loading_status*/
        1024 && Ng(
          /*loading_status*/
          o[10]
        )
      ]) : {};
      e.$set(c);
    },
    i(o) {
      n || (wr(e.$$.fragment, o), n = !0);
    },
    o(o) {
      ns(e.$$.fragment, o), n = !1;
    },
    d(o) {
      ao(e, o);
    }
  };
}
function jg(t) {
  let e;
  return {
    c() {
      e = Pg(
        /*label*/
        t[2]
      );
    },
    m(n, r) {
      Ha(n, e, r);
    },
    p(n, r) {
      r & /*label*/
      4 && Hg(
        e,
        /*label*/
        n[2]
      );
    },
    d(n) {
      n && La(e);
    }
  };
}
function Vg(t) {
  let e, n, r, l, o, u, c, h, p, _, v = (
    /*loading_status*/
    t[10] && j1(t)
  );
  return r = new Ga({
    props: {
      show_label: (
        /*show_label*/
        t[7]
      ),
      info: void 0,
      $$slots: { default: [jg] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      v && v.c(), e = G1(), n = P1("label"), lo(r.$$.fragment), l = G1(), o = P1("input"), b0(o, "data-testid", "textbox"), b0(o, "type", "text"), b0(o, "class", "scroll-hide svelte-2jrh70"), b0(
        o,
        "placeholder",
        /*placeholder*/
        t[6]
      ), o.disabled = u = !/*interactive*/
      t[11], b0(o, "dir", c = /*rtl*/
      t[12] ? "rtl" : "ltr"), b0(n, "class", "svelte-2jrh70"), qg(n, "container", Xg);
    },
    m(k, E) {
      v && v.m(k, E), Ha(k, e, E), Ha(k, n, E), oo(r, n, null), H1(n, l), H1(n, o), U1(
        o,
        /*value*/
        t[0]
      ), t[17](o), h = !0, p || (_ = [
        q1(
          o,
          "input",
          /*input_input_handler*/
          t[16]
        ),
        q1(
          o,
          "keypress",
          /*handle_keypress*/
          t[14]
        )
      ], p = !0);
    },
    p(k, E) {
      /*loading_status*/
      k[10] ? v ? (v.p(k, E), E & /*loading_status*/
      1024 && wr(v, 1)) : (v = j1(k), v.c(), wr(v, 1), v.m(e.parentNode, e)) : v && (Rg(), ns(v, 1, 1, () => {
        v = null;
      }), Bg());
      const z = {};
      E & /*show_label*/
      128 && (z.show_label = /*show_label*/
      k[7]), E & /*$$scope, label*/
      1048580 && (z.$$scope = { dirty: E, ctx: k }), r.$set(z), (!h || E & /*placeholder*/
      64) && b0(
        o,
        "placeholder",
        /*placeholder*/
        k[6]
      ), (!h || E & /*interactive*/
      2048 && u !== (u = !/*interactive*/
      k[11])) && (o.disabled = u), (!h || E & /*rtl*/
      4096 && c !== (c = /*rtl*/
      k[12] ? "rtl" : "ltr")) && b0(o, "dir", c), E & /*value*/
      1 && o.value !== /*value*/
      k[0] && U1(
        o,
        /*value*/
        k[0]
      );
    },
    i(k) {
      h || (wr(v), wr(r.$$.fragment, k), h = !0);
    },
    o(k) {
      ns(v), ns(r.$$.fragment, k), h = !1;
    },
    d(k) {
      k && (La(e), La(n)), v && v.d(k), ao(r), t[17](null), p = !1, Ig(_);
    }
  };
}
function Wg(t) {
  let e, n;
  return e = new ms({
    props: {
      visible: (
        /*visible*/
        t[5]
      ),
      elem_id: (
        /*elem_id*/
        t[3]
      ),
      elem_classes: (
        /*elem_classes*/
        t[4]
      ),
      scale: (
        /*scale*/
        t[8]
      ),
      min_width: (
        /*min_width*/
        t[9]
      ),
      allow_overflow: !1,
      padding: !0,
      $$slots: { default: [Vg] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      lo(e.$$.fragment);
    },
    m(r, l) {
      oo(e, r, l), n = !0;
    },
    p(r, [l]) {
      const o = {};
      l & /*visible*/
      32 && (o.visible = /*visible*/
      r[5]), l & /*elem_id*/
      8 && (o.elem_id = /*elem_id*/
      r[3]), l & /*elem_classes*/
      16 && (o.elem_classes = /*elem_classes*/
      r[4]), l & /*scale*/
      256 && (o.scale = /*scale*/
      r[8]), l & /*min_width*/
      512 && (o.min_width = /*min_width*/
      r[9]), l & /*$$scope, placeholder, interactive, rtl, value, el, show_label, label, gradio, loading_status*/
      1064135 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (wr(e.$$.fragment, r), n = !0);
    },
    o(r) {
      ns(e.$$.fragment, r), n = !1;
    },
    d(r) {
      ao(e, r);
    }
  };
}
const Xg = !0;
function Yg(t, e, n) {
  const r = Gg();
  let { gradio: l } = e, { label: o = "Textbox" } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { visible: h = !0 } = e, { value: p = "" } = e, { placeholder: _ = "" } = e, { show_label: v } = e, { scale: k = null } = e, { min_width: E = void 0 } = e, { loading_status: z = void 0 } = e, { value_is_output: H = !1 } = e, { interactive: U } = e, { rtl: N = !1 } = e, M;
  function A() {
    r("change"), H || r("input");
  }
  async function x(q) {
    await Ug(), q.key === "Enter" && (q.preventDefault(), r("submit", p));
  }
  function C() {
    p = this.value, n(0, p);
  }
  function O(q) {
    Mg[q ? "unshift" : "push"](() => {
      M = q, n(13, M);
    });
  }
  return t.$$set = (q) => {
    "gradio" in q && n(1, l = q.gradio), "label" in q && n(2, o = q.label), "elem_id" in q && n(3, u = q.elem_id), "elem_classes" in q && n(4, c = q.elem_classes), "visible" in q && n(5, h = q.visible), "value" in q && n(0, p = q.value), "placeholder" in q && n(6, _ = q.placeholder), "show_label" in q && n(7, v = q.show_label), "scale" in q && n(8, k = q.scale), "min_width" in q && n(9, E = q.min_width), "loading_status" in q && n(10, z = q.loading_status), "value_is_output" in q && n(15, H = q.value_is_output), "interactive" in q && n(11, U = q.interactive), "rtl" in q && n(12, N = q.rtl);
  }, t.$$.update = () => {
    t.$$.dirty & /*value*/
    1 && p === null && n(0, p = ""), t.$$.dirty & /*value*/
    1 && A();
  }, [
    p,
    l,
    o,
    u,
    c,
    h,
    _,
    v,
    k,
    E,
    z,
    U,
    N,
    M,
    x,
    H,
    C,
    O
  ];
}
class Zg extends Fg {
  constructor(e) {
    super(), Og(this, e, Yg, Wg, Lg, {
      gradio: 1,
      label: 2,
      elem_id: 3,
      elem_classes: 4,
      visible: 5,
      value: 0,
      placeholder: 6,
      show_label: 7,
      scale: 8,
      min_width: 9,
      loading_status: 10,
      value_is_output: 15,
      interactive: 11,
      rtl: 12
    });
  }
  get gradio() {
    return this.$$.ctx[1];
  }
  set gradio(e) {
    this.$$set({ gradio: e }), an();
  }
  get label() {
    return this.$$.ctx[2];
  }
  set label(e) {
    this.$$set({ label: e }), an();
  }
  get elem_id() {
    return this.$$.ctx[3];
  }
  set elem_id(e) {
    this.$$set({ elem_id: e }), an();
  }
  get elem_classes() {
    return this.$$.ctx[4];
  }
  set elem_classes(e) {
    this.$$set({ elem_classes: e }), an();
  }
  get visible() {
    return this.$$.ctx[5];
  }
  set visible(e) {
    this.$$set({ visible: e }), an();
  }
  get value() {
    return this.$$.ctx[0];
  }
  set value(e) {
    this.$$set({ value: e }), an();
  }
  get placeholder() {
    return this.$$.ctx[6];
  }
  set placeholder(e) {
    this.$$set({ placeholder: e }), an();
  }
  get show_label() {
    return this.$$.ctx[7];
  }
  set show_label(e) {
    this.$$set({ show_label: e }), an();
  }
  get scale() {
    return this.$$.ctx[8];
  }
  set scale(e) {
    this.$$set({ scale: e }), an();
  }
  get min_width() {
    return this.$$.ctx[9];
  }
  set min_width(e) {
    this.$$set({ min_width: e }), an();
  }
  get loading_status() {
    return this.$$.ctx[10];
  }
  set loading_status(e) {
    this.$$set({ loading_status: e }), an();
  }
  get value_is_output() {
    return this.$$.ctx[15];
  }
  set value_is_output(e) {
    this.$$set({ value_is_output: e }), an();
  }
  get interactive() {
    return this.$$.ctx[11];
  }
  set interactive(e) {
    this.$$set({ interactive: e }), an();
  }
  get rtl() {
    return this.$$.ctx[12];
  }
  set rtl(e) {
    this.$$set({ rtl: e }), an();
  }
}
const {
  SvelteComponent: Jg,
  append: ra,
  attr: At,
  binding_callbacks: V1,
  create_component: t4,
  destroy_component: n4,
  detach: pi,
  element: ri,
  init: Qg,
  insert: gi,
  listen: si,
  mount_component: r4,
  run_all: Kg,
  safe_not_equal: $g,
  set_data: e8,
  set_input_value: ii,
  space: W1,
  text: t8,
  to_number: Pa,
  transition_in: s4,
  transition_out: i4
} = window.__gradio__svelte__internal, { afterUpdate: n8, createEventDispatcher: r8 } = window.__gradio__svelte__internal;
function s8(t) {
  let e;
  return {
    c() {
      e = t8(
        /*label*/
        t[2]
      );
    },
    m(n, r) {
      gi(n, e, r);
    },
    p(n, r) {
      r & /*label*/
      4 && e8(
        e,
        /*label*/
        n[2]
      );
    },
    d(n) {
      n && pi(e);
    }
  };
}
function i8(t) {
  let e, n, r, l, o, u, c, h, p, _, v, k;
  return r = new Ga({
    props: {
      show_label: (
        /*show_label*/
        t[10]
      ),
      info: (
        /*info*/
        t[3]
      ),
      $$slots: { default: [s8] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      e = ri("div"), n = ri("div"), t4(r.$$.fragment), l = W1(), o = ri("input"), c = W1(), h = ri("input"), At(o, "aria-label", u = `number input for ${/*label*/
      t[2]}`), At(o, "data-testid", "number-input"), At(o, "type", "number"), At(
        o,
        "min",
        /*minimum*/
        t[7]
      ), At(
        o,
        "max",
        /*maximum*/
        t[8]
      ), At(
        o,
        "step",
        /*step*/
        t[9]
      ), o.disabled = /*disabled*/
      t[13], At(o, "class", "svelte-x7uq94"), At(n, "class", "head svelte-x7uq94"), At(e, "class", "wrap svelte-x7uq94"), At(h, "type", "range"), At(h, "name", "cowbell"), At(
        h,
        "min",
        /*minimum*/
        t[7]
      ), At(
        h,
        "max",
        /*maximum*/
        t[8]
      ), At(
        h,
        "step",
        /*step*/
        t[9]
      ), h.disabled = /*disabled*/
      t[13], At(h, "aria-label", p = `range slider for ${/*label*/
      t[2]}`), At(h, "class", "svelte-x7uq94");
    },
    m(E, z) {
      gi(E, e, z), ra(e, n), r4(r, n, null), ra(n, l), ra(n, o), ii(
        o,
        /*value*/
        t[0]
      ), t[18](o), gi(E, c, z), gi(E, h, z), ii(
        h,
        /*value*/
        t[0]
      ), t[20](h), _ = !0, v || (k = [
        si(
          o,
          "input",
          /*input0_input_handler*/
          t[17]
        ),
        si(
          o,
          "blur",
          /*clamp*/
          t[14]
        ),
        si(
          h,
          "change",
          /*input1_change_input_handler*/
          t[19]
        ),
        si(
          h,
          "input",
          /*input1_change_input_handler*/
          t[19]
        )
      ], v = !0);
    },
    p(E, z) {
      const H = {};
      z & /*show_label*/
      1024 && (H.show_label = /*show_label*/
      E[10]), z & /*info*/
      8 && (H.info = /*info*/
      E[3]), z & /*$$scope, label*/
      33554436 && (H.$$scope = { dirty: z, ctx: E }), r.$set(H), (!_ || z & /*label*/
      4 && u !== (u = `number input for ${/*label*/
      E[2]}`)) && At(o, "aria-label", u), (!_ || z & /*minimum*/
      128) && At(
        o,
        "min",
        /*minimum*/
        E[7]
      ), (!_ || z & /*maximum*/
      256) && At(
        o,
        "max",
        /*maximum*/
        E[8]
      ), (!_ || z & /*step*/
      512) && At(
        o,
        "step",
        /*step*/
        E[9]
      ), (!_ || z & /*disabled*/
      8192) && (o.disabled = /*disabled*/
      E[13]), z & /*value*/
      1 && Pa(o.value) !== /*value*/
      E[0] && ii(
        o,
        /*value*/
        E[0]
      ), (!_ || z & /*minimum*/
      128) && At(
        h,
        "min",
        /*minimum*/
        E[7]
      ), (!_ || z & /*maximum*/
      256) && At(
        h,
        "max",
        /*maximum*/
        E[8]
      ), (!_ || z & /*step*/
      512) && At(
        h,
        "step",
        /*step*/
        E[9]
      ), (!_ || z & /*disabled*/
      8192) && (h.disabled = /*disabled*/
      E[13]), (!_ || z & /*label*/
      4 && p !== (p = `range slider for ${/*label*/
      E[2]}`)) && At(h, "aria-label", p), z & /*value*/
      1 && ii(
        h,
        /*value*/
        E[0]
      );
    },
    i(E) {
      _ || (s4(r.$$.fragment, E), _ = !0);
    },
    o(E) {
      i4(r.$$.fragment, E), _ = !1;
    },
    d(E) {
      E && (pi(e), pi(c), pi(h)), n4(r), t[18](null), t[20](null), v = !1, Kg(k);
    }
  };
}
function l8(t) {
  let e, n;
  return e = new ms({
    props: {
      visible: (
        /*visible*/
        t[1]
      ),
      container: (
        /*container*/
        t[4]
      ),
      scale: (
        /*scale*/
        t[5]
      ),
      min_width: (
        /*min_width*/
        t[6]
      ),
      $$slots: { default: [i8] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      t4(e.$$.fragment);
    },
    m(r, l) {
      r4(e, r, l), n = !0;
    },
    p(r, [l]) {
      const o = {};
      l & /*visible*/
      2 && (o.visible = /*visible*/
      r[1]), l & /*container*/
      16 && (o.container = /*container*/
      r[4]), l & /*scale*/
      32 && (o.scale = /*scale*/
      r[5]), l & /*min_width*/
      64 && (o.min_width = /*min_width*/
      r[6]), l & /*$$scope, minimum, maximum, step, disabled, label, value, rangeInput, numberInput, show_label, info*/
      33570701 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (s4(e.$$.fragment, r), n = !0);
    },
    o(r) {
      i4(e.$$.fragment, r), n = !1;
    },
    d(r) {
      n4(e, r);
    }
  };
}
function a8(t, e, n) {
  let r;
  const l = r8();
  let { visible: o = !0 } = e, { value: u = 0 } = e, { label: c } = e, { info: h = void 0 } = e, { container: p = !0 } = e, { scale: _ = null } = e, { min_width: v = void 0 } = e, { minimum: k } = e, { maximum: E = 100 } = e, { step: z } = e, { show_label: H } = e, { interactive: U } = e, { value_is_output: N = !1 } = e, M, A;
  function x() {
    l("change", u), N || l("input", u);
  }
  n8(() => {
    n(15, N = !1), O();
  });
  function C() {
    n(0, u = Math.min(Math.max(u, k), E));
  }
  function O() {
    q(), M.addEventListener("input", q), A.addEventListener("input", q);
  }
  function q() {
    const te = Number(M.value) - Number(M.min), Se = Number(M.max) - Number(M.min), Ce = Se === 0 ? 0 : te / Se;
    n(11, M.style.backgroundSize = Ce * 100 + "% 100%", M);
  }
  function R() {
    u = Pa(this.value), n(0, u);
  }
  function J(te) {
    V1[te ? "unshift" : "push"](() => {
      A = te, n(12, A);
    });
  }
  function ne() {
    u = Pa(this.value), n(0, u);
  }
  function ie(te) {
    V1[te ? "unshift" : "push"](() => {
      M = te, n(11, M);
    });
  }
  return t.$$set = (te) => {
    "visible" in te && n(1, o = te.visible), "value" in te && n(0, u = te.value), "label" in te && n(2, c = te.label), "info" in te && n(3, h = te.info), "container" in te && n(4, p = te.container), "scale" in te && n(5, _ = te.scale), "min_width" in te && n(6, v = te.min_width), "minimum" in te && n(7, k = te.minimum), "maximum" in te && n(8, E = te.maximum), "step" in te && n(9, z = te.step), "show_label" in te && n(10, H = te.show_label), "interactive" in te && n(16, U = te.interactive), "value_is_output" in te && n(15, N = te.value_is_output);
  }, t.$$.update = () => {
    t.$$.dirty & /*interactive*/
    65536 && n(13, r = !U), t.$$.dirty & /*value*/
    1 && x();
  }, [
    u,
    o,
    c,
    h,
    p,
    _,
    v,
    k,
    E,
    z,
    H,
    M,
    A,
    r,
    C,
    N,
    U,
    R,
    J,
    ne,
    ie
  ];
}
class o8 extends Jg {
  constructor(e) {
    super(), Qg(this, e, a8, l8, $g, {
      visible: 1,
      value: 0,
      label: 2,
      info: 3,
      container: 4,
      scale: 5,
      min_width: 6,
      minimum: 7,
      maximum: 8,
      step: 9,
      show_label: 10,
      interactive: 16,
      value_is_output: 15
    });
  }
}
const {
  SvelteComponent: u8,
  attr: c8,
  create_slot: f8,
  detach: h8,
  element: d8,
  get_all_dirty_from_scope: m8,
  get_slot_changes: p8,
  init: g8,
  insert: _8,
  safe_not_equal: b8,
  transition_in: w8,
  transition_out: y8,
  update_slot_base: v8
} = window.__gradio__svelte__internal;
function k8(t) {
  let e, n;
  const r = (
    /*#slots*/
    t[1].default
  ), l = f8(
    r,
    t,
    /*$$scope*/
    t[0],
    null
  );
  return {
    c() {
      e = d8("div"), l && l.c(), c8(e, "class", "svelte-1hnfib2");
    },
    m(o, u) {
      _8(o, e, u), l && l.m(e, null), n = !0;
    },
    p(o, [u]) {
      l && l.p && (!n || u & /*$$scope*/
      1) && v8(
        l,
        r,
        o,
        /*$$scope*/
        o[0],
        n ? p8(
          r,
          /*$$scope*/
          o[0],
          u,
          null
        ) : m8(
          /*$$scope*/
          o[0]
        ),
        null
      );
    },
    i(o) {
      n || (w8(l, o), n = !0);
    },
    o(o) {
      y8(l, o), n = !1;
    },
    d(o) {
      o && h8(e), l && l.d(o);
    }
  };
}
function D8(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e;
  return t.$$set = (o) => {
    "$$scope" in o && n(0, l = o.$$scope);
  }, [l, r];
}
class A8 extends u8 {
  constructor(e) {
    super(), g8(this, e, D8, k8, b8, {});
  }
}
const {
  SvelteComponent: S8,
  attr: X1,
  check_outros: E8,
  create_component: x8,
  create_slot: T8,
  destroy_component: F8,
  detach: _i,
  element: C8,
  empty: M8,
  get_all_dirty_from_scope: B8,
  get_slot_changes: N8,
  group_outros: z8,
  init: R8,
  insert: bi,
  mount_component: O8,
  safe_not_equal: I8,
  set_data: L8,
  space: H8,
  text: P8,
  toggle_class: hr,
  transition_in: Jr,
  transition_out: wi,
  update_slot_base: q8
} = window.__gradio__svelte__internal;
function Y1(t) {
  let e, n;
  return e = new A8({
    props: {
      $$slots: { default: [U8] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      x8(e.$$.fragment);
    },
    m(r, l) {
      O8(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l & /*$$scope, info*/
      10 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (Jr(e.$$.fragment, r), n = !0);
    },
    o(r) {
      wi(e.$$.fragment, r), n = !1;
    },
    d(r) {
      F8(e, r);
    }
  };
}
function U8(t) {
  let e;
  return {
    c() {
      e = P8(
        /*info*/
        t[1]
      );
    },
    m(n, r) {
      bi(n, e, r);
    },
    p(n, r) {
      r & /*info*/
      2 && L8(
        e,
        /*info*/
        n[1]
      );
    },
    d(n) {
      n && _i(e);
    }
  };
}
function G8(t) {
  let e, n, r, l;
  const o = (
    /*#slots*/
    t[2].default
  ), u = T8(
    o,
    t,
    /*$$scope*/
    t[3],
    null
  );
  let c = (
    /*info*/
    t[1] && Y1(t)
  );
  return {
    c() {
      e = C8("span"), u && u.c(), n = H8(), c && c.c(), r = M8(), X1(e, "data-testid", "block-info"), X1(e, "class", "svelte-22c38v"), hr(e, "sr-only", !/*show_label*/
      t[0]), hr(e, "hide", !/*show_label*/
      t[0]), hr(
        e,
        "has-info",
        /*info*/
        t[1] != null
      );
    },
    m(h, p) {
      bi(h, e, p), u && u.m(e, null), bi(h, n, p), c && c.m(h, p), bi(h, r, p), l = !0;
    },
    p(h, [p]) {
      u && u.p && (!l || p & /*$$scope*/
      8) && q8(
        u,
        o,
        h,
        /*$$scope*/
        h[3],
        l ? N8(
          o,
          /*$$scope*/
          h[3],
          p,
          null
        ) : B8(
          /*$$scope*/
          h[3]
        ),
        null
      ), (!l || p & /*show_label*/
      1) && hr(e, "sr-only", !/*show_label*/
      h[0]), (!l || p & /*show_label*/
      1) && hr(e, "hide", !/*show_label*/
      h[0]), (!l || p & /*info*/
      2) && hr(
        e,
        "has-info",
        /*info*/
        h[1] != null
      ), /*info*/
      h[1] ? c ? (c.p(h, p), p & /*info*/
      2 && Jr(c, 1)) : (c = Y1(h), c.c(), Jr(c, 1), c.m(r.parentNode, r)) : c && (z8(), wi(c, 1, 1, () => {
        c = null;
      }), E8());
    },
    i(h) {
      l || (Jr(u, h), Jr(c), l = !0);
    },
    o(h) {
      wi(u, h), wi(c), l = !1;
    },
    d(h) {
      h && (_i(e), _i(n), _i(r)), u && u.d(h), c && c.d(h);
    }
  };
}
function j8(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { show_label: o = !0 } = e, { info: u = void 0 } = e;
  return t.$$set = (c) => {
    "show_label" in c && n(0, o = c.show_label), "info" in c && n(1, u = c.info), "$$scope" in c && n(3, l = c.$$scope);
  }, [o, u, r, l];
}
class V8 extends S8 {
  constructor(e) {
    super(), R8(this, e, j8, G8, I8, { show_label: 0, info: 1 });
  }
}
const {
  SvelteComponent: W8,
  append: X8,
  attr: dr,
  detach: Y8,
  init: Z8,
  insert: J8,
  noop: sa,
  safe_not_equal: Q8,
  svg_element: Z1
} = window.__gradio__svelte__internal;
function K8(t) {
  let e, n;
  return {
    c() {
      e = Z1("svg"), n = Z1("path"), dr(n, "d", "M5 8l4 4 4-4z"), dr(e, "class", "dropdown-arrow svelte-145leq6"), dr(e, "xmlns", "http://www.w3.org/2000/svg"), dr(e, "width", "100%"), dr(e, "height", "100%"), dr(e, "viewBox", "0 0 18 18");
    },
    m(r, l) {
      J8(r, e, l), X8(e, n);
    },
    p: sa,
    i: sa,
    o: sa,
    d(r) {
      r && Y8(e);
    }
  };
}
class $8 extends W8 {
  constructor(e) {
    super(), Z8(this, e, null, K8, Q8, {});
  }
}
const {
  SvelteComponent: e9,
  append: t9,
  attr: ia,
  detach: n9,
  init: r9,
  insert: s9,
  noop: la,
  safe_not_equal: i9,
  svg_element: J1
} = window.__gradio__svelte__internal;
function l9(t) {
  let e, n;
  return {
    c() {
      e = J1("svg"), n = J1("path"), ia(n, "d", "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"), ia(e, "xmlns", "http://www.w3.org/2000/svg"), ia(e, "viewBox", "0 0 24 24");
    },
    m(r, l) {
      s9(r, e, l), t9(e, n);
    },
    p: la,
    i: la,
    o: la,
    d(r) {
      r && n9(e);
    }
  };
}
class l4 extends e9 {
  constructor(e) {
    super(), r9(this, e, null, l9, i9, {});
  }
}
const {
  SvelteComponent: a9,
  add_render_callback: a4,
  append: li,
  attr: _n,
  binding_callbacks: Q1,
  check_outros: o9,
  create_bidirectional_transition: K1,
  destroy_each: u9,
  detach: rs,
  element: Ii,
  empty: c9,
  ensure_array_like: $1,
  group_outros: f9,
  init: h9,
  insert: ss,
  listen: qa,
  prevent_default: d9,
  run_all: m9,
  safe_not_equal: p9,
  set_data: g9,
  set_style: w0,
  space: Ua,
  text: _9,
  toggle_class: Xn,
  transition_in: aa,
  transition_out: ef
} = window.__gradio__svelte__internal, { createEventDispatcher: b9 } = window.__gradio__svelte__internal;
function tf(t, e, n) {
  const r = t.slice();
  return r[24] = e[n], r;
}
function nf(t) {
  let e, n, r, l, o, u = $1(
    /*filtered_indices*/
    t[1]
  ), c = [];
  for (let h = 0; h < u.length; h += 1)
    c[h] = rf(tf(t, u, h));
  return {
    c() {
      e = Ii("ul");
      for (let h = 0; h < c.length; h += 1)
        c[h].c();
      _n(e, "class", "options svelte-yuohum"), _n(e, "role", "listbox"), w0(
        e,
        "top",
        /*top*/
        t[9]
      ), w0(
        e,
        "bottom",
        /*bottom*/
        t[10]
      ), w0(e, "max-height", `calc(${/*max_height*/
      t[11]}px - var(--window-padding))`), w0(
        e,
        "width",
        /*input_width*/
        t[8] + "px"
      );
    },
    m(h, p) {
      ss(h, e, p);
      for (let _ = 0; _ < c.length; _ += 1)
        c[_] && c[_].m(e, null);
      t[21](e), r = !0, l || (o = qa(e, "mousedown", d9(
        /*mousedown_handler*/
        t[20]
      )), l = !0);
    },
    p(h, p) {
      if (p & /*filtered_indices, choices, selected_indices, active_index*/
      51) {
        u = $1(
          /*filtered_indices*/
          h[1]
        );
        let _;
        for (_ = 0; _ < u.length; _ += 1) {
          const v = tf(h, u, _);
          c[_] ? c[_].p(v, p) : (c[_] = rf(v), c[_].c(), c[_].m(e, null));
        }
        for (; _ < c.length; _ += 1)
          c[_].d(1);
        c.length = u.length;
      }
      p & /*top*/
      512 && w0(
        e,
        "top",
        /*top*/
        h[9]
      ), p & /*bottom*/
      1024 && w0(
        e,
        "bottom",
        /*bottom*/
        h[10]
      ), p & /*max_height*/
      2048 && w0(e, "max-height", `calc(${/*max_height*/
      h[11]}px - var(--window-padding))`), p & /*input_width*/
      256 && w0(
        e,
        "width",
        /*input_width*/
        h[8] + "px"
      );
    },
    i(h) {
      r || (h && a4(() => {
        r && (n || (n = K1(e, Gu, { duration: 200, y: 5 }, !0)), n.run(1));
      }), r = !0);
    },
    o(h) {
      h && (n || (n = K1(e, Gu, { duration: 200, y: 5 }, !1)), n.run(0)), r = !1;
    },
    d(h) {
      h && rs(e), u9(c, h), t[21](null), h && n && n.end(), l = !1, o();
    }
  };
}
function rf(t) {
  let e, n, r, l = (
    /*choices*/
    t[0][
      /*index*/
      t[24]
    ][0] + ""
  ), o, u, c, h, p;
  return {
    c() {
      e = Ii("li"), n = Ii("span"), n.textContent = "✓", r = Ua(), o = _9(l), u = Ua(), _n(n, "class", "inner-item svelte-yuohum"), Xn(n, "hide", !/*selected_indices*/
      t[4].includes(
        /*index*/
        t[24]
      )), _n(e, "class", "item svelte-yuohum"), _n(e, "data-index", c = /*index*/
      t[24]), _n(e, "aria-label", h = /*choices*/
      t[0][
        /*index*/
        t[24]
      ][0]), _n(e, "data-testid", "dropdown-option"), _n(e, "role", "option"), _n(e, "aria-selected", p = /*selected_indices*/
      t[4].includes(
        /*index*/
        t[24]
      )), Xn(
        e,
        "selected",
        /*selected_indices*/
        t[4].includes(
          /*index*/
          t[24]
        )
      ), Xn(
        e,
        "active",
        /*index*/
        t[24] === /*active_index*/
        t[5]
      ), Xn(
        e,
        "bg-gray-100",
        /*index*/
        t[24] === /*active_index*/
        t[5]
      ), Xn(
        e,
        "dark:bg-gray-600",
        /*index*/
        t[24] === /*active_index*/
        t[5]
      );
    },
    m(_, v) {
      ss(_, e, v), li(e, n), li(e, r), li(e, o), li(e, u);
    },
    p(_, v) {
      v & /*selected_indices, filtered_indices*/
      18 && Xn(n, "hide", !/*selected_indices*/
      _[4].includes(
        /*index*/
        _[24]
      )), v & /*choices, filtered_indices*/
      3 && l !== (l = /*choices*/
      _[0][
        /*index*/
        _[24]
      ][0] + "") && g9(o, l), v & /*filtered_indices*/
      2 && c !== (c = /*index*/
      _[24]) && _n(e, "data-index", c), v & /*choices, filtered_indices*/
      3 && h !== (h = /*choices*/
      _[0][
        /*index*/
        _[24]
      ][0]) && _n(e, "aria-label", h), v & /*selected_indices, filtered_indices*/
      18 && p !== (p = /*selected_indices*/
      _[4].includes(
        /*index*/
        _[24]
      )) && _n(e, "aria-selected", p), v & /*selected_indices, filtered_indices*/
      18 && Xn(
        e,
        "selected",
        /*selected_indices*/
        _[4].includes(
          /*index*/
          _[24]
        )
      ), v & /*filtered_indices, active_index*/
      34 && Xn(
        e,
        "active",
        /*index*/
        _[24] === /*active_index*/
        _[5]
      ), v & /*filtered_indices, active_index*/
      34 && Xn(
        e,
        "bg-gray-100",
        /*index*/
        _[24] === /*active_index*/
        _[5]
      ), v & /*filtered_indices, active_index*/
      34 && Xn(
        e,
        "dark:bg-gray-600",
        /*index*/
        _[24] === /*active_index*/
        _[5]
      );
    },
    d(_) {
      _ && rs(e);
    }
  };
}
function w9(t) {
  let e, n, r, l, o;
  a4(
    /*onwindowresize*/
    t[18]
  );
  let u = (
    /*show_options*/
    t[2] && !/*disabled*/
    t[3] && nf(t)
  );
  return {
    c() {
      e = Ii("div"), n = Ua(), u && u.c(), r = c9(), _n(e, "class", "reference");
    },
    m(c, h) {
      ss(c, e, h), t[19](e), ss(c, n, h), u && u.m(c, h), ss(c, r, h), l || (o = [
        qa(
          window,
          "scroll",
          /*scroll_listener*/
          t[13]
        ),
        qa(
          window,
          "resize",
          /*onwindowresize*/
          t[18]
        )
      ], l = !0);
    },
    p(c, [h]) {
      /*show_options*/
      c[2] && !/*disabled*/
      c[3] ? u ? (u.p(c, h), h & /*show_options, disabled*/
      12 && aa(u, 1)) : (u = nf(c), u.c(), aa(u, 1), u.m(r.parentNode, r)) : u && (f9(), ef(u, 1, 1, () => {
        u = null;
      }), o9());
    },
    i(c) {
      aa(u);
    },
    o(c) {
      ef(u);
    },
    d(c) {
      c && (rs(e), rs(n), rs(r)), t[19](null), u && u.d(c), l = !1, m9(o);
    }
  };
}
function ai(t) {
  let e, n = t[0], r = 1;
  for (; r < t.length; ) {
    const l = t[r], o = t[r + 1];
    if (r += 2, (l === "optionalAccess" || l === "optionalCall") && n == null)
      return;
    l === "access" || l === "optionalAccess" ? (e = n, n = o(n)) : (l === "call" || l === "optionalCall") && (n = o((...u) => n.call(e, ...u)), e = void 0);
  }
  return n;
}
function y9(t, e, n) {
  let { choices: r } = e, { filtered_indices: l } = e, { show_options: o = !1 } = e, { disabled: u = !1 } = e, { selected_indices: c = [] } = e, { active_index: h = null } = e, p, _, v, k, E, z, H, U, N, M;
  function A() {
    const { top: ie, bottom: te } = E.getBoundingClientRect();
    n(15, p = ie), n(16, _ = M - te);
  }
  let x = null;
  function C() {
    o && (x !== null && clearTimeout(x), x = setTimeout(
      () => {
        A(), x = null;
      },
      10
    ));
  }
  const O = b9();
  function q() {
    n(12, M = window.innerHeight);
  }
  function R(ie) {
    Q1[ie ? "unshift" : "push"](() => {
      E = ie, n(6, E);
    });
  }
  const J = (ie) => O("change", ie);
  function ne(ie) {
    Q1[ie ? "unshift" : "push"](() => {
      z = ie, n(7, z);
    });
  }
  return t.$$set = (ie) => {
    "choices" in ie && n(0, r = ie.choices), "filtered_indices" in ie && n(1, l = ie.filtered_indices), "show_options" in ie && n(2, o = ie.show_options), "disabled" in ie && n(3, u = ie.disabled), "selected_indices" in ie && n(4, c = ie.selected_indices), "active_index" in ie && n(5, h = ie.active_index);
  }, t.$$.update = () => {
    if (t.$$.dirty & /*show_options, refElement, listElement, selected_indices, distance_from_bottom, distance_from_top, input_height*/
    229588) {
      if (o && E) {
        if (z && c.length > 0) {
          let te = z.querySelectorAll("li");
          for (const Se of Array.from(te))
            if (Se.getAttribute("data-index") === c[0].toString()) {
              ai([
                z,
                "optionalAccess",
                (Ce) => Ce.scrollTo,
                "optionalCall",
                (Ce) => Ce(0, Se.offsetTop)
              ]);
              break;
            }
        }
        A();
        const ie = ai([
          E,
          "access",
          (te) => te.parentElement,
          "optionalAccess",
          (te) => te.getBoundingClientRect,
          "call",
          (te) => te()
        ]);
        n(17, v = ai([ie, "optionalAccess", (te) => te.height]) || 0), n(8, k = ai([ie, "optionalAccess", (te) => te.width]) || 0);
      }
      _ > p ? (n(9, H = `${p}px`), n(11, N = _), n(10, U = null)) : (n(10, U = `${_ + v}px`), n(11, N = p - v), n(9, H = null));
    }
  }, [
    r,
    l,
    o,
    u,
    c,
    h,
    E,
    z,
    k,
    H,
    U,
    N,
    M,
    C,
    O,
    p,
    _,
    v,
    q,
    R,
    J,
    ne
  ];
}
class v9 extends a9 {
  constructor(e) {
    super(), h9(this, e, y9, w9, p9, {
      choices: 0,
      filtered_indices: 1,
      show_options: 2,
      disabled: 3,
      selected_indices: 4,
      active_index: 5
    });
  }
}
function k9(t, e) {
  return (t % e + e) % e;
}
function D9(t, e) {
  return t.reduce((n, r, l) => ((!e || r[0].toLowerCase().includes(e.toLowerCase())) && n.push(l), n), []);
}
function A9(t, e, n) {
  t("change", e), n || t("input");
}
function S9(t, e, n) {
  if (t.key === "Escape")
    return [!1, e];
  if ((t.key === "ArrowDown" || t.key === "ArrowUp") && n.length >= 0)
    if (e === null)
      e = t.key === "ArrowDown" ? n[0] : n[n.length - 1];
    else {
      const r = n.indexOf(e), l = t.key === "ArrowUp" ? -1 : 1;
      e = n[k9(r + l, n.length)];
    }
  return [!0, e];
}
const {
  SvelteComponent: E9,
  append: Zn,
  attr: qt,
  binding_callbacks: x9,
  check_outros: Li,
  create_component: cs,
  destroy_component: fs,
  destroy_each: T9,
  detach: c0,
  element: Jn,
  ensure_array_like: sf,
  group_outros: Hi,
  init: F9,
  insert: f0,
  listen: l0,
  mount_component: hs,
  prevent_default: lf,
  run_all: uo,
  safe_not_equal: C9,
  set_data: co,
  set_input_value: af,
  space: yr,
  text: fo,
  toggle_class: mr,
  transition_in: Vt,
  transition_out: wn
} = window.__gradio__svelte__internal, { afterUpdate: M9, createEventDispatcher: B9 } = window.__gradio__svelte__internal;
function of(t, e, n) {
  const r = t.slice();
  return r[40] = e[n], r;
}
function N9(t) {
  let e;
  return {
    c() {
      e = fo(
        /*label*/
        t[0]
      );
    },
    m(n, r) {
      f0(n, e, r);
    },
    p(n, r) {
      r[0] & /*label*/
      1 && co(
        e,
        /*label*/
        n[0]
      );
    },
    d(n) {
      n && c0(e);
    }
  };
}
function z9(t) {
  let e = (
    /*s*/
    t[40] + ""
  ), n;
  return {
    c() {
      n = fo(e);
    },
    m(r, l) {
      f0(r, n, l);
    },
    p(r, l) {
      l[0] & /*selected_indices*/
      4096 && e !== (e = /*s*/
      r[40] + "") && co(n, e);
    },
    d(r) {
      r && c0(n);
    }
  };
}
function R9(t) {
  let e = (
    /*choices_names*/
    t[15][
      /*s*/
      t[40]
    ] + ""
  ), n;
  return {
    c() {
      n = fo(e);
    },
    m(r, l) {
      f0(r, n, l);
    },
    p(r, l) {
      l[0] & /*choices_names, selected_indices*/
      36864 && e !== (e = /*choices_names*/
      r[15][
        /*s*/
        r[40]
      ] + "") && co(n, e);
    },
    d(r) {
      r && c0(n);
    }
  };
}
function uf(t) {
  let e, n, r, l, o, u;
  n = new l4({});
  function c() {
    return (
      /*click_handler*/
      t[31](
        /*s*/
        t[40]
      )
    );
  }
  function h(...p) {
    return (
      /*keydown_handler*/
      t[32](
        /*s*/
        t[40],
        ...p
      )
    );
  }
  return {
    c() {
      e = Jn("div"), cs(n.$$.fragment), qt(e, "class", "token-remove svelte-xtjjyg"), qt(e, "role", "button"), qt(e, "tabindex", "0"), qt(e, "title", r = /*i18n*/
      t[9]("common.remove") + " " + /*s*/
      t[40]);
    },
    m(p, _) {
      f0(p, e, _), hs(n, e, null), l = !0, o || (u = [
        l0(e, "click", lf(c)),
        l0(e, "keydown", lf(h))
      ], o = !0);
    },
    p(p, _) {
      t = p, (!l || _[0] & /*i18n, selected_indices*/
      4608 && r !== (r = /*i18n*/
      t[9]("common.remove") + " " + /*s*/
      t[40])) && qt(e, "title", r);
    },
    i(p) {
      l || (Vt(n.$$.fragment, p), l = !0);
    },
    o(p) {
      wn(n.$$.fragment, p), l = !1;
    },
    d(p) {
      p && c0(e), fs(n), o = !1, uo(u);
    }
  };
}
function cf(t) {
  let e, n, r, l;
  function o(p, _) {
    return typeof /*s*/
    p[40] == "number" ? R9 : z9;
  }
  let u = o(t), c = u(t), h = !/*disabled*/
  t[4] && uf(t);
  return {
    c() {
      e = Jn("div"), n = Jn("span"), c.c(), r = yr(), h && h.c(), qt(n, "class", "svelte-xtjjyg"), qt(e, "class", "token svelte-xtjjyg");
    },
    m(p, _) {
      f0(p, e, _), Zn(e, n), c.m(n, null), Zn(e, r), h && h.m(e, null), l = !0;
    },
    p(p, _) {
      u === (u = o(p)) && c ? c.p(p, _) : (c.d(1), c = u(p), c && (c.c(), c.m(n, null))), /*disabled*/
      p[4] ? h && (Hi(), wn(h, 1, 1, () => {
        h = null;
      }), Li()) : h ? (h.p(p, _), _[0] & /*disabled*/
      16 && Vt(h, 1)) : (h = uf(p), h.c(), Vt(h, 1), h.m(e, null));
    },
    i(p) {
      l || (Vt(h), l = !0);
    },
    o(p) {
      wn(h), l = !1;
    },
    d(p) {
      p && c0(e), c.d(), h && h.d();
    }
  };
}
function ff(t) {
  let e, n, r, l, o = (
    /*selected_indices*/
    t[12].length > 0 && hf(t)
  );
  return r = new $8({}), {
    c() {
      o && o.c(), e = yr(), n = Jn("span"), cs(r.$$.fragment), qt(n, "class", "icon-wrap svelte-xtjjyg");
    },
    m(u, c) {
      o && o.m(u, c), f0(u, e, c), f0(u, n, c), hs(r, n, null), l = !0;
    },
    p(u, c) {
      /*selected_indices*/
      u[12].length > 0 ? o ? (o.p(u, c), c[0] & /*selected_indices*/
      4096 && Vt(o, 1)) : (o = hf(u), o.c(), Vt(o, 1), o.m(e.parentNode, e)) : o && (Hi(), wn(o, 1, 1, () => {
        o = null;
      }), Li());
    },
    i(u) {
      l || (Vt(o), Vt(r.$$.fragment, u), l = !0);
    },
    o(u) {
      wn(o), wn(r.$$.fragment, u), l = !1;
    },
    d(u) {
      u && (c0(e), c0(n)), o && o.d(u), fs(r);
    }
  };
}
function hf(t) {
  let e, n, r, l, o, u;
  return n = new l4({}), {
    c() {
      e = Jn("div"), cs(n.$$.fragment), qt(e, "role", "button"), qt(e, "tabindex", "0"), qt(e, "class", "token-remove remove-all svelte-xtjjyg"), qt(e, "title", r = /*i18n*/
      t[9]("common.clear"));
    },
    m(c, h) {
      f0(c, e, h), hs(n, e, null), l = !0, o || (u = [
        l0(
          e,
          "click",
          /*remove_all*/
          t[21]
        ),
        l0(
          e,
          "keydown",
          /*keydown_handler_1*/
          t[36]
        )
      ], o = !0);
    },
    p(c, h) {
      (!l || h[0] & /*i18n*/
      512 && r !== (r = /*i18n*/
      c[9]("common.clear"))) && qt(e, "title", r);
    },
    i(c) {
      l || (Vt(n.$$.fragment, c), l = !0);
    },
    o(c) {
      wn(n.$$.fragment, c), l = !1;
    },
    d(c) {
      c && c0(e), fs(n), o = !1, uo(u);
    }
  };
}
function O9(t) {
  let e, n, r, l, o, u, c, h, p, _, v, k, E, z, H;
  n = new V8({
    props: {
      show_label: (
        /*show_label*/
        t[5]
      ),
      info: (
        /*info*/
        t[1]
      ),
      $$slots: { default: [N9] },
      $$scope: { ctx: t }
    }
  });
  let U = sf(
    /*selected_indices*/
    t[12]
  ), N = [];
  for (let x = 0; x < U.length; x += 1)
    N[x] = cf(of(t, U, x));
  const M = (x) => wn(N[x], 1, 1, () => {
    N[x] = null;
  });
  let A = !/*disabled*/
  t[4] && ff(t);
  return k = new v9({
    props: {
      show_options: (
        /*show_options*/
        t[14]
      ),
      choices: (
        /*choices*/
        t[3]
      ),
      filtered_indices: (
        /*filtered_indices*/
        t[11]
      ),
      disabled: (
        /*disabled*/
        t[4]
      ),
      selected_indices: (
        /*selected_indices*/
        t[12]
      ),
      active_index: (
        /*active_index*/
        t[16]
      )
    }
  }), k.$on(
    "change",
    /*handle_option_selected*/
    t[20]
  ), {
    c() {
      e = Jn("label"), cs(n.$$.fragment), r = yr(), l = Jn("div"), o = Jn("div");
      for (let x = 0; x < N.length; x += 1)
        N[x].c();
      u = yr(), c = Jn("div"), h = Jn("input"), _ = yr(), A && A.c(), v = yr(), cs(k.$$.fragment), qt(h, "class", "border-none svelte-xtjjyg"), h.disabled = /*disabled*/
      t[4], qt(h, "autocomplete", "off"), h.readOnly = p = !/*filterable*/
      t[8], mr(h, "subdued", !/*choices_names*/
      t[15].includes(
        /*input_text*/
        t[10]
      ) && !/*allow_custom_value*/
      t[7] || /*selected_indices*/
      t[12].length === /*max_choices*/
      t[2]), qt(c, "class", "secondary-wrap svelte-xtjjyg"), qt(o, "class", "wrap-inner svelte-xtjjyg"), mr(
        o,
        "show_options",
        /*show_options*/
        t[14]
      ), qt(l, "class", "wrap svelte-xtjjyg"), qt(e, "class", "svelte-xtjjyg"), mr(
        e,
        "container",
        /*container*/
        t[6]
      );
    },
    m(x, C) {
      f0(x, e, C), hs(n, e, null), Zn(e, r), Zn(e, l), Zn(l, o);
      for (let O = 0; O < N.length; O += 1)
        N[O] && N[O].m(o, null);
      Zn(o, u), Zn(o, c), Zn(c, h), af(
        h,
        /*input_text*/
        t[10]
      ), t[34](h), Zn(c, _), A && A.m(c, null), Zn(l, v), hs(k, l, null), E = !0, z || (H = [
        l0(
          h,
          "input",
          /*input_input_handler*/
          t[33]
        ),
        l0(
          h,
          "keydown",
          /*handle_key_down*/
          t[23]
        ),
        l0(
          h,
          "keyup",
          /*keyup_handler*/
          t[35]
        ),
        l0(
          h,
          "blur",
          /*handle_blur*/
          t[18]
        ),
        l0(
          h,
          "focus",
          /*handle_focus*/
          t[22]
        )
      ], z = !0);
    },
    p(x, C) {
      const O = {};
      if (C[0] & /*show_label*/
      32 && (O.show_label = /*show_label*/
      x[5]), C[0] & /*info*/
      2 && (O.info = /*info*/
      x[1]), C[0] & /*label*/
      1 | C[1] & /*$$scope*/
      4096 && (O.$$scope = { dirty: C, ctx: x }), n.$set(O), C[0] & /*i18n, selected_indices, remove_selected_choice, disabled, choices_names*/
      561680) {
        U = sf(
          /*selected_indices*/
          x[12]
        );
        let R;
        for (R = 0; R < U.length; R += 1) {
          const J = of(x, U, R);
          N[R] ? (N[R].p(J, C), Vt(N[R], 1)) : (N[R] = cf(J), N[R].c(), Vt(N[R], 1), N[R].m(o, u));
        }
        for (Hi(), R = U.length; R < N.length; R += 1)
          M(R);
        Li();
      }
      (!E || C[0] & /*disabled*/
      16) && (h.disabled = /*disabled*/
      x[4]), (!E || C[0] & /*filterable*/
      256 && p !== (p = !/*filterable*/
      x[8])) && (h.readOnly = p), C[0] & /*input_text*/
      1024 && h.value !== /*input_text*/
      x[10] && af(
        h,
        /*input_text*/
        x[10]
      ), (!E || C[0] & /*choices_names, input_text, allow_custom_value, selected_indices, max_choices*/
      38020) && mr(h, "subdued", !/*choices_names*/
      x[15].includes(
        /*input_text*/
        x[10]
      ) && !/*allow_custom_value*/
      x[7] || /*selected_indices*/
      x[12].length === /*max_choices*/
      x[2]), /*disabled*/
      x[4] ? A && (Hi(), wn(A, 1, 1, () => {
        A = null;
      }), Li()) : A ? (A.p(x, C), C[0] & /*disabled*/
      16 && Vt(A, 1)) : (A = ff(x), A.c(), Vt(A, 1), A.m(c, null)), (!E || C[0] & /*show_options*/
      16384) && mr(
        o,
        "show_options",
        /*show_options*/
        x[14]
      );
      const q = {};
      C[0] & /*show_options*/
      16384 && (q.show_options = /*show_options*/
      x[14]), C[0] & /*choices*/
      8 && (q.choices = /*choices*/
      x[3]), C[0] & /*filtered_indices*/
      2048 && (q.filtered_indices = /*filtered_indices*/
      x[11]), C[0] & /*disabled*/
      16 && (q.disabled = /*disabled*/
      x[4]), C[0] & /*selected_indices*/
      4096 && (q.selected_indices = /*selected_indices*/
      x[12]), C[0] & /*active_index*/
      65536 && (q.active_index = /*active_index*/
      x[16]), k.$set(q), (!E || C[0] & /*container*/
      64) && mr(
        e,
        "container",
        /*container*/
        x[6]
      );
    },
    i(x) {
      if (!E) {
        Vt(n.$$.fragment, x);
        for (let C = 0; C < U.length; C += 1)
          Vt(N[C]);
        Vt(A), Vt(k.$$.fragment, x), E = !0;
      }
    },
    o(x) {
      wn(n.$$.fragment, x), N = N.filter(Boolean);
      for (let C = 0; C < N.length; C += 1)
        wn(N[C]);
      wn(A), wn(k.$$.fragment, x), E = !1;
    },
    d(x) {
      x && c0(e), fs(n), T9(N, x), t[34](null), A && A.d(), fs(k), z = !1, uo(H);
    }
  };
}
function I9(t, e, n) {
  let { label: r } = e, { info: l = void 0 } = e, { value: o = [] } = e, u = [], { value_is_output: c = !1 } = e, { max_choices: h = null } = e, { choices: p } = e, _, { disabled: v = !1 } = e, { show_label: k } = e, { container: E = !0 } = e, { allow_custom_value: z = !1 } = e, { filterable: H = !0 } = e, { i18n: U } = e, N, M = "", A = "", x = !1, C, O, q = [], R = null, J = [], ne = [];
  const ie = B9();
  Array.isArray(o) && o.forEach((K) => {
    const Ee = p.map((Ae) => Ae[1]).indexOf(K);
    Ee !== -1 ? J.push(Ee) : J.push(K);
  });
  function te() {
    z || n(10, M = ""), z && M !== "" && (Ce(M), n(10, M = "")), n(14, x = !1), n(16, R = null), ie("blur");
  }
  function Se(K) {
    n(12, J = J.filter((Ee) => Ee !== K)), ie("select", {
      index: typeof K == "number" ? K : -1,
      value: typeof K == "number" ? O[K] : K,
      selected: !1
    });
  }
  function Ce(K) {
    (h === null || J.length < h) && (n(12, J = [...J, K]), ie("select", {
      index: typeof K == "number" ? K : -1,
      value: typeof K == "number" ? O[K] : K,
      selected: !0
    })), J.length === h && (n(14, x = !1), n(16, R = null), N.blur());
  }
  function De(K) {
    const Ee = parseInt(K.detail.target.dataset.index);
    ce(Ee);
  }
  function ce(K) {
    J.includes(K) ? Se(K) : Ce(K), n(10, M = "");
  }
  function he(K) {
    n(12, J = []), n(10, M = ""), K.preventDefault();
  }
  function se(K) {
    n(11, q = p.map((Ee, Ae) => Ae)), (h === null || J.length < h) && n(14, x = !0), ie("focus");
  }
  function Ne(K) {
    n(14, [x, R] = S9(K, R, q), x, (n(16, R), n(3, p), n(27, _), n(10, M), n(28, A), n(7, z), n(11, q))), K.key === "Enter" && (R !== null ? ce(R) : z && (Ce(M), n(10, M = ""))), K.key === "Backspace" && M === "" && n(12, J = [...J.slice(0, -1)]), J.length === h && (n(14, x = !1), n(16, R = null));
  }
  function de() {
    o === void 0 ? n(12, J = []) : Array.isArray(o) && n(12, J = o.map((K) => {
      const Ee = O.indexOf(K);
      if (Ee !== -1)
        return Ee;
      if (z)
        return K;
    }).filter((K) => K !== void 0));
  }
  M9(() => {
    n(25, c = !1);
  });
  const Q = (K) => Se(K), me = (K, Ee) => {
    Ee.key === "Enter" && Se(K);
  };
  function V() {
    M = this.value, n(10, M);
  }
  function $(K) {
    x9[K ? "unshift" : "push"](() => {
      N = K, n(13, N);
    });
  }
  const we = (K) => ie("key_up", { key: K.key, input_value: M }), ye = (K) => {
    K.key === "Enter" && he(K);
  };
  return t.$$set = (K) => {
    "label" in K && n(0, r = K.label), "info" in K && n(1, l = K.info), "value" in K && n(24, o = K.value), "value_is_output" in K && n(25, c = K.value_is_output), "max_choices" in K && n(2, h = K.max_choices), "choices" in K && n(3, p = K.choices), "disabled" in K && n(4, v = K.disabled), "show_label" in K && n(5, k = K.show_label), "container" in K && n(6, E = K.container), "allow_custom_value" in K && n(7, z = K.allow_custom_value), "filterable" in K && n(8, H = K.filterable), "i18n" in K && n(9, U = K.i18n);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*choices*/
    8 && (n(15, C = p.map((K) => K[0])), n(29, O = p.map((K) => K[1]))), t.$$.dirty[0] & /*choices, old_choices, input_text, old_input_text, allow_custom_value, filtered_indices*/
    402656392 && (p !== _ || M !== A) && (n(11, q = D9(p, M)), n(27, _ = p), n(28, A = M), z || n(16, R = q[0])), t.$$.dirty[0] & /*selected_indices, old_selected_index, choices_values*/
    1610616832 && JSON.stringify(J) != JSON.stringify(ne) && (n(24, o = J.map((K) => typeof K == "number" ? O[K] : K)), n(30, ne = J.slice())), t.$$.dirty[0] & /*value, old_value, value_is_output*/
    117440512 && JSON.stringify(o) != JSON.stringify(u) && (A9(ie, o, c), n(26, u = Array.isArray(o) ? o.slice() : o)), t.$$.dirty[0] & /*value*/
    16777216 && de();
  }, [
    r,
    l,
    h,
    p,
    v,
    k,
    E,
    z,
    H,
    U,
    M,
    q,
    J,
    N,
    x,
    C,
    R,
    ie,
    te,
    Se,
    De,
    he,
    se,
    Ne,
    o,
    c,
    u,
    _,
    A,
    O,
    ne,
    Q,
    me,
    V,
    $,
    we,
    ye
  ];
}
class L9 extends E9 {
  constructor(e) {
    super(), F9(
      this,
      e,
      I9,
      O9,
      C9,
      {
        label: 0,
        info: 1,
        value: 24,
        value_is_output: 25,
        max_choices: 2,
        choices: 3,
        disabled: 4,
        show_label: 5,
        container: 6,
        allow_custom_value: 7,
        filterable: 8,
        i18n: 9
      },
      null,
      [-1, -1]
    );
  }
}
const {
  SvelteComponent: H9,
  append: P9,
  attr: Xr,
  create_slot: q9,
  detach: U9,
  element: df,
  get_all_dirty_from_scope: G9,
  get_slot_changes: j9,
  init: V9,
  insert: W9,
  safe_not_equal: X9,
  set_style: G0,
  toggle_class: mf,
  transition_in: Y9,
  transition_out: Z9,
  update_slot_base: J9
} = window.__gradio__svelte__internal;
function Q9(t) {
  let e, n, r, l;
  const o = (
    /*#slots*/
    t[4].default
  ), u = q9(
    o,
    t,
    /*$$scope*/
    t[3],
    null
  );
  return {
    c() {
      e = df("div"), n = df("div"), u && u.c(), Xr(n, "class", "styler svelte-11xc5rw"), G0(n, "--block-radius", "0px"), G0(n, "--block-border-width", "0px"), G0(n, "--layout-gap", "1px"), G0(n, "--form-gap-width", "1px"), G0(n, "--button-border-width", "0px"), G0(n, "--button-large-radius", "0px"), G0(n, "--button-small-radius", "0px"), Xr(
        e,
        "id",
        /*elem_id*/
        t[0]
      ), Xr(e, "class", r = "gr-group " + /*elem_classes*/
      t[1].join(" ") + " svelte-11xc5rw"), mf(e, "hide", !/*visible*/
      t[2]);
    },
    m(c, h) {
      W9(c, e, h), P9(e, n), u && u.m(n, null), l = !0;
    },
    p(c, [h]) {
      u && u.p && (!l || h & /*$$scope*/
      8) && J9(
        u,
        o,
        c,
        /*$$scope*/
        c[3],
        l ? j9(
          o,
          /*$$scope*/
          c[3],
          h,
          null
        ) : G9(
          /*$$scope*/
          c[3]
        ),
        null
      ), (!l || h & /*elem_id*/
      1) && Xr(
        e,
        "id",
        /*elem_id*/
        c[0]
      ), (!l || h & /*elem_classes*/
      2 && r !== (r = "gr-group " + /*elem_classes*/
      c[1].join(" ") + " svelte-11xc5rw")) && Xr(e, "class", r), (!l || h & /*elem_classes, visible*/
      6) && mf(e, "hide", !/*visible*/
      c[2]);
    },
    i(c) {
      l || (Y9(u, c), l = !0);
    },
    o(c) {
      Z9(u, c), l = !1;
    },
    d(c) {
      c && U9(e), u && u.d(c);
    }
  };
}
function K9(t, e, n) {
  let { $$slots: r = {}, $$scope: l } = e, { elem_id: o = "" } = e, { elem_classes: u = [] } = e, { visible: c = !0 } = e;
  return t.$$set = (h) => {
    "elem_id" in h && n(0, o = h.elem_id), "elem_classes" in h && n(1, u = h.elem_classes), "visible" in h && n(2, c = h.visible), "$$scope" in h && n(3, l = h.$$scope);
  }, [o, u, c, l, r];
}
let $9 = class extends H9 {
  constructor(e) {
    super(), V9(this, e, K9, Q9, X9, { elem_id: 0, elem_classes: 1, visible: 2 });
  }
};
const {
  SvelteComponent: e_,
  add_flush_callback: t_,
  assign: n_,
  bind: r_,
  binding_callbacks: s_,
  check_outros: Pi,
  create_component: Yt,
  destroy_component: Zt,
  destroy_each: i_,
  detach: M0,
  empty: ho,
  ensure_array_like: pf,
  get_spread_object: l_,
  get_spread_update: a_,
  globals: o_,
  group_outros: qi,
  init: u_,
  insert: B0,
  mount_component: Jt,
  safe_not_equal: c_,
  space: As,
  transition_in: pt,
  transition_out: xt
} = window.__gradio__svelte__internal, { Boolean: f_ } = o_, { afterUpdate: h_, tick: d_ } = window.__gradio__svelte__internal;
function gf(t, e, n) {
  const r = t.slice();
  return r[48] = e[n], r[50] = n, r;
}
function _f(t) {
  let e, n;
  return e = new Ri({
    props: {
      $$slots: { default: [m_] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Yt(e.$$.fragment);
    },
    m(r, l) {
      Jt(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*gradio, search_value*/
      8519680 | l[1] & /*$$scope*/
      1048576 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (pt(e.$$.fragment, r), n = !0);
    },
    o(r) {
      xt(e.$$.fragment, r), n = !1;
    },
    d(r) {
      Zt(e, r);
    }
  };
}
function m_(t) {
  let e, n;
  return e = new Zg({
    props: {
      label: "Model name search",
      show_label: !0,
      placeholder: "Search for a model by name. Separate multiple queries with ';'.",
      interactive: !0,
      gradio: (
        /*gradio*/
        t[17]
      )
    }
  }), e.$on(
    "submit",
    /*submit_handler*/
    t[33]
  ), {
    c() {
      Yt(e.$$.fragment);
    },
    m(r, l) {
      Jt(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*gradio*/
      131072 && (o.gradio = /*gradio*/
      r[17]), e.$set(o);
    },
    i(r) {
      n || (pt(e.$$.fragment, r), n = !0);
    },
    o(r) {
      xt(e.$$.fragment, r), n = !1;
    },
    d(r) {
      Zt(e, r);
    }
  };
}
function bf(t) {
  let e, n;
  return e = new Ri({
    props: {
      $$slots: { default: [p_] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Yt(e.$$.fragment);
    },
    m(r, l) {
      Jt(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*select_columns_config, gradio, headers, hide_columns, loading_status, default_selection*/
      17969153 | l[1] & /*$$scope*/
      1048576 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (pt(e.$$.fragment, r), n = !0);
    },
    o(r) {
      xt(e.$$.fragment, r), n = !1;
    },
    d(r) {
      Zt(e, r);
    }
  };
}
function p_(t) {
  let e, n, r;
  function l(u) {
    t[35](u);
  }
  let o = {
    label: (
      /*select_columns_config*/
      t[12].label || "Select Columns to Show"
    ),
    show_label: (
      /*select_columns_config*/
      t[12].show_label
    ),
    info: (
      /*select_columns_config*/
      t[12].info
    ),
    gradio: (
      /*gradio*/
      t[17]
    ),
    choices: (
      /*headers*/
      t[0].filter(
        /*func*/
        t[34]
      ).map(yf)
    ),
    loading_status: (
      /*loading_status*/
      t[20]
    )
  };
  return (
    /*default_selection*/
    t[24] !== void 0 && (o.value = /*default_selection*/
    t[24]), e = new e4({ props: o }), s_.push(() => r_(e, "value", l)), {
      c() {
        Yt(e.$$.fragment);
      },
      m(u, c) {
        Jt(e, u, c), r = !0;
      },
      p(u, c) {
        const h = {};
        c[0] & /*select_columns_config*/
        4096 && (h.label = /*select_columns_config*/
        u[12].label || "Select Columns to Show"), c[0] & /*select_columns_config*/
        4096 && (h.show_label = /*select_columns_config*/
        u[12].show_label), c[0] & /*select_columns_config*/
        4096 && (h.info = /*select_columns_config*/
        u[12].info), c[0] & /*gradio*/
        131072 && (h.gradio = /*gradio*/
        u[17]), c[0] & /*headers, hide_columns, select_columns_config*/
        12289 && (h.choices = /*headers*/
        u[0].filter(
          /*func*/
          u[34]
        ).map(yf)), c[0] & /*loading_status*/
        1048576 && (h.loading_status = /*loading_status*/
        u[20]), !n && c[0] & /*default_selection*/
        16777216 && (n = !0, h.value = /*default_selection*/
        u[24], t_(() => n = !1)), e.$set(h);
      },
      i(u) {
        r || (pt(e.$$.fragment, u), r = !0);
      },
      o(u) {
        xt(e.$$.fragment, u), r = !1;
      },
      d(u) {
        Zt(e, u);
      }
    }
  );
}
function g_(t) {
  let e, n, r, l = (
    /*search_columns*/
    t[14].primary_column && _f(t)
  ), o = (
    /*select_columns_config*/
    t[12].allow && bf(t)
  );
  return {
    c() {
      l && l.c(), e = As(), o && o.c(), n = ho();
    },
    m(u, c) {
      l && l.m(u, c), B0(u, e, c), o && o.m(u, c), B0(u, n, c), r = !0;
    },
    p(u, c) {
      /*search_columns*/
      u[14].primary_column ? l ? (l.p(u, c), c[0] & /*search_columns*/
      16384 && pt(l, 1)) : (l = _f(u), l.c(), pt(l, 1), l.m(e.parentNode, e)) : l && (qi(), xt(l, 1, 1, () => {
        l = null;
      }), Pi()), /*select_columns_config*/
      u[12].allow ? o ? (o.p(u, c), c[0] & /*select_columns_config*/
      4096 && pt(o, 1)) : (o = bf(u), o.c(), pt(o, 1), o.m(n.parentNode, n)) : o && (qi(), xt(o, 1, 1, () => {
        o = null;
      }), Pi());
    },
    i(u) {
      r || (pt(l), pt(o), r = !0);
    },
    o(u) {
      xt(l), xt(o), r = !1;
    },
    d(u) {
      u && (M0(e), M0(n)), l && l.d(u), o && o.d(u);
    }
  };
}
function __(t) {
  let e, n;
  function r(...l) {
    return (
      /*input_handler_1*/
      t[38](
        /*i*/
        t[50],
        ...l
      )
    );
  }
  return e = new o8({
    props: {
      label: (
        /*col*/
        t[48].label || `Filter ${/*col*/
        t[48].column}`
      ),
      info: (
        /*col*/
        t[48].info
      ),
      value: (
        /*col*/
        t[48].default
      ),
      show_label: (
        /*col*/
        t[48].show_label
      ),
      interactive: !0,
      maximum: (
        /*col*/
        t[48].max
      ),
      minimum: (
        /*col*/
        t[48].min
      )
    }
  }), e.$on("input", r), {
    c() {
      Yt(e.$$.fragment);
    },
    m(l, o) {
      Jt(e, l, o), n = !0;
    },
    p(l, o) {
      t = l;
      const u = {};
      o[0] & /*filter_columns*/
      2048 && (u.label = /*col*/
      t[48].label || `Filter ${/*col*/
      t[48].column}`), o[0] & /*filter_columns*/
      2048 && (u.info = /*col*/
      t[48].info), o[0] & /*filter_columns*/
      2048 && (u.value = /*col*/
      t[48].default), o[0] & /*filter_columns*/
      2048 && (u.show_label = /*col*/
      t[48].show_label), o[0] & /*filter_columns*/
      2048 && (u.maximum = /*col*/
      t[48].max), o[0] & /*filter_columns*/
      2048 && (u.minimum = /*col*/
      t[48].min), e.$set(u);
    },
    i(l) {
      n || (pt(e.$$.fragment, l), n = !0);
    },
    o(l) {
      xt(e.$$.fragment, l), n = !1;
    },
    d(l) {
      Zt(e, l);
    }
  };
}
function b_(t) {
  let e, n;
  return e = new ms({
    props: {
      $$slots: { default: [y_] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Yt(e.$$.fragment);
    },
    m(r, l) {
      Jt(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*filter_columns, gradio, filter_values*/
      4327424 | l[1] & /*$$scope*/
      1048576 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (pt(e.$$.fragment, r), n = !0);
    },
    o(r) {
      xt(e.$$.fragment, r), n = !1;
    },
    d(r) {
      Zt(e, r);
    }
  };
}
function w_(t) {
  let e, n;
  function r(...l) {
    return (
      /*input_handler*/
      t[36](
        /*i*/
        t[50],
        ...l
      )
    );
  }
  return e = new e4({
    props: {
      label: (
        /*col*/
        t[48].label || `Filter ${/*col*/
        t[48].column}`
      ),
      gradio: (
        /*gradio*/
        t[17]
      ),
      loading_status: (
        /*loading_status*/
        t[20]
      ),
      choices: (
        /*col*/
        t[48].choices
      ),
      value: (
        /*col*/
        t[48].default.map(vf)
      ),
      info: (
        /*col*/
        t[48].info
      ),
      show_label: (
        /*col*/
        t[48].show_label
      )
    }
  }), e.$on("input", r), {
    c() {
      Yt(e.$$.fragment);
    },
    m(l, o) {
      Jt(e, l, o), n = !0;
    },
    p(l, o) {
      t = l;
      const u = {};
      o[0] & /*filter_columns*/
      2048 && (u.label = /*col*/
      t[48].label || `Filter ${/*col*/
      t[48].column}`), o[0] & /*gradio*/
      131072 && (u.gradio = /*gradio*/
      t[17]), o[0] & /*loading_status*/
      1048576 && (u.loading_status = /*loading_status*/
      t[20]), o[0] & /*filter_columns*/
      2048 && (u.choices = /*col*/
      t[48].choices), o[0] & /*filter_columns*/
      2048 && (u.value = /*col*/
      t[48].default.map(vf)), o[0] & /*filter_columns*/
      2048 && (u.info = /*col*/
      t[48].info), o[0] & /*filter_columns*/
      2048 && (u.show_label = /*col*/
      t[48].show_label), e.$set(u);
    },
    i(l) {
      n || (pt(e.$$.fragment, l), n = !0);
    },
    o(l) {
      xt(e.$$.fragment, l), n = !1;
    },
    d(l) {
      Zt(e, l);
    }
  };
}
function y_(t) {
  let e, n, r;
  function l(...o) {
    return (
      /*change_handler*/
      t[37](
        /*i*/
        t[50],
        ...o
      )
    );
  }
  return e = new L9({
    props: {
      label: (
        /*col*/
        t[48].label || `Filter ${/*col*/
        t[48].column}`
      ),
      info: (
        /*col*/
        t[48].info
      ),
      value: (
        /*col*/
        t[48].default.map(kf)
      ),
      choices: (
        /*col*/
        t[48].choices
      ),
      show_label: (
        /*col*/
        t[48].show_label
      ),
      i18n: (
        /*gradio*/
        t[17].i18n
      ),
      container: !0
    }
  }), e.$on("change", l), {
    c() {
      Yt(e.$$.fragment), n = As();
    },
    m(o, u) {
      Jt(e, o, u), B0(o, n, u), r = !0;
    },
    p(o, u) {
      t = o;
      const c = {};
      u[0] & /*filter_columns*/
      2048 && (c.label = /*col*/
      t[48].label || `Filter ${/*col*/
      t[48].column}`), u[0] & /*filter_columns*/
      2048 && (c.info = /*col*/
      t[48].info), u[0] & /*filter_columns*/
      2048 && (c.value = /*col*/
      t[48].default.map(kf)), u[0] & /*filter_columns*/
      2048 && (c.choices = /*col*/
      t[48].choices), u[0] & /*filter_columns*/
      2048 && (c.show_label = /*col*/
      t[48].show_label), u[0] & /*gradio*/
      131072 && (c.i18n = /*gradio*/
      t[17].i18n), e.$set(c);
    },
    i(o) {
      r || (pt(e.$$.fragment, o), r = !0);
    },
    o(o) {
      xt(e.$$.fragment, o), r = !1;
    },
    d(o) {
      o && M0(n), Zt(e, o);
    }
  };
}
function wf(t) {
  let e, n, r, l;
  const o = [w_, b_, __], u = [];
  function c(h, p) {
    return (
      /*col*/
      h[48].type === "checkboxgroup" ? 0 : (
        /*col*/
        h[48].type == "dropdown" ? 1 : 2
      )
    );
  }
  return e = c(t), n = u[e] = o[e](t), {
    c() {
      n.c(), r = ho();
    },
    m(h, p) {
      u[e].m(h, p), B0(h, r, p), l = !0;
    },
    p(h, p) {
      let _ = e;
      e = c(h), e === _ ? u[e].p(h, p) : (qi(), xt(u[_], 1, 1, () => {
        u[_] = null;
      }), Pi(), n = u[e], n ? n.p(h, p) : (n = u[e] = o[e](h), n.c()), pt(n, 1), n.m(r.parentNode, r));
    },
    i(h) {
      l || (pt(n), l = !0);
    },
    o(h) {
      xt(n), l = !1;
    },
    d(h) {
      h && M0(r), u[e].d(h);
    }
  };
}
function v_(t) {
  let e, n, r = pf(
    /*filter_columns*/
    t[11]
  ), l = [];
  for (let u = 0; u < r.length; u += 1)
    l[u] = wf(gf(t, r, u));
  const o = (u) => xt(l[u], 1, 1, () => {
    l[u] = null;
  });
  return {
    c() {
      for (let u = 0; u < l.length; u += 1)
        l[u].c();
      e = ho();
    },
    m(u, c) {
      for (let h = 0; h < l.length; h += 1)
        l[h] && l[h].m(u, c);
      B0(u, e, c), n = !0;
    },
    p(u, c) {
      if (c[0] & /*filter_columns, gradio, loading_status, filter_values*/
      5376e3) {
        r = pf(
          /*filter_columns*/
          u[11]
        );
        let h;
        for (h = 0; h < r.length; h += 1) {
          const p = gf(u, r, h);
          l[h] ? (l[h].p(p, c), pt(l[h], 1)) : (l[h] = wf(p), l[h].c(), pt(l[h], 1), l[h].m(e.parentNode, e));
        }
        for (qi(), h = r.length; h < l.length; h += 1)
          o(h);
        Pi();
      }
    },
    i(u) {
      if (!n) {
        for (let c = 0; c < r.length; c += 1)
          pt(l[c]);
        n = !0;
      }
    },
    o(u) {
      l = l.filter(f_);
      for (let c = 0; c < l.length; c += 1)
        xt(l[c]);
      n = !1;
    },
    d(u) {
      u && M0(e), i_(l, u);
    }
  };
}
function k_(t) {
  let e, n;
  return e = new $9({
    props: {
      $$slots: { default: [v_] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Yt(e.$$.fragment);
    },
    m(r, l) {
      Jt(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*filter_columns, gradio, loading_status, filter_values*/
      5376e3 | l[1] & /*$$scope*/
      1048576 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (pt(e.$$.fragment, r), n = !0);
    },
    o(r) {
      xt(e.$$.fragment, r), n = !1;
    },
    d(r) {
      Zt(e, r);
    }
  };
}
function D_(t) {
  let e, n, r, l;
  return e = new R1({
    props: {
      $$slots: { default: [g_] },
      $$scope: { ctx: t }
    }
  }), r = new R1({
    props: {
      $$slots: { default: [k_] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Yt(e.$$.fragment), n = As(), Yt(r.$$.fragment);
    },
    m(o, u) {
      Jt(e, o, u), B0(o, n, u), Jt(r, o, u), l = !0;
    },
    p(o, u) {
      const c = {};
      u[0] & /*select_columns_config, gradio, headers, hide_columns, loading_status, default_selection, search_value, search_columns*/
      26374145 | u[1] & /*$$scope*/
      1048576 && (c.$$scope = { dirty: u, ctx: o }), e.$set(c);
      const h = {};
      u[0] & /*filter_columns, gradio, loading_status, filter_values*/
      5376e3 | u[1] & /*$$scope*/
      1048576 && (h.$$scope = { dirty: u, ctx: o }), r.$set(h);
    },
    i(o) {
      l || (pt(e.$$.fragment, o), pt(r.$$.fragment, o), l = !0);
    },
    o(o) {
      xt(e.$$.fragment, o), xt(r.$$.fragment, o), l = !1;
    },
    d(o) {
      o && M0(n), Zt(e, o), Zt(r, o);
    }
  };
}
function A_(t) {
  let e, n, r, l;
  const o = [
    {
      autoscroll: (
        /*gradio*/
        t[17].autoscroll
      )
    },
    { i18n: (
      /*gradio*/
      t[17].i18n
    ) },
    /*loading_status*/
    t[20]
  ];
  let u = {};
  for (let c = 0; c < o.length; c += 1)
    u = n_(u, o[c]);
  return e = new io({ props: u }), r = new q7({
    props: {
      root: (
        /*root*/
        t[10]
      ),
      label: (
        /*label*/
        t[4]
      ),
      show_label: (
        /*show_label*/
        t[5]
      ),
      row_count: [
        /*values*/
        t[28].length,
        "fixed"
      ],
      col_count: [
        /*_headers*/
        t[25].length,
        "fixed"
      ],
      values: (
        /*values*/
        t[28]
      ),
      display_value: (
        /*display_value*/
        t[26]
      ),
      styling: (
        /*styling*/
        t[27]
      ),
      headers: (
        /*_headers*/
        t[25]
      ),
      wrap: (
        /*wrap*/
        t[6]
      ),
      datatype: (
        /*datatype*/
        t[7]
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        t[18]
      ),
      editable: (
        /*interactive*/
        t[21]
      ),
      height: (
        /*height*/
        t[19]
      ),
      i18n: (
        /*gradio*/
        t[17].i18n
      ),
      line_breaks: (
        /*line_breaks*/
        t[15]
      ),
      column_widths: (
        /*column_widths*/
        t[16]
      ),
      hide_columns: (
        /*hide_columns*/
        t[13]
      )
    }
  }), r.$on(
    "select",
    /*select_handler*/
    t[39]
  ), {
    c() {
      Yt(e.$$.fragment), n = As(), Yt(r.$$.fragment);
    },
    m(c, h) {
      Jt(e, c, h), B0(c, n, h), Jt(r, c, h), l = !0;
    },
    p(c, h) {
      const p = h[0] & /*gradio, loading_status*/
      1179648 ? a_(o, [
        h[0] & /*gradio*/
        131072 && {
          autoscroll: (
            /*gradio*/
            c[17].autoscroll
          )
        },
        h[0] & /*gradio*/
        131072 && { i18n: (
          /*gradio*/
          c[17].i18n
        ) },
        h[0] & /*loading_status*/
        1048576 && l_(
          /*loading_status*/
          c[20]
        )
      ]) : {};
      e.$set(p);
      const _ = {};
      h[0] & /*root*/
      1024 && (_.root = /*root*/
      c[10]), h[0] & /*label*/
      16 && (_.label = /*label*/
      c[4]), h[0] & /*show_label*/
      32 && (_.show_label = /*show_label*/
      c[5]), h[0] & /*values*/
      268435456 && (_.row_count = [
        /*values*/
        c[28].length,
        "fixed"
      ]), h[0] & /*_headers*/
      33554432 && (_.col_count = [
        /*_headers*/
        c[25].length,
        "fixed"
      ]), h[0] & /*values*/
      268435456 && (_.values = /*values*/
      c[28]), h[0] & /*display_value*/
      67108864 && (_.display_value = /*display_value*/
      c[26]), h[0] & /*styling*/
      134217728 && (_.styling = /*styling*/
      c[27]), h[0] & /*_headers*/
      33554432 && (_.headers = /*_headers*/
      c[25]), h[0] & /*wrap*/
      64 && (_.wrap = /*wrap*/
      c[6]), h[0] & /*datatype*/
      128 && (_.datatype = /*datatype*/
      c[7]), h[0] & /*latex_delimiters*/
      262144 && (_.latex_delimiters = /*latex_delimiters*/
      c[18]), h[0] & /*interactive*/
      2097152 && (_.editable = /*interactive*/
      c[21]), h[0] & /*height*/
      524288 && (_.height = /*height*/
      c[19]), h[0] & /*gradio*/
      131072 && (_.i18n = /*gradio*/
      c[17].i18n), h[0] & /*line_breaks*/
      32768 && (_.line_breaks = /*line_breaks*/
      c[15]), h[0] & /*column_widths*/
      65536 && (_.column_widths = /*column_widths*/
      c[16]), h[0] & /*hide_columns*/
      8192 && (_.hide_columns = /*hide_columns*/
      c[13]), r.$set(_);
    },
    i(c) {
      l || (pt(e.$$.fragment, c), pt(r.$$.fragment, c), l = !0);
    },
    o(c) {
      xt(e.$$.fragment, c), xt(r.$$.fragment, c), l = !1;
    },
    d(c) {
      c && M0(n), Zt(e, c), Zt(r, c);
    }
  };
}
function S_(t) {
  let e, n, r, l;
  return e = new Ri({
    props: {
      $$slots: { default: [D_] },
      $$scope: { ctx: t }
    }
  }), r = new Ri({
    props: {
      $$slots: { default: [A_] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Yt(e.$$.fragment), n = As(), Yt(r.$$.fragment);
    },
    m(o, u) {
      Jt(e, o, u), B0(o, n, u), Jt(r, o, u), l = !0;
    },
    p(o, u) {
      const c = {};
      u[0] & /*filter_columns, gradio, loading_status, filter_values, select_columns_config, headers, hide_columns, default_selection, search_value, search_columns*/
      30570497 | u[1] & /*$$scope*/
      1048576 && (c.$$scope = { dirty: u, ctx: o }), e.$set(c);
      const h = {};
      u[0] & /*root, label, show_label, values, _headers, display_value, styling, wrap, datatype, latex_delimiters, interactive, height, gradio, line_breaks, column_widths, hide_columns, loading_status*/
      507487472 | u[1] & /*$$scope*/
      1048576 && (h.$$scope = { dirty: u, ctx: o }), r.$set(h);
    },
    i(o) {
      l || (pt(e.$$.fragment, o), pt(r.$$.fragment, o), l = !0);
    },
    o(o) {
      xt(e.$$.fragment, o), xt(r.$$.fragment, o), l = !1;
    },
    d(o) {
      o && M0(n), Zt(e, o), Zt(r, o);
    }
  };
}
function E_(t) {
  let e, n;
  return e = new ms({
    props: {
      visible: (
        /*visible*/
        t[3]
      ),
      padding: !1,
      elem_id: (
        /*elem_id*/
        t[1]
      ),
      elem_classes: (
        /*elem_classes*/
        t[2]
      ),
      container: !1,
      scale: (
        /*scale*/
        t[8]
      ),
      min_width: (
        /*min_width*/
        t[9]
      ),
      allow_overflow: !1,
      $$slots: { default: [S_] },
      $$scope: { ctx: t }
    }
  }), {
    c() {
      Yt(e.$$.fragment);
    },
    m(r, l) {
      Jt(e, r, l), n = !0;
    },
    p(r, l) {
      const o = {};
      l[0] & /*visible*/
      8 && (o.visible = /*visible*/
      r[3]), l[0] & /*elem_id*/
      2 && (o.elem_id = /*elem_id*/
      r[1]), l[0] & /*elem_classes*/
      4 && (o.elem_classes = /*elem_classes*/
      r[2]), l[0] & /*scale*/
      256 && (o.scale = /*scale*/
      r[8]), l[0] & /*min_width*/
      512 && (o.min_width = /*min_width*/
      r[9]), l[0] & /*root, label, show_label, values, _headers, display_value, styling, wrap, datatype, latex_delimiters, interactive, height, gradio, line_breaks, column_widths, hide_columns, loading_status, filter_columns, filter_values, select_columns_config, headers, default_selection, search_value, search_columns*/
      536870129 | l[1] & /*$$scope*/
      1048576 && (o.$$scope = { dirty: l, ctx: r }), e.$set(o);
    },
    i(r) {
      n || (pt(e.$$.fragment, r), n = !0);
    },
    o(r) {
      xt(e.$$.fragment, r), n = !1;
    },
    d(r) {
      Zt(e, r);
    }
  };
}
function y0(t) {
  let e, n = t[0], r = 1;
  for (; r < t.length; ) {
    const l = t[r], o = t[r + 1];
    if (r += 2, (l === "optionalAccess" || l === "optionalCall") && n == null)
      return;
    l === "access" || l === "optionalAccess" ? (e = n, n = o(n)) : (l === "call" || l === "optionalCall") && (n = o((...u) => n.call(e, ...u)), e = void 0);
  }
  return n;
}
function x_(t, e, n) {
  return n ? t >= e : t <= e;
}
const yf = (t) => [t, t], vf = (t, e) => t[0], kf = (t, e) => t[0];
function T_(t, e, n) {
  let { headers: r = [] } = e, { elem_id: l = "" } = e, { elem_classes: o = [] } = e, { visible: u = !0 } = e, { value: c = {
    data: [["", "", ""]],
    headers: ["1", "2", "3"],
    metadata: null
  } } = e, h = "", { value_is_output: p = !1 } = e, { col_count: _ } = e, { label: v = null } = e, { show_label: k = !0 } = e, { wrap: E } = e, { datatype: z } = e, { scale: H = null } = e, { min_width: U = void 0 } = e, { root: N } = e, { filter_columns: M = [] } = e, { select_columns_config: A } = e, { hide_columns: x } = e, { search_columns: C = null } = e, { line_breaks: O = !0 } = e, { column_widths: q = [] } = e, { gradio: R } = e, { latex_delimiters: J } = e, { height: ne = void 0 } = e, { loading_status: ie } = e, { interactive: te } = e, Se, Ce = c.headers.map((ee) => ee), De = c.data.map((ee) => ee), ce, he, se, Ne = [], de = null, Q = A.default_selection.length ? A.default_selection : Ce;
  async function me(ee) {
    let _e = ee || c;
    n(25, Se = Ce), n(28, se = De ? [...De] : []);
    const it = Se.filter((Fe) => Q.includes(Fe)), at = it.map((Fe) => Se.indexOf(Fe));
    n(25, Se = it), n(28, se = se.map((Fe) => at.map((gt) => Fe[gt]))), n(26, ce = y0([
      _e,
      "optionalAccess",
      (Fe) => Fe.metadata,
      "optionalAccess",
      (Fe) => Fe.display_value
    ]) ? [
      ...y0([
        _e,
        "optionalAccess",
        (Fe) => Fe.metadata,
        "optionalAccess",
        (Fe) => Fe.display_value
      ])
    ] : null), n(27, he = y0([
      _e,
      "optionalAccess",
      (Fe) => Fe.metadata,
      "optionalAccess",
      (Fe) => Fe.styling
    ]) ? [
      ...y0([
        _e,
        "optionalAccess",
        (Fe) => Fe.metadata,
        "optionalAccess",
        (Fe) => Fe.styling
      ])
    ] : null), await d_(), R.dispatch("change"), p || R.dispatch("input");
  }
  function V(ee, _e) {
    const it = Ce.filter((Fe) => _e.includes(Fe)), at = it.map((Fe) => Ce.indexOf(Fe));
    return n(25, Se = it), ee = ee.map((Fe) => at.map((gt) => Fe[gt])), ee;
  }
  function $(ee, _e) {
    if (n(28, se = De), Array.isArray(_e) && !_e.length)
      return Array(se.length).fill(!1);
    let it;
    return ee.type === "slider" ? it = (at) => x_(at[Ce.indexOf(ee.column)], _e, ee.greater_than) : it = (at) => _e.some((Fe) => at[Ce.indexOf(ee.column)] === Fe), se.map(it);
  }
  function we(ee, _e, it, at) {
    if (!at)
      return new Array(ee.length).fill(!0);
    const Fe = at.split(";").map((Re) => Re.trim()).filter((Re) => Re.length), gt = new Array(ee.length).fill(!1);
    let We = !1;
    for (let Re = 0; Re < ee.length; Re++) {
      let Te = Array(), Me = Array();
      for (let ze = 0; ze < Fe.length; ze++) {
        let Qe = Fe[ze], Oe = _e.indexOf(it.primary_column);
        const Ue = Qe.indexOf(":");
        if (Ue !== -1) {
          const vn = Qe.substring(0, Ue);
          if (!it.secondary_columns.length || !it.secondary_columns.includes(vn)) {
            We || R.dispatch("warning", `Column ${vn} not found in secondary columns of search_columns`), We = !0;
            continue;
          }
          const hn = _e.indexOf(vn);
          hn !== -1 && (Oe = hn, Qe = Qe.substring(Ue + 1).trim());
        }
        const ht = Ue !== -1 ? Me : Te;
        ee[Re][Oe].toString().toLowerCase().includes(Qe.toLowerCase()) ? ht.push(!0) : ht.push(!1);
      }
      Te.length && !Me.length ? gt[Re] = Te.some((ze) => ze) : Me.length && !Te.length ? gt[Re] = Me.every((ze) => !!ze) : Te.length && Me.length && (gt[Re] = Te.some((ze) => ze) && Me.every((ze) => !!ze));
    }
    return gt;
  }
  function ye(ee, _e, it, at, Fe) {
    const gt = we(De, _e, at, Fe), We = it.map((Re, Te) => $(M[Te], Re)).concat([gt]);
    return ee.filter((Re, Te) => We.every((Me) => Me[Te]));
  }
  function K(ee, _e, it) {
    n(28, se = V(De, ee)), n(28, se = ye(se, Ce, _e, C, it)), se.length === 0 && n(28, se = [Array(ee.length).fill("")]);
  }
  me(), h_(() => {
    n(30, p = !1);
  }), (Array.isArray(c) && y0([c, "optionalAccess", (ee) => ee[0], "optionalAccess", (ee) => ee.length]) === 0 || y0([
    c,
    "access",
    (ee) => ee.data,
    "optionalAccess",
    (ee) => ee[0],
    "optionalAccess",
    (ee) => ee.length
  ]) === 0) && (c = {
    data: [
      Array(y0([_, "optionalAccess", (ee) => ee[0]]) || 3).fill("")
    ],
    headers: Array(y0([_, "optionalAccess", (ee) => ee[0]]) || 3).fill("").map((ee, _e) => `${_e + 1}`),
    metadata: null
  });
  const Ee = (ee) => n(23, de = ee.detail), Ae = (ee) => !(x.includes(ee) || A.cant_deselect.includes(ee));
  function Je(ee) {
    Q = ee, n(24, Q);
  }
  const Ie = (ee, _e) => n(22, Ne[ee] = _e.detail, Ne), Ve = (ee, _e) => n(22, Ne[ee] = _e.detail, Ne), qe = (ee, _e) => n(22, Ne[ee] = _e.detail, Ne), It = (ee) => R.dispatch("select", ee.detail);
  return t.$$set = (ee) => {
    "headers" in ee && n(0, r = ee.headers), "elem_id" in ee && n(1, l = ee.elem_id), "elem_classes" in ee && n(2, o = ee.elem_classes), "visible" in ee && n(3, u = ee.visible), "value" in ee && n(29, c = ee.value), "value_is_output" in ee && n(30, p = ee.value_is_output), "col_count" in ee && n(31, _ = ee.col_count), "label" in ee && n(4, v = ee.label), "show_label" in ee && n(5, k = ee.show_label), "wrap" in ee && n(6, E = ee.wrap), "datatype" in ee && n(7, z = ee.datatype), "scale" in ee && n(8, H = ee.scale), "min_width" in ee && n(9, U = ee.min_width), "root" in ee && n(10, N = ee.root), "filter_columns" in ee && n(11, M = ee.filter_columns), "select_columns_config" in ee && n(12, A = ee.select_columns_config), "hide_columns" in ee && n(13, x = ee.hide_columns), "search_columns" in ee && n(14, C = ee.search_columns), "line_breaks" in ee && n(15, O = ee.line_breaks), "column_widths" in ee && n(16, q = ee.column_widths), "gradio" in ee && n(17, R = ee.gradio), "latex_delimiters" in ee && n(18, J = ee.latex_delimiters), "height" in ee && n(19, ne = ee.height), "loading_status" in ee && n(20, ie = ee.loading_status), "interactive" in ee && n(21, te = ee.interactive);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*default_selection, filter_values, search_value*/
    29360128 && K(Q, Ne, de), t.$$.dirty[0] & /*value*/
    536870912 | t.$$.dirty[1] & /*old_value*/
    2;
  }, [
    r,
    l,
    o,
    u,
    v,
    k,
    E,
    z,
    H,
    U,
    N,
    M,
    A,
    x,
    C,
    O,
    q,
    R,
    J,
    ne,
    ie,
    te,
    Ne,
    de,
    Q,
    Se,
    ce,
    he,
    se,
    c,
    p,
    _,
    h,
    Ee,
    Ae,
    Je,
    Ie,
    Ve,
    qe,
    It
  ];
}
class Q_ extends e_ {
  constructor(e) {
    super(), u_(
      this,
      e,
      T_,
      E_,
      c_,
      {
        headers: 0,
        elem_id: 1,
        elem_classes: 2,
        visible: 3,
        value: 29,
        value_is_output: 30,
        col_count: 31,
        label: 4,
        show_label: 5,
        wrap: 6,
        datatype: 7,
        scale: 8,
        min_width: 9,
        root: 10,
        filter_columns: 11,
        select_columns_config: 12,
        hide_columns: 13,
        search_columns: 14,
        line_breaks: 15,
        column_widths: 16,
        gradio: 17,
        latex_delimiters: 18,
        height: 19,
        loading_status: 20,
        interactive: 21
      },
      null,
      [-1, -1]
    );
  }
}
export {
  Q_ as default
};
