vite-plugin-norg 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { createFilter as Ar } from "vite";
2
+ import { parseNorg as Gt } from "../napi/index.js";
2
3
  function v(t, e, n) {
3
4
  function r(l, a) {
4
5
  var c;
@@ -64,13 +65,13 @@ function Ct(t) {
64
65
  const e = t.startsWith("^") ? 1 : 0, n = t.endsWith("$") ? t.length - 1 : t.length;
65
66
  return t.slice(e, n);
66
67
  }
67
- const Gt = Symbol("evaluating");
68
+ const Ut = Symbol("evaluating");
68
69
  function P(t, e, n) {
69
70
  let r;
70
71
  Object.defineProperty(t, e, {
71
72
  get() {
72
- if (r !== Gt)
73
- return r === void 0 && (r = Gt, r = n()), r;
73
+ if (r !== Ut)
74
+ return r === void 0 && (r = Ut, r = n()), r;
74
75
  },
75
76
  set(o) {
76
77
  Object.defineProperty(t, e, {
@@ -97,7 +98,7 @@ function Q(...t) {
97
98
  }
98
99
  return Object.defineProperties({}, e);
99
100
  }
100
- function Ut(t) {
101
+ function Ft(t) {
101
102
  return JSON.stringify(t);
102
103
  }
103
104
  const En = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
@@ -583,7 +584,7 @@ const oo = {
583
584
  inst: t
584
585
  }), n);
585
586
  });
586
- function Ft(t, e, n) {
587
+ function Ht(t, e, n) {
587
588
  t.issues.length && e.issues.push(...Ln(n, t.issues)), e.value[n] = t.value;
588
589
  }
589
590
  const lo = /* @__PURE__ */ v("$ZodArray", (t, e) => {
@@ -603,7 +604,7 @@ const lo = /* @__PURE__ */ v("$ZodArray", (t, e) => {
603
604
  value: l,
604
605
  issues: []
605
606
  }, r);
606
- a instanceof Promise ? i.push(a.then((c) => Ft(c, n, s))) : Ft(a, n, s);
607
+ a instanceof Promise ? i.push(a.then((c) => Ht(c, n, s))) : Ht(a, n, s);
607
608
  }
608
609
  return i.length ? Promise.all(i).then(() => n) : n;
609
610
  };
@@ -693,7 +694,7 @@ const co = /* @__PURE__ */ v("$ZodObject", (t, e) => {
693
694
  co.init(t, e);
694
695
  const n = t._zod.parse, r = St(() => Mn(e)), o = (p) => {
695
696
  const d = new ro(["shape", "payload", "ctx"]), m = r.value, w = (_) => {
696
- const k = Ut(_);
697
+ const k = Ft(_);
697
698
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
698
699
  };
699
700
  d.write("const input = payload.value;");
@@ -703,7 +704,7 @@ const co = /* @__PURE__ */ v("$ZodObject", (t, e) => {
703
704
  b[_] = `key_${y++}`;
704
705
  d.write("const newResult = {};");
705
706
  for (const _ of m.keys) {
706
- const k = b[_], C = Ut(_);
707
+ const k = b[_], C = Ft(_);
707
708
  d.write(`const ${k} = ${w(_)};`), d.write(`
708
709
  if (${k}.issues.length) {
709
710
  payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
@@ -741,7 +742,7 @@ const co = /* @__PURE__ */ v("$ZodObject", (t, e) => {
741
742
  }), p);
742
743
  };
743
744
  });
744
- function Ht(t, e, n, r) {
745
+ function Wt(t, e, n, r) {
745
746
  for (const i of t)
746
747
  if (i.issues.length === 0)
747
748
  return e.value = i.value, e;
@@ -782,12 +783,12 @@ const ho = /* @__PURE__ */ v("$ZodUnion", (t, e) => {
782
783
  l.push(c);
783
784
  }
784
785
  }
785
- return s ? Promise.all(l).then((a) => Ht(a, o, t, i)) : Ht(l, o, t, i);
786
+ return s ? Promise.all(l).then((a) => Wt(a, o, t, i)) : Wt(l, o, t, i);
786
787
  };
787
788
  }), po = /* @__PURE__ */ v("$ZodIntersection", (t, e) => {
788
789
  E.init(t, e), t._zod.parse = (n, r) => {
789
790
  const o = n.value, i = e.left._zod.run({ value: o, issues: [] }, r), s = e.right._zod.run({ value: o, issues: [] }, r);
790
- return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, c]) => Wt(n, a, c)) : Wt(n, i, s);
791
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, c]) => Zt(n, a, c)) : Zt(n, i, s);
791
792
  };
792
793
  });
793
794
  function lt(t, e) {
@@ -825,7 +826,7 @@ function lt(t, e) {
825
826
  }
826
827
  return { valid: !1, mergeErrorPath: [] };
827
828
  }
828
- function Wt(t, e, n) {
829
+ function Zt(t, e, n) {
829
830
  if (e.issues.length && t.issues.push(...e.issues), n.issues.length && t.issues.push(...n.issues), ne(t))
830
831
  return t;
831
832
  const r = lt(e.value, n.value);
@@ -857,7 +858,7 @@ const mo = /* @__PURE__ */ v("$ZodEnum", (t, e) => {
857
858
  return n.value = o, n;
858
859
  };
859
860
  });
860
- function Zt(t, e) {
861
+ function qt(t, e) {
861
862
  return t.issues.length && e === void 0 ? { issues: [], value: void 0 } : t;
862
863
  }
863
864
  const go = /* @__PURE__ */ v("$ZodOptional", (t, e) => {
@@ -867,7 +868,7 @@ const go = /* @__PURE__ */ v("$ZodOptional", (t, e) => {
867
868
  }), t._zod.parse = (n, r) => {
868
869
  if (e.innerType._zod.optin === "optional") {
869
870
  const o = e.innerType._zod.run(n, r);
870
- return o instanceof Promise ? o.then((i) => Zt(i, n.value)) : Zt(o, n.value);
871
+ return o instanceof Promise ? o.then((i) => qt(i, n.value)) : qt(o, n.value);
871
872
  }
872
873
  return n.value === void 0 ? n : e.innerType._zod.run(n, r);
873
874
  };
@@ -883,10 +884,10 @@ const go = /* @__PURE__ */ v("$ZodOptional", (t, e) => {
883
884
  if (n.value === void 0)
884
885
  return n.value = e.defaultValue, n;
885
886
  const o = e.innerType._zod.run(n, r);
886
- return o instanceof Promise ? o.then((i) => qt(i, e)) : qt(o, e);
887
+ return o instanceof Promise ? o.then((i) => Vt(i, e)) : Vt(o, e);
887
888
  };
888
889
  });
889
- function qt(t, e) {
890
+ function Vt(t, e) {
890
891
  return t.value === void 0 && (t.value = e.defaultValue), t;
891
892
  }
892
893
  const bo = /* @__PURE__ */ v("$ZodPrefault", (t, e) => {
@@ -897,10 +898,10 @@ const bo = /* @__PURE__ */ v("$ZodPrefault", (t, e) => {
897
898
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
898
899
  }), t._zod.parse = (n, r) => {
899
900
  const o = e.innerType._zod.run(n, r);
900
- return o instanceof Promise ? o.then((i) => Vt(i, t)) : Vt(o, t);
901
+ return o instanceof Promise ? o.then((i) => Kt(i, t)) : Kt(o, t);
901
902
  };
902
903
  });
903
- function Vt(t, e) {
904
+ function Kt(t, e) {
904
905
  return !t.issues.length && t.value === void 0 && t.issues.push({
905
906
  code: "invalid_type",
906
907
  expected: "nonoptional",
@@ -945,21 +946,21 @@ const ko = /* @__PURE__ */ v("$ZodReadonly", (t, e) => {
945
946
  if (r.direction === "backward")
946
947
  return e.innerType._zod.run(n, r);
947
948
  const o = e.innerType._zod.run(n, r);
948
- return o instanceof Promise ? o.then(Kt) : Kt(o);
949
+ return o instanceof Promise ? o.then(Jt) : Jt(o);
949
950
  };
950
951
  });
951
- function Kt(t) {
952
+ function Jt(t) {
952
953
  return t.value = Object.freeze(t.value), t;
953
954
  }
954
955
  const Co = /* @__PURE__ */ v("$ZodCustom", (t, e) => {
955
956
  le.init(t, e), E.init(t, e), t._zod.parse = (n, r) => n, t._zod.check = (n) => {
956
957
  const r = n.value, o = e.fn(r);
957
958
  if (o instanceof Promise)
958
- return o.then((i) => Jt(i, n, r, t));
959
- Jt(o, n, r, t);
959
+ return o.then((i) => Yt(i, n, r, t));
960
+ Yt(o, n, r, t);
960
961
  };
961
962
  });
962
- function Jt(t, e, n, r) {
963
+ function Yt(t, e, n, r) {
963
964
  if (!t) {
964
965
  const o = {
965
966
  code: "custom",
@@ -1035,7 +1036,7 @@ function Eo(t, e) {
1035
1036
  maximum: t
1036
1037
  });
1037
1038
  }
1038
- function Yt(t, e) {
1039
+ function Xt(t, e) {
1039
1040
  return new eo({
1040
1041
  check: "min_length",
1041
1042
  ...j(e),
@@ -1127,7 +1128,7 @@ const $o = (t, e) => {
1127
1128
  ...e.checks ?? [],
1128
1129
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
1129
1130
  ]
1130
- })), t.clone = (n, r) => Z(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => jo(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Bo(t, n, r), t.parseAsync = async (n, r) => Do(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => Go(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Uo(t, n, r), t.decode = (n, r) => Fo(t, n, r), t.encodeAsync = async (n, r) => Ho(t, n, r), t.decodeAsync = async (n, r) => Wo(t, n, r), t.safeEncode = (n, r) => Zo(t, n, r), t.safeDecode = (n, r) => qo(t, n, r), t.safeEncodeAsync = async (n, r) => Vo(t, n, r), t.safeDecodeAsync = async (n, r) => Ko(t, n, r), t.refine = (n, r) => t.check(Si(n, r)), t.superRefine = (n) => t.check(ki(n)), t.overwrite = (n) => t.check(Lo(n)), t.optional = () => Qt(t), t.nullable = () => en(t), t.nullish = () => Qt(en(t)), t.nonoptional = (n) => fi(t, n), t.array = () => ti(t), t.or = (n) => ii([t, n]), t.and = (n) => ai(t, n), t.transform = (n) => tn(t, ci(n)), t.default = (n) => pi(t, n), t.prefault = (n) => mi(t, n), t.catch = (n) => yi(t, n), t.pipe = (n) => tn(t, n), t.readonly = () => wi(t), t.describe = (n) => {
1131
+ })), t.clone = (n, r) => Z(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => jo(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Bo(t, n, r), t.parseAsync = async (n, r) => Do(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => Go(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Uo(t, n, r), t.decode = (n, r) => Fo(t, n, r), t.encodeAsync = async (n, r) => Ho(t, n, r), t.decodeAsync = async (n, r) => Wo(t, n, r), t.safeEncode = (n, r) => Zo(t, n, r), t.safeDecode = (n, r) => qo(t, n, r), t.safeEncodeAsync = async (n, r) => Vo(t, n, r), t.safeDecodeAsync = async (n, r) => Ko(t, n, r), t.refine = (n, r) => t.check(Si(n, r)), t.superRefine = (n) => t.check(ki(n)), t.overwrite = (n) => t.check(Lo(n)), t.optional = () => en(t), t.nullable = () => tn(t), t.nullish = () => en(tn(t)), t.nonoptional = (n) => fi(t, n), t.array = () => ti(t), t.or = (n) => ii([t, n]), t.and = (n) => ai(t, n), t.transform = (n) => nn(t, ci(n)), t.default = (n) => pi(t, n), t.prefault = (n) => mi(t, n), t.catch = (n) => yi(t, n), t.pipe = (n) => nn(t, n), t.readonly = () => wi(t), t.describe = (n) => {
1131
1132
  const r = t.clone();
1132
1133
  return Ce.add(r, { description: n }), r;
1133
1134
  }, Object.defineProperty(t, "description", {
@@ -1149,7 +1150,7 @@ function Xe() {
1149
1150
  const Yo = /* @__PURE__ */ v("ZodUnknown", (t, e) => {
1150
1151
  so.init(t, e), O.init(t, e);
1151
1152
  });
1152
- function Xt() {
1153
+ function Qt() {
1153
1154
  return Ao(Yo);
1154
1155
  }
1155
1156
  const Xo = /* @__PURE__ */ v("ZodNever", (t, e) => {
@@ -1159,13 +1160,13 @@ function Qo(t) {
1159
1160
  return No(Xo, t);
1160
1161
  }
1161
1162
  const ei = /* @__PURE__ */ v("ZodArray", (t, e) => {
1162
- lo.init(t, e), O.init(t, e), t.element = e.element, t.min = (n, r) => t.check(Yt(n, r)), t.nonempty = (n) => t.check(Yt(1, n)), t.max = (n, r) => t.check(Eo(n, r)), t.length = (n, r) => t.check(xo(n, r)), t.unwrap = () => t.element;
1163
+ lo.init(t, e), O.init(t, e), t.element = e.element, t.min = (n, r) => t.check(Xt(n, r)), t.nonempty = (n) => t.check(Xt(1, n)), t.max = (n, r) => t.check(Eo(n, r)), t.length = (n, r) => t.check(xo(n, r)), t.unwrap = () => t.element;
1163
1164
  });
1164
1165
  function ti(t, e) {
1165
1166
  return Oo(ei, t, e);
1166
1167
  }
1167
1168
  const ni = /* @__PURE__ */ v("ZodObject", (t, e) => {
1168
- uo.init(t, e), O.init(t, e), P(t, "shape", () => e.shape), t.keyof = () => jn(Object.keys(t._zod.def.shape)), t.catchall = (n) => t.clone({ ...t._zod.def, catchall: n }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: Xt() }), t.loose = () => t.clone({ ...t._zod.def, catchall: Xt() }), t.strict = () => t.clone({ ...t._zod.def, catchall: Qo() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (n) => Mr(t, n), t.safeExtend = (n) => $r(t, n), t.merge = (n) => jr(t, n), t.pick = (n) => Ir(t, n), t.omit = (n) => zr(t, n), t.partial = (...n) => Dr(Dn, t, n[0]), t.required = (...n) => Br(Bn, t, n[0]);
1169
+ uo.init(t, e), O.init(t, e), P(t, "shape", () => e.shape), t.keyof = () => jn(Object.keys(t._zod.def.shape)), t.catchall = (n) => t.clone({ ...t._zod.def, catchall: n }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: Qt() }), t.loose = () => t.clone({ ...t._zod.def, catchall: Qt() }), t.strict = () => t.clone({ ...t._zod.def, catchall: Qo() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (n) => Mr(t, n), t.safeExtend = (n) => $r(t, n), t.merge = (n) => jr(t, n), t.pick = (n) => Ir(t, n), t.omit = (n) => zr(t, n), t.partial = (...n) => Dr(Dn, t, n[0]), t.required = (...n) => Br(Bn, t, n[0]);
1169
1170
  });
1170
1171
  function ri(t, e) {
1171
1172
  const n = {
@@ -1259,7 +1260,7 @@ function ci(t) {
1259
1260
  const Dn = /* @__PURE__ */ v("ZodOptional", (t, e) => {
1260
1261
  go.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType;
1261
1262
  });
1262
- function Qt(t) {
1263
+ function en(t) {
1263
1264
  return new Dn({
1264
1265
  type: "optional",
1265
1266
  innerType: t
@@ -1268,7 +1269,7 @@ function Qt(t) {
1268
1269
  const ui = /* @__PURE__ */ v("ZodNullable", (t, e) => {
1269
1270
  yo.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType;
1270
1271
  });
1271
- function en(t) {
1272
+ function tn(t) {
1272
1273
  return new ui({
1273
1274
  type: "nullable",
1274
1275
  innerType: t
@@ -1321,7 +1322,7 @@ function yi(t, e) {
1321
1322
  const _i = /* @__PURE__ */ v("ZodPipe", (t, e) => {
1322
1323
  So.init(t, e), O.init(t, e), t.in = e.in, t.out = e.out;
1323
1324
  });
1324
- function tn(t, e) {
1325
+ function nn(t, e) {
1325
1326
  return new _i({
1326
1327
  type: "pipe",
1327
1328
  in: t,
@@ -1347,7 +1348,7 @@ function Si(t, e = {}) {
1347
1348
  function ki(t) {
1348
1349
  return zo(t);
1349
1350
  }
1350
- const { parseNorg: Ci } = require("../../dist/napi/index.node"), nn = Ci, Ti = ({ html: t, metadata: e }) => {
1351
+ const Ci = ({ html: t, metadata: e }) => {
1351
1352
  const n = JSON.stringify(e ?? {}), r = JSON.stringify(t);
1352
1353
  return [
1353
1354
  `export const metadata = ${n};`,
@@ -1356,7 +1357,7 @@ const { parseNorg: Ci } = require("../../dist/napi/index.node"), nn = Ci, Ti = (
1356
1357
  ].join(`
1357
1358
  `);
1358
1359
  };
1359
- function Pi({ html: t, metadata: e }) {
1360
+ function Ti({ html: t, metadata: e }) {
1360
1361
  const n = JSON.stringify(e ?? {});
1361
1362
  return [
1362
1363
  "<script>",
@@ -1369,7 +1370,7 @@ function Pi({ html: t, metadata: e }) {
1369
1370
  ].join(`
1370
1371
  `);
1371
1372
  }
1372
- function Ri({ html: t, metadata: e }) {
1373
+ function Pi({ html: t, metadata: e }) {
1373
1374
  const n = JSON.stringify(e ?? {}), r = JSON.stringify(t);
1374
1375
  return [
1375
1376
  'import React from "react";',
@@ -1385,19 +1386,19 @@ let A = class extends Error {
1385
1386
  super(e), this.name = "ShikiError";
1386
1387
  }
1387
1388
  };
1388
- function Ai(t) {
1389
+ function Ri(t) {
1389
1390
  return At(t);
1390
1391
  }
1391
1392
  function At(t) {
1392
- return Array.isArray(t) ? Ni(t) : t instanceof RegExp ? t : typeof t == "object" ? Ei(t) : t;
1393
+ return Array.isArray(t) ? Ai(t) : t instanceof RegExp ? t : typeof t == "object" ? Ni(t) : t;
1393
1394
  }
1394
- function Ni(t) {
1395
+ function Ai(t) {
1395
1396
  let e = [];
1396
1397
  for (let n = 0, r = t.length; n < r; n++)
1397
1398
  e[n] = At(t[n]);
1398
1399
  return e;
1399
1400
  }
1400
- function Ei(t) {
1401
+ function Ni(t) {
1401
1402
  let e = {};
1402
1403
  for (let n in t)
1403
1404
  e[n] = At(t[n]);
@@ -1480,10 +1481,10 @@ var Zn = class {
1480
1481
  this._colorMap = t, this._defaults = e, this._root = n;
1481
1482
  }
1482
1483
  static createFromRawTheme(t, e) {
1483
- return this.createFromParsedTheme(Oi(t), e);
1484
+ return this.createFromParsedTheme(Li(t), e);
1484
1485
  }
1485
1486
  static createFromParsedTheme(t, e) {
1486
- return zi(t, e);
1487
+ return Ii(t, e);
1487
1488
  }
1488
1489
  _cachedMatchRoot = new Zn(
1489
1490
  (t) => this._root.match(t)
@@ -1498,7 +1499,7 @@ var Zn = class {
1498
1499
  if (t === null)
1499
1500
  return this._defaults;
1500
1501
  const e = t.scopeName, r = this._cachedMatchRoot.get(e).find(
1501
- (o) => xi(t.parent, o.parentScopes)
1502
+ (o) => Ei(t.parent, o.parentScopes)
1502
1503
  );
1503
1504
  return r ? new qn(
1504
1505
  r.fontStyle,
@@ -1545,7 +1546,7 @@ var Zn = class {
1545
1546
  return r === e ? n.reverse() : void 0;
1546
1547
  }
1547
1548
  };
1548
- function xi(t, e) {
1549
+ function Ei(t, e) {
1549
1550
  if (e.length === 0)
1550
1551
  return !0;
1551
1552
  for (let n = 0; n < e.length; n++) {
@@ -1555,7 +1556,7 @@ function xi(t, e) {
1555
1556
  return !1;
1556
1557
  r = e[++n], o = !0;
1557
1558
  }
1558
- for (; t && !Li(t.scopeName, r); ) {
1559
+ for (; t && !xi(t.scopeName, r); ) {
1559
1560
  if (o)
1560
1561
  return !1;
1561
1562
  t = t.parent;
@@ -1566,7 +1567,7 @@ function xi(t, e) {
1566
1567
  }
1567
1568
  return !0;
1568
1569
  }
1569
- function Li(t, e) {
1570
+ function xi(t, e) {
1570
1571
  return e === t || t.startsWith(e) && t[e.length] === ".";
1571
1572
  }
1572
1573
  var qn = class {
@@ -1574,7 +1575,7 @@ var qn = class {
1574
1575
  this.fontStyle = t, this.foregroundId = e, this.backgroundId = n;
1575
1576
  }
1576
1577
  };
1577
- function Oi(t) {
1578
+ function Li(t) {
1578
1579
  if (!t)
1579
1580
  return [];
1580
1581
  if (!t.settings || !Array.isArray(t.settings))
@@ -1615,7 +1616,7 @@ function Oi(t) {
1615
1616
  typeof s.settings.background == "string" && rn(s.settings.background) && (u = s.settings.background);
1616
1617
  for (let h = 0, p = l.length; h < p; h++) {
1617
1618
  let m = l[h].trim().split(" "), w = m[m.length - 1], b = null;
1618
- m.length > 1 && (b = m.slice(0, m.length - 1), b.reverse()), n[r++] = new Ii(
1619
+ m.length > 1 && (b = m.slice(0, m.length - 1), b.reverse()), n[r++] = new Oi(
1619
1620
  w,
1620
1621
  b,
1621
1622
  o,
@@ -1627,12 +1628,12 @@ function Oi(t) {
1627
1628
  }
1628
1629
  return n;
1629
1630
  }
1630
- var Ii = class {
1631
+ var Oi = class {
1631
1632
  constructor(t, e, n, r, o, i) {
1632
1633
  this.scope = t, this.parentScopes = e, this.index = n, this.fontStyle = r, this.foreground = o, this.background = i;
1633
1634
  }
1634
1635
  }, z = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(z || {});
1635
- function zi(t, e) {
1636
+ function Ii(t, e) {
1636
1637
  t.sort((a, c) => {
1637
1638
  let u = Fn(a.scope, c.scope);
1638
1639
  return u !== 0 || (u = Hn(a.parentScopes, c.parentScopes), u !== 0) ? u : a.index - c.index;
@@ -1642,14 +1643,14 @@ function zi(t, e) {
1642
1643
  let a = t.shift();
1643
1644
  a.fontStyle !== -1 && (n = a.fontStyle), a.foreground !== null && (r = a.foreground), a.background !== null && (o = a.background);
1644
1645
  }
1645
- let i = new Mi(e), s = new qn(n, i.getId(r), i.getId(o)), l = new ji(new ut(0, null, -1, 0, 0), []);
1646
+ let i = new zi(e), s = new qn(n, i.getId(r), i.getId(o)), l = new $i(new ut(0, null, -1, 0, 0), []);
1646
1647
  for (let a = 0, c = t.length; a < c; a++) {
1647
1648
  let u = t[a];
1648
1649
  l.insert(0, u.scope, u.parentScopes, u.fontStyle, i.getId(u.foreground), i.getId(u.background));
1649
1650
  }
1650
1651
  return new Oe(i, s, l);
1651
1652
  }
1652
- var Mi = class {
1653
+ var zi = class {
1653
1654
  _isFrozen;
1654
1655
  _lastColorId;
1655
1656
  _id2color;
@@ -1676,14 +1677,14 @@ var Mi = class {
1676
1677
  getColorMap() {
1677
1678
  return this._id2color.slice(0);
1678
1679
  }
1679
- }, $i = Object.freeze([]), ut = class Vn {
1680
+ }, Mi = Object.freeze([]), ut = class Vn {
1680
1681
  scopeDepth;
1681
1682
  parentScopes;
1682
1683
  fontStyle;
1683
1684
  foreground;
1684
1685
  background;
1685
1686
  constructor(e, n, r, o, i) {
1686
- this.scopeDepth = e, this.parentScopes = n || $i, this.fontStyle = r, this.foreground = o, this.background = i;
1687
+ this.scopeDepth = e, this.parentScopes = n || Mi, this.fontStyle = r, this.foreground = o, this.background = i;
1687
1688
  }
1688
1689
  clone() {
1689
1690
  return new Vn(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
@@ -1697,7 +1698,7 @@ var Mi = class {
1697
1698
  acceptOverwrite(e, n, r, o) {
1698
1699
  this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, n !== -1 && (this.fontStyle = n), r !== 0 && (this.foreground = r), o !== 0 && (this.background = o);
1699
1700
  }
1700
- }, ji = class ht {
1701
+ }, $i = class ht {
1701
1702
  constructor(e, n = [], r = {}) {
1702
1703
  this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
1703
1704
  }
@@ -1789,7 +1790,7 @@ var Mi = class {
1789
1790
  }
1790
1791
  };
1791
1792
  function Ie(t, e) {
1792
- const n = [], r = Di(t);
1793
+ const n = [], r = ji(t);
1793
1794
  let o = r.next();
1794
1795
  for (; o !== null; ) {
1795
1796
  let a = 0;
@@ -1854,7 +1855,7 @@ function Ie(t, e) {
1854
1855
  function on(t) {
1855
1856
  return !!t && !!t.match(/[\w\.:]+/);
1856
1857
  }
1857
- function Di(t) {
1858
+ function ji(t) {
1858
1859
  let e = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = e.exec(t);
1859
1860
  return {
1860
1861
  next: () => {
@@ -1875,14 +1876,14 @@ var ge = class {
1875
1876
  toKey() {
1876
1877
  return this.scopeName;
1877
1878
  }
1878
- }, Bi = class {
1879
+ }, Di = class {
1879
1880
  constructor(t, e) {
1880
1881
  this.scopeName = t, this.ruleName = e;
1881
1882
  }
1882
1883
  toKey() {
1883
1884
  return `${this.scopeName}#${this.ruleName}`;
1884
1885
  }
1885
- }, Gi = class {
1886
+ }, Bi = class {
1886
1887
  _references = [];
1887
1888
  _seenReferenceKeys = /* @__PURE__ */ new Set();
1888
1889
  get references() {
@@ -1893,7 +1894,7 @@ var ge = class {
1893
1894
  const e = t.toKey();
1894
1895
  this._seenReferenceKeys.has(e) || (this._seenReferenceKeys.add(e), this._references.push(t));
1895
1896
  }
1896
- }, Ui = class {
1897
+ }, Gi = class {
1897
1898
  constructor(t, e) {
1898
1899
  this.repo = t, this.initialScopeName = e, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new ge(this.initialScopeName)];
1899
1900
  }
@@ -1903,9 +1904,9 @@ var ge = class {
1903
1904
  processQueue() {
1904
1905
  const t = this.Q;
1905
1906
  this.Q = [];
1906
- const e = new Gi();
1907
+ const e = new Bi();
1907
1908
  for (const n of t)
1908
- Fi(n, this.initialScopeName, this.repo, e);
1909
+ Ui(n, this.initialScopeName, this.repo, e);
1909
1910
  for (const n of e.references)
1910
1911
  if (n instanceof ge) {
1911
1912
  if (this.seenFullScopeRequests.has(n.scopeName))
@@ -1918,7 +1919,7 @@ var ge = class {
1918
1919
  }
1919
1920
  }
1920
1921
  };
1921
- function Fi(t, e, n, r) {
1922
+ function Ui(t, e, n, r) {
1922
1923
  const o = n.lookup(t.scopeName);
1923
1924
  if (!o) {
1924
1925
  if (t.scopeName === e)
@@ -1981,26 +1982,26 @@ function ze(t, e, n) {
1981
1982
  const a = { baseGrammar: e.baseGrammar, selfGrammar: l, repository: o };
1982
1983
  s.kind === 4 ? pt(s.ruleName, a, n) : Ee(a, n);
1983
1984
  } else
1984
- s.kind === 4 ? n.add(new Bi(s.scopeName, s.ruleName)) : n.add(new ge(s.scopeName));
1985
+ s.kind === 4 ? n.add(new Di(s.scopeName, s.ruleName)) : n.add(new ge(s.scopeName));
1985
1986
  break;
1986
1987
  }
1987
1988
  }
1988
1989
  }
1989
- var Hi = class {
1990
+ var Fi = class {
1990
1991
  kind = 0;
1991
- }, Wi = class {
1992
+ }, Hi = class {
1992
1993
  kind = 1;
1993
- }, Zi = class {
1994
+ }, Wi = class {
1994
1995
  constructor(t) {
1995
1996
  this.ruleName = t;
1996
1997
  }
1997
1998
  kind = 2;
1998
- }, qi = class {
1999
+ }, Zi = class {
1999
2000
  constructor(t) {
2000
2001
  this.scopeName = t;
2001
2002
  }
2002
2003
  kind = 3;
2003
- }, Vi = class {
2004
+ }, qi = class {
2004
2005
  constructor(t, e) {
2005
2006
  this.scopeName = t, this.ruleName = e;
2006
2007
  }
@@ -2008,20 +2009,20 @@ var Hi = class {
2008
2009
  };
2009
2010
  function Jn(t) {
2010
2011
  if (t === "$base")
2011
- return new Hi();
2012
+ return new Fi();
2012
2013
  if (t === "$self")
2013
- return new Wi();
2014
+ return new Hi();
2014
2015
  const e = t.indexOf("#");
2015
2016
  if (e === -1)
2016
- return new qi(t);
2017
+ return new Zi(t);
2017
2018
  if (e === 0)
2018
- return new Zi(t.substring(1));
2019
+ return new Wi(t.substring(1));
2019
2020
  {
2020
2021
  const n = t.substring(0, e), r = t.substring(e + 1);
2021
- return new Vi(n, r);
2022
+ return new qi(n, r);
2022
2023
  }
2023
2024
  }
2024
- var Ki = /\\(\d+)/, sn = /\\(\d+)/g, Ji = -1, Yn = -2;
2025
+ var Vi = /\\(\d+)/, sn = /\\(\d+)/g, Ki = -1, Yn = -2;
2025
2026
  var we = class {
2026
2027
  $location;
2027
2028
  id;
@@ -2042,7 +2043,7 @@ var we = class {
2042
2043
  getContentName(t, e) {
2043
2044
  return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : Te.replaceCaptures(this._contentName, t, e);
2044
2045
  }
2045
- }, Yi = class extends we {
2046
+ }, Ji = class extends we {
2046
2047
  retokenizeCapturedWithRuleId;
2047
2048
  constructor(t, e, n, r, o) {
2048
2049
  super(t, e, n, r), this.retokenizeCapturedWithRuleId = o;
@@ -2058,7 +2059,7 @@ var we = class {
2058
2059
  compileAG(t, e, n, r) {
2059
2060
  throw new Error("Not supported!");
2060
2061
  }
2061
- }, Xi = class extends we {
2062
+ }, Yi = class extends we {
2062
2063
  _match;
2063
2064
  captures;
2064
2065
  _cachedCompiledPatterns;
@@ -2202,12 +2203,12 @@ var we = class {
2202
2203
  }
2203
2204
  }, Xn = class I {
2204
2205
  static createCaptureRule(e, n, r, o, i) {
2205
- return e.registerRule((s) => new Yi(n, s, r, o, i));
2206
+ return e.registerRule((s) => new Ji(n, s, r, o, i));
2206
2207
  }
2207
2208
  static getCompiledRuleId(e, n, r) {
2208
2209
  return e.id || n.registerRule((o) => {
2209
2210
  if (e.id = o, e.match)
2210
- return new Xi(
2211
+ return new Yi(
2211
2212
  e.$vscodeTextmateLocation,
2212
2213
  e.id,
2213
2214
  e.name,
@@ -2332,7 +2333,7 @@ var we = class {
2332
2333
  this.hasAnchor = s, o === 0 ? this.source = e : (i.push(e.substring(o, r)), this.source = i.join(""));
2333
2334
  } else
2334
2335
  this.hasAnchor = !1, this.source = e;
2335
- this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = Ki.test(this.source) : this.hasBackReferences = !1;
2336
+ this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = Vi.test(this.source) : this.hasBackReferences = !1;
2336
2337
  }
2337
2338
  clone() {
2338
2339
  return new Qn(this.source, this.ruleId);
@@ -2433,7 +2434,7 @@ var we = class {
2433
2434
  constructor(t, e) {
2434
2435
  this.languageId = t, this.tokenType = e;
2435
2436
  }
2436
- }, Qi = class mt {
2437
+ }, Xi = class mt {
2437
2438
  _defaultAttributes;
2438
2439
  _embeddedLanguagesMatcher;
2439
2440
  constructor(e, n) {
@@ -2441,7 +2442,7 @@ var we = class {
2441
2442
  e,
2442
2443
  8
2443
2444
  /* NotSet */
2444
- ), this._embeddedLanguagesMatcher = new es(Object.entries(n || {}));
2445
+ ), this._embeddedLanguagesMatcher = new Qi(Object.entries(n || {}));
2445
2446
  }
2446
2447
  getDefaultAttributes() {
2447
2448
  return this._defaultAttributes;
@@ -2478,7 +2479,7 @@ var we = class {
2478
2479
  throw new Error("Unexpected match for standard token type!");
2479
2480
  }
2480
2481
  static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
2481
- }, es = class {
2482
+ }, Qi = class {
2482
2483
  values;
2483
2484
  scopesRegExp;
2484
2485
  constructor(t) {
@@ -2513,7 +2514,7 @@ function er(t, e, n, r, o, i, s, l) {
2513
2514
  const a = e.content.length;
2514
2515
  let c = !1, u = -1;
2515
2516
  if (s) {
2516
- const d = ts(
2517
+ const d = es(
2517
2518
  t,
2518
2519
  e,
2519
2520
  n,
@@ -2531,7 +2532,7 @@ function er(t, e, n, r, o, i, s, l) {
2531
2532
  }
2532
2533
  return new cn(o, !1);
2533
2534
  function p() {
2534
- const d = ns(
2535
+ const d = ts(
2535
2536
  t,
2536
2537
  e,
2537
2538
  n,
@@ -2544,7 +2545,7 @@ function er(t, e, n, r, o, i, s, l) {
2544
2545
  return;
2545
2546
  }
2546
2547
  const m = d.captureIndices, w = d.matchedRuleId, b = m && m.length > 0 ? m[0].end > r : !1;
2547
- if (w === Ji) {
2548
+ if (w === Ki) {
2548
2549
  const y = o.getRule(t);
2549
2550
  i.produce(o, m[0].start), o = o.withContentNameScopesList(o.nameScopesList), pe(
2550
2551
  t,
@@ -2645,7 +2646,7 @@ function er(t, e, n, r, o, i, s, l) {
2645
2646
  m[0].end > r && (r = m[0].end, n = !1);
2646
2647
  }
2647
2648
  }
2648
- function ts(t, e, n, r, o, i) {
2649
+ function es(t, e, n, r, o, i) {
2649
2650
  let s = o.beginRuleCapturedEOL ? 0 : -1;
2650
2651
  const l = [];
2651
2652
  for (let a = o; a; a = a.pop()) {
@@ -2656,7 +2657,7 @@ function ts(t, e, n, r, o, i) {
2656
2657
  });
2657
2658
  }
2658
2659
  for (let a = l.pop(); a; a = l.pop()) {
2659
- const { ruleScanner: c, findOptions: u } = is(a.rule, t, a.stack.endRule, n, r === s), h = c.findNextMatchSync(e, r, u);
2660
+ const { ruleScanner: c, findOptions: u } = os(a.rule, t, a.stack.endRule, n, r === s), h = c.findNextMatchSync(e, r, u);
2660
2661
  if (h) {
2661
2662
  if (h.ruleId !== Yn) {
2662
2663
  o = a.stack.pop();
@@ -2670,11 +2671,11 @@ function ts(t, e, n, r, o, i) {
2670
2671
  }
2671
2672
  return { stack: o, linePos: r, anchorPosition: s, isFirstLine: n };
2672
2673
  }
2673
- function ns(t, e, n, r, o, i) {
2674
- const s = rs(t, e, n, r, o, i), l = t.getInjections();
2674
+ function ts(t, e, n, r, o, i) {
2675
+ const s = ns(t, e, n, r, o, i), l = t.getInjections();
2675
2676
  if (l.length === 0)
2676
2677
  return s;
2677
- const a = os(l, t, e, n, r, o, i);
2678
+ const a = rs(l, t, e, n, r, o, i);
2678
2679
  if (!a)
2679
2680
  return s;
2680
2681
  if (!s)
@@ -2682,14 +2683,14 @@ function ns(t, e, n, r, o, i) {
2682
2683
  const c = s.captureIndices[0].start, u = a.captureIndices[0].start;
2683
2684
  return u < c || a.priorityMatch && u === c ? a : s;
2684
2685
  }
2685
- function rs(t, e, n, r, o, i) {
2686
+ function ns(t, e, n, r, o, i) {
2686
2687
  const s = o.getRule(t), { ruleScanner: l, findOptions: a } = tr(s, t, o.endRule, n, r === i), c = l.findNextMatchSync(e, r, a);
2687
2688
  return c ? {
2688
2689
  captureIndices: c.captureIndices,
2689
2690
  matchedRuleId: c.ruleId
2690
2691
  } : null;
2691
2692
  }
2692
- function os(t, e, n, r, o, i, s) {
2693
+ function rs(t, e, n, r, o, i, s) {
2693
2694
  let l = Number.MAX_VALUE, a = null, c, u = 0;
2694
2695
  const h = i.contentNameScopesList.getScopeNames();
2695
2696
  for (let p = 0, d = t.length; p < d; p++) {
@@ -2716,7 +2717,7 @@ function tr(t, e, n, r, o) {
2716
2717
  /* None */
2717
2718
  };
2718
2719
  }
2719
- function is(t, e, n, r, o) {
2720
+ function os(t, e, n, r, o) {
2720
2721
  return {
2721
2722
  ruleScanner: t.compileWhileAG(e, n, r, o),
2722
2723
  findOptions: 0
@@ -2756,21 +2757,21 @@ function pe(t, e, n, r, o, i, s) {
2756
2757
  const m = p.getName(l, s);
2757
2758
  if (m !== null) {
2758
2759
  const b = (c.length > 0 ? c[c.length - 1].scopes : r.contentNameScopesList).pushAttributed(m, t);
2759
- c.push(new ss(b, d.end));
2760
+ c.push(new is(b, d.end));
2760
2761
  }
2761
2762
  }
2762
2763
  for (; c.length > 0; )
2763
2764
  o.produceFromScopes(c[c.length - 1].scopes, c[c.length - 1].endPos), c.pop();
2764
2765
  }
2765
- var ss = class {
2766
+ var is = class {
2766
2767
  scopes;
2767
2768
  endPos;
2768
2769
  constructor(t, e) {
2769
2770
  this.scopes = t, this.endPos = e;
2770
2771
  }
2771
2772
  };
2772
- function as(t, e, n, r, o, i, s, l) {
2773
- return new cs(
2773
+ function ss(t, e, n, r, o, i, s, l) {
2774
+ return new ls(
2774
2775
  t,
2775
2776
  e,
2776
2777
  n,
@@ -2798,12 +2799,12 @@ function $e(t, e) {
2798
2799
  let n = 0;
2799
2800
  return t.every((r) => {
2800
2801
  for (let o = n; o < e.length; o++)
2801
- if (ls(e[o], r))
2802
+ if (as(e[o], r))
2802
2803
  return n = o + 1, !0;
2803
2804
  return !1;
2804
2805
  });
2805
2806
  }
2806
- function ls(t, e) {
2807
+ function as(t, e) {
2807
2808
  if (!t)
2808
2809
  return !1;
2809
2810
  if (t === e)
@@ -2811,9 +2812,9 @@ function ls(t, e) {
2811
2812
  const n = e.length;
2812
2813
  return t.length > n && t.substr(0, n) === e && t[n] === ".";
2813
2814
  }
2814
- var cs = class {
2815
+ var ls = class {
2815
2816
  constructor(t, e, n, r, o, i, s, l) {
2816
- if (this._rootScopeName = t, this.balancedBracketSelectors = i, this._onigLib = l, this._basicScopeAttributesProvider = new Qi(
2817
+ if (this._rootScopeName = t, this.balancedBracketSelectors = i, this._onigLib = l, this._basicScopeAttributesProvider = new Xi(
2817
2818
  n,
2818
2819
  r
2819
2820
  ), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = s, this._grammar = hn(e, null), this._injections = null, this._tokenTypeMatchers = [], o)
@@ -2965,7 +2966,7 @@ var cs = class {
2965
2966
  o = !1, e.reset();
2966
2967
  t = t + `
2967
2968
  `;
2968
- const i = this.createOnigString(t), s = i.content.length, l = new hs(
2969
+ const i = this.createOnigString(t), s = i.content.length, l = new us(
2969
2970
  n,
2970
2971
  t,
2971
2972
  this._tokenTypeMatchers,
@@ -2989,7 +2990,7 @@ var cs = class {
2989
2990
  }
2990
2991
  };
2991
2992
  function hn(t, e) {
2992
- return t = Ai(t), t.repository = t.repository || {}, t.repository.$self = {
2993
+ return t = Ri(t), t.repository = t.repository || {}, t.repository.$self = {
2993
2994
  $vscodeTextmateLocation: t.$vscodeTextmateLocation,
2994
2995
  patterns: t.patterns,
2995
2996
  name: t.scopeName
@@ -3246,7 +3247,7 @@ var de = class U {
3246
3247
  de.fromExtension(r, n.contentNameScopesList)
3247
3248
  );
3248
3249
  }
3249
- }, us = class {
3250
+ }, cs = class {
3250
3251
  balancedBracketScopes;
3251
3252
  unbalancedBracketScopes;
3252
3253
  allowAny = !1;
@@ -3272,7 +3273,7 @@ var de = class U {
3272
3273
  return !0;
3273
3274
  return this.allowAny;
3274
3275
  }
3275
- }, hs = class {
3276
+ }, us = class {
3276
3277
  constructor(t, e, n, r) {
3277
3278
  this.balancedBracketSelectors = r, this._emitBinaryTokens = t, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
3278
3279
  }
@@ -3346,7 +3347,7 @@ var de = class U {
3346
3347
  n[r] = this._binaryTokens[r];
3347
3348
  return n;
3348
3349
  }
3349
- }, ps = class {
3350
+ }, hs = class {
3350
3351
  constructor(t, e) {
3351
3352
  this._onigLib = e, this._theme = t;
3352
3353
  }
@@ -3402,7 +3403,7 @@ var de = class U {
3402
3403
  let i = this._rawGrammars.get(t);
3403
3404
  if (!i)
3404
3405
  return null;
3405
- this._grammars.set(t, as(
3406
+ this._grammars.set(t, ss(
3406
3407
  t,
3407
3408
  i,
3408
3409
  e,
@@ -3415,12 +3416,12 @@ var de = class U {
3415
3416
  }
3416
3417
  return this._grammars.get(t);
3417
3418
  }
3418
- }, ds = class {
3419
+ }, ps = class {
3419
3420
  _options;
3420
3421
  _syncRegistry;
3421
3422
  _ensureGrammarCache;
3422
3423
  constructor(e) {
3423
- this._options = e, this._syncRegistry = new ps(
3424
+ this._options = e, this._syncRegistry = new hs(
3424
3425
  Oe.createFromRawTheme(e.theme, e.colorMap),
3425
3426
  e.onigLib
3426
3427
  ), this._ensureGrammarCache = /* @__PURE__ */ new Map();
@@ -3457,7 +3458,7 @@ var de = class U {
3457
3458
  n,
3458
3459
  r.embeddedLanguages,
3459
3460
  r.tokenTypes,
3460
- new us(
3461
+ new cs(
3461
3462
  r.balancedBracketSelectors || [],
3462
3463
  r.unbalancedBracketSelectors || []
3463
3464
  )
@@ -3470,7 +3471,7 @@ var de = class U {
3470
3471
  return this._loadGrammar(e, 0, null, null, null);
3471
3472
  }
3472
3473
  _loadGrammar(e, n, r, o, i) {
3473
- const s = new Ui(this._syncRegistry, e);
3474
+ const s = new Gi(this._syncRegistry, e);
3474
3475
  for (; s.Q.length > 0; )
3475
3476
  s.Q.map((l) => this._loadSingleGrammar(l.scopeName)), s.processQueue();
3476
3477
  return this._grammarForScopeName(
@@ -3510,7 +3511,7 @@ var de = class U {
3510
3511
  );
3511
3512
  }
3512
3513
  }, gt = ft.NULL;
3513
- const ms = [
3514
+ const ds = [
3514
3515
  "area",
3515
3516
  "base",
3516
3517
  "basefont",
@@ -3584,10 +3585,10 @@ M.prototype.overloadedBoolean = !1;
3584
3585
  M.prototype.property = "";
3585
3586
  M.prototype.spaceSeparated = !1;
3586
3587
  M.prototype.space = void 0;
3587
- let fs = 0;
3588
+ let ms = 0;
3588
3589
  const S = ee(), R = ee(), _t = ee(), f = ee(), T = ee(), ie = ee(), $ = ee();
3589
3590
  function ee() {
3590
- return 2 ** ++fs;
3591
+ return 2 ** ++ms;
3591
3592
  }
3592
3593
  const bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3593
3594
  __proto__: null,
@@ -3704,7 +3705,7 @@ function or(t, e) {
3704
3705
  function ir(t, e) {
3705
3706
  return or(t, e.toLowerCase());
3706
3707
  }
3707
- const gs = ce({
3708
+ const fs = ce({
3708
3709
  attributes: {
3709
3710
  acceptcharset: "accept-charset",
3710
3711
  classname: "class",
@@ -4065,7 +4066,7 @@ const gs = ce({
4065
4066
  },
4066
4067
  space: "html",
4067
4068
  transform: ir
4068
- }), ys = ce({
4069
+ }), gs = ce({
4069
4070
  attributes: {
4070
4071
  accentHeight: "accent-height",
4071
4072
  alignmentBaseline: "alignment-baseline",
@@ -4649,20 +4650,20 @@ const gs = ce({
4649
4650
  transform(t, e) {
4650
4651
  return "xml:" + e.slice(3).toLowerCase();
4651
4652
  }
4652
- }), _s = /[A-Z]/g, dn = /-[a-z]/g, bs = /^data[-\w.:]+$/i;
4653
- function ws(t, e) {
4653
+ }), ys = /[A-Z]/g, dn = /-[a-z]/g, _s = /^data[-\w.:]+$/i;
4654
+ function bs(t, e) {
4654
4655
  const n = yt(e);
4655
4656
  let r = e, o = M;
4656
4657
  if (n in t.normal)
4657
4658
  return t.property[t.normal[n]];
4658
- if (n.length > 4 && n.slice(0, 4) === "data" && bs.test(e)) {
4659
+ if (n.length > 4 && n.slice(0, 4) === "data" && _s.test(e)) {
4659
4660
  if (e.charAt(4) === "-") {
4660
- const i = e.slice(5).replace(dn, Ss);
4661
+ const i = e.slice(5).replace(dn, vs);
4661
4662
  r = "data" + i.charAt(0).toUpperCase() + i.slice(1);
4662
4663
  } else {
4663
4664
  const i = e.slice(4);
4664
4665
  if (!dn.test(i)) {
4665
- let s = i.replace(_s, vs);
4666
+ let s = i.replace(ys, ws);
4666
4667
  s.charAt(0) !== "-" && (s = "-" + s), e = "data" + s;
4667
4668
  }
4668
4669
  }
@@ -4670,14 +4671,14 @@ function ws(t, e) {
4670
4671
  }
4671
4672
  return new o(r, e);
4672
4673
  }
4673
- function vs(t) {
4674
+ function ws(t) {
4674
4675
  return "-" + t.toLowerCase();
4675
4676
  }
4676
- function Ss(t) {
4677
+ function vs(t) {
4677
4678
  return t.charAt(1).toUpperCase();
4678
4679
  }
4679
- const ks = nr([rr, gs, sr, ar, lr], "html"), cr = nr([rr, ys, sr, ar, lr], "svg"), mn = {}.hasOwnProperty;
4680
- function Cs(t, e) {
4680
+ const Ss = nr([rr, fs, sr, ar, lr], "html"), cr = nr([rr, gs, sr, ar, lr], "svg"), mn = {}.hasOwnProperty;
4681
+ function ks(t, e) {
4681
4682
  const n = e || {};
4682
4683
  function r(o, ...i) {
4683
4684
  let s = r.invalid;
@@ -4691,17 +4692,17 @@ function Cs(t, e) {
4691
4692
  }
4692
4693
  return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
4693
4694
  }
4694
- const Ts = /["&'<>`]/g, Ps = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, Rs = (
4695
+ const Cs = /["&'<>`]/g, Ts = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, Ps = (
4695
4696
  // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
4696
4697
  /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
4697
- ), As = /[|\\{}()[\]^$+*?.]/g, fn = /* @__PURE__ */ new WeakMap();
4698
- function Ns(t, e) {
4698
+ ), Rs = /[|\\{}()[\]^$+*?.]/g, fn = /* @__PURE__ */ new WeakMap();
4699
+ function As(t, e) {
4699
4700
  if (t = t.replace(
4700
- e.subset ? Es(e.subset) : Ts,
4701
+ e.subset ? Ns(e.subset) : Cs,
4701
4702
  r
4702
4703
  ), e.subset || e.escapeOnly)
4703
4704
  return t;
4704
- return t.replace(Ps, n).replace(Rs, r);
4705
+ return t.replace(Ts, n).replace(Ps, r);
4705
4706
  function n(o, i, s) {
4706
4707
  return e.format(
4707
4708
  (o.charCodeAt(0) - 55296) * 1024 + o.charCodeAt(1) - 56320 + 65536,
@@ -4717,28 +4718,28 @@ function Ns(t, e) {
4717
4718
  );
4718
4719
  }
4719
4720
  }
4720
- function Es(t) {
4721
+ function Ns(t) {
4721
4722
  let e = fn.get(t);
4722
- return e || (e = xs(t), fn.set(t, e)), e;
4723
+ return e || (e = Es(t), fn.set(t, e)), e;
4723
4724
  }
4724
- function xs(t) {
4725
+ function Es(t) {
4725
4726
  const e = [];
4726
4727
  let n = -1;
4727
4728
  for (; ++n < t.length; )
4728
- e.push(t[n].replace(As, "\\$&"));
4729
+ e.push(t[n].replace(Rs, "\\$&"));
4729
4730
  return new RegExp("(?:" + e.join("|") + ")", "g");
4730
4731
  }
4731
- const Ls = /[\dA-Fa-f]/;
4732
- function Os(t, e, n) {
4732
+ const xs = /[\dA-Fa-f]/;
4733
+ function Ls(t, e, n) {
4733
4734
  const r = "&#x" + t.toString(16).toUpperCase();
4734
- return n && e && !Ls.test(String.fromCharCode(e)) ? r : r + ";";
4735
+ return n && e && !xs.test(String.fromCharCode(e)) ? r : r + ";";
4735
4736
  }
4736
- const Is = /\d/;
4737
- function zs(t, e, n) {
4737
+ const Os = /\d/;
4738
+ function Is(t, e, n) {
4738
4739
  const r = "&#" + String(t);
4739
- return n && e && !Is.test(String.fromCharCode(e)) ? r : r + ";";
4740
+ return n && e && !Os.test(String.fromCharCode(e)) ? r : r + ";";
4740
4741
  }
4741
- const Ms = [
4742
+ const zs = [
4742
4743
  "AElig",
4743
4744
  "AMP",
4744
4745
  "Aacute",
@@ -5098,7 +5099,7 @@ const Ms = [
5098
5099
  lsaquo: "‹",
5099
5100
  rsaquo: "›",
5100
5101
  euro: "€"
5101
- }, $s = [
5102
+ }, Ms = [
5102
5103
  "cent",
5103
5104
  "copy",
5104
5105
  "divide",
@@ -5111,49 +5112,49 @@ const Ms = [
5111
5112
  let Pe;
5112
5113
  for (Pe in rt)
5113
5114
  ur.call(rt, Pe) && (wt[rt[Pe]] = Pe);
5114
- const js = /[^\dA-Za-z]/;
5115
- function Ds(t, e, n, r) {
5115
+ const $s = /[^\dA-Za-z]/;
5116
+ function js(t, e, n, r) {
5116
5117
  const o = String.fromCharCode(t);
5117
5118
  if (ur.call(wt, o)) {
5118
5119
  const i = wt[o], s = "&" + i;
5119
- return n && Ms.includes(i) && !$s.includes(i) && (!r || e && e !== 61 && js.test(String.fromCharCode(e))) ? s : s + ";";
5120
+ return n && zs.includes(i) && !Ms.includes(i) && (!r || e && e !== 61 && $s.test(String.fromCharCode(e))) ? s : s + ";";
5120
5121
  }
5121
5122
  return "";
5122
5123
  }
5123
- function Bs(t, e, n) {
5124
- let r = Os(t, e, n.omitOptionalSemicolons), o;
5125
- if ((n.useNamedReferences || n.useShortestReferences) && (o = Ds(
5124
+ function Ds(t, e, n) {
5125
+ let r = Ls(t, e, n.omitOptionalSemicolons), o;
5126
+ if ((n.useNamedReferences || n.useShortestReferences) && (o = js(
5126
5127
  t,
5127
5128
  e,
5128
5129
  n.omitOptionalSemicolons,
5129
5130
  n.attribute
5130
5131
  )), (n.useShortestReferences || !o) && n.useShortestReferences) {
5131
- const i = zs(t, e, n.omitOptionalSemicolons);
5132
+ const i = Is(t, e, n.omitOptionalSemicolons);
5132
5133
  i.length < r.length && (r = i);
5133
5134
  }
5134
5135
  return o && (!n.useShortestReferences || o.length < r.length) ? o : r;
5135
5136
  }
5136
5137
  function se(t, e) {
5137
- return Ns(t, Object.assign({ format: Bs }, e));
5138
+ return As(t, Object.assign({ format: Ds }, e));
5138
5139
  }
5139
- const Gs = /^>|^->|<!--|-->|--!>|<!-$/g, Us = [">"], Fs = ["<", ">"];
5140
- function Hs(t, e, n, r) {
5140
+ const Bs = /^>|^->|<!--|-->|--!>|<!-$/g, Gs = [">"], Us = ["<", ">"];
5141
+ function Fs(t, e, n, r) {
5141
5142
  return r.settings.bogusComments ? "<?" + se(
5142
5143
  t.value,
5143
5144
  Object.assign({}, r.settings.characterReferences, {
5144
- subset: Us
5145
+ subset: Gs
5145
5146
  })
5146
- ) + ">" : "<!--" + t.value.replace(Gs, o) + "-->";
5147
+ ) + ">" : "<!--" + t.value.replace(Bs, o) + "-->";
5147
5148
  function o(i) {
5148
5149
  return se(
5149
5150
  i,
5150
5151
  Object.assign({}, r.settings.characterReferences, {
5151
- subset: Fs
5152
+ subset: Us
5152
5153
  })
5153
5154
  );
5154
5155
  }
5155
5156
  }
5156
- function Ws(t, e, n, r) {
5157
+ function Hs(t, e, n, r) {
5157
5158
  return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
5158
5159
  }
5159
5160
  function gn(t, e) {
@@ -5165,27 +5166,27 @@ function gn(t, e) {
5165
5166
  r++, o = n.indexOf(e, o + e.length);
5166
5167
  return r;
5167
5168
  }
5168
- function Zs(t, e) {
5169
+ function Ws(t, e) {
5169
5170
  const n = e || {};
5170
5171
  return (t[t.length - 1] === "" ? [...t, ""] : t).join(
5171
5172
  (n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
5172
5173
  ).trim();
5173
5174
  }
5174
- function qs(t) {
5175
+ function Zs(t) {
5175
5176
  return t.join(" ").trim();
5176
5177
  }
5177
- const Vs = /[ \t\n\f\r]/g;
5178
+ const qs = /[ \t\n\f\r]/g;
5178
5179
  function Et(t) {
5179
5180
  return typeof t == "object" ? t.type === "text" ? yn(t.value) : !1 : yn(t);
5180
5181
  }
5181
5182
  function yn(t) {
5182
- return t.replace(Vs, "") === "";
5183
+ return t.replace(qs, "") === "";
5183
5184
  }
5184
- const x = pr(1), hr = pr(-1), Ks = [];
5185
+ const x = pr(1), hr = pr(-1), Vs = [];
5185
5186
  function pr(t) {
5186
5187
  return e;
5187
5188
  function e(n, r, o) {
5188
- const i = n ? n.children : Ks;
5189
+ const i = n ? n.children : Vs;
5189
5190
  let s = (r || 0) + t, l = i[s];
5190
5191
  if (!o)
5191
5192
  for (; l && Et(l); )
@@ -5193,60 +5194,60 @@ function pr(t) {
5193
5194
  return l;
5194
5195
  }
5195
5196
  }
5196
- const Js = {}.hasOwnProperty;
5197
+ const Ks = {}.hasOwnProperty;
5197
5198
  function dr(t) {
5198
5199
  return e;
5199
5200
  function e(n, r, o) {
5200
- return Js.call(t, n.tagName) && t[n.tagName](n, r, o);
5201
+ return Ks.call(t, n.tagName) && t[n.tagName](n, r, o);
5201
5202
  }
5202
5203
  }
5203
5204
  const xt = dr({
5204
- body: Xs,
5205
+ body: Ys,
5205
5206
  caption: ot,
5206
5207
  colgroup: ot,
5207
- dd: na,
5208
- dt: ta,
5208
+ dd: ta,
5209
+ dt: ea,
5209
5210
  head: ot,
5210
- html: Ys,
5211
- li: ea,
5212
- optgroup: ra,
5213
- option: oa,
5214
- p: Qs,
5211
+ html: Js,
5212
+ li: Qs,
5213
+ optgroup: na,
5214
+ option: ra,
5215
+ p: Xs,
5215
5216
  rp: _n,
5216
5217
  rt: _n,
5217
- tbody: sa,
5218
+ tbody: ia,
5218
5219
  td: bn,
5219
- tfoot: aa,
5220
+ tfoot: sa,
5220
5221
  th: bn,
5221
- thead: ia,
5222
- tr: la
5222
+ thead: oa,
5223
+ tr: aa
5223
5224
  });
5224
5225
  function ot(t, e, n) {
5225
5226
  const r = x(n, e, !0);
5226
5227
  return !r || r.type !== "comment" && !(r.type === "text" && Et(r.value.charAt(0)));
5227
5228
  }
5228
- function Ys(t, e, n) {
5229
+ function Js(t, e, n) {
5229
5230
  const r = x(n, e);
5230
5231
  return !r || r.type !== "comment";
5231
5232
  }
5232
- function Xs(t, e, n) {
5233
+ function Ys(t, e, n) {
5233
5234
  const r = x(n, e);
5234
5235
  return !r || r.type !== "comment";
5235
5236
  }
5236
- function Qs(t, e, n) {
5237
+ function Xs(t, e, n) {
5237
5238
  const r = x(n, e);
5238
5239
  return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || // Confusing parent.
5239
5240
  !(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
5240
5241
  }
5241
- function ea(t, e, n) {
5242
+ function Qs(t, e, n) {
5242
5243
  const r = x(n, e);
5243
5244
  return !r || r.type === "element" && r.tagName === "li";
5244
5245
  }
5245
- function ta(t, e, n) {
5246
+ function ea(t, e, n) {
5246
5247
  const r = x(n, e);
5247
5248
  return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
5248
5249
  }
5249
- function na(t, e, n) {
5250
+ function ta(t, e, n) {
5250
5251
  const r = x(n, e);
5251
5252
  return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
5252
5253
  }
@@ -5254,26 +5255,26 @@ function _n(t, e, n) {
5254
5255
  const r = x(n, e);
5255
5256
  return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
5256
5257
  }
5257
- function ra(t, e, n) {
5258
+ function na(t, e, n) {
5258
5259
  const r = x(n, e);
5259
5260
  return !r || r.type === "element" && r.tagName === "optgroup";
5260
5261
  }
5261
- function oa(t, e, n) {
5262
+ function ra(t, e, n) {
5262
5263
  const r = x(n, e);
5263
5264
  return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
5264
5265
  }
5265
- function ia(t, e, n) {
5266
+ function oa(t, e, n) {
5266
5267
  const r = x(n, e);
5267
5268
  return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
5268
5269
  }
5269
- function sa(t, e, n) {
5270
+ function ia(t, e, n) {
5270
5271
  const r = x(n, e);
5271
5272
  return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
5272
5273
  }
5273
- function aa(t, e, n) {
5274
+ function sa(t, e, n) {
5274
5275
  return !x(n, e);
5275
5276
  }
5276
- function la(t, e, n) {
5277
+ function aa(t, e, n) {
5277
5278
  const r = x(n, e);
5278
5279
  return !r || r.type === "element" && r.tagName === "tr";
5279
5280
  }
@@ -5281,18 +5282,18 @@ function bn(t, e, n) {
5281
5282
  const r = x(n, e);
5282
5283
  return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
5283
5284
  }
5284
- const ca = dr({
5285
- body: pa,
5286
- colgroup: da,
5287
- head: ha,
5288
- html: ua,
5289
- tbody: ma
5285
+ const la = dr({
5286
+ body: ha,
5287
+ colgroup: pa,
5288
+ head: ua,
5289
+ html: ca,
5290
+ tbody: da
5290
5291
  });
5291
- function ua(t) {
5292
+ function ca(t) {
5292
5293
  const e = x(t, -1);
5293
5294
  return !e || e.type !== "comment";
5294
5295
  }
5295
- function ha(t) {
5296
+ function ua(t) {
5296
5297
  const e = /* @__PURE__ */ new Set();
5297
5298
  for (const r of t.children)
5298
5299
  if (r.type === "element" && (r.tagName === "base" || r.tagName === "title")) {
@@ -5302,15 +5303,15 @@ function ha(t) {
5302
5303
  const n = t.children[0];
5303
5304
  return !n || n.type === "element";
5304
5305
  }
5305
- function pa(t) {
5306
+ function ha(t) {
5306
5307
  const e = x(t, -1, !0);
5307
5308
  return !e || e.type !== "comment" && !(e.type === "text" && Et(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
5308
5309
  }
5309
- function da(t, e, n) {
5310
+ function pa(t, e, n) {
5310
5311
  const r = hr(n, e), o = x(t, -1, !0);
5311
5312
  return n && r && r.type === "element" && r.tagName === "colgroup" && xt(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "col");
5312
5313
  }
5313
- function ma(t, e, n) {
5314
+ function da(t, e, n) {
5314
5315
  const r = hr(n, e), o = x(t, -1);
5315
5316
  return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && xt(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "tr");
5316
5317
  }
@@ -5344,24 +5345,24 @@ const Re = {
5344
5345
  ['\0"&'.split(""), "\0\"&'`".split("")]
5345
5346
  ]
5346
5347
  };
5347
- function fa(t, e, n, r) {
5348
+ function ma(t, e, n, r) {
5348
5349
  const o = r.schema, i = o.space === "svg" ? !1 : r.settings.omitOptionalTags;
5349
5350
  let s = o.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(t.tagName.toLowerCase());
5350
5351
  const l = [];
5351
5352
  let a;
5352
5353
  o.space === "html" && t.tagName === "svg" && (r.schema = cr);
5353
- const c = ga(r, t.properties), u = r.all(
5354
+ const c = fa(r, t.properties), u = r.all(
5354
5355
  o.space === "html" && t.tagName === "template" ? t.content : t
5355
5356
  );
5356
- return r.schema = o, u && (s = !1), (c || !i || !ca(t, e, n)) && (l.push("<", t.tagName, c ? " " + c : ""), s && (o.space === "svg" || r.settings.closeSelfClosing) && (a = c.charAt(c.length - 1), (!r.settings.tightSelfClosing || a === "/" || a && a !== '"' && a !== "'") && l.push(" "), l.push("/")), l.push(">")), l.push(u), !s && (!i || !xt(t, e, n)) && l.push("</" + t.tagName + ">"), l.join("");
5357
+ return r.schema = o, u && (s = !1), (c || !i || !la(t, e, n)) && (l.push("<", t.tagName, c ? " " + c : ""), s && (o.space === "svg" || r.settings.closeSelfClosing) && (a = c.charAt(c.length - 1), (!r.settings.tightSelfClosing || a === "/" || a && a !== '"' && a !== "'") && l.push(" "), l.push("/")), l.push(">")), l.push(u), !s && (!i || !xt(t, e, n)) && l.push("</" + t.tagName + ">"), l.join("");
5357
5358
  }
5358
- function ga(t, e) {
5359
+ function fa(t, e) {
5359
5360
  const n = [];
5360
5361
  let r = -1, o;
5361
5362
  if (e) {
5362
5363
  for (o in e)
5363
5364
  if (e[o] !== null && e[o] !== void 0) {
5364
- const i = ya(t, o, e[o]);
5365
+ const i = ga(t, o, e[o]);
5365
5366
  i && n.push(i);
5366
5367
  }
5367
5368
  }
@@ -5371,8 +5372,8 @@ function ga(t, e) {
5371
5372
  }
5372
5373
  return n.join("");
5373
5374
  }
5374
- function ya(t, e, n) {
5375
- const r = ws(t.schema, e), o = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, i = t.settings.allowDangerousCharacters ? 0 : 1;
5375
+ function ga(t, e, n) {
5376
+ const r = bs(t.schema, e), o = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, i = t.settings.allowDangerousCharacters ? 0 : 1;
5376
5377
  let s = t.quote, l;
5377
5378
  if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n))
5378
5379
  return "";
@@ -5383,7 +5384,7 @@ function ya(t, e, n) {
5383
5384
  subset: Re.name[o][i]
5384
5385
  })
5385
5386
  );
5386
- return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? Zs : qs)(n, {
5387
+ return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? Ws : Zs)(n, {
5387
5388
  padLeft: !t.settings.tightCommaSeparatedLists
5388
5389
  }) : String(n), t.settings.collapseEmptyAttributes && !n) ? a : (t.settings.preferUnquoted && (l = se(
5389
5390
  n,
@@ -5400,44 +5401,44 @@ function ya(t, e, n) {
5400
5401
  })
5401
5402
  ) + s), a + (l && "=" + l));
5402
5403
  }
5403
- const _a = ["<", "&"];
5404
+ const ya = ["<", "&"];
5404
5405
  function mr(t, e, n, r) {
5405
5406
  return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? t.value : se(
5406
5407
  t.value,
5407
5408
  Object.assign({}, r.settings.characterReferences, {
5408
- subset: _a
5409
+ subset: ya
5409
5410
  })
5410
5411
  );
5411
5412
  }
5412
- function ba(t, e, n, r) {
5413
+ function _a(t, e, n, r) {
5413
5414
  return r.settings.allowDangerousHtml ? t.value : mr(t, e, n, r);
5414
5415
  }
5415
- function wa(t, e, n, r) {
5416
+ function ba(t, e, n, r) {
5416
5417
  return r.all(t);
5417
5418
  }
5418
- const va = Cs("type", {
5419
- invalid: Sa,
5420
- unknown: ka,
5421
- handlers: { comment: Hs, doctype: Ws, element: fa, raw: ba, root: wa, text: mr }
5419
+ const wa = ks("type", {
5420
+ invalid: va,
5421
+ unknown: Sa,
5422
+ handlers: { comment: Fs, doctype: Hs, element: ma, raw: _a, root: ba, text: mr }
5422
5423
  });
5423
- function Sa(t) {
5424
+ function va(t) {
5424
5425
  throw new Error("Expected node, not `" + t + "`");
5425
5426
  }
5426
- function ka(t) {
5427
+ function Sa(t) {
5427
5428
  const e = (
5428
5429
  /** @type {Nodes} */
5429
5430
  t
5430
5431
  );
5431
5432
  throw new Error("Cannot compile unknown node `" + e.type + "`");
5432
5433
  }
5433
- const Ca = {}, Ta = {}, Pa = [];
5434
- function Ra(t, e) {
5435
- const n = e || Ca, r = n.quote || '"', o = r === '"' ? "'" : '"';
5434
+ const ka = {}, Ca = {}, Ta = [];
5435
+ function Pa(t, e) {
5436
+ const n = e || ka, r = n.quote || '"', o = r === '"' ? "'" : '"';
5436
5437
  if (r !== '"' && r !== "'")
5437
5438
  throw new Error("Invalid quote `" + r + "`, expected `'` or `\"`");
5438
5439
  return {
5439
- one: Aa,
5440
- all: Na,
5440
+ one: Ra,
5441
+ all: Aa,
5441
5442
  settings: {
5442
5443
  omitOptionalTags: n.omitOptionalTags || !1,
5443
5444
  allowParseErrors: n.allowParseErrors || !1,
@@ -5452,12 +5453,12 @@ function Ra(t, e) {
5452
5453
  tightSelfClosing: n.tightSelfClosing || !1,
5453
5454
  collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
5454
5455
  allowDangerousHtml: n.allowDangerousHtml || !1,
5455
- voids: n.voids || ms,
5456
- characterReferences: n.characterReferences || Ta,
5456
+ voids: n.voids || ds,
5457
+ characterReferences: n.characterReferences || Ca,
5457
5458
  closeSelfClosing: n.closeSelfClosing || !1,
5458
5459
  closeEmptyElements: n.closeEmptyElements || !1
5459
5460
  },
5460
- schema: n.space === "svg" ? cr : ks,
5461
+ schema: n.space === "svg" ? cr : Ss,
5461
5462
  quote: r,
5462
5463
  alternative: o
5463
5464
  }.one(
@@ -5466,11 +5467,11 @@ function Ra(t, e) {
5466
5467
  void 0
5467
5468
  );
5468
5469
  }
5469
- function Aa(t, e, n) {
5470
- return va(t, e, n, this);
5470
+ function Ra(t, e, n) {
5471
+ return wa(t, e, n, this);
5471
5472
  }
5472
- function Na(t) {
5473
- const e = [], n = t && t.children || Pa;
5473
+ function Aa(t) {
5474
+ const e = [], n = t && t.children || Ta;
5474
5475
  let r = -1;
5475
5476
  for (; ++r < n.length; )
5476
5477
  e[r] = this.one(n[r], r, t);
@@ -5485,7 +5486,7 @@ function je(t, e) {
5485
5486
  function W(t, e) {
5486
5487
  return t && (e?.[t?.toLowerCase()] || t);
5487
5488
  }
5488
- function Ea(t) {
5489
+ function Na(t) {
5489
5490
  return Array.isArray(t) ? t : [t];
5490
5491
  }
5491
5492
  async function fr(t) {
@@ -5522,7 +5523,7 @@ function Ze(t, e = !1) {
5522
5523
  }
5523
5524
  return o;
5524
5525
  }
5525
- function xa(t) {
5526
+ function Ea(t) {
5526
5527
  const e = Ze(t, !0).map(([o]) => o);
5527
5528
  function n(o) {
5528
5529
  if (o === t.length)
@@ -5550,7 +5551,7 @@ function xa(t) {
5550
5551
  posToIndex: r
5551
5552
  };
5552
5553
  }
5553
- function La(t, e, n) {
5554
+ function xa(t, e, n) {
5554
5555
  const r = /* @__PURE__ */ new Set();
5555
5556
  for (const i of t.matchAll(/lang=["']([\w-]+)["']/g))
5556
5557
  r.add(i[1]);
@@ -5563,8 +5564,8 @@ function La(t, e, n) {
5563
5564
  const o = n.getBundledLanguages();
5564
5565
  return Array.from(r).filter((i) => i && o[i]);
5565
5566
  }
5566
- const It = "light-dark()", Oa = ["color", "background-color"];
5567
- function Ia(t, e) {
5567
+ const It = "light-dark()", La = ["color", "background-color"];
5568
+ function Oa(t, e) {
5568
5569
  let n = 0;
5569
5570
  const r = [];
5570
5571
  for (const o of e)
@@ -5579,14 +5580,14 @@ function Ia(t, e) {
5579
5580
  offset: t.offset + n
5580
5581
  }), r;
5581
5582
  }
5582
- function za(t, e) {
5583
+ function Ia(t, e) {
5583
5584
  const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
5584
5585
  return n.length ? t.map((r) => r.flatMap((o) => {
5585
5586
  const i = n.filter((s) => o.offset < s && s < o.offset + o.content.length).map((s) => s - o.offset).sort((s, l) => s - l);
5586
- return i.length ? Ia(o, i) : o;
5587
+ return i.length ? Oa(o, i) : o;
5587
5588
  })) : t;
5588
5589
  }
5589
- function Ma(t, e, n, r, o = "css-vars") {
5590
+ function za(t, e, n, r, o = "css-vars") {
5590
5591
  const i = {
5591
5592
  content: t.content,
5592
5593
  explanation: t.explanation,
@@ -5598,7 +5599,7 @@ function Ma(t, e, n, r, o = "css-vars") {
5598
5599
  return s.forEach((u, h) => {
5599
5600
  for (const p of l) {
5600
5601
  const d = u[p] || "inherit";
5601
- if (h === 0 && r && Oa.includes(p))
5602
+ if (h === 0 && r && La.includes(p))
5602
5603
  if (r === It && s.length > 1) {
5603
5604
  const m = e.findIndex((g) => g === "light"), w = e.findIndex((g) => g === "dark");
5604
5605
  if (m === -1 || w === -1)
@@ -5651,7 +5652,7 @@ class ue {
5651
5652
  */
5652
5653
  static initial(e, n) {
5653
5654
  return new ue(
5654
- Object.fromEntries(Ea(n).map((r) => [r, gt])),
5655
+ Object.fromEntries(Na(n).map((r) => [r, gt])),
5655
5656
  e
5656
5657
  );
5657
5658
  }
@@ -5672,7 +5673,7 @@ class ue {
5672
5673
  return this._stacks[e];
5673
5674
  }
5674
5675
  getScopes(e = this.theme) {
5675
- return $a(this._stacks[e]);
5676
+ return Ma(this._stacks[e]);
5676
5677
  }
5677
5678
  toJSON() {
5678
5679
  return {
@@ -5683,7 +5684,7 @@ class ue {
5683
5684
  };
5684
5685
  }
5685
5686
  }
5686
- function $a(t) {
5687
+ function Ma(t) {
5687
5688
  const e = [], n = /* @__PURE__ */ new Set();
5688
5689
  function r(o) {
5689
5690
  if (n.has(o))
@@ -5694,12 +5695,12 @@ function $a(t) {
5694
5695
  }
5695
5696
  return r(t), e;
5696
5697
  }
5697
- function ja(t, e) {
5698
+ function $a(t, e) {
5698
5699
  if (!(t instanceof ue))
5699
5700
  throw new A("Invalid grammar state");
5700
5701
  return t.getInternalStack(e);
5701
5702
  }
5702
- function Da() {
5703
+ function ja() {
5703
5704
  const t = /* @__PURE__ */ new WeakMap();
5704
5705
  function e(n) {
5705
5706
  if (!t.has(n.meta)) {
@@ -5725,12 +5726,12 @@ function Da() {
5725
5726
  };
5726
5727
  }
5727
5728
  };
5728
- const o = xa(n.source), i = (n.options.decorations || []).map((s) => ({
5729
+ const o = Ea(n.source), i = (n.options.decorations || []).map((s) => ({
5729
5730
  ...s,
5730
5731
  start: r(s.start),
5731
5732
  end: r(s.end)
5732
5733
  }));
5733
- Ba(i), t.set(n.meta, {
5734
+ Da(i), t.set(n.meta, {
5734
5735
  decorations: i,
5735
5736
  converter: o,
5736
5737
  source: n.source
@@ -5744,7 +5745,7 @@ function Da() {
5744
5745
  if (!this.options.decorations?.length)
5745
5746
  return;
5746
5747
  const o = e(this).decorations.flatMap((s) => [s.start.offset, s.end.offset]);
5747
- return za(n, o);
5748
+ return Ia(n, o);
5748
5749
  },
5749
5750
  code(n) {
5750
5751
  if (!this.options.decorations?.length)
@@ -5804,7 +5805,7 @@ function Da() {
5804
5805
  }
5805
5806
  };
5806
5807
  }
5807
- function Ba(t) {
5808
+ function Da(t) {
5808
5809
  for (let e = 0; e < t.length; e++) {
5809
5810
  const n = t[e];
5810
5811
  if (n.start.offset > n.end.offset)
@@ -5822,19 +5823,19 @@ function Ba(t) {
5822
5823
  function wr(t) {
5823
5824
  return t.type === "text" ? t.value : t.type === "element" ? t.children.map(wr).join("") : "";
5824
5825
  }
5825
- const Ga = [
5826
- /* @__PURE__ */ Da()
5826
+ const Ba = [
5827
+ /* @__PURE__ */ ja()
5827
5828
  ];
5828
5829
  function Be(t) {
5829
- const e = Ua(t.transformers || []);
5830
+ const e = Ga(t.transformers || []);
5830
5831
  return [
5831
5832
  ...e.pre,
5832
5833
  ...e.normal,
5833
5834
  ...e.post,
5834
- ...Ga
5835
+ ...Ba
5835
5836
  ];
5836
5837
  }
5837
- function Ua(t) {
5838
+ function Ga(t) {
5838
5839
  const e = [], n = [], r = [];
5839
5840
  for (const o of t)
5840
5841
  switch (o.enforce) {
@@ -5875,7 +5876,7 @@ var K = [
5875
5876
  8: "hidden",
5876
5877
  9: "strikethrough"
5877
5878
  };
5878
- function Fa(t, e) {
5879
+ function Ua(t, e) {
5879
5880
  const n = t.indexOf("\x1B", e);
5880
5881
  if (n !== -1 && t[n + 1] === "[") {
5881
5882
  const r = t.indexOf("m", n);
@@ -5904,7 +5905,7 @@ function wn(t) {
5904
5905
  return { type: "table", index: Number(n) };
5905
5906
  }
5906
5907
  }
5907
- function Ha(t) {
5908
+ function Fa(t) {
5908
5909
  const e = [];
5909
5910
  for (; t.length > 0; ) {
5910
5911
  const n = t.shift();
@@ -5972,21 +5973,21 @@ function Ha(t) {
5972
5973
  }
5973
5974
  return e;
5974
5975
  }
5975
- function Wa() {
5976
+ function Ha() {
5976
5977
  let t = null, e = null, n = /* @__PURE__ */ new Set();
5977
5978
  return {
5978
5979
  parse(r) {
5979
5980
  const o = [];
5980
5981
  let i = 0;
5981
5982
  do {
5982
- const s = Fa(r, i), l = s.sequence ? r.substring(i, s.startPosition) : r.substring(i);
5983
+ const s = Ua(r, i), l = s.sequence ? r.substring(i, s.startPosition) : r.substring(i);
5983
5984
  if (l.length > 0 && o.push({
5984
5985
  value: l,
5985
5986
  foreground: t,
5986
5987
  background: e,
5987
5988
  decorations: new Set(n)
5988
5989
  }), s.sequence) {
5989
- const a = Ha(s.sequence);
5990
+ const a = Fa(s.sequence);
5990
5991
  for (const c of a)
5991
5992
  c.type === "resetAll" ? (t = null, e = null, n.clear()) : c.type === "resetForegroundColor" ? t = null : c.type === "resetBackgroundColor" ? e = null : c.type === "resetDecoration" && n.delete(c.value);
5992
5993
  for (const c of a)
@@ -5998,7 +5999,7 @@ function Wa() {
5998
5999
  }
5999
6000
  };
6000
6001
  }
6001
- var Za = {
6002
+ var Wa = {
6002
6003
  black: "#000000",
6003
6004
  red: "#bb0000",
6004
6005
  green: "#00bb00",
@@ -6016,7 +6017,7 @@ var Za = {
6016
6017
  brightCyan: "#55ffff",
6017
6018
  brightWhite: "#ffffff"
6018
6019
  };
6019
- function qa(t = Za) {
6020
+ function Za(t = Wa) {
6020
6021
  function e(l) {
6021
6022
  return t[l];
6022
6023
  }
@@ -6057,7 +6058,7 @@ function qa(t = Za) {
6057
6058
  value: s
6058
6059
  };
6059
6060
  }
6060
- const Va = {
6061
+ const qa = {
6061
6062
  black: "#000000",
6062
6063
  red: "#cd3131",
6063
6064
  green: "#0DBC79",
@@ -6075,17 +6076,17 @@ const Va = {
6075
6076
  brightCyan: "#29B8DB",
6076
6077
  brightWhite: "#FFFFFF"
6077
6078
  };
6078
- function Ka(t, e, n) {
6079
+ function Va(t, e, n) {
6079
6080
  const r = je(t, n), o = Ze(e), i = Object.fromEntries(
6080
6081
  K.map((a) => {
6081
6082
  const c = `terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`, u = t.colors?.[c];
6082
- return [a, u || Va[a]];
6083
+ return [a, u || qa[a]];
6083
6084
  })
6084
- ), s = qa(i), l = Wa();
6085
+ ), s = Za(i), l = Ha();
6085
6086
  return o.map(
6086
6087
  (a) => l.parse(a[0]).map((c) => {
6087
6088
  let u, h;
6088
- c.decorations.has("reverse") ? (u = c.background ? s.value(c.background) : t.bg, h = c.foreground ? s.value(c.foreground) : t.fg) : (u = c.foreground ? s.value(c.foreground) : t.fg, h = c.background ? s.value(c.background) : void 0), u = W(u, r), h = W(h, r), c.decorations.has("dim") && (u = Ja(u));
6089
+ c.decorations.has("reverse") ? (u = c.background ? s.value(c.background) : t.bg, h = c.foreground ? s.value(c.foreground) : t.fg) : (u = c.foreground ? s.value(c.foreground) : t.fg, h = c.background ? s.value(c.background) : void 0), u = W(u, r), h = W(h, r), c.decorations.has("dim") && (u = Ka(u));
6089
6090
  let p = z.None;
6090
6091
  return c.decorations.has("bold") && (p |= z.Bold), c.decorations.has("italic") && (p |= z.Italic), c.decorations.has("underline") && (p |= z.Underline), c.decorations.has("strikethrough") && (p |= z.Strikethrough), {
6091
6092
  content: c.value,
@@ -6098,7 +6099,7 @@ function Ka(t, e, n) {
6098
6099
  })
6099
6100
  );
6100
6101
  }
6101
- function Ja(t) {
6102
+ function Ka(t) {
6102
6103
  const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/i);
6103
6104
  if (e)
6104
6105
  if (e[3]) {
@@ -6117,7 +6118,7 @@ function zt(t, e, n = {}) {
6117
6118
  return Ze(e).map((a) => [{ content: a[0], offset: a[1] }]);
6118
6119
  const { theme: i, colorMap: s } = t.setTheme(o);
6119
6120
  if (r === "ansi")
6120
- return Ka(i, e, n);
6121
+ return Va(i, e, n);
6121
6122
  const l = t.getLanguage(r);
6122
6123
  if (n.grammarState) {
6123
6124
  if (n.grammarState.lang !== l.name)
@@ -6125,9 +6126,9 @@ function zt(t, e, n = {}) {
6125
6126
  if (!n.grammarState.themes.includes(i.name))
6126
6127
  throw new A(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`);
6127
6128
  }
6128
- return Xa(e, l, i, s, n);
6129
+ return Ya(e, l, i, s, n);
6129
6130
  }
6130
- function Ya(...t) {
6131
+ function Ja(...t) {
6131
6132
  if (t.length === 2)
6132
6133
  return be(t[1]);
6133
6134
  const [e, n, r = {}] = t, {
@@ -6145,7 +6146,7 @@ function Ya(...t) {
6145
6146
  s.name
6146
6147
  );
6147
6148
  }
6148
- function Xa(t, e, n, r, o) {
6149
+ function Ya(t, e, n, r, o) {
6149
6150
  const i = Ge(t, e, n, r, o), s = new ue(
6150
6151
  Ge(t, e, n, r, o).stateStack,
6151
6152
  e.name,
@@ -6158,7 +6159,7 @@ function Ge(t, e, n, r, o) {
6158
6159
  tokenizeMaxLineLength: s = 0,
6159
6160
  tokenizeTimeLimit: l = 500
6160
6161
  } = o, a = Ze(t);
6161
- let c = o.grammarState ? ja(o.grammarState, n.name) ?? gt : o.grammarContextCode != null ? Ge(
6162
+ let c = o.grammarState ? $a(o.grammarState, n.name) ?? gt : o.grammarContextCode != null ? Ge(
6162
6163
  o.grammarContextCode,
6163
6164
  e,
6164
6165
  n,
@@ -6230,9 +6231,9 @@ function Ge(t, e, n, r, o) {
6230
6231
  );
6231
6232
  Bt += te.length, Je.explanation.push({
6232
6233
  content: te,
6233
- scopes: o.includeExplanation === "scopeName" ? Qa(
6234
+ scopes: o.includeExplanation === "scopeName" ? Xa(
6234
6235
  H.scopes
6235
- ) : el(
6236
+ ) : Qa(
6236
6237
  Dt,
6237
6238
  H.scopes
6238
6239
  )
@@ -6248,16 +6249,16 @@ function Ge(t, e, n, r, o) {
6248
6249
  stateStack: c
6249
6250
  };
6250
6251
  }
6251
- function Qa(t) {
6252
+ function Xa(t) {
6252
6253
  return t.map((e) => ({ scopeName: e }));
6253
6254
  }
6254
- function el(t, e) {
6255
+ function Qa(t, e) {
6255
6256
  const n = [];
6256
6257
  for (let r = 0, o = e.length; r < o; r++) {
6257
6258
  const i = e[r];
6258
6259
  n[r] = {
6259
6260
  scopeName: i,
6260
- themeMatches: nl(t, i, e.slice(0, r))
6261
+ themeMatches: tl(t, i, e.slice(0, r))
6261
6262
  };
6262
6263
  }
6263
6264
  return n;
@@ -6265,7 +6266,7 @@ function el(t, e) {
6265
6266
  function vn(t, e) {
6266
6267
  return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
6267
6268
  }
6268
- function tl(t, e, n) {
6269
+ function el(t, e, n) {
6269
6270
  if (!vn(t[t.length - 1], e))
6270
6271
  return !1;
6271
6272
  let r = t.length - 2, o = n.length - 1;
@@ -6273,11 +6274,11 @@ function tl(t, e, n) {
6273
6274
  vn(t[r], n[o]) && (r -= 1), o -= 1;
6274
6275
  return r === -1;
6275
6276
  }
6276
- function nl(t, e, n) {
6277
+ function tl(t, e, n) {
6277
6278
  const r = [];
6278
6279
  for (const { selectors: o, settings: i } of t)
6279
6280
  for (const s of o)
6280
- if (tl(s, e, n)) {
6281
+ if (el(s, e, n)) {
6281
6282
  r.push(i);
6282
6283
  break;
6283
6284
  }
@@ -6294,7 +6295,7 @@ function vr(t, e, n) {
6294
6295
  state: u,
6295
6296
  theme: h
6296
6297
  };
6297
- }), i = rl(
6298
+ }), i = nl(
6298
6299
  ...o.map((a) => a.tokens)
6299
6300
  ), s = i[0].map(
6300
6301
  (a, c) => a.map((u, h) => {
@@ -6319,7 +6320,7 @@ function vr(t, e, n) {
6319
6320
  ) : void 0;
6320
6321
  return l && qe(s, l), s;
6321
6322
  }
6322
- function rl(...t) {
6323
+ function nl(...t) {
6323
6324
  const e = t.map(() => []), n = t.length;
6324
6325
  for (let r = 0; r < t[0].length; r++) {
6325
6326
  const o = t.map((a) => a[r]), i = e.map(() => []);
@@ -6360,7 +6361,7 @@ function Ue(t, e, n) {
6360
6361
  if (a = be(d), c && It !== c && !p.find((y) => y.color === c))
6361
6362
  throw new A(`\`themes\` option must contain the defaultColor key \`${c}\``);
6362
6363
  const m = p.map((y) => t.getTheme(y.theme)), w = p.map((y) => y.color);
6363
- i = d.map((y) => y.map((g) => Ma(g, w, u, c, h))), a && qe(i, a);
6364
+ i = d.map((y) => y.map((g) => za(g, w, u, c, h))), a && qe(i, a);
6364
6365
  const b = p.map((y) => je(y.theme, n));
6365
6366
  o = Sn(p, m, b, u, c, "fg", h), r = Sn(p, m, b, u, c, "bg", h), s = `shiki-themes ${m.map((y) => y.name).join(" ")}`, l = c ? void 0 : [o, r].join(";");
6366
6367
  } else if ("theme" in n) {
@@ -6420,7 +6421,7 @@ function Fe(t, e, n, r = {
6420
6421
  mergeWhitespaces: h = !0,
6421
6422
  mergeSameStyleTokens: p = !1
6422
6423
  } = n;
6423
- h === !0 ? i = il(i) : h === "never" && (i = sl(i)), p && (i = al(i));
6424
+ h === !0 ? i = ol(i) : h === "never" && (i = il(i)), p && (i = sl(i));
6424
6425
  const d = {
6425
6426
  ...r,
6426
6427
  get source() {
@@ -6429,7 +6430,7 @@ function Fe(t, e, n, r = {
6429
6430
  };
6430
6431
  for (const m of Be(n))
6431
6432
  i = m.tokens?.call(d, i) || i;
6432
- return ol(
6433
+ return rl(
6433
6434
  i,
6434
6435
  {
6435
6436
  ...n,
@@ -6442,7 +6443,7 @@ function Fe(t, e, n, r = {
6442
6443
  u
6443
6444
  );
6444
6445
  }
6445
- function ol(t, e, n, r = be(t)) {
6446
+ function rl(t, e, n, r = be(t)) {
6446
6447
  const o = Be(e), i = [], s = {
6447
6448
  type: "root",
6448
6449
  children: []
@@ -6540,7 +6541,7 @@ function ol(t, e, n, r = be(t)) {
6540
6541
  d = m?.root?.call(p, d) || d;
6541
6542
  return r && qe(d, r), d;
6542
6543
  }
6543
- function il(t) {
6544
+ function ol(t) {
6544
6545
  return t.map((e) => {
6545
6546
  const n = [];
6546
6547
  let r = "", o = 0;
@@ -6560,7 +6561,7 @@ function il(t) {
6560
6561
  }), n;
6561
6562
  });
6562
6563
  }
6563
- function sl(t) {
6564
+ function il(t) {
6564
6565
  return t.map((e) => e.flatMap((n) => {
6565
6566
  if (n.content.match(/^\s+$/))
6566
6567
  return n;
@@ -6584,7 +6585,7 @@ function sl(t) {
6584
6585
  }), l;
6585
6586
  }));
6586
6587
  }
6587
- function al(t) {
6588
+ function sl(t) {
6588
6589
  return t.map((e) => {
6589
6590
  const n = [];
6590
6591
  for (const r of e) {
@@ -6598,15 +6599,15 @@ function al(t) {
6598
6599
  return n;
6599
6600
  });
6600
6601
  }
6601
- const ll = Ra;
6602
- function cl(t, e, n) {
6602
+ const al = Pa;
6603
+ function ll(t, e, n) {
6603
6604
  const r = {
6604
6605
  meta: {},
6605
6606
  options: n,
6606
6607
  codeToHast: (i, s) => Fe(t, i, s),
6607
6608
  codeToTokens: (i, s) => Ue(t, i, s)
6608
6609
  };
6609
- let o = ll(Fe(t, e, n, r));
6610
+ let o = al(Fe(t, e, n, r));
6610
6611
  for (const i of Be(n))
6611
6612
  o = i.postprocess?.call(r, o, n) || o;
6612
6613
  return o;
@@ -6682,16 +6683,16 @@ async function kr(t) {
6682
6683
  )
6683
6684
  )).filter((n) => !!n);
6684
6685
  }
6685
- let ul = 3;
6686
- function hl(t, e = 3) {
6687
- e > ul || console.trace(`[SHIKI DEPRECATE]: ${t}`);
6686
+ let cl = 3;
6687
+ function ul(t, e = 3) {
6688
+ e > cl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
6688
6689
  }
6689
6690
  let re = class extends Error {
6690
6691
  constructor(e) {
6691
6692
  super(e), this.name = "ShikiError";
6692
6693
  }
6693
6694
  };
6694
- class pl extends ds {
6695
+ class hl extends ps {
6695
6696
  constructor(e, n, r, o = {}) {
6696
6697
  super(e), this._resolver = e, this._themes = n, this._langs = r, this._alias = o, this._themes.map((i) => this.loadTheme(i)), this.loadLanguages(this._langs);
6697
6698
  }
@@ -6778,7 +6779,7 @@ class pl extends ds {
6778
6779
  this._langGraph.set(n, this._langMap.get(n));
6779
6780
  }
6780
6781
  }
6781
- class dl {
6782
+ class pl {
6782
6783
  _langs = /* @__PURE__ */ new Map();
6783
6784
  _scopeToLang = /* @__PURE__ */ new Map();
6784
6785
  _injections = /* @__PURE__ */ new Map();
@@ -6816,12 +6817,12 @@ class dl {
6816
6817
  }
6817
6818
  }
6818
6819
  let he = 0;
6819
- function ml(t) {
6820
+ function dl(t) {
6820
6821
  he += 1, t.warnings !== !1 && he >= 10 && he % 10 === 0 && console.warn(`[Shiki] ${he} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
6821
6822
  let e = !1;
6822
6823
  if (!t.engine)
6823
6824
  throw new re("`engine` option is required for synchronous mode");
6824
- const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(Mt), o = new dl(t.engine, n), i = new pl(o, r, n, t.langAlias);
6825
+ const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(Mt), o = new pl(t.engine, n), i = new hl(o, r, n, t.langAlias);
6825
6826
  let s;
6826
6827
  function l(g) {
6827
6828
  b();
@@ -6890,8 +6891,8 @@ function ml(t) {
6890
6891
  [Symbol.dispose]: y
6891
6892
  };
6892
6893
  }
6893
- async function fl(t) {
6894
- t.engine || hl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
6894
+ async function ml(t) {
6895
+ t.engine || ul("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
6895
6896
  const [
6896
6897
  e,
6897
6898
  n,
@@ -6901,29 +6902,29 @@ async function fl(t) {
6901
6902
  Sr(t.langs || []),
6902
6903
  t.engine
6903
6904
  ]);
6904
- return ml({
6905
+ return dl({
6905
6906
  ...t,
6906
6907
  themes: e,
6907
6908
  langs: n,
6908
6909
  engine: r
6909
6910
  });
6910
6911
  }
6911
- async function gl(t) {
6912
- const e = await fl(t);
6912
+ async function fl(t) {
6913
+ const e = await ml(t);
6913
6914
  return {
6914
- getLastGrammarState: (...n) => Ya(e, ...n),
6915
+ getLastGrammarState: (...n) => Ja(e, ...n),
6915
6916
  codeToTokensBase: (n, r) => zt(e, n, r),
6916
6917
  codeToTokensWithThemes: (n, r) => vr(e, n, r),
6917
6918
  codeToTokens: (n, r) => Ue(e, n, r),
6918
6919
  codeToHast: (n, r) => Fe(e, n, r),
6919
- codeToHtml: (n, r) => cl(e, n, r),
6920
+ codeToHtml: (n, r) => ll(e, n, r),
6920
6921
  getBundledLanguages: () => ({}),
6921
6922
  getBundledThemes: () => ({}),
6922
6923
  ...e,
6923
6924
  getInternalContext: () => e
6924
6925
  };
6925
6926
  }
6926
- function yl(t) {
6927
+ function gl(t) {
6927
6928
  const e = t.langs, n = t.themes, r = t.engine;
6928
6929
  async function o(i) {
6929
6930
  function s(h) {
@@ -6949,7 +6950,7 @@ function yl(t) {
6949
6950
  }
6950
6951
  return h;
6951
6952
  }
6952
- const a = (i.themes ?? []).map((h) => l(h)), c = (i.langs ?? []).map((h) => s(h)), u = await gl({
6953
+ const a = (i.themes ?? []).map((h) => l(h)), c = (i.langs ?? []).map((h) => s(h)), u = await fl({
6953
6954
  engine: i.engine ?? r(),
6954
6955
  ...i,
6955
6956
  themes: a,
@@ -6973,7 +6974,7 @@ function yl(t) {
6973
6974
  }
6974
6975
  return o;
6975
6976
  }
6976
- function _l(t) {
6977
+ function yl(t) {
6977
6978
  let e;
6978
6979
  async function n(r = {}) {
6979
6980
  if (e) {
@@ -6997,8 +6998,8 @@ function _l(t) {
6997
6998
  }
6998
6999
  return n;
6999
7000
  }
7000
- function bl(t, e) {
7001
- const n = _l(t);
7001
+ function _l(t, e) {
7002
+ const n = yl(t);
7002
7003
  async function r(o, i) {
7003
7004
  const s = await n({
7004
7005
  langs: [i.lang],
@@ -8384,10 +8385,10 @@ const Cr = [
8384
8385
  name: "Zig",
8385
8386
  import: (() => import("../zig-Vm0PO9wB.js"))
8386
8387
  }
8387
- ], wl = Object.fromEntries(Cr.map((t) => [t.id, t.import])), vl = Object.fromEntries(Cr.flatMap((t) => t.aliases?.map((e) => [e, t.import]) || [])), Sl = {
8388
- ...wl,
8389
- ...vl
8390
- }, kl = [
8388
+ ], bl = Object.fromEntries(Cr.map((t) => [t.id, t.import])), wl = Object.fromEntries(Cr.flatMap((t) => t.aliases?.map((e) => [e, t.import]) || [])), vl = {
8389
+ ...bl,
8390
+ ...wl
8391
+ }, Sl = [
8391
8392
  {
8392
8393
  id: "andromeeda",
8393
8394
  displayName: "Andromeeda",
@@ -8748,20 +8749,20 @@ const Cr = [
8748
8749
  type: "light",
8749
8750
  import: (() => import("../vitesse-light-CcmG315c.js"))
8750
8751
  }
8751
- ], Cl = Object.fromEntries(kl.map((t) => [t.id, t.import]));
8752
+ ], kl = Object.fromEntries(Sl.map((t) => [t.id, t.import]));
8752
8753
  class $t extends Error {
8753
8754
  constructor(e) {
8754
8755
  super(e), this.name = "ShikiError";
8755
8756
  }
8756
8757
  }
8757
- function Tl() {
8758
+ function Cl() {
8758
8759
  return 2147483648;
8759
8760
  }
8760
- function Pl() {
8761
+ function Tl() {
8761
8762
  return typeof performance < "u" ? performance.now() : Date.now();
8762
8763
  }
8763
- const Rl = (t, e) => t + (e - t % e) % e;
8764
- async function Al(t) {
8764
+ const Pl = (t, e) => t + (e - t % e) % e;
8765
+ async function Rl(t) {
8765
8766
  let e, n;
8766
8767
  const r = {};
8767
8768
  function o(d) {
@@ -8779,13 +8780,13 @@ async function Al(t) {
8779
8780
  function l(d) {
8780
8781
  const m = r.HEAPU8.length;
8781
8782
  d = d >>> 0;
8782
- const w = Tl();
8783
+ const w = Cl();
8783
8784
  if (d > w)
8784
8785
  return !1;
8785
8786
  for (let b = 1; b <= 4; b *= 2) {
8786
8787
  let y = m * (1 + 0.2 / b);
8787
8788
  y = Math.min(y, d + 100663296);
8788
- const g = Math.min(w, Rl(Math.max(d, y), 65536));
8789
+ const g = Math.min(w, Pl(Math.max(d, y), 65536));
8789
8790
  if (s(g))
8790
8791
  return !0;
8791
8792
  }
@@ -8824,7 +8825,7 @@ async function Al(t) {
8824
8825
  return d ? c(r.HEAPU8, d, m) : "";
8825
8826
  }
8826
8827
  const h = {
8827
- emscripten_get_now: Pl,
8828
+ emscripten_get_now: Tl,
8828
8829
  emscripten_memcpy_big: i,
8829
8830
  emscripten_resize_heap: l,
8830
8831
  fd_write: () => 0
@@ -8838,9 +8839,9 @@ async function Al(t) {
8838
8839
  }
8839
8840
  return await p(), r;
8840
8841
  }
8841
- var Nl = Object.defineProperty, El = (t, e, n) => e in t ? Nl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, N = (t, e, n) => El(t, typeof e != "symbol" ? e + "" : e, n);
8842
+ var Al = Object.defineProperty, Nl = (t, e, n) => e in t ? Al(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, N = (t, e, n) => Nl(t, typeof e != "symbol" ? e + "" : e, n);
8842
8843
  let L = null;
8843
- function xl(t) {
8844
+ function El(t) {
8844
8845
  throw new $t(t.UTF8ToString(t.getLastOnigError()));
8845
8846
  }
8846
8847
  class Ve {
@@ -8903,7 +8904,7 @@ N(Ke, "LAST_ID", 0);
8903
8904
  N(Ke, "_sharedPtr", 0);
8904
8905
  N(Ke, "_sharedPtrInUse", !1);
8905
8906
  let Tr = Ke;
8906
- class Ll {
8907
+ class xl {
8907
8908
  constructor(e) {
8908
8909
  if (N(this, "_onigBinding"), N(this, "_ptr"), !L)
8909
8910
  throw new $t("Must invoke loadWasm first.");
@@ -8919,7 +8920,7 @@ class Ll {
8919
8920
  const s = L.createOnigScanner(o, i, e.length);
8920
8921
  for (let l = 0, a = e.length; l < a; l++)
8921
8922
  L.ofree(n[l]);
8922
- L.ofree(i), L.ofree(o), s === 0 && xl(L), this._onigBinding = L, this._ptr = s;
8923
+ L.ofree(i), L.ofree(o), s === 0 && El(L), this._onigBinding = L, this._ptr = s;
8923
8924
  }
8924
8925
  dispose() {
8925
8926
  this._onigBinding.freeOnigScanner(this._ptr);
@@ -8954,29 +8955,29 @@ class Ll {
8954
8955
  };
8955
8956
  }
8956
8957
  }
8957
- function Ol(t) {
8958
+ function Ll(t) {
8958
8959
  return typeof t.instantiator == "function";
8959
8960
  }
8960
- function Il(t) {
8961
+ function Ol(t) {
8961
8962
  return typeof t.default == "function";
8962
8963
  }
8963
- function zl(t) {
8964
+ function Il(t) {
8964
8965
  return typeof t.data < "u";
8965
8966
  }
8966
- function Ml(t) {
8967
+ function zl(t) {
8967
8968
  return typeof Response < "u" && t instanceof Response;
8968
8969
  }
8969
- function $l(t) {
8970
+ function Ml(t) {
8970
8971
  return typeof ArrayBuffer < "u" && (t instanceof ArrayBuffer || ArrayBuffer.isView(t)) || typeof Buffer < "u" && Buffer.isBuffer?.(t) || typeof SharedArrayBuffer < "u" && t instanceof SharedArrayBuffer || typeof Uint32Array < "u" && t instanceof Uint32Array;
8971
8972
  }
8972
8973
  let Ae;
8973
- function jl(t) {
8974
+ function $l(t) {
8974
8975
  if (Ae)
8975
8976
  return Ae;
8976
8977
  async function e() {
8977
- L = await Al(async (n) => {
8978
+ L = await Rl(async (n) => {
8978
8979
  let r = t;
8979
- return r = await r, typeof r == "function" && (r = await r(n)), typeof r == "function" && (r = await r(n)), Ol(r) ? r = await r.instantiator(n) : Il(r) ? r = await r.default(n) : (zl(r) && (r = r.data), Ml(r) ? typeof WebAssembly.instantiateStreaming == "function" ? r = await Dl(r)(n) : r = await Bl(r)(n) : $l(r) ? r = await st(r)(n) : r instanceof WebAssembly.Module ? r = await st(r)(n) : "default" in r && r.default instanceof WebAssembly.Module && (r = await st(r.default)(n))), "instance" in r && (r = r.instance), "exports" in r && (r = r.exports), r;
8980
+ return r = await r, typeof r == "function" && (r = await r(n)), typeof r == "function" && (r = await r(n)), Ll(r) ? r = await r.instantiator(n) : Ol(r) ? r = await r.default(n) : (Il(r) && (r = r.data), zl(r) ? typeof WebAssembly.instantiateStreaming == "function" ? r = await jl(r)(n) : r = await Dl(r)(n) : Ml(r) ? r = await st(r)(n) : r instanceof WebAssembly.Module ? r = await st(r)(n) : "default" in r && r.default instanceof WebAssembly.Module && (r = await st(r.default)(n))), "instance" in r && (r = r.instance), "exports" in r && (r = r.exports), r;
8980
8981
  });
8981
8982
  }
8982
8983
  return Ae = e(), Ae;
@@ -8984,46 +8985,46 @@ function jl(t) {
8984
8985
  function st(t) {
8985
8986
  return (e) => WebAssembly.instantiate(t, e);
8986
8987
  }
8987
- function Dl(t) {
8988
+ function jl(t) {
8988
8989
  return (e) => WebAssembly.instantiateStreaming(t, e);
8989
8990
  }
8990
- function Bl(t) {
8991
+ function Dl(t) {
8991
8992
  return async (e) => {
8992
8993
  const n = await t.arrayBuffer();
8993
8994
  return WebAssembly.instantiate(n, e);
8994
8995
  };
8995
8996
  }
8996
- async function Gl(t) {
8997
- return t && await jl(t), {
8997
+ async function Bl(t) {
8998
+ return t && await $l(t), {
8998
8999
  createScanner(e) {
8999
- return new Ll(e.map((n) => typeof n == "string" ? n : n.source));
9000
+ return new xl(e.map((n) => typeof n == "string" ? n : n.source));
9000
9001
  },
9001
9002
  createString(e) {
9002
9003
  return new Tr(e);
9003
9004
  }
9004
9005
  };
9005
9006
  }
9006
- const Ul = /* @__PURE__ */ yl({
9007
- langs: Sl,
9008
- themes: Cl,
9009
- engine: () => Gl(import("../wasm-DQxwEHae.js"))
9007
+ const Gl = /* @__PURE__ */ gl({
9008
+ langs: vl,
9009
+ themes: kl,
9010
+ engine: () => Bl(import("../wasm-DQxwEHae.js"))
9010
9011
  }), {
9011
9012
  codeToHtml: Pn
9012
- } = /* @__PURE__ */ bl(
9013
- Ul,
9014
- { guessEmbeddedLanguages: La }
9015
- ), Fl = ri({
9013
+ } = /* @__PURE__ */ _l(
9014
+ Gl,
9015
+ { guessEmbeddedLanguages: xa }
9016
+ ), Ul = ri({
9016
9017
  mode: jn(["html", "svelte", "react"]),
9017
9018
  include: Xe().optional(),
9018
9019
  exclude: Xe().optional(),
9019
9020
  shikiOptions: Xe().optional()
9020
9021
  }), Rn = {
9021
- html: Ti,
9022
- svelte: Pi,
9023
- react: Ri
9022
+ html: Ci,
9023
+ svelte: Ti,
9024
+ react: Pi
9024
9025
  };
9025
9026
  function Vl(t) {
9026
- const e = Fl.parse(t), { include: n, exclude: r, mode: o, shikiOptions: i } = e, s = Ar(n, r), l = {
9027
+ const e = Ul.parse(t), { include: n, exclude: r, mode: o, shikiOptions: i } = e, s = Ar(n, r), l = {
9027
9028
  themes: { light: "github-light", dark: "github-dark" },
9028
9029
  ...i
9029
9030
  }, a = (u) => u.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&#x27;/g, "'").replace(/&#x2F;/g, "/").replace(/&#x60;/g, "`").replace(/&#(\d+);/g, (h, p) => String.fromCharCode(p)).replace(/&#x([0-9a-fA-F]+);/g, (h, p) => String.fromCharCode(parseInt(p, 16))), c = async (u) => {
@@ -9062,7 +9063,7 @@ function Vl(t) {
9062
9063
  async load(u) {
9063
9064
  if (s(u))
9064
9065
  try {
9065
- const { readFile: h } = await import("node:fs/promises"), p = await h(u, "utf-8"), d = nn(p), m = a(await c(d.html));
9066
+ const { readFile: h } = await import("node:fs/promises"), p = await h(u, "utf-8"), d = Gt(p), m = a(await c(d.html));
9066
9067
  return Rn[o]({ ...d, html: m });
9067
9068
  } catch (h) {
9068
9069
  this.error(new Error(`Failed to parse norg file ${u}: ${h}`));
@@ -9073,7 +9074,7 @@ function Vl(t) {
9073
9074
  const h = u.read;
9074
9075
  u.read = async function() {
9075
9076
  try {
9076
- const p = await h(), d = nn(p), m = a(await c(d.html));
9077
+ const p = await h(), d = Gt(p), m = a(await c(d.html));
9077
9078
  return Rn[o]({ ...d, html: m });
9078
9079
  } catch (p) {
9079
9080
  throw new Error(`Failed to parse norg file ${u.file}: ${p}`);