@tailor-cms/ce-html-edit 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./style.css";
2
- import { defineComponent, ref, onMounted, onBeforeUnmount, h, getCurrentInstance, watchEffect, nextTick, unref, Teleport, shallowRef, reactive, markRaw, customRef, resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, createTextVNode, toDisplayString, withDirectives, createElementBlock, Fragment as Fragment$1, renderList, vShow, inject, watch, createCommentVNode, withModifiers, createElementVNode, normalizeStyle, computed, resolveDynamicComponent } from "vue";
3
- var type = "HTML";
1
+ import "./index.css";
2
+ import { defineComponent, shallowRef, onMounted, onBeforeUnmount, ref, h, Teleport, getCurrentInstance, watchEffect, nextTick, unref, reactive, markRaw, customRef, resolveComponent, createBlock, openBlock, withCtx, createTextVNode, toDisplayString, createVNode, mergeProps, withDirectives, createElementBlock, Fragment as Fragment$1, renderList, vShow, inject, watch, createCommentVNode, withModifiers, createElementVNode, normalizeStyle, computed, resolveDynamicComponent } from "vue";
3
+ var type = "TIPTAP_HTML";
4
4
  var name = "HTML";
5
5
  var initState = () => ({ content: "" });
6
6
  var version = "1.0";
@@ -19,7 +19,7 @@ var manifest$1 = {
19
19
  initState,
20
20
  ui
21
21
  };
22
- var src_default = manifest$1;
22
+ var index_default = manifest$1;
23
23
  function OrderedMap(content) {
24
24
  this.content = content;
25
25
  }
@@ -27,8 +27,7 @@ OrderedMap.prototype = {
27
27
  constructor: OrderedMap,
28
28
  find: function(key) {
29
29
  for (var i = 0; i < this.content.length; i += 2)
30
- if (this.content[i] === key)
31
- return i;
30
+ if (this.content[i] === key) return i;
32
31
  return -1;
33
32
  },
34
33
  // :: (string) → ?any
@@ -49,8 +48,7 @@ OrderedMap.prototype = {
49
48
  content.push(newKey || key, value);
50
49
  } else {
51
50
  content[found2 + 1] = value;
52
- if (newKey)
53
- content[found2] = newKey;
51
+ if (newKey) content[found2] = newKey;
54
52
  }
55
53
  return new OrderedMap(content);
56
54
  },
