superdoc 0.35.3 → 0.36.1

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.
Files changed (47) hide show
  1. package/dist/chunks/{PdfViewer-C2woiqSD.es.js → PdfViewer-0ljQHJ46.es.js} +2 -2
  2. package/dist/chunks/{PdfViewer-cKeULrJD.cjs → PdfViewer-S16P3o_7.cjs} +2 -2
  3. package/dist/chunks/{eventemitter3-DmHNHvFX.cjs → eventemitter3-Cq0SNNyY.cjs} +1 -1
  4. package/dist/chunks/{eventemitter3-hYlnBzSA.es.js → eventemitter3-Dggxln8t.es.js} +1 -1
  5. package/dist/chunks/{index-CUb1VdVb-BOiRrEoQ.es.js → index-CzkLnJsZ-BTVdUMdV.es.js} +1 -1
  6. package/dist/chunks/{index-CUb1VdVb-Dn-WH3X_.cjs → index-CzkLnJsZ-BgswlBSf.cjs} +1 -1
  7. package/dist/chunks/{index-BLV0gVBb.cjs → index-D3qTp4tj.cjs} +32 -17
  8. package/dist/chunks/{index-qCXNfgIE.es.js → index-DzR1O6RL.es.js} +32 -17
  9. package/dist/chunks/{jszip-jKrsZoMS.es.js → jszip-CY0q2Bnp.es.js} +1 -1
  10. package/dist/chunks/{jszip-BP2FTbpi.cjs → jszip-F-dEByfH.cjs} +1 -1
  11. package/dist/chunks/{super-editor.es-FtM9y9Xi.cjs → super-editor.es-DVKZ65HN.cjs} +2240 -1699
  12. package/dist/chunks/{super-editor.es-C-FCfUaM.es.js → super-editor.es-D_ayGwNx.es.js} +2193 -1652
  13. package/dist/chunks/{vue-Cwv-wUpm.cjs → vue-dM1GiXsI.cjs} +2488 -2423
  14. package/dist/chunks/{vue-CKmzTNVs.es.js → vue-siHYWVb6.es.js} +2488 -2423
  15. package/dist/chunks/xml-js-DY0nfayl.cjs +3 -0
  16. package/dist/chunks/xml-js-lhjyYB16.es.js +2 -0
  17. package/dist/packages/superdoc/src/core/SuperDoc.d.ts +5 -2
  18. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  19. package/dist/packages/superdoc/src/core/types/index.d.ts +37 -2
  20. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  21. package/dist/style.css +37 -33
  22. package/dist/super-editor/ai-writer.es.js +2 -2
  23. package/dist/super-editor/chunks/{converter-DCcuo33v.js → converter-C_m22GDt.js} +311 -292
  24. package/dist/super-editor/chunks/{docx-zipper-BmJ2rJSz.js → docx-zipper-BMFQCW01.js} +1 -1
  25. package/dist/super-editor/chunks/{editor-CyldDVIe.js → editor-DOp2dsXA.js} +1496 -968
  26. package/dist/super-editor/chunks/{index-CUb1VdVb.js → index-CzkLnJsZ.js} +1 -1
  27. package/dist/super-editor/chunks/{toolbar-CO92tGD-.js → toolbar-VEU6sWSR.js} +2 -2
  28. package/dist/super-editor/converter.es.js +1 -1
  29. package/dist/super-editor/docx-zipper.es.js +2 -2
  30. package/dist/super-editor/editor.es.js +3 -3
  31. package/dist/super-editor/file-zipper.es.js +1 -1
  32. package/dist/super-editor/style.css +10 -6
  33. package/dist/super-editor/super-editor/src/core/Editor.d.ts +29 -4
  34. package/dist/super-editor/super-editor/src/core/Editor.d.ts.map +1 -1
  35. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +5 -2
  36. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
  37. package/dist/super-editor/super-editor.es.js +32 -28
  38. package/dist/super-editor/toolbar.es.js +2 -2
  39. package/dist/super-editor.cjs +2 -2
  40. package/dist/super-editor.es.js +2 -2
  41. package/dist/superdoc.cjs +2 -2
  42. package/dist/superdoc.es.js +2 -2
  43. package/dist/superdoc.umd.js +2691 -2077
  44. package/dist/superdoc.umd.js.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunks/xml-js-BSDu25I7.cjs +0 -3
  47. package/dist/chunks/xml-js-CBrRls0f.es.js +0 -2
@@ -413,17 +413,17 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
413
413
  );
414
414
  }
415
415
  if (a === b2) return 0;
416
- let x = a.length;
416
+ let x2 = a.length;
417
417
  let y2 = b2.length;
418
- for (let i = 0, len = Math.min(x, y2); i < len; ++i) {
418
+ for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
419
419
  if (a[i] !== b2[i]) {
420
- x = a[i];
420
+ x2 = a[i];
421
421
  y2 = b2[i];
422
422
  break;
423
423
  }
424
424
  }
425
- if (x < y2) return -1;
426
- if (y2 < x) return 1;
425
+ if (x2 < y2) return -1;
426
+ if (y2 < x2) return 1;
427
427
  return 0;
428
428
  };
429
429
  Buffer3.isEncoding = function isEncoding(encoding) {
@@ -672,20 +672,20 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
672
672
  thisStart >>>= 0;
673
673
  thisEnd >>>= 0;
674
674
  if (this === target) return 0;
675
- let x = thisEnd - thisStart;
675
+ let x2 = thisEnd - thisStart;
676
676
  let y2 = end - start;
677
- const len = Math.min(x, y2);
677
+ const len = Math.min(x2, y2);
678
678
  const thisCopy = this.slice(thisStart, thisEnd);
679
679
  const targetCopy = target.slice(start, end);
680
680
  for (let i = 0; i < len; ++i) {
681
681
  if (thisCopy[i] !== targetCopy[i]) {
682
- x = thisCopy[i];
682
+ x2 = thisCopy[i];
683
683
  y2 = targetCopy[i];
684
684
  break;
685
685
  }
686
686
  }
687
- if (x < y2) return -1;
688
- if (y2 < x) return 1;
687
+ if (x2 < y2) return -1;
688
+ if (y2 < x2) return 1;
689
689
  return 0;
690
690
  };
691
691
  function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
@@ -1775,8 +1775,8 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
1775
1775
  })(buffer);
1776
1776
  const Buffer2 = buffer.Buffer;
