@zipify/wysiwyg 1.3.0-0 → 2.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +1 -1
- package/config/build/lib.config.js +4 -2
- package/dist/cli.js +10 -2
- package/dist/wysiwyg.css +43 -48
- package/dist/wysiwyg.mjs +1928 -787
- package/example/ExampleApp.vue +3 -1
- package/lib/__tests__/utils/buildTestExtensions.js +14 -0
- package/lib/__tests__/utils/index.js +1 -0
- package/lib/components/base/Button.vue +0 -7
- package/lib/components/base/dropdown/Dropdown.vue +1 -7
- package/lib/components/base/dropdown/DropdownActivator.vue +4 -19
- package/lib/components/base/dropdown/__tests__/DropdownActivator.test.js +1 -23
- package/lib/components/toolbar/controls/AlignmentControl.vue +1 -11
- package/lib/components/toolbar/controls/FontColorControl.vue +0 -13
- package/lib/components/toolbar/controls/FontFamilyControl.vue +0 -4
- package/lib/components/toolbar/controls/FontSizeControl.vue +1 -6
- package/lib/components/toolbar/controls/FontWeightControl.vue +0 -12
- package/lib/components/toolbar/controls/ItalicControl.vue +0 -13
- package/lib/components/toolbar/controls/LineHeightControl.vue +0 -14
- package/lib/components/toolbar/controls/StylePresetControl.vue +1 -1
- package/lib/components/toolbar/controls/SuperscriptControl.vue +2 -2
- package/lib/components/toolbar/controls/UnderlineControl.vue +0 -12
- package/lib/components/toolbar/controls/__tests__/AlignmentControl.test.js +5 -72
- package/lib/components/toolbar/controls/__tests__/FontColorControl.test.js +1 -22
- package/lib/components/toolbar/controls/__tests__/FontFamilyControl.test.js +0 -1
- package/lib/components/toolbar/controls/__tests__/FontSizeControl.test.js +0 -1
- package/lib/components/toolbar/controls/__tests__/FontWeightControl.test.js +0 -1
- package/lib/components/toolbar/controls/__tests__/ItalicControl.test.js +1 -23
- package/lib/components/toolbar/controls/__tests__/LineHeightControl.test.js +1 -23
- package/lib/components/toolbar/controls/__tests__/StylePresetControl.test.js +2 -2
- package/lib/components/toolbar/controls/__tests__/SuperscriptControl.test.js +2 -2
- package/lib/components/toolbar/controls/__tests__/UnderlineControl.test.js +1 -25
- package/lib/composables/__tests__/useEditor.test.js +2 -2
- package/lib/enums/TextSettings.js +5 -5
- package/lib/extensions/BackgroundColor.js +4 -4
- package/lib/extensions/FontColor.js +4 -5
- package/lib/extensions/FontFamily.js +4 -5
- package/lib/extensions/FontSize.js +5 -7
- package/lib/extensions/FontStyle.js +13 -11
- package/lib/extensions/FontWeight.js +6 -9
- package/lib/extensions/Link.js +1 -1
- package/lib/extensions/StylePreset.js +1 -15
- package/lib/extensions/Superscript.js +23 -1
- package/lib/extensions/TextDecoration.js +16 -20
- package/lib/extensions/__tests__/Alignment.test.js +10 -7
- package/lib/extensions/__tests__/BackgroundColor.test.js +6 -3
- package/lib/extensions/__tests__/CaseStyle.test.js +11 -7
- package/lib/extensions/__tests__/FontColor.test.js +6 -3
- package/lib/extensions/__tests__/FontFamily.test.js +29 -22
- package/lib/extensions/__tests__/FontSize.test.js +24 -17
- package/lib/extensions/__tests__/FontStyle.test.js +22 -16
- package/lib/extensions/__tests__/FontWeight.test.js +28 -21
- package/lib/extensions/__tests__/LineHeight.test.js +14 -11
- package/lib/extensions/__tests__/Link.test.js +14 -10
- package/lib/extensions/__tests__/Margin.test.js +2 -2
- package/lib/extensions/__tests__/StylePreset.test.js +49 -100
- package/lib/extensions/__tests__/TextDecoration.test.js +59 -37
- package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +25 -25
- package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +25 -25
- package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +105 -105
- package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +72 -72
- package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +54 -46
- package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +77 -77
- package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +68 -3
- package/lib/extensions/core/Document.js +5 -0
- package/lib/extensions/core/Heading.js +10 -0
- package/lib/extensions/core/NodeProcessor.js +112 -10
- package/lib/extensions/core/Paragraph.js +9 -0
- package/lib/extensions/core/TextProcessor.js +9 -16
- package/lib/extensions/core/__tests__/NodeProcessor.test.js +137 -10
- package/lib/extensions/core/__tests__/SelectionProcessor.test.js +2 -2
- package/lib/extensions/core/__tests__/TextProcessor.test.js +18 -41
- package/lib/extensions/core/__tests__/__snapshots__/NodeProcessor.test.js.snap +192 -0
- package/lib/extensions/core/__tests__/__snapshots__/TextProcessor.test.js.snap +7 -27
- package/lib/extensions/core/index.js +5 -5
- package/lib/extensions/core/steps/AddNodeMarkStep.js +60 -0
- package/lib/extensions/core/steps/AttrStep.js +54 -0
- package/lib/extensions/core/steps/RemoveNodeMarkStep.js +50 -0
- package/lib/extensions/core/steps/index.js +3 -0
- package/lib/extensions/list/List.js +1 -0
- package/lib/extensions/list/ListItem.js +5 -0
- package/lib/extensions/list/__tests__/List.test.js +30 -25
- package/lib/services/NodeFactory.js +25 -21
- package/lib/services/index.js +1 -1
- package/lib/services/normalizer/BaseNormalizer.js +11 -0
- package/lib/services/{BrowserDomParser.js → normalizer/BrowserDomParser.js} +0 -0
- package/lib/services/normalizer/ContentNormalizer.js +24 -0
- package/lib/services/normalizer/HtmlNormalizer.js +245 -0
- package/lib/services/normalizer/JsonNormalizer.js +81 -0
- package/lib/services/{__tests__/ContentNormalizer.test.js → normalizer/__tests__/HtmlNormalizer.test.js} +27 -67
- package/lib/services/normalizer/__tests__/JsonNormalizer.test.js +70 -0
- package/lib/services/normalizer/__tests__/__snapshots__/JsonNormalizer.test.js.snap +159 -0
- package/lib/services/normalizer/index.js +1 -0
- package/lib/styles/content.css +8 -0
- package/lib/utils/findMarkByType.js +5 -0
- package/lib/utils/index.js +5 -0
- package/lib/utils/isMarkAppliedToParent.js +10 -0
- package/lib/utils/isNodeFullySelected.js +10 -0
- package/lib/utils/resolveNodePosition.js +6 -0
- package/lib/utils/resolveTextPosition.js +6 -0
- package/package.json +3 -1
- package/lib/assets/icons/indicator.svg +0 -5
- package/lib/services/ContentNormalizer.js +0 -293
package/dist/wysiwyg.mjs
CHANGED
|
@@ -17,7 +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
|
|
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
|
+
};
|
|
25
|
+
var __privateMethod = (obj, member, method) => {
|
|
26
|
+
__accessCheck(obj, member, "access private method");
|
|
27
|
+
return method;
|
|
28
|
+
};
|
|
29
|
+
var _domParser, _parser, _NodeFilter, NodeFilter_get, _Node, Node_get, _removeComments, removeComments_fn, _createNodeIterator, createNodeIterator_fn, _iterateNodes, iterateNodes_fn, _runIterator, runIterator_fn, _removeEmptyNodes, removeEmptyNodes_fn, _normalizeListItems, normalizeListItems_fn, _isBlockNode, isBlockNode_fn, _assignElementProperties, assignElementProperties_fn, _removeStyleProperties, removeStyleProperties_fn, _normalizeBreakLines, normalizeBreakLines_fn, _normalizeBlockTextDecoration, normalizeBlockTextDecoration_fn, _moveTextDecorationToChildren, moveTextDecorationToChildren_fn, _parseTextDecoration, parseTextDecoration_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;
|
|
21
30
|
import { computed, ref, watch, inject, onUnmounted, nextTick, provide, onMounted, toRef, unref, reactive } from "vue";
|
|
22
31
|
import { ColorModel, ZipifyColorPicker } from "@zipify/colorpicker";
|
|
23
32
|
function OrderedMap(content) {
|
|
@@ -4310,11 +4319,11 @@ class Plugin {
|
|
|
4310
4319
|
return state[this.key];
|
|
4311
4320
|
}
|
|
4312
4321
|
}
|
|
4313
|
-
const keys$
|
|
4322
|
+
const keys$3 = /* @__PURE__ */ Object.create(null);
|
|
4314
4323
|
function createKey(name) {
|
|
4315
|
-
if (name in keys$
|
|
4316
|
-
return name + "$" + ++keys$
|
|
4317
|
-
keys$
|
|
4324
|
+
if (name in keys$3)
|
|
4325
|
+
return name + "$" + ++keys$3[name];
|
|
4326
|
+
keys$3[name] = 0;
|
|
4318
4327
|
return name + "$";
|
|
4319
4328
|
}
|
|
4320
4329
|
class PluginKey {
|
|
@@ -9608,11 +9617,11 @@ function getRenderedAttributes(nodeOrMark, extensionAttributes) {
|
|
|
9608
9617
|
return item.attribute.renderHTML(nodeOrMark.attrs) || {};
|
|
9609
9618
|
}).reduce((attributes, attribute) => mergeAttributes(attributes, attribute), {});
|
|
9610
9619
|
}
|
|
9611
|
-
function isFunction$
|
|
9620
|
+
function isFunction$4(value) {
|
|
9612
9621
|
return typeof value === "function";
|
|
9613
9622
|
}
|
|
9614
9623
|
function callOrReturn(value, context = void 0, ...props) {
|
|
9615
|
-
if (isFunction$
|
|
9624
|
+
if (isFunction$4(value)) {
|
|
9616
9625
|
if (context) {
|
|
9617
9626
|
return value.bind(context)(...props);
|
|
9618
9627
|
}
|
|
@@ -11966,7 +11975,7 @@ class Editor$1 extends EventEmitter {
|
|
|
11966
11975
|
return this.view.state;
|
|
11967
11976
|
}
|
|
11968
11977
|
registerPlugin(plugin, handlePlugins) {
|
|
11969
|
-
const plugins = isFunction$
|
|
11978
|
+
const plugins = isFunction$4(handlePlugins) ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin];
|
|
11970
11979
|
const state = this.state.reconfigure({ plugins });
|
|
11971
11980
|
this.view.updateState(state);
|
|
11972
11981
|
}
|
|
@@ -14019,11 +14028,10 @@ const TextSettings = Object.freeze({
|
|
|
14019
14028
|
LINK: "link",
|
|
14020
14029
|
STYLE_PRESET: "style_preset",
|
|
14021
14030
|
get attributes() {
|
|
14022
|
-
return [
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
|
|
14026
|
-
];
|
|
14031
|
+
return [this.ALIGNMENT, this.LINE_HEIGHT, this.MARGIN];
|
|
14032
|
+
},
|
|
14033
|
+
get inlineMarks() {
|
|
14034
|
+
return [this.TEXT_DECORATION, this.LINK];
|
|
14027
14035
|
},
|
|
14028
14036
|
get marks() {
|
|
14029
14037
|
return [
|
|
@@ -14286,7 +14294,7 @@ var __component__$F = /* @__PURE__ */ normalizeComponent(
|
|
|
14286
14294
|
staticRenderFns$F,
|
|
14287
14295
|
false,
|
|
14288
14296
|
__vue2_injectStyles$F,
|
|
14289
|
-
"
|
|
14297
|
+
"562f4e4a",
|
|
14290
14298
|
null,
|
|
14291
14299
|
null
|
|
14292
14300
|
);
|
|
@@ -14415,23 +14423,22 @@ const __vite_glob_0_4 = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" sty
|
|
|
14415
14423
|
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';
|
|
14416
14424
|
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';
|
|
14417
14425
|
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';
|
|
14418
|
-
const __vite_glob_0_8 = '<svg
|
|
14419
|
-
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="
|
|
14420
|
-
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="
|
|
14421
|
-
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 <
|
|
14422
|
-
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 <
|
|
14423
|
-
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 <
|
|
14424
|
-
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 <
|
|
14425
|
-
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="
|
|
14426
|
-
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="
|
|
14427
|
-
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="
|
|
14428
|
-
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)"
|
|
14429
|
-
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="
|
|
14430
|
-
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)"
|
|
14431
|
-
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="
|
|
14432
|
-
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
|
|
14433
|
-
const
|
|
14434
|
-
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 });
|
|
14426
|
+
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';
|
|
14427
|
+
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';
|
|
14428
|
+
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';
|
|
14429
|
+
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';
|
|
14430
|
+
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';
|
|
14431
|
+
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';
|
|
14432
|
+
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';
|
|
14433
|
+
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';
|
|
14434
|
+
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';
|
|
14435
|
+
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';
|
|
14436
|
+
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';
|
|
14437
|
+
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';
|
|
14438
|
+
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';
|
|
14439
|
+
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';
|
|
14440
|
+
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';
|
|
14441
|
+
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 });
|
|
14435
14442
|
function importIcon(name) {
|
|
14436
14443
|
return modules[`../assets/icons/${name}.svg`] || "";
|
|
14437
14444
|
}
|
|
@@ -14444,6 +14451,38 @@ function unmarkWysiwygContent({ __wswg__, ...content }) {
|
|
|
14444
14451
|
function markWysiwygContent(content) {
|
|
14445
14452
|
return { ...content, __wswg__: true };
|
|
14446
14453
|
}
|
|
14454
|
+
function resolveNodePosition({ path, pos }, node, modifier) {
|
|
14455
|
+
const index = path.indexOf(node);
|
|
14456
|
+
const slice2 = path.slice(index).reverse().filter((step) => typeof step === "object");
|
|
14457
|
+
return pos + modifier * slice2.length;
|
|
14458
|
+
}
|
|
14459
|
+
function resolveTextPosition($from, $to, node, position) {
|
|
14460
|
+
return {
|
|
14461
|
+
from: Math.max(position, $from.pos),
|
|
14462
|
+
to: Math.min(position + node.nodeSize, $to.pos)
|
|
14463
|
+
};
|
|
14464
|
+
}
|
|
14465
|
+
function isNodeFullySelected($from, $to, node, position) {
|
|
14466
|
+
const fromPosition = resolveNodePosition($from, node, -1);
|
|
14467
|
+
const toPosition = resolveNodePosition($to, node, 1);
|
|
14468
|
+
const isFromMatch = fromPosition <= position;
|
|
14469
|
+
const isToMatch = toPosition >= node.nodeSize + position;
|
|
14470
|
+
return isFromMatch && isToMatch;
|
|
14471
|
+
}
|
|
14472
|
+
function isMarkAppliedToParent({ doc: doc2 }, position, checkingMark) {
|
|
14473
|
+
const steps = doc2.resolve(position).path.reverse();
|
|
14474
|
+
for (const step of steps) {
|
|
14475
|
+
if (typeof step === "number")
|
|
14476
|
+
continue;
|
|
14477
|
+
if (checkingMark.isInSet(step.marks))
|
|
14478
|
+
return true;
|
|
14479
|
+
}
|
|
14480
|
+
return false;
|
|
14481
|
+
}
|
|
14482
|
+
function findMarkByType(list, typeOrName) {
|
|
14483
|
+
const name = typeof typeOrName === "string" ? typeOrName : typeOrName.name;
|
|
14484
|
+
return list.find((mark) => mark.type.name === name);
|
|
14485
|
+
}
|
|
14447
14486
|
var render$D = function __render__6() {
|
|
14448
14487
|
var _vm = this;
|
|
14449
14488
|
var _h = _vm.$createElement;
|
|
@@ -14592,9 +14631,9 @@ var toObject$6 = function(argument) {
|
|
|
14592
14631
|
};
|
|
14593
14632
|
var uncurryThis$p = functionUncurryThis;
|
|
14594
14633
|
var toObject$5 = toObject$6;
|
|
14595
|
-
var hasOwnProperty$
|
|
14634
|
+
var hasOwnProperty$a = uncurryThis$p({}.hasOwnProperty);
|
|
14596
14635
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
14597
|
-
return hasOwnProperty$
|
|
14636
|
+
return hasOwnProperty$a(toObject$5(it), key);
|
|
14598
14637
|
};
|
|
14599
14638
|
var uncurryThis$o = functionUncurryThis;
|
|
14600
14639
|
var id$2 = 0;
|
|
@@ -14651,14 +14690,14 @@ var uid$2 = uid$3;
|
|
|
14651
14690
|
var NATIVE_SYMBOL = nativeSymbol;
|
|
14652
14691
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
14653
14692
|
var WellKnownSymbolsStore = shared$3("wks");
|
|
14654
|
-
var Symbol$
|
|
14655
|
-
var symbolFor = Symbol$
|
|
14656
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$
|
|
14693
|
+
var Symbol$6 = global$f.Symbol;
|
|
14694
|
+
var symbolFor = Symbol$6 && Symbol$6["for"];
|
|
14695
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$6 : Symbol$6 && Symbol$6.withoutSetter || uid$2;
|
|
14657
14696
|
var wellKnownSymbol$f = function(name) {
|
|
14658
14697
|
if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == "string")) {
|
|
14659
14698
|
var description = "Symbol." + name;
|
|
14660
|
-
if (NATIVE_SYMBOL && hasOwn$a(Symbol$
|
|
14661
|
-
WellKnownSymbolsStore[name] = Symbol$
|
|
14699
|
+
if (NATIVE_SYMBOL && hasOwn$a(Symbol$6, name)) {
|
|
14700
|
+
WellKnownSymbolsStore[name] = Symbol$6[name];
|
|
14662
14701
|
} else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
|
|
14663
14702
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
14664
14703
|
} else {
|
|
@@ -14680,13 +14719,13 @@ var descriptors = !fails$l(function() {
|
|
|
14680
14719
|
} })[1] != 7;
|
|
14681
14720
|
});
|
|
14682
14721
|
var isCallable$i = isCallable$k;
|
|
14683
|
-
var isObject$
|
|
14722
|
+
var isObject$i = function(it) {
|
|
14684
14723
|
return typeof it == "object" ? it !== null : isCallable$i(it);
|
|
14685
14724
|
};
|
|
14686
14725
|
var global$e = global$k;
|
|
14687
|
-
var isObject$
|
|
14726
|
+
var isObject$h = isObject$i;
|
|
14688
14727
|
var document$1 = global$e.document;
|
|
14689
|
-
var EXISTS$1 = isObject$
|
|
14728
|
+
var EXISTS$1 = isObject$h(document$1) && isObject$h(document$1.createElement);
|
|
14690
14729
|
var documentCreateElement$2 = function(it) {
|
|
14691
14730
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
14692
14731
|
};
|
|
@@ -14709,11 +14748,11 @@ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$j(function() {
|
|
|
14709
14748
|
writable: false
|
|
14710
14749
|
}).prototype != 42;
|
|
14711
14750
|
});
|
|
14712
|
-
var isObject$
|
|
14751
|
+
var isObject$g = isObject$i;
|
|
14713
14752
|
var $String$3 = String;
|
|
14714
14753
|
var $TypeError$a = TypeError;
|
|
14715
14754
|
var anObject$d = function(argument) {
|
|
14716
|
-
if (isObject$
|
|
14755
|
+
if (isObject$g(argument))
|
|
14717
14756
|
return argument;
|
|
14718
14757
|
throw $TypeError$a($String$3(argument) + " is not an object");
|
|
14719
14758
|
};
|
|
@@ -14758,20 +14797,20 @@ var getMethod$5 = function(V, P) {
|
|
|
14758
14797
|
};
|
|
14759
14798
|
var call$c = functionCall;
|
|
14760
14799
|
var isCallable$f = isCallable$k;
|
|
14761
|
-
var isObject$
|
|
14800
|
+
var isObject$f = isObject$i;
|
|
14762
14801
|
var $TypeError$8 = TypeError;
|
|
14763
14802
|
var ordinaryToPrimitive$1 = function(input, pref) {
|
|
14764
14803
|
var fn2, val;
|
|
14765
|
-
if (pref === "string" && isCallable$f(fn2 = input.toString) && !isObject$
|
|
14804
|
+
if (pref === "string" && isCallable$f(fn2 = input.toString) && !isObject$f(val = call$c(fn2, input)))
|
|
14766
14805
|
return val;
|
|
14767
|
-
if (isCallable$f(fn2 = input.valueOf) && !isObject$
|
|
14806
|
+
if (isCallable$f(fn2 = input.valueOf) && !isObject$f(val = call$c(fn2, input)))
|
|
14768
14807
|
return val;
|
|
14769
|
-
if (pref !== "string" && isCallable$f(fn2 = input.toString) && !isObject$
|
|
14808
|
+
if (pref !== "string" && isCallable$f(fn2 = input.toString) && !isObject$f(val = call$c(fn2, input)))
|
|
14770
14809
|
return val;
|
|
14771
14810
|
throw $TypeError$8("Can't convert object to primitive value");
|
|
14772
14811
|
};
|
|
14773
14812
|
var call$b = functionCall;
|
|
14774
|
-
var isObject$
|
|
14813
|
+
var isObject$e = isObject$i;
|
|
14775
14814
|
var isSymbol$3 = isSymbol$4;
|
|
14776
14815
|
var getMethod$4 = getMethod$5;
|
|
14777
14816
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
@@ -14779,7 +14818,7 @@ var wellKnownSymbol$d = wellKnownSymbol$f;
|
|
|
14779
14818
|
var $TypeError$7 = TypeError;
|
|
14780
14819
|
var TO_PRIMITIVE = wellKnownSymbol$d("toPrimitive");
|
|
14781
14820
|
var toPrimitive$1 = function(input, pref) {
|
|
14782
|
-
if (!isObject$
|
|
14821
|
+
if (!isObject$e(input) || isSymbol$3(input))
|
|
14783
14822
|
return input;
|
|
14784
14823
|
var exoticToPrim = getMethod$4(input, TO_PRIMITIVE);
|
|
14785
14824
|
var result;
|
|
@@ -14787,7 +14826,7 @@ var toPrimitive$1 = function(input, pref) {
|
|
|
14787
14826
|
if (pref === void 0)
|
|
14788
14827
|
pref = "default";
|
|
14789
14828
|
result = call$b(exoticToPrim, input, pref);
|
|
14790
|
-
if (!isObject$
|
|
14829
|
+
if (!isObject$e(result) || isSymbol$3(result))
|
|
14791
14830
|
return result;
|
|
14792
14831
|
throw $TypeError$7("Can't convert object to primitive value");
|
|
14793
14832
|
}
|
|
@@ -14870,8 +14909,8 @@ var inspectSource$3 = store$1.inspectSource;
|
|
|
14870
14909
|
var global$d = global$k;
|
|
14871
14910
|
var isCallable$d = isCallable$k;
|
|
14872
14911
|
var inspectSource$2 = inspectSource$3;
|
|
14873
|
-
var WeakMap$
|
|
14874
|
-
var nativeWeakMap = isCallable$d(WeakMap$
|
|
14912
|
+
var WeakMap$4 = global$d.WeakMap;
|
|
14913
|
+
var nativeWeakMap = isCallable$d(WeakMap$4) && /native code/.test(inspectSource$2(WeakMap$4));
|
|
14875
14914
|
var createPropertyDescriptor$4 = function(bitmap, value) {
|
|
14876
14915
|
return {
|
|
14877
14916
|
enumerable: !(bitmap & 1),
|
|
@@ -14891,15 +14930,15 @@ var createNonEnumerableProperty$6 = DESCRIPTORS$6 ? function(object, key, value)
|
|
|
14891
14930
|
};
|
|
14892
14931
|
var shared$2 = shared$4.exports;
|
|
14893
14932
|
var uid$1 = uid$3;
|
|
14894
|
-
var keys = shared$2("keys");
|
|
14933
|
+
var keys$2 = shared$2("keys");
|
|
14895
14934
|
var sharedKey$3 = function(key) {
|
|
14896
|
-
return keys[key] || (keys[key] = uid$1(key));
|
|
14935
|
+
return keys$2[key] || (keys$2[key] = uid$1(key));
|
|
14897
14936
|
};
|
|
14898
14937
|
var hiddenKeys$5 = {};
|
|
14899
14938
|
var NATIVE_WEAK_MAP$1 = nativeWeakMap;
|
|
14900
14939
|
var global$c = global$k;
|
|
14901
14940
|
var uncurryThis$l = functionUncurryThis;
|
|
14902
|
-
var isObject$
|
|
14941
|
+
var isObject$d = isObject$i;
|
|
14903
14942
|
var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
|
|
14904
14943
|
var hasOwn$8 = hasOwnProperty_1;
|
|
14905
14944
|
var shared$1 = sharedStore;
|
|
@@ -14907,7 +14946,7 @@ var sharedKey$2 = sharedKey$3;
|
|
|
14907
14946
|
var hiddenKeys$4 = hiddenKeys$5;
|
|
14908
14947
|
var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
|
|
14909
14948
|
var TypeError$1 = global$c.TypeError;
|
|
14910
|
-
var WeakMap$
|
|
14949
|
+
var WeakMap$3 = global$c.WeakMap;
|
|
14911
14950
|
var set, get, has;
|
|
14912
14951
|
var enforce = function(it) {
|
|
14913
14952
|
return has(it) ? get(it) : set(it, {});
|
|
@@ -14915,14 +14954,14 @@ var enforce = function(it) {
|
|
|
14915
14954
|
var getterFor = function(TYPE) {
|
|
14916
14955
|
return function(it) {
|
|
14917
14956
|
var state;
|
|
14918
|
-
if (!isObject$
|
|
14957
|
+
if (!isObject$d(it) || (state = get(it)).type !== TYPE) {
|
|
14919
14958
|
throw TypeError$1("Incompatible receiver, " + TYPE + " required");
|
|
14920
14959
|
}
|
|
14921
14960
|
return state;
|
|
14922
14961
|
};
|
|
14923
14962
|
};
|
|
14924
14963
|
if (NATIVE_WEAK_MAP$1 || shared$1.state) {
|
|
14925
|
-
var store = shared$1.state || (shared$1.state = new WeakMap$
|
|
14964
|
+
var store = shared$1.state || (shared$1.state = new WeakMap$3());
|
|
14926
14965
|
var wmget = uncurryThis$l(store.get);
|
|
14927
14966
|
var wmhas = uncurryThis$l(store.has);
|
|
14928
14967
|
var wmset = uncurryThis$l(store.set);
|
|
@@ -15075,12 +15114,12 @@ var classof$a = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function(it) {
|
|
|
15075
15114
|
};
|
|
15076
15115
|
var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
|
|
15077
15116
|
var classof$9 = classof$a;
|
|
15078
|
-
var objectToString$
|
|
15117
|
+
var objectToString$5 = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString2() {
|
|
15079
15118
|
return "[object " + classof$9(this) + "]";
|
|
15080
15119
|
};
|
|
15081
15120
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
15082
15121
|
var defineBuiltIn$6 = defineBuiltIn$7;
|
|
15083
|
-
var toString$8 = objectToString$
|
|
15122
|
+
var toString$8 = objectToString$5;
|
|
15084
15123
|
if (!TO_STRING_TAG_SUPPORT) {
|
|
15085
15124
|
defineBuiltIn$6(Object.prototype, "toString", toString$8, { unsafe: true });
|
|
15086
15125
|
}
|
|
@@ -15162,7 +15201,7 @@ var lengthOfArrayLike$5 = function(obj) {
|
|
|
15162
15201
|
return toLength$2(obj.length);
|
|
15163
15202
|
};
|
|
15164
15203
|
var classof$7 = classofRaw$1;
|
|
15165
|
-
var isArray$
|
|
15204
|
+
var isArray$5 = Array.isArray || function isArray(argument) {
|
|
15166
15205
|
return classof$7(argument) == "Array";
|
|
15167
15206
|
};
|
|
15168
15207
|
var uncurryThis$h = functionUncurryThis;
|
|
@@ -15210,19 +15249,19 @@ var isConstructor$1 = !construct || fails$g(function() {
|
|
|
15210
15249
|
called = true;
|
|
15211
15250
|
}) || called;
|
|
15212
15251
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
15213
|
-
var
|
|
15252
|
+
var isArray$4 = isArray$5;
|
|
15214
15253
|
var isConstructor3 = isConstructor$1;
|
|
15215
|
-
var isObject$
|
|
15254
|
+
var isObject$c = isObject$i;
|
|
15216
15255
|
var wellKnownSymbol$b = wellKnownSymbol$f;
|
|
15217
15256
|
var SPECIES$2 = wellKnownSymbol$b("species");
|
|
15218
15257
|
var $Array$1 = Array;
|
|
15219
15258
|
var arraySpeciesConstructor$1 = function(originalArray) {
|
|
15220
15259
|
var C;
|
|
15221
|
-
if (
|
|
15260
|
+
if (isArray$4(originalArray)) {
|
|
15222
15261
|
C = originalArray.constructor;
|
|
15223
|
-
if (isConstructor3(C) && (C === $Array$1 ||
|
|
15262
|
+
if (isConstructor3(C) && (C === $Array$1 || isArray$4(C.prototype)))
|
|
15224
15263
|
C = void 0;
|
|
15225
|
-
else if (isObject$
|
|
15264
|
+
else if (isObject$c(C)) {
|
|
15226
15265
|
C = C[SPECIES$2];
|
|
15227
15266
|
if (C === null)
|
|
15228
15267
|
C = void 0;
|
|
@@ -15556,8 +15595,8 @@ var toString$5 = toString$7;
|
|
|
15556
15595
|
var trim = stringTrim.trim;
|
|
15557
15596
|
var whitespaces = whitespaces$2;
|
|
15558
15597
|
var $parseInt$1 = global$9.parseInt;
|
|
15559
|
-
var Symbol$
|
|
15560
|
-
var ITERATOR$6 = Symbol$
|
|
15598
|
+
var Symbol$5 = global$9.Symbol;
|
|
15599
|
+
var ITERATOR$6 = Symbol$5 && Symbol$5.iterator;
|
|
15561
15600
|
var hex = /^[+-]?0x/i;
|
|
15562
15601
|
var exec$1 = uncurryThis$c(hex.exec);
|
|
15563
15602
|
var FORCED = $parseInt$1(whitespaces + "08") !== 8 || $parseInt$1(whitespaces + "0x16") !== 22 || ITERATOR$6 && !fails$d(function() {
|
|
@@ -15574,7 +15613,7 @@ $$7({ global: true, forced: parseInt != $parseInt }, {
|
|
|
15574
15613
|
});
|
|
15575
15614
|
var internalObjectKeys = objectKeysInternal;
|
|
15576
15615
|
var enumBugKeys$1 = enumBugKeys$3;
|
|
15577
|
-
var objectKeys$2 = Object.keys || function
|
|
15616
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
15578
15617
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
15579
15618
|
};
|
|
15580
15619
|
var DESCRIPTORS$3 = descriptors;
|
|
@@ -15614,7 +15653,7 @@ var objectAssign = !$assign || fails$c(function() {
|
|
|
15614
15653
|
var argumentsLength = arguments.length;
|
|
15615
15654
|
var index = 1;
|
|
15616
15655
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
15617
|
-
var
|
|
15656
|
+
var propertyIsEnumerable3 = propertyIsEnumerableModule.f;
|
|
15618
15657
|
while (argumentsLength > index) {
|
|
15619
15658
|
var S = IndexedObject$1(arguments[index++]);
|
|
15620
15659
|
var keys3 = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
@@ -15623,7 +15662,7 @@ var objectAssign = !$assign || fails$c(function() {
|
|
|
15623
15662
|
var key;
|
|
15624
15663
|
while (length > j) {
|
|
15625
15664
|
key = keys3[j++];
|
|
15626
|
-
if (!DESCRIPTORS$3 || call$9(
|
|
15665
|
+
if (!DESCRIPTORS$3 || call$9(propertyIsEnumerable3, S, key))
|
|
15627
15666
|
T[key] = S[key];
|
|
15628
15667
|
}
|
|
15629
15668
|
}
|
|
@@ -16113,7 +16152,7 @@ var arrayBufferNonExtensible = fails$8(function() {
|
|
|
16113
16152
|
}
|
|
16114
16153
|
});
|
|
16115
16154
|
var fails$7 = fails$o;
|
|
16116
|
-
var isObject$
|
|
16155
|
+
var isObject$b = isObject$i;
|
|
16117
16156
|
var classof$3 = classofRaw$1;
|
|
16118
16157
|
var ARRAY_BUFFER_NON_EXTENSIBLE = arrayBufferNonExtensible;
|
|
16119
16158
|
var $isExtensible = Object.isExtensible;
|
|
@@ -16121,7 +16160,7 @@ var FAILS_ON_PRIMITIVES = fails$7(function() {
|
|
|
16121
16160
|
$isExtensible(1);
|
|
16122
16161
|
});
|
|
16123
16162
|
var objectIsExtensible = FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE ? function isExtensible(it) {
|
|
16124
|
-
if (!isObject$
|
|
16163
|
+
if (!isObject$b(it))
|
|
16125
16164
|
return false;
|
|
16126
16165
|
if (ARRAY_BUFFER_NON_EXTENSIBLE && classof$3(it) == "ArrayBuffer")
|
|
16127
16166
|
return false;
|
|
@@ -16134,7 +16173,7 @@ var freezing = !fails$6(function() {
|
|
|
16134
16173
|
var $$3 = _export;
|
|
16135
16174
|
var uncurryThis$8 = functionUncurryThis;
|
|
16136
16175
|
var hiddenKeys = hiddenKeys$5;
|
|
16137
|
-
var isObject$
|
|
16176
|
+
var isObject$a = isObject$i;
|
|
16138
16177
|
var hasOwn$1 = hasOwnProperty_1;
|
|
16139
16178
|
var defineProperty$1 = objectDefineProperty.f;
|
|
16140
16179
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
@@ -16152,7 +16191,7 @@ var setMetadata = function(it) {
|
|
|
16152
16191
|
} });
|
|
16153
16192
|
};
|
|
16154
16193
|
var fastKey = function(it, create3) {
|
|
16155
|
-
if (!isObject$
|
|
16194
|
+
if (!isObject$a(it))
|
|
16156
16195
|
return typeof it == "symbol" ? it : (typeof it == "string" ? "S" : "P") + it;
|
|
16157
16196
|
if (!hasOwn$1(it, METADATA)) {
|
|
16158
16197
|
if (!isExtensible$1(it))
|
|
@@ -16372,11 +16411,11 @@ var checkCorrectnessOfIteration$1 = function(exec2, SKIP_CLOSING) {
|
|
|
16372
16411
|
return ITERATION_SUPPORT;
|
|
16373
16412
|
};
|
|
16374
16413
|
var isCallable$3 = isCallable$k;
|
|
16375
|
-
var isObject$
|
|
16414
|
+
var isObject$9 = isObject$i;
|
|
16376
16415
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
16377
16416
|
var inheritIfRequired$1 = function($this, dummy, Wrapper) {
|
|
16378
16417
|
var NewTarget, NewTargetPrototype;
|
|
16379
|
-
if (setPrototypeOf && isCallable$3(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject$
|
|
16418
|
+
if (setPrototypeOf && isCallable$3(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject$9(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype)
|
|
16380
16419
|
setPrototypeOf($this, NewTargetPrototype);
|
|
16381
16420
|
return $this;
|
|
16382
16421
|
};
|
|
@@ -16389,7 +16428,7 @@ var InternalMetadataModule$1 = internalMetadata.exports;
|
|
|
16389
16428
|
var iterate$1 = iterate$2;
|
|
16390
16429
|
var anInstance$1 = anInstance$2;
|
|
16391
16430
|
var isCallable$2 = isCallable$k;
|
|
16392
|
-
var isObject$
|
|
16431
|
+
var isObject$8 = isObject$i;
|
|
16393
16432
|
var fails$5 = fails$o;
|
|
16394
16433
|
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
16395
16434
|
var setToStringTag = setToStringTag$3;
|
|
@@ -16411,11 +16450,11 @@ var collection$1 = function(CONSTRUCTOR_NAME, wrapper2, common) {
|
|
|
16411
16450
|
uncurriedNativeMethod(this, value === 0 ? 0 : value);
|
|
16412
16451
|
return this;
|
|
16413
16452
|
} : KEY == "delete" ? function(key) {
|
|
16414
|
-
return IS_WEAK && !isObject$
|
|
16453
|
+
return IS_WEAK && !isObject$8(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
16415
16454
|
} : KEY == "get" ? function get4(key) {
|
|
16416
|
-
return IS_WEAK && !isObject$
|
|
16455
|
+
return IS_WEAK && !isObject$8(key) ? void 0 : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
16417
16456
|
} : KEY == "has" ? function has2(key) {
|
|
16418
|
-
return IS_WEAK && !isObject$
|
|
16457
|
+
return IS_WEAK && !isObject$8(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
16419
16458
|
} : function set2(key, value) {
|
|
16420
16459
|
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
|
|
16421
16460
|
return this;
|
|
@@ -16479,7 +16518,7 @@ var uncurryThis$6 = functionUncurryThis;
|
|
|
16479
16518
|
var defineBuiltIns$1 = defineBuiltIns$2;
|
|
16480
16519
|
var getWeakData = internalMetadata.exports.getWeakData;
|
|
16481
16520
|
var anObject$4 = anObject$d;
|
|
16482
|
-
var isObject$
|
|
16521
|
+
var isObject$7 = isObject$i;
|
|
16483
16522
|
var anInstance = anInstance$2;
|
|
16484
16523
|
var iterate = iterate$2;
|
|
16485
16524
|
var ArrayIterationModule = arrayIteration;
|
|
@@ -16489,7 +16528,7 @@ var setInternalState = InternalStateModule.set;
|
|
|
16489
16528
|
var internalStateGetterFor = InternalStateModule.getterFor;
|
|
16490
16529
|
var find$1 = ArrayIterationModule.find;
|
|
16491
16530
|
var findIndex = ArrayIterationModule.findIndex;
|
|
16492
|
-
var splice$
|
|
16531
|
+
var splice$2 = uncurryThis$6([].splice);
|
|
16493
16532
|
var id = 0;
|
|
16494
16533
|
var uncaughtFrozenStore = function(store) {
|
|
16495
16534
|
return store.frozen || (store.frozen = new UncaughtFrozenStore());
|
|
@@ -16523,7 +16562,7 @@ UncaughtFrozenStore.prototype = {
|
|
|
16523
16562
|
return it[0] === key;
|
|
16524
16563
|
});
|
|
16525
16564
|
if (~index)
|
|
16526
|
-
splice$
|
|
16565
|
+
splice$2(this.entries, index, 1);
|
|
16527
16566
|
return !!~index;
|
|
16528
16567
|
}
|
|
16529
16568
|
};
|
|
@@ -16553,7 +16592,7 @@ var collectionWeak$1 = {
|
|
|
16553
16592
|
defineBuiltIns$1(Prototype, {
|
|
16554
16593
|
"delete": function(key) {
|
|
16555
16594
|
var state = getInternalState2(this);
|
|
16556
|
-
if (!isObject$
|
|
16595
|
+
if (!isObject$7(key))
|
|
16557
16596
|
return false;
|
|
16558
16597
|
var data2 = getWeakData(key);
|
|
16559
16598
|
if (data2 === true)
|
|
@@ -16562,7 +16601,7 @@ var collectionWeak$1 = {
|
|
|
16562
16601
|
},
|
|
16563
16602
|
has: function has2(key) {
|
|
16564
16603
|
var state = getInternalState2(this);
|
|
16565
|
-
if (!isObject$
|
|
16604
|
+
if (!isObject$7(key))
|
|
16566
16605
|
return false;
|
|
16567
16606
|
var data2 = getWeakData(key);
|
|
16568
16607
|
if (data2 === true)
|
|
@@ -16573,7 +16612,7 @@ var collectionWeak$1 = {
|
|
|
16573
16612
|
defineBuiltIns$1(Prototype, IS_MAP ? {
|
|
16574
16613
|
get: function get4(key) {
|
|
16575
16614
|
var state = getInternalState2(this);
|
|
16576
|
-
if (isObject$
|
|
16615
|
+
if (isObject$7(key)) {
|
|
16577
16616
|
var data2 = getWeakData(key);
|
|
16578
16617
|
if (data2 === true)
|
|
16579
16618
|
return uncaughtFrozenStore(state).get(key);
|
|
@@ -16597,7 +16636,7 @@ var defineBuiltIns = defineBuiltIns$2;
|
|
|
16597
16636
|
var InternalMetadataModule = internalMetadata.exports;
|
|
16598
16637
|
var collection = collection$1;
|
|
16599
16638
|
var collectionWeak = collectionWeak$1;
|
|
16600
|
-
var isObject$
|
|
16639
|
+
var isObject$6 = isObject$i;
|
|
16601
16640
|
var isExtensible2 = objectIsExtensible;
|
|
16602
16641
|
var enforceInternalState = internalState.enforce;
|
|
16603
16642
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
@@ -16619,7 +16658,7 @@ if (NATIVE_WEAK_MAP && IS_IE11) {
|
|
|
16619
16658
|
var nativeSet = uncurryThis$5(WeakMapPrototype.set);
|
|
16620
16659
|
defineBuiltIns(WeakMapPrototype, {
|
|
16621
16660
|
"delete": function(key) {
|
|
16622
|
-
if (isObject$
|
|
16661
|
+
if (isObject$6(key) && !isExtensible2(key)) {
|
|
16623
16662
|
var state = enforceInternalState(this);
|
|
16624
16663
|
if (!state.frozen)
|
|
16625
16664
|
state.frozen = new InternalWeakMap();
|
|
@@ -16628,7 +16667,7 @@ if (NATIVE_WEAK_MAP && IS_IE11) {
|
|
|
16628
16667
|
return nativeDelete(this, key);
|
|
16629
16668
|
},
|
|
16630
16669
|
has: function has2(key) {
|
|
16631
|
-
if (isObject$
|
|
16670
|
+
if (isObject$6(key) && !isExtensible2(key)) {
|
|
16632
16671
|
var state = enforceInternalState(this);
|
|
16633
16672
|
if (!state.frozen)
|
|
16634
16673
|
state.frozen = new InternalWeakMap();
|
|
@@ -16637,7 +16676,7 @@ if (NATIVE_WEAK_MAP && IS_IE11) {
|
|
|
16637
16676
|
return nativeHas(this, key);
|
|
16638
16677
|
},
|
|
16639
16678
|
get: function get4(key) {
|
|
16640
|
-
if (isObject$
|
|
16679
|
+
if (isObject$6(key) && !isExtensible2(key)) {
|
|
16641
16680
|
var state = enforceInternalState(this);
|
|
16642
16681
|
if (!state.frozen)
|
|
16643
16682
|
state.frozen = new InternalWeakMap();
|
|
@@ -16646,7 +16685,7 @@ if (NATIVE_WEAK_MAP && IS_IE11) {
|
|
|
16646
16685
|
return nativeGet(this, key);
|
|
16647
16686
|
},
|
|
16648
16687
|
set: function set2(key, value) {
|
|
16649
|
-
if (isObject$
|
|
16688
|
+
if (isObject$6(key) && !isExtensible2(key)) {
|
|
16650
16689
|
var state = enforceInternalState(this);
|
|
16651
16690
|
if (!state.frozen)
|
|
16652
16691
|
state.frozen = new InternalWeakMap();
|
|
@@ -16694,20 +16733,20 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
16694
16733
|
handlePrototype(DOMTokenListPrototype, "DOMTokenList");
|
|
16695
16734
|
var FUNC_ERROR_TEXT$2 = "Expected a function";
|
|
16696
16735
|
var NAN$1 = 0 / 0;
|
|
16697
|
-
var symbolTag$
|
|
16736
|
+
var symbolTag$2 = "[object Symbol]";
|
|
16698
16737
|
var reTrim$1 = /^\s+|\s+$/g;
|
|
16699
16738
|
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
|
16700
16739
|
var reIsBinary$1 = /^0b[01]+$/i;
|
|
16701
16740
|
var reIsOctal$1 = /^0o[0-7]+$/i;
|
|
16702
16741
|
var freeParseInt$1 = parseInt;
|
|
16703
|
-
var freeGlobal$
|
|
16704
|
-
var freeSelf$
|
|
16705
|
-
var root$
|
|
16706
|
-
var objectProto$
|
|
16707
|
-
var objectToString$
|
|
16742
|
+
var freeGlobal$4 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
16743
|
+
var freeSelf$3 = typeof self == "object" && self && self.Object === Object && self;
|
|
16744
|
+
var root$b = freeGlobal$4 || freeSelf$3 || Function("return this")();
|
|
16745
|
+
var objectProto$e = Object.prototype;
|
|
16746
|
+
var objectToString$4 = objectProto$e.toString;
|
|
16708
16747
|
var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
|
|
16709
16748
|
var now$1 = function() {
|
|
16710
|
-
return root$
|
|
16749
|
+
return root$b.Date.now();
|
|
16711
16750
|
};
|
|
16712
16751
|
function debounce$1(func, wait, options) {
|
|
16713
16752
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
@@ -16715,7 +16754,7 @@ function debounce$1(func, wait, options) {
|
|
|
16715
16754
|
throw new TypeError(FUNC_ERROR_TEXT$2);
|
|
16716
16755
|
}
|
|
16717
16756
|
wait = toNumber$1(wait) || 0;
|
|
16718
|
-
if (isObject$
|
|
16757
|
+
if (isObject$5(options)) {
|
|
16719
16758
|
leading = !!options.leading;
|
|
16720
16759
|
maxing = "maxWait" in options;
|
|
16721
16760
|
maxWait = maxing ? nativeMax$1(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -16794,7 +16833,7 @@ function throttle(func, wait, options) {
|
|
|
16794
16833
|
if (typeof func != "function") {
|
|
16795
16834
|
throw new TypeError(FUNC_ERROR_TEXT$2);
|
|
16796
16835
|
}
|
|
16797
|
-
if (isObject$
|
|
16836
|
+
if (isObject$5(options)) {
|
|
16798
16837
|
leading = "leading" in options ? !!options.leading : leading;
|
|
16799
16838
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
16800
16839
|
}
|
|
@@ -16804,15 +16843,15 @@ function throttle(func, wait, options) {
|
|
|
16804
16843
|
"trailing": trailing
|
|
16805
16844
|
});
|
|
16806
16845
|
}
|
|
16807
|
-
function isObject$
|
|
16846
|
+
function isObject$5(value) {
|
|
16808
16847
|
var type = typeof value;
|
|
16809
16848
|
return !!value && (type == "object" || type == "function");
|
|
16810
16849
|
}
|
|
16811
|
-
function isObjectLike$
|
|
16850
|
+
function isObjectLike$6(value) {
|
|
16812
16851
|
return !!value && typeof value == "object";
|
|
16813
16852
|
}
|
|
16814
16853
|
function isSymbol$1(value) {
|
|
16815
|
-
return typeof value == "symbol" || isObjectLike$
|
|
16854
|
+
return typeof value == "symbol" || isObjectLike$6(value) && objectToString$4.call(value) == symbolTag$2;
|
|
16816
16855
|
}
|
|
16817
16856
|
function toNumber$1(value) {
|
|
16818
16857
|
if (typeof value == "number") {
|
|
@@ -16821,9 +16860,9 @@ function toNumber$1(value) {
|
|
|
16821
16860
|
if (isSymbol$1(value)) {
|
|
16822
16861
|
return NAN$1;
|
|
16823
16862
|
}
|
|
16824
|
-
if (isObject$
|
|
16863
|
+
if (isObject$5(value)) {
|
|
16825
16864
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
16826
|
-
value = isObject$
|
|
16865
|
+
value = isObject$5(other) ? other + "" : other;
|
|
16827
16866
|
}
|
|
16828
16867
|
if (typeof value != "string") {
|
|
16829
16868
|
return value === 0 ? value : +value;
|
|
@@ -16835,20 +16874,20 @@ function toNumber$1(value) {
|
|
|
16835
16874
|
var lodash_throttle = throttle;
|
|
16836
16875
|
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
16837
16876
|
var NAN = 0 / 0;
|
|
16838
|
-
var symbolTag = "[object Symbol]";
|
|
16877
|
+
var symbolTag$1 = "[object Symbol]";
|
|
16839
16878
|
var reTrim = /^\s+|\s+$/g;
|
|
16840
16879
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
16841
16880
|
var reIsBinary = /^0b[01]+$/i;
|
|
16842
16881
|
var reIsOctal = /^0o[0-7]+$/i;
|
|
16843
16882
|
var freeParseInt = parseInt;
|
|
16844
|
-
var freeGlobal$
|
|
16845
|
-
var freeSelf$
|
|
16846
|
-
var root$
|
|
16847
|
-
var objectProto$
|
|
16848
|
-
var objectToString$
|
|
16883
|
+
var freeGlobal$3 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
16884
|
+
var freeSelf$2 = typeof self == "object" && self && self.Object === Object && self;
|
|
16885
|
+
var root$a = freeGlobal$3 || freeSelf$2 || Function("return this")();
|
|
16886
|
+
var objectProto$d = Object.prototype;
|
|
16887
|
+
var objectToString$3 = objectProto$d.toString;
|
|
16849
16888
|
var nativeMax = Math.max, nativeMin = Math.min;
|
|
16850
16889
|
var now = function() {
|
|
16851
|
-
return root$
|
|
16890
|
+
return root$a.Date.now();
|
|
16852
16891
|
};
|
|
16853
16892
|
function debounce(func, wait, options) {
|
|
16854
16893
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
@@ -16856,7 +16895,7 @@ function debounce(func, wait, options) {
|
|
|
16856
16895
|
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
16857
16896
|
}
|
|
16858
16897
|
wait = toNumber(wait) || 0;
|
|
16859
|
-
if (isObject$
|
|
16898
|
+
if (isObject$4(options)) {
|
|
16860
16899
|
leading = !!options.leading;
|
|
16861
16900
|
maxing = "maxWait" in options;
|
|
16862
16901
|
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -16930,15 +16969,15 @@ function debounce(func, wait, options) {
|
|
|
16930
16969
|
debounced.flush = flush;
|
|
16931
16970
|
return debounced;
|
|
16932
16971
|
}
|
|
16933
|
-
function isObject$
|
|
16972
|
+
function isObject$4(value) {
|
|
16934
16973
|
var type = typeof value;
|
|
16935
16974
|
return !!value && (type == "object" || type == "function");
|
|
16936
16975
|
}
|
|
16937
|
-
function isObjectLike(value) {
|
|
16976
|
+
function isObjectLike$5(value) {
|
|
16938
16977
|
return !!value && typeof value == "object";
|
|
16939
16978
|
}
|
|
16940
16979
|
function isSymbol(value) {
|
|
16941
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString$
|
|
16980
|
+
return typeof value == "symbol" || isObjectLike$5(value) && objectToString$3.call(value) == symbolTag$1;
|
|
16942
16981
|
}
|
|
16943
16982
|
function toNumber(value) {
|
|
16944
16983
|
if (typeof value == "number") {
|
|
@@ -16947,9 +16986,9 @@ function toNumber(value) {
|
|
|
16947
16986
|
if (isSymbol(value)) {
|
|
16948
16987
|
return NAN;
|
|
16949
16988
|
}
|
|
16950
|
-
if (isObject$
|
|
16989
|
+
if (isObject$4(value)) {
|
|
16951
16990
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
16952
|
-
value = isObject$
|
|
16991
|
+
value = isObject$4(other) ? other + "" : other;
|
|
16953
16992
|
}
|
|
16954
16993
|
if (typeof value != "string") {
|
|
16955
16994
|
return value === 0 ? value : +value;
|
|
@@ -16960,14 +16999,14 @@ function toNumber(value) {
|
|
|
16960
16999
|
}
|
|
16961
17000
|
var lodash_debounce = debounce;
|
|
16962
17001
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
16963
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
16964
|
-
var funcTag = "[object Function]", genTag = "[object GeneratorFunction]";
|
|
16965
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
16966
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
16967
|
-
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
16968
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
16969
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
16970
|
-
function getValue(object, key) {
|
|
17002
|
+
var HASH_UNDEFINED$3 = "__lodash_hash_undefined__";
|
|
17003
|
+
var funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]";
|
|
17004
|
+
var reRegExpChar$1 = /[\\^$.*+?()[\]{}|]/g;
|
|
17005
|
+
var reIsHostCtor$1 = /^\[object .+?Constructor\]$/;
|
|
17006
|
+
var freeGlobal$2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
17007
|
+
var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
|
|
17008
|
+
var root$9 = freeGlobal$2 || freeSelf$1 || Function("return this")();
|
|
17009
|
+
function getValue$2(object, key) {
|
|
16971
17010
|
return object == null ? void 0 : object[key];
|
|
16972
17011
|
}
|
|
16973
17012
|
function isHostObject(value) {
|
|
@@ -16980,21 +17019,21 @@ function isHostObject(value) {
|
|
|
16980
17019
|
}
|
|
16981
17020
|
return result;
|
|
16982
17021
|
}
|
|
16983
|
-
var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
|
|
16984
|
-
var coreJsData = root["__core-js_shared__"];
|
|
16985
|
-
var maskSrcKey = function() {
|
|
16986
|
-
var uid2 = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
17022
|
+
var arrayProto$1 = Array.prototype, funcProto$2 = Function.prototype, objectProto$c = Object.prototype;
|
|
17023
|
+
var coreJsData$2 = root$9["__core-js_shared__"];
|
|
17024
|
+
var maskSrcKey$1 = function() {
|
|
17025
|
+
var uid2 = /[^.]+$/.exec(coreJsData$2 && coreJsData$2.keys && coreJsData$2.keys.IE_PROTO || "");
|
|
16987
17026
|
return uid2 ? "Symbol(src)_1." + uid2 : "";
|
|
16988
17027
|
}();
|
|
16989
|
-
var funcToString = funcProto.toString;
|
|
16990
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
16991
|
-
var objectToString = objectProto.toString;
|
|
16992
|
-
var reIsNative = RegExp(
|
|
16993
|
-
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
17028
|
+
var funcToString$2 = funcProto$2.toString;
|
|
17029
|
+
var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
|
|
17030
|
+
var objectToString$2 = objectProto$c.toString;
|
|
17031
|
+
var reIsNative$1 = RegExp(
|
|
17032
|
+
"^" + funcToString$2.call(hasOwnProperty$9).replace(reRegExpChar$1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
16994
17033
|
);
|
|
16995
|
-
var splice = arrayProto.splice;
|
|
16996
|
-
var Map$
|
|
16997
|
-
function Hash(entries) {
|
|
17034
|
+
var splice$1 = arrayProto$1.splice;
|
|
17035
|
+
var Map$5 = getNative$7(root$9, "Map"), nativeCreate$5 = getNative$7(Object, "create");
|
|
17036
|
+
function Hash$2(entries) {
|
|
16998
17037
|
var index = -1, length = entries ? entries.length : 0;
|
|
16999
17038
|
this.clear();
|
|
17000
17039
|
while (++index < length) {
|
|
@@ -17002,35 +17041,35 @@ function Hash(entries) {
|
|
|
17002
17041
|
this.set(entry[0], entry[1]);
|
|
17003
17042
|
}
|
|
17004
17043
|
}
|
|
17005
|
-
function hashClear() {
|
|
17006
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
17044
|
+
function hashClear$2() {
|
|
17045
|
+
this.__data__ = nativeCreate$5 ? nativeCreate$5(null) : {};
|
|
17007
17046
|
}
|
|
17008
|
-
function hashDelete(key) {
|
|
17047
|
+
function hashDelete$2(key) {
|
|
17009
17048
|
return this.has(key) && delete this.__data__[key];
|
|
17010
17049
|
}
|
|
17011
|
-
function hashGet(key) {
|
|
17050
|
+
function hashGet$2(key) {
|
|
17012
17051
|
var data2 = this.__data__;
|
|
17013
|
-
if (nativeCreate) {
|
|
17052
|
+
if (nativeCreate$5) {
|
|
17014
17053
|
var result = data2[key];
|
|
17015
|
-
return result === HASH_UNDEFINED ? void 0 : result;
|
|
17054
|
+
return result === HASH_UNDEFINED$3 ? void 0 : result;
|
|
17016
17055
|
}
|
|
17017
|
-
return hasOwnProperty.call(data2, key) ? data2[key] : void 0;
|
|
17056
|
+
return hasOwnProperty$9.call(data2, key) ? data2[key] : void 0;
|
|
17018
17057
|
}
|
|
17019
|
-
function hashHas(key) {
|
|
17058
|
+
function hashHas$2(key) {
|
|
17020
17059
|
var data2 = this.__data__;
|
|
17021
|
-
return nativeCreate ? data2[key] !== void 0 : hasOwnProperty.call(data2, key);
|
|
17060
|
+
return nativeCreate$5 ? data2[key] !== void 0 : hasOwnProperty$9.call(data2, key);
|
|
17022
17061
|
}
|
|
17023
|
-
function hashSet(key, value) {
|
|
17062
|
+
function hashSet$2(key, value) {
|
|
17024
17063
|
var data2 = this.__data__;
|
|
17025
|
-
data2[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
17064
|
+
data2[key] = nativeCreate$5 && value === void 0 ? HASH_UNDEFINED$3 : value;
|
|
17026
17065
|
return this;
|
|
17027
17066
|
}
|
|
17028
|
-
Hash.prototype.clear = hashClear;
|
|
17029
|
-
Hash.prototype["delete"] = hashDelete;
|
|
17030
|
-
Hash.prototype.get = hashGet;
|
|
17031
|
-
Hash.prototype.has = hashHas;
|
|
17032
|
-
Hash.prototype.set = hashSet;
|
|
17033
|
-
function ListCache(entries) {
|
|
17067
|
+
Hash$2.prototype.clear = hashClear$2;
|
|
17068
|
+
Hash$2.prototype["delete"] = hashDelete$2;
|
|
17069
|
+
Hash$2.prototype.get = hashGet$2;
|
|
17070
|
+
Hash$2.prototype.has = hashHas$2;
|
|
17071
|
+
Hash$2.prototype.set = hashSet$2;
|
|
17072
|
+
function ListCache$5(entries) {
|
|
17034
17073
|
var index = -1, length = entries ? entries.length : 0;
|
|
17035
17074
|
this.clear();
|
|
17036
17075
|
while (++index < length) {
|
|
@@ -17038,11 +17077,11 @@ function ListCache(entries) {
|
|
|
17038
17077
|
this.set(entry[0], entry[1]);
|
|
17039
17078
|
}
|
|
17040
17079
|
}
|
|
17041
|
-
function listCacheClear() {
|
|
17080
|
+
function listCacheClear$2() {
|
|
17042
17081
|
this.__data__ = [];
|
|
17043
17082
|
}
|
|
17044
|
-
function listCacheDelete(key) {
|
|
17045
|
-
var data2 = this.__data__, index = assocIndexOf(data2, key);
|
|
17083
|
+
function listCacheDelete$2(key) {
|
|
17084
|
+
var data2 = this.__data__, index = assocIndexOf$5(data2, key);
|
|
17046
17085
|
if (index < 0) {
|
|
17047
17086
|
return false;
|
|
17048
17087
|
}
|
|
@@ -17050,19 +17089,19 @@ function listCacheDelete(key) {
|
|
|
17050
17089
|
if (index == lastIndex) {
|
|
17051
17090
|
data2.pop();
|
|
17052
17091
|
} else {
|
|
17053
|
-
splice.call(data2, index, 1);
|
|
17092
|
+
splice$1.call(data2, index, 1);
|
|
17054
17093
|
}
|
|
17055
17094
|
return true;
|
|
17056
17095
|
}
|
|
17057
|
-
function listCacheGet(key) {
|
|
17058
|
-
var data2 = this.__data__, index = assocIndexOf(data2, key);
|
|
17096
|
+
function listCacheGet$2(key) {
|
|
17097
|
+
var data2 = this.__data__, index = assocIndexOf$5(data2, key);
|
|
17059
17098
|
return index < 0 ? void 0 : data2[index][1];
|
|
17060
17099
|
}
|
|
17061
|
-
function listCacheHas(key) {
|
|
17062
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
17100
|
+
function listCacheHas$2(key) {
|
|
17101
|
+
return assocIndexOf$5(this.__data__, key) > -1;
|
|
17063
17102
|
}
|
|
17064
|
-
function listCacheSet(key, value) {
|
|
17065
|
-
var data2 = this.__data__, index = assocIndexOf(data2, key);
|
|
17103
|
+
function listCacheSet$2(key, value) {
|
|
17104
|
+
var data2 = this.__data__, index = assocIndexOf$5(data2, key);
|
|
17066
17105
|
if (index < 0) {
|
|
17067
17106
|
data2.push([key, value]);
|
|
17068
17107
|
} else {
|
|
@@ -17070,12 +17109,12 @@ function listCacheSet(key, value) {
|
|
|
17070
17109
|
}
|
|
17071
17110
|
return this;
|
|
17072
17111
|
}
|
|
17073
|
-
ListCache.prototype.clear = listCacheClear;
|
|
17074
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
17075
|
-
ListCache.prototype.get = listCacheGet;
|
|
17076
|
-
ListCache.prototype.has = listCacheHas;
|
|
17077
|
-
ListCache.prototype.set = listCacheSet;
|
|
17078
|
-
function MapCache(entries) {
|
|
17112
|
+
ListCache$5.prototype.clear = listCacheClear$2;
|
|
17113
|
+
ListCache$5.prototype["delete"] = listCacheDelete$2;
|
|
17114
|
+
ListCache$5.prototype.get = listCacheGet$2;
|
|
17115
|
+
ListCache$5.prototype.has = listCacheHas$2;
|
|
17116
|
+
ListCache$5.prototype.set = listCacheSet$2;
|
|
17117
|
+
function MapCache$3(entries) {
|
|
17079
17118
|
var index = -1, length = entries ? entries.length : 0;
|
|
17080
17119
|
this.clear();
|
|
17081
17120
|
while (++index < length) {
|
|
@@ -17083,66 +17122,66 @@ function MapCache(entries) {
|
|
|
17083
17122
|
this.set(entry[0], entry[1]);
|
|
17084
17123
|
}
|
|
17085
17124
|
}
|
|
17086
|
-
function mapCacheClear() {
|
|
17125
|
+
function mapCacheClear$2() {
|
|
17087
17126
|
this.__data__ = {
|
|
17088
|
-
"hash": new Hash(),
|
|
17089
|
-
"map": new (Map$
|
|
17090
|
-
"string": new Hash()
|
|
17127
|
+
"hash": new Hash$2(),
|
|
17128
|
+
"map": new (Map$5 || ListCache$5)(),
|
|
17129
|
+
"string": new Hash$2()
|
|
17091
17130
|
};
|
|
17092
17131
|
}
|
|
17093
|
-
function mapCacheDelete(key) {
|
|
17094
|
-
return getMapData(this, key)["delete"](key);
|
|
17132
|
+
function mapCacheDelete$2(key) {
|
|
17133
|
+
return getMapData$5(this, key)["delete"](key);
|
|
17095
17134
|
}
|
|
17096
|
-
function mapCacheGet(key) {
|
|
17097
|
-
return getMapData(this, key).get(key);
|
|
17135
|
+
function mapCacheGet$2(key) {
|
|
17136
|
+
return getMapData$5(this, key).get(key);
|
|
17098
17137
|
}
|
|
17099
|
-
function mapCacheHas(key) {
|
|
17100
|
-
return getMapData(this, key).has(key);
|
|
17138
|
+
function mapCacheHas$2(key) {
|
|
17139
|
+
return getMapData$5(this, key).has(key);
|
|
17101
17140
|
}
|
|
17102
|
-
function mapCacheSet(key, value) {
|
|
17103
|
-
getMapData(this, key).set(key, value);
|
|
17141
|
+
function mapCacheSet$2(key, value) {
|
|
17142
|
+
getMapData$5(this, key).set(key, value);
|
|
17104
17143
|
return this;
|
|
17105
17144
|
}
|
|
17106
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
17107
|
-
MapCache.prototype["delete"] = mapCacheDelete;
|
|
17108
|
-
MapCache.prototype.get = mapCacheGet;
|
|
17109
|
-
MapCache.prototype.has = mapCacheHas;
|
|
17110
|
-
MapCache.prototype.set = mapCacheSet;
|
|
17111
|
-
function assocIndexOf(array, key) {
|
|
17145
|
+
MapCache$3.prototype.clear = mapCacheClear$2;
|
|
17146
|
+
MapCache$3.prototype["delete"] = mapCacheDelete$2;
|
|
17147
|
+
MapCache$3.prototype.get = mapCacheGet$2;
|
|
17148
|
+
MapCache$3.prototype.has = mapCacheHas$2;
|
|
17149
|
+
MapCache$3.prototype.set = mapCacheSet$2;
|
|
17150
|
+
function assocIndexOf$5(array, key) {
|
|
17112
17151
|
var length = array.length;
|
|
17113
17152
|
while (length--) {
|
|
17114
|
-
if (eq(array[length][0], key)) {
|
|
17153
|
+
if (eq$3(array[length][0], key)) {
|
|
17115
17154
|
return length;
|
|
17116
17155
|
}
|
|
17117
17156
|
}
|
|
17118
17157
|
return -1;
|
|
17119
17158
|
}
|
|
17120
|
-
function baseIsNative(value) {
|
|
17121
|
-
if (!isObject(value) || isMasked(value)) {
|
|
17159
|
+
function baseIsNative$2(value) {
|
|
17160
|
+
if (!isObject$3(value) || isMasked$2(value)) {
|
|
17122
17161
|
return false;
|
|
17123
17162
|
}
|
|
17124
|
-
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
17125
|
-
return pattern.test(toSource(value));
|
|
17163
|
+
var pattern = isFunction$3(value) || isHostObject(value) ? reIsNative$1 : reIsHostCtor$1;
|
|
17164
|
+
return pattern.test(toSource$3(value));
|
|
17126
17165
|
}
|
|
17127
|
-
function getMapData(map2, key) {
|
|
17166
|
+
function getMapData$5(map2, key) {
|
|
17128
17167
|
var data2 = map2.__data__;
|
|
17129
|
-
return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
|
|
17168
|
+
return isKeyable$2(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
|
|
17130
17169
|
}
|
|
17131
|
-
function getNative(object, key) {
|
|
17132
|
-
var value = getValue(object, key);
|
|
17133
|
-
return baseIsNative(value) ? value : void 0;
|
|
17170
|
+
function getNative$7(object, key) {
|
|
17171
|
+
var value = getValue$2(object, key);
|
|
17172
|
+
return baseIsNative$2(value) ? value : void 0;
|
|
17134
17173
|
}
|
|
17135
|
-
function isKeyable(value) {
|
|
17174
|
+
function isKeyable$2(value) {
|
|
17136
17175
|
var type = typeof value;
|
|
17137
17176
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
17138
17177
|
}
|
|
17139
|
-
function isMasked(func) {
|
|
17140
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
17178
|
+
function isMasked$2(func) {
|
|
17179
|
+
return !!maskSrcKey$1 && maskSrcKey$1 in func;
|
|
17141
17180
|
}
|
|
17142
|
-
function toSource(func) {
|
|
17181
|
+
function toSource$3(func) {
|
|
17143
17182
|
if (func != null) {
|
|
17144
17183
|
try {
|
|
17145
|
-
return funcToString.call(func);
|
|
17184
|
+
return funcToString$2.call(func);
|
|
17146
17185
|
} catch (e) {
|
|
17147
17186
|
}
|
|
17148
17187
|
try {
|
|
@@ -17165,18 +17204,18 @@ function memoize(func, resolver) {
|
|
|
17165
17204
|
memoized.cache = cache2.set(key, result);
|
|
17166
17205
|
return result;
|
|
17167
17206
|
};
|
|
17168
|
-
memoized.cache = new (memoize.Cache || MapCache)();
|
|
17207
|
+
memoized.cache = new (memoize.Cache || MapCache$3)();
|
|
17169
17208
|
return memoized;
|
|
17170
17209
|
}
|
|
17171
|
-
memoize.Cache = MapCache;
|
|
17172
|
-
function eq(value, other) {
|
|
17210
|
+
memoize.Cache = MapCache$3;
|
|
17211
|
+
function eq$3(value, other) {
|
|
17173
17212
|
return value === other || value !== value && other !== other;
|
|
17174
17213
|
}
|
|
17175
|
-
function isFunction(value) {
|
|
17176
|
-
var tag = isObject(value) ? objectToString.call(value) : "";
|
|
17177
|
-
return tag == funcTag || tag == genTag;
|
|
17214
|
+
function isFunction$3(value) {
|
|
17215
|
+
var tag = isObject$3(value) ? objectToString$2.call(value) : "";
|
|
17216
|
+
return tag == funcTag$2 || tag == genTag$1;
|
|
17178
17217
|
}
|
|
17179
|
-
function isObject(value) {
|
|
17218
|
+
function isObject$3(value) {
|
|
17180
17219
|
var type = typeof value;
|
|
17181
17220
|
return !!value && (type == "object" || type == "function");
|
|
17182
17221
|
}
|
|
@@ -19491,220 +19530,232 @@ class BrowserDomParser {
|
|
|
19491
19530
|
}
|
|
19492
19531
|
}
|
|
19493
19532
|
_domParser = new WeakMap();
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
parser: options.parser || new BrowserDomParser()
|
|
19499
|
-
});
|
|
19533
|
+
class BaseNormalizer {
|
|
19534
|
+
constructor({ content }) {
|
|
19535
|
+
__publicField(this, "content");
|
|
19536
|
+
this.content = content;
|
|
19500
19537
|
}
|
|
19501
|
-
|
|
19502
|
-
|
|
19538
|
+
normalize() {
|
|
19539
|
+
throw new Error("Implement abstract method");
|
|
19503
19540
|
}
|
|
19541
|
+
}
|
|
19542
|
+
const _HtmlNormalizer = class extends BaseNormalizer {
|
|
19504
19543
|
constructor({ content, parser }) {
|
|
19505
|
-
|
|
19506
|
-
this
|
|
19544
|
+
super({ content });
|
|
19545
|
+
__privateAdd(this, _NodeFilter);
|
|
19546
|
+
__privateAdd(this, _Node);
|
|
19547
|
+
__privateAdd(this, _removeComments);
|
|
19548
|
+
__privateAdd(this, _createNodeIterator);
|
|
19549
|
+
__privateAdd(this, _iterateNodes);
|
|
19550
|
+
__privateAdd(this, _runIterator);
|
|
19551
|
+
__privateAdd(this, _removeEmptyNodes);
|
|
19552
|
+
__privateAdd(this, _normalizeListItems);
|
|
19553
|
+
__privateAdd(this, _isBlockNode);
|
|
19554
|
+
__privateAdd(this, _assignElementProperties);
|
|
19555
|
+
__privateAdd(this, _removeStyleProperties);
|
|
19556
|
+
__privateAdd(this, _normalizeBreakLines);
|
|
19557
|
+
__privateAdd(this, _normalizeBlockTextDecoration);
|
|
19558
|
+
__privateAdd(this, _moveTextDecorationToChildren);
|
|
19559
|
+
__privateAdd(this, _parseTextDecoration);
|
|
19560
|
+
__privateAdd(this, _wrapTextNode);
|
|
19561
|
+
__privateAdd(this, _parser, void 0);
|
|
19562
|
+
__privateSet(this, _parser, parser);
|
|
19507
19563
|
this.dom = null;
|
|
19508
19564
|
}
|
|
19509
19565
|
normalize() {
|
|
19510
|
-
if (typeof this._content !== "string") {
|
|
19511
|
-
return this._content;
|
|
19512
|
-
}
|
|
19513
19566
|
this.normalizeHTML();
|
|
19514
19567
|
return this.normalizedHTML;
|
|
19515
19568
|
}
|
|
19516
19569
|
normalizeHTML() {
|
|
19517
|
-
this.dom = this
|
|
19518
|
-
this.
|
|
19519
|
-
this.
|
|
19520
|
-
this.
|
|
19521
|
-
this.
|
|
19522
|
-
|
|
19523
|
-
this.iterateNodes(this._normalizeStyles, (node) => node.tagName !== "SPAN");
|
|
19570
|
+
this.dom = __privateGet(this, _parser).parse(this.content.replace(/(\r)?\n/g, ""));
|
|
19571
|
+
__privateMethod(this, _removeComments, removeComments_fn).call(this);
|
|
19572
|
+
__privateMethod(this, _iterateNodes, iterateNodes_fn).call(this, __privateMethod(this, _normalizeBreakLines, normalizeBreakLines_fn), (node) => node.tagName === "BR");
|
|
19573
|
+
__privateMethod(this, _iterateNodes, iterateNodes_fn).call(this, __privateMethod(this, _removeEmptyNodes, removeEmptyNodes_fn), __privateMethod(this, _isBlockNode, isBlockNode_fn));
|
|
19574
|
+
__privateMethod(this, _iterateNodes, iterateNodes_fn).call(this, __privateMethod(this, _normalizeListItems, normalizeListItems_fn), (node) => node.tagName === "LI");
|
|
19575
|
+
__privateMethod(this, _normalizeBlockTextDecoration, normalizeBlockTextDecoration_fn).call(this);
|
|
19524
19576
|
}
|
|
19525
19577
|
get normalizedHTML() {
|
|
19526
19578
|
return this.dom.body.innerHTML;
|
|
19527
19579
|
}
|
|
19528
|
-
|
|
19529
|
-
|
|
19530
|
-
|
|
19531
|
-
|
|
19532
|
-
|
|
19533
|
-
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
|
|
19539
|
-
|
|
19540
|
-
|
|
19541
|
-
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19552
|
-
|
|
19580
|
+
};
|
|
19581
|
+
let HtmlNormalizer = _HtmlNormalizer;
|
|
19582
|
+
_parser = new WeakMap();
|
|
19583
|
+
_NodeFilter = new WeakSet();
|
|
19584
|
+
NodeFilter_get = function() {
|
|
19585
|
+
return __privateGet(this, _parser).types.NodeFilter;
|
|
19586
|
+
};
|
|
19587
|
+
_Node = new WeakSet();
|
|
19588
|
+
Node_get = function() {
|
|
19589
|
+
return __privateGet(this, _parser).types.Node;
|
|
19590
|
+
};
|
|
19591
|
+
_removeComments = new WeakSet();
|
|
19592
|
+
removeComments_fn = function() {
|
|
19593
|
+
const iterator = __privateMethod(this, _createNodeIterator, createNodeIterator_fn).call(this, __privateGet(this, _NodeFilter, NodeFilter_get).SHOW_COMMENT);
|
|
19594
|
+
__privateMethod(this, _runIterator, runIterator_fn).call(this, iterator, (node) => node.remove());
|
|
19595
|
+
};
|
|
19596
|
+
_createNodeIterator = new WeakSet();
|
|
19597
|
+
createNodeIterator_fn = function(whatToShow, filter2) {
|
|
19598
|
+
return this.dom.createNodeIterator(this.dom.body, whatToShow, filter2);
|
|
19599
|
+
};
|
|
19600
|
+
_iterateNodes = new WeakSet();
|
|
19601
|
+
iterateNodes_fn = function(handler, condition = () => true) {
|
|
19602
|
+
const checkCondition = (node) => node.tagName !== "BODY" && condition.call(this, node);
|
|
19603
|
+
const iterator = __privateMethod(this, _createNodeIterator, createNodeIterator_fn).call(this, __privateGet(this, _NodeFilter, NodeFilter_get).SHOW_ELEMENT, {
|
|
19604
|
+
acceptNode: (node) => checkCondition(node) ? __privateGet(this, _NodeFilter, NodeFilter_get).FILTER_ACCEPT : __privateGet(this, _NodeFilter, NodeFilter_get).FILTER_REJECT
|
|
19605
|
+
});
|
|
19606
|
+
__privateMethod(this, _runIterator, runIterator_fn).call(this, iterator, handler);
|
|
19607
|
+
};
|
|
19608
|
+
_runIterator = new WeakSet();
|
|
19609
|
+
runIterator_fn = function(iterator, handler) {
|
|
19610
|
+
let currentNode = iterator.nextNode();
|
|
19611
|
+
while (currentNode) {
|
|
19612
|
+
handler.call(this, currentNode);
|
|
19613
|
+
currentNode = iterator.nextNode();
|
|
19614
|
+
}
|
|
19615
|
+
};
|
|
19616
|
+
_removeEmptyNodes = new WeakSet();
|
|
19617
|
+
removeEmptyNodes_fn = function(node) {
|
|
19618
|
+
if (!node.innerHTML.trim())
|
|
19619
|
+
node.remove();
|
|
19620
|
+
};
|
|
19621
|
+
_normalizeListItems = new WeakSet();
|
|
19622
|
+
normalizeListItems_fn = function(itemEl) {
|
|
19623
|
+
const fragment = this.dom.createDocumentFragment();
|
|
19624
|
+
const children = Array.from(itemEl.childNodes);
|
|
19625
|
+
let capturingParagraph;
|
|
19626
|
+
let previousNode;
|
|
19627
|
+
const append2 = (node) => {
|
|
19628
|
+
__privateMethod(this, _assignElementProperties, assignElementProperties_fn).call(this, node, itemEl, _HtmlNormalizer.BLOCK_STYLES);
|
|
19629
|
+
fragment.append(node);
|
|
19630
|
+
};
|
|
19631
|
+
__privateMethod(this, _assignElementProperties, assignElementProperties_fn).call(this, itemEl, itemEl.parentElement, _HtmlNormalizer.BLOCK_STYLES);
|
|
19632
|
+
for (const node of children) {
|
|
19633
|
+
if (__privateMethod(this, _isBlockNode, isBlockNode_fn).call(this, node)) {
|
|
19634
|
+
append2(node);
|
|
19635
|
+
capturingParagraph = null;
|
|
19636
|
+
previousNode = node;
|
|
19637
|
+
continue;
|
|
19553
19638
|
}
|
|
19554
|
-
|
|
19555
|
-
_removeEmptyNodes(node) {
|
|
19556
|
-
if (!node.innerHTML.trim())
|
|
19639
|
+
if (node.tagName === "BR" && previousNode && (previousNode == null ? void 0 : previousNode.tagName) !== "BR") {
|
|
19557
19640
|
node.remove();
|
|
19558
|
-
}
|
|
19559
|
-
_normalizeListItems(itemEl) {
|
|
19560
|
-
const fragment = this.dom.createDocumentFragment();
|
|
19561
|
-
const children = Array.from(itemEl.childNodes);
|
|
19562
|
-
let capturingParagraph;
|
|
19563
|
-
let previousNode;
|
|
19564
|
-
const append2 = (node) => {
|
|
19565
|
-
this._assignElementProperties(node, itemEl, _ContentNormalizer.BLOCK_STYLES);
|
|
19566
|
-
fragment.append(node);
|
|
19567
|
-
};
|
|
19568
|
-
this._assignElementProperties(itemEl, itemEl.parentElement, _ContentNormalizer.BLOCK_STYLES);
|
|
19569
|
-
for (const node of children) {
|
|
19570
|
-
if (this._isBlockNode(node)) {
|
|
19571
|
-
append2(node);
|
|
19572
|
-
capturingParagraph = null;
|
|
19573
|
-
previousNode = node;
|
|
19574
|
-
continue;
|
|
19575
|
-
}
|
|
19576
|
-
if (node.tagName === "BR" && previousNode && (previousNode == null ? void 0 : previousNode.tagName) !== "BR") {
|
|
19577
|
-
node.remove();
|
|
19578
|
-
previousNode = node;
|
|
19579
|
-
continue;
|
|
19580
|
-
}
|
|
19581
|
-
if (node.tagName === "BR") {
|
|
19582
|
-
const emptyLineEl = this.dom.createElement("p");
|
|
19583
|
-
emptyLineEl.append(node);
|
|
19584
|
-
append2(emptyLineEl);
|
|
19585
|
-
capturingParagraph = null;
|
|
19586
|
-
previousNode = node;
|
|
19587
|
-
continue;
|
|
19588
|
-
}
|
|
19589
|
-
if (!capturingParagraph) {
|
|
19590
|
-
capturingParagraph = this.dom.createElement("p");
|
|
19591
|
-
append2(capturingParagraph);
|
|
19592
|
-
}
|
|
19593
|
-
capturingParagraph.append(node);
|
|
19594
19641
|
previousNode = node;
|
|
19642
|
+
continue;
|
|
19595
19643
|
}
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
const migratingStyles = this._getMigratingStyles(element, { customProperties: true });
|
|
19604
|
-
const content = [];
|
|
19605
|
-
for (const node of cloned.childNodes) {
|
|
19606
|
-
let child = node;
|
|
19607
|
-
if (migratingStyles.length) {
|
|
19608
|
-
child = this._wrapTextNode(cloned, node);
|
|
19609
|
-
this._assignElementProperties(child, cloned, migratingStyles);
|
|
19610
|
-
}
|
|
19611
|
-
content.push(child);
|
|
19644
|
+
if (node.tagName === "BR") {
|
|
19645
|
+
const emptyLineEl = this.dom.createElement("p");
|
|
19646
|
+
emptyLineEl.append(node);
|
|
19647
|
+
append2(emptyLineEl);
|
|
19648
|
+
capturingParagraph = null;
|
|
19649
|
+
previousNode = node;
|
|
19650
|
+
continue;
|
|
19612
19651
|
}
|
|
19613
|
-
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
if (!this._isBlockNode(element) && this._isOnlyTextContent(element))
|
|
19617
|
-
return;
|
|
19618
|
-
const properties = this._getMigratingStyles(element);
|
|
19619
|
-
if (!properties.length)
|
|
19620
|
-
return;
|
|
19621
|
-
for (const node of element.childNodes) {
|
|
19622
|
-
const child = this._wrapTextNode(element, node);
|
|
19623
|
-
this._assignElementProperties(child, element, properties);
|
|
19652
|
+
if (!capturingParagraph) {
|
|
19653
|
+
capturingParagraph = this.dom.createElement("p");
|
|
19654
|
+
append2(capturingParagraph);
|
|
19624
19655
|
}
|
|
19625
|
-
|
|
19656
|
+
capturingParagraph.append(node);
|
|
19657
|
+
previousNode = node;
|
|
19626
19658
|
}
|
|
19627
|
-
|
|
19628
|
-
|
|
19629
|
-
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
|
|
19640
|
-
if (!customProperties && property.startsWith("--"))
|
|
19641
|
-
continue;
|
|
19642
|
-
properties.push(property);
|
|
19659
|
+
itemEl.append(fragment);
|
|
19660
|
+
__privateMethod(this, _removeStyleProperties, removeStyleProperties_fn).call(this, itemEl, _HtmlNormalizer.BLOCK_STYLES);
|
|
19661
|
+
};
|
|
19662
|
+
_isBlockNode = new WeakSet();
|
|
19663
|
+
isBlockNode_fn = function(node) {
|
|
19664
|
+
return _HtmlNormalizer.BLOCK_NODE_NAMES.includes(node.tagName);
|
|
19665
|
+
};
|
|
19666
|
+
_assignElementProperties = new WeakSet();
|
|
19667
|
+
assignElementProperties_fn = function(target, source, properties) {
|
|
19668
|
+
for (const property of properties) {
|
|
19669
|
+
const value = source.style.getPropertyValue(property);
|
|
19670
|
+
if (value && !target.style.getPropertyValue(property)) {
|
|
19671
|
+
target.style.setProperty(property, value);
|
|
19643
19672
|
}
|
|
19644
|
-
return properties;
|
|
19645
|
-
}
|
|
19646
|
-
_wrapTextNode(parent, node) {
|
|
19647
|
-
if (node.nodeType !== this._Node.TEXT_NODE)
|
|
19648
|
-
return node;
|
|
19649
|
-
const span = this.dom.createElement("span");
|
|
19650
|
-
span.append(node.cloneNode());
|
|
19651
|
-
parent.replaceChild(span, node);
|
|
19652
|
-
return span;
|
|
19653
19673
|
}
|
|
19654
|
-
|
|
19655
|
-
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
|
|
19659
|
-
}
|
|
19660
|
-
}
|
|
19674
|
+
};
|
|
19675
|
+
_removeStyleProperties = new WeakSet();
|
|
19676
|
+
removeStyleProperties_fn = function(element, properties) {
|
|
19677
|
+
for (const property of properties) {
|
|
19678
|
+
element.style.removeProperty(property);
|
|
19661
19679
|
}
|
|
19662
|
-
|
|
19663
|
-
|
|
19664
|
-
return false;
|
|
19665
|
-
return _ContentNormalizer.ASSIGN_STYLE_RULES.every((rule) => {
|
|
19666
|
-
if (!rule.tag.test(target.tagName.toLowerCase()))
|
|
19667
|
-
return true;
|
|
19668
|
-
return !rule.ignore.test(property);
|
|
19669
|
-
});
|
|
19680
|
+
if (element.style.length === 0) {
|
|
19681
|
+
element.removeAttribute("style");
|
|
19670
19682
|
}
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19683
|
+
};
|
|
19684
|
+
_normalizeBreakLines = new WeakSet();
|
|
19685
|
+
normalizeBreakLines_fn = function({ parentElement }) {
|
|
19686
|
+
if (!__privateMethod(this, _isBlockNode, isBlockNode_fn).call(this, parentElement))
|
|
19687
|
+
return;
|
|
19688
|
+
if (!parentElement.textContent)
|
|
19689
|
+
return;
|
|
19690
|
+
const fragment = this.dom.createDocumentFragment();
|
|
19691
|
+
const children = Array.from(parentElement.childNodes);
|
|
19692
|
+
const parentTemplate = parentElement.cloneNode(true);
|
|
19693
|
+
parentTemplate.innerHTML = "";
|
|
19694
|
+
let capturingParagraph = parentTemplate.cloneNode();
|
|
19695
|
+
const append2 = (node) => {
|
|
19696
|
+
__privateMethod(this, _assignElementProperties, assignElementProperties_fn).call(this, node, parentElement, _HtmlNormalizer.BLOCK_STYLES);
|
|
19697
|
+
fragment.append(node);
|
|
19698
|
+
};
|
|
19699
|
+
for (const child of children) {
|
|
19700
|
+
if (child.tagName === "BR") {
|
|
19701
|
+
append2(capturingParagraph);
|
|
19702
|
+
capturingParagraph = parentTemplate.cloneNode();
|
|
19703
|
+
continue;
|
|
19677
19704
|
}
|
|
19705
|
+
capturingParagraph.append(child);
|
|
19678
19706
|
}
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19707
|
+
fragment.append(capturingParagraph);
|
|
19708
|
+
parentElement.replaceWith(fragment);
|
|
19709
|
+
};
|
|
19710
|
+
_normalizeBlockTextDecoration = new WeakSet();
|
|
19711
|
+
normalizeBlockTextDecoration_fn = function() {
|
|
19712
|
+
const blockEls = this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');
|
|
19713
|
+
for (const blockEl of blockEls) {
|
|
19714
|
+
__privateMethod(this, _moveTextDecorationToChildren, moveTextDecorationToChildren_fn).call(this, blockEl);
|
|
19715
|
+
}
|
|
19716
|
+
};
|
|
19717
|
+
_moveTextDecorationToChildren = new WeakSet();
|
|
19718
|
+
moveTextDecorationToChildren_fn = function(blockEl) {
|
|
19719
|
+
const blockDecoration = __privateMethod(this, _parseTextDecoration, parseTextDecoration_fn).call(this, blockEl);
|
|
19720
|
+
blockEl.style.removeProperty("text-decoration-line");
|
|
19721
|
+
blockEl.style.removeProperty("text-decoration");
|
|
19722
|
+
if (!blockEl.style.cssText)
|
|
19723
|
+
blockEl.removeAttribute("style");
|
|
19724
|
+
if (blockDecoration.none)
|
|
19725
|
+
return;
|
|
19726
|
+
for (const childNode of blockEl.childNodes) {
|
|
19727
|
+
const textEl = __privateMethod(this, _wrapTextNode, wrapTextNode_fn).call(this, blockEl, childNode);
|
|
19728
|
+
const textDecoration = __privateMethod(this, _parseTextDecoration, parseTextDecoration_fn).call(this, textEl);
|
|
19729
|
+
const mergedDecoration = {
|
|
19730
|
+
underline: textDecoration.underline || blockDecoration.underline,
|
|
19731
|
+
line_through: textDecoration.line_through || blockDecoration.line_through
|
|
19692
19732
|
};
|
|
19693
|
-
|
|
19694
|
-
|
|
19695
|
-
|
|
19696
|
-
capturingParagraph = parentTemplate.cloneNode();
|
|
19697
|
-
continue;
|
|
19698
|
-
}
|
|
19699
|
-
capturingParagraph.append(child);
|
|
19700
|
-
}
|
|
19701
|
-
fragment.append(capturingParagraph);
|
|
19702
|
-
parentElement.replaceWith(fragment);
|
|
19733
|
+
textEl.style.removeProperty("text-decoration-line");
|
|
19734
|
+
textEl.style.removeProperty("text-decoration");
|
|
19735
|
+
textEl.style.textDecoration = Object.entries(mergedDecoration).filter(([, value]) => value).map(([name]) => name.replace("_", "-")).join(" ");
|
|
19703
19736
|
}
|
|
19704
19737
|
};
|
|
19705
|
-
|
|
19706
|
-
|
|
19707
|
-
|
|
19738
|
+
_parseTextDecoration = new WeakSet();
|
|
19739
|
+
parseTextDecoration_fn = function(element) {
|
|
19740
|
+
const { textDecoration, textDecorationLine } = element.style;
|
|
19741
|
+
const decoration = textDecoration || textDecorationLine || "";
|
|
19742
|
+
return {
|
|
19743
|
+
none: decoration.includes("none"),
|
|
19744
|
+
underline: decoration.includes("underline"),
|
|
19745
|
+
line_through: decoration.includes("line-through")
|
|
19746
|
+
};
|
|
19747
|
+
};
|
|
19748
|
+
_wrapTextNode = new WeakSet();
|
|
19749
|
+
wrapTextNode_fn = function(parent, node) {
|
|
19750
|
+
if (node.nodeType !== __privateGet(this, _Node, Node_get).TEXT_NODE)
|
|
19751
|
+
return node;
|
|
19752
|
+
const span = this.dom.createElement("span");
|
|
19753
|
+
span.append(node.cloneNode());
|
|
19754
|
+
parent.replaceChild(span, node);
|
|
19755
|
+
return span;
|
|
19756
|
+
};
|
|
19757
|
+
__publicField(HtmlNormalizer, "BLOCK_NODE_NAMES", ["P", "H1", "H2", "H3", "H4"]);
|
|
19758
|
+
__publicField(HtmlNormalizer, "BLOCK_STYLES", [
|
|
19708
19759
|
"text-align",
|
|
19709
19760
|
"line-height",
|
|
19710
19761
|
"margin",
|
|
@@ -19713,105 +19764,1071 @@ __publicField(ContentNormalizer, "BLOCK_STYLES", [
|
|
|
19713
19764
|
"margin-left",
|
|
19714
19765
|
"margin-right"
|
|
19715
19766
|
]);
|
|
19716
|
-
|
|
19717
|
-
|
|
19718
|
-
|
|
19719
|
-
ignore: /font-weight/
|
|
19720
|
-
},
|
|
19721
|
-
{
|
|
19722
|
-
tag: /^i$/,
|
|
19723
|
-
ignore: /font-style/
|
|
19724
|
-
},
|
|
19725
|
-
{
|
|
19726
|
-
tag: /^s$/,
|
|
19727
|
-
ignore: /text-decoration(.+)?/
|
|
19728
|
-
}
|
|
19729
|
-
]);
|
|
19730
|
-
class ContextWindow {
|
|
19731
|
-
static use(window2) {
|
|
19732
|
-
this.window = window2;
|
|
19733
|
-
}
|
|
19734
|
-
static get document() {
|
|
19735
|
-
return this.window.document;
|
|
19736
|
-
}
|
|
19737
|
-
static get body() {
|
|
19738
|
-
return this.document.body;
|
|
19739
|
-
}
|
|
19740
|
-
static get head() {
|
|
19741
|
-
return this.document.head;
|
|
19742
|
-
}
|
|
19743
|
-
static getComputedStyle(element) {
|
|
19744
|
-
return this.window.getComputedStyle(element);
|
|
19745
|
-
}
|
|
19767
|
+
function listCacheClear$1() {
|
|
19768
|
+
this.__data__ = [];
|
|
19769
|
+
this.size = 0;
|
|
19746
19770
|
}
|
|
19747
|
-
|
|
19748
|
-
|
|
19749
|
-
|
|
19750
|
-
|
|
19751
|
-
|
|
19752
|
-
|
|
19753
|
-
|
|
19771
|
+
var _listCacheClear = listCacheClear$1;
|
|
19772
|
+
function eq$2(value, other) {
|
|
19773
|
+
return value === other || value !== value && other !== other;
|
|
19774
|
+
}
|
|
19775
|
+
var eq_1 = eq$2;
|
|
19776
|
+
var eq$1 = eq_1;
|
|
19777
|
+
function assocIndexOf$4(array, key) {
|
|
19778
|
+
var length = array.length;
|
|
19779
|
+
while (length--) {
|
|
19780
|
+
if (eq$1(array[length][0], key)) {
|
|
19781
|
+
return length;
|
|
19782
|
+
}
|
|
19754
19783
|
}
|
|
19755
|
-
|
|
19756
|
-
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19784
|
+
return -1;
|
|
19785
|
+
}
|
|
19786
|
+
var _assocIndexOf = assocIndexOf$4;
|
|
19787
|
+
var assocIndexOf$3 = _assocIndexOf;
|
|
19788
|
+
var arrayProto = Array.prototype;
|
|
19789
|
+
var splice = arrayProto.splice;
|
|
19790
|
+
function listCacheDelete$1(key) {
|
|
19791
|
+
var data2 = this.__data__, index = assocIndexOf$3(data2, key);
|
|
19792
|
+
if (index < 0) {
|
|
19793
|
+
return false;
|
|
19761
19794
|
}
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
|
|
19765
|
-
|
|
19766
|
-
|
|
19795
|
+
var lastIndex = data2.length - 1;
|
|
19796
|
+
if (index == lastIndex) {
|
|
19797
|
+
data2.pop();
|
|
19798
|
+
} else {
|
|
19799
|
+
splice.call(data2, index, 1);
|
|
19767
19800
|
}
|
|
19768
|
-
|
|
19769
|
-
|
|
19770
|
-
|
|
19771
|
-
|
|
19772
|
-
|
|
19773
|
-
|
|
19774
|
-
|
|
19775
|
-
|
|
19776
|
-
|
|
19801
|
+
--this.size;
|
|
19802
|
+
return true;
|
|
19803
|
+
}
|
|
19804
|
+
var _listCacheDelete = listCacheDelete$1;
|
|
19805
|
+
var assocIndexOf$2 = _assocIndexOf;
|
|
19806
|
+
function listCacheGet$1(key) {
|
|
19807
|
+
var data2 = this.__data__, index = assocIndexOf$2(data2, key);
|
|
19808
|
+
return index < 0 ? void 0 : data2[index][1];
|
|
19809
|
+
}
|
|
19810
|
+
var _listCacheGet = listCacheGet$1;
|
|
19811
|
+
var assocIndexOf$1 = _assocIndexOf;
|
|
19812
|
+
function listCacheHas$1(key) {
|
|
19813
|
+
return assocIndexOf$1(this.__data__, key) > -1;
|
|
19814
|
+
}
|
|
19815
|
+
var _listCacheHas = listCacheHas$1;
|
|
19816
|
+
var assocIndexOf = _assocIndexOf;
|
|
19817
|
+
function listCacheSet$1(key, value) {
|
|
19818
|
+
var data2 = this.__data__, index = assocIndexOf(data2, key);
|
|
19819
|
+
if (index < 0) {
|
|
19820
|
+
++this.size;
|
|
19821
|
+
data2.push([key, value]);
|
|
19822
|
+
} else {
|
|
19823
|
+
data2[index][1] = value;
|
|
19777
19824
|
}
|
|
19778
|
-
|
|
19779
|
-
|
|
19780
|
-
|
|
19781
|
-
|
|
19782
|
-
|
|
19825
|
+
return this;
|
|
19826
|
+
}
|
|
19827
|
+
var _listCacheSet = listCacheSet$1;
|
|
19828
|
+
var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
|
|
19829
|
+
function ListCache$4(entries) {
|
|
19830
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
19831
|
+
this.clear();
|
|
19832
|
+
while (++index < length) {
|
|
19833
|
+
var entry = entries[index];
|
|
19834
|
+
this.set(entry[0], entry[1]);
|
|
19783
19835
|
}
|
|
19784
|
-
|
|
19785
|
-
|
|
19786
|
-
|
|
19787
|
-
|
|
19788
|
-
|
|
19789
|
-
|
|
19790
|
-
|
|
19791
|
-
|
|
19836
|
+
}
|
|
19837
|
+
ListCache$4.prototype.clear = listCacheClear;
|
|
19838
|
+
ListCache$4.prototype["delete"] = listCacheDelete;
|
|
19839
|
+
ListCache$4.prototype.get = listCacheGet;
|
|
19840
|
+
ListCache$4.prototype.has = listCacheHas;
|
|
19841
|
+
ListCache$4.prototype.set = listCacheSet;
|
|
19842
|
+
var _ListCache = ListCache$4;
|
|
19843
|
+
var ListCache$3 = _ListCache;
|
|
19844
|
+
function stackClear$1() {
|
|
19845
|
+
this.__data__ = new ListCache$3();
|
|
19846
|
+
this.size = 0;
|
|
19847
|
+
}
|
|
19848
|
+
var _stackClear = stackClear$1;
|
|
19849
|
+
function stackDelete$1(key) {
|
|
19850
|
+
var data2 = this.__data__, result = data2["delete"](key);
|
|
19851
|
+
this.size = data2.size;
|
|
19852
|
+
return result;
|
|
19853
|
+
}
|
|
19854
|
+
var _stackDelete = stackDelete$1;
|
|
19855
|
+
function stackGet$1(key) {
|
|
19856
|
+
return this.__data__.get(key);
|
|
19857
|
+
}
|
|
19858
|
+
var _stackGet = stackGet$1;
|
|
19859
|
+
function stackHas$1(key) {
|
|
19860
|
+
return this.__data__.has(key);
|
|
19861
|
+
}
|
|
19862
|
+
var _stackHas = stackHas$1;
|
|
19863
|
+
var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
19864
|
+
var _freeGlobal = freeGlobal$1;
|
|
19865
|
+
var freeGlobal = _freeGlobal;
|
|
19866
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
19867
|
+
var root$8 = freeGlobal || freeSelf || Function("return this")();
|
|
19868
|
+
var _root = root$8;
|
|
19869
|
+
var root$7 = _root;
|
|
19870
|
+
var Symbol$4 = root$7.Symbol;
|
|
19871
|
+
var _Symbol = Symbol$4;
|
|
19872
|
+
var Symbol$3 = _Symbol;
|
|
19873
|
+
var objectProto$b = Object.prototype;
|
|
19874
|
+
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
19875
|
+
var nativeObjectToString$1 = objectProto$b.toString;
|
|
19876
|
+
var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : void 0;
|
|
19877
|
+
function getRawTag$1(value) {
|
|
19878
|
+
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
19879
|
+
try {
|
|
19880
|
+
value[symToStringTag$1] = void 0;
|
|
19881
|
+
var unmasked = true;
|
|
19882
|
+
} catch (e) {
|
|
19792
19883
|
}
|
|
19793
|
-
|
|
19794
|
-
|
|
19795
|
-
|
|
19796
|
-
|
|
19797
|
-
|
|
19798
|
-
|
|
19884
|
+
var result = nativeObjectToString$1.call(value);
|
|
19885
|
+
if (unmasked) {
|
|
19886
|
+
if (isOwn) {
|
|
19887
|
+
value[symToStringTag$1] = tag;
|
|
19888
|
+
} else {
|
|
19889
|
+
delete value[symToStringTag$1];
|
|
19890
|
+
}
|
|
19799
19891
|
}
|
|
19800
|
-
|
|
19801
|
-
|
|
19892
|
+
return result;
|
|
19893
|
+
}
|
|
19894
|
+
var _getRawTag = getRawTag$1;
|
|
19895
|
+
var objectProto$a = Object.prototype;
|
|
19896
|
+
var nativeObjectToString = objectProto$a.toString;
|
|
19897
|
+
function objectToString$1(value) {
|
|
19898
|
+
return nativeObjectToString.call(value);
|
|
19899
|
+
}
|
|
19900
|
+
var _objectToString = objectToString$1;
|
|
19901
|
+
var Symbol$2 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
|
|
19902
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
19903
|
+
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
19904
|
+
function baseGetTag$4(value) {
|
|
19905
|
+
if (value == null) {
|
|
19906
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
19802
19907
|
}
|
|
19803
|
-
|
|
19804
|
-
|
|
19908
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
19909
|
+
}
|
|
19910
|
+
var _baseGetTag = baseGetTag$4;
|
|
19911
|
+
function isObject$2(value) {
|
|
19912
|
+
var type = typeof value;
|
|
19913
|
+
return value != null && (type == "object" || type == "function");
|
|
19914
|
+
}
|
|
19915
|
+
var isObject_1 = isObject$2;
|
|
19916
|
+
var baseGetTag$3 = _baseGetTag, isObject$1 = isObject_1;
|
|
19917
|
+
var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
19918
|
+
function isFunction$2(value) {
|
|
19919
|
+
if (!isObject$1(value)) {
|
|
19920
|
+
return false;
|
|
19805
19921
|
}
|
|
19922
|
+
var tag = baseGetTag$3(value);
|
|
19923
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
19806
19924
|
}
|
|
19807
|
-
|
|
19808
|
-
|
|
19809
|
-
|
|
19810
|
-
|
|
19811
|
-
|
|
19812
|
-
|
|
19925
|
+
var isFunction_1 = isFunction$2;
|
|
19926
|
+
var root$6 = _root;
|
|
19927
|
+
var coreJsData$1 = root$6["__core-js_shared__"];
|
|
19928
|
+
var _coreJsData = coreJsData$1;
|
|
19929
|
+
var coreJsData = _coreJsData;
|
|
19930
|
+
var maskSrcKey = function() {
|
|
19931
|
+
var uid2 = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
19932
|
+
return uid2 ? "Symbol(src)_1." + uid2 : "";
|
|
19933
|
+
}();
|
|
19934
|
+
function isMasked$1(func) {
|
|
19935
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
19936
|
+
}
|
|
19937
|
+
var _isMasked = isMasked$1;
|
|
19938
|
+
var funcProto$1 = Function.prototype;
|
|
19939
|
+
var funcToString$1 = funcProto$1.toString;
|
|
19940
|
+
function toSource$2(func) {
|
|
19941
|
+
if (func != null) {
|
|
19942
|
+
try {
|
|
19943
|
+
return funcToString$1.call(func);
|
|
19944
|
+
} catch (e) {
|
|
19945
|
+
}
|
|
19946
|
+
try {
|
|
19947
|
+
return func + "";
|
|
19948
|
+
} catch (e) {
|
|
19949
|
+
}
|
|
19813
19950
|
}
|
|
19814
|
-
|
|
19951
|
+
return "";
|
|
19952
|
+
}
|
|
19953
|
+
var _toSource = toSource$2;
|
|
19954
|
+
var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject = isObject_1, toSource$1 = _toSource;
|
|
19955
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
19956
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
19957
|
+
var funcProto = Function.prototype, objectProto$9 = Object.prototype;
|
|
19958
|
+
var funcToString = funcProto.toString;
|
|
19959
|
+
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
19960
|
+
var reIsNative = RegExp(
|
|
19961
|
+
"^" + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
19962
|
+
);
|
|
19963
|
+
function baseIsNative$1(value) {
|
|
19964
|
+
if (!isObject(value) || isMasked(value)) {
|
|
19965
|
+
return false;
|
|
19966
|
+
}
|
|
19967
|
+
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
|
19968
|
+
return pattern.test(toSource$1(value));
|
|
19969
|
+
}
|
|
19970
|
+
var _baseIsNative = baseIsNative$1;
|
|
19971
|
+
function getValue$1(object, key) {
|
|
19972
|
+
return object == null ? void 0 : object[key];
|
|
19973
|
+
}
|
|
19974
|
+
var _getValue = getValue$1;
|
|
19975
|
+
var baseIsNative = _baseIsNative, getValue = _getValue;
|
|
19976
|
+
function getNative$6(object, key) {
|
|
19977
|
+
var value = getValue(object, key);
|
|
19978
|
+
return baseIsNative(value) ? value : void 0;
|
|
19979
|
+
}
|
|
19980
|
+
var _getNative = getNative$6;
|
|
19981
|
+
var getNative$5 = _getNative, root$5 = _root;
|
|
19982
|
+
var Map$4 = getNative$5(root$5, "Map");
|
|
19983
|
+
var _Map = Map$4;
|
|
19984
|
+
var getNative$4 = _getNative;
|
|
19985
|
+
var nativeCreate$4 = getNative$4(Object, "create");
|
|
19986
|
+
var _nativeCreate = nativeCreate$4;
|
|
19987
|
+
var nativeCreate$3 = _nativeCreate;
|
|
19988
|
+
function hashClear$1() {
|
|
19989
|
+
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
19990
|
+
this.size = 0;
|
|
19991
|
+
}
|
|
19992
|
+
var _hashClear = hashClear$1;
|
|
19993
|
+
function hashDelete$1(key) {
|
|
19994
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
19995
|
+
this.size -= result ? 1 : 0;
|
|
19996
|
+
return result;
|
|
19997
|
+
}
|
|
19998
|
+
var _hashDelete = hashDelete$1;
|
|
19999
|
+
var nativeCreate$2 = _nativeCreate;
|
|
20000
|
+
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
20001
|
+
var objectProto$8 = Object.prototype;
|
|
20002
|
+
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
20003
|
+
function hashGet$1(key) {
|
|
20004
|
+
var data2 = this.__data__;
|
|
20005
|
+
if (nativeCreate$2) {
|
|
20006
|
+
var result = data2[key];
|
|
20007
|
+
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
20008
|
+
}
|
|
20009
|
+
return hasOwnProperty$6.call(data2, key) ? data2[key] : void 0;
|
|
20010
|
+
}
|
|
20011
|
+
var _hashGet = hashGet$1;
|
|
20012
|
+
var nativeCreate$1 = _nativeCreate;
|
|
20013
|
+
var objectProto$7 = Object.prototype;
|
|
20014
|
+
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
20015
|
+
function hashHas$1(key) {
|
|
20016
|
+
var data2 = this.__data__;
|
|
20017
|
+
return nativeCreate$1 ? data2[key] !== void 0 : hasOwnProperty$5.call(data2, key);
|
|
20018
|
+
}
|
|
20019
|
+
var _hashHas = hashHas$1;
|
|
20020
|
+
var nativeCreate = _nativeCreate;
|
|
20021
|
+
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
20022
|
+
function hashSet$1(key, value) {
|
|
20023
|
+
var data2 = this.__data__;
|
|
20024
|
+
this.size += this.has(key) ? 0 : 1;
|
|
20025
|
+
data2[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
20026
|
+
return this;
|
|
20027
|
+
}
|
|
20028
|
+
var _hashSet = hashSet$1;
|
|
20029
|
+
var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet;
|
|
20030
|
+
function Hash$1(entries) {
|
|
20031
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
20032
|
+
this.clear();
|
|
20033
|
+
while (++index < length) {
|
|
20034
|
+
var entry = entries[index];
|
|
20035
|
+
this.set(entry[0], entry[1]);
|
|
20036
|
+
}
|
|
20037
|
+
}
|
|
20038
|
+
Hash$1.prototype.clear = hashClear;
|
|
20039
|
+
Hash$1.prototype["delete"] = hashDelete;
|
|
20040
|
+
Hash$1.prototype.get = hashGet;
|
|
20041
|
+
Hash$1.prototype.has = hashHas;
|
|
20042
|
+
Hash$1.prototype.set = hashSet;
|
|
20043
|
+
var _Hash = Hash$1;
|
|
20044
|
+
var Hash = _Hash, ListCache$2 = _ListCache, Map$3 = _Map;
|
|
20045
|
+
function mapCacheClear$1() {
|
|
20046
|
+
this.size = 0;
|
|
20047
|
+
this.__data__ = {
|
|
20048
|
+
"hash": new Hash(),
|
|
20049
|
+
"map": new (Map$3 || ListCache$2)(),
|
|
20050
|
+
"string": new Hash()
|
|
20051
|
+
};
|
|
20052
|
+
}
|
|
20053
|
+
var _mapCacheClear = mapCacheClear$1;
|
|
20054
|
+
function isKeyable$1(value) {
|
|
20055
|
+
var type = typeof value;
|
|
20056
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
20057
|
+
}
|
|
20058
|
+
var _isKeyable = isKeyable$1;
|
|
20059
|
+
var isKeyable = _isKeyable;
|
|
20060
|
+
function getMapData$4(map2, key) {
|
|
20061
|
+
var data2 = map2.__data__;
|
|
20062
|
+
return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
|
|
20063
|
+
}
|
|
20064
|
+
var _getMapData = getMapData$4;
|
|
20065
|
+
var getMapData$3 = _getMapData;
|
|
20066
|
+
function mapCacheDelete$1(key) {
|
|
20067
|
+
var result = getMapData$3(this, key)["delete"](key);
|
|
20068
|
+
this.size -= result ? 1 : 0;
|
|
20069
|
+
return result;
|
|
20070
|
+
}
|
|
20071
|
+
var _mapCacheDelete = mapCacheDelete$1;
|
|
20072
|
+
var getMapData$2 = _getMapData;
|
|
20073
|
+
function mapCacheGet$1(key) {
|
|
20074
|
+
return getMapData$2(this, key).get(key);
|
|
20075
|
+
}
|
|
20076
|
+
var _mapCacheGet = mapCacheGet$1;
|
|
20077
|
+
var getMapData$1 = _getMapData;
|
|
20078
|
+
function mapCacheHas$1(key) {
|
|
20079
|
+
return getMapData$1(this, key).has(key);
|
|
20080
|
+
}
|
|
20081
|
+
var _mapCacheHas = mapCacheHas$1;
|
|
20082
|
+
var getMapData = _getMapData;
|
|
20083
|
+
function mapCacheSet$1(key, value) {
|
|
20084
|
+
var data2 = getMapData(this, key), size2 = data2.size;
|
|
20085
|
+
data2.set(key, value);
|
|
20086
|
+
this.size += data2.size == size2 ? 0 : 1;
|
|
20087
|
+
return this;
|
|
20088
|
+
}
|
|
20089
|
+
var _mapCacheSet = mapCacheSet$1;
|
|
20090
|
+
var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet;
|
|
20091
|
+
function MapCache$2(entries) {
|
|
20092
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
20093
|
+
this.clear();
|
|
20094
|
+
while (++index < length) {
|
|
20095
|
+
var entry = entries[index];
|
|
20096
|
+
this.set(entry[0], entry[1]);
|
|
20097
|
+
}
|
|
20098
|
+
}
|
|
20099
|
+
MapCache$2.prototype.clear = mapCacheClear;
|
|
20100
|
+
MapCache$2.prototype["delete"] = mapCacheDelete;
|
|
20101
|
+
MapCache$2.prototype.get = mapCacheGet;
|
|
20102
|
+
MapCache$2.prototype.has = mapCacheHas;
|
|
20103
|
+
MapCache$2.prototype.set = mapCacheSet;
|
|
20104
|
+
var _MapCache = MapCache$2;
|
|
20105
|
+
var ListCache$1 = _ListCache, Map$2 = _Map, MapCache$1 = _MapCache;
|
|
20106
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
20107
|
+
function stackSet$1(key, value) {
|
|
20108
|
+
var data2 = this.__data__;
|
|
20109
|
+
if (data2 instanceof ListCache$1) {
|
|
20110
|
+
var pairs = data2.__data__;
|
|
20111
|
+
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
20112
|
+
pairs.push([key, value]);
|
|
20113
|
+
this.size = ++data2.size;
|
|
20114
|
+
return this;
|
|
20115
|
+
}
|
|
20116
|
+
data2 = this.__data__ = new MapCache$1(pairs);
|
|
20117
|
+
}
|
|
20118
|
+
data2.set(key, value);
|
|
20119
|
+
this.size = data2.size;
|
|
20120
|
+
return this;
|
|
20121
|
+
}
|
|
20122
|
+
var _stackSet = stackSet$1;
|
|
20123
|
+
var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet;
|
|
20124
|
+
function Stack$1(entries) {
|
|
20125
|
+
var data2 = this.__data__ = new ListCache(entries);
|
|
20126
|
+
this.size = data2.size;
|
|
20127
|
+
}
|
|
20128
|
+
Stack$1.prototype.clear = stackClear;
|
|
20129
|
+
Stack$1.prototype["delete"] = stackDelete;
|
|
20130
|
+
Stack$1.prototype.get = stackGet;
|
|
20131
|
+
Stack$1.prototype.has = stackHas;
|
|
20132
|
+
Stack$1.prototype.set = stackSet;
|
|
20133
|
+
var _Stack = Stack$1;
|
|
20134
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
20135
|
+
function setCacheAdd$1(value) {
|
|
20136
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
20137
|
+
return this;
|
|
20138
|
+
}
|
|
20139
|
+
var _setCacheAdd = setCacheAdd$1;
|
|
20140
|
+
function setCacheHas$1(value) {
|
|
20141
|
+
return this.__data__.has(value);
|
|
20142
|
+
}
|
|
20143
|
+
var _setCacheHas = setCacheHas$1;
|
|
20144
|
+
var MapCache = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas;
|
|
20145
|
+
function SetCache$1(values2) {
|
|
20146
|
+
var index = -1, length = values2 == null ? 0 : values2.length;
|
|
20147
|
+
this.__data__ = new MapCache();
|
|
20148
|
+
while (++index < length) {
|
|
20149
|
+
this.add(values2[index]);
|
|
20150
|
+
}
|
|
20151
|
+
}
|
|
20152
|
+
SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
|
|
20153
|
+
SetCache$1.prototype.has = setCacheHas;
|
|
20154
|
+
var _SetCache = SetCache$1;
|
|
20155
|
+
function arraySome$1(array, predicate) {
|
|
20156
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
20157
|
+
while (++index < length) {
|
|
20158
|
+
if (predicate(array[index], index, array)) {
|
|
20159
|
+
return true;
|
|
20160
|
+
}
|
|
20161
|
+
}
|
|
20162
|
+
return false;
|
|
20163
|
+
}
|
|
20164
|
+
var _arraySome = arraySome$1;
|
|
20165
|
+
function cacheHas$1(cache2, key) {
|
|
20166
|
+
return cache2.has(key);
|
|
20167
|
+
}
|
|
20168
|
+
var _cacheHas = cacheHas$1;
|
|
20169
|
+
var SetCache = _SetCache, arraySome = _arraySome, cacheHas = _cacheHas;
|
|
20170
|
+
var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
20171
|
+
function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
|
|
20172
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
|
|
20173
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
20174
|
+
return false;
|
|
20175
|
+
}
|
|
20176
|
+
var arrStacked = stack.get(array);
|
|
20177
|
+
var othStacked = stack.get(other);
|
|
20178
|
+
if (arrStacked && othStacked) {
|
|
20179
|
+
return arrStacked == other && othStacked == array;
|
|
20180
|
+
}
|
|
20181
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
|
|
20182
|
+
stack.set(array, other);
|
|
20183
|
+
stack.set(other, array);
|
|
20184
|
+
while (++index < arrLength) {
|
|
20185
|
+
var arrValue = array[index], othValue = other[index];
|
|
20186
|
+
if (customizer) {
|
|
20187
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
20188
|
+
}
|
|
20189
|
+
if (compared !== void 0) {
|
|
20190
|
+
if (compared) {
|
|
20191
|
+
continue;
|
|
20192
|
+
}
|
|
20193
|
+
result = false;
|
|
20194
|
+
break;
|
|
20195
|
+
}
|
|
20196
|
+
if (seen) {
|
|
20197
|
+
if (!arraySome(other, function(othValue2, othIndex) {
|
|
20198
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
20199
|
+
return seen.push(othIndex);
|
|
20200
|
+
}
|
|
20201
|
+
})) {
|
|
20202
|
+
result = false;
|
|
20203
|
+
break;
|
|
20204
|
+
}
|
|
20205
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
20206
|
+
result = false;
|
|
20207
|
+
break;
|
|
20208
|
+
}
|
|
20209
|
+
}
|
|
20210
|
+
stack["delete"](array);
|
|
20211
|
+
stack["delete"](other);
|
|
20212
|
+
return result;
|
|
20213
|
+
}
|
|
20214
|
+
var _equalArrays = equalArrays$2;
|
|
20215
|
+
var root$4 = _root;
|
|
20216
|
+
var Uint8Array$1 = root$4.Uint8Array;
|
|
20217
|
+
var _Uint8Array = Uint8Array$1;
|
|
20218
|
+
function mapToArray$1(map2) {
|
|
20219
|
+
var index = -1, result = Array(map2.size);
|
|
20220
|
+
map2.forEach(function(value, key) {
|
|
20221
|
+
result[++index] = [key, value];
|
|
20222
|
+
});
|
|
20223
|
+
return result;
|
|
20224
|
+
}
|
|
20225
|
+
var _mapToArray = mapToArray$1;
|
|
20226
|
+
function setToArray$1(set2) {
|
|
20227
|
+
var index = -1, result = Array(set2.size);
|
|
20228
|
+
set2.forEach(function(value) {
|
|
20229
|
+
result[++index] = value;
|
|
20230
|
+
});
|
|
20231
|
+
return result;
|
|
20232
|
+
}
|
|
20233
|
+
var _setToArray = setToArray$1;
|
|
20234
|
+
var Symbol$1 = _Symbol, Uint8Array2 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
|
|
20235
|
+
var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
20236
|
+
var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]";
|
|
20237
|
+
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]";
|
|
20238
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
20239
|
+
function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
20240
|
+
switch (tag) {
|
|
20241
|
+
case dataViewTag$2:
|
|
20242
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
20243
|
+
return false;
|
|
20244
|
+
}
|
|
20245
|
+
object = object.buffer;
|
|
20246
|
+
other = other.buffer;
|
|
20247
|
+
case arrayBufferTag$1:
|
|
20248
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
|
|
20249
|
+
return false;
|
|
20250
|
+
}
|
|
20251
|
+
return true;
|
|
20252
|
+
case boolTag$1:
|
|
20253
|
+
case dateTag$1:
|
|
20254
|
+
case numberTag$1:
|
|
20255
|
+
return eq(+object, +other);
|
|
20256
|
+
case errorTag$1:
|
|
20257
|
+
return object.name == other.name && object.message == other.message;
|
|
20258
|
+
case regexpTag$1:
|
|
20259
|
+
case stringTag$1:
|
|
20260
|
+
return object == other + "";
|
|
20261
|
+
case mapTag$2:
|
|
20262
|
+
var convert = mapToArray;
|
|
20263
|
+
case setTag$2:
|
|
20264
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
|
|
20265
|
+
convert || (convert = setToArray);
|
|
20266
|
+
if (object.size != other.size && !isPartial) {
|
|
20267
|
+
return false;
|
|
20268
|
+
}
|
|
20269
|
+
var stacked = stack.get(object);
|
|
20270
|
+
if (stacked) {
|
|
20271
|
+
return stacked == other;
|
|
20272
|
+
}
|
|
20273
|
+
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
20274
|
+
stack.set(object, other);
|
|
20275
|
+
var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
20276
|
+
stack["delete"](object);
|
|
20277
|
+
return result;
|
|
20278
|
+
case symbolTag:
|
|
20279
|
+
if (symbolValueOf) {
|
|
20280
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
20281
|
+
}
|
|
20282
|
+
}
|
|
20283
|
+
return false;
|
|
20284
|
+
}
|
|
20285
|
+
var _equalByTag = equalByTag$1;
|
|
20286
|
+
function arrayPush$1(array, values2) {
|
|
20287
|
+
var index = -1, length = values2.length, offset2 = array.length;
|
|
20288
|
+
while (++index < length) {
|
|
20289
|
+
array[offset2 + index] = values2[index];
|
|
20290
|
+
}
|
|
20291
|
+
return array;
|
|
20292
|
+
}
|
|
20293
|
+
var _arrayPush = arrayPush$1;
|
|
20294
|
+
var isArray$3 = Array.isArray;
|
|
20295
|
+
var isArray_1 = isArray$3;
|
|
20296
|
+
var arrayPush = _arrayPush, isArray$2 = isArray_1;
|
|
20297
|
+
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
20298
|
+
var result = keysFunc(object);
|
|
20299
|
+
return isArray$2(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
20300
|
+
}
|
|
20301
|
+
var _baseGetAllKeys = baseGetAllKeys$1;
|
|
20302
|
+
function arrayFilter$1(array, predicate) {
|
|
20303
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
20304
|
+
while (++index < length) {
|
|
20305
|
+
var value = array[index];
|
|
20306
|
+
if (predicate(value, index, array)) {
|
|
20307
|
+
result[resIndex++] = value;
|
|
20308
|
+
}
|
|
20309
|
+
}
|
|
20310
|
+
return result;
|
|
20311
|
+
}
|
|
20312
|
+
var _arrayFilter = arrayFilter$1;
|
|
20313
|
+
function stubArray$1() {
|
|
20314
|
+
return [];
|
|
20315
|
+
}
|
|
20316
|
+
var stubArray_1 = stubArray$1;
|
|
20317
|
+
var arrayFilter = _arrayFilter, stubArray = stubArray_1;
|
|
20318
|
+
var objectProto$6 = Object.prototype;
|
|
20319
|
+
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
20320
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
20321
|
+
var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) {
|
|
20322
|
+
if (object == null) {
|
|
20323
|
+
return [];
|
|
20324
|
+
}
|
|
20325
|
+
object = Object(object);
|
|
20326
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
20327
|
+
return propertyIsEnumerable$1.call(object, symbol);
|
|
20328
|
+
});
|
|
20329
|
+
};
|
|
20330
|
+
var _getSymbols = getSymbols$1;
|
|
20331
|
+
function baseTimes$1(n, iteratee) {
|
|
20332
|
+
var index = -1, result = Array(n);
|
|
20333
|
+
while (++index < n) {
|
|
20334
|
+
result[index] = iteratee(index);
|
|
20335
|
+
}
|
|
20336
|
+
return result;
|
|
20337
|
+
}
|
|
20338
|
+
var _baseTimes = baseTimes$1;
|
|
20339
|
+
function isObjectLike$4(value) {
|
|
20340
|
+
return value != null && typeof value == "object";
|
|
20341
|
+
}
|
|
20342
|
+
var isObjectLike_1 = isObjectLike$4;
|
|
20343
|
+
var baseGetTag$2 = _baseGetTag, isObjectLike$3 = isObjectLike_1;
|
|
20344
|
+
var argsTag$2 = "[object Arguments]";
|
|
20345
|
+
function baseIsArguments$1(value) {
|
|
20346
|
+
return isObjectLike$3(value) && baseGetTag$2(value) == argsTag$2;
|
|
20347
|
+
}
|
|
20348
|
+
var _baseIsArguments = baseIsArguments$1;
|
|
20349
|
+
var baseIsArguments = _baseIsArguments, isObjectLike$2 = isObjectLike_1;
|
|
20350
|
+
var objectProto$5 = Object.prototype;
|
|
20351
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
20352
|
+
var propertyIsEnumerable2 = objectProto$5.propertyIsEnumerable;
|
|
20353
|
+
var isArguments$1 = baseIsArguments(function() {
|
|
20354
|
+
return arguments;
|
|
20355
|
+
}()) ? baseIsArguments : function(value) {
|
|
20356
|
+
return isObjectLike$2(value) && hasOwnProperty$4.call(value, "callee") && !propertyIsEnumerable2.call(value, "callee");
|
|
20357
|
+
};
|
|
20358
|
+
var isArguments_1 = isArguments$1;
|
|
20359
|
+
var isBuffer$2 = { exports: {} };
|
|
20360
|
+
function stubFalse() {
|
|
20361
|
+
return false;
|
|
20362
|
+
}
|
|
20363
|
+
var stubFalse_1 = stubFalse;
|
|
20364
|
+
(function(module, exports) {
|
|
20365
|
+
var root2 = _root, stubFalse2 = stubFalse_1;
|
|
20366
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
20367
|
+
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
20368
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
20369
|
+
var Buffer2 = moduleExports ? root2.Buffer : void 0;
|
|
20370
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
20371
|
+
var isBuffer2 = nativeIsBuffer || stubFalse2;
|
|
20372
|
+
module.exports = isBuffer2;
|
|
20373
|
+
})(isBuffer$2, isBuffer$2.exports);
|
|
20374
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
20375
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
20376
|
+
function isIndex$1(value, length) {
|
|
20377
|
+
var type = typeof value;
|
|
20378
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
20379
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
20380
|
+
}
|
|
20381
|
+
var _isIndex = isIndex$1;
|
|
20382
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
20383
|
+
function isLength$2(value) {
|
|
20384
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
20385
|
+
}
|
|
20386
|
+
var isLength_1 = isLength$2;
|
|
20387
|
+
var baseGetTag$1 = _baseGetTag, isLength$1 = isLength_1, isObjectLike$1 = isObjectLike_1;
|
|
20388
|
+
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$1 = "[object Map]", numberTag = "[object Number]", objectTag$2 = "[object Object]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", weakMapTag$1 = "[object WeakMap]";
|
|
20389
|
+
var arrayBufferTag = "[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]";
|
|
20390
|
+
var typedArrayTags = {};
|
|
20391
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
20392
|
+
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
|
|
20393
|
+
function baseIsTypedArray$1(value) {
|
|
20394
|
+
return isObjectLike$1(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)];
|
|
20395
|
+
}
|
|
20396
|
+
var _baseIsTypedArray = baseIsTypedArray$1;
|
|
20397
|
+
function baseUnary$1(func) {
|
|
20398
|
+
return function(value) {
|
|
20399
|
+
return func(value);
|
|
20400
|
+
};
|
|
20401
|
+
}
|
|
20402
|
+
var _baseUnary = baseUnary$1;
|
|
20403
|
+
var _nodeUtil = { exports: {} };
|
|
20404
|
+
(function(module, exports) {
|
|
20405
|
+
var freeGlobal2 = _freeGlobal;
|
|
20406
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
20407
|
+
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
20408
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
20409
|
+
var freeProcess = moduleExports && freeGlobal2.process;
|
|
20410
|
+
var nodeUtil2 = function() {
|
|
20411
|
+
try {
|
|
20412
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
20413
|
+
if (types) {
|
|
20414
|
+
return types;
|
|
20415
|
+
}
|
|
20416
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
20417
|
+
} catch (e) {
|
|
20418
|
+
}
|
|
20419
|
+
}();
|
|
20420
|
+
module.exports = nodeUtil2;
|
|
20421
|
+
})(_nodeUtil, _nodeUtil.exports);
|
|
20422
|
+
var baseIsTypedArray = _baseIsTypedArray, baseUnary = _baseUnary, nodeUtil = _nodeUtil.exports;
|
|
20423
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
20424
|
+
var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
20425
|
+
var isTypedArray_1 = isTypedArray$2;
|
|
20426
|
+
var baseTimes = _baseTimes, isArguments = isArguments_1, isArray$1 = isArray_1, isBuffer$1 = isBuffer$2.exports, isIndex = _isIndex, isTypedArray$1 = isTypedArray_1;
|
|
20427
|
+
var objectProto$4 = Object.prototype;
|
|
20428
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
20429
|
+
function arrayLikeKeys$1(value, inherited) {
|
|
20430
|
+
var isArr = isArray$1(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
20431
|
+
for (var key in value) {
|
|
20432
|
+
if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
|
|
20433
|
+
result.push(key);
|
|
20434
|
+
}
|
|
20435
|
+
}
|
|
20436
|
+
return result;
|
|
20437
|
+
}
|
|
20438
|
+
var _arrayLikeKeys = arrayLikeKeys$1;
|
|
20439
|
+
var objectProto$3 = Object.prototype;
|
|
20440
|
+
function isPrototype$1(value) {
|
|
20441
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$3;
|
|
20442
|
+
return value === proto;
|
|
20443
|
+
}
|
|
20444
|
+
var _isPrototype = isPrototype$1;
|
|
20445
|
+
function overArg$1(func, transform) {
|
|
20446
|
+
return function(arg) {
|
|
20447
|
+
return func(transform(arg));
|
|
20448
|
+
};
|
|
20449
|
+
}
|
|
20450
|
+
var _overArg = overArg$1;
|
|
20451
|
+
var overArg = _overArg;
|
|
20452
|
+
var nativeKeys$1 = overArg(Object.keys, Object);
|
|
20453
|
+
var _nativeKeys = nativeKeys$1;
|
|
20454
|
+
var isPrototype = _isPrototype, nativeKeys = _nativeKeys;
|
|
20455
|
+
var objectProto$2 = Object.prototype;
|
|
20456
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
20457
|
+
function baseKeys$1(object) {
|
|
20458
|
+
if (!isPrototype(object)) {
|
|
20459
|
+
return nativeKeys(object);
|
|
20460
|
+
}
|
|
20461
|
+
var result = [];
|
|
20462
|
+
for (var key in Object(object)) {
|
|
20463
|
+
if (hasOwnProperty$2.call(object, key) && key != "constructor") {
|
|
20464
|
+
result.push(key);
|
|
20465
|
+
}
|
|
20466
|
+
}
|
|
20467
|
+
return result;
|
|
20468
|
+
}
|
|
20469
|
+
var _baseKeys = baseKeys$1;
|
|
20470
|
+
var isFunction = isFunction_1, isLength = isLength_1;
|
|
20471
|
+
function isArrayLike$1(value) {
|
|
20472
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
20473
|
+
}
|
|
20474
|
+
var isArrayLike_1 = isArrayLike$1;
|
|
20475
|
+
var arrayLikeKeys = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike = isArrayLike_1;
|
|
20476
|
+
function keys$1(object) {
|
|
20477
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
20478
|
+
}
|
|
20479
|
+
var keys_1 = keys$1;
|
|
20480
|
+
var baseGetAllKeys = _baseGetAllKeys, getSymbols = _getSymbols, keys2 = keys_1;
|
|
20481
|
+
function getAllKeys$1(object) {
|
|
20482
|
+
return baseGetAllKeys(object, keys2, getSymbols);
|
|
20483
|
+
}
|
|
20484
|
+
var _getAllKeys = getAllKeys$1;
|
|
20485
|
+
var getAllKeys = _getAllKeys;
|
|
20486
|
+
var COMPARE_PARTIAL_FLAG$1 = 1;
|
|
20487
|
+
var objectProto$1 = Object.prototype;
|
|
20488
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
20489
|
+
function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
20490
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
20491
|
+
if (objLength != othLength && !isPartial) {
|
|
20492
|
+
return false;
|
|
20493
|
+
}
|
|
20494
|
+
var index = objLength;
|
|
20495
|
+
while (index--) {
|
|
20496
|
+
var key = objProps[index];
|
|
20497
|
+
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
20498
|
+
return false;
|
|
20499
|
+
}
|
|
20500
|
+
}
|
|
20501
|
+
var objStacked = stack.get(object);
|
|
20502
|
+
var othStacked = stack.get(other);
|
|
20503
|
+
if (objStacked && othStacked) {
|
|
20504
|
+
return objStacked == other && othStacked == object;
|
|
20505
|
+
}
|
|
20506
|
+
var result = true;
|
|
20507
|
+
stack.set(object, other);
|
|
20508
|
+
stack.set(other, object);
|
|
20509
|
+
var skipCtor = isPartial;
|
|
20510
|
+
while (++index < objLength) {
|
|
20511
|
+
key = objProps[index];
|
|
20512
|
+
var objValue = object[key], othValue = other[key];
|
|
20513
|
+
if (customizer) {
|
|
20514
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
20515
|
+
}
|
|
20516
|
+
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
20517
|
+
result = false;
|
|
20518
|
+
break;
|
|
20519
|
+
}
|
|
20520
|
+
skipCtor || (skipCtor = key == "constructor");
|
|
20521
|
+
}
|
|
20522
|
+
if (result && !skipCtor) {
|
|
20523
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
20524
|
+
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
20525
|
+
result = false;
|
|
20526
|
+
}
|
|
20527
|
+
}
|
|
20528
|
+
stack["delete"](object);
|
|
20529
|
+
stack["delete"](other);
|
|
20530
|
+
return result;
|
|
20531
|
+
}
|
|
20532
|
+
var _equalObjects = equalObjects$1;
|
|
20533
|
+
var getNative$3 = _getNative, root$3 = _root;
|
|
20534
|
+
var DataView$1 = getNative$3(root$3, "DataView");
|
|
20535
|
+
var _DataView = DataView$1;
|
|
20536
|
+
var getNative$2 = _getNative, root$2 = _root;
|
|
20537
|
+
var Promise$2 = getNative$2(root$2, "Promise");
|
|
20538
|
+
var _Promise = Promise$2;
|
|
20539
|
+
var getNative$1 = _getNative, root$1 = _root;
|
|
20540
|
+
var Set$2 = getNative$1(root$1, "Set");
|
|
20541
|
+
var _Set = Set$2;
|
|
20542
|
+
var getNative = _getNative, root = _root;
|
|
20543
|
+
var WeakMap$2 = getNative(root, "WeakMap");
|
|
20544
|
+
var _WeakMap = WeakMap$2;
|
|
20545
|
+
var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$1 = _Set, WeakMap$1 = _WeakMap, baseGetTag = _baseGetTag, toSource = _toSource;
|
|
20546
|
+
var mapTag = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]";
|
|
20547
|
+
var dataViewTag = "[object DataView]";
|
|
20548
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
|
|
20549
|
+
var getTag$1 = baseGetTag;
|
|
20550
|
+
if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap$1 && getTag$1(new WeakMap$1()) != weakMapTag) {
|
|
20551
|
+
getTag$1 = function(value) {
|
|
20552
|
+
var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
20553
|
+
if (ctorString) {
|
|
20554
|
+
switch (ctorString) {
|
|
20555
|
+
case dataViewCtorString:
|
|
20556
|
+
return dataViewTag;
|
|
20557
|
+
case mapCtorString:
|
|
20558
|
+
return mapTag;
|
|
20559
|
+
case promiseCtorString:
|
|
20560
|
+
return promiseTag;
|
|
20561
|
+
case setCtorString:
|
|
20562
|
+
return setTag;
|
|
20563
|
+
case weakMapCtorString:
|
|
20564
|
+
return weakMapTag;
|
|
20565
|
+
}
|
|
20566
|
+
}
|
|
20567
|
+
return result;
|
|
20568
|
+
};
|
|
20569
|
+
}
|
|
20570
|
+
var _getTag = getTag$1;
|
|
20571
|
+
var Stack = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag = _getTag, isArray2 = isArray_1, isBuffer = isBuffer$2.exports, isTypedArray = isTypedArray_1;
|
|
20572
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
20573
|
+
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
20574
|
+
var objectProto = Object.prototype;
|
|
20575
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
20576
|
+
function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
20577
|
+
var objIsArr = isArray2(object), othIsArr = isArray2(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
20578
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
20579
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
20580
|
+
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
20581
|
+
if (isSameTag && isBuffer(object)) {
|
|
20582
|
+
if (!isBuffer(other)) {
|
|
20583
|
+
return false;
|
|
20584
|
+
}
|
|
20585
|
+
objIsArr = true;
|
|
20586
|
+
objIsObj = false;
|
|
20587
|
+
}
|
|
20588
|
+
if (isSameTag && !objIsObj) {
|
|
20589
|
+
stack || (stack = new Stack());
|
|
20590
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
20591
|
+
}
|
|
20592
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
20593
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
20594
|
+
if (objIsWrapped || othIsWrapped) {
|
|
20595
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
20596
|
+
stack || (stack = new Stack());
|
|
20597
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
20598
|
+
}
|
|
20599
|
+
}
|
|
20600
|
+
if (!isSameTag) {
|
|
20601
|
+
return false;
|
|
20602
|
+
}
|
|
20603
|
+
stack || (stack = new Stack());
|
|
20604
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
20605
|
+
}
|
|
20606
|
+
var _baseIsEqualDeep = baseIsEqualDeep$1;
|
|
20607
|
+
var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike = isObjectLike_1;
|
|
20608
|
+
function baseIsEqual$1(value, other, bitmask, customizer, stack) {
|
|
20609
|
+
if (value === other) {
|
|
20610
|
+
return true;
|
|
20611
|
+
}
|
|
20612
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
20613
|
+
return value !== value && other !== other;
|
|
20614
|
+
}
|
|
20615
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack);
|
|
20616
|
+
}
|
|
20617
|
+
var _baseIsEqual = baseIsEqual$1;
|
|
20618
|
+
var baseIsEqual = _baseIsEqual;
|
|
20619
|
+
function isEqual(value, other) {
|
|
20620
|
+
return baseIsEqual(value, other);
|
|
20621
|
+
}
|
|
20622
|
+
var isEqual_1 = isEqual;
|
|
20623
|
+
class JsonNormalizer extends BaseNormalizer {
|
|
20624
|
+
constructor() {
|
|
20625
|
+
super(...arguments);
|
|
20626
|
+
__privateAdd(this, _iterateNodes2);
|
|
20627
|
+
__privateAdd(this, _iterateChildNodes);
|
|
20628
|
+
__privateAdd(this, _bubbleMarks);
|
|
20629
|
+
__privateAdd(this, _canBubbleMark);
|
|
20630
|
+
__privateAdd(this, _includesMark);
|
|
20631
|
+
__privateAdd(this, _includesMarkType);
|
|
20632
|
+
__privateAdd(this, _removeMark);
|
|
20633
|
+
__privateAdd(this, _addMark);
|
|
20634
|
+
__privateAdd(this, _findMarkIndexByType);
|
|
20635
|
+
}
|
|
20636
|
+
normalize() {
|
|
20637
|
+
__privateMethod(this, _iterateNodes2, iterateNodes_fn2).call(this, __privateMethod(this, _bubbleMarks, bubbleMarks_fn));
|
|
20638
|
+
return this.content;
|
|
20639
|
+
}
|
|
20640
|
+
}
|
|
20641
|
+
_iterateNodes2 = new WeakSet();
|
|
20642
|
+
iterateNodes_fn2 = function(handler) {
|
|
20643
|
+
__privateMethod(this, _iterateChildNodes, iterateChildNodes_fn).call(this, this.content, handler);
|
|
20644
|
+
};
|
|
20645
|
+
_iterateChildNodes = new WeakSet();
|
|
20646
|
+
iterateChildNodes_fn = function(node, handler) {
|
|
20647
|
+
for (const child of node.content) {
|
|
20648
|
+
handler.call(this, child);
|
|
20649
|
+
child.content && __privateMethod(this, _iterateChildNodes, iterateChildNodes_fn).call(this, child, handler);
|
|
20650
|
+
}
|
|
20651
|
+
};
|
|
20652
|
+
_bubbleMarks = new WeakSet();
|
|
20653
|
+
bubbleMarks_fn = function(node) {
|
|
20654
|
+
if (!node.content)
|
|
20655
|
+
return;
|
|
20656
|
+
if (node.type === NodeTypes.LIST)
|
|
20657
|
+
return;
|
|
20658
|
+
for (const child of node.content) {
|
|
20659
|
+
if (!child.marks)
|
|
20660
|
+
continue;
|
|
20661
|
+
for (const childMark of child.marks.slice()) {
|
|
20662
|
+
if (__privateMethod(this, _canBubbleMark, canBubbleMark_fn).call(this, node, childMark)) {
|
|
20663
|
+
__privateMethod(this, _removeMark, removeMark_fn).call(this, child, childMark);
|
|
20664
|
+
__privateMethod(this, _addMark, addMark_fn).call(this, node, childMark);
|
|
20665
|
+
continue;
|
|
20666
|
+
}
|
|
20667
|
+
if (__privateMethod(this, _includesMark, includesMark_fn).call(this, node, childMark)) {
|
|
20668
|
+
__privateMethod(this, _removeMark, removeMark_fn).call(this, child, childMark);
|
|
20669
|
+
}
|
|
20670
|
+
}
|
|
20671
|
+
}
|
|
20672
|
+
};
|
|
20673
|
+
_canBubbleMark = new WeakSet();
|
|
20674
|
+
canBubbleMark_fn = function(node, childMark) {
|
|
20675
|
+
if (TextSettings.inlineMarks.includes(childMark.type))
|
|
20676
|
+
return false;
|
|
20677
|
+
if (__privateMethod(this, _includesMarkType, includesMarkType_fn).call(this, node, childMark.type))
|
|
20678
|
+
return false;
|
|
20679
|
+
for (const child of node.content) {
|
|
20680
|
+
if (!child.marks)
|
|
20681
|
+
return false;
|
|
20682
|
+
if (!__privateMethod(this, _includesMarkType, includesMarkType_fn).call(this, child, childMark.type))
|
|
20683
|
+
return false;
|
|
20684
|
+
}
|
|
20685
|
+
return true;
|
|
20686
|
+
};
|
|
20687
|
+
_includesMark = new WeakSet();
|
|
20688
|
+
includesMark_fn = function(node, checkingMark) {
|
|
20689
|
+
var _a, _b;
|
|
20690
|
+
return (_b = (_a = node.marks) == null ? void 0 : _a.some((mark) => isEqual_1(mark, checkingMark))) != null ? _b : false;
|
|
20691
|
+
};
|
|
20692
|
+
_includesMarkType = new WeakSet();
|
|
20693
|
+
includesMarkType_fn = function(node, type) {
|
|
20694
|
+
var _a, _b;
|
|
20695
|
+
return (_b = (_a = node.marks) == null ? void 0 : _a.some((mark) => mark.type === type)) != null ? _b : false;
|
|
20696
|
+
};
|
|
20697
|
+
_removeMark = new WeakSet();
|
|
20698
|
+
removeMark_fn = function(node, mark) {
|
|
20699
|
+
if (!node.marks)
|
|
20700
|
+
return;
|
|
20701
|
+
const index = __privateMethod(this, _findMarkIndexByType, findMarkIndexByType_fn).call(this, node, mark.type);
|
|
20702
|
+
if (index >= 0)
|
|
20703
|
+
node.marks.splice(index, 1);
|
|
20704
|
+
if (!node.marks.length)
|
|
20705
|
+
delete node.marks;
|
|
20706
|
+
};
|
|
20707
|
+
_addMark = new WeakSet();
|
|
20708
|
+
addMark_fn = function(node, mark) {
|
|
20709
|
+
var _a;
|
|
20710
|
+
__privateMethod(this, _removeMark, removeMark_fn).call(this, node, mark);
|
|
20711
|
+
(_a = node.marks) != null ? _a : node.marks = [];
|
|
20712
|
+
node.marks.push(mark);
|
|
20713
|
+
};
|
|
20714
|
+
_findMarkIndexByType = new WeakSet();
|
|
20715
|
+
findMarkIndexByType_fn = function(node, type) {
|
|
20716
|
+
var _a, _b;
|
|
20717
|
+
return (_b = (_a = node.marks) == null ? void 0 : _a.findIndex((mark) => mark.type === type)) != null ? _b : null;
|
|
20718
|
+
};
|
|
20719
|
+
const _ContentNormalizer = class {
|
|
20720
|
+
static build(content, options = {}) {
|
|
20721
|
+
return typeof content === "string" ? __privateMethod(this, _buildHtml, buildHtml_fn).call(this, content, options) : __privateMethod(this, _buildJson, buildJson_fn).call(this, content);
|
|
20722
|
+
}
|
|
20723
|
+
static normalize(content, options = {}) {
|
|
20724
|
+
return _ContentNormalizer.build(content, options).normalize();
|
|
20725
|
+
}
|
|
20726
|
+
};
|
|
20727
|
+
let ContentNormalizer = _ContentNormalizer;
|
|
20728
|
+
_buildHtml = new WeakSet();
|
|
20729
|
+
buildHtml_fn = function(content, options) {
|
|
20730
|
+
return new HtmlNormalizer({
|
|
20731
|
+
content,
|
|
20732
|
+
parser: options.parser || new BrowserDomParser()
|
|
20733
|
+
});
|
|
20734
|
+
};
|
|
20735
|
+
_buildJson = new WeakSet();
|
|
20736
|
+
buildJson_fn = function(content) {
|
|
20737
|
+
return new JsonNormalizer({ content });
|
|
20738
|
+
};
|
|
20739
|
+
__privateAdd(ContentNormalizer, _buildHtml);
|
|
20740
|
+
__privateAdd(ContentNormalizer, _buildJson);
|
|
20741
|
+
class ContextWindow {
|
|
20742
|
+
static use(window2) {
|
|
20743
|
+
this.window = window2;
|
|
20744
|
+
}
|
|
20745
|
+
static get document() {
|
|
20746
|
+
return this.window.document;
|
|
20747
|
+
}
|
|
20748
|
+
static get body() {
|
|
20749
|
+
return this.document.body;
|
|
20750
|
+
}
|
|
20751
|
+
static get head() {
|
|
20752
|
+
return this.document.head;
|
|
20753
|
+
}
|
|
20754
|
+
static getComputedStyle(element) {
|
|
20755
|
+
return this.window.getComputedStyle(element);
|
|
20756
|
+
}
|
|
20757
|
+
}
|
|
20758
|
+
__publicField(ContextWindow, "window", globalThis.window);
|
|
20759
|
+
class NodeFactory {
|
|
20760
|
+
static doc(content) {
|
|
20761
|
+
return { type: NodeTypes.DOCUMENT, content };
|
|
20762
|
+
}
|
|
20763
|
+
static list(type, items) {
|
|
20764
|
+
return {
|
|
20765
|
+
type: NodeTypes.LIST,
|
|
20766
|
+
attrs: { bullet: { type } },
|
|
20767
|
+
content: items.map((item) => {
|
|
20768
|
+
return item.type === NodeTypes.LIST_ITEM ? item : this.listItem([].concat(item));
|
|
20769
|
+
})
|
|
20770
|
+
};
|
|
20771
|
+
}
|
|
20772
|
+
static listItem(...args) {
|
|
20773
|
+
return { type: NodeTypes.LIST_ITEM, ...__privateMethod(this, _textBlock, textBlock_fn).call(this, args, this.paragraph) };
|
|
20774
|
+
}
|
|
20775
|
+
static heading(level, ...args) {
|
|
20776
|
+
var _a;
|
|
20777
|
+
const config = __privateMethod(this, _textBlock, textBlock_fn).call(this, args, this.text);
|
|
20778
|
+
(_a = config.attrs) != null ? _a : config.attrs = {};
|
|
20779
|
+
config.attrs.level = level;
|
|
20780
|
+
return { type: NodeTypes.HEADING, ...config };
|
|
20781
|
+
}
|
|
20782
|
+
static paragraph(...args) {
|
|
20783
|
+
return {
|
|
20784
|
+
type: NodeTypes.PARAGRAPH,
|
|
20785
|
+
...__privateMethod(this, _textBlock, textBlock_fn).call(this, args, this.text)
|
|
20786
|
+
};
|
|
20787
|
+
}
|
|
20788
|
+
static text(text2, marks) {
|
|
20789
|
+
return {
|
|
20790
|
+
type: NodeTypes.TEXT,
|
|
20791
|
+
...marks ? { marks } : {},
|
|
20792
|
+
text: text2
|
|
20793
|
+
};
|
|
20794
|
+
}
|
|
20795
|
+
static mark(type, attrs) {
|
|
20796
|
+
return { type, attrs };
|
|
20797
|
+
}
|
|
20798
|
+
static populateAllDevices(value) {
|
|
20799
|
+
return { mobile: null, tablet: value, desktop: value };
|
|
20800
|
+
}
|
|
20801
|
+
}
|
|
20802
|
+
_textBlock = new WeakSet();
|
|
20803
|
+
textBlock_fn = function(args, createChildNode) {
|
|
20804
|
+
const { attrs, content, marks } = __privateMethod(this, _normalizeTextBlockArgs, normalizeTextBlockArgs_fn).call(this, args);
|
|
20805
|
+
const children = typeof content === "string" ? [createChildNode.call(this, content)] : content;
|
|
20806
|
+
return {
|
|
20807
|
+
content: children,
|
|
20808
|
+
...attrs ? { attrs } : {},
|
|
20809
|
+
...marks ? { marks } : {}
|
|
20810
|
+
};
|
|
20811
|
+
};
|
|
20812
|
+
_normalizeTextBlockArgs = new WeakSet();
|
|
20813
|
+
normalizeTextBlockArgs_fn = function(args) {
|
|
20814
|
+
if (args.length === 1) {
|
|
20815
|
+
return { attrs: null, marks: null, content: args[0] };
|
|
20816
|
+
}
|
|
20817
|
+
if (args.length === 2) {
|
|
20818
|
+
return { attrs: args[0], marks: null, content: args[1] };
|
|
20819
|
+
}
|
|
20820
|
+
return { attrs: args[0], marks: args[1], content: args[2] };
|
|
20821
|
+
};
|
|
20822
|
+
__privateAdd(NodeFactory, _textBlock);
|
|
20823
|
+
__privateAdd(NodeFactory, _normalizeTextBlockArgs);
|
|
20824
|
+
const dataStorage = /* @__PURE__ */ new WeakMap();
|
|
20825
|
+
function toggleListener(toEnable, onClick) {
|
|
20826
|
+
const args = ["click", onClick, { capture: true }];
|
|
20827
|
+
const action = toEnable ? "addEventListener" : "removeEventListener";
|
|
20828
|
+
if (ContextWindow.window !== window) {
|
|
20829
|
+
window.document[action](...args);
|
|
20830
|
+
}
|
|
20831
|
+
ContextWindow.document[action](...args);
|
|
19815
20832
|
}
|
|
19816
20833
|
const outClick = {
|
|
19817
20834
|
bind(el, { value }) {
|
|
@@ -20144,14 +21161,7 @@ var render$v = function __render__14() {
|
|
|
20144
21161
|
}
|
|
20145
21162
|
}, [_c("span", {
|
|
20146
21163
|
staticClass: "zw-dropdown__activator-title zw-text--truncate"
|
|
20147
|
-
}, [_vm._v(" " + _vm._s(_vm.activeOptionTitle) + " ")]),
|
|
20148
|
-
staticClass: "zw-dropdown__customized-indicator",
|
|
20149
|
-
attrs: {
|
|
20150
|
-
"name": "indicator",
|
|
20151
|
-
"size": "9px",
|
|
20152
|
-
"data-test-selector": "customizedIndicator"
|
|
20153
|
-
}
|
|
20154
|
-
}) : _vm._e(), _c("Icon", {
|
|
21164
|
+
}, [_vm._v(" " + _vm._s(_vm.activeOptionTitle) + " ")]), _c("Icon", {
|
|
20155
21165
|
staticClass: "zw-dropdown__activator-arrow",
|
|
20156
21166
|
attrs: {
|
|
20157
21167
|
"name": "arrow",
|
|
@@ -20180,11 +21190,6 @@ const __vue2_script$v = {
|
|
|
20180
21190
|
type: String,
|
|
20181
21191
|
required: false,
|
|
20182
21192
|
default: "none"
|
|
20183
|
-
},
|
|
20184
|
-
isCustomized: {
|
|
20185
|
-
type: Boolean,
|
|
20186
|
-
required: false,
|
|
20187
|
-
default: false
|
|
20188
21193
|
}
|
|
20189
21194
|
},
|
|
20190
21195
|
setup(props) {
|
|
@@ -20211,7 +21216,7 @@ var __component__$v = /* @__PURE__ */ normalizeComponent(
|
|
|
20211
21216
|
staticRenderFns$v,
|
|
20212
21217
|
false,
|
|
20213
21218
|
__vue2_injectStyles$v,
|
|
20214
|
-
"
|
|
21219
|
+
"021ac370",
|
|
20215
21220
|
null,
|
|
20216
21221
|
null
|
|
20217
21222
|
);
|
|
@@ -20475,8 +21480,7 @@ var render$q = function __render__19() {
|
|
|
20475
21480
|
staticClass: "zw-dropdown"
|
|
20476
21481
|
}, [_c("DropdownActivator", {
|
|
20477
21482
|
attrs: {
|
|
20478
|
-
"color": _vm.color
|
|
20479
|
-
"is-customized": _vm.isCustomized
|
|
21483
|
+
"color": _vm.color
|
|
20480
21484
|
},
|
|
20481
21485
|
scopedSlots: _vm._u([{
|
|
20482
21486
|
key: "default",
|
|
@@ -20534,11 +21538,6 @@ const __vue2_script$q = {
|
|
|
20534
21538
|
type: String,
|
|
20535
21539
|
required: false,
|
|
20536
21540
|
default: "none"
|
|
20537
|
-
},
|
|
20538
|
-
isCustomized: {
|
|
20539
|
-
type: Boolean,
|
|
20540
|
-
required: false,
|
|
20541
|
-
default: false
|
|
20542
21541
|
}
|
|
20543
21542
|
},
|
|
20544
21543
|
setup(props, { emit }) {
|
|
@@ -20570,7 +21569,7 @@ var __component__$q = /* @__PURE__ */ normalizeComponent(
|
|
|
20570
21569
|
staticRenderFns$q,
|
|
20571
21570
|
false,
|
|
20572
21571
|
__vue2_injectStyles$q,
|
|
20573
|
-
"
|
|
21572
|
+
"885109ea",
|
|
20574
21573
|
null,
|
|
20575
21574
|
null
|
|
20576
21575
|
);
|
|
@@ -20833,7 +21832,7 @@ const __vue2_script$o = {
|
|
|
20833
21832
|
}));
|
|
20834
21833
|
});
|
|
20835
21834
|
const apply2 = (value) => {
|
|
20836
|
-
editor.chain().focus().applyPreset(value).storeSelection().expandSelectionToBlock().
|
|
21835
|
+
editor.chain().focus().applyPreset(value).storeSelection().expandSelectionToBlock().removeMarks(CLEAR_MARKS).restoreSelection().run();
|
|
20837
21836
|
};
|
|
20838
21837
|
const removeCustomization = () => editor.chain().focus().removePresetCustomization().run();
|
|
20839
21838
|
return {
|
|
@@ -20852,7 +21851,7 @@ var __component__$o = /* @__PURE__ */ normalizeComponent(
|
|
|
20852
21851
|
staticRenderFns$o,
|
|
20853
21852
|
false,
|
|
20854
21853
|
__vue2_injectStyles$o,
|
|
20855
|
-
"
|
|
21854
|
+
"5983cfee",
|
|
20856
21855
|
null,
|
|
20857
21856
|
null
|
|
20858
21857
|
);
|
|
@@ -20889,8 +21888,7 @@ var render$n = function __render__22() {
|
|
|
20889
21888
|
staticClass: "zw-font-family-control",
|
|
20890
21889
|
attrs: {
|
|
20891
21890
|
"options": _vm.options,
|
|
20892
|
-
"value": _vm.currentValue
|
|
20893
|
-
"is-customized": _vm.isCustomized
|
|
21891
|
+
"value": _vm.currentValue
|
|
20894
21892
|
},
|
|
20895
21893
|
on: {
|
|
20896
21894
|
"change": _vm.apply
|
|
@@ -20951,7 +21949,6 @@ const __vue2_script$n = {
|
|
|
20951
21949
|
return { "--zw-font-family-option": `"${option.id}"` };
|
|
20952
21950
|
}
|
|
20953
21951
|
const currentValue = editor.commands.getFontFamily();
|
|
20954
|
-
const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_FAMILY);
|
|
20955
21952
|
const apply2 = (fontFamily) => {
|
|
20956
21953
|
recentFontNames.add(fontFamily);
|
|
20957
21954
|
editor.chain().focus().applyFontFamily(fontFamily).run();
|
|
@@ -20959,7 +21956,6 @@ const __vue2_script$n = {
|
|
|
20959
21956
|
return {
|
|
20960
21957
|
options,
|
|
20961
21958
|
currentValue,
|
|
20962
|
-
isCustomized,
|
|
20963
21959
|
renderOptionStyles,
|
|
20964
21960
|
apply: apply2
|
|
20965
21961
|
};
|
|
@@ -20972,7 +21968,7 @@ var __component__$n = /* @__PURE__ */ normalizeComponent(
|
|
|
20972
21968
|
staticRenderFns$n,
|
|
20973
21969
|
false,
|
|
20974
21970
|
__vue2_injectStyles$n,
|
|
20975
|
-
"
|
|
21971
|
+
"07a47462",
|
|
20976
21972
|
null,
|
|
20977
21973
|
null
|
|
20978
21974
|
);
|
|
@@ -20998,11 +21994,9 @@ var render$m = function __render__23() {
|
|
|
20998
21994
|
},
|
|
20999
21995
|
expression: "{ text: 'Font Weight', hotkey: 'Mod B' }"
|
|
21000
21996
|
}],
|
|
21001
|
-
staticClass: "zw-font-weight-control",
|
|
21002
21997
|
attrs: {
|
|
21003
21998
|
"options": _vm.options,
|
|
21004
|
-
"value": _vm.currentValue
|
|
21005
|
-
"is-customized": _vm.isCustomized
|
|
21999
|
+
"value": _vm.currentValue
|
|
21006
22000
|
},
|
|
21007
22001
|
on: {
|
|
21008
22002
|
"change": _vm.apply
|
|
@@ -21010,7 +22004,6 @@ var render$m = function __render__23() {
|
|
|
21010
22004
|
});
|
|
21011
22005
|
};
|
|
21012
22006
|
var staticRenderFns$m = [];
|
|
21013
|
-
const FontWeightControl_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
21014
22007
|
const __vue2_script$m = {
|
|
21015
22008
|
name: "FontWeightControl",
|
|
21016
22009
|
components: {
|
|
@@ -21024,12 +22017,10 @@ const __vue2_script$m = {
|
|
|
21024
22017
|
const font = editor.commands.getFont();
|
|
21025
22018
|
const options = computed(() => unref(font).weights.map((style2) => ({ id: style2 })));
|
|
21026
22019
|
const currentValue = editor.commands.getFontWeight();
|
|
21027
|
-
const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_WEIGHT);
|
|
21028
22020
|
const apply2 = (value) => editor.chain().focus().applyFontWeight(value).run();
|
|
21029
22021
|
return {
|
|
21030
22022
|
options,
|
|
21031
22023
|
currentValue,
|
|
21032
|
-
isCustomized,
|
|
21033
22024
|
apply: apply2
|
|
21034
22025
|
};
|
|
21035
22026
|
}
|
|
@@ -21041,7 +22032,7 @@ var __component__$m = /* @__PURE__ */ normalizeComponent(
|
|
|
21041
22032
|
staticRenderFns$m,
|
|
21042
22033
|
false,
|
|
21043
22034
|
__vue2_injectStyles$m,
|
|
21044
|
-
|
|
22035
|
+
null,
|
|
21045
22036
|
null,
|
|
21046
22037
|
null
|
|
21047
22038
|
);
|
|
@@ -21070,8 +22061,7 @@ var render$l = function __render__24() {
|
|
|
21070
22061
|
staticClass: "zw-font-size-control",
|
|
21071
22062
|
attrs: {
|
|
21072
22063
|
"options": _vm.options,
|
|
21073
|
-
"value": _vm.currentValue
|
|
21074
|
-
"is-customized": _vm.isCustomized
|
|
22064
|
+
"value": _vm.currentValue
|
|
21075
22065
|
},
|
|
21076
22066
|
on: {
|
|
21077
22067
|
"change": _vm.apply
|
|
@@ -21095,12 +22085,10 @@ const __vue2_script$l = {
|
|
|
21095
22085
|
return fontSizes.map((size2) => ({ id: size2, title: `${size2}px` }));
|
|
21096
22086
|
});
|
|
21097
22087
|
const currentValue = editor.commands.getFontSize();
|
|
21098
|
-
const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_SIZE);
|
|
21099
22088
|
const apply2 = (value) => editor.chain().focus().applyFontSize(value).run();
|
|
21100
22089
|
return {
|
|
21101
22090
|
options,
|
|
21102
22091
|
currentValue,
|
|
21103
|
-
isCustomized,
|
|
21104
22092
|
apply: apply2
|
|
21105
22093
|
};
|
|
21106
22094
|
}
|
|
@@ -21112,7 +22100,7 @@ var __component__$l = /* @__PURE__ */ normalizeComponent(
|
|
|
21112
22100
|
staticRenderFns$l,
|
|
21113
22101
|
false,
|
|
21114
22102
|
__vue2_injectStyles$l,
|
|
21115
|
-
"
|
|
22103
|
+
"71dd7ffc",
|
|
21116
22104
|
null,
|
|
21117
22105
|
null
|
|
21118
22106
|
);
|
|
@@ -21146,7 +22134,6 @@ var render$k = function __render__25() {
|
|
|
21146
22134
|
value: "Font Color",
|
|
21147
22135
|
expression: "'Font Color'"
|
|
21148
22136
|
}],
|
|
21149
|
-
staticClass: "zw-position--relative",
|
|
21150
22137
|
attrs: {
|
|
21151
22138
|
"icon": "",
|
|
21152
22139
|
"skin": "toolbar",
|
|
@@ -21161,14 +22148,7 @@ var render$k = function __render__25() {
|
|
|
21161
22148
|
"size": "28px",
|
|
21162
22149
|
"auto-color": ""
|
|
21163
22150
|
}
|
|
21164
|
-
}),
|
|
21165
|
-
staticClass: "zw-button__customized-indicator",
|
|
21166
|
-
attrs: {
|
|
21167
|
-
"name": "indicator",
|
|
21168
|
-
"size": "9px",
|
|
21169
|
-
"data-test-selector": "customizedIndicator"
|
|
21170
|
-
}
|
|
21171
|
-
}) : _vm._e()], 1)];
|
|
22151
|
+
})], 1)];
|
|
21172
22152
|
}
|
|
21173
22153
|
}])
|
|
21174
22154
|
});
|
|
@@ -21187,11 +22167,9 @@ const __vue2_script$k = {
|
|
|
21187
22167
|
setup() {
|
|
21188
22168
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
21189
22169
|
const currentValue = editor.commands.getFontColor();
|
|
21190
|
-
const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_COLOR);
|
|
21191
22170
|
const apply2 = (color) => editor.chain().applyFontColor(color).run();
|
|
21192
22171
|
return {
|
|
21193
22172
|
currentValue,
|
|
21194
|
-
isCustomized,
|
|
21195
22173
|
apply: apply2
|
|
21196
22174
|
};
|
|
21197
22175
|
}
|
|
@@ -21310,7 +22288,6 @@ var render$i = function __render__27() {
|
|
|
21310
22288
|
},
|
|
21311
22289
|
expression: "{ text: 'Italic', hotkey: 'Mod I' }"
|
|
21312
22290
|
}],
|
|
21313
|
-
staticClass: "zw-position--relative",
|
|
21314
22291
|
attrs: {
|
|
21315
22292
|
"skin": "toolbar",
|
|
21316
22293
|
"icon": "",
|
|
@@ -21326,14 +22303,7 @@ var render$i = function __render__27() {
|
|
|
21326
22303
|
"size": "28px",
|
|
21327
22304
|
"auto-color": ""
|
|
21328
22305
|
}
|
|
21329
|
-
}),
|
|
21330
|
-
staticClass: "zw-button__customized-indicator",
|
|
21331
|
-
attrs: {
|
|
21332
|
-
"name": "indicator",
|
|
21333
|
-
"size": "9px",
|
|
21334
|
-
"data-test-selector": "customizedIndicator"
|
|
21335
|
-
}
|
|
21336
|
-
}) : _vm._e()], 1);
|
|
22306
|
+
})], 1);
|
|
21337
22307
|
};
|
|
21338
22308
|
var staticRenderFns$i = [];
|
|
21339
22309
|
const __vue2_script$i = {
|
|
@@ -21348,13 +22318,11 @@ const __vue2_script$i = {
|
|
|
21348
22318
|
setup() {
|
|
21349
22319
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
21350
22320
|
const currentValue = editor.commands.isItalic();
|
|
21351
|
-
const isCustomized = editor.commands.isSettingCustomized("marks", TextSettings.FONT_STYLE);
|
|
21352
22321
|
const isAvailable = editor.commands.isItalicAvailable();
|
|
21353
22322
|
const apply2 = () => editor.chain().focus().toggleItalic().run();
|
|
21354
22323
|
return {
|
|
21355
22324
|
isAvailable,
|
|
21356
22325
|
currentValue,
|
|
21357
|
-
isCustomized,
|
|
21358
22326
|
apply: apply2
|
|
21359
22327
|
};
|
|
21360
22328
|
}
|
|
@@ -21392,7 +22360,6 @@ var render$h = function __render__28() {
|
|
|
21392
22360
|
},
|
|
21393
22361
|
expression: "{ text: 'Underline', hotkey: 'Mod U' }"
|
|
21394
22362
|
}],
|
|
21395
|
-
staticClass: "zw-position--relative",
|
|
21396
22363
|
attrs: {
|
|
21397
22364
|
"skin": "toolbar",
|
|
21398
22365
|
"icon": "",
|
|
@@ -21407,14 +22374,7 @@ var render$h = function __render__28() {
|
|
|
21407
22374
|
"size": "28px",
|
|
21408
22375
|
"auto-color": ""
|
|
21409
22376
|
}
|
|
21410
|
-
}),
|
|
21411
|
-
staticClass: "zw-button__customized-indicator",
|
|
21412
|
-
attrs: {
|
|
21413
|
-
"name": "indicator",
|
|
21414
|
-
"size": "9px",
|
|
21415
|
-
"data-test-selector": "customizedIndicator"
|
|
21416
|
-
}
|
|
21417
|
-
}) : _vm._e()], 1);
|
|
22377
|
+
})], 1);
|
|
21418
22378
|
};
|
|
21419
22379
|
var staticRenderFns$h = [];
|
|
21420
22380
|
const __vue2_script$h = {
|
|
@@ -21429,11 +22389,9 @@ const __vue2_script$h = {
|
|
|
21429
22389
|
setup() {
|
|
21430
22390
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
21431
22391
|
const currentValue = editor.commands.isUnderline();
|
|
21432
|
-
const isCustomized = editor.commands.isUnderlineCustomized();
|
|
21433
22392
|
const apply2 = () => editor.chain().focus().toggleUnderline().run();
|
|
21434
22393
|
return {
|
|
21435
22394
|
currentValue,
|
|
21436
|
-
isCustomized,
|
|
21437
22395
|
apply: apply2
|
|
21438
22396
|
};
|
|
21439
22397
|
}
|
|
@@ -21562,7 +22520,7 @@ const __vue2_script$f = {
|
|
|
21562
22520
|
},
|
|
21563
22521
|
setup() {
|
|
21564
22522
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
21565
|
-
const currentValue =
|
|
22523
|
+
const currentValue = editor.commands.isSuperscript();
|
|
21566
22524
|
const apply2 = () => editor.chain().focus().toggleSuperscript().run();
|
|
21567
22525
|
return {
|
|
21568
22526
|
currentValue,
|
|
@@ -21694,7 +22652,6 @@ var render$d = function __render__32() {
|
|
|
21694
22652
|
value: option.tooltip,
|
|
21695
22653
|
expression: "option.tooltip"
|
|
21696
22654
|
}],
|
|
21697
|
-
staticClass: "zw-position--relative",
|
|
21698
22655
|
attrs: {
|
|
21699
22656
|
"icon": "",
|
|
21700
22657
|
"skin": "toolbar",
|
|
@@ -21703,14 +22660,7 @@ var render$d = function __render__32() {
|
|
|
21703
22660
|
on: {
|
|
21704
22661
|
"click": activate
|
|
21705
22662
|
}
|
|
21706
|
-
}, [
|
|
21707
|
-
staticClass: "zw-button__customized-indicator",
|
|
21708
|
-
attrs: {
|
|
21709
|
-
"name": "indicator",
|
|
21710
|
-
"size": "9px",
|
|
21711
|
-
"data-test-selector": "customizedIndicator"
|
|
21712
|
-
}
|
|
21713
|
-
}) : _vm._e(), _c("Icon", {
|
|
22663
|
+
}, [_c("Icon", {
|
|
21714
22664
|
attrs: {
|
|
21715
22665
|
"name": "alignment-".concat(option.id),
|
|
21716
22666
|
"size": "28px",
|
|
@@ -21753,14 +22703,12 @@ const __vue2_script$d = {
|
|
|
21753
22703
|
setup(_, { emit }) {
|
|
21754
22704
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
21755
22705
|
const currentValue = editor.commands.getAlignment();
|
|
21756
|
-
const isCustomized = editor.commands.isSettingCustomized("attributes", TextSettings.ALIGNMENT);
|
|
21757
22706
|
function apply2(value) {
|
|
21758
22707
|
editor.chain().focus().applyAlignment(value).run();
|
|
21759
22708
|
emit("applied");
|
|
21760
22709
|
}
|
|
21761
22710
|
return {
|
|
21762
22711
|
currentValue,
|
|
21763
|
-
isCustomized,
|
|
21764
22712
|
apply: apply2
|
|
21765
22713
|
};
|
|
21766
22714
|
}
|
|
@@ -21886,7 +22834,6 @@ var render$b = function __render__34() {
|
|
|
21886
22834
|
value: "Line Height",
|
|
21887
22835
|
expression: "'Line Height'"
|
|
21888
22836
|
}],
|
|
21889
|
-
staticClass: "zw-position--relative",
|
|
21890
22837
|
attrs: {
|
|
21891
22838
|
"icon": "",
|
|
21892
22839
|
"skin": "toolbar",
|
|
@@ -21901,14 +22848,7 @@ var render$b = function __render__34() {
|
|
|
21901
22848
|
"size": "28px",
|
|
21902
22849
|
"auto-color": ""
|
|
21903
22850
|
}
|
|
21904
|
-
}),
|
|
21905
|
-
staticClass: "zw-button__customized-indicator",
|
|
21906
|
-
attrs: {
|
|
21907
|
-
"name": "indicator",
|
|
21908
|
-
"size": "9px",
|
|
21909
|
-
"data-test-selector": "customizedIndicator"
|
|
21910
|
-
}
|
|
21911
|
-
}) : _vm._e()], 1), _c("Modal", {
|
|
22851
|
+
})], 1), _c("Modal", {
|
|
21912
22852
|
ref: "modalRef",
|
|
21913
22853
|
staticClass: "zw-line-height-control__modal",
|
|
21914
22854
|
attrs: {
|
|
@@ -21967,13 +22907,11 @@ const __vue2_script$b = {
|
|
|
21967
22907
|
const editor = inject(InjectionTokens$1.EDITOR);
|
|
21968
22908
|
const toggler = useModalToggler({ wrapperRef, modalRef });
|
|
21969
22909
|
const currentValue = editor.commands.getLineHeight();
|
|
21970
|
-
const isCustomized = editor.commands.isSettingCustomized("attributes", TextSettings.LINE_HEIGHT);
|
|
21971
22910
|
const apply2 = (value) => editor.commands.applyLineHeight(String(value));
|
|
21972
22911
|
return {
|
|
21973
22912
|
wrapperRef,
|
|
21974
22913
|
modalRef,
|
|
21975
22914
|
isOpened: toggler.isOpened,
|
|
21976
|
-
isCustomized,
|
|
21977
22915
|
toggler,
|
|
21978
22916
|
currentValue,
|
|
21979
22917
|
apply: apply2
|
|
@@ -21987,7 +22925,7 @@ var __component__$b = /* @__PURE__ */ normalizeComponent(
|
|
|
21987
22925
|
staticRenderFns$b,
|
|
21988
22926
|
false,
|
|
21989
22927
|
__vue2_injectStyles$b,
|
|
21990
|
-
"
|
|
22928
|
+
"9ea28b80",
|
|
21991
22929
|
null,
|
|
21992
22930
|
null
|
|
21993
22931
|
);
|
|
@@ -23037,6 +23975,7 @@ function useToolbar({ wrapperRef, offsets, isActiveRef, placementRef }) {
|
|
|
23037
23975
|
}
|
|
23038
23976
|
const FontFamily = Mark.create({
|
|
23039
23977
|
name: TextSettings.FONT_FAMILY,
|
|
23978
|
+
group: "settings",
|
|
23040
23979
|
addOptions: () => ({
|
|
23041
23980
|
fonts: []
|
|
23042
23981
|
}),
|
|
@@ -23046,7 +23985,7 @@ const FontFamily = Mark.create({
|
|
|
23046
23985
|
addCommands() {
|
|
23047
23986
|
return {
|
|
23048
23987
|
applyFontFamily: createCommand(({ commands: commands2 }, value) => {
|
|
23049
|
-
commands2.
|
|
23988
|
+
commands2.applyMark(this.name, { value });
|
|
23050
23989
|
const font = commands2.findFontByName(value);
|
|
23051
23990
|
let fontWeight = unref(commands2.getFontWeight());
|
|
23052
23991
|
if (!font.isWeightSupported(fontWeight)) {
|
|
@@ -23067,12 +24006,8 @@ const FontFamily = Mark.create({
|
|
|
23067
24006
|
findFontByName: createCommand((_, name) => {
|
|
23068
24007
|
return this.options.fonts.find((font) => font.name === name);
|
|
23069
24008
|
}),
|
|
23070
|
-
getFontFamily: createCommand(({
|
|
23071
|
-
|
|
23072
|
-
return computed(() => {
|
|
23073
|
-
var _a, _b;
|
|
23074
|
-
return (_b = (_a = editor.getAttributes(this.name)) == null ? void 0 : _a.value) != null ? _b : unref(defaultValue);
|
|
23075
|
-
});
|
|
24009
|
+
getFontFamily: createCommand(({ commands: commands2 }) => {
|
|
24010
|
+
return commands2.getCommonSettingMark(this.name, commands2.getDefaultFontFamily());
|
|
23076
24011
|
}),
|
|
23077
24012
|
getDefaultFontFamily: createCommand(({ commands: commands2 }) => {
|
|
23078
24013
|
const preset = commands2.getPreset();
|
|
@@ -23103,84 +24038,12 @@ const FontFamily = Mark.create({
|
|
|
23103
24038
|
return renderMark({ font_family });
|
|
23104
24039
|
}
|
|
23105
24040
|
});
|
|
23106
|
-
const Heading = Node.create({
|
|
23107
|
-
name: "heading",
|
|
23108
|
-
addOptions() {
|
|
23109
|
-
return {
|
|
23110
|
-
levels: [1, 2, 3, 4, 5, 6],
|
|
23111
|
-
HTMLAttributes: {}
|
|
23112
|
-
};
|
|
23113
|
-
},
|
|
23114
|
-
content: "inline*",
|
|
23115
|
-
group: "block",
|
|
23116
|
-
defining: true,
|
|
23117
|
-
addAttributes() {
|
|
23118
|
-
return {
|
|
23119
|
-
level: {
|
|
23120
|
-
default: 1,
|
|
23121
|
-
rendered: false
|
|
23122
|
-
}
|
|
23123
|
-
};
|
|
23124
|
-
},
|
|
23125
|
-
parseHTML() {
|
|
23126
|
-
return this.options.levels.map((level) => ({
|
|
23127
|
-
tag: `h${level}`,
|
|
23128
|
-
attrs: { level }
|
|
23129
|
-
}));
|
|
23130
|
-
},
|
|
23131
|
-
renderHTML({ node, HTMLAttributes }) {
|
|
23132
|
-
const hasLevel = this.options.levels.includes(node.attrs.level);
|
|
23133
|
-
const level = hasLevel ? node.attrs.level : this.options.levels[0];
|
|
23134
|
-
return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
23135
|
-
},
|
|
23136
|
-
addCommands() {
|
|
23137
|
-
return {
|
|
23138
|
-
setHeading: (attributes) => ({ commands: commands2 }) => {
|
|
23139
|
-
if (!this.options.levels.includes(attributes.level)) {
|
|
23140
|
-
return false;
|
|
23141
|
-
}
|
|
23142
|
-
return commands2.setNode(this.name, attributes);
|
|
23143
|
-
},
|
|
23144
|
-
toggleHeading: (attributes) => ({ commands: commands2 }) => {
|
|
23145
|
-
if (!this.options.levels.includes(attributes.level)) {
|
|
23146
|
-
return false;
|
|
23147
|
-
}
|
|
23148
|
-
return commands2.toggleNode(this.name, "paragraph", attributes);
|
|
23149
|
-
}
|
|
23150
|
-
};
|
|
23151
|
-
},
|
|
23152
|
-
addKeyboardShortcuts() {
|
|
23153
|
-
return this.options.levels.reduce((items, level) => ({
|
|
23154
|
-
...items,
|
|
23155
|
-
...{
|
|
23156
|
-
[`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level })
|
|
23157
|
-
}
|
|
23158
|
-
}), {});
|
|
23159
|
-
},
|
|
23160
|
-
addInputRules() {
|
|
23161
|
-
return this.options.levels.map((level) => {
|
|
23162
|
-
return textblockTypeInputRule({
|
|
23163
|
-
find: new RegExp(`^(#{1,${level}})\\s$`),
|
|
23164
|
-
type: this.type,
|
|
23165
|
-
getAttributes: {
|
|
23166
|
-
level
|
|
23167
|
-
}
|
|
23168
|
-
});
|
|
23169
|
-
});
|
|
23170
|
-
}
|
|
23171
|
-
});
|
|
23172
24041
|
function makePresetClass(base2, preset) {
|
|
23173
24042
|
const baseClass = base2.split(" ").map((part) => `.${part}`).join("");
|
|
23174
24043
|
return baseClass + preset.id;
|
|
23175
24044
|
}
|
|
23176
24045
|
const StylePreset = Extension.create({
|
|
23177
24046
|
name: "style_preset",
|
|
23178
|
-
addExtensions: () => [
|
|
23179
|
-
Heading.configure({
|
|
23180
|
-
levels: [1, 2, 3, 4],
|
|
23181
|
-
HTMLAttributes: { class: "zw-style" }
|
|
23182
|
-
})
|
|
23183
|
-
],
|
|
23184
24047
|
addStorage: () => ({
|
|
23185
24048
|
presetStyleEl: null
|
|
23186
24049
|
}),
|
|
@@ -23301,15 +24164,8 @@ const StylePreset = Extension.create({
|
|
|
23301
24164
|
};
|
|
23302
24165
|
});
|
|
23303
24166
|
}),
|
|
23304
|
-
isSettingCustomized: createCommand(({ commands: commands2 }, group, name) => {
|
|
23305
|
-
const customization = commands2.getPresetCustomization();
|
|
23306
|
-
return computed(() => {
|
|
23307
|
-
var _a, _b;
|
|
23308
|
-
return (_b = (_a = unref(customization)[group]) == null ? void 0 : _a.includes(name)) != null ? _b : false;
|
|
23309
|
-
});
|
|
23310
|
-
}),
|
|
23311
24167
|
removePresetCustomization: createCommand(({ chain }) => {
|
|
23312
|
-
chain().storeSelection().expandSelectionToBlock().
|
|
24168
|
+
chain().storeSelection().expandSelectionToBlock().removeMarks(TextSettings.marks).resetAttributes(NodeTypes.PARAGRAPH, TextSettings.attributes).resetAttributes(NodeTypes.HEADING, TextSettings.attributes).restoreSelection().run();
|
|
23313
24169
|
}),
|
|
23314
24170
|
removeFormat: createCommand(({ chain }) => {
|
|
23315
24171
|
chain().storeSelection().expandSelectionToBlock().unsetAllMarks().applyDefaultPreset().restoreSelection().run();
|
|
@@ -23343,13 +24199,14 @@ const StylePreset = Extension.create({
|
|
|
23343
24199
|
});
|
|
23344
24200
|
const FontWeight = Mark.create({
|
|
23345
24201
|
name: TextSettings.FONT_WEIGHT,
|
|
24202
|
+
group: "settings",
|
|
23346
24203
|
addAttributes: () => ({
|
|
23347
24204
|
value: { required: true }
|
|
23348
24205
|
}),
|
|
23349
24206
|
addCommands() {
|
|
23350
24207
|
return {
|
|
23351
24208
|
applyFontWeight: createCommand(({ commands: commands2 }, value) => {
|
|
23352
|
-
commands2.
|
|
24209
|
+
commands2.applyMark(this.name, { value });
|
|
23353
24210
|
const font = unref(commands2.getFont());
|
|
23354
24211
|
if (!font.isItalicSupported(value)) {
|
|
23355
24212
|
commands2.removeItalic();
|
|
@@ -23363,17 +24220,13 @@ const FontWeight = Mark.create({
|
|
|
23363
24220
|
const nextWeight = currentFont.findClosestWeight(wantedWeight);
|
|
23364
24221
|
commands2.applyFontWeight(nextWeight);
|
|
23365
24222
|
}),
|
|
23366
|
-
getFontWeight: createCommand(({
|
|
23367
|
-
const
|
|
24223
|
+
getFontWeight: createCommand(({ commands: commands2 }) => {
|
|
24224
|
+
const selectionRef = commands2.getCommonSettingMark(this.name, commands2.getDefaultFontWeight());
|
|
23368
24225
|
const fontRef = commands2.getFont();
|
|
23369
24226
|
return computed(() => {
|
|
23370
|
-
|
|
23371
|
-
const weight = (_b = (_a = editor.getAttributes(this.name)) == null ? void 0 : _a.value) != null ? _b : unref(defaultValue);
|
|
24227
|
+
const weight = unref(selectionRef);
|
|
23372
24228
|
const font = unref(fontRef);
|
|
23373
|
-
|
|
23374
|
-
return weight;
|
|
23375
|
-
}
|
|
23376
|
-
return font.findClosestWeight(weight);
|
|
24229
|
+
return font.isWeightSupported(weight) ? weight : font.findClosestWeight(weight);
|
|
23377
24230
|
});
|
|
23378
24231
|
}),
|
|
23379
24232
|
getDefaultFontWeight: createCommand(({ commands: commands2 }) => {
|
|
@@ -23417,6 +24270,7 @@ const FontWeight = Mark.create({
|
|
|
23417
24270
|
});
|
|
23418
24271
|
const FontSize = Mark.create({
|
|
23419
24272
|
name: TextSettings.FONT_SIZE,
|
|
24273
|
+
group: "settings",
|
|
23420
24274
|
addOptions: () => ({
|
|
23421
24275
|
minSize: 1,
|
|
23422
24276
|
maxSize: 100
|
|
@@ -23430,13 +24284,8 @@ const FontSize = Mark.create({
|
|
|
23430
24284
|
},
|
|
23431
24285
|
addCommands() {
|
|
23432
24286
|
return {
|
|
23433
|
-
getFontSize: createCommand(({
|
|
23434
|
-
|
|
23435
|
-
const defaultValue = commands2.getDefaultFontSize();
|
|
23436
|
-
return computed(() => {
|
|
23437
|
-
var _a, _b;
|
|
23438
|
-
return (_b = (_a = editor.getAttributes(this.name)) == null ? void 0 : _a[unref(device)]) != null ? _b : unref(defaultValue);
|
|
23439
|
-
});
|
|
24287
|
+
getFontSize: createCommand(({ commands: commands2 }) => {
|
|
24288
|
+
return commands2.getDeviceSettingMark(this.name, commands2.getDefaultFontSize());
|
|
23440
24289
|
}),
|
|
23441
24290
|
getDefaultFontSize: createCommand(({ commands: commands2 }) => {
|
|
23442
24291
|
const device = commands2.getDevice();
|
|
@@ -23444,7 +24293,7 @@ const FontSize = Mark.create({
|
|
|
23444
24293
|
return computed(() => unref(preset)[unref(device)].font_size.replace("px", ""));
|
|
23445
24294
|
}),
|
|
23446
24295
|
applyFontSize: createCommand(({ commands: commands2 }, value) => {
|
|
23447
|
-
commands2.
|
|
24296
|
+
commands2.applyMark(this.name, { desktop: value, tablet: value, mobile: null });
|
|
23448
24297
|
}),
|
|
23449
24298
|
increaseFontSize: createCommand(({ commands: commands2 }) => {
|
|
23450
24299
|
const size2 = Number(unref(commands2.getFontSize()));
|
|
@@ -23499,24 +24348,21 @@ const FontSize = Mark.create({
|
|
|
23499
24348
|
});
|
|
23500
24349
|
const FontColor = Mark.create({
|
|
23501
24350
|
name: TextSettings.FONT_COLOR,
|
|
24351
|
+
group: "settings",
|
|
23502
24352
|
addAttributes: () => ({
|
|
23503
24353
|
value: { required: true }
|
|
23504
24354
|
}),
|
|
23505
24355
|
addCommands() {
|
|
23506
24356
|
return {
|
|
23507
|
-
getFontColor: createCommand(({ commands: commands2
|
|
23508
|
-
|
|
23509
|
-
return computed(() => {
|
|
23510
|
-
var _a, _b;
|
|
23511
|
-
return (_b = (_a = editor.getAttributes(this.name)) == null ? void 0 : _a.value) != null ? _b : unref(defaultValue);
|
|
23512
|
-
});
|
|
24357
|
+
getFontColor: createCommand(({ commands: commands2 }) => {
|
|
24358
|
+
return commands2.getCommonSettingMark(this.name, commands2.getDefaultFontColor());
|
|
23513
24359
|
}),
|
|
23514
24360
|
getDefaultFontColor: createCommand(({ commands: commands2 }) => {
|
|
23515
24361
|
const preset = commands2.getPreset();
|
|
23516
24362
|
return computed(() => unref(preset).common.color);
|
|
23517
24363
|
}),
|
|
23518
24364
|
applyFontColor: createCommand(({ commands: commands2 }, value) => {
|
|
23519
|
-
commands2.
|
|
24365
|
+
commands2.applyMark(this.name, { value });
|
|
23520
24366
|
})
|
|
23521
24367
|
};
|
|
23522
24368
|
},
|
|
@@ -23539,19 +24385,17 @@ const FontColor = Mark.create({
|
|
|
23539
24385
|
});
|
|
23540
24386
|
const BackgroundColor = Mark.create({
|
|
23541
24387
|
name: TextSettings.BACKGROUND_COLOR,
|
|
24388
|
+
group: "settings",
|
|
23542
24389
|
addAttributes: () => ({
|
|
23543
24390
|
value: { required: true }
|
|
23544
24391
|
}),
|
|
23545
|
-
addCommands() {
|
|
23546
|
-
return {
|
|
23547
|
-
getBackgroundColor: createCommand(({
|
|
23548
|
-
return
|
|
23549
|
-
var _a, _b;
|
|
23550
|
-
return (_b = (_a = editor.getAttributes(this.name)) == null ? void 0 : _a.value) != null ? _b : "rgba(255, 255, 255, 0%)";
|
|
23551
|
-
});
|
|
24392
|
+
addCommands() {
|
|
24393
|
+
return {
|
|
24394
|
+
getBackgroundColor: createCommand(({ commands: commands2 }) => {
|
|
24395
|
+
return commands2.getCommonSettingMark(this.name, "rgba(255, 255, 255, 0%)");
|
|
23552
24396
|
}),
|
|
23553
24397
|
applyBackgroundColor: createCommand(({ commands: commands2 }, value) => {
|
|
23554
|
-
commands2.
|
|
24398
|
+
commands2.applyMark(this.name, { value });
|
|
23555
24399
|
})
|
|
23556
24400
|
};
|
|
23557
24401
|
},
|
|
@@ -23582,16 +24426,18 @@ const DeviceManager = Extension.create({
|
|
|
23582
24426
|
});
|
|
23583
24427
|
const FontStyle = Mark.create({
|
|
23584
24428
|
name: TextSettings.FONT_STYLE,
|
|
24429
|
+
group: "settings",
|
|
23585
24430
|
addAttributes: () => ({
|
|
23586
24431
|
italic: { required: true }
|
|
23587
24432
|
}),
|
|
23588
24433
|
addCommands() {
|
|
23589
24434
|
return {
|
|
23590
|
-
isItalic: createCommand(({
|
|
23591
|
-
const
|
|
24435
|
+
isItalic: createCommand(({ commands: commands2 }) => {
|
|
24436
|
+
const selectionRef = commands2.getMark(this.name);
|
|
24437
|
+
const defaultValueRef = commands2.getDefaultFontStyle();
|
|
23592
24438
|
return computed(() => {
|
|
23593
24439
|
var _a, _b;
|
|
23594
|
-
return (_b = (_a =
|
|
24440
|
+
return (_b = (_a = unref(selectionRef)) == null ? void 0 : _a.italic) != null ? _b : unref(defaultValueRef).italic;
|
|
23595
24441
|
});
|
|
23596
24442
|
}),
|
|
23597
24443
|
isItalicAvailable: createCommand(({ commands: commands2 }) => {
|
|
@@ -23606,16 +24452,16 @@ const FontStyle = Mark.create({
|
|
|
23606
24452
|
}));
|
|
23607
24453
|
}),
|
|
23608
24454
|
toggleItalic: createCommand(({ commands: commands2 }) => {
|
|
23609
|
-
const isItalicAvailable = unref(
|
|
24455
|
+
const isItalicAvailable = unref(commands2.isItalicAvailable());
|
|
23610
24456
|
if (!isItalicAvailable)
|
|
23611
24457
|
return;
|
|
23612
24458
|
unref(commands2.isItalic()) ? commands2.removeItalic() : commands2.applyItalic();
|
|
23613
24459
|
}),
|
|
23614
24460
|
applyItalic: createCommand(({ commands: commands2 }) => {
|
|
23615
|
-
commands2.
|
|
24461
|
+
commands2.applyMark(this.name, { italic: true });
|
|
23616
24462
|
}),
|
|
23617
24463
|
removeItalic: createCommand(({ commands: commands2 }) => {
|
|
23618
|
-
commands2.
|
|
24464
|
+
commands2.applyMark(this.name, { italic: false });
|
|
23619
24465
|
})
|
|
23620
24466
|
};
|
|
23621
24467
|
},
|
|
@@ -23624,8 +24470,12 @@ const FontStyle = Mark.create({
|
|
|
23624
24470
|
"Mod-I": createKeyboardShortcut("toggleItalic")
|
|
23625
24471
|
}),
|
|
23626
24472
|
parseHTML() {
|
|
23627
|
-
const getAttrs = (value) => value.includes("italic")
|
|
24473
|
+
const getAttrs = (value) => ({ italic: value.includes("italic") });
|
|
23628
24474
|
return [
|
|
24475
|
+
{
|
|
24476
|
+
tag: "i",
|
|
24477
|
+
attrs: { italic: true }
|
|
24478
|
+
},
|
|
23629
24479
|
{
|
|
23630
24480
|
style: "--zw-font-style",
|
|
23631
24481
|
getAttrs
|
|
@@ -23633,10 +24483,6 @@ const FontStyle = Mark.create({
|
|
|
23633
24483
|
{
|
|
23634
24484
|
style: "font-style",
|
|
23635
24485
|
getAttrs
|
|
23636
|
-
},
|
|
23637
|
-
{
|
|
23638
|
-
tag: "i",
|
|
23639
|
-
attrs: { italic: true }
|
|
23640
24486
|
}
|
|
23641
24487
|
];
|
|
23642
24488
|
},
|
|
@@ -23662,29 +24508,26 @@ const TextDecoration = Mark.create({
|
|
|
23662
24508
|
const decoration = commands2.getTextDecoration();
|
|
23663
24509
|
return computed(() => unref(decoration).strike_through);
|
|
23664
24510
|
}),
|
|
23665
|
-
getTextDecoration: createCommand(({
|
|
23666
|
-
const
|
|
24511
|
+
getTextDecoration: createCommand(({ commands: commands2 }) => {
|
|
24512
|
+
const selectionRef = commands2.getMark(this.name);
|
|
24513
|
+
const defaultValueRef = commands2.getDefaultTextDecoration();
|
|
23667
24514
|
return computed(() => {
|
|
23668
|
-
var _a
|
|
23669
|
-
const attrs = (_a =
|
|
24515
|
+
var _a;
|
|
24516
|
+
const attrs = (_a = unref(selectionRef)) != null ? _a : {};
|
|
24517
|
+
const defaultValue = unref(defaultValueRef);
|
|
23670
24518
|
return {
|
|
23671
|
-
underline:
|
|
23672
|
-
strike_through:
|
|
24519
|
+
underline: attrs.underline || defaultValue.underline,
|
|
24520
|
+
strike_through: attrs.strike_through || defaultValue.strike_through
|
|
23673
24521
|
};
|
|
23674
24522
|
});
|
|
23675
24523
|
}),
|
|
23676
|
-
isUnderlineCustomized: createCommand(({ commands: commands2 }) => {
|
|
23677
|
-
const currentValue = commands2.isUnderline();
|
|
23678
|
-
const defaultValue = commands2.getDefaultTextDecoration();
|
|
23679
|
-
return computed(() => unref(currentValue) !== unref(defaultValue).underline);
|
|
23680
|
-
}),
|
|
23681
24524
|
getDefaultTextDecoration: createCommand(({ commands: commands2 }) => {
|
|
23682
24525
|
const preset = commands2.getPreset();
|
|
23683
24526
|
return computed(() => {
|
|
23684
|
-
const
|
|
24527
|
+
const { text_decoration } = unref(preset).common;
|
|
23685
24528
|
return {
|
|
23686
|
-
underline:
|
|
23687
|
-
strike_through:
|
|
24529
|
+
underline: text_decoration.includes("underline"),
|
|
24530
|
+
strike_through: text_decoration.includes("line-through")
|
|
23688
24531
|
};
|
|
23689
24532
|
});
|
|
23690
24533
|
}),
|
|
@@ -23694,15 +24537,16 @@ const TextDecoration = Mark.create({
|
|
|
23694
24537
|
toggleStrikeThrough: createCommand(({ commands: commands2 }) => {
|
|
23695
24538
|
commands2.toggleTextDecoration("strike_through");
|
|
23696
24539
|
}),
|
|
23697
|
-
toggleTextDecoration: createCommand(({ commands: commands2 }, name) => {
|
|
23698
|
-
const
|
|
23699
|
-
isEnabled ?
|
|
24540
|
+
toggleTextDecoration: createCommand(({ commands: commands2 }, name, toEnable = null) => {
|
|
24541
|
+
const value = unref(commands2.getTextDecoration());
|
|
24542
|
+
const isEnabled = toEnable != null ? toEnable : !value[name];
|
|
24543
|
+
commands2.applyMark(this.name, { [name]: isEnabled });
|
|
23700
24544
|
}),
|
|
23701
24545
|
applyTextDecoration: createCommand(({ commands: commands2 }, name) => {
|
|
23702
|
-
commands2.
|
|
24546
|
+
commands2.toggleTextDecoration(name, true);
|
|
23703
24547
|
}),
|
|
23704
24548
|
removeTextDecoration: createCommand(({ commands: commands2 }, name) => {
|
|
23705
|
-
commands2.
|
|
24549
|
+
commands2.toggleTextDecoration(name, false);
|
|
23706
24550
|
})
|
|
23707
24551
|
};
|
|
23708
24552
|
},
|
|
@@ -23944,6 +24788,10 @@ const ListItem$1 = Node.create({
|
|
|
23944
24788
|
});
|
|
23945
24789
|
const ListItem = ListItem$1.extend({
|
|
23946
24790
|
name: NodeTypes.LIST_ITEM,
|
|
24791
|
+
marks: "settings",
|
|
24792
|
+
addOptions: () => ({
|
|
24793
|
+
HTMLAttributes: { class: "zw-style" }
|
|
24794
|
+
}),
|
|
23947
24795
|
addKeyboardShortcuts() {
|
|
23948
24796
|
const { Enter } = this.parent();
|
|
23949
24797
|
return { Enter };
|
|
@@ -23953,6 +24801,7 @@ const List = Node.create({
|
|
|
23953
24801
|
name: NodeTypes.LIST,
|
|
23954
24802
|
content: `${NodeTypes.LIST_ITEM}+`,
|
|
23955
24803
|
group: "block list",
|
|
24804
|
+
marks: "settings",
|
|
23956
24805
|
addExtensions: () => [
|
|
23957
24806
|
ListItem
|
|
23958
24807
|
],
|
|
@@ -25060,7 +25909,7 @@ const Link = Link$1.extend({
|
|
|
25060
25909
|
NodeFactory.mark(TextSettings.LINK, attributes)
|
|
25061
25910
|
]));
|
|
25062
25911
|
}
|
|
25063
|
-
return chain().
|
|
25912
|
+
return chain().applyMark(this.name, attributes).transformText(() => attributes.text).extendMarkRange(TextSettings.LINK).run();
|
|
25064
25913
|
}),
|
|
25065
25914
|
isLink: createCommand(({ editor }) => computed(() => editor.isActive(TextSettings.LINK))),
|
|
25066
25915
|
getLinkPreset: createCommand(() => computed(() => this.options.preset))
|
|
@@ -25124,44 +25973,22 @@ const Superscript$1 = Mark.create({
|
|
|
25124
25973
|
}
|
|
25125
25974
|
});
|
|
25126
25975
|
const Superscript = Superscript$1.extend({
|
|
25976
|
+
name: TextSettings.SUPERSCRIPT,
|
|
25127
25977
|
addKeyboardShortcuts: null,
|
|
25128
25978
|
addOptions: () => ({
|
|
25129
25979
|
HTMLAttributes: { class: "zw-superscript" }
|
|
25130
|
-
})
|
|
25131
|
-
});
|
|
25132
|
-
const Document = Node.create({
|
|
25133
|
-
name: "doc",
|
|
25134
|
-
topNode: true,
|
|
25135
|
-
content: "block+"
|
|
25136
|
-
});
|
|
25137
|
-
const Paragraph = Node.create({
|
|
25138
|
-
name: "paragraph",
|
|
25139
|
-
priority: 1e3,
|
|
25140
|
-
addOptions() {
|
|
25141
|
-
return {
|
|
25142
|
-
HTMLAttributes: {}
|
|
25143
|
-
};
|
|
25144
|
-
},
|
|
25145
|
-
group: "block",
|
|
25146
|
-
content: "inline*",
|
|
25147
|
-
parseHTML() {
|
|
25148
|
-
return [
|
|
25149
|
-
{ tag: "p" }
|
|
25150
|
-
];
|
|
25151
|
-
},
|
|
25152
|
-
renderHTML({ HTMLAttributes }) {
|
|
25153
|
-
return ["p", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
25154
|
-
},
|
|
25980
|
+
}),
|
|
25155
25981
|
addCommands() {
|
|
25156
25982
|
return {
|
|
25157
|
-
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25163
|
-
|
|
25164
|
-
|
|
25983
|
+
...this.parent(),
|
|
25984
|
+
toggleSuperscript: createCommand(({ commands: commands2 }) => {
|
|
25985
|
+
const isActive2 = unref(commands2.isSuperscript());
|
|
25986
|
+
isActive2 ? commands2.unsetSuperscript() : commands2.setSuperscript();
|
|
25987
|
+
}),
|
|
25988
|
+
isSuperscript: createCommand(({ commands: commands2 }) => {
|
|
25989
|
+
const selectionRef = commands2.getMark(this.name);
|
|
25990
|
+
return computed(() => !!unref(selectionRef));
|
|
25991
|
+
})
|
|
25165
25992
|
};
|
|
25166
25993
|
}
|
|
25167
25994
|
});
|
|
@@ -25775,18 +26602,140 @@ const History = Extension.create({
|
|
|
25775
26602
|
};
|
|
25776
26603
|
}
|
|
25777
26604
|
});
|
|
26605
|
+
class RemoveNodeMarkStep extends Step {
|
|
26606
|
+
static fromJSON(schema, json) {
|
|
26607
|
+
if (typeof json.pos != "number") {
|
|
26608
|
+
throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
|
|
26609
|
+
}
|
|
26610
|
+
return new RemoveNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
|
|
26611
|
+
}
|
|
26612
|
+
constructor(pos, mark) {
|
|
26613
|
+
super();
|
|
26614
|
+
this.pos = pos;
|
|
26615
|
+
this.mark = mark;
|
|
26616
|
+
}
|
|
26617
|
+
apply(doc2) {
|
|
26618
|
+
const node = doc2.nodeAt(this.pos);
|
|
26619
|
+
if (!node)
|
|
26620
|
+
return StepResult.fail("No node at mark step's position");
|
|
26621
|
+
const updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
|
|
26622
|
+
const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
|
|
26623
|
+
return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
|
|
26624
|
+
}
|
|
26625
|
+
invert(doc2) {
|
|
26626
|
+
const node = doc2.nodeAt(this.pos);
|
|
26627
|
+
if (!node || !this.mark.isInSet(node.marks))
|
|
26628
|
+
return this;
|
|
26629
|
+
return new AddNodeMarkStep(this.pos, this.mark);
|
|
26630
|
+
}
|
|
26631
|
+
map(mapping) {
|
|
26632
|
+
const pos = mapping.mapResult(this.pos, 1);
|
|
26633
|
+
return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark);
|
|
26634
|
+
}
|
|
26635
|
+
toJSON() {
|
|
26636
|
+
return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
26637
|
+
}
|
|
26638
|
+
}
|
|
26639
|
+
Step.jsonID("removeNodeMark", RemoveNodeMarkStep);
|
|
26640
|
+
class AddNodeMarkStep extends Step {
|
|
26641
|
+
static fromJSON(schema, json) {
|
|
26642
|
+
if (typeof json.pos != "number") {
|
|
26643
|
+
throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
|
|
26644
|
+
}
|
|
26645
|
+
return new AddNodeMarkStep(json.pos, schema.markFromJSON(json.mark));
|
|
26646
|
+
}
|
|
26647
|
+
constructor(pos, mark) {
|
|
26648
|
+
super();
|
|
26649
|
+
this.pos = pos;
|
|
26650
|
+
this.mark = mark;
|
|
26651
|
+
}
|
|
26652
|
+
apply(doc2) {
|
|
26653
|
+
const node = doc2.nodeAt(this.pos);
|
|
26654
|
+
if (!node)
|
|
26655
|
+
return StepResult.fail("No node at mark step's position");
|
|
26656
|
+
const updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
|
|
26657
|
+
const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
|
|
26658
|
+
return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
|
|
26659
|
+
}
|
|
26660
|
+
invert(doc2) {
|
|
26661
|
+
const node = doc2.nodeAt(this.pos);
|
|
26662
|
+
if (node) {
|
|
26663
|
+
const newSet = this.mark.addToSet(node.marks);
|
|
26664
|
+
if (newSet.length === node.marks.length) {
|
|
26665
|
+
for (const mark of node.marks) {
|
|
26666
|
+
if (!mark.isInSet(newSet)) {
|
|
26667
|
+
return new AddNodeMarkStep(this.pos, mark);
|
|
26668
|
+
}
|
|
26669
|
+
}
|
|
26670
|
+
return new AddNodeMarkStep(this.pos, this.mark);
|
|
26671
|
+
}
|
|
26672
|
+
}
|
|
26673
|
+
return new RemoveNodeMarkStep(this.pos, this.mark);
|
|
26674
|
+
}
|
|
26675
|
+
map(mapping) {
|
|
26676
|
+
const pos = mapping.mapResult(this.pos, 1);
|
|
26677
|
+
return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark);
|
|
26678
|
+
}
|
|
26679
|
+
toJSON() {
|
|
26680
|
+
return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
26681
|
+
}
|
|
26682
|
+
}
|
|
26683
|
+
Step.jsonID("addNodeMark", AddNodeMarkStep);
|
|
26684
|
+
class AttrStep extends Step {
|
|
26685
|
+
static fromJSON(schema, json) {
|
|
26686
|
+
if (typeof json.pos != "number" || typeof json.attr != "string") {
|
|
26687
|
+
throw new RangeError("Invalid input for AttrStep.fromJSON");
|
|
26688
|
+
}
|
|
26689
|
+
return new AttrStep(json.pos, json.attr, json.value);
|
|
26690
|
+
}
|
|
26691
|
+
constructor(pos, attr, value) {
|
|
26692
|
+
super();
|
|
26693
|
+
this.pos = pos;
|
|
26694
|
+
this.attr = attr;
|
|
26695
|
+
this.value = value;
|
|
26696
|
+
}
|
|
26697
|
+
apply(doc2) {
|
|
26698
|
+
const node = doc2.nodeAt(this.pos);
|
|
26699
|
+
if (!node)
|
|
26700
|
+
return StepResult.fail("No node at attribute step's position");
|
|
26701
|
+
const attrs = /* @__PURE__ */ Object.create(null);
|
|
26702
|
+
for (let name in node.attrs)
|
|
26703
|
+
attrs[name] = node.attrs[name];
|
|
26704
|
+
attrs[this.attr] = this.value;
|
|
26705
|
+
const updated = node.type.create(attrs, null, node.marks);
|
|
26706
|
+
const slice2 = new Slice(Fragment.from(updated), 0, node.isLeaf ? 0 : 1);
|
|
26707
|
+
return StepResult.fromReplace(doc2, this.pos, this.pos + 1, slice2);
|
|
26708
|
+
}
|
|
26709
|
+
getMap() {
|
|
26710
|
+
return StepMap.empty;
|
|
26711
|
+
}
|
|
26712
|
+
invert(doc2) {
|
|
26713
|
+
return new AttrStep(this.pos, this.attr, doc2.nodeAt(this.pos).attrs[this.attr]);
|
|
26714
|
+
}
|
|
26715
|
+
map(mapping) {
|
|
26716
|
+
let pos = mapping.mapResult(this.pos, 1);
|
|
26717
|
+
return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value);
|
|
26718
|
+
}
|
|
26719
|
+
toJSON() {
|
|
26720
|
+
return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
|
|
26721
|
+
}
|
|
26722
|
+
}
|
|
26723
|
+
Step.jsonID("attr", AttrStep);
|
|
25778
26724
|
const NodeProcessor = Extension.create({
|
|
25779
26725
|
name: "node_processor",
|
|
25780
26726
|
addCommands() {
|
|
25781
26727
|
return {
|
|
25782
|
-
setBlockAttributes: createCommand(({ commands: commands2 }, name, attrs, defaults2 = {}) => {
|
|
26728
|
+
setBlockAttributes: createCommand(({ commands: commands2, state }, name, attrs, defaults2 = {}) => {
|
|
25783
26729
|
var _a;
|
|
25784
26730
|
const current = (_a = unref(commands2.getBlockAttributes(name))) != null ? _a : {};
|
|
25785
|
-
|
|
25786
|
-
|
|
25787
|
-
|
|
25788
|
-
|
|
25789
|
-
|
|
26731
|
+
const { doc: doc2, tr } = state;
|
|
26732
|
+
const { selection } = tr;
|
|
26733
|
+
const { from: from2, to } = selection;
|
|
26734
|
+
doc2.nodesBetween(from2, to, (node, position) => {
|
|
26735
|
+
if (!NodeTypes.blocks.includes(node.type.name))
|
|
26736
|
+
return;
|
|
26737
|
+
tr.step(new AttrStep(position, name, { ...defaults2, ...current, ...attrs }));
|
|
26738
|
+
});
|
|
25790
26739
|
}),
|
|
25791
26740
|
getBlockAttributes: createCommand(({ editor }, name, defaults2) => computed(() => {
|
|
25792
26741
|
var _a;
|
|
@@ -25795,7 +26744,87 @@ const NodeProcessor = Extension.create({
|
|
|
25795
26744
|
Object.assign(attrs, ((_a = editor.getAttributes(type)) == null ? void 0 : _a[name]) || {});
|
|
25796
26745
|
}
|
|
25797
26746
|
return Object.keys(attrs).length ? attrs : null;
|
|
25798
|
-
}))
|
|
26747
|
+
})),
|
|
26748
|
+
applyMark: createCommand(({ state, commands: commands2 }, name, value) => {
|
|
26749
|
+
const { tr, doc: doc2, schema } = state;
|
|
26750
|
+
const { $from, $to } = tr.selection;
|
|
26751
|
+
const markType = getMarkType(name, schema);
|
|
26752
|
+
const markGroup = markType.spec.group || "";
|
|
26753
|
+
if (!markGroup.includes("settings")) {
|
|
26754
|
+
return commands2.setMark(name, value);
|
|
26755
|
+
}
|
|
26756
|
+
if ($from.pos === $to.pos)
|
|
26757
|
+
return;
|
|
26758
|
+
doc2.nodesBetween($from.pos, $to.pos, (node, position) => {
|
|
26759
|
+
if (node.type.name === NodeTypes.LIST)
|
|
26760
|
+
return;
|
|
26761
|
+
const initialMark = findMarkByType(node.marks, name);
|
|
26762
|
+
const applyingMark = markType.create({ ...(initialMark == null ? void 0 : initialMark.attrs) || {}, ...value });
|
|
26763
|
+
const textPosition = resolveTextPosition($from, $to, node, position);
|
|
26764
|
+
if (isMarkAppliedToParent(tr, position, applyingMark)) {
|
|
26765
|
+
tr.removeMark(textPosition.from, textPosition.to, applyingMark.type);
|
|
26766
|
+
return;
|
|
26767
|
+
}
|
|
26768
|
+
if (node.isText) {
|
|
26769
|
+
tr.addMark(textPosition.from, textPosition.to, applyingMark);
|
|
26770
|
+
return;
|
|
26771
|
+
}
|
|
26772
|
+
if (isNodeFullySelected($from, $to, node, position)) {
|
|
26773
|
+
tr.step(new AddNodeMarkStep(position, applyingMark));
|
|
26774
|
+
}
|
|
26775
|
+
});
|
|
26776
|
+
}),
|
|
26777
|
+
getMarks: createCommand(({ editor }, name) => {
|
|
26778
|
+
const stateRef = toRef(editor, "state");
|
|
26779
|
+
return computed(() => {
|
|
26780
|
+
const { selection, doc: doc2 } = unref(stateRef);
|
|
26781
|
+
const { from: from2, to } = unref(selection);
|
|
26782
|
+
const marks = [];
|
|
26783
|
+
doc2.nodesBetween(from2, to, (node) => {
|
|
26784
|
+
for (const mark of node.marks) {
|
|
26785
|
+
if (mark.type.name === name)
|
|
26786
|
+
marks.unshift(mark.attrs);
|
|
26787
|
+
}
|
|
26788
|
+
});
|
|
26789
|
+
return marks;
|
|
26790
|
+
});
|
|
26791
|
+
}),
|
|
26792
|
+
getMark: createCommand(({ commands: commands2 }, name) => {
|
|
26793
|
+
const marksRef = commands2.getMarks(name);
|
|
26794
|
+
return computed(() => {
|
|
26795
|
+
var _a;
|
|
26796
|
+
return (_a = unref(marksRef)[0]) != null ? _a : null;
|
|
26797
|
+
});
|
|
26798
|
+
}),
|
|
26799
|
+
getCommonSettingMark: createCommand(({ commands: commands2 }, name, defaultRef) => {
|
|
26800
|
+
const selectionRef = commands2.getMark(name);
|
|
26801
|
+
return computed(() => {
|
|
26802
|
+
var _a, _b;
|
|
26803
|
+
return (_b = (_a = unref(selectionRef)) == null ? void 0 : _a.value) != null ? _b : unref(defaultRef);
|
|
26804
|
+
});
|
|
26805
|
+
}),
|
|
26806
|
+
getDeviceSettingMark: createCommand(({ commands: commands2 }, name, defaultRef) => {
|
|
26807
|
+
const selectionRef = commands2.getMark(name);
|
|
26808
|
+
const deviceRef = commands2.getDevice();
|
|
26809
|
+
return computed(() => {
|
|
26810
|
+
var _a, _b;
|
|
26811
|
+
return (_b = (_a = unref(selectionRef)) == null ? void 0 : _a[unref(deviceRef)]) != null ? _b : unref(defaultRef);
|
|
26812
|
+
});
|
|
26813
|
+
}),
|
|
26814
|
+
removeMarks: createCommand(({ state }, marks) => {
|
|
26815
|
+
const { tr, selection, doc: doc2 } = state;
|
|
26816
|
+
const { $from, $to } = selection;
|
|
26817
|
+
if ($from.pos === $to.pos)
|
|
26818
|
+
return;
|
|
26819
|
+
doc2.nodesBetween($from.pos, $to.pos, (node, position) => {
|
|
26820
|
+
const textPosition = resolveTextPosition($from, $to, node, position);
|
|
26821
|
+
const removeMark2 = (mark) => node.isText ? tr.removeMark(textPosition.from, textPosition.to, mark) : tr.step(new RemoveNodeMarkStep(position, mark));
|
|
26822
|
+
for (const mark of node.marks) {
|
|
26823
|
+
if (marks.includes(mark.type.name))
|
|
26824
|
+
removeMark2(mark);
|
|
26825
|
+
}
|
|
26826
|
+
});
|
|
26827
|
+
})
|
|
25799
26828
|
};
|
|
25800
26829
|
}
|
|
25801
26830
|
});
|
|
@@ -25807,26 +26836,21 @@ const TextProcessor = Extension.create({
|
|
|
25807
26836
|
const { from: from2, to } = state.selection;
|
|
25808
26837
|
return state.doc.textBetween(from2, to, " ");
|
|
25809
26838
|
}),
|
|
25810
|
-
unsetMarks: createCommand(({ commands: commands2 }, marks) => {
|
|
25811
|
-
marks.forEach((mark) => commands2.unsetMark(mark));
|
|
25812
|
-
}),
|
|
25813
26839
|
transformText: createCommand(({ state }, transform) => {
|
|
25814
|
-
const {
|
|
25815
|
-
if (
|
|
26840
|
+
const { $from, $to } = state.tr.selection;
|
|
26841
|
+
if ($from.pos === $to.pos)
|
|
25816
26842
|
return;
|
|
25817
|
-
state.doc.nodesBetween(
|
|
26843
|
+
state.doc.nodesBetween($from.pos, $to.pos, (node, position) => {
|
|
25818
26844
|
if (!node.isText)
|
|
25819
26845
|
return;
|
|
25820
|
-
const
|
|
25821
|
-
const
|
|
25822
|
-
const
|
|
25823
|
-
const substringTo = Math.max(0, selection.to - position);
|
|
26846
|
+
const textPosition = resolveTextPosition($from, $to, node, position);
|
|
26847
|
+
const substringFrom = Math.max(0, $from.pos - position);
|
|
26848
|
+
const substringTo = Math.max(0, $to.pos - position);
|
|
25824
26849
|
const updatedText = transform({
|
|
25825
|
-
text: node.textContent.substring(substringFrom, substringTo)
|
|
25826
|
-
position: { start: startPosition, end: endPosition }
|
|
26850
|
+
text: node.textContent.substring(substringFrom, substringTo)
|
|
25827
26851
|
});
|
|
25828
26852
|
const updatedNode = state.schema.text(updatedText, node.marks);
|
|
25829
|
-
state.tr.replaceWith(
|
|
26853
|
+
state.tr.replaceWith(textPosition.from, textPosition.to, updatedNode);
|
|
25830
26854
|
});
|
|
25831
26855
|
})
|
|
25832
26856
|
};
|
|
@@ -25935,15 +26959,132 @@ const CopyPasteProcessor = Extension.create({
|
|
|
25935
26959
|
return [PastePlugin.create()];
|
|
25936
26960
|
}
|
|
25937
26961
|
});
|
|
26962
|
+
const Document$1 = Node.create({
|
|
26963
|
+
name: "doc",
|
|
26964
|
+
topNode: true,
|
|
26965
|
+
content: "block+"
|
|
26966
|
+
});
|
|
26967
|
+
const Document = Document$1.extend({
|
|
26968
|
+
marks: "settings"
|
|
26969
|
+
});
|
|
26970
|
+
const Paragraph$1 = Node.create({
|
|
26971
|
+
name: "paragraph",
|
|
26972
|
+
priority: 1e3,
|
|
26973
|
+
addOptions() {
|
|
26974
|
+
return {
|
|
26975
|
+
HTMLAttributes: {}
|
|
26976
|
+
};
|
|
26977
|
+
},
|
|
26978
|
+
group: "block",
|
|
26979
|
+
content: "inline*",
|
|
26980
|
+
parseHTML() {
|
|
26981
|
+
return [
|
|
26982
|
+
{ tag: "p" }
|
|
26983
|
+
];
|
|
26984
|
+
},
|
|
26985
|
+
renderHTML({ HTMLAttributes }) {
|
|
26986
|
+
return ["p", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
26987
|
+
},
|
|
26988
|
+
addCommands() {
|
|
26989
|
+
return {
|
|
26990
|
+
setParagraph: () => ({ commands: commands2 }) => {
|
|
26991
|
+
return commands2.setNode(this.name);
|
|
26992
|
+
}
|
|
26993
|
+
};
|
|
26994
|
+
},
|
|
26995
|
+
addKeyboardShortcuts() {
|
|
26996
|
+
return {
|
|
26997
|
+
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
26998
|
+
};
|
|
26999
|
+
}
|
|
27000
|
+
});
|
|
27001
|
+
const Paragraph = Paragraph$1.extend({
|
|
27002
|
+
marks: "_",
|
|
27003
|
+
addOptions: () => ({
|
|
27004
|
+
HTMLAttributes: { class: "zw-style" }
|
|
27005
|
+
})
|
|
27006
|
+
});
|
|
27007
|
+
const Heading$1 = Node.create({
|
|
27008
|
+
name: "heading",
|
|
27009
|
+
addOptions() {
|
|
27010
|
+
return {
|
|
27011
|
+
levels: [1, 2, 3, 4, 5, 6],
|
|
27012
|
+
HTMLAttributes: {}
|
|
27013
|
+
};
|
|
27014
|
+
},
|
|
27015
|
+
content: "inline*",
|
|
27016
|
+
group: "block",
|
|
27017
|
+
defining: true,
|
|
27018
|
+
addAttributes() {
|
|
27019
|
+
return {
|
|
27020
|
+
level: {
|
|
27021
|
+
default: 1,
|
|
27022
|
+
rendered: false
|
|
27023
|
+
}
|
|
27024
|
+
};
|
|
27025
|
+
},
|
|
27026
|
+
parseHTML() {
|
|
27027
|
+
return this.options.levels.map((level) => ({
|
|
27028
|
+
tag: `h${level}`,
|
|
27029
|
+
attrs: { level }
|
|
27030
|
+
}));
|
|
27031
|
+
},
|
|
27032
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
27033
|
+
const hasLevel = this.options.levels.includes(node.attrs.level);
|
|
27034
|
+
const level = hasLevel ? node.attrs.level : this.options.levels[0];
|
|
27035
|
+
return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
27036
|
+
},
|
|
27037
|
+
addCommands() {
|
|
27038
|
+
return {
|
|
27039
|
+
setHeading: (attributes) => ({ commands: commands2 }) => {
|
|
27040
|
+
if (!this.options.levels.includes(attributes.level)) {
|
|
27041
|
+
return false;
|
|
27042
|
+
}
|
|
27043
|
+
return commands2.setNode(this.name, attributes);
|
|
27044
|
+
},
|
|
27045
|
+
toggleHeading: (attributes) => ({ commands: commands2 }) => {
|
|
27046
|
+
if (!this.options.levels.includes(attributes.level)) {
|
|
27047
|
+
return false;
|
|
27048
|
+
}
|
|
27049
|
+
return commands2.toggleNode(this.name, "paragraph", attributes);
|
|
27050
|
+
}
|
|
27051
|
+
};
|
|
27052
|
+
},
|
|
27053
|
+
addKeyboardShortcuts() {
|
|
27054
|
+
return this.options.levels.reduce((items, level) => ({
|
|
27055
|
+
...items,
|
|
27056
|
+
...{
|
|
27057
|
+
[`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level })
|
|
27058
|
+
}
|
|
27059
|
+
}), {});
|
|
27060
|
+
},
|
|
27061
|
+
addInputRules() {
|
|
27062
|
+
return this.options.levels.map((level) => {
|
|
27063
|
+
return textblockTypeInputRule({
|
|
27064
|
+
find: new RegExp(`^(#{1,${level}})\\s$`),
|
|
27065
|
+
type: this.type,
|
|
27066
|
+
getAttributes: {
|
|
27067
|
+
level
|
|
27068
|
+
}
|
|
27069
|
+
});
|
|
27070
|
+
});
|
|
27071
|
+
}
|
|
27072
|
+
});
|
|
27073
|
+
const Heading = Heading$1.extend({
|
|
27074
|
+
marks: "_",
|
|
27075
|
+
addOptions: () => ({
|
|
27076
|
+
levels: [1, 2, 3, 4],
|
|
27077
|
+
HTMLAttributes: { class: "zw-style" }
|
|
27078
|
+
})
|
|
27079
|
+
});
|
|
25938
27080
|
const buildCoreExtensions = () => [
|
|
25939
27081
|
Document,
|
|
25940
|
-
Paragraph.configure({
|
|
25941
|
-
HTMLAttributes: { class: "zw-style" }
|
|
25942
|
-
}),
|
|
25943
27082
|
Placeholder.configure({
|
|
25944
27083
|
placeholder: "Type your text here...",
|
|
25945
27084
|
emptyNodeClass: "zw-wysiwyg__placeholder"
|
|
25946
27085
|
}),
|
|
27086
|
+
Paragraph,
|
|
27087
|
+
Heading,
|
|
25947
27088
|
Text,
|
|
25948
27089
|
History,
|
|
25949
27090
|
NodeProcessor,
|