@@ -58,8 +56,7 @@ OrderedMap.prototype = {
58
56
  // Return a map with the given key removed, if it existed.
59
57
  remove: function(key) {
60
58
  var found2 = this.find(key);
61
- if (found2 == -1)
62
- return this;
59
+ if (found2 == -1) return this;
63
60
  var content = this.content.slice();
64
61
  content.splice(found2, 2);
65
62
  return new OrderedMap(content);
@@ -97,8 +94,7 @@ OrderedMap.prototype = {
97
94
  // appear in `map` before the keys in `map`.
98
95
  prepend: function(map2) {
99
96
  map2 = OrderedMap.from(map2);
100
- if (!map2.size)
101
- return this;
97
+ if (!map2.size) return this;
102
98
  return new OrderedMap(map2.content.concat(this.subtract(map2).content));
103
99
  },
104
100
  // :: (union<Object, OrderedMap>) → OrderedMap
@@ -106,8 +102,7 @@ OrderedMap.prototype = {
106
102
  // appear in `map` after the keys in `map`.
107
103
  append: function(map2) {
108
104
  map2 = OrderedMap.from(map2);
109
- if (!map2.size)
110
- return this;
105
+ if (!map2.size) return this;
111
106
  return new OrderedMap(this.subtract(map2).content.concat(map2.content));
112
107
  },
113
108
  // :: (union<Object, OrderedMap>) → OrderedMap
@@ -136,12 +131,9 @@ OrderedMap.prototype = {
136
131
  }
137
132
  };
138
133
  OrderedMap.from = function(value) {
139
- if (value instanceof OrderedMap)
140
- return value;
134
+ if (value instanceof OrderedMap) return value;
141
135
  var content = [];
142
- if (value)
143
- for (var prop in value)
144
- content.push(prop, value[prop]);
136
+ if (value) for (var prop in value) content.push(prop, value[prop]);
145
137
  return new OrderedMap(content);
146
138
  };
147
139
  function findDiffStart(a, b, pos) {
@@ -744,8 +736,6 @@ function removeRange(content, from2, to) {
744
736
  function insertInto(content, dist, insert, parent) {
745
737
  let { index, offset: offset2 } = content.findIndex(dist), child = content.maybeChild(index);
746
738
  if (offset2 == dist || child.isText) {
747
- if (parent && !parent.canReplace(index, index, insert))
748
- return null;
749
739
  return content.cut(0, dist).append(insert).append(content.cut(dist));
750
740
  }
751
741
  let inner = insertInto(child.content, dist - offset2 - 1, insert);
@@ -2570,7 +2560,7 @@ const OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;
2570
2560
  function wsOptionsFor(type2, preserveWhitespace, base2) {
2571
2561
  if (preserveWhitespace != null)
2572
2562
  return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0);
2573
- return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base2 & ~OPT_OPEN_LEFT;
2563
+ return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base2 & -5;
2574
2564
  }
2575
2565
  class NodeContext {
2576
2566
  constructor(type2, attrs, marks, pendingMarks, solid, match, options) {
@@ -4467,21 +4457,20 @@ class Fitter {
4467
4457
  return after;
4468
4458
  }
4469
4459
  findCloseLevel($to) {
4470
- scan:
4471
- for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {
4472
- let { match, type: type2 } = this.frontier[i];
4473
- let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));
4474
- let fit = contentAfterFits($to, i, type2, match, dropInner);
4475
- if (!fit)
4476
- continue;
4477
- for (let d = i - 1; d >= 0; d--) {
4478
- let { match: match2, type: type3 } = this.frontier[d];
4479
- let matches2 = contentAfterFits($to, d, type3, match2, true);
4480
- if (!matches2 || matches2.childCount)
4481
- continue scan;
4482
- }
4483
- return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };
4460
+ scan: for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {
4461
+ let { match, type: type2 } = this.frontier[i];
4462
+ let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));
4463
+ let fit = contentAfterFits($to, i, type2, match, dropInner);
4464
+ if (!fit)
4465
+ continue;
4466
+ for (let d = i - 1; d >= 0; d--) {
4467
+ let { match: match2, type: type3 } = this.frontier[d];
4468
+ let matches2 = contentAfterFits($to, d, type3, match2, true);
4469
+ if (!matches2 || matches2.childCount)
4470
+ continue scan;
4484
4471
  }
4472
+ return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };
4473
+ }
4485
4474
  }
4486
4475
  close($to) {
4487
4476
  let close2 = this.findCloseLevel($to);
@@ -5475,7 +5464,7 @@ class Transaction extends Transform {
5475
5464
  throw new RangeError("Selection passed to setSelection must point at the current document");
5476
5465
  this.curSelection = selection;
5477
5466
  this.curSelectionFor = this.steps.length;
5478
- this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;
5467
+ this.updated = (this.updated | UPDATED_SEL) & -3;
5479
5468
  this.storedMarks = null;
5480
5469
  return this;
5481
5470
  }
@@ -5526,7 +5515,7 @@ class Transaction extends Transform {
5526
5515
  */
5527
5516
  addStep(step, doc2) {
5528
5517
  super.addStep(step, doc2);
5529
- this.updated = this.updated & ~UPDATED_MARKS;
5518
+ this.updated = this.updated & -3;
5530
5519
  this.storedMarks = null;
5531
5520
  }
5532
5521
  /**
@@ -6757,17 +6746,17 @@ class ViewDesc {
6757
6746
  // custom things with the selection. Note that this falls apart when
6758
6747
  // a selection starts in such a node and ends in another, in which
6759
6748
  // case we just use whatever domFromPos produces as a best effort.
6760
- setSelection(anchor, head, root2, force = false) {
6749
+ setSelection(anchor, head, root, force = false) {
6761
6750
  let from2 = Math.min(anchor, head), to = Math.max(anchor, head);
6762
6751
  for (let i = 0, offset2 = 0; i < this.children.length; i++) {
6763
6752
  let child = this.children[i], end2 = offset2 + child.size;
6764
6753
  if (from2 > offset2 && to < end2)
6765
- return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border, root2, force);
6754
+ return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border, root, force);
6766
6755
  offset2 = end2;
6767
6756
  }
6768
6757
  let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);
6769
6758
  let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);
6770
- let domSel = root2.getSelection();
6759
+ let domSel = root.getSelection();
6771
6760
  let brKludge = false;
6772
6761
  if ((gecko || safari) && anchor == head) {
6773
6762
  let { node, offset: offset2 } = anchorDOM;
@@ -7076,12 +7065,9 @@ class NodeViewDesc extends ViewDesc {
7076
7065
  }, (child, outerDeco, innerDeco, i) => {
7077
7066
  updater.syncToMarks(child.marks, inline, view);
7078
7067
  let compIndex;
7079
- if (updater.findNodeMatch(child, outerDeco, innerDeco, i))
7080
- ;
7081
- else if (compositionInChild && view.state.selection.from > off && view.state.selection.to < off + child.nodeSize && (compIndex = updater.findIndexWithChild(composition.node)) > -1 && updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view))
7082
- ;
7083
- else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off))
7084
- ;
7068
+ if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;
7069
+ else if (compositionInChild && view.state.selection.from > off && view.state.selection.to < off + child.nodeSize && (compIndex = updater.findIndexWithChild(composition.node)) > -1 && updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view)) ;
7070
+ else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off)) ;
7085
7071
  else {
7086
7072
  updater.addNode(child, outerDeco, innerDeco, view, off);
7087
7073
  }
@@ -7282,8 +7268,8 @@ class CustomNodeViewDesc extends NodeViewDesc {
7282
7268
  deselectNode() {
7283
7269
  this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();
7284
7270
  }
7285
- setSelection(anchor, head, root2, force) {
7286
- this.spec.setSelection ? this.spec.setSelection(anchor, head, root2) : super.setSelection(anchor, head, root2, force);
7271
+ setSelection(anchor, head, root, force) {
7272
+ this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : super.setSelection(anchor, head, root, force);
7287
7273
  }
7288
7274
  destroy() {
7289
7275
  if (this.spec.destroy)
@@ -7642,36 +7628,35 @@ class ViewTreeUpdater {
7642
7628
  function preMatch(frag, parentDesc) {
7643
7629
  let curDesc = parentDesc, descI = curDesc.children.length;
7644
7630
  let fI = frag.childCount, matched = /* @__PURE__ */ new Map(), matches2 = [];
7645
- outer:
7646
- while (fI > 0) {
7647
- let desc;
7648
- for (; ; ) {
7649
- if (descI) {
7650
- let next = curDesc.children[descI - 1];
7651
- if (next instanceof MarkViewDesc) {
7652
- curDesc = next;
7653
- descI = next.children.length;
7654
- } else {
7655
- desc = next;
7656
- descI--;
7657
- break;
7658
- }
7659
- } else if (curDesc == parentDesc) {
7660
- break outer;
7631
+ outer: while (fI > 0) {
7632
+ let desc;
7633
+ for (; ; ) {
7634
+ if (descI) {
7635
+ let next = curDesc.children[descI - 1];
7636
+ if (next instanceof MarkViewDesc) {
7637
+ curDesc = next;
7638
+ descI = next.children.length;
7661
7639
  } else {
7662
- descI = curDesc.parent.children.indexOf(curDesc);
7663
- curDesc = curDesc.parent;
7640
+ desc = next;
7641
+ descI--;
7642
+ break;
7664
7643
  }
7644
+ } else if (curDesc == parentDesc) {
7645
+ break outer;
7646
+ } else {
7647
+ descI = curDesc.parent.children.indexOf(curDesc);
7648
+ curDesc = curDesc.parent;
7665
7649
  }
7666
- let node = desc.node;
7667
- if (!node)
7668
- continue;
7669
- if (node != frag.child(fI - 1))
7670
- break;
7671
- --fI;
7672
- matched.set(desc, fI);
7673
- matches2.push(desc);
7674
7650
  }
7651
+ let node = desc.node;
7652
+ if (!node)
7653
+ continue;
7654
+ if (node != frag.child(fI - 1))
7655
+ break;
7656
+ --fI;
7657
+ matched.set(desc, fI);
7658
+ matches2.push(desc);
7659
+ }
7675
7660
  return { index: fI, matched, matches: matches2.reverse() };
7676
7661
  }
7677
7662
  function compareSide(a, b) {
@@ -8638,10 +8623,10 @@ editHandlers.keydown = (view, _event) => {
8638
8623
  if (event.keyCode != 229)
8639
8624
  view.domObserver.forceFlush();
8640
8625
  if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {
8641
- let now2 = Date.now();
8642
- view.input.lastIOSEnter = now2;
8626
+ let now = Date.now();
8627
+ view.input.lastIOSEnter = now;
8643
8628
  view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
8644
- if (view.input.lastIOSEnter == now2) {
8629
+ if (view.input.lastIOSEnter == now) {
8645
8630
  view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")));
8646
8631
  view.input.lastIOSEnter = 0;
8647
8632
  }
@@ -8693,8 +8678,7 @@ function updateSelection(view, selection, origin) {
8693
8678
  if (!view.focused)
8694
8679
  view.focus();
8695
8680
  let tr2 = view.state.tr.setSelection(selection);
8696
- if (origin == "pointer")
8697
- tr2.setMeta("pointer", true);
8681
+ tr2.setMeta("pointer", true);
8698
8682
  view.dispatch(tr2);
8699
8683
  }
8700
8684
  function selectClickedLeaf(view, inside) {
@@ -8702,7 +8686,7 @@ function selectClickedLeaf(view, inside) {
8702
8686
  return false;
8703
8687
  let $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;
8704
8688
  if (node && node.isAtom && NodeSelection.isSelectable(node)) {
8705
- updateSelection(view, new NodeSelection($pos), "pointer");
8689
+ updateSelection(view, new NodeSelection($pos));
8706
8690
  return true;
8707
8691
  }
8708
8692
  return false;
@@ -8725,7 +8709,7 @@ function selectClickedNode(view, inside) {
8725
8709
  }
8726
8710
  }
8727
8711
  if (selectAt != null) {
8728
- updateSelection(view, NodeSelection.create(view.state.doc, selectAt), "pointer");
8712
+ updateSelection(view, NodeSelection.create(view.state.doc, selectAt));
8729
8713
  return true;
8730
8714
  } else {
8731
8715
  return false;
@@ -8746,7 +8730,7 @@ function defaultTripleClick(view, inside, event) {
8746
8730
  let doc2 = view.state.doc;
8747
8731
  if (inside == -1) {
8748
8732
  if (doc2.inlineContent) {
8749
- updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size), "pointer");
8733
+ updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size));
8750
8734
  return true;
8751
8735
  }
8752
8736
  return false;
@@ -8756,9 +8740,9 @@ function defaultTripleClick(view, inside, event) {
8756
8740
  let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);
8757
8741
  let nodePos = $pos.before(i);
8758
8742
  if (node.inlineContent)
8759
- updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size), "pointer");
8743
+ updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size));
8760
8744
  else if (NodeSelection.isSelectable(node))
8761
- updateSelection(view, NodeSelection.create(doc2, nodePos), "pointer");
8745
+ updateSelection(view, NodeSelection.create(doc2, nodePos));
8762
8746
  else
8763
8747
  continue;
8764
8748
  return true;
@@ -8772,14 +8756,14 @@ handlers.mousedown = (view, _event) => {
8772
8756
  let event = _event;
8773
8757
  view.input.shiftKey = event.shiftKey;
8774
8758
  let flushed = forceDOMFlush(view);
8775
- let now2 = Date.now(), type2 = "singleClick";
8776
- if (now2 - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {
8759
+ let now = Date.now(), type2 = "singleClick";
8760
+ if (now - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {
8777
8761
  if (view.input.lastClick.type == "singleClick")
8778
8762
  type2 = "doubleClick";
8779
8763
  else if (view.input.lastClick.type == "doubleClick")
8780
8764
  type2 = "tripleClick";
8781
8765
  }
8782
- view.input.lastClick = { time: now2, x: event.clientX, y: event.clientY, type: type2 };
8766
+ view.input.lastClick = { time: now, x: event.clientX, y: event.clientY, type: type2 };
8783
8767
  let pos = view.posAtCoords(eventCoords(event));
8784
8768
  if (!pos)
8785
8769
  return;
@@ -8875,7 +8859,7 @@ class MouseDown {
8875
8859
  // thus doesn't get a reaction from ProseMirror. This
8876
8860
  // works around that.
8877
8861
  chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {
8878
- updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)), "pointer");
8862
+ updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)));
8879
8863
  event.preventDefault();
8880
8864
  } else {
8881
8865
  setSelectionOrigin(this.view, "pointer");
@@ -9092,8 +9076,7 @@ handlers.dragstart = (view, _event) => {
9092
9076
  let sel = view.state.selection;
9093
9077
  let pos = sel.empty ? null : view.posAtCoords(eventCoords(event));
9094
9078
  let node;
9095
- if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to))
9096
- ;
9079
+ if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ;
9097
9080
  else if (mouseDown && mouseDown.mightDrag) {
9098
9081
  node = NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos);
9099
9082
  } else if (event.target && event.target.nodeType == 1) {
@@ -10558,8 +10541,7 @@ class EditorView {
10558
10541
  */
10559
10542
  scrollToSelection() {
10560
10543
  let startDOM = this.domSelectionRange().focusNode;
10561
- if (this.someProp("handleScrollToSelection", (f) => f(this)))
10562
- ;
10544
+ if (this.someProp("handleScrollToSelection", (f) => f(this))) ;
10563
10545
  else if (this.state.selection instanceof NodeSelection) {
10564
10546
  let target = this.docView.domAfterPos(this.state.selection.from);
10565
10547
  if (target.nodeType == 1)
@@ -10978,32 +10960,22 @@ var shift = {
10978
10960
  };
10979
10961
  var mac$1 = typeof navigator != "undefined" && /Mac/.test(navigator.platform);
10980
10962
  var ie = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
10981
- for (var i = 0; i < 10; i++)
10982
- base[48 + i] = base[96 + i] = String(i);
10983
- for (var i = 1; i <= 24; i++)
10984
- base[i + 111] = "F" + i;
10963
+ for (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);
10964
+ for (var i = 1; i <= 24; i++) base[i + 111] = "F" + i;
10985
10965
  for (var i = 65; i <= 90; i++) {
10986
10966
  base[i] = String.fromCharCode(i + 32);
10987
10967
  shift[i] = String.fromCharCode(i);
10988
10968
  }
10989
- for (var code in base)
10990
- if (!shift.hasOwnProperty(code))
10991
- shift[code] = base[code];
10969
+ for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
10992
10970
  function keyName(event) {
10993
10971
  var ignoreKey = mac$1 && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey || ie && event.shiftKey && event.key && event.key.length == 1 || event.key == "Unidentified";
10994
10972
  var name2 = !ignoreKey && event.key || (event.shiftKey ? shift : base)[event.keyCode] || event.key || "Unidentified";
10995
- if (name2 == "Esc")
10996
- name2 = "Escape";
10997
- if (name2 == "Del")
10998
- name2 = "Delete";
10999
- if (name2 == "Left")
11000
- name2 = "ArrowLeft";
11001
- if (name2 == "Up")
11002
- name2 = "ArrowUp";
11003
- if (name2 == "Right")
11004
- name2 = "ArrowRight";
11005
- if (name2 == "Down")
11006
- name2 = "ArrowDown";
10973
+ if (name2 == "Esc") name2 = "Escape";
10974
+ if (name2 == "Del") name2 = "Delete";
10975
+ if (name2 == "Left") name2 = "ArrowLeft";
10976
+ if (name2 == "Up") name2 = "ArrowUp";
10977
+ if (name2 == "Right") name2 = "ArrowRight";
10978
+ if (name2 == "Down") name2 = "ArrowDown";
11007
10979
  return name2;
11008
10980
  }
11009
10981
  const mac = typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : false;
@@ -11374,6 +11346,45 @@ const liftEmptyBlock$1 = (state, dispatch) => {
11374
11346
  dispatch(state.tr.lift(range, target).scrollIntoView());
11375
11347
  return true;
11376
11348
  };
11349
+ function splitBlockAs(splitNode) {
11350
+ return (state, dispatch) => {
11351
+ let { $from, $to } = state.selection;
11352
+ if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {
11353
+ if (!$from.parentOffset || !canSplit(state.doc, $from.pos))
11354
+ return false;
11355
+ if (dispatch)
11356
+ dispatch(state.tr.split($from.pos).scrollIntoView());
11357
+ return true;
11358
+ }
11359
+ if (!$from.parent.isBlock)
11360
+ return false;
11361
+ if (dispatch) {
11362
+ let atEnd = $to.parentOffset == $to.parent.content.size;
11363
+ let tr2 = state.tr;
11364
+ if (state.selection instanceof TextSelection || state.selection instanceof AllSelection)
11365
+ tr2.deleteSelection();
11366
+ let deflt = $from.depth == 0 ? null : defaultBlockAt$1($from.node(-1).contentMatchAt($from.indexAfter(-1)));
11367
+ let types = atEnd && deflt ? [{ type: deflt }] : void 0;
11368
+ let can = canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, types);
11369
+ if (!types && !can && canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : void 0)) {
11370
+ if (deflt)
11371
+ types = [{ type: deflt }];
11372
+ can = true;
11373
+ }
11374
+ if (can) {
11375
+ tr2.split(tr2.mapping.map($from.pos), 1, types);
11376
+ if (!atEnd && !$from.parentOffset && $from.parent.type != deflt) {
11377
+ let first2 = tr2.mapping.map($from.before()), $first = tr2.doc.resolve(first2);
11378
+ if (deflt && $from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt))
11379
+ tr2.setNodeMarkup(tr2.mapping.map($from.before()), deflt);
11380
+ }
11381
+ }
11382
+ dispatch(tr2.scrollIntoView());
11383
+ }
11384
+ return true;
11385
+ };
11386
+ }
11387
+ const splitBlock$1 = splitBlockAs();
11377
11388
  const selectParentNode$1 = (state, dispatch) => {
11378
11389
  let { $from, to } = state.selection, pos;
11379
11390
  let same = $from.sharedDepth(to);
@@ -11511,6 +11522,19 @@ function setBlockType(nodeType, attrs = null) {
11511
11522
  return true;
11512
11523
  };
11513
11524
  }
11525
+ function chainCommands(...commands2) {
11526
+ return function(state, dispatch, view) {
11527
+ for (let i = 0; i < commands2.length; i++)
11528
+ if (commands2[i](state, dispatch, view))
11529
+ return true;
11530
+ return false;
11531
+ };
11532
+ }
11533
+ chainCommands(deleteSelection$1, joinBackward$1, selectNodeBackward$1);
11534
+ chainCommands(deleteSelection$1, joinForward$1, selectNodeForward$1);
11535
+ ({
11536
+ "Enter": chainCommands(newlineInCode$1, createParagraphNear$1, liftEmptyBlock$1, splitBlock$1)
11537
+ });
11514
11538
  typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os != "undefined" && os.platform ? os.platform() == "darwin" : false;
11515
11539
  function wrapInList$1(listType, attrs = null) {
11516
11540
  return function(state, dispatch) {
@@ -14658,7 +14682,7 @@ img.ProseMirror-separator {
14658
14682
  opacity: 0
14659
14683
  }`;
14660
14684
  function createStyleTag(style2, nonce, suffix) {
14661
- const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${suffix ? `-${suffix}` : ""}]`);
14685
+ const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${""}]`);
14662
14686
  if (tiptapStyleTag !== null) {
14663
14687
  return tiptapStyleTag;
14664
14688
  }
@@ -14666,7 +14690,7 @@ function createStyleTag(style2, nonce, suffix) {
14666
14690
  if (nonce) {
14667
14691
  styleNode.setAttribute("nonce", nonce);
14668
14692
  }
14669
- styleNode.setAttribute(`data-tiptap-style${suffix ? `-${suffix}` : ""}`, "");
14693
+ styleNode.setAttribute(`data-tiptap-style${""}`, "");
14670
14694
  styleNode.innerHTML = style2;
14671
14695
  document.getElementsByTagName("head")[0].appendChild(styleNode);
14672
14696
  return styleNode;
@@ -16050,7 +16074,6 @@ function detectOverflow(state, options) {
16050
16074
  var popperOffsets2 = computeOffsets({
16051
16075
  reference: referenceClientRect,
16052
16076
  element: popperRect,
16053
- strategy: "absolute",
16054
16077
  placement
16055
16078
  });
16056
16079
  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2));
@@ -16184,8 +16207,7 @@ function flip(_ref) {
16184
16207
  };
16185
16208
  for (var _i = numberOfChecks; _i > 0; _i--) {
16186
16209
  var _ret = _loop(_i);
16187
- if (_ret === "break")
16188
- break;
16210
+ if (_ret === "break") break;
16189
16211
  }
16190
16212
  }
16191
16213
  if (state.placement !== firstFittingPlacement) {
@@ -16298,7 +16320,6 @@ function popperOffsets(_ref) {
16298
16320
  state.modifiersData[name2] = computeOffsets({
16299
16321
  reference: state.rects.reference,
16300
16322
  element: state.rects.popper,
16301
- strategy: "absolute",
16302
16323
  placement: state.placement
16303
16324
  });
16304
16325
  }
@@ -16493,7 +16514,7 @@ function orderModifiers(modifiers2) {
16493
16514
  }));
16494
16515
  }, []);
16495
16516
  }
16496
- function debounce$3(fn2) {
16517
+ function debounce$2(fn2) {
16497
16518
  var pending;
16498
16519
  return function() {
16499
16520
  if (!pending) {
@@ -16614,7 +16635,7 @@ function popperGenerator(generatorOptions) {
16614
16635
  },
16615
16636
  // Async and optimistically optimized update – it will not be executed if
16616
16637
  // not necessary (debounced to run at most once-per-tick)
16617
- update: debounce$3(function() {
16638
+ update: debounce$2(function() {
16618
16639
  return new Promise(function(resolve) {
16619
16640
  instance.forceUpdate();
16620
16641
  resolve(state);
@@ -16674,7 +16695,7 @@ var TOUCH_OPTIONS = {
16674
16695
  var TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO2() {
16675
16696
  return document.body;
16676
16697
  };
16677
- function hasOwnProperty$1(obj, key) {
16698
+ function hasOwnProperty(obj, key) {
16678
16699
  return {}.hasOwnProperty.call(obj, key);
16679
16700
  }
16680
16701
  function getValueAtIndexOrReturn(value, index, defaultValue) {
@@ -16691,7 +16712,7 @@ function isType(value, type2) {
16691
16712
  function invokeWithArgsOrReturn(value, args) {
16692
16713
  return typeof value === "function" ? value.apply(void 0, args) : value;
16693
16714
  }
16694
- function debounce$2(fn2, ms) {
16715
+ function debounce$1(fn2, ms) {
16695
16716
  if (ms === 0) {
16696
16717
  return fn2;
16697
16718
  }
@@ -16840,12 +16861,12 @@ function onDocumentTouchStart() {
16840
16861
  }
16841
16862
  }
16842
16863
  function onDocumentMouseMove() {
16843
- var now2 = performance.now();
16844
- if (now2 - lastMouseMoveTime < 20) {
16864
+ var now = performance.now();
16865
+ if (now - lastMouseMoveTime < 20) {
16845
16866
  currentInput.isTouch = false;
16846
16867
  document.removeEventListener("mousemove", onDocumentMouseMove);
16847
16868
  }
16848
- lastMouseMoveTime = now2;
16869
+ lastMouseMoveTime = now;
16849
16870
  }
16850
16871
  function onWindowBlur() {
16851
16872
  var activeElement = document.activeElement;
@@ -17046,7 +17067,7 @@ function validateProps(partialProps, plugins) {
17046
17067
  var keys2 = Object.keys(partialProps);
17047
17068
  keys2.forEach(function(prop) {
17048
17069
  var nonPluginProps = removeProperties(defaultProps, Object.keys(pluginProps));
17049
- var didPassUnknownProp = !hasOwnProperty$1(nonPluginProps, prop);
17070
+ var didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop);
17050
17071
  if (didPassUnknownProp) {
17051
17072
  didPassUnknownProp = plugins.filter(function(plugin) {
17052
17073
  return plugin.name === prop;
@@ -17175,7 +17196,7 @@ function createTippy(reference2, passedProps) {
17175
17196
  var currentTransitionEndListener;
17176
17197
  var onFirstUpdate;
17177
17198
  var listeners = [];
17178
- var debouncedOnMouseMove = debounce$2(onMouseMove, props.interactiveDebounce);
17199
+ var debouncedOnMouseMove = debounce$1(onMouseMove, props.interactiveDebounce);
17179
17200
  var currentTarget;
17180
17201
  var id = idCounter++;
17181
17202
  var popperInstance = null;
@@ -17710,7 +17731,7 @@ function createTippy(reference2, passedProps) {
17710
17731
  addListeners();
17711
17732
  if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
17712
17733
  cleanupInteractiveMouseListeners();
17713
- debouncedOnMouseMove = debounce$2(onMouseMove, nextProps.interactiveDebounce);
17734
+ debouncedOnMouseMove = debounce$1(onMouseMove, nextProps.interactiveDebounce);
17714
17735
  }
17715
17736
  if (prevProps.triggerTarget && !nextProps.triggerTarget) {
17716
17737
  normalizeToArray(prevProps.triggerTarget).forEach(function(node) {
@@ -18296,13 +18317,13 @@ const BubbleMenu = defineComponent({
18296
18317
  }
18297
18318
  },
18298
18319
  setup(props, { slots }) {
18299
- const root2 = ref(null);
18320
+ const root = ref(null);
18300
18321
  onMounted(() => {
18301
18322
  const { updateDelay, editor, pluginKey, shouldShow, tippyOptions } = props;
18302
18323
  editor.registerPlugin(BubbleMenuPlugin({
18303
18324
  updateDelay,
18304
18325
  editor,
18305
- element: root2.value,
18326
+ element: root.value,
18306
18327
  pluginKey,
18307
18328
  shouldShow,
18308
18329
  tippyOptions
@@ -18314,7 +18335,7 @@ const BubbleMenu = defineComponent({
18314
18335
  });
18315
18336
  return () => {
18316
18337
  var _a;
18317
- return h("div", { ref: root2 }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
18338
+ return h("div", { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
18318
18339
  };
18319
18340
  }
18320
18341
  });
@@ -18464,13 +18485,13 @@ defineComponent({
18464
18485
  }
18465
18486
  },
18466
18487
  setup(props, { slots }) {
18467
- const root2 = ref(null);
18488
+ const root = ref(null);
18468
18489
  onMounted(() => {
18469
18490
  const { pluginKey, editor, tippyOptions, shouldShow } = props;
18470
18491
  editor.registerPlugin(FloatingMenuPlugin({
18471
18492
  pluginKey,
18472
18493
  editor,
18473
- element: root2.value,
18494
+ element: root.value,
18474
18495
  tippyOptions,
18475
18496
  shouldShow
18476
18497
  }));
@@ -18481,7 +18502,7 @@ defineComponent({
18481
18502
  });
18482
18503
  return () => {
18483
18504
  var _a;
18484
- return h("div", { ref: root2 }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
18505
+ return h("div", { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
18485
18506
  };
18486
18507
  }
18487
18508
  });
@@ -18540,199 +18561,298 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
18540
18561
  function getDefaultExportFromCjs(x) {
18541
18562
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
18542
18563
  }
18543
- function isObject$2(value) {
18544
- var type2 = typeof value;
18545
- return value != null && (type2 == "object" || type2 == "function");
18546
- }
18547
- var isObject_1 = isObject$2;
18548
- var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
18549
- var _freeGlobal = freeGlobal$1;
18550
- var freeGlobal = _freeGlobal;
18551
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
18552
- var root$2 = freeGlobal || freeSelf || Function("return this")();
18553
- var _root = root$2;
18554
- var root$1 = _root;
18555
- var now$1 = function() {
18556
- return root$1.Date.now();
18557
- };
18558
- var now_1 = now$1;
18559
- var reWhitespace = /\s/;
18560
- function trimmedEndIndex$1(string) {
18561
- var index = string.length;
18562
- while (index-- && reWhitespace.test(string.charAt(index))) {
18563
- }
18564
- return index;
18565
- }
18566
- var _trimmedEndIndex = trimmedEndIndex$1;
18567
- var trimmedEndIndex = _trimmedEndIndex;
18568
- var reTrimStart = /^\s+/;
18569
- function baseTrim$1(string) {
18570
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
18571
- }
18572
- var _baseTrim = baseTrim$1;
18573
- var root = _root;
18574
- var Symbol$3 = root.Symbol;
18575
- var _Symbol = Symbol$3;
18576
- var Symbol$2 = _Symbol;
18577
- var objectProto$1 = Object.prototype;
18578
- var hasOwnProperty = objectProto$1.hasOwnProperty;
18579
- var nativeObjectToString$1 = objectProto$1.toString;
18580
- var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
18581
- function getRawTag$1(value) {
18582
- var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
18583
- try {
18584
- value[symToStringTag$1] = void 0;
18585
- var unmasked = true;
18586
- } catch (e) {
18587
- }
18588
- var result = nativeObjectToString$1.call(value);
18589
- if (unmasked) {
18590
- if (isOwn) {
18591
- value[symToStringTag$1] = tag;
18592
- } else {
18593
- delete value[symToStringTag$1];
18564
+ var isObject_1;
18565
+ var hasRequiredIsObject;
18566
+ function requireIsObject() {
18567
+ if (hasRequiredIsObject) return isObject_1;
18568
+ hasRequiredIsObject = 1;
18569
+ function isObject(value) {
18570
+ var type2 = typeof value;
18571
+ return value != null && (type2 == "object" || type2 == "function");
18572
+ }
18573
+ isObject_1 = isObject;
18574
+ return isObject_1;
18575
+ }
18576
+ var _freeGlobal;
18577
+ var hasRequired_freeGlobal;
18578
+ function require_freeGlobal() {
18579
+ if (hasRequired_freeGlobal) return _freeGlobal;
18580
+ hasRequired_freeGlobal = 1;
18581
+ var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
18582
+ _freeGlobal = freeGlobal;
18583
+ return _freeGlobal;
18584
+ }
18585
+ var _root;
18586
+ var hasRequired_root;
18587
+ function require_root() {
18588
+ if (hasRequired_root) return _root;
18589
+ hasRequired_root = 1;
18590
+ var freeGlobal = require_freeGlobal();
18591
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
18592
+ var root = freeGlobal || freeSelf || Function("return this")();
18593
+ _root = root;
18594
+ return _root;
18595
+ }
18596
+ var now_1;
18597
+ var hasRequiredNow;
18598
+ function requireNow() {
18599
+ if (hasRequiredNow) return now_1;
18600
+ hasRequiredNow = 1;
18601
+ var root = require_root();
18602
+ var now = function() {
18603
+ return root.Date.now();
18604
+ };
18605
+ now_1 = now;
18606
+ return now_1;
18607
+ }
18608
+ var _trimmedEndIndex;
18609
+ var hasRequired_trimmedEndIndex;
18610
+ function require_trimmedEndIndex() {
18611
+ if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
18612
+ hasRequired_trimmedEndIndex = 1;
18613
+ var reWhitespace = /\s/;
18614
+ function trimmedEndIndex(string) {
18615
+ var index = string.length;
18616
+ while (index-- && reWhitespace.test(string.charAt(index))) {
18617
+ }
18618
+ return index;
18619
+ }
18620
+ _trimmedEndIndex = trimmedEndIndex;
18621
+ return _trimmedEndIndex;
18622
+ }
18623
+ var _baseTrim;
18624
+ var hasRequired_baseTrim;
18625
+ function require_baseTrim() {
18626
+ if (hasRequired_baseTrim) return _baseTrim;
18627
+ hasRequired_baseTrim = 1;
18628
+ var trimmedEndIndex = require_trimmedEndIndex();
18629
+ var reTrimStart = /^\s+/;
18630
+ function baseTrim(string) {
18631
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
18632
+ }
18633
+ _baseTrim = baseTrim;
18634
+ return _baseTrim;
18635
+ }
18636
+ var _Symbol;
18637
+ var hasRequired_Symbol;
18638
+ function require_Symbol() {
18639
+ if (hasRequired_Symbol) return _Symbol;
18640
+ hasRequired_Symbol = 1;
18641
+ var root = require_root();
18642
+ var Symbol2 = root.Symbol;
18643
+ _Symbol = Symbol2;
18644
+ return _Symbol;
18645
+ }
18646
+ var _getRawTag;
18647
+ var hasRequired_getRawTag;
18648
+ function require_getRawTag() {
18649
+ if (hasRequired_getRawTag) return _getRawTag;
18650
+ hasRequired_getRawTag = 1;
18651
+ var Symbol2 = require_Symbol();
18652
+ var objectProto = Object.prototype;
18653
+ var hasOwnProperty2 = objectProto.hasOwnProperty;
18654
+ var nativeObjectToString = objectProto.toString;
18655
+ var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
18656
+ function getRawTag(value) {
18657
+ var isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
18658
+ try {
18659
+ value[symToStringTag] = void 0;
18660
+ var unmasked = true;
18661
+ } catch (e) {
18662
+ }
18663
+ var result = nativeObjectToString.call(value);
18664
+ if (unmasked) {
18665
+ if (isOwn) {
18666
+ value[symToStringTag] = tag;
18667
+ } else {
18668
+ delete value[symToStringTag];
18669
+ }
18594
18670
  }
18595
- }
18596
- return result;
18597
- }
18598
- var _getRawTag = getRawTag$1;
18599
- var objectProto = Object.prototype;
18600
- var nativeObjectToString = objectProto.toString;
18601
- function objectToString$1(value) {
18602
- return nativeObjectToString.call(value);
18603
- }
18604
- var _objectToString = objectToString$1;
18605
- var Symbol$1 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
18606
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
18607
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
18608
- function baseGetTag$1(value) {
18609
- if (value == null) {
18610
- return value === void 0 ? undefinedTag : nullTag;
18611
- }
18612
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
18613
- }
18614
- var _baseGetTag = baseGetTag$1;
18615
- function isObjectLike$1(value) {
18616
- return value != null && typeof value == "object";
18617
- }
18618
- var isObjectLike_1 = isObjectLike$1;
18619
- var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
18620
- var symbolTag = "[object Symbol]";
18621
- function isSymbol$1(value) {
18622
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
18623
- }
18624
- var isSymbol_1 = isSymbol$1;
18625
- var baseTrim = _baseTrim, isObject$1 = isObject_1, isSymbol = isSymbol_1;
18626
- var NAN = 0 / 0;
18627
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
18628
- var reIsBinary = /^0b[01]+$/i;
18629
- var reIsOctal = /^0o[0-7]+$/i;
18630
- var freeParseInt = parseInt;
18631
- function toNumber$1(value) {
18632
- if (typeof value == "number") {
18633
- return value;
18634
- }
18635
- if (isSymbol(value)) {
18636
- return NAN;
18637
- }
18638
- if (isObject$1(value)) {
18639
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
18640
- value = isObject$1(other) ? other + "" : other;
18641
- }
18642
- if (typeof value != "string") {
18643
- return value === 0 ? value : +value;
18644
- }
18645
- value = baseTrim(value);
18646
- var isBinary = reIsBinary.test(value);
18647
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
18648
- }
18649
- var toNumber_1 = toNumber$1;
18650
- var isObject = isObject_1, now = now_1, toNumber = toNumber_1;
18651
- var FUNC_ERROR_TEXT = "Expected a function";
18652
- var nativeMax = Math.max, nativeMin = Math.min;
18653
- function debounce(func, wait, options) {
18654
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
18655
- if (typeof func != "function") {
18656
- throw new TypeError(FUNC_ERROR_TEXT);
18657
- }
18658
- wait = toNumber(wait) || 0;
18659
- if (isObject(options)) {
18660
- leading = !!options.leading;
18661
- maxing = "maxWait" in options;
18662
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
18663
- trailing = "trailing" in options ? !!options.trailing : trailing;
18664
- }
18665
- function invokeFunc(time) {
18666
- var args = lastArgs, thisArg = lastThis;
18667
- lastArgs = lastThis = void 0;
18668
- lastInvokeTime = time;
18669
- result = func.apply(thisArg, args);
18670
18671
  return result;
18671
18672
  }
18672
- function leadingEdge(time) {
18673
- lastInvokeTime = time;
18674
- timerId = setTimeout(timerExpired, wait);
18675
- return leading ? invokeFunc(time) : result;
18676
- }
18677
- function remainingWait(time) {
18678
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
18679
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
18680
- }
18681
- function shouldInvoke(time) {
18682
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
18683
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
18684
- }
18685
- function timerExpired() {
18686
- var time = now();
18687
- if (shouldInvoke(time)) {
18688
- return trailingEdge(time);
18673
+ _getRawTag = getRawTag;
18674
+ return _getRawTag;
18675
+ }
18676
+ var _objectToString;
18677
+ var hasRequired_objectToString;
18678
+ function require_objectToString() {
18679
+ if (hasRequired_objectToString) return _objectToString;
18680
+ hasRequired_objectToString = 1;
18681
+ var objectProto = Object.prototype;
18682
+ var nativeObjectToString = objectProto.toString;
18683
+ function objectToString(value) {
18684
+ return nativeObjectToString.call(value);
18685
+ }
18686
+ _objectToString = objectToString;
18687
+ return _objectToString;
18688
+ }
18689
+ var _baseGetTag;
18690
+ var hasRequired_baseGetTag;
18691
+ function require_baseGetTag() {
18692
+ if (hasRequired_baseGetTag) return _baseGetTag;
18693
+ hasRequired_baseGetTag = 1;
18694
+ var Symbol2 = require_Symbol(), getRawTag = require_getRawTag(), objectToString = require_objectToString();
18695
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
18696
+ var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
18697
+ function baseGetTag(value) {
18698
+ if (value == null) {
18699
+ return value === void 0 ? undefinedTag : nullTag;
18700
+ }
18701
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
18702
+ }
18703
+ _baseGetTag = baseGetTag;
18704
+ return _baseGetTag;
18705
+ }
18706
+ var isObjectLike_1;
18707
+ var hasRequiredIsObjectLike;
18708
+ function requireIsObjectLike() {
18709
+ if (hasRequiredIsObjectLike) return isObjectLike_1;
18710
+ hasRequiredIsObjectLike = 1;
18711
+ function isObjectLike(value) {
18712
+ return value != null && typeof value == "object";
18713
+ }
18714
+ isObjectLike_1 = isObjectLike;
18715
+ return isObjectLike_1;
18716
+ }
18717
+ var isSymbol_1;
18718
+ var hasRequiredIsSymbol;
18719
+ function requireIsSymbol() {
18720
+ if (hasRequiredIsSymbol) return isSymbol_1;
18721
+ hasRequiredIsSymbol = 1;
18722
+ var baseGetTag = require_baseGetTag(), isObjectLike = requireIsObjectLike();
18723
+ var symbolTag = "[object Symbol]";
18724
+ function isSymbol(value) {
18725
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
18726
+ }
18727
+ isSymbol_1 = isSymbol;
18728
+ return isSymbol_1;
18729
+ }
18730
+ var toNumber_1;
18731
+ var hasRequiredToNumber;
18732
+ function requireToNumber() {
18733
+ if (hasRequiredToNumber) return toNumber_1;
18734
+ hasRequiredToNumber = 1;
18735
+ var baseTrim = require_baseTrim(), isObject = requireIsObject(), isSymbol = requireIsSymbol();
18736
+ var NAN = 0 / 0;
18737
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
18738
+ var reIsBinary = /^0b[01]+$/i;
18739
+ var reIsOctal = /^0o[0-7]+$/i;
18740
+ var freeParseInt = parseInt;
18741
+ function toNumber(value) {
18742
+ if (typeof value == "number") {
18743
+ return value;
18689
18744
  }
18690
- timerId = setTimeout(timerExpired, remainingWait(time));
18691
- }
18692
- function trailingEdge(time) {
18693
- timerId = void 0;
18694
- if (trailing && lastArgs) {
18695
- return invokeFunc(time);
18745
+ if (isSymbol(value)) {
18746
+ return NAN;
18747
+ }
18748
+ if (isObject(value)) {
18749
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
18750
+ value = isObject(other) ? other + "" : other;
18751
+ }
18752
+ if (typeof value != "string") {
18753
+ return value === 0 ? value : +value;
18754
+ }
18755
+ value = baseTrim(value);
18756
+ var isBinary = reIsBinary.test(value);
18757
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
18758
+ }
18759
+ toNumber_1 = toNumber;
18760
+ return toNumber_1;
18761
+ }
18762
+ var debounce_1;
18763
+ var hasRequiredDebounce;
18764
+ function requireDebounce() {
18765
+ if (hasRequiredDebounce) return debounce_1;
18766
+ hasRequiredDebounce = 1;
18767
+ var isObject = requireIsObject(), now = requireNow(), toNumber = requireToNumber();
18768
+ var FUNC_ERROR_TEXT = "Expected a function";
18769
+ var nativeMax = Math.max, nativeMin = Math.min;
18770
+ function debounce2(func, wait, options) {
18771
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
18772
+ if (typeof func != "function") {
18773
+ throw new TypeError(FUNC_ERROR_TEXT);
18774
+ }
18775
+ wait = toNumber(wait) || 0;
18776
+ if (isObject(options)) {
18777
+ leading = !!options.leading;
18778
+ maxing = "maxWait" in options;
18779
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
18780
+ trailing = "trailing" in options ? !!options.trailing : trailing;
18781
+ }
18782
+ function invokeFunc(time) {
18783
+ var args = lastArgs, thisArg = lastThis;
18784
+ lastArgs = lastThis = void 0;
18785
+ lastInvokeTime = time;
18786
+ result = func.apply(thisArg, args);
18787
+ return result;
18696
18788
  }
18697
- lastArgs = lastThis = void 0;
18698
- return result;
18699
- }
18700
- function cancel() {
18701
- if (timerId !== void 0) {
18702
- clearTimeout(timerId);
18789
+ function leadingEdge(time) {
18790
+ lastInvokeTime = time;
18791
+ timerId = setTimeout(timerExpired, wait);
18792
+ return leading ? invokeFunc(time) : result;
18703
18793
  }
18704
- lastInvokeTime = 0;
18705
- lastArgs = lastCallTime = lastThis = timerId = void 0;
18706
- }
18707
- function flush() {
18708
- return timerId === void 0 ? result : trailingEdge(now());
18709
- }
18710
- function debounced() {
18711
- var time = now(), isInvoking = shouldInvoke(time);
18712
- lastArgs = arguments;
18713
- lastThis = this;
18714
- lastCallTime = time;
18715
- if (isInvoking) {
18716
- if (timerId === void 0) {
18717
- return leadingEdge(lastCallTime);
18794
+ function remainingWait(time) {
18795
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
18796
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
18797
+ }
18798
+ function shouldInvoke(time) {
18799
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
18800
+ return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
18801
+ }
18802
+ function timerExpired() {
18803
+ var time = now();
18804
+ if (shouldInvoke(time)) {
18805
+ return trailingEdge(time);
18806
+ }
18807
+ timerId = setTimeout(timerExpired, remainingWait(time));
18808
+ }
18809
+ function trailingEdge(time) {
18810
+ timerId = void 0;
18811
+ if (trailing && lastArgs) {
18812
+ return invokeFunc(time);
18718
18813
  }
18719
- if (maxing) {
18814
+ lastArgs = lastThis = void 0;
18815
+ return result;
18816
+ }
18817
+ function cancel() {
18818
+ if (timerId !== void 0) {
18720
18819
  clearTimeout(timerId);
18721
- timerId = setTimeout(timerExpired, wait);
18722
- return invokeFunc(lastCallTime);
18723
18820
  }
18821
+ lastInvokeTime = 0;
18822
+ lastArgs = lastCallTime = lastThis = timerId = void 0;
18724
18823
  }
18725
- if (timerId === void 0) {
18726
- timerId = setTimeout(timerExpired, wait);
18824
+ function flush() {
18825
+ return timerId === void 0 ? result : trailingEdge(now());
18727
18826
  }
18728
- return result;
18827
+ function debounced() {
18828
+ var time = now(), isInvoking = shouldInvoke(time);
18829
+ lastArgs = arguments;
18830
+ lastThis = this;
18831
+ lastCallTime = time;
18832
+ if (isInvoking) {
18833
+ if (timerId === void 0) {
18834
+ return leadingEdge(lastCallTime);
18835
+ }
18836
+ if (maxing) {
18837
+ clearTimeout(timerId);
18838
+ timerId = setTimeout(timerExpired, wait);
18839
+ return invokeFunc(lastCallTime);
18840
+ }
18841
+ }
18842
+ if (timerId === void 0) {
18843
+ timerId = setTimeout(timerExpired, wait);
18844
+ }
18845
+ return result;
18846
+ }
18847
+ debounced.cancel = cancel;
18848
+ debounced.flush = flush;
18849
+ return debounced;
18729
18850
  }
18730
- debounced.cancel = cancel;
18731
- debounced.flush = flush;
18732
- return debounced;
18851
+ debounce_1 = debounce2;
18852
+ return debounce_1;
18733
18853
  }
18734
- var debounce_1 = debounce;
18735
- const debounce$1 = /* @__PURE__ */ getDefaultExportFromCjs(debounce_1);
18854
+ var debounceExports = requireDebounce();
18855
+ const debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
18736
18856
  const TextStyle$2 = Mark2.create({
18737
18857
  name: "textStyle",
18738
18858
  addOptions() {
@@ -19667,42 +19787,41 @@ class GapCursor extends Selection {
19667
19787
  @internal
19668
19788
  */
19669
19789
  static findGapCursorFrom($pos, dir, mustMove = false) {
19670
- search:
19671
- for (; ; ) {
19672
- if (!mustMove && GapCursor.valid($pos))
19673
- return $pos;
19674
- let pos = $pos.pos, next = null;
19675
- for (let d = $pos.depth; ; d--) {
19676
- let parent = $pos.node(d);
19677
- if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
19678
- next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);
19679
- break;
19680
- } else if (d == 0) {
19681
- return null;
19682
- }
19683
- pos += dir;
19684
- let $cur = $pos.doc.resolve(pos);
19685
- if (GapCursor.valid($cur))
19686
- return $cur;
19790
+ search: for (; ; ) {
19791
+ if (!mustMove && GapCursor.valid($pos))
19792
+ return $pos;
19793
+ let pos = $pos.pos, next = null;
19794
+ for (let d = $pos.depth; ; d--) {
19795
+ let parent = $pos.node(d);
19796
+ if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
19797
+ next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);
19798
+ break;
19799
+ } else if (d == 0) {
19800
+ return null;
19687
19801
  }
19688
- for (; ; ) {
19689
- let inside = dir > 0 ? next.firstChild : next.lastChild;
19690
- if (!inside) {
19691
- if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {
19692
- $pos = $pos.doc.resolve(pos + next.nodeSize * dir);
19693
- mustMove = false;
19694
- continue search;
19695
- }
19696
- break;
19802
+ pos += dir;
19803
+ let $cur = $pos.doc.resolve(pos);
19804
+ if (GapCursor.valid($cur))
19805
+ return $cur;
19806
+ }
19807
+ for (; ; ) {
19808
+ let inside = dir > 0 ? next.firstChild : next.lastChild;
19809
+ if (!inside) {
19810
+ if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {
19811
+ $pos = $pos.doc.resolve(pos + next.nodeSize * dir);
19812
+ mustMove = false;
19813
+ continue search;
19697
19814
  }
19698
- next = inside;
19699
- pos += dir;
19700
- let $cur = $pos.doc.resolve(pos);
19701
- if (GapCursor.valid($cur))
19702
- return $cur;
19815
+ break;
19703
19816
  }
19704
- return null;
19817
+ next = inside;
19818
+ pos += dir;
19819
+ let $cur = $pos.doc.resolve(pos);
19820
+ if (GapCursor.valid($cur))
19821
+ return $cur;
19705
19822
  }
19823
+ return null;
19824
+ }
19706
19825
  }
19707
19826
  }
19708
19827
  GapCursor.prototype.visible = false;
@@ -19985,10 +20104,8 @@ RopeSequence.prototype.appendInner = function appendInner(other) {
19985
20104
  return new Append(this, other);
19986
20105
  };
19987
20106
  RopeSequence.prototype.slice = function slice(from2, to) {
19988
- if (from2 === void 0)
19989
- from2 = 0;
19990
- if (to === void 0)
19991
- to = this.length;
20107
+ if (from2 === void 0) from2 = 0;
20108
+ if (to === void 0) to = this.length;
19992
20109
  if (from2 >= to) {
19993
20110
  return RopeSequence.empty;
19994
20111
  }
@@ -20001,10 +20118,8 @@ RopeSequence.prototype.get = function get(i) {
20001
20118
  return this.getInner(i);
20002
20119
  };
20003
20120
  RopeSequence.prototype.forEach = function forEach2(f, from2, to) {
20004
- if (from2 === void 0)
20005
- from2 = 0;
20006
- if (to === void 0)
20007
- to = this.length;
20121
+ if (from2 === void 0) from2 = 0;
20122
+ if (to === void 0) to = this.length;
20008
20123
  if (from2 <= to) {
20009
20124
  this.forEachInner(f, from2, to, 0);
20010
20125
  } else {
@@ -20012,10 +20127,8 @@ RopeSequence.prototype.forEach = function forEach2(f, from2, to) {
20012
20127
  }
20013
20128
  };
20014
20129
  RopeSequence.prototype.map = function map(f, from2, to) {
20015
- if (from2 === void 0)
20016
- from2 = 0;
20017
- if (to === void 0)
20018
- to = this.length;
20130
+ if (from2 === void 0) from2 = 0;
20131
+ if (to === void 0) to = this.length;
20019
20132
  var result = [];
20020
20133
  this.forEach(function(elt, i) {
20021
20134
  return result.push(f(elt, i));
@@ -20033,8 +20146,7 @@ var Leaf = /* @__PURE__ */ function(RopeSequence3) {
20033
20146
  RopeSequence3.call(this);
20034
20147
  this.values = values;
20035
20148
  }
20036
- if (RopeSequence3)
20037
- Leaf2.__proto__ = RopeSequence3;
20149
+ if (RopeSequence3) Leaf2.__proto__ = RopeSequence3;
20038
20150
  Leaf2.prototype = Object.create(RopeSequence3 && RopeSequence3.prototype);
20039
20151
  Leaf2.prototype.constructor = Leaf2;
20040
20152
  var prototypeAccessors = { length: { configurable: true }, depth: { configurable: true } };
@@ -20092,8 +20204,7 @@ var Append = /* @__PURE__ */ function(RopeSequence3) {
20092
20204
  this.length = left2.length + right2.length;
20093
20205
  this.depth = Math.max(left2.depth, right2.depth) + 1;
20094
20206
  }
20095
- if (RopeSequence3)
20096
- Append2.__proto__ = RopeSequence3;
20207
+ if (RopeSequence3) Append2.__proto__ = RopeSequence3;
20097
20208
  Append2.prototype = Object.create(RopeSequence3 && RopeSequence3.prototype);
20098
20209
  Append2.prototype.constructor = Append2;
20099
20210
  Append2.prototype.flatten = function flatten() {
@@ -23399,9 +23510,6 @@ function createColGroup(node, cellMinWidth, overrideCol, overrideValue) {
23399
23510
  return { colgroup, tableWidth, tableMinWidth };
23400
23511
  }
23401
23512
  function createCell(cellType, cellContent) {
23402
- if (cellContent) {
23403
- return cellType.createChecked(null, cellContent);
23404
- }
23405
23513
  return cellType.createAndFill();
23406
23514
  }
23407
23515
  function getTableNodeTypes(schema) {
@@ -23423,12 +23531,12 @@ function createTable(schema, rowsCount, colsCount, withHeaderRow, cellContent) {
23423
23531
  const headerCells = [];
23424
23532
  const cells = [];
23425
23533
  for (let index = 0; index < colsCount; index += 1) {
23426
- const cell = createCell(types.cell, cellContent);
23534
+ const cell = createCell(types.cell);
23427
23535
  if (cell) {
23428
23536
  cells.push(cell);
23429
23537
  }
23430
23538
  if (withHeaderRow) {
23431
- const headerCell = createCell(types.header_cell, cellContent);
23539
+ const headerCell = createCell(types.header_cell);
23432
23540
  if (headerCell) {
23433
23541
  headerCells.push(headerCell);
23434
23542
  }
@@ -23822,8 +23930,7 @@ const FontSize$1 = Extension.create({
23822
23930
  fontSize: {
23823
23931
  default: null,
23824
23932
  renderHTML: (attributes) => {
23825
- if (!attributes.fontSize)
23826
- return {};
23933
+ if (!attributes.fontSize) return {};
23827
23934
  return {
23828
23935
  style: `font-size: ${attributes.fontSize};`
23829
23936
  };
@@ -23919,8 +24026,7 @@ const Image = Image$1.configure({ inline: true }).extend({
23919
24026
  width: {
23920
24027
  default: null,
23921
24028
  renderHTML: ({ width }) => {
23922
- if (!width)
23923
- return {};
24029
+ if (!width) return {};
23924
24030
  return { style: `width: ${width};` };
23925
24031
  },
23926
24032
  parseHTML: (element) => element.style.width.replace(/['"]+/g, "")
@@ -24265,8 +24371,8 @@ var tk = /* @__PURE__ */ Object.freeze({
24265
24371
  SYM
24266
24372
  });
24267
24373
  const ASCII_LETTER = /[a-z]/;
24268
- const LETTER = /\p{L}/u;
24269
- const EMOJI = /\p{Emoji}/u;
24374
+ const LETTER = new RegExp("\\p{L}", "u");
24375
+ const EMOJI = new RegExp("\\p{Emoji}", "u");
24270
24376
  const DIGIT = /\d/;
24271
24377
  const SPACE = /\s/;
24272
24378
  const NL = "\n";
@@ -25412,7 +25518,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
25412
25518
  };
25413
25519
  }
25414
25520
  });
25415
- const IconButton_vue_vue_type_style_index_0_scoped_5f000959_lang = "";
25416
25521
  const _export_sfc = (sfc, props) => {
25417
25522
  const target = sfc.__vccOpts || sfc;
25418
25523
  for (const [key, val] of props) {
@@ -25427,12 +25532,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
25427
25532
  editor: {}
25428
25533
  },
25429
25534
  setup(__props) {
25430
- const props = __props;
25431
25535
  const sizes = [
25432
25536
  { width: "25%", label: "Small", icon: "mdi-size-s" },
25433
25537
  { width: "50%", label: "Medium", icon: "mdi-size-m" },
25434
25538
  { width: "100%", label: "Large", icon: "mdi-size-xl" }
25435
25539
  ];
25540
+ const props = __props;
25436
25541
  function setWidth(value) {
25437
25542
  const current = props.editor.getAttributes("image").width;
25438
25543
  const width = current !== value ? value : void 0;
@@ -25476,7 +25581,6 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
25476
25581
  };
25477
25582
  }
25478
25583
  });
25479
- const ImageMenu_vue_vue_type_style_index_0_scoped_cb530515_lang = "";
25480
25584
  const ImageMenu = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cb530515"]]);
25481
25585
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
25482
25586
  __name: "TableMenu",
@@ -25577,7 +25681,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
25577
25681
  };
25578
25682
  }
25579
25683
  });
25580
- const TableMenu_vue_vue_type_style_index_0_scoped_e73020ec_lang = "";
25581
25684
  const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-e73020ec"]]);
25582
25685
  const _hoisted_1$3 = { class: "tce-container" };
25583
25686
  const SAVE_DEBOUNCE = 3e3;
@@ -25589,27 +25692,32 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
25589
25692
  isDisabled: { type: Boolean }
25590
25693
  },
25591
25694
  emits: ["save"],
25592
- setup(__props, { emit }) {
25695
+ setup(__props, { emit: __emit }) {
25593
25696
  const props = __props;
25697
+ const emit = __emit;
25594
25698
  const elementBus = inject("$elementBus");
25595
25699
  const editor = useEditor({
25596
25700
  content: props.element.data.content,
25597
25701
  extensions,
25598
25702
  editable: !props.isDisabled && props.isFocused,
25599
- onUpdate: debounce$1(({ editor: editor2 }) => {
25600
- const content = editor2.isEmpty ? "" : editor2.getHTML();
25601
- return emit("save", { content });
25602
- }, SAVE_DEBOUNCE)
25703
+ onUpdate: debounce(() => save(), SAVE_DEBOUNCE)
25603
25704
  });
25705
+ const save = () => {
25706
+ var _a, _b;
25707
+ const content = ((_a = editor.value) == null ? void 0 : _a.isEmpty) ? "" : (_b = editor.value) == null ? void 0 : _b.getHTML();
25708
+ return emit("save", { content });
25709
+ };
25604
25710
  watch(
25605
25711
  () => props.isFocused,
25606
25712
  () => {
25607
25713
  var _a, _b;
25608
- const editable = !props.isDisabled && props.isFocused;
25609
- (_a = editor.value) == null ? void 0 : _a.setOptions({ editable });
25610
- if (editable)
25714
+ const { isDisabled, isFocused } = props;
25715
+ (_a = editor.value) == null ? void 0 : _a.setOptions({ editable: !isDisabled && isFocused });
25716
+ if (!isFocused) return save();
25717
+ if (!isDisabled) {
25611
25718
  (_b = editor.value) == null ? void 0 : _b.commands.focus();
25612
- nextTick(() => elementBus.emit("initialize", editor.value));
25719
+ nextTick(() => elementBus.emit("initialize", editor.value));
25720
+ }
25613
25721
  }
25614
25722
  );
25615
25723
  watch(
@@ -25637,366 +25745,378 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
25637
25745
  };
25638
25746
  }
25639
25747
  });
25640
- const Edit_vue_vue_type_style_index_0_scoped_c2fe9392_lang = "";
25641
- const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c2fe9392"]]);
25748
+ const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c9429291"]]);
25642
25749
  var isURL$1 = { exports: {} };
25643
25750
  var assertString = { exports: {} };
25644
- (function(module, exports) {
25645
- Object.defineProperty(exports, "__esModule", {
25646
- value: true
25647
- });
25648
- exports.default = assertString2;
25649
- function _typeof(obj) {
25650
- "@babel/helpers - typeof";
25651
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
25652
- _typeof = function _typeof2(obj2) {
25653
- return typeof obj2;
25654
- };
25655
- } else {
25656
- _typeof = function _typeof2(obj2) {
25657
- return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
25658
- };
25751
+ var hasRequiredAssertString;
25752
+ function requireAssertString() {
25753
+ if (hasRequiredAssertString) return assertString.exports;
25754
+ hasRequiredAssertString = 1;
25755
+ (function(module, exports) {
25756
+ Object.defineProperty(exports, "__esModule", {
25757
+ value: true
25758
+ });
25759
+ exports.default = assertString2;
25760
+ function _typeof(obj) {
25761
+ "@babel/helpers - typeof";
25762
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
25763
+ _typeof = function _typeof2(obj2) {
25764
+ return typeof obj2;
25765
+ };
25766
+ } else {
25767
+ _typeof = function _typeof2(obj2) {
25768
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
25769
+ };
25770
+ }
25771
+ return _typeof(obj);
25659
25772
  }
25660
- return _typeof(obj);
25661
- }
25662
- function assertString2(input) {
25663
- var isString = typeof input === "string" || input instanceof String;
25664
- if (!isString) {
25665
- var invalidType = _typeof(input);
25666
- if (input === null)
25667
- invalidType = "null";
25668
- else if (invalidType === "object")
25669
- invalidType = input.constructor.name;
25670
- throw new TypeError("Expected a string but received a ".concat(invalidType));
25773
+ function assertString2(input) {
25774
+ var isString = typeof input === "string" || input instanceof String;
25775
+ if (!isString) {
25776
+ var invalidType = _typeof(input);
25777
+ if (input === null) invalidType = "null";
25778
+ else if (invalidType === "object") invalidType = input.constructor.name;
25779
+ throw new TypeError("Expected a string but received a ".concat(invalidType));
25780
+ }
25671
25781
  }
25672
- }
25673
- module.exports = exports.default;
25674
- module.exports.default = exports.default;
25675
- })(assertString, assertString.exports);
25676
- var assertStringExports = assertString.exports;
25782
+ module.exports = exports.default;
25783
+ module.exports.default = exports.default;
25784
+ })(assertString, assertString.exports);
25785
+ return assertString.exports;
25786
+ }
25677
25787
  var isFQDN = { exports: {} };
25678
25788
  var merge = { exports: {} };
25679
- (function(module, exports) {
25680
- Object.defineProperty(exports, "__esModule", {
25681
- value: true
25682
- });
25683
- exports.default = merge2;
25684
- function merge2() {
25685
- var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
25686
- var defaults2 = arguments.length > 1 ? arguments[1] : void 0;
25687
- for (var key in defaults2) {
25688
- if (typeof obj[key] === "undefined") {
25689
- obj[key] = defaults2[key];
25789
+ var hasRequiredMerge;
25790
+ function requireMerge() {
25791
+ if (hasRequiredMerge) return merge.exports;
25792
+ hasRequiredMerge = 1;
25793
+ (function(module, exports) {
25794
+ Object.defineProperty(exports, "__esModule", {
25795
+ value: true
25796
+ });
25797
+ exports.default = merge2;
25798
+ function merge2() {
25799
+ var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
25800
+ var defaults2 = arguments.length > 1 ? arguments[1] : void 0;
25801
+ for (var key in defaults2) {
25802
+ if (typeof obj[key] === "undefined") {
25803
+ obj[key] = defaults2[key];
25804
+ }
25690
25805
  }
25806
+ return obj;
25691
25807
  }
25692
- return obj;
25693
- }
25694
- module.exports = exports.default;
25695
- module.exports.default = exports.default;
25696
- })(merge, merge.exports);
25697
- var mergeExports = merge.exports;
25698
- (function(module, exports) {
25699
- Object.defineProperty(exports, "__esModule", {
25700
- value: true
25701
- });
25702
- exports.default = isFQDN2;
25703
- var _assertString = _interopRequireDefault(assertStringExports);
25704
- var _merge = _interopRequireDefault(mergeExports);
25705
- function _interopRequireDefault(obj) {
25706
- return obj && obj.__esModule ? obj : { default: obj };
25707
- }
25708
- var default_fqdn_options = {
25709
- require_tld: true,
25710
- allow_underscores: false,
25711
- allow_trailing_dot: false,
25712
- allow_numeric_tld: false,
25713
- allow_wildcard: false,
25714
- ignore_max_length: false
25715
- };
25716
- function isFQDN2(str, options) {
25717
- (0, _assertString.default)(str);
25718
- options = (0, _merge.default)(options, default_fqdn_options);
25719
- if (options.allow_trailing_dot && str[str.length - 1] === ".") {
25720
- str = str.substring(0, str.length - 1);
25721
- }
25722
- if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
25723
- str = str.substring(2);
25724
- }
25725
- var parts = str.split(".");
25726
- var tld = parts[parts.length - 1];
25727
- if (options.require_tld) {
25728
- if (parts.length < 2) {
25729
- return false;
25808
+ module.exports = exports.default;
25809
+ module.exports.default = exports.default;
25810
+ })(merge, merge.exports);
25811
+ return merge.exports;
25812
+ }
25813
+ var hasRequiredIsFQDN;
25814
+ function requireIsFQDN() {
25815
+ if (hasRequiredIsFQDN) return isFQDN.exports;
25816
+ hasRequiredIsFQDN = 1;
25817
+ (function(module, exports) {
25818
+ Object.defineProperty(exports, "__esModule", {
25819
+ value: true
25820
+ });
25821
+ exports.default = isFQDN2;
25822
+ var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
25823
+ var _merge = _interopRequireDefault(/* @__PURE__ */ requireMerge());
25824
+ function _interopRequireDefault(obj) {
25825
+ return obj && obj.__esModule ? obj : { default: obj };
25826
+ }
25827
+ var default_fqdn_options = {
25828
+ require_tld: true,
25829
+ allow_underscores: false,
25830
+ allow_trailing_dot: false,
25831
+ allow_numeric_tld: false,
25832
+ allow_wildcard: false,
25833
+ ignore_max_length: false
25834
+ };
25835
+ function isFQDN2(str, options) {
25836
+ (0, _assertString.default)(str);
25837
+ options = (0, _merge.default)(options, default_fqdn_options);
25838
+ if (options.allow_trailing_dot && str[str.length - 1] === ".") {
25839
+ str = str.substring(0, str.length - 1);
25840
+ }
25841
+ if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
25842
+ str = str.substring(2);
25843
+ }
25844
+ var parts = str.split(".");
25845
+ var tld = parts[parts.length - 1];
25846
+ if (options.require_tld) {
25847
+ if (parts.length < 2) {
25848
+ return false;
25849
+ }
25850
+ if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
25851
+ return false;
25852
+ }
25853
+ if (/\s/.test(tld)) {
25854
+ return false;
25855
+ }
25730
25856
  }
25731
- if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
25857
+ if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
25732
25858
  return false;
25733
25859
  }
25734
- if (/\s/.test(tld)) {
25735
- return false;
25860
+ return parts.every(function(part) {
25861
+ if (part.length > 63 && !options.ignore_max_length) {
25862
+ return false;
25863
+ }
25864
+ if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
25865
+ return false;
25866
+ }
25867
+ if (/[\uff01-\uff5e]/.test(part)) {
25868
+ return false;
25869
+ }
25870
+ if (/^-|-$/.test(part)) {
25871
+ return false;
25872
+ }
25873
+ if (!options.allow_underscores && /_/.test(part)) {
25874
+ return false;
25875
+ }
25876
+ return true;
25877
+ });
25878
+ }
25879
+ module.exports = exports.default;
25880
+ module.exports.default = exports.default;
25881
+ })(isFQDN, isFQDN.exports);
25882
+ return isFQDN.exports;
25883
+ }
25884
+ var isIP = { exports: {} };
25885
+ var hasRequiredIsIP;
25886
+ function requireIsIP() {
25887
+ if (hasRequiredIsIP) return isIP.exports;
25888
+ hasRequiredIsIP = 1;
25889
+ (function(module, exports) {
25890
+ Object.defineProperty(exports, "__esModule", {
25891
+ value: true
25892
+ });
25893
+ exports.default = isIP2;
25894
+ var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
25895
+ function _interopRequireDefault(obj) {
25896
+ return obj && obj.__esModule ? obj : { default: obj };
25897
+ }
25898
+ var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
25899
+ var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
25900
+ var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
25901
+ var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
25902
+ var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
25903
+ function isIP2(str) {
25904
+ var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
25905
+ (0, _assertString.default)(str);
25906
+ version2 = String(version2);
25907
+ if (!version2) {
25908
+ return isIP2(str, 4) || isIP2(str, 6);
25909
+ }
25910
+ if (version2 === "4") {
25911
+ return IPv4AddressRegExp.test(str);
25912
+ }
25913
+ if (version2 === "6") {
25914
+ return IPv6AddressRegExp.test(str);
25736
25915
  }
25916
+ return false;
25737
25917
  }
25738
- if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
25918
+ module.exports = exports.default;
25919
+ module.exports.default = exports.default;
25920
+ })(isIP, isIP.exports);
25921
+ return isIP.exports;
25922
+ }
25923
+ var hasRequiredIsURL;
25924
+ function requireIsURL() {
25925
+ if (hasRequiredIsURL) return isURL$1.exports;
25926
+ hasRequiredIsURL = 1;
25927
+ (function(module, exports) {
25928
+ Object.defineProperty(exports, "__esModule", {
25929
+ value: true
25930
+ });
25931
+ exports.default = isURL2;
25932
+ var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
25933
+ var _isFQDN = _interopRequireDefault(/* @__PURE__ */ requireIsFQDN());
25934
+ var _isIP = _interopRequireDefault(/* @__PURE__ */ requireIsIP());
25935
+ var _merge = _interopRequireDefault(/* @__PURE__ */ requireMerge());
25936
+ function _interopRequireDefault(obj) {
25937
+ return obj && obj.__esModule ? obj : { default: obj };
25938
+ }
25939
+ function _slicedToArray(arr, i) {
25940
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
25941
+ }
25942
+ function _nonIterableRest() {
25943
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25944
+ }
25945
+ function _unsupportedIterableToArray(o, minLen) {
25946
+ if (!o) return;
25947
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
25948
+ var n = Object.prototype.toString.call(o).slice(8, -1);
25949
+ if (n === "Object" && o.constructor) n = o.constructor.name;
25950
+ if (n === "Map" || n === "Set") return Array.from(o);
25951
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
25952
+ }
25953
+ function _arrayLikeToArray(arr, len) {
25954
+ if (len == null || len > arr.length) len = arr.length;
25955
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
25956
+ arr2[i] = arr[i];
25957
+ }
25958
+ return arr2;
25959
+ }
25960
+ function _iterableToArrayLimit(arr, i) {
25961
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
25962
+ var _arr = [];
25963
+ var _n = true;
25964
+ var _d = false;
25965
+ var _e = void 0;
25966
+ try {
25967
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
25968
+ _arr.push(_s.value);
25969
+ if (i && _arr.length === i) break;
25970
+ }
25971
+ } catch (err) {
25972
+ _d = true;
25973
+ _e = err;
25974
+ } finally {
25975
+ try {
25976
+ if (!_n && _i["return"] != null) _i["return"]();
25977
+ } finally {
25978
+ if (_d) throw _e;
25979
+ }
25980
+ }
25981
+ return _arr;
25982
+ }
25983
+ function _arrayWithHoles(arr) {
25984
+ if (Array.isArray(arr)) return arr;
25985
+ }
25986
+ var default_url_options = {
25987
+ protocols: ["http", "https", "ftp"],
25988
+ require_tld: true,
25989
+ require_protocol: false,
25990
+ require_host: true,
25991
+ require_port: false,
25992
+ require_valid_protocol: true,
25993
+ allow_underscores: false,
25994
+ allow_trailing_dot: false,
25995
+ allow_protocol_relative_urls: false,
25996
+ allow_fragments: true,
25997
+ allow_query_components: true,
25998
+ validate_length: true
25999
+ };
26000
+ var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
26001
+ function isRegExp2(obj) {
26002
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
26003
+ }
26004
+ function checkHost(host, matches2) {
26005
+ for (var i = 0; i < matches2.length; i++) {
26006
+ var match = matches2[i];
26007
+ if (host === match || isRegExp2(match) && match.test(host)) {
26008
+ return true;
26009
+ }
26010
+ }
25739
26011
  return false;
25740
26012
  }
25741
- return parts.every(function(part) {
25742
- if (part.length > 63 && !options.ignore_max_length) {
26013
+ function isURL2(url, options) {
26014
+ (0, _assertString.default)(url);
26015
+ if (!url || /[\s<>]/.test(url)) {
25743
26016
  return false;
25744
26017
  }
25745
- if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
26018
+ if (url.indexOf("mailto:") === 0) {
25746
26019
  return false;
25747
26020
  }
25748
- if (/[\uff01-\uff5e]/.test(part)) {
26021
+ options = (0, _merge.default)(options, default_url_options);
26022
+ if (options.validate_length && url.length >= 2083) {
25749
26023
  return false;
25750
26024
  }
25751
- if (/^-|-$/.test(part)) {
26025
+ if (!options.allow_fragments && url.includes("#")) {
25752
26026
  return false;
25753
26027
  }
25754
- if (!options.allow_underscores && /_/.test(part)) {
26028
+ if (!options.allow_query_components && (url.includes("?") || url.includes("&"))) {
25755
26029
  return false;
25756
26030
  }
25757
- return true;
25758
- });
25759
- }
25760
- module.exports = exports.default;
25761
- module.exports.default = exports.default;
25762
- })(isFQDN, isFQDN.exports);
25763
- var isFQDNExports = isFQDN.exports;
25764
- var isIP = { exports: {} };
25765
- (function(module, exports) {
25766
- Object.defineProperty(exports, "__esModule", {
25767
- value: true
25768
- });
25769
- exports.default = isIP2;
25770
- var _assertString = _interopRequireDefault(assertStringExports);
25771
- function _interopRequireDefault(obj) {
25772
- return obj && obj.__esModule ? obj : { default: obj };
25773
- }
25774
- var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
25775
- var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
25776
- var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
25777
- var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
25778
- var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
25779
- function isIP2(str) {
25780
- var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
25781
- (0, _assertString.default)(str);
25782
- version2 = String(version2);
25783
- if (!version2) {
25784
- return isIP2(str, 4) || isIP2(str, 6);
25785
- }
25786
- if (version2 === "4") {
25787
- return IPv4AddressRegExp.test(str);
25788
- }
25789
- if (version2 === "6") {
25790
- return IPv6AddressRegExp.test(str);
25791
- }
25792
- return false;
25793
- }
25794
- module.exports = exports.default;
25795
- module.exports.default = exports.default;
25796
- })(isIP, isIP.exports);
25797
- var isIPExports = isIP.exports;
25798
- (function(module, exports) {
25799
- Object.defineProperty(exports, "__esModule", {
25800
- value: true
25801
- });
25802
- exports.default = isURL2;
25803
- var _assertString = _interopRequireDefault(assertStringExports);
25804
- var _isFQDN = _interopRequireDefault(isFQDNExports);
25805
- var _isIP = _interopRequireDefault(isIPExports);
25806
- var _merge = _interopRequireDefault(mergeExports);
25807
- function _interopRequireDefault(obj) {
25808
- return obj && obj.__esModule ? obj : { default: obj };
25809
- }
25810
- function _slicedToArray(arr, i) {
25811
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
25812
- }
25813
- function _nonIterableRest() {
25814
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25815
- }
25816
- function _unsupportedIterableToArray(o, minLen) {
25817
- if (!o)
25818
- return;
25819
- if (typeof o === "string")
25820
- return _arrayLikeToArray(o, minLen);
25821
- var n = Object.prototype.toString.call(o).slice(8, -1);
25822
- if (n === "Object" && o.constructor)
25823
- n = o.constructor.name;
25824
- if (n === "Map" || n === "Set")
25825
- return Array.from(o);
25826
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
25827
- return _arrayLikeToArray(o, minLen);
25828
- }
25829
- function _arrayLikeToArray(arr, len) {
25830
- if (len == null || len > arr.length)
25831
- len = arr.length;
25832
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
25833
- arr2[i] = arr[i];
25834
- }
25835
- return arr2;
25836
- }
25837
- function _iterableToArrayLimit(arr, i) {
25838
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr)))
25839
- return;
25840
- var _arr = [];
25841
- var _n = true;
25842
- var _d = false;
25843
- var _e = void 0;
25844
- try {
25845
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
25846
- _arr.push(_s.value);
25847
- if (i && _arr.length === i)
25848
- break;
26031
+ var protocol, auth, host, hostname, port, port_str, split2, ipv6;
26032
+ split2 = url.split("#");
26033
+ url = split2.shift();
26034
+ split2 = url.split("?");
26035
+ url = split2.shift();
26036
+ split2 = url.split("://");
26037
+ if (split2.length > 1) {
26038
+ protocol = split2.shift().toLowerCase();
26039
+ if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
26040
+ return false;
26041
+ }
26042
+ } else if (options.require_protocol) {
26043
+ return false;
26044
+ } else if (url.slice(0, 2) === "//") {
26045
+ if (!options.allow_protocol_relative_urls) {
26046
+ return false;
26047
+ }
26048
+ split2[0] = url.slice(2);
25849
26049
  }
25850
- } catch (err) {
25851
- _d = true;
25852
- _e = err;
25853
- } finally {
25854
- try {
25855
- if (!_n && _i["return"] != null)
25856
- _i["return"]();
25857
- } finally {
25858
- if (_d)
25859
- throw _e;
25860
- }
25861
- }
25862
- return _arr;
25863
- }
25864
- function _arrayWithHoles(arr) {
25865
- if (Array.isArray(arr))
25866
- return arr;
25867
- }
25868
- var default_url_options = {
25869
- protocols: ["http", "https", "ftp"],
25870
- require_tld: true,
25871
- require_protocol: false,
25872
- require_host: true,
25873
- require_port: false,
25874
- require_valid_protocol: true,
25875
- allow_underscores: false,
25876
- allow_trailing_dot: false,
25877
- allow_protocol_relative_urls: false,
25878
- allow_fragments: true,
25879
- allow_query_components: true,
25880
- validate_length: true
25881
- };
25882
- var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
25883
- function isRegExp2(obj) {
25884
- return Object.prototype.toString.call(obj) === "[object RegExp]";
25885
- }
25886
- function checkHost(host, matches2) {
25887
- for (var i = 0; i < matches2.length; i++) {
25888
- var match = matches2[i];
25889
- if (host === match || isRegExp2(match) && match.test(host)) {
26050
+ url = split2.join("://");
26051
+ if (url === "") {
26052
+ return false;
26053
+ }
26054
+ split2 = url.split("/");
26055
+ url = split2.shift();
26056
+ if (url === "" && !options.require_host) {
25890
26057
  return true;
25891
26058
  }
25892
- }
25893
- return false;
25894
- }
25895
- function isURL2(url, options) {
25896
- (0, _assertString.default)(url);
25897
- if (!url || /[\s<>]/.test(url)) {
25898
- return false;
25899
- }
25900
- if (url.indexOf("mailto:") === 0) {
25901
- return false;
25902
- }
25903
- options = (0, _merge.default)(options, default_url_options);
25904
- if (options.validate_length && url.length >= 2083) {
25905
- return false;
25906
- }
25907
- if (!options.allow_fragments && url.includes("#")) {
25908
- return false;
25909
- }
25910
- if (!options.allow_query_components && (url.includes("?") || url.includes("&"))) {
25911
- return false;
25912
- }
25913
- var protocol, auth, host, hostname, port, port_str, split2, ipv6;
25914
- split2 = url.split("#");
25915
- url = split2.shift();
25916
- split2 = url.split("?");
25917
- url = split2.shift();
25918
- split2 = url.split("://");
25919
- if (split2.length > 1) {
25920
- protocol = split2.shift().toLowerCase();
25921
- if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
25922
- return false;
26059
+ split2 = url.split("@");
26060
+ if (split2.length > 1) {
26061
+ if (options.disallow_auth) {
26062
+ return false;
26063
+ }
26064
+ if (split2[0] === "") {
26065
+ return false;
26066
+ }
26067
+ auth = split2.shift();
26068
+ if (auth.indexOf(":") >= 0 && auth.split(":").length > 2) {
26069
+ return false;
26070
+ }
26071
+ var _auth$split = auth.split(":"), _auth$split2 = _slicedToArray(_auth$split, 2), user = _auth$split2[0], password = _auth$split2[1];
26072
+ if (user === "" && password === "") {
26073
+ return false;
26074
+ }
25923
26075
  }
25924
- } else if (options.require_protocol) {
25925
- return false;
25926
- } else if (url.slice(0, 2) === "//") {
25927
- if (!options.allow_protocol_relative_urls) {
25928
- return false;
26076
+ hostname = split2.join("@");
26077
+ port_str = null;
26078
+ ipv6 = null;
26079
+ var ipv6_match = hostname.match(wrapped_ipv6);
26080
+ if (ipv6_match) {
26081
+ host = "";
26082
+ ipv6 = ipv6_match[1];
26083
+ port_str = ipv6_match[2] || null;
26084
+ } else {
26085
+ split2 = hostname.split(":");
26086
+ host = split2.shift();
26087
+ if (split2.length) {
26088
+ port_str = split2.join(":");
26089
+ }
25929
26090
  }
25930
- split2[0] = url.slice(2);
25931
- }
25932
- url = split2.join("://");
25933
- if (url === "") {
25934
- return false;
25935
- }
25936
- split2 = url.split("/");
25937
- url = split2.shift();
25938
- if (url === "" && !options.require_host) {
25939
- return true;
25940
- }
25941
- split2 = url.split("@");
25942
- if (split2.length > 1) {
25943
- if (options.disallow_auth) {
26091
+ if (port_str !== null && port_str.length > 0) {
26092
+ port = parseInt(port_str, 10);
26093
+ if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
26094
+ return false;
26095
+ }
26096
+ } else if (options.require_port) {
25944
26097
  return false;
25945
26098
  }
25946
- if (split2[0] === "") {
25947
- return false;
26099
+ if (options.host_whitelist) {
26100
+ return checkHost(host, options.host_whitelist);
25948
26101
  }
25949
- auth = split2.shift();
25950
- if (auth.indexOf(":") >= 0 && auth.split(":").length > 2) {
25951
- return false;
26102
+ if (host === "" && !options.require_host) {
26103
+ return true;
25952
26104
  }
25953
- var _auth$split = auth.split(":"), _auth$split2 = _slicedToArray(_auth$split, 2), user = _auth$split2[0], password = _auth$split2[1];
25954
- if (user === "" && password === "") {
26105
+ if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {
25955
26106
  return false;
25956
26107
  }
25957
- }
25958
- hostname = split2.join("@");
25959
- port_str = null;
25960
- ipv6 = null;
25961
- var ipv6_match = hostname.match(wrapped_ipv6);
25962
- if (ipv6_match) {
25963
- host = "";
25964
- ipv6 = ipv6_match[1];
25965
- port_str = ipv6_match[2] || null;
25966
- } else {
25967
- split2 = hostname.split(":");
25968
- host = split2.shift();
25969
- if (split2.length) {
25970
- port_str = split2.join(":");
25971
- }
25972
- }
25973
- if (port_str !== null && port_str.length > 0) {
25974
- port = parseInt(port_str, 10);
25975
- if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
26108
+ host = host || ipv6;
26109
+ if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
25976
26110
  return false;
25977
26111
  }
25978
- } else if (options.require_port) {
25979
- return false;
25980
- }
25981
- if (options.host_whitelist) {
25982
- return checkHost(host, options.host_whitelist);
25983
- }
25984
- if (host === "" && !options.require_host) {
25985
26112
  return true;
25986
26113
  }
25987
- if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {
25988
- return false;
25989
- }
25990
- host = host || ipv6;
25991
- if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
25992
- return false;
25993
- }
25994
- return true;
25995
- }
25996
- module.exports = exports.default;
25997
- module.exports.default = exports.default;
25998
- })(isURL$1, isURL$1.exports);
25999
- var isURLExports = isURL$1.exports;
26114
+ module.exports = exports.default;
26115
+ module.exports.default = exports.default;
26116
+ })(isURL$1, isURL$1.exports);
26117
+ return isURL$1.exports;
26118
+ }
26119
+ var isURLExports = /* @__PURE__ */ requireIsURL();
26000
26120
  const isURL = /* @__PURE__ */ getDefaultExportFromCjs(isURLExports);
26001
26121
  const _hoisted_1$2 = { class: "actions d-flex justify-end" };
26002
26122
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
@@ -26005,24 +26125,22 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
26005
26125
  editor: {}
26006
26126
  },
26007
26127
  setup(__props) {
26008
- const props = __props;
26009
26128
  const rules = {
26010
26129
  required: (val) => !!val || "The field is required",
26011
26130
  url: (val) => {
26012
26131
  const url2 = val.trim();
26013
- if (!url2)
26014
- return true;
26132
+ if (!url2) return true;
26015
26133
  return isURL(url2) || "Please enter valid URL";
26016
26134
  }
26017
26135
  };
26136
+ const props = __props;
26018
26137
  const form = ref();
26019
26138
  const url = ref("");
26020
26139
  const title = ref("");
26021
26140
  const show = ref(false);
26022
26141
  async function setImage() {
26023
26142
  const { valid } = await form.value.validate();
26024
- if (!valid)
26025
- return;
26143
+ if (!valid) return;
26026
26144
  const href = url.value.startsWith("http") ? url.value : `https://${url.value}`;
26027
26145
  props.editor.chain().focus().setImage({ src: href, alt: title.value, title: title.value }).run();
26028
26146
  show.value = false;
@@ -26030,8 +26148,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
26030
26148
  }
26031
26149
  watch(show, (val) => {
26032
26150
  var _a;
26033
- if (!val)
26034
- return;
26151
+ if (!val) return;
26035
26152
  url.value = "";
26036
26153
  title.value = "";
26037
26154
  (_a = form.value) == null ? void 0 : _a.resetValidation();
@@ -26061,9 +26178,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
26061
26178
  }, mergeProps(menu, tooltip)), {
26062
26179
  default: withCtx(() => [
26063
26180
  createVNode(_component_VIcon, { size: "24" }, {
26064
- default: withCtx(() => [
26181
+ default: withCtx(() => _cache[3] || (_cache[3] = [
26065
26182
  createTextVNode("mdi-image-plus")
26066
- ]),
26183
+ ])),
26067
26184
  _: 1
26068
26185
  })
26069
26186
  ]),
@@ -26071,7 +26188,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
26071
26188
  }, 1040, ["active", "disabled"])
26072
26189
  ]),
26073
26190
  default: withCtx(() => [
26074
- createTextVNode(" Add image ")
26191
+ _cache[4] || (_cache[4] = createTextVNode(" Add image "))
26075
26192
  ]),
26076
26193
  _: 2
26077
26194
  }, 1024)
