@zipify/wysiwyg 2.0.0-0 → 2.0.0-10

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 (118) hide show
  1. package/.eslintrc.js +1 -1
  2. package/config/build/cli.config.js +8 -2
  3. package/config/build/lib.config.js +4 -2
  4. package/dist/cli.js +10 -2
  5. package/dist/wysiwyg.css +53 -37
  6. package/dist/wysiwyg.mjs +2131 -405
  7. package/example/ExampleApp.vue +13 -2
  8. package/lib/Wysiwyg.vue +3 -2
  9. package/lib/__tests__/utils/buildTestExtensions.js +2 -1
  10. package/lib/assets/icons/indicator.svg +4 -0
  11. package/lib/cli/commands/Command.js +39 -0
  12. package/lib/cli/commands/ToJsonCommand.js +46 -0
  13. package/lib/cli/commands/VersionCommand.js +11 -0
  14. package/lib/cli/commands/index.js +2 -0
  15. package/lib/cli/index.js +1 -0
  16. package/lib/components/base/Button.vue +6 -0
  17. package/lib/components/base/dropdown/Dropdown.vue +7 -1
  18. package/lib/components/base/dropdown/DropdownActivator.vue +25 -4
  19. package/lib/components/base/dropdown/__tests__/DropdownActivator.test.js +23 -1
  20. package/lib/components/toolbar/controls/AlignmentControl.vue +12 -1
  21. package/lib/components/toolbar/controls/FontColorControl.vue +14 -0
  22. package/lib/components/toolbar/controls/FontFamilyControl.vue +4 -0
  23. package/lib/components/toolbar/controls/FontSizeControl.vue +6 -1
  24. package/lib/components/toolbar/controls/FontWeightControl.vue +12 -0
  25. package/lib/components/toolbar/controls/ItalicControl.vue +14 -0
  26. package/lib/components/toolbar/controls/LineHeightControl.vue +15 -0
  27. package/lib/components/toolbar/controls/StylePresetControl.vue +1 -1
  28. package/lib/components/toolbar/controls/UnderlineControl.vue +13 -0
  29. package/lib/components/toolbar/controls/__tests__/AlignmentControl.test.js +72 -5
  30. package/lib/components/toolbar/controls/__tests__/FontColorControl.test.js +22 -1
  31. package/lib/components/toolbar/controls/__tests__/FontFamilyControl.test.js +1 -0
  32. package/lib/components/toolbar/controls/__tests__/FontSizeControl.test.js +1 -0
  33. package/lib/components/toolbar/controls/__tests__/FontWeightControl.test.js +1 -0
  34. package/lib/components/toolbar/controls/__tests__/ItalicControl.test.js +23 -1
  35. package/lib/components/toolbar/controls/__tests__/LineHeightControl.test.js +23 -1
  36. package/lib/components/toolbar/controls/__tests__/StylePresetControl.test.js +6 -6
  37. package/lib/components/toolbar/controls/__tests__/UnderlineControl.test.js +25 -1
  38. package/lib/composables/__tests__/useEditor.test.js +1 -1
  39. package/lib/composables/useEditor.js +9 -8
  40. package/lib/directives/__tests__/tooltip.test.js +22 -4
  41. package/lib/directives/tooltip.js +4 -1
  42. package/lib/entry-cli.js +7 -20
  43. package/lib/entry-lib.js +1 -1
  44. package/lib/enums/MarkGroups.js +4 -0
  45. package/lib/enums/TextSettings.js +5 -5
  46. package/lib/enums/index.js +1 -0
  47. package/lib/extensions/BackgroundColor.js +0 -1
  48. package/lib/extensions/FontColor.js +2 -2
  49. package/lib/extensions/FontFamily.js +3 -3
  50. package/lib/extensions/FontSize.js +2 -2
  51. package/lib/extensions/FontStyle.js +2 -2
  52. package/lib/extensions/FontWeight.js +2 -2
  53. package/lib/extensions/Link.js +1 -1
  54. package/lib/extensions/StylePreset.js +9 -3
  55. package/lib/extensions/Superscript.js +5 -2
  56. package/lib/extensions/TextDecoration.js +19 -29
  57. package/lib/extensions/__tests__/Alignment.test.js +2 -2
  58. package/lib/extensions/__tests__/BackgroundColor.test.js +4 -3
  59. package/lib/extensions/__tests__/FontColor.test.js +4 -3
  60. package/lib/extensions/__tests__/FontFamily.test.js +6 -6
  61. package/lib/extensions/__tests__/FontSize.test.js +9 -8
  62. package/lib/extensions/__tests__/FontStyle.test.js +6 -5
  63. package/lib/extensions/__tests__/FontWeight.test.js +2 -2
  64. package/lib/extensions/__tests__/LineHeight.test.js +2 -1
  65. package/lib/extensions/__tests__/StylePreset.test.js +51 -0
  66. package/lib/extensions/__tests__/Superscript.test.js +102 -0
  67. package/lib/extensions/__tests__/TextDecoration.test.js +40 -24
  68. package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +24 -24
  69. package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +1 -1
  70. package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +19 -23
  71. package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +2 -2
  72. package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +1 -1
  73. package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +13 -17
  74. package/lib/extensions/__tests__/__snapshots__/Superscript.test.js.snap +107 -0
  75. package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +102 -102
  76. package/lib/extensions/core/Document.js +2 -1
  77. package/lib/extensions/core/Heading.js +2 -1
  78. package/lib/extensions/core/NodeProcessor.js +63 -20
  79. package/lib/extensions/core/Paragraph.js +2 -1
  80. package/lib/extensions/core/TextProcessor.js +0 -5
  81. package/lib/extensions/core/__tests__/NodeProcessor.test.js +364 -11
  82. package/lib/extensions/core/__tests__/TextProcessor.test.js +1 -22
  83. package/lib/extensions/core/__tests__/__snapshots__/NodeProcessor.test.js.snap +309 -0
  84. package/lib/extensions/core/__tests__/__snapshots__/TextProcessor.test.js.snap +7 -27
  85. package/lib/extensions/core/steps/AddNodeMarkStep.js +6 -0
  86. package/lib/extensions/core/steps/AttrStep.js +60 -0
  87. package/lib/extensions/core/steps/RemoveNodeMarkStep.js +6 -0
  88. package/lib/extensions/core/steps/index.js +1 -0
  89. package/lib/extensions/list/List.js +70 -9
  90. package/lib/extensions/list/ListItem.js +2 -2
  91. package/lib/extensions/list/__tests__/List.test.js +26 -17
  92. package/lib/extensions/list/__tests__/__snapshots__/List.test.js.snap +36 -36
  93. package/lib/services/NodeFactory.js +73 -13
  94. package/lib/services/__tests__/NodeFactory.test.js +124 -0
  95. package/lib/services/__tests__/__snapshots__/NodeFactory.test.js.snap +326 -0
  96. package/lib/services/index.js +1 -1
  97. package/lib/services/normalizer/BaseNormalizer.js +11 -0
  98. package/lib/services/{BrowserDomParser.js → normalizer/BrowserDomParser.js} +0 -0
  99. package/lib/services/normalizer/ContentNormalizer.js +24 -0
  100. package/lib/services/normalizer/HtmlNormalizer.js +297 -0
  101. package/lib/services/normalizer/JsonNormalizer.js +82 -0
  102. package/lib/services/{__tests__/ContentNormalizer.test.js → normalizer/__tests__/HtmlNormalizer.test.js} +42 -4
  103. package/lib/services/normalizer/__tests__/JsonNormalizer.test.js +87 -0
  104. package/lib/services/normalizer/__tests__/__snapshots__/JsonNormalizer.test.js.snap +196 -0
  105. package/lib/services/normalizer/index.js +1 -0
  106. package/lib/styles/content.css +8 -0
  107. package/lib/utils/__tests__/findMarkByType.test.js +17 -0
  108. package/lib/utils/__tests__/isMarkAppliedToParent.test.js +53 -0
  109. package/lib/utils/__tests__/isNodeFullySelected.test.js +44 -0
  110. package/lib/utils/__tests__/resolveTextPosition.test.js +39 -0
  111. package/lib/utils/copyMark.js +5 -0
  112. package/lib/utils/index.js +1 -1
  113. package/lib/utils/isMarkAppliedToParent.js +2 -7
  114. package/lib/utils/isNodeFullySelected.js +4 -7
  115. package/lib/utils/resolveTextPosition.js +4 -6
  116. package/package.json +31 -27
  117. package/lib/services/ContentNormalizer.js +0 -194
  118. package/lib/utils/resolveNodePosition.js +0 -6
package/dist/wysiwyg.mjs CHANGED
@@ -17,11 +17,16 @@ var __privateAdd = (obj, member, value) => {
17
17
  throw TypeError("Cannot add the same private member more than once");
18
18
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
19
19
  };
20
+ var __privateSet = (obj, member, value, setter) => {
21
+ __accessCheck(obj, member, "write to private field");
22
+ setter ? setter.call(obj, value) : member.set(obj, value);
23
+ return value;
24
+ };
20
25
  var __privateMethod = (obj, member, method) => {
21
26
  __accessCheck(obj, member, "access private method");
22
27
  return method;
23
28
  };
24
- var _domParser, _textBlock, textBlock_fn, _normalizeTextBlockArgs, normalizeTextBlockArgs_fn;
29
+ var _domParser, _parser, _NodeFilter, NodeFilter_get, _Node, Node_get, _removeComments, removeComments_fn, _normalizeRootTags, normalizeRootTags_fn, _createNodeIterator, createNodeIterator_fn, _iterateNodes, iterateNodes_fn, _runIterator, runIterator_fn, _removeEmptyNodes, removeEmptyNodes_fn, _normalizeListItems, normalizeListItems_fn, _isBlockNode, isBlockNode_fn, _isRootNode, isRootNode_fn, _assignElementProperties, assignElementProperties_fn, _removeStyleProperties, removeStyleProperties_fn, _normalizeBreakLines, normalizeBreakLines_fn, _normalizeBlockTextDecoration, normalizeBlockTextDecoration_fn, _moveTextDecorationToChildren, moveTextDecorationToChildren_fn, _parseTextDecoration, parseTextDecoration_fn, _normalizeBlockBackgroundColor, normalizeBlockBackgroundColor_fn, _moveBackgroundColorToChildren, moveBackgroundColorToChildren_fn, _wrapTextNode, wrapTextNode_fn, _iterateNodes2, iterateNodes_fn2, _iterateChildNodes, iterateChildNodes_fn, _bubbleMarks, bubbleMarks_fn, _canBubbleMark, canBubbleMark_fn, _includesMark, includesMark_fn, _includesMarkType, includesMarkType_fn, _removeMark, removeMark_fn, _addMark, addMark_fn, _findMarkIndexByType, findMarkIndexByType_fn, _buildHtml, buildHtml_fn, _buildJson, buildJson_fn, _textBlock, textBlock_fn, _normalizeTextBlockArgs, normalizeTextBlockArgs_fn;
25
30
  import { computed, ref, watch, inject, onUnmounted, nextTick, provide, onMounted, toRef, unref, reactive } from "vue";
26
31
  import { ColorModel, ZipifyColorPicker } from "@zipify/colorpicker";
27
32
  function OrderedMap(content) {
@@ -4314,11 +4319,11 @@ class Plugin {
4314
4319
  return state[this.key];
4315
4320
  }
4316
4321
  }
4317
- const keys$1 = /* @__PURE__ */ Object.create(null);
4322
+ const keys$5 = /* @__PURE__ */ Object.create(null);
4318
4323
  function createKey(name) {
4319
- if (name in keys$1)
4320
- return name + "$" + ++keys$1[name];
4321
- keys$1[name] = 0;
4324
+ if (name in keys$5)
4325
+ return name + "$" + ++keys$5[name];
4326
+ keys$5[name] = 0;
4322
4327
  return name + "$";
4323
4328
  }
4324
4329
  class PluginKey {
@@ -9612,11 +9617,11 @@ function getRenderedAttributes(nodeOrMark, extensionAttributes) {
9612
9617
  return item.attribute.renderHTML(nodeOrMark.attrs) || {};
9613
9618
  }).reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {});
9614
9619
  }
