@harbour-enterprises/superdoc 0.29.0-next.11 → 0.29.0-next.13

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 (28) hide show
  1. package/dist/chunks/{PdfViewer-CP7yBYyB.es.js → PdfViewer-BkHpL2td.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-Dp0X1FIu.cjs → PdfViewer-DOihIaKT.cjs} +1 -1
  3. package/dist/chunks/{index-D6RPpnE_.es.js → index-BG7aufxd.es.js} +3 -3
  4. package/dist/chunks/{index-DlsBRrRZ.cjs → index-Bky221GX.cjs} +3 -3
  5. package/dist/chunks/{index-vgCtdrE1-BMfi7kYY.cjs → index-p_HoYQ4L-BvUq1_h3.cjs} +1 -1
  6. package/dist/chunks/{index-vgCtdrE1-9LQjvaHA.es.js → index-p_HoYQ4L-YNisXWt0.es.js} +1 -1
  7. package/dist/chunks/{super-editor.es-q77PJY-s.cjs → super-editor.es-DA-FFY2A.cjs} +769 -735
  8. package/dist/chunks/{super-editor.es-plkDuJu2.es.js → super-editor.es-vCpzMs9V.es.js} +769 -735
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-Bf6KHOzD.js → converter-C0Fd9g-U.js} +377 -367
  11. package/dist/super-editor/chunks/{docx-zipper-C6ABOp_2.js → docx-zipper-BqIh8tzQ.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-DaWgAsfG.js → editor-Dg538FVw.js} +45 -21
  13. package/dist/super-editor/chunks/{index-vgCtdrE1.js → index-p_HoYQ4L.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-BEDs_bI3.js → toolbar-Des2y7IP.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor/src/extensions/search/prosemirror-search-patched.d.ts.map +1 -1
  20. package/dist/super-editor/super-editor.es.js +6 -6
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.cjs +1 -1
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.cjs +2 -2
  25. package/dist/superdoc.es.js +2 -2
  26. package/dist/superdoc.umd.js +533 -499
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
@@ -111,18 +111,18 @@ ieee754.read = function(buffer2, offset, isLE, mLen, nBytes) {
111
111
  var eBias = eMax >> 1;
112
112
  var nBits = -7;
113
113
  var i = isLE ? nBytes - 1 : 0;
114
- var d2 = isLE ? -1 : 1;
114
+ var d = isLE ? -1 : 1;
115
115
  var s = buffer2[offset + i];
116
- i += d2;
116
+ i += d;
117
117
  e = s & (1 << -nBits) - 1;
118
118
  s >>= -nBits;
119
119
  nBits += eLen;
120
- for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d2, nBits -= 8) {
120
+ for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) {
121
121
  }
122
122
  m2 = e & (1 << -nBits) - 1;
123
123
  e >>= -nBits;
124
124
  nBits += mLen;
125
- for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i], i += d2, nBits -= 8) {
125
+ for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i], i += d, nBits -= 8) {
126
126
  }
127
127
  if (e === 0) {
128
128
  e = 1 - eBias;
@@ -141,7 +141,7 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
141
141
  var eBias = eMax >> 1;
142
142
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
143
143
  var i = isLE ? 0 : nBytes - 1;
144
- var d2 = isLE ? 1 : -1;
144
+ var d = isLE ? 1 : -1;
145
145
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
146
146
  value = Math.abs(value);
147
147
  if (isNaN(value) || value === Infinity) {
@@ -173,13 +173,13 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
173
173
  e = 0;
174
174
  }
175
175
  }
176
- for (; mLen >= 8; buffer2[offset + i] = m2 & 255, i += d2, m2 /= 256, mLen -= 8) {
176
+ for (; mLen >= 8; buffer2[offset + i] = m2 & 255, i += d, m2 /= 256, mLen -= 8) {
177
177
  }
178
178
  e = e << mLen | m2;
179
179
  eLen += mLen;
180
- for (; eLen > 0; buffer2[offset + i] = e & 255, i += d2, e /= 256, eLen -= 8) {
180
+ for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
181
181
  }
182
- buffer2[offset + i - d2] |= s * 128;
182
+ buffer2[offset + i - d] |= s * 128;
183
183
  };
184
184
  /*!
185
185
  * The buffer module from node.js, for the browser.
@@ -413,17 +413,17 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
413
413
  );
414
414
  }
415
415
  if (a === b2) return 0;
416
- let x = a.length;
416
+ let x2 = a.length;
417
417
  let y2 = b2.length;
418
- for (let i = 0, len = Math.min(x, y2); i < len; ++i) {
418
+ for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
419
419
  if (a[i] !== b2[i]) {
420
- x = a[i];
420
+ x2 = a[i];
421
421
  y2 = b2[i];
422
422
  break;
423
423
  }
424
424
  }
425
- if (x < y2) return -1;
426
- if (y2 < x) return 1;
425
+ if (x2 < y2) return -1;
426
+ if (y2 < x2) return 1;
427
427
  return 0;
428
428
  };
429
429
  Buffer3.isEncoding = function isEncoding(encoding) {
@@ -672,20 +672,20 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
672
672
  thisStart >>>= 0;
673
673
  thisEnd >>>= 0;
674
674
  if (this === target) return 0;
675
- let x = thisEnd - thisStart;
675
+ let x2 = thisEnd - thisStart;
676
676
  let y2 = end - start;
677
- const len = Math.min(x, y2);
677
+ const len = Math.min(x2, y2);
678
678
  const thisCopy = this.slice(thisStart, thisEnd);
679
679
  const targetCopy = target.slice(start, end);
680
680
  for (let i = 0; i < len; ++i) {
681
681
  if (thisCopy[i] !== targetCopy[i]) {
682
- x = thisCopy[i];
682
+ x2 = thisCopy[i];
683
683
  y2 = targetCopy[i];
684
684
  break;
685
685
  }
686
686
  }
687
- if (x < y2) return -1;
688
- if (y2 < x) return 1;
687
+ if (x2 < y2) return -1;
688
+ if (y2 < x2) return 1;
689
689
  return 0;
690
690
  };
691
691
  function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
@@ -1775,8 +1775,8 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
1775
1775
  })(buffer);
1776
1776
  const Buffer2 = buffer.Buffer;
1777
1777
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1778
- function getDefaultExportFromCjs$2(x) {
1779
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1778
+ function getDefaultExportFromCjs$2(x2) {
1779
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1780
1780
  }
1781
1781
  var sax = {};
1782
1782
  var events = { exports: {} };
@@ -1784,13 +1784,13 @@ var hasRequiredEvents;
1784
1784
  function requireEvents() {
1785
1785
  if (hasRequiredEvents) return events.exports;
1786
1786
  hasRequiredEvents = 1;
1787
- var R2 = typeof Reflect === "object" ? Reflect : null;
1788
- var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
1787
+ var R = typeof Reflect === "object" ? Reflect : null;
1788
+ var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
1789
1789
  return Function.prototype.apply.call(target, receiver, args);
1790
1790
  };
1791
1791
  var ReflectOwnKeys;
1792
- if (R2 && typeof R2.ownKeys === "function") {
1793
- ReflectOwnKeys = R2.ownKeys;
1792
+ if (R && typeof R.ownKeys === "function") {
1793
+ ReflectOwnKeys = R.ownKeys;
1794
1794
  } else if (Object.getOwnPropertySymbols) {
1795
1795
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
1796
1796
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -2180,8 +2180,8 @@ function requireInherits_browser() {
2180
2180
  }
2181
2181
  return inherits_browser.exports;
2182
2182
  }
2183
- function getDefaultExportFromCjs$1(x) {
2184
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2183
+ function getDefaultExportFromCjs$1(x2) {
2184
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
2185
2185
  }
2186
2186
  var browser$1 = { exports: {} };
2187
2187
  var process = browser$1.exports = {};
@@ -2460,18 +2460,18 @@ function requireDist() {
2460
2460
  var eBias = eMax >> 1;
2461
2461
  var nBits = -7;
2462
2462
  var i2 = isLE ? nBytes - 1 : 0;
2463
- var d2 = isLE ? -1 : 1;
2463
+ var d = isLE ? -1 : 1;
2464
2464
  var s = buffer3[offset + i2];
2465
- i2 += d2;
2465
+ i2 += d;
2466
2466
  e = s & (1 << -nBits) - 1;
2467
2467
  s >>= -nBits;
2468
2468
  nBits += eLen;
2469
- for (; nBits > 0; e = e * 256 + buffer3[offset + i2], i2 += d2, nBits -= 8) {
2469
+ for (; nBits > 0; e = e * 256 + buffer3[offset + i2], i2 += d, nBits -= 8) {
2470
2470
  }
2471
2471
  m2 = e & (1 << -nBits) - 1;
2472
2472
  e >>= -nBits;
2473
2473
  nBits += mLen;
2474
- for (; nBits > 0; m2 = m2 * 256 + buffer3[offset + i2], i2 += d2, nBits -= 8) {
2474
+ for (; nBits > 0; m2 = m2 * 256 + buffer3[offset + i2], i2 += d, nBits -= 8) {
2475
2475
  }
2476
2476
  if (e === 0) {
2477
2477
  e = 1 - eBias;
@@ -2490,7 +2490,7 @@ function requireDist() {
2490
2490
  var eBias = eMax >> 1;
2491
2491
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
2492
2492
  var i2 = isLE ? 0 : nBytes - 1;
2493
- var d2 = isLE ? 1 : -1;
2493
+ var d = isLE ? 1 : -1;
2494
2494
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
2495
2495
  value = Math.abs(value);
2496
2496
  if (isNaN(value) || value === Infinity) {
@@ -2522,13 +2522,13 @@ function requireDist() {
2522
2522
  e = 0;
2523
2523
  }
2524
2524
  }
2525
- for (; mLen >= 8; buffer3[offset + i2] = m2 & 255, i2 += d2, m2 /= 256, mLen -= 8) {
2525
+ for (; mLen >= 8; buffer3[offset + i2] = m2 & 255, i2 += d, m2 /= 256, mLen -= 8) {
2526
2526
  }
2527
2527
  e = e << mLen | m2;
2528
2528
  eLen += mLen;
2529
- for (; eLen > 0; buffer3[offset + i2] = e & 255, i2 += d2, e /= 256, eLen -= 8) {
2529
+ for (; eLen > 0; buffer3[offset + i2] = e & 255, i2 += d, e /= 256, eLen -= 8) {
2530
2530
  }
2531
- buffer3[offset + i2 - d2] |= s * 128;
2531
+ buffer3[offset + i2 - d] |= s * 128;
2532
2532
  };
2533
2533
  /*!
2534
2534
  * The buffer module from node.js, for the browser.
@@ -2762,17 +2762,17 @@ function requireDist() {
2762
2762
  );
2763
2763
  }
2764
2764
  if (a === b2) return 0;
2765
- let x = a.length;
2765
+ let x2 = a.length;
2766
2766
  let y2 = b2.length;
2767
- for (let i2 = 0, len2 = Math.min(x, y2); i2 < len2; ++i2) {
2767
+ for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
2768
2768
  if (a[i2] !== b2[i2]) {
2769
- x = a[i2];
2769
+ x2 = a[i2];
2770
2770
  y2 = b2[i2];
2771
2771
  break;
2772
2772
  }
2773
2773
  }
2774
- if (x < y2) return -1;
2775
- if (y2 < x) return 1;
2774
+ if (x2 < y2) return -1;
2775
+ if (y2 < x2) return 1;
2776
2776
  return 0;
2777
2777
  };
2778
2778
  Buffer4.isEncoding = function isEncoding(encoding) {
@@ -3021,20 +3021,20 @@ function requireDist() {
3021
3021
  thisStart >>>= 0;
3022
3022
  thisEnd >>>= 0;
3023
3023
  if (this === target) return 0;
3024
- let x = thisEnd - thisStart;
3024
+ let x2 = thisEnd - thisStart;
3025
3025
  let y2 = end - start;
3026
- const len2 = Math.min(x, y2);
3026
+ const len2 = Math.min(x2, y2);
3027
3027
  const thisCopy = this.slice(thisStart, thisEnd);
3028
3028
  const targetCopy = target.slice(start, end);
3029
3029
  for (let i2 = 0; i2 < len2; ++i2) {
3030
3030
  if (thisCopy[i2] !== targetCopy[i2]) {
3031
- x = thisCopy[i2];
3031
+ x2 = thisCopy[i2];
3032
3032
  y2 = targetCopy[i2];
3033
3033
  break;
3034
3034
  }
3035
3035
  }
3036
- if (x < y2) return -1;
3037
- if (y2 < x) return 1;
3036
+ if (x2 < y2) return -1;
3037
+ if (y2 < x2) return 1;
3038
3038
  return 0;
3039
3039
  };
3040
3040
  function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
@@ -4606,15 +4606,15 @@ function requireGetProto() {
4606
4606
  var reflectGetProto = requireReflect_getPrototypeOf();
4607
4607
  var originalGetProto = requireObject_getPrototypeOf();
4608
4608
  var getDunderProto = /* @__PURE__ */ requireGet();