@@ -26114,9 +26231,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
26114
26231
  type: "submit",
26115
26232
  variant: "tonal"
26116
26233
  }, {
26117
- default: withCtx(() => [
26234
+ default: withCtx(() => _cache[5] || (_cache[5] = [
26118
26235
  createTextVNode("Confirm")
26119
- ]),
26236
+ ])),
26120
26237
  _: 1
26121
26238
  })
26122
26239
  ])
@@ -26125,14 +26242,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
26125
26242
  })
26126
26243
  ]),
26127
26244
  _: 1
26128
- }, 8, ["onSubmit"])
26245
+ }, 512)
26129
26246
  ]),
26130
26247
  _: 1
26131
26248
  }, 8, ["modelValue"]);
26132
26249
  };
26133
26250
  }
26134
26251
  });
26135
- const AddImage_vue_vue_type_style_index_0_scoped_8e6263e8_lang = "";
26136
26252
  const AddImage = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-8e6263e8"]]);
26137
26253
  const _hoisted_1$1 = { class: "actions d-flex justify-end" };
26138
26254
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
@@ -26141,16 +26257,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
26141
26257
  editor: {}
26142
26258
  },
26143
26259
  setup(__props) {
26144
- const props = __props;
26145
26260
  const rules = {
26146
26261
  required: (val) => !!val || "The field is required",
26147
26262
  url: (val) => {
26148
26263
  const url2 = val.trim();
26149
- if (!url2)
26150
- return true;
26264
+ if (!url2) return true;
26151
26265
  return isURL(url2) || "Please enter valid URL";
26152
26266
  }
26153
26267
  };
26268
+ const props = __props;
26154
26269
  const form = ref();
26155
26270
  const getText2 = () => {
26156
26271
  const { view, state } = props.editor;
@@ -26167,21 +26282,18 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
26167
26282
  }
26168
26283
  async function setLink() {
26169
26284
  const { valid } = await form.value.validate();
26170
- if (!valid)
26171
- return;
26285
+ if (!valid) return;
26172
26286
  const href = url.value.startsWith("http") ? url.value : `https://${url.value}`;
26173
26287
  if (href) {
26174
26288
  const attributes = { href };
26175
26289
  props.editor.chain().focus().setLinkText({ attributes, text: text.value }).run();
26176
- } else
26177
- props.editor.chain().focus().unsetLink().run();
26290
+ } else props.editor.chain().focus().unsetLink().run();
26178
26291
  show.value = false;
26179
26292
  form.value.resetValidation();
26180
26293
  }