9615
- function isFunction$1(value) {
9620
+ function isFunction$4(value) {
9616
9621
  return typeof value === "function";
9617
9622
  }
9618
9623
  function callOrReturn(value, context = void 0, ...props) {
9619
- if (isFunction$1(value)) {
9624
+ if (isFunction$4(value)) {
9620
9625
  if (context) {
9621
9626
  return value.bind(context)(...props);
9622
9627
  }
@@ -11970,7 +11975,7 @@ class Editor$1 extends EventEmitter {
11970
11975
  return this.view.state;
11971
11976
  }
11972
11977
  registerPlugin(plugin, handlePlugins) {
11973
- const plugins = isFunction$1(handlePlugins) ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin];
11978
+ const plugins = isFunction$4(handlePlugins) ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin];
11974
11979
  const state = this.state.reconfigure({ plugins });
11975
11980
  this.view.updateState(state);
11976
11981
  }
@@ -14023,11 +14028,10 @@ const TextSettings = Object.freeze({
14023
14028
  LINK: "link",
14024
14029
  STYLE_PRESET: "style_preset",
14025
14030
  get attributes() {
14026
- return [
14027
- this.ALIGNMENT,
14028
- this.LINE_HEIGHT,
14029
- this.MARGIN
14030
- ];
14031
+ return [this.ALIGNMENT, this.LINE_HEIGHT, this.MARGIN];
14032
+ },
14033
+ get inlineMarks() {
14034
+ return [this.TEXT_DECORATION, this.LINK, this.SUPERSCRIPT, this.BACKGROUND_COLOR];
14031
14035
  },
14032
14036
  get marks() {
14033
14037
  return [
@@ -14042,6 +14046,10 @@ const TextSettings = Object.freeze({
14042
14046
  ];
14043
14047
  }
14044
14048
  });
14049
+ const MarkGroups = Object.freeze({
14050
+ SETTINGS: "settings",
14051
+ ALL: "_"
14052
+ });
14045
14053
  const LinkTargets = Object.freeze({
14046
14054
  BLANK: "_blank",
14047
14055
  SELF: "_self"
@@ -14290,7 +14298,7 @@ var __component__$F = /* @__PURE__ */ normalizeComponent(
14290
14298
  staticRenderFns$F,
14291
14299
  false,
14292
14300
  __vue2_injectStyles$F,
14293
- "562f4e4a",
14301
+ "1ea5f7a2",
14294
14302
  null,
14295
14303
  null
14296
14304
  );
@@ -14419,22 +14427,23 @@ const __vite_glob_0_4 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" sty
14419
14427
  const __vite_glob_0_5 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="#fff" stroke="#B3B3B3" d="M4.5 4.5h19v19h-19z"/>\n <path fill="#3B3B3B" d="M26 20.7a2.51 2.51 0 0 1-5 0c0-1.31 2.5-4.7 2.5-4.7s2.5 3.39 2.5 4.7Z"/>\n <path fill="#3B3B3B" fill-rule="evenodd" d="M19.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433h-4.943l-.89 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H8L12.686 8h2.269l4.686 11.93Zm-7.721-4.505h3.803l-1.452-3.968a18.048 18.048 0 0 1-.219-.623c-.08-.24-.158-.5-.235-.78-.077.28-.152.542-.227.784a8.742 8.742 0 0 1-.218.635l-1.452 3.952Z" clip-rule="evenodd"/>\n</svg>\n';
14420
14428
  const __vite_glob_0_6 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M16.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433H8.35l-.891 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H5L9.686 8h2.269l4.686 11.93Zm-7.72-4.505h3.803l-1.452-3.968a18.048 18.048 0 0 1-.219-.623c-.08-.24-.158-.5-.235-.78-.077.28-.152.542-.227.784a8.742 8.742 0 0 1-.218.635L8.92 15.425Zm14.968 4.505h-.915a.987.987 0 0 1-.454-.087c-.11-.058-.192-.175-.248-.35l-.181-.603a7.005 7.005 0 0 1-.631.507c-.206.146-.42.269-.64.368a3.26 3.26 0 0 1-.7.222c-.248.05-.523.075-.826.075-.357 0-.687-.049-.99-.145a2.134 2.134 0 0 1-.78-.433 1.967 1.967 0 0 1-.507-.718 2.545 2.545 0 0 1-.181-.998c0-.319.084-.634.251-.945.168-.31.447-.59.838-.841.39-.25.91-.458 1.559-.623.649-.165 1.455-.258 2.417-.28v-.495c0-.567-.12-.986-.359-1.259-.239-.272-.587-.408-1.043-.408-.33 0-.605.039-.825.116a3.17 3.17 0 0 0-.574.26 25.11 25.11 0 0 1-.45.26.912.912 0 0 1-.453.115.59.59 0 0 1-.355-.107.843.843 0 0 1-.239-.264l-.371-.652c.973-.891 2.148-1.337 3.523-1.337.494 0 .936.081 1.324.244.387.162.716.387.985.676.27.289.475.634.615 1.036.14.401.21.841.21 1.32v5.346Zm-3.96-1.271c.21 0 .402-.02.578-.058.176-.038.342-.096.5-.173.156-.077.307-.172.453-.285a4.13 4.13 0 0 0 .441-.4v-1.427c-.594.027-1.09.078-1.489.153a3.967 3.967 0 0 0-.961.284c-.242.116-.414.25-.516.404a.894.894 0 0 0-.152.504c0 .357.106.613.317.767.212.154.489.231.83.231Z" clip-rule="evenodd"/>\n</svg>\n';
14421
14429
  const __vite_glob_0_7 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M22 20.62a2.42 2.42 0 0 1-4.84 0c0-1.25 2.42-4.54 2.42-4.54S22 19.37 22 20.62ZM9.92 15.425l1.452-3.951c.071-.182.145-.394.219-.636.074-.242.149-.503.226-.783a17.223 17.223 0 0 0 .454 1.402l1.452 3.968H9.919Zm5.411 4.199c.226-.795.658-1.684 1.184-2.562L12.955 8h-2.269L6 19.93h1.725a.736.736 0 0 0 .474-.157.792.792 0 0 0 .26-.347l.891-2.434h4.941l.891 2.434c.031.079.097.134.148.198Z" clip-rule="evenodd"/>\n</svg>\n';
14422
- const __vite_glob_0_8 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M18 9V7h-7v2h2.64l-1.22 10H10v2h7v-2h-2.83L15.4 9H18Z"/>\n</svg>\n';
14423
- const __vite_glob_0_9 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m5 10 3-3 3 3H9v8h2l-3 3-3-3h2v-8H5Zm8-3h10v2H13V7Zm10 6H13v2h10v-2Zm0 6H13v2h10v-2Z" clip-rule="evenodd"/>\n</svg>\n';
14424
- const __vite_glob_0_10 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M12 17.5h-2a3.5 3.5 0 1 1 0-7h2V9h-2a5 5 0 0 0 0 10h2v-1.5Zm6-4.5h-8v2h8v-2Zm-2-4h2a5 5 0 0 1 0 10h-2v-1.5h2a3.5 3.5 0 1 0 0-7h-2V9Z" clip-rule="evenodd"/>\n</svg>\n';
14425
- const __vite_glob_0_11 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="9" height="9" x="9.5" y="9.5" stroke="var(--zw-icon-foreground)" rx="4.5"/>\n</svg>\n';
14426
- const __vite_glob_0_12 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M15.108 18.184V19H10.5v-.816h1.842v-5.862c0-.176.006-.354.018-.534l-1.53 1.314a.375.375 0 0 1-.156.084.373.373 0 0 1-.27-.048.318.318 0 0 1-.084-.078l-.336-.462 2.562-2.214h.87v7.8h1.692Zm1.519.156a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
14427
- const __vite_glob_0_13 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="10" height="10" x="9" y="9" fill="var(--zw-icon-foreground)" rx="5"/>\n</svg>\n';
14428
- const __vite_glob_0_14 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M12.086 9.802h.834v11.292h-.834V9.802Zm2.592 8.538a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
14429
- const __vite_glob_0_15 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="m13.664 15.808-1.35-3.498a7.11 7.11 0 0 1-.252-.804c-.084.324-.17.594-.258.81l-1.35 3.492h3.21ZM16.088 19h-.9a.387.387 0 0 1-.252-.078.48.48 0 0 1-.144-.198l-.804-2.076H10.13l-.804 2.076a.421.421 0 0 1-.138.192.383.383 0 0 1-.252.084h-.9l3.438-8.598h1.176L16.088 19Zm.7-.66a.8.8 0 0 1 .053-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
14430
- const __vite_glob_0_16 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M9 9h10v10H9z"/>\n</svg>\n';
14431
- const __vite_glob_0_17 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M14.089 6.726a1 1 0 0 1 1.425-.003l6.8 6.882a1 1 0 0 1 .007 1.398L17.2 20.3l-.2.2c-2.2 2.1-5.7 2-7.8-.2l-3.516-3.6a1 1 0 0 1 0-1.399l8.405-8.575Zm1.81 12.674c.1 0 .2 0 .2-.1l4.8-5-6.1-6.2-5 5.1 6.1 6.2Z" clip-rule="evenodd"/>\n</svg>\n';
14432
- const __vite_glob_0_18 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M14 9.333V6.666l-3.334 3.333L14 13.333v-2.667c2.206 0 4 1.793 4 4s-1.794 4-4 4c-2.207 0-4-1.793-4-4H8.666A5.332 5.332 0 0 0 14 19.999a5.332 5.332 0 0 0 5.333-5.333A5.332 5.332 0 0 0 14 9.333Z"/>\n</svg>\n';
14433
- const __vite_glob_0_19 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m14 12.731.77.27H20v2H8v-2h2.84a2.892 2.892 0 0 1-.46-.71 3.61 3.61 0 0 1-.29-1.52c0-.484.1-.964.29-1.41a3.5 3.5 0 0 1 .83-1.2 4 4 0 0 1 1.35-.84 4.74 4.74 0 0 1 1.83-.32 6 6 0 0 1 2.11.41 5 5 0 0 1 1.68 1l-.46.88a.69.69 0 0 1-.18.22.41.41 0 0 1-.25.07.69.69 0 0 1-.39-.16 5.551 5.551 0 0 0-.56-.36 4.641 4.641 0 0 0-.8-.36 3.44 3.44 0 0 0-1.14-.16 3.16 3.16 0 0 0-1.11.17 2.29 2.29 0 0 0-.8.45 1.87 1.87 0 0 0-.49.67 2.138 2.138 0 0 0-.11.79c-.023.357.08.711.29 1 .206.267.465.489.76.65.338.187.693.34 1.06.46Zm1.99 6.06c.24-.22.427-.49.55-.79.135-.315.2-.657.19-1h1.74a4.58 4.58 0 0 1-.25 1.38 4 4 0 0 1-.91 1.37 4.231 4.231 0 0 1-1.46.92 5.503 5.503 0 0 1-2 .33 6.13 6.13 0 0 1-2.5-.46 5.66 5.66 0 0 1-1.89-1.31l.54-.88a.61.61 0 0 1 .19-.17.45.45 0 0 1 .25-.07.5.5 0 0 1 .28.1c.128.077.251.16.37.25l.46.33c.19.13.391.243.6.34.245.107.5.191.76.25.328.076.664.11 1 .1a3.67 3.67 0 0 0 1.19-.18c.328-.109.63-.282.89-.51Z" clip-rule="evenodd"/>\n</svg>\n';
14434
- const __vite_glob_0_20 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M21.985 8.625h-1.75V9.5h2.625v.875h-3.5v-1.75c0-.481.394-.875.875-.875h1.75v-.875H19.36V6h2.625c.481 0 .875.394.875.875v.875a.878.878 0 0 1-.875.875ZM7.88 20h2.327l2.975-4.742h.105L16.262 20h2.328l-4.069-6.361L18.32 7.75h-2.345l-2.687 4.366h-.105L10.48 7.75H8.15l3.78 5.889L7.88 20Z"/>\n</svg>\n';
14435
- const __vite_glob_0_21 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M15.4 16.06a3.3 3.3 0 0 1-1.4.29 3.12 3.12 0 0 1-1.39-.29 2.88 2.88 0 0 1-1.05-.81 3.711 3.711 0 0 1-.65-1.25 5.659 5.659 0 0 1-.22-1.6V7H9v5.41a6.89 6.89 0 0 0 .34 2.22 5.29 5.29 0 0 0 1 1.77c.437.501.975.904 1.58 1.18A5 5 0 0 0 14 18a5 5 0 0 0 2.08-.42 4.61 4.61 0 0 0 1.57-1.18 5.27 5.27 0 0 0 1-1.77 6.89 6.89 0 0 0 .35-2.22V7h-1.69v5.41a5.659 5.659 0 0 1-.22 1.59 3.71 3.71 0 0 1-.69 1.25c-.27.34-.61.617-1 .81ZM20 19H8v2h12v-2Z" clip-rule="evenodd"/>\n</svg>\n';
14436
- const __vite_glob_0_22 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 20 20">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M18.96 10a5 5 0 0 0-5-5h-2v1.5h2a3.49 3.49 0 0 1 1.58 6.61L13.43 11h.53V9h-2.53l-7-7-1.47 1.47L17.49 18l1.47-1.47-2.34-2.34A4.93 4.93 0 0 0 18.96 10Zm-13 1h1.59L5.96 9.41V11ZM3.81 7.26A3.47 3.47 0 0 0 2.46 10a3.5 3.5 0 0 0 3.5 3.5h2V15h-2a5 5 0 0 1-3.21-8.8l1.06 1.06Z" clip-rule="evenodd"/>\n</svg>\n';
14437
- const modules = /* @__PURE__ */ Object.assign({ "../assets/icons/alignment-center.svg": __vite_glob_0_0, "../assets/icons/alignment-justify.svg": __vite_glob_0_1, "../assets/icons/alignment-left.svg": __vite_glob_0_2, "../assets/icons/alignment-right.svg": __vite_glob_0_3, "../assets/icons/arrow.svg": __vite_glob_0_4, "../assets/icons/background-color.svg": __vite_glob_0_5, "../assets/icons/case-style.svg": __vite_glob_0_6, "../assets/icons/font-color.svg": __vite_glob_0_7, "../assets/icons/italic.svg": __vite_glob_0_8, "../assets/icons/line-height.svg": __vite_glob_0_9, "../assets/icons/link.svg": __vite_glob_0_10, "../assets/icons/list-circle.svg": __vite_glob_0_11, "../assets/icons/list-decimal.svg": __vite_glob_0_12, "../assets/icons/list-disc.svg": __vite_glob_0_13, "../assets/icons/list-latin.svg": __vite_glob_0_14, "../assets/icons/list-roman.svg": __vite_glob_0_15, "../assets/icons/list-square.svg": __vite_glob_0_16, "../assets/icons/remove-format.svg": __vite_glob_0_17, "../assets/icons/reset-styles.svg": __vite_glob_0_18, "../assets/icons/strike-through.svg": __vite_glob_0_19, "../assets/icons/superscript.svg": __vite_glob_0_20, "../assets/icons/underline.svg": __vite_glob_0_21, "../assets/icons/unlink.svg": __vite_glob_0_22 });
14430
+ const __vite_glob_0_8 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 9 9">\n <path fill="#FFAB00" d="M0 4.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0Z"/>\n <path fill="#fff" fill-rule="evenodd" d="M5.063 2.25H3.938v3.375h1.124V2.25Zm-1.125 4.5a.562.562 0 1 1 1.123-.001.562.562 0 0 1-1.123.001Z" clip-rule="evenodd"/>\n</svg>\n';
14431
+ const __vite_glob_0_9 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M18 9V7h-7v2h2.64l-1.22 10H10v2h7v-2h-2.83L15.4 9H18Z"/>\n</svg>\n';
14432
+ const __vite_glob_0_10 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m5 10 3-3 3 3H9v8h2l-3 3-3-3h2v-8H5Zm8-3h10v2H13V7Zm10 6H13v2h10v-2Zm0 6H13v2h10v-2Z" clip-rule="evenodd"/>\n</svg>\n';
14433
+ const __vite_glob_0_11 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M12 17.5h-2a3.5 3.5 0 1 1 0-7h2V9h-2a5 5 0 0 0 0 10h2v-1.5Zm6-4.5h-8v2h8v-2Zm-2-4h2a5 5 0 0 1 0 10h-2v-1.5h2a3.5 3.5 0 1 0 0-7h-2V9Z" clip-rule="evenodd"/>\n</svg>\n';
14434
+ const __vite_glob_0_12 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="9" height="9" x="9.5" y="9.5" stroke="var(--zw-icon-foreground)" rx="4.5"/>\n</svg>\n';
14435
+ const __vite_glob_0_13 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M15.108 18.184V19H10.5v-.816h1.842v-5.862c0-.176.006-.354.018-.534l-1.53 1.314a.375.375 0 0 1-.156.084.373.373 0 0 1-.27-.048.318.318 0 0 1-.084-.078l-.336-.462 2.562-2.214h.87v7.8h1.692Zm1.519.156a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
14436
+ const __vite_glob_0_14 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <rect width="10" height="10" x="9" y="9" fill="var(--zw-icon-foreground)" rx="5"/>\n</svg>\n';
14437
+ const __vite_glob_0_15 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M12.086 9.802h.834v11.292h-.834V9.802Zm2.592 8.538a.8.8 0 0 1 .054-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
14438
+ const __vite_glob_0_16 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="m13.664 15.808-1.35-3.498a7.11 7.11 0 0 1-.252-.804c-.084.324-.17.594-.258.81l-1.35 3.492h3.21ZM16.088 19h-.9a.387.387 0 0 1-.252-.078.48.48 0 0 1-.144-.198l-.804-2.076H10.13l-.804 2.076a.421.421 0 0 1-.138.192.383.383 0 0 1-.252.084h-.9l3.438-8.598h1.176L16.088 19Zm.7-.66a.8.8 0 0 1 .053-.294.829.829 0 0 1 .156-.24.77.77 0 0 1 .534-.222.77.77 0 0 1 .696.462c.04.092.06.19.06.294a.744.744 0 0 1-.222.534.692.692 0 0 1-.24.156.73.73 0 0 1-.294.06.73.73 0 0 1-.294-.06.692.692 0 0 1-.396-.39.816.816 0 0 1-.054-.3Z"/>\n</svg>\n';
14439
+ const __vite_glob_0_17 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M9 9h10v10H9z"/>\n</svg>\n';
14440
+ const __vite_glob_0_18 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M14.089 6.726a1 1 0 0 1 1.425-.003l6.8 6.882a1 1 0 0 1 .007 1.398L17.2 20.3l-.2.2c-2.2 2.1-5.7 2-7.8-.2l-3.516-3.6a1 1 0 0 1 0-1.399l8.405-8.575Zm1.81 12.674c.1 0 .2 0 .2-.1l4.8-5-6.1-6.2-5 5.1 6.1 6.2Z" clip-rule="evenodd"/>\n</svg>\n';
14441
+ const __vite_glob_0_19 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M14 9.333V6.666l-3.334 3.333L14 13.333v-2.667c2.206 0 4 1.793 4 4s-1.794 4-4 4c-2.207 0-4-1.793-4-4H8.666A5.332 5.332 0 0 0 14 19.999a5.332 5.332 0 0 0 5.333-5.333A5.332 5.332 0 0 0 14 9.333Z"/>\n</svg>\n';
14442
+ const __vite_glob_0_20 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="m14 12.731.77.27H20v2H8v-2h2.84a2.892 2.892 0 0 1-.46-.71 3.61 3.61 0 0 1-.29-1.52c0-.484.1-.964.29-1.41a3.5 3.5 0 0 1 .83-1.2 4 4 0 0 1 1.35-.84 4.74 4.74 0 0 1 1.83-.32 6 6 0 0 1 2.11.41 5 5 0 0 1 1.68 1l-.46.88a.69.69 0 0 1-.18.22.41.41 0 0 1-.25.07.69.69 0 0 1-.39-.16 5.551 5.551 0 0 0-.56-.36 4.641 4.641 0 0 0-.8-.36 3.44 3.44 0 0 0-1.14-.16 3.16 3.16 0 0 0-1.11.17 2.29 2.29 0 0 0-.8.45 1.87 1.87 0 0 0-.49.67 2.138 2.138 0 0 0-.11.79c-.023.357.08.711.29 1 .206.267.465.489.76.65.338.187.693.34 1.06.46Zm1.99 6.06c.24-.22.427-.49.55-.79.135-.315.2-.657.19-1h1.74a4.58 4.58 0 0 1-.25 1.38 4 4 0 0 1-.91 1.37 4.231 4.231 0 0 1-1.46.92 5.503 5.503 0 0 1-2 .33 6.13 6.13 0 0 1-2.5-.46 5.66 5.66 0 0 1-1.89-1.31l.54-.88a.61.61 0 0 1 .19-.17.45.45 0 0 1 .25-.07.5.5 0 0 1 .28.1c.128.077.251.16.37.25l.46.33c.19.13.391.243.6.34.245.107.5.191.76.25.328.076.664.11 1 .1a3.67 3.67 0 0 0 1.19-.18c.328-.109.63-.282.89-.51Z" clip-rule="evenodd"/>\n</svg>\n';
14443
+ const __vite_glob_0_21 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" d="M21.985 8.625h-1.75V9.5h2.625v.875h-3.5v-1.75c0-.481.394-.875.875-.875h1.75v-.875H19.36V6h2.625c.481 0 .875.394.875.875v.875a.878.878 0 0 1-.875.875ZM7.88 20h2.327l2.975-4.742h.105L16.262 20h2.328l-4.069-6.361L18.32 7.75h-2.345l-2.687 4.366h-.105L10.48 7.75H8.15l3.78 5.889L7.88 20Z"/>\n</svg>\n';
14444
+ const __vite_glob_0_22 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M15.4 16.06a3.3 3.3 0 0 1-1.4.29 3.12 3.12 0 0 1-1.39-.29 2.88 2.88 0 0 1-1.05-.81 3.711 3.711 0 0 1-.65-1.25 5.659 5.659 0 0 1-.22-1.6V7H9v5.41a6.89 6.89 0 0 0 .34 2.22 5.29 5.29 0 0 0 1 1.77c.437.501.975.904 1.58 1.18A5 5 0 0 0 14 18a5 5 0 0 0 2.08-.42 4.61 4.61 0 0 0 1.57-1.18 5.27 5.27 0 0 0 1-1.77 6.89 6.89 0 0 0 .35-2.22V7h-1.69v5.41a5.659 5.659 0 0 1-.22 1.59 3.71 3.71 0 0 1-.69 1.25c-.27.34-.61.617-1 .81ZM20 19H8v2h12v-2Z" clip-rule="evenodd"/>\n</svg>\n';
14445
+ const __vite_glob_0_23 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 20 20">\n <path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M18.96 10a5 5 0 0 0-5-5h-2v1.5h2a3.49 3.49 0 0 1 1.58 6.61L13.43 11h.53V9h-2.53l-7-7-1.47 1.47L17.49 18l1.47-1.47-2.34-2.34A4.93 4.93 0 0 0 18.96 10Zm-13 1h1.59L5.96 9.41V11ZM3.81 7.26A3.47 3.47 0 0 0 2.46 10a3.5 3.5 0 0 0 3.5 3.5h2V15h-2a5 5 0 0 1-3.21-8.8l1.06 1.06Z" clip-rule="evenodd"/>\n</svg>\n';
14446
+ const modules = /* @__PURE__ */ Object.assign({ "../assets/icons/alignment-center.svg": __vite_glob_0_0, "../assets/icons/alignment-justify.svg": __vite_glob_0_1, "../assets/icons/alignment-left.svg": __vite_glob_0_2, "../assets/icons/alignment-right.svg": __vite_glob_0_3, "../assets/icons/arrow.svg": __vite_glob_0_4, "../assets/icons/background-color.svg": __vite_glob_0_5, "../assets/icons/case-style.svg": __vite_glob_0_6, "../assets/icons/font-color.svg": __vite_glob_0_7, "../assets/icons/indicator.svg": __vite_glob_0_8, "../assets/icons/italic.svg": __vite_glob_0_9, "../assets/icons/line-height.svg": __vite_glob_0_10, "../assets/icons/link.svg": __vite_glob_0_11, "../assets/icons/list-circle.svg": __vite_glob_0_12, "../assets/icons/list-decimal.svg": __vite_glob_0_13, "../assets/icons/list-disc.svg": __vite_glob_0_14, "../assets/icons/list-latin.svg": __vite_glob_0_15, "../assets/icons/list-roman.svg": __vite_glob_0_16, "../assets/icons/list-square.svg": __vite_glob_0_17, "../assets/icons/remove-format.svg": __vite_glob_0_18, "../assets/icons/reset-styles.svg": __vite_glob_0_19, "../assets/icons/strike-through.svg": __vite_glob_0_20, "../assets/icons/superscript.svg": __vite_glob_0_21, "../assets/icons/underline.svg": __vite_glob_0_22, "../assets/icons/unlink.svg": __vite_glob_0_23 });
14438
14447
  function importIcon(name) {
14439
14448
  return modules[`../assets/icons/${name}.svg`] || "";
14440
14449
  }
@@ -14447,34 +14456,23 @@ function unmarkWysiwygContent({ __wswg__, ...content }) {
14447
14456
  function markWysiwygContent(content) {
14448
14457
  return { ...content, __wswg__: true };
14449
14458
  }
14450
- function resolveNodePosition({ path, pos }, node, modifier) {
14451
- const index = path.indexOf(node);
14452
- const slice2 = path.slice(index).reverse().filter((step) => typeof step === "object");
14453
- return pos + modifier * slice2.length;
14454
- }
14455
- function resolveTextPosition($from, $to, node, position) {
14456
- return {
14457
- from: Math.max(position, $from.pos),
14458
- to: Math.min(position + node.nodeSize, $to.pos)
14459
- };
14460
- }
14461
- function isNodeFullySelected($from, $to, node, position) {
14462
- const fromPosition = resolveNodePosition($from, node, -1);
14463
- const toPosition = resolveNodePosition($to, node, 1);
14464
- const isFromMatch = fromPosition <= position;
14465
- const isToMatch = toPosition >= node.nodeSize + position;
14459
+ const resolveTextPosition = ($from, $to, node, position) => ({
14460
+ from: Math.max(position, $from.pos),
14461
+ to: Math.min(position + node.nodeSize, $to.pos)
14462
+ });
14463
+ function isNodeFullySelected(doc2, selection, node, position) {
14464
+ const offset2 = doc2.resolve(position).depth + 1;
14465
+ const isFromMatch = selection.from - offset2 <= position;
14466
+ const isToMatch = selection.to + offset2 >= node.nodeSize + position;
14466
14467
  return isFromMatch && isToMatch;
14467
14468
  }
14468
- const DEFAULT_COMPARATOR = (parent, child) => child.eq(parent);
14469
- function isMarkAppliedToParent({ doc: doc2 }, position, checkingMark, comparator = DEFAULT_COMPARATOR) {
14469
+ function isMarkAppliedToParent(doc2, position, checkingMark) {
14470
14470
  const steps = doc2.resolve(position).path.reverse();
14471
14471
  for (const step of steps) {
14472
14472
  if (typeof step === "number")
14473
14473
  continue;
14474
- for (const mark of step.marks) {
14475
- if (comparator(mark, checkingMark))
14476
- return true;
14477
- }
14474
+ if (checkingMark.isInSet(step.marks))
14475
+ return true;
14478
14476
  }
14479
14477
  return false;
14480
14478
  }
@@ -14482,6 +14480,975 @@ function findMarkByType(list, typeOrName) {
14482
14480
  const name = typeof typeOrName === "string" ? typeOrName : typeOrName.name;
14483
14481
  return list.find((mark) => mark.type.name === name);
14484
14482
  }
14483
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
14484
+ function listCacheClear$2() {
14485
+ this.__data__ = [];
14486
+ this.size = 0;
14487
+ }
14488
+ var _listCacheClear = listCacheClear$2;
14489
+ function eq$4(value, other) {
14490
+ return value === other || value !== value && other !== other;
14491
+ }
14492
+ var eq_1 = eq$4;
14493
+ var eq$3 = eq_1;
14494
+ function assocIndexOf$5(array, key) {
14495
+ var length = array.length;
14496
+ while (length--) {
14497
+ if (eq$3(array[length][0], key)) {
14498
+ return length;
14499
+ }
14500
+ }
14501
+ return -1;
14502
+ }
14503
+ var _assocIndexOf = assocIndexOf$5;
14504
+ var assocIndexOf$4 = _assocIndexOf;
14505
+ var arrayProto$1 = Array.prototype;
14506
+ var splice$2 = arrayProto$1.splice;
14507
+ function listCacheDelete$2(key) {
14508
+ var data2 = this.__data__, index = assocIndexOf$4(data2, key);
14509
+ if (index < 0) {
14510
+ return false;
14511
+ }
14512
+ var lastIndex = data2.length - 1;
14513
+ if (index == lastIndex) {
14514
+ data2.pop();
14515
+ } else {
14516
+ splice$2.call(data2, index, 1);
14517
+ }
14518
+ --this.size;
14519
+ return true;
14520
+ }
14521
+ var _listCacheDelete = listCacheDelete$2;
14522
+ var assocIndexOf$3 = _assocIndexOf;
14523
+ function listCacheGet$2(key) {
14524
+ var data2 = this.__data__, index = assocIndexOf$3(data2, key);
14525
+ return index < 0 ? void 0 : data2[index][1];
14526
+ }
14527
+ var _listCacheGet = listCacheGet$2;
14528
+ var assocIndexOf$2 = _assocIndexOf;
14529
+ function listCacheHas$2(key) {
14530
+ return assocIndexOf$2(this.__data__, key) > -1;
14531
+ }
14532
+ var _listCacheHas = listCacheHas$2;
14533
+ var assocIndexOf$1 = _assocIndexOf;
14534
+ function listCacheSet$2(key, value) {
14535
+ var data2 = this.__data__, index = assocIndexOf$1(data2, key);
14536
+ if (index < 0) {
14537
+ ++this.size;
14538
+ data2.push([key, value]);
14539
+ } else {
14540
+ data2[index][1] = value;
14541
+ }
14542
+ return this;
14543
+ }
14544
+ var _listCacheSet = listCacheSet$2;
14545
+ var listCacheClear$1 = _listCacheClear, listCacheDelete$1 = _listCacheDelete, listCacheGet$1 = _listCacheGet, listCacheHas$1 = _listCacheHas, listCacheSet$1 = _listCacheSet;
14546
+ function ListCache$5(entries) {
14547
+ var index = -1, length = entries == null ? 0 : entries.length;
14548
+ this.clear();
14549
+ while (++index < length) {
14550
+ var entry = entries[index];
14551
+ this.set(entry[0], entry[1]);
14552
+ }
14553
+ }
14554
+ ListCache$5.prototype.clear = listCacheClear$1;
14555
+ ListCache$5.prototype["delete"] = listCacheDelete$1;
14556
+ ListCache$5.prototype.get = listCacheGet$1;
14557
+ ListCache$5.prototype.has = listCacheHas$1;
14558
+ ListCache$5.prototype.set = listCacheSet$1;
14559
+ var _ListCache = ListCache$5;
14560
+ var ListCache$4 = _ListCache;
14561
+ function stackClear$1() {
14562
+ this.__data__ = new ListCache$4();
14563
+ this.size = 0;
14564
+ }
14565
+ var _stackClear = stackClear$1;
14566
+ function stackDelete$1(key) {
14567
+ var data2 = this.__data__, result = data2["delete"](key);
14568
+ this.size = data2.size;
14569
+ return result;
14570
+ }
14571
+ var _stackDelete = stackDelete$1;
14572
+ function stackGet$1(key) {
14573
+ return this.__data__.get(key);
14574
+ }
14575
+ var _stackGet = stackGet$1;
14576
+ function stackHas$1(key) {
14577
+ return this.__data__.has(key);
14578
+ }
14579
+ var _stackHas = stackHas$1;
14580
+ var freeGlobal$4 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
14581
+ var _freeGlobal = freeGlobal$4;
14582
+ var freeGlobal$3 = _freeGlobal;
14583
+ var freeSelf$3 = typeof self == "object" && self && self.Object === Object && self;
14584
+ var root$b = freeGlobal$3 || freeSelf$3 || Function("return this")();
14585
+ var _root = root$b;
14586
+ var root$a = _root;
14587
+ var Symbol$7 = root$a.Symbol;
14588
+ var _Symbol = Symbol$7;
14589
+ var Symbol$6 = _Symbol;
14590
+ var objectProto$h = Object.prototype;
14591
+ var hasOwnProperty$d = objectProto$h.hasOwnProperty;
14592
+ var nativeObjectToString$1 = objectProto$h.toString;
14593
+ var symToStringTag$1 = Symbol$6 ? Symbol$6.toStringTag : void 0;
14594
+ function getRawTag$1(value) {
14595
+ var isOwn = hasOwnProperty$d.call(value, symToStringTag$1), tag = value[symToStringTag$1];
14596
+ try {
14597
+ value[symToStringTag$1] = void 0;
14598
+ var unmasked = true;
14599
+ } catch (e) {
14600
+ }
14601
+ var result = nativeObjectToString$1.call(value);
14602
+ if (unmasked) {
14603
+ if (isOwn) {
14604
+ value[symToStringTag$1] = tag;
14605
+ } else {
14606
+ delete value[symToStringTag$1];
14607
+ }
14608
+ }
14609
+ return result;
14610
+ }
14611
+ var _getRawTag = getRawTag$1;
14612
+ var objectProto$g = Object.prototype;
14613
+ var nativeObjectToString = objectProto$g.toString;
14614
+ function objectToString$5(value) {
14615
+ return nativeObjectToString.call(value);
14616
+ }
14617
+ var _objectToString = objectToString$5;
14618
+ var Symbol$5 = _Symbol, getRawTag = _getRawTag, objectToString$4 = _objectToString;
14619
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
14620
+ var symToStringTag = Symbol$5 ? Symbol$5.toStringTag : void 0;
14621
+ function baseGetTag$4(value) {
14622
+ if (value == null) {
14623
+ return value === void 0 ? undefinedTag : nullTag;
14624
+ }
14625
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString$4(value);
14626
+ }
14627
+ var _baseGetTag = baseGetTag$4;
14628
+ function isObject$l(value) {
14629
+ var type = typeof value;
14630
+ return value != null && (type == "object" || type == "function");
14631
+ }
14632
+ var isObject_1 = isObject$l;
14633
+ var baseGetTag$3 = _baseGetTag, isObject$k = isObject_1;
14634
+ var asyncTag = "[object AsyncFunction]", funcTag$3 = "[object Function]", genTag$2 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
14635
+ function isFunction$3(value) {
14636
+ if (!isObject$k(value)) {
14637
+ return false;
14638
+ }
14639
+ var tag = baseGetTag$3(value);
14640
+ return tag == funcTag$3 || tag == genTag$2 || tag == asyncTag || tag == proxyTag;
14641
+ }
14642
+ var isFunction_1 = isFunction$3;
14643
+ var root$9 = _root;
14644
+ var coreJsData$2 = root$9["__core-js_shared__"];
14645
+ var _coreJsData = coreJsData$2;
14646
+ var coreJsData$1 = _coreJsData;
14647
+ var maskSrcKey$1 = function() {
14648
+ var uid2 = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
14649
+ return uid2 ? "Symbol(src)_1." + uid2 : "";
14650
+ }();
14651
+ function isMasked$2(func) {
14652
+ return !!maskSrcKey$1 && maskSrcKey$1 in func;
14653
+ }
14654
+ var _isMasked = isMasked$2;
14655
+ var funcProto$2 = Function.prototype;
14656
+ var funcToString$2 = funcProto$2.toString;
14657
+ function toSource$3(func) {
14658
+ if (func != null) {
14659
+ try {
14660
+ return funcToString$2.call(func);
14661
+ } catch (e) {
14662
+ }
14663
+ try {
14664
+ return func + "";
14665
+ } catch (e) {
14666
+ }
14667
+ }
14668
+ return "";
14669
+ }
14670
+ var _toSource = toSource$3;
14671
+ var isFunction$2 = isFunction_1, isMasked$1 = _isMasked, isObject$j = isObject_1, toSource$2 = _toSource;
14672
+ var reRegExpChar$1 = /[\\^$.*+?()[\]{}|]/g;
14673
+ var reIsHostCtor$1 = /^\[object .+?Constructor\]$/;
14674
+ var funcProto$1 = Function.prototype, objectProto$f = Object.prototype;
14675
+ var funcToString$1 = funcProto$1.toString;
14676
+ var hasOwnProperty$c = objectProto$f.hasOwnProperty;
14677
+ var reIsNative$1 = RegExp(
14678
+ "^" + funcToString$1.call(hasOwnProperty$c).replace(reRegExpChar$1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
14679
+ );
14680
+ function baseIsNative$2(value) {
14681
+ if (!isObject$j(value) || isMasked$1(value)) {
14682
+ return false;
14683
+ }
14684
+ var pattern = isFunction$2(value) ? reIsNative$1 : reIsHostCtor$1;
14685
+ return pattern.test(toSource$2(value));
14686
+ }
14687
+ var _baseIsNative = baseIsNative$2;
14688
+ function getValue$2(object, key) {
14689
+ return object == null ? void 0 : object[key];
14690
+ }
14691
+ var _getValue = getValue$2;
14692
+ var baseIsNative$1 = _baseIsNative, getValue$1 = _getValue;
14693
+ function getNative$8(object, key) {
14694
+ var value = getValue$1(object, key);
14695
+ return baseIsNative$1(value) ? value : void 0;
14696
+ }
14697
+ var _getNative = getNative$8;
14698
+ var getNative$7 = _getNative, root$8 = _root;
14699
+ var Map$5 = getNative$7(root$8, "Map");
14700
+ var _Map = Map$5;
14701
+ var getNative$6 = _getNative;
14702
+ var nativeCreate$5 = getNative$6(Object, "create");
14703
+ var _nativeCreate = nativeCreate$5;
14704
+ var nativeCreate$4 = _nativeCreate;
14705
+ function hashClear$2() {
14706
+ this.__data__ = nativeCreate$4 ? nativeCreate$4(null) : {};
14707
+ this.size = 0;
14708
+ }
14709
+ var _hashClear = hashClear$2;
14710
+ function hashDelete$2(key) {
14711
+ var result = this.has(key) && delete this.__data__[key];
14712
+ this.size -= result ? 1 : 0;
14713
+ return result;
14714
+ }
14715
+ var _hashDelete = hashDelete$2;
14716
+ var nativeCreate$3 = _nativeCreate;
14717
+ var HASH_UNDEFINED$3 = "__lodash_hash_undefined__";
14718
+ var objectProto$e = Object.prototype;
14719
+ var hasOwnProperty$b = objectProto$e.hasOwnProperty;
14720
+ function hashGet$2(key) {
14721
+ var data2 = this.__data__;
14722
+ if (nativeCreate$3) {
14723
+ var result = data2[key];
14724
+ return result === HASH_UNDEFINED$3 ? void 0 : result;
14725
+ }
14726
+ return hasOwnProperty$b.call(data2, key) ? data2[key] : void 0;
14727
+ }
14728
+ var _hashGet = hashGet$2;
14729
+ var nativeCreate$2 = _nativeCreate;
14730
+ var objectProto$d = Object.prototype;
14731
+ var hasOwnProperty$a = objectProto$d.hasOwnProperty;
14732
+ function hashHas$2(key) {
14733
+ var data2 = this.__data__;
14734
+ return nativeCreate$2 ? data2[key] !== void 0 : hasOwnProperty$a.call(data2, key);
14735
+ }
14736
+ var _hashHas = hashHas$2;
14737
+ var nativeCreate$1 = _nativeCreate;
14738
+ var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
14739
+ function hashSet$2(key, value) {
14740
+ var data2 = this.__data__;
14741
+ this.size += this.has(key) ? 0 : 1;
14742
+ data2[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$2 : value;
14743
+ return this;
14744
+ }
14745
+ var _hashSet = hashSet$2;
14746
+ var hashClear$1 = _hashClear, hashDelete$1 = _hashDelete, hashGet$1 = _hashGet, hashHas$1 = _hashHas, hashSet$1 = _hashSet;
14747
+ function Hash$2(entries) {
14748
+ var index = -1, length = entries == null ? 0 : entries.length;
14749
+ this.clear();
14750
+ while (++index < length) {
14751
+ var entry = entries[index];
14752
+ this.set(entry[0], entry[1]);
14753
+ }
14754
+ }
14755
+ Hash$2.prototype.clear = hashClear$1;
14756
+ Hash$2.prototype["delete"] = hashDelete$1;
14757
+ Hash$2.prototype.get = hashGet$1;
14758
+ Hash$2.prototype.has = hashHas$1;
14759
+ Hash$2.prototype.set = hashSet$1;
14760
+ var _Hash = Hash$2;
14761
+ var Hash$1 = _Hash, ListCache$3 = _ListCache, Map$4 = _Map;
14762
+ function mapCacheClear$2() {
14763
+ this.size = 0;
14764
+ this.__data__ = {
14765
+ "hash": new Hash$1(),
14766
+ "map": new (Map$4 || ListCache$3)(),
14767
+ "string": new Hash$1()
14768
+ };
14769
+ }
14770
+ var _mapCacheClear = mapCacheClear$2;
14771
+ function isKeyable$2(value) {
14772
+ var type = typeof value;
14773
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
14774
+ }
14775
+ var _isKeyable = isKeyable$2;
14776
+ var isKeyable$1 = _isKeyable;
14777
+ function getMapData$5(map2, key) {
14778
+ var data2 = map2.__data__;
14779
+ return isKeyable$1(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
14780
+ }
14781
+ var _getMapData = getMapData$5;
14782
+ var getMapData$4 = _getMapData;
14783
+ function mapCacheDelete$2(key) {
14784
+ var result = getMapData$4(this, key)["delete"](key);
14785
+ this.size -= result ? 1 : 0;
14786
+ return result;
14787
+ }
14788
+ var _mapCacheDelete = mapCacheDelete$2;
14789
+ var getMapData$3 = _getMapData;
14790
+ function mapCacheGet$2(key) {
14791
+ return getMapData$3(this, key).get(key);
14792
+ }
14793
+ var _mapCacheGet = mapCacheGet$2;
14794
+ var getMapData$2 = _getMapData;
14795
+ function mapCacheHas$2(key) {
14796
+ return getMapData$2(this, key).has(key);
14797
+ }
14798
+ var _mapCacheHas = mapCacheHas$2;
14799
+ var getMapData$1 = _getMapData;
14800
+ function mapCacheSet$2(key, value) {
14801
+ var data2 = getMapData$1(this, key), size2 = data2.size;
14802
+ data2.set(key, value);
14803
+ this.size += data2.size == size2 ? 0 : 1;
14804
+ return this;
14805
+ }
14806
+ var _mapCacheSet = mapCacheSet$2;
14807
+ var mapCacheClear$1 = _mapCacheClear, mapCacheDelete$1 = _mapCacheDelete, mapCacheGet$1 = _mapCacheGet, mapCacheHas$1 = _mapCacheHas, mapCacheSet$1 = _mapCacheSet;
14808
+ function MapCache$3(entries) {
14809
+ var index = -1, length = entries == null ? 0 : entries.length;
14810
+ this.clear();
14811
+ while (++index < length) {
14812
+ var entry = entries[index];
14813
+ this.set(entry[0], entry[1]);
14814
+ }
14815
+ }
14816
+ MapCache$3.prototype.clear = mapCacheClear$1;
14817
+ MapCache$3.prototype["delete"] = mapCacheDelete$1;
14818
+ MapCache$3.prototype.get = mapCacheGet$1;
14819
+ MapCache$3.prototype.has = mapCacheHas$1;
14820
+ MapCache$3.prototype.set = mapCacheSet$1;
14821
+ var _MapCache = MapCache$3;
14822
+ var ListCache$2 = _ListCache, Map$3 = _Map, MapCache$2 = _MapCache;
14823
+ var LARGE_ARRAY_SIZE = 200;
14824
+ function stackSet$1(key, value) {
14825
+ var data2 = this.__data__;
14826
+ if (data2 instanceof ListCache$2) {
14827
+ var pairs = data2.__data__;
14828
+ if (!Map$3 || pairs.length < LARGE_ARRAY_SIZE - 1) {
14829
+ pairs.push([key, value]);
14830
+ this.size = ++data2.size;
14831
+ return this;
14832
+ }
14833
+ data2 = this.__data__ = new MapCache$2(pairs);
14834
+ }
14835
+ data2.set(key, value);
14836
+ this.size = data2.size;
14837
+ return this;
14838
+ }
14839
+ var _stackSet = stackSet$1;
14840
+ var ListCache$1 = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet;
14841
+ function Stack$2(entries) {
14842
+ var data2 = this.__data__ = new ListCache$1(entries);
14843
+ this.size = data2.size;
14844
+ }
14845
+ Stack$2.prototype.clear = stackClear;
14846
+ Stack$2.prototype["delete"] = stackDelete;
14847
+ Stack$2.prototype.get = stackGet;
14848
+ Stack$2.prototype.has = stackHas;
14849
+ Stack$2.prototype.set = stackSet;
14850
+ var _Stack = Stack$2;
14851
+ function arrayEach$1(array, iteratee) {
14852
+ var index = -1, length = array == null ? 0 : array.length;
14853
+ while (++index < length) {
14854
+ if (iteratee(array[index], index, array) === false) {
14855
+ break;
14856
+ }
14857
+ }
14858
+ return array;
14859
+ }
14860
+ var _arrayEach = arrayEach$1;
14861
+ var getNative$5 = _getNative;
14862
+ var defineProperty$9 = function() {
14863
+ try {
14864
+ var func = getNative$5(Object, "defineProperty");
14865
+ func({}, "", {});
14866
+ return func;
14867
+ } catch (e) {
14868
+ }
14869
+ }();
14870
+ var _defineProperty = defineProperty$9;
14871
+ var defineProperty$8 = _defineProperty;
14872
+ function baseAssignValue$2(object, key, value) {
14873
+ if (key == "__proto__" && defineProperty$8) {
14874
+ defineProperty$8(object, key, {
14875
+ "configurable": true,
14876
+ "enumerable": true,
14877
+ "value": value,
14878
+ "writable": true
14879
+ });
14880
+ } else {
14881
+ object[key] = value;
14882
+ }
14883
+ }
14884
+ var _baseAssignValue = baseAssignValue$2;
14885
+ var baseAssignValue$1 = _baseAssignValue, eq$2 = eq_1;
14886
+ var objectProto$c = Object.prototype;
14887
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
14888
+ function assignValue$2(object, key, value) {
14889
+ var objValue = object[key];
14890
+ if (!(hasOwnProperty$9.call(object, key) && eq$2(objValue, value)) || value === void 0 && !(key in object)) {
14891
+ baseAssignValue$1(object, key, value);
14892
+ }
14893
+ }
14894
+ var _assignValue = assignValue$2;
14895
+ var assignValue$1 = _assignValue, baseAssignValue = _baseAssignValue;
14896
+ function copyObject$4(source, props, object, customizer) {
14897
+ var isNew = !object;
14898
+ object || (object = {});
14899
+ var index = -1, length = props.length;
14900
+ while (++index < length) {
14901
+ var key = props[index];
14902
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
14903
+ if (newValue === void 0) {
14904
+ newValue = source[key];
14905
+ }
14906
+ if (isNew) {
14907
+ baseAssignValue(object, key, newValue);
14908
+ } else {
14909
+ assignValue$1(object, key, newValue);
14910
+ }
14911
+ }
14912
+ return object;
14913
+ }
14914
+ var _copyObject = copyObject$4;
14915
+ function baseTimes$1(n, iteratee) {
14916
+ var index = -1, result = Array(n);
14917
+ while (++index < n) {
14918
+ result[index] = iteratee(index);
14919
+ }
14920
+ return result;
14921
+ }
14922
+ var _baseTimes = baseTimes$1;
14923
+ function isObjectLike$8(value) {
14924
+ return value != null && typeof value == "object";
14925
+ }
14926
+ var isObjectLike_1 = isObjectLike$8;
14927
+ var baseGetTag$2 = _baseGetTag, isObjectLike$7 = isObjectLike_1;
14928
+ var argsTag$3 = "[object Arguments]";
14929
+ function baseIsArguments$1(value) {
14930
+ return isObjectLike$7(value) && baseGetTag$2(value) == argsTag$3;
14931
+ }
14932
+ var _baseIsArguments = baseIsArguments$1;
14933
+ var baseIsArguments = _baseIsArguments, isObjectLike$6 = isObjectLike_1;
14934
+ var objectProto$b = Object.prototype;
14935
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
14936
+ var propertyIsEnumerable$1 = objectProto$b.propertyIsEnumerable;
14937
+ var isArguments$1 = baseIsArguments(function() {
14938
+ return arguments;
14939
+ }()) ? baseIsArguments : function(value) {
14940
+ return isObjectLike$6(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
14941
+ };
14942
+ var isArguments_1 = isArguments$1;
14943
+ var isArray$6 = Array.isArray;
14944
+ var isArray_1 = isArray$6;
14945
+ var isBuffer$3 = { exports: {} };
14946
+ function stubFalse() {
14947
+ return false;
14948
+ }
14949
+ var stubFalse_1 = stubFalse;
14950
+ (function(module, exports) {
14951
+ var root2 = _root, stubFalse2 = stubFalse_1;
14952
+ var freeExports = exports && !exports.nodeType && exports;
14953
+ var freeModule = freeExports && true && module && !module.nodeType && module;
14954
+ var moduleExports = freeModule && freeModule.exports === freeExports;
14955
+ var Buffer2 = moduleExports ? root2.Buffer : void 0;
14956
+ var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
14957
+ var isBuffer2 = nativeIsBuffer || stubFalse2;
14958
+ module.exports = isBuffer2;
14959
+ })(isBuffer$3, isBuffer$3.exports);
14960
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
14961
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
14962
+ function isIndex$1(value, length) {
14963
+ var type = typeof value;
14964
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
14965
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
14966
+ }
14967
+ var _isIndex = isIndex$1;
14968
+ var MAX_SAFE_INTEGER = 9007199254740991;
14969
+ function isLength$2(value) {
14970
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
14971
+ }
14972
+ var isLength_1 = isLength$2;
14973
+ var baseGetTag$1 = _baseGetTag, isLength$1 = isLength_1, isObjectLike$5 = isObjectLike_1;
14974
+ var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$2 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
14975
+ var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
14976
+ var typedArrayTags = {};
14977
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
14978
+ typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$2] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
14979
+ function baseIsTypedArray$1(value) {
14980
+ return isObjectLike$5(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)];
14981
+ }
14982
+ var _baseIsTypedArray = baseIsTypedArray$1;
14983
+ function baseUnary$3(func) {
14984
+ return function(value) {
14985
+ return func(value);
14986
+ };
14987
+ }
14988
+ var _baseUnary = baseUnary$3;
14989
+ var _nodeUtil = { exports: {} };
14990
+ (function(module, exports) {
14991
+ var freeGlobal2 = _freeGlobal;
14992
+ var freeExports = exports && !exports.nodeType && exports;
14993
+ var freeModule = freeExports && true && module && !module.nodeType && module;
14994
+ var moduleExports = freeModule && freeModule.exports === freeExports;
14995
+ var freeProcess = moduleExports && freeGlobal2.process;
14996
+ var nodeUtil2 = function() {
14997
+ try {
14998
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
14999
+ if (types) {
15000
+ return types;
15001
+ }
15002
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
15003
+ } catch (e) {
15004
+ }
15005
+ }();
15006
+ module.exports = nodeUtil2;
15007
+ })(_nodeUtil, _nodeUtil.exports);
15008
+ var baseIsTypedArray = _baseIsTypedArray, baseUnary$2 = _baseUnary, nodeUtil$2 = _nodeUtil.exports;
15009
+ var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
15010
+ var isTypedArray$2 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
15011
+ var isTypedArray_1 = isTypedArray$2;
15012
+ var baseTimes = _baseTimes, isArguments = isArguments_1, isArray$5 = isArray_1, isBuffer$2 = isBuffer$3.exports, isIndex = _isIndex, isTypedArray$1 = isTypedArray_1;
15013
+ var objectProto$a = Object.prototype;
15014
+ var hasOwnProperty$7 = objectProto$a.hasOwnProperty;
15015
+ function arrayLikeKeys$2(value, inherited) {
15016
+ var isArr = isArray$5(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer$2(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
15017
+ for (var key in value) {
15018
+ if ((inherited || hasOwnProperty$7.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
15019
+ result.push(key);
15020
+ }
15021
+ }
15022
+ return result;
15023
+ }
15024
+ var _arrayLikeKeys = arrayLikeKeys$2;
15025
+ var objectProto$9 = Object.prototype;
15026
+ function isPrototype$3(value) {
15027
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$9;
15028
+ return value === proto;
15029
+ }
15030
+ var _isPrototype = isPrototype$3;
15031
+ function overArg$2(func, transform) {
15032
+ return function(arg) {
15033
+ return func(transform(arg));
15034
+ };
15035
+ }
15036
+ var _overArg = overArg$2;
15037
+ var overArg$1 = _overArg;
15038
+ var nativeKeys$1 = overArg$1(Object.keys, Object);
15039
+ var _nativeKeys = nativeKeys$1;
15040
+ var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys;
15041
+ var objectProto$8 = Object.prototype;
15042
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
15043
+ function baseKeys$1(object) {
15044
+ if (!isPrototype$2(object)) {
15045
+ return nativeKeys(object);
15046
+ }
15047
+ var result = [];
15048
+ for (var key in Object(object)) {
15049
+ if (hasOwnProperty$6.call(object, key) && key != "constructor") {
15050
+ result.push(key);
15051
+ }
15052
+ }
15053
+ return result;
15054
+ }
15055
+ var _baseKeys = baseKeys$1;
15056
+ var isFunction$1 = isFunction_1, isLength = isLength_1;
15057
+ function isArrayLike$2(value) {
15058
+ return value != null && isLength(value.length) && !isFunction$1(value);
15059
+ }
15060
+ var isArrayLike_1 = isArrayLike$2;
15061
+ var arrayLikeKeys$1 = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike$1 = isArrayLike_1;
15062
+ function keys$4(object) {
15063
+ return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object);
15064
+ }
15065
+ var keys_1 = keys$4;
15066
+ var copyObject$3 = _copyObject, keys$3 = keys_1;
15067
+ function baseAssign$1(object, source) {
15068
+ return object && copyObject$3(source, keys$3(source), object);
15069
+ }
15070
+ var _baseAssign = baseAssign$1;
15071
+ function nativeKeysIn$1(object) {
15072
+ var result = [];
15073
+ if (object != null) {
15074
+ for (var key in Object(object)) {
15075
+ result.push(key);
15076
+ }
15077
+ }
15078
+ return result;
15079
+ }
15080
+ var _nativeKeysIn = nativeKeysIn$1;
15081
+ var isObject$i = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
15082
+ var objectProto$7 = Object.prototype;
15083
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
15084
+ function baseKeysIn$1(object) {
15085
+ if (!isObject$i(object)) {
15086
+ return nativeKeysIn(object);
15087
+ }
15088
+ var isProto = isPrototype$1(object), result = [];
15089
+ for (var key in object) {
15090
+ if (!(key == "constructor" && (isProto || !hasOwnProperty$5.call(object, key)))) {
15091
+ result.push(key);
15092
+ }
15093
+ }
15094
+ return result;
15095
+ }
15096
+ var _baseKeysIn = baseKeysIn$1;
15097
+ var arrayLikeKeys = _arrayLikeKeys, baseKeysIn = _baseKeysIn, isArrayLike = isArrayLike_1;
15098
+ function keysIn$3(object) {
15099
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
15100
+ }
15101
+ var keysIn_1 = keysIn$3;
15102
+ var copyObject$2 = _copyObject, keysIn$2 = keysIn_1;
15103
+ function baseAssignIn$1(object, source) {
15104
+ return object && copyObject$2(source, keysIn$2(source), object);
15105
+ }
15106
+ var _baseAssignIn = baseAssignIn$1;
15107
+ var _cloneBuffer = { exports: {} };
15108
+ (function(module, exports) {
15109
+ var root2 = _root;
15110
+ var freeExports = exports && !exports.nodeType && exports;
15111
+ var freeModule = freeExports && true && module && !module.nodeType && module;
15112
+ var moduleExports = freeModule && freeModule.exports === freeExports;
15113
+ var Buffer2 = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
15114
+ function cloneBuffer2(buffer, isDeep) {
15115
+ if (isDeep) {
15116
+ return buffer.slice();
15117
+ }
15118
+ var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
15119
+ buffer.copy(result);
15120
+ return result;
15121
+ }
15122
+ module.exports = cloneBuffer2;
15123
+ })(_cloneBuffer, _cloneBuffer.exports);
15124
+ function copyArray$1(source, array) {
15125
+ var index = -1, length = source.length;
15126
+ array || (array = Array(length));
15127
+ while (++index < length) {
15128
+ array[index] = source[index];
15129
+ }
15130
+ return array;
15131
+ }
15132
+ var _copyArray = copyArray$1;
15133
+ function arrayFilter$1(array, predicate) {
15134
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
15135
+ while (++index < length) {
15136
+ var value = array[index];
15137
+ if (predicate(value, index, array)) {
15138
+ result[resIndex++] = value;
15139
+ }
15140
+ }
15141
+ return result;
15142
+ }
15143
+ var _arrayFilter = arrayFilter$1;
15144
+ function stubArray$2() {
15145
+ return [];
15146
+ }
15147
+ var stubArray_1 = stubArray$2;
15148
+ var arrayFilter = _arrayFilter, stubArray$1 = stubArray_1;
15149
+ var objectProto$6 = Object.prototype;
15150
+ var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
15151
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
15152
+ var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
15153
+ if (object == null) {
15154
+ return [];
15155
+ }
15156
+ object = Object(object);
15157
+ return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
15158
+ return propertyIsEnumerable.call(object, symbol);
15159
+ });
15160
+ };
15161
+ var _getSymbols = getSymbols$3;
15162
+ var copyObject$1 = _copyObject, getSymbols$2 = _getSymbols;
15163
+ function copySymbols$1(source, object) {
15164
+ return copyObject$1(source, getSymbols$2(source), object);
15165
+ }
15166
+ var _copySymbols = copySymbols$1;
15167
+ function arrayPush$2(array, values2) {
15168
+ var index = -1, length = values2.length, offset2 = array.length;
15169
+ while (++index < length) {
15170
+ array[offset2 + index] = values2[index];
15171
+ }
15172
+ return array;
15173
+ }
15174
+ var _arrayPush = arrayPush$2;
15175
+ var overArg = _overArg;
15176
+ var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
15177
+ var _getPrototype = getPrototype$2;
15178
+ var arrayPush$1 = _arrayPush, getPrototype$1 = _getPrototype, getSymbols$1 = _getSymbols, stubArray = stubArray_1;
15179
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
15180
+ var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
15181
+ var result = [];
15182
+ while (object) {
15183
+ arrayPush$1(result, getSymbols$1(object));
15184
+ object = getPrototype$1(object);
15185
+ }
15186
+ return result;
15187
+ };
15188
+ var _getSymbolsIn = getSymbolsIn$2;
15189
+ var copyObject = _copyObject, getSymbolsIn$1 = _getSymbolsIn;
15190
+ function copySymbolsIn$1(source, object) {
15191
+ return copyObject(source, getSymbolsIn$1(source), object);
15192
+ }
15193
+ var _copySymbolsIn = copySymbolsIn$1;
15194
+ var arrayPush = _arrayPush, isArray$4 = isArray_1;
15195
+ function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
15196
+ var result = keysFunc(object);
15197
+ return isArray$4(object) ? result : arrayPush(result, symbolsFunc(object));
15198
+ }
15199
+ var _baseGetAllKeys = baseGetAllKeys$2;
15200
+ var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols = _getSymbols, keys$2 = keys_1;
15201
+ function getAllKeys$2(object) {
15202
+ return baseGetAllKeys$1(object, keys$2, getSymbols);
15203
+ }
15204
+ var _getAllKeys = getAllKeys$2;
15205
+ var baseGetAllKeys = _baseGetAllKeys, getSymbolsIn = _getSymbolsIn, keysIn$1 = keysIn_1;
15206
+ function getAllKeysIn$1(object) {
15207
+ return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
15208
+ }
15209
+ var _getAllKeysIn = getAllKeysIn$1;
15210
+ var getNative$4 = _getNative, root$7 = _root;
15211
+ var DataView$1 = getNative$4(root$7, "DataView");
15212
+ var _DataView = DataView$1;
15213
+ var getNative$3 = _getNative, root$6 = _root;
15214
+ var Promise$2 = getNative$3(root$6, "Promise");
15215
+ var _Promise = Promise$2;
15216
+ var getNative$2 = _getNative, root$5 = _root;
15217
+ var Set$2 = getNative$2(root$5, "Set");
15218
+ var _Set = Set$2;
15219
+ var getNative$1 = _getNative, root$4 = _root;
15220
+ var WeakMap$4 = getNative$1(root$4, "WeakMap");
15221
+ var _WeakMap = WeakMap$4;
15222
+ var DataView = _DataView, Map$2 = _Map, Promise$1 = _Promise, Set$1 = _Set, WeakMap$3 = _WeakMap, baseGetTag = _baseGetTag, toSource$1 = _toSource;
15223
+ var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
15224
+ var dataViewTag$3 = "[object DataView]";
15225
+ var dataViewCtorString = toSource$1(DataView), mapCtorString = toSource$1(Map$2), promiseCtorString = toSource$1(Promise$1), setCtorString = toSource$1(Set$1), weakMapCtorString = toSource$1(WeakMap$3);
15226
+ var getTag$4 = baseGetTag;
15227
+ if (DataView && getTag$4(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$2 && getTag$4(new Map$2()) != mapTag$4 || Promise$1 && getTag$4(Promise$1.resolve()) != promiseTag || Set$1 && getTag$4(new Set$1()) != setTag$4 || WeakMap$3 && getTag$4(new WeakMap$3()) != weakMapTag$1) {
15228
+ getTag$4 = function(value) {
15229
+ var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource$1(Ctor) : "";
15230
+ if (ctorString) {
15231
+ switch (ctorString) {
15232
+ case dataViewCtorString:
15233
+ return dataViewTag$3;
15234
+ case mapCtorString:
15235
+ return mapTag$4;
15236
+ case promiseCtorString:
15237
+ return promiseTag;
15238
+ case setCtorString:
15239
+ return setTag$4;
15240
+ case weakMapCtorString:
15241
+ return weakMapTag$1;
15242
+ }
15243
+ }
15244
+ return result;
15245
+ };
15246
+ }
15247
+ var _getTag = getTag$4;
15248
+ var objectProto$5 = Object.prototype;
15249
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
15250
+ function initCloneArray$1(array) {
15251
+ var length = array.length, result = new array.constructor(length);
15252
+ if (length && typeof array[0] == "string" && hasOwnProperty$4.call(array, "index")) {
15253
+ result.index = array.index;
15254
+ result.input = array.input;
15255
+ }
15256
+ return result;
15257
+ }
15258
+ var _initCloneArray = initCloneArray$1;
15259
+ var root$3 = _root;
15260
+ var Uint8Array$2 = root$3.Uint8Array;
15261
+ var _Uint8Array = Uint8Array$2;
15262
+ var Uint8Array$1 = _Uint8Array;
15263
+ function cloneArrayBuffer$3(arrayBuffer) {
15264
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
15265
+ new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
15266
+ return result;
15267
+ }
15268
+ var _cloneArrayBuffer = cloneArrayBuffer$3;
15269
+ var cloneArrayBuffer$2 = _cloneArrayBuffer;
15270
+ function cloneDataView$1(dataView, isDeep) {
15271
+ var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
15272
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
15273
+ }
15274
+ var _cloneDataView = cloneDataView$1;
15275
+ var reFlags = /\w*$/;
15276
+ function cloneRegExp$1(regexp) {
15277
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
15278
+ result.lastIndex = regexp.lastIndex;
15279
+ return result;
15280
+ }
15281
+ var _cloneRegExp = cloneRegExp$1;
15282
+ var Symbol$4 = _Symbol;
15283
+ var symbolProto$1 = Symbol$4 ? Symbol$4.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
15284
+ function cloneSymbol$1(symbol) {
15285
+ return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
15286
+ }
15287
+ var _cloneSymbol = cloneSymbol$1;
15288
+ var cloneArrayBuffer$1 = _cloneArrayBuffer;
15289
+ function cloneTypedArray$1(typedArray, isDeep) {
15290
+ var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
15291
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
15292
+ }
15293
+ var _cloneTypedArray = cloneTypedArray$1;
15294
+ var cloneArrayBuffer = _cloneArrayBuffer, cloneDataView = _cloneDataView, cloneRegExp = _cloneRegExp, cloneSymbol = _cloneSymbol, cloneTypedArray = _cloneTypedArray;
15295
+ var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$4 = "[object Symbol]";
15296
+ var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
15297
+ function initCloneByTag$1(object, tag, isDeep) {
15298
+ var Ctor = object.constructor;
15299
+ switch (tag) {
15300
+ case arrayBufferTag$2:
15301
+ return cloneArrayBuffer(object);
15302
+ case boolTag$2:
15303
+ case dateTag$2:
15304
+ return new Ctor(+object);
15305
+ case dataViewTag$2:
15306
+ return cloneDataView(object, isDeep);
15307
+ case float32Tag$1:
15308
+ case float64Tag$1:
15309
+ case int8Tag$1:
15310
+ case int16Tag$1:
15311
+ case int32Tag$1:
15312
+ case uint8Tag$1:
15313
+ case uint8ClampedTag$1:
15314
+ case uint16Tag$1:
15315
+ case uint32Tag$1:
15316
+ return cloneTypedArray(object, isDeep);
15317
+ case mapTag$3:
15318
+ return new Ctor();
15319
+ case numberTag$2:
15320
+ case stringTag$2:
15321
+ return new Ctor(object);
15322
+ case regexpTag$2:
15323
+ return cloneRegExp(object);
15324
+ case setTag$3:
15325
+ return new Ctor();
15326
+ case symbolTag$4:
15327
+ return cloneSymbol(object);
15328
+ }
15329
+ }
15330
+ var _initCloneByTag = initCloneByTag$1;
15331
+ var isObject$h = isObject_1;
15332
+ var objectCreate$1 = Object.create;
15333
+ var baseCreate$1 = function() {
15334
+ function object() {
15335
+ }
15336
+ return function(proto) {
15337
+ if (!isObject$h(proto)) {
15338
+ return {};
15339
+ }
15340
+ if (objectCreate$1) {
15341
+ return objectCreate$1(proto);
15342
+ }
15343
+ object.prototype = proto;
15344
+ var result = new object();
15345
+ object.prototype = void 0;
15346
+ return result;
15347
+ };
15348
+ }();
15349
+ var _baseCreate = baseCreate$1;
15350
+ var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype = _isPrototype;
15351
+ function initCloneObject$1(object) {
15352
+ return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
15353
+ }
15354
+ var _initCloneObject = initCloneObject$1;
15355
+ var getTag$3 = _getTag, isObjectLike$4 = isObjectLike_1;
15356
+ var mapTag$2 = "[object Map]";
15357
+ function baseIsMap$1(value) {
15358
+ return isObjectLike$4(value) && getTag$3(value) == mapTag$2;
15359
+ }
15360
+ var _baseIsMap = baseIsMap$1;
15361
+ var baseIsMap = _baseIsMap, baseUnary$1 = _baseUnary, nodeUtil$1 = _nodeUtil.exports;
15362
+ var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
15363
+ var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
15364
+ var isMap_1 = isMap$1;
15365
+ var getTag$2 = _getTag, isObjectLike$3 = isObjectLike_1;
15366
+ var setTag$2 = "[object Set]";
15367
+ function baseIsSet$1(value) {
15368
+ return isObjectLike$3(value) && getTag$2(value) == setTag$2;
15369
+ }
15370
+ var _baseIsSet = baseIsSet$1;
15371
+ var baseIsSet = _baseIsSet, baseUnary = _baseUnary, nodeUtil = _nodeUtil.exports;
15372
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
15373
+ var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
15374
+ var isSet_1 = isSet$1;
15375
+ var Stack$1 = _Stack, arrayEach = _arrayEach, assignValue = _assignValue, baseAssign = _baseAssign, baseAssignIn = _baseAssignIn, cloneBuffer = _cloneBuffer.exports, copyArray = _copyArray, copySymbols = _copySymbols, copySymbolsIn = _copySymbolsIn, getAllKeys$1 = _getAllKeys, getAllKeysIn = _getAllKeysIn, getTag$1 = _getTag, initCloneArray = _initCloneArray, initCloneByTag = _initCloneByTag, initCloneObject = _initCloneObject, isArray$3 = isArray_1, isBuffer$1 = isBuffer$3.exports, isMap = isMap_1, isObject$g = isObject_1, isSet = isSet_1, keys$1 = keys_1, keysIn = keysIn_1;
15376
+ var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
15377
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag$1 = "[object Function]", genTag$1 = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$3 = "[object Symbol]", weakMapTag = "[object WeakMap]";
15378
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
15379
+ var cloneableTags = {};
15380
+ cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$3] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
15381
+ cloneableTags[errorTag$1] = cloneableTags[funcTag$1] = cloneableTags[weakMapTag] = false;
15382
+ function baseClone$1(value, bitmask, customizer, key, object, stack) {
15383
+ var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
15384
+ if (customizer) {
15385
+ result = object ? customizer(value, key, object, stack) : customizer(value);
15386
+ }
15387
+ if (result !== void 0) {
15388
+ return result;
15389
+ }
15390
+ if (!isObject$g(value)) {
15391
+ return value;
15392
+ }
15393
+ var isArr = isArray$3(value);
15394
+ if (isArr) {
15395
+ result = initCloneArray(value);
15396
+ if (!isDeep) {
15397
+ return copyArray(value, result);
15398
+ }
15399
+ } else {
15400
+ var tag = getTag$1(value), isFunc = tag == funcTag$1 || tag == genTag$1;
15401
+ if (isBuffer$1(value)) {
15402
+ return cloneBuffer(value, isDeep);
15403
+ }
15404
+ if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
15405
+ result = isFlat || isFunc ? {} : initCloneObject(value);
15406
+ if (!isDeep) {
15407
+ return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
15408
+ }
15409
+ } else {
15410
+ if (!cloneableTags[tag]) {
15411
+ return object ? value : {};
15412
+ }
15413
+ result = initCloneByTag(value, tag, isDeep);
15414
+ }
15415
+ }
15416
+ stack || (stack = new Stack$1());
15417
+ var stacked = stack.get(value);
15418
+ if (stacked) {
15419
+ return stacked;
15420
+ }
15421
+ stack.set(value, result);
15422
+ if (isSet(value)) {
15423
+ value.forEach(function(subValue) {
15424
+ result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
15425
+ });
15426
+ } else if (isMap(value)) {
15427
+ value.forEach(function(subValue, key2) {
15428
+ result.set(key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
15429
+ });
15430
+ }
15431
+ var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys$1 : isFlat ? keysIn : keys$1;
15432
+ var props = isArr ? void 0 : keysFunc(value);
15433
+ arrayEach(props || value, function(subValue, key2) {
15434
+ if (props) {
15435
+ key2 = subValue;
15436
+ subValue = value[key2];
15437
+ }
15438
+ assignValue(result, key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
15439
+ });
15440
+ return result;
15441
+ }
15442
+ var _baseClone = baseClone$1;
15443
+ var baseClone = _baseClone;
15444
+ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
15445
+ function cloneDeep(value) {
15446
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
15447
+ }
15448
+ var cloneDeep_1 = cloneDeep;
15449
+ function copyMark(mark) {
15450
+ return mark.type.create(cloneDeep_1(mark.attrs));
15451
+ }
14485
15452
  var render$D = function __render__6() {
14486
15453
  var _vm = this;
14487
15454
  var _h = _vm.$createElement;
@@ -14559,7 +15526,6 @@ function __vue2_injectStyles$D(context) {
14559
15526
  const Icon = /* @__PURE__ */ function() {
14560
15527
  return __component__$D.exports;
14561
15528
  }();
14562
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
14563
15529
  var check = function(it) {
14564
15530
  return it && it.Math == Math && it;
14565
15531
  };
@@ -14630,9 +15596,9 @@ var toObject$6 = function(argument) {
14630
15596
  };
14631
15597
  var uncurryThis$p = functionUncurryThis;
14632
15598
  var toObject$5 = toObject$6;
14633
- var hasOwnProperty$1 = uncurryThis$p({}.hasOwnProperty);
15599
+ var hasOwnProperty$3 = uncurryThis$p({}.hasOwnProperty);
14634
15600
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
14635
- return hasOwnProperty$1(toObject$5(it), key);
15601
+ return hasOwnProperty$3(toObject$5(it), key);
14636
15602
  };
14637
15603
  var uncurryThis$o = functionUncurryThis;
14638
15604
  var id$2 = 0;
@@ -14689,14 +15655,14 @@ var uid$2 = uid$3;
14689
15655
  var NATIVE_SYMBOL = nativeSymbol;
14690
15656
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
14691
15657
  var WellKnownSymbolsStore = shared$3("wks");
14692
- var Symbol$2 = global$f.Symbol;
14693
- var symbolFor = Symbol$2 && Symbol$2["for"];
14694
- var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$2;
15658
+ var Symbol$3 = global$f.Symbol;
15659
+ var symbolFor = Symbol$3 && Symbol$3["for"];
15660
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$3 : Symbol$3 && Symbol$3.withoutSetter || uid$2;
14695
15661
  var wellKnownSymbol$f = function(name) {
14696
15662
  if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == "string")) {
14697
15663
  var description = "Symbol." + name;
14698
- if (NATIVE_SYMBOL && hasOwn$a(Symbol$2, name)) {
14699
- WellKnownSymbolsStore[name] = Symbol$2[name];
15664
+ if (NATIVE_SYMBOL && hasOwn$a(Symbol$3, name)) {
15665
+ WellKnownSymbolsStore[name] = Symbol$3[name];
14700
15666
  } else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
14701
15667
  WellKnownSymbolsStore[name] = symbolFor(description);
14702
15668
  } else {
@@ -15200,7 +16166,7 @@ var lengthOfArrayLike$5 = function(obj) {
15200
16166
  return toLength$2(obj.length);
15201
16167
  };
15202
16168
  var classof$7 = classofRaw$1;
15203
- var isArray$1 = Array.isArray || function isArray(argument) {
16169
+ var isArray$2 = Array.isArray || function isArray(argument) {
15204
16170
  return classof$7(argument) == "Array";
15205
16171
  };
15206
16172
  var uncurryThis$h = functionUncurryThis;
@@ -15248,7 +16214,7 @@ var isConstructor$1 = !construct || fails$g(function() {
15248
16214
  called = true;
15249
16215
  }) || called;
15250
16216
  }) ? isConstructorLegacy : isConstructorModern;
15251
- var isArray2 = isArray$1;
16217
+ var isArray$1 = isArray$2;
15252
16218
  var isConstructor3 = isConstructor$1;
15253
16219
  var isObject$9 = isObject$f;
15254
16220
  var wellKnownSymbol$b = wellKnownSymbol$f;
@@ -15256,9 +16222,9 @@ var SPECIES$2 = wellKnownSymbol$b("species");
15256
16222
  var $Array$1 = Array;
15257
16223
  var arraySpeciesConstructor$1 = function(originalArray) {
15258
16224
  var C;
15259
- if (isArray2(originalArray)) {
16225
+ if (isArray$1(originalArray)) {
15260
16226
  C = originalArray.constructor;
15261
- if (isConstructor3(C) && (C === $Array$1 || isArray2(C.prototype)))
16227
+ if (isConstructor3(C) && (C === $Array$1 || isArray$1(C.prototype)))
15262
16228
  C = void 0;
15263
16229
  else if (isObject$9(C)) {
15264
16230
  C = C[SPECIES$2];
@@ -15377,7 +16343,7 @@ var objectPropertyIsEnumerable = {};
15377
16343
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
15378
16344
  var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
15379
16345
  var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
15380
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
16346
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable2(V) {
15381
16347
  var descriptor = getOwnPropertyDescriptor$1(this, V);
15382
16348
  return !!descriptor && descriptor.enumerable;
15383
16349
  } : $propertyIsEnumerable;
@@ -15594,8 +16560,8 @@ var toString$5 = toString$7;
15594
16560
  var trim = stringTrim.trim;
15595
16561
  var whitespaces = whitespaces$2;
15596
16562
  var $parseInt$1 = global$9.parseInt;
15597
- var Symbol$1 = global$9.Symbol;
15598
- var ITERATOR$6 = Symbol$1 && Symbol$1.iterator;
16563
+ var Symbol$2 = global$9.Symbol;
16564
+ var ITERATOR$6 = Symbol$2 && Symbol$2.iterator;
15599
16565
  var hex = /^[+-]?0x/i;
15600
16566
  var exec$1 = uncurryThis$c(hex.exec);
15601
16567
  var FORCED = $parseInt$1(whitespaces + "08") !== 8 || $parseInt$1(whitespaces + "0x16") !== 22 || ITERATOR$6 && !fails$d(function() {
@@ -15652,7 +16618,7 @@ var objectAssign = !$assign || fails$c(function() {
15652
16618
  var argumentsLength = arguments.length;
15653
16619
  var index = 1;
15654
16620
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
15655
- var propertyIsEnumerable2 = propertyIsEnumerableModule.f;
16621
+ var propertyIsEnumerable3 = propertyIsEnumerableModule.f;
15656
16622
  while (argumentsLength > index) {
15657
16623
  var S = IndexedObject$1(arguments[index++]);
15658
16624
  var keys3 = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
@@ -15661,7 +16627,7 @@ var objectAssign = !$assign || fails$c(function() {
15661
16627
  var key;
15662
16628
  while (length > j) {
15663
16629
  key = keys3[j++];
15664
- if (!DESCRIPTORS$3 || call$9(propertyIsEnumerable2, S, key))
16630
+ if (!DESCRIPTORS$3 || call$9(propertyIsEnumerable3, S, key))
15665
16631
  T[key] = S[key];
15666
16632
  }
15667
16633
  }
@@ -16732,7 +17698,7 @@ for (var COLLECTION_NAME in DOMIterables) {
16732
17698
  handlePrototype(DOMTokenListPrototype, "DOMTokenList");
16733
17699
  var FUNC_ERROR_TEXT$2 = "Expected a function";
16734
17700
  var NAN$1 = 0 / 0;
16735
- var symbolTag$1 = "[object Symbol]";
17701
+ var symbolTag$2 = "[object Symbol]";
16736
17702
  var reTrim$1 = /^\s+|\s+$/g;
16737
17703
  var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
16738
17704
  var reIsBinary$1 = /^0b[01]+$/i;
@@ -16741,8 +17707,8 @@ var freeParseInt$1 = parseInt;
16741
17707
  var freeGlobal$2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
16742
17708
  var freeSelf$2 = typeof self == "object" && self && self.Object === Object && self;
16743
17709
  var root$2 = freeGlobal$2 || freeSelf$2 || Function("return this")();
16744
- var objectProto$2 = Object.prototype;
16745
- var objectToString$2 = objectProto$2.toString;
17710
+ var objectProto$4 = Object.prototype;
17711
+ var objectToString$2 = objectProto$4.toString;
16746
17712
  var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
16747
17713
  var now$1 = function() {
16748
17714
  return root$2.Date.now();
@@ -16846,11 +17812,11 @@ function isObject$2(value) {
16846
17812
  var type = typeof value;
16847
17813
  return !!value && (type == "object" || type == "function");
16848
17814
  }
16849
- function isObjectLike$1(value) {
17815
+ function isObjectLike$2(value) {
16850
17816
  return !!value && typeof value == "object";
16851
17817
  }
16852
17818
  function isSymbol$1(value) {
16853
- return typeof value == "symbol" || isObjectLike$1(value) && objectToString$2.call(value) == symbolTag$1;
17819
+ return typeof value == "symbol" || isObjectLike$2(value) && objectToString$2.call(value) == symbolTag$2;
16854
17820
  }
16855
17821
  function toNumber$1(value) {
16856
17822
  if (typeof value == "number") {
@@ -16873,7 +17839,7 @@ function toNumber$1(value) {
16873
17839
  var lodash_throttle = throttle;
16874
17840
  var FUNC_ERROR_TEXT$1 = "Expected a function";
16875
17841
  var NAN = 0 / 0;
16876
- var symbolTag = "[object Symbol]";
17842
+ var symbolTag$1 = "[object Symbol]";
16877
17843
  var reTrim = /^\s+|\s+$/g;
16878
17844
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
16879
17845
  var reIsBinary = /^0b[01]+$/i;
@@ -16882,8 +17848,8 @@ var freeParseInt = parseInt;
16882
17848
  var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
16883
17849
  var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
16884
17850
  var root$1 = freeGlobal$1 || freeSelf$1 || Function("return this")();
16885
- var objectProto$1 = Object.prototype;
16886
- var objectToString$1 = objectProto$1.toString;
17851
+ var objectProto$3 = Object.prototype;
17852
+ var objectToString$1 = objectProto$3.toString;
16887
17853
  var nativeMax = Math.max, nativeMin = Math.min;
16888
17854
  var now = function() {
16889
17855
  return root$1.Date.now();
@@ -16972,11 +17938,11 @@ function isObject$1(value) {
16972
17938
  var type = typeof value;
16973
17939
  return !!value && (type == "object" || type == "function");
16974
17940
  }
16975
- function isObjectLike(value) {
17941
+ function isObjectLike$1(value) {
16976
17942
  return !!value && typeof value == "object";
16977
17943
  }
16978
17944
  function isSymbol(value) {
16979
- return typeof value == "symbol" || isObjectLike(value) && objectToString$1.call(value) == symbolTag;
17945
+ return typeof value == "symbol" || isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1;
16980
17946
  }
16981
17947
  function toNumber(value) {
16982
17948
  if (typeof value == "number") {
@@ -16998,7 +17964,7 @@ function toNumber(value) {
16998
17964
  }
16999
17965
  var lodash_debounce = debounce;
17000
17966
  var FUNC_ERROR_TEXT = "Expected a function";
17001
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
17967
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
17002
17968
  var funcTag = "[object Function]", genTag = "[object GeneratorFunction]";
17003
17969
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
17004
17970
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
@@ -17018,17 +17984,17 @@ function isHostObject(value) {
17018
17984
  }
17019
17985
  return result;
17020
17986
  }
17021
- var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
17987
+ var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto$2 = Object.prototype;
17022
17988
  var coreJsData = root["__core-js_shared__"];
17023
17989
  var maskSrcKey = function() {
17024
17990
  var uid2 = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
17025
17991
  return uid2 ? "Symbol(src)_1." + uid2 : "";
17026
17992
  }();
17027
17993
  var funcToString = funcProto.toString;
17028
- var hasOwnProperty = objectProto.hasOwnProperty;
17029
- var objectToString = objectProto.toString;
17994
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
17995
+ var objectToString = objectProto$2.toString;
17030
17996
  var reIsNative = RegExp(
17031
- "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
17997
+ "^" + funcToString.call(hasOwnProperty$2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
17032
17998
  );
17033
17999
  var splice = arrayProto.splice;
17034
18000
  var Map$1 = getNative(root, "Map"), nativeCreate = getNative(Object, "create");
@@ -17050,17 +18016,17 @@ function hashGet(key) {
17050
18016
  var data2 = this.__data__;
17051
18017
  if (nativeCreate) {
17052
18018
  var result = data2[key];
17053
- return result === HASH_UNDEFINED ? void 0 : result;
18019
+ return result === HASH_UNDEFINED$1 ? void 0 : result;
17054
18020
  }
17055
- return hasOwnProperty.call(data2, key) ? data2[key] : void 0;
18021
+ return hasOwnProperty$2.call(data2, key) ? data2[key] : void 0;
17056
18022
  }
17057
18023
  function hashHas(key) {
17058
18024
  var data2 = this.__data__;
17059
- return nativeCreate ? data2[key] !== void 0 : hasOwnProperty.call(data2, key);
18025
+ return nativeCreate ? data2[key] !== void 0 : hasOwnProperty$2.call(data2, key);
17060
18026
  }
17061
18027
  function hashSet(key, value) {
17062
18028
  var data2 = this.__data__;
17063
- data2[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
18029
+ data2[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
17064
18030
  return this;
17065
18031
  }
17066
18032
  Hash.prototype.clear = hashClear;
@@ -17113,7 +18079,7 @@ ListCache.prototype["delete"] = listCacheDelete;
17113
18079
  ListCache.prototype.get = listCacheGet;
17114
18080
  ListCache.prototype.has = listCacheHas;
17115
18081
  ListCache.prototype.set = listCacheSet;
17116
- function MapCache(entries) {
18082
+ function MapCache$1(entries) {
17117
18083
  var index = -1, length = entries ? entries.length : 0;
17118
18084
  this.clear();
17119
18085
  while (++index < length) {
@@ -17141,15 +18107,15 @@ function mapCacheSet(key, value) {
17141
18107
  getMapData(this, key).set(key, value);
17142
18108
  return this;
17143
18109
  }
17144
- MapCache.prototype.clear = mapCacheClear;
17145
- MapCache.prototype["delete"] = mapCacheDelete;
17146
- MapCache.prototype.get = mapCacheGet;
17147
- MapCache.prototype.has = mapCacheHas;
17148
- MapCache.prototype.set = mapCacheSet;
18110
+ MapCache$1.prototype.clear = mapCacheClear;
18111
+ MapCache$1.prototype["delete"] = mapCacheDelete;
18112
+ MapCache$1.prototype.get = mapCacheGet;
18113
+ MapCache$1.prototype.has = mapCacheHas;
18114
+ MapCache$1.prototype.set = mapCacheSet;
17149
18115
  function assocIndexOf(array, key) {
17150
18116
  var length = array.length;
17151
18117
  while (length--) {
17152
- if (eq(array[length][0], key)) {
18118
+ if (eq$1(array[length][0], key)) {
17153
18119
  return length;
17154
18120
  }
17155
18121
  }
@@ -17203,11 +18169,11 @@ function memoize(func, resolver) {
17203
18169
  memoized.cache = cache2.set(key, result);
17204
18170
  return result;
17205
18171
  };
17206
- memoized.cache = new (memoize.Cache || MapCache)();
18172
+ memoized.cache = new (memoize.Cache || MapCache$1)();
17207
18173
  return memoized;
17208
18174
  }
17209
- memoize.Cache = MapCache;
17210
- function eq(value, other) {
18175
+ memoize.Cache = MapCache$1;
18176
+ function eq$1(value, other) {
17211
18177
  return value === other || value !== value && other !== other;
17212
18178
  }
17213
18179
  function isFunction(value) {
@@ -19529,162 +20495,658 @@ class BrowserDomParser {
19529
20495
  }
19530
20496
  }
19531
20497
  _domParser = new WeakMap();
19532
- const _ContentNormalizer = class {
19533
- static build(content, options = {}) {
19534
- return new _ContentNormalizer({
19535
- content,
19536
- parser: options.parser || new BrowserDomParser()
19537
- });
20498
+ class BaseNormalizer {
20499
+ constructor({ content }) {
20500
+ __publicField(this, "content");
20501
+ this.content = content;
19538
20502
  }
19539
- static normalize(content, options = {}) {
19540
- return _ContentNormalizer.build(content, options).normalize();
20503
+ normalize() {
20504
+ throw new Error("Implement abstract method");
19541
20505
  }
20506
+ }
20507
+ const _HtmlNormalizer = class extends BaseNormalizer {
19542
20508
  constructor({ content, parser }) {
19543
- this._content = content;
19544
- this._parser = parser;
20509
+ super({ content });
20510
+ __privateAdd(this, _NodeFilter);
20511
+ __privateAdd(this, _Node);
20512
+ __privateAdd(this, _removeComments);
20513
+ __privateAdd(this, _normalizeRootTags);
20514
+ __privateAdd(this, _createNodeIterator);
20515
+ __privateAdd(this, _iterateNodes);
20516
+ __privateAdd(this, _runIterator);
20517
+ __privateAdd(this, _removeEmptyNodes);
20518
+ __privateAdd(this, _normalizeListItems);
20519
+ __privateAdd(this, _isBlockNode);
20520
+ __privateAdd(this, _isRootNode);
20521
+ __privateAdd(this, _assignElementProperties);
20522
+ __privateAdd(this, _removeStyleProperties);
20523
+ __privateAdd(this, _normalizeBreakLines);
20524
+ __privateAdd(this, _normalizeBlockTextDecoration);
20525
+ __privateAdd(this, _moveTextDecorationToChildren);
20526
+ __privateAdd(this, _parseTextDecoration);
20527
+ __privateAdd(this, _normalizeBlockBackgroundColor);
20528
+ __privateAdd(this, _moveBackgroundColorToChildren);
20529
+ __privateAdd(this, _wrapTextNode);
20530
+ __privateAdd(this, _parser, void 0);
20531
+ __privateSet(this, _parser, parser);
19545
20532
  this.dom = null;
19546
20533
  }
19547
20534
  normalize() {
19548
- if (typeof this._content !== "string") {
19549
- return this._content;
19550
- }
19551
20535
  this.normalizeHTML();
19552
20536
  return this.normalizedHTML;
19553
20537
  }
19554
20538
  normalizeHTML() {
19555
- this.dom = this._parser.parse(this._content.replace(/(\r)?\n/g, ""));
19556
- this._removeComments();
19557
- this.iterateNodes(this._normalizeBreakLines, (node) => node.tagName === "BR");
19558
- this.iterateNodes(this._removeEmptyNodes, this._isBlockNode);
19559
- this.iterateNodes(this._normalizeListItems, (node) => node.tagName === "LI");
20539
+ this.dom = __privateGet(this, _parser).parse(this.content.replace(/(\r)?\n/g, ""));
20540
+ __privateMethod(this, _removeComments, removeComments_fn).call(this);
20541
+ __privateMethod(this, _normalizeRootTags, normalizeRootTags_fn).call(this);
20542
+ __privateMethod(this, _iterateNodes, iterateNodes_fn).call(this, __privateMethod(this, _normalizeBreakLines, normalizeBreakLines_fn), (node) => node.tagName === "BR");
20543
+ __privateMethod(this, _iterateNodes, iterateNodes_fn).call(this, __privateMethod(this, _removeEmptyNodes, removeEmptyNodes_fn), __privateMethod(this, _isBlockNode, isBlockNode_fn));
20544
+ __privateMethod(this, _iterateNodes, iterateNodes_fn).call(this, __privateMethod(this, _normalizeListItems, normalizeListItems_fn), (node) => node.tagName === "LI");
20545
+ __privateMethod(this, _normalizeBlockTextDecoration, normalizeBlockTextDecoration_fn).call(this);
20546
+ __privateMethod(this, _normalizeBlockBackgroundColor, normalizeBlockBackgroundColor_fn).call(this);
19560
20547
  }
19561
20548
  get normalizedHTML() {
19562
20549
  return this.dom.body.innerHTML;
19563
20550
  }
19564
- get _NodeFilter() {
19565
- return this._parser.types.NodeFilter;
20551
+ };
20552
+ let HtmlNormalizer = _HtmlNormalizer;
20553
+ _parser = new WeakMap();
20554
+ _NodeFilter = new WeakSet();
20555
+ NodeFilter_get = function() {
20556
+ return __privateGet(this, _parser).types.NodeFilter;
20557
+ };
20558
+ _Node = new WeakSet();
20559
+ Node_get = function() {
20560
+ return __privateGet(this, _parser).types.Node;
20561
+ };
20562
+ _removeComments = new WeakSet();
20563
+ removeComments_fn = function() {
20564
+ const iterator = __privateMethod(this, _createNodeIterator, createNodeIterator_fn).call(this, __privateGet(this, _NodeFilter, NodeFilter_get).SHOW_COMMENT);
20565
+ __privateMethod(this, _runIterator, runIterator_fn).call(this, iterator, (node) => node.remove());
20566
+ };
20567
+ _normalizeRootTags = new WeakSet();
20568
+ normalizeRootTags_fn = function() {
20569
+ const children = Array.from(this.dom.body.childNodes);
20570
+ const fragment = this.dom.createDocumentFragment();
20571
+ let capturingParagraph;
20572
+ for (const node of children) {
20573
+ if (__privateMethod(this, _isRootNode, isRootNode_fn).call(this, node)) {
20574
+ fragment.append(node);
20575
+ capturingParagraph = null;
20576
+ continue;
20577
+ }
20578
+ if (!capturingParagraph) {
20579
+ capturingParagraph = this.dom.createElement("p");
20580
+ fragment.append(capturingParagraph);
20581
+ }
20582
+ capturingParagraph.append(node);
19566
20583
  }
19567
- _removeComments() {
19568
- const iterator = this.createNodeIterator(this._NodeFilter.SHOW_COMMENT);
19569
- this.runIterator(iterator, (node) => node.remove());
20584
+ this.dom.body.innerHTML = "";
20585
+ this.dom.body.append(fragment);
20586
+ };
20587
+ _createNodeIterator = new WeakSet();
20588
+ createNodeIterator_fn = function(whatToShow, filter2) {
20589
+ return this.dom.createNodeIterator(this.dom.body, whatToShow, filter2);
20590
+ };
20591
+ _iterateNodes = new WeakSet();
20592
+ iterateNodes_fn = function(handler, condition = () => true) {
20593
+ const checkCondition = (node) => node.tagName !== "BODY" && condition.call(this, node);
20594
+ const iterator = __privateMethod(this, _createNodeIterator, createNodeIterator_fn).call(this, __privateGet(this, _NodeFilter, NodeFilter_get).SHOW_ELEMENT, {
20595
+ acceptNode: (node) => checkCondition(node) ? __privateGet(this, _NodeFilter, NodeFilter_get).FILTER_ACCEPT : __privateGet(this, _NodeFilter, NodeFilter_get).FILTER_REJECT
20596
+ });
20597
+ __privateMethod(this, _runIterator, runIterator_fn).call(this, iterator, handler);
20598
+ };
20599
+ _runIterator = new WeakSet();
20600
+ runIterator_fn = function(iterator, handler) {
20601
+ let currentNode = iterator.nextNode();
20602
+ while (currentNode) {
20603
+ handler.call(this, currentNode);
20604
+ currentNode = iterator.nextNode();
20605
+ }
20606
+ };
20607
+ _removeEmptyNodes = new WeakSet();
20608
+ removeEmptyNodes_fn = function(node) {
20609
+ if (!node.innerHTML.trim())
20610
+ node.remove();
20611
+ };
20612
+ _normalizeListItems = new WeakSet();
20613
+ normalizeListItems_fn = function(itemEl) {
20614
+ const fragment = this.dom.createDocumentFragment();
20615
+ const children = Array.from(itemEl.childNodes);
20616
+ let capturingParagraph, previousNode;
20617
+ const append2 = (node) => {
20618
+ __privateMethod(this, _assignElementProperties, assignElementProperties_fn).call(this, node, itemEl, _HtmlNormalizer.BLOCK_STYLES);
20619
+ fragment.append(node);
20620
+ };
20621
+ __privateMethod(this, _assignElementProperties, assignElementProperties_fn).call(this, itemEl, itemEl.parentElement, _HtmlNormalizer.BLOCK_STYLES);
20622
+ for (const node of children) {
20623
+ if (__privateMethod(this, _isBlockNode, isBlockNode_fn).call(this, node)) {
20624
+ append2(node);
20625
+ capturingParagraph = null;
20626
+ previousNode = node;
20627
+ continue;
20628
+ }
20629
+ if (node.tagName === "BR" && previousNode && (previousNode == null ? void 0 : previousNode.tagName) !== "BR") {
20630
+ node.remove();
20631
+ previousNode = node;
20632
+ continue;
20633
+ }
20634
+ if (node.tagName === "BR") {
20635
+ const emptyLineEl = this.dom.createElement("p");
20636
+ emptyLineEl.append(node);
20637
+ append2(emptyLineEl);
20638
+ capturingParagraph = null;
20639
+ previousNode = node;
20640
+ continue;
20641
+ }
20642
+ if (!capturingParagraph) {
20643
+ capturingParagraph = this.dom.createElement("p");
20644
+ append2(capturingParagraph);
20645
+ }
20646
+ capturingParagraph.append(node);
20647
+ previousNode = node;
19570
20648
  }
19571
- createNodeIterator(whatToShow, filter2) {
19572
- return this.dom.createNodeIterator(this.dom.body, whatToShow, filter2);
20649
+ itemEl.append(fragment);
20650
+ __privateMethod(this, _removeStyleProperties, removeStyleProperties_fn).call(this, itemEl, _HtmlNormalizer.BLOCK_STYLES);
20651
+ };
20652
+ _isBlockNode = new WeakSet();
20653
+ isBlockNode_fn = function(node) {
20654
+ return _HtmlNormalizer.BLOCK_NODE_NAMES.includes(node.tagName);
20655
+ };
20656
+ _isRootNode = new WeakSet();
20657
+ isRootNode_fn = function(node) {
20658
+ return _HtmlNormalizer.ROOT_NODE_NAMES.includes(node.tagName);
20659
+ };
20660
+ _assignElementProperties = new WeakSet();
20661
+ assignElementProperties_fn = function(target, source, properties) {
20662
+ for (const property of properties) {
20663
+ const value = source.style.getPropertyValue(property);
20664
+ if (value && !target.style.getPropertyValue(property)) {
20665
+ target.style.setProperty(property, value);
20666
+ }
19573
20667
  }
19574
- iterateNodes(handler, condition = () => true) {
19575
- const checkCondition = (node) => node.tagName !== "BODY" && condition.call(this, node);
19576
- const iterator = this.createNodeIterator(this._NodeFilter.SHOW_ELEMENT, {
19577
- acceptNode: (node) => checkCondition(node) ? this._NodeFilter.FILTER_ACCEPT : this._NodeFilter.FILTER_REJECT
19578
- });
19579
- this.runIterator(iterator, handler);
20668
+ };
20669
+ _removeStyleProperties = new WeakSet();
20670
+ removeStyleProperties_fn = function(element, properties) {
20671
+ for (const property of properties) {
20672
+ element.style.removeProperty(property);
19580
20673
  }
19581
- runIterator(iterator, handler) {
19582
- let currentNode = iterator.nextNode();
19583
- while (currentNode) {
19584
- handler.call(this, currentNode);
19585
- currentNode = iterator.nextNode();
20674
+ if (element.style.length === 0) {
20675
+ element.removeAttribute("style");
20676
+ }
20677
+ };
20678
+ _normalizeBreakLines = new WeakSet();
20679
+ normalizeBreakLines_fn = function({ parentElement }) {
20680
+ if (!__privateMethod(this, _isBlockNode, isBlockNode_fn).call(this, parentElement))
20681
+ return;
20682
+ if (!parentElement.textContent)
20683
+ return;
20684
+ const fragment = this.dom.createDocumentFragment();
20685
+ const children = Array.from(parentElement.childNodes);
20686
+ const parentTemplate = parentElement.cloneNode(true);
20687
+ parentTemplate.innerHTML = "";
20688
+ let capturingParagraph = parentTemplate.cloneNode();
20689
+ const append2 = (node) => {
20690
+ __privateMethod(this, _assignElementProperties, assignElementProperties_fn).call(this, node, parentElement, _HtmlNormalizer.BLOCK_STYLES);
20691
+ fragment.append(node);
20692
+ };
20693
+ for (const child of children) {
20694
+ if (child.tagName === "BR") {
20695
+ append2(capturingParagraph);
20696
+ capturingParagraph = parentTemplate.cloneNode();
20697
+ continue;
19586
20698
  }
20699
+ capturingParagraph.append(child);
19587
20700
  }
19588
- _removeEmptyNodes(node) {
19589
- if (!node.innerHTML.trim())
19590
- node.remove();
20701
+ fragment.append(capturingParagraph);
20702
+ parentElement.replaceWith(fragment);
20703
+ };
20704
+ _normalizeBlockTextDecoration = new WeakSet();
20705
+ normalizeBlockTextDecoration_fn = function() {
20706
+ const blockEls = this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');
20707
+ for (const blockEl of blockEls) {
20708
+ __privateMethod(this, _moveTextDecorationToChildren, moveTextDecorationToChildren_fn).call(this, blockEl);
19591
20709
  }
19592
- _normalizeListItems(itemEl) {
19593
- const fragment = this.dom.createDocumentFragment();
19594
- const children = Array.from(itemEl.childNodes);
19595
- let capturingParagraph;
19596
- let previousNode;
19597
- const append2 = (node) => {
19598
- this._assignElementProperties(node, itemEl, _ContentNormalizer.BLOCK_STYLES);
19599
- fragment.append(node);
20710
+ };
20711
+ _moveTextDecorationToChildren = new WeakSet();
20712
+ moveTextDecorationToChildren_fn = function(blockEl) {
20713
+ const blockDecoration = __privateMethod(this, _parseTextDecoration, parseTextDecoration_fn).call(this, blockEl);
20714
+ blockEl.style.removeProperty("text-decoration-line");
20715
+ blockEl.style.removeProperty("text-decoration");
20716
+ if (!blockEl.style.cssText)
20717
+ blockEl.removeAttribute("style");
20718
+ if (blockDecoration.none)
20719
+ return;
20720
+ for (const childNode of blockEl.childNodes) {
20721
+ const textEl = __privateMethod(this, _wrapTextNode, wrapTextNode_fn).call(this, blockEl, childNode);
20722
+ const textDecoration = __privateMethod(this, _parseTextDecoration, parseTextDecoration_fn).call(this, textEl);
20723
+ const mergedDecoration = {
20724
+ underline: textDecoration.underline || blockDecoration.underline,
20725
+ line_through: textDecoration.line_through || blockDecoration.line_through
19600
20726
  };
19601
- this._assignElementProperties(itemEl, itemEl.parentElement, _ContentNormalizer.BLOCK_STYLES);
19602
- for (const node of children) {
19603
- if (this._isBlockNode(node)) {
19604
- append2(node);
19605
- capturingParagraph = null;
19606
- previousNode = node;
20727
+ textEl.style.removeProperty("text-decoration-line");
20728
+ textEl.style.removeProperty("text-decoration");
20729
+ textEl.style.textDecoration = Object.entries(mergedDecoration).filter(([, value]) => value).map(([name]) => name.replace("_", "-")).join(" ");
20730
+ }
20731
+ };
20732
+ _parseTextDecoration = new WeakSet();
20733
+ parseTextDecoration_fn = function(element) {
20734
+ const { textDecoration, textDecorationLine } = element.style;
20735
+ const decoration = textDecoration || textDecorationLine || "";
20736
+ return {
20737
+ none: decoration.includes("none"),
20738
+ underline: decoration.includes("underline"),
20739
+ line_through: decoration.includes("line-through")
20740
+ };
20741
+ };
20742
+ _normalizeBlockBackgroundColor = new WeakSet();
20743
+ normalizeBlockBackgroundColor_fn = function() {
20744
+ const blockEls = this.dom.querySelectorAll('[style*="background-color"]:where(p, h1, h2, h3, h4, li)');
20745
+ for (const blockEl of blockEls) {
20746
+ __privateMethod(this, _moveBackgroundColorToChildren, moveBackgroundColorToChildren_fn).call(this, blockEl);
20747
+ }
20748
+ };
20749
+ _moveBackgroundColorToChildren = new WeakSet();
20750
+ moveBackgroundColorToChildren_fn = function(blockEl) {
20751
+ const blockColor = blockEl.style.backgroundColor;
20752
+ blockEl.style.removeProperty("background-color");
20753
+ if (!blockEl.style.cssText)
20754
+ blockEl.removeAttribute("style");
20755
+ for (const childNode of blockEl.childNodes) {
20756
+ const textEl = __privateMethod(this, _wrapTextNode, wrapTextNode_fn).call(this, blockEl, childNode);
20757
+ const color = textEl.style.backgroundColor || blockColor;
20758
+ textEl.style.backgroundColor = color;
20759
+ }
20760
+ };
20761
+ _wrapTextNode = new WeakSet();
20762
+ wrapTextNode_fn = function(parent, node) {
20763
+ if (node.nodeType !== __privateGet(this, _Node, Node_get).TEXT_NODE)
20764
+ return node;
20765
+ const span = this.dom.createElement("span");
20766
+ span.append(node.cloneNode());
20767
+ parent.replaceChild(span, node);
20768
+ return span;
20769
+ };
20770
+ __publicField(HtmlNormalizer, "BLOCK_NODE_NAMES", ["P", "H1", "H2", "H3", "H4"]);
20771
+ __publicField(HtmlNormalizer, "ROOT_NODE_NAMES", _HtmlNormalizer.BLOCK_NODE_NAMES.concat("UL", "OL"));
20772
+ __publicField(HtmlNormalizer, "BLOCK_STYLES", [
20773
+ "text-align",
20774
+ "line-height",
20775
+ "margin",
20776
+ "margin-top",
20777
+ "margin-bottom",
20778
+ "margin-left",
20779
+ "margin-right"
20780
+ ]);
20781
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
20782
+ function setCacheAdd$1(value) {
20783
+ this.__data__.set(value, HASH_UNDEFINED);
20784
+ return this;
20785
+ }
20786
+ var _setCacheAdd = setCacheAdd$1;
20787
+ function setCacheHas$1(value) {
20788
+ return this.__data__.has(value);
20789
+ }
20790
+ var _setCacheHas = setCacheHas$1;
20791
+ var MapCache = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas;
20792
+ function SetCache$1(values2) {
20793
+ var index = -1, length = values2 == null ? 0 : values2.length;
20794
+ this.__data__ = new MapCache();
20795
+ while (++index < length) {
20796
+ this.add(values2[index]);
20797
+ }
20798
+ }
20799
+ SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
20800
+ SetCache$1.prototype.has = setCacheHas;
20801
+ var _SetCache = SetCache$1;
20802
+ function arraySome$1(array, predicate) {
20803
+ var index = -1, length = array == null ? 0 : array.length;
20804
+ while (++index < length) {
20805
+ if (predicate(array[index], index, array)) {
20806
+ return true;
20807
+ }
20808
+ }
20809
+ return false;
20810
+ }
20811
+ var _arraySome = arraySome$1;
20812
+ function cacheHas$1(cache2, key) {
20813
+ return cache2.has(key);
20814
+ }
20815
+ var _cacheHas = cacheHas$1;
20816
+ var SetCache = _SetCache, arraySome = _arraySome, cacheHas = _cacheHas;
20817
+ var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
20818
+ function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
20819
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
20820
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
20821
+ return false;
20822
+ }
20823
+ var arrStacked = stack.get(array);
20824
+ var othStacked = stack.get(other);
20825
+ if (arrStacked && othStacked) {
20826
+ return arrStacked == other && othStacked == array;
20827
+ }
20828
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
20829
+ stack.set(array, other);
20830
+ stack.set(other, array);
20831
+ while (++index < arrLength) {
20832
+ var arrValue = array[index], othValue = other[index];
20833
+ if (customizer) {
20834
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
20835
+ }
20836
+ if (compared !== void 0) {
20837
+ if (compared) {
19607
20838
  continue;
19608
20839
  }
19609
- if (node.tagName === "BR" && previousNode && (previousNode == null ? void 0 : previousNode.tagName) !== "BR") {
19610
- node.remove();
19611
- previousNode = node;
19612
- continue;
20840
+ result = false;
20841
+ break;
20842
+ }
20843
+ if (seen) {
20844
+ if (!arraySome(other, function(othValue2, othIndex) {
20845
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
20846
+ return seen.push(othIndex);
20847
+ }
20848
+ })) {
20849
+ result = false;
20850
+ break;
19613
20851
  }
19614
- if (node.tagName === "BR") {
19615
- const emptyLineEl = this.dom.createElement("p");
19616
- emptyLineEl.append(node);
19617
- append2(emptyLineEl);
19618
- capturingParagraph = null;
19619
- previousNode = node;
19620
- continue;
20852
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
20853
+ result = false;
20854
+ break;
20855
+ }
20856
+ }
20857
+ stack["delete"](array);
20858
+ stack["delete"](other);
20859
+ return result;
20860
+ }
20861
+ var _equalArrays = equalArrays$2;
20862
+ function mapToArray$1(map2) {
20863
+ var index = -1, result = Array(map2.size);
20864
+ map2.forEach(function(value, key) {
20865
+ result[++index] = [key, value];
20866
+ });
20867
+ return result;
20868
+ }
20869
+ var _mapToArray = mapToArray$1;
20870
+ function setToArray$1(set2) {
20871
+ var index = -1, result = Array(set2.size);
20872
+ set2.forEach(function(value) {
20873
+ result[++index] = value;
20874
+ });
20875
+ return result;
20876
+ }
20877
+ var _setToArray = setToArray$1;
20878
+ var Symbol$1 = _Symbol, Uint8Array2 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
20879
+ var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
20880
+ var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
20881
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
20882
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
20883
+ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
20884
+ switch (tag) {
20885
+ case dataViewTag:
20886
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
20887
+ return false;
20888
+ }
20889
+ object = object.buffer;
20890
+ other = other.buffer;
20891
+ case arrayBufferTag:
20892
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
20893
+ return false;
19621
20894
  }
19622
- if (!capturingParagraph) {
19623
- capturingParagraph = this.dom.createElement("p");
19624
- append2(capturingParagraph);
20895
+ return true;
20896
+ case boolTag:
20897
+ case dateTag:
20898
+ case numberTag:
20899
+ return eq(+object, +other);
20900
+ case errorTag:
20901
+ return object.name == other.name && object.message == other.message;
20902
+ case regexpTag:
20903
+ case stringTag:
20904
+ return object == other + "";
20905
+ case mapTag:
20906
+ var convert = mapToArray;
20907
+ case setTag:
20908
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
20909
+ convert || (convert = setToArray);
20910
+ if (object.size != other.size && !isPartial) {
20911
+ return false;
19625
20912
  }
19626
- capturingParagraph.append(node);
19627
- previousNode = node;
20913
+ var stacked = stack.get(object);
20914
+ if (stacked) {
20915
+ return stacked == other;
20916
+ }
20917
+ bitmask |= COMPARE_UNORDERED_FLAG;
20918
+ stack.set(object, other);
20919
+ var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
20920
+ stack["delete"](object);
20921
+ return result;
20922
+ case symbolTag:
20923
+ if (symbolValueOf) {
20924
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
20925
+ }
20926
+ }
20927
+ return false;
20928
+ }
20929
+ var _equalByTag = equalByTag$1;
20930
+ var getAllKeys = _getAllKeys;
20931
+ var COMPARE_PARTIAL_FLAG$1 = 1;
20932
+ var objectProto$1 = Object.prototype;
20933
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
20934
+ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
20935
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
20936
+ if (objLength != othLength && !isPartial) {
20937
+ return false;
20938
+ }
20939
+ var index = objLength;
20940
+ while (index--) {
20941
+ var key = objProps[index];
20942
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
20943
+ return false;
19628
20944
  }
19629
- itemEl.append(fragment);
19630
- this._removeStyleProperties(itemEl, _ContentNormalizer.BLOCK_STYLES);
19631
20945
  }
19632
- _isBlockNode(node) {
19633
- return _ContentNormalizer.BLOCK_NODE_NAMES.includes(node.tagName);
20946
+ var objStacked = stack.get(object);
20947
+ var othStacked = stack.get(other);
20948
+ if (objStacked && othStacked) {
20949
+ return objStacked == other && othStacked == object;
19634
20950
  }
19635
- _assignElementProperties(target, source, properties) {
19636
- for (const property of properties) {
19637
- const value = source.style.getPropertyValue(property);
19638
- if (value && !target.style.getPropertyValue(property)) {
19639
- target.style.setProperty(property, value);
19640
- }
20951
+ var result = true;
20952
+ stack.set(object, other);
20953
+ stack.set(other, object);
20954
+ var skipCtor = isPartial;
20955
+ while (++index < objLength) {
20956
+ key = objProps[index];
20957
+ var objValue = object[key], othValue = other[key];
20958
+ if (customizer) {
20959
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
19641
20960
  }
20961
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
20962
+ result = false;
20963
+ break;
20964
+ }
20965
+ skipCtor || (skipCtor = key == "constructor");
19642
20966
  }
19643
- _removeStyleProperties(element, properties) {
19644
- for (const property of properties) {
19645
- element.style.removeProperty(property);
20967
+ if (result && !skipCtor) {
20968
+ var objCtor = object.constructor, othCtor = other.constructor;
20969
+ if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
20970
+ result = false;
19646
20971
  }
19647
- if (element.style.length === 0) {
19648
- element.removeAttribute("style");
20972
+ }
20973
+ stack["delete"](object);
20974
+ stack["delete"](other);
20975
+ return result;
20976
+ }
20977
+ var _equalObjects = equalObjects$1;
20978
+ var Stack = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag = _getTag, isArray2 = isArray_1, isBuffer = isBuffer$3.exports, isTypedArray = isTypedArray_1;
20979
+ var COMPARE_PARTIAL_FLAG = 1;
20980
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
20981
+ var objectProto = Object.prototype;
20982
+ var hasOwnProperty = objectProto.hasOwnProperty;
20983
+ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
20984
+ var objIsArr = isArray2(object), othIsArr = isArray2(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
20985
+ objTag = objTag == argsTag ? objectTag : objTag;
20986
+ othTag = othTag == argsTag ? objectTag : othTag;
20987
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
20988
+ if (isSameTag && isBuffer(object)) {
20989
+ if (!isBuffer(other)) {
20990
+ return false;
19649
20991
  }
20992
+ objIsArr = true;
20993
+ objIsObj = false;
19650
20994
  }
19651
- _normalizeBreakLines({ parentElement }) {
19652
- if (!this._isBlockNode(parentElement))
19653
- return;
19654
- if (!parentElement.textContent)
19655
- return;
19656
- const fragment = this.dom.createDocumentFragment();
19657
- const children = Array.from(parentElement.childNodes);
19658
- const parentTemplate = parentElement.cloneNode(true);
19659
- parentTemplate.innerHTML = "";
19660
- let capturingParagraph = parentTemplate.cloneNode();
19661
- const append2 = (node) => {
19662
- this._assignElementProperties(node, parentElement, _ContentNormalizer.BLOCK_STYLES);
19663
- fragment.append(node);
19664
- };
19665
- for (const child of children) {
19666
- if (child.tagName === "BR") {
19667
- append2(capturingParagraph);
19668
- capturingParagraph = parentTemplate.cloneNode();
20995
+ if (isSameTag && !objIsObj) {
20996
+ stack || (stack = new Stack());
20997
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
20998
+ }
20999
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
21000
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
21001
+ if (objIsWrapped || othIsWrapped) {
21002
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
21003
+ stack || (stack = new Stack());
21004
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
21005
+ }
21006
+ }
21007
+ if (!isSameTag) {
21008
+ return false;
21009
+ }
21010
+ stack || (stack = new Stack());
21011
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
21012
+ }
21013
+ var _baseIsEqualDeep = baseIsEqualDeep$1;
21014
+ var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike = isObjectLike_1;
21015
+ function baseIsEqual$1(value, other, bitmask, customizer, stack) {
21016
+ if (value === other) {
21017
+ return true;
21018
+ }
21019
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
21020
+ return value !== value && other !== other;
21021
+ }
21022
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack);
21023
+ }
21024
+ var _baseIsEqual = baseIsEqual$1;
21025
+ var baseIsEqual = _baseIsEqual;
21026
+ function isEqual(value, other) {
21027
+ return baseIsEqual(value, other);
21028
+ }
21029
+ var isEqual_1 = isEqual;
21030
+ class JsonNormalizer extends BaseNormalizer {
21031
+ constructor() {
21032
+ super(...arguments);
21033
+ __privateAdd(this, _iterateNodes2);
21034
+ __privateAdd(this, _iterateChildNodes);
21035
+ __privateAdd(this, _bubbleMarks);
21036
+ __privateAdd(this, _canBubbleMark);
21037
+ __privateAdd(this, _includesMark);
21038
+ __privateAdd(this, _includesMarkType);
21039
+ __privateAdd(this, _removeMark);
21040
+ __privateAdd(this, _addMark);
21041
+ __privateAdd(this, _findMarkIndexByType);
21042
+ }
21043
+ normalize() {
21044
+ __privateMethod(this, _iterateNodes2, iterateNodes_fn2).call(this, __privateMethod(this, _bubbleMarks, bubbleMarks_fn));
21045
+ return this.content;
21046
+ }
21047
+ }
21048
+ _iterateNodes2 = new WeakSet();
21049
+ iterateNodes_fn2 = function(handler) {
21050
+ __privateMethod(this, _iterateChildNodes, iterateChildNodes_fn).call(this, this.content, handler);
21051
+ };
21052
+ _iterateChildNodes = new WeakSet();
21053
+ iterateChildNodes_fn = function(node, handler) {
21054
+ for (const child of node.content) {
21055
+ child.content && __privateMethod(this, _iterateChildNodes, iterateChildNodes_fn).call(this, child, handler);
21056
+ handler.call(this, child);
21057
+ }
21058
+ };
21059
+ _bubbleMarks = new WeakSet();
21060
+ bubbleMarks_fn = function(node) {
21061
+ if (!node.content)
21062
+ return;
21063
+ if (node.type === NodeTypes.LIST)
21064
+ return;
21065
+ for (const child of node.content) {
21066
+ if (!child.marks)
21067
+ continue;
21068
+ for (const childMark of child.marks.slice()) {
21069
+ if (__privateMethod(this, _includesMark, includesMark_fn).call(this, node, childMark)) {
21070
+ __privateMethod(this, _removeMark, removeMark_fn).call(this, child, childMark);
19669
21071
  continue;
19670
21072
  }
19671
- capturingParagraph.append(child);
21073
+ if (__privateMethod(this, _canBubbleMark, canBubbleMark_fn).call(this, node, childMark)) {
21074
+ __privateMethod(this, _removeMark, removeMark_fn).call(this, child, childMark);
21075
+ __privateMethod(this, _addMark, addMark_fn).call(this, node, childMark);
21076
+ }
19672
21077
  }
19673
- fragment.append(capturingParagraph);
19674
- parentElement.replaceWith(fragment);
21078
+ }
21079
+ };
21080
+ _canBubbleMark = new WeakSet();
21081
+ canBubbleMark_fn = function(node, childMark) {
21082
+ if (TextSettings.inlineMarks.includes(childMark.type))
21083
+ return false;
21084
+ if (__privateMethod(this, _includesMarkType, includesMarkType_fn).call(this, node, childMark.type))
21085
+ return false;
21086
+ for (const child of node.content) {
21087
+ if (!child.content && node.type === NodeTypes.LIST_ITEM)
21088
+ continue;
21089
+ if (!child.marks)
21090
+ return false;
21091
+ if (!__privateMethod(this, _includesMark, includesMark_fn).call(this, child, childMark))
21092
+ return false;
21093
+ }
21094
+ return true;
21095
+ };
21096
+ _includesMark = new WeakSet();
21097
+ includesMark_fn = function(node, checkingMark) {
21098
+ var _a, _b;
21099
+ return (_b = (_a = node.marks) == null ? void 0 : _a.some((mark) => isEqual_1(mark, checkingMark))) != null ? _b : false;
21100
+ };
21101
+ _includesMarkType = new WeakSet();
21102
+ includesMarkType_fn = function(node, type) {
21103
+ var _a, _b;
21104
+ return (_b = (_a = node.marks) == null ? void 0 : _a.some((mark) => mark.type === type)) != null ? _b : false;
21105
+ };
21106
+ _removeMark = new WeakSet();
21107
+ removeMark_fn = function(node, mark) {
21108
+ if (!node.marks)
21109
+ return;
21110
+ const index = __privateMethod(this, _findMarkIndexByType, findMarkIndexByType_fn).call(this, node, mark.type);
21111
+ if (index >= 0)
21112
+ node.marks.splice(index, 1);
21113
+ if (!node.marks.length)
21114
+ delete node.marks;
21115
+ };
21116
+ _addMark = new WeakSet();
21117
+ addMark_fn = function(node, mark) {
21118
+ var _a;
21119
+ __privateMethod(this, _removeMark, removeMark_fn).call(this, node, mark);
21120
+ (_a = node.marks) != null ? _a : node.marks = [];
21121
+ node.marks.push(mark);
21122
+ };
21123
+ _findMarkIndexByType = new WeakSet();
21124
+ findMarkIndexByType_fn = function(node, type) {
21125
+ var _a, _b;
21126
+ return (_b = (_a = node.marks) == null ? void 0 : _a.findIndex((mark) => mark.type === type)) != null ? _b : null;
21127
+ };
21128
+ const _ContentNormalizer = class {
21129
+ static build(content, options = {}) {
21130
+ return typeof content === "string" ? __privateMethod(this, _buildHtml, buildHtml_fn).call(this, content, options) : __privateMethod(this, _buildJson, buildJson_fn).call(this, content);
21131
+ }
21132
+ static normalize(content, options = {}) {
21133
+ return _ContentNormalizer.build(content, options).normalize();
19675
21134
  }
19676
21135
  };
19677
21136
  let ContentNormalizer = _ContentNormalizer;
19678
- __publicField(ContentNormalizer, "BLOCK_NODE_NAMES", ["P", "H1", "H2", "H3", "H4"]);
19679
- __publicField(ContentNormalizer, "BLOCK_STYLES", [
19680
- "text-align",
19681
- "line-height",
19682
- "margin",
19683
- "margin-top",
19684
- "margin-bottom",
19685
- "margin-left",
19686
- "margin-right"
19687
- ]);
21137
+ _buildHtml = new WeakSet();
21138
+ buildHtml_fn = function(content, options) {
21139
+ return new HtmlNormalizer({
21140
+ content,
21141
+ parser: options.parser || new BrowserDomParser()
21142
+ });
21143
+ };
21144
+ _buildJson = new WeakSet();
21145
+ buildJson_fn = function(content) {
21146
+ return new JsonNormalizer({ content });
21147
+ };
21148
+ __privateAdd(ContentNormalizer, _buildHtml);
21149
+ __privateAdd(ContentNormalizer, _buildJson);
19688
21150
  class ContextWindow {
19689
21151
  static use(window2) {
19690
21152
  this.window = window2;
@@ -19705,38 +21167,39 @@ class ContextWindow {
19705
21167
  __publicField(ContextWindow, "window", globalThis.window);
19706
21168
  class NodeFactory {
19707
21169
  static doc(content) {
19708
- return {
19709
- type: NodeTypes.DOCUMENT,
19710
- content
19711
- };
21170
+ return { type: NodeTypes.DOCUMENT, content };
19712
21171
  }
19713
21172
  static list(type, items) {
19714
21173
  return {
19715
21174
  type: NodeTypes.LIST,
19716
21175
  attrs: { bullet: { type } },
19717
- content: items.map((item) => this.listItem([].concat(item)))
21176
+ content: items.map((item) => {
21177
+ return item.type === NodeTypes.LIST_ITEM ? item : this.listItem([].concat(item));
21178
+ })
19718
21179
  };
19719
21180
  }
19720
- static listItem(content) {
21181
+ static listItem(...args) {
21182
+ const { attrs, content: children, marks } = __privateMethod(this, _normalizeTextBlockArgs, normalizeTextBlockArgs_fn).call(this, args);
19721
21183
  return {
19722
21184
  type: NodeTypes.LIST_ITEM,
19723
- content
21185
+ ...attrs ? { attrs } : {},
21186
+ ...marks ? { marks } : {},
21187
+ content: [].concat(children).map((content) => {
21188
+ return typeof content === "string" ? this.paragraph(content) : content;
21189
+ })
19724
21190
  };
19725
21191
  }
19726
21192
  static heading(level, ...args) {
19727
21193
  var _a;
19728
- const config = __privateMethod(this, _textBlock, textBlock_fn).call(this, args);
21194
+ const config = __privateMethod(this, _textBlock, textBlock_fn).call(this, args, this.text);
19729
21195
  (_a = config.attrs) != null ? _a : config.attrs = {};
19730
21196
  config.attrs.level = level;
19731
- return {
19732
- type: NodeTypes.HEADING,
19733
- ...config
19734
- };
21197
+ return { type: NodeTypes.HEADING, ...config };
19735
21198
  }
19736
21199
  static paragraph(...args) {
19737
21200
  return {
19738
21201
  type: NodeTypes.PARAGRAPH,
19739
- ...__privateMethod(this, _textBlock, textBlock_fn).call(this, args)
21202
+ ...__privateMethod(this, _textBlock, textBlock_fn).call(this, args, this.text)
19740
21203
  };
19741
21204
  }
19742
21205
  static text(text2, marks) {
@@ -19811,13 +21274,17 @@ const outClick = {
19811
21274
  toggleListener(false, dataStorage.get(el).callback);
19812
21275
  }
19813
21276
  };
19814
- function tooltip(el, { value }) {
21277
+ function tooltip(el, { value, modifiers: modifiers2 }) {
19815
21278
  const options = typeof value === "string" ? { text: value } : value;
19816
21279
  const { text: text2, hotkey } = options;
19817
21280
  if (text2)
19818
21281
  el.dataset.tooltip = text2;
19819
21282
  if (text2 && hotkey)
19820
21283
  el.dataset.tooltipHotkey = hotkey;
21284
+ if (modifiers2.xs)
21285
+ el.dataset.tooltipSize = "xs";
21286
+ if (modifiers2.lg)
21287
+ el.dataset.tooltipSize = "lg";
19821
21288
  }
19822
21289
  var render$y = function __render__11() {
19823
21290
  var _vm = this;
@@ -20115,7 +21582,23 @@ var render$v = function __render__14() {
20115
21582
  }
20116
21583
  }, [_c("span", {
20117
21584
  staticClass: "zw-dropdown__activator-title zw-text--truncate"
20118
- }, [_vm._v(" " + _vm._s(_vm.activeOptionTitle) + " ")]), _c("Icon", {
21585
+ }, [_vm._v(" " + _vm._s(_vm.activeOptionTitle) + " ")]), _vm.isCustomized ? _c("Icon", {
21586
+ directives: [{
21587
+ name: "tooltip",
21588
+ rawName: "v-tooltip.xs",
21589
+ value: "Default parameter setting is changed",
21590
+ expression: "'Default parameter setting is changed'",
21591
+ modifiers: {
21592
+ "xs": true
21593
+ }
21594
+ }],
21595
+ staticClass: "zw-dropdown__customized-indicator",
21596
+ attrs: {
21597
+ "name": "indicator",
21598
+ "size": "9px",
21599
+ "data-test-selector": "customizedIndicator"
21600
+ }
21601
+ }) : _vm._e(), _c("Icon", {
20119
21602
  staticClass: "zw-dropdown__activator-arrow",
20120
21603
  attrs: {
20121
21604
  "name": "arrow",
@@ -20136,6 +21619,9 @@ const __vue2_script$v = {
20136
21619
  Icon,
20137
21620
  Button
20138
21621
  },
21622
+ directives: {
21623
+ tooltip
21624
+ },
20139
21625
  model: {
20140
21626
  event: "change"
20141
21627
  },
@@ -20144,6 +21630,11 @@ const __vue2_script$v = {
20144
21630
  type: String,
20145
21631
  required: false,
20146
21632
  default: "none"
21633
+ },
21634
+ isCustomized: {
21635
+ type: Boolean,
21636
+ required: false,
21637
+ default: false
20147
21638
  }
20148
21639
  },
20149
21640
  setup(props) {
@@ -20170,7 +21661,7 @@ var __component__$v = /* @__PURE__ */ normalizeComponent(
20170
21661
  staticRenderFns$v,
20171
21662
  false,
20172
21663
  __vue2_injectStyles$v,
20173
- "021ac370",
21664
+ "0f1c87fd",
20174
21665
  null,
20175
21666
  null
20176
21667
  );
@@ -20434,7 +21925,8 @@ var render$q = function __render__19() {
20434
21925
  staticClass: "zw-dropdown"
20435
21926
  }, [_c("DropdownActivator", {
20436
21927
  attrs: {
20437
- "color": _vm.color
21928
+ "color": _vm.color,
21929
+ "is-customized": _vm.isCustomized
20438
21930
  },
20439
21931
  scopedSlots: _vm._u([{
20440
21932
  key: "default",
@@ -20492,6 +21984,11 @@ const __vue2_script$q = {
20492
21984
  type: String,
20493
21985
  required: false,
20494
21986
  default: "none"
21987
+ },
21988
+ isCustomized: {
21989
+ type: Boolean,
21990
+ required: false,
21991
+ default: false
20495
21992
  }
20496
21993
  },
20497
21994
  setup(props, { emit }) {
@@ -20523,7 +22020,7 @@ var __component__$q = /* @__PURE__ */ normalizeComponent(
20523
22020
  staticRenderFns$q,
20524
22021
  false,
20525
22022
  __vue2_injectStyles$q,
20526
- "885109ea",
22023
+ "29e6a104",
20527
22024
  null,
20528
22025
  null
20529
22026
  );
@@ -20786,7 +22283,7 @@ const __vue2_script$o = {
20786
22283
  }));
20787
22284
  });
20788
22285
  const apply2 = (value) => {
20789
- editor.chain().focus().applyPreset(value).storeSelection().expandSelectionToBlock().unsetMarks(CLEAR_MARKS).restoreSelection().run();
22286
+ editor.chain().focus().applyPreset(value).storeSelection().expandSelectionToBlock().removeMarks(CLEAR_MARKS).restoreSelection().run();
20790
22287
  };
20791
22288
  const removeCustomization = () => editor.chain().focus().removePresetCustomization().run();
20792
22289
  return {
@@ -20805,7 +22302,7 @@ var __component__$o = /* @__PURE__ */ normalizeComponent(
20805
22302
  staticRenderFns$o,
20806
22303
  false,
20807
22304
  __vue2_injectStyles$o,
20808
- "2893d64e",
22305
+ "5983cfee",
20809
22306
  null,
20810
22307
  null
20811
22308
  );
@@ -20842,7 +22339,8 @@ var render$n = function __render__22() {
20842
22339
  staticClass: "zw-font-family-control",
20843
22340
  attrs: {
20844
22341
  "options": _vm.options,
20845
- "value": _vm.currentValue
22342
+ "value": _vm.currentValue,
22343
+ "is-customized": _vm.isCustomized
20846
22344
  },
20847
22345
  on: {
20848
22346
  "change": _vm.apply
@@ -20903,6 +22401,7 @@ const __vue2_script$n = {
20903
22401
  return { "--zw-font-family-option": `"${option.id}"` };
20904
22402
  }
20905
22403
  const currentValue = editor.commands.getFontFamily();
22404
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_FAMILY);
20906
22405
  const apply2 = (fontFamily) => {
20907
22406
  recentFontNames.add(fontFamily);
20908
22407
  editor.chain().focus().applyFontFamily(fontFamily).run();
@@ -20910,6 +22409,7 @@ const __vue2_script$n = {
20910
22409
  return {
20911
22410
  options,
20912
22411
  currentValue,
22412
+ isCustomized,
20913
22413
  renderOptionStyles,
20914
22414
  apply: apply2
20915
22415
  };
@@ -20922,7 +22422,7 @@ var __component__$n = /* @__PURE__ */ normalizeComponent(
20922
22422
  staticRenderFns$n,
20923
22423
  false,
20924
22424
  __vue2_injectStyles$n,
20925
- "07a47462",
22425
+ "2f66bfa6",
20926
22426
  null,
20927
22427
  null
20928
22428
  );
@@ -20948,9 +22448,11 @@ var render$m = function __render__23() {
20948
22448
  },
20949
22449
  expression: "{ text: 'Font Weight', hotkey: 'Mod B' }"
20950
22450
  }],
22451
+ staticClass: "zw-font-weight-control",
20951
22452
  attrs: {
20952
22453
  "options": _vm.options,
20953
- "value": _vm.currentValue
22454
+ "value": _vm.currentValue,
22455
+ "is-customized": _vm.isCustomized
20954
22456
  },
20955
22457
  on: {
20956
22458
  "change": _vm.apply
@@ -20958,6 +22460,7 @@ var render$m = function __render__23() {
20958
22460
  });
20959
22461
  };
20960
22462
  var staticRenderFns$m = [];
22463
+ const FontWeightControl_vue_vue_type_style_index_0_scoped_true_lang = "";
20961
22464
  const __vue2_script$m = {
20962
22465
  name: "FontWeightControl",
20963
22466
  components: {
@@ -20971,10 +22474,12 @@ const __vue2_script$m = {
20971
22474
  const font = editor.commands.getFont();
20972
22475
  const options = computed(() => unref(font).weights.map((style2) => ({ id: style2 })));
20973
22476
  const currentValue = editor.commands.getFontWeight();
22477
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_WEIGHT);
20974
22478
  const apply2 = (value) => editor.chain().focus().applyFontWeight(value).run();
20975
22479
  return {
20976
22480
  options,
20977
22481
  currentValue,
22482
+ isCustomized,
20978
22483
  apply: apply2
20979
22484
  };
20980
22485
  }
@@ -20986,7 +22491,7 @@ var __component__$m = /* @__PURE__ */ normalizeComponent(
20986
22491
  staticRenderFns$m,
20987
22492
  false,
20988
22493
  __vue2_injectStyles$m,
20989
- null,
22494
+ "5a87e48e",
20990
22495
  null,
20991
22496
  null
20992
22497
  );
@@ -21015,7 +22520,8 @@ var render$l = function __render__24() {
21015
22520
  staticClass: "zw-font-size-control",
21016
22521
  attrs: {
21017
22522
  "options": _vm.options,
21018
- "value": _vm.currentValue
22523
+ "value": _vm.currentValue,
22524
+ "is-customized": _vm.isCustomized
21019
22525
  },
21020
22526
  on: {
21021
22527
  "change": _vm.apply
@@ -21039,10 +22545,12 @@ const __vue2_script$l = {
21039
22545
  return fontSizes.map((size2) => ({ id: size2, title: `${size2}px` }));
21040
22546
  });
21041
22547
  const currentValue = editor.commands.getFontSize();
22548
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_SIZE);
21042
22549
  const apply2 = (value) => editor.chain().focus().applyFontSize(value).run();
21043
22550
  return {
21044
22551
  options,
21045
22552
  currentValue,
22553
+ isCustomized,
21046
22554
  apply: apply2
21047
22555
  };
21048
22556
  }
@@ -21054,7 +22562,7 @@ var __component__$l = /* @__PURE__ */ normalizeComponent(
21054
22562
  staticRenderFns$l,
21055
22563
  false,
21056
22564
  __vue2_injectStyles$l,
21057
- "71dd7ffc",
22565
+ "3f8185ea",
21058
22566
  null,
21059
22567
  null
21060
22568
  );
@@ -21088,6 +22596,7 @@ var render$k = function __render__25() {
21088
22596
  value: "Font Color",
21089
22597
  expression: "'Font Color'"
21090
22598
  }],
22599
+ staticClass: "zw-position--relative",
21091
22600
  attrs: {
21092
22601
  "icon": "",
21093
22602
  "skin": "toolbar",
@@ -21102,7 +22611,23 @@ var render$k = function __render__25() {
21102
22611
  "size": "28px",
21103
22612
  "auto-color": ""
21104
22613
  }
21105
- })], 1)];
22614
+ }), _vm.isCustomized ? _c("Icon", {
22615
+ directives: [{
22616
+ name: "tooltip",
22617
+ rawName: "v-tooltip.xs",
22618
+ value: "Default parameter setting is changed",
22619
+ expression: "'Default parameter setting is changed'",
22620
+ modifiers: {
22621
+ "xs": true
22622
+ }
22623
+ }],
22624
+ staticClass: "zw-button__customized-indicator",
22625
+ attrs: {
22626
+ "name": "indicator",
22627
+ "size": "9px",
22628
+ "data-test-selector": "customizedIndicator"
22629
+ }
22630
+ }) : _vm._e()], 1)];
21106
22631
  }
21107
22632
  }])
21108
22633
  });
@@ -21121,9 +22646,11 @@ const __vue2_script$k = {
21121
22646
  setup() {
21122
22647
  const editor = inject(InjectionTokens$1.EDITOR);
21123
22648
  const currentValue = editor.commands.getFontColor();
22649
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_COLOR);
21124
22650
  const apply2 = (color) => editor.chain().applyFontColor(color).run();
21125
22651
  return {
21126
22652
  currentValue,
22653
+ isCustomized,
21127
22654
  apply: apply2
21128
22655
  };
21129
22656
  }
@@ -21242,6 +22769,7 @@ var render$i = function __render__27() {
21242
22769
  },
21243
22770
  expression: "{ text: 'Italic', hotkey: 'Mod I' }"
21244
22771
  }],
22772
+ staticClass: "zw-position--relative",
21245
22773
  attrs: {
21246
22774
  "skin": "toolbar",
21247
22775
  "icon": "",
@@ -21257,7 +22785,23 @@ var render$i = function __render__27() {
21257
22785
  "size": "28px",
21258
22786
  "auto-color": ""
21259
22787
  }
21260
- })], 1);
22788
+ }), _vm.isCustomized ? _c("Icon", {
22789
+ directives: [{
22790
+ name: "tooltip",
22791
+ rawName: "v-tooltip.xs",
22792
+ value: "Default parameter setting is changed",
22793
+ expression: "'Default parameter setting is changed'",
22794
+ modifiers: {
22795
+ "xs": true
22796
+ }
22797
+ }],
22798
+ staticClass: "zw-button__customized-indicator",
22799
+ attrs: {
22800
+ "name": "indicator",
22801
+ "size": "9px",
22802
+ "data-test-selector": "customizedIndicator"
22803
+ }
22804
+ }) : _vm._e()], 1);
21261
22805
  };
21262
22806
  var staticRenderFns$i = [];
21263
22807
  const __vue2_script$i = {
@@ -21272,11 +22816,13 @@ const __vue2_script$i = {
21272
22816
  setup() {
21273
22817
  const editor = inject(InjectionTokens$1.EDITOR);
21274
22818
  const currentValue = editor.commands.isItalic();
22819
+ const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_STYLE);
21275
22820
  const isAvailable = editor.commands.isItalicAvailable();
21276
22821
  const apply2 = () => editor.chain().focus().toggleItalic().run();
21277
22822
  return {
21278
22823
  isAvailable,
21279
22824
  currentValue,
22825
+ isCustomized,
21280
22826
  apply: apply2
21281
22827
  };
21282
22828
  }
@@ -21314,6 +22860,7 @@ var render$h = function __render__28() {
21314
22860
  },
21315
22861
  expression: "{ text: 'Underline', hotkey: 'Mod U' }"
21316
22862
  }],
22863
+ staticClass: "zw-position--relative",
21317
22864
  attrs: {
21318
22865
  "skin": "toolbar",
21319
22866
  "icon": "",
@@ -21328,7 +22875,23 @@ var render$h = function __render__28() {
21328
22875
  "size": "28px",
21329
22876
  "auto-color": ""
21330
22877
  }
21331
- })], 1);
22878
+ }), _vm.isCustomized ? _c("Icon", {
22879
+ directives: [{
22880
+ name: "tooltip",
22881
+ rawName: "v-tooltip.xs",
22882
+ value: "Default parameter setting is changed",
22883
+ expression: "'Default parameter setting is changed'",
22884
+ modifiers: {
22885
+ "xs": true
22886
+ }
22887
+ }],
22888
+ staticClass: "zw-button__customized-indicator",
22889
+ attrs: {
22890
+ "name": "indicator",
22891
+ "size": "9px",
22892
+ "data-test-selector": "customizedIndicator"
22893
+ }
22894
+ }) : _vm._e()], 1);
21332
22895
  };
21333
22896
  var staticRenderFns$h = [];
21334
22897
  const __vue2_script$h = {
@@ -21343,9 +22906,11 @@ const __vue2_script$h = {
21343
22906
  setup() {
21344
22907
  const editor = inject(InjectionTokens$1.EDITOR);
21345
22908
  const currentValue = editor.commands.isUnderline();
22909
+ const isCustomized = editor.commands.isUnderlineCustomized();
21346
22910
  const apply2 = () => editor.chain().focus().toggleUnderline().run();
21347
22911
  return {
21348
22912
  currentValue,
22913
+ isCustomized,
21349
22914
  apply: apply2
21350
22915
  };
21351
22916
  }
@@ -21606,6 +23171,7 @@ var render$d = function __render__32() {
21606
23171
  value: option.tooltip,
21607
23172
  expression: "option.tooltip"
21608
23173
  }],
23174
+ staticClass: "zw-position--relative",
21609
23175
  attrs: {
21610
23176
  "icon": "",
21611
23177
  "skin": "toolbar",
@@ -21614,7 +23180,23 @@ var render$d = function __render__32() {
21614
23180
  on: {
21615
23181
  "click": activate
21616
23182
  }
21617
- }, [_c("Icon", {
23183
+ }, [_vm.isCustomized && isActive2 ? _c("Icon", {
23184
+ directives: [{
23185
+ name: "tooltip",
23186
+ rawName: "v-tooltip.xs",
23187
+ value: "Default parameter setting is changed",
23188
+ expression: "'Default parameter setting is changed'",
23189
+ modifiers: {
23190
+ "xs": true
23191
+ }
23192
+ }],
23193
+ staticClass: "zw-button__customized-indicator",
23194
+ attrs: {
23195
+ "name": "indicator",
23196
+ "size": "9px",
23197
+ "data-test-selector": "customizedIndicator"
23198
+ }
23199
+ }) : _vm._e(), _c("Icon", {
21618
23200
  attrs: {
21619
23201
  "name": "alignment-".concat(option.id),
21620
23202
  "size": "28px",
@@ -21657,12 +23239,14 @@ const __vue2_script$d = {
21657
23239
  setup(_, { emit }) {
21658
23240
  const editor = inject(InjectionTokens$1.EDITOR);
21659
23241
  const currentValue = editor.commands.getAlignment();
23242
+ const isCustomized = editor.commands.isSettingCustomized("attributes", TextSettings.ALIGNMENT);
21660
23243
  function apply2(value) {
21661
23244
  editor.chain().focus().applyAlignment(value).run();
21662
23245
  emit("applied");
21663
23246
  }
21664
23247
  return {
21665
23248
  currentValue,
23249
+ isCustomized,
21666
23250
  apply: apply2
21667
23251
  };
21668
23252
  }
@@ -21788,6 +23372,7 @@ var render$b = function __render__34() {
21788
23372
  value: "Line Height",
21789
23373
  expression: "'Line Height'"
21790
23374
  }],
23375
+ staticClass: "zw-position--relative",
21791
23376
  attrs: {
21792
23377
  "icon": "",
21793
23378
  "skin": "toolbar",
@@ -21802,7 +23387,23 @@ var render$b = function __render__34() {
21802
23387
  "size": "28px",
21803
23388
  "auto-color": ""
21804
23389
  }
21805
- })], 1), _c("Modal", {
23390
+ }), _vm.isCustomized ? _c("Icon", {
23391
+ directives: [{
23392
+ name: "tooltip",
23393
+ rawName: "v-tooltip.xs",
23394
+ value: "Default parameter setting is changed",
23395
+ expression: "'Default parameter setting is changed'",
23396
+ modifiers: {
23397
+ "xs": true
23398
+ }
23399
+ }],
23400
+ staticClass: "zw-button__customized-indicator",
23401
+ attrs: {
23402
+ "name": "indicator",
23403
+ "size": "9px",
23404
+ "data-test-selector": "customizedIndicator"
23405
+ }
23406
+ }) : _vm._e()], 1), _c("Modal", {
21806
23407
  ref: "modalRef",
21807
23408
  staticClass: "zw-line-height-control__modal",
21808
23409
  attrs: {
@@ -21861,11 +23462,13 @@ const __vue2_script$b = {
21861
23462
  const editor = inject(InjectionTokens$1.EDITOR);
21862
23463
  const toggler = useModalToggler({ wrapperRef, modalRef });
21863
23464
  const currentValue = editor.commands.getLineHeight();
23465
+ const isCustomized = editor.commands.isSettingCustomized("attributes", TextSettings.LINE_HEIGHT);
21864
23466
  const apply2 = (value) => editor.commands.applyLineHeight(String(value));
21865
23467
  return {
21866
23468
  wrapperRef,
21867
23469
  modalRef,
21868
23470
  isOpened: toggler.isOpened,
23471
+ isCustomized,
21869
23472
  toggler,
21870
23473
  currentValue,
21871
23474
  apply: apply2
@@ -21879,7 +23482,7 @@ var __component__$b = /* @__PURE__ */ normalizeComponent(
21879
23482
  staticRenderFns$b,
21880
23483
  false,
21881
23484
  __vue2_injectStyles$b,
21882
- "9ea28b80",
23485
+ "c316d7dc",
21883
23486
  null,
21884
23487
  null
21885
23488
  );
@@ -22874,24 +24477,24 @@ const Toolbar = /* @__PURE__ */ function() {
22874
24477
  return __component__$1.exports;
22875
24478
  }();
22876
24479
  function useEditor({ content, onChange, extensions: extensions2, isReadonlyRef }) {
22877
- const editor = reactive(new Editor({
24480
+ let editor;
24481
+ const getContent = () => markWysiwygContent(editor.getJSON());
24482
+ editor = reactive(new Editor({
22878
24483
  content: ContentNormalizer.normalize(content.value),
22879
- onUpdate: () => onChange(markWysiwygContent(editor.getJSON())),
24484
+ onUpdate: () => onChange(getContent()),
22880
24485
  extensions: extensions2,
22881
24486
  injectCSS: false,
22882
24487
  editable: !unref(isReadonlyRef)
22883
24488
  }));
22884
24489
  onUnmounted(() => editor.destroy());
22885
24490
  watch(content, (value) => {
22886
- const content2 = unmarkWysiwygContent(value);
22887
- const isChanged = JSON.stringify(editor.getJSON()) !== JSON.stringify(content2);
22888
- if (isChanged) {
22889
- const content3 = ContentNormalizer.normalize(value);
22890
- editor.commands.setContent(content3, false);
24491
+ if (JSON.stringify(getContent()) !== JSON.stringify(value)) {
24492
+ const content2 = ContentNormalizer.normalize(value);
24493
+ editor.commands.setContent(content2, false);
22891
24494
  }
22892
24495
  });
22893
24496
  watch(isReadonlyRef, (isReadonly) => editor.setEditable(!isReadonly));
22894
- return editor;
24497
+ return { editor, getContent };
22895
24498
  }
22896
24499
  function useToolbar({ wrapperRef, offsets, isActiveRef, placementRef }) {
22897
24500
  const wrapperEl = useElementRef(wrapperRef);
@@ -22929,7 +24532,7 @@ function useToolbar({ wrapperRef, offsets, isActiveRef, placementRef }) {
22929
24532
  }
22930
24533
  const FontFamily = Mark.create({
22931
24534
  name: TextSettings.FONT_FAMILY,
22932
- group: "settings",
24535
+ group: MarkGroups.SETTINGS,
22933
24536
  addOptions: () => ({
22934
24537
  fonts: []
22935
24538
  }),
@@ -22971,7 +24574,7 @@ const FontFamily = Mark.create({
22971
24574
  },
22972
24575
  parseHTML() {
22973
24576
  const getAttrs = (input) => {
22974
- const parsed = input.replace(/"/g, "");
24577
+ const parsed = input.replace(/["']/g, "");
22975
24578
  const isExists = this.options.fonts.some((font) => font.name === parsed);
22976
24579
  const value = isExists ? parsed : unref(this.options.defaultPreset).common.font_family;
22977
24580
  return { value };
@@ -22997,7 +24600,7 @@ function makePresetClass(base2, preset) {
22997
24600
  return baseClass + preset.id;
22998
24601
  }
22999
24602
  const StylePreset = Extension.create({
23000
- name: "style_preset",
24603
+ name: TextSettings.STYLE_PRESET,
23001
24604
  addStorage: () => ({
23002
24605
  presetStyleEl: null
23003
24606
  }),
@@ -23118,11 +24721,18 @@ const StylePreset = Extension.create({
23118
24721
  };
23119
24722
  });
23120
24723
  }),
24724
+ isSettingCustomized: createCommand(({ commands: commands2 }, group, name) => {
24725
+ const customization = commands2.getPresetCustomization();
24726
+ return computed(() => {
24727
+ var _a, _b;
24728
+ return (_b = (_a = unref(customization)[group]) == null ? void 0 : _a.includes(name)) != null ? _b : false;
24729
+ });
24730
+ }),
23121
24731
  removePresetCustomization: createCommand(({ chain }) => {
23122
- chain().storeSelection().expandSelectionToBlock().unsetMarks(TextSettings.marks).resetAttributes(NodeTypes.PARAGRAPH, TextSettings.attributes).resetAttributes(NodeTypes.HEADING, TextSettings.attributes).restoreSelection().run();
24732
+ chain().storeSelection().expandSelectionToBlock().removeMarks(TextSettings.marks).resetAttributes(NodeTypes.PARAGRAPH, TextSettings.attributes).resetAttributes(NodeTypes.HEADING, TextSettings.attributes).restoreSelection().run();
23123
24733
  }),
23124
24734
  removeFormat: createCommand(({ chain }) => {
23125
- chain().storeSelection().expandSelectionToBlock().unsetAllMarks().applyDefaultPreset().restoreSelection().run();
24735
+ chain().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run();
23126
24736
  })
23127
24737
  };
23128
24738
  },
@@ -23153,7 +24763,7 @@ const StylePreset = Extension.create({
23153
24763
  });
23154
24764
  const FontWeight = Mark.create({
23155
24765
  name: TextSettings.FONT_WEIGHT,
23156
- group: "settings",
24766
+ group: MarkGroups.SETTINGS,
23157
24767
  addAttributes: () => ({
23158
24768
  value: { required: true }
23159
24769
  }),
@@ -23224,7 +24834,7 @@ const FontWeight = Mark.create({
23224
24834
  });
23225
24835
  const FontSize = Mark.create({
23226
24836
  name: TextSettings.FONT_SIZE,
23227
- group: "settings",
24837
+ group: MarkGroups.SETTINGS,
23228
24838
  addOptions: () => ({
23229
24839
  minSize: 1,
23230
24840
  maxSize: 100
@@ -23302,7 +24912,7 @@ const FontSize = Mark.create({
23302
24912
  });
23303
24913
  const FontColor = Mark.create({
23304
24914
  name: TextSettings.FONT_COLOR,
23305
- group: "settings",
24915
+ group: MarkGroups.SETTINGS,
23306
24916
  addAttributes: () => ({
23307
24917
  value: { required: true }
23308
24918
  }),
@@ -23339,7 +24949,6 @@ const FontColor = Mark.create({
23339
24949
  });
23340
24950
  const BackgroundColor = Mark.create({
23341
24951
  name: TextSettings.BACKGROUND_COLOR,
23342
- group: "settings",
23343
24952
  addAttributes: () => ({
23344
24953
  value: { required: true }
23345
24954
  }),
@@ -23380,7 +24989,7 @@ const DeviceManager = Extension.create({
23380
24989
  });
23381
24990
  const FontStyle = Mark.create({
23382
24991
  name: TextSettings.FONT_STYLE,
23383
- group: "settings",
24992
+ group: MarkGroups.SETTINGS,
23384
24993
  addAttributes: () => ({
23385
24994
  italic: { required: true }
23386
24995
  }),
@@ -23448,7 +25057,6 @@ const FontStyle = Mark.create({
23448
25057
  const TextDecoration = Mark.create({
23449
25058
  name: TextSettings.TEXT_DECORATION,
23450
25059
  priority: 1e3,
23451
- group: "settings",
23452
25060
  addAttributes: () => ({
23453
25061
  underline: { default: false },
23454
25062
  strike_through: { default: false }
@@ -23464,22 +25072,30 @@ const TextDecoration = Mark.create({
23464
25072
  return computed(() => unref(decoration).strike_through);
23465
25073
  }),
23466
25074
  getTextDecoration: createCommand(({ commands: commands2 }) => {
23467
- const selectionRef = commands2.getMarks(this.name);
25075
+ const selectionRef = commands2.getMark(this.name);
23468
25076
  const defaultValueRef = commands2.getDefaultTextDecoration();
23469
25077
  return computed(() => {
23470
- return unref(selectionRef).reduceRight((collector, mark) => ({
23471
- underline: collector.underline || mark.underline,
23472
- strike_through: collector.strike_through || mark.strike_through
23473
- }), unref(defaultValueRef));
25078
+ var _a;
25079
+ const attrs = (_a = unref(selectionRef)) != null ? _a : {};
25080
+ const defaultValue = unref(defaultValueRef);
25081
+ return {
25082
+ underline: attrs.underline || defaultValue.underline,
25083
+ strike_through: attrs.strike_through || defaultValue.strike_through
25084
+ };
23474
25085
  });
23475
25086
  }),
25087
+ isUnderlineCustomized: createCommand(({ commands: commands2 }) => {
25088
+ const currentValue = commands2.isUnderline();
25089
+ const defaultValue = commands2.getDefaultTextDecoration();
25090
+ return computed(() => unref(currentValue) !== unref(defaultValue).underline);
25091
+ }),
23476
25092
  getDefaultTextDecoration: createCommand(({ commands: commands2 }) => {
23477
25093
  const preset = commands2.getPreset();
23478
25094
  return computed(() => {
23479
- const decoration = unref(preset).common.text_decoration;
25095
+ const { text_decoration } = unref(preset).common;
23480
25096
  return {
23481
- underline: decoration.includes("underline"),
23482
- strike_through: decoration.includes("line-through")
25097
+ underline: text_decoration.includes("underline"),
25098
+ strike_through: text_decoration.includes("line-through")
23483
25099
  };
23484
25100
  });
23485
25101
  }),
@@ -23492,23 +25108,7 @@ const TextDecoration = Mark.create({
23492
25108
  toggleTextDecoration: createCommand(({ commands: commands2 }, name, toEnable = null) => {
23493
25109
  const value = unref(commands2.getTextDecoration());
23494
25110
  const isEnabled = toEnable != null ? toEnable : !value[name];
23495
- commands2.applyMark(this.name, { [name]: isEnabled }, {
23496
- compareParentMark: (parent, child) => {
23497
- if (parent.type.name !== child.type.name)
23498
- return false;
23499
- return parent.attrs[name] || parent.eq(child);
23500
- },
23501
- onAppliedToParent: ({ tr, textPosition, initialMark, applyingMark }) => {
23502
- if (!initialMark)
23503
- return;
23504
- if (initialMark.eq(applyingMark)) {
23505
- tr.removeMark(textPosition.from, textPosition.to, applyingMark.type);
23506
- return;
23507
- }
23508
- const mark = applyingMark.type.create({ ...initialMark.attrs, [name]: isEnabled });
23509
- tr.addMark(textPosition.from, textPosition.to, mark);
23510
- }
23511
- });
25111
+ commands2.applyMark(this.name, { [name]: isEnabled });
23512
25112
  }),
23513
25113
  applyTextDecoration: createCommand(({ commands: commands2 }, name) => {
23514
25114
  commands2.toggleTextDecoration(name, true);
@@ -23727,6 +25327,125 @@ const LineHeight = Extension.create({
23727
25327
  };
23728
25328
  }
23729
25329
  });
25330
+ class RemoveNodeMarkStep extends Step {
25331
+ static fromJSON(schema, json) {
25332
+ if (typeof json.pos != "number") {
25333
+ throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
25334
+ }
25335
+ return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
25336
+ }
25337
+ constructor(pos, mark) {
25338
+ super();
25339
+ this.pos = pos;
25340
+ this.mark = mark;
25341
+ }
25342
+ apply(doc2) {
25343
+ const node = doc2.nodeAt(this.pos);
25344
+ if (!node)
25345
+ return StepResult.fail("No node at mark step's position");
25346
+ const updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
25347
+ const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
25348
+ return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
25349
+ }
25350
+ invert(doc2) {
25351
+ const node = doc2.nodeAt(this.pos);
25352
+ if (!node || !this.mark.isInSet(node.marks))
25353
+ return this;
25354
+ return new AddNodeMarkStep(this.pos, this.mark);
25355
+ }
25356
+ map(mapping) {
25357
+ const pos = mapping.mapResult(this.pos, 1);
25358
+ return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);
25359
+ }
25360
+ toJSON() {
25361
+ return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
25362
+ }
25363
+ }
25364
+ Step.jsonID("removeNodeMark", RemoveNodeMarkStep);
25365
+ class AddNodeMarkStep extends Step {
25366
+ static fromJSON(schema, json) {
25367
+ if (typeof json.pos != "number") {
25368
+ throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
25369
+ }
25370
+ return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
25371
+ }
25372
+ constructor(pos, mark) {
25373
+ super();
25374
+ this.pos = pos;
25375
+ this.mark = mark;
25376
+ }
25377
+ apply(doc2) {
25378
+ const node = doc2.nodeAt(this.pos);
25379
+ if (!node)
25380
+ return StepResult.fail("No node at mark step's position");
25381
+ const updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
25382
+ const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
25383
+ return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
25384
+ }
25385
+ invert(doc2) {
25386
+ const node = doc2.nodeAt(this.pos);
25387
+ if (node) {
25388
+ const newSet = this.mark.addToSet(node.marks);
25389
+ if (newSet.length === node.marks.length) {
25390
+ for (const mark of node.marks) {
25391
+ if (!mark.isInSet(newSet)) {
25392
+ return new AddNodeMarkStep(this.pos, mark);
25393
+ }
25394
+ }
25395
+ return new AddNodeMarkStep(this.pos, this.mark);
25396
+ }
25397
+ }
25398
+ return new RemoveNodeMarkStep(this.pos, this.mark);
25399
+ }
25400
+ map(mapping) {
25401
+ const pos = mapping.mapResult(this.pos, 1);
25402
+ return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);
25403
+ }
25404
+ toJSON() {
25405
+ return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
25406
+ }
25407
+ }
25408
+ Step.jsonID("addNodeMark", AddNodeMarkStep);
25409
+ class AttrStep extends Step {
25410
+ static fromJSON(schema, json) {
25411
+ if (typeof json.pos != "number" || typeof json.attr != "string") {
25412
+ throw new RangeError("Invalid input for AttrStep.fromJSON");
25413
+ }
25414
+ return new AttrStep(json.pos, json.attr, json.value);
25415
+ }
25416
+ constructor(pos, attr, value) {
25417
+ super();
25418
+ this.pos = pos;
25419
+ this.attr = attr;
25420
+ this.value = value;
25421
+ }
25422
+ apply(doc2) {
25423
+ const node = doc2.nodeAt(this.pos);
25424
+ if (!node)
25425
+ return StepResult.fail("No node at attribute step's position");
25426
+ const attrs = /* @__PURE__ */ Object.create(null);
25427
+ for (let name in node.attrs)
25428
+ attrs[name] = node.attrs[name];
25429
+ attrs[this.attr] = this.value;
25430
+ const updated = node.type.create(attrs, null, node.marks);
25431
+ const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
25432
+ return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
25433
+ }
25434
+ getMap() {
25435
+ return StepMap.empty;
25436
+ }
25437
+ invert(doc2) {
25438
+ return new AttrStep(this.pos, this.attr, doc2.nodeAt(this.pos).attrs[this.attr]);
25439
+ }
25440
+ map(mapping) {
25441
+ let pos = mapping.mapResult(this.pos, 1);
25442
+ return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);
25443
+ }
25444
+ toJSON() {
25445
+ return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
25446
+ }
25447
+ }
25448
+ Step.jsonID("attr", AttrStep);
23730
25449
  const ListItem$1 = Node.create({
23731
25450
  name: "listItem",
23732
25451
  addOptions() {
@@ -23756,7 +25475,7 @@ const ListItem$1 = Node.create({
23756
25475
  });
23757
25476
  const ListItem = ListItem$1.extend({
23758
25477
  name: NodeTypes.LIST_ITEM,
23759
- marks: "settings",
25478
+ marks: MarkGroups.SETTINGS,
23760
25479
  addOptions: () => ({
23761
25480
  HTMLAttributes: { class: "zw-style" }
23762
25481
  }),
@@ -23769,7 +25488,7 @@ const List = Node.create({
23769
25488
  name: NodeTypes.LIST,
23770
25489
  content: `${NodeTypes.LIST_ITEM}+`,
23771
25490
  group: "block list",
23772
- marks: "settings",
25491
+ marks: MarkGroups.SETTINGS,
23773
25492
  addExtensions: () => [
23774
25493
  ListItem
23775
25494
  ],
@@ -23829,15 +25548,69 @@ const List = Node.create({
23829
25548
  applyList: createCommand(({ commands: commands2, chain }, type) => {
23830
25549
  const currentType = unref(commands2.getListType());
23831
25550
  if (currentType === type) {
23832
- commands2.applyDefaultPreset();
25551
+ commands2.removeList();
23833
25552
  return;
23834
25553
  }
23835
- return chain().applyDefaultPreset()._addList(type).run();
25554
+ return chain().applyDefaultPreset().toggleList(NodeTypes.LIST, NodeTypes.LIST_ITEM).setBlockAttributes("bullet", { type }).command(({ commands: commands3, tr }) => commands3._bubbleListItemMarks(tr)).run();
23836
25555
  }),
23837
- _addList: createCommand(({ chain }, type) => {
23838
- return chain().toggleList(NodeTypes.LIST, NodeTypes.LIST_ITEM).setBlockAttributes("bullet", { type }).run();
25556
+ _bubbleListItemMarks: createCommand((_, tr) => {
25557
+ const { doc: doc2, selection } = tr;
25558
+ const from2 = selection.$from.start();
25559
+ const to = selection.$to.end();
25560
+ function canBubbleMark(node, childMark) {
25561
+ if (TextSettings.inlineMarks.includes(childMark.type))
25562
+ return false;
25563
+ if (childMark.type.isInSet(node.marks))
25564
+ return false;
25565
+ for (const child of node.content.content) {
25566
+ if (!child.childCount)
25567
+ continue;
25568
+ if (!child.marks)
25569
+ return false;
25570
+ if (!childMark.isInSet(child.marks))
25571
+ return false;
25572
+ }
25573
+ return true;
25574
+ }
25575
+ doc2.nodesBetween(from2, to, (node, position) => {
25576
+ if (node.type.name === NodeTypes.LIST)
25577
+ return;
25578
+ if (node.type.name !== NodeTypes.LIST_ITEM)
25579
+ return false;
25580
+ const bubbled = [];
25581
+ node.forEach((child) => {
25582
+ for (const childMark of child.marks) {
25583
+ if (childMark.isInSet(bubbled)) {
25584
+ tr.step(new RemoveNodeMarkStep(position + 1, childMark));
25585
+ continue;
25586
+ }
25587
+ if (canBubbleMark(node, childMark)) {
25588
+ tr.step(new RemoveNodeMarkStep(position + 1, childMark));
25589
+ tr.step(new AddNodeMarkStep(position, copyMark(childMark)));
25590
+ bubbled.push(childMark);
25591
+ }
25592
+ }
25593
+ });
25594
+ return false;
25595
+ });
23839
25596
  }),
23840
- removeList: createCommand(({ commands: commands2 }) => {
25597
+ removeList: createCommand(({ commands: commands2, state }) => {
25598
+ const { tr, doc: doc2, selection } = state;
25599
+ const from2 = selection.$from.start();
25600
+ const to = selection.$to.end();
25601
+ doc2.nodesBetween(from2, to, (node, position, parent) => {
25602
+ if ([NodeTypes.LIST, NodeTypes.LIST_ITEM].includes(node.type.name))
25603
+ return;
25604
+ if (parent.type.name !== NodeTypes.LIST_ITEM)
25605
+ return false;
25606
+ const addingMarks = parent.marks.filter(function(mark) {
25607
+ return !mark.type.isInSet(node.marks);
25608
+ });
25609
+ for (const mark of addingMarks) {
25610
+ tr.step(new AddNodeMarkStep(position, copyMark(mark)));
25611
+ }
25612
+ return false;
25613
+ });
23841
25614
  commands2.liftListItem(NodeTypes.LIST_ITEM);
23842
25615
  })
23843
25616
  };
@@ -24877,7 +26650,7 @@ const Link = Link$1.extend({
24877
26650
  NodeFactory.mark(TextSettings.LINK, attributes)
24878
26651
  ]));
24879
26652
  }
24880
- return chain().setMark(this.name, attributes).transformText(() => attributes.text).extendMarkRange(TextSettings.LINK).run();
26653
+ return chain().applyMark(this.name, attributes).transformText(() => attributes.text).extendMarkRange(TextSettings.LINK).run();
24881
26654
  }),
24882
26655
  isLink: createCommand(({ editor }) => computed(() => editor.isActive(TextSettings.LINK))),
24883
26656
  getLinkPreset: createCommand(() => computed(() => this.options.preset))
@@ -24947,11 +26720,13 @@ const Superscript = Superscript$1.extend({
24947
26720
  HTMLAttributes: { class: "zw-superscript" }
24948
26721
  }),
24949
26722
  addCommands() {
26723
+ const { setSuperscript, unsetSuperscript } = this.parent();
24950
26724
  return {
24951
- ...this.parent(),
26725
+ applySuperscript: setSuperscript,
26726
+ removeSuperscript: unsetSuperscript,
24952
26727
  toggleSuperscript: createCommand(({ commands: commands2 }) => {
24953
26728
  const isActive2 = unref(commands2.isSuperscript());
24954
- isActive2 ? commands2.unsetSuperscript() : commands2.setSuperscript();
26729
+ isActive2 ? commands2.applySuperscript() : commands2.removeSuperscript();
24955
26730
  }),
24956
26731
  isSuperscript: createCommand(({ commands: commands2 }) => {
24957
26732
  const selectionRef = commands2.getMark(this.name);
@@ -25570,97 +27345,20 @@ const History = Extension.create({
25570
27345
  };
25571
27346
  }
25572
27347
  });
25573
- class RemoveNodeMarkStep extends Step {
25574
- static fromJSON(schema, json) {
25575
- if (typeof json.pos != "number") {
25576
- throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
25577
- }
25578
- return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
25579
- }
25580
- constructor(pos, mark) {
25581
- super();
25582
- this.pos = pos;
25583
- this.mark = mark;
25584
- }
25585
- apply(doc2) {
25586
- const node = doc2.nodeAt(this.pos);
25587
- if (!node)
25588
- return StepResult.fail("No node at mark step's position");
25589
- const updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
25590
- const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
25591
- return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
25592
- }
25593
- invert(doc2) {
25594
- const node = doc2.nodeAt(this.pos);
25595
- if (!node || !this.mark.isInSet(node.marks))
25596
- return this;
25597
- return new AddNodeMarkStep(this.pos, this.mark);
25598
- }
25599
- map(mapping) {
25600
- const pos = mapping.mapResult(this.pos, 1);
25601
- return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);
25602
- }
25603
- toJSON() {
25604
- return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
25605
- }
25606
- }
25607
- Step.jsonID("removeNodeMark", RemoveNodeMarkStep);
25608
- class AddNodeMarkStep extends Step {
25609
- static fromJSON(schema, json) {
25610
- if (typeof json.pos != "number") {
25611
- throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
25612
- }
25613
- return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
25614
- }
25615
- constructor(pos, mark) {
25616
- super();
25617
- this.pos = pos;
25618
- this.mark = mark;
25619
- }
25620
- apply(doc2) {
25621
- const node = doc2.nodeAt(this.pos);
25622
- if (!node)
25623
- return StepResult.fail("No node at mark step's position");
25624
- const updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
25625
- const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
25626
- return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
25627
- }
25628
- invert(doc2) {
25629
- const node = doc2.nodeAt(this.pos);
25630
- if (node) {
25631
- const newSet = this.mark.addToSet(node.marks);
25632
- if (newSet.length === node.marks.length) {
25633
- for (const mark of node.marks) {
25634
- if (!mark.isInSet(newSet)) {
25635
- return new AddNodeMarkStep(this.pos, mark);
25636
- }
25637
- }
25638
- return new AddNodeMarkStep(this.pos, this.mark);
25639
- }
25640
- }
25641
- return new RemoveNodeMarkStep(this.pos, this.mark);
25642
- }
25643
- map(mapping) {
25644
- const pos = mapping.mapResult(this.pos, 1);
25645
- return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);
25646
- }
25647
- toJSON() {
25648
- return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
25649
- }
25650
- }
25651
- Step.jsonID("addNodeMark", AddNodeMarkStep);
25652
27348
  const NodeProcessor = Extension.create({
25653
27349
  name: "node_processor",
25654
27350
  addCommands() {
25655
27351
  return {
25656
- setBlockAttributes: createCommand(({ commands: commands2 }, name, attrs, defaults2 = {}) => {
27352
+ setBlockAttributes: createCommand(({ commands: commands2, state }, name, attrs, defaults2 = {}) => {
25657
27353
  var _a;
25658
27354
  const current = (_a = unref(commands2.getBlockAttributes(name))) != null ? _a : {};
25659
- for (const type of NodeTypes.blocks) {
25660
- commands2.updateAttributes(type, {
25661
- [name]: { ...defaults2, ...current, ...attrs }
25662
- });
25663
- }
27355
+ const { doc: doc2, tr } = state;
27356
+ const { from: from2, to } = tr.selection;
27357
+ doc2.nodesBetween(from2, to, (node, position) => {
27358
+ if (!NodeTypes.blocks.includes(node.type.name))
27359
+ return;
27360
+ tr.step(new AttrStep(position, name, { ...defaults2, ...current, ...attrs }));
27361
+ });
25664
27362
  }),
25665
27363
  getBlockAttributes: createCommand(({ editor }, name, defaults2) => computed(() => {
25666
27364
  var _a;
@@ -25670,14 +27368,14 @@ const NodeProcessor = Extension.create({
25670
27368
  }
25671
27369
  return Object.keys(attrs).length ? attrs : null;
25672
27370
  })),
25673
- applyMark: createCommand(({ state }, name, value, customizer = {}) => {
27371
+ applyMark: createCommand(({ state, commands: commands2 }, name, value) => {
25674
27372
  const { tr, doc: doc2, schema } = state;
25675
27373
  const { $from, $to } = tr.selection;
25676
27374
  const markType = getMarkType(name, schema);
25677
- const onAppliedToParent = customizer.onAppliedToParent || ((context) => {
25678
- const { tr: tr2, textPosition, applyingMark } = context;
25679
- tr2.removeMark(textPosition.from, textPosition.to, applyingMark.type);
25680
- });
27375
+ const markGroup = markType.spec.group || "";
27376
+ if (!markGroup.includes(MarkGroups.SETTINGS)) {
27377
+ return commands2.setMark(name, value);
27378
+ }
25681
27379
  if ($from.pos === $to.pos)
25682
27380
  return;
25683
27381
  doc2.nodesBetween($from.pos, $to.pos, (node, position) => {
@@ -25686,15 +27384,14 @@ const NodeProcessor = Extension.create({
25686
27384
  const initialMark = findMarkByType(node.marks, name);
25687
27385
  const applyingMark = markType.create({ ...(initialMark == null ? void 0 : initialMark.attrs) || {}, ...value });
25688
27386
  const textPosition = resolveTextPosition($from, $to, node, position);
25689
- if (isMarkAppliedToParent(tr, position, applyingMark, customizer.compareParentMark)) {
25690
- onAppliedToParent({ tr, textPosition, applyingMark, initialMark, node });
25691
- return;
27387
+ if (isMarkAppliedToParent(tr.doc, position, applyingMark)) {
27388
+ return commands2._removeNodeMark({ tr, node, position, mark: markType });
25692
27389
  }
25693
27390
  if (node.isText) {
25694
27391
  tr.addMark(textPosition.from, textPosition.to, applyingMark);
25695
27392
  return;
25696
27393
  }
25697
- if (isNodeFullySelected($from, $to, node, position)) {
27394
+ if (isNodeFullySelected(tr.doc, tr.selection, node, position)) {
25698
27395
  tr.step(new AddNodeMarkStep(position, applyingMark));
25699
27396
  }
25700
27397
  });
@@ -25729,12 +27426,41 @@ const NodeProcessor = Extension.create({
25729
27426
  });
25730
27427
  }),
25731
27428
  getDeviceSettingMark: createCommand(({ commands: commands2 }, name, defaultRef) => {
25732
- const selectionRef = commands2.getMark(name);
27429
+ const selectionRef = commands2.getMarks(name);
25733
27430
  const deviceRef = commands2.getDevice();
25734
27431
  return computed(() => {
25735
- var _a, _b;
25736
- return (_b = (_a = unref(selectionRef)) == null ? void 0 : _a[unref(deviceRef)]) != null ? _b : unref(defaultRef);
27432
+ for (const attrs of unref(selectionRef)) {
27433
+ const value = attrs[unref(deviceRef)];
27434
+ if (value)
27435
+ return value;
27436
+ }
27437
+ return unref(defaultRef);
25737
27438
  });
27439
+ }),
27440
+ removeAllMarks: createCommand(({ state, commands: commands2 }) => {
27441
+ const { tr, doc: doc2 } = state;
27442
+ const { from: from2, to } = tr.selection;
27443
+ doc2.nodesBetween(from2, to, (node, position) => {
27444
+ for (const mark of node.marks) {
27445
+ commands2._removeNodeMark({ tr, node, position, mark });
27446
+ }
27447
+ });
27448
+ }),
27449
+ removeMarks: createCommand(({ state, commands: commands2 }, marks) => {
27450
+ const { tr, doc: doc2 } = state;
27451
+ const { from: from2, to } = tr.selection;
27452
+ doc2.nodesBetween(from2, to, (node, position) => {
27453
+ const removingMarks = node.marks.filter((mark) => marks.includes(mark.type.name));
27454
+ for (const mark of removingMarks) {
27455
+ commands2._removeNodeMark({ tr, node, position, mark });
27456
+ }
27457
+ });
27458
+ }),
27459
+ removeMark: createCommand(({ commands: commands2, state }, node, position, mark) => {
27460
+ commands2._removeNodeMark({ tr: state.tr, node, position, mark });
27461
+ }),
27462
+ _removeNodeMark: createCommand((context, { tr, node, position, mark }) => {
27463
+ return node.isText ? tr.removeMark(position, position + node.nodeSize, mark) : tr.step(new RemoveNodeMarkStep(position, mark));
25738
27464
  })
25739
27465
  };
25740
27466
  }
@@ -25747,9 +27473,6 @@ const TextProcessor = Extension.create({
25747
27473
  const { from: from2, to } = state.selection;
25748
27474
  return state.doc.textBetween(from2, to, " ");
25749
27475
  }),
25750
- unsetMarks: createCommand(({ commands: commands2 }, marks) => {
25751
- marks.forEach((mark) => commands2.unsetMark(mark));
25752
- }),
25753
27476
  transformText: createCommand(({ state }, transform) => {
25754
27477
  const { $from, $to } = state.tr.selection;
25755
27478
  if ($from.pos === $to.pos)
@@ -25879,7 +27602,7 @@ const Document$1 = Node.create({
25879
27602
  content: "block+"
25880
27603
  });
25881
27604
  const Document = Document$1.extend({
25882
- marks: "settings"
27605
+ marks: MarkGroups.SETTINGS
25883
27606
  });
25884
27607
  const Paragraph$1 = Node.create({
25885
27608
  name: "paragraph",
@@ -25913,7 +27636,7 @@ const Paragraph$1 = Node.create({
25913
27636
  }
25914
27637
  });
25915
27638
  const Paragraph = Paragraph$1.extend({
25916
- marks: "_",
27639
+ marks: MarkGroups.ALL,
25917
27640
  addOptions: () => ({
25918
27641
  HTMLAttributes: { class: "zw-style" }
25919
27642
  })
@@ -25985,7 +27708,7 @@ const Heading$1 = Node.create({
25985
27708
  }
25986
27709
  });
25987
27710
  const Heading = Heading$1.extend({
25988
- marks: "_",
27711
+ marks: MarkGroups.ALL,
25989
27712
  addOptions: () => ({
25990
27713
  levels: [1, 2, 3, 4],
25991
27714
  HTMLAttributes: { class: "zw-style" }
@@ -26246,7 +27969,7 @@ const __vue2_script = {
26246
27969
  updateToolbar();
26247
27970
  }
26248
27971
  const pageBlocks = toRef(props, "pageBlocks");
26249
- const editor = useEditor({
27972
+ const { editor, getContent } = useEditor({
26250
27973
  content: toRef(props, "value"),
26251
27974
  onChange: (content) => onChange(content),
26252
27975
  isReadonlyRef: toRef(props, "readonly"),
@@ -26282,7 +28005,8 @@ const __vue2_script = {
26282
28005
  toolbarRef,
26283
28006
  wysiwygRef,
26284
28007
  toolbar,
26285
- updateToolbar
28008
+ updateToolbar,
28009
+ getContent
26286
28010
  };
26287
28011
  }
26288
28012
  };
@@ -26311,5 +28035,7 @@ export {
26311
28035
  NodeTypes,
26312
28036
  TextSettings,
26313
28037
  Wysiwyg,
26314
- isWysiwygContent
28038
+ isWysiwygContent,
28039
+ markWysiwygContent,
28040
+ unmarkWysiwygContent
26315
28041
  };