@harbour-enterprises/superdoc 0.28.4 → 0.28.6

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 (53) hide show
  1. package/dist/chunks/{PdfViewer-CfUwzBbx.cjs → PdfViewer-CW2ybl0j.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-FhoWTpo9.es.js → PdfViewer-DAUQ4n0w.es.js} +1 -1
  3. package/dist/chunks/{index-C3gwy96O.cjs → index-BpgW1KZy.cjs} +3 -3
  4. package/dist/chunks/{index-CQbyD7vC.es.js → index-C7c7Wrir.es.js} +3 -3
  5. package/dist/chunks/{index-CEL3ujoV-C85AsK84.cjs → index-OJMKpgPV-BxyAzfHX.cjs} +1 -1
  6. package/dist/chunks/{index-CEL3ujoV-BXzhXCnT.es.js → index-OJMKpgPV-ByDfAvbD.es.js} +1 -1
  7. package/dist/chunks/{super-editor.es-BQCukgDh.cjs → super-editor.es-O28Q620R.cjs} +737 -732
  8. package/dist/chunks/{super-editor.es-rFPLjn7D.es.js → super-editor.es-sjHXNO5X.es.js} +737 -732
  9. package/dist/images/altText_add.svg +3 -0
  10. package/dist/images/altText_disclaimer.svg +3 -0
  11. package/dist/images/altText_done.svg +3 -0
  12. package/dist/images/altText_spinner.svg +30 -0
  13. package/dist/images/altText_warning.svg +3 -0
  14. package/dist/images/annotation-check.svg +11 -0
  15. package/dist/images/annotation-comment.svg +16 -0
  16. package/dist/images/annotation-help.svg +26 -0
  17. package/dist/images/annotation-insert.svg +10 -0
  18. package/dist/images/annotation-key.svg +11 -0
  19. package/dist/images/annotation-newparagraph.svg +11 -0
  20. package/dist/images/annotation-noicon.svg +7 -0
  21. package/dist/images/annotation-note.svg +42 -0
  22. package/dist/images/annotation-paperclip.svg +6 -0
  23. package/dist/images/annotation-paragraph.svg +16 -0
  24. package/dist/images/annotation-pushpin.svg +7 -0
  25. package/dist/images/cursor-editorFreeHighlight.svg +6 -0
  26. package/dist/images/cursor-editorFreeText.svg +3 -0
  27. package/dist/images/cursor-editorInk.svg +4 -0
  28. package/dist/images/cursor-editorTextHighlight.svg +8 -0
  29. package/dist/images/editor-toolbar-delete.svg +5 -0
  30. package/dist/images/loading-icon.gif +0 -0
  31. package/dist/images/messageBar_closingButton.svg +3 -0
  32. package/dist/images/messageBar_warning.svg +3 -0
  33. package/dist/images/toolbarButton-editorHighlight.svg +6 -0
  34. package/dist/images/toolbarButton-menuArrow.svg +3 -0
  35. package/dist/super-editor/ai-writer.es.js +2 -2
  36. package/dist/super-editor/chunks/{converter-BkMCDOKg.js → converter-BZDxsgIe.js} +386 -381
  37. package/dist/super-editor/chunks/{docx-zipper-CPrVIeS5.js → docx-zipper-DQ7QphV5.js} +1 -1
  38. package/dist/super-editor/chunks/{editor-D2rTPB17.js → editor-fnnUn0aZ.js} +4 -4
  39. package/dist/super-editor/chunks/{index-CEL3ujoV.js → index-OJMKpgPV.js} +1 -1
  40. package/dist/super-editor/chunks/{toolbar-EGiGMLTV.js → toolbar-DYEtZyI5.js} +2 -2
  41. package/dist/super-editor/converter.es.js +1 -1
  42. package/dist/super-editor/docx-zipper.es.js +2 -2
  43. package/dist/super-editor/editor.es.js +3 -3
  44. package/dist/super-editor/file-zipper.es.js +1 -1
  45. package/dist/super-editor/super-editor.es.js +6 -6
  46. package/dist/super-editor/toolbar.es.js +2 -2
  47. package/dist/super-editor.cjs +1 -1
  48. package/dist/super-editor.es.js +1 -1
  49. package/dist/superdoc.cjs +2 -2
  50. package/dist/superdoc.es.js +2 -2
  51. package/dist/superdoc.umd.js +501 -496
  52. package/dist/superdoc.umd.js.map +1 -1
  53. package/package.json +5 -2
@@ -112,18 +112,18 @@ ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
112
112
  var eBias = eMax >> 1;
113
113
  var nBits = -7;
114
114
  var i = isLE ? nBytes - 1 : 0;
115
- var d = isLE ? -1 : 1;
115
+ var d2 = isLE ? -1 : 1;
116
116
  var s = buffer2[offset + i];
117
- i += d;
117
+ i += d2;
118
118
  e = s & (1 << -nBits) - 1;
119
119
  s >>= -nBits;
120
120
  nBits += eLen;
121
- for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
121
+ for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d2, nBits -= 8) {
122
122
  }
123
123
  m2 = e & (1 << -nBits) - 1;
124
124
  e >>= -nBits;
125
125
  nBits += mLen;
126
- for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i], i += d, nBits -= 8) {
126
+ for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i], i += d2, nBits -= 8) {
127
127
  }
128
128
  if (e === 0) {
129
129
  e = 1 - eBias;
@@ -142,7 +142,7 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
142
142
  var eBias = eMax >> 1;
143
143
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
144
144
  var i = isLE ? 0 : nBytes - 1;
145
- var d = isLE ? 1 : -1;
145
+ var d2 = isLE ? 1 : -1;
146
146
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
147
147
  value = Math.abs(value);
148
148
  if (isNaN(value) || value === Infinity) {
@@ -174,13 +174,13 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
174
174
  e = 0;
175
175
  }
176
176
  }
177
- for (; mLen >= 8; buffer2[offset + i] = m2 & 255, i += d, m2 /= 256, mLen -= 8) {
177
+ for (; mLen >= 8; buffer2[offset + i] = m2 & 255, i += d2, m2 /= 256, mLen -= 8) {
178
178
  }
179
179
  e = e << mLen | m2;
180
180
  eLen += mLen;
181
- for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
181
+ for (; eLen > 0; buffer2[offset + i] = e & 255, i += d2, e /= 256, eLen -= 8) {
182
182
  }
183
- buffer2[offset + i - d] |= s * 128;
183
+ buffer2[offset + i - d2] |= s * 128;
184
184
  };
