@harbour-enterprises/superdoc 0.28.1 → 0.29.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/chunks/{PdfViewer-Can0yoW4.cjs → PdfViewer-D-eZ2Yov.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-DJkdA-8o.es.js → PdfViewer-DkZrQk4g.es.js} +1 -1
  3. package/dist/chunks/{index-DidXsI6u.es.js → index-DJQlES_f.es.js} +3 -3
  4. package/dist/chunks/{index-njnq8umX-DU2xcaHZ.es.js → index-DQ6dCde6-BZTSGgXX.es.js} +1 -1
  5. package/dist/chunks/{index-njnq8umX-_TfP84XP.cjs → index-DQ6dCde6-BnMDi7G1.cjs} +1 -1
  6. package/dist/chunks/{index-BY-vlgKe.cjs → index-zeAsCB89.cjs} +3 -3
  7. package/dist/chunks/{super-editor.es-ksiTgGLm.cjs → super-editor.es-BV85aAFJ.cjs} +1739 -1156
  8. package/dist/chunks/{super-editor.es-Br566URP.es.js → super-editor.es-CLErM40t.es.js} +1739 -1156
  9. package/dist/core/types/index.d.ts.map +1 -1
  10. package/dist/style.css +10 -0
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-D6Z6OmA3.js → converter-iD03MYzC.js} +748 -672
  13. package/dist/super-editor/chunks/{docx-zipper-Dni97kMT.js → docx-zipper-nrZgxvR8.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-D3TKfdXs.js → editor-C7iHgXnE.js} +644 -137
  15. package/dist/super-editor/chunks/{index-njnq8umX.js → index-DQ6dCde6.js} +1 -1
  16. package/dist/super-editor/chunks/{toolbar-fNE3luLB.js → toolbar-DKrq-G-q.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/style.css +10 -0
  22. package/dist/super-editor/super-editor/src/core/helpers/rangeUtils.d.ts +2 -0
  23. package/dist/super-editor/super-editor/src/core/super-converter/relationship-helpers.d.ts +2 -0
  24. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/listImporter.d.ts +1 -1
  25. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/numberingCache.d.ts +2 -2
  26. package/dist/super-editor/super-editor/src/extensions/field-annotation/FieldAnnotationPlugin.d.ts +5 -1
  27. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/imagePositionPlugin.d.ts +2 -0
  28. package/dist/super-editor/super-editor/src/extensions/list-item/helpers/listItemTypography.d.ts +5 -0
  29. package/dist/super-editor/super-editor/src/extensions/list-item/helpers/styledListMarkerPlugin.d.ts +11 -2
  30. package/dist/super-editor/super-editor/src/extensions/tab/helpers/tabDecorations.d.ts +4 -1
  31. package/dist/super-editor/super-editor/src/utils/headless-helpers.d.ts +1 -0
  32. package/dist/super-editor/super-editor/src/utils/styleIsolation.d.ts +2 -0
  33. package/dist/super-editor/super-editor.es.js +6 -6
  34. package/dist/super-editor/toolbar.es.js +2 -2
  35. package/dist/super-editor.cjs +1 -1
  36. package/dist/super-editor.es.js +1 -1
  37. package/dist/superdoc.cjs +2 -2
  38. package/dist/superdoc.es.js +2 -2
  39. package/dist/superdoc.umd.js +1503 -920
  40. package/dist/superdoc.umd.js.map +1 -1
  41. package/package.json +1 -1
  42. package/dist/images/altText_add.svg +0 -3
  43. package/dist/images/altText_disclaimer.svg +0 -3
  44. package/dist/images/altText_done.svg +0 -3
  45. package/dist/images/altText_spinner.svg +0 -30
  46. package/dist/images/altText_warning.svg +0 -3
  47. package/dist/images/annotation-check.svg +0 -11
  48. package/dist/images/annotation-comment.svg +0 -16
  49. package/dist/images/annotation-help.svg +0 -26
  50. package/dist/images/annotation-insert.svg +0 -10
  51. package/dist/images/annotation-key.svg +0 -11
  52. package/dist/images/annotation-newparagraph.svg +0 -11
  53. package/dist/images/annotation-noicon.svg +0 -7
  54. package/dist/images/annotation-note.svg +0 -42
  55. package/dist/images/annotation-paperclip.svg +0 -6
  56. package/dist/images/annotation-paragraph.svg +0 -16
  57. package/dist/images/annotation-pushpin.svg +0 -7
  58. package/dist/images/cursor-editorFreeHighlight.svg +0 -6
  59. package/dist/images/cursor-editorFreeText.svg +0 -3
  60. package/dist/images/cursor-editorInk.svg +0 -4
  61. package/dist/images/cursor-editorTextHighlight.svg +0 -8
  62. package/dist/images/editor-toolbar-delete.svg +0 -5
  63. package/dist/images/loading-icon.gif +0 -0
  64. package/dist/images/messageBar_closingButton.svg +0 -3
  65. package/dist/images/messageBar_warning.svg +0 -3
  66. package/dist/images/toolbarButton-editorHighlight.svg +0 -6
  67. package/dist/images/toolbarButton-menuArrow.svg +0 -3
@@ -823,7 +823,7 @@
823
823
  },
824
824
  concat(...args) {
825
825
  return reactiveReadArray(this).concat(
826
- ...args.map((x2) => isArray$3(x2) ? reactiveReadArray(x2) : x2)
826
+ ...args.map((x) => isArray$3(x) ? reactiveReadArray(x) : x)
827
827
  );
828
828
  },
829
829
  entries() {
@@ -8158,17 +8158,17 @@
8158
8158
  );
8159
8159
  }
8160
8160
  if (a2 === b2) return 0;
8161
- let x2 = a2.length;
8161
+ let x = a2.length;
8162
8162
  let y2 = b2.length;
8163
- for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
8163
+ for (let i2 = 0, len2 = Math.min(x, y2); i2 < len2; ++i2) {
8164
8164
  if (a2[i2] !== b2[i2]) {
8165
- x2 = a2[i2];
8165
+ x = a2[i2];
8166
8166
  y2 = b2[i2];
8167
8167
  break;
8168
8168
  }
8169
8169
  }
8170
- if (x2 < y2) return -1;
8171
- if (y2 < x2) return 1;
8170
+ if (x < y2) return -1;
8171
+ if (y2 < x) return 1;
8172
8172
  return 0;
8173
8173
  };
8174
8174
  Buffer3.isEncoding = function isEncoding(encoding) {
@@ -8417,20 +8417,20 @@
8417
8417
  thisStart >>>= 0;
8418
8418
  thisEnd >>>= 0;
8419
8419
  if (this === target) return 0;
8420
- let x2 = thisEnd - thisStart;
8420
+ let x = thisEnd - thisStart;
8421
8421
  let y2 = end2 - start2;
8422
- const len2 = Math.min(x2, y2);
8422
+ const len2 = Math.min(x, y2);
8423
8423
  const thisCopy = this.slice(thisStart, thisEnd);
8424
8424
  const targetCopy = target.slice(start2, end2);
8425
8425
  for (let i2 = 0; i2 < len2; ++i2) {
8426
8426
  if (thisCopy[i2] !== targetCopy[i2]) {
8427
- x2 = thisCopy[i2];
8427
+ x = thisCopy[i2];
8428
8428
  y2 = targetCopy[i2];
8429
8429
  break;
8430
8430
  }
8431
8431
  }
8432
- if (x2 < y2) return -1;
8433
- if (y2 < x2) return 1;
8432
+ if (x < y2) return -1;
8433
+ if (y2 < x) return 1;
8434
8434
  return 0;
8435
8435
  };
8436
8436
  function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
@@ -9520,8 +9520,8 @@
9520
9520
  })(buffer);
9521
9521
  const Buffer2 = buffer.Buffer;
9522
9522
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
9523
- function getDefaultExportFromCjs$2(x2) {
9524
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
9523
+ function getDefaultExportFromCjs$2(x) {
9524
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
9525
9525
  }
9526
9526
  var sax = {};
9527
9527
  var events$2 = { exports: {} };
@@ -9529,13 +9529,13 @@
9529
9529
  function requireEvents() {
9530
9530
  if (hasRequiredEvents) return events$2.exports;
9531
9531
  hasRequiredEvents = 1;
9532
- var R = typeof Reflect === "object" ? Reflect : null;
9533
- var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
9532
+ var R2 = typeof Reflect === "object" ? Reflect : null;
9533
+ var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
9534
9534
  return Function.prototype.apply.call(target, receiver, args);
9535
9535
  };
9536
9536
  var ReflectOwnKeys;
9537
- if (R && typeof R.ownKeys === "function") {
9538
- ReflectOwnKeys = R.ownKeys;
9537
+ if (R2 && typeof R2.ownKeys === "function") {
9538
+ ReflectOwnKeys = R2.ownKeys;
9539
9539
  } else if (Object.getOwnPropertySymbols) {
9540
9540
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
9541
9541
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -9925,8 +9925,8 @@
9925
9925
  }
9926
9926
  return inherits_browser.exports;
9927
9927
  }
9928
- function getDefaultExportFromCjs$1(x2) {
9929
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
9928
+ function getDefaultExportFromCjs$1(x) {
9929
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
9930
9930
  }
9931
9931
  var browser$1 = { exports: {} };
9932
9932
  var process$2 = browser$1.exports = {};
@@ -10507,17 +10507,17 @@
10507
10507
  );
10508
10508
  }
10509
10509
  if (a2 === b2) return 0;
10510
- let x2 = a2.length;
10510
+ let x = a2.length;
10511
10511
  let y2 = b2.length;
10512
- for (let i22 = 0, len22 = Math.min(x2, y2); i22 < len22; ++i22) {
10512
+ for (let i22 = 0, len22 = Math.min(x, y2); i22 < len22; ++i22) {
10513
10513
  if (a2[i22] !== b2[i22]) {
10514
- x2 = a2[i22];
10514
+ x = a2[i22];
10515
10515
  y2 = b2[i22];
10516
10516
  break;
10517
10517
  }
10518
10518
  }
10519
- if (x2 < y2) return -1;
10520
- if (y2 < x2) return 1;
10519
+ if (x < y2) return -1;
10520
+ if (y2 < x) return 1;
10521
10521
  return 0;
10522
10522
  };
10523
10523
  Buffer4.isEncoding = function isEncoding(encoding) {
@@ -10766,20 +10766,20 @@
10766
10766
  thisStart >>>= 0;
10767
10767
  thisEnd >>>= 0;
10768
10768
  if (this === target) return 0;
10769
- let x2 = thisEnd - thisStart;
10769
+ let x = thisEnd - thisStart;
10770
10770
  let y2 = end2 - start2;
10771
- const len22 = Math.min(x2, y2);
10771
+ const len22 = Math.min(x, y2);
10772
10772
  const thisCopy = this.slice(thisStart, thisEnd);
10773
10773
  const targetCopy = target.slice(start2, end2);
10774
10774
  for (let i22 = 0; i22 < len22; ++i22) {
10775
10775
  if (thisCopy[i22] !== targetCopy[i22]) {
10776
- x2 = thisCopy[i22];
10776
+ x = thisCopy[i22];
10777
10777
  y2 = targetCopy[i22];
10778
10778
  break;
10779
10779
  }
10780
10780
  }
10781
- if (x2 < y2) return -1;
10782
- if (y2 < x2) return 1;
10781
+ if (x < y2) return -1;
10782
+ if (y2 < x) return 1;
10783
10783
  return 0;
10784
10784
  };
10785
10785
  function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
@@ -12351,15 +12351,15 @@
12351
12351
  var reflectGetProto = requireReflect_getPrototypeOf();
12352
12352
  var originalGetProto = requireObject_getPrototypeOf();
12353
12353
  var getDunderProto = /* @__PURE__ */ requireGet();
12354
- getProto = reflectGetProto ? function getProto2(O) {
12355
- return reflectGetProto(O);
12356
- } : originalGetProto ? function getProto2(O) {
12357
- if (!O || typeof O !== "object" && typeof O !== "function") {
12354
+ getProto = reflectGetProto ? function getProto2(O2) {
12355
+ return reflectGetProto(O2);
12356
+ } : originalGetProto ? function getProto2(O2) {
12357
+ if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
12358
12358
  throw new TypeError("getProto: not an object");
12359
12359
  }
12360
- return originalGetProto(O);
12361
- } : getDunderProto ? function getProto2(O) {
12362
- return getDunderProto(O);
12360
+ return originalGetProto(O2);
12361
+ } : getDunderProto ? function getProto2(O2) {
12362
+ return getDunderProto(O2);
12363
12363
  } : null;
12364
12364
  return getProto;
12365
12365
  }
@@ -13037,8 +13037,8 @@
13037
13037
  }
13038
13038
  }
13039
13039
  };