26181
26294
  watch(show, (val) => {
26182
26295
  var _a;
26183
- if (!val)
26184
- return;
26296
+ if (!val) return;
26185
26297
  url.value = props.editor.getAttributes("link").href ?? "";
26186
26298
  text.value = getText2() ?? "";
26187
26299
  (_a = form.value) == null ? void 0 : _a.resetValidation();
@@ -26211,9 +26323,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
26211
26323
  }, mergeProps(menu, tooltip)), {
26212
26324
  default: withCtx(() => [
26213
26325
  createVNode(_component_VIcon, { size: "24" }, {
26214
- default: withCtx(() => [
26326
+ default: withCtx(() => _cache[3] || (_cache[3] = [
26215
26327
  createTextVNode("mdi-link")
26216
- ]),
26328
+ ])),
26217
26329
  _: 1
26218
26330
  })
26219
26331
  ]),
@@ -26221,7 +26333,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
26221
26333
  }, 1040, ["active", "disabled"])
26222
26334
  ]),
26223
26335
  default: withCtx(() => [
26224
- createTextVNode(" Add link ")
26336
+ _cache[4] || (_cache[4] = createTextVNode(" Add link "))
26225
26337
  ]),
26226
26338
  _: 2
26227
26339
  }, 1024)
@@ -26265,9 +26377,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
26265
26377
  variant: "plain",