185
185
  /*!
186
186
  * The buffer module from node.js, for the browser.
@@ -414,17 +414,17 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
414
414
  );
415
415
  }
416
416
  if (a === b2) return 0;
417
- let x2 = a.length;
417
+ let x = a.length;
418
418
  let y2 = b2.length;
419
- for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
419
+ for (let i = 0, len = Math.min(x, y2); i < len; ++i) {
420
420
  if (a[i] !== b2[i]) {
421
- x2 = a[i];
421
+ x = a[i];
422
422
  y2 = b2[i];
423
423
  break;
424
424
  }
425
425
  }
426
- if (x2 < y2) return -1;
427
- if (y2 < x2) return 1;
426
+ if (x < y2) return -1;
427
+ if (y2 < x) return 1;
428
428
  return 0;
429
429
  };
430
430
  Buffer3.isEncoding = function isEncoding(encoding) {
@@ -673,20 +673,20 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
673
673
  thisStart >>>= 0;
674
674
  thisEnd >>>= 0;
675
675
  if (this === target) return 0;
676
- let x2 = thisEnd - thisStart;
676
+ let x = thisEnd - thisStart;
677
677
  let y2 = end - start;
678
- const len = Math.min(x2, y2);
678
+ const len = Math.min(x, y2);
679
679
  const thisCopy = this.slice(thisStart, thisEnd);
680
680
  const targetCopy = target.slice(start, end);
681
681
  for (let i = 0; i < len; ++i) {
682
682
  if (thisCopy[i] !== targetCopy[i]) {
683
- x2 = thisCopy[i];
683
+ x = thisCopy[i];
684
684
  y2 = targetCopy[i];
685
685
  break;
686
686
  }
687
687
  }
688
- if (x2 < y2) return -1;
689
- if (y2 < x2) return 1;
688
+ if (x < y2) return -1;
689
+ if (y2 < x) return 1;
690
690
  return 0;
691
691
  };
692
692
  function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
@@ -1776,8 +1776,8 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
1776
1776
  })(buffer);
1777
1777
  const Buffer2 = buffer.Buffer;
1778
1778
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1779
- function getDefaultExportFromCjs$2(x2) {
1780
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1779
+ function getDefaultExportFromCjs$2(x) {
1780
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1781
1781
  }
1782
1782
  var sax = {};
1783
1783
  var events = { exports: {} };
@@ -1785,13 +1785,13 @@ var hasRequiredEvents;
1785
1785
  function requireEvents() {
1786
1786
  if (hasRequiredEvents) return events.exports;
1787
1787
  hasRequiredEvents = 1;
1788
- var R = typeof Reflect === "object" ? Reflect : null;
1789
- var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
1788
+ var R2 = typeof Reflect === "object" ? Reflect : null;
1789
+ var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
1790
1790
  return Function.prototype.apply.call(target, receiver, args);
1791
1791
  };
1792
1792
  var ReflectOwnKeys;
1793
- if (R && typeof R.ownKeys === "function") {
1794
- ReflectOwnKeys = R.ownKeys;
1793
+ if (R2 && typeof R2.ownKeys === "function") {
1794
+ ReflectOwnKeys = R2.ownKeys;
1795
1795
  } else if (Object.getOwnPropertySymbols) {
1796
1796
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
1797
1797
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -2181,8 +2181,8 @@ function requireInherits_browser() {
2181
2181
  }
2182
2182
  return inherits_browser.exports;
2183
2183
  }
2184
- function getDefaultExportFromCjs$1(x2) {
2185
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
2184
+ function getDefaultExportFromCjs$1(x) {
2185
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2186
2186
  }
2187
2187
  var browser$1 = { exports: {} };
2188
2188
  var process = browser$1.exports = {};
@@ -2461,18 +2461,18 @@ function requireDist() {
2461
2461
  var eBias = eMax >> 1;
2462
2462
  var nBits = -7;
2463
2463
  var i2 = isLE ? nBytes - 1 : 0;
2464
- var d = isLE ? -1 : 1;
2464
+ var d2 = isLE ? -1 : 1;
2465
2465
  var s = buffer3[offset + i2];
2466
- i2 += d;
2466
+ i2 += d2;
2467
2467
  e = s & (1 << -nBits) - 1;
2468
2468
  s >>= -nBits;
2469
2469
  nBits += eLen;
2470
- for (; nBits > 0; e = e * 256 + buffer3[offset + i2], i2 += d, nBits -= 8) {
2470
+ for (; nBits > 0; e = e * 256 + buffer3[offset + i2], i2 += d2, nBits -= 8) {
2471
2471
  }
2472
2472
  m2 = e & (1 << -nBits) - 1;
2473
2473
  e >>= -nBits;
2474
2474
  nBits += mLen;
2475
- for (; nBits > 0; m2 = m2 * 256 + buffer3[offset + i2], i2 += d, nBits -= 8) {
2475
+ for (; nBits > 0; m2 = m2 * 256 + buffer3[offset + i2], i2 += d2, nBits -= 8) {
2476
2476
  }
2477
2477
  if (e === 0) {
2478
2478
  e = 1 - eBias;
@@ -2491,7 +2491,7 @@ function requireDist() {
2491
2491
  var eBias = eMax >> 1;
2492
2492
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
2493
2493
  var i2 = isLE ? 0 : nBytes - 1;
2494
- var d = isLE ? 1 : -1;
2494
+ var d2 = isLE ? 1 : -1;
2495
2495
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
2496
2496
  value = Math.abs(value);
2497
2497
  if (isNaN(value) || value === Infinity) {
@@ -2523,13 +2523,13 @@ function requireDist() {
2523
2523
  e = 0;
2524
2524
  }
2525
2525
  }
2526
- for (; mLen >= 8; buffer3[offset + i2] = m2 & 255, i2 += d, m2 /= 256, mLen -= 8) {
2526
+ for (; mLen >= 8; buffer3[offset + i2] = m2 & 255, i2 += d2, m2 /= 256, mLen -= 8) {
2527
2527
  }
2528
2528
  e = e << mLen | m2;
2529
2529
  eLen += mLen;
2530
- for (; eLen > 0; buffer3[offset + i2] = e & 255, i2 += d, e /= 256, eLen -= 8) {
2530
+ for (; eLen > 0; buffer3[offset + i2] = e & 255, i2 += d2, e /= 256, eLen -= 8) {
2531
2531
  }
2532
- buffer3[offset + i2 - d] |= s * 128;
2532
+ buffer3[offset + i2 - d2] |= s * 128;
2533
2533
  };
2534
2534
  /*!
2535
2535
  * The buffer module from node.js, for the browser.
@@ -2763,17 +2763,17 @@ function requireDist() {
2763
2763
  );
2764
2764
  }
2765
2765
  if (a === b2) return 0;
2766
- let x2 = a.length;
2766
+ let x = a.length;
2767
2767
  let y2 = b2.length;
2768
- for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
2768
+ for (let i2 = 0, len2 = Math.min(x, y2); i2 < len2; ++i2) {
2769
2769
  if (a[i2] !== b2[i2]) {
2770
- x2 = a[i2];
2770
+ x = a[i2];
2771
2771
  y2 = b2[i2];
2772
2772
  break;
2773
2773
  }
2774
2774
  }
2775
- if (x2 < y2) return -1;
2776
- if (y2 < x2) return 1;
2775
+ if (x < y2) return -1;
2776
+ if (y2 < x) return 1;
2777
2777
  return 0;
2778
2778
  };
2779
2779
  Buffer4.isEncoding = function isEncoding(encoding) {
@@ -3022,20 +3022,20 @@ function requireDist() {
3022
3022
  thisStart >>>= 0;
3023
3023
  thisEnd >>>= 0;
3024
3024
  if (this === target) return 0;
3025
- let x2 = thisEnd - thisStart;
3025
+ let x = thisEnd - thisStart;
3026
3026
  let y2 = end - start;
3027
- const len2 = Math.min(x2, y2);
3027
+ const len2 = Math.min(x, y2);
3028
3028
  const thisCopy = this.slice(thisStart, thisEnd);
3029
3029
  const targetCopy = target.slice(start, end);
3030
3030
  for (let i2 = 0; i2 < len2; ++i2) {
3031
3031
  if (thisCopy[i2] !== targetCopy[i2]) {
3032
- x2 = thisCopy[i2];
3032
+ x = thisCopy[i2];
3033
3033
  y2 = targetCopy[i2];
3034
3034
  break;
3035
3035
  }
3036
3036
  }
3037
- if (x2 < y2) return -1;
3038
- if (y2 < x2) return 1;
3037
+ if (x < y2) return -1;
3038
+ if (y2 < x) return 1;
3039
3039
  return 0;
3040
3040
  };
3041
3041
  function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
@@ -4607,15 +4607,15 @@ function requireGetProto() {
4607
4607
  var reflectGetProto = requireReflect_getPrototypeOf();
4608
4608
  var originalGetProto = requireObject_getPrototypeOf();
4609
4609
  var getDunderProto = /* @__PURE__ */ requireGet();
4610
- getProto = reflectGetProto ? function getProto2(O) {
4611
- return reflectGetProto(O);
4612
- } : originalGetProto ? function getProto2(O) {
4613
- if (!O || typeof O !== "object" && typeof O !== "function") {
4610
+ getProto = reflectGetProto ? function getProto2(O2) {
4611
+ return reflectGetProto(O2);
4612
+ } : originalGetProto ? function getProto2(O2) {
4613
+ if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
4614
4614
  throw new TypeError("getProto: not an object");
4615
4615
  }
4616
- return originalGetProto(O);
4617
- } : getDunderProto ? function getProto2(O) {
4618
- return getDunderProto(O);
4616
+ return originalGetProto(O2);
4617
+ } : getDunderProto ? function getProto2(O2) {
4618
+ return getDunderProto(O2);
4619
4619
  } : null;
4620
4620
  return getProto;
4621
4621
  }
@@ -5283,18 +5283,18 @@ function requireForEach() {
5283
5283
  }
5284
5284
  };