13040
- function isArray2(x2) {
13041
- return toStr.call(x2) === "[object Array]";
13040
+ function isArray2(x) {
13041
+ return toStr.call(x) === "[object Array]";
13042
13042
  }
13043
13043
  forEach = function forEach2(list2, iterator2, thisArg) {
13044
13044
  if (!isCallable2(iterator2)) {
@@ -13647,10 +13647,10 @@
13647
13647
  var i2 = 1;
13648
13648
  var args = arguments;
13649
13649
  var len2 = args.length;
13650
- var str = String(f2).replace(formatRegExp, function(x3) {
13651
- if (x3 === "%%") return "%";
13652
- if (i2 >= len2) return x3;
13653
- switch (x3) {
13650
+ var str = String(f2).replace(formatRegExp, function(x2) {
13651
+ if (x2 === "%%") return "%";
13652
+ if (i2 >= len2) return x2;
13653
+ switch (x2) {
13654
13654
  case "%s":
13655
13655
  return String(args[i2++]);
13656
13656
  case "%d":
@@ -13662,14 +13662,14 @@
13662
13662
  return "[Circular]";
13663
13663
  }
13664
13664
  default:
13665
- return x3;
13665
+ return x2;
13666
13666
  }
13667
13667
  });
13668
- for (var x2 = args[i2]; i2 < len2; x2 = args[++i2]) {
13669
- if (isNull(x2) || !isObject2(x2)) {
13670
- str += " " + x2;
13668
+ for (var x = args[i2]; i2 < len2; x = args[++i2]) {
13669
+ if (isNull(x) || !isObject2(x)) {
13670
+ str += " " + x;
13671
13671
  } else {
13672
- str += " " + inspect2(x2);
13672
+ str += " " + inspect2(x);
13673
13673
  }
13674
13674
  }
13675
13675
  return str;
@@ -13882,7 +13882,7 @@
13882
13882
  }
13883
13883
  function formatArray(ctx2, value, recurseTimes, visibleKeys, keys2) {
13884
13884
  var output = [];
13885
- for (var i2 = 0, l = value.length; i2 < l; ++i2) {
13885
+ for (var i2 = 0, l3 = value.length; i2 < l3; ++i2) {
13886
13886
  if (hasOwnProperty2(value, String(i2))) {
13887
13887
  output.push(formatProperty(
13888
13888
  ctx2,
@@ -14981,8 +14981,8 @@
14981
14981
  state2.bufferProcessing = true;
14982
14982
  var entry = state2.bufferedRequest;
14983
14983
  if (stream._writev && entry && entry.next) {
14984
- var l = state2.bufferedRequestCount;
14985
- var buffer2 = new Array(l);
14984
+ var l3 = state2.bufferedRequestCount;
14985
+ var buffer2 = new Array(l3);
14986
14986
  var holder = state2.corkedRequestsFree;
14987
14987
  holder.entry = entry;
14988
14988
  var count = 0;
@@ -15234,7 +15234,6 @@
15234
15234
  }
15235
15235
  var string_decoder = {};
15236
15236
  var safeBuffer = { exports: {} };
15237
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
15238
15237
  var hasRequiredSafeBuffer;
15239
15238
  function requireSafeBuffer() {
15240
15239
  if (hasRequiredSafeBuffer) return safeBuffer.exports;
@@ -15256,7 +15255,6 @@
15256
15255
  function SafeBuffer(arg, encodingOrOffset, length2) {
15257
15256
  return Buffer3(arg, encodingOrOffset, length2);
15258
15257
  }
15259
- SafeBuffer.prototype = Object.create(Buffer3.prototype);
15260
15258
  copyProps(Buffer3, SafeBuffer);
15261
15259
  SafeBuffer.from = function(arg, encodingOrOffset, length2) {
15262
15260
  if (typeof arg === "number") {
@@ -16534,9 +16532,9 @@
16534
16532
  return from2(Readable, iterable, opts);
16535
16533
  };
16536
16534
  }
16537
- function indexOf(xs, x2) {
16538
- for (var i2 = 0, l = xs.length; i2 < l; i2++) {
16539
- if (xs[i2] === x2) return i2;
16535
+ function indexOf(xs, x) {
16536
+ for (var i2 = 0, l3 = xs.length; i2 < l3; i2++) {
16537
+ if (xs[i2] === x) return i2;
16540
16538
  }
16541
16539
  return -1;
16542
16540
  }
@@ -16915,7 +16913,7 @@
16915
16913
  function checkBufferLength(parser) {
16916
16914
  var maxAllowed = Math.max(sax2.MAX_BUFFER_LENGTH, 10);
16917
16915
  var maxActual = 0;
16918
- for (var i2 = 0, l = buffers.length; i2 < l; i2++) {
16916
+ for (var i2 = 0, l3 = buffers.length; i2 < l3; i2++) {
16919
16917
  var len2 = parser[buffers[i2]].length;
16920
16918
  if (len2 > maxAllowed) {
16921
16919
  switch (buffers[i2]) {
@@ -16940,7 +16938,7 @@
16940
16938
  parser.bufferCheckPosition = m2 + parser.position;
16941
16939
  }
16942
16940
  function clearBuffers(parser) {
16943
- for (var i2 = 0, l = buffers.length; i2 < l; i2++) {
16941
+ for (var i2 = 0, l3 = buffers.length; i2 < l3; i2++) {
16944
16942
  parser[buffers[i2]] = "";
16945
16943
  }
16946
16944
  }
@@ -16994,27 +16992,27 @@
16994
16992
  this._parser = new SAXParser(strict, opt);
16995
16993
  this.writable = true;
16996
16994
  this.readable = true;
16997
- var me2 = this;
16995
+ var me = this;
16998
16996
  this._parser.onend = function() {
16999
- me2.emit("end");
16997
+ me.emit("end");
17000
16998
  };
17001
16999
  this._parser.onerror = function(er) {
17002
- me2.emit("error", er);
17003
- me2._parser.error = null;
17000
+ me.emit("error", er);
17001
+ me._parser.error = null;
17004
17002
  };
17005
17003
  this._decoder = null;
17006
17004
  streamWraps.forEach(function(ev) {
17007
- Object.defineProperty(me2, "on" + ev, {
17005
+ Object.defineProperty(me, "on" + ev, {
17008
17006
  get: function() {
17009
- return me2._parser["on" + ev];
17007
+ return me._parser["on" + ev];
17010
17008
  },
17011
17009
  set: function(h2) {
17012
17010
  if (!h2) {
17013
- me2.removeAllListeners(ev);
17014
- me2._parser["on" + ev] = h2;
17011
+ me.removeAllListeners(ev);
17012
+ me._parser["on" + ev] = h2;
17015
17013
  return h2;
17016
17014
  }
17017
- me2.on(ev, h2);
17015
+ me.on(ev, h2);
17018
17016
  },
17019
17017
  enumerable: true,
17020
17018
  configurable: false
@@ -17046,15 +17044,15 @@
17046
17044
  return true;
17047
17045
  };
17048
17046
  SAXStream.prototype.on = function(ev, handler2) {
17049
- var me2 = this;
17050
- if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
17051
- me2._parser["on" + ev] = function() {
17047
+ var me = this;
17048
+ if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
17049
+ me._parser["on" + ev] = function() {
17052
17050
  var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
17053
17051
  args.splice(0, 0, ev);
17054
- me2.emit.apply(me2, args);
17052
+ me.emit.apply(me, args);
17055
17053
  };
17056
17054
  }
17057
- return Stream.prototype.on.call(me2, ev, handler2);
17055
+ return Stream.prototype.on.call(me, ev, handler2);
17058
17056
  };
17059
17057
  var CDATA = "[CDATA[";
17060
17058
  var DOCTYPE = "DOCTYPE";
@@ -17156,266 +17154,266 @@
17156
17154
  // <script> ... <
17157
17155
  };
17158
17156
  sax2.XML_ENTITIES = {
17159
- "amp": "&",
17160
- "gt": ">",
17161
- "lt": "<",
17162
- "quot": '"',
17163
- "apos": "'"
17157
+ amp: "&",
17158
+ gt: ">",
17159
+ lt: "<",
17160
+ quot: '"',
17161
+ apos: "'"
17164
17162
  };
17165
17163
  sax2.ENTITIES = {
17166
- "amp": "&",
17167
- "gt": ">",
17168
- "lt": "<",
17169
- "quot": '"',
17170
- "apos": "'",
17171
- "AElig": 198,
17172
- "Aacute": 193,
17173
- "Acirc": 194,
17174
- "Agrave": 192,
17175
- "Aring": 197,
17176
- "Atilde": 195,
17177
- "Auml": 196,
17178
- "Ccedil": 199,
17179
- "ETH": 208,
17180
- "Eacute": 201,
17181
- "Ecirc": 202,
17182
- "Egrave": 200,
17183
- "Euml": 203,
17184
- "Iacute": 205,
17185
- "Icirc": 206,
17186
- "Igrave": 204,
17187
- "Iuml": 207,
17188
- "Ntilde": 209,
17189
- "Oacute": 211,
17190
- "Ocirc": 212,
17191
- "Ograve": 210,
17192
- "Oslash": 216,
17193
- "Otilde": 213,
17194
- "Ouml": 214,
17195
- "THORN": 222,
17196
- "Uacute": 218,
17197
- "Ucirc": 219,
17198
- "Ugrave": 217,
17199
- "Uuml": 220,
17200
- "Yacute": 221,
17201
- "aacute": 225,
17202
- "acirc": 226,
17203
- "aelig": 230,
17204
- "agrave": 224,
17205
- "aring": 229,
17206
- "atilde": 227,
17207
- "auml": 228,
17208
- "ccedil": 231,
17209
- "eacute": 233,
17210
- "ecirc": 234,
17211
- "egrave": 232,
17212
- "eth": 240,
17213
- "euml": 235,
17214
- "iacute": 237,
17215
- "icirc": 238,
17216
- "igrave": 236,
17217
- "iuml": 239,
17218
- "ntilde": 241,
17219
- "oacute": 243,
17220
- "ocirc": 244,
17221
- "ograve": 242,
17222
- "oslash": 248,
17223
- "otilde": 245,
17224
- "ouml": 246,
17225
- "szlig": 223,
17226
- "thorn": 254,
17227
- "uacute": 250,
17228
- "ucirc": 251,
17229
- "ugrave": 249,
17230
- "uuml": 252,
17231
- "yacute": 253,
17232
- "yuml": 255,
17233
- "copy": 169,
17234
- "reg": 174,
17235
- "nbsp": 160,
17236
- "iexcl": 161,
17237
- "cent": 162,
17238
- "pound": 163,
17239
- "curren": 164,
17240
- "yen": 165,
17241
- "brvbar": 166,
17242
- "sect": 167,
17243
- "uml": 168,
17244
- "ordf": 170,
17245
- "laquo": 171,
17246
- "not": 172,
17247
- "shy": 173,
17248
- "macr": 175,
17249
- "deg": 176,
17250
- "plusmn": 177,
17251
- "sup1": 185,
17252
- "sup2": 178,
17253
- "sup3": 179,
17254
- "acute": 180,
17255
- "micro": 181,
17256
- "para": 182,
17257
- "middot": 183,
17258
- "cedil": 184,
17259
- "ordm": 186,
17260
- "raquo": 187,
17261
- "frac14": 188,
17262
- "frac12": 189,
17263
- "frac34": 190,
17264
- "iquest": 191,
17265
- "times": 215,
17266
- "divide": 247,
17267
- "OElig": 338,
17268
- "oelig": 339,
17269
- "Scaron": 352,
17270
- "scaron": 353,
17271
- "Yuml": 376,
17272
- "fnof": 402,
17273
- "circ": 710,
17274
- "tilde": 732,
17275
- "Alpha": 913,
17276
- "Beta": 914,
17277
- "Gamma": 915,
17278
- "Delta": 916,
17279
- "Epsilon": 917,
17280
- "Zeta": 918,
17281
- "Eta": 919,
17282
- "Theta": 920,
17283
- "Iota": 921,
17284
- "Kappa": 922,
17285
- "Lambda": 923,
17286
- "Mu": 924,
17287
- "Nu": 925,
17288
- "Xi": 926,
17289
- "Omicron": 927,
17290
- "Pi": 928,
17291
- "Rho": 929,
17292
- "Sigma": 931,
17293
- "Tau": 932,
17294
- "Upsilon": 933,
17295
- "Phi": 934,
17296
- "Chi": 935,
17297
- "Psi": 936,
17298
- "Omega": 937,
17299
- "alpha": 945,
17300
- "beta": 946,
17301
- "gamma": 947,
17302
- "delta": 948,
17303
- "epsilon": 949,
17304
- "zeta": 950,
17305
- "eta": 951,
17306
- "theta": 952,
17307
- "iota": 953,
17308
- "kappa": 954,
17309
- "lambda": 955,
17310
- "mu": 956,
17311
- "nu": 957,
17312
- "xi": 958,
17313
- "omicron": 959,
17314
- "pi": 960,
17315
- "rho": 961,
17316
- "sigmaf": 962,
17317
- "sigma": 963,
17318
- "tau": 964,
17319
- "upsilon": 965,
17320
- "phi": 966,
17321
- "chi": 967,
17322
- "psi": 968,
17323
- "omega": 969,
17324
- "thetasym": 977,
17325
- "upsih": 978,
17326
- "piv": 982,
17327
- "ensp": 8194,
17328
- "emsp": 8195,
17329
- "thinsp": 8201,
17330
- "zwnj": 8204,
17331
- "zwj": 8205,
17332
- "lrm": 8206,
17333
- "rlm": 8207,
17334
- "ndash": 8211,
17335
- "mdash": 8212,
17336
- "lsquo": 8216,
17337
- "rsquo": 8217,
17338
- "sbquo": 8218,
17339
- "ldquo": 8220,
17340
- "rdquo": 8221,
17341
- "bdquo": 8222,
17342
- "dagger": 8224,
17343
- "Dagger": 8225,
17344
- "bull": 8226,
17345
- "hellip": 8230,
17346
- "permil": 8240,
17347
- "prime": 8242,
17348
- "Prime": 8243,
17349
- "lsaquo": 8249,
17350
- "rsaquo": 8250,
17351
- "oline": 8254,
17352
- "frasl": 8260,
17353
- "euro": 8364,
17354
- "image": 8465,
17355
- "weierp": 8472,
17356
- "real": 8476,
17357
- "trade": 8482,
17358
- "alefsym": 8501,
17359
- "larr": 8592,
17360
- "uarr": 8593,
17361
- "rarr": 8594,
17362
- "darr": 8595,
17363
- "harr": 8596,
17364
- "crarr": 8629,
17365
- "lArr": 8656,
17366
- "uArr": 8657,
17367
- "rArr": 8658,
17368
- "dArr": 8659,
17369
- "hArr": 8660,
17370
- "forall": 8704,
17371
- "part": 8706,
17372
- "exist": 8707,
17373
- "empty": 8709,
17374
- "nabla": 8711,
17375
- "isin": 8712,
17376
- "notin": 8713,
17377
- "ni": 8715,
17378
- "prod": 8719,
17379
- "sum": 8721,
17380
- "minus": 8722,
17381
- "lowast": 8727,
17382
- "radic": 8730,
17383
- "prop": 8733,
17384
- "infin": 8734,
17385
- "ang": 8736,
17386
- "and": 8743,
17387
- "or": 8744,
17388
- "cap": 8745,
17389
- "cup": 8746,
17390
- "int": 8747,
17391
- "there4": 8756,
17392
- "sim": 8764,
17393
- "cong": 8773,
17394
- "asymp": 8776,
17395
- "ne": 8800,
17396
- "equiv": 8801,
17397
- "le": 8804,
17398
- "ge": 8805,
17399
- "sub": 8834,
17400
- "sup": 8835,
17401
- "nsub": 8836,
17402
- "sube": 8838,
17403
- "supe": 8839,
17404
- "oplus": 8853,
17405
- "otimes": 8855,
17406
- "perp": 8869,
17407
- "sdot": 8901,
17408
- "lceil": 8968,
17409
- "rceil": 8969,
17410
- "lfloor": 8970,
17411
- "rfloor": 8971,
17412
- "lang": 9001,
17413
- "rang": 9002,
17414
- "loz": 9674,
17415
- "spades": 9824,
17416
- "clubs": 9827,
17417
- "hearts": 9829,
17418
- "diams": 9830
17164
+ amp: "&",
17165
+ gt: ">",
17166
+ lt: "<",
17167
+ quot: '"',
17168
+ apos: "'",
17169
+ AElig: 198,
17170
+ Aacute: 193,
17171
+ Acirc: 194,
17172
+ Agrave: 192,
17173
+ Aring: 197,
17174
+ Atilde: 195,
17175
+ Auml: 196,
17176
+ Ccedil: 199,
17177
+ ETH: 208,
17178
+ Eacute: 201,
17179
+ Ecirc: 202,
17180
+ Egrave: 200,
17181
+ Euml: 203,
17182
+ Iacute: 205,
17183
+ Icirc: 206,
17184
+ Igrave: 204,
17185
+ Iuml: 207,
17186
+ Ntilde: 209,
17187
+ Oacute: 211,
17188
+ Ocirc: 212,
17189
+ Ograve: 210,
17190
+ Oslash: 216,
17191
+ Otilde: 213,
17192
+ Ouml: 214,
17193
+ THORN: 222,
17194
+ Uacute: 218,
17195
+ Ucirc: 219,
17196
+ Ugrave: 217,
17197
+ Uuml: 220,
17198
+ Yacute: 221,
17199
+ aacute: 225,
17200
+ acirc: 226,
17201
+ aelig: 230,
17202
+ agrave: 224,
17203
+ aring: 229,
17204
+ atilde: 227,
17205
+ auml: 228,
17206
+ ccedil: 231,
17207
+ eacute: 233,
17208
+ ecirc: 234,
17209
+ egrave: 232,
17210
+ eth: 240,
17211
+ euml: 235,
17212
+ iacute: 237,
17213
+ icirc: 238,
17214
+ igrave: 236,
17215
+ iuml: 239,
17216
+ ntilde: 241,
17217
+ oacute: 243,
17218
+ ocirc: 244,
17219
+ ograve: 242,
17220
+ oslash: 248,
17221
+ otilde: 245,
17222
+ ouml: 246,
17223
+ szlig: 223,
17224
+ thorn: 254,
17225
+ uacute: 250,
17226
+ ucirc: 251,
17227
+ ugrave: 249,
17228
+ uuml: 252,
17229
+ yacute: 253,
17230
+ yuml: 255,
17231
+ copy: 169,
17232
+ reg: 174,
17233
+ nbsp: 160,
17234
+ iexcl: 161,
17235
+ cent: 162,
17236
+ pound: 163,
17237
+ curren: 164,
17238
+ yen: 165,
17239
+ brvbar: 166,
17240
+ sect: 167,
17241
+ uml: 168,
17242
+ ordf: 170,
17243
+ laquo: 171,
17244
+ not: 172,
17245
+ shy: 173,
17246
+ macr: 175,
17247
+ deg: 176,
17248
+ plusmn: 177,
17249
+ sup1: 185,
17250
+ sup2: 178,
17251
+ sup3: 179,
17252
+ acute: 180,
17253
+ micro: 181,
17254
+ para: 182,
17255
+ middot: 183,
17256
+ cedil: 184,
17257
+ ordm: 186,
17258
+ raquo: 187,
17259
+ frac14: 188,
17260
+ frac12: 189,
17261
+ frac34: 190,
17262
+ iquest: 191,
17263
+ times: 215,
17264
+ divide: 247,
17265
+ OElig: 338,
17266
+ oelig: 339,
17267
+ Scaron: 352,
17268
+ scaron: 353,
17269
+ Yuml: 376,
17270
+ fnof: 402,
17271
+ circ: 710,
17272
+ tilde: 732,
17273
+ Alpha: 913,
17274
+ Beta: 914,
17275
+ Gamma: 915,
17276
+ Delta: 916,
17277
+ Epsilon: 917,
17278
+ Zeta: 918,
17279
+ Eta: 919,
17280
+ Theta: 920,
17281
+ Iota: 921,
17282
+ Kappa: 922,
17283
+ Lambda: 923,
17284
+ Mu: 924,
17285
+ Nu: 925,
17286
+ Xi: 926,
17287
+ Omicron: 927,
17288
+ Pi: 928,
17289
+ Rho: 929,
17290
+ Sigma: 931,
17291
+ Tau: 932,
17292
+ Upsilon: 933,
17293
+ Phi: 934,
17294
+ Chi: 935,
17295
+ Psi: 936,
17296
+ Omega: 937,
17297
+ alpha: 945,
17298
+ beta: 946,
17299
+ gamma: 947,
17300
+ delta: 948,
17301
+ epsilon: 949,
17302
+ zeta: 950,
17303
+ eta: 951,
17304
+ theta: 952,
17305
+ iota: 953,
17306
+ kappa: 954,
17307
+ lambda: 955,
17308
+ mu: 956,
17309
+ nu: 957,
17310
+ xi: 958,
17311
+ omicron: 959,
17312
+ pi: 960,
17313
+ rho: 961,
17314
+ sigmaf: 962,
17315
+ sigma: 963,
17316
+ tau: 964,
17317
+ upsilon: 965,
17318
+ phi: 966,
17319
+ chi: 967,
17320
+ psi: 968,
17321
+ omega: 969,
17322
+ thetasym: 977,
17323
+ upsih: 978,
17324
+ piv: 982,
17325
+ ensp: 8194,
17326
+ emsp: 8195,
17327
+ thinsp: 8201,
17328
+ zwnj: 8204,
17329
+ zwj: 8205,
17330
+ lrm: 8206,
17331
+ rlm: 8207,
17332
+ ndash: 8211,
17333
+ mdash: 8212,
17334
+ lsquo: 8216,
17335
+ rsquo: 8217,
17336
+ sbquo: 8218,
17337
+ ldquo: 8220,
17338
+ rdquo: 8221,
17339
+ bdquo: 8222,
17340
+ dagger: 8224,
17341
+ Dagger: 8225,
17342
+ bull: 8226,
17343
+ hellip: 8230,
17344
+ permil: 8240,
17345
+ prime: 8242,
17346
+ Prime: 8243,
17347
+ lsaquo: 8249,
17348
+ rsaquo: 8250,
17349
+ oline: 8254,
17350
+ frasl: 8260,
17351
+ euro: 8364,
17352
+ image: 8465,
17353
+ weierp: 8472,
17354
+ real: 8476,
17355
+ trade: 8482,
17356
+ alefsym: 8501,
17357
+ larr: 8592,
17358
+ uarr: 8593,
17359
+ rarr: 8594,
17360
+ darr: 8595,
17361
+ harr: 8596,
17362
+ crarr: 8629,
17363
+ lArr: 8656,
17364
+ uArr: 8657,
17365
+ rArr: 8658,
17366
+ dArr: 8659,
17367
+ hArr: 8660,
17368
+ forall: 8704,
17369
+ part: 8706,
17370
+ exist: 8707,
17371
+ empty: 8709,
17372
+ nabla: 8711,
17373
+ isin: 8712,
17374
+ notin: 8713,
17375
+ ni: 8715,
17376
+ prod: 8719,
17377
+ sum: 8721,
17378
+ minus: 8722,
17379
+ lowast: 8727,
17380
+ radic: 8730,
17381
+ prop: 8733,
17382
+ infin: 8734,
17383
+ ang: 8736,
17384
+ and: 8743,
17385
+ or: 8744,
17386
+ cap: 8745,
17387
+ cup: 8746,
17388
+ int: 8747,
17389
+ there4: 8756,
17390
+ sim: 8764,
17391
+ cong: 8773,
17392
+ asymp: 8776,
17393
+ ne: 8800,
17394
+ equiv: 8801,
17395
+ le: 8804,
17396
+ ge: 8805,
17397
+ sub: 8834,
17398
+ sup: 8835,
17399
+ nsub: 8836,
17400
+ sube: 8838,
17401
+ supe: 8839,
17402
+ oplus: 8853,
17403
+ otimes: 8855,
17404
+ perp: 8869,
17405
+ sdot: 8901,
17406
+ lceil: 8968,
17407
+ rceil: 8969,
17408
+ lfloor: 8970,
17409
+ rfloor: 8971,
17410
+ lang: 9001,
17411
+ rang: 9002,
17412
+ loz: 9674,
17413
+ spades: 9824,
17414
+ clubs: 9827,
17415
+ hearts: 9829,
17416
+ diams: 9830
17419
17417
  };
17420
17418
  Object.keys(sax2.ENTITIES).forEach(function(key2) {
17421
17419
  var e = sax2.ENTITIES[key2];
@@ -17454,7 +17452,8 @@
17454
17452
  return parser;
17455
17453
  }
17456
17454
  function end2(parser) {
17457
- if (parser.sawRoot && !parser.closedRoot) strictFail(parser, "Unclosed root tag");
17455
+ if (parser.sawRoot && !parser.closedRoot)
17456
+ strictFail(parser, "Unclosed root tag");
17458
17457
  if (parser.state !== S2.BEGIN && parser.state !== S2.BEGIN_WHITESPACE && parser.state !== S2.TEXT) {
17459
17458
  error(parser, "Unexpected end");
17460
17459
  }
@@ -17544,7 +17543,10 @@
17544
17543
  tag.local = qn.local;
17545
17544
  tag.uri = tag.ns[qn.prefix] || "";
17546
17545
  if (tag.prefix && !tag.uri) {
17547
- strictFail(parser, "Unbound namespace prefix: " + JSON.stringify(parser.tagName));
17546
+ strictFail(
17547
+ parser,
17548
+ "Unbound namespace prefix: " + JSON.stringify(parser.tagName)
17549
+ );
17548
17550
  tag.uri = qn.prefix;
17549
17551
  }
17550
17552
  var parent = parser.tags[parser.tags.length - 1] || parser;
@@ -17556,7 +17558,7 @@
17556
17558
  });
17557
17559
  });
17558
17560
  }
17559
- for (var i2 = 0, l = parser.attribList.length; i2 < l; i2++) {
17561
+ for (var i2 = 0, l3 = parser.attribList.length; i2 < l3; i2++) {
17560
17562
  var nv = parser.attribList[i2];
17561
17563
  var name = nv[0];
17562
17564
  var value = nv[1];
@@ -17572,7 +17574,10 @@
17572
17574
  uri: uri2
17573
17575
  };
17574
17576
  if (prefix2 && prefix2 !== "xmlns" && !uri2) {
17575
- strictFail(parser, "Unbound namespace prefix: " + JSON.stringify(prefix2));
17577
+ strictFail(
17578
+ parser,
17579
+ "Unbound namespace prefix: " + JSON.stringify(prefix2)
17580
+ );
17576
17581
  a2.uri = prefix2;
17577
17582
  }
17578
17583
  parser.tag.attributes[name] = a2;
@@ -17639,9 +17644,9 @@
17639
17644
  var tag = parser.tag = parser.tags.pop();
17640
17645
  parser.tagName = parser.tag.name;
17641
17646
  emitNode(parser, "onclosetag", parser.tagName);
17642
- var x2 = {};
17647
+ var x = {};
17643
17648
  for (var i2 in tag.ns) {
17644
- x2[i2] = tag.ns[i2];
17649
+ x[i2] = tag.ns[i2];
17645
17650
  }
17646
17651
  var parent = parser.tags[parser.tags.length - 1] || parser;
17647
17652
  if (parser.opt.xmlns && tag.ns !== parent.ns) {
@@ -17680,7 +17685,7 @@
17680
17685
  }
17681
17686
  }
17682
17687
  entity = entity.replace(/^0+/, "");
17683
- if (isNaN(num) || numStr.toLowerCase() !== entity) {
17688
+ if (isNaN(num) || numStr.toLowerCase() !== entity || num < 0 || num > 1114111) {
17684
17689
  strictFail(parser, "Invalid character entity");
17685
17690
  return "&" + parser.entity + ";";
17686
17691
  }
@@ -17938,10 +17943,22 @@
17938
17943
  }
17939
17944
  continue;
17940
17945
  case S2.CDATA:
17946
+ var starti = i2 - 1;
17947
+ while (c2 && c2 !== "]") {
17948
+ c2 = charAt(chunk, i2++);
17949
+ if (c2 && parser.trackPosition) {
17950
+ parser.position++;
17951
+ if (c2 === "\n") {
17952
+ parser.line++;
17953
+ parser.column = 0;
17954
+ } else {
17955
+ parser.column++;
17956
+ }
17957
+ }
17958
+ }
17959
+ parser.cdata += chunk.substring(starti, i2 - 1);
17941
17960
  if (c2 === "]") {
17942
17961
  parser.state = S2.CDATA_ENDING;
17943
- } else {
17944
- parser.cdata += c2;
17945
17962
  }
17946
17963
  continue;
17947
17964
  case S2.CDATA_ENDING:
@@ -18020,7 +18037,10 @@
18020
18037
  openTag(parser, true);
18021
18038
  closeTag(parser);
18022
18039
  } else {
18023
- strictFail(parser, "Forward-slash in opening tag not followed by >");
18040
+ strictFail(
18041
+ parser,
18042
+ "Forward-slash in opening tag not followed by >"
18043
+ );
18024
18044
  parser.state = S2.ATTRIB;
18025
18045
  }
18026
18046
  continue;
@@ -19106,8 +19126,8 @@
19106
19126
  rnds[8] = rnds[8] & 63 | 128;
19107
19127
  return unsafeStringify$1(rnds);
19108
19128
  }
19109
- function getDefaultExportFromCjs$3(x2) {
19110
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
19129
+ function getDefaultExportFromCjs$3(x) {
19130
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
19111
19131
  }
19112
19132
  const CRC_TABLE = new Int32Array([
19113
19133
  0,
@@ -22923,8 +22943,8 @@
22923
22943
  const points = [];
22924
22944
  polygonNode.elements.forEach((element2) => {
22925
22945
  if (["wp:start", "wp:lineTo"].includes(element2.name)) {
22926
- const { x: x2, y: y2 } = element2.attributes;
22927
- points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
22946
+ const { x, y: y2 } = element2.attributes;
22947
+ points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
22928
22948
  }
22929
22949
  });
22930
22950
  if (points.length > 1) {
@@ -22947,13 +22967,13 @@
22947
22967
  elements: []
22948
22968
  };
22949
22969
  points.forEach((point2, index2) => {
22950
- const [x2, y2] = point2;
22970
+ const [x, y2] = point2;
22951
22971
  const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
22952
22972
  const pointNode = {
22953
22973
  name: tagName,
22954
22974
  type: tagName,
22955
22975
  attributes: {
22956
- x: pixelsToPolygonUnits(x2),
22976
+ x: pixelsToPolygonUnits(x),
22957
22977
  y: pixelsToPolygonUnits(y2)
22958
22978
  }
22959
22979
  };
@@ -28313,7 +28333,23 @@
28313
28333
  ]
28314
28334
  };
28315
28335
  const docxNumberingCacheStore = /* @__PURE__ */ new WeakMap();
28336
+ const NUMBERING_CACHE_KEY = "numbering-cache";
28316
28337
  const LEVELS_MAP_KEY = Symbol("superdoc.numbering.levels");
28338
+ const NUMBERING_CACHE_DOCX_KEY = Symbol("superdoc.numbering.docx");
28339
+ const clearConverterCache = (converter) => {
28340
+ if (!converter) return;
28341
+ delete converter[NUMBERING_CACHE_KEY];
28342
+ delete converter[NUMBERING_CACHE_DOCX_KEY];
28343
+ };
28344
+ const setConverterCache = (converter, cache2, docx) => {
28345
+ if (!converter) return;
28346
+ converter[NUMBERING_CACHE_KEY] = cache2;
28347
+ if (docx && typeof docx === "object") {
28348
+ converter[NUMBERING_CACHE_DOCX_KEY] = docx;
28349
+ } else {
28350
+ delete converter[NUMBERING_CACHE_DOCX_KEY];
28351
+ }
28352
+ };
28317
28353
  const createEmptyCache = () => ({
28318
28354
  numToAbstractId: /* @__PURE__ */ new Map(),
28319
28355
  abstractById: /* @__PURE__ */ new Map(),
@@ -28385,12 +28421,27 @@
28385
28421
  }
28386
28422
  return { numToAbstractId, abstractById, templateById, numToDefinition, numNodesById };
28387
28423
  };
28388
- const ensureNumberingCache = (docx) => {
28424
+ const ensureNumberingCache = (docx, converter) => {
28425
+ if (converter?.[NUMBERING_CACHE_KEY]) {
28426
+ const cachedDocx = converter[NUMBERING_CACHE_DOCX_KEY];
28427
+ if (docx && cachedDocx && cachedDocx !== docx) {
28428
+ clearConverterCache(converter);
28429
+ } else {
28430
+ return converter[NUMBERING_CACHE_KEY];
28431
+ }
28432
+ }
28389
28433
  if (!docx || typeof docx !== "object") return createEmptyCache();
28390
28434
  const existingCache = docxNumberingCacheStore.get(docx);
28391
- if (existingCache) return existingCache;
28435
+ if (existingCache) {
28436
+ setConverterCache(converter, existingCache, docx);
28437
+ return existingCache;
28438
+ }
28392
28439
  const cache2 = buildNumberingCache(docx);
28393
- docxNumberingCacheStore.set(docx, cache2);
28440
+ if (converter) {
28441
+ setConverterCache(converter, cache2, docx);
28442
+ } else {
28443
+ docxNumberingCacheStore.set(docx, cache2);
28444
+ }
28394
28445
  return cache2;
28395
28446
  };
28396
28447
  const handleListNode = (params2) => {
@@ -28647,11 +28698,11 @@
28647
28698
  }
28648
28699
  return { numId, ilvl };
28649
28700
  };
28650
- const getAbstractDefinition = (numId, docx) => {
28701
+ const getAbstractDefinition = (numId, docx, converter) => {
28651
28702
  const numberingXml = docx["word/numbering.xml"];
28652
28703
  if (!numberingXml) return {};
28653
28704
  if (numId == null) return void 0;
28654
- const cache2 = ensureNumberingCache(docx);
28705
+ const cache2 = ensureNumberingCache(docx, converter);
28655
28706
  const numKey = String(numId);
28656
28707
  let listDefinitionForThisNumId = cache2.numToDefinition.get(numKey);
28657
28708
  if (!listDefinitionForThisNumId) {
@@ -30580,7 +30631,7 @@
30580
30631
  const right2 = Math.max(start2.right, end2.right);
30581
30632
  const width = right2 - left2;
30582
30633
  const height = bottom2 - top2;
30583
- const x2 = left2;
30634
+ const x = left2;
30584
30635
  const y2 = top2;
30585
30636
  const data = {
30586
30637
  top: top2,
@@ -30589,7 +30640,7 @@
30589
30640
  right: right2,
30590
30641
  width,
30591
30642
  height,
30592
- x: x2,
30643
+ x,
30593
30644
  y: y2
30594
30645
  };
30595
30646
  return {
@@ -30678,39 +30729,39 @@
30678
30729
  function L() {
30679
30730
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
30680
30731
  }
30681
- var T = L();
30682
- function G(u3) {
30683
- T = u3;
30732
+ var O = L();
30733
+ function G(l3) {
30734
+ O = l3;
30684
30735
  }
30685
- var I = { exec: () => null };
30686
- function h$1(u3, e = "") {
30687
- let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r2, i2) => {
30736
+ var E = { exec: () => null };
30737
+ function h$1(l3, e = "") {
30738
+ let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r2, i2) => {
30688
30739
  let s2 = typeof i2 == "string" ? i2 : i2.source;
30689
30740
  return s2 = s2.replace(m.caret, "$1"), t = t.replace(r2, s2), n;
30690
30741
  }, getRegex: () => new RegExp(t, e) };
30691
30742
  return n;
30692
30743
  }
30693
- 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$2 = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = h$1(ie$2).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$1(ie$2).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$1(/^ {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$1(/^( {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$1("^ {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$1(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$1(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K$1 = { 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$1 = h$1("^ *([^\\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$1, lheading: we, table: re$1, paragraph: h$1(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re$1).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$1, html: h$1(`^ *(?: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$1(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
30694
- ]`).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$1(/^((?![*_])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$1(/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$1(ce, "u").replace(/punct/g, D).getRegex(), De = h$1(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", He = h$1(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ze = h$1(he$3, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, Ce).replace(/punct/g, pe).getRegex(), Ge = h$1("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)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$1(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Fe = h$1(/^<(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$1(U).replace("(?:-->|$)", "-->").getRegex(), Qe = h$1("^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$1 = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ue = h$1(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q$1).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = h$1(/^!?\[(label)\]\[(ref)\]/).replace("label", q$1).replace("ref", Q).getRegex(), ke = h$1(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ke = h$1("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$1(/^!?\[(label)\]\((.*?)\)/).replace("label", q$1).getRegex(), reflink: h$1(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q$1).getRegex() }, N = { ...X, emStrongRDelimAst: Ze, emStrongLDelim: De, url: h$1(/^((?: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$1(/^([`~]+|[^`~])(?:(?= {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$1(le).replace("{2,}", "*").getRegex(), text: h$1(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K$1, gfm: Le, pedantic: Me }, M$1 = { normal: X, gfm: N, breaks: Xe, pedantic: We };
30695
- var Je = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (u3) => Je[u3];
30696
- function w(u3, e) {
30744
+ 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$2 = h$1(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$1(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$1(/^ {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$1(/^( {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$1("^ {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$1(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$1(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), K$1 = { blockquote: $e, code: be, def: ye, fences: Re, heading: Oe, hr: C, html: Se, lheading: ie$2, list: Pe, newline: xe, paragraph: oe, table: E, text: we }, re$1 = h$1("^ *([^\\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$1, lheading: Te, table: re$1, paragraph: h$1(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re$1).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$1, html: h$1(`^ *(?: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$1(F).replace("hr", C).replace("heading", ` *#{1,6} *[^
30745
+ ]`).replace("lheading", ie$2).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$1(/^((?![*_])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$1(pe, "u").replace(/punct/g, D).getRegex(), ve = h$1(pe, "u").replace(/punct/g, ue).getRegex(), ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h$1(ce, "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), He = h$1(ce, "gu").replace(/notPunctSpace/g, Ie).replace(/punctSpace/g, Ce).replace(/punct/g, ue).getRegex(), Ze = h$1("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)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$1(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Ne = h$1(/^<(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$1(U).replace("(?:-->|$)", "-->").getRegex(), Fe = h$1("^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$1 = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/, Qe = h$1(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q$1).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), he$3 = h$1(/^!?\[(label)\]\[(ref)\]/).replace("label", q$1).replace("ref", Q).getRegex(), de = h$1(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ue = h$1("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$1(/^!?\[(label)\]\((.*?)\)/).replace("label", q$1).getRegex(), reflink: h$1(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q$1).getRegex() }, N = { ...X, emStrongRDelimAst: He, emStrongLDelim: ve, url: h$1(/^((?: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$1(ae).replace("{2,}", "*").getRegex(), text: h$1(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: K$1, gfm: _e, pedantic: Le }, M$1 = { normal: X, gfm: N, breaks: We, pedantic: Ke };
30746
+ var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
30747
+ function w(l3, e) {
30697
30748
  if (e) {
30698
- if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ge);
30699
- } else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ge);
30700
- return u3;
30749
+ if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
30750
+ } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
30751
+ return l3;
30701
30752
  }
30702
- function J(u3) {
30753
+ function J(l3) {
30703
30754
  try {
30704
- u3 = encodeURI(u3).replace(m.percentDecode, "%");
30755
+ l3 = encodeURI(l3).replace(m.percentDecode, "%");
30705
30756
  } catch {
30706
30757
  return null;
30707
30758
  }
30708
- return u3;
30759
+ return l3;
30709
30760
  }
30710
- function V(u3, e) {
30711
- let t = u3.replace(m.findPipe, (i2, s2, o) => {
30712
- let a2 = false, l = s2;
30713
- for (; --l >= 0 && o[l] === "\\"; ) a2 = !a2;
30761
+ function V(l3, e) {
30762
+ let t = l3.replace(m.findPipe, (i2, s2, o) => {
30763
+ let a2 = false, u = s2;
30764
+ for (; --u >= 0 && o[u] === "\\"; ) a2 = !a2;
30714
30765
  return a2 ? "|" : " |";
30715
30766
  }), n = t.split(m.splitPipe), r2 = 0;
30716
30767
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
@@ -30718,33 +30769,33 @@
30718
30769
  for (; r2 < n.length; r2++) n[r2] = n[r2].trim().replace(m.slashPipe, "|");
30719
30770
  return n;
30720
30771
  }
30721
- function z(u3, e, t) {
30722
- let n = u3.length;
30772
+ function z(l3, e, t) {
30773
+ let n = l3.length;
30723
30774
  if (n === 0) return "";
30724
30775
  let r2 = 0;
30725
30776
  for (; r2 < n; ) {
30726
- let i2 = u3.charAt(n - r2 - 1);
30777
+ let i2 = l3.charAt(n - r2 - 1);
30727
30778
  if (i2 === e && true) r2++;
30728
30779
  else break;
30729
30780
  }
30730
- return u3.slice(0, n - r2);
30781
+ return l3.slice(0, n - r2);
30731
30782
  }
30732
- function fe(u3, e) {
30733
- if (u3.indexOf(e[1]) === -1) return -1;
30783
+ function ge(l3, e) {
30784
+ if (l3.indexOf(e[1]) === -1) return -1;
30734
30785
  let t = 0;
30735
- for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
30736
- else if (u3[n] === e[0]) t++;
30737
- else if (u3[n] === e[1] && (t--, t < 0)) return n;
30786
+ for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
30787
+ else if (l3[n] === e[0]) t++;
30788
+ else if (l3[n] === e[1] && (t--, t < 0)) return n;
30738
30789
  return t > 0 ? -2 : -1;
30739
30790
  }
30740
- function me(u3, e, t, n, r2) {
30741
- let i2 = e.href, s2 = e.title || null, o = u3[1].replace(r2.other.outputLinkReplace, "$1");
30791
+ function fe(l3, e, t, n, r2) {
30792
+ let i2 = e.href, s2 = e.title || null, o = l3[1].replace(r2.other.outputLinkReplace, "$1");
30742
30793
  n.state.inLink = true;
30743
- let a2 = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i2, title: s2, text: o, tokens: n.inlineTokens(o) };
30794
+ let a2 = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i2, title: s2, text: o, tokens: n.inlineTokens(o) };
30744
30795
  return n.state.inLink = false, a2;
30745
30796
  }
30746
- function Ve(u3, e, t) {
30747
- let n = u3.match(t.other.indentCodeCompensation);
30797
+ function Je(l3, e, t) {
30798
+ let n = l3.match(t.other.indentCodeCompensation);
30748
30799
  if (n === null) return e;
30749
30800
  let r2 = n[1];
30750
30801
  return e.split(`
@@ -30761,7 +30812,7 @@
30761
30812
  __publicField$2(this, "options");
30762
30813
  __publicField$2(this, "rules");
30763
30814
  __publicField$2(this, "lexer");
30764
- this.options = e || T;
30815
+ this.options = e || O;
30765
30816
  }
30766
30817
  space(e) {
30767
30818
  let t = this.rules.block.newline.exec(e);
@@ -30778,7 +30829,7 @@
30778
30829
  fences(e) {
30779
30830
  let t = this.rules.block.fences.exec(e);
30780
30831
  if (t) {
30781
- let n = t[0], r2 = Ve(n, t[3] || "", this.rules);
30832
+ let n = t[0], r2 = Je(n, t[3] || "", this.rules);
30782
30833
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r2 };
30783
30834
  }
30784
30835
  }
@@ -30805,32 +30856,32 @@
30805
30856
  `).split(`
30806
30857
  `), r2 = "", i2 = "", s2 = [];
30807
30858
  for (; n.length > 0; ) {
30808
- let o = false, a2 = [], l;
30809
- for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) a2.push(n[l]), o = true;
30810
- else if (!o) a2.push(n[l]);
30859
+ let o = false, a2 = [], u;
30860
+ for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a2.push(n[u]), o = true;
30861
+ else if (!o) a2.push(n[u]);
30811
30862
  else break;
30812
- n = n.slice(l);
30813
- let c2 = a2.join(`
30814
- `), p2 = c2.replace(this.rules.other.blockquoteSetextReplace, `
30863
+ n = n.slice(u);
30864
+ let p2 = a2.join(`
30865
+ `), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
30815
30866
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
30816
30867
  r2 = r2 ? `${r2}
30817
- ${c2}` : c2, i2 = i2 ? `${i2}
30818
- ${p2}` : p2;
30819
- let g = this.lexer.state.top;
30820
- if (this.lexer.state.top = true, this.lexer.blockTokens(p2, s2, true), this.lexer.state.top = g, n.length === 0) break;
30821
- let d2 = s2.at(-1);
30822
- if (d2?.type === "code") break;
30823
- if (d2?.type === "blockquote") {
30824
- let R = d2, f2 = R.raw + `
30868
+ ${p2}` : p2, i2 = i2 ? `${i2}
30869
+ ${c2}` : c2;
30870
+ let f2 = this.lexer.state.top;
30871
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c2, s2, true), this.lexer.state.top = f2, n.length === 0) break;
30872
+ let k2 = s2.at(-1);
30873
+ if (k2?.type === "code") break;
30874
+ if (k2?.type === "blockquote") {
30875
+ let x = k2, g = x.raw + `
30825
30876
  ` + n.join(`
30826
- `), O = this.blockquote(f2);
30827
- s2[s2.length - 1] = O, r2 = r2.substring(0, r2.length - R.raw.length) + O.raw, i2 = i2.substring(0, i2.length - R.text.length) + O.text;
30877
+ `), T = this.blockquote(g);
30878
+ s2[s2.length - 1] = T, r2 = r2.substring(0, r2.length - x.raw.length) + T.raw, i2 = i2.substring(0, i2.length - x.text.length) + T.text;
30828
30879
  break;
30829
- } else if (d2?.type === "list") {
30830
- let R = d2, f2 = R.raw + `
30880
+ } else if (k2?.type === "list") {
30881
+ let x = k2, g = x.raw + `
30831
30882
  ` + n.join(`
30832
- `), O = this.list(f2);
30833
- s2[s2.length - 1] = O, r2 = r2.substring(0, r2.length - d2.raw.length) + O.raw, i2 = i2.substring(0, i2.length - R.raw.length) + O.raw, n = f2.substring(s2.at(-1).raw.length).split(`
30883
+ `), T = this.list(g);
30884
+ s2[s2.length - 1] = T, r2 = r2.substring(0, r2.length - k2.raw.length) + T.raw, i2 = i2.substring(0, i2.length - x.raw.length) + T.raw, n = g.substring(s2.at(-1).raw.length).split(`
30834
30885
  `);
30835
30886
  continue;
30836
30887
  }
@@ -30845,43 +30896,43 @@ ${p2}` : p2;
30845
30896
  n = r2 ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r2 ? n : "[*+-]");
30846
30897
  let s2 = this.rules.other.listItemRegex(n), o = false;
30847
30898
  for (; e; ) {
30848
- let l = false, c2 = "", p2 = "";
30899
+ let u = false, p2 = "", c2 = "";
30849
30900
  if (!(t = s2.exec(e)) || this.rules.block.hr.test(e)) break;
30850
- c2 = t[0], e = e.substring(c2.length);
30851
- let g = t[2].split(`
30852
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), d2 = e.split(`
30853
- `, 1)[0], R = !g.trim(), f2 = 0;
30854
- if (this.options.pedantic ? (f2 = 2, p2 = g.trimStart()) : R ? f2 = t[1].length + 1 : (f2 = t[2].search(this.rules.other.nonSpaceChar), f2 = f2 > 4 ? 1 : f2, p2 = g.slice(f2), f2 += t[1].length), R && this.rules.other.blankLine.test(d2) && (c2 += d2 + `
30855
- `, e = e.substring(d2.length + 1), l = true), !l) {
30856
- let H = this.rules.other.nextBulletRegex(f2), ee = this.rules.other.hrRegex(f2), te = this.rules.other.fencesBeginRegex(f2), ne = this.rules.other.headingBeginRegex(f2), xe = this.rules.other.htmlBeginRegex(f2);
30901
+ p2 = t[0], e = e.substring(p2.length);
30902
+ let f2 = t[2].split(`
30903
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k2 = e.split(`
30904
+ `, 1)[0], x = !f2.trim(), g = 0;
30905
+ if (this.options.pedantic ? (g = 2, c2 = f2.trimStart()) : x ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c2 = f2.slice(g), g += t[1].length), x && this.rules.other.blankLine.test(k2) && (p2 += k2 + `
30906
+ `, e = e.substring(k2.length + 1), u = true), !u) {
30907
+ 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);
30857
30908
  for (; e; ) {
30858
30909
  let Z = e.split(`
30859
30910
  `, 1)[0], A2;
30860
- if (d2 = Z, this.options.pedantic ? (d2 = d2.replace(this.rules.other.listReplaceNesting, " "), A2 = d2) : A2 = d2.replace(this.rules.other.tabCharGlobal, " "), te.test(d2) || ne.test(d2) || xe.test(d2) || H.test(d2) || ee.test(d2)) break;
30861
- if (A2.search(this.rules.other.nonSpaceChar) >= f2 || !d2.trim()) p2 += `
30862
- ` + A2.slice(f2);
30911
+ if (k2 = Z, this.options.pedantic ? (k2 = k2.replace(this.rules.other.listReplaceNesting, " "), A2 = k2) : A2 = k2.replace(this.rules.other.tabCharGlobal, " "), te.test(k2) || ne.test(k2) || me.test(k2) || H.test(k2) || ee.test(k2)) break;
30912
+ if (A2.search(this.rules.other.nonSpaceChar) >= g || !k2.trim()) c2 += `
30913
+ ` + A2.slice(g);
30863
30914
  else {
30864
- if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
30865
- p2 += `
30866
- ` + d2;
30915
+ if (x || f2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f2) || ne.test(f2) || ee.test(f2)) break;
30916
+ c2 += `
30917
+ ` + k2;
30867
30918
  }
30868
- !R && !d2.trim() && (R = true), c2 += Z + `
30869
- `, e = e.substring(Z.length + 1), g = A2.slice(f2);
30919
+ !x && !k2.trim() && (x = true), p2 += Z + `
30920
+ `, e = e.substring(Z.length + 1), f2 = A2.slice(g);
30870
30921
  }
30871
30922
  }
30872
- i2.loose || (o ? i2.loose = true : this.rules.other.doubleBlankLine.test(c2) && (o = true));
30873
- let O = null, Y2;
30874
- this.options.gfm && (O = this.rules.other.listIsTask.exec(p2), O && (Y2 = O[0] !== "[ ] ", p2 = p2.replace(this.rules.other.listReplaceTask, ""))), i2.items.push({ type: "list_item", raw: c2, task: !!O, checked: Y2, loose: false, text: p2, tokens: [] }), i2.raw += c2;
30923
+ i2.loose || (o ? i2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (o = true));
30924
+ let T = null, Y2;
30925
+ this.options.gfm && (T = this.rules.other.listIsTask.exec(c2), T && (Y2 = T[0] !== "[ ] ", c2 = c2.replace(this.rules.other.listReplaceTask, ""))), i2.items.push({ type: "list_item", raw: p2, task: !!T, checked: Y2, loose: false, text: c2, tokens: [] }), i2.raw += p2;
30875
30926
  }
30876
30927
  let a2 = i2.items.at(-1);
30877
30928
  if (a2) a2.raw = a2.raw.trimEnd(), a2.text = a2.text.trimEnd();
30878
30929
  else return;
30879
30930
  i2.raw = i2.raw.trimEnd();
30880
- for (let l = 0; l < i2.items.length; l++) if (this.lexer.state.top = false, i2.items[l].tokens = this.lexer.blockTokens(i2.items[l].text, []), !i2.loose) {
30881
- let c2 = i2.items[l].tokens.filter((g) => g.type === "space"), p2 = c2.length > 0 && c2.some((g) => this.rules.other.anyLine.test(g.raw));
30882
- i2.loose = p2;
30931
+ for (let u = 0; u < i2.items.length; u++) if (this.lexer.state.top = false, i2.items[u].tokens = this.lexer.blockTokens(i2.items[u].text, []), !i2.loose) {
30932
+ let p2 = i2.items[u].tokens.filter((f2) => f2.type === "space"), c2 = p2.length > 0 && p2.some((f2) => this.rules.other.anyLine.test(f2.raw));
30933
+ i2.loose = c2;
30883
30934
  }
30884
- if (i2.loose) for (let l = 0; l < i2.items.length; l++) i2.items[l].loose = true;
30935
+ if (i2.loose) for (let u = 0; u < i2.items.length; u++) i2.items[u].loose = true;
30885
30936
  return i2;
30886
30937
  }
30887
30938
  }
@@ -30904,7 +30955,7 @@ ${p2}` : p2;
30904
30955
  if (n.length === r2.length) {
30905
30956
  for (let o of r2) this.rules.other.tableAlignRight.test(o) ? s2.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? s2.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? s2.align.push("left") : s2.align.push(null);
30906
30957
  for (let o = 0; o < n.length; o++) s2.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: s2.align[o] });
30907
- for (let o of i2) s2.rows.push(V(o, s2.header.length).map((a2, l) => ({ text: a2, tokens: this.lexer.inline(a2), header: false, align: s2.align[l] })));
30958
+ for (let o of i2) s2.rows.push(V(o, s2.header.length).map((a2, u) => ({ text: a2, tokens: this.lexer.inline(a2), header: false, align: s2.align[u] })));
30908
30959
  return s2;
30909
30960
  }
30910
30961
  }
@@ -30941,7 +30992,7 @@ ${p2}` : p2;
30941
30992
  let s2 = z(n.slice(0, -1), "\\");
30942
30993
  if ((n.length - s2.length) % 2 === 0) return;
30943
30994
  } else {
30944
- let s2 = fe(t[2], "()");
30995
+ let s2 = ge(t[2], "()");
30945
30996
  if (s2 === -2) return;
30946
30997
  if (s2 > -1) {
30947
30998
  let a2 = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s2;
@@ -30953,7 +31004,7 @@ ${p2}` : p2;
30953
31004
  let s2 = this.rules.other.pedanticHrefTitle.exec(r2);
30954
31005
  s2 && (r2 = s2[1], i2 = s2[3]);
30955
31006
  } else i2 = t[3] ? t[3].slice(1, -1) : "";
30956
- return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), me(t, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: i2 && i2.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
31007
+ return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), fe(t, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: i2 && i2.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
30957
31008
  }
30958
31009
  }
30959
31010
  reflink(e, t) {
@@ -30964,32 +31015,32 @@ ${p2}` : p2;
30964
31015
  let s2 = n[0].charAt(0);
30965
31016
  return { type: "text", raw: s2, text: s2 };
30966
31017
  }
30967
- return me(n, i2, n[0], this.lexer, this.rules);
31018
+ return fe(n, i2, n[0], this.lexer, this.rules);
30968
31019
  }
30969
31020
  }
30970
31021
  emStrong(e, t, n = "") {
30971
31022
  let r2 = this.rules.inline.emStrongLDelim.exec(e);
30972
31023
  if (!r2 || r2[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
30973
31024
  if (!(r2[1] || r2[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
30974
- let s2 = [...r2[0]].length - 1, o, a2, l = s2, c2 = 0, p2 = r2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
30975
- for (p2.lastIndex = 0, t = t.slice(-1 * e.length + s2); (r2 = p2.exec(t)) != null; ) {
31025
+ let s2 = [...r2[0]].length - 1, o, a2, u = s2, p2 = 0, c2 = r2[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
31026
+ for (c2.lastIndex = 0, t = t.slice(-1 * e.length + s2); (r2 = c2.exec(t)) != null; ) {
30976
31027
  if (o = r2[1] || r2[2] || r2[3] || r2[4] || r2[5] || r2[6], !o) continue;
30977
31028
  if (a2 = [...o].length, r2[3] || r2[4]) {
30978
- l += a2;
31029
+ u += a2;
30979
31030
  continue;
30980
31031
  } else if ((r2[5] || r2[6]) && s2 % 3 && !((s2 + a2) % 3)) {
30981
- c2 += a2;
31032
+ p2 += a2;
30982
31033
  continue;
30983
31034
  }
30984
- if (l -= a2, l > 0) continue;
30985
- a2 = Math.min(a2, a2 + l + c2);
30986
- let g = [...r2[0]][0].length, d2 = e.slice(0, s2 + r2.index + g + a2);
31035
+ if (u -= a2, u > 0) continue;
31036
+ a2 = Math.min(a2, a2 + u + p2);
31037
+ let f2 = [...r2[0]][0].length, k2 = e.slice(0, s2 + r2.index + f2 + a2);
30987
31038
  if (Math.min(s2, a2) % 2) {
30988
- let f2 = d2.slice(1, -1);
30989
- return { type: "em", raw: d2, text: f2, tokens: this.lexer.inlineTokens(f2) };
31039
+ let g = k2.slice(1, -1);
31040
+ return { type: "em", raw: k2, text: g, tokens: this.lexer.inlineTokens(g) };
30990
31041
  }
30991
- let R = d2.slice(2, -2);
30992
- return { type: "strong", raw: d2, text: R, tokens: this.lexer.inlineTokens(R) };
31042
+ let x = k2.slice(2, -2);
31043
+ return { type: "strong", raw: k2, text: x, tokens: this.lexer.inlineTokens(x) };
30993
31044
  }
30994
31045
  }
30995
31046
  }
@@ -31038,25 +31089,25 @@ ${p2}` : p2;
31038
31089
  }
31039
31090
  }
31040
31091
  };
31041
- var x = class u {
31092
+ var b = class l {
31042
31093
  constructor(e) {
31043
31094
  __publicField$2(this, "tokens");
31044
31095
  __publicField$2(this, "options");
31045
31096
  __publicField$2(this, "state");
31046
31097
  __publicField$2(this, "tokenizer");
31047
31098
  __publicField$2(this, "inlineQueue");
31048
- 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 };
31049
- let t = { other: m, block: C.normal, inline: M$1.normal };
31050
- this.options.pedantic ? (t.block = C.pedantic, t.inline = M$1.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M$1.breaks : t.inline = M$1.gfm), this.tokenizer.rules = t;
31099
+ 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 };
31100
+ let t = { other: m, block: I.normal, inline: M$1.normal };
31101
+ this.options.pedantic ? (t.block = I.pedantic, t.inline = M$1.pedantic) : this.options.gfm && (t.block = I.gfm, this.options.breaks ? t.inline = M$1.breaks : t.inline = M$1.gfm), this.tokenizer.rules = t;
31051
31102
  }
31052
31103
  static get rules() {
31053
- return { block: C, inline: M$1 };
31104
+ return { block: I, inline: M$1 };
31054
31105
  }
31055
31106
  static lex(e, t) {
31056
- return new u(t).lex(e);
31107
+ return new l(t).lex(e);
31057
31108
  }
31058
31109
  static lexInline(e, t) {
31059
- return new u(t).inlineTokens(e);
31110
+ return new l(t).inlineTokens(e);
31060
31111
  }
31061
31112
  lex(e) {
31062
31113
  e = e.replace(m.carriageReturn, `
@@ -31131,8 +31182,8 @@ ${p2}` : p2;
31131
31182
  let i2 = e;
31132
31183
  if (this.options.extensions?.startBlock) {
31133
31184
  let s2 = 1 / 0, o = e.slice(1), a2;
31134
- this.options.extensions.startBlock.forEach((l) => {
31135
- a2 = l.call({ lexer: this }, o), typeof a2 == "number" && a2 >= 0 && (s2 = Math.min(s2, a2));
31185
+ this.options.extensions.startBlock.forEach((u) => {
31186
+ a2 = u.call({ lexer: this }, o), typeof a2 == "number" && a2 >= 0 && (s2 = Math.min(s2, a2));
31136
31187
  }), s2 < 1 / 0 && s2 >= 0 && (i2 = e.substring(0, s2 + 1));
31137
31188
  }
31138
31189
  if (this.state.top && (r2 = this.tokenizer.paragraph(i2))) {
@@ -31178,7 +31229,7 @@ ${p2}` : p2;
31178
31229
  for (; e; ) {
31179
31230
  i2 || (s2 = ""), i2 = false;
31180
31231
  let o;
31181
- 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;
31232
+ 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;
31182
31233
  if (o = this.tokenizer.escape(e)) {
31183
31234
  e = e.substring(o.raw.length), t.push(o);
31184
31235
  continue;
@@ -31193,8 +31244,8 @@ ${p2}` : p2;
31193
31244
  }
31194
31245
  if (o = this.tokenizer.reflink(e, this.tokens.links)) {
31195
31246
  e = e.substring(o.raw.length);
31196
- let l = t.at(-1);
31197
- o.type === "text" && l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
31247
+ let u = t.at(-1);
31248
+ o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
31198
31249
  continue;
31199
31250
  }
31200
31251
  if (o = this.tokenizer.emStrong(e, n, s2)) {
@@ -31223,23 +31274,23 @@ ${p2}` : p2;
31223
31274
  }
31224
31275
  let a2 = e;
31225
31276
  if (this.options.extensions?.startInline) {
31226
- let l = 1 / 0, c2 = e.slice(1), p2;
31227
- this.options.extensions.startInline.forEach((g) => {
31228
- p2 = g.call({ lexer: this }, c2), typeof p2 == "number" && p2 >= 0 && (l = Math.min(l, p2));
31229
- }), l < 1 / 0 && l >= 0 && (a2 = e.substring(0, l + 1));
31277
+ let u = 1 / 0, p2 = e.slice(1), c2;
31278
+ this.options.extensions.startInline.forEach((f2) => {
31279
+ c2 = f2.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (u = Math.min(u, c2));
31280
+ }), u < 1 / 0 && u >= 0 && (a2 = e.substring(0, u + 1));
31230
31281
  }
31231
31282
  if (o = this.tokenizer.inlineText(a2)) {
31232
31283
  e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s2 = o.raw.slice(-1)), i2 = true;
31233
- let l = t.at(-1);
31234
- l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
31284
+ let u = t.at(-1);
31285
+ u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
31235
31286
  continue;
31236
31287
  }
31237
31288
  if (e) {
31238
- let l = "Infinite loop on byte: " + e.charCodeAt(0);
31289
+ let u = "Infinite loop on byte: " + e.charCodeAt(0);
31239
31290
  if (this.options.silent) {
31240
- console.error(l);
31291
+ console.error(u);
31241
31292
  break;
31242
- } else throw new Error(l);
31293
+ } else throw new Error(u);
31243
31294
  }
31244
31295
  }
31245
31296
  return t;
@@ -31249,7 +31300,7 @@ ${p2}` : p2;
31249
31300
  constructor(e) {
31250
31301
  __publicField$2(this, "options");
31251
31302
  __publicField$2(this, "parser");
31252
- this.options = e || T;
31303
+ this.options = e || O;
31253
31304
  }
31254
31305
  space(e) {
31255
31306
  return "";
@@ -31397,18 +31448,18 @@ ${e}</tr>
31397
31448
  return "";
31398
31449
  }
31399
31450
  };
31400
- var b = class u2 {
31451
+ var R = class l2 {
31401
31452
  constructor(e) {
31402
31453
  __publicField$2(this, "options");
31403
31454
  __publicField$2(this, "renderer");
31404
31455
  __publicField$2(this, "textRenderer");
31405
- 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 $$1();
31456
+ 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 $$1();
31406
31457
  }
31407
31458
  static parse(e, t) {
31408
- return new u2(t).parse(e);
31459
+ return new l2(t).parse(e);
31409
31460
  }
31410
31461
  static parseInline(e, t) {
31411
- return new u2(t).parseInline(e);
31462
+ return new l2(t).parseInline(e);
31412
31463
  }
31413
31464
  parse(e, t = true) {
31414
31465
  let n = "";
@@ -31546,7 +31597,7 @@ ${e}</tr>
31546
31597
  constructor(e) {
31547
31598
  __publicField$2(this, "options");
31548
31599
  __publicField$2(this, "block");
31549
- this.options = e || T;
31600
+ this.options = e || O;
31550
31601
  }
31551
31602
  preprocess(e) {
31552
31603
  return e;
@@ -31561,10 +31612,10 @@ ${e}</tr>
31561
31612
  return e;
31562
31613
  }
31563
31614
  provideLexer() {
31564
- return this.block ? x.lex : x.lexInline;
31615
+ return this.block ? b.lex : b.lexInline;
31565
31616
  }
31566
31617
  provideParser() {
31567
- return this.block ? b.parse : b.parseInline;
31618
+ return this.block ? R.parse : R.parseInline;
31568
31619
  }
31569
31620
  }, __publicField$2(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField$2(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
31570
31621
  var B = class {
@@ -31573,10 +31624,10 @@ ${e}</tr>
31573
31624
  __publicField$2(this, "options", this.setOptions);
31574
31625
  __publicField$2(this, "parse", this.parseMarkdown(true));
31575
31626
  __publicField$2(this, "parseInline", this.parseMarkdown(false));
31576
- __publicField$2(this, "Parser", b);
31627
+ __publicField$2(this, "Parser", R);
31577
31628
  __publicField$2(this, "Renderer", P);
31578
31629
  __publicField$2(this, "TextRenderer", $$1);
31579
- __publicField$2(this, "Lexer", x);
31630
+ __publicField$2(this, "Lexer", b);
31580
31631
  __publicField$2(this, "Tokenizer", y);
31581
31632
  __publicField$2(this, "Hooks", S);
31582
31633
  this.use(...e);
@@ -31629,10 +31680,10 @@ ${e}</tr>
31629
31680
  for (let s2 in n.renderer) {
31630
31681
  if (!(s2 in i2)) throw new Error(`renderer '${s2}' does not exist`);
31631
31682
  if (["options", "parser"].includes(s2)) continue;
31632
- let o = s2, a2 = n.renderer[o], l = i2[o];
31633
- i2[o] = (...c2) => {
31634
- let p2 = a2.apply(i2, c2);
31635
- return p2 === false && (p2 = l.apply(i2, c2)), p2 || "";
31683
+ let o = s2, a2 = n.renderer[o], u = i2[o];
31684
+ i2[o] = (...p2) => {
31685
+ let c2 = a2.apply(i2, p2);
31686
+ return c2 === false && (c2 = u.apply(i2, p2)), c2 || "";
31636
31687
  };
31637
31688
  }
31638
31689
  r2.renderer = i2;
@@ -31642,10 +31693,10 @@ ${e}</tr>
31642
31693
  for (let s2 in n.tokenizer) {
31643
31694
  if (!(s2 in i2)) throw new Error(`tokenizer '${s2}' does not exist`);
31644
31695
  if (["options", "rules", "lexer"].includes(s2)) continue;
31645
- let o = s2, a2 = n.tokenizer[o], l = i2[o];
31646
- i2[o] = (...c2) => {
31647
- let p2 = a2.apply(i2, c2);
31648
- return p2 === false && (p2 = l.apply(i2, c2)), p2;
31696
+ let o = s2, a2 = n.tokenizer[o], u = i2[o];
31697
+ i2[o] = (...p2) => {
31698
+ let c2 = a2.apply(i2, p2);
31699
+ return c2 === false && (c2 = u.apply(i2, p2)), c2;
31649
31700
  };
31650
31701
  }
31651
31702
  r2.tokenizer = i2;
@@ -31655,21 +31706,14 @@ ${e}</tr>
31655
31706
  for (let s2 in n.hooks) {
31656
31707
  if (!(s2 in i2)) throw new Error(`hook '${s2}' does not exist`);
31657
31708
  if (["options", "block"].includes(s2)) continue;
31658
- let o = s2, a2 = n.hooks[o], l = i2[o];
31659
- S.passThroughHooks.has(s2) ? i2[o] = (c2) => {
31660
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s2)) return (async () => {
31661
- let g = await a2.call(i2, c2);
31662
- return l.call(i2, g);
31663
- })();
31664
- let p2 = a2.call(i2, c2);
31665
- return l.call(i2, p2);
31666
- } : i2[o] = (...c2) => {
31667
- if (this.defaults.async) return (async () => {
31668
- let g = await a2.apply(i2, c2);
31669
- return g === false && (g = await l.apply(i2, c2)), g;
31670
- })();
31671
- let p2 = a2.apply(i2, c2);
31672
- return p2 === false && (p2 = l.apply(i2, c2)), p2;
31709
+ let o = s2, a2 = n.hooks[o], u = i2[o];
31710
+ S.passThroughHooks.has(s2) ? i2[o] = (p2) => {
31711
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s2)) return Promise.resolve(a2.call(i2, p2)).then((f2) => u.call(i2, f2));
31712
+ let c2 = a2.call(i2, p2);
31713
+ return u.call(i2, c2);
31714
+ } : i2[o] = (...p2) => {
31715
+ let c2 = a2.apply(i2, p2);
31716
+ return c2 === false && (c2 = u.apply(i2, p2)), c2;
31673
31717
  };
31674
31718
  }
31675
31719
  r2.hooks = i2;
@@ -31688,10 +31732,10 @@ ${e}</tr>
31688
31732
  return this.defaults = { ...this.defaults, ...e }, this;
31689
31733
  }
31690
31734
  lexer(e, t) {
31691
- return x.lex(e, t ?? this.defaults);
31735
+ return b.lex(e, t ?? this.defaults);
31692
31736
  }
31693
31737
  parser(e, t) {
31694
- return b.parse(e, t ?? this.defaults);
31738
+ return R.parse(e, t ?? this.defaults);
31695
31739
  }
31696
31740
  parseMarkdown(e) {
31697
31741
  return (n, r2) => {
@@ -31699,20 +31743,17 @@ ${e}</tr>
31699
31743
  if (this.defaults.async === true && i2.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."));
31700
31744
  if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
31701
31745
  if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
31702
- if (s2.hooks && (s2.hooks.options = s2, s2.hooks.block = e), s2.async) return (async () => {
31703
- let a2 = s2.hooks ? await s2.hooks.preprocess(n) : n, c2 = await (s2.hooks ? await s2.hooks.provideLexer() : e ? x.lex : x.lexInline)(a2, s2), p2 = s2.hooks ? await s2.hooks.processAllTokens(c2) : c2;
31704
- s2.walkTokens && await Promise.all(this.walkTokens(p2, s2.walkTokens));
31705
- let d2 = await (s2.hooks ? await s2.hooks.provideParser() : e ? b.parse : b.parseInline)(p2, s2);
31706
- return s2.hooks ? await s2.hooks.postprocess(d2) : d2;
31707
- })().catch(o);
31746
+ s2.hooks && (s2.hooks.options = s2, s2.hooks.block = e);
31747
+ let a2 = s2.hooks ? s2.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s2.hooks ? s2.hooks.provideParser() : e ? R.parse : R.parseInline;
31748
+ if (s2.async) return Promise.resolve(s2.hooks ? s2.hooks.preprocess(n) : n).then((p2) => a2(p2, s2)).then((p2) => s2.hooks ? s2.hooks.processAllTokens(p2) : p2).then((p2) => s2.walkTokens ? Promise.all(this.walkTokens(p2, s2.walkTokens)).then(() => p2) : p2).then((p2) => u(p2, s2)).then((p2) => s2.hooks ? s2.hooks.postprocess(p2) : p2).catch(o);
31708
31749
  try {
31709
31750
  s2.hooks && (n = s2.hooks.preprocess(n));
31710
- let l = (s2.hooks ? s2.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s2);
31711
- s2.hooks && (l = s2.hooks.processAllTokens(l)), s2.walkTokens && this.walkTokens(l, s2.walkTokens);
31712
- let p2 = (s2.hooks ? s2.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s2);
31713
- return s2.hooks && (p2 = s2.hooks.postprocess(p2)), p2;
31714
- } catch (a2) {
31715
- return o(a2);
31751
+ let p2 = a2(n, s2);
31752
+ s2.hooks && (p2 = s2.hooks.processAllTokens(p2)), s2.walkTokens && this.walkTokens(p2, s2.walkTokens);
31753
+ let c2 = u(p2, s2);
31754
+ return s2.hooks && (c2 = s2.hooks.postprocess(c2)), c2;
31755
+ } catch (p2) {
31756
+ return o(p2);
31716
31757
  }
31717
31758
  };
31718
31759
  }
@@ -31729,38 +31770,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31729
31770
  }
31730
31771
  };
31731
31772
  var _ = new B();
31732
- function k$1(u3, e) {
31733
- return _.parse(u3, e);
31734
- }
31735
- k$1.options = k$1.setOptions = function(u3) {
31736
- return _.setOptions(u3), k$1.defaults = _.defaults, G(k$1.defaults), k$1;
31737
- };
31738
- k$1.getDefaults = L;
31739
- k$1.defaults = T;
31740
- k$1.use = function(...u3) {
31741
- return _.use(...u3), k$1.defaults = _.defaults, G(k$1.defaults), k$1;
31742
- };
31743
- k$1.walkTokens = function(u3, e) {
31744
- return _.walkTokens(u3, e);
31745
- };
31746
- k$1.parseInline = _.parseInline;
31747
- k$1.Parser = b;
31748
- k$1.parser = b.parse;
31749
- k$1.Renderer = P;
31750
- k$1.TextRenderer = $$1;
31751
- k$1.Lexer = x;
31752
- k$1.lexer = x.lex;
31753
- k$1.Tokenizer = y;
31754
- k$1.Hooks = S;
31755
- k$1.parse = k$1;
31756
- k$1.options;
31757
- k$1.setOptions;
31758
- k$1.use;
31759
- k$1.walkTokens;
31760
- k$1.parseInline;
31761
- b.parse;
31762
- x.lex;
31763
- k$1.use({
31773
+ function d$1(l3, e) {
31774
+ return _.parse(l3, e);
31775
+ }
31776
+ d$1.options = d$1.setOptions = function(l3) {
31777
+ return _.setOptions(l3), d$1.defaults = _.defaults, G(d$1.defaults), d$1;
31778
+ };
31779
+ d$1.getDefaults = L;
31780
+ d$1.defaults = O;
31781
+ d$1.use = function(...l3) {
31782
+ return _.use(...l3), d$1.defaults = _.defaults, G(d$1.defaults), d$1;
31783
+ };
31784
+ d$1.walkTokens = function(l3, e) {
31785
+ return _.walkTokens(l3, e);
31786
+ };
31787
+ d$1.parseInline = _.parseInline;
31788
+ d$1.Parser = R;
31789
+ d$1.parser = R.parse;
31790
+ d$1.Renderer = P;
31791
+ d$1.TextRenderer = $$1;
31792
+ d$1.Lexer = b;
31793
+ d$1.lexer = b.lex;
31794
+ d$1.Tokenizer = y;
31795
+ d$1.Hooks = S;
31796
+ d$1.parse = d$1;
31797
+ d$1.options;
31798
+ d$1.setOptions;
31799
+ d$1.use;
31800
+ d$1.walkTokens;
31801
+ d$1.parseInline;
31802
+ R.parse;
31803
+ b.lex;
31804
+ d$1.use({
31764
31805
  breaks: false,
31765
31806
  // Use proper paragraphs, not <br> tags
31766
31807
  gfm: true
@@ -31771,7 +31812,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
31771
31812
  return createDocFromHTML(html2, schema, options);
31772
31813
  }
31773
31814
  function convertMarkdownToHTML(markdown) {
31774
- let html2 = k$1.parse(markdown, { async: false });
31815
+ let html2 = d$1.parse(markdown, { async: false });
31775
31816
  return html2.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");
31776
31817
  }
31777
31818
  function processContent({ content: content2, type: type2, schema }) {
@@ -32174,10 +32215,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32174
32215
  if (typeof numId === "string") numId = Number(numId);
32175
32216
  if (typeof level === "string") level = Number(level);
32176
32217
  const docx = editor?.converter?.convertedXml;
32177
- const numbering = editor?.converter?.numbering;
32218
+ const converter = editor?.converter;
32219
+ const numbering = converter?.numbering;
32178
32220
  const styleDefinition = docx ? getStyleTagFromStyleId(styleId, docx) : null;
32179
32221
  const stylePpr = styleDefinition?.elements.find((el) => el.name === "w:pPr");
32180
- let abstractDefinition = docx ? getAbstractDefinition(numId, docx) : null;
32222
+ let abstractDefinition = docx ? getAbstractDefinition(numId, docx, converter) : null;
32181
32223
  if (!abstractDefinition) {
32182
32224
  const listDef = numbering?.definitions?.[numId];
32183
32225
  const abstractId = listDef?.elements?.find((item) => item.name === "w:abstractNumId")?.attributes?.["w:val"];
@@ -36518,7 +36560,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36518
36560
  const { width: w2, height: h2 } = resizeKeepAspectRatio(size2.w, size2.h, maxWidthEmu);
36519
36561
  if (w2 && h2) size2 = { w: w2, h: h2 };
36520
36562
  }
36521
- if (params2.node.type === "image" && !imageId) {
36563
+ if (imageId) {
36564
+ const docx = params2.converter?.convertedXml || {};
36565
+ const rels = docx["word/_rels/document.xml.rels"];
36566
+ const relsTag = rels?.elements?.find((el) => el.name === "Relationships");
36567
+ const hasRelation = relsTag?.elements.find((el) => el.attributes.Id === imageId);
36568
+ const path2 = src?.split("word/")[1];
36569
+ if (!hasRelation) {
36570
+ addImageRelationshipForId(params2, imageId, path2);
36571
+ }
36572
+ } else if (params2.node.type === "image" && !imageId) {
36522
36573
  const path2 = src?.split("word/")[1];
36523
36574
  imageId = addNewImageRelationship(params2, path2);
36524
36575
  } else if (params2.node.type === "fieldAnnotation" && !imageId) {
@@ -36742,6 +36793,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36742
36793
  params2.relationships.push(newRel);
36743
36794
  return newId;
36744
36795
  }
36796
+ function addImageRelationshipForId(params2, id, imagePath) {
36797
+ const newRel = {
36798
+ type: "element",
36799
+ name: "Relationship",
36800
+ attributes: {
36801
+ Id: id,
36802
+ Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
36803
+ Target: imagePath
36804
+ }
36805
+ };
36806
+ params2.relationships.push(newRel);
36807
+ }
36745
36808
  function translateVectorShape(params2) {
36746
36809
  const { node: node2 } = params2;
36747
36810
  const { drawingContent } = node2.attrs;
@@ -41230,7 +41293,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41230
41293
  comments,
41231
41294
  inlineDocumentFonts,
41232
41295
  linkedStyles: getStyleDefinitions(docx),
41233
- numbering: getNumberingDefinitions(docx)
41296
+ numbering: getNumberingDefinitions(docx, converter)
41234
41297
  };
41235
41298
  }
41236
41299
  return null;
@@ -41629,8 +41692,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41629
41692
  ]);
41630
41693
  return content2.filter((node2) => node2 && typeof node2.type === "string" && !INLINE_TYPES.has(node2.type));
41631
41694
  }
41632
- function getNumberingDefinitions(docx) {
41633
- const cache2 = ensureNumberingCache(docx);
41695
+ function getNumberingDefinitions(docx, converter) {
41696
+ const cache2 = ensureNumberingCache(docx, converter);
41634
41697
  const abstractDefinitions = {};
41635
41698
  cache2.abstractById.forEach((value, key2) => {
41636
41699
  const numericKey = Number(key2);
@@ -43004,6 +43067,35 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43004
43067
  };
43005
43068
  const HYPERLINK_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
43006
43069
  const HEADER_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
43070
+ const FOOTER_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
43071
+ const REL_ID_NUMERIC_PATTERN = /rId|mi/g;
43072
+ const getLargestRelationshipId = (relationships = []) => {
43073
+ const numericIds = relationships.map((rel) => Number(String(rel?.attributes?.Id ?? "").replace(REL_ID_NUMERIC_PATTERN, ""))).filter((value) => Number.isFinite(value));
43074
+ return numericIds.length ? Math.max(...numericIds) : 0;
43075
+ };
43076
+ const mergeRelationshipElements = (existingRelationships = [], newRelationships = []) => {
43077
+ if (!newRelationships?.length) return existingRelationships;
43078
+ let largestId = getLargestRelationshipId(existingRelationships);
43079
+ const seenIds = new Set(existingRelationships.map((rel) => rel?.attributes?.Id).filter(Boolean));
43080
+ const additions = [];
43081
+ newRelationships.forEach((rel) => {
43082
+ if (!rel?.attributes) return;
43083
+ const attributes = rel.attributes;
43084
+ const currentId = attributes.Id || "";
43085
+ attributes.Target = attributes?.Target?.replace(/&/g, "&amp;");
43086
+ const existingTarget = existingRelationships.find((el) => el.attributes.Target === attributes.Target);
43087
+ const isMedia = attributes.Target?.startsWith("media/");
43088
+ const isNewHyperlink = attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && currentId.length > 6;
43089
+ const isNewHeadFoot = (attributes.Type === HEADER_RELATIONSHIP_TYPE || attributes.Type === FOOTER_RELATIONSHIP_TYPE) && currentId.length > 6;
43090
+ const hasSeenId = currentId && seenIds.has(currentId);
43091
+ const shouldSkip2 = !isNewHyperlink && !isNewHeadFoot && (hasSeenId || existingTarget);
43092
+ if (shouldSkip2) return;
43093
+ attributes.Id = currentId.length > 6 || isMedia ? currentId : `rId${++largestId}`;
43094
+ seenIds.add(attributes.Id);
43095
+ additions.push(rel);
43096
+ });
43097
+ return additions.length ? [...existingRelationships, ...additions] : existingRelationships;
43098
+ };
43007
43099
  const FONT_FAMILY_FALLBACKS = Object.freeze({
43008
43100
  swiss: "Arial, sans-serif",
43009
43101
  roman: "Times New Roman, serif",
@@ -43212,7 +43304,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43212
43304
  static getStoredSuperdocVersion(docx) {
43213
43305
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
43214
43306
  }
43215
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.28.0") {
43307
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.28.2") {
43216
43308
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
43217
43309
  }
43218
43310
  /**
@@ -43603,7 +43695,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43603
43695
  };
43604
43696
  exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
43605
43697
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
43606
- const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
43698
+ const relationships = relsData.elements.find((x) => x.name === "Relationships");
43607
43699
  const newDocRels = [];
43608
43700
  Object.entries(this.headers).forEach(([id, header], index2) => {
43609
43701
  const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
@@ -43644,7 +43736,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43644
43736
  }
43645
43737
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
43646
43738
  if (params2.relationships.length) {
43647
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
43739
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
43648
43740
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
43649
43741
  declaration: this.initialJSON?.declaration,
43650
43742
  elements: [
@@ -43698,7 +43790,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43698
43790
  }
43699
43791
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
43700
43792
  if (params2.relationships.length) {
43701
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
43793
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
43702
43794
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
43703
43795
  declaration: this.initialJSON?.declaration,
43704
43796
  elements: [
@@ -43717,24 +43809,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43717
43809
  };
43718
43810
  exportProcessNewRelationships_fn = function(rels = []) {
43719
43811
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
43720
- const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
43721
- const newRels = [];
43722
- const regex = /rId|mi/g;
43723
- let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace(regex, ""))));
43724
- rels.forEach((rel) => {
43725
- const existingId = rel.attributes.Id;
43726
- const existingTarget = relationships.elements.find((el) => el.attributes.Target === rel.attributes.Target);
43727
- const isNewMedia = rel.attributes.Target?.startsWith("media/") && existingId.length > 6;
43728
- const isNewHyperlink = rel.attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && existingId.length > 6;
43729
- const isNewHeadFoot = rel.attributes.Type === HEADER_RELATIONSHIP_TYPE && existingId.length > 6;
43730
- if (existingTarget && !isNewMedia && !isNewHyperlink && !isNewHeadFoot) {
43731
- return;
43732
- }
43733
- rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&amp;");
43734
- rel.attributes.Id = existingId.length > 6 ? existingId : `rId${++largestId}`;
43735
- newRels.push(rel);
43736
- });
43737
- relationships.elements = [...relationships.elements, ...newRels];
43812
+ const relationships = relsData.elements.find((x) => x.name === "Relationships");
43813
+ relationships.elements = mergeRelationshipElements(relationships.elements, rels);
43738
43814
  };
43739
43815
  exportProcessMediaFiles_fn = async function(media2 = {}) {
43740
43816
  const processedData = {
@@ -43929,8 +44005,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43929
44005
  return n2;
43930
44006
  }
43931
44007
  function n(e2, t2, r22, n2, i22, s22) {
43932
- var a2, o, h2 = e2.file, u = e2.compression, l = s22 !== O.utf8encode, f2 = I2.transformTo("string", s22(h2.name)), c2 = I2.transformTo("string", O.utf8encode(h2.name)), d2 = h2.comment, p2 = I2.transformTo("string", s22(d2)), m2 = I2.transformTo("string", O.utf8encode(d2)), _2 = c2.length !== h2.name.length, g = m2.length !== d2.length, b2 = "", v2 = "", y2 = "", w2 = h2.dir, k2 = h2.date, x2 = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
43933
- t2 && !r22 || (x2.crc32 = e2.crc32, x2.compressedSize = e2.compressedSize, x2.uncompressedSize = e2.uncompressedSize);
44008
+ var a2, o, h2 = e2.file, u = e2.compression, l = s22 !== O2.utf8encode, f2 = I2.transformTo("string", s22(h2.name)), c2 = I2.transformTo("string", O2.utf8encode(h2.name)), d2 = h2.comment, p2 = I2.transformTo("string", s22(d2)), m2 = I2.transformTo("string", O2.utf8encode(d2)), _2 = c2.length !== h2.name.length, g = m2.length !== d2.length, b2 = "", v2 = "", y2 = "", w2 = h2.dir, k2 = h2.date, x = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
44009
+ t2 && !r22 || (x.crc32 = e2.crc32, x.compressedSize = e2.compressedSize, x.uncompressedSize = e2.uncompressedSize);
43934
44010
  var S2 = 0;
43935
44011
  t2 && (S2 |= 8), l || !_2 && !g || (S2 |= 2048);
43936
44012
  var z2 = 0, C2 = 0;
@@ -43941,9 +44017,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43941
44017
  return 63 & (e3 || 0);
43942
44018
  })(h2.dosPermissions)), a2 = k2.getUTCHours(), a2 <<= 6, a2 |= k2.getUTCMinutes(), a2 <<= 5, a2 |= k2.getUTCSeconds() / 2, o = k2.getUTCFullYear() - 1980, o <<= 4, o |= k2.getUTCMonth() + 1, o <<= 5, o |= k2.getUTCDate(), _2 && (v2 = A2(1, 1) + A2(B2(f2), 4) + c2, b2 += "up" + A2(v2.length, 2) + v2), g && (y2 = A2(1, 1) + A2(B2(p2), 4) + m2, b2 += "uc" + A2(y2.length, 2) + y2);
43943
44019
  var E2 = "";
43944
- return E2 += "\n\0", E2 += A2(S2, 2), E2 += u.magic, E2 += A2(a2, 2), E2 += A2(o, 2), E2 += A2(x2.crc32, 4), E2 += A2(x2.compressedSize, 4), E2 += A2(x2.uncompressedSize, 4), E2 += A2(f2.length, 2), E2 += A2(b2.length, 2), { fileRecord: R.LOCAL_FILE_HEADER + E2 + f2 + b2, dirRecord: R.CENTRAL_FILE_HEADER + A2(C2, 2) + E2 + A2(p2.length, 2) + "\0\0\0\0" + A2(z2, 4) + A2(n2, 4) + f2 + b2 + p2 };
44020
+ return E2 += "\n\0", E2 += A2(S2, 2), E2 += u.magic, E2 += A2(a2, 2), E2 += A2(o, 2), E2 += A2(x.crc32, 4), E2 += A2(x.compressedSize, 4), E2 += A2(x.uncompressedSize, 4), E2 += A2(f2.length, 2), E2 += A2(b2.length, 2), { fileRecord: R2.LOCAL_FILE_HEADER + E2 + f2 + b2, dirRecord: R2.CENTRAL_FILE_HEADER + A2(C2, 2) + E2 + A2(p2.length, 2) + "\0\0\0\0" + A2(z2, 4) + A2(n2, 4) + f2 + b2 + p2 };
43945
44021
  }
43946
- var I2 = e("../utils"), i2 = e("../stream/GenericWorker"), O = e("../utf8"), B2 = e("../crc32"), R = e("../signature");
44022
+ var I2 = e("../utils"), i2 = e("../stream/GenericWorker"), O2 = e("../utf8"), B2 = e("../crc32"), R2 = e("../signature");
43947
44023
  function s2(e2, t2, r22, n2) {
43948
44024
  i2.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t2, this.zipPlatform = r22, this.encodeFileName = n2, this.streamFiles = e2, this.accumulate = false, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
43949
44025
  }
@@ -43961,7 +44037,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43961
44037
  this.accumulate = false;
43962
44038
  var t2 = this.streamFiles && !e2.file.dir, r22 = n(e2, t2, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
43963
44039
  if (this.dirRecords.push(r22.dirRecord), t2) this.push({ data: (function(e3) {
43964
- return R.DATA_DESCRIPTOR + A2(e3.crc32, 4) + A2(e3.compressedSize, 4) + A2(e3.uncompressedSize, 4);
44040
+ return R2.DATA_DESCRIPTOR + A2(e3.crc32, 4) + A2(e3.compressedSize, 4) + A2(e3.uncompressedSize, 4);
43965
44041
  })(e2), meta: { percent: 100 } });
43966
44042
  else for (this.push({ data: r22.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
43967
44043
  this.currentFile = null;
@@ -43969,7 +44045,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43969
44045
  for (var e2 = this.bytesWritten, t2 = 0; t2 < this.dirRecords.length; t2++) this.push({ data: this.dirRecords[t2], meta: { percent: 100 } });
43970
44046
  var r22 = this.bytesWritten - e2, n2 = (function(e3, t3, r3, n3, i22) {
43971
44047
  var s22 = I2.transformTo("string", i22(n3));
43972
- return R.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A2(e3, 2) + A2(e3, 2) + A2(t3, 4) + A2(r3, 4) + A2(s22.length, 2) + s22;
44048
+ return R2.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A2(e3, 2) + A2(e3, 2) + A2(t3, 4) + A2(r3, 4) + A2(s22.length, 2) + s22;
43973
44049
  })(this.dirRecords.length, r22, e2, this.zipComment, this.encodeFileName);
43974
44050
  this.push({ data: n2, meta: { percent: 100 } });
43975
44051
  }, s2.prototype.prepareNextSource = function() {
@@ -45169,11 +45245,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45169
45245
  return -1 ^ e2;
45170
45246
  };
45171
45247
  }, {}], 46: [function(e, t, r2) {
45172
- var h2, c2 = e("../utils/common"), u = e("./trees"), d2 = e("./adler32"), p2 = e("./crc32"), n = e("./messages"), l = 0, f2 = 4, m2 = 0, _2 = -2, g = -1, b2 = 4, i2 = 2, v2 = 8, y2 = 9, s2 = 286, a2 = 30, o = 19, w2 = 2 * s2 + 1, k2 = 15, x2 = 3, S2 = 258, z2 = S2 + x2 + 1, C2 = 42, E2 = 113, A2 = 1, I2 = 2, O = 3, B2 = 4;
45173
- function R(e2, t2) {
45248
+ var h2, c2 = e("../utils/common"), u = e("./trees"), d2 = e("./adler32"), p2 = e("./crc32"), n = e("./messages"), l = 0, f2 = 4, m2 = 0, _2 = -2, g = -1, b2 = 4, i2 = 2, v2 = 8, y2 = 9, s2 = 286, a2 = 30, o = 19, w2 = 2 * s2 + 1, k2 = 15, x = 3, S2 = 258, z2 = S2 + x + 1, C2 = 42, E2 = 113, A2 = 1, I2 = 2, O2 = 3, B2 = 4;
45249
+ function R2(e2, t2) {
45174
45250
  return e2.msg = n[t2], t2;
45175
45251
  }
45176
- function T2(e2) {
45252
+ function T(e2) {
45177
45253
  return (e2 << 1) - (4 < e2 ? 9 : 0);
45178
45254
  }
45179
45255
  function D2(e2) {
@@ -45217,7 +45293,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45217
45293
  i22 += f22;
45218
45294
  }
45219
45295
  if (0 === e2.strm.avail_in) break;
45220
- if (a22 = e2.strm, o2 = e2.window, h22 = e2.strstart + e2.lookahead, u2 = i22, l2 = void 0, l2 = a22.avail_in, u2 < l2 && (l2 = u2), r22 = 0 === l2 ? 0 : (a22.avail_in -= l2, c2.arraySet(o2, a22.input, a22.next_in, l2, h22), 1 === a22.state.wrap ? a22.adler = d2(a22.adler, o2, l2, h22) : 2 === a22.state.wrap && (a22.adler = p2(a22.adler, o2, l2, h22)), a22.next_in += l2, a22.total_in += l2, l2), e2.lookahead += r22, e2.lookahead + e2.insert >= x2) for (s22 = e2.strstart - e2.insert, e2.ins_h = e2.window[s22], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s22 + 1]) & e2.hash_mask; e2.insert && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s22 + x2 - 1]) & e2.hash_mask, e2.prev[s22 & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = s22, s22++, e2.insert--, !(e2.lookahead + e2.insert < x2)); ) ;
45296
+ if (a22 = e2.strm, o2 = e2.window, h22 = e2.strstart + e2.lookahead, u2 = i22, l2 = void 0, l2 = a22.avail_in, u2 < l2 && (l2 = u2), r22 = 0 === l2 ? 0 : (a22.avail_in -= l2, c2.arraySet(o2, a22.input, a22.next_in, l2, h22), 1 === a22.state.wrap ? a22.adler = d2(a22.adler, o2, l2, h22) : 2 === a22.state.wrap && (a22.adler = p2(a22.adler, o2, l2, h22)), a22.next_in += l2, a22.total_in += l2, l2), e2.lookahead += r22, e2.lookahead + e2.insert >= x) for (s22 = e2.strstart - e2.insert, e2.ins_h = e2.window[s22], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s22 + 1]) & e2.hash_mask; e2.insert && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s22 + x - 1]) & e2.hash_mask, e2.prev[s22 & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = s22, s22++, e2.insert--, !(e2.lookahead + e2.insert < x)); ) ;
45221
45297
  } while (e2.lookahead < z2 && 0 !== e2.strm.avail_in);
45222
45298
  }
45223
45299
  function Z(e2, t2) {
@@ -45226,14 +45302,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45226
45302
  if (j2(e2), e2.lookahead < z2 && t2 === l) return A2;
45227
45303
  if (0 === e2.lookahead) break;
45228
45304
  }
45229
- if (r22 = 0, e2.lookahead >= x2 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), 0 !== r22 && e2.strstart - r22 <= e2.w_size - z2 && (e2.match_length = L2(e2, r22)), e2.match_length >= x2) if (n2 = u._tr_tally(e2, e2.strstart - e2.match_start, e2.match_length - x2), e2.lookahead -= e2.match_length, e2.match_length <= e2.max_lazy_match && e2.lookahead >= x2) {
45230
- for (e2.match_length--; e2.strstart++, e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart, 0 != --e2.match_length; ) ;
45305
+ if (r22 = 0, e2.lookahead >= x && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), 0 !== r22 && e2.strstart - r22 <= e2.w_size - z2 && (e2.match_length = L2(e2, r22)), e2.match_length >= x) if (n2 = u._tr_tally(e2, e2.strstart - e2.match_start, e2.match_length - x), e2.lookahead -= e2.match_length, e2.match_length <= e2.max_lazy_match && e2.lookahead >= x) {
45306
+ for (e2.match_length--; e2.strstart++, e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart, 0 != --e2.match_length; ) ;
45231
45307
  e2.strstart++;
45232
45308
  } else e2.strstart += e2.match_length, e2.match_length = 0, e2.ins_h = e2.window[e2.strstart], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + 1]) & e2.hash_mask;
45233
45309
  else n2 = u._tr_tally(e2, 0, e2.window[e2.strstart]), e2.lookahead--, e2.strstart++;
45234
45310
  if (n2 && (N2(e2, false), 0 === e2.strm.avail_out)) return A2;
45235
45311
  }
45236
- return e2.insert = e2.strstart < x2 - 1 ? e2.strstart : x2 - 1, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O : B2) : e2.last_lit && (N2(e2, false), 0 === e2.strm.avail_out) ? A2 : I2;
45312
+ return e2.insert = e2.strstart < x - 1 ? e2.strstart : x - 1, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O2 : B2) : e2.last_lit && (N2(e2, false), 0 === e2.strm.avail_out) ? A2 : I2;
45237
45313
  }
45238
45314
  function W2(e2, t2) {
45239
45315
  for (var r22, n2, i22; ; ) {
@@ -45241,14 +45317,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45241
45317
  if (j2(e2), e2.lookahead < z2 && t2 === l) return A2;
45242
45318
  if (0 === e2.lookahead) break;
45243
45319
  }
45244
- if (r22 = 0, e2.lookahead >= x2 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), e2.prev_length = e2.match_length, e2.prev_match = e2.match_start, e2.match_length = x2 - 1, 0 !== r22 && e2.prev_length < e2.max_lazy_match && e2.strstart - r22 <= e2.w_size - z2 && (e2.match_length = L2(e2, r22), e2.match_length <= 5 && (1 === e2.strategy || e2.match_length === x2 && 4096 < e2.strstart - e2.match_start) && (e2.match_length = x2 - 1)), e2.prev_length >= x2 && e2.match_length <= e2.prev_length) {
45245
- for (i22 = e2.strstart + e2.lookahead - x2, n2 = u._tr_tally(e2, e2.strstart - 1 - e2.prev_match, e2.prev_length - x2), e2.lookahead -= e2.prev_length - 1, e2.prev_length -= 2; ++e2.strstart <= i22 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x2 - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), 0 != --e2.prev_length; ) ;
45246
- if (e2.match_available = 0, e2.match_length = x2 - 1, e2.strstart++, n2 && (N2(e2, false), 0 === e2.strm.avail_out)) return A2;
45320
+ if (r22 = 0, e2.lookahead >= x && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), e2.prev_length = e2.match_length, e2.prev_match = e2.match_start, e2.match_length = x - 1, 0 !== r22 && e2.prev_length < e2.max_lazy_match && e2.strstart - r22 <= e2.w_size - z2 && (e2.match_length = L2(e2, r22), e2.match_length <= 5 && (1 === e2.strategy || e2.match_length === x && 4096 < e2.strstart - e2.match_start) && (e2.match_length = x - 1)), e2.prev_length >= x && e2.match_length <= e2.prev_length) {
45321
+ for (i22 = e2.strstart + e2.lookahead - x, n2 = u._tr_tally(e2, e2.strstart - 1 - e2.prev_match, e2.prev_length - x), e2.lookahead -= e2.prev_length - 1, e2.prev_length -= 2; ++e2.strstart <= i22 && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x - 1]) & e2.hash_mask, r22 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), 0 != --e2.prev_length; ) ;
45322
+ if (e2.match_available = 0, e2.match_length = x - 1, e2.strstart++, n2 && (N2(e2, false), 0 === e2.strm.avail_out)) return A2;
45247
45323
  } else if (e2.match_available) {
45248
45324
  if ((n2 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1])) && N2(e2, false), e2.strstart++, e2.lookahead--, 0 === e2.strm.avail_out) return A2;
45249
45325
  } else e2.match_available = 1, e2.strstart++, e2.lookahead--;
45250
45326
  }
45251
- return e2.match_available && (n2 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1]), e2.match_available = 0), e2.insert = e2.strstart < x2 - 1 ? e2.strstart : x2 - 1, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O : B2) : e2.last_lit && (N2(e2, false), 0 === e2.strm.avail_out) ? A2 : I2;
45327
+ return e2.match_available && (n2 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1]), e2.match_available = 0), e2.insert = e2.strstart < x - 1 ? e2.strstart : x - 1, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O2 : B2) : e2.last_lit && (N2(e2, false), 0 === e2.strm.avail_out) ? A2 : I2;
45252
45328
  }
45253
45329
  function M2(e2, t2, r22, n2, i22) {
45254
45330
  this.good_length = e2, this.max_lazy = t2, this.nice_length = r22, this.max_chain = n2, this.func = i22;
@@ -45258,21 +45334,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45258
45334
  }
45259
45335
  function G2(e2) {
45260
45336
  var t2;
45261
- return e2 && e2.state ? (e2.total_in = e2.total_out = 0, e2.data_type = i2, (t2 = e2.state).pending = 0, t2.pending_out = 0, t2.wrap < 0 && (t2.wrap = -t2.wrap), t2.status = t2.wrap ? C2 : E2, e2.adler = 2 === t2.wrap ? 0 : 1, t2.last_flush = l, u._tr_init(t2), m2) : R(e2, _2);
45337
+ return e2 && e2.state ? (e2.total_in = e2.total_out = 0, e2.data_type = i2, (t2 = e2.state).pending = 0, t2.pending_out = 0, t2.wrap < 0 && (t2.wrap = -t2.wrap), t2.status = t2.wrap ? C2 : E2, e2.adler = 2 === t2.wrap ? 0 : 1, t2.last_flush = l, u._tr_init(t2), m2) : R2(e2, _2);
45262
45338
  }
45263
45339
  function K2(e2) {
45264
45340
  var t2 = G2(e2);
45265
45341
  return t2 === m2 && (function(e3) {
45266
- e3.window_size = 2 * e3.w_size, D2(e3.head), e3.max_lazy_match = h2[e3.level].max_lazy, e3.good_match = h2[e3.level].good_length, e3.nice_match = h2[e3.level].nice_length, e3.max_chain_length = h2[e3.level].max_chain, e3.strstart = 0, e3.block_start = 0, e3.lookahead = 0, e3.insert = 0, e3.match_length = e3.prev_length = x2 - 1, e3.match_available = 0, e3.ins_h = 0;
45342
+ e3.window_size = 2 * e3.w_size, D2(e3.head), e3.max_lazy_match = h2[e3.level].max_lazy, e3.good_match = h2[e3.level].good_length, e3.nice_match = h2[e3.level].nice_length, e3.max_chain_length = h2[e3.level].max_chain, e3.strstart = 0, e3.block_start = 0, e3.lookahead = 0, e3.insert = 0, e3.match_length = e3.prev_length = x - 1, e3.match_available = 0, e3.ins_h = 0;
45267
45343
  })(e2.state), t2;
45268
45344
  }
45269
45345
  function Y2(e2, t2, r22, n2, i22, s22) {
45270
45346
  if (!e2) return _2;
45271
45347
  var a22 = 1;
45272
- if (t2 === g && (t2 = 6), n2 < 0 ? (a22 = 0, n2 = -n2) : 15 < n2 && (a22 = 2, n2 -= 16), i22 < 1 || y2 < i22 || r22 !== v2 || n2 < 8 || 15 < n2 || t2 < 0 || 9 < t2 || s22 < 0 || b2 < s22) return R(e2, _2);
45348
+ if (t2 === g && (t2 = 6), n2 < 0 ? (a22 = 0, n2 = -n2) : 15 < n2 && (a22 = 2, n2 -= 16), i22 < 1 || y2 < i22 || r22 !== v2 || n2 < 8 || 15 < n2 || t2 < 0 || 9 < t2 || s22 < 0 || b2 < s22) return R2(e2, _2);
45273
45349
  8 === n2 && (n2 = 9);
45274
45350
  var o2 = new H();
45275
- return (e2.state = o2).strm = e2, o2.wrap = a22, o2.gzhead = null, o2.w_bits = n2, o2.w_size = 1 << o2.w_bits, o2.w_mask = o2.w_size - 1, o2.hash_bits = i22 + 7, o2.hash_size = 1 << o2.hash_bits, o2.hash_mask = o2.hash_size - 1, o2.hash_shift = ~~((o2.hash_bits + x2 - 1) / x2), o2.window = new c2.Buf8(2 * o2.w_size), o2.head = new c2.Buf16(o2.hash_size), o2.prev = new c2.Buf16(o2.w_size), o2.lit_bufsize = 1 << i22 + 6, o2.pending_buf_size = 4 * o2.lit_bufsize, o2.pending_buf = new c2.Buf8(o2.pending_buf_size), o2.d_buf = 1 * o2.lit_bufsize, o2.l_buf = 3 * o2.lit_bufsize, o2.level = t2, o2.strategy = s22, o2.method = r22, K2(e2);
45351
+ return (e2.state = o2).strm = e2, o2.wrap = a22, o2.gzhead = null, o2.w_bits = n2, o2.w_size = 1 << o2.w_bits, o2.w_mask = o2.w_size - 1, o2.hash_bits = i22 + 7, o2.hash_size = 1 << o2.hash_bits, o2.hash_mask = o2.hash_size - 1, o2.hash_shift = ~~((o2.hash_bits + x - 1) / x), o2.window = new c2.Buf8(2 * o2.w_size), o2.head = new c2.Buf16(o2.hash_size), o2.prev = new c2.Buf16(o2.w_size), o2.lit_bufsize = 1 << i22 + 6, o2.pending_buf_size = 4 * o2.lit_bufsize, o2.pending_buf = new c2.Buf8(o2.pending_buf_size), o2.d_buf = 1 * o2.lit_bufsize, o2.l_buf = 3 * o2.lit_bufsize, o2.level = t2, o2.strategy = s22, o2.method = r22, K2(e2);
45276
45352
  }
45277
45353
  h2 = [new M2(0, 0, 0, 0, function(e2, t2) {
45278
45354
  var r22 = 65535;
@@ -45286,15 +45362,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45286
45362
  if ((0 === e2.strstart || e2.strstart >= n2) && (e2.lookahead = e2.strstart - n2, e2.strstart = n2, N2(e2, false), 0 === e2.strm.avail_out)) return A2;
45287
45363
  if (e2.strstart - e2.block_start >= e2.w_size - z2 && (N2(e2, false), 0 === e2.strm.avail_out)) return A2;
45288
45364
  }
45289
- return e2.insert = 0, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O : B2) : (e2.strstart > e2.block_start && (N2(e2, false), e2.strm.avail_out), A2);
45365
+ return e2.insert = 0, t2 === f2 ? (N2(e2, true), 0 === e2.strm.avail_out ? O2 : B2) : (e2.strstart > e2.block_start && (N2(e2, false), e2.strm.avail_out), A2);
45290
45366
  }), new M2(4, 4, 8, 4, Z), new M2(4, 5, 16, 8, Z), new M2(4, 6, 32, 32, Z), new M2(4, 4, 16, 16, W2), new M2(8, 16, 32, 32, W2), new M2(8, 16, 128, 128, W2), new M2(8, 32, 128, 256, W2), new M2(32, 128, 258, 1024, W2), new M2(32, 258, 258, 4096, W2)], r2.deflateInit = function(e2, t2) {
45291
45367
  return Y2(e2, t2, v2, 15, 8, 0);
45292
45368
  }, r2.deflateInit2 = Y2, r2.deflateReset = K2, r2.deflateResetKeep = G2, r2.deflateSetHeader = function(e2, t2) {
45293
45369
  return e2 && e2.state ? 2 !== e2.state.wrap ? _2 : (e2.state.gzhead = t2, m2) : _2;
45294
45370
  }, r2.deflate = function(e2, t2) {
45295
45371
  var r22, n2, i22, s22;
45296
- if (!e2 || !e2.state || 5 < t2 || t2 < 0) return e2 ? R(e2, _2) : _2;
45297
- if (n2 = e2.state, !e2.output || !e2.input && 0 !== e2.avail_in || 666 === n2.status && t2 !== f2) return R(e2, 0 === e2.avail_out ? -5 : _2);
45372
+ if (!e2 || !e2.state || 5 < t2 || t2 < 0) return e2 ? R2(e2, _2) : _2;
45373
+ if (n2 = e2.state, !e2.output || !e2.input && 0 !== e2.avail_in || 666 === n2.status && t2 !== f2) return R2(e2, 0 === e2.avail_out ? -5 : _2);
45298
45374
  if (n2.strm = e2, r22 = n2.last_flush, n2.last_flush = t2, n2.status === C2) if (2 === n2.wrap) e2.adler = 0, U2(n2, 31), U2(n2, 139), U2(n2, 8), n2.gzhead ? (U2(n2, (n2.gzhead.text ? 1 : 0) + (n2.gzhead.hcrc ? 2 : 0) + (n2.gzhead.extra ? 4 : 0) + (n2.gzhead.name ? 8 : 0) + (n2.gzhead.comment ? 16 : 0)), U2(n2, 255 & n2.gzhead.time), U2(n2, n2.gzhead.time >> 8 & 255), U2(n2, n2.gzhead.time >> 16 & 255), U2(n2, n2.gzhead.time >> 24 & 255), U2(n2, 9 === n2.level ? 2 : 2 <= n2.strategy || n2.level < 2 ? 4 : 0), U2(n2, 255 & n2.gzhead.os), n2.gzhead.extra && n2.gzhead.extra.length && (U2(n2, 255 & n2.gzhead.extra.length), U2(n2, n2.gzhead.extra.length >> 8 & 255)), n2.gzhead.hcrc && (e2.adler = p2(e2.adler, n2.pending_buf, n2.pending, 0)), n2.gzindex = 0, n2.status = 69) : (U2(n2, 0), U2(n2, 0), U2(n2, 0), U2(n2, 0), U2(n2, 0), U2(n2, 9 === n2.level ? 2 : 2 <= n2.strategy || n2.level < 2 ? 4 : 0), U2(n2, 3), n2.status = E2);
45299
45375
  else {
45300
45376
  var a22 = v2 + (n2.w_bits - 8 << 4) << 8;
@@ -45328,8 +45404,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45328
45404
  } else n2.status = 103;
45329
45405
  if (103 === n2.status && (n2.gzhead.hcrc ? (n2.pending + 2 > n2.pending_buf_size && F2(e2), n2.pending + 2 <= n2.pending_buf_size && (U2(n2, 255 & e2.adler), U2(n2, e2.adler >> 8 & 255), e2.adler = 0, n2.status = E2)) : n2.status = E2), 0 !== n2.pending) {
45330
45406
  if (F2(e2), 0 === e2.avail_out) return n2.last_flush = -1, m2;
45331
- } else if (0 === e2.avail_in && T2(t2) <= T2(r22) && t2 !== f2) return R(e2, -5);
45332
- if (666 === n2.status && 0 !== e2.avail_in) return R(e2, -5);
45407
+ } else if (0 === e2.avail_in && T(t2) <= T(r22) && t2 !== f2) return R2(e2, -5);
45408
+ if (666 === n2.status && 0 !== e2.avail_in) return R2(e2, -5);
45333
45409
  if (0 !== e2.avail_in || 0 !== n2.lookahead || t2 !== l && 666 !== n2.status) {
45334
45410
  var o2 = 2 === n2.strategy ? (function(e3, t3) {
45335
45411
  for (var r3; ; ) {
@@ -45339,39 +45415,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45339
45415
  }
45340
45416
  if (e3.match_length = 0, r3 = u._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++, r3 && (N2(e3, false), 0 === e3.strm.avail_out)) return A2;
45341
45417
  }
45342
- return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ? O : B2) : e3.last_lit && (N2(e3, false), 0 === e3.strm.avail_out) ? A2 : I2;
45418
+ return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ? O2 : B2) : e3.last_lit && (N2(e3, false), 0 === e3.strm.avail_out) ? A2 : I2;
45343
45419
  })(n2, t2) : 3 === n2.strategy ? (function(e3, t3) {
45344
45420
  for (var r3, n3, i3, s3, a3 = e3.window; ; ) {
45345
45421
  if (e3.lookahead <= S2) {
45346
45422
  if (j2(e3), e3.lookahead <= S2 && t3 === l) return A2;
45347
45423
  if (0 === e3.lookahead) break;
45348
45424
  }
45349
- if (e3.match_length = 0, e3.lookahead >= x2 && 0 < e3.strstart && (n3 = a3[i3 = e3.strstart - 1]) === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3]) {
45425
+ if (e3.match_length = 0, e3.lookahead >= x && 0 < e3.strstart && (n3 = a3[i3 = e3.strstart - 1]) === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3]) {
45350
45426
  s3 = e3.strstart + S2;
45351
45427
  do {
45352
45428
  } while (n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3] && i3 < s3);
45353
45429
  e3.match_length = S2 - (s3 - i3), e3.match_length > e3.lookahead && (e3.match_length = e3.lookahead);
45354
45430
  }
45355
- if (e3.match_length >= x2 ? (r3 = u._tr_tally(e3, 1, e3.match_length - x2), e3.lookahead -= e3.match_length, e3.strstart += e3.match_length, e3.match_length = 0) : (r3 = u._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++), r3 && (N2(e3, false), 0 === e3.strm.avail_out)) return A2;
45431
+ if (e3.match_length >= x ? (r3 = u._tr_tally(e3, 1, e3.match_length - x), e3.lookahead -= e3.match_length, e3.strstart += e3.match_length, e3.match_length = 0) : (r3 = u._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++), r3 && (N2(e3, false), 0 === e3.strm.avail_out)) return A2;
45356
45432
  }
45357
- return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ? O : B2) : e3.last_lit && (N2(e3, false), 0 === e3.strm.avail_out) ? A2 : I2;
45433
+ return e3.insert = 0, t3 === f2 ? (N2(e3, true), 0 === e3.strm.avail_out ? O2 : B2) : e3.last_lit && (N2(e3, false), 0 === e3.strm.avail_out) ? A2 : I2;
45358
45434
  })(n2, t2) : h2[n2.level].func(n2, t2);
45359
- if (o2 !== O && o2 !== B2 || (n2.status = 666), o2 === A2 || o2 === O) return 0 === e2.avail_out && (n2.last_flush = -1), m2;
45435
+ if (o2 !== O2 && o2 !== B2 || (n2.status = 666), o2 === A2 || o2 === O2) return 0 === e2.avail_out && (n2.last_flush = -1), m2;
45360
45436
  if (o2 === I2 && (1 === t2 ? u._tr_align(n2) : 5 !== t2 && (u._tr_stored_block(n2, 0, 0, false), 3 === t2 && (D2(n2.head), 0 === n2.lookahead && (n2.strstart = 0, n2.block_start = 0, n2.insert = 0))), F2(e2), 0 === e2.avail_out)) return n2.last_flush = -1, m2;
45361
45437
  }
45362
45438
  return t2 !== f2 ? m2 : n2.wrap <= 0 ? 1 : (2 === n2.wrap ? (U2(n2, 255 & e2.adler), U2(n2, e2.adler >> 8 & 255), U2(n2, e2.adler >> 16 & 255), U2(n2, e2.adler >> 24 & 255), U2(n2, 255 & e2.total_in), U2(n2, e2.total_in >> 8 & 255), U2(n2, e2.total_in >> 16 & 255), U2(n2, e2.total_in >> 24 & 255)) : (P2(n2, e2.adler >>> 16), P2(n2, 65535 & e2.adler)), F2(e2), 0 < n2.wrap && (n2.wrap = -n2.wrap), 0 !== n2.pending ? m2 : 1);
45363
45439
  }, r2.deflateEnd = function(e2) {
45364
45440
  var t2;
45365
- return e2 && e2.state ? (t2 = e2.state.status) !== C2 && 69 !== t2 && 73 !== t2 && 91 !== t2 && 103 !== t2 && t2 !== E2 && 666 !== t2 ? R(e2, _2) : (e2.state = null, t2 === E2 ? R(e2, -3) : m2) : _2;
45441
+ return e2 && e2.state ? (t2 = e2.state.status) !== C2 && 69 !== t2 && 73 !== t2 && 91 !== t2 && 103 !== t2 && t2 !== E2 && 666 !== t2 ? R2(e2, _2) : (e2.state = null, t2 === E2 ? R2(e2, -3) : m2) : _2;
45366
45442
  }, r2.deflateSetDictionary = function(e2, t2) {
45367
45443
  var r22, n2, i22, s22, a22, o2, h22, u2, l2 = t2.length;
45368
45444
  if (!e2 || !e2.state) return _2;
45369
45445
  if (2 === (s22 = (r22 = e2.state).wrap) || 1 === s22 && r22.status !== C2 || r22.lookahead) return _2;
45370
- for (1 === s22 && (e2.adler = d2(e2.adler, t2, l2, 0)), r22.wrap = 0, l2 >= r22.w_size && (0 === s22 && (D2(r22.head), r22.strstart = 0, r22.block_start = 0, r22.insert = 0), u2 = new c2.Buf8(r22.w_size), c2.arraySet(u2, t2, l2 - r22.w_size, r22.w_size, 0), t2 = u2, l2 = r22.w_size), a22 = e2.avail_in, o2 = e2.next_in, h22 = e2.input, e2.avail_in = l2, e2.next_in = 0, e2.input = t2, j2(r22); r22.lookahead >= x2; ) {
45371
- for (n2 = r22.strstart, i22 = r22.lookahead - (x2 - 1); r22.ins_h = (r22.ins_h << r22.hash_shift ^ r22.window[n2 + x2 - 1]) & r22.hash_mask, r22.prev[n2 & r22.w_mask] = r22.head[r22.ins_h], r22.head[r22.ins_h] = n2, n2++, --i22; ) ;
45372
- r22.strstart = n2, r22.lookahead = x2 - 1, j2(r22);
45446
+ for (1 === s22 && (e2.adler = d2(e2.adler, t2, l2, 0)), r22.wrap = 0, l2 >= r22.w_size && (0 === s22 && (D2(r22.head), r22.strstart = 0, r22.block_start = 0, r22.insert = 0), u2 = new c2.Buf8(r22.w_size), c2.arraySet(u2, t2, l2 - r22.w_size, r22.w_size, 0), t2 = u2, l2 = r22.w_size), a22 = e2.avail_in, o2 = e2.next_in, h22 = e2.input, e2.avail_in = l2, e2.next_in = 0, e2.input = t2, j2(r22); r22.lookahead >= x; ) {
45447
+ for (n2 = r22.strstart, i22 = r22.lookahead - (x - 1); r22.ins_h = (r22.ins_h << r22.hash_shift ^ r22.window[n2 + x - 1]) & r22.hash_mask, r22.prev[n2 & r22.w_mask] = r22.head[r22.ins_h], r22.head[r22.ins_h] = n2, n2++, --i22; ) ;
45448
+ r22.strstart = n2, r22.lookahead = x - 1, j2(r22);
45373
45449
  }
45374
- return r22.strstart += r22.lookahead, r22.block_start = r22.strstart, r22.insert = r22.lookahead, r22.lookahead = 0, r22.match_length = r22.prev_length = x2 - 1, r22.match_available = 0, e2.next_in = o2, e2.input = h22, e2.avail_in = a22, r22.wrap = s22, m2;
45450
+ return r22.strstart += r22.lookahead, r22.block_start = r22.strstart, r22.insert = r22.lookahead, r22.lookahead = 0, r22.match_length = r22.prev_length = x - 1, r22.match_available = 0, e2.next_in = o2, e2.input = h22, e2.avail_in = a22, r22.wrap = s22, m2;
45375
45451
  }, r2.deflateInfo = "pako deflate (from Nodeca project)";
45376
45452
  }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e, t, r2) {
45377
45453
  t.exports = function() {
@@ -45379,7 +45455,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45379
45455
  };
45380
45456
  }, {}], 48: [function(e, t, r2) {
45381
45457
  t.exports = function(e2, t2) {
45382
- var r22, n, i2, s2, a2, o, h2, u, l, f2, c2, d2, p2, m2, _2, g, b2, v2, y2, w2, k2, x2, S2, z2, C2;
45458
+ var r22, n, i2, s2, a2, o, h2, u, l, f2, c2, d2, p2, m2, _2, g, b2, v2, y2, w2, k2, x, S2, z2, C2;
45383
45459
  r22 = e2.state, n = e2.next_in, z2 = e2.input, i2 = n + (e2.avail_in - 5), s2 = e2.next_out, C2 = e2.output, a2 = s2 - (t2 - e2.avail_out), o = s2 + (e2.avail_out - 257), h2 = r22.dmax, u = r22.wsize, l = r22.whave, f2 = r22.wnext, c2 = r22.window, d2 = r22.hold, p2 = r22.bits, m2 = r22.lencode, _2 = r22.distcode, g = (1 << r22.lenbits) - 1, b2 = (1 << r22.distbits) - 1;
45384
45460
  e: do {
45385
45461
  p2 < 15 && (d2 += z2[n++] << p2, p2 += 8, d2 += z2[n++] << p2, p2 += 8), v2 = m2[d2 & g];
@@ -45417,28 +45493,28 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45417
45493
  e2.msg = "invalid distance too far back", r22.mode = 30;
45418
45494
  break e;
45419
45495
  }
45420
- if (S2 = c2, (x2 = 0) === f2) {
45421
- if (x2 += u - y2, y2 < w2) {
45422
- for (w2 -= y2; C2[s2++] = c2[x2++], --y2; ) ;
45423
- x2 = s2 - k2, S2 = C2;
45496
+ if (S2 = c2, (x = 0) === f2) {
45497
+ if (x += u - y2, y2 < w2) {
45498
+ for (w2 -= y2; C2[s2++] = c2[x++], --y2; ) ;
45499
+ x = s2 - k2, S2 = C2;
45424
45500
  }
45425
45501
  } else if (f2 < y2) {
45426
- if (x2 += u + f2 - y2, (y2 -= f2) < w2) {
45427
- for (w2 -= y2; C2[s2++] = c2[x2++], --y2; ) ;
45428
- if (x2 = 0, f2 < w2) {
45429
- for (w2 -= y2 = f2; C2[s2++] = c2[x2++], --y2; ) ;
45430
- x2 = s2 - k2, S2 = C2;
45502
+ if (x += u + f2 - y2, (y2 -= f2) < w2) {
45503
+ for (w2 -= y2; C2[s2++] = c2[x++], --y2; ) ;
45504
+ if (x = 0, f2 < w2) {
45505
+ for (w2 -= y2 = f2; C2[s2++] = c2[x++], --y2; ) ;
45506
+ x = s2 - k2, S2 = C2;
45431
45507
  }
45432
45508
  }
45433
- } else if (x2 += f2 - y2, y2 < w2) {
45434
- for (w2 -= y2; C2[s2++] = c2[x2++], --y2; ) ;
45435
- x2 = s2 - k2, S2 = C2;
45509
+ } else if (x += f2 - y2, y2 < w2) {
45510
+ for (w2 -= y2; C2[s2++] = c2[x++], --y2; ) ;
45511
+ x = s2 - k2, S2 = C2;
45436
45512
  }
45437
- for (; 2 < w2; ) C2[s2++] = S2[x2++], C2[s2++] = S2[x2++], C2[s2++] = S2[x2++], w2 -= 3;
45438
- w2 && (C2[s2++] = S2[x2++], 1 < w2 && (C2[s2++] = S2[x2++]));
45513
+ for (; 2 < w2; ) C2[s2++] = S2[x++], C2[s2++] = S2[x++], C2[s2++] = S2[x++], w2 -= 3;
45514
+ w2 && (C2[s2++] = S2[x++], 1 < w2 && (C2[s2++] = S2[x++]));
45439
45515
  } else {
45440
- for (x2 = s2 - k2; C2[s2++] = C2[x2++], C2[s2++] = C2[x2++], C2[s2++] = C2[x2++], 2 < (w2 -= 3); ) ;
45441
- w2 && (C2[s2++] = C2[x2++], 1 < w2 && (C2[s2++] = C2[x2++]));
45516
+ for (x = s2 - k2; C2[s2++] = C2[x++], C2[s2++] = C2[x++], C2[s2++] = C2[x++], 2 < (w2 -= 3); ) ;
45517
+ w2 && (C2[s2++] = C2[x++], 1 < w2 && (C2[s2++] = C2[x++]));
45442
45518
  }
45443
45519
  break;
45444
45520
  }
@@ -45449,7 +45525,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45449
45525
  n -= w2 = p2 >> 3, d2 &= (1 << (p2 -= w2 << 3)) - 1, e2.next_in = n, e2.next_out = s2, e2.avail_in = n < i2 ? i2 - n + 5 : 5 - (n - i2), e2.avail_out = s2 < o ? o - s2 + 257 : 257 - (s2 - o), r22.hold = d2, r22.bits = p2;
45450
45526
  };
45451
45527
  }, {}], 49: [function(e, t, r2) {
45452
- var I2 = e("../utils/common"), O = e("./adler32"), B2 = e("./crc32"), R = e("./inffast"), T2 = e("./inftrees"), D2 = 1, F2 = 2, N2 = 0, U2 = -2, P2 = 1, n = 852, i2 = 592;
45528
+ var I2 = e("../utils/common"), O2 = e("./adler32"), B2 = e("./crc32"), R2 = e("./inffast"), T = e("./inftrees"), D2 = 1, F2 = 2, N2 = 0, U2 = -2, P2 = 1, n = 852, i2 = 592;
45453
45529
  function L2(e2) {
45454
45530
  return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24);
45455
45531
  }
@@ -45480,8 +45556,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45480
45556
  for (; t2 < 256; ) e2.lens[t2++] = 9;
45481
45557
  for (; t2 < 280; ) e2.lens[t2++] = 7;
45482
45558
  for (; t2 < 288; ) e2.lens[t2++] = 8;
45483
- for (T2(D2, e2.lens, 0, 288, l, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; ) e2.lens[t2++] = 5;
45484
- T2(F2, e2.lens, 0, 32, f2, 0, e2.work, { bits: 5 }), c2 = false;
45559
+ for (T(D2, e2.lens, 0, 288, l, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; ) e2.lens[t2++] = 5;
45560
+ T(F2, e2.lens, 0, 32, f2, 0, e2.work, { bits: 5 }), c2 = false;
45485
45561
  }
45486
45562
  e2.lencode = l, e2.lenbits = 9, e2.distcode = f2, e2.distbits = 5;
45487
45563
  }
@@ -45492,9 +45568,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45492
45568
  r2.inflateReset = o, r2.inflateReset2 = h2, r2.inflateResetKeep = a2, r2.inflateInit = function(e2) {
45493
45569
  return u(e2, 15);
45494
45570
  }, r2.inflateInit2 = u, r2.inflate = function(e2, t2) {
45495
- var r22, n2, i22, s22, a22, o2, h22, u2, l2, f22, c22, d2, p2, m2, _2, g, b2, v2, y2, w2, k2, x2, S2, z2, C2 = 0, E2 = new I2.Buf8(4), A2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
45571
+ var r22, n2, i22, s22, a22, o2, h22, u2, l2, f22, c22, d2, p2, m2, _2, g, b2, v2, y2, w2, k2, x, S2, z2, C2 = 0, E2 = new I2.Buf8(4), A2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
45496
45572
  if (!e2 || !e2.state || !e2.output || !e2.input && 0 !== e2.avail_in) return U2;
45497
- 12 === (r22 = e2.state).mode && (r22.mode = 13), a22 = e2.next_out, i22 = e2.output, h22 = e2.avail_out, s22 = e2.next_in, n2 = e2.input, o2 = e2.avail_in, u2 = r22.hold, l2 = r22.bits, f22 = o2, c22 = h22, x2 = N2;
45573
+ 12 === (r22 = e2.state).mode && (r22.mode = 13), a22 = e2.next_out, i22 = e2.output, h22 = e2.avail_out, s22 = e2.next_in, n2 = e2.input, o2 = e2.avail_in, u2 = r22.hold, l2 = r22.bits, f22 = o2, c22 = h22, x = N2;
45498
45574
  e: for (; ; ) switch (r22.mode) {
45499
45575
  case P2:
45500
45576
  if (0 === r22.wrap) {
@@ -45665,7 +45741,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45665
45741
  r22.lens[A2[r22.have++]] = 7 & u2, u2 >>>= 3, l2 -= 3;
45666
45742
  }
45667
45743
  for (; r22.have < 19; ) r22.lens[A2[r22.have++]] = 0;
45668
- if (r22.lencode = r22.lendyn, r22.lenbits = 7, S2 = { bits: r22.lenbits }, x2 = T2(0, r22.lens, 0, 19, r22.lencode, 0, r22.work, S2), r22.lenbits = S2.bits, x2) {
45744
+ if (r22.lencode = r22.lendyn, r22.lenbits = 7, S2 = { bits: r22.lenbits }, x = T(0, r22.lens, 0, 19, r22.lencode, 0, r22.work, S2), r22.lenbits = S2.bits, x) {
45669
45745
  e2.msg = "invalid code lengths set", r22.mode = 30;
45670
45746
  break;
45671
45747
  }
@@ -45713,11 +45789,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45713
45789
  e2.msg = "invalid code -- missing end-of-block", r22.mode = 30;
45714
45790
  break;
45715
45791
  }
45716
- if (r22.lenbits = 9, S2 = { bits: r22.lenbits }, x2 = T2(D2, r22.lens, 0, r22.nlen, r22.lencode, 0, r22.work, S2), r22.lenbits = S2.bits, x2) {
45792
+ if (r22.lenbits = 9, S2 = { bits: r22.lenbits }, x = T(D2, r22.lens, 0, r22.nlen, r22.lencode, 0, r22.work, S2), r22.lenbits = S2.bits, x) {
45717
45793
  e2.msg = "invalid literal/lengths set", r22.mode = 30;
45718
45794
  break;
45719
45795
  }
45720
- if (r22.distbits = 6, r22.distcode = r22.distdyn, S2 = { bits: r22.distbits }, x2 = T2(F2, r22.lens, r22.nlen, r22.ndist, r22.distcode, 0, r22.work, S2), r22.distbits = S2.bits, x2) {
45796
+ if (r22.distbits = 6, r22.distcode = r22.distdyn, S2 = { bits: r22.distbits }, x = T(F2, r22.lens, r22.nlen, r22.ndist, r22.distcode, 0, r22.work, S2), r22.distbits = S2.bits, x) {
45721
45797
  e2.msg = "invalid distances set", r22.mode = 30;
45722
45798
  break;
45723
45799
  }
@@ -45726,7 +45802,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45726
45802
  r22.mode = 21;
45727
45803
  case 21:
45728
45804
  if (6 <= o2 && 258 <= h22) {
45729
- e2.next_out = a22, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold = u2, r22.bits = l2, R(e2, c22), a22 = e2.next_out, i22 = e2.output, h22 = e2.avail_out, s22 = e2.next_in, n2 = e2.input, o2 = e2.avail_in, u2 = r22.hold, l2 = r22.bits, 12 === r22.mode && (r22.back = -1);
45805
+ e2.next_out = a22, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold = u2, r22.bits = l2, R2(e2, c22), a22 = e2.next_out, i22 = e2.output, h22 = e2.avail_out, s22 = e2.next_in, n2 = e2.input, o2 = e2.avail_in, u2 = r22.hold, l2 = r22.bits, 12 === r22.mode && (r22.back = -1);
45730
45806
  break;
45731
45807
  }
45732
45808
  for (r22.back = 0; g = (C2 = r22.lencode[u2 & (1 << r22.lenbits) - 1]) >>> 16 & 255, b2 = 65535 & C2, !((_2 = C2 >>> 24) <= l2); ) {
@@ -45814,7 +45890,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45814
45890
  if (0 === o2) break e;
45815
45891
  o2--, u2 |= n2[s22++] << l2, l2 += 8;
45816
45892
  }
45817
- if (c22 -= h22, e2.total_out += c22, r22.total += c22, c22 && (e2.adler = r22.check = r22.flags ? B2(r22.check, i22, c22, a22 - c22) : O(r22.check, i22, c22, a22 - c22)), c22 = h22, (r22.flags ? u2 : L2(u2)) !== r22.check) {
45893
+ if (c22 -= h22, e2.total_out += c22, r22.total += c22, c22 && (e2.adler = r22.check = r22.flags ? B2(r22.check, i22, c22, a22 - c22) : O2(r22.check, i22, c22, a22 - c22)), c22 = h22, (r22.flags ? u2 : L2(u2)) !== r22.check) {
45818
45894
  e2.msg = "incorrect data check", r22.mode = 30;
45819
45895
  break;
45820
45896
  }
@@ -45835,10 +45911,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45835
45911
  }
45836
45912
  r22.mode = 29;
45837
45913
  case 29:
45838
- x2 = 1;
45914
+ x = 1;
45839
45915
  break e;
45840
45916
  case 30:
45841
- x2 = -3;
45917
+ x = -3;
45842
45918
  break e;
45843
45919
  case 31:
45844
45920
  return -4;
@@ -45846,7 +45922,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45846
45922
  default:
45847
45923
  return U2;
45848
45924
  }
45849
- return e2.next_out = a22, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold = u2, r22.bits = l2, (r22.wsize || c22 !== e2.avail_out && r22.mode < 30 && (r22.mode < 27 || 4 !== t2)) && Z(e2, e2.output, e2.next_out, c22 - e2.avail_out) ? (r22.mode = 31, -4) : (f22 -= e2.avail_in, c22 -= e2.avail_out, e2.total_in += f22, e2.total_out += c22, r22.total += c22, r22.wrap && c22 && (e2.adler = r22.check = r22.flags ? B2(r22.check, i22, c22, e2.next_out - c22) : O(r22.check, i22, c22, e2.next_out - c22)), e2.data_type = r22.bits + (r22.last ? 64 : 0) + (12 === r22.mode ? 128 : 0) + (20 === r22.mode || 15 === r22.mode ? 256 : 0), (0 == f22 && 0 === c22 || 4 === t2) && x2 === N2 && (x2 = -5), x2);
45925
+ return e2.next_out = a22, e2.avail_out = h22, e2.next_in = s22, e2.avail_in = o2, r22.hold = u2, r22.bits = l2, (r22.wsize || c22 !== e2.avail_out && r22.mode < 30 && (r22.mode < 27 || 4 !== t2)) && Z(e2, e2.output, e2.next_out, c22 - e2.avail_out) ? (r22.mode = 31, -4) : (f22 -= e2.avail_in, c22 -= e2.avail_out, e2.total_in += f22, e2.total_out += c22, r22.total += c22, r22.wrap && c22 && (e2.adler = r22.check = r22.flags ? B2(r22.check, i22, c22, e2.next_out - c22) : O2(r22.check, i22, c22, e2.next_out - c22)), e2.data_type = r22.bits + (r22.last ? 64 : 0) + (12 === r22.mode ? 128 : 0) + (20 === r22.mode || 15 === r22.mode ? 256 : 0), (0 == f22 && 0 === c22 || 4 === t2) && x === N2 && (x = -5), x);
45850
45926
  }, r2.inflateEnd = function(e2) {
45851
45927
  if (!e2 || !e2.state) return U2;
45852
45928
  var t2 = e2.state;
@@ -45856,33 +45932,33 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45856
45932
  return e2 && e2.state ? 0 == (2 & (r22 = e2.state).wrap) ? U2 : ((r22.head = t2).done = false, N2) : U2;
45857
45933
  }, r2.inflateSetDictionary = function(e2, t2) {
45858
45934
  var r22, n2 = t2.length;
45859
- return e2 && e2.state ? 0 !== (r22 = e2.state).wrap && 11 !== r22.mode ? U2 : 11 === r22.mode && O(1, t2, n2, 0) !== r22.check ? -3 : Z(e2, t2, n2, n2) ? (r22.mode = 31, -4) : (r22.havedict = 1, N2) : U2;
45935
+ return e2 && e2.state ? 0 !== (r22 = e2.state).wrap && 11 !== r22.mode ? U2 : 11 === r22.mode && O2(1, t2, n2, 0) !== r22.check ? -3 : Z(e2, t2, n2, n2) ? (r22.mode = 31, -4) : (r22.havedict = 1, N2) : U2;
45860
45936
  }, r2.inflateInfo = "pako inflate (from Nodeca project)";
45861
45937
  }, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e, t, r2) {
45862
45938
  var D2 = e("../utils/common"), F2 = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], N2 = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], U2 = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], P2 = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
45863
45939
  t.exports = function(e2, t2, r22, n, i2, s2, a2, o) {
45864
- var h2, u, l, f2, c2, d2, p2, m2, _2, g = o.bits, b2 = 0, v2 = 0, y2 = 0, w2 = 0, k2 = 0, x2 = 0, S2 = 0, z2 = 0, C2 = 0, E2 = 0, A2 = null, I2 = 0, O = new D2.Buf16(16), B2 = new D2.Buf16(16), R = null, T2 = 0;
45865
- for (b2 = 0; b2 <= 15; b2++) O[b2] = 0;
45866
- for (v2 = 0; v2 < n; v2++) O[t2[r22 + v2]]++;
45867
- for (k2 = g, w2 = 15; 1 <= w2 && 0 === O[w2]; w2--) ;
45940
+ var h2, u, l, f2, c2, d2, p2, m2, _2, g = o.bits, b2 = 0, v2 = 0, y2 = 0, w2 = 0, k2 = 0, x = 0, S2 = 0, z2 = 0, C2 = 0, E2 = 0, A2 = null, I2 = 0, O2 = new D2.Buf16(16), B2 = new D2.Buf16(16), R2 = null, T = 0;
45941
+ for (b2 = 0; b2 <= 15; b2++) O2[b2] = 0;
45942
+ for (v2 = 0; v2 < n; v2++) O2[t2[r22 + v2]]++;
45943
+ for (k2 = g, w2 = 15; 1 <= w2 && 0 === O2[w2]; w2--) ;
45868
45944
  if (w2 < k2 && (k2 = w2), 0 === w2) return i2[s2++] = 20971520, i2[s2++] = 20971520, o.bits = 1, 0;
45869
- for (y2 = 1; y2 < w2 && 0 === O[y2]; y2++) ;
45870
- for (k2 < y2 && (k2 = y2), b2 = z2 = 1; b2 <= 15; b2++) if (z2 <<= 1, (z2 -= O[b2]) < 0) return -1;
45945
+ for (y2 = 1; y2 < w2 && 0 === O2[y2]; y2++) ;
45946
+ for (k2 < y2 && (k2 = y2), b2 = z2 = 1; b2 <= 15; b2++) if (z2 <<= 1, (z2 -= O2[b2]) < 0) return -1;
45871
45947
  if (0 < z2 && (0 === e2 || 1 !== w2)) return -1;
45872
- for (B2[1] = 0, b2 = 1; b2 < 15; b2++) B2[b2 + 1] = B2[b2] + O[b2];
45948
+ for (B2[1] = 0, b2 = 1; b2 < 15; b2++) B2[b2 + 1] = B2[b2] + O2[b2];
45873
45949
  for (v2 = 0; v2 < n; v2++) 0 !== t2[r22 + v2] && (a2[B2[t2[r22 + v2]]++] = v2);
45874
- if (d2 = 0 === e2 ? (A2 = R = a2, 19) : 1 === e2 ? (A2 = F2, I2 -= 257, R = N2, T2 -= 257, 256) : (A2 = U2, R = P2, -1), b2 = y2, c2 = s2, S2 = v2 = E2 = 0, l = -1, f2 = (C2 = 1 << (x2 = k2)) - 1, 1 === e2 && 852 < C2 || 2 === e2 && 592 < C2) return 1;
45950
+ if (d2 = 0 === e2 ? (A2 = R2 = a2, 19) : 1 === e2 ? (A2 = F2, I2 -= 257, R2 = N2, T -= 257, 256) : (A2 = U2, R2 = P2, -1), b2 = y2, c2 = s2, S2 = v2 = E2 = 0, l = -1, f2 = (C2 = 1 << (x = k2)) - 1, 1 === e2 && 852 < C2 || 2 === e2 && 592 < C2) return 1;
45875
45951
  for (; ; ) {
45876
- for (p2 = b2 - S2, _2 = a2[v2] < d2 ? (m2 = 0, a2[v2]) : a2[v2] > d2 ? (m2 = R[T2 + a2[v2]], A2[I2 + a2[v2]]) : (m2 = 96, 0), h2 = 1 << b2 - S2, y2 = u = 1 << x2; i2[c2 + (E2 >> S2) + (u -= h2)] = p2 << 24 | m2 << 16 | _2 | 0, 0 !== u; ) ;
45952
+ for (p2 = b2 - S2, _2 = a2[v2] < d2 ? (m2 = 0, a2[v2]) : a2[v2] > d2 ? (m2 = R2[T + a2[v2]], A2[I2 + a2[v2]]) : (m2 = 96, 0), h2 = 1 << b2 - S2, y2 = u = 1 << x; i2[c2 + (E2 >> S2) + (u -= h2)] = p2 << 24 | m2 << 16 | _2 | 0, 0 !== u; ) ;
45877
45953
  for (h2 = 1 << b2 - 1; E2 & h2; ) h2 >>= 1;
45878
- if (0 !== h2 ? (E2 &= h2 - 1, E2 += h2) : E2 = 0, v2++, 0 == --O[b2]) {
45954
+ if (0 !== h2 ? (E2 &= h2 - 1, E2 += h2) : E2 = 0, v2++, 0 == --O2[b2]) {
45879
45955
  if (b2 === w2) break;
45880
45956
  b2 = t2[r22 + a2[v2]];
45881
45957
  }
45882
45958
  if (k2 < b2 && (E2 & f2) !== l) {
45883
- for (0 === S2 && (S2 = k2), c2 += y2, z2 = 1 << (x2 = b2 - S2); x2 + S2 < w2 && !((z2 -= O[x2 + S2]) <= 0); ) x2++, z2 <<= 1;
45884
- if (C2 += 1 << x2, 1 === e2 && 852 < C2 || 2 === e2 && 592 < C2) return 1;
45885
- i2[l = E2 & f2] = k2 << 24 | x2 << 16 | c2 - s2 | 0;
45959
+ for (0 === S2 && (S2 = k2), c2 += y2, z2 = 1 << (x = b2 - S2); x + S2 < w2 && !((z2 -= O2[x + S2]) <= 0); ) x++, z2 <<= 1;
45960
+ if (C2 += 1 << x, 1 === e2 && 852 < C2 || 2 === e2 && 592 < C2) return 1;
45961
+ i2[l = E2 & f2] = k2 << 24 | x << 16 | c2 - s2 | 0;
45886
45962
  }
45887
45963
  }
45888
45964
  return 0 !== E2 && (i2[c2 + E2] = b2 - S2 << 24 | 64 << 16 | 0), o.bits = k2, 0;
@@ -45894,7 +45970,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45894
45970
  function n(e2) {
45895
45971
  for (var t2 = e2.length; 0 <= --t2; ) e2[t2] = 0;
45896
45972
  }
45897
- var s2 = 0, a2 = 29, u = 256, l = u + 1 + a2, f2 = 30, c2 = 19, _2 = 2 * l + 1, g = 15, d2 = 16, p2 = 7, m2 = 256, b2 = 16, v2 = 17, y2 = 18, w2 = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], k2 = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], x2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], S2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], z2 = new Array(2 * (l + 2));
45973
+ var s2 = 0, a2 = 29, u = 256, l = u + 1 + a2, f2 = 30, c2 = 19, _2 = 2 * l + 1, g = 15, d2 = 16, p2 = 7, m2 = 256, b2 = 16, v2 = 17, y2 = 18, w2 = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], k2 = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], x = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], S2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], z2 = new Array(2 * (l + 2));
45898
45974
  n(z2);
45899
45975
  var C2 = new Array(2 * f2);
45900
45976
  n(C2);
@@ -45904,7 +45980,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45904
45980
  n(A2);
45905
45981
  var I2 = new Array(a2);
45906
45982
  n(I2);
45907
- var O, B2, R, T2 = new Array(f2);
45983
+ var O2, B2, R2, T = new Array(f2);
45908
45984
  function D2(e2, t2, r22, n2, i22) {
45909
45985
  this.static_tree = e2, this.extra_bits = t2, this.extra_base = r22, this.elems = n2, this.max_length = i22, this.has_stree = e2 && e2.length;
45910
45986
  }
@@ -45955,7 +46031,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45955
46031
  }
45956
46032
  function K2(e2, t2, r22) {
45957
46033
  var n2, i22, s22, a22, o2 = 0;
45958
- if (0 !== e2.last_lit) for (; n2 = e2.pending_buf[e2.d_buf + 2 * o2] << 8 | e2.pending_buf[e2.d_buf + 2 * o2 + 1], i22 = e2.pending_buf[e2.l_buf + o2], o2++, 0 === n2 ? L2(e2, i22, t2) : (L2(e2, (s22 = A2[i22]) + u + 1, t2), 0 !== (a22 = w2[s22]) && P2(e2, i22 -= I2[s22], a22), L2(e2, s22 = N2(--n2), r22), 0 !== (a22 = k2[s22]) && P2(e2, n2 -= T2[s22], a22)), o2 < e2.last_lit; ) ;
46034
+ if (0 !== e2.last_lit) for (; n2 = e2.pending_buf[e2.d_buf + 2 * o2] << 8 | e2.pending_buf[e2.d_buf + 2 * o2 + 1], i22 = e2.pending_buf[e2.l_buf + o2], o2++, 0 === n2 ? L2(e2, i22, t2) : (L2(e2, (s22 = A2[i22]) + u + 1, t2), 0 !== (a22 = w2[s22]) && P2(e2, i22 -= I2[s22], a22), L2(e2, s22 = N2(--n2), r22), 0 !== (a22 = k2[s22]) && P2(e2, n2 -= T[s22], a22)), o2 < e2.last_lit; ) ;
45959
46035
  L2(e2, m2, t2);
45960
46036
  }
45961
46037
  function Y2(e2, t2) {
@@ -45989,7 +46065,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
45989
46065
  s22 = i22, u2 = (o2 = 0) === a22 ? (h22 = 138, 3) : i22 === a22 ? (h22 = 6, 3) : (h22 = 7, 4);
45990
46066
  }
45991
46067
  }
45992
- n(T2);
46068
+ n(T);
45993
46069
  var q2 = false;
45994
46070
  function J2(e2, t2, r22, n2) {
45995
46071
  P2(e2, (s2 << 1) + (n2 ? 1 : 0), 3), (function(e3, t3, r3, n3) {
@@ -46000,16 +46076,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
46000
46076
  q2 || ((function() {
46001
46077
  var e3, t2, r22, n2, i22, s22 = new Array(g + 1);
46002
46078
  for (n2 = r22 = 0; n2 < a2 - 1; n2++) for (I2[n2] = r22, e3 = 0; e3 < 1 << w2[n2]; e3++) A2[r22++] = n2;
46003
- for (A2[r22 - 1] = n2, n2 = i22 = 0; n2 < 16; n2++) for (T2[n2] = i22, e3 = 0; e3 < 1 << k2[n2]; e3++) E2[i22++] = n2;
46004
- for (i22 >>= 7; n2 < f2; n2++) for (T2[n2] = i22 << 7, e3 = 0; e3 < 1 << k2[n2] - 7; e3++) E2[256 + i22++] = n2;
46079
+ for (A2[r22 - 1] = n2, n2 = i22 = 0; n2 < 16; n2++) for (T[n2] = i22, e3 = 0; e3 < 1 << k2[n2]; e3++) E2[i22++] = n2;
46080
+ for (i22 >>= 7; n2 < f2; n2++) for (T[n2] = i22 << 7, e3 = 0; e3 < 1 << k2[n2] - 7; e3++) E2[256 + i22++] = n2;
46005
46081
  for (t2 = 0; t2 <= g; t2++) s22[t2] = 0;
46006
46082
  for (e3 = 0; e3 <= 143; ) z2[2 * e3 + 1] = 8, e3++, s22[8]++;
46007
46083
  for (; e3 <= 255; ) z2[2 * e3 + 1] = 9, e3++, s22[9]++;
46008
46084
  for (; e3 <= 279; ) z2[2 * e3 + 1] = 7, e3++, s22[7]++;
46009
46085
  for (; e3 <= 287; ) z2[2 * e3 + 1] = 8, e3++, s22[8]++;
46010
46086
  for (Z(z2, l + 1, s22), e3 = 0; e3 < f2; e3++) C2[2 * e3 + 1] = 5, C2[2 * e3] = j2(e3, 5);
46011
- O = new D2(z2, w2, u + 1, l, g), B2 = new D2(C2, k2, 0, f2, g), R = new D2(new Array(0), x2, 0, c2, p2);
46012
- })(), q2 = true), e2.l_desc = new F2(e2.dyn_ltree, O), e2.d_desc = new F2(e2.dyn_dtree, B2), e2.bl_desc = new F2(e2.bl_tree, R), e2.bi_buf = 0, e2.bi_valid = 0, W2(e2);
46087
+ O2 = new D2(z2, w2, u + 1, l, g), B2 = new D2(C2, k2, 0, f2, g), R2 = new D2(new Array(0), x, 0, c2, p2);
46088
+ })(), q2 = true), e2.l_desc = new F2(e2.dyn_ltree, O2), e2.d_desc = new F2(e2.dyn_dtree, B2), e2.bl_desc = new F2(e2.bl_tree, R2), e2.bi_buf = 0, e2.bi_valid = 0, W2(e2);
46013
46089
  }, r2._tr_stored_block = J2, r2._tr_flush_block = function(e2, t2, r22, n2) {
46014
46090
  var i22, s22, a22 = 0;
46015
46091
  0 < e2.level ? (2 === e2.strm.data_type && (e2.strm.data_type = (function(e3) {
@@ -47085,17 +47161,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
47085
47161
  elt = elt.shadowRoot.activeElement;
47086
47162
  return elt;
47087
47163
  }
47088
- function caretFromPoint(doc2, x2, y2) {
47164
+ function caretFromPoint(doc2, x, y2) {
47089
47165
  if (doc2.caretPositionFromPoint) {
47090
47166
  try {
47091
- let pos = doc2.caretPositionFromPoint(x2, y2);
47167
+ let pos = doc2.caretPositionFromPoint(x, y2);
47092
47168
  if (pos)
47093
47169
  return { node: pos.offsetNode, offset: Math.min(nodeSize(pos.offsetNode), pos.offset) };
47094
47170
  } catch (_2) {
47095
47171
  }
47096
47172
  }
47097
47173
  if (doc2.caretRangeFromPoint) {
47098
- let range2 = doc2.caretRangeFromPoint(x2, y2);
47174
+ let range2 = doc2.caretRangeFromPoint(x, y2);
47099
47175
  if (range2)
47100
47176
  return { node: range2.startContainer, offset: Math.min(nodeSize(range2.startContainer), range2.startOffset) };
47101
47177
  }
@@ -47194,8 +47270,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
47194
47270
  function storeScrollPos(view) {
47195
47271
  let rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);
47196
47272
  let refDOM, refTop;
47197
- for (let x2 = (rect.left + rect.right) / 2, y2 = startY + 1; y2 < Math.min(innerHeight, rect.bottom); y2 += 5) {
47198
- let dom = view.root.elementFromPoint(x2, y2);
47273
+ for (let x = (rect.left + rect.right) / 2, y2 = startY + 1; y2 < Math.min(innerHeight, rect.bottom); y2 += 5) {
47274
+ let dom = view.root.elementFromPoint(x, y2);
47199
47275
  if (!dom || dom == view.dom || !view.dom.contains(dom))
47200
47276
  continue;
47201
47277
  let localRect = dom.getBoundingClientRect();
@@ -47491,8 +47567,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
47491
47567
  function flattenV(rect, left2) {
47492
47568
  if (rect.width == 0)
47493
47569
  return rect;
47494
- let x2 = left2 ? rect.left : rect.right;
47495
- return { top: rect.top, bottom: rect.bottom, left: x2, right: x2 };
47570
+ let x = left2 ? rect.left : rect.right;
47571
+ return { top: rect.top, bottom: rect.bottom, left: x, right: x };
47496
47572
  }
47497
47573
  function flattenH(rect, top2) {
47498
47574
  if (rect.height == 0)
@@ -52499,10 +52575,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
52499
52575
  const Timeout = createTimeoutClass(clearTimeout);
52500
52576
  const timeout = (timeout2, callback) => new Timeout(setTimeout(callback, timeout2));
52501
52577
  const rotr = (w2, shift2) => w2 >>> shift2 | w2 << 32 - shift2;
52502
- const sum0to256 = (x2) => rotr(x2, 2) ^ rotr(x2, 13) ^ rotr(x2, 22);
52503
- const sum1to256 = (x2) => rotr(x2, 6) ^ rotr(x2, 11) ^ rotr(x2, 25);
52504
- const sigma0to256 = (x2) => rotr(x2, 7) ^ rotr(x2, 18) ^ x2 >>> 3;
52505
- const sigma1to256 = (x2) => rotr(x2, 17) ^ rotr(x2, 19) ^ x2 >>> 10;
52578
+ const sum0to256 = (x) => rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22);
52579
+ const sum1to256 = (x) => rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25);
52580
+ const sigma0to256 = (x) => rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3;
52581
+ const sigma1to256 = (x) => rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10;
52506
52582
  const K = new Uint32Array([
52507
52583
  1116352408,
52508
52584
  1899447441,
@@ -57418,10 +57494,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
57418
57494
  type: getNodeType(extension.name, this.schema)
57419
57495
  };
57420
57496
  const addNodeView = getExtensionConfigField(extension, "addNodeView", context);
57421
- if (!addNodeView) return [];
57497
+ if (!addNodeView) return null;
57498
+ const nodeViewFunction = addNodeView();
57499
+ if (!nodeViewFunction) return null;
57422
57500
  const nodeview = (node2, _view, getPos, decorations) => {
57423
57501
  const htmlAttributes = Attribute.getAttributesToRender(node2, extensionAttrs);
57424
- return addNodeView()({
57502
+ return nodeViewFunction({
57425
57503
  editor,
57426
57504
  node: node2,
57427
57505
  getPos,
@@ -57431,7 +57509,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
57431
57509
  });
57432
57510
  };
57433
57511
  return [extension.name, nodeview];
57434
- });
57512
+ }).filter(Boolean);
57435
57513
  return Object.fromEntries(entries);
57436
57514
  }
57437
57515
  };
@@ -57694,17 +57772,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
57694
57772
  },
57695
57773
  apply(tr, oldState, prevEditorState, newEditorState) {
57696
57774
  const meta2 = tr.getMeta(TrackChangesBasePluginKey);
57697
- if (!meta2) {
57698
- return {
57699
- ...oldState,
57700
- decorations: getTrackChangesDecorations(
57701
- newEditorState,
57702
- oldState.onlyOriginalShown,
57703
- oldState.onlyModifiedShown
57704
- )
57705
- };
57706
- }
57707
- if (meta2.type === "TRACK_CHANGES_ENABLE") {
57775
+ if (meta2 && meta2.type === "TRACK_CHANGES_ENABLE") {
57708
57776
  return {
57709
57777
  ...oldState,
57710
57778
  isTrackChangesActive: meta2.value === true,
@@ -57715,7 +57783,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
57715
57783
  )
57716
57784
  };
57717
57785
  }
57718
- if (meta2.type === "SHOW_ONLY_ORIGINAL") {
57786
+ if (meta2 && meta2.type === "SHOW_ONLY_ORIGINAL") {
57719
57787
  return {
57720
57788
  ...oldState,
57721
57789
  onlyOriginalShown: meta2.value === true,
@@ -57723,7 +57791,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
57723
57791
  decorations: getTrackChangesDecorations(newEditorState, meta2.value === true, false)
57724
57792
  };
57725
57793
  }
57726
- if (meta2.type === "SHOW_ONLY_MODIFIED") {
57794
+ if (meta2 && meta2.type === "SHOW_ONLY_MODIFIED") {
57727
57795
  return {
57728
57796
  ...oldState,
57729
57797
  onlyOriginalShown: false,
@@ -57731,6 +57799,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
57731
57799
  decorations: getTrackChangesDecorations(newEditorState, false, meta2.value === true)
57732
57800
  };
57733
57801
  }
57802
+ if (!tr.docChanged) {
57803
+ return oldState;
57804
+ }
57805
+ if (!meta2) {
57806
+ let mightAffectTrackChanges = false;
57807
+ tr.steps.forEach((step) => {
57808
+ if (step.slice || step.from !== step.to) {
57809
+ mightAffectTrackChanges = true;
57810
+ }
57811
+ });
57812
+ if (mightAffectTrackChanges) {
57813
+ return {
57814
+ ...oldState,
57815
+ decorations: getTrackChangesDecorations(
57816
+ newEditorState,
57817
+ oldState.onlyOriginalShown,
57818
+ oldState.onlyModifiedShown
57819
+ )
57820
+ };
57821
+ }
57822
+ return {
57823
+ ...oldState,
57824
+ decorations: oldState.decorations.map(tr.mapping, tr.doc)
57825
+ };
57826
+ }
57734
57827
  return {
57735
57828
  ...oldState,
57736
57829
  decorations: getTrackChangesDecorations(
@@ -58039,6 +58132,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58039
58132
  const updateYdocDocxData = async (editor, ydoc) => {
58040
58133
  ydoc = ydoc || editor.options.ydoc;
58041
58134
  if (!ydoc) return;
58135
+ if (!editor || editor.isDestroyed) return;
58042
58136
  const metaMap = ydoc.getMap("meta");
58043
58137
  const docxValue = metaMap.get("docx");
58044
58138
  let docx = [];
@@ -58070,6 +58164,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58070
58164
  { event: "docx-update", user: editor.options.user }
58071
58165
  );
58072
58166
  };
58167
+ const STYLE_ISOLATION_CLASS = "sd-editor-scoped";
58168
+ const applyStyleIsolationClass = (target) => {
58169
+ if (!target || !target.classList) return;
58170
+ target.classList.add(STYLE_ISOLATION_CLASS);
58171
+ };
58073
58172
  const PaginationPluginKey = new PluginKey("paginationPlugin");
58074
58173
  const initPaginationData = async (editor) => {
58075
58174
  if (!editor.converter) return;
@@ -58105,6 +58204,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58105
58204
  return new Promise((resolve2) => {
58106
58205
  const editorContainer = document.createElement("div");
58107
58206
  editorContainer.className = "super-editor";
58207
+ applyStyleIsolationClass(editorContainer);
58108
58208
  editorContainer.style.padding = "0";
58109
58209
  editorContainer.style.margin = "0";
58110
58210
  const sectionEditor = createHeaderFooterEditor({ editor, data, editorContainer });
@@ -58132,6 +58232,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58132
58232
  const { fontSizePt, typeface, fontFamilyCss } = parentStyles;
58133
58233
  const fontSizeInPixles = fontSizePt * 1.3333;
58134
58234
  const lineHeight2 = fontSizeInPixles * 1.2;
58235
+ applyStyleIsolationClass(editorContainer);
58135
58236
  Object.assign(editorContainer.style, {
58136
58237
  padding: "0",
58137
58238
  margin: "0",
@@ -58485,6 +58586,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58485
58586
  view() {
58486
58587
  let prevDoc;
58487
58588
  let prevActiveThreadId;
58589
+ let prevAllCommentPositions = {};
58488
58590
  return {
58489
58591
  update(view) {
58490
58592
  const { state: state2 } = view;
@@ -58495,16 +58597,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58495
58597
  if (meta2?.type === "setActiveComment" || meta2?.forceUpdate) {
58496
58598
  shouldUpdate = true;
58497
58599
  }
58498
- if (prevDoc && !prevDoc.eq(doc2)) shouldUpdate = true;
58499
- if (prevActiveThreadId !== currentActiveThreadId) {
58600
+ const docChanged = prevDoc && !prevDoc.eq(doc2);
58601
+ if (docChanged) shouldUpdate = true;
58602
+ const activeThreadChanged = prevActiveThreadId !== currentActiveThreadId;
58603
+ if (activeThreadChanged) {
58500
58604
  shouldUpdate = true;
58501
58605
  prevActiveThreadId = currentActiveThreadId;
58502
58606
  }
58607
+ const onlyActiveThreadChanged = !docChanged && activeThreadChanged;
58503
58608
  if (!shouldUpdate) return;
58504
58609
  prevDoc = doc2;
58505
58610
  shouldUpdate = false;
58506
58611
  const decorations = [];
58507
- const allCommentPositions = {};
58612
+ const allCommentPositions = onlyActiveThreadChanged ? prevAllCommentPositions : {};
58508
58613
  doc2.descendants((node2, pos) => {
58509
58614
  const { marks = [] } = node2;
58510
58615
  const commentMarks = marks.filter((mark2) => mark2.type.name === CommentMarkName);
@@ -58512,14 +58617,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58512
58617
  commentMarks.forEach((commentMark) => {
58513
58618
  const { attrs } = commentMark;
58514
58619
  const threadId = attrs.commentId || attrs.importedId;
58515
- const currentBounds = view.coordsAtPos(pos);
58516
- updatePosition({
58517
- allCommentPositions,
58518
- threadId,
58519
- pos,
58520
- currentBounds,
58521
- node: node2
58522
- });
58620
+ if (!onlyActiveThreadChanged) {
58621
+ const currentBounds = view.coordsAtPos(pos);
58622
+ updatePosition({
58623
+ allCommentPositions,
58624
+ threadId,
58625
+ pos,
58626
+ currentBounds,
58627
+ node: node2
58628
+ });
58629
+ }
58523
58630
  const isInternal = attrs.internal;
58524
58631
  if (!hasActive) hasActive = currentActiveThreadId === threadId;
58525
58632
  let color2 = getHighlightColor({
@@ -58542,20 +58649,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58542
58649
  to: pos + node2.nodeSize
58543
58650
  });
58544
58651
  if (trackedChangeMark) {
58545
- const currentBounds = view.coordsAtPos(pos);
58546
- const { id } = trackedChangeMark.mark.attrs;
58547
- updatePosition({
58548
- allCommentPositions,
58549
- threadId: id,
58550
- pos,
58551
- currentBounds,
58552
- node: node2
58553
- });
58554
- const isActiveTrackedChange = currentActiveThreadId === id;
58652
+ if (!onlyActiveThreadChanged) {
58653
+ const currentBounds = view.coordsAtPos(pos);
58654
+ const { id } = trackedChangeMark.mark.attrs;
58655
+ updatePosition({
58656
+ allCommentPositions,
58657
+ threadId: id,
58658
+ pos,
58659
+ currentBounds,
58660
+ node: node2
58661
+ });
58662
+ }
58663
+ const isActiveTrackedChange = currentActiveThreadId === trackedChangeMark.mark.attrs.id;
58555
58664
  if (isActiveTrackedChange) {
58556
58665
  const trackedChangeDeco = Decoration.inline(pos, pos + node2.nodeSize, {
58557
58666
  style: `border-width: 2px;`,
58558
- "data-thread-id": id,
58667
+ "data-thread-id": trackedChangeMark.mark.attrs.id,
58559
58668
  class: "sd-editor-tracked-change-highlight"
58560
58669
  });
58561
58670
  decorations.push(trackedChangeDeco);
@@ -58573,7 +58682,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58573
58682
  });
58574
58683
  view.dispatch(tr2);
58575
58684
  }
58576
- editor.emit("comment-positions", { allCommentPositions });
58685
+ if (!onlyActiveThreadChanged) {
58686
+ const positionsChanged = hasPositionsChanged(prevAllCommentPositions, allCommentPositions);
58687
+ if (positionsChanged) {
58688
+ prevAllCommentPositions = allCommentPositions;
58689
+ editor.emit("comment-positions", { allCommentPositions });
58690
+ }
58691
+ }
58577
58692
  }
58578
58693
  };
58579
58694
  }
@@ -58581,6 +58696,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58581
58696
  return [commentsPlugin];
58582
58697
  }
58583
58698
  });
58699
+ const hasPositionsChanged = (prevPositions, currPositions) => {
58700
+ const prevKeys = Object.keys(prevPositions);
58701
+ const currKeys = Object.keys(currPositions);
58702
+ if (prevKeys.length !== currKeys.length) return true;
58703
+ for (const key2 of currKeys) {
58704
+ const prev = prevPositions[key2];
58705
+ const curr = currPositions[key2];
58706
+ if (!prev || prev.top !== curr.top || prev.left !== curr.left) {
58707
+ return true;
58708
+ }
58709
+ }
58710
+ return false;
58711
+ };
58584
58712
  const getActiveCommentId = (doc2, selection) => {
58585
58713
  if (!selection) return;
58586
58714
  const { $from, $to } = selection;
@@ -59495,6 +59623,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59495
59623
  });
59496
59624
  });
59497
59625
  return [syncPlugin];
59626
+ },
59627
+ addCommands() {
59628
+ return {
59629
+ addImageToCollaboration: ({ mediaPath, fileData }) => () => {
59630
+ if (!this.options.ydoc || !mediaPath || !fileData) return false;
59631
+ const mediaMap = this.options.ydoc.getMap("media");
59632
+ mediaMap.set(mediaPath, fileData);
59633
+ return true;
59634
+ }
59635
+ };
59498
59636
  }
59499
59637
  });
59500
59638
  const createSyncPlugin = (ydoc, editor) => {
@@ -61347,7 +61485,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61347
61485
  { default: remarkStringify2 },
61348
61486
  { default: remarkGfm2 }
61349
61487
  ] = await Promise.all([
61350
- Promise.resolve().then(() => indexNjnq8umX),
61488
+ Promise.resolve().then(() => indexDQ6dCde6),
61351
61489
  Promise.resolve().then(() => indexDRCvimau),
61352
61490
  Promise.resolve().then(() => indexC_x_N6Uh),
61353
61491
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -61565,7 +61703,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61565
61703
  * @returns {Object | void} Migration results
61566
61704
  */
61567
61705
  processCollaborationMigrations() {
61568
- console.debug("[checkVersionMigrations] Current editor version", "0.28.0");
61706
+ console.debug("[checkVersionMigrations] Current editor version", "0.28.2");
61569
61707
  if (!this.options.ydoc) return;
61570
61708
  const metaMap = this.options.ydoc.getMap("meta");
61571
61709
  let docVersion = metaMap.get("version");
@@ -61756,7 +61894,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61756
61894
  options.element.classList.add("sd-super-editor-html");
61757
61895
  }
61758
61896
  }
61759
- options.element = options.isHeadless ? null : options.element || document.createElement("div");
61897
+ if (options.isHeadless) {
61898
+ options.element = null;
61899
+ return;
61900
+ }
61901
+ options.element = options.element || document.createElement("div");
61902
+ applyStyleIsolationClass(options.element);
61760
61903
  };
61761
61904
  init_fn = function() {
61762
61905
  __privateMethod$1(this, _Editor_instances, createExtensionService_fn).call(this);
@@ -63434,16 +63577,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
63434
63577
  const { state: state2, dom } = view;
63435
63578
  const { selection } = state2;
63436
63579
  const containerRect = dom.getBoundingClientRect();
63437
- let x2, y2;
63580
+ let x, y2;
63438
63581
  if (typeof eventLocation.clientX === "number" && typeof eventLocation.clientY === "number") {
63439
- x2 = eventLocation.clientX - containerRect.left;
63582
+ x = eventLocation.clientX - containerRect.left;
63440
63583
  y2 = eventLocation.clientY - containerRect.top;
63441
63584
  } else {
63442
63585
  const cursorCoords = view.coordsAtPos(selection.from);
63443
- x2 = cursorCoords.left - containerRect.left;
63586
+ x = cursorCoords.left - containerRect.left;
63444
63587
  y2 = cursorCoords.top - containerRect.top;
63445
63588
  }
63446
- return { left: x2, top: y2 };
63589
+ return { left: x, top: y2 };
63447
63590
  }
63448
63591
  const SlashMenuPluginKey = new PluginKey("slashMenu");
63449
63592
  const SlashMenu = Extension.create({
@@ -63722,17 +63865,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
63722
63865
  if (!this.dom || this.contentDOM?.contains(target) || !dragHandle) {
63723
63866
  return;
63724
63867
  }
63725
- let x2 = 0;
63868
+ let x = 0;
63726
63869
  let y2 = 0;
63727
63870
  if (this.dom !== dragHandle) {
63728
63871
  const domBox = this.dom.getBoundingClientRect();
63729
63872
  const handleBox = dragHandle.getBoundingClientRect();
63730
63873
  const offsetX = event.offsetX ?? event.nativeEvent?.offsetX;
63731
63874
  const offsetY = event.offsetY ?? event.nativeEvent?.offsetY;
63732
- x2 = handleBox.x - domBox.x + offsetX;
63875
+ x = handleBox.x - domBox.x + offsetX;
63733
63876
  y2 = handleBox.y - domBox.y + offsetY;
63734
63877
  }
63735
- event.dataTransfer?.setDragImage(this.dom, x2, y2);
63878
+ event.dataTransfer?.setDragImage(this.dom, x, y2);
63736
63879
  const pos = this.getPos();
63737
63880
  if (typeof pos !== "number") {
63738
63881
  return;
@@ -65785,8 +65928,36 @@ Please report this to https://github.com/markedjs/marked.`, e) {
65785
65928
  if (!editor.converter || editor.options.mode !== "docx") return { ...prev };
65786
65929
  let decorations = prev.decorations || DecorationSet.empty;
65787
65930
  if (tr.docChanged) {
65788
- const styles = LinkedStylesPluginKey.getState(editor.state).styles;
65789
- decorations = generateDecorations(newEditorState, styles);
65931
+ let mightAffectStyles = false;
65932
+ const styleRelatedMarks = /* @__PURE__ */ new Set(["textStyle", "bold", "italic", "underline", "strike"]);
65933
+ tr.steps.forEach((step) => {
65934
+ if (step.slice) {
65935
+ step.slice.content.descendants((node2) => {
65936
+ if (node2.attrs?.styleId) {
65937
+ mightAffectStyles = true;
65938
+ return false;
65939
+ }
65940
+ if (node2.marks.length > 0) {
65941
+ const hasStyleMarks = node2.marks.some((mark2) => styleRelatedMarks.has(mark2.type.name));
65942
+ if (hasStyleMarks) {
65943
+ mightAffectStyles = true;
65944
+ return false;
65945
+ }
65946
+ }
65947
+ });
65948
+ }
65949
+ if (step.jsonID === "addMark" || step.jsonID === "removeMark") {
65950
+ if (step.mark && styleRelatedMarks.has(step.mark.type.name)) {
65951
+ mightAffectStyles = true;
65952
+ }
65953
+ }
65954
+ });
65955
+ if (mightAffectStyles) {
65956
+ const styles = LinkedStylesPluginKey.getState(editor.state).styles;
65957
+ decorations = generateDecorations(newEditorState, styles);
65958
+ } else {
65959
+ decorations = decorations.map(tr.mapping, tr.doc);
65960
+ }
65790
65961
  }
65791
65962
  return { ...prev, decorations };
65792
65963
  }
@@ -66099,6 +66270,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66099
66270
  const eastAsia = listRunProperties?.["w:eastAsia"];
66100
66271
  return ascii || hAnsi || eastAsia || null;
66101
66272
  }
66273
+ const computedStylesCache = /* @__PURE__ */ new WeakMap();
66274
+ function clearComputedStyleCache(domNode) {
66275
+ if (domNode) {
66276
+ computedStylesCache.delete(domNode);
66277
+ }
66278
+ }
66102
66279
  function readNodeViewStyles(view) {
66103
66280
  const fallback = { fontSize: null, fontFamily: null, lineHeight: null };
66104
66281
  if (!view?.dom) return fallback;
@@ -66108,13 +66285,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66108
66285
  lineHeight: view.dom.style?.lineHeight || null
66109
66286
  };
66110
66287
  if (inline.fontSize && inline.fontFamily && inline.lineHeight) return inline;
66288
+ if (computedStylesCache.has(view.dom)) {
66289
+ const cached = computedStylesCache.get(view.dom);
66290
+ return {
66291
+ fontSize: inline.fontSize || cached.fontSize,
66292
+ fontFamily: inline.fontFamily || cached.fontFamily,
66293
+ lineHeight: inline.lineHeight || cached.lineHeight
66294
+ };
66295
+ }
66111
66296
  const globalWindow = typeof window !== "undefined" ? window : void 0;
66112
66297
  if (globalWindow?.getComputedStyle) {
66113
66298
  const computed2 = globalWindow.getComputedStyle(view.dom);
66299
+ const computedStyles = {
66300
+ fontSize: computed2.fontSize,
66301
+ fontFamily: computed2.fontFamily,
66302
+ lineHeight: computed2.lineHeight
66303
+ };
66304
+ computedStylesCache.set(view.dom, computedStyles);
66114
66305
  return {
66115
- fontSize: inline.fontSize || computed2.fontSize,
66116
- fontFamily: inline.fontFamily || computed2.fontFamily,
66117
- lineHeight: inline.lineHeight || computed2.lineHeight
66306
+ fontSize: inline.fontSize || computedStyles.fontSize,
66307
+ fontFamily: inline.fontFamily || computedStyles.fontFamily,
66308
+ lineHeight: inline.lineHeight || computedStyles.lineHeight
66118
66309
  };
66119
66310
  }
66120
66311
  return inline;
@@ -66328,9 +66519,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66328
66519
  });
66329
66520
  }
66330
66521
  update(node2, decorations) {
66522
+ const prevNode = this.node;
66331
66523
  this.node = node2;
66332
66524
  this.decorations = decorations;
66333
66525
  this.invalidateResolvedPos();
66526
+ const stylingAttrsChanged = !prevNode || prevNode.attrs.styleId !== node2.attrs.styleId || prevNode.attrs.numId !== node2.attrs.numId || prevNode.attrs.level !== node2.attrs.level;
66527
+ if (stylingAttrsChanged) {
66528
+ clearComputedStyleCache(this.dom);
66529
+ }
66334
66530
  const { fontSize: fontSize2, fontFamily: fontFamily2, lineHeight: lineHeight2 } = resolveListItemTypography({
66335
66531
  node: node2,
66336
66532
  pos: this.getResolvedPos(),
@@ -66341,11 +66537,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66341
66537
  this.dom.style.fontSize = fontSize2;
66342
66538
  this.dom.style.fontFamily = fontFamily2 || "inherit";
66343
66539
  this.dom.style.lineHeight = lineHeight2 || "";
66344
- this.refreshIndentStyling();
66540
+ const attrsChanged = stylingAttrsChanged || prevNode?.attrs.indent !== node2.attrs.indent;
66541
+ if (attrsChanged) {
66542
+ this.refreshIndentStyling();
66543
+ }
66345
66544
  }
66346
66545
  destroy() {
66347
66546
  activeListItemNodeViews.delete(this);
66348
66547
  this.numberingDOM.removeEventListener("click", this.handleNumberingClick);
66548
+ clearComputedStyleCache(this.dom);
66349
66549
  const caf = typeof globalThis !== "undefined" ? globalThis.cancelAnimationFrame : void 0;
66350
66550
  if (this._pendingIndentRefresh != null && typeof caf === "function") {
66351
66551
  caf(this._pendingIndentRefresh);
@@ -66464,8 +66664,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66464
66664
  if (!markerText.trim()) return 0;
66465
66665
  try {
66466
66666
  if (editor?.options?.isHeadless) return 0;
66667
+ if (typeof globalThis.CanvasRenderingContext2D === "undefined") return 0;
66467
66668
  const canvas = document.createElement("canvas");
66669
+ if (typeof canvas.getContext !== "function") return 0;
66468
66670
  const context = canvas.getContext("2d");
66671
+ if (!context) return 0;
66469
66672
  const fontSizePx = fontSize2.includes("pt") ? Number.parseFloat(fontSize2) * POINT_TO_PIXEL_CONVERSION_FACTOR : Number.parseFloat(fontSize2);
66470
66673
  context.font = `${fontSizePx}px ${fontFamily2}`;
66471
66674
  const textWidth = context.measureText(markerText).width;
@@ -66484,7 +66687,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66484
66687
  appendTransaction(transactions, oldState, newState) {
66485
66688
  if (transactions.every((tr2) => tr2.getMeta("y-sync$"))) return null;
66486
66689
  const updateNodeViews = transactions.some((tr2) => tr2.getMeta("updatedListItemNodeViews"));
66487
- if (updateNodeViews || !hasInitialized) refreshAllListItemNodeViews();
66690
+ if (updateNodeViews || !hasInitialized) {
66691
+ refreshAllListItemNodeViews();
66692
+ }
66488
66693
  const isFromPlugin = transactions.some((tr2) => tr2.getMeta("orderedListSync"));
66489
66694
  const docChanged = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
66490
66695
  if (isFromPlugin || !docChanged) {
@@ -66496,10 +66701,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66496
66701
  const listMap = /* @__PURE__ */ new Map();
66497
66702
  const listInitialized = /* @__PURE__ */ new Map();
66498
66703
  const shouldProcess = transactions.some((tr2) => {
66704
+ if (tr2.getMeta("updateListSync")) return true;
66499
66705
  return tr2.steps.some((step) => {
66500
66706
  const stepJSON = step.toJSON();
66501
- const hasUpdateMeta = tr2.getMeta("updateListSync");
66502
- return hasUpdateMeta || stepJSON && stepJSON.slice && JSON.stringify(stepJSON).includes('"listItem"');
66707
+ if (step.slice?.content) {
66708
+ let hasListItem = false;
66709
+ step.slice.content.descendants((node2) => {
66710
+ if (node2.type.name === "listItem") {
66711
+ hasListItem = true;
66712
+ return false;
66713
+ }
66714
+ });
66715
+ if (hasListItem) return true;
66716
+ }
66717
+ if (stepJSON && stepJSON.slice) {
66718
+ const jsonStr = JSON.stringify(stepJSON);
66719
+ if (jsonStr.includes('"listItem"')) return true;
66720
+ }
66721
+ return false;
66503
66722
  });
66504
66723
  });
66505
66724
  if (!shouldProcess) return null;
@@ -66563,6 +66782,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66563
66782
  }
66564
66783
  });
66565
66784
  }
66785
+ const shouldSkipNodeView = (editor) => {
66786
+ return editor.options.isHeadless;
66787
+ };
66566
66788
  const ListItem = Node$1.create({
66567
66789
  name: "listItem",
66568
66790
  content: "paragraph* block*",
@@ -66589,9 +66811,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66589
66811
  },
66590
66812
  /**
66591
66813
  * Important: The listItem node uses a custom node view.
66592
- * @returns {import('@core/NodeView.js').NodeView}
66814
+ * Skip node view in headless mode for performance.
66815
+ * @returns {import('@core/NodeView.js').NodeView|null}
66593
66816
  */
66594
66817
  addNodeView() {
66818
+ if (shouldSkipNodeView(this.editor)) return null;
66595
66819
  return ({ node: node2, editor, getPos, decorations }) => {
66596
66820
  return new ListItemNodeView(node2, getPos, decorations, editor);
66597
66821
  };
@@ -66969,17 +67193,68 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66969
67193
  },
66970
67194
  addPmPlugins() {
66971
67195
  const { view } = this.editor;
67196
+ const dropcapWidthCache = /* @__PURE__ */ new Map();
67197
+ const hasDropcapParagraph = (node2) => node2.type.name === "paragraph" && node2.attrs.dropcap?.type === "margin";
67198
+ const invalidateCacheForRange = (from2, to) => {
67199
+ for (const [pos] of dropcapWidthCache) {
67200
+ if (pos >= from2 && pos <= to) {
67201
+ dropcapWidthCache.delete(pos);
67202
+ }
67203
+ }
67204
+ };
66972
67205
  const dropcapPlugin = new Plugin({
66973
67206
  name: "dropcapPlugin",
66974
67207
  key: new PluginKey("dropcapPlugin"),
66975
67208
  state: {
66976
67209
  init(_2, state2) {
66977
- let decorations = getDropcapDecorations(state2, view);
67210
+ const decorations = getDropcapDecorations(state2, view, dropcapWidthCache);
66978
67211
  return DecorationSet.create(state2.doc, decorations);
66979
67212
  },
66980
67213
  apply(tr, oldDecorationSet, oldState, newState) {
66981
67214
  if (!tr.docChanged) return oldDecorationSet;
66982
- const decorations = getDropcapDecorations(newState, view);
67215
+ let hasDropcaps = false;
67216
+ newState.doc.descendants((node2) => {
67217
+ if (hasDropcapParagraph(node2)) {
67218
+ hasDropcaps = true;
67219
+ return false;
67220
+ }
67221
+ });
67222
+ if (!hasDropcaps) {
67223
+ dropcapWidthCache.clear();
67224
+ return DecorationSet.empty;
67225
+ }
67226
+ let affectsDropcaps = false;
67227
+ tr.steps.forEach((step) => {
67228
+ if (step.slice?.content) {
67229
+ step.slice.content.descendants((node2) => {
67230
+ if (hasDropcapParagraph(node2)) {
67231
+ affectsDropcaps = true;
67232
+ return false;
67233
+ }
67234
+ });
67235
+ }
67236
+ if (step.jsonID === "replace" && step.from !== void 0 && step.to !== void 0) {
67237
+ try {
67238
+ oldState.doc.nodesBetween(step.from, step.to, (node2) => {
67239
+ if (hasDropcapParagraph(node2)) {
67240
+ affectsDropcaps = true;
67241
+ return false;
67242
+ }
67243
+ });
67244
+ } catch {
67245
+ affectsDropcaps = true;
67246
+ }
67247
+ }
67248
+ });
67249
+ if (!affectsDropcaps) {
67250
+ return oldDecorationSet.map(tr.mapping, tr.doc);
67251
+ }
67252
+ tr.steps.forEach((step) => {
67253
+ if (step.from !== void 0 && step.to !== void 0) {
67254
+ invalidateCacheForRange(step.from, step.to);
67255
+ }
67256
+ });
67257
+ const decorations = getDropcapDecorations(newState, view, dropcapWidthCache);
66983
67258
  return DecorationSet.create(newState.doc, decorations);
66984
67259
  }
66985
67260
  },
@@ -66992,12 +67267,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66992
67267
  return [dropcapPlugin];
66993
67268
  }
66994
67269
  });
66995
- const getDropcapDecorations = (state2, view) => {
66996
- let decorations = [];
67270
+ const getDropcapDecorations = (state2, view, widthCache) => {
67271
+ const decorations = [];
66997
67272
  state2.doc.descendants((node2, pos) => {
66998
67273
  if (node2.type.name === "paragraph") {
66999
67274
  if (node2.attrs.dropcap?.type === "margin") {
67000
- const width = getDropcapWidth(view, pos);
67275
+ const width = getDropcapWidth(view, pos, widthCache);
67001
67276
  decorations.push(Decoration.inline(pos, pos + node2.nodeSize, { style: `margin-left: -${width}px;` }));
67002
67277
  }
67003
67278
  return false;
@@ -67005,12 +67280,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67005
67280
  });
67006
67281
  return decorations;
67007
67282
  };
67008
- function getDropcapWidth(view, pos) {
67283
+ function getDropcapWidth(view, pos, widthCache) {
67284
+ if (widthCache.has(pos)) {
67285
+ return widthCache.get(pos);
67286
+ }
67009
67287
  const domNode = view.nodeDOM(pos);
67010
67288
  if (domNode) {
67011
67289
  const range2 = document.createRange();
67012
67290
  range2.selectNodeContents(domNode);
67013
- return range2.getBoundingClientRect().width;
67291
+ const width = range2.getBoundingClientRect().width;
67292
+ widthCache.set(pos, width);
67293
+ return width;
67014
67294
  }
67015
67295
  return 0;
67016
67296
  }
@@ -67196,10 +67476,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67196
67476
  const paragraphContext = getParagraphContext($pos, paragraphCache, helpers2);
67197
67477
  if (!paragraphContext) return;
67198
67478
  try {
67199
- const { tabStops, flattened, startPos } = paragraphContext;
67200
- const entryIndex = flattened.findIndex((entry) => entry.pos === pos);
67201
- if (entryIndex === -1) return;
67202
- const indentWidth = getIndentWidth(view, startPos, paragraphContext.indent, coordCache, domPosCache);
67479
+ const { tabStops, flattened, positionMap: positionMap2, startPos } = paragraphContext;
67480
+ const entryIndex = positionMap2.get(pos);
67481
+ if (entryIndex === void 0) return;
67482
+ if (paragraphContext.indentWidth === void 0) {
67483
+ paragraphContext.indentWidth = getIndentWidth(view, startPos, paragraphContext.indent, coordCache, domPosCache);
67484
+ }
67485
+ if (paragraphContext.tabHeight === void 0) {
67486
+ paragraphContext.tabHeight = calcTabHeight($pos);
67487
+ }
67488
+ const indentWidth = paragraphContext.indentWidth;
67203
67489
  const accumulatedTabWidth = paragraphContext.accumulatedTabWidth || 0;
67204
67490
  const currentWidth = indentWidth + measureRangeWidth(view, startPos + 1, pos, coordCache, domPosCache) + accumulatedTabWidth;
67205
67491
  let tabWidth;
@@ -67241,7 +67527,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67241
67527
  tabWidth = defaultTabDistance - currentWidth % defaultLineLength % defaultTabDistance;
67242
67528
  if (tabWidth === 0) tabWidth = defaultTabDistance;
67243
67529
  }
67244
- const tabHeight = calcTabHeight($pos);
67530
+ const tabHeight = paragraphContext.tabHeight;
67245
67531
  decorations.push(
67246
67532
  Decoration.node(pos, pos + node2.nodeSize, {
67247
67533
  style: `width: ${tabWidth}px; height: ${tabHeight};${extraStyles}`
@@ -67269,13 +67555,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67269
67555
  tabStops = style2.definition.styles.tabStops;
67270
67556
  }
67271
67557
  }
67558
+ const { entries, positionMap: positionMap2 } = flattenParagraph(node2, startPos);
67272
67559
  cache2.set(startPos, {
67273
67560
  paragraph: node2,
67274
67561
  paragraphDepth: depth,
67275
67562
  startPos,
67276
67563
  indent: node2.attrs?.indent || {},
67277
67564
  tabStops,
67278
- flattened: flattenParagraph(node2, startPos),
67565
+ flattened: entries,
67566
+ positionMap: positionMap2,
67567
+ // Store position map for O(1) lookups
67279
67568
  accumulatedTabWidth: 0
67280
67569
  });
67281
67570
  }
@@ -67286,6 +67575,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67286
67575
  }
67287
67576
  function flattenParagraph(paragraph2, paragraphStartPos) {
67288
67577
  const entries = [];
67578
+ const positionMap2 = /* @__PURE__ */ new Map();
67289
67579
  const walk = (node2, basePos) => {
67290
67580
  if (!node2) return;
67291
67581
  if (node2.type?.name === "run") {
@@ -67295,13 +67585,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67295
67585
  });
67296
67586
  return;
67297
67587
  }
67298
- entries.push({ node: node2, pos: basePos - 1 });
67588
+ const pos = basePos - 1;
67589
+ const index2 = entries.length;
67590
+ entries.push({ node: node2, pos });
67591
+ positionMap2.set(pos, index2);
67299
67592
  };
67300
67593
  paragraph2.forEach((child, offset2) => {
67301
67594
  const childPos = paragraphStartPos + offset2 + 1;
67302
67595
  walk(child, childPos);
67303
67596
  });
67304
- return entries;
67597
+ return { entries, positionMap: positionMap2 };
67305
67598
  }
67306
67599
  function findNextTabIndex(flattened, fromIndex) {
67307
67600
  for (let i2 = fromIndex; i2 < flattened.length; i2++) {
@@ -67459,6 +67752,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67459
67752
  },
67460
67753
  addPmPlugins() {
67461
67754
  const { view, helpers: helpers2 } = this.editor;
67755
+ const mergeRanges2 = (ranges) => {
67756
+ if (ranges.length === 0) return [];
67757
+ const sorted = ranges.slice().sort((a2, b2) => a2[0] - b2[0]);
67758
+ const merged = [sorted[0]];
67759
+ for (let i2 = 1; i2 < sorted.length; i2++) {
67760
+ const [start2, end2] = sorted[i2];
67761
+ const last = merged[merged.length - 1];
67762
+ if (start2 <= last[1]) {
67763
+ last[1] = Math.max(last[1], end2);
67764
+ } else {
67765
+ merged.push([start2, end2]);
67766
+ }
67767
+ }
67768
+ return merged;
67769
+ };
67462
67770
  const tabPlugin = new Plugin({
67463
67771
  name: "tabPlugin",
67464
67772
  key: new PluginKey("tabPlugin"),
@@ -67469,43 +67777,56 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67469
67777
  apply(tr, { decorations }, _oldState, newState) {
67470
67778
  if (!decorations) {
67471
67779
  decorations = DecorationSet.create(newState.doc, getTabDecorations(newState.doc, view, helpers2));
67780
+ return { decorations };
67472
67781
  }
67473
- if (!tr.docChanged || tr.getMeta("blockNodeInitialUpdate") === true) {
67782
+ if (!tr.docChanged || tr.getMeta("blockNodeInitialUpdate")) {
67474
67783
  return { decorations };
67475
67784
  }
67476
67785
  decorations = decorations.map(tr.mapping, tr.doc);
67477
- let rangesToRecalculate = [];
67786
+ const rangesToRecalculate = [];
67787
+ const containsTab = (node2) => node2.type.name === "tab";
67478
67788
  tr.steps.forEach((step, index2) => {
67479
- const stepMap = step.getMap();
67480
- if (step instanceof ReplaceStep || step instanceof ReplaceAroundStep$1) {
67481
- const $from = tr.docs[index2].resolve(step.from);
67482
- const $to = tr.docs[index2].resolve(step.to);
67483
- const start2 = $from.start(Math.min($from.depth, 1));
67484
- const end2 = $to.end(Math.min($to.depth, 1));
67485
- let addRange2 = false;
67486
- tr.docs[index2].nodesBetween(start2, end2, (node2) => {
67487
- if (node2.type.name === "tab") {
67488
- addRange2 = true;
67789
+ if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep$1)) {
67790
+ return;
67791
+ }
67792
+ let hasTabInRange = false;
67793
+ if (step.slice?.content) {
67794
+ step.slice.content.descendants((node2) => {
67795
+ if (containsTab(node2)) {
67796
+ hasTabInRange = true;
67797
+ return false;
67489
67798
  }
67490
67799
  });
67491
- if (!addRange2 && step.slice?.content) {
67492
- step.slice.content.descendants((node2) => {
67493
- if (node2.type.name === "tab") {
67494
- addRange2 = true;
67495
- }
67496
- });
67497
- }
67498
- if (addRange2) {
67499
- rangesToRecalculate.push([start2, end2]);
67500
- }
67501
67800
  }
67502
- rangesToRecalculate = rangesToRecalculate.map(([from2, to]) => {
67503
- const mappedFrom = stepMap.map(from2, -1);
67504
- const mappedTo = stepMap.map(to, 1);
67505
- return [mappedFrom, mappedTo];
67506
- });
67801
+ if (!hasTabInRange) {
67802
+ tr.docs[index2].nodesBetween(step.from, step.to, (node2) => {
67803
+ if (containsTab(node2)) {
67804
+ hasTabInRange = true;
67805
+ return false;
67806
+ }
67807
+ });
67808
+ }
67809
+ if (!hasTabInRange) {
67810
+ return;
67811
+ }
67812
+ let fromPos = step.from;
67813
+ let toPos = step.to;
67814
+ for (let i2 = index2; i2 < tr.steps.length; i2++) {
67815
+ const stepMap = tr.steps[i2].getMap();
67816
+ fromPos = stepMap.map(fromPos, -1);
67817
+ toPos = stepMap.map(toPos, 1);
67818
+ }
67819
+ const $from = newState.doc.resolve(fromPos);
67820
+ const $to = newState.doc.resolve(toPos);
67821
+ const start2 = $from.start(Math.min($from.depth, 1));
67822
+ const end2 = $to.end(Math.min($to.depth, 1));
67823
+ rangesToRecalculate.push([start2, end2]);
67507
67824
  });
67508
- rangesToRecalculate.forEach(([start2, end2]) => {
67825
+ if (rangesToRecalculate.length === 0) {
67826
+ return { decorations };
67827
+ }
67828
+ const mergedRanges = mergeRanges2(rangesToRecalculate);
67829
+ mergedRanges.forEach(([start2, end2]) => {
67509
67830
  const oldDecorations = decorations.find(start2, end2);
67510
67831
  decorations = decorations.remove(oldDecorations);
67511
67832
  const newDecorations = getTabDecorations(newState.doc, view, helpers2, start2, end2);
@@ -71407,6 +71728,29 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71407
71728
  content: content2
71408
71729
  };
71409
71730
  };
71731
+ const mergeRanges = (ranges) => {
71732
+ if (ranges.length === 0) return [];
71733
+ const sorted = [...ranges].sort((a2, b2) => a2[0] - b2[0]).map((range2) => [...range2]);
71734
+ const merged = [sorted[0]];
71735
+ for (let i2 = 1; i2 < sorted.length; i2++) {
71736
+ const current = sorted[i2];
71737
+ const lastMerged = merged[merged.length - 1];
71738
+ if (current[0] <= lastMerged[1]) {
71739
+ lastMerged[1] = Math.max(lastMerged[1], current[1]);
71740
+ } else {
71741
+ merged.push(current);
71742
+ }
71743
+ }
71744
+ return merged;
71745
+ };
71746
+ const clampRange = (start2, end2, docSize) => {
71747
+ const safeStart = Math.max(0, Math.min(start2, docSize));
71748
+ const safeEnd = Math.max(0, Math.min(end2, docSize));
71749
+ if (safeStart >= safeEnd) {
71750
+ return null;
71751
+ }
71752
+ return [safeStart, safeEnd];
71753
+ };
71410
71754
  const FieldAnnotationPlugin = (options = {}) => {
71411
71755
  let { editor, annotationClass: annotationClass2 } = options;
71412
71756
  return new Plugin({
@@ -71481,24 +71825,104 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71481
71825
  },
71482
71826
  /// For y-prosemirror support.
71483
71827
  appendTransaction: (transactions, oldState, newState) => {
71484
- let docChanges = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
71828
+ const docChanges = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
71485
71829
  if (!docChanges) {
71486
71830
  return;
71487
71831
  }
71488
- let { tr } = newState;
71489
- let changed = false;
71490
- let annotations = getAllFieldAnnotations(newState);
71491
- if (!annotations.length) {
71492
- return;
71832
+ const affectedRanges = [];
71833
+ let hasFieldAnnotationsInSlice = false;
71834
+ let hasSteps = false;
71835
+ transactions.forEach((transaction) => {
71836
+ if (!transaction.steps) return;
71837
+ hasSteps = true;
71838
+ transaction.steps.forEach((step) => {
71839
+ if (step.slice?.content) {
71840
+ step.slice.content.descendants((node2) => {
71841
+ if (node2.type.name === "fieldAnnotation") {
71842
+ hasFieldAnnotationsInSlice = true;
71843
+ return false;
71844
+ }
71845
+ });
71846
+ }
71847
+ if (typeof step.from === "number" && typeof step.to === "number") {
71848
+ const from2 = step.from;
71849
+ const to = step.from === step.to && step.slice?.size ? step.from + step.slice.size : step.to;
71850
+ affectedRanges.push([from2, to]);
71851
+ }
71852
+ });
71853
+ });
71854
+ if (hasSteps && !hasFieldAnnotationsInSlice && affectedRanges.length > 0) {
71855
+ const mergedRanges = mergeRanges(affectedRanges);
71856
+ let hasExistingAnnotations = false;
71857
+ for (const [start2, end2] of mergedRanges) {
71858
+ const clampedRange = clampRange(start2, end2, newState.doc.content.size);
71859
+ if (!clampedRange) continue;
71860
+ const [validStart, validEnd] = clampedRange;
71861
+ try {
71862
+ newState.doc.nodesBetween(validStart, validEnd, (node2) => {
71863
+ if (node2.type.name === "fieldAnnotation") {
71864
+ hasExistingAnnotations = true;
71865
+ return false;
71866
+ }
71867
+ });
71868
+ } catch (error) {
71869
+ console.warn("FieldAnnotationPlugin: range check failed, assuming annotations exist", error);
71870
+ hasExistingAnnotations = true;
71871
+ break;
71872
+ }
71873
+ if (hasExistingAnnotations) break;
71874
+ }
71875
+ if (!hasExistingAnnotations) {
71876
+ return;
71877
+ }
71493
71878
  }
71494
- annotations.forEach(({ node: node2, pos }) => {
71495
- let { marks } = node2;
71496
- let currentNode = tr.doc.nodeAt(pos);
71879
+ const { tr } = newState;
71880
+ let changed = false;
71881
+ const removeMarksFromAnnotation = (node2, pos) => {
71882
+ const { marks } = node2;
71883
+ const currentNode = tr.doc.nodeAt(pos);
71497
71884
  if (marks.length > 0 && node2.eq(currentNode)) {
71498
71885
  tr.removeMark(pos, pos + node2.nodeSize, null);
71499
71886
  changed = true;
71500
71887
  }
71501
- });
71888
+ };
71889
+ if (affectedRanges.length > 0) {
71890
+ const mergedRanges = mergeRanges(affectedRanges);
71891
+ let shouldFallbackToFullScan = false;
71892
+ for (const [start2, end2] of mergedRanges) {
71893
+ const clampedRange = clampRange(start2, end2, newState.doc.content.size);
71894
+ if (!clampedRange) continue;
71895
+ const [validStart, validEnd] = clampedRange;
71896
+ try {
71897
+ newState.doc.nodesBetween(validStart, validEnd, (node2, pos) => {
71898
+ if (node2.type.name === "fieldAnnotation") {
71899
+ removeMarksFromAnnotation(node2, pos);
71900
+ }
71901
+ });
71902
+ } catch (error) {
71903
+ console.warn("FieldAnnotationPlugin: nodesBetween failed, falling back to full scan", error);
71904
+ shouldFallbackToFullScan = true;
71905
+ break;
71906
+ }
71907
+ }
71908
+ if (shouldFallbackToFullScan) {
71909
+ const annotations = getAllFieldAnnotations(newState);
71910
+ if (!annotations.length) {
71911
+ return changed ? tr : null;
71912
+ }
71913
+ annotations.forEach(({ node: node2, pos }) => {
71914
+ removeMarksFromAnnotation(node2, pos);
71915
+ });
71916
+ }
71917
+ } else {
71918
+ const annotations = getAllFieldAnnotations(newState);
71919
+ if (!annotations.length) {
71920
+ return;
71921
+ }
71922
+ annotations.forEach(({ node: node2, pos }) => {
71923
+ removeMarksFromAnnotation(node2, pos);
71924
+ });
71925
+ }
71502
71926
  return changed ? tr : null;
71503
71927
  }
71504
71928
  ///
@@ -71542,17 +71966,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71542
71966
  const reducedHexMatch = reducedHexRegex.exec(normalizedColor);
71543
71967
  if (reducedHexMatch) {
71544
71968
  const arr = Array.from(reducedHexMatch).slice(1);
71545
- return [...arr.slice(0, 3).map((x2) => parseInt(r$1(x2, 2), 16)), parseInt(r$1(arr[3] || "f", 2), 16) / 255];
71969
+ return [...arr.slice(0, 3).map((x) => parseInt(r$1(x, 2), 16)), parseInt(r$1(arr[3] || "f", 2), 16) / 255];
71546
71970
  }
71547
71971
  const hexMatch = hexRegex$2.exec(normalizedColor);
71548
71972
  if (hexMatch) {
71549
71973
  const arr = Array.from(hexMatch).slice(1);
71550
- return [...arr.slice(0, 3).map((x2) => parseInt(x2, 16)), parseInt(arr[3] || "ff", 16) / 255];
71974
+ return [...arr.slice(0, 3).map((x) => parseInt(x, 16)), parseInt(arr[3] || "ff", 16) / 255];
71551
71975
  }
71552
71976
  const rgbaMatch = rgbaRegex$2.exec(normalizedColor);
71553
71977
  if (rgbaMatch) {
71554
71978
  const arr = Array.from(rgbaMatch).slice(1);
71555
- return [...arr.slice(0, 3).map((x2) => parseInt(x2, 10)), parseFloat(arr[3] || "1")];
71979
+ return [...arr.slice(0, 3).map((x) => parseInt(x, 10)), parseFloat(arr[3] || "1")];
71556
71980
  }
71557
71981
  const hslaMatch = hslaRegex$2.exec(normalizedColor);
71558
71982
  if (hslaMatch) {
@@ -71571,7 +71995,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71571
71995
  }
71572
71996
  return (hash2 >>> 0) % 2341;
71573
71997
  }
71574
- const colorToInt = (x2) => parseInt(x2.replace(/_/g, ""), 36);
71998
+ const colorToInt = (x) => parseInt(x.replace(/_/g, ""), 36);
71575
71999
  const compressedColorMap = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((acc, next2) => {
71576
72000
  const key2 = colorToInt(next2.substring(0, 3));
71577
72001
  const hex2 = colorToInt(next2.substring(3)).toString(16);
@@ -71635,8 +72059,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71635
72059
  };
71636
72060
  function toHex(color2) {
71637
72061
  const [r2, g, b2, a2] = parseToRgba(color2);
71638
- let hex2 = (x2) => {
71639
- const h2 = guard(0, 255, x2).toString(16);
72062
+ let hex2 = (x) => {
72063
+ const h2 = guard(0, 255, x).toString(16);
71640
72064
  return h2.length === 1 ? `0${h2}` : h2;
71641
72065
  };
71642
72066
  return `#${hex2(r2)}${hex2(g)}${hex2(b2)}${a2 < 1 ? hex2(Math.round(a2 * 255)) : ""}`;
@@ -73308,7 +73732,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73308
73732
  }
73309
73733
  });
73310
73734
  };
73735
+ const stepHasSlice = (step) => "slice" in step && Boolean(step.slice);
73311
73736
  const ImagePositionPluginKey = new PluginKey("ImagePosition");
73737
+ const pageBreakPositionCache = /* @__PURE__ */ new WeakMap();
73312
73738
  const ImagePositionPlugin = ({ editor }) => {
73313
73739
  const { view } = editor;
73314
73740
  let shouldUpdate = false;
@@ -73321,6 +73747,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73321
73747
  },
73322
73748
  apply(tr, oldDecorationSet, oldState, newState) {
73323
73749
  if (!tr.docChanged && !shouldUpdate) return oldDecorationSet;
73750
+ let affectsImages = false;
73751
+ tr.steps.forEach((step) => {
73752
+ if (stepHasSlice(step)) {
73753
+ step.slice.content.descendants((node2) => {
73754
+ if (node2.type.name === "image" || node2.attrs?.anchorData) {
73755
+ affectsImages = true;
73756
+ return false;
73757
+ }
73758
+ });
73759
+ }
73760
+ });
73761
+ if (!affectsImages && !shouldUpdate) {
73762
+ return oldDecorationSet.map(tr.mapping, tr.doc);
73763
+ }
73324
73764
  const decorations = getImagePositionDecorations(newState, view);
73325
73765
  shouldUpdate = false;
73326
73766
  return DecorationSet.create(newState.doc, decorations);
@@ -73350,6 +73790,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73350
73790
  };
73351
73791
  const getImagePositionDecorations = (state2, view) => {
73352
73792
  let decorations = [];
73793
+ let hasAnchoredImages = false;
73794
+ state2.doc.descendants((node2) => {
73795
+ if (node2.attrs?.anchorData) {
73796
+ hasAnchoredImages = true;
73797
+ return false;
73798
+ }
73799
+ });
73800
+ if (!hasAnchoredImages) {
73801
+ return decorations;
73802
+ }
73353
73803
  state2.doc.descendants((node2, pos) => {
73354
73804
  if (node2.attrs.anchorData) {
73355
73805
  let style2 = "";
@@ -73358,7 +73808,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73358
73808
  const { size: size2, padding } = node2.attrs;
73359
73809
  const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
73360
73810
  if (pageBreak && vRelativeFrom === "margin" && alignH) {
73361
- const topPos = pageBreak?.offsetTop + pageBreak?.offsetHeight;
73811
+ let pageBreakPos = pageBreakPositionCache.get(pageBreak);
73812
+ if (!pageBreakPos) {
73813
+ pageBreakPos = {
73814
+ top: pageBreak.offsetTop,
73815
+ height: pageBreak.offsetHeight
73816
+ };
73817
+ pageBreakPositionCache.set(pageBreak, pageBreakPos);
73818
+ }
73819
+ const topPos = pageBreakPos.top + pageBreakPos.height;
73362
73820
  let horizontalAlignment = `${alignH}: 0;`;
73363
73821
  if (alignH === "center") horizontalAlignment = "left: 50%; transform: translateX(-50%);";
73364
73822
  style2 += vRelativeFrom === "margin" ? `position: absolute; top: ${topPos}px; ${horizontalAlignment}` : "";
@@ -73669,15 +74127,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73669
74127
  style2 += "float: right;";
73670
74128
  floatRight = true;
73671
74129
  } else if (["largest", "bothSides"].includes(attrs.wrapText)) {
73672
- const pageStylesData2 = getDataFromPageStyles({
74130
+ const pageStylesData = getDataFromPageStyles({
73673
74131
  editor: this.editor,
73674
74132
  marginOffset,
73675
74133
  size: size2,
73676
74134
  attrs
73677
74135
  });
73678
- style2 += pageStylesData2.style;
73679
- floatRight = pageStylesData2.floatRight;
73680
- baseHorizontal = pageStylesData2.baseHorizontal;
74136
+ style2 += pageStylesData.style;
74137
+ floatRight = pageStylesData.floatRight;
74138
+ baseHorizontal = pageStylesData.baseHorizontal;
73681
74139
  }
73682
74140
  if (attrs.distTop) margin.top += attrs.distTop;
73683
74141
  if (attrs.distBottom) margin.bottom += attrs.distBottom;
@@ -73685,7 +74143,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73685
74143
  if (attrs.distRight) margin.right += attrs.distRight;
73686
74144
  break;
73687
74145
  case "Through":
73688
- case "Tight":
74146
+ case "Tight": {
73689
74147
  style2 += "clear: both;";
73690
74148
  const pageStylesData = getDataFromPageStyles({
73691
74149
  editor: this.editor,
@@ -73706,10 +74164,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73706
74164
  let minX = 0;
73707
74165
  let minY = 0;
73708
74166
  let maxY = 0;
73709
- attrs.polygon.forEach(([x2, y2]) => {
73710
- if (floatRight && x2 < horizontalOffset) horizontalOffset = x2;
73711
- if (x2 > maxX) maxX = x2;
73712
- if (x2 < minX) minX = x2;
74167
+ attrs.polygon.forEach(([x, y2]) => {
74168
+ if (floatRight && x < horizontalOffset) horizontalOffset = x;
74169
+ if (x > maxX) maxX = x;
74170
+ if (x < minX) minX = x;
73713
74171
  if (y2 > maxY) maxY = y2;
73714
74172
  if (y2 < minY) minY = y2;
73715
74173
  });
@@ -73718,15 +74176,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73718
74176
  const scaleWidth = Math.min(1, size2.width / originalWidth);
73719
74177
  const scaleHeight = Math.min(1, size2.height / originalHeight);
73720
74178
  const verticalOffset = Math.max(0, marginOffset.top);
73721
- const points = attrs.polygon.map(([x2, y2]) => `${horizontalOffset + x2 * scaleWidth}px ${verticalOffset + y2 * scaleHeight}px`).join(", ");
74179
+ const points = attrs.polygon.map(([x, y2]) => `${horizontalOffset + x * scaleWidth}px ${verticalOffset + y2 * scaleHeight}px`).join(", ");
73722
74180
  style2 += `shape-outside: polygon(${points});`;
73723
74181
  }
73724
74182
  break;
74183
+ }
73725
74184
  case "TopAndBottom":
73726
74185
  style2 += "display: block; clear: both;";
74186
+ if (!anchorData) {
74187
+ centered = true;
74188
+ }
73727
74189
  if (attrs.distTop) margin.top += attrs.distTop;
73728
74190
  if (attrs.distBottom) margin.bottom += attrs.distBottom;
73729
- centered = true;
73730
74191
  break;
73731
74192
  }
73732
74193
  }
@@ -73746,6 +74207,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73746
74207
  style2 += `position: absolute; ${anchorData.alignH}: 0;`;
73747
74208
  }
73748
74209
  break;
74210
+ case "column":
74211
+ if (anchorData.alignH === "center") {
74212
+ centered = true;
74213
+ } else if (anchorData.alignH === "right") {
74214
+ floatRight = true;
74215
+ if (!style2.includes("float: right;")) {
74216
+ style2 += "float: right;";
74217
+ }
74218
+ } else if (anchorData.alignH === "left") {
74219
+ if (!style2.includes("float: left;")) {
74220
+ style2 += "float: left;";
74221
+ }
74222
+ }
74223
+ break;
73749
74224
  }
73750
74225
  }
73751
74226
  if (hasAnchorData || hasMarginOffsets) {
@@ -74833,11 +75308,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
74833
75308
  },
74834
75309
  addPmPlugins() {
74835
75310
  let hasInitialized = false;
75311
+ const assignBlockId = (tr, node2, pos) => {
75312
+ tr.setNodeMarkup(
75313
+ pos,
75314
+ void 0,
75315
+ {
75316
+ ...node2.attrs,
75317
+ sdBlockId: v4$1()
75318
+ },
75319
+ node2.marks
75320
+ );
75321
+ };
74836
75322
  return [
74837
75323
  new Plugin({
74838
75324
  key: BlockNodePluginKey,
74839
75325
  appendTransaction: (transactions, oldState, newState) => {
74840
- let docChanges = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
75326
+ const docChanges = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
74841
75327
  if (hasInitialized && !docChanges) {
74842
75328
  return;
74843
75329
  }
@@ -74846,21 +75332,87 @@ Please report this to https://github.com/markedjs/marked.`, e) {
74846
75332
  }
74847
75333
  const { tr } = newState;
74848
75334
  let changed = false;
74849
- newState.doc.descendants((node2, pos) => {
74850
- if (!nodeAllowsSdBlockIdAttr(node2) || !nodeNeedsSdBlockId(node2)) {
74851
- return;
75335
+ if (!hasInitialized) {
75336
+ newState.doc.descendants((node2, pos) => {
75337
+ if (nodeAllowsSdBlockIdAttr(node2) && nodeNeedsSdBlockId(node2)) {
75338
+ assignBlockId(tr, node2, pos);
75339
+ changed = true;
75340
+ }
75341
+ });
75342
+ } else {
75343
+ const rangesToCheck = [];
75344
+ let shouldFallbackToFullTraversal = false;
75345
+ transactions.forEach((transaction, txIndex) => {
75346
+ transaction.steps.forEach((step, stepIndex) => {
75347
+ if (!(step instanceof ReplaceStep)) return;
75348
+ const hasNewBlockNodes = step.slice?.content?.content?.some((node2) => nodeAllowsSdBlockIdAttr(node2));
75349
+ if (!hasNewBlockNodes) return;
75350
+ const stepMap = step.getMap();
75351
+ stepMap.forEach((_oldStart, _oldEnd, newStart, newEnd) => {
75352
+ if (newEnd <= newStart) {
75353
+ if (process$1$1.env.NODE_ENV === "development") {
75354
+ console.debug("Block node: invalid range in step map, falling back to full traversal");
75355
+ }
75356
+ shouldFallbackToFullTraversal = true;
75357
+ return;
75358
+ }
75359
+ let rangeStart = newStart;
75360
+ let rangeEnd = newEnd;
75361
+ for (let i2 = stepIndex + 1; i2 < transaction.steps.length; i2++) {
75362
+ const laterStepMap = transaction.steps[i2].getMap();
75363
+ rangeStart = laterStepMap.map(rangeStart, -1);
75364
+ rangeEnd = laterStepMap.map(rangeEnd, 1);
75365
+ }
75366
+ for (let i2 = txIndex + 1; i2 < transactions.length; i2++) {
75367
+ const laterTx = transactions[i2];
75368
+ rangeStart = laterTx.mapping.map(rangeStart, -1);
75369
+ rangeEnd = laterTx.mapping.map(rangeEnd, 1);
75370
+ }
75371
+ if (rangeEnd <= rangeStart) {
75372
+ if (process$1$1.env.NODE_ENV === "development") {
75373
+ console.debug("Block node: invalid range after mapping, falling back to full traversal");
75374
+ }
75375
+ shouldFallbackToFullTraversal = true;
75376
+ return;
75377
+ }
75378
+ rangesToCheck.push([rangeStart, rangeEnd]);
75379
+ });
75380
+ });
75381
+ });
75382
+ const mergedRanges = mergeRanges(rangesToCheck);
75383
+ for (const [start2, end2] of mergedRanges) {
75384
+ const docSize = newState.doc.content.size;
75385
+ const clampedRange = clampRange(start2, end2, docSize);
75386
+ if (!clampedRange) {
75387
+ if (process$1$1.env.NODE_ENV === "development") {
75388
+ console.debug("Block node: invalid range after clamping, falling back to full traversal");
75389
+ }
75390
+ shouldFallbackToFullTraversal = true;
75391
+ break;
75392
+ }
75393
+ const [safeStart, safeEnd] = clampedRange;
75394
+ try {
75395
+ newState.doc.nodesBetween(safeStart, safeEnd, (node2, pos) => {
75396
+ if (nodeAllowsSdBlockIdAttr(node2) && nodeNeedsSdBlockId(node2)) {
75397
+ assignBlockId(tr, node2, pos);
75398
+ changed = true;
75399
+ }
75400
+ });
75401
+ } catch (error) {
75402
+ console.warn("Block node plugin: nodesBetween failed, falling back to full traversal", error);
75403
+ shouldFallbackToFullTraversal = true;
75404
+ break;
75405
+ }
74852
75406
  }
74853
- tr.setNodeMarkup(
74854
- pos,
74855
- void 0,
74856
- {
74857
- ...node2.attrs,
74858
- sdBlockId: v4$1()
74859
- },
74860
- node2.marks
74861
- );
74862
- changed = true;
74863
- });
75407
+ if (shouldFallbackToFullTraversal) {
75408
+ newState.doc.descendants((node2, pos) => {
75409
+ if (nodeAllowsSdBlockIdAttr(node2) && nodeNeedsSdBlockId(node2)) {
75410
+ assignBlockId(tr, node2, pos);
75411
+ changed = true;
75412
+ }
75413
+ });
75414
+ }
75415
+ }
74864
75416
  if (changed && !hasInitialized) {
74865
75417
  hasInitialized = true;
74866
75418
  tr.setMeta("blockNodeInitialUpdate", true);
@@ -78758,7 +79310,7 @@ ${l}
78758
79310
  }
78759
79311
  var _ref = isElement$2$1(element2) ? getWindow$1(element2) : window, visualViewport = _ref.visualViewport;
78760
79312
  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
78761
- var x2 = (clientRect2.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
79313
+ var x = (clientRect2.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
78762
79314
  var y2 = (clientRect2.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
78763
79315
  var width = clientRect2.width / scaleX;
78764
79316
  var height = clientRect2.height / scaleY;
@@ -78766,10 +79318,10 @@ ${l}
78766
79318
  width,
78767
79319
  height,
78768
79320
  top: y2,
78769
- right: x2 + width,
79321
+ right: x + width,
78770
79322
  bottom: y2 + height,
78771
- left: x2,
78772
- x: x2,
79323
+ left: x,
79324
+ x,
78773
79325
  y: y2
78774
79326
  };
78775
79327
  }
@@ -78970,25 +79522,25 @@ ${l}
78970
79522
  left: "auto"
78971
79523
  };
78972
79524
  function roundOffsetsByDPR(_ref, win) {
78973
- var x2 = _ref.x, y2 = _ref.y;
79525
+ var x = _ref.x, y2 = _ref.y;
78974
79526
  var dpr = win.devicePixelRatio || 1;
78975
79527
  return {
78976
- x: round$1(x2 * dpr) / dpr || 0,
79528
+ x: round$1(x * dpr) / dpr || 0,
78977
79529
  y: round$1(y2 * dpr) / dpr || 0
78978
79530
  };
78979
79531
  }
78980
79532
  function mapToStyles(_ref2) {
78981
79533
  var _Object$assign2;
78982
79534
  var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position2 = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
78983
- var _offsets$x = offsets.x, x2 = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y2 = _offsets$y === void 0 ? 0 : _offsets$y;
79535
+ var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y2 = _offsets$y === void 0 ? 0 : _offsets$y;
78984
79536
  var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
78985
- x: x2,
79537
+ x,
78986
79538
  y: y2
78987
79539
  }) : {
78988
- x: x2,
79540
+ x,
78989
79541
  y: y2
78990
79542
  };
78991
- x2 = _ref3.x;
79543
+ x = _ref3.x;
78992
79544
  y2 = _ref3.y;
78993
79545
  var hasX = offsets.hasOwnProperty("x");
78994
79546
  var hasY = offsets.hasOwnProperty("y");
@@ -79022,27 +79574,27 @@ ${l}
79022
79574
  // $FlowFixMe[prop-missing]
79023
79575
  offsetParent[widthProp]
79024
79576
  );
79025
- x2 -= offsetX - popperRect.width;
79026
- x2 *= gpuAcceleration ? 1 : -1;
79577
+ x -= offsetX - popperRect.width;
79578
+ x *= gpuAcceleration ? 1 : -1;
79027
79579
  }
79028
79580
  }
79029
79581
  var commonStyles = Object.assign({
79030
79582
  position: position2
79031
79583
  }, adaptive && unsetSides);
79032
79584
  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
79033
- x: x2,
79585
+ x,
79034
79586
  y: y2
79035
79587
  }, getWindow$1(popper2)) : {
79036
- x: x2,
79588
+ x,
79037
79589
  y: y2
79038
79590
  };
79039
- x2 = _ref4.x;
79591
+ x = _ref4.x;
79040
79592
  y2 = _ref4.y;
79041
79593
  if (gpuAcceleration) {
79042
79594
  var _Object$assign;
79043
- return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x2 + "px, " + y2 + "px)" : "translate3d(" + x2 + "px, " + y2 + "px, 0)", _Object$assign));
79595
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y2 + "px)" : "translate3d(" + x + "px, " + y2 + "px, 0)", _Object$assign));
79044
79596
  }
79045
- return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y2 + "px" : "", _Object$assign2[sideX] = hasX ? x2 + "px" : "", _Object$assign2.transform = "", _Object$assign2));
79597
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y2 + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
79046
79598
  }
79047
79599
  function computeStyles(_ref5) {
79048
79600
  var state2 = _ref5.state, options = _ref5.options;
@@ -79156,21 +79708,21 @@ ${l}
79156
79708
  var visualViewport = win.visualViewport;
79157
79709
  var width = html2.clientWidth;
79158
79710
  var height = html2.clientHeight;
79159
- var x2 = 0;
79711
+ var x = 0;
79160
79712
  var y2 = 0;
79161
79713
  if (visualViewport) {
79162
79714
  width = visualViewport.width;
79163
79715
  height = visualViewport.height;
79164
79716
  var layoutViewport = isLayoutViewport();
79165
79717
  if (layoutViewport || !layoutViewport && strategy === "fixed") {
79166
- x2 = visualViewport.offsetLeft;
79718
+ x = visualViewport.offsetLeft;
79167
79719
  y2 = visualViewport.offsetTop;
79168
79720
  }
79169
79721
  }
79170
79722
  return {
79171
79723
  width,
79172
79724
  height,
79173
- x: x2 + getWindowScrollBarX$1(element2),
79725
+ x: x + getWindowScrollBarX$1(element2),
79174
79726
  y: y2
79175
79727
  };
79176
79728
  }
@@ -79181,15 +79733,15 @@ ${l}
79181
79733
  var body = (_element$ownerDocumen = element2.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
79182
79734
  var width = max$1(html2.scrollWidth, html2.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
79183
79735
  var height = max$1(html2.scrollHeight, html2.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
79184
- var x2 = -winScroll.scrollLeft + getWindowScrollBarX$1(element2);
79736
+ var x = -winScroll.scrollLeft + getWindowScrollBarX$1(element2);
79185
79737
  var y2 = -winScroll.scrollTop;
79186
79738
  if (getComputedStyle$2(body || html2).direction === "rtl") {
79187
- x2 += max$1(html2.clientWidth, body ? body.clientWidth : 0) - width;
79739
+ x += max$1(html2.clientWidth, body ? body.clientWidth : 0) - width;
79188
79740
  }
79189
79741
  return {
79190
79742
  width,
79191
79743
  height,
79192
- x: x2,
79744
+ x,
79193
79745
  y: y2
79194
79746
  };
79195
79747
  }
@@ -79566,9 +80118,9 @@ ${l}
79566
80118
  acc[placement] = distanceAndSkiddingToXY(placement, state2.rects, offset2);
79567
80119
  return acc;
79568
80120
  }, {});
79569
- var _data$state$placement = data[state2.placement], x2 = _data$state$placement.x, y2 = _data$state$placement.y;
80121
+ var _data$state$placement = data[state2.placement], x = _data$state$placement.x, y2 = _data$state$placement.y;
79570
80122
  if (state2.modifiersData.popperOffsets != null) {
79571
- state2.modifiersData.popperOffsets.x += x2;
80123
+ state2.modifiersData.popperOffsets.x += x;
79572
80124
  state2.modifiersData.popperOffsets.y += y2;
79573
80125
  }
79574
80126
  state2.modifiersData[name] = data;
@@ -81336,8 +81888,8 @@ ${l}
81336
81888
  return {};
81337
81889
  },
81338
81890
  apply: (tr, value) => {
81339
- let newValue = { ...value };
81340
- if (tr.docChanged) {
81891
+ const newValue = { ...value };
81892
+ if (tr.docChanged || tr.selectionSet) {
81341
81893
  newValue.shouldUpdate = true;
81342
81894
  } else {
81343
81895
  newValue.shouldUpdate = false;
@@ -81375,6 +81927,7 @@ ${l}
81375
81927
  this.view = view;
81376
81928
  this.popover = document.createElement("div");
81377
81929
  this.popover.className = "sd-editor-popover";
81930
+ applyStyleIsolationClass(this.popover);
81378
81931
  document.body.appendChild(this.popover);
81379
81932
  this.tippyInstance = tippy(this.popover, {
81380
81933
  trigger: "manual",
@@ -81518,7 +82071,7 @@ ${l}
81518
82071
  }
81519
82072
  function rectToClientRect(rect) {
81520
82073
  const {
81521
- x: x2,
82074
+ x,
81522
82075
  y: y2,
81523
82076
  width,
81524
82077
  height
@@ -81527,10 +82080,10 @@ ${l}
81527
82080
  width,
81528
82081
  height,
81529
82082
  top: y2,
81530
- left: x2,
81531
- right: x2 + width,
82083
+ left: x,
82084
+ right: x + width,
81532
82085
  bottom: y2 + height,
81533
- x: x2,
82086
+ x,
81534
82087
  y: y2
81535
82088
  };
81536
82089
  }
@@ -81604,7 +82157,7 @@ ${l}
81604
82157
  strategy
81605
82158
  });
81606
82159
  let {
81607
- x: x2,
82160
+ x,
81608
82161
  y: y2
81609
82162
  } = computeCoordsFromPlacement(rects, placement, rtl);
81610
82163
  let statefulPlacement = placement;
@@ -81621,7 +82174,7 @@ ${l}
81621
82174
  data,
81622
82175
  reset
81623
82176
  } = await fn2({
81624
- x: x2,
82177
+ x,
81625
82178
  y: y2,
81626
82179
  initialPlacement: placement,
81627
82180
  placement: statefulPlacement,
@@ -81634,7 +82187,7 @@ ${l}
81634
82187
  floating
81635
82188
  }
81636
82189
  });
81637
- x2 = nextX != null ? nextX : x2;
82190
+ x = nextX != null ? nextX : x;
81638
82191
  y2 = nextY != null ? nextY : y2;
81639
82192
  middlewareData = {
81640
82193
  ...middlewareData,
@@ -81657,7 +82210,7 @@ ${l}
81657
82210
  }) : reset.rects;
81658
82211
  }
81659
82212
  ({
81660
- x: x2,
82213
+ x,
81661
82214
  y: y2
81662
82215
  } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
81663
82216
  }
@@ -81665,7 +82218,7 @@ ${l}
81665
82218
  }
81666
82219
  }
81667
82220
  return {
81668
- x: x2,
82221
+ x,
81669
82222
  y: y2,
81670
82223
  placement: statefulPlacement,
81671
82224
  strategy,
@@ -81678,7 +82231,7 @@ ${l}
81678
82231
  options = {};
81679
82232
  }
81680
82233
  const {
81681
- x: x2,
82234
+ x,
81682
82235
  y: y2,
81683
82236
  platform: platform2,
81684
82237
  rects,
@@ -81702,7 +82255,7 @@ ${l}
81702
82255
  strategy
81703
82256
  }));
81704
82257
  const rect = elementContext === "floating" ? {
81705
- x: x2,
82258
+ x,
81706
82259
  y: y2,
81707
82260
  width: rects.floating.width,
81708
82261
  height: rects.floating.height
@@ -81971,16 +82524,16 @@ ${l}
81971
82524
  height,
81972
82525
  $: $2
81973
82526
  } = getCssDimensions(domElement);
81974
- let x2 = ($2 ? round(rect.width) : rect.width) / width;
82527
+ let x = ($2 ? round(rect.width) : rect.width) / width;
81975
82528
  let y2 = ($2 ? round(rect.height) : rect.height) / height;
81976
- if (!x2 || !Number.isFinite(x2)) {
81977
- x2 = 1;
82529
+ if (!x || !Number.isFinite(x)) {
82530
+ x = 1;
81978
82531
  }
81979
82532
  if (!y2 || !Number.isFinite(y2)) {
81980
82533
  y2 = 1;
81981
82534
  }
81982
82535
  return {
81983
- x: x2,
82536
+ x,
81984
82537
  y: y2
81985
82538
  };
81986
82539
  }
@@ -82024,7 +82577,7 @@ ${l}
82024
82577
  }
82025
82578
  }
82026
82579
  const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
82027
- let x2 = (clientRect2.left + visualOffsets.x) / scale.x;
82580
+ let x = (clientRect2.left + visualOffsets.x) / scale.x;
82028
82581
  let y2 = (clientRect2.top + visualOffsets.y) / scale.y;
82029
82582
  let width = clientRect2.width / scale.x;
82030
82583
  let height = clientRect2.height / scale.y;
@@ -82039,11 +82592,11 @@ ${l}
82039
82592
  const css = getComputedStyle$1(currentIFrame);
82040
82593
  const left2 = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
82041
82594
  const top2 = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
82042
- x2 *= iframeScale.x;
82595
+ x *= iframeScale.x;
82043
82596
  y2 *= iframeScale.y;
82044
82597
  width *= iframeScale.x;
82045
82598
  height *= iframeScale.y;
82046
- x2 += left2;
82599
+ x += left2;
82047
82600
  y2 += top2;
82048
82601
  currentWin = getWindow(currentIFrame);
82049
82602
  currentIFrame = getFrameElement(currentWin);
@@ -82052,7 +82605,7 @@ ${l}
82052
82605
  return rectToClientRect({
82053
82606
  width,
82054
82607
  height,
82055
- x: x2,
82608
+ x,
82056
82609
  y: y2
82057
82610
  });
82058
82611
  }
@@ -82065,10 +82618,10 @@ ${l}
82065
82618
  }
82066
82619
  function getHTMLOffset(documentElement, scroll) {
82067
82620
  const htmlRect = documentElement.getBoundingClientRect();
82068
- const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
82621
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
82069
82622
  const y2 = htmlRect.top + scroll.scrollTop;
82070
82623
  return {
82071
- x: x2,
82624
+ x,
82072
82625
  y: y2
82073
82626
  };
82074
82627
  }
@@ -82120,15 +82673,15 @@ ${l}
82120
82673
  const body = element2.ownerDocument.body;
82121
82674
  const width = max$3(html2.scrollWidth, html2.clientWidth, body.scrollWidth, body.clientWidth);
82122
82675
  const height = max$3(html2.scrollHeight, html2.clientHeight, body.scrollHeight, body.clientHeight);
82123
- let x2 = -scroll.scrollLeft + getWindowScrollBarX(element2);
82676
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element2);
82124
82677
  const y2 = -scroll.scrollTop;
82125
82678
  if (getComputedStyle$1(body).direction === "rtl") {
82126
- x2 += max$3(html2.clientWidth, body.clientWidth) - width;
82679
+ x += max$3(html2.clientWidth, body.clientWidth) - width;
82127
82680
  }
82128
82681
  return {
82129
82682
  width,
82130
82683
  height,
82131
- x: x2,
82684
+ x,
82132
82685
  y: y2
82133
82686
  };
82134
82687
  }
@@ -82139,14 +82692,14 @@ ${l}
82139
82692
  const visualViewport = win.visualViewport;
82140
82693
  let width = html2.clientWidth;
82141
82694
  let height = html2.clientHeight;
82142
- let x2 = 0;
82695
+ let x = 0;
82143
82696
  let y2 = 0;
82144
82697
  if (visualViewport) {
82145
82698
  width = visualViewport.width;
82146
82699
  height = visualViewport.height;
82147
82700
  const visualViewportBased = isWebKit();
82148
82701
  if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
82149
- x2 = visualViewport.offsetLeft;
82702
+ x = visualViewport.offsetLeft;
82150
82703
  y2 = visualViewport.offsetTop;
82151
82704
  }
82152
82705
  }
@@ -82166,7 +82719,7 @@ ${l}
82166
82719
  return {
82167
82720
  width,
82168
82721
  height,
82169
- x: x2,
82722
+ x,
82170
82723
  y: y2
82171
82724
  };
82172
82725
  }
@@ -82178,12 +82731,12 @@ ${l}
82178
82731
  const scale = isHTMLElement$2(element2) ? getScale(element2) : createCoords(1);
82179
82732
  const width = element2.clientWidth * scale.x;
82180
82733
  const height = element2.clientHeight * scale.y;
82181
- const x2 = left2 * scale.x;
82734
+ const x = left2 * scale.x;
82182
82735
  const y2 = top2 * scale.y;
82183
82736
  return {
82184
82737
  width,
82185
82738
  height,
82186
- x: x2,
82739
+ x,
82187
82740
  y: y2
82188
82741
  };
82189
82742
  }
@@ -82303,10 +82856,10 @@ ${l}
82303
82856
  setLeftRTLScrollbarOffset();
82304
82857
  }
82305
82858
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
82306
- const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
82859
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
82307
82860
  const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
82308
82861
  return {
82309
- x: x2,
82862
+ x,
82310
82863
  y: y2,
82311
82864
  width: rect.width,
82312
82865
  height: rect.height
@@ -82592,6 +83145,8 @@ ${l}
82592
83145
  let shouldUpdate = false;
82593
83146
  let hasInitialized = false;
82594
83147
  let shouldInitialize = false;
83148
+ let paginationTimeout = null;
83149
+ const PAGINATION_DEBOUNCE_MS = 150;
82595
83150
  const paginationPlugin = new Plugin({
82596
83151
  key: PaginationPluginKey,
82597
83152
  state: {
@@ -82619,6 +83174,9 @@ ${l}
82619
83174
  shouldUpdate = true;
82620
83175
  shouldInitialize = meta2.isReadyToInit;
82621
83176
  }
83177
+ if (meta2 && meta2.skipPagination) {
83178
+ return { ...oldState };
83179
+ }
82622
83180
  const syncMeta = tr.getMeta("y-sync$");
82623
83181
  const listSyncMeta = tr.getMeta("orderedListSync");
82624
83182
  if (syncMeta && syncMeta.isChangeOrigin || listSyncMeta) {
@@ -82650,11 +83208,23 @@ ${l}
82650
83208
  shouldUpdate = false;
82651
83209
  return { ...oldState };
82652
83210
  }
83211
+ if (!isForceUpdate && hasInitialized && tr.docChanged) {
83212
+ let isMarkOnlyChange = true;
83213
+ tr.steps.forEach((step) => {
83214
+ if (step.jsonID !== "addMark" && step.jsonID !== "removeMark") {
83215
+ isMarkOnlyChange = false;
83216
+ }
83217
+ });
83218
+ if (isMarkOnlyChange) {
83219
+ shouldUpdate = false;
83220
+ return { ...oldState };
83221
+ }
83222
+ }
82653
83223
  shouldUpdate = true;
82654
83224
  if (isForceUpdate) shouldUpdate = true;
82655
83225
  return {
82656
83226
  ...oldState,
82657
- decorations: meta2?.decorations?.map(tr.mapping, tr.doc) || DecorationSet.empty,
83227
+ decorations: meta2?.decorations?.map(tr.mapping, tr.doc) || oldState.decorations.map(tr.mapping, tr.doc),
82658
83228
  isReadyToInit: shouldInitialize
82659
83229
  };
82660
83230
  }
@@ -82666,11 +83236,22 @@ ${l}
82666
83236
  update: (view) => {
82667
83237
  if (!PaginationPluginKey.getState(view.state)?.isEnabled) return;
82668
83238
  if (!shouldUpdate || isUpdating) return;
82669
- isUpdating = true;
82670
- hasInitialized = true;
82671
- performUpdate(editor, view, previousDecorations);
82672
- isUpdating = false;
82673
- shouldUpdate = false;
83239
+ const performPaginationUpdate = () => {
83240
+ if (!shouldUpdate) return;
83241
+ isUpdating = true;
83242
+ hasInitialized = true;
83243
+ performUpdate(editor, view, previousDecorations);
83244
+ isUpdating = false;
83245
+ shouldUpdate = false;
83246
+ };
83247
+ if (!hasInitialized) {
83248
+ performPaginationUpdate();
83249
+ return;
83250
+ }
83251
+ if (paginationTimeout) {
83252
+ clearTimeout(paginationTimeout);
83253
+ }
83254
+ paginationTimeout = setTimeout(performPaginationUpdate, PAGINATION_DEBOUNCE_MS);
82674
83255
  }
82675
83256
  };
82676
83257
  },
@@ -82763,6 +83344,7 @@ ${l}
82763
83344
  const tempContainer = editor.options.element.cloneNode();
82764
83345
  if (!tempContainer) return [];
82765
83346
  tempContainer.className = "temp-container super-editor";
83347
+ applyStyleIsolationClass(tempContainer);
82766
83348
  const HIDDEN_EDITOR_OFFSET_TOP = 0;
82767
83349
  const HIDDEN_EDITOR_OFFSET_LEFT = 0;
82768
83350
  tempContainer.style.left = HIDDEN_EDITOR_OFFSET_TOP + "px";
@@ -83140,22 +83722,22 @@ ${l}
83140
83722
  const rect = elements.reference.getBoundingClientRect();
83141
83723
  const containerRect = editorElement.getBoundingClientRect();
83142
83724
  const scaleFactor = getScaleFactor(editorElement);
83143
- const x2 = Math.round((rect.left - containerRect.left) / scaleFactor);
83725
+ const x = Math.round((rect.left - containerRect.left) / scaleFactor);
83144
83726
  const y2 = Math.round((rect.top - containerRect.top) / scaleFactor);
83145
83727
  const width = Math.round(rect.width / scaleFactor);
83146
83728
  const height = Math.round(rect.height / scaleFactor);
83147
83729
  return {
83148
- x: x2,
83730
+ x,
83149
83731
  y: y2,
83150
83732
  data: { width, height }
83151
83733
  };
83152
83734
  }
83153
83735
  }
83154
83736
  ]
83155
- }).then(({ x: x2, y: y2, middlewareData }) => {
83737
+ }).then(({ x, y: y2, middlewareData }) => {
83156
83738
  Object.assign(floatingSeparator.style, {
83157
83739
  top: `${y2}px`,
83158
- left: `${x2}px`,
83740
+ left: `${x}px`,
83159
83741
  width: `${middlewareData.copy.width}px`,
83160
83742
  height: `${middlewareData.copy.height}px`,
83161
83743
  visibility: middlewareData.hide?.referenceHidden ? "hidden" : "visible"
@@ -83811,6 +84393,7 @@ ${l}
83811
84393
  handleEl.style.pointerEvents = "auto";
83812
84394
  resizeContainer.appendChild(handleEl);
83813
84395
  }
84396
+ applyStyleIsolationClass(resizeContainer);
83814
84397
  document.body.appendChild(resizeContainer);
83815
84398
  updateHandlePositions(wrapper.firstElementChild);
83816
84399
  }
@@ -86148,14 +86731,14 @@ ${unwrappedProps}
86148
86731
  }
86149
86732
  return viewMeasurer$1.getBoundingClientRect();
86150
86733
  }
86151
- function getPointRect$1(x2, y2) {
86734
+ function getPointRect$1(x, y2) {
86152
86735
  const viewRect = ensureViewBoundingRect$1();
86153
86736
  return {
86154
86737
  top: y2,
86155
- left: x2,
86738
+ left: x,
86156
86739
  height: 0,
86157
86740
  width: 0,
86158
- right: viewRect.width - x2,
86741
+ right: viewRect.width - x,
86159
86742
  bottom: viewRect.height - y2
86160
86743
  };
86161
86744
  }
@@ -86993,8 +87576,8 @@ ${style2}
86993
87576
  if (follower === null)
86994
87577
  return;
86995
87578
  const target = VBinder.targetRef;
86996
- const { x: x2, y: y2, overlap } = props;
86997
- const targetRect = x2 !== void 0 && y2 !== void 0 ? getPointRect$1(x2, y2) : getRect$1(target);
87579
+ const { x, y: y2, overlap } = props;
87580
+ const targetRect = x !== void 0 && y2 !== void 0 ? getPointRect$1(x, y2) : getRect$1(target);
86998
87581
  follower.style.setProperty("--v-target-width", `${Math.round(targetRect.width)}px`);
86999
87582
  follower.style.setProperty("--v-target-height", `${Math.round(targetRect.height)}px`);
87000
87583
  const { width, minWidth, placement, internalShift, flip: flip2 } = props;
@@ -87164,8 +87747,8 @@ ${style2}
87164
87747
  return ResizeObserverSize2;
87165
87748
  })();
87166
87749
  var DOMRectReadOnly$1 = (function() {
87167
- function DOMRectReadOnly2(x2, y2, width, height) {
87168
- this.x = x2;
87750
+ function DOMRectReadOnly2(x, y2, width, height) {
87751
+ this.x = x;
87169
87752
  this.y = y2;
87170
87753
  this.width = width;
87171
87754
  this.height = height;
@@ -87176,8 +87759,8 @@ ${style2}
87176
87759
  return freeze$1(this);
87177
87760
  }
87178
87761
  DOMRectReadOnly2.prototype.toJSON = function() {
87179
- var _a2 = this, x2 = _a2.x, y2 = _a2.y, top2 = _a2.top, right2 = _a2.right, bottom2 = _a2.bottom, left2 = _a2.left, width = _a2.width, height = _a2.height;
87180
- return { x: x2, y: y2, top: top2, right: right2, bottom: bottom2, left: left2, width, height };
87762
+ var _a2 = this, x = _a2.x, y2 = _a2.y, top2 = _a2.top, right2 = _a2.right, bottom2 = _a2.bottom, left2 = _a2.left, width = _a2.width, height = _a2.height;
87763
+ return { x, y: y2, top: top2, right: right2, bottom: bottom2, left: left2, width, height };
87181
87764
  };
87182
87765
  DOMRectReadOnly2.fromRect = function(rectangle) {
87183
87766
  return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
@@ -100195,8 +100778,8 @@ ${style2}
100195
100778
  }
100196
100779
  }
100197
100780
  const BlankDOCX = "data:application/octet-stream;base64,UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz+po/sCyhcEoY76BkW0hsPLq9GU63AVJGapdKtkAMj5wnuQArUuEDOKpUPlqBdIxzHoT8EnPgd/3+PZfeITjMsfZgo+EzVGJpMHvZ0O+GJIJJLHtqGuuskokQjJYCqc5XTv1JyfcJBSl3PWmhQ+pRA+MHE+rK/wF73TtdTdQKsomI+CYsdfG1j4orL5eWlMVxmwOcvqq0hFZfu4XoJaREd25N0Vas0K7XxeGWdgaRlJcHaa07IRJuDaTLEzS+3fGASIJrAOydOxHWMPu4GsUv806QinKnYmbg8hitdScE0hqA5js4m2NncyySOifRh0RrJZ4w9s/eqNU5DRwgoj7+6tpEsj57PqhXkgJ1IJvvluzoG1BLAwQKAAAAAACTZE1bAAAAAAAAAAAAAAAACQAcAGRvY1Byb3BzL1VUCQADhhztaIcc7Wh1eAsAAQT1AQAABBQAAABQSwMEFAAAAAgAAAAhACEYr1llAQAAxQIAABAAHABkb2NQcm9wcy9hcHAueG1sVVQJAAM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tQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==";
100198
- function getDefaultExportFromCjs(x2) {
100199
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
100781
+ function getDefaultExportFromCjs(x) {
100782
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
100200
100783
  }
100201
100784
  var eventemitter3 = { exports: {} };
100202
100785
  var hasRequiredEventemitter3;
@@ -104893,14 +105476,14 @@ ${unwrappedProps}
104893
105476
  }
104894
105477
  return viewMeasurer.getBoundingClientRect();
104895
105478
  }
104896
- function getPointRect(x2, y2) {
105479
+ function getPointRect(x, y2) {
104897
105480
  const viewRect = ensureViewBoundingRect();
104898
105481
  return {
104899
105482
  top: y2,
104900
- left: x2,
105483
+ left: x,
104901
105484
  height: 0,
104902
105485
  width: 0,
104903
- right: viewRect.width - x2,
105486
+ right: viewRect.width - x,
104904
105487
  bottom: viewRect.height - y2
104905
105488
  };
104906
105489
  }
@@ -105738,8 +106321,8 @@ ${style2}
105738
106321
  if (follower === null)
105739
106322
  return;
105740
106323
  const target = VBinder.targetRef;
105741
- const { x: x2, y: y2, overlap } = props;
105742
- const targetRect = x2 !== void 0 && y2 !== void 0 ? getPointRect(x2, y2) : getRect(target);
106324
+ const { x, y: y2, overlap } = props;
106325
+ const targetRect = x !== void 0 && y2 !== void 0 ? getPointRect(x, y2) : getRect(target);
105743
106326
  follower.style.setProperty("--v-target-width", `${Math.round(targetRect.width)}px`);
105744
106327
  follower.style.setProperty("--v-target-height", `${Math.round(targetRect.height)}px`);
105745
106328
  const { width, minWidth, placement, internalShift, flip: flip2 } = props;
@@ -105909,8 +106492,8 @@ ${style2}
105909
106492
  return ResizeObserverSize2;
105910
106493
  })();
105911
106494
  var DOMRectReadOnly = (function() {
105912
- function DOMRectReadOnly2(x2, y2, width, height) {
105913
- this.x = x2;
106495
+ function DOMRectReadOnly2(x, y2, width, height) {
106496
+ this.x = x;
105914
106497
  this.y = y2;
105915
106498
  this.width = width;
105916
106499
  this.height = height;
@@ -105921,8 +106504,8 @@ ${style2}
105921
106504
  return freeze(this);
105922
106505
  }
105923
106506
  DOMRectReadOnly2.prototype.toJSON = function() {
105924
- var _a2 = this, x2 = _a2.x, y2 = _a2.y, top2 = _a2.top, right2 = _a2.right, bottom2 = _a2.bottom, left2 = _a2.left, width = _a2.width, height = _a2.height;
105925
- return { x: x2, y: y2, top: top2, right: right2, bottom: bottom2, left: left2, width, height };
106507
+ var _a2 = this, x = _a2.x, y2 = _a2.y, top2 = _a2.top, right2 = _a2.right, bottom2 = _a2.bottom, left2 = _a2.left, width = _a2.width, height = _a2.height;
106508
+ return { x, y: y2, top: top2, right: right2, bottom: bottom2, left: left2, width, height };
105926
106509
  };
105927
106510
  DOMRectReadOnly2.fromRect = function(rectangle) {
105928
106511
  return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
@@ -116626,9 +117209,9 @@ ${style2}
116626
117209
  const resetSelection = () => {
116627
117210
  selectionPosition.value = null;
116628
117211
  };
116629
- const updateSelection2 = ({ startX, startY, x: x2, y: y2, source }) => {
117212
+ const updateSelection2 = ({ startX, startY, x, y: y2, source }) => {
116630
117213
  const hasStartCoords = startX || startY;
116631
- const hasEndCoords = x2 || y2;
117214
+ const hasEndCoords = x || y2;
116632
117215
  if (!hasStartCoords && !hasEndCoords) {
116633
117216
  return selectionPosition.value = null;
116634
117217
  }
@@ -116653,10 +117236,10 @@ ${style2}
116653
117236
  selectionPosition.value.bottom = y2;
116654
117237
  }
116655
117238
  const selectionLeft = selectionPosition.value.startX;
116656
- if (x2 < selectionLeft) {
116657
- selectionPosition.value.left = x2;
117239
+ if (x < selectionLeft) {
117240
+ selectionPosition.value.left = x;
116658
117241
  } else {
116659
- selectionPosition.value.right = x2;
117242
+ selectionPosition.value.right = x;
116660
117243
  }
116661
117244
  };
116662
117245
  const handleSelectionStart = (e) => {
@@ -116665,16 +117248,16 @@ ${style2}
116665
117248
  nextTick(() => {
116666
117249
  isDragging.value = true;
116667
117250
  const y2 = e.offsetY / (activeZoom.value / 100);
116668
- const x2 = e.offsetX / (activeZoom.value / 100);
116669
- updateSelection2({ startX: x2, startY: y2 });
117251
+ const x = e.offsetX / (activeZoom.value / 100);
117252
+ updateSelection2({ startX: x, startY: y2 });
116670
117253
  selectionLayer.value.addEventListener("mousemove", handleDragMove);
116671
117254
  });
116672
117255
  };
116673
117256
  const handleDragMove = (e) => {
116674
117257
  if (!isDragging.value) return;
116675
117258
  const y2 = e.offsetY / (activeZoom.value / 100);
116676
- const x2 = e.offsetX / (activeZoom.value / 100);
116677
- updateSelection2({ x: x2, y: y2 });
117259
+ const x = e.offsetX / (activeZoom.value / 100);
117260
+ updateSelection2({ x, y: y2 });
116678
117261
  };
116679
117262
  const handleDragEnd = (e) => {
116680
117263
  if (!isDragging.value) return;
@@ -117031,7 +117614,7 @@ ${style2}
117031
117614
  this.config.colors = shuffleArray(this.config.colors);
117032
117615
  this.userColorMap = /* @__PURE__ */ new Map();
117033
117616
  this.colorIndex = 0;
117034
- this.version = "0.28.0";
117617
+ this.version = "0.28.2";
117035
117618
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
117036
117619
  this.superdocId = config2.superdocId || v4();
117037
117620
  this.colors = this.config.colors;
@@ -119431,7 +120014,7 @@ ${style2}
119431
120014
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
119432
120015
  );
119433
120016
  }
119434
- const indexNjnq8umX = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
120017
+ const indexDQ6dCde6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
119435
120018
  __proto__: null,
119436
120019
  unified
119437
120020
  }, Symbol.toStringTag, { value: "Module" }));
@@ -121023,8 +121606,8 @@ ${style2}
121023
121606
  properties[name] = attribute.value;
121024
121607
  }
121025
121608
  }
121026
- const x2 = state2.schema.space === "svg" ? s : h;
121027
- const result = x2(node2.tagName, properties, all$4(state2, node2.childNodes));
121609
+ const x = state2.schema.space === "svg" ? s : h;
121610
+ const result = x(node2.tagName, properties, all$4(state2, node2.childNodes));
121028
121611
  patch$1(state2, node2, result);
121029
121612
  if (result.tagName === "template") {
121030
121613
  const reference2 = (