26266
26378
  onClick: unlink
26267
26379
  }, {
26268
- default: withCtx(() => [
26380
+ default: withCtx(() => _cache[5] || (_cache[5] = [
26269
26381
  createTextVNode(" Unlink ")
26270
- ]),
26382
+ ])),
26271
26383
  _: 1
26272
26384
  })) : createCommentVNode("", true),
26273
26385
  createVNode(_component_VBtn, {
@@ -26275,9 +26387,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
26275
26387
  type: "submit",
26276
26388
  variant: "tonal"
26277
26389
  }, {
26278
- default: withCtx(() => [
26390
+ default: withCtx(() => _cache[6] || (_cache[6] = [
26279
26391
  createTextVNode("Confirm")
26280
- ]),
26392
+ ])),
26281
26393
  _: 1
26282
26394
  })
26283
26395
  ])
@@ -26286,14 +26398,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
26286
26398
  })
26287
26399
  ]),
26288
26400
  _: 1
26289
- }, 8, ["onSubmit"])
26401
+ }, 512)
26290
26402
  ]),
26291
26403
  _: 1
26292
26404
  }, 8, ["modelValue"]);
26293
26405
  };
26294
26406
  }
26295
26407
  });
26296
- const AddLink_vue_vue_type_style_index_0_scoped_148650fc_lang = "";
26297
26408
  const AddLink = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-148650fc"]]);