5285
5285
  var forEachObject = function forEachObject2(object, iterator, receiver) {
5286
- for (var k2 in object) {
5287
- if (hasOwnProperty.call(object, k2)) {
5286
+ for (var k in object) {
5287
+ if (hasOwnProperty.call(object, k)) {
5288
5288
  if (receiver == null) {
5289
- iterator(object[k2], k2, object);
5289
+ iterator(object[k], k, object);
5290
5290
  } else {
5291
- iterator.call(receiver, object[k2], k2, object);
5291
+ iterator.call(receiver, object[k], k, object);
5292
5292
  }
5293
5293
  }
5294
5294
  }
5295
5295
  };
5296
- function isArray(x2) {
5297
- return toStr.call(x2) === "[object Array]";
5296
+ function isArray(x) {
5297
+ return toStr.call(x) === "[object Array]";
5298
5298
  }
5299
5299
  forEach = function forEach2(list, iterator, thisArg) {
5300
5300
  if (!isCallable2(iterator)) {
@@ -5903,10 +5903,10 @@ function requireUtil() {
5903
5903
  var i = 1;
5904
5904
  var args = arguments;
5905
5905
  var len = args.length;
5906
- var str = String(f).replace(formatRegExp, function(x3) {
5907
- if (x3 === "%%") return "%";
5908
- if (i >= len) return x3;
5909
- switch (x3) {
5906
+ var str = String(f).replace(formatRegExp, function(x2) {
5907
+ if (x2 === "%%") return "%";
5908
+ if (i >= len) return x2;
5909
+ switch (x2) {
5910
5910
  case "%s":
5911
5911
  return String(args[i++]);
5912
5912
  case "%d":
@@ -5918,14 +5918,14 @@ function requireUtil() {
5918
5918
  return "[Circular]";
5919
5919
  }
5920
5920
  default:
5921
- return x3;
5921
+ return x2;
5922
5922
  }
5923
5923
  });
5924
- for (var x2 = args[i]; i < len; x2 = args[++i]) {
5925
- if (isNull(x2) || !isObject(x2)) {
5926
- str += " " + x2;
5924
+ for (var x = args[i]; i < len; x = args[++i]) {
5925
+ if (isNull(x) || !isObject(x)) {
5926
+ str += " " + x;
5927
5927
  } else {
5928
- str += " " + inspect(x2);
5928
+ str += " " + inspect(x);
5929
5929
  }
5930
5930
  }
5931
5931
  return str;
@@ -6138,7 +6138,7 @@ function requireUtil() {
6138
6138
  }
6139
6139
  function formatArray(ctx, value, recurseTimes, visibleKeys, keys2) {
6140
6140
  var output = [];
6141
- for (var i = 0, l = value.length; i < l; ++i) {
6141
+ for (var i = 0, l3 = value.length; i < l3; ++i) {
6142
6142
  if (hasOwnProperty(value, String(i))) {
6143
6143
  output.push(formatProperty(
6144
6144
  ctx,
@@ -6272,8 +6272,8 @@ function requireUtil() {
6272
6272
  return typeof arg === "object" && arg !== null;
6273
6273
  }
6274
6274
  exports.isObject = isObject;
6275
- function isDate(d) {
6276
- return isObject(d) && objectToString(d) === "[object Date]";
6275
+ function isDate(d2) {
6276
+ return isObject(d2) && objectToString(d2) === "[object Date]";
6277
6277
  }
6278
6278
  exports.isDate = isDate;
6279
6279
  exports.types.isDate = isDate;
@@ -6313,13 +6313,13 @@ function requireUtil() {
6313
6313
  "Dec"
6314
6314
  ];
6315
6315
  function timestamp() {
6316
- var d = /* @__PURE__ */ new Date();
6316
+ var d2 = /* @__PURE__ */ new Date();
6317
6317
  var time = [
6318
- pad(d.getHours()),
6319
- pad(d.getMinutes()),
6320
- pad(d.getSeconds())
6318
+ pad(d2.getHours()),
6319
+ pad(d2.getMinutes()),
6320
+ pad(d2.getSeconds())
6321
6321
  ].join(":");
6322
- return [d.getDate(), months[d.getMonth()], time].join(" ");
6322
+ return [d2.getDate(), months[d2.getMonth()], time].join(" ");
6323
6323
  }
6324
6324
  exports.log = function() {
6325
6325
  console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
@@ -7237,8 +7237,8 @@ function require_stream_writable() {
7237
7237
  state2.bufferProcessing = true;
7238
7238
  var entry = state2.bufferedRequest;
7239
7239
  if (stream._writev && entry && entry.next) {
7240
- var l = state2.bufferedRequestCount;
7241
- var buffer2 = new Array(l);
7240
+ var l3 = state2.bufferedRequestCount;
7241
+ var buffer2 = new Array(l3);
7242
7242
  var holder = state2.corkedRequestsFree;
7243
7243
  holder.entry = entry;
7244
7244
  var count = 0;
@@ -8788,9 +8788,9 @@ function require_stream_readable() {
8788
8788
  return from(Readable, iterable, opts);
8789
8789
  };
8790
8790
  }
8791
- function indexOf(xs, x2) {
8792
- for (var i = 0, l = xs.length; i < l; i++) {
8793
- if (xs[i] === x2) return i;
8791
+ function indexOf(xs, x) {
8792
+ for (var i = 0, l3 = xs.length; i < l3; i++) {
8793
+ if (xs[i] === x) return i;
8794
8794
  }
8795
8795
  return -1;
8796
8796
  }
@@ -9169,7 +9169,7 @@ function requireSax() {
9169
9169
  function checkBufferLength(parser) {
9170
9170
  var maxAllowed = Math.max(sax2.MAX_BUFFER_LENGTH, 10);
9171
9171
  var maxActual = 0;
9172
- for (var i = 0, l = buffers.length; i < l; i++) {
9172
+ for (var i = 0, l3 = buffers.length; i < l3; i++) {
9173
9173
  var len = parser[buffers[i]].length;
9174
9174
  if (len > maxAllowed) {
9175
9175
  switch (buffers[i]) {
@@ -9194,7 +9194,7 @@ function requireSax() {
9194
9194
  parser.bufferCheckPosition = m2 + parser.position;
9195
9195
  }
9196
9196
  function clearBuffers(parser) {
9197
- for (var i = 0, l = buffers.length; i < l; i++) {
9197
+ for (var i = 0, l3 = buffers.length; i < l3; i++) {
9198
9198
  parser[buffers[i]] = "";
9199
9199
  }
9200
9200
  }
@@ -9248,27 +9248,27 @@ function requireSax() {
9248
9248
  this._parser = new SAXParser(strict, opt);
9249
9249
  this.writable = true;
9250
9250
  this.readable = true;
9251
- var me2 = this;
9251
+ var me = this;
9252
9252
  this._parser.onend = function() {
9253
- me2.emit("end");
9253
+ me.emit("end");
9254
9254
  };
9255
9255
  this._parser.onerror = function(er) {
9256
- me2.emit("error", er);
9257
- me2._parser.error = null;
9256
+ me.emit("error", er);
9257
+ me._parser.error = null;
9258
9258
  };
9259
9259
  this._decoder = null;
9260
9260
  streamWraps.forEach(function(ev) {
9261
- Object.defineProperty(me2, "on" + ev, {
9261
+ Object.defineProperty(me, "on" + ev, {
9262
9262
  get: function() {
9263
- return me2._parser["on" + ev];
9263
+ return me._parser["on" + ev];
9264
9264
  },
9265
9265
  set: function(h2) {
9266
9266
  if (!h2) {
9267
- me2.removeAllListeners(ev);
9268
- me2._parser["on" + ev] = h2;
9267
+ me.removeAllListeners(ev);
9268
+ me._parser["on" + ev] = h2;
9269
9269
  return h2;
9270
9270
  }
9271
- me2.on(ev, h2);
9271
+ me.on(ev, h2);
9272
9272
  },
9273
9273
  enumerable: true,
9274
9274
  configurable: false
@@ -9300,15 +9300,15 @@ function requireSax() {
9300
9300
  return true;
9301
9301
  };
9302
9302
  SAXStream.prototype.on = function(ev, handler2) {
9303
- var me2 = this;
9304
- if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9305
- me2._parser["on" + ev] = function() {
9303
+ var me = this;
9304
+ if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9305
+ me._parser["on" + ev] = function() {
9306
9306
  var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
9307
9307
  args.splice(0, 0, ev);
9308
- me2.emit.apply(me2, args);
9308
+ me.emit.apply(me, args);
9309
9309
  };
9310
9310
  }
9311
- return Stream.prototype.on.call(me2, ev, handler2);
9311
+ return Stream.prototype.on.call(me, ev, handler2);
9312
9312
  };
9313
9313
  var CDATA = "[CDATA[";
9314
9314
  var DOCTYPE = "DOCTYPE";
@@ -9814,7 +9814,7 @@ function requireSax() {
9814
9814
  });
9815
9815
  });
9816
9816
  }
9817
- for (var i = 0, l = parser.attribList.length; i < l; i++) {
9817
+ for (var i = 0, l3 = parser.attribList.length; i < l3; i++) {
9818
9818
  var nv = parser.attribList[i];
9819
9819
  var name = nv[0];
9820
9820
  var value = nv[1];
@@ -9900,9 +9900,9 @@ function requireSax() {
9900
9900
  var tag = parser.tag = parser.tags.pop();
9901
9901
  parser.tagName = parser.tag.name;
9902
9902
  emitNode(parser, "onclosetag", parser.tagName);
9903
- var x2 = {};
9903
+ var x = {};
9904
9904
  for (var i in tag.ns) {
9905
- x2[i] = tag.ns[i];
9905
+ x[i] = tag.ns[i];
9906
9906
  }
9907
9907
  var parent = parser.tags[parser.tags.length - 1] || parser;
9908
9908
  if (parser.opt.xmlns && tag.ns !== parent.ns) {
@@ -10959,8 +10959,8 @@ function requireXml2json() {
10959
10959
  js = xml2js2(xml, options);
10960
10960
  parentKey = "compact" in options && options.compact ? "_parent" : "parent";
10961
10961
  if ("addParent" in options && options.addParent) {
10962
- json = JSON.stringify(js, function(k2, v2) {
10963
- return k2 === parentKey ? "_" : v2;
10962
+ json = JSON.stringify(js, function(k, v2) {
10963
+ return k === parentKey ? "_" : v2;
10964
10964
  }, options.spaces);
10965
10965
  } else {
10966
10966
  json = JSON.stringify(js, null, options.spaces);
@@ -11382,8 +11382,8 @@ function v4(options, buf, offset) {
11382
11382
  rnds[8] = rnds[8] & 63 | 128;
11383
11383
  return unsafeStringify(rnds);
11384
11384
  }
11385
- function getDefaultExportFromCjs(x2) {
11386
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
11385
+ function getDefaultExportFromCjs(x) {
11386
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
11387
11387
  }
11388
11388
  const CRC_TABLE = new Int32Array([
11389
11389
  0,
@@ -12756,9 +12756,9 @@ class ResolvedPos {
12756
12756
  blockRange(other = this, pred) {
12757
12757
  if (other.pos < this.pos)
12758
12758
  return other.blockRange(this);
12759
- for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)
12760
- if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))
12761
- return new NodeRange(this, other, d);
12759
+ for (let d2 = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d2 >= 0; d2--)
12760
+ if (other.pos <= this.end(d2) && (!pred || pred(this.node(d2))))
12761
+ return new NodeRange(this, other, d2);
12762
12762
  return null;
12763
12763
  }
12764
12764
  /**
@@ -14777,8 +14777,8 @@ class ParseContext {
14777
14777
  textblockFromContext() {
14778
14778
  let $context = this.options.context;
14779
14779
  if ($context)
14780
- for (let d = $context.depth; d >= 0; d--) {
14781
- let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;
14780
+ for (let d2 = $context.depth; d2 >= 0; d2--) {
14781
+ let deflt = $context.node(d2).contentMatchAt($context.indexAfter(d2)).defaultType;
14782
14782
  if (deflt && deflt.isTextblock && deflt.defaultAttrs)
14783
14783
  return deflt;
14784
14784
  }
@@ -15199,8 +15199,8 @@ function polygonToObj(polygonNode) {
15199
15199
  const points = [];
15200
15200
  polygonNode.elements.forEach((element) => {
15201
15201
  if (["wp:start", "wp:lineTo"].includes(element.name)) {
15202
- const { x: x2, y: y2 } = element.attributes;
15203
- points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
15202
+ const { x, y: y2 } = element.attributes;
15203
+ points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15204
15204
  }
15205
15205
  });
15206
15206
  if (points.length > 1) {
@@ -15223,13 +15223,13 @@ function objToPolygon(points) {
15223
15223
  elements: []
15224
15224
  };
15225
15225
  points.forEach((point, index2) => {
15226
- const [x2, y2] = point;
15226
+ const [x, y2] = point;
15227
15227
  const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15228
15228
  const pointNode = {
15229
15229
  name: tagName,
15230
15230
  type: tagName,
15231
15231
  attributes: {
15232
- x: pixelsToPolygonUnits(x2),
15232
+ x: pixelsToPolygonUnits(x),
15233
15233
  y: pixelsToPolygonUnits(y2)
15234
15234
  }
15235
15235
  };
@@ -17461,19 +17461,19 @@ function lift(tr, range2, target) {
17461
17461
  let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
17462
17462
  let start = gapStart, end = gapEnd;
17463
17463
  let before = Fragment.empty, openStart = 0;
17464
- for (let d = depth, splitting = false; d > target; d--)
17465
- if (splitting || $from.index(d) > 0) {
17464
+ for (let d2 = depth, splitting = false; d2 > target; d2--)
17465
+ if (splitting || $from.index(d2) > 0) {
17466
17466
  splitting = true;
17467
- before = Fragment.from($from.node(d).copy(before));
17467
+ before = Fragment.from($from.node(d2).copy(before));
17468
17468
  openStart++;
17469
17469
  } else {
17470
17470
  start--;
17471
17471
  }
17472
17472
  let after = Fragment.empty, openEnd = 0;
17473
- for (let d = depth, splitting = false; d > target; d--)
17474
- if (splitting || $to.after(d + 1) < $to.end(d)) {
17473
+ for (let d2 = depth, splitting = false; d2 > target; d2--)
17474
+ if (splitting || $to.after(d2 + 1) < $to.end(d2)) {
17475
17475
  splitting = true;
17476
- after = Fragment.from($to.node(d).copy(after));
17476
+ after = Fragment.from($to.node(d2).copy(after));
17477
17477
  openEnd++;
17478
17478
  } else {
17479
17479
  end++;
@@ -17593,8 +17593,8 @@ function canSplit(doc2, pos, depth = 1, typesAfter) {
17593
17593
  let innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;
17594
17594
  if (base < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))
17595
17595
  return false;
17596
- for (let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {
17597
- let node = $pos.node(d), index3 = $pos.index(d);
17596
+ for (let d2 = $pos.depth - 1, i = depth - 2; d2 > base; d2--, i--) {
17597
+ let node = $pos.node(d2), index3 = $pos.index(d2);
17598
17598
  if (node.type.spec.isolating)
17599
17599
  return false;
17600
17600
  let rest = node.content.cutByIndex(index3, node.childCount);
@@ -17611,10 +17611,10 @@ function canSplit(doc2, pos, depth = 1, typesAfter) {
17611
17611
  }
17612
17612
  function split(tr, pos, depth = 1, typesAfter) {
17613
17613
  let $pos = tr.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;
17614
- for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {
17615
- before = Fragment.from($pos.node(d).copy(before));
17614
+ for (let d2 = $pos.depth, e = $pos.depth - depth, i = depth - 1; d2 > e; d2--, i--) {
17615
+ before = Fragment.from($pos.node(d2).copy(before));
17616
17616
  let typeAfter = typesAfter && typesAfter[i];
17617
- after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
17617
+ after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after));
17618
17618
  }
17619
17619
  tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));
17620
17620
  }
@@ -17643,24 +17643,24 @@ function joinable(a, b2) {
17643
17643
  }
17644
17644
  function joinPoint(doc2, pos, dir = -1) {
17645
17645
  let $pos = doc2.resolve(pos);
17646
- for (let d = $pos.depth; ; d--) {
17647
- let before, after, index2 = $pos.index(d);
17648
- if (d == $pos.depth) {
17646
+ for (let d2 = $pos.depth; ; d2--) {
17647
+ let before, after, index2 = $pos.index(d2);
17648
+ if (d2 == $pos.depth) {
17649
17649
  before = $pos.nodeBefore;
17650
17650
  after = $pos.nodeAfter;
17651
17651
  } else if (dir > 0) {
17652
- before = $pos.node(d + 1);
17652
+ before = $pos.node(d2 + 1);
17653
17653
  index2++;
17654
- after = $pos.node(d).maybeChild(index2);
17654
+ after = $pos.node(d2).maybeChild(index2);
17655
17655
  } else {
17656
- before = $pos.node(d).maybeChild(index2 - 1);
17657
- after = $pos.node(d + 1);
17656
+ before = $pos.node(d2).maybeChild(index2 - 1);
17657
+ after = $pos.node(d2 + 1);
17658
17658
  }
17659
- if (before && !before.isTextblock && joinable(before, after) && $pos.node(d).canReplace(index2, index2 + 1))
17659
+ if (before && !before.isTextblock && joinable(before, after) && $pos.node(d2).canReplace(index2, index2 + 1))
17660
17660
  return pos;
17661
- if (d == 0)
17661
+ if (d2 == 0)
17662
17662
  break;
17663
- pos = dir < 0 ? $pos.before(d) : $pos.after(d);
17663
+ pos = dir < 0 ? $pos.before(d2) : $pos.after(d2);
17664
17664
  }
17665
17665
  }
17666
17666
  function join(tr, pos, depth) {
@@ -17695,19 +17695,19 @@ function insertPoint(doc2, pos, nodeType) {
17695
17695
  if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType))
17696
17696
  return pos;
17697
17697
  if ($pos.parentOffset == 0)
17698
- for (let d = $pos.depth - 1; d >= 0; d--) {
17699
- let index2 = $pos.index(d);
17700
- if ($pos.node(d).canReplaceWith(index2, index2, nodeType))
17701
- return $pos.before(d + 1);
17698
+ for (let d2 = $pos.depth - 1; d2 >= 0; d2--) {
17699
+ let index2 = $pos.index(d2);
17700
+ if ($pos.node(d2).canReplaceWith(index2, index2, nodeType))
17701
+ return $pos.before(d2 + 1);
17702
17702
  if (index2 > 0)
17703
17703
  return null;
17704
17704
  }
17705
17705
  if ($pos.parentOffset == $pos.parent.content.size)
17706
- for (let d = $pos.depth - 1; d >= 0; d--) {
17707
- let index2 = $pos.indexAfter(d);
17708
- if ($pos.node(d).canReplaceWith(index2, index2, nodeType))
17709
- return $pos.after(d + 1);
17710
- if (index2 < $pos.node(d).childCount)
17706
+ for (let d2 = $pos.depth - 1; d2 >= 0; d2--) {
17707
+ let index2 = $pos.indexAfter(d2);
17708
+ if ($pos.node(d2).canReplaceWith(index2, index2, nodeType))
17709
+ return $pos.after(d2 + 1);
17710
+ if (index2 < $pos.node(d2).childCount)
17711
17711
  return null;
17712
17712
  }
17713
17713
  return null;
@@ -17720,10 +17720,10 @@ function dropPoint(doc2, pos, slice) {
17720
17720
  for (let i = 0; i < slice.openStart; i++)
17721
17721
  content = content.firstChild.content;
17722
17722
  for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {
17723
- for (let d = $pos.depth; d >= 0; d--) {
17724
- let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;
17725
- let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);
17726
- let parent = $pos.node(d), fits = false;
17723
+ for (let d2 = $pos.depth; d2 >= 0; d2--) {
17724
+ let bias = d2 == $pos.depth ? 0 : $pos.pos <= ($pos.start(d2 + 1) + $pos.end(d2 + 1)) / 2 ? -1 : 1;
17725
+ let insertPos = $pos.index(d2) + (bias > 0 ? 1 : 0);
17726
+ let parent = $pos.node(d2), fits = false;
17727
17727
  if (pass == 1) {
17728
17728
  fits = parent.canReplace(insertPos, insertPos, content);
17729
17729
  } else {
@@ -17731,7 +17731,7 @@ function dropPoint(doc2, pos, slice) {
17731
17731
  fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);
17732
17732
  }
17733
17733
  if (fits)
17734
- return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);
17734
+ return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d2 + 1) : $pos.after(d2 + 1);
17735
17735
  }
17736
17736
  }
17737
17737
  return null;
@@ -17797,12 +17797,12 @@ class Fitter {
17797
17797
  // depths, one for the slice and one for the frontier.
17798
17798
  findFittable() {
17799
17799
  let startDepth = this.unplaced.openStart;
17800
- for (let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {
17800
+ for (let cur = this.unplaced.content, d2 = 0, openEnd = this.unplaced.openEnd; d2 < startDepth; d2++) {
17801
17801
  let node = cur.firstChild;
17802
17802
  if (cur.childCount > 1)
17803
17803
  openEnd = 0;
17804
- if (node.type.spec.isolating && openEnd <= d) {
17805
- startDepth = d;
17804
+ if (node.type.spec.isolating && openEnd <= d2) {
17805
+ startDepth = d2;
17806
17806
  break;
17807
17807
  }
17808
17808
  cur = node.content;
@@ -17908,9 +17908,9 @@ class Fitter {
17908
17908
  let fit = contentAfterFits($to, i, type2, match, dropInner);
17909
17909
  if (!fit)
17910
17910
  continue;
17911
- for (let d = i - 1; d >= 0; d--) {
17912
- let { match: match2, type: type3 } = this.frontier[d];
17913
- let matches2 = contentAfterFits($to, d, type3, match2, true);
17911
+ for (let d2 = i - 1; d2 >= 0; d2--) {
17912
+ let { match: match2, type: type3 } = this.frontier[d2];
17913
+ let matches2 = contentAfterFits($to, d2, type3, match2, true);
17914
17914
  if (!matches2 || matches2.childCount)
17915
17915
  continue scan;
17916
17916
  }
@@ -17926,8 +17926,8 @@ class Fitter {
17926
17926
  if (close2.fit.childCount)
17927
17927
  this.placed = addToFragment(this.placed, close2.depth, close2.fit);
17928
17928
  $to = close2.move;
17929
- for (let d = close2.depth + 1; d <= $to.depth; d++) {
17930
- let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));
17929
+ for (let d2 = close2.depth + 1; d2 <= $to.depth; d2++) {
17930
+ let node = $to.node(d2), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d2));
17931
17931
  this.openFrontierNode(node.type, node.attrs, add);
17932
17932
  }
17933
17933
  return $to;
@@ -18000,14 +18000,14 @@ function replaceRange(tr, from, to, slice) {
18000
18000
  targetDepths.pop();
18001
18001
  let preferredTarget = -($from.depth + 1);
18002
18002
  targetDepths.unshift(preferredTarget);
18003
- for (let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {
18004
- let spec = $from.node(d).type.spec;
18003
+ for (let d2 = $from.depth, pos = $from.pos - 1; d2 > 0; d2--, pos--) {
18004
+ let spec = $from.node(d2).type.spec;
18005
18005
  if (spec.defining || spec.definingAsContext || spec.isolating)
18006
18006
  break;
18007
- if (targetDepths.indexOf(d) > -1)
18008
- preferredTarget = d;
18009
- else if ($from.before(d) == pos)
18010
- targetDepths.splice(1, 0, -d);
18007
+ if (targetDepths.indexOf(d2) > -1)
18008
+ preferredTarget = d2;
18009
+ else if ($from.before(d2) == pos)
18010
+ targetDepths.splice(1, 0, -d2);
18011
18011
  }
18012
18012
  let preferredTargetIndex = targetDepths.indexOf(preferredTarget);
18013
18013
  let leftNodes = [], preferredDepth = slice.openStart;
@@ -18018,10 +18018,10 @@ function replaceRange(tr, from, to, slice) {
18018
18018
  break;
18019
18019
  content = node.content;
18020
18020
  }
18021
- for (let d = preferredDepth - 1; d >= 0; d--) {
18022
- let leftNode = leftNodes[d], def = definesContent(leftNode.type);
18021
+ for (let d2 = preferredDepth - 1; d2 >= 0; d2--) {
18022
+ let leftNode = leftNodes[d2], def = definesContent(leftNode.type);
18023
18023
  if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))
18024
- preferredDepth = d;
18024
+ preferredDepth = d2;
18025
18025
  else if (def || !leftNode.type.isTextblock)
18026
18026
  break;
18027
18027
  }
@@ -18083,20 +18083,20 @@ function deleteRange(tr, from, to) {
18083
18083
  if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))
18084
18084
  return tr.delete($from.before(depth), $to.after(depth));
18085
18085
  }
18086
- for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {
18087
- if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d && $from.start(d - 1) == $to.start(d - 1) && $from.node(d - 1).canReplace($from.index(d - 1), $to.index(d - 1)))
18088
- return tr.delete($from.before(d), to);
18086
+ for (let d2 = 1; d2 <= $from.depth && d2 <= $to.depth; d2++) {
18087
+ if (from - $from.start(d2) == $from.depth - d2 && to > $from.end(d2) && $to.end(d2) - to != $to.depth - d2 && $from.start(d2 - 1) == $to.start(d2 - 1) && $from.node(d2 - 1).canReplace($from.index(d2 - 1), $to.index(d2 - 1)))
18088
+ return tr.delete($from.before(d2), to);
18089
18089
  }
18090
18090
  tr.delete(from, to);
18091
18091
  }
18092
18092
  function coveredDepths($from, $to) {
18093
18093
  let result = [], minDepth = Math.min($from.depth, $to.depth);
18094
- for (let d = minDepth; d >= 0; d--) {
18095
- let start = $from.start(d);
18096
- if (start < $from.pos - ($from.depth - d) || $to.end(d) > $to.pos + ($to.depth - d) || $from.node(d).type.spec.isolating || $to.node(d).type.spec.isolating)
18094
+ for (let d2 = minDepth; d2 >= 0; d2--) {
18095
+ let start = $from.start(d2);
18096
+ if (start < $from.pos - ($from.depth - d2) || $to.end(d2) > $to.pos + ($to.depth - d2) || $from.node(d2).type.spec.isolating || $to.node(d2).type.spec.isolating)
18097
18097
  break;
18098
- if (start == $to.start(d) || d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d && $to.start(d - 1) == start - 1)
18099
- result.push(d);
18098
+ if (start == $to.start(d2) || d2 == $from.depth && d2 == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d2 && $to.start(d2 - 1) == start - 1)
18099
+ result.push(d2);
18100
18100
  }
18101
18101
  return result;
18102
18102
  }
@@ -22856,7 +22856,7 @@ function posToDOMRect(view, from, to) {
22856
22856
  const right = Math.max(start.right, end.right);
22857
22857
  const width = right - left;
22858
22858
  const height = bottom - top;
22859
- const x2 = left;
22859
+ const x = left;
22860
22860
  const y2 = top;
22861
22861
  const data = {
22862
22862
  top,
@@ -22865,7 +22865,7 @@ function posToDOMRect(view, from, to) {
22865
22865
  right,
22866
22866
  width,
22867
22867
  height,
22868
- x: x2,
22868
+ x,
22869
22869
  y: y2
22870
22870
  };
22871
22871
  return {
@@ -22875,8 +22875,8 @@ function posToDOMRect(view, from, to) {
22875
22875
  }
22876
22876
  const isInTable = (state2) => {
22877
22877
  const { $head } = state2.selection;
22878
- for (let d = $head.depth; d > 0; d -= 1) {
22879
- if ($head.node(d).type?.spec?.tableRole === "row") {
22878
+ for (let d2 = $head.depth; d2 > 0; d2 -= 1) {
22879
+ if ($head.node(d2).type?.spec?.tableRole === "row") {
22880
22880
  return true;
22881
22881
  }
22882
22882
  }
@@ -22929,7 +22929,7 @@ function stripHtmlStyles(html) {
22929
22929
  function cleanStyle(style) {
22930
22930
  if (!style) return "";
22931
22931
  const declarations = style.split(";").map((s) => s.trim()).filter(Boolean);
22932
- const textAlign = declarations.find((d) => d.startsWith("text-align"));
22932
+ const textAlign = declarations.find((d2) => d2.startsWith("text-align"));
22933
22933
  return textAlign ? `${textAlign};` : "";
22934
22934
  }
22935
22935
  function preserveSpaces(innerHtml) {
@@ -22954,39 +22954,39 @@ function createDocFromHTML(content, schema, options = {}) {
22954
22954
  function L() {
22955
22955
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
22956
22956
  }
22957
- var T = L();
22958
- function G(u3) {
22959
- T = u3;
22957
+ var O = L();
22958
+ function G(l3) {
22959
+ O = l3;
22960
22960
  }
22961
- var I = { exec: () => null };
22962
- function h(u3, e = "") {
22963
- let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
22961
+ var E = { exec: () => null };
22962
+ function h(l3, e = "") {
22963
+ let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
22964
22964
  let s = typeof i == "string" ? i : i.source;
22965
22965
  return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
22966
22966
  }, getRegex: () => new RegExp(t, e) };
22967
22967
  return n;
22968
22968
  }
22969
- 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: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, be = /^(?:[ \t]*(?:\n|$))+/, Re = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, E = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {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 = h(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(), we = h(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]+)*)/, ye = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pe = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Se = h(/^( {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 = 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(), ae = h(j).replace("hr", E).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", ae).getRegex(), K = { blockquote: _e, code: Re, def: Pe, fences: Te, heading: Oe, hr: E, html: $e, lheading: oe, list: Se, newline: be, paragraph: ae, table: I, text: ye }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", E).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(), Le = { ...K, lheading: we, table: re, paragraph: h(j).replace("hr", E).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() }, Me = { ...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: I, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
22970
- ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, ze = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ae = /^(`+)([^`]|[^`][\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, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Be = /(?:[^\s\p{P}\p{S}]|~)/u, qe = h(/link|code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code", /(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ve = h(ce, "u").replace(/punct/g, D).getRegex(), De = h(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", He = h(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ze = h(he$3, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, Ce).replace(/punct/g, pe).getRegex(), Ge = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ne = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Fe = 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(), Qe = 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]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ue = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ke = h("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: I, anyPunctuation: Ne, autolink: Fe, blockSkip: qe, br: le, code: Ae, del: I, emStrongLDelim: ve, emStrongRDelimAst: He, emStrongRDelimUnd: Ge, escape: ze, link: Ue, nolink: ke, punctuation: Ee, reflink: de, reflinkSearch: Ke, tag: Qe, text: Ie, url: I }, We = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ze, emStrongLDelim: De, url: h(/^((?: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: h(/^([`~]+|[^`~])(?:(?= {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() }, Xe = { ...N, br: h(le).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Le, pedantic: Me }, M = { normal: X, gfm: N, breaks: Xe, pedantic: We };
22971
- var Je = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (u3) => Je[u3];
22972
- function w(u3, e) {
22969
+ 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} *[^
22970
+ ]`).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 };
22971
+ var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
22972
+ function w(l3, e) {
22973
22973
  if (e) {
22974
- if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ge);
22975
- } else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ge);
22976
- return u3;
22974
+ if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
22975
+ } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
22976
+ return l3;
22977
22977
  }
22978
- function J(u3) {
22978
+ function J(l3) {
22979
22979
  try {
22980
- u3 = encodeURI(u3).replace(m.percentDecode, "%");
22980
+ l3 = encodeURI(l3).replace(m.percentDecode, "%");
22981
22981
  } catch {
22982
22982
  return null;
22983
22983
  }
22984
- return u3;
22984
+ return l3;
22985
22985
  }
22986
- function V(u3, e) {
22987
- let t = u3.replace(m.findPipe, (i, s, o) => {
22988
- let a = false, l = s;
22989
- for (; --l >= 0 && o[l] === "\\"; ) a = !a;
22986
+ function V(l3, e) {
22987
+ let t = l3.replace(m.findPipe, (i, s, o) => {
22988
+ let a = false, u = s;
22989
+ for (; --u >= 0 && o[u] === "\\"; ) a = !a;
22990
22990
  return a ? "|" : " |";
22991
22991
  }), n = t.split(m.splitPipe), r = 0;
22992
22992
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
@@ -22994,33 +22994,33 @@ function V(u3, e) {
22994
22994
  for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
22995
22995
  return n;
22996
22996
  }
22997
- function z(u3, e, t) {
22998
- let n = u3.length;
22997
+ function z(l3, e, t) {
22998
+ let n = l3.length;
22999
22999
  if (n === 0) return "";
23000
23000
  let r = 0;
23001
23001
  for (; r < n; ) {
23002
- let i = u3.charAt(n - r - 1);
23002
+ let i = l3.charAt(n - r - 1);
23003
23003
  if (i === e && true) r++;
23004
23004
  else break;
23005
23005
  }
23006
- return u3.slice(0, n - r);
23006
+ return l3.slice(0, n - r);
23007
23007
  }
23008
- function fe(u3, e) {
23009
- if (u3.indexOf(e[1]) === -1) return -1;
23008
+ function ge(l3, e) {
23009
+ if (l3.indexOf(e[1]) === -1) return -1;
23010
23010
  let t = 0;
23011
- for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
23012
- else if (u3[n] === e[0]) t++;
23013
- else if (u3[n] === e[1] && (t--, t < 0)) return n;
23011
+ for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
23012
+ else if (l3[n] === e[0]) t++;
23013
+ else if (l3[n] === e[1] && (t--, t < 0)) return n;
23014
23014
  return t > 0 ? -2 : -1;
23015
23015
  }
23016
- function me(u3, e, t, n, r) {
23017
- let i = e.href, s = e.title || null, o = u3[1].replace(r.other.outputLinkReplace, "$1");
23016
+ function fe(l3, e, t, n, r) {
23017
+ let i = e.href, s = e.title || null, o = l3[1].replace(r.other.outputLinkReplace, "$1");
23018
23018
  n.state.inLink = true;
23019
- let a = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
23019
+ let a = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
23020
23020
  return n.state.inLink = false, a;
23021
23021
  }
23022
- function Ve(u3, e, t) {
23023
- let n = u3.match(t.other.indentCodeCompensation);
23022
+ function Je(l3, e, t) {
23023
+ let n = l3.match(t.other.indentCodeCompensation);
23024
23024
  if (n === null) return e;
23025
23025
  let r = n[1];
23026
23026
  return e.split(`
@@ -23037,7 +23037,7 @@ var y = class {
23037
23037
  __publicField(this, "options");
23038
23038
  __publicField(this, "rules");
23039
23039
  __publicField(this, "lexer");
23040
- this.options = e || T;
23040
+ this.options = e || O;
23041
23041
  }
23042
23042
  space(e) {
23043
23043
  let t = this.rules.block.newline.exec(e);
@@ -23054,7 +23054,7 @@ var y = class {
23054
23054
  fences(e) {
23055
23055
  let t = this.rules.block.fences.exec(e);
23056
23056
  if (t) {
23057
- let n = t[0], r = Ve(n, t[3] || "", this.rules);
23057
+ let n = t[0], r = Je(n, t[3] || "", this.rules);
23058
23058
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
23059
23059
  }
23060
23060
  }
@@ -23081,32 +23081,32 @@ var y = class {
23081
23081
  `).split(`
23082
23082
  `), r = "", i = "", s = [];
23083
23083
  for (; n.length > 0; ) {
23084
- let o = false, a = [], l;
23085
- for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) a.push(n[l]), o = true;
23086
- else if (!o) a.push(n[l]);
23084
+ let o = false, a = [], u;
23085
+ for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a.push(n[u]), o = true;
23086
+ else if (!o) a.push(n[u]);
23087
23087
  else break;
23088
- n = n.slice(l);
23089
- let c = a.join(`
23090
- `), p = c.replace(this.rules.other.blockquoteSetextReplace, `
23088
+ n = n.slice(u);
23089
+ let p = a.join(`
23090
+ `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
23091
23091
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
23092
23092
  r = r ? `${r}
23093
- ${c}` : c, i = i ? `${i}
23094
- ${p}` : p;
23095
- let g = this.lexer.state.top;
23096
- if (this.lexer.state.top = true, this.lexer.blockTokens(p, s, true), this.lexer.state.top = g, n.length === 0) break;
23097
- let d = s.at(-1);
23098
- if (d?.type === "code") break;
23099
- if (d?.type === "blockquote") {
23100
- let R = d, f = R.raw + `
23093
+ ${p}` : p, i = i ? `${i}
23094
+ ${c}` : c;
23095
+ let f = this.lexer.state.top;
23096
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = f, n.length === 0) break;
23097
+ let k = s.at(-1);
23098
+ if (k?.type === "code") break;
23099
+ if (k?.type === "blockquote") {
23100
+ let x = k, g = x.raw + `
23101
23101
  ` + n.join(`
23102
- `), O = this.blockquote(f);
23103
- 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;
23102
+ `), T = this.blockquote(g);
23103
+ 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;
23104
23104
  break;
23105
- } else if (d?.type === "list") {
23106
- let R = d, f = R.raw + `
23105
+ } else if (k?.type === "list") {
23106
+ let x = k, g = x.raw + `
23107
23107
  ` + n.join(`
23108
- `), O = this.list(f);
23109
- s[s.length - 1] = O, r = r.substring(0, r.length - d.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
23108
+ `), T = this.list(g);
23109
+ 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(`
23110
23110
  `);
23111
23111
  continue;
23112
23112
  }
@@ -23121,43 +23121,43 @@ ${p}` : p;
23121
23121
  n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
23122
23122
  let s = this.rules.other.listItemRegex(n), o = false;
23123
23123
  for (; e; ) {
23124
- let l = false, c = "", p = "";
23124
+ let u = false, p = "", c = "";
23125
23125
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
23126
- c = t[0], e = e.substring(c.length);
23127
- let g = t[2].split(`
23128
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), d = e.split(`
23129
- `, 1)[0], R = !g.trim(), f = 0;
23130
- if (this.options.pedantic ? (f = 2, p = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, p = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(d) && (c += d + `
23131
- `, e = e.substring(d.length + 1), l = true), !l) {
23132
- 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);
23126
+ p = t[0], e = e.substring(p.length);
23127
+ let f = t[2].split(`
23128
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
23129
+ `, 1)[0], x = !f.trim(), g = 0;
23130
+ 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 + `
23131
+ `, e = e.substring(k.length + 1), u = true), !u) {
23132
+ 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);
23133
23133
  for (; e; ) {
23134
23134
  let Z = e.split(`
23135
23135
  `, 1)[0], A;
23136
- if (d = Z, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), A = d) : A = d.replace(this.rules.other.tabCharGlobal, " "), te.test(d) || ne.test(d) || xe.test(d) || H.test(d) || ee.test(d)) break;
23137
- if (A.search(this.rules.other.nonSpaceChar) >= f || !d.trim()) p += `
23138
- ` + A.slice(f);
23136
+ 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;
23137
+ if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
23138
+ ` + A.slice(g);
23139
23139
  else {
23140
- if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
23141
- p += `
23142
- ` + d;
23140
+ if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f) || ne.test(f) || ee.test(f)) break;
23141
+ c += `
23142
+ ` + k;
23143
23143
  }
23144
- !R && !d.trim() && (R = true), c += Z + `
23145
- `, e = e.substring(Z.length + 1), g = A.slice(f);
23144
+ !x && !k.trim() && (x = true), p += Z + `
23145
+ `, e = e.substring(Z.length + 1), f = A.slice(g);
23146
23146
  }
23147
23147
  }
23148
- i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(c) && (o = true));
23149
- let O = null, Y;
23150
- this.options.gfm && (O = this.rules.other.listIsTask.exec(p), O && (Y = O[0] !== "[ ] ", p = p.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: c, task: !!O, checked: Y, loose: false, text: p, tokens: [] }), i.raw += c;
23148
+ i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
23149
+ let T = null, Y;
23150
+ 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;
23151
23151
  }
23152
23152
  let a = i.items.at(-1);
23153
23153
  if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
23154
23154
  else return;
23155
23155
  i.raw = i.raw.trimEnd();
23156
- for (let l = 0; l < i.items.length; l++) if (this.lexer.state.top = false, i.items[l].tokens = this.lexer.blockTokens(i.items[l].text, []), !i.loose) {
23157
- let c = i.items[l].tokens.filter((g) => g.type === "space"), p = c.length > 0 && c.some((g) => this.rules.other.anyLine.test(g.raw));
23158
- i.loose = p;
23156
+ 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) {
23157
+ 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));
23158
+ i.loose = c;
23159
23159
  }
23160
- if (i.loose) for (let l = 0; l < i.items.length; l++) i.items[l].loose = true;
23160
+ if (i.loose) for (let u = 0; u < i.items.length; u++) i.items[u].loose = true;
23161
23161
  return i;
23162
23162
  }
23163
23163
  }
@@ -23180,7 +23180,7 @@ ${p}` : p;
23180
23180
  if (n.length === r.length) {
23181
23181
  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);
23182
23182
  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] });
23183
- for (let o of i) s.rows.push(V(o, s.header.length).map((a, l) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[l] })));
23183
+ 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] })));
23184
23184
  return s;
23185
23185
  }
23186
23186
  }
@@ -23217,7 +23217,7 @@ ${p}` : p;
23217
23217
  let s = z(n.slice(0, -1), "\\");
23218
23218
  if ((n.length - s.length) % 2 === 0) return;
23219
23219
  } else {
23220
- let s = fe(t[2], "()");
23220
+ let s = ge(t[2], "()");
23221
23221
  if (s === -2) return;
23222
23222
  if (s > -1) {
23223
23223
  let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
@@ -23229,7 +23229,7 @@ ${p}` : p;
23229
23229
  let s = this.rules.other.pedanticHrefTitle.exec(r);
23230
23230
  s && (r = s[1], i = s[3]);
23231
23231
  } else i = t[3] ? t[3].slice(1, -1) : "";
23232
- 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);
23232
+ 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);
23233
23233
  }
23234
23234
  }
23235
23235
  reflink(e, t) {
@@ -23240,32 +23240,32 @@ ${p}` : p;
23240
23240
  let s = n[0].charAt(0);
23241
23241
  return { type: "text", raw: s, text: s };
23242
23242
  }
23243
- return me(n, i, n[0], this.lexer, this.rules);
23243
+ return fe(n, i, n[0], this.lexer, this.rules);
23244
23244
  }
23245
23245
  }
23246
23246
  emStrong(e, t, n = "") {
23247
23247
  let r = this.rules.inline.emStrongLDelim.exec(e);
23248
23248
  if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
23249
23249
  if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
23250
- let s = [...r[0]].length - 1, o, a, l = s, c = 0, p = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23251
- for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null; ) {
23250
+ let s = [...r[0]].length - 1, o, a, u = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23251
+ for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
23252
23252
  if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
23253
23253
  if (a = [...o].length, r[3] || r[4]) {
23254
- l += a;
23254
+ u += a;
23255
23255
  continue;
23256
23256
  } else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
23257
- c += a;
23257
+ p += a;
23258
23258
  continue;
23259
23259
  }
23260
- if (l -= a, l > 0) continue;
23261
- a = Math.min(a, a + l + c);
23262
- let g = [...r[0]][0].length, d = e.slice(0, s + r.index + g + a);
23260
+ if (u -= a, u > 0) continue;
23261
+ a = Math.min(a, a + u + p);
23262
+ let f = [...r[0]][0].length, k = e.slice(0, s + r.index + f + a);
23263
23263
  if (Math.min(s, a) % 2) {
23264
- let f = d.slice(1, -1);
23265
- return { type: "em", raw: d, text: f, tokens: this.lexer.inlineTokens(f) };
23264
+ let g = k.slice(1, -1);
23265
+ return { type: "em", raw: k, text: g, tokens: this.lexer.inlineTokens(g) };
23266
23266
  }
23267
- let R = d.slice(2, -2);
23268
- return { type: "strong", raw: d, text: R, tokens: this.lexer.inlineTokens(R) };
23267
+ let x = k.slice(2, -2);
23268
+ return { type: "strong", raw: k, text: x, tokens: this.lexer.inlineTokens(x) };
23269
23269
  }
23270
23270
  }
23271
23271
  }
@@ -23314,25 +23314,25 @@ ${p}` : p;
23314
23314
  }
23315
23315
  }
23316
23316
  };
23317
- var x = class u {
23317
+ var b = class l {
23318
23318
  constructor(e) {
23319
23319
  __publicField(this, "tokens");
23320
23320
  __publicField(this, "options");
23321
23321
  __publicField(this, "state");
23322
23322
  __publicField(this, "tokenizer");
23323
23323
  __publicField(this, "inlineQueue");
23324
- 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 };
23325
- let t = { other: m, block: C.normal, inline: M.normal };
23326
- 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;
23324
+ 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 };
23325
+ let t = { other: m, block: I.normal, inline: M.normal };
23326
+ 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;
23327
23327
  }
23328
23328
  static get rules() {
23329
- return { block: C, inline: M };
23329
+ return { block: I, inline: M };
23330
23330
  }
23331
23331
  static lex(e, t) {
23332
- return new u(t).lex(e);
23332
+ return new l(t).lex(e);
23333
23333
  }
23334
23334
  static lexInline(e, t) {
23335
- return new u(t).inlineTokens(e);
23335
+ return new l(t).inlineTokens(e);
23336
23336
  }
23337
23337
  lex(e) {
23338
23338
  e = e.replace(m.carriageReturn, `
@@ -23407,8 +23407,8 @@ var x = class u {
23407
23407
  let i = e;
23408
23408
  if (this.options.extensions?.startBlock) {
23409
23409
  let s = 1 / 0, o = e.slice(1), a;
23410
- this.options.extensions.startBlock.forEach((l) => {
23411
- a = l.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23410
+ this.options.extensions.startBlock.forEach((u) => {
23411
+ a = u.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23412
23412
  }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
23413
23413
  }
23414
23414
  if (this.state.top && (r = this.tokenizer.paragraph(i))) {
@@ -23454,7 +23454,7 @@ var x = class u {
23454
23454
  for (; e; ) {
23455
23455
  i || (s = ""), i = false;
23456
23456
  let o;
23457
- if (this.options.extensions?.inline?.some((l) => (o = l.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
23457
+ 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;
23458
23458
  if (o = this.tokenizer.escape(e)) {
23459
23459
  e = e.substring(o.raw.length), t.push(o);
23460
23460
  continue;
@@ -23469,8 +23469,8 @@ var x = class u {
23469
23469
  }
23470
23470
  if (o = this.tokenizer.reflink(e, this.tokens.links)) {
23471
23471
  e = e.substring(o.raw.length);
23472
- let l = t.at(-1);
23473
- o.type === "text" && l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
23472
+ let u = t.at(-1);
23473
+ o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23474
23474
  continue;
23475
23475
  }
23476
23476
  if (o = this.tokenizer.emStrong(e, n, s)) {
@@ -23499,23 +23499,23 @@ var x = class u {
23499
23499
  }
23500
23500
  let a = e;
23501
23501
  if (this.options.extensions?.startInline) {
23502
- let l = 1 / 0, c = e.slice(1), p;
23503
- this.options.extensions.startInline.forEach((g) => {
23504
- p = g.call({ lexer: this }, c), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
23505
- }), l < 1 / 0 && l >= 0 && (a = e.substring(0, l + 1));
23502
+ let u = 1 / 0, p = e.slice(1), c;
23503
+ this.options.extensions.startInline.forEach((f) => {
23504
+ c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
23505
+ }), u < 1 / 0 && u >= 0 && (a = e.substring(0, u + 1));
23506
23506
  }
23507
23507
  if (o = this.tokenizer.inlineText(a)) {
23508
23508
  e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
23509
- let l = t.at(-1);
23510
- l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
23509
+ let u = t.at(-1);
23510
+ u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23511
23511
  continue;
23512
23512
  }
23513
23513
  if (e) {
23514
- let l = "Infinite loop on byte: " + e.charCodeAt(0);
23514
+ let u = "Infinite loop on byte: " + e.charCodeAt(0);
23515
23515
  if (this.options.silent) {
23516
- console.error(l);
23516
+ console.error(u);
23517
23517
  break;
23518
- } else throw new Error(l);
23518
+ } else throw new Error(u);
23519
23519
  }
23520
23520
  }
23521
23521
  return t;
@@ -23525,7 +23525,7 @@ var P = class {
23525
23525
  constructor(e) {
23526
23526
  __publicField(this, "options");
23527
23527
  __publicField(this, "parser");
23528
- this.options = e || T;
23528
+ this.options = e || O;
23529
23529
  }
23530
23530
  space(e) {
23531
23531
  return "";
@@ -23673,18 +23673,18 @@ var $ = class {
23673
23673
  return "";
23674
23674
  }
23675
23675
  };
23676
- var b = class u2 {
23676
+ var R = class l2 {
23677
23677
  constructor(e) {
23678
23678
  __publicField(this, "options");
23679
23679
  __publicField(this, "renderer");
23680
23680
  __publicField(this, "textRenderer");
23681
- 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 $();
23681
+ 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 $();
23682
23682
  }
23683
23683
  static parse(e, t) {
23684
- return new u2(t).parse(e);
23684
+ return new l2(t).parse(e);
23685
23685
  }
23686
23686
  static parseInline(e, t) {
23687
- return new u2(t).parseInline(e);
23687
+ return new l2(t).parseInline(e);
23688
23688
  }
23689
23689
  parse(e, t = true) {
23690
23690
  let n = "";
@@ -23822,7 +23822,7 @@ var S = (_a = class {
23822
23822
  constructor(e) {
23823
23823
  __publicField(this, "options");
23824
23824
  __publicField(this, "block");
23825
- this.options = e || T;
23825
+ this.options = e || O;
23826
23826
  }
23827
23827
  preprocess(e) {
23828
23828
  return e;
@@ -23837,10 +23837,10 @@ var S = (_a = class {
23837
23837
  return e;
23838
23838
  }
23839
23839
  provideLexer() {
23840
- return this.block ? x.lex : x.lexInline;
23840
+ return this.block ? b.lex : b.lexInline;
23841
23841
  }
23842
23842
  provideParser() {
23843
- return this.block ? b.parse : b.parseInline;
23843
+ return this.block ? R.parse : R.parseInline;
23844
23844
  }
23845
23845
  }, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
23846
23846
  var B = class {
@@ -23849,10 +23849,10 @@ var B = class {
23849
23849
  __publicField(this, "options", this.setOptions);
23850
23850
  __publicField(this, "parse", this.parseMarkdown(true));
23851
23851
  __publicField(this, "parseInline", this.parseMarkdown(false));
23852
- __publicField(this, "Parser", b);
23852
+ __publicField(this, "Parser", R);
23853
23853
  __publicField(this, "Renderer", P);
23854
23854
  __publicField(this, "TextRenderer", $);
23855
- __publicField(this, "Lexer", x);
23855
+ __publicField(this, "Lexer", b);
23856
23856
  __publicField(this, "Tokenizer", y);
23857
23857
  __publicField(this, "Hooks", S);
23858
23858
  this.use(...e);
@@ -23905,10 +23905,10 @@ var B = class {
23905
23905
  for (let s in n.renderer) {
23906
23906
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
23907
23907
  if (["options", "parser"].includes(s)) continue;
23908
- let o = s, a = n.renderer[o], l = i[o];
23909
- i[o] = (...c) => {
23910
- let p = a.apply(i, c);
23911
- return p === false && (p = l.apply(i, c)), p || "";
23908
+ let o = s, a = n.renderer[o], u = i[o];
23909
+ i[o] = (...p) => {
23910
+ let c = a.apply(i, p);
23911
+ return c === false && (c = u.apply(i, p)), c || "";
23912
23912
  };
23913
23913
  }
23914
23914
  r.renderer = i;
@@ -23918,10 +23918,10 @@ var B = class {
23918
23918
  for (let s in n.tokenizer) {
23919
23919
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
23920
23920
  if (["options", "rules", "lexer"].includes(s)) continue;
23921
- let o = s, a = n.tokenizer[o], l = i[o];
23922
- i[o] = (...c) => {
23923
- let p = a.apply(i, c);
23924
- return p === false && (p = l.apply(i, c)), p;
23921
+ let o = s, a = n.tokenizer[o], u = i[o];
23922
+ i[o] = (...p) => {
23923
+ let c = a.apply(i, p);
23924
+ return c === false && (c = u.apply(i, p)), c;
23925
23925
  };
23926
23926
  }
23927
23927
  r.tokenizer = i;
@@ -23931,21 +23931,14 @@ var B = class {
23931
23931
  for (let s in n.hooks) {
23932
23932
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
23933
23933
  if (["options", "block"].includes(s)) continue;
23934
- let o = s, a = n.hooks[o], l = i[o];
23935
- S.passThroughHooks.has(s) ? i[o] = (c) => {
23936
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
23937
- let g = await a.call(i, c);
23938
- return l.call(i, g);
23939
- })();
23940
- let p = a.call(i, c);
23941
- return l.call(i, p);
23942
- } : i[o] = (...c) => {
23943
- if (this.defaults.async) return (async () => {
23944
- let g = await a.apply(i, c);
23945
- return g === false && (g = await l.apply(i, c)), g;
23946
- })();
23947
- let p = a.apply(i, c);
23948
- return p === false && (p = l.apply(i, c)), p;
23934
+ let o = s, a = n.hooks[o], u = i[o];
23935
+ S.passThroughHooks.has(s) ? i[o] = (p) => {
23936
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
23937
+ let c = a.call(i, p);
23938
+ return u.call(i, c);
23939
+ } : i[o] = (...p) => {
23940
+ let c = a.apply(i, p);
23941
+ return c === false && (c = u.apply(i, p)), c;
23949
23942
  };
23950
23943
  }
23951
23944
  r.hooks = i;
@@ -23964,10 +23957,10 @@ var B = class {
23964
23957
  return this.defaults = { ...this.defaults, ...e }, this;
23965
23958
  }
23966
23959
  lexer(e, t) {
23967
- return x.lex(e, t ?? this.defaults);
23960
+ return b.lex(e, t ?? this.defaults);
23968
23961
  }
23969
23962
  parser(e, t) {
23970
- return b.parse(e, t ?? this.defaults);
23963
+ return R.parse(e, t ?? this.defaults);
23971
23964
  }
23972
23965
  parseMarkdown(e) {
23973
23966
  return (n, r) => {
@@ -23975,20 +23968,17 @@ var B = class {
23975
23968
  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."));
23976
23969
  if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
23977
23970
  if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
23978
- if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
23979
- let a = s.hooks ? await s.hooks.preprocess(n) : n, c = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(a, s), p = s.hooks ? await s.hooks.processAllTokens(c) : c;
23980
- s.walkTokens && await Promise.all(this.walkTokens(p, s.walkTokens));
23981
- let d = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
23982
- return s.hooks ? await s.hooks.postprocess(d) : d;
23983
- })().catch(o);
23971
+ s.hooks && (s.hooks.options = s, s.hooks.block = e);
23972
+ let a = s.hooks ? s.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s.hooks ? s.hooks.provideParser() : e ? R.parse : R.parseInline;
23973
+ 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);
23984
23974
  try {
23985
23975
  s.hooks && (n = s.hooks.preprocess(n));
23986
- let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
23987
- s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
23988
- let p = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
23989
- return s.hooks && (p = s.hooks.postprocess(p)), p;
23990
- } catch (a) {
23991
- return o(a);
23976
+ let p = a(n, s);
23977
+ s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
23978
+ let c = u(p, s);
23979
+ return s.hooks && (c = s.hooks.postprocess(c)), c;
23980
+ } catch (p) {
23981
+ return o(p);
23992
23982
  }
23993
23983
  };
23994
23984
  }
@@ -24005,38 +23995,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24005
23995
  }
24006
23996
  };
24007
23997
  var _ = new B();
24008
- function k(u3, e) {
24009
- return _.parse(u3, e);
24010
- }
24011
- k.options = k.setOptions = function(u3) {
24012
- return _.setOptions(u3), k.defaults = _.defaults, G(k.defaults), k;
24013
- };
24014
- k.getDefaults = L;
24015
- k.defaults = T;
24016
- k.use = function(...u3) {
24017
- return _.use(...u3), k.defaults = _.defaults, G(k.defaults), k;
24018
- };
24019
- k.walkTokens = function(u3, e) {
24020
- return _.walkTokens(u3, e);
24021
- };
24022
- k.parseInline = _.parseInline;
24023
- k.Parser = b;
24024
- k.parser = b.parse;
24025
- k.Renderer = P;
24026
- k.TextRenderer = $;
24027
- k.Lexer = x;
24028
- k.lexer = x.lex;
24029
- k.Tokenizer = y;
24030
- k.Hooks = S;
24031
- k.parse = k;
24032
- k.options;
24033
- k.setOptions;
24034
- k.use;
24035
- k.walkTokens;
24036
- k.parseInline;
24037
- b.parse;
24038
- x.lex;
24039
- k.use({
23998
+ function d(l3, e) {
23999
+ return _.parse(l3, e);
24000
+ }
24001
+ d.options = d.setOptions = function(l3) {
24002
+ return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
24003
+ };
24004
+ d.getDefaults = L;
24005
+ d.defaults = O;
24006
+ d.use = function(...l3) {
24007
+ return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
24008
+ };
24009
+ d.walkTokens = function(l3, e) {
24010
+ return _.walkTokens(l3, e);
24011
+ };
24012
+ d.parseInline = _.parseInline;
24013
+ d.Parser = R;
24014
+ d.parser = R.parse;
24015
+ d.Renderer = P;
24016
+ d.TextRenderer = $;
24017
+ d.Lexer = b;
24018
+ d.lexer = b.lex;
24019
+ d.Tokenizer = y;
24020
+ d.Hooks = S;
24021
+ d.parse = d;
24022
+ d.options;
24023
+ d.setOptions;
24024
+ d.use;
24025
+ d.walkTokens;
24026
+ d.parseInline;
24027
+ R.parse;
24028
+ b.lex;
24029
+ d.use({
24040
24030
  breaks: false,
24041
24031
  // Use proper paragraphs, not <br> tags
24042
24032
  gfm: true
@@ -24047,7 +24037,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
24047
24037
  return createDocFromHTML(html, schema, options);
24048
24038
  }
24049
24039
  function convertMarkdownToHTML(markdown) {
24050
- let html = k.parse(markdown, { async: false });
24040
+ let html = d.parse(markdown, { async: false });
24051
24041
  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");
24052
24042
  }
24053
24043
  function processContent({ content, type: type2, schema }) {
@@ -24226,7 +24216,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
24226
24216
  };
24227
24217
  const getNewListId = (editor, grouping = "definitions") => {
24228
24218
  const defs = editor.converter.numbering[grouping] || {};
24229
- const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
24219
+ const intKeys = Object.keys(defs).map((k) => Number(k)).filter((n) => Number.isInteger(n));
24230
24220
  const max2 = intKeys.length ? Math.max(...intKeys) : 0;
24231
24221
  return max2 + 1;
24232
24222
  };
@@ -35347,6 +35337,12 @@ const mergeRelationshipElements = (existingRelationships = [], newRelationships
35347
35337
  if (!newRelationships?.length) return existingRelationships;
35348
35338
  let largestId = getLargestRelationshipId(existingRelationships);
35349
35339
  const seenIds = new Set(existingRelationships.map((rel) => rel?.attributes?.Id).filter(Boolean));
35340
+ for (const rel of newRelationships) {
35341
+ const id = rel?.attributes?.Id;
35342
+ if (!id || seenIds.has(id)) continue;
35343
+ const numeric = Number(String(id).replace(REL_ID_NUMERIC_PATTERN, ""));
35344
+ if (Number.isFinite(numeric) && numeric > largestId) largestId = numeric;
35345
+ }
35350
35346
  const additions = [];
35351
35347
  newRelationships.forEach((rel) => {
35352
35348
  if (!rel?.attributes) return;
@@ -35354,13 +35350,22 @@ const mergeRelationshipElements = (existingRelationships = [], newRelationships
35354
35350
  const currentId = attributes.Id || "";
35355
35351
  attributes.Target = attributes?.Target?.replace(/&/g, "&amp;");
35356
35352
  const existingTarget = existingRelationships.find((el) => el.attributes.Target === attributes.Target);
35357
- const isMedia = attributes.Target?.startsWith("media/");
35353
+ attributes.Target?.startsWith("media/");
35358
35354
  const isNewHyperlink = attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && currentId.length > 6;
35359
35355
  const isNewHeadFoot = (attributes.Type === HEADER_RELATIONSHIP_TYPE || attributes.Type === FOOTER_RELATIONSHIP_TYPE) && currentId.length > 6;
35360
35356
  const hasSeenId = currentId && seenIds.has(currentId);
35361
- const shouldSkip = !isNewHyperlink && !isNewHeadFoot && (hasSeenId || existingTarget);
35362
- if (shouldSkip) return;
35363
- attributes.Id = currentId.length > 6 || isMedia ? currentId : `rId${++largestId}`;
35357
+ if (!isNewHyperlink && !isNewHeadFoot && existingTarget) return;
35358
+ if (!currentId || hasSeenId) {
35359
+ let candidate = Math.max(largestId, 1);
35360
+ while (seenIds.has(`rId${candidate}`)) {
35361
+ candidate += 1;
35362
+ }
35363
+ attributes.Id = `rId${candidate}`;
35364
+ largestId = candidate;
35365
+ } else {
35366
+ const numeric = Number(String(currentId).replace(REL_ID_NUMERIC_PATTERN, ""));
35367
+ if (Number.isFinite(numeric) && numeric > largestId) largestId = numeric;
35368
+ }
35364
35369
  seenIds.add(attributes.Id);
35365
35370
  additions.push(rel);
35366
35371
  });
@@ -35574,7 +35579,7 @@ const _SuperConverter = class _SuperConverter {
35574
35579
  static getStoredSuperdocVersion(docx) {
35575
35580
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
35576
35581
  }
35577
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.28.4") {
35582
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.28.6") {
35578
35583
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
35579
35584
  }
35580
35585
  /**
@@ -35968,7 +35973,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
35968
35973
  };
35969
35974
  exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
35970
35975
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
35971
- const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
35976
+ const relationships = relsData.elements.find((x) => x.name === "Relationships");
35972
35977
  const newDocRels = [];
35973
35978
  Object.entries(this.headers).forEach(([id, header], index2) => {
35974
35979
  const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
@@ -36009,7 +36014,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36009
36014
  }
36010
36015
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36011
36016
  if (params.relationships.length) {
36012
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36017
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36013
36018
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36014
36019
  declaration: this.initialJSON?.declaration,
36015
36020
  elements: [
@@ -36063,7 +36068,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36063
36068
  }
36064
36069
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36065
36070
  if (params.relationships.length) {
36066
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36071
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36067
36072
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36068
36073
  declaration: this.initialJSON?.declaration,
36069
36074
  elements: [
@@ -36082,7 +36087,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36082
36087
  };
36083
36088
  exportProcessNewRelationships_fn = function(rels = []) {
36084
36089
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36085
- const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36090
+ const relationships = relsData.elements.find((x) => x.name === "Relationships");
36086
36091
  relationships.elements = mergeRelationshipElements(relationships.elements, rels);
36087
36092
  };
36088
36093
  exportProcessMediaFiles_fn = async function(media = {}) {