1777
1777
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1778
- function getDefaultExportFromCjs$2(x) {
1779
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1778
+ function getDefaultExportFromCjs$2(x2) {
1779
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1780
1780
  }
1781
1781
  var sax = {};
1782
1782
  var events = { exports: {} };
@@ -1784,13 +1784,13 @@ var hasRequiredEvents;
1784
1784
  function requireEvents() {
1785
1785
  if (hasRequiredEvents) return events.exports;
1786
1786
  hasRequiredEvents = 1;
1787
- var R2 = typeof Reflect === "object" ? Reflect : null;
1788
- var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
1787
+ var R = typeof Reflect === "object" ? Reflect : null;
1788
+ var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
1789
1789
  return Function.prototype.apply.call(target, receiver, args);
1790
1790
  };
1791
1791
  var ReflectOwnKeys;
1792
- if (R2 && typeof R2.ownKeys === "function") {
1793
- ReflectOwnKeys = R2.ownKeys;
1792
+ if (R && typeof R.ownKeys === "function") {
1793
+ ReflectOwnKeys = R.ownKeys;
1794
1794
  } else if (Object.getOwnPropertySymbols) {
1795
1795
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
1796
1796
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -2180,8 +2180,8 @@ function requireInherits_browser() {
2180
2180
  }
2181
2181
  return inherits_browser.exports;
2182
2182
  }
2183
- function getDefaultExportFromCjs$1(x) {
2184
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2183
+ function getDefaultExportFromCjs$1(x2) {
2184
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
2185
2185
  }
2186
2186
  var browser$1 = { exports: {} };
2187
2187
  var process = browser$1.exports = {};
@@ -2762,17 +2762,17 @@ function requireDist() {
2762
2762
  );
2763
2763
  }
2764
2764
  if (a === b2) return 0;
2765
- let x = a.length;
2765
+ let x2 = a.length;
2766
2766
  let y2 = b2.length;
2767
- for (let i2 = 0, len2 = Math.min(x, y2); i2 < len2; ++i2) {
2767
+ for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
2768
2768
  if (a[i2] !== b2[i2]) {
2769
- x = a[i2];
2769
+ x2 = a[i2];
2770
2770
  y2 = b2[i2];
2771
2771
  break;
2772
2772
  }
2773
2773
  }
2774
- if (x < y2) return -1;
2775
- if (y2 < x) return 1;
2774
+ if (x2 < y2) return -1;
2775
+ if (y2 < x2) return 1;
2776
2776
  return 0;
2777
2777
  };
2778
2778
  Buffer4.isEncoding = function isEncoding(encoding) {
@@ -3021,20 +3021,20 @@ function requireDist() {
3021
3021
  thisStart >>>= 0;
3022
3022
  thisEnd >>>= 0;
3023
3023
  if (this === target) return 0;
3024
- let x = thisEnd - thisStart;
3024
+ let x2 = thisEnd - thisStart;
3025
3025
  let y2 = end - start;
3026
- const len2 = Math.min(x, y2);
3026
+ const len2 = Math.min(x2, y2);
3027
3027
  const thisCopy = this.slice(thisStart, thisEnd);
3028
3028
  const targetCopy = target.slice(start, end);
3029
3029
  for (let i2 = 0; i2 < len2; ++i2) {
3030
3030
  if (thisCopy[i2] !== targetCopy[i2]) {
3031
- x = thisCopy[i2];
3031
+ x2 = thisCopy[i2];
3032
3032
  y2 = targetCopy[i2];
3033
3033
  break;
3034
3034
  }
3035
3035
  }
3036
- if (x < y2) return -1;
3037
- if (y2 < x) return 1;
3036
+ if (x2 < y2) return -1;
3037
+ if (y2 < x2) return 1;
3038
3038
  return 0;
3039
3039
  };
3040
3040
  function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
@@ -4606,15 +4606,15 @@ function requireGetProto() {
4606
4606
  var reflectGetProto = requireReflect_getPrototypeOf();
4607
4607
  var originalGetProto = requireObject_getPrototypeOf();
4608
4608
  var getDunderProto = /* @__PURE__ */ requireGet();
4609
- getProto = reflectGetProto ? function getProto2(O2) {
4610
- return reflectGetProto(O2);
4611
- } : originalGetProto ? function getProto2(O2) {
4612
- if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
4609
+ getProto = reflectGetProto ? function getProto2(O) {
4610
+ return reflectGetProto(O);
4611
+ } : originalGetProto ? function getProto2(O) {
4612
+ if (!O || typeof O !== "object" && typeof O !== "function") {
4613
4613
  throw new TypeError("getProto: not an object");
4614
4614
  }
4615
- return originalGetProto(O2);
4616
- } : getDunderProto ? function getProto2(O2) {
4617
- return getDunderProto(O2);
4615
+ return originalGetProto(O);
4616
+ } : getDunderProto ? function getProto2(O) {
4617
+ return getDunderProto(O);
4618
4618
  } : null;
4619
4619
  return getProto;
4620
4620
  }
@@ -5282,18 +5282,18 @@ function requireForEach() {
5282
5282
  }
5283
5283
  };
5284
5284
  var forEachObject = function forEachObject2(object, iterator, receiver) {
5285
- for (var k in object) {
5286
- if (hasOwnProperty.call(object, k)) {
5285
+ for (var k2 in object) {
5286
+ if (hasOwnProperty.call(object, k2)) {
5287
5287
  if (receiver == null) {
5288
- iterator(object[k], k, object);
5288
+ iterator(object[k2], k2, object);
5289
5289
  } else {
5290
- iterator.call(receiver, object[k], k, object);
5290
+ iterator.call(receiver, object[k2], k2, object);
5291
5291
  }
5292
5292
  }
5293
5293
  }
5294
5294
  };
5295
- function isArray(x) {
5296
- return toStr.call(x) === "[object Array]";
5295
+ function isArray(x2) {
5296
+ return toStr.call(x2) === "[object Array]";
5297
5297
  }
5298
5298
  forEach = function forEach2(list, iterator, thisArg) {
5299
5299
  if (!isCallable2(iterator)) {
@@ -5902,10 +5902,10 @@ function requireUtil() {
5902
5902
  var i = 1;
5903
5903
  var args = arguments;
5904
5904
  var len = args.length;
5905
- var str = String(f).replace(formatRegExp, function(x2) {
5906
- if (x2 === "%%") return "%";
5907
- if (i >= len) return x2;
5908
- switch (x2) {
5905
+ var str = String(f).replace(formatRegExp, function(x3) {
5906
+ if (x3 === "%%") return "%";
5907
+ if (i >= len) return x3;
5908
+ switch (x3) {
5909
5909
  case "%s":
5910
5910
  return String(args[i++]);
5911
5911
  case "%d":
@@ -5917,14 +5917,14 @@ function requireUtil() {
5917
5917
  return "[Circular]";
5918
5918
  }
5919
5919
  default:
5920
- return x2;
5920
+ return x3;
5921
5921
  }
5922
5922
  });
5923
- for (var x = args[i]; i < len; x = args[++i]) {
5924
- if (isNull(x) || !isObject(x)) {
5925
- str += " " + x;
5923
+ for (var x2 = args[i]; i < len; x2 = args[++i]) {
5924
+ if (isNull(x2) || !isObject(x2)) {
5925
+ str += " " + x2;
5926
5926
  } else {
5927
- str += " " + inspect(x);
5927
+ str += " " + inspect(x2);
5928
5928
  }
5929
5929
  }
5930
5930
  return str;
@@ -7489,6 +7489,7 @@ function require_stream_duplex() {
7489
7489
  }
7490
7490
  var string_decoder = {};
7491
7491
  var safeBuffer = { exports: {} };
7492
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
7492
7493
  var hasRequiredSafeBuffer;
7493
7494
  function requireSafeBuffer() {
7494
7495
  if (hasRequiredSafeBuffer) return safeBuffer.exports;
@@ -7510,6 +7511,7 @@ function requireSafeBuffer() {
7510
7511
  function SafeBuffer(arg, encodingOrOffset, length) {
7511
7512
  return Buffer3(arg, encodingOrOffset, length);
7512
7513
  }
7514
+ SafeBuffer.prototype = Object.create(Buffer3.prototype);
7513
7515
  copyProps(Buffer3, SafeBuffer);
7514
7516
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
7515
7517
  if (typeof arg === "number") {
@@ -8787,9 +8789,9 @@ function require_stream_readable() {
8787
8789
  return from(Readable, iterable, opts);
8788
8790
  };
8789
8791
  }
8790
- function indexOf(xs, x) {
8792
+ function indexOf(xs, x2) {
8791
8793
  for (var i = 0, l3 = xs.length; i < l3; i++) {
8792
- if (xs[i] === x) return i;
8794
+ if (xs[i] === x2) return i;
8793
8795
  }
8794
8796
  return -1;
8795
8797
  }
@@ -9247,27 +9249,27 @@ function requireSax() {
9247
9249
  this._parser = new SAXParser(strict, opt);
9248
9250
  this.writable = true;
9249
9251
  this.readable = true;
9250
- var me = this;
9252
+ var me2 = this;
9251
9253
  this._parser.onend = function() {
9252
- me.emit("end");
9254
+ me2.emit("end");
9253
9255
  };
9254
9256
  this._parser.onerror = function(er) {
9255
- me.emit("error", er);
9256
- me._parser.error = null;
9257
+ me2.emit("error", er);
9258
+ me2._parser.error = null;
9257
9259
  };
9258
9260
  this._decoder = null;
9259
9261
  streamWraps.forEach(function(ev) {
9260
- Object.defineProperty(me, "on" + ev, {
9262
+ Object.defineProperty(me2, "on" + ev, {
9261
9263
  get: function() {
9262
- return me._parser["on" + ev];
9264
+ return me2._parser["on" + ev];
9263
9265
  },
9264
- set: function(h2) {
9265
- if (!h2) {
9266
- me.removeAllListeners(ev);
9267
- me._parser["on" + ev] = h2;
9268
- return h2;
9266
+ set: function(h) {
9267
+ if (!h) {
9268
+ me2.removeAllListeners(ev);
9269
+ me2._parser["on" + ev] = h;
9270
+ return h;
9269
9271
  }
9270
- me.on(ev, h2);
9272
+ me2.on(ev, h);
9271
9273
  },
9272
9274
  enumerable: true,
9273
9275
  configurable: false
@@ -9299,15 +9301,15 @@ function requireSax() {
9299
9301
  return true;
9300
9302
  };
9301
9303
  SAXStream.prototype.on = function(ev, handler2) {
9302
- var me = this;
9303
- if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9304
- me._parser["on" + ev] = function() {
9304
+ var me2 = this;
9305
+ if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9306
+ me2._parser["on" + ev] = function() {
9305
9307
  var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
9306
9308
  args.splice(0, 0, ev);
9307
- me.emit.apply(me, args);
9309
+ me2.emit.apply(me2, args);
9308
9310
  };
9309
9311
  }
9310
- return Stream.prototype.on.call(me, ev, handler2);
9312
+ return Stream.prototype.on.call(me2, ev, handler2);
9311
9313
  };
9312
9314
  var CDATA = "[CDATA[";
9313
9315
  var DOCTYPE = "DOCTYPE";
@@ -9899,9 +9901,9 @@ function requireSax() {
9899
9901
  var tag = parser.tag = parser.tags.pop();
9900
9902
  parser.tagName = parser.tag.name;
9901
9903
  emitNode(parser, "onclosetag", parser.tagName);
9902
- var x = {};
9904
+ var x2 = {};
9903
9905
  for (var i in tag.ns) {
9904
- x[i] = tag.ns[i];
9906
+ x2[i] = tag.ns[i];
9905
9907
  }
9906
9908
  var parent = parser.tags[parser.tags.length - 1] || parser;
9907
9909
  if (parser.opt.xmlns && tag.ns !== parent.ns) {
@@ -10958,8 +10960,8 @@ function requireXml2json() {
10958
10960
  js = xml2js2(xml, options);
10959
10961
  parentKey = "compact" in options && options.compact ? "_parent" : "parent";
10960
10962
  if ("addParent" in options && options.addParent) {
10961
- json = JSON.stringify(js, function(k, v2) {
10962
- return k === parentKey ? "_" : v2;
10963
+ json = JSON.stringify(js, function(k2, v2) {
10964
+ return k2 === parentKey ? "_" : v2;
10963
10965
  }, options.spaces);
10964
10966
  } else {
10965
10967
  json = JSON.stringify(js, null, options.spaces);
@@ -11381,8 +11383,8 @@ function v4(options, buf, offset) {
11381
11383
  rnds[8] = rnds[8] & 63 | 128;
11382
11384
  return unsafeStringify(rnds);
11383
11385
  }
11384
- function getDefaultExportFromCjs(x) {
11385
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
11386
+ function getDefaultExportFromCjs(x2) {
11387
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
11386
11388
  }
11387
11389
  const CRC_TABLE = new Int32Array([
11388
11390
  0,
@@ -15198,8 +15200,8 @@ function polygonToObj(polygonNode) {
15198
15200
  const points = [];
15199
15201
  polygonNode.elements.forEach((element) => {
15200
15202
  if (["wp:start", "wp:lineTo"].includes(element.name)) {
15201
- const { x, y: y2 } = element.attributes;
15202
- points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15203
+ const { x: x2, y: y2 } = element.attributes;
15204
+ points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
15203
15205
  }
15204
15206
  });
15205
15207
  if (points.length > 1) {
@@ -15222,13 +15224,13 @@ function objToPolygon(points) {
15222
15224
  elements: []
15223
15225
  };
15224
15226
  points.forEach((point, index2) => {
15225
- const [x, y2] = point;
15227
+ const [x2, y2] = point;
15226
15228
  const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15227
15229
  const pointNode = {
15228
15230
  name: tagName,
15229
15231
  type: tagName,
15230
15232
  attributes: {
15231
- x: pixelsToPolygonUnits(x),
15233
+ x: pixelsToPolygonUnits(x2),
15232
15234
  y: pixelsToPolygonUnits(y2)
15233
15235
  }
15234
15236
  };
@@ -22893,7 +22895,7 @@ function posToDOMRect(view, from, to) {
22893
22895
  const right = Math.max(start.right, end.right);
22894
22896
  const width = right - left;
22895
22897
  const height = bottom - top;
22896
- const x = left;
22898
+ const x2 = left;
22897
22899
  const y2 = top;
22898
22900
  const data = {
22899
22901
  top,
@@ -22902,7 +22904,7 @@ function posToDOMRect(view, from, to) {
22902
22904
  right,
22903
22905
  width,
22904
22906
  height,
22905
- x,
22907
+ x: x2,
22906
22908
  y: y2
22907
22909
  };
22908
22910
  return {
@@ -22991,25 +22993,31 @@ function createDocFromHTML(content, schema, options = {}) {
22991
22993
  function L() {
22992
22994
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
22993
22995
  }
22994
- var O = L();
22996
+ var T = L();
22995
22997
  function G(l3) {
22996
- O = l3;
22998
+ T = l3;
22997
22999
  }
22998
23000
  var E = { exec: () => null };
22999
- function h(l3, e = "") {
23001
+ function d(l3, e = "") {
23000
23002
  let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
23001
23003
  let s = typeof i == "string" ? i : i.source;
23002
23004
  return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
23003
23005
  }, getRegex: () => new RegExp(t, e) };
23004
23006
  return n;
23005
23007
  }
23006
- var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, xe = /^(?:[ \t]*(?:\n|$))+/, be = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Re = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, j = /(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).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/).replace(/\|table/g, "").getRegex(), Te = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).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/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), F = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, we = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ye = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Pe = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, j).getRegex(), v = "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", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Se = h("^ {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", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = h(F).replace("hr", C).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", v).getRegex(), $e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), K = { blockquote: $e, code: be, def: ye, fences: Re, heading: Oe, hr: C, html: Se, lheading: ie, list: Pe, newline: xe, paragraph: oe, table: E, text: we }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\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", v).getRegex(), _e = { ...K, lheading: Te, table: re, paragraph: h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).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", v).getRegex() }, Le = { ...K, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).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: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(F).replace("hr", C).replace("heading", ` *#{1,6} *[^
23007
- ]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Me = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, le = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ue = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Ie = /(?:[^\s\p{P}\p{S}]|~)/u, Be = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, qe = h(pe, "u").replace(/punct/g, D).getRegex(), ve = h(pe, "u").replace(/punct/g, ue).getRegex(), ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h(ce, "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), He = h(ce, "gu").replace(/notPunctSpace/g, Ie).replace(/punctSpace/g, Ce).replace(/punct/g, ue).getRegex(), Ze = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Ne = h(/^<(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(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Fe = h("^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", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/, Qe = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), he$3 = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), de = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ue = h("reflink|nolink(?!\\()", "g").replace("reflink", he$3).replace("nolink", de).getRegex(), X = { _backpedal: E, anyPunctuation: Ge, autolink: Ne, blockSkip: Be, br: ae, code: ze, del: E, emStrongLDelim: qe, emStrongRDelimAst: De, emStrongRDelimUnd: Ze, escape: Me, link: Qe, nolink: de, punctuation: Ee, reflink: he$3, reflinkSearch: Ue, tag: Fe, text: Ae, url: E }, Ke = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: He, emStrongLDelim: ve, url: h(/^((?: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\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.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, We = { ...N, br: h(ae).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: K, gfm: _e, pedantic: Le }, M = { normal: X, gfm: N, breaks: We, pedantic: Ke };
23008
- var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
23008
+ var be = (() => {
23009
+ try {
23010
+ return !!new RegExp("(?<=1)(?<!1)");
23011
+ } catch {
23012
+ return false;
23013
+ }
23014
+ })(), m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Oe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).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/).replace(/\|table/g, "").getRegex(), ye = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).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/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $e = d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), v = "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", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _e = d("^ {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", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = d(j).replace("hr", I).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", v).getRegex(), Le = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K = { blockquote: Le, code: Te, def: Se, fences: Oe, heading: we, hr: I, html: _e, lheading: oe, list: $e, newline: Re, paragraph: ae, table: E, text: Pe }, re = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\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", v).getRegex(), Me = { ...K, lheading: ye, table: re, paragraph: d(j).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).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", v).getRegex() }, ze = { ...K, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).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: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(j).replace("hr", I).replace("heading", ` *#{1,6} *[^
23015
+ ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ee = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, le = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ue = /[^\s\p{P}\p{S}]/u, Ce = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, qe = /(?:[^\s\p{P}\p{S}]|~)/u, ve = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, De = d(ce, "u").replace(/punct/g, D).getRegex(), He = d(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = d(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = d(he$3, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, Be).replace(/punct/g, pe).getRegex(), Ne = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Fe = d(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), je = d(/^<(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(), Qe = d(U).replace("(?:-->|$)", "-->").getRegex(), Ue = d("^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", Qe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ke = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = d(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), We = d("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: E, anyPunctuation: Fe, autolink: je, blockSkip: ve, br: le, code: Ee, del: E, emStrongLDelim: De, emStrongRDelimAst: Ze, emStrongRDelimUnd: Ne, escape: Ae, link: Ke, nolink: ke, punctuation: Ce, reflink: de, reflinkSearch: We, tag: Ue, text: Ie, url: E }, Xe = { ...X, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ge, emStrongLDelim: He, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).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\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() }, Je = { ...N, br: d(le).replace("{2,}", "*").getRegex(), text: d(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Me, pedantic: ze }, M = { normal: X, gfm: N, breaks: Je, pedantic: Xe };
23016
+ var Ve = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (l3) => Ve[l3];
23009
23017
  function w(l3, e) {
23010
23018
  if (e) {
23011
- if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
23012
- } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
23019
+ if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ge);
23020
+ } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ge);
23013
23021
  return l3;
23014
23022
  }
23015
23023
  function J(l3) {
@@ -23021,10 +23029,10 @@ function J(l3) {
23021
23029
  return l3;
23022
23030
  }
23023
23031
  function V(l3, e) {
23024
- let t = l3.replace(m.findPipe, (i, s, o) => {
23025
- let a = false, u = s;
23026
- for (; --u >= 0 && o[u] === "\\"; ) a = !a;
23027
- return a ? "|" : " |";
23032
+ let t = l3.replace(m.findPipe, (i, s, a) => {
23033
+ let o = false, p = s;
23034
+ for (; --p >= 0 && a[p] === "\\"; ) o = !o;
23035
+ return o ? "|" : " |";
23028
23036
  }), n = t.split(m.splitPipe), r = 0;
23029
23037
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
23030
23038
  else for (; n.length < e; ) n.push("");
@@ -23042,7 +23050,7 @@ function z(l3, e, t) {
23042
23050
  }
23043
23051
  return l3.slice(0, n - r);
23044
23052
  }
23045
- function ge(l3, e) {
23053
+ function fe(l3, e) {
23046
23054
  if (l3.indexOf(e[1]) === -1) return -1;
23047
23055
  let t = 0;
23048
23056
  for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
@@ -23050,13 +23058,13 @@ function ge(l3, e) {
23050
23058
  else if (l3[n] === e[1] && (t--, t < 0)) return n;
23051
23059
  return t > 0 ? -2 : -1;
23052
23060
  }
23053
- function fe(l3, e, t, n, r) {
23054
- let i = e.href, s = e.title || null, o = l3[1].replace(r.other.outputLinkReplace, "$1");
23061
+ function me(l3, e, t, n, r) {
23062
+ let i = e.href, s = e.title || null, a = l3[1].replace(r.other.outputLinkReplace, "$1");
23055
23063
  n.state.inLink = true;
23056
- let a = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
23057
- return n.state.inLink = false, a;
23064
+ let o = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
23065
+ return n.state.inLink = false, o;
23058
23066
  }
23059
- function Je(l3, e, t) {
23067
+ function Ye(l3, e, t) {
23060
23068
  let n = l3.match(t.other.indentCodeCompensation);
23061
23069
  if (n === null) return e;
23062
23070
  let r = n[1];
@@ -23064,8 +23072,8 @@ function Je(l3, e, t) {
23064
23072
  `).map((i) => {
23065
23073
  let s = i.match(t.other.beginningSpace);
23066
23074
  if (s === null) return i;
23067
- let [o] = s;
23068
- return o.length >= r.length ? i.slice(r.length) : i;
23075
+ let [a] = s;
23076
+ return a.length >= r.length ? i.slice(r.length) : i;
23069
23077
  }).join(`
23070
23078
  `);
23071
23079
  }
@@ -23074,7 +23082,7 @@ var y = class {
23074
23082
  __publicField(this, "options");
23075
23083
  __publicField(this, "rules");
23076
23084
  __publicField(this, "lexer");
23077
- this.options = e || O;
23085
+ this.options = e || T;
23078
23086
  }
23079
23087
  space(e) {
23080
23088
  let t = this.rules.block.newline.exec(e);
@@ -23091,7 +23099,7 @@ var y = class {
23091
23099
  fences(e) {
23092
23100
  let t = this.rules.block.fences.exec(e);
23093
23101
  if (t) {
23094
- let n = t[0], r = Je(n, t[3] || "", this.rules);
23102
+ let n = t[0], r = Ye(n, t[3] || "", this.rules);
23095
23103
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
23096
23104
  }
23097
23105
  }
@@ -23118,32 +23126,32 @@ var y = class {
23118
23126
  `).split(`
23119
23127
  `), r = "", i = "", s = [];
23120
23128
  for (; n.length > 0; ) {
23121
- let o = false, a = [], u;
23122
- for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a.push(n[u]), o = true;
23123
- else if (!o) a.push(n[u]);
23129
+ let a = false, o = [], p;
23130
+ for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) o.push(n[p]), a = true;
23131
+ else if (!a) o.push(n[p]);
23124
23132
  else break;
23125
- n = n.slice(u);
23126
- let p = a.join(`
23127
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
23133
+ n = n.slice(p);
23134
+ let u = o.join(`
23135
+ `), c = u.replace(this.rules.other.blockquoteSetextReplace, `
23128
23136
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
23129
23137
  r = r ? `${r}
23130
- ${p}` : p, i = i ? `${i}
23138
+ ${u}` : u, i = i ? `${i}
23131
23139
  ${c}` : c;
23132
- let f = this.lexer.state.top;
23133
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = f, n.length === 0) break;
23134
- let k = s.at(-1);
23135
- if (k?.type === "code") break;
23136
- if (k?.type === "blockquote") {
23137
- let x = k, g = x.raw + `
23140
+ let g = this.lexer.state.top;
23141
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = g, n.length === 0) break;
23142
+ let h = s.at(-1);
23143
+ if (h?.type === "code") break;
23144
+ if (h?.type === "blockquote") {
23145
+ let R = h, f = R.raw + `
23138
23146
  ` + n.join(`
23139
- `), T = this.blockquote(g);
23140
- s[s.length - 1] = T, r = r.substring(0, r.length - x.raw.length) + T.raw, i = i.substring(0, i.length - x.text.length) + T.text;
23147
+ `), O = this.blockquote(f);
23148
+ s[s.length - 1] = O, r = r.substring(0, r.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
23141
23149
  break;
23142
- } else if (k?.type === "list") {
23143
- let x = k, g = x.raw + `
23150
+ } else if (h?.type === "list") {
23151
+ let R = h, f = R.raw + `
23144
23152
  ` + n.join(`
23145
- `), T = this.list(g);
23146
- s[s.length - 1] = T, r = r.substring(0, r.length - k.raw.length) + T.raw, i = i.substring(0, i.length - x.raw.length) + T.raw, n = g.substring(s.at(-1).raw.length).split(`
23153
+ `), O = this.list(f);
23154
+ s[s.length - 1] = O, r = r.substring(0, r.length - h.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
23147
23155
  `);
23148
23156
  continue;
23149
23157
  }
@@ -23156,45 +23164,45 @@ ${c}` : c;
23156
23164
  if (t) {
23157
23165
  let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
23158
23166
  n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
23159
- let s = this.rules.other.listItemRegex(n), o = false;
23167
+ let s = this.rules.other.listItemRegex(n), a = false;
23160
23168
  for (; e; ) {
23161
- let u = false, p = "", c = "";
23169
+ let p = false, u = "", c = "";
23162
23170
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
23163
- p = t[0], e = e.substring(p.length);
23164
- let f = t[2].split(`
23165
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
23166
- `, 1)[0], x = !f.trim(), g = 0;
23167
- if (this.options.pedantic ? (g = 2, c = f.trimStart()) : x ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = f.slice(g), g += t[1].length), x && this.rules.other.blankLine.test(k) && (p += k + `
23168
- `, e = e.substring(k.length + 1), u = true), !u) {
23169
- let H = this.rules.other.nextBulletRegex(g), ee = this.rules.other.hrRegex(g), te = this.rules.other.fencesBeginRegex(g), ne = this.rules.other.headingBeginRegex(g), me = this.rules.other.htmlBeginRegex(g);
23171
+ u = t[0], e = e.substring(u.length);
23172
+ let g = t[2].split(`
23173
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
23174
+ `, 1)[0], R = !g.trim(), f = 0;
23175
+ if (this.options.pedantic ? (f = 2, c = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (u += h + `
23176
+ `, e = e.substring(h.length + 1), p = true), !p) {
23177
+ let H = this.rules.other.nextBulletRegex(f), ee = this.rules.other.hrRegex(f), te = this.rules.other.fencesBeginRegex(f), ne = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f);
23170
23178
  for (; e; ) {
23171
23179
  let Z = e.split(`
23172
23180
  `, 1)[0], A;
23173
- if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), A = k) : A = k.replace(this.rules.other.tabCharGlobal, " "), te.test(k) || ne.test(k) || me.test(k) || H.test(k) || ee.test(k)) break;
23174
- if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
23175
- ` + A.slice(g);
23181
+ if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), te.test(h) || ne.test(h) || xe.test(h) || H.test(h) || ee.test(h)) break;
23182
+ if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
23183
+ ` + A.slice(f);
23176
23184
  else {
23177
- if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f) || ne.test(f) || ee.test(f)) break;
23185
+ if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
23178
23186
  c += `
23179
- ` + k;
23187
+ ` + h;
23180
23188
  }
23181
- !x && !k.trim() && (x = true), p += Z + `
23182
- `, e = e.substring(Z.length + 1), f = A.slice(g);
23189
+ !R && !h.trim() && (R = true), u += Z + `
23190
+ `, e = e.substring(Z.length + 1), g = A.slice(f);
23183
23191
  }
23184
23192
  }
23185
- i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
23186
- let T = null, Y;
23187
- this.options.gfm && (T = this.rules.other.listIsTask.exec(c), T && (Y = T[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: p, task: !!T, checked: Y, loose: false, text: c, tokens: [] }), i.raw += p;
23193
+ i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(u) && (a = true));
23194
+ let O = null, Y;
23195
+ this.options.gfm && (O = this.rules.other.listIsTask.exec(c), O && (Y = O[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: u, task: !!O, checked: Y, loose: false, text: c, tokens: [] }), i.raw += u;
23188
23196
  }
23189
- let a = i.items.at(-1);
23190
- if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
23197
+ let o = i.items.at(-1);
23198
+ if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
23191
23199
  else return;
23192
23200
  i.raw = i.raw.trimEnd();
23193
- for (let u = 0; u < i.items.length; u++) if (this.lexer.state.top = false, i.items[u].tokens = this.lexer.blockTokens(i.items[u].text, []), !i.loose) {
23194
- let p = i.items[u].tokens.filter((f) => f.type === "space"), c = p.length > 0 && p.some((f) => this.rules.other.anyLine.test(f.raw));
23201
+ for (let p = 0; p < i.items.length; p++) if (this.lexer.state.top = false, i.items[p].tokens = this.lexer.blockTokens(i.items[p].text, []), !i.loose) {
23202
+ let u = i.items[p].tokens.filter((g) => g.type === "space"), c = u.length > 0 && u.some((g) => this.rules.other.anyLine.test(g.raw));
23195
23203
  i.loose = c;
23196
23204
  }
23197
- if (i.loose) for (let u = 0; u < i.items.length; u++) i.items[u].loose = true;
23205
+ if (i.loose) for (let p = 0; p < i.items.length; p++) i.items[p].loose = true;
23198
23206
  return i;
23199
23207
  }
23200
23208
  }
@@ -23215,9 +23223,9 @@ ${c}` : c;
23215
23223
  let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
23216
23224
  `) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
23217
23225
  if (n.length === r.length) {
23218
- for (let o of r) this.rules.other.tableAlignRight.test(o) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? s.align.push("left") : s.align.push(null);
23219
- for (let o = 0; o < n.length; o++) s.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: s.align[o] });
23220
- for (let o of i) s.rows.push(V(o, s.header.length).map((a, u) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[u] })));
23226
+ for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
23227
+ for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
23228
+ for (let a of i) s.rows.push(V(a, s.header.length).map((o, p) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[p] })));
23221
23229
  return s;
23222
23230
  }
23223
23231
  }
@@ -23254,11 +23262,11 @@ ${c}` : c;
23254
23262
  let s = z(n.slice(0, -1), "\\");
23255
23263
  if ((n.length - s.length) % 2 === 0) return;
23256
23264
  } else {
23257
- let s = ge(t[2], "()");
23265
+ let s = fe(t[2], "()");
23258
23266
  if (s === -2) return;
23259
23267
  if (s > -1) {
23260
- let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
23261
- t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, a).trim(), t[3] = "";
23268
+ let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
23269
+ t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
23262
23270
  }
23263
23271
  }
23264
23272
  let r = t[2], i = "";
@@ -23266,7 +23274,7 @@ ${c}` : c;
23266
23274
  let s = this.rules.other.pedanticHrefTitle.exec(r);
23267
23275
  s && (r = s[1], i = s[3]);
23268
23276
  } else i = t[3] ? t[3].slice(1, -1) : "";
23269
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
23277
+ return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
23270
23278
  }
23271
23279
  }
23272
23280
  reflink(e, t) {
@@ -23277,32 +23285,32 @@ ${c}` : c;
23277
23285
  let s = n[0].charAt(0);
23278
23286
  return { type: "text", raw: s, text: s };
23279
23287
  }
23280
- return fe(n, i, n[0], this.lexer, this.rules);
23288
+ return me(n, i, n[0], this.lexer, this.rules);
23281
23289
  }
23282
23290
  }
23283
23291
  emStrong(e, t, n = "") {
23284
23292
  let r = this.rules.inline.emStrongLDelim.exec(e);
23285
23293
  if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
23286
23294
  if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
23287
- let s = [...r[0]].length - 1, o, a, u = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23295
+ let s = [...r[0]].length - 1, a, o, p = s, u = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23288
23296
  for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
23289
- if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
23290
- if (a = [...o].length, r[3] || r[4]) {
23291
- u += a;
23297
+ if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
23298
+ if (o = [...a].length, r[3] || r[4]) {
23299
+ p += o;
23292
23300
  continue;
23293
- } else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
23294
- p += a;
23301
+ } else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
23302
+ u += o;
23295
23303
  continue;
23296
23304
  }
23297
- if (u -= a, u > 0) continue;
23298
- a = Math.min(a, a + u + p);
23299
- let f = [...r[0]][0].length, k = e.slice(0, s + r.index + f + a);
23300
- if (Math.min(s, a) % 2) {
23301
- let g = k.slice(1, -1);
23302
- return { type: "em", raw: k, text: g, tokens: this.lexer.inlineTokens(g) };
23305
+ if (p -= o, p > 0) continue;
23306
+ o = Math.min(o, o + p + u);
23307
+ let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + o);
23308
+ if (Math.min(s, o) % 2) {
23309
+ let f = h.slice(1, -1);
23310
+ return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
23303
23311
  }
23304
- let x = k.slice(2, -2);
23305
- return { type: "strong", raw: k, text: x, tokens: this.lexer.inlineTokens(x) };
23312
+ let R = h.slice(2, -2);
23313
+ return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
23306
23314
  }
23307
23315
  }
23308
23316
  }
@@ -23351,19 +23359,19 @@ ${c}` : c;
23351
23359
  }
23352
23360
  }
23353
23361
  };
23354
- var b = class l {
23362
+ var x = class l {
23355
23363
  constructor(e) {
23356
23364
  __publicField(this, "tokens");
23357
23365
  __publicField(this, "options");
23358
23366
  __publicField(this, "state");
23359
23367
  __publicField(this, "tokenizer");
23360
23368
  __publicField(this, "inlineQueue");
23361
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || O, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
23362
- let t = { other: m, block: I.normal, inline: M.normal };
23363
- this.options.pedantic ? (t.block = I.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = I.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
23369
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
23370
+ let t = { other: m, block: C.normal, inline: M.normal };
23371
+ this.options.pedantic ? (t.block = C.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
23364
23372
  }
23365
23373
  static get rules() {
23366
- return { block: I, inline: M };
23374
+ return { block: C, inline: M };
23367
23375
  }
23368
23376
  static lex(e, t) {
23369
23377
  return new l(t).lex(e);
@@ -23443,9 +23451,9 @@ var b = class l {
23443
23451
  }
23444
23452
  let i = e;
23445
23453
  if (this.options.extensions?.startBlock) {
23446
- let s = 1 / 0, o = e.slice(1), a;
23447
- this.options.extensions.startBlock.forEach((u) => {
23448
- a = u.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23454
+ let s = 1 / 0, a = e.slice(1), o;
23455
+ this.options.extensions.startBlock.forEach((p) => {
23456
+ o = p.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
23449
23457
  }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
23450
23458
  }
23451
23459
  if (this.state.top && (r = this.tokenizer.paragraph(i))) {
@@ -23485,11 +23493,12 @@ var b = class l {
23485
23493
  if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
23486
23494
  }
23487
23495
  for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
23488
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
23496
+ let i;
23497
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
23489
23498
  n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
23490
- let i = false, s = "";
23499
+ let s = false, a = "";
23491
23500
  for (; e; ) {
23492
- i || (s = ""), i = false;
23501
+ s || (a = ""), s = false;
23493
23502
  let o;
23494
23503
  if (this.options.extensions?.inline?.some((u) => (o = u.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
23495
23504
  if (o = this.tokenizer.escape(e)) {
@@ -23510,7 +23519,7 @@ var b = class l {
23510
23519
  o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23511
23520
  continue;
23512
23521
  }
23513
- if (o = this.tokenizer.emStrong(e, n, s)) {
23522
+ if (o = this.tokenizer.emStrong(e, n, a)) {
23514
23523
  e = e.substring(o.raw.length), t.push(o);
23515
23524
  continue;
23516
23525
  }
@@ -23534,15 +23543,15 @@ var b = class l {
23534
23543
  e = e.substring(o.raw.length), t.push(o);
23535
23544
  continue;
23536
23545
  }
23537
- let a = e;
23546
+ let p = e;
23538
23547
  if (this.options.extensions?.startInline) {
23539
- let u = 1 / 0, p = e.slice(1), c;
23540
- this.options.extensions.startInline.forEach((f) => {
23541
- c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
23542
- }), u < 1 / 0 && u >= 0 && (a = e.substring(0, u + 1));
23548
+ let u = 1 / 0, c = e.slice(1), g;
23549
+ this.options.extensions.startInline.forEach((h) => {
23550
+ g = h.call({ lexer: this }, c), typeof g == "number" && g >= 0 && (u = Math.min(u, g));
23551
+ }), u < 1 / 0 && u >= 0 && (p = e.substring(0, u + 1));
23543
23552
  }
23544
- if (o = this.tokenizer.inlineText(a)) {
23545
- e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
23553
+ if (o = this.tokenizer.inlineText(p)) {
23554
+ e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
23546
23555
  let u = t.at(-1);
23547
23556
  u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23548
23557
  continue;
@@ -23562,7 +23571,7 @@ var P = class {
23562
23571
  constructor(e) {
23563
23572
  __publicField(this, "options");
23564
23573
  __publicField(this, "parser");
23565
- this.options = e || O;
23574
+ this.options = e || T;
23566
23575
  }
23567
23576
  space(e) {
23568
23577
  return "";
@@ -23595,9 +23604,9 @@ ${this.parser.parse(e)}</blockquote>
23595
23604
  }
23596
23605
  list(e) {
23597
23606
  let t = e.ordered, n = e.start, r = "";
23598
- for (let o = 0; o < e.items.length; o++) {
23599
- let a = e.items[o];
23600
- r += this.listitem(a);
23607
+ for (let a = 0; a < e.items.length; a++) {
23608
+ let o = e.items[a];
23609
+ r += this.listitem(o);
23601
23610
  }
23602
23611
  let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
23603
23612
  return "<" + i + s + `>
@@ -23628,7 +23637,7 @@ ${this.parser.parse(e)}</blockquote>
23628
23637
  for (let i = 0; i < e.rows.length; i++) {
23629
23638
  let s = e.rows[i];
23630
23639
  n = "";
23631
- for (let o = 0; o < s.length; o++) n += this.tablecell(s[o]);
23640
+ for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
23632
23641
  r += this.tablerow({ text: n });
23633
23642
  }
23634
23643
  return r && (r = `<tbody>${r}</tbody>`), `<table>
@@ -23710,12 +23719,12 @@ var $ = class {
23710
23719
  return "";
23711
23720
  }
23712
23721
  };
23713
- var R = class l2 {
23722
+ var b = class l2 {
23714
23723
  constructor(e) {
23715
23724
  __publicField(this, "options");
23716
23725
  __publicField(this, "renderer");
23717
23726
  __publicField(this, "textRenderer");
23718
- this.options = e || O, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
23727
+ this.options = e || T, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
23719
23728
  }
23720
23729
  static parse(e, t) {
23721
23730
  return new l2(t).parse(e);
@@ -23728,9 +23737,9 @@ var R = class l2 {
23728
23737
  for (let r = 0; r < e.length; r++) {
23729
23738
  let i = e[r];
23730
23739
  if (this.options.extensions?.renderers?.[i.type]) {
23731
- let o = i, a = this.options.extensions.renderers[o.type].call({ parser: this }, o);
23732
- if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(o.type)) {
23733
- n += a || "";
23740
+ let a = i, o = this.options.extensions.renderers[a.type].call({ parser: this }, a);
23741
+ if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(a.type)) {
23742
+ n += o || "";
23734
23743
  continue;
23735
23744
  }
23736
23745
  }
@@ -23777,16 +23786,16 @@ var R = class l2 {
23777
23786
  continue;
23778
23787
  }
23779
23788
  case "text": {
23780
- let o = s, a = this.renderer.text(o);
23781
- for (; r + 1 < e.length && e[r + 1].type === "text"; ) o = e[++r], a += `
23782
- ` + this.renderer.text(o);
23783
- t ? n += this.renderer.paragraph({ type: "paragraph", raw: a, text: a, tokens: [{ type: "text", raw: a, text: a, escaped: true }] }) : n += a;
23789
+ let a = s, o = this.renderer.text(a);
23790
+ for (; r + 1 < e.length && e[r + 1].type === "text"; ) a = e[++r], o += `
23791
+ ` + this.renderer.text(a);
23792
+ t ? n += this.renderer.paragraph({ type: "paragraph", raw: o, text: o, tokens: [{ type: "text", raw: o, text: o, escaped: true }] }) : n += o;
23784
23793
  continue;
23785
23794
  }
23786
23795
  default: {
23787
- let o = 'Token with "' + s.type + '" type was not found.';
23788
- if (this.options.silent) return console.error(o), "";
23789
- throw new Error(o);
23796
+ let a = 'Token with "' + s.type + '" type was not found.';
23797
+ if (this.options.silent) return console.error(a), "";
23798
+ throw new Error(a);
23790
23799
  }
23791
23800
  }
23792
23801
  }
@@ -23797,9 +23806,9 @@ var R = class l2 {
23797
23806
  for (let r = 0; r < e.length; r++) {
23798
23807
  let i = e[r];
23799
23808
  if (this.options.extensions?.renderers?.[i.type]) {
23800
- let o = this.options.extensions.renderers[i.type].call({ parser: this }, i);
23801
- if (o !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
23802
- n += o || "";
23809
+ let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
23810
+ if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
23811
+ n += a || "";
23803
23812
  continue;
23804
23813
  }
23805
23814
  }
@@ -23846,9 +23855,9 @@ var R = class l2 {
23846
23855
  break;
23847
23856
  }
23848
23857
  default: {
23849
- let o = 'Token with "' + s.type + '" type was not found.';
23850
- if (this.options.silent) return console.error(o), "";
23851
- throw new Error(o);
23858
+ let a = 'Token with "' + s.type + '" type was not found.';
23859
+ if (this.options.silent) return console.error(a), "";
23860
+ throw new Error(a);
23852
23861
  }
23853
23862
  }
23854
23863
  }
@@ -23859,7 +23868,7 @@ var S = (_a = class {
23859
23868
  constructor(e) {
23860
23869
  __publicField(this, "options");
23861
23870
  __publicField(this, "block");
23862
- this.options = e || O;
23871
+ this.options = e || T;
23863
23872
  }
23864
23873
  preprocess(e) {
23865
23874
  return e;
@@ -23874,10 +23883,10 @@ var S = (_a = class {
23874
23883
  return e;
23875
23884
  }
23876
23885
  provideLexer() {
23877
- return this.block ? b.lex : b.lexInline;
23886
+ return this.block ? x.lex : x.lexInline;
23878
23887
  }
23879
23888
  provideParser() {
23880
- return this.block ? R.parse : R.parseInline;
23889
+ return this.block ? b.parse : b.parseInline;
23881
23890
  }
23882
23891
  }, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
23883
23892
  var B = class {
@@ -23886,10 +23895,10 @@ var B = class {
23886
23895
  __publicField(this, "options", this.setOptions);
23887
23896
  __publicField(this, "parse", this.parseMarkdown(true));
23888
23897
  __publicField(this, "parseInline", this.parseMarkdown(false));
23889
- __publicField(this, "Parser", R);
23898
+ __publicField(this, "Parser", b);
23890
23899
  __publicField(this, "Renderer", P);
23891
23900
  __publicField(this, "TextRenderer", $);
23892
- __publicField(this, "Lexer", b);
23901
+ __publicField(this, "Lexer", x);
23893
23902
  __publicField(this, "Tokenizer", y);
23894
23903
  __publicField(this, "Hooks", S);
23895
23904
  this.use(...e);
@@ -23900,7 +23909,7 @@ var B = class {
23900
23909
  case "table": {
23901
23910
  let i = r;
23902
23911
  for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
23903
- for (let s of i.rows) for (let o of s) n = n.concat(this.walkTokens(o.tokens, t));
23912
+ for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
23904
23913
  break;
23905
23914
  }
23906
23915
  case "list": {
@@ -23911,8 +23920,8 @@ var B = class {
23911
23920
  default: {
23912
23921
  let i = r;
23913
23922
  this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
23914
- let o = i[s].flat(1 / 0);
23915
- n = n.concat(this.walkTokens(o, t));
23923
+ let a = i[s].flat(1 / 0);
23924
+ n = n.concat(this.walkTokens(a, t));
23916
23925
  }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
23917
23926
  }
23918
23927
  }
@@ -23926,9 +23935,9 @@ var B = class {
23926
23935
  if (!i.name) throw new Error("extension name required");
23927
23936
  if ("renderer" in i) {
23928
23937
  let s = t.renderers[i.name];
23929
- s ? t.renderers[i.name] = function(...o) {
23930
- let a = i.renderer.apply(this, o);
23931
- return a === false && (a = s.apply(this, o)), a;
23938
+ s ? t.renderers[i.name] = function(...a) {
23939
+ let o = i.renderer.apply(this, a);
23940
+ return o === false && (o = s.apply(this, a)), o;
23932
23941
  } : t.renderers[i.name] = i.renderer;
23933
23942
  }
23934
23943
  if ("tokenizer" in i) {
@@ -23942,10 +23951,10 @@ var B = class {
23942
23951
  for (let s in n.renderer) {
23943
23952
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
23944
23953
  if (["options", "parser"].includes(s)) continue;
23945
- let o = s, a = n.renderer[o], u = i[o];
23946
- i[o] = (...p) => {
23947
- let c = a.apply(i, p);
23948
- return c === false && (c = u.apply(i, p)), c || "";
23954
+ let a = s, o = n.renderer[a], p = i[a];
23955
+ i[a] = (...u) => {
23956
+ let c = o.apply(i, u);
23957
+ return c === false && (c = p.apply(i, u)), c || "";
23949
23958
  };
23950
23959
  }
23951
23960
  r.renderer = i;
@@ -23955,10 +23964,10 @@ var B = class {
23955
23964
  for (let s in n.tokenizer) {
23956
23965
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
23957
23966
  if (["options", "rules", "lexer"].includes(s)) continue;
23958
- let o = s, a = n.tokenizer[o], u = i[o];
23959
- i[o] = (...p) => {
23960
- let c = a.apply(i, p);
23961
- return c === false && (c = u.apply(i, p)), c;
23967
+ let a = s, o = n.tokenizer[a], p = i[a];
23968
+ i[a] = (...u) => {
23969
+ let c = o.apply(i, u);
23970
+ return c === false && (c = p.apply(i, u)), c;
23962
23971
  };
23963
23972
  }
23964
23973
  r.tokenizer = i;
@@ -23968,23 +23977,30 @@ var B = class {
23968
23977
  for (let s in n.hooks) {
23969
23978
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
23970
23979
  if (["options", "block"].includes(s)) continue;
23971
- let o = s, a = n.hooks[o], u = i[o];
23972
- S.passThroughHooks.has(s) ? i[o] = (p) => {
23973
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
23974
- let c = a.call(i, p);
23975
- return u.call(i, c);
23976
- } : i[o] = (...p) => {
23977
- let c = a.apply(i, p);
23978
- return c === false && (c = u.apply(i, p)), c;
23980
+ let a = s, o = n.hooks[a], p = i[a];
23981
+ S.passThroughHooks.has(s) ? i[a] = (u) => {
23982
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
23983
+ let g = await o.call(i, u);
23984
+ return p.call(i, g);
23985
+ })();
23986
+ let c = o.call(i, u);
23987
+ return p.call(i, c);
23988
+ } : i[a] = (...u) => {
23989
+ if (this.defaults.async) return (async () => {
23990
+ let g = await o.apply(i, u);
23991
+ return g === false && (g = await p.apply(i, u)), g;
23992
+ })();
23993
+ let c = o.apply(i, u);
23994
+ return c === false && (c = p.apply(i, u)), c;
23979
23995
  };
23980
23996
  }
23981
23997
  r.hooks = i;
23982
23998
  }
23983
23999
  if (n.walkTokens) {
23984
24000
  let i = this.defaults.walkTokens, s = n.walkTokens;
23985
- r.walkTokens = function(o) {
23986
- let a = [];
23987
- return a.push(s.call(this, o)), i && (a = a.concat(i.call(this, o))), a;
24001
+ r.walkTokens = function(a) {
24002
+ let o = [];
24003
+ return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
23988
24004
  };
23989
24005
  }
23990
24006
  this.defaults = { ...this.defaults, ...r };
@@ -23994,28 +24010,31 @@ var B = class {
23994
24010
  return this.defaults = { ...this.defaults, ...e }, this;
23995
24011
  }
23996
24012
  lexer(e, t) {
23997
- return b.lex(e, t ?? this.defaults);
24013
+ return x.lex(e, t ?? this.defaults);
23998
24014
  }
23999
24015
  parser(e, t) {
24000
- return R.parse(e, t ?? this.defaults);
24016
+ return b.parse(e, t ?? this.defaults);
24001
24017
  }
24002
24018
  parseMarkdown(e) {
24003
24019
  return (n, r) => {
24004
- let i = { ...r }, s = { ...this.defaults, ...i }, o = this.onError(!!s.silent, !!s.async);
24005
- if (this.defaults.async === true && i.async === false) return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
24006
- if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
24007
- if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
24008
- s.hooks && (s.hooks.options = s, s.hooks.block = e);
24009
- let a = s.hooks ? s.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s.hooks ? s.hooks.provideParser() : e ? R.parse : R.parseInline;
24010
- if (s.async) return Promise.resolve(s.hooks ? s.hooks.preprocess(n) : n).then((p) => a(p, s)).then((p) => s.hooks ? s.hooks.processAllTokens(p) : p).then((p) => s.walkTokens ? Promise.all(this.walkTokens(p, s.walkTokens)).then(() => p) : p).then((p) => u(p, s)).then((p) => s.hooks ? s.hooks.postprocess(p) : p).catch(o);
24020
+ let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
24021
+ if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
24022
+ if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
24023
+ if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
24024
+ if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
24025
+ let o = s.hooks ? await s.hooks.preprocess(n) : n, u = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(u) : u;
24026
+ s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
24027
+ let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
24028
+ return s.hooks ? await s.hooks.postprocess(h) : h;
24029
+ })().catch(a);
24011
24030
  try {
24012
24031
  s.hooks && (n = s.hooks.preprocess(n));
24013
- let p = a(n, s);
24032
+ let p = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
24014
24033
  s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
24015
- let c = u(p, s);
24034
+ let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
24016
24035
  return s.hooks && (c = s.hooks.postprocess(c)), c;
24017
- } catch (p) {
24018
- return o(p);
24036
+ } catch (o) {
24037
+ return a(o);
24019
24038
  }
24020
24039
  };
24021
24040
  }
@@ -24032,38 +24051,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24032
24051
  }
24033
24052
  };
24034
24053
  var _ = new B();
24035
- function d(l3, e) {
24054
+ function k(l3, e) {
24036
24055
  return _.parse(l3, e);
24037
24056
  }
24038
- d.options = d.setOptions = function(l3) {
24039
- return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
24057
+ k.options = k.setOptions = function(l3) {
24058
+ return _.setOptions(l3), k.defaults = _.defaults, G(k.defaults), k;
24040
24059
  };
24041
- d.getDefaults = L;
24042
- d.defaults = O;
24043
- d.use = function(...l3) {
24044
- return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
24060
+ k.getDefaults = L;
24061
+ k.defaults = T;
24062
+ k.use = function(...l3) {
24063
+ return _.use(...l3), k.defaults = _.defaults, G(k.defaults), k;
24045
24064
  };
24046
- d.walkTokens = function(l3, e) {
24065
+ k.walkTokens = function(l3, e) {
24047
24066
  return _.walkTokens(l3, e);
24048
24067
  };
24049
- d.parseInline = _.parseInline;
24050
- d.Parser = R;
24051
- d.parser = R.parse;
24052
- d.Renderer = P;
24053
- d.TextRenderer = $;
24054
- d.Lexer = b;
24055
- d.lexer = b.lex;
24056
- d.Tokenizer = y;
24057
- d.Hooks = S;
24058
- d.parse = d;
24059
- d.options;
24060
- d.setOptions;
24061
- d.use;
24062
- d.walkTokens;
24063
- d.parseInline;
24064
- R.parse;
24065
- b.lex;
24066
- d.use({
24068
+ k.parseInline = _.parseInline;
24069
+ k.Parser = b;
24070
+ k.parser = b.parse;
24071
+ k.Renderer = P;
24072
+ k.TextRenderer = $;
24073
+ k.Lexer = x;
24074
+ k.lexer = x.lex;
24075
+ k.Tokenizer = y;
24076
+ k.Hooks = S;
24077
+ k.parse = k;
24078
+ k.options;
24079
+ k.setOptions;
24080
+ k.use;
24081
+ k.walkTokens;
24082
+ k.parseInline;
24083
+ b.parse;
24084
+ x.lex;
24085
+ k.use({
24067
24086
  breaks: false,
24068
24087
  // Use proper paragraphs, not <br> tags
24069
24088
  gfm: true
@@ -24074,7 +24093,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
24074
24093
  return createDocFromHTML(html, schema, options);
24075
24094
  }
24076
24095
  function convertMarkdownToHTML(markdown) {
24077
- let html = d.parse(markdown, { async: false });
24096
+ let html = k.parse(markdown, { async: false });
24078
24097
  return html.replace(/<\/p>\n<ul>/g, "</p>\n<p>&nbsp;</p>\n<ul>").replace(/<\/p>\n<ol>/g, "</p>\n<p>&nbsp;</p>\n<ol>").replace(/<\/ul>\n<h/g, "</ul>\n<p>&nbsp;</p>\n<h").replace(/<\/ol>\n<h/g, "</ol>\n<p>&nbsp;</p>\n<h");
24079
24098
  }
24080
24099
  function processContent({ content, type: type2, schema }) {
@@ -24253,7 +24272,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
24253
24272
  };
24254
24273
  const getNewListId = (editor, grouping = "definitions") => {
24255
24274
  const defs = editor.converter.numbering[grouping] || {};
24256
- const intKeys = Object.keys(defs).map((k) => Number(k)).filter((n) => Number.isInteger(n));
24275
+ const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
24257
24276
  const max2 = intKeys.length ? Math.max(...intKeys) : 0;
24258
24277
  return max2 + 1;
24259
24278
  };
@@ -28712,18 +28731,18 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
28712
28731
  const rawY = shapeOff?.attributes?.["y"] ? parseFloat(shapeOff.attributes["y"]) : 0;
28713
28732
  const rawWidth = shapeExt?.attributes?.["cx"] ? parseFloat(shapeExt.attributes["cx"]) : 914400;
28714
28733
  const rawHeight = shapeExt?.attributes?.["cy"] ? parseFloat(shapeExt.attributes["cy"]) : 914400;
28715
- let x, y2, width, height;
28734
+ let x2, y2, width, height;
28716
28735
  if (groupTransform.childWidth && groupTransform.childHeight) {
28717
28736
  const scaleX = groupTransform.width / groupTransform.childWidth;
28718
28737
  const scaleY = groupTransform.height / groupTransform.childHeight;
28719
28738
  const childOriginX = groupTransform.childOriginXEmu || 0;
28720
28739
  const childOriginY = groupTransform.childOriginYEmu || 0;
28721
- x = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
28740
+ x2 = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
28722
28741
  y2 = groupTransform.y + emuToPixels((rawY - childOriginY) * scaleY);
28723
28742
  width = emuToPixels(rawWidth * scaleX);
28724
28743
  height = emuToPixels(rawHeight * scaleY);
28725
28744
  } else {
28726
- x = emuToPixels(rawX);
28745
+ x2 = emuToPixels(rawX);
28727
28746
  y2 = emuToPixels(rawY);
28728
28747
  width = emuToPixels(rawWidth);
28729
28748
  height = emuToPixels(rawHeight);
@@ -28742,7 +28761,7 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
28742
28761
  shapeType: "vectorShape",
28743
28762
  attrs: {
28744
28763
  kind: shapeKind,
28745
- x,
28764
+ x: x2,
28746
28765
  y: y2,
28747
28766
  width,
28748
28767
  height,
@@ -28951,8 +28970,8 @@ const translateImageNode = (params) => {
28951
28970
  const leftMargin = tableCell.attrs.cellMargins?.left || 8;
28952
28971
  const rightMargin = tableCell.attrs.cellMargins?.right || 8;
28953
28972
  const maxWidthEmu = pixelsToEmu(colwidthSum - (leftMargin + rightMargin));
28954
- const { width: w2, height: h2 } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
28955
- if (w2 && h2) size = { w: w2, h: h2 };
28973
+ const { width: w2, height: h } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
28974
+ if (w2 && h) size = { w: w2, h };
28956
28975
  }
28957
28976
  if (imageId) {
28958
28977
  const docx = params.converter?.convertedXml || {};
@@ -36067,7 +36086,7 @@ const _SuperConverter = class _SuperConverter {
36067
36086
  static getStoredSuperdocVersion(docx) {
36068
36087
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
36069
36088
  }
36070
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.35.3") {
36089
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.36.1") {
36071
36090
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
36072
36091
  }
36073
36092
  /**
@@ -36461,7 +36480,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
36461
36480
  };
36462
36481
  exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36463
36482
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36464
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
36483
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36465
36484
  const newDocRels = [];
36466
36485
  Object.entries(this.headers).forEach(([id, header], index2) => {
36467
36486
  const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
@@ -36502,7 +36521,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36502
36521
  }
36503
36522
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36504
36523
  if (params.relationships.length) {
36505
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36524
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36506
36525
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36507
36526
  declaration: this.initialJSON?.declaration,
36508
36527
  elements: [
@@ -36556,7 +36575,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36556
36575
  }
36557
36576
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36558
36577
  if (params.relationships.length) {
36559
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36578
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36560
36579
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36561
36580
  declaration: this.initialJSON?.declaration,
36562
36581
  elements: [
@@ -36575,7 +36594,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36575
36594
  };
36576
36595
  exportProcessNewRelationships_fn = function(rels = []) {
36577
36596
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36578
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
36597
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36579
36598
  relationships.elements = mergeRelationshipElements(relationships.elements, rels);
36580
36599
  };
36581
36600
  exportProcessMediaFiles_fn = async function(media = {}) {