26298
26409
  const _hoisted_1 = { class: "text-body-2" };
26299
26410
  const INIT_SIZE = 5;
@@ -26310,14 +26421,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
26310
26421
  const selectedSize = reactive({ rows: 0, cols: 0 });
26311
26422
  const gridSize = reactive({ rows: INIT_SIZE, cols: INIT_SIZE });
26312
26423
  const updateSelection2 = (rows, cols) => {
26313
- if (rows === gridSize.rows)
26314
- gridSize.rows = Math.min(rows + 1, MAX_SIZE);
26315
- else if (rows < gridSize.rows - 1 && rows >= INIT_SIZE - 1)
26316
- gridSize.rows--;
26317
- if (cols === gridSize.cols)
26318
- gridSize.cols = Math.min(cols + 1, MAX_SIZE);
26319
- else if (cols < gridSize.cols - 1 && cols >= INIT_SIZE - 1)
26320
- gridSize.cols--;
26424
+ if (rows === gridSize.rows) gridSize.rows = Math.min(rows + 1, MAX_SIZE);
26425
+ else if (rows < gridSize.rows - 1 && rows >= INIT_SIZE - 1) gridSize.rows--;
26426
+ if (cols === gridSize.cols) gridSize.cols = Math.min(cols + 1, MAX_SIZE);
26427
+ else if (cols < gridSize.cols - 1 && cols >= INIT_SIZE - 1) gridSize.cols--;
26321
26428
  selectedSize.rows = rows;
26322
26429
  selectedSize.cols = cols;
26323
26430
  };
