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