4609
- getProto = reflectGetProto ? function getProto2(O2) {
4610
- return reflectGetProto(O2);
4611
- } : originalGetProto ? function getProto2(O2) {
4612
- if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
4609
+ getProto = reflectGetProto ? function getProto2(O) {
4610
+ return reflectGetProto(O);
4611
+ } : originalGetProto ? function getProto2(O) {
4612
+ if (!O || typeof O !== "object" && typeof O !== "function") {
4613
4613
  throw new TypeError("getProto: not an object");
4614
4614
  }
4615
- return originalGetProto(O2);
4616
- } : getDunderProto ? function getProto2(O2) {
4617
- return getDunderProto(O2);
4615
+ return originalGetProto(O);
4616
+ } : getDunderProto ? function getProto2(O) {
4617
+ return getDunderProto(O);
4618
4618
  } : null;
4619
4619
  return getProto;
4620
4620
  }
@@ -5282,18 +5282,18 @@ function requireForEach() {
5282
5282
  }
5283
5283
  };
5284
5284
  var forEachObject = function forEachObject2(object, iterator, receiver) {
5285
- for (var k in object) {
5286
- if (hasOwnProperty.call(object, k)) {
5285
+ for (var k2 in object) {
5286
+ if (hasOwnProperty.call(object, k2)) {
5287
5287
  if (receiver == null) {
5288
- iterator(object[k], k, object);
5288
+ iterator(object[k2], k2, object);
5289
5289
  } else {
5290
- iterator.call(receiver, object[k], k, object);
5290
+ iterator.call(receiver, object[k2], k2, object);
5291
5291
  }
5292
5292
  }
5293
5293
  }
5294
5294
  };
5295
- function isArray(x) {
5296
- return toStr.call(x) === "[object Array]";
5295
+ function isArray(x2) {
5296
+ return toStr.call(x2) === "[object Array]";
5297
5297
  }
5298
5298
  forEach = function forEach2(list, iterator, thisArg) {
5299
5299
  if (!isCallable2(iterator)) {
@@ -5902,10 +5902,10 @@ function requireUtil() {
5902
5902
  var i = 1;
5903
5903
  var args = arguments;
5904
5904
  var len = args.length;
5905
- var str = String(f).replace(formatRegExp, function(x2) {
5906
- if (x2 === "%%") return "%";
5907
- if (i >= len) return x2;
5908
- switch (x2) {
5905
+ var str = String(f).replace(formatRegExp, function(x3) {
5906
+ if (x3 === "%%") return "%";
5907
+ if (i >= len) return x3;
5908
+ switch (x3) {
5909
5909
  case "%s":
5910
5910
  return String(args[i++]);
5911
5911
  case "%d":
@@ -5917,14 +5917,14 @@ function requireUtil() {
5917
5917
  return "[Circular]";
5918
5918
  }
5919
5919
  default:
5920
- return x2;
5920
+ return x3;
5921
5921
  }
5922
5922
  });
5923
- for (var x = args[i]; i < len; x = args[++i]) {
5924
- if (isNull(x) || !isObject(x)) {
5925
- str += " " + x;
5923
+ for (var x2 = args[i]; i < len; x2 = args[++i]) {
5924
+ if (isNull(x2) || !isObject(x2)) {
5925
+ str += " " + x2;
5926
5926
  } else {
5927
- str += " " + inspect(x);
5927
+ str += " " + inspect(x2);
5928
5928
  }
5929
5929
  }
5930
5930
  return str;
@@ -6137,7 +6137,7 @@ function requireUtil() {
6137
6137
  }
6138
6138
  function formatArray(ctx, value, recurseTimes, visibleKeys, keys2) {
6139
6139
  var output = [];
6140
- for (var i = 0, l3 = value.length; i < l3; ++i) {
6140
+ for (var i = 0, l = value.length; i < l; ++i) {
6141
6141
  if (hasOwnProperty(value, String(i))) {
6142
6142
  output.push(formatProperty(
6143
6143
  ctx,
@@ -6271,8 +6271,8 @@ function requireUtil() {
6271
6271
  return typeof arg === "object" && arg !== null;
6272
6272
  }
6273
6273
  exports.isObject = isObject;
6274
- function isDate(d2) {
6275
- return isObject(d2) && objectToString(d2) === "[object Date]";
6274
+ function isDate(d) {
6275
+ return isObject(d) && objectToString(d) === "[object Date]";
6276
6276
  }
6277
6277
  exports.isDate = isDate;
6278
6278
  exports.types.isDate = isDate;
@@ -6312,13 +6312,13 @@ function requireUtil() {
6312
6312
  "Dec"
6313
6313
  ];
6314
6314
  function timestamp() {
6315
- var d2 = /* @__PURE__ */ new Date();
6315
+ var d = /* @__PURE__ */ new Date();
6316
6316
  var time = [
6317
- pad(d2.getHours()),
6318
- pad(d2.getMinutes()),
6319
- pad(d2.getSeconds())
6317
+ pad(d.getHours()),
6318
+ pad(d.getMinutes()),
6319
+ pad(d.getSeconds())
6320
6320
  ].join(":");
6321
- return [d2.getDate(), months[d2.getMonth()], time].join(" ");
6321
+ return [d.getDate(), months[d.getMonth()], time].join(" ");
6322
6322
  }
6323
6323
  exports.log = function() {
6324
6324
  console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
@@ -7236,8 +7236,8 @@ function require_stream_writable() {
7236
7236
  state2.bufferProcessing = true;
7237
7237
  var entry = state2.bufferedRequest;
7238
7238
  if (stream._writev && entry && entry.next) {
7239
- var l3 = state2.bufferedRequestCount;
7240
- var buffer2 = new Array(l3);
7239
+ var l = state2.bufferedRequestCount;
7240
+ var buffer2 = new Array(l);
7241
7241
  var holder = state2.corkedRequestsFree;
7242
7242
  holder.entry = entry;
7243
7243
  var count = 0;
@@ -8787,9 +8787,9 @@ function require_stream_readable() {
8787
8787
  return from(Readable, iterable, opts);
8788
8788
  };
8789
8789
  }
8790
- function indexOf(xs, x) {
8791
- for (var i = 0, l3 = xs.length; i < l3; i++) {
8792
- if (xs[i] === x) return i;
8790
+ function indexOf(xs, x2) {
8791
+ for (var i = 0, l = xs.length; i < l; i++) {
8792
+ if (xs[i] === x2) return i;
8793
8793
  }
8794
8794
  return -1;
8795
8795
  }
@@ -9168,7 +9168,7 @@ function requireSax() {
9168
9168
  function checkBufferLength(parser) {
9169
9169
  var maxAllowed = Math.max(sax2.MAX_BUFFER_LENGTH, 10);
9170
9170
  var maxActual = 0;
9171
- for (var i = 0, l3 = buffers.length; i < l3; i++) {
9171
+ for (var i = 0, l = buffers.length; i < l; i++) {
9172
9172
  var len = parser[buffers[i]].length;
9173
9173
  if (len > maxAllowed) {
9174
9174
  switch (buffers[i]) {
@@ -9193,7 +9193,7 @@ function requireSax() {
9193
9193
  parser.bufferCheckPosition = m2 + parser.position;
9194
9194
  }
9195
9195
  function clearBuffers(parser) {
9196
- for (var i = 0, l3 = buffers.length; i < l3; i++) {
9196
+ for (var i = 0, l = buffers.length; i < l; i++) {
9197
9197
  parser[buffers[i]] = "";
9198
9198
  }
9199
9199
  }
@@ -9247,27 +9247,27 @@ function requireSax() {
9247
9247
  this._parser = new SAXParser(strict, opt);
9248
9248
  this.writable = true;
9249
9249
  this.readable = true;
9250
- var me = this;
9250
+ var me2 = this;
9251
9251
  this._parser.onend = function() {
9252
- me.emit("end");
9252
+ me2.emit("end");
9253
9253
  };
9254
9254
  this._parser.onerror = function(er) {
9255
- me.emit("error", er);
9256
- me._parser.error = null;
9255
+ me2.emit("error", er);
9256
+ me2._parser.error = null;
9257
9257
  };
9258
9258
  this._decoder = null;
9259
9259
  streamWraps.forEach(function(ev) {
9260
- Object.defineProperty(me, "on" + ev, {
9260
+ Object.defineProperty(me2, "on" + ev, {
9261
9261
  get: function() {
9262
- return me._parser["on" + ev];
9262
+ return me2._parser["on" + ev];
9263
9263
  },
9264
9264
  set: function(h2) {
9265
9265
  if (!h2) {
9266
- me.removeAllListeners(ev);
9267
- me._parser["on" + ev] = h2;
9266
+ me2.removeAllListeners(ev);
9267
+ me2._parser["on" + ev] = h2;
9268
9268
  return h2;
9269
9269
  }
9270
- me.on(ev, h2);
9270
+ me2.on(ev, h2);
9271
9271
  },
9272
9272
  enumerable: true,
9273
9273
  configurable: false
@@ -9299,15 +9299,15 @@ function requireSax() {
9299
9299
  return true;
9300
9300
  };
9301
9301
  SAXStream.prototype.on = function(ev, handler2) {
9302
- var me = this;
9303
- if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9304
- me._parser["on" + ev] = function() {
9302
+ var me2 = this;
9303
+ if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9304
+ me2._parser["on" + ev] = function() {
9305
9305
  var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
9306
9306
  args.splice(0, 0, ev);
9307
- me.emit.apply(me, args);
9307
+ me2.emit.apply(me2, args);
9308
9308
  };
9309
9309
  }
9310
- return Stream.prototype.on.call(me, ev, handler2);
9310
+ return Stream.prototype.on.call(me2, ev, handler2);
9311
9311
  };
9312
9312
  var CDATA = "[CDATA[";
9313
9313
  var DOCTYPE = "DOCTYPE";
@@ -9813,7 +9813,7 @@ function requireSax() {
9813
9813
  });
9814
9814
  });
9815
9815
  }
9816
- for (var i = 0, l3 = parser.attribList.length; i < l3; i++) {
9816
+ for (var i = 0, l = parser.attribList.length; i < l; i++) {
9817
9817
  var nv = parser.attribList[i];
9818
9818
  var name = nv[0];
9819
9819
  var value = nv[1];
@@ -9899,9 +9899,9 @@ function requireSax() {
9899
9899
  var tag = parser.tag = parser.tags.pop();
9900
9900
  parser.tagName = parser.tag.name;
9901
9901
  emitNode(parser, "onclosetag", parser.tagName);
9902
- var x = {};
9902
+ var x2 = {};
9903
9903
  for (var i in tag.ns) {
9904
- x[i] = tag.ns[i];
9904
+ x2[i] = tag.ns[i];
9905
9905
  }
9906
9906
  var parent = parser.tags[parser.tags.length - 1] || parser;
9907
9907
  if (parser.opt.xmlns && tag.ns !== parent.ns) {
@@ -10958,8 +10958,8 @@ function requireXml2json() {
10958
10958
  js = xml2js2(xml, options);
10959
10959
  parentKey = "compact" in options && options.compact ? "_parent" : "parent";
10960
10960
  if ("addParent" in options && options.addParent) {
10961
- json = JSON.stringify(js, function(k, v2) {
10962
- return k === parentKey ? "_" : v2;
10961
+ json = JSON.stringify(js, function(k2, v2) {
10962
+ return k2 === parentKey ? "_" : v2;
10963
10963
  }, options.spaces);
10964
10964
  } else {
10965
10965
  json = JSON.stringify(js, null, options.spaces);
@@ -11381,8 +11381,8 @@ function v4(options, buf, offset) {
11381
11381
  rnds[8] = rnds[8] & 63 | 128;
11382
11382
  return unsafeStringify(rnds);
11383
11383
  }
11384
- function getDefaultExportFromCjs(x) {
11385
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
11384
+ function getDefaultExportFromCjs(x2) {
11385
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
11386
11386
  }
11387
11387
  const CRC_TABLE = new Int32Array([
11388
11388
  0,
@@ -12755,9 +12755,9 @@ class ResolvedPos {
12755
12755
  blockRange(other = this, pred) {
12756
12756
  if (other.pos < this.pos)
12757
12757
  return other.blockRange(this);
12758
- for (let d2 = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d2 >= 0; d2--)
12759
- if (other.pos <= this.end(d2) && (!pred || pred(this.node(d2))))
12760
- return new NodeRange(this, other, d2);
12758
+ for (let d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)
12759
+ if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))
12760
+ return new NodeRange(this, other, d);
12761
12761
  return null;
12762
12762
  }
12763
12763
  /**
@@ -14776,8 +14776,8 @@ class ParseContext {
14776
14776
  textblockFromContext() {
14777
14777
  let $context = this.options.context;
14778
14778
  if ($context)
14779
- for (let d2 = $context.depth; d2 >= 0; d2--) {
14780
- let deflt = $context.node(d2).contentMatchAt($context.indexAfter(d2)).defaultType;
14779
+ for (let d = $context.depth; d >= 0; d--) {
14780
+ let deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;
14781
14781
  if (deflt && deflt.isTextblock && deflt.defaultAttrs)
14782
14782
  return deflt;
14783
14783
  }
@@ -15198,8 +15198,8 @@ function polygonToObj(polygonNode) {
15198
15198
  const points = [];
15199
15199
  polygonNode.elements.forEach((element) => {
15200
15200
  if (["wp:start", "wp:lineTo"].includes(element.name)) {
15201
- const { x, y: y2 } = element.attributes;
15202
- points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15201
+ const { x: x2, y: y2 } = element.attributes;
15202
+ points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
15203
15203
  }
15204
15204
  });
15205
15205
  if (points.length > 1) {
@@ -15222,13 +15222,13 @@ function objToPolygon(points) {
15222
15222
  elements: []
15223
15223
  };
15224
15224
  points.forEach((point, index2) => {
15225
- const [x, y2] = point;
15225
+ const [x2, y2] = point;
15226
15226
  const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15227
15227
  const pointNode = {
15228
15228
  name: tagName,
15229
15229
  type: tagName,
15230
15230
  attributes: {
15231
- x: pixelsToPolygonUnits(x),
15231
+ x: pixelsToPolygonUnits(x2),
15232
15232
  y: pixelsToPolygonUnits(y2)
15233
15233
  }
15234
15234
  };
@@ -17460,19 +17460,19 @@ function lift(tr, range2, target) {
17460
17460
  let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
17461
17461
  let start = gapStart, end = gapEnd;
17462
17462
  let before = Fragment.empty, openStart = 0;
17463
- for (let d2 = depth, splitting = false; d2 > target; d2--)
17464
- if (splitting || $from.index(d2) > 0) {
17463
+ for (let d = depth, splitting = false; d > target; d--)
17464
+ if (splitting || $from.index(d) > 0) {
17465
17465
  splitting = true;
17466
- before = Fragment.from($from.node(d2).copy(before));
17466
+ before = Fragment.from($from.node(d).copy(before));
17467
17467
  openStart++;
17468
17468
  } else {
17469
17469
  start--;
17470
17470
  }
17471
17471
  let after = Fragment.empty, openEnd = 0;
17472
- for (let d2 = depth, splitting = false; d2 > target; d2--)
17473
- if (splitting || $to.after(d2 + 1) < $to.end(d2)) {
17472
+ for (let d = depth, splitting = false; d > target; d--)
17473
+ if (splitting || $to.after(d + 1) < $to.end(d)) {
17474
17474
  splitting = true;
17475
- after = Fragment.from($to.node(d2).copy(after));
17475
+ after = Fragment.from($to.node(d).copy(after));
17476
17476
  openEnd++;
17477
17477
  } else {
17478
17478
  end++;
@@ -17592,8 +17592,8 @@ function canSplit(doc2, pos, depth = 1, typesAfter) {
17592
17592
  let innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;
17593
17593
  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)))
17594
17594
  return false;
17595
- for (let d2 = $pos.depth - 1, i = depth - 2; d2 > base; d2--, i--) {
17596
- let node = $pos.node(d2), index3 = $pos.index(d2);
17595
+ for (let d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {
17596
+ let node = $pos.node(d), index3 = $pos.index(d);
17597
17597
  if (node.type.spec.isolating)
17598
17598
  return false;
17599
17599
  let rest = node.content.cutByIndex(index3, node.childCount);
@@ -17610,10 +17610,10 @@ function canSplit(doc2, pos, depth = 1, typesAfter) {
17610
17610
  }
17611
17611
  function split(tr, pos, depth = 1, typesAfter) {
17612
17612
  let $pos = tr.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;
17613
- for (let d2 = $pos.depth, e = $pos.depth - depth, i = depth - 1; d2 > e; d2--, i--) {
17614
- before = Fragment.from($pos.node(d2).copy(before));
17613
+ for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {
17614
+ before = Fragment.from($pos.node(d).copy(before));
17615
17615
  let typeAfter = typesAfter && typesAfter[i];
17616
- after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after));
17616
+ after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
17617
17617
  }
17618
17618
  tr.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));
17619
17619
  }
@@ -17642,24 +17642,24 @@ function joinable(a, b2) {
17642
17642
  }
17643
17643
  function joinPoint(doc2, pos, dir = -1) {
17644
17644
  let $pos = doc2.resolve(pos);
17645
- for (let d2 = $pos.depth; ; d2--) {
17646
- let before, after, index2 = $pos.index(d2);
17647
- if (d2 == $pos.depth) {
17645
+ for (let d = $pos.depth; ; d--) {
17646
+ let before, after, index2 = $pos.index(d);
17647
+ if (d == $pos.depth) {
17648
17648
  before = $pos.nodeBefore;
17649
17649
  after = $pos.nodeAfter;
17650
17650
  } else if (dir > 0) {
17651
- before = $pos.node(d2 + 1);
17651
+ before = $pos.node(d + 1);
17652
17652
  index2++;
17653
- after = $pos.node(d2).maybeChild(index2);
17653
+ after = $pos.node(d).maybeChild(index2);
17654
17654
  } else {
17655
- before = $pos.node(d2).maybeChild(index2 - 1);
17656
- after = $pos.node(d2 + 1);
17655
+ before = $pos.node(d).maybeChild(index2 - 1);
17656
+ after = $pos.node(d + 1);
17657
17657
  }
17658
- if (before && !before.isTextblock && joinable(before, after) && $pos.node(d2).canReplace(index2, index2 + 1))
17658
+ if (before && !before.isTextblock && joinable(before, after) && $pos.node(d).canReplace(index2, index2 + 1))
17659
17659
  return pos;
17660
- if (d2 == 0)
17660
+ if (d == 0)
17661
17661
  break;
17662
- pos = dir < 0 ? $pos.before(d2) : $pos.after(d2);
17662
+ pos = dir < 0 ? $pos.before(d) : $pos.after(d);
17663
17663
  }
17664
17664
  }
17665
17665
  function join(tr, pos, depth) {
@@ -17694,19 +17694,19 @@ function insertPoint(doc2, pos, nodeType) {
17694
17694
  if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType))
17695
17695
  return pos;
17696
17696
  if ($pos.parentOffset == 0)
17697
- for (let d2 = $pos.depth - 1; d2 >= 0; d2--) {
17698
- let index2 = $pos.index(d2);
17699
- if ($pos.node(d2).canReplaceWith(index2, index2, nodeType))
17700
- return $pos.before(d2 + 1);
17697
+ for (let d = $pos.depth - 1; d >= 0; d--) {
17698
+ let index2 = $pos.index(d);
17699
+ if ($pos.node(d).canReplaceWith(index2, index2, nodeType))
17700
+ return $pos.before(d + 1);
17701
17701
  if (index2 > 0)
17702
17702
  return null;
17703
17703
  }
17704
17704
  if ($pos.parentOffset == $pos.parent.content.size)
17705
- for (let d2 = $pos.depth - 1; d2 >= 0; d2--) {
17706
- let index2 = $pos.indexAfter(d2);
17707
- if ($pos.node(d2).canReplaceWith(index2, index2, nodeType))
17708
- return $pos.after(d2 + 1);
17709
- if (index2 < $pos.node(d2).childCount)
17705
+ for (let d = $pos.depth - 1; d >= 0; d--) {
17706
+ let index2 = $pos.indexAfter(d);
17707
+ if ($pos.node(d).canReplaceWith(index2, index2, nodeType))
17708
+ return $pos.after(d + 1);
17709
+ if (index2 < $pos.node(d).childCount)
17710
17710
  return null;
17711
17711
  }
17712
17712
  return null;
@@ -17719,10 +17719,10 @@ function dropPoint(doc2, pos, slice) {
17719
17719
  for (let i = 0; i < slice.openStart; i++)
17720
17720
  content = content.firstChild.content;
17721
17721
  for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {
17722
- for (let d2 = $pos.depth; d2 >= 0; d2--) {
17723
- let bias = d2 == $pos.depth ? 0 : $pos.pos <= ($pos.start(d2 + 1) + $pos.end(d2 + 1)) / 2 ? -1 : 1;
17724
- let insertPos = $pos.index(d2) + (bias > 0 ? 1 : 0);
17725
- let parent = $pos.node(d2), fits = false;
17722
+ for (let d = $pos.depth; d >= 0; d--) {
17723
+ let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;
17724
+ let insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);
17725
+ let parent = $pos.node(d), fits = false;
17726
17726
  if (pass == 1) {
17727
17727
  fits = parent.canReplace(insertPos, insertPos, content);
17728
17728
  } else {
@@ -17730,7 +17730,7 @@ function dropPoint(doc2, pos, slice) {
17730
17730
  fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);
17731
17731
  }
17732
17732
  if (fits)
17733
- return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d2 + 1) : $pos.after(d2 + 1);
17733
+ return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);
17734
17734
  }
17735
17735
  }
17736
17736
  return null;
@@ -17796,12 +17796,12 @@ class Fitter {
17796
17796
  // depths, one for the slice and one for the frontier.
17797
17797
  findFittable() {
17798
17798
  let startDepth = this.unplaced.openStart;
17799
- for (let cur = this.unplaced.content, d2 = 0, openEnd = this.unplaced.openEnd; d2 < startDepth; d2++) {
17799
+ for (let cur = this.unplaced.content, d = 0, openEnd = this.unplaced.openEnd; d < startDepth; d++) {
17800
17800
  let node = cur.firstChild;
17801
17801
  if (cur.childCount > 1)
17802
17802
  openEnd = 0;
17803
- if (node.type.spec.isolating && openEnd <= d2) {
17804
- startDepth = d2;
17803
+ if (node.type.spec.isolating && openEnd <= d) {
17804
+ startDepth = d;
17805
17805
  break;
17806
17806
  }
17807
17807
  cur = node.content;
@@ -17907,9 +17907,9 @@ class Fitter {
17907
17907
  let fit = contentAfterFits($to, i, type2, match, dropInner);
17908
17908
  if (!fit)
17909
17909
  continue;
17910
- for (let d2 = i - 1; d2 >= 0; d2--) {
17911
- let { match: match2, type: type3 } = this.frontier[d2];
17912
- let matches2 = contentAfterFits($to, d2, type3, match2, true);
17910
+ for (let d = i - 1; d >= 0; d--) {
17911
+ let { match: match2, type: type3 } = this.frontier[d];
17912
+ let matches2 = contentAfterFits($to, d, type3, match2, true);
17913
17913
  if (!matches2 || matches2.childCount)
17914
17914
  continue scan;
17915
17915
  }
@@ -17925,8 +17925,8 @@ class Fitter {
17925
17925
  if (close2.fit.childCount)
17926
17926
  this.placed = addToFragment(this.placed, close2.depth, close2.fit);
17927
17927
  $to = close2.move;
17928
- for (let d2 = close2.depth + 1; d2 <= $to.depth; d2++) {
17929
- let node = $to.node(d2), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d2));
17928
+ for (let d = close2.depth + 1; d <= $to.depth; d++) {
17929
+ let node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));
17930
17930
  this.openFrontierNode(node.type, node.attrs, add);
17931
17931
  }
17932
17932
  return $to;
@@ -17999,14 +17999,14 @@ function replaceRange(tr, from, to, slice) {
17999
17999
  targetDepths.pop();
18000
18000
  let preferredTarget = -($from.depth + 1);
18001
18001
  targetDepths.unshift(preferredTarget);
18002
- for (let d2 = $from.depth, pos = $from.pos - 1; d2 > 0; d2--, pos--) {
18003
- let spec = $from.node(d2).type.spec;
18002
+ for (let d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {
18003
+ let spec = $from.node(d).type.spec;
18004
18004
  if (spec.defining || spec.definingAsContext || spec.isolating)
18005
18005
  break;
18006
- if (targetDepths.indexOf(d2) > -1)
18007
- preferredTarget = d2;
18008
- else if ($from.before(d2) == pos)
18009
- targetDepths.splice(1, 0, -d2);
18006
+ if (targetDepths.indexOf(d) > -1)
18007
+ preferredTarget = d;
18008
+ else if ($from.before(d) == pos)
18009
+ targetDepths.splice(1, 0, -d);
18010
18010
  }
18011
18011
  let preferredTargetIndex = targetDepths.indexOf(preferredTarget);
18012
18012
  let leftNodes = [], preferredDepth = slice.openStart;
@@ -18017,10 +18017,10 @@ function replaceRange(tr, from, to, slice) {
18017
18017
  break;
18018
18018
  content = node.content;
18019
18019
  }
18020
- for (let d2 = preferredDepth - 1; d2 >= 0; d2--) {
18021
- let leftNode = leftNodes[d2], def = definesContent(leftNode.type);
18020
+ for (let d = preferredDepth - 1; d >= 0; d--) {
18021
+ let leftNode = leftNodes[d], def = definesContent(leftNode.type);
18022
18022
  if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))
18023
- preferredDepth = d2;
18023
+ preferredDepth = d;
18024
18024
  else if (def || !leftNode.type.isTextblock)
18025
18025
  break;
18026
18026
  }
@@ -18082,20 +18082,20 @@ function deleteRange(tr, from, to) {
18082
18082
  if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))
18083
18083
  return tr.delete($from.before(depth), $to.after(depth));
18084
18084
  }
18085
- for (let d2 = 1; d2 <= $from.depth && d2 <= $to.depth; d2++) {
18086
- 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)))
18087
- return tr.delete($from.before(d2), to);
18085
+ for (let d = 1; d <= $from.depth && d <= $to.depth; d++) {
18086
+ 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)))
18087
+ return tr.delete($from.before(d), to);
18088
18088
  }
18089
18089
  tr.delete(from, to);
18090
18090
  }
18091
18091
  function coveredDepths($from, $to) {
18092
18092
  let result = [], minDepth = Math.min($from.depth, $to.depth);
18093
- for (let d2 = minDepth; d2 >= 0; d2--) {
18094
- let start = $from.start(d2);
18095
- 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)
18093
+ for (let d = minDepth; d >= 0; d--) {
18094
+ let start = $from.start(d);
18095
+ 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)
18096
18096
  break;
18097
- if (start == $to.start(d2) || d2 == $from.depth && d2 == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d2 && $to.start(d2 - 1) == start - 1)
18098
- result.push(d2);
18097
+ if (start == $to.start(d) || d == $from.depth && d == $to.depth && $from.parent.inlineContent && $to.parent.inlineContent && d && $to.start(d - 1) == start - 1)
18098
+ result.push(d);
18099
18099
  }
18100
18100
  return result;
18101
18101
  }
@@ -22886,7 +22886,7 @@ function posToDOMRect(view, from, to) {
22886
22886
  const right = Math.max(start.right, end.right);
22887
22887
  const width = right - left;
22888
22888
  const height = bottom - top;
22889
- const x = left;
22889
+ const x2 = left;
22890
22890
  const y2 = top;
22891
22891
  const data = {
22892
22892
  top,
@@ -22895,7 +22895,7 @@ function posToDOMRect(view, from, to) {
22895
22895
  right,
22896
22896
  width,
22897
22897
  height,
22898
- x,
22898
+ x: x2,
22899
22899
  y: y2
22900
22900
  };
22901
22901
  return {
@@ -22905,8 +22905,8 @@ function posToDOMRect(view, from, to) {
22905
22905
  }
22906
22906
  const isInTable = (state2) => {
22907
22907
  const { $head } = state2.selection;
22908
- for (let d2 = $head.depth; d2 > 0; d2 -= 1) {
22909
- if ($head.node(d2).type?.spec?.tableRole === "row") {
22908
+ for (let d = $head.depth; d > 0; d -= 1) {
22909
+ if ($head.node(d).type?.spec?.tableRole === "row") {
22910
22910
  return true;
22911
22911
  }
22912
22912
  }
@@ -22959,7 +22959,7 @@ function stripHtmlStyles(html) {
22959
22959
  function cleanStyle(style) {
22960
22960
  if (!style) return "";
22961
22961
  const declarations = style.split(";").map((s) => s.trim()).filter(Boolean);
22962
- const textAlign = declarations.find((d2) => d2.startsWith("text-align"));
22962
+ const textAlign = declarations.find((d) => d.startsWith("text-align"));
22963
22963
  return textAlign ? `${textAlign};` : "";
22964
22964
  }
22965
22965
  function preserveSpaces(innerHtml) {
@@ -22984,39 +22984,39 @@ function createDocFromHTML(content, schema, options = {}) {
22984
22984
  function L() {
22985
22985
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
22986
22986
  }
22987
- var O = L();
22988
- function G(l3) {
22989
- O = l3;
22987
+ var T = L();
22988
+ function G(u3) {
22989
+ T = u3;
22990
22990
  }
22991
- var E = { exec: () => null };
22992
- function h(l3, e = "") {
22993
- let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
22991
+ var I = { exec: () => null };
22992
+ function h(u3, e = "") {
22993
+ let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
22994
22994
  let s = typeof i == "string" ? i : i.source;
22995
22995
  return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
22996
22996
  }, getRegex: () => new RegExp(t, e) };
22997
22997
  return n;
22998
22998
  }
22999
- 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} *[^
23000
- ]`).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 };
23001
- var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
23002
- function w(l3, e) {
22999
+ 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} *[^
23000
+ ]`).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 };
23001
+ var Je = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (u3) => Je[u3];
23002
+ function w(u3, e) {
23003
23003
  if (e) {
23004
- if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
23005
- } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
23006
- return l3;
23004
+ if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ge);
23005
+ } else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ge);
23006
+ return u3;
23007
23007
  }
23008
- function J(l3) {
23008
+ function J(u3) {
23009
23009
  try {
23010
- l3 = encodeURI(l3).replace(m.percentDecode, "%");
23010
+ u3 = encodeURI(u3).replace(m.percentDecode, "%");
23011
23011
  } catch {
23012
23012
  return null;
23013
23013
  }
23014
- return l3;
23014
+ return u3;
23015
23015
  }
23016
- function V(l3, e) {
23017
- let t = l3.replace(m.findPipe, (i, s, o) => {
23018
- let a = false, u = s;
23019
- for (; --u >= 0 && o[u] === "\\"; ) a = !a;
23016
+ function V(u3, e) {
23017
+ let t = u3.replace(m.findPipe, (i, s, o) => {
23018
+ let a = false, l = s;
23019
+ for (; --l >= 0 && o[l] === "\\"; ) a = !a;
23020
23020
  return a ? "|" : " |";
23021
23021
  }), n = t.split(m.splitPipe), r = 0;
23022
23022
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
@@ -23024,33 +23024,33 @@ function V(l3, e) {
23024
23024
  for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
23025
23025
  return n;
23026
23026
  }
23027
- function z(l3, e, t) {
23028
- let n = l3.length;
23027
+ function z(u3, e, t) {
23028
+ let n = u3.length;
23029
23029
  if (n === 0) return "";
23030
23030
  let r = 0;
23031
23031
  for (; r < n; ) {
23032
- let i = l3.charAt(n - r - 1);
23032
+ let i = u3.charAt(n - r - 1);
23033
23033
  if (i === e && true) r++;
23034
23034
  else break;
23035
23035
  }
23036
- return l3.slice(0, n - r);
23036
+ return u3.slice(0, n - r);
23037
23037
  }
23038
- function ge(l3, e) {
23039
- if (l3.indexOf(e[1]) === -1) return -1;
23038
+ function fe(u3, e) {
23039
+ if (u3.indexOf(e[1]) === -1) return -1;
23040
23040
  let t = 0;
23041
- for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
23042
- else if (l3[n] === e[0]) t++;
23043
- else if (l3[n] === e[1] && (t--, t < 0)) return n;
23041
+ for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
23042
+ else if (u3[n] === e[0]) t++;
23043
+ else if (u3[n] === e[1] && (t--, t < 0)) return n;
23044
23044
  return t > 0 ? -2 : -1;
23045
23045
  }
23046
- function fe(l3, e, t, n, r) {
23047
- let i = e.href, s = e.title || null, o = l3[1].replace(r.other.outputLinkReplace, "$1");
23046
+ function me(u3, e, t, n, r) {
23047
+ let i = e.href, s = e.title || null, o = u3[1].replace(r.other.outputLinkReplace, "$1");
23048
23048
  n.state.inLink = true;
23049
- let a = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
23049
+ let a = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
23050
23050
  return n.state.inLink = false, a;
23051
23051
  }
23052
- function Je(l3, e, t) {
23053
- let n = l3.match(t.other.indentCodeCompensation);
23052
+ function Ve(u3, e, t) {
23053
+ let n = u3.match(t.other.indentCodeCompensation);
23054
23054
  if (n === null) return e;
23055
23055
  let r = n[1];
23056
23056
  return e.split(`
@@ -23067,7 +23067,7 @@ var y = class {
23067
23067
  __publicField(this, "options");
23068
23068
  __publicField(this, "rules");
23069
23069
  __publicField(this, "lexer");
23070
- this.options = e || O;
23070
+ this.options = e || T;
23071
23071
  }
23072
23072
  space(e) {
23073
23073
  let t = this.rules.block.newline.exec(e);
@@ -23084,7 +23084,7 @@ var y = class {
23084
23084
  fences(e) {
23085
23085
  let t = this.rules.block.fences.exec(e);
23086
23086
  if (t) {
23087
- let n = t[0], r = Je(n, t[3] || "", this.rules);
23087
+ let n = t[0], r = Ve(n, t[3] || "", this.rules);
23088
23088
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
23089
23089
  }
23090
23090
  }
@@ -23111,32 +23111,32 @@ var y = class {
23111
23111
  `).split(`
23112
23112
  `), r = "", i = "", s = [];
23113
23113
  for (; n.length > 0; ) {
23114
- let o = false, a = [], u;
23115
- for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a.push(n[u]), o = true;
23116
- else if (!o) a.push(n[u]);
23114
+ let o = false, a = [], l;
23115
+ for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) a.push(n[l]), o = true;
23116
+ else if (!o) a.push(n[l]);
23117
23117
  else break;
23118
- n = n.slice(u);
23119
- let p = a.join(`
23120
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
23118
+ n = n.slice(l);
23119
+ let c = a.join(`
23120
+ `), p = c.replace(this.rules.other.blockquoteSetextReplace, `
23121
23121
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
23122
23122
  r = r ? `${r}
23123
- ${p}` : p, i = i ? `${i}
23124
- ${c}` : c;
23125
- let f = this.lexer.state.top;
23126
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = f, n.length === 0) break;
23127
- let k = s.at(-1);
23128
- if (k?.type === "code") break;
23129
- if (k?.type === "blockquote") {
23130
- let x = k, g = x.raw + `
23123
+ ${c}` : c, i = i ? `${i}
23124
+ ${p}` : p;
23125
+ let g = this.lexer.state.top;
23126
+ if (this.lexer.state.top = true, this.lexer.blockTokens(p, s, true), this.lexer.state.top = g, n.length === 0) break;
23127
+ let d = s.at(-1);
23128
+ if (d?.type === "code") break;
23129
+ if (d?.type === "blockquote") {
23130
+ let R = d, f = R.raw + `
23131
23131
  ` + n.join(`
23132
- `), T = this.blockquote(g);
23133
- 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;
23132
+ `), O = this.blockquote(f);
23133
+ 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;
23134
23134
  break;
23135
- } else if (k?.type === "list") {
23136
- let x = k, g = x.raw + `
23135
+ } else if (d?.type === "list") {
23136
+ let R = d, f = R.raw + `
23137
23137
  ` + n.join(`
23138
- `), T = this.list(g);
23139
- 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(`
23138
+ `), O = this.list(f);
23139
+ 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(`
23140
23140
  `);
23141
23141
  continue;
23142
23142
  }
@@ -23151,43 +23151,43 @@ ${c}` : c;
23151
23151
  n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
23152
23152
  let s = this.rules.other.listItemRegex(n), o = false;
23153
23153
  for (; e; ) {
23154
- let u = false, p = "", c = "";
23154
+ let l = false, c = "", p = "";
23155
23155
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
23156
- p = t[0], e = e.substring(p.length);
23157
- let f = t[2].split(`
23158
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
23159
- `, 1)[0], x = !f.trim(), g = 0;
23160
- 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 + `
23161
- `, e = e.substring(k.length + 1), u = true), !u) {
23162
- 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);
23156
+ c = t[0], e = e.substring(c.length);
23157
+ let g = t[2].split(`
23158
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), d = e.split(`
23159
+ `, 1)[0], R = !g.trim(), f = 0;
23160
+ 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 + `
23161
+ `, e = e.substring(d.length + 1), l = true), !l) {
23162
+ 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);
23163
23163
  for (; e; ) {
23164
23164
  let Z = e.split(`
23165
23165
  `, 1)[0], A;
23166
- 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;
23167
- if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
23168
- ` + A.slice(g);
23166
+ 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;
23167
+ if (A.search(this.rules.other.nonSpaceChar) >= f || !d.trim()) p += `
23168
+ ` + A.slice(f);
23169
23169
  else {
23170
- if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f) || ne.test(f) || ee.test(f)) break;
23171
- c += `
23172
- ` + k;
23170
+ if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
23171
+ p += `
23172
+ ` + d;
23173
23173
  }
23174
- !x && !k.trim() && (x = true), p += Z + `
23175
- `, e = e.substring(Z.length + 1), f = A.slice(g);
23174
+ !R && !d.trim() && (R = true), c += Z + `
23175
+ `, e = e.substring(Z.length + 1), g = A.slice(f);
23176
23176
  }
23177
23177
  }
23178
- i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
23179
- let T = null, Y;
23180
- 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;
23178
+ i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(c) && (o = true));
23179
+ let O = null, Y;
23180
+ 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;
23181
23181
  }
23182
23182
  let a = i.items.at(-1);
23183
23183
  if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
23184
23184
  else return;
23185
23185
  i.raw = i.raw.trimEnd();
23186
- 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) {
23187
- 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));
23188
- i.loose = c;
23186
+ 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) {
23187
+ 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));
23188
+ i.loose = p;
23189
23189
  }
23190
- if (i.loose) for (let u = 0; u < i.items.length; u++) i.items[u].loose = true;
23190
+ if (i.loose) for (let l = 0; l < i.items.length; l++) i.items[l].loose = true;
23191
23191
  return i;
23192
23192
  }
23193
23193
  }
@@ -23210,7 +23210,7 @@ ${c}` : c;
23210
23210
  if (n.length === r.length) {
23211
23211
  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);
23212
23212
  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] });
23213
- 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] })));
23213
+ 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] })));
23214
23214
  return s;
23215
23215
  }
23216
23216
  }
@@ -23247,7 +23247,7 @@ ${c}` : c;
23247
23247
  let s = z(n.slice(0, -1), "\\");
23248
23248
  if ((n.length - s.length) % 2 === 0) return;
23249
23249
  } else {
23250
- let s = ge(t[2], "()");
23250
+ let s = fe(t[2], "()");
23251
23251
  if (s === -2) return;
23252
23252
  if (s > -1) {
23253
23253
  let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
@@ -23259,7 +23259,7 @@ ${c}` : c;
23259
23259
  let s = this.rules.other.pedanticHrefTitle.exec(r);
23260
23260
  s && (r = s[1], i = s[3]);
23261
23261
  } else i = t[3] ? t[3].slice(1, -1) : "";
23262
- 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);
23262
+ 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);
23263
23263
  }
23264
23264
  }
23265
23265
  reflink(e, t) {
@@ -23270,32 +23270,32 @@ ${c}` : c;
23270
23270
  let s = n[0].charAt(0);
23271
23271
  return { type: "text", raw: s, text: s };
23272
23272
  }
23273
- return fe(n, i, n[0], this.lexer, this.rules);
23273
+ return me(n, i, n[0], this.lexer, this.rules);
23274
23274
  }
23275
23275
  }
23276
23276
  emStrong(e, t, n = "") {
23277
23277
  let r = this.rules.inline.emStrongLDelim.exec(e);
23278
23278
  if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
23279
23279
  if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
23280
- let s = [...r[0]].length - 1, o, a, u = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23281
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
23280
+ let s = [...r[0]].length - 1, o, a, l = s, c = 0, p = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23281
+ for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null; ) {
23282
23282
  if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
23283
23283
  if (a = [...o].length, r[3] || r[4]) {
23284
- u += a;
23284
+ l += a;
23285
23285
  continue;
23286
23286
  } else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
23287
- p += a;
23287
+ c += a;
23288
23288
  continue;
23289
23289
  }
23290
- if (u -= a, u > 0) continue;
23291
- a = Math.min(a, a + u + p);
23292
- let f = [...r[0]][0].length, k = e.slice(0, s + r.index + f + a);
23290
+ if (l -= a, l > 0) continue;
23291
+ a = Math.min(a, a + l + c);
23292
+ let g = [...r[0]][0].length, d = e.slice(0, s + r.index + g + a);
23293
23293
  if (Math.min(s, a) % 2) {
23294
- let g = k.slice(1, -1);
23295
- return { type: "em", raw: k, text: g, tokens: this.lexer.inlineTokens(g) };
23294
+ let f = d.slice(1, -1);
23295
+ return { type: "em", raw: d, text: f, tokens: this.lexer.inlineTokens(f) };
23296
23296
  }
23297
- let x = k.slice(2, -2);
23298
- return { type: "strong", raw: k, text: x, tokens: this.lexer.inlineTokens(x) };
23297
+ let R = d.slice(2, -2);
23298
+ return { type: "strong", raw: d, text: R, tokens: this.lexer.inlineTokens(R) };
23299
23299
  }
23300
23300
  }
23301
23301
  }
@@ -23344,25 +23344,25 @@ ${c}` : c;
23344
23344
  }
23345
23345
  }
23346
23346
  };
23347
- var b = class l {
23347
+ var x = class u {
23348
23348
  constructor(e) {
23349
23349
  __publicField(this, "tokens");
23350
23350
  __publicField(this, "options");
23351
23351
  __publicField(this, "state");
23352
23352
  __publicField(this, "tokenizer");
23353
23353
  __publicField(this, "inlineQueue");
23354
- 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 };
23355
- let t = { other: m, block: I.normal, inline: M.normal };
23356
- 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;
23354
+ 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 };
23355
+ let t = { other: m, block: C.normal, inline: M.normal };
23356
+ 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;
23357
23357
  }
23358
23358
  static get rules() {
23359
- return { block: I, inline: M };
23359
+ return { block: C, inline: M };
23360
23360
  }
23361
23361
  static lex(e, t) {
23362
- return new l(t).lex(e);
23362
+ return new u(t).lex(e);
23363
23363
  }
23364
23364
  static lexInline(e, t) {
23365
- return new l(t).inlineTokens(e);
23365
+ return new u(t).inlineTokens(e);
23366
23366
  }
23367
23367
  lex(e) {
23368
23368
  e = e.replace(m.carriageReturn, `
@@ -23437,8 +23437,8 @@ var b = class l {
23437
23437
  let i = e;
23438
23438
  if (this.options.extensions?.startBlock) {
23439
23439
  let s = 1 / 0, o = e.slice(1), a;
23440
- this.options.extensions.startBlock.forEach((u) => {
23441
- a = u.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23440
+ this.options.extensions.startBlock.forEach((l) => {
23441
+ a = l.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23442
23442
  }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
23443
23443
  }
23444
23444
  if (this.state.top && (r = this.tokenizer.paragraph(i))) {
@@ -23484,7 +23484,7 @@ var b = class l {
23484
23484
  for (; e; ) {
23485
23485
  i || (s = ""), i = false;
23486
23486
  let o;
23487
- 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;
23487
+ 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;
23488
23488
  if (o = this.tokenizer.escape(e)) {
23489
23489
  e = e.substring(o.raw.length), t.push(o);
23490
23490
  continue;
@@ -23499,8 +23499,8 @@ var b = class l {
23499
23499
  }
23500
23500
  if (o = this.tokenizer.reflink(e, this.tokens.links)) {
23501
23501
  e = e.substring(o.raw.length);
23502
- let u = t.at(-1);
23503
- o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23502
+ let l = t.at(-1);
23503
+ o.type === "text" && l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
23504
23504
  continue;
23505
23505
  }
23506
23506
  if (o = this.tokenizer.emStrong(e, n, s)) {
@@ -23529,23 +23529,23 @@ var b = class l {
23529
23529
  }
23530
23530
  let a = e;
23531
23531
  if (this.options.extensions?.startInline) {
23532
- let u = 1 / 0, p = e.slice(1), c;
23533
- this.options.extensions.startInline.forEach((f) => {
23534
- c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
23535
- }), u < 1 / 0 && u >= 0 && (a = e.substring(0, u + 1));
23532
+ let l = 1 / 0, c = e.slice(1), p;
23533
+ this.options.extensions.startInline.forEach((g) => {
23534
+ p = g.call({ lexer: this }, c), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
23535
+ }), l < 1 / 0 && l >= 0 && (a = e.substring(0, l + 1));
23536
23536
  }
23537
23537
  if (o = this.tokenizer.inlineText(a)) {
23538
23538
  e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
23539
- let u = t.at(-1);
23540
- u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23539
+ let l = t.at(-1);
23540
+ l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
23541
23541
  continue;
23542
23542
  }
23543
23543
  if (e) {
23544
- let u = "Infinite loop on byte: " + e.charCodeAt(0);
23544
+ let l = "Infinite loop on byte: " + e.charCodeAt(0);
23545
23545
  if (this.options.silent) {
23546
- console.error(u);
23546
+ console.error(l);
23547
23547
  break;
23548
- } else throw new Error(u);
23548
+ } else throw new Error(l);
23549
23549
  }
23550
23550
  }
23551
23551
  return t;
@@ -23555,7 +23555,7 @@ var P = class {
23555
23555
  constructor(e) {
23556
23556
  __publicField(this, "options");
23557
23557
  __publicField(this, "parser");
23558
- this.options = e || O;
23558
+ this.options = e || T;
23559
23559
  }
23560
23560
  space(e) {
23561
23561
  return "";
@@ -23703,18 +23703,18 @@ var $ = class {
23703
23703
  return "";
23704
23704
  }
23705
23705
  };
23706
- var R = class l2 {
23706
+ var b = class u2 {
23707
23707
  constructor(e) {
23708
23708
  __publicField(this, "options");
23709
23709
  __publicField(this, "renderer");
23710
23710
  __publicField(this, "textRenderer");
23711
- 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 $();
23711
+ 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 $();
23712
23712
  }
23713
23713
  static parse(e, t) {
23714
- return new l2(t).parse(e);
23714
+ return new u2(t).parse(e);
23715
23715
  }
23716
23716
  static parseInline(e, t) {
23717
- return new l2(t).parseInline(e);
23717
+ return new u2(t).parseInline(e);
23718
23718
  }
23719
23719
  parse(e, t = true) {
23720
23720
  let n = "";
@@ -23852,7 +23852,7 @@ var S = (_a = class {
23852
23852
  constructor(e) {
23853
23853
  __publicField(this, "options");
23854
23854
  __publicField(this, "block");
23855
- this.options = e || O;
23855
+ this.options = e || T;
23856
23856
  }
23857
23857
  preprocess(e) {
23858
23858
  return e;
@@ -23867,10 +23867,10 @@ var S = (_a = class {
23867
23867
  return e;
23868
23868
  }
23869
23869
  provideLexer() {
23870
- return this.block ? b.lex : b.lexInline;
23870
+ return this.block ? x.lex : x.lexInline;
23871
23871
  }
23872
23872
  provideParser() {
23873
- return this.block ? R.parse : R.parseInline;
23873
+ return this.block ? b.parse : b.parseInline;
23874
23874
  }
23875
23875
  }, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
23876
23876
  var B = class {
@@ -23879,10 +23879,10 @@ var B = class {
23879
23879
  __publicField(this, "options", this.setOptions);
23880
23880
  __publicField(this, "parse", this.parseMarkdown(true));
23881
23881
  __publicField(this, "parseInline", this.parseMarkdown(false));
23882
- __publicField(this, "Parser", R);
23882
+ __publicField(this, "Parser", b);
23883
23883
  __publicField(this, "Renderer", P);
23884
23884
  __publicField(this, "TextRenderer", $);
23885
- __publicField(this, "Lexer", b);
23885
+ __publicField(this, "Lexer", x);
23886
23886
  __publicField(this, "Tokenizer", y);
23887
23887
  __publicField(this, "Hooks", S);
23888
23888
  this.use(...e);
@@ -23935,10 +23935,10 @@ var B = class {
23935
23935
  for (let s in n.renderer) {
23936
23936
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
23937
23937
  if (["options", "parser"].includes(s)) continue;
23938
- let o = s, a = n.renderer[o], u = i[o];
23939
- i[o] = (...p) => {
23940
- let c = a.apply(i, p);
23941
- return c === false && (c = u.apply(i, p)), c || "";
23938
+ let o = s, a = n.renderer[o], l = i[o];
23939
+ i[o] = (...c) => {
23940
+ let p = a.apply(i, c);
23941
+ return p === false && (p = l.apply(i, c)), p || "";
23942
23942
  };
23943
23943
  }
23944
23944
  r.renderer = i;
@@ -23948,10 +23948,10 @@ var B = class {
23948
23948
  for (let s in n.tokenizer) {
23949
23949
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
23950
23950
  if (["options", "rules", "lexer"].includes(s)) continue;
23951
- let o = s, a = n.tokenizer[o], u = i[o];
23952
- i[o] = (...p) => {
23953
- let c = a.apply(i, p);
23954
- return c === false && (c = u.apply(i, p)), c;
23951
+ let o = s, a = n.tokenizer[o], l = i[o];
23952
+ i[o] = (...c) => {
23953
+ let p = a.apply(i, c);
23954
+ return p === false && (p = l.apply(i, c)), p;
23955
23955
  };
23956
23956
  }
23957
23957
  r.tokenizer = i;
@@ -23961,14 +23961,21 @@ var B = class {
23961
23961
  for (let s in n.hooks) {
23962
23962
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
23963
23963
  if (["options", "block"].includes(s)) continue;
23964
- let o = s, a = n.hooks[o], u = i[o];
23965
- S.passThroughHooks.has(s) ? i[o] = (p) => {
23966
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
23967
- let c = a.call(i, p);
23968
- return u.call(i, c);
23969
- } : i[o] = (...p) => {
23970
- let c = a.apply(i, p);
23971
- return c === false && (c = u.apply(i, p)), c;
23964
+ let o = s, a = n.hooks[o], l = i[o];
23965
+ S.passThroughHooks.has(s) ? i[o] = (c) => {
23966
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
23967
+ let g = await a.call(i, c);
23968
+ return l.call(i, g);
23969
+ })();
23970
+ let p = a.call(i, c);
23971
+ return l.call(i, p);
23972
+ } : i[o] = (...c) => {
23973
+ if (this.defaults.async) return (async () => {
23974
+ let g = await a.apply(i, c);
23975
+ return g === false && (g = await l.apply(i, c)), g;
23976
+ })();
23977
+ let p = a.apply(i, c);
23978
+ return p === false && (p = l.apply(i, c)), p;
23972
23979
  };
23973
23980
  }
23974
23981
  r.hooks = i;
@@ -23987,10 +23994,10 @@ var B = class {
23987
23994
  return this.defaults = { ...this.defaults, ...e }, this;
23988
23995
  }
23989
23996
  lexer(e, t) {
23990
- return b.lex(e, t ?? this.defaults);
23997
+ return x.lex(e, t ?? this.defaults);
23991
23998
  }
23992
23999
  parser(e, t) {
23993
- return R.parse(e, t ?? this.defaults);
24000
+ return b.parse(e, t ?? this.defaults);
23994
24001
  }
23995
24002
  parseMarkdown(e) {
23996
24003
  return (n, r) => {
@@ -23998,17 +24005,20 @@ var B = class {
23998
24005
  if (this.defaults.async === true && i.async === false) return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
23999
24006
  if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
24000
24007
  if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
24001
- s.hooks && (s.hooks.options = s, s.hooks.block = e);
24002
- let a = s.hooks ? s.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s.hooks ? s.hooks.provideParser() : e ? R.parse : R.parseInline;
24003
- 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);
24008
+ if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
24009
+ 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;
24010
+ s.walkTokens && await Promise.all(this.walkTokens(p, s.walkTokens));
24011
+ let d = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
24012
+ return s.hooks ? await s.hooks.postprocess(d) : d;
24013
+ })().catch(o);
24004
24014
  try {
24005
24015
  s.hooks && (n = s.hooks.preprocess(n));
24006
- let p = a(n, s);
24007
- s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
24008
- let c = u(p, s);
24009
- return s.hooks && (c = s.hooks.postprocess(c)), c;
24010
- } catch (p) {
24011
- return o(p);
24016
+ let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
24017
+ s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
24018
+ let p = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
24019
+ return s.hooks && (p = s.hooks.postprocess(p)), p;
24020
+ } catch (a) {
24021
+ return o(a);
24012
24022
  }
24013
24023
  };
24014
24024
  }
@@ -24025,38 +24035,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24025
24035
  }
24026
24036
  };
24027
24037
  var _ = new B();
24028
- function d(l3, e) {
24029
- return _.parse(l3, e);
24030
- }
24031
- d.options = d.setOptions = function(l3) {
24032
- return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
24033
- };
24034
- d.getDefaults = L;
24035
- d.defaults = O;
24036
- d.use = function(...l3) {
24037
- return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
24038
- };
24039
- d.walkTokens = function(l3, e) {
24040
- return _.walkTokens(l3, e);
24041
- };
24042
- d.parseInline = _.parseInline;
24043
- d.Parser = R;
24044
- d.parser = R.parse;
24045
- d.Renderer = P;
24046
- d.TextRenderer = $;
24047
- d.Lexer = b;
24048
- d.lexer = b.lex;
24049
- d.Tokenizer = y;
24050
- d.Hooks = S;
24051
- d.parse = d;
24052
- d.options;
24053
- d.setOptions;
24054
- d.use;
24055
- d.walkTokens;
24056
- d.parseInline;
24057
- R.parse;
24058
- b.lex;
24059
- d.use({
24038
+ function k(u3, e) {
24039
+ return _.parse(u3, e);
24040
+ }
24041
+ k.options = k.setOptions = function(u3) {
24042
+ return _.setOptions(u3), k.defaults = _.defaults, G(k.defaults), k;
24043
+ };
24044
+ k.getDefaults = L;
24045
+ k.defaults = T;
24046
+ k.use = function(...u3) {
24047
+ return _.use(...u3), k.defaults = _.defaults, G(k.defaults), k;
24048
+ };
24049
+ k.walkTokens = function(u3, e) {
24050
+ return _.walkTokens(u3, e);
24051
+ };
24052
+ k.parseInline = _.parseInline;
24053
+ k.Parser = b;
24054
+ k.parser = b.parse;
24055
+ k.Renderer = P;
24056
+ k.TextRenderer = $;
24057
+ k.Lexer = x;
24058
+ k.lexer = x.lex;
24059
+ k.Tokenizer = y;
24060
+ k.Hooks = S;
24061
+ k.parse = k;
24062
+ k.options;
24063
+ k.setOptions;
24064
+ k.use;
24065
+ k.walkTokens;
24066
+ k.parseInline;
24067
+ b.parse;
24068
+ x.lex;
24069
+ k.use({
24060
24070
  breaks: false,
24061
24071
  // Use proper paragraphs, not <br> tags
24062
24072
  gfm: true
@@ -24067,7 +24077,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
24067
24077
  return createDocFromHTML(html, schema, options);
24068
24078
  }
24069
24079
  function convertMarkdownToHTML(markdown) {
24070
- let html = d.parse(markdown, { async: false });
24080
+ let html = k.parse(markdown, { async: false });
24071
24081
  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");
24072
24082
  }
24073
24083
  function processContent({ content, type: type2, schema }) {
@@ -24246,7 +24256,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
24246
24256
  };
24247
24257
  const getNewListId = (editor, grouping = "definitions") => {
24248
24258
  const defs = editor.converter.numbering[grouping] || {};
24249
- const intKeys = Object.keys(defs).map((k) => Number(k)).filter((n) => Number.isInteger(n));
24259
+ const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
24250
24260
  const max2 = intKeys.length ? Math.max(...intKeys) : 0;
24251
24261
  return max2 + 1;
24252
24262
  };
@@ -35893,7 +35903,7 @@ const _SuperConverter = class _SuperConverter {
35893
35903
  static getStoredSuperdocVersion(docx) {
35894
35904
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
35895
35905
  }
35896
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.29.0-next.11") {
35906
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.29.0-next.13") {
35897
35907
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
35898
35908
  }
35899
35909
  /**
@@ -36287,7 +36297,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
36287
36297
  };
36288
36298
  exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36289
36299
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36290
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
36300
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36291
36301
  const newDocRels = [];
36292
36302
  Object.entries(this.headers).forEach(([id, header], index2) => {
36293
36303
  const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
@@ -36328,7 +36338,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36328
36338
  }
36329
36339
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36330
36340
  if (params.relationships.length) {
36331
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36341
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36332
36342
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36333
36343
  declaration: this.initialJSON?.declaration,
36334
36344
  elements: [
@@ -36382,7 +36392,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36382
36392
  }
36383
36393
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36384
36394
  if (params.relationships.length) {
36385
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36395
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36386
36396
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36387
36397
  declaration: this.initialJSON?.declaration,
36388
36398
  elements: [
@@ -36401,7 +36411,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36401
36411
  };
36402
36412
  exportProcessNewRelationships_fn = function(rels = []) {
36403
36413
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36404
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
36414
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36405
36415
  relationships.elements = mergeRelationshipElements(relationships.elements, rels);
36406
36416
  };
36407
36417
  exportProcessMediaFiles_fn = async function(media = {}) {