@@ -26330,8 +26437,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
26330
26437
  return props.editor.chain().focus().insertTable(options).run();
26331
26438
  };
26332
26439
  watch(show, (val) => {
26333
- if (!val)
26334
- return;
26440
+ if (!val) return;
26335
26441
  withHeaderRow.value = false;
26336
26442
  gridSize.rows = INIT_SIZE;
26337
26443
  gridSize.cols = INIT_SIZE;
@@ -26358,9 +26464,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
26358
26464
  }, mergeProps(menu, tooltip)), {
26359
26465
  default: withCtx(() => [
26360
26466
  createVNode(_component_VIcon, { size: "24" }, {
26361
- default: withCtx(() => [
26467
+ default: withCtx(() => _cache[3] || (_cache[3] = [
26362
26468
  createTextVNode("mdi-table-plus")
26363
- ]),
26469
+ ])),
26364
26470
  _: 1
26365
26471
  })
26366
26472
  ]),
@@ -26368,7 +26474,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
26368
26474
  }, 1040)
26369
26475
  ]),
26370
26476
  default: withCtx(() => [
26371
- createTextVNode(" Add table ")
26477
+ _cache[4] || (_cache[4] = createTextVNode(" Add table "))
26372
26478
  ]),
26373
26479
  _: 2
26374
26480
  }, 1024)
@@ -26421,7 +26527,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
26421
26527
  };
26422
26528
  }
26423
26529
  });
26424
- const AddTable_vue_vue_type_style_index_0_scoped_86386e2b_lang = "";
26425
26530
  const AddTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-86386e2b"]]);
26426
26531
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
26427
26532
  __name: "FontFamily",
@@ -26465,16 +26570,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
26465
26570
  class: "ml-1 mr-n1",
26466
26571
  size: "24"
26467
26572
  }, {
26468
- default: withCtx(() => [
26573
+ default: withCtx(() => _cache[0] || (_cache[0] = [
26469
26574
  createTextVNode("mdi-format-font")
26470
- ]),
26575
+ ])),
26471
26576
  _: 1
26472
26577
  }),
26473
26578
  createElementVNode("div", null, [
26474
26579
  createVNode(_component_VIcon, { small: "" }, {
26475
- default: withCtx(() => [
26580
+ default: withCtx(() => _cache[1] || (_cache[1] = [
26476
26581
  createTextVNode("mdi-menu-down")
26477
- ]),
26582
+ ])),
26478
26583
  _: 1
26479
26584
  })
26480
26585
  ])
@@ -26483,7 +26588,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
26483
26588
  }, 1040, ["active", "disabled"])
26484
26589
  ]),
26485
26590
  default: withCtx(() => [
26486
- createTextVNode(" Font family ")
26591
+ _cache[2] || (_cache[2] = createTextVNode(" Font family "))
26487
26592
  ]),
26488
26593
  _: 2
26489
26594
  }, 1024)
@@ -26527,7 +26632,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
26527
26632
  };
26528
26633
  }
26529
26634
  });
26530
- const FontFamily_vue_vue_type_style_index_0_scoped_13c3b0cc_lang = "";
26531
26635
  const FontFamily = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-13c3b0cc"]]);
26532
26636
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
26533
26637
  __name: "FontSize",
@@ -26579,15 +26683,15 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
26579
26683
  class: "ml-1 mr-n1",
26580
26684
  size: "24"
26581
26685
  }, {
26582
- default: withCtx(() => [
26686
+ default: withCtx(() => _cache[0] || (_cache[0] = [
26583
26687
  createTextVNode("mdi-format-size")
26584
- ]),
26688
+ ])),
26585
26689
  _: 1
26586
26690
  }),
26587
26691
  createVNode(_component_VIcon, { small: "" }, {
26588
- default: withCtx(() => [
26692
+ default: withCtx(() => _cache[1] || (_cache[1] = [
26589
26693
  createTextVNode("mdi-menu-down")
26590
- ]),
26694
+ ])),
26591
26695
  _: 1
26592
26696
  })
26593
26697
  ]),
@@ -26595,7 +26699,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
26595
26699
  }, 1040, ["active", "disabled"])
26596
26700
  ]),
26597
26701
  default: withCtx(() => [
26598
- createTextVNode(" Font size ")
26702
+ _cache[2] || (_cache[2] = createTextVNode(" Font size "))
26599
26703
  ]),
26600
26704
  _: 2
26601
26705
  }, 1024)
@@ -26637,7 +26741,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
26637
26741
  };
26638
26742
  }
26639
26743
  });
26640
- const FontSize_vue_vue_type_style_index_0_scoped_70882e8a_lang = "";
26641
26744
  const FontSize = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-70882e8a"]]);
26642
26745
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
26643
26746
  __name: "TextAlign",
@@ -26670,15 +26773,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
26670
26773
  class: "ml-1 mr-n1",
26671
26774
  size: "24"
26672
26775
  }, {
26673
- default: withCtx(() => [
26776
+ default: withCtx(() => _cache[0] || (_cache[0] = [
26674
26777
  createTextVNode("mdi-format-align-justify")
26675
- ]),
26778
+ ])),
26676
26779
  _: 1
26677
26780
  }),
26678
26781
  createVNode(_component_VIcon, { small: "" }, {
26679
- default: withCtx(() => [
26782
+ default: withCtx(() => _cache[1] || (_cache[1] = [
26680
26783
  createTextVNode("mdi-menu-down")
26681
- ]),
26784
+ ])),
26682
26785
  _: 1
26683
26786
  })
26684
26787
  ]),
@@ -26686,7 +26789,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
26686
26789
  }, 1040, ["disabled"])
26687
26790
  ]),
26688
26791
  default: withCtx(() => [
26689
- createTextVNode(" Text align ")
26792
+ _cache[2] || (_cache[2] = createTextVNode(" Text align "))
26690
26793
  ]),
26691
26794
  _: 2
26692
26795
  }, 1024)
@@ -26738,7 +26841,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
26738
26841
  };
26739
26842
  }
26740
26843
  });
26741
- const TextAlign_vue_vue_type_style_index_0_scoped_1b30eb43_lang = "";
26742
26844
  const TextAlign = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-1b30eb43"]]);
26743
26845
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
26744
26846
  __name: "ColorPicker",
@@ -26749,8 +26851,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
26749
26851
  icon: {}
26750
26852
  },
26751
26853
  emits: ["set", "unset"],
26752
- setup(__props, { emit }) {
26854
+ setup(__props, { emit: __emit }) {
26753
26855
  const props = __props;
26856
+ const emit = __emit;
26754
26857
  const COLORS = [
26755
26858
  [
26756
26859
  "#000000",
@@ -26834,9 +26937,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
26834
26937
  color: currentColor.value,
26835
26938
  size: "20"
26836
26939
  }, {
26837
- default: withCtx(() => [
26940
+ default: withCtx(() => _cache[1] || (_cache[1] = [
26838
26941
  createTextVNode("mdi-color-helper")
26839
- ]),
26942
+ ])),
26840
26943
  _: 1
26841
26944
  }, 8, ["color"])
26842
26945
  ]),
@@ -26877,9 +26980,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
26877
26980
  color: "white",
26878
26981
  size: "small"
26879
26982
  }, {
26880
- default: withCtx(() => [
26983
+ default: withCtx(() => _cache[2] || (_cache[2] = [
26881
26984
  createTextVNode(" mdi-check-circle ")
26882
- ]),
26985
+ ])),
26883
26986
  _: 1
26884
26987
  })) : createCommentVNode("", true)
26885
26988
  ]),
@@ -26897,12 +27000,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
26897
27000
  }, {
26898
27001
  default: withCtx(() => [
26899
27002
  createVNode(_component_VIcon, { size: "small" }, {
26900
- default: withCtx(() => [
27003
+ default: withCtx(() => _cache[3] || (_cache[3] = [
26901
27004
  createTextVNode("mdi-water-off")
26902
- ]),
27005
+ ])),
26903
27006
  _: 1
26904
27007
  }),
26905
- createTextVNode(" Reset ")
27008
+ _cache[4] || (_cache[4] = createTextVNode(" Reset "))
26906
27009
  ]),
26907
27010
  _: 1
26908
27011
  })
@@ -26915,7 +27018,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
26915
27018
  };
26916
27019
  }
26917
27020
  });
26918
- const ColorPicker_vue_vue_type_style_index_0_scoped_0b56d20a_lang = "";
26919
27021
  const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0b56d20a"]]);
26920
27022
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26921
27023
  __name: "TextColor",
@@ -26971,9 +27073,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
26971
27073
  _: 1
26972
27074
  }),
26973
27075
  createVNode(_component_VIcon, { small: "" }, {
26974
- default: withCtx(() => [
27076
+ default: withCtx(() => _cache[1] || (_cache[1] = [
26975
27077
  createTextVNode("mdi-menu-down")
26976
- ]),
27078
+ ])),
26977
27079
  _: 1
26978
27080
  })
26979
27081
  ]),
@@ -26981,7 +27083,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
26981
27083
  }, 1040, ["active"])
26982
27084
  ]),
26983
27085
  default: withCtx(() => [
26984
- createTextVNode(" Headings ")
27086
+ _cache[2] || (_cache[2] = createTextVNode(" Headings "))
26985
27087
  ]),
26986
27088
  _: 2
26987
27089
  }, 1024)
@@ -27012,7 +27114,24 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
27012
27114
  ]),
27013
27115
  _: 2
27014
27116
  }, 1032, ["active", "onClick"]);
27015
- }), 64))
27117
+ }), 64)),
27118
+ createVNode(_component_VListItem, {
27119
+ active: _ctx.editor.isActive("paragraph"),
27120
+ class: "px-2",
27121
+ "min-height": "36",
27122
+ rounded: "sm",
27123
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.editor.chain().focus().setParagraph().run())
27124
+ }, {
27125
+ default: withCtx(() => [
27126
+ createVNode(_component_VListItemTitle, null, {
27127
+ default: withCtx(() => _cache[3] || (_cache[3] = [
27128
+ createTextVNode("Normal")
27129
+ ])),
27130
+ _: 1
27131
+ })
27132
+ ]),
27133
+ _: 1
27134
+ }, 8, ["active"])
27016
27135
  ]),
27017
27136
  _: 1
27018
27137
  })
@@ -27022,8 +27141,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
27022
27141
  };
27023
27142
  }
27024
27143
  });
27025
- const TextHeading_vue_vue_type_style_index_0_scoped_70d410a1_lang = "";
27026
- const TextHeading = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-70d410a1"]]);
27144
+ const TextHeading = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-eb5927ce"]]);
27027
27145
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27028
27146
  __name: "TextHighlight",
27029
27147
  props: {
@@ -27201,7 +27319,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
27201
27319
  };
27202
27320
  }
27203
27321
  });
27204
- const EditorToolbar_vue_vue_type_style_index_0_scoped_b4ffaa29_lang = "";
27205
27322
  const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b4ffaa29"]]);
27206
27323
  const _sfc_main = /* @__PURE__ */ defineComponent({
27207
27324
  __name: "TopToolbar",
@@ -27224,7 +27341,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27224
27341
  }
27225
27342
  });
27226
27343
  const manifest = {
27227
- ...src_default,
27344
+ ...index_default,
27228
27345
  Edit,
27229
27346
  TopToolbar: _sfc_main
27230